Page 8 of 17
Re: Cumulus Server Sided JpGraph Graphs
Posted: Mon 10 Nov 2008 11:35 am
by pinto
comment out
like
in rain.php
Re: Cumulus Server Sided JpGraph Graphs
Posted: Mon 10 Nov 2008 3:59 pm
by Paul C
pinto wrote:comment out
like
in rain.php
Jozef - thanks for that - I have upgraded it to 25.
Would in not be better if the graph sorted this out itself, self increased the yscale as the month etc goes on, or you have a huge downfall one day ?
Re: Cumulus Server Sided JpGraph Graphs
Posted: Tue 11 Nov 2008 1:36 am
by TNETWeather
Paul C wrote:
Jozef - thanks for that - I have upgraded it to 25.
Would in not be better if the graph sorted this out itself, self increased the yscale as the month etc goes on, or you have a huge downfall one day ?
Actually it would, but I had nothing to test it with. It doesn't rain here much, last rain was 0.01" and that was 36 days ago, hence the slogan for Phoenix, It's a Dry Heat!.... so someone that gets a lot of rain, would use quite a different scale. The scale included in the graphs, worked well with my limited (or better, none) rain fall.
One of the advantages of the scripts is unlike Cumulus itself which you don't have the source code to, the scripts come with the source, so that people can change how they work, how the look, colors, wording etc...
I would expect people to make changes to the graphs to match the theme they use, colors, wording etc... rather than use them stock as they come.
Re: Cumulus Server Sided JpGraph Graphs
Posted: Tue 11 Nov 2008 11:59 am
by Paul C
Kevin
Understood your last point which wasnt a criticism on my part. I just assumed that the graph/chart would automatically adjust the axis depending on the value.
As I use the graphs more and more I am slowly learning how to alter some aspects to suit my needs.
One slight question - top right hand side of each graph is the date - the number 2008 needs to be brought inside the graph just a touch so it doesnt overlay the graph edge, can you help me where I can change this.
Many thanks for a great package

Re: Cumulus Server Sided JpGraph Graphs
Posted: Tue 11 Nov 2008 12:53 pm
by pinto
Paul C wrote:
One slight question - top right hand side of each graph is the date - the number 2008 needs to be brought inside the graph just a touch so it doesnt overlay the graph edge, can you help me where I can change this.
I hope this helps:
In every xxx.php you will find the folowing for how you control the date on the right top of each graph:
Code: Select all
$txt3=new Text(date("M j Y",time()));
$txt3->SetFont(FF_VERDANA, FS_BOLD,8);
$txt3->SetPos(0.78,0.015,"left","top");
$txt3->SetColor("azure4");
$graph->AddText($txt3);
1.First line: define the text "M j Y" ~ Nov 11 2008
if you change the order to "j M Y" you have 11 Nov 2008
2.second line: font
FF_VERDANA ~ the font-name FF_ARIAL and so on
FS_BOLD ~ FS_NORMAL ~ FS_ITALIC (You must have those available, when you choose to use another)
8 ~ size
3.third line: position 0.78 ~horizontal ~ x = between 0.0 and 1
0.015 vertical y between 0.0 and 1
left ~ where you start (the left side of your graph) == 0.0
top ~ same here but vertical
4.fourth line: color to display the text
5.fifth line: add the text to the graph
EDIT: Don't forget to upload your file after editing
Re: Cumulus Server Sided JpGraph Graphs
Posted: Tue 11 Nov 2008 2:44 pm
by Paul C
0.7 appears to work a little clearer and brings the date away from the edge. Also changed the date format around to the UK version
$txt3=new Text(date("j M Y",time()));
$txt3->SetFont(FF_VERDANA, FS_BOLD,8);
$txt3->SetPos(0.7,0.010,"left","top");
many thanks
Re: Cumulus Server Sided JpGraph Graphs
Posted: Tue 11 Nov 2008 5:50 pm
by pinto
Paul C wrote:0.7 appears to work a little clearer and brings the date away from the edge. Also changed the date format around to the UK version
$txt3=new Text(date("j M Y",time()));
$txt3->SetFont(FF_VERDANA, FS_BOLD,8);
$txt3->SetPos(0.7,0.010,"left","top");
many thanks
only an addition:
You can use something like 0.7888 and so on, so you can adjust to the pixel you want the text to show
Re: Cumulus Server Sided JpGraph Graphs
Posted: Tue 11 Nov 2008 7:40 pm
by Paul C
pinto wrote:Paul C wrote:0.7 appears to work a little clearer and brings the date away from the edge. Also changed the date format around to the UK version
$txt3=new Text(date("j M Y",time()));
$txt3->SetFont(FF_VERDANA, FS_BOLD,8);
$txt3->SetPos(0.7,0.010,"left","top");
many thanks
only an addition:
You can use something like 0.7888 and so on, so you can adjust to the pixel you want the text to show
I soon realised how sensitive it was - I tried 2.0 first and it disappeared to the left > Just for fun here is my indoor graph.

Re: Cumulus Server Sided JpGraph Graphs
Posted: Tue 11 Nov 2008 10:36 pm
by TNETWeather
My indoor now tracks outdoor to an extent.
The window is wide open... to reduce the need for Air Conditioning...
Due to the servers in the office (home office), the room has its own heating... If I close the window, and shut the door it would settle to close to 90°F. With the window open (this time of year), it maxes out at around 83-84°F and drops at night in the mid-70's.
Humidity in the room stays around 22-35% most of the time. You can see the swing of humidity outside, goes up at night when the air is cooler and drops when it heats up.
Later in the season we will start to see even drier humidity levels. Record low for the station is 2% humidity.
Best temps in the country started about a week ago and will last until around mid-April before it "gets too hot" for some. Snow birds are already flocking to Phoenix now... (people who live in colder parts of the country that move here for the winter).
Re: Cumulus Server Sided JpGraph Graphs
Posted: Wed 12 Nov 2008 1:32 pm
by Paul C
Perhaps a move to Arizona may fix my knee, always feels worse in damp weather.
On another note I do appear to have a problemn with my graphs this morning.
If you use the link-
http://www.bramptonweather.co.uk/cumulus/graphs.php all the graphs look fine. But if you pick off one on its own eg
I now have 9am all the way across ??- any ideas of whats up. I did have to do a reboot of the PC at 9am due to a windows update, but I woulndt have thought would cause a problem. PC was up and running within 10mins
I have added a photo version of the chart in case in corrects itself

Re: Cumulus Server Sided JpGraph Graphs
Posted: Wed 12 Nov 2008 5:09 pm
by TNETWeather
The graph code plots the data it finds.
You can see what it "found" by using the debug option.
In your case, that would look like:
Code: Select all
http://www.bramptonweather.co.uk/cumulus/rain.php?freq=2&debug
Since using freq=2 means it looks at the time 4 times an hour (00,15,30,45 minutes) and you are showing more than 4 times per hour for the 9am hour, that would indicate you have either duplicate dates in your data or something else wrong with your data.
For 9am as an example, you have 27 entries shown in debug... so there were 27 entries that matched 9:XX where XX = 00, 15, 30 or 45.
Whiche when you look at your log shows exactly that:
Code: Select all
2008-11-12 09:00:12 4.4 93 3.4 3.2 2.6 239 0.0 0.0 1013.9 WSW 2 kts C mb mm 0.1 +1.1 29.8 790.2 0.4 16.6 53 3.6 +0.2 4.4 09:00 4.4 09:00 3.2 09:00 3.5 09:00 1013.9 09:00 1013.9 09:00 1.8.3 517 4.3 4.4 3.2
2008-11-12 09:00:12 4.4 93 3.4 3.2 2.6 239 0.0 0.0 1013.9 WSW 2 kts C mb mm 0.1 +1.1 29.8 790.2 0.4 16.6 53 3.6 +0.2 4.4 09:00 4.4 09:00 3.2 09:00 3.5 09:00 1013.9 09:00 1013.9 09:00 1.8.3 517 4.3 4.4 3.2
2008-11-12 09:00:12 4.4 93 3.4 3.2 2.6 239 0.0 0.0 1013.9 WSW 2 kts C mb mm 0.1 +1.1 29.8 790.2 0.4 16.6 53 3.6 +0.2 4.4 09:00 4.4 09:00 3.2 09:00 3.5 09:00 1013.9 09:00 1013.9 09:00 1.8.3 517 4.3 4.4 3.2
2008-11-12 09:00:12 4.4 93 3.4 3.2 2.6 239 0.0 0.0 1013.9 WSW 2 kts C mb mm 0.1 +1.1 29.8 790.2 0.4 16.6 53 3.6 +0.2 4.4 09:00 4.4 09:00 3.2 09:00 3.5 09:00 1013.9 09:00 1013.9 09:00 1.8.3 517 4.3 4.4 3.2
2008-11-12 09:00:12 4.4 93 3.4 3.2 2.6 239 0.0 0.0 1013.9 WSW 2 kts C mb mm 0.1 +1.1 29.8 790.2 0.4 16.6 53 3.6 +0.2 4.4 09:00 4.4 09:00 3.2 09:00 3.5 09:00 1013.9 09:00 1013.9 09:00 1.8.3 517 4.3 4.4 3.2
2008-11-12 09:00:12 4.4 93 3.4 3.2 2.6 239 0.0 0.0 1013.9 WSW 2 kts C mb mm 0.1 +1.1 29.8 790.2 0.4 16.6 53 3.6 +0.2 4.4 09:00 4.4 09:00 3.2 09:00 3.5 09:00 1013.9 09:00 1013.9 09:00 1.8.3 517 4.3 4.4 3.2
2008-11-12 09:00:12 4.4 93 3.4 3.2 2.6 239 0.0 0.0 1013.9 WSW 2 kts C mb mm 0.1 +1.1 29.8 790.2 0.4 16.6 53 3.6 +0.2 4.4 09:00 4.4 09:00 3.2 09:00 3.5 09:00 1013.9 09:00 1013.9 09:00 1.8.3 517 4.3 4.4 3.2
2008-11-12 09:00:12 4.4 93 3.4 3.2 2.6 239 0.0 0.0 1013.9 WSW 2 kts C mb mm 0.1 +1.1 29.8 790.2 0.4 16.6 53 3.6 +0.2 4.4 09:00 4.4 09:00 3.2 09:00 3.5 09:00 1013.9 09:00 1013.9 09:00 1.8.3 517 4.3 4.4 3.2
2008-11-12 09:00:12 4.4 93 3.4 3.2 2.6 239 0.0 0.0 1013.9 WSW 2 kts C mb mm 0.1 +1.1 29.8 790.2 0.4 16.6 53 3.6 +0.2 4.4 09:00 4.4 09:00 3.2 09:00 3.5 09:00 1013.9 09:00 1013.9 09:00 1.8.3 517 4.3 4.4 3.2
2008-11-12 09:00:12 4.4 93 3.4 3.2 2.6 239 0.0 0.0 1013.9 WSW 2 kts C mb mm 0.1 +1.1 29.8 790.2 0.4 16.6 53 3.6 +0.2 4.4 09:00 4.4 09:00 3.2 09:00 3.5 09:00 1013.9 09:00 1013.9 09:00 1.8.3 517 4.3 4.4 3.2
2008-11-12 09:00:12 4.4 93 3.4 3.2 2.6 239 0.0 0.0 1013.9 WSW 2 kts C mb mm 0.1 +1.1 29.8 790.2 0.4 16.6 53 3.6 +0.2 4.4 09:00 4.4 09:00 3.2 09:00 3.5 09:00 1013.9 09:00 1013.9 09:00 1.8.3 517 4.3 4.4 3.2
2008-11-12 09:00:12 4.4 93 3.4 3.2 2.6 239 0.0 0.0 1013.9 WSW 2 kts C mb mm 0.1 +1.1 29.8 790.2 0.4 16.6 53 3.6 +0.2 4.4 09:00 4.4 09:00 3.2 09:00 3.5 09:00 1013.9 09:00 1013.9 09:00 1.8.3 517 4.3 4.4 3.2
2008-11-12 09:00:12 4.4 93 3.4 3.2 2.6 239 0.0 0.0 1013.9 WSW 2 kts C mb mm 0.1 +1.1 29.8 790.2 0.4 16.6 53 3.6 +0.2 4.4 09:00 4.4 09:00 3.2 09:00 3.5 09:00 1013.9 09:00 1013.9 09:00 1.8.3 517 4.3 4.4 3.2
2008-11-12 09:00:12 4.4 93 3.4 3.2 2.6 239 0.0 0.0 1013.9 WSW 2 kts C mb mm 0.1 +1.1 29.8 790.2 0.4 16.6 53 3.6 +0.2 4.4 09:00 4.4 09:00 3.2 09:00 3.5 09:00 1013.9 09:00 1013.9 09:00 1.8.3 517 4.3 4.4 3.2
2008-11-12 09:00:12 4.4 93 3.4 3.2 2.6 239 0.0 0.0 1013.9 WSW 2 kts C mb mm 0.1 +1.1 29.8 790.2 0.4 16.6 53 3.6 +0.2 4.4 09:00 4.4 09:00 3.2 09:00 3.5 09:00 1013.9 09:00 1013.9 09:00 1.8.3 517 4.3 4.4 3.2
2008-11-12 09:00:12 4.4 93 3.4 3.2 2.6 239 0.0 0.0 1013.9 WSW 2 kts C mb mm 0.1 +1.1 29.8 790.2 0.4 16.6 53 3.6 +0.2 4.4 09:00 4.4 09:00 3.2 09:00 3.5 09:00 1013.9 09:00 1013.9 09:00 1.8.3 517 4.3 4.4 3.2
2008-11-12 09:00:12 4.4 93 3.4 3.2 2.6 239 0.0 0.0 1013.9 WSW 2 kts C mb mm 0.1 +1.1 29.8 790.2 0.4 16.6 53 3.6 +0.2 4.4 09:00 4.4 09:00 3.2 09:00 3.5 09:00 1013.9 09:00 1013.9 09:00 1.8.3 517 4.3 4.4 3.2
2008-11-12 09:00:12 4.4 93 3.4 3.2 2.6 239 0.0 0.0 1013.9 WSW 2 kts C mb mm 0.1 +1.1 29.8 790.2 0.4 16.6 53 3.6 +0.2 4.4 09:00 4.4 09:00 3.2 09:00 3.5 09:00 1013.9 09:00 1013.9 09:00 1.8.3 517 4.3 4.4 3.2
2008-11-12 09:00:12 4.4 93 3.4 3.2 2.6 239 0.0 0.0 1013.9 WSW 2 kts C mb mm 0.1 +1.1 29.8 790.2 0.4 16.6 53 3.6 +0.2 4.4 09:00 4.4 09:00 3.2 09:00 3.5 09:00 1013.9 09:00 1013.9 09:00 1.8.3 517 4.3 4.4 3.2
2008-11-12 09:00:12 4.4 93 3.4 3.2 2.6 239 0.0 0.0 1013.9 WSW 2 kts C mb mm 0.1 +1.1 29.8 790.2 0.4 16.6 53 3.6 +0.2 4.4 09:00 4.4 09:00 3.2 09:00 3.5 09:00 1013.9 09:00 1013.9 09:00 1.8.3 517 4.3 4.4 3.2
2008-11-12 09:00:12 4.4 93 3.4 3.2 2.6 239 0.0 0.0 1013.9 WSW 2 kts C mb mm 0.1 +1.1 29.8 790.2 0.4 16.6 53 3.6 +0.2 4.4 09:00 4.4 09:00 3.2 09:00 3.5 09:00 1013.9 09:00 1013.9 09:00 1.8.3 517 4.3 4.4 3.2
2008-11-12 09:00:12 4.4 93 3.4 3.2 2.6 239 0.0 0.0 1013.9 WSW 2 kts C mb mm 0.1 +1.1 29.8 790.2 0.4 16.6 53 3.6 +0.2 4.4 09:00 4.4 09:00 3.2 09:00 3.5 09:00 1013.9 09:00 1013.9 09:00 1.8.3 517 4.3 4.4 3.2
2008-11-12 09:00:12 4.4 93 3.4 3.2 2.6 239 0.0 0.0 1013.9 WSW 2 kts C mb mm 0.1 +1.1 29.8 790.2 0.4 16.6 53 3.6 +0.2 4.4 09:00 4.4 09:00 3.2 09:00 3.5 09:00 1013.9 09:00 1013.9 09:00 1.8.3 517 4.3 4.4 3.2
So the graph displayed what it found.
Re: Cumulus Server Sided JpGraph Graphs
Posted: Wed 12 Nov 2008 7:24 pm
by Paul C
Thanks for that.
So it looks possible that the realtime file has become corruputed this morning ? is this the reason. Is it a cumulus fault or something else.
Steve/Kevin - any thoughts ?
Re: Cumulus Server Sided JpGraph Graphs
Posted: Wed 12 Nov 2008 8:32 pm
by steve
Your cron job runs once a minute and adds the current realtime.txt file to the end of the realtime.log file. For the 20 minutes that Cumulus wasn't running, the realtime.txt file wasn't updated, so the same file got added each time.
Steve
Re: Cumulus Server Sided JpGraph Graphs
Posted: Wed 12 Nov 2008 8:45 pm
by Paul C
Thanks Steve.
Is there anything that can be done to prevent this ? - or is it just one of those things. At the end of the day its not much of a problem in the grand scale of things, the graph will catch up again after a while.
Re: Cumulus Server Sided JpGraph Graphs
Posted: Wed 12 Nov 2008 9:38 pm
by TNETWeather
Paul C wrote:Thanks Steve.
Is there anything that can be done to prevent this ? - or is it just one of those things. At the end of the day its not much of a problem in the grand scale of things, the graph will catch up again after a while.
The graph script could get smarter to drop duplicate times... it just makes the script more complicated.
Its perhaps easier than trying to modify the realtimelog script to see the duplicates instead since right now, it just appends without regard to what is already there.