Page 1 of 1

Graph format string

Posted: Sat Oct 17, 2009 6:34 pm
by HeinrichH
How many format commands can Meteohub handle??
I want to have the text in NL, a light blue background and thicker lines.
If I use the string:
set locale "nl_NL"|set terminal png xADD8E6 x000000 x404040 10|set style line 1 lw 2|set style increment user
it works perfect but if I ad a command for line two:
set locale "nl_NL"|set terminal png xADD8E6 x000000 x404040 10|set style line 1 lw 2|set style line 2 lw 1.5|set style increment user
none of the format commands work, the background and the lines are standard white background and thin lines.

How can I use more format commands??

Re:Graph format string

Posted: Sat Oct 17, 2009 9:15 pm
by rune
Hi,

Maybe that's the limit I'm reaching! I can get some things to work using the "Display" button, but when the graph is exported nothing is changed..

Where can I find a list of commands (with examples) to use with the graphs? (line width, language, x&y axis etc)

Re:Graph format string

Posted: Sat Oct 17, 2009 10:32 pm
by skyewright
HeinrichH wrote:How many format commands can Meteohub handle??
I think it's a matter of a character limit on the length of the command?

My longest working example is:

set style line 2 lw 2|set style line 3 lw 2|set style line 7 lw 2|set style line 8 lw 2|set style increment user

Re:Graph format string

Posted: Sat Oct 17, 2009 11:41 pm
by rune
I think you're right. This one which is 124 characters ling works for me, however I cannot squeeze more into it...

set format x "%H:%M"|set style line 1 lw 2|set style line 2 lw 2|set style line 3 lw 2|set style increment user|set mxtics 6

I really would like Meteohub to have a better graph tool

Re:Graph format string

Posted: Sun Oct 18, 2009 6:40 am
by HeinrichH
rune wrote: I really would like Meteohub to have a better graph tool
Meteohub is using the GNUplot tool, see http://www.gnuplot.info/ , this is a very good tool!
But for not command line users difficult to use, I don't know if there is a graphic interface program for this tool but if Boris can update the graphic format command line, this will be much easier to use because a lot of users want to change the line withs, backgrounds and local settings.
Or if the number of characters of the command line can be extend to at least 256 characters we can add more commands to have better graphs.

Re:Graph format string

Posted: Sun Oct 18, 2009 3:15 pm
by HeinrichH
My longest example:
set locale "nl_NL"|set key below|set style line 1 lw 2|set style line 2 lw 2|set style line 3 lw 2|set style increment user
123 characters, if I want to add a box around the key with "set key below box" no formatting anymore

Re:Graph format string

Posted: Sun Oct 18, 2009 5:11 pm
by rune
I think we Boris to help us out here. Seems like there's a huge demand for better tweaking of the graphs.

Re:Graph format string

Posted: Sun Oct 18, 2009 6:21 pm
by admin
Hard limit is 4k, so that should be ok.

Please inspect corresponding ".mg" file in graphs directory. Does this contain data as expected?

Re:Graph format string

Posted: Sun Oct 18, 2009 6:41 pm
by rune
I'm not sure. I see a strange character insert in the "da_DK" but apart from that I don't know.
Any way, this line does not work: (If I remove the language setting then it's ok). The ^ in da_DK is not in the Meteohub Cmd line...

set locale "da_DK"|set format x "%H:%M"|set style line 1 lw 2|set style line 2 lw 2|set style line 3 lw 2|set style increment user

The .mg files says:
Drivhus
format set_locale_"da^_DK"|set_format_x_"%H:%M"|set_style_line_1_lw_2|set_style_line_2_lw_2|set_style_line_3_lw_2|set_style_increment_user
language 0
tf_mode 1
last_num 2
last_ind 2
tr_ind 0
xsize 1220
ysize 600
fontsize 9
dspmode 0
left_unit 0
right_unit 0
left_measure 0
left_measuremin
left_measuremax
right_measure 0
right_measuremin
right_measuremax
left_gmode 0
right_gmode 0
left_sensors 3
left_sensor-0 th0 (Outdoor)
left_sensorcolor-0 33023
left_sensorname-0 Outdoor
left_sensor-1 th3 (Sens3)
left_sensorcolor-1 49152
left_sensorname-1 Sens3
left_sensor-2 th4 (Sens4)
left_sensorcolor-2 10027008
left_sensorname-2 Sens4
right_sensors 0

Re:Graph format string

Posted: Sun Oct 18, 2009 8:13 pm
by admin
I did another code inspection, this time in "meteograph" module, that reads graph definitons and draws graphs from it.
It turns out that reading the ".mg" file limits the second parameter of each line to 128 bytes, which is fine for all parameters except the format string. I now changed this to 4kB. Bug will be fixed with the next update.

Thanks for diving into this.

Re:Graph format string

Posted: Sun Oct 18, 2009 8:41 pm
by rune
Yes! Thanks for fixing it so soon :)

All I need now is to figure out how to tweak gnuplot :S

Re:Graph format string

Posted: Sun Oct 18, 2009 10:21 pm
by skyewright
admin wrote:Thanks for diving into this.
Thanks for the fix.

Being able to tweak line thinkness helps a lot in making graphs that plot many lines easier to interpret. :cheer:

Re:Graph format string

Posted: Mon Oct 19, 2009 5:08 am
by HeinrichH
admin wrote:I now changed this to 4kB. Bug will be fixed with the next update.

Thanks for diving into this.
Thanks for fixing this so we can build very nice graphics. Just need to study the GNUplot examples now :-)