Gnuplot Scripts

Posted on
Sat May 16, 2015 2:41 pm
DaveL17 offline
User avatar
Posts: 6759
Joined: Aug 20, 2013
Location: Chicago, IL, USA

Re: Gnuplot Scripts

Korey wrote:
Hey Dave!

Seems like this should a a new option from within your plug in! (Create Graphic) :mrgreen: :mrgreen:

Heh....don't give me any ideas!
Dave

I came here to drink milk and kick ass....and I've just finished my milk.

[My Plugins] - [My Forums]

Posted on
Sun May 17, 2015 1:50 am
durosity offline
User avatar
Posts: 4320
Joined: May 10, 2012
Location: Newcastle Upon Tyne, Ye Ol' England.

Re: Gnuplot Scripts

DaveL17 wrote:
Korey wrote:
Hey Dave!

Seems like this should a a new option from within your plug in! (Create Graphic) :mrgreen: :mrgreen:

Heh....don't give me any ideas!
Dave


Too late.. Looks like you'll be burning the midnight oil again ;)


Sent from my iPad using Tapatalk

Computer says no.

Posted on
Sun May 17, 2015 5:15 am
DaveL17 offline
User avatar
Posts: 6759
Joined: Aug 20, 2013
Location: Chicago, IL, USA

Re: Gnuplot Scripts

Too late.. Looks like you'll be burning the midnight oil again ;)


It would keep Adam chasing his tail! :D

I came here to drink milk and kick ass....and I've just finished my milk.

[My Plugins] - [My Forums]

Posted on
Sun May 17, 2015 9:39 am
ckeyes888 offline
Posts: 2425
Joined: Nov 26, 2009
Location: Kalispell, MT

Re: Gnuplot Scripts

Same result using the modified script.

Code: Select all
#! /usr/bin/env gnuplot
reset

set terminal pngcairo enhanced background "#000000" font "Lato-Light,9" linewidth 1 rounded size 600,200
set output "/Users/TV/10DayForecast.png"
dataFileForecast = "/Users/TV/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.
freezeLabel = ((freezeWarning-Ylow) / (Yhigh-Ylow))

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"
set style line 2 linetype rgb "#FFFFFF" pointtype 7 pointsize .5
set style line 3 linetype rgb "#666666"
set style line 4 linetype rgb "#FFFF00"
set style line 5 linetype rgb "#333333"

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 ytics format "%2f°" nomirror
set yrange [Ylow:Yhigh]
unset ytics
if (32 > Ylow) set label "32°" at graph 0.01,freezeLabel tc rgb "#FFFFFF" font ",8"

# Y2 Axis
set y2tics format "%2.0f%%" nomirror
set y2range [0:100]

plot dataFileForecast using 1:6 with impulses linestyle 4 axes x1y2,\
    dataFileForecast using 1:2 with freezeWarning with lines linestyle 1 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 ",8" axes x1y1,\
    dataFileForecast using 1:4 with freezeWarning with lines linestyle 1 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 ",8" axes x1y1,\
     freezeWarning with freezeWarning with lines linestyle 1 axes x1y1
     


Thanks,

Carl

Posted on
Sun May 17, 2015 10:02 am
DaveL17 offline
User avatar
Posts: 6759
Joined: Aug 20, 2013
Location: Chicago, IL, USA

Re: Gnuplot Scripts

Same result using the modified script.


Looks like you might have got a bit enthusiastic with your cutting and pasting. You have the freezeWarning line in there multiple times now.

Let's start off very simply by plotting just one line:
Code: Select all
#! /usr/bin/env gnuplot
    reset

    set terminal pngcairo enhanced background "#000000" font "Lato-Light,9" linewidth 1 rounded size 600,200
    set output "/Users/TV/10DayForecast.png"
    dataFileForecast = "/Users/TV/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.
    freezeLabel = ((freezeWarning-Ylow) / (Yhigh-Ylow))

    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"
    set style line 2 linetype rgb "#FFFFFF" pointtype 7 pointsize .5
    set style line 3 linetype rgb "#666666"
    set style line 4 linetype rgb "#FFFF00"
    set style line 5 linetype rgb "#333333"

    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 ytics format "%2f°" nomirror
    set yrange [Ylow:Yhigh]
    unset ytics
    if (32 > Ylow) set label "32°" at graph 0.01,freezeLabel tc rgb "#FFFFFF" font ",8"

    # Y2 Axis
    set y2tics format "%2.0f%%" nomirror
    set y2range [0:100]

    plot dataFileForecast using 1:4 with lines


Please let me know if this successfully generates an image for you.

Dave

I came here to drink milk and kick ass....and I've just finished my milk.

[My Plugins] - [My Forums]

Posted on
Sun May 17, 2015 11:29 am
ckeyes888 offline
Posts: 2425
Joined: Nov 26, 2009
Location: Kalispell, MT

Re: Gnuplot Scripts

Seems we have a winner.
The csv looks like this:

68,62,62°,62,62°,70
69,62,62°,62,62°,70
70,62,62°,62,62°,70
72,62,62°,62,62°,70
69,62,62°,62,62°,70
70,62,62°,62,62°,70
70,62,62°,62,62°,70
70,62,62°,62,62°,70
70,62,62°,62,62°,70
70,62,62°,62,62°,70

and the png....albeit, nothing seems plotted.

Thanks,

Carl
Attachments
10DayForecast.png
10DayForecast.png (5.15 KiB) Viewed 5456 times

Posted on
Sun May 17, 2015 11:44 am
DaveL17 offline
User avatar
Posts: 6759
Joined: Aug 20, 2013
Location: Chicago, IL, USA

Re: Gnuplot Scripts

Seems we have a winner.

Now we're getting somewhere. We asked Gnuplot to chart the fourth column of data ("using 1:4") which in the case of your CSV file, is 62,62,62,62.... So it did precisely what we asked it to do. This is a very good sign.

So first, let's get your CSV file sorted so that we have good, reliable data to plot. Please post the code for your 10DayForecast.py script here.

Dave

I came here to drink milk and kick ass....and I've just finished my milk.

[My Plugins] - [My Forums]

Posted on
Sun May 17, 2015 12:19 pm
ckeyes888 offline
Posts: 2425
Joined: Nov 26, 2009
Location: Kalispell, MT

Re: Gnuplot Scripts

Here ya go.

Code: Select all
#! /usr/bin/env python2.6
# -*- coding: utf-8 -*-

import os.path
from os import system

csvFilePath = "/Users/TV/10DayForecast.csv"
dateTime    = str(indigo.server.getTime())

day1       = str(indigo.devices[665976433].states["maxTemp2ndDay"])
day2       = str(indigo.devices[665976433].states["maxTemp3rdDay"])
day3       = str(indigo.devices[665976433].states["maxTemp4thDay"])
day4       = str(indigo.devices[665976433].states["maxTemp5thDay"])
day5       = str(indigo.devices[665976433].states["maxTemp6thDay"])
day6       = str(indigo.devices[665976433].states["maxTemp4thDay"])
day7       = str(indigo.devices[665976433].states["maxTemp4thDay"])
day8       = str(indigo.devices[665976433].states["maxTemp4thDay"])
day9       = str(indigo.devices[665976433].states["maxTemp4thDay"])
day10       = str(indigo.devices[665976433].states["maxTemp4thDay"])
highTemp1       = str(int(indigo.devices[665976433].states["maxTempToday"]))
highTemp2       = str(int(indigo.devices[665976433].states["maxTempToday"]))
highTemp3       = str(int(indigo.devices[665976433].states["maxTempToday"]))
highTemp4       = str(int(indigo.devices[665976433].states["maxTempToday"]))
highTemp5       = str(int(indigo.devices[665976433].states["maxTempToday"]))
highTemp6       = str(int(indigo.devices[665976433].states["maxTempToday"]))
highTemp7       = str(int(indigo.devices[665976433].states["maxTempToday"]))
highTemp8       = str(int(indigo.devices[665976433].states["maxTempToday"]))
highTemp9       = str(int(indigo.devices[665976433].states["maxTempToday"]))
highTemp10       = str(int(indigo.devices[665976433].states["maxTempToday"]))
lowTemp1       = str(int(indigo.devices[665976433].states["maxTempToday"]))
lowTemp2       = str(int(indigo.devices[665976433].states["maxTempToday"]))
lowTemp3       = str(int(indigo.devices[665976433].states["maxTempToday"]))
lowTemp4       = str(int(indigo.devices[665976433].states["maxTempToday"]))
lowTemp5       = str(int(indigo.devices[665976433].states["maxTempToday"]))
lowTemp6       = str(int(indigo.devices[665976433].states["maxTempToday"]))
lowTemp7       = str(int(indigo.devices[665976433].states["maxTempToday"]))
lowTemp8       = str(int(indigo.devices[665976433].states["maxTempToday"]))
lowTemp9       = str(int(indigo.devices[665976433].states["maxTempToday"]))
lowTemp10       = str(int(indigo.devices[665976433].states["maxTempToday"]))
precip1       = str(indigo.devices[665976433].states["maxTemp4thDay"])
precip2       = str(indigo.devices[665976433].states["maxTemp4thDay"])
precip3       = str(indigo.devices[665976433].states["maxTemp4thDay"])
precip4       = str(indigo.devices[665976433].states["maxTemp4thDay"])
precip5       = str(indigo.devices[665976433].states["maxTemp4thDay"])
precip6       = str(indigo.devices[665976433].states["maxTemp4thDay"])
precip7       = str(indigo.devices[665976433].states["maxTemp4thDay"])
precip8       = str(indigo.devices[665976433].states["maxTemp4thDay"])
precip9       = str(indigo.devices[665976433].states["maxTemp4thDay"])
precip10       = str(indigo.devices[665976433].states["maxTemp4thDay"])

csvFile = open(csvFilePath, "w")
element = (day1 + "," + highTemp1 + "," + highTemp1 + "°," + lowTemp1 + "," + lowTemp1 + "°," + precip1 + "\n" +
         day2 + "," + highTemp2 + "," + highTemp2 + "°," + lowTemp2 + "," + lowTemp2 + "°," + precip2 + "\n" +         
         day3 + "," + highTemp3 + "," + highTemp3 + "°," + lowTemp3 + "," + lowTemp3 + "°," + precip3 + "\n" +
         day4 + "," + highTemp4 + "," + highTemp4 + "°," + lowTemp4 + "," + lowTemp4 + "°," + precip4 + "\n" +
         day5 + "," + highTemp5 + "," + highTemp5 + "°," + lowTemp5 + "," + lowTemp5 + "°," + precip5 + "\n" +
         day6 + "," + highTemp6 + "," + highTemp6 + "°," + lowTemp6 + "," + lowTemp6 + "°," + precip6 + "\n" +
         day7 + "," + highTemp7 + "," + highTemp7 + "°," + lowTemp7 + "," + lowTemp7 + "°," + precip7 + "\n" +
         day8 + "," + highTemp8 + "," + highTemp8 + "°," + lowTemp8 + "," + lowTemp8 + "°," + precip8 + "\n" +
         day9 + "," + highTemp9 + "," + highTemp9 + "°," + lowTemp9 + "," + lowTemp9 + "°," + precip9 + "\n" +
         day10 + "," + highTemp10 + "," + highTemp10 + "°," + lowTemp10 + "," + lowTemp10 + "°," + precip10)

csvFile.write(element)
csvFile.close()

system('/opt/local/bin/gnuplot /Library/Application\ Support/Perceptive\ Automation/Indigo\ 6/Scripts/10DayForecast.gp')


Thanks,

Carl

Posted on
Sun May 17, 2015 1:02 pm
DaveL17 offline
User avatar
Posts: 6759
Joined: Aug 20, 2013
Location: Chicago, IL, USA

Re: Gnuplot Scripts

Okay, I'm assuming that you have a WUnderground 10 Day Forecast device established in Indigo (the states that you were linking to are not states for that device type.) I've corrected that and linked it to the device number [665976433] from your code. Please replace 10DayForecast.py with the code in this post.

Code: Select all
#! /usr/bin/env python2.6
# -*- coding: utf-8 -*-

import os.path
from os import system

csvFilePath = "/Users/TV/10DayForecast.csv"
dateTime    = str(indigo.server.getTime())

day1       = str(indigo.devices[665976433].states["d01_date"])
day2       = str(indigo.devices[665976433].states["d02_date"])
day3       = str(indigo.devices[665976433].states["d03_date"])
day4       = str(indigo.devices[665976433].states["d04_date"])
day5       = str(indigo.devices[665976433].states["d05_date"])
day6       = str(indigo.devices[665976433].states["d06_date"])
day7       = str(indigo.devices[665976433].states["d07_date"])
day8       = str(indigo.devices[665976433].states["d08_date"])
day9       = str(indigo.devices[665976433].states["d09_date"])
day10       = str(indigo.devices[665976433].states["d10_date"])
highTemp1       = str(int(indigo.devices[665976433].states["d01_high"]))
highTemp2       = str(int(indigo.devices[665976433].states["d02_high"]))
highTemp3       = str(int(indigo.devices[665976433].states["d03_high"]))
highTemp4       = str(int(indigo.devices[665976433].states["d04_high"]))
highTemp5       = str(int(indigo.devices[665976433].states["d05_high"]))
highTemp6       = str(int(indigo.devices[665976433].states["d06_high"]))
highTemp7       = str(int(indigo.devices[665976433].states["d07_high"]))
highTemp8       = str(int(indigo.devices[665976433].states["d08_high"]))
highTemp9       = str(int(indigo.devices[665976433].states["d09_high"]))
highTemp10       = str(int(indigo.devices[665976433].states["d10_high"]))
lowTemp1       = str(int(indigo.devices[665976433].states["d01_low"]))
lowTemp2       = str(int(indigo.devices[665976433].states["d02_low"]))
lowTemp3       = str(int(indigo.devices[665976433].states["d03_low"]))
lowTemp4       = str(int(indigo.devices[665976433].states["d04_low"]))
lowTemp5       = str(int(indigo.devices[665976433].states["d05_low"]))
lowTemp6       = str(int(indigo.devices[665976433].states["d06_low"]))
lowTemp7       = str(int(indigo.devices[665976433].states["d07_low"]))
lowTemp8       = str(int(indigo.devices[665976433].states["d08_low"]))
lowTemp9       = str(int(indigo.devices[665976433].states["d09_low"]))
lowTemp10       = str(int(indigo.devices[665976433].states["d10_low"]))
precip1       = str(indigo.devices[665976433].states["d01_pop"])
precip2       = str(indigo.devices[665976433].states["d02_pop"])
precip3       = str(indigo.devices[665976433].states["d03_pop"])
precip4       = str(indigo.devices[665976433].states["d04_pop"])
precip5       = str(indigo.devices[665976433].states["d05_pop"])
precip6       = str(indigo.devices[665976433].states["d06_pop"])
precip7       = str(indigo.devices[665976433].states["d07_pop"])
precip8       = str(indigo.devices[665976433].states["d08_pop"])
precip9       = str(indigo.devices[665976433].states["d09_pop"])
precip10       = str(indigo.devices[665976433].states["d10_pop"])

csvFile = open(csvFilePath, "w")
element = (day1 + "," + highTemp1 + "," + highTemp1 + "°," + lowTemp1 + "," + lowTemp1 + "°," + precip1 + "\n" +
         day2 + "," + highTemp2 + "," + highTemp2 + "°," + lowTemp2 + "," + lowTemp2 + "°," + precip2 + "\n" +         
         day3 + "," + highTemp3 + "," + highTemp3 + "°," + lowTemp3 + "," + lowTemp3 + "°," + precip3 + "\n" +
         day4 + "," + highTemp4 + "," + highTemp4 + "°," + lowTemp4 + "," + lowTemp4 + "°," + precip4 + "\n" +
         day5 + "," + highTemp5 + "," + highTemp5 + "°," + lowTemp5 + "," + lowTemp5 + "°," + precip5 + "\n" +
         day6 + "," + highTemp6 + "," + highTemp6 + "°," + lowTemp6 + "," + lowTemp6 + "°," + precip6 + "\n" +
         day7 + "," + highTemp7 + "," + highTemp7 + "°," + lowTemp7 + "," + lowTemp7 + "°," + precip7 + "\n" +
         day8 + "," + highTemp8 + "," + highTemp8 + "°," + lowTemp8 + "," + lowTemp8 + "°," + precip8 + "\n" +
         day9 + "," + highTemp9 + "," + highTemp9 + "°," + lowTemp9 + "," + lowTemp9 + "°," + precip9 + "\n" +
         day10 + "," + highTemp10 + "," + highTemp10 + "°," + lowTemp10 + "," + lowTemp10 + "°," + precip10)

csvFile.write(element)
csvFile.close()

system('/opt/local/bin/gnuplot /Library/Application\ Support/Perceptive\ Automation/Indigo\ 6/Scripts/10DayForecast.gp')

I came here to drink milk and kick ass....and I've just finished my milk.

[My Plugins] - [My Forums]

Posted on
Mon May 18, 2015 1:11 pm
ckeyes888 offline
Posts: 2425
Joined: Nov 26, 2009
Location: Kalispell, MT

Re: Gnuplot Scripts

I installed WUnderground and a 10 Day Forecast device and using this .gp I get the attached chart.

Code: Select all
#! /usr/bin/env gnuplot
    reset

    set terminal pngcairo enhanced background "#000000" font "Lato-Light,9" linewidth 1 rounded size 600,200
    set output "/Users/TV/10DayForecast.png"
    dataFileForecast = "/Users/TV/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.
    freezeLabel = ((freezeWarning-Ylow) / (Yhigh-Ylow))

    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"
    set style line 2 linetype rgb "#FFFFFF" pointtype 7 pointsize .5
    set style line 3 linetype rgb "#666666"
    set style line 4 linetype rgb "#FFFF00"
    set style line 5 linetype rgb "#333333"

    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 ytics format "%2f°" nomirror
    set yrange [Ylow:Yhigh]
    unset ytics
    if (32 > Ylow) set label "32°" at graph 0.01,freezeLabel tc rgb "#FFFFFF" font ",8"

    # Y2 Axis
    set y2tics format "%2.0f%%" nomirror
    set y2range [0:100]

    plot dataFileForecast using 1:4 with lines


2015-05-17,70,70°,37,37°,0.0
2015-05-18,67,67°,39,39°,0.0
2015-05-19,69,69°,40,40°,0.0
2015-05-20,73,73°,42,42°,0.0
2015-05-21,75,75°,42,42°,0.0
2015-05-22,78,78°,45,45°,0.0
2015-05-23,76,76°,46,46°,10.0
2015-05-24,73,73°,46,46°,20.0
2015-05-25,76,76°,47,47°,40.0
2015-05-26,77,77°,47,47°,10.0

Sure like yours better :-)

Thanks,

Carl
Attachments
10DayForecast.png
10DayForecast.png (6.63 KiB) Viewed 5382 times

Posted on
Mon May 18, 2015 6:07 pm
DaveL17 offline
User avatar
Posts: 6759
Joined: Aug 20, 2013
Location: Chicago, IL, USA

Re: Gnuplot Scripts

We're getting closer, but we're not there yet with the CSV. In the Python script, we're adding the degree symbol, but in your data dump below, I don't see that. Perhaps it's your location settings. We'll need to sort that out.

But we can now add some more data to your graph. Replace you Gnuplot script with this one:
Code: Select all
#! /usr/bin/env gnuplot
# -*- coding: utf-8 -*-

reset

set terminal pngcairo enhanced background "#000000" font "Lato-Light,9" linewidth 1 rounded size 600,200
set output "/Users/TV/10DayForecast.png"
dataFileForecast = "/Users/TV/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.
freezeLabel = ((freezeWarning-Ylow) / (Yhigh-Ylow))

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"
set style line 2 linetype rgb "#FFFFFF" pointtype 7 pointsize .5
set style line 3 linetype rgb "#666666"
set style line 4 linetype rgb "#FFFF00"
set style line 5 linetype rgb "#333333"

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 ytics format "%2f°" nomirror
set yrange [Ylow:Yhigh]
unset ytics
if (32 > Ylow) set label "32°" at graph 0.01,freezeLabel tc rgb "#FFFFFF" font ",8"

# Y2 Axis
set y2tics format "%2.0f%%" nomirror
set y2range [0:100]

plot dataFileForecast using 1:2 with lines,\
    dataFileForecast using 1:4 with lines,\
    freezeWarning with lines

I came here to drink milk and kick ass....and I've just finished my milk.

[My Plugins] - [My Forums]

Posted on
Mon May 18, 2015 6:31 pm
ckeyes888 offline
Posts: 2425
Joined: Nov 26, 2009
Location: Kalispell, MT

Re: Gnuplot Scripts

New script makes this png.

Is this the correct format for the location field? 48.3042,-114.2636

Thanks,

Carl
Attachments
10DayForecast.png
10DayForecast.png (8 KiB) Viewed 5363 times

Posted on
Mon May 18, 2015 6:53 pm
DaveL17 offline
User avatar
Posts: 6759
Joined: Aug 20, 2013
Location: Chicago, IL, USA

Re: Gnuplot Scripts

Yes, that's the right syntax for lat/long, and the data in the graph looks good based on the CSV data you posted earlier.

But I don't like the looks of the CSV data. You're post shows this: "¬∞" when it should be this: "°".

We can still add more to the graph, regardless--it will just look a little funny for the time being. Now let's try this one:
Code: Select all
#! /usr/bin/env gnuplot
# -*- coding: utf-8 -*-

reset

set terminal pngcairo enhanced background "#000000" font "Lato-Light,9" linewidth 1 rounded size 600,200
set output "/Users/TV/10DayForecast.png"
dataFileForecast = "/Users/TV/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.
freezeLabel = ((freezeWarning-Ylow) / (Yhigh-Ylow))

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"
set style line 2 linetype rgb "#FFFFFF" pointtype 7 pointsize .5
set style line 3 linetype rgb "#666666"
set style line 4 linetype rgb "#FFFF00"
set style line 5 linetype rgb "#333333"

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 ytics format "%2f°" nomirror
set yrange [Ylow:Yhigh]
unset ytics
if (32 > Ylow) set label "32°" at graph 0.01,freezeLabel tc rgb "#FFFFFF" font ",8"

# Y2 Axis
set y2tics format "%2.0f%%" nomirror
set y2range [0:100]

plot dataFileForecast using 1:2 with lines,\
    dataFileForecast using 1:2:3 with labels,\
     dataFileForecast using 1:4 with lines,\
     dataFileForecast using 1:2:5 with labels
     freezeWarning with lines

I came here to drink milk and kick ass....and I've just finished my milk.

[My Plugins] - [My Forums]

Posted on
Mon May 18, 2015 7:02 pm
ckeyes888 offline
Posts: 2425
Joined: Nov 26, 2009
Location: Kalispell, MT

Re: Gnuplot Scripts

That script got us this.

Thanks,

Carl
Attachments
10DayForecast.png
10DayForecast.png (8.06 KiB) Viewed 5357 times

Posted on
Mon May 18, 2015 7:04 pm
ckeyes888 offline
Posts: 2425
Joined: Nov 26, 2009
Location: Kalispell, MT

Re: Gnuplot Scripts

....and thanks a bunch for hangin in there on this. Look forward to dressing it up on my living room display screen.

Carl

Who is online

Users browsing this forum: No registered users and 8 guests