DaveL17 wrote:For this particular purpose you could use any Indigo device that knows the forecast high temperature, forecast low temperature, and chance of precipitation. I highly recommend the WUnderground plugin!
But I think the broader point is just to demonstrate how to chart anything you want (within reason) from Indigo.
DaveL17 wrote:Thanks! The titles are Indigo text--easier to manipulate than in Gnuplot.
Do you use "Refreshing image URL" to update the graph on your control page?
YYYYmmddHHMM; $2;$3;$4;$5 ..
201506280000; 10;21;35;433
set datafile separator ";"
set output '/Users/karlwachs/Plots/x.png'
set terminal png truecolor enhanced medium size 850,350 dashlength 0.5 background rgb "#E0E0E0"
set style fill transparent solid 1.0
set xdata time
set format x "%H:%M"
set timefmt "%Y%m%d%H%M"
set xrange["201506280000":"201506290000"]
set format y "%.0f"
set yrange [70:90]
TZoffset = -18000 ## time zone offset for dallas = 6 hours
timeNow = time(0)/300*300 ## round to closest 5 minutes less than now = start of bin when your binning is 5 minutes
set key inside center top horizontal Right noreverse enhanced autotitles nobox
set border linecolor rgb "#A0A000"
set key textcolor rgb "#A0A000"
set title "place dots along the line" textcolor rgb "#A0A000"
plot '/Users/karlwachs/Documents/INDIGOplotD/data/minute.dat'\
using 1:((($4)*(1.0)+(0.0)) > (-2000.0) ? (($4)*(1.0)+(0.0)) : 1/0) with l lt 6 lw 1 lc rgb "#000000" t "Temp" axis x1y1\
,'' using (timeNow+TZoffset) :(timecolumn(1) >= (timeNow+TZoffset ) )?$4:1/0 with p lt 7 lw 4 lc rgb "#FF0000" t "now" axis x1y1\
,'' using (timeNow+TZoffset -4*3600) :(timecolumn(1) >= (timeNow+TZoffset-4*3600) && timecolumn(1) < (timeNow+TZoffset+1-4*3600) )?$4:1/0 with p lt 7 lw 4 lc rgb "#00FF00" t "4 hours ago" axis x1y1\
,'' using (timeNow+TZoffset +1*3600) :(timecolumn(1) >= (timeNow+TZoffset) )?$4:1/0 with p lt 7 lw 4 lc rgb "#0000FF" t "moved now to one hour in future" axis x1y1\
,'' using (timeNow+TZoffset +1*3600) :(timecolumn(1) >= (timeNow+TZoffset) )?$4:1/0:(sprintf("Value=%d",$4)) with labels left font ",10" tc rgb "#0000FF" offset char 1,0 not axis x1y1\
,
#!/opt/local/bin/gnuplot
reset
set terminal pngcairo enhanced background "#000000" font "Lato-Light,20" linewidth 1 rounded size 2048,670
set output "/Users/steve/Documents/Temperature History/10DayForecast.png"
dataFileForecast = "/Users/steve/Documents/Temperature History/10DayForecast.csv"
set datafile separator ','
set timefmt "%Y-%m-%d"
stats dataFileForecast using 2:4 nooutput
freezeWarning = 32.
Yhigh = STATS_max_x + 10.
Ylow = STATS_min_y - 10.
unset key
set border linetype rgb "#666666"
set boxwidth 0.25 relative
set style fill transparent solid 0.4
set style line 1 linetype rgb "#0066CC" # freeze line
set style line 2 linetype rgb "#FFFFFF" pointtype 7 pointsize .5 # points for both high and low temp
set style line 3 linetype rgb "#000077" # fill for low temp
set style line 4 linetype rgb "#FFFF00" # rain forecast
set style line 5 linetype rgb "#770000" # fill for high temp
set style line 6 linetype rgb "#FF7777" # line for high temp
set style line 7 linetype rgb "#3377FF" # line for low temp
set label "°" right
unset mxtics
set tics textcolor rgb "#666666"
# X Axis
set xdata time
set xtics format "%a" nomirror
set autoscale xfix
set offsets 12*60*60,12*60*60,0,0
# Y Axis
set yrange [Ylow:Yhigh]
unset ytics
if (32 > Ylow) set ytics 32,1,32 tc rgb "#FFFFFF" font ",18"
set ytics format "%2.0f°" nomirror
# Y2 Axis
set y2tics format "%2.0f%%" textcolor "#FFFF00" nomirror
set y2range [0:100]
plot dataFileForecast using 1:6 with impulses linestyle 4 axes x1y2,\
dataFileForecast using 1:2:4 with filledcurves above linestyle 5 axes x1y1,\
dataFileForecast using 1:2 with lines linestyle 6 axes x1y1,\
dataFileForecast using 1:2 with points linestyle 2 axes x1y1,\
dataFileForecast using 1:2:3 with labels offset 1.75,0.5 textcolor "#FFFFFF" font ",18" axes x1y1,\
dataFileForecast using 1:4 with filledcurves above y1=0 linestyle 3 axes x1y1,\
dataFileForecast using 1:4 with lines linestyle 7 axes x1y1,\
dataFileForecast using 1:4 with points linestyle 2 axes x1y1,\
dataFileForecast using 1:4:5 with labels offset 1.75,0.5 textcolor "#FFFFFF" font ",18" axes x1y1,\
freezeWarning with filledcurve above y1=0 linestyle 1 axes x1y1
2015-06-28,92,92°,66,66°,0.0
2015-06-29,91,91°,71,71°,20.0
2015-06-30,97,97°,74,74°,0.0
2015-07-01,100,100°,74,74°,0.0
2015-07-02,92,92°,71,71°,20.0
2015-07-03,91,91°,70,70°,0.0
2015-07-04,90,90°,70,70°,0.0
2015-07-05,90,90°,68,68°,0.0
2015-07-06,89,89°,67,67°,0.0
2015-07-07,89,89°,66,66°,0.0
DaveL17 wrote:Hard to read the code in Tapatalk, but have a look at the second plot line.
You have "with filledcurves above" but it looks like you don't say above what. Try adding Y1=0 to that line.
Dave
DaveL17 wrote:See if you can fill all the way to the axis for both lines. There may be a chance that Gnuplot is choking on the "stacked" nature of the chart you're trying to build. My fills all go to the axis for all lines--but appear stacked because each fill is written on top of the last.
Dave
dataFileForecast using 1:4:(0) with filledcurves linestyle 3
Which version of gnuplot are you running?
G N U P L O T
Version 5.0 patchlevel 0 last modified 2015-01-01
DaveL17 wrote:Which version of gnuplot are you running?
- Code: Select all
G N U :( P L O T
Version 5.0 patchlevel 0 last modified 2015-01-01
Although they look like it, my fills aren't stacked (all of the fills are to the X axis.) The light gray fill is just covering the dark gray fill behind it.
Dave
Users browsing this forum: No registered users and 1 guest