You can subscribe to this list here.
| 2003 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(2) |
Nov
(2) |
Dec
|
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2004 |
Jan
(3) |
Feb
(1) |
Mar
(2) |
Apr
(22) |
May
(52) |
Jun
(43) |
Jul
(36) |
Aug
(59) |
Sep
(37) |
Oct
(55) |
Nov
(39) |
Dec
(36) |
| 2005 |
Jan
(64) |
Feb
(40) |
Mar
(62) |
Apr
(58) |
May
(256) |
Jun
(77) |
Jul
(80) |
Aug
(39) |
Sep
(56) |
Oct
(36) |
Nov
(113) |
Dec
(68) |
| 2006 |
Jan
(43) |
Feb
(64) |
Mar
(69) |
Apr
(60) |
May
(71) |
Jun
(53) |
Jul
(63) |
Aug
(63) |
Sep
(76) |
Oct
(85) |
Nov
(82) |
Dec
(73) |
| 2007 |
Jan
(75) |
Feb
(82) |
Mar
(84) |
Apr
(104) |
May
(67) |
Jun
(101) |
Jul
(107) |
Aug
(138) |
Sep
(128) |
Oct
(106) |
Nov
(112) |
Dec
(112) |
| 2008 |
Jan
(94) |
Feb
(87) |
Mar
(146) |
Apr
(169) |
May
(75) |
Jun
(26) |
Jul
(26) |
Aug
(7) |
Sep
(18) |
Oct
(53) |
Nov
(42) |
Dec
(19) |
| 2009 |
Jan
(43) |
Feb
(39) |
Mar
(18) |
Apr
(45) |
May
(66) |
Jun
(87) |
Jul
(56) |
Aug
(41) |
Sep
(56) |
Oct
(139) |
Nov
(98) |
Dec
(88) |
| 2010 |
Jan
(81) |
Feb
(79) |
Mar
(83) |
Apr
(97) |
May
(124) |
Jun
(84) |
Jul
(53) |
Aug
(85) |
Sep
(89) |
Oct
(50) |
Nov
(98) |
Dec
(78) |
| 2011 |
Jan
(97) |
Feb
(74) |
Mar
(68) |
Apr
(54) |
May
(63) |
Jun
(59) |
Jul
(65) |
Aug
(58) |
Sep
(37) |
Oct
(40) |
Nov
(59) |
Dec
(35) |
| 2012 |
Jan
(16) |
Feb
(56) |
Mar
(63) |
Apr
(25) |
May
(48) |
Jun
(58) |
Jul
(20) |
Aug
(13) |
Sep
(43) |
Oct
(35) |
Nov
(20) |
Dec
(17) |
| 2013 |
Jan
(22) |
Feb
(11) |
Mar
(51) |
Apr
(34) |
May
(57) |
Jun
(27) |
Jul
(70) |
Aug
(30) |
Sep
(38) |
Oct
(53) |
Nov
(40) |
Dec
(25) |
| 2014 |
Jan
(26) |
Feb
(35) |
Mar
(60) |
Apr
(12) |
May
(17) |
Jun
(15) |
Jul
(9) |
Aug
(18) |
Sep
(46) |
Oct
(18) |
Nov
(19) |
Dec
(15) |
| 2015 |
Jan
(17) |
Feb
(28) |
Mar
(21) |
Apr
(54) |
May
(36) |
Jun
(8) |
Jul
(30) |
Aug
(13) |
Sep
(3) |
Oct
(28) |
Nov
(3) |
Dec
(3) |
| 2016 |
Jan
(11) |
Feb
(9) |
Mar
(29) |
Apr
(10) |
May
(8) |
Jun
(5) |
Jul
(50) |
Aug
(57) |
Sep
(13) |
Oct
(5) |
Nov
(17) |
Dec
(11) |
| 2017 |
Jan
(3) |
Feb
(23) |
Mar
(16) |
Apr
(7) |
May
(15) |
Jun
(12) |
Jul
(48) |
Aug
(15) |
Sep
(3) |
Oct
(20) |
Nov
(28) |
Dec
(21) |
| 2018 |
Jan
(13) |
Feb
(21) |
Mar
(21) |
Apr
(7) |
May
(3) |
Jun
(7) |
Jul
(27) |
Aug
(38) |
Sep
(4) |
Oct
(30) |
Nov
(22) |
Dec
|
| 2019 |
Jan
(5) |
Feb
(16) |
Mar
(1) |
Apr
(9) |
May
(7) |
Jun
(20) |
Jul
(13) |
Aug
(3) |
Sep
(2) |
Oct
(2) |
Nov
(2) |
Dec
(4) |
| 2020 |
Jan
(6) |
Feb
(11) |
Mar
(1) |
Apr
(18) |
May
(4) |
Jun
(5) |
Jul
(12) |
Aug
(1) |
Sep
(3) |
Oct
(7) |
Nov
(1) |
Dec
(17) |
| 2021 |
Jan
(1) |
Feb
(11) |
Mar
(16) |
Apr
(6) |
May
(5) |
Jun
(1) |
Jul
(1) |
Aug
(2) |
Sep
(8) |
Oct
(10) |
Nov
(4) |
Dec
(4) |
| 2022 |
Jan
(9) |
Feb
(35) |
Mar
(4) |
Apr
|
May
(3) |
Jun
(49) |
Jul
(11) |
Aug
|
Sep
(5) |
Oct
(2) |
Nov
(16) |
Dec
(13) |
| 2023 |
Jan
|
Feb
(8) |
Mar
(3) |
Apr
|
May
(8) |
Jun
|
Jul
(5) |
Aug
|
Sep
|
Oct
(2) |
Nov
|
Dec
(2) |
| 2024 |
Jan
(6) |
Feb
(9) |
Mar
|
Apr
(26) |
May
(24) |
Jun
|
Jul
(4) |
Aug
(2) |
Sep
(1) |
Oct
(10) |
Nov
(9) |
Dec
|
| 2025 |
Jan
|
Feb
(22) |
Mar
|
Apr
(1) |
May
|
Jun
|
Jul
|
Aug
|
Sep
(1) |
Oct
(1) |
Nov
|
Dec
(4) |
| 2026 |
Jan
|
Feb
(24) |
Mar
(20) |
Apr
(18) |
May
(2) |
Jun
(2) |
Jul
(2) |
Aug
(3) |
Sep
|
Oct
|
Nov
|
Dec
|
|
From: Thomas S. <t.s...@fz...> - 2009-11-24 16:41:43
|
oh, sorry, that's a mistake, 07 *is* a valid octal stevecoh1 wrote: > > 07 is not valid octal? > > Thomas Sefzick wrote: >> and it will give an error message when %d is 07, 08, or 09 >> (because 0x is interpreted as an octal number). >> >> > > ------------------------------------------------------------------------------ > Let Crystal Reports handle the reporting - Free Crystal Reports 2008 > 30-Day > trial. Simplify your report design, integration and deployment - and focus > on > what you do best, core application coding. Discover what's new with > Crystal Reports now. http://p.sf.net/sfu/bobj-july > _______________________________________________ > Gnuplot-info mailing list > Gnu...@li... > https://lists.sourceforge.net/lists/listinfo/gnuplot-info > > -- View this message in context: http://old.nabble.com/set-xrange-from-variable-tp26477602p26498554.html Sent from the Gnuplot - User mailing list archive at Nabble.com. |
|
From: Steve C. <sc...@ja...> - 2009-11-24 15:42:25
|
07 is not valid octal? Thomas Sefzick wrote: > and it will give an error message when %d is 07, 08, or 09 > (because 0x is interpreted as an octal number). > > |
|
From: <mg...@fi...> - 2009-11-24 15:39:21
|
Hi all, I'm trying to combine the plotting of a heightmap (using contourlines) and a line. The .plot file basically is as follows: set size square set data style lines set pm3d at b interpolate 10,10 set contour set cntrparam bspline set view map unset surface splot "results.dat" using ($2):($3):($1) notitle, "line.dat" using 1:2:(0) The results.dat file contains X, Y and Z values, the line.dat file (which represent a line y = 2-x) only contains X and Y values, with the Z value, as you can see, set at a constant of 0. I use 'unset surface' because otherwise a grid-like figure through the datapoints in results.dat will be plotted, which is very much undesirable in my case. However, this also means that the line represented by line.dat is not plotted. Is this in any way avoidable? That is, can I draw the line in line.dat without also having the plot the grid-like figure? Kind regards, Michiel |
|
From: Thomas S. <t.s...@fz...> - 2009-11-23 16:46:27
|
FlavioB wrote:
>
> ...
> Can you correct me if I'm wrong? It give 2009-11-01 because it evaluates
> the first piece of code up to "%Y"? And then it takes "-%m" and "-%d" as
> single numerical values?
>
yes, and takes 2009-11-01 as a request to calculate the result.
and it will give an error message when %d is 07, 08, or 09
(because 0x is interpreted as an octal number).
FlavioB wrote:
>
>> you need to make clear that you expect a string:
>> FIRST_DAY=system('date -d "-$(($(date +%d)-1)) days"
>> +%Y-%m-%d')
>> FIRST_DAY="`date -d "-$(($(date +%d)-1)) days" +%Y-%m-%d`"
>
> Many many thanks, but as I'm curious and willing to learn some more:
> what's the "system" word standing for?
>
http://www.gnuplot.info/docs/node336.html
http://www.gnuplot.info/docs/node327.html
FlavioB wrote:
>
> And how do I use double-quotes and/or single-quotes
> (like in your second example)?
>
that's not so easy...
the outer double quotes are needed to make clear that the
result of the 'date' command is a string:
print `date -d "-$(($(date +%d)-1)) days" +%Y-%m-%d`
1997
print "`date -d "-$(($(date +%d)-1)) days" +%Y-%m-%d`"
2009-11-01
single quotes would not work here, because then the backquotes
would not be interpreted (by gnuplot):
print '`date -d "-$(($(date +%d)-1)) days" +%Y-%m-%d`'
`date -d "-$(($(date +%d)-1)) days" +%Y-%m-%d`
the double quotes inside the backquotes are essential, single
quotes would work here (due to the expansions the shell
does):
print "`date -d '-$(($(date +%d)-1)) days' +%Y-%m-%d`"
date: invalid date `-$(($(date +%d)-1)) days'
obviously, the double quotes inside the backquotes are not
interpreted as string delimiters by gnuplot, otherwise the
string would end in between.
FlavioB wrote:
>
> Thanks again and kind regards,
> Flavio Boniforti
>
> PIRAMIDE INFORMATICA SAGL
> Via Ballerini 21
> 6600 Locarno
> Switzerland
> Phone: +41 91 751 68 81
> Fax: +41 91 751 69 14
> URL: http://www.piramide.ch
> E-mail: fl...@pi...
>
> ------------------------------------------------------------------------------
> Let Crystal Reports handle the reporting - Free Crystal Reports 2008
> 30-Day
> trial. Simplify your report design, integration and deployment - and focus
> on
> what you do best, core application coding. Discover what's new with
> Crystal Reports now. http://p.sf.net/sfu/bobj-july
> _______________________________________________
> Gnuplot-info mailing list
> Gnu...@li...
> https://lists.sourceforge.net/lists/listinfo/gnuplot-info
>
>
--
View this message in context: http://old.nabble.com/set-xrange-from-variable-tp26477602p26481739.html
Sent from the Gnuplot - User mailing list archive at Nabble.com.
|
|
From: Boniforti F. <fl...@pi...> - 2009-11-23 14:59:35
|
Hallo Thomas,
> you get what you request ;-)
That's for sure, as we're talking about computers ;-)
> `date -d "-$(($(date +%d)-1)) days" +%Y-%m-%d` gives
> 2009-11-01
Can you correct me if I'm wrong? It give 2009-11-01 because it evaluates
the first piece of code up to "%Y"? And then it takes "-%m" and "-%d" as
single numerical values?
[cut]
> you need to make clear that you expect a string:
> FIRST_DAY=system('date -d "-$(($(date +%d)-1)) days"
> +%Y-%m-%d') FIRST_DAY="`date -d "-$(($(date +%d)-1)) days" +%Y-%m-%d`"
Many many thanks, but as I'm curious and willing to learn some more:
what's the "system" word standing for?
And how do I use double-quotes and/or single-quotes (like in your second
example)?
Thanks again and kind regards,
Flavio Boniforti
PIRAMIDE INFORMATICA SAGL
Via Ballerini 21
6600 Locarno
Switzerland
Phone: +41 91 751 68 81
Fax: +41 91 751 69 14
URL: http://www.piramide.ch
E-mail: fl...@pi...
|
|
From: Thomas S. <t.s...@fz...> - 2009-11-23 14:40:12
|
you get what you request ;-)
`date -d "-$(($(date +%d)-1)) days" +%Y-%m-%d`
gives
2009-11-01
and
FIRST_DAY=2009-11-01
is
2009 - 11 - 1 = 1997
you need to make clear that you expect a string:
FIRST_DAY=system('date -d "-$(($(date +%d)-1)) days" +%Y-%m-%d')
FIRST_DAY="`date -d "-$(($(date +%d)-1)) days" +%Y-%m-%d`"
FlavioB wrote:
>
>> FIRST_DAY=`date -d "-$(($(date +%d)-1)) days" +%Y-%m-%d`
>> LAST_DAY=`date -d "+1 month -$(date +%d) days" +%Y-%m-%d`
>
> I just discovered that it doesn't assign correctly the value I want, in
> gnuplot:
>
> gnuplot> FIRST_DAY=`date -d "-$(($(date +%d)-1)) days" +%Y-%m-%d`
> gnuplot> print FIRST_DAY
> 1997
>
> While at the usual bash prompt I get:
>
> storebox:~# date -d "-$(($(date +%d)-1)) days" +%Y-%m-%d
> 2009-11-01
>
> How come?
>
> Thanks,
> Flavio Boniforti
>
> PIRAMIDE INFORMATICA SAGL
> Via Ballerini 21
> 6600 Locarno
> Switzerland
> Phone: +41 91 751 68 81
> Fax: +41 91 751 69 14
> URL: http://www.piramide.ch
> E-mail: fl...@pi...
>
> ------------------------------------------------------------------------------
> Let Crystal Reports handle the reporting - Free Crystal Reports 2008
> 30-Day
> trial. Simplify your report design, integration and deployment - and focus
> on
> what you do best, core application coding. Discover what's new with
> Crystal Reports now. http://p.sf.net/sfu/bobj-july
> _______________________________________________
> Gnuplot-info mailing list
> Gnu...@li...
> https://lists.sourceforge.net/lists/listinfo/gnuplot-info
>
>
--
View this message in context: http://old.nabble.com/set-xrange-from-variable-tp26477602p26479233.html
Sent from the Gnuplot - User mailing list archive at Nabble.com.
|
|
From: Boniforti F. <fl...@pi...> - 2009-11-23 13:26:26
|
> FIRST_DAY=`date -d "-$(($(date +%d)-1)) days" +%Y-%m-%d` > LAST_DAY=`date -d "+1 month -$(date +%d) days" +%Y-%m-%d` I just discovered that it doesn't assign correctly the value I want, in gnuplot: gnuplot> FIRST_DAY=`date -d "-$(($(date +%d)-1)) days" +%Y-%m-%d` gnuplot> print FIRST_DAY 1997 While at the usual bash prompt I get: storebox:~# date -d "-$(($(date +%d)-1)) days" +%Y-%m-%d 2009-11-01 How come? Thanks, Flavio Boniforti PIRAMIDE INFORMATICA SAGL Via Ballerini 21 6600 Locarno Switzerland Phone: +41 91 751 68 81 Fax: +41 91 751 69 14 URL: http://www.piramide.ch E-mail: fl...@pi... |
|
From: Boniforti F. <fl...@pi...> - 2009-11-23 12:57:17
|
Hello everybody, I'm still trying to make successfull use of variables in my gnuplot script, so I'm asking how it would be possible to do a "set xrange" using a variable. I have following variables: FIRST_DAY=`date -d "-$(($(date +%d)-1)) days" +%Y-%m-%d` LAST_DAY=`date -d "+1 month -$(date +%d) days" +%Y-%m-%d` What I need to achieve is to set xrange in between the above two values. Today it should give: set xrange = [2009-11-01:2009-11-30] I tried with set xrange = [FIRST_DAY:LAST_DAY] but it doesn't work. Any help will be appreciated! Thanks, Flavio Boniforti PIRAMIDE INFORMATICA SAGL Via Ballerini 21 6600 Locarno Switzerland Phone: +41 91 751 68 81 Fax: +41 91 751 69 14 URL: http://www.piramide.ch E-mail: fl...@pi... |
|
From: Boniforti F. <fl...@pi...> - 2009-11-23 10:29:07
|
Hallo Hans-Bernhard, > > A) the graph should be generated *new* when the actual > month is over > > (I'd like to have different PNGs for each month); > > That's mainly between you and your data generation scripts to handle. OK, I'll go for it after I have my gnuplot script working... > > B) it should be schedulable, but I don't know how to put or pass > > variables to the plot script > > There are several approaches. The basic choice is between > parametrizing > a canned gnuplot script from the outside using environment > variables (`echo $VARIABLE` style), and modifying the script > on the fly (HERE script or piping individual commands from > another scripting language to gnuplot). Well, actually I have played a bit with setting variables inside gnuplot and trying to concatenate them. I succeeded in concatenating *string* variables: gnuplot> VAR='polti'.'-'.`date +%Y` gnuplot> print VAR polti-2009 gnuplot> VAR=VAR.'-'.`date +%m` gnuplot> print VAR polti-2009-11 I think playing with these sort of variable definitions, also will lead me to success... What do you think of this? Thanks, Flavio Boniforti PIRAMIDE INFORMATICA SAGL Via Ballerini 21 6600 Locarno Switzerland Phone: +41 91 751 68 81 Fax: +41 91 751 69 14 URL: http://www.piramide.ch E-mail: fl...@pi... |
|
From: Thomas S. <t.s...@fz...> - 2009-11-23 08:20:58
|
using :(column(i))
chudson wrote:
>
> Hi all.I have a huge problem with setting up a treatment a missing value
> inside a for loop(gnuplot version : 4.3).I need to get a state when a
> missing value is detected, then its skipped on ,not interpolated.I read
> the tip for use the $ inside using part with a number(variable) but it
> doesnt work inside for loop.
> The code:
>
> infile="/home/analiza/webgen/trans_danych/DLM_6m.csv"
> outfile="/home/analiza/webgen/trans_danych/DLM_6m.png"
> column=2
> pictTitle="DLM"
> columnList="DATA WARTOSC CEL_OD CEL_DO "
> objectList=""
> counterList="DATA WARTOSC CEL_OD CEL_DO "
> nColumn=4
> nCounter=4
> nObject=1
> objectId=1
> objectName=""
> set datafile separator ';'
> set decimalsign locale 'slovenian'
> set title "DLM"
> set xtics 1
> set xtics ("2009-04" 0, "2009-05" 1, "2009-06" 2, "2009-07" 3, "2009-08"
> 4, "2009-09" 5, "2009-10" 6, "2009-11" 7, "2009-12" 8)
> set xdata time
> set datafile missing " "
> set timefmt "%Y-%m-%d"
> set format y "%.10g"
> set autoscale x
> set terminal png size 600,450
> set output outfile
> set grid y
> set key under nobox
> set macros
> set datafile missing "NaN"
> ymax = sprintf("\"\`\cat %s |cut -d \"\;\"\ -f2|sort -n -u|head -2|tail
> -1|tr ',' '.'\`\"",infile)
> ymin= sprintf("\"\`\cat %s |cut -d \"\;\"\ -f2|sort -n -u|tail -1|tr ','
> '.'\`\"",infile)
> set yrange[0.999*@ymin:@ymax*1.001]
> set xtics rotate by 90
> plot for [i=2:nColumn] infile every ::1 using :i with linespoints title
> word(counterList,i)
>
> So,my question is how use the variable i to create a state i need.
> Any ideas will be appreciated
>
>
>
--
View this message in context: http://old.nabble.com/Problem-with-correct-treatment-a-missing-value-in-for-loop-tp26473584p26474138.html
Sent from the Gnuplot - User mailing list archive at Nabble.com.
|
|
From: Thomas S. <t.s...@fz...> - 2009-11-22 12:54:04
|
f(x,y)=y<-abs(0.8*x-0.4)?100.*(y-x**2)**2+(1.-x)**2-200.:400.*(x**2-x*y+0.2*y**4)-1000.*sin(y**2-x**3) splot f(x,y) see: http://www.gnuplot.info/docs/node58.html Hugo Gagnon-4 wrote: > > Hello, > I am relatively new to gnuplot and I would like your opinion on how to > plot f(x1,x2) as follows: > > b = -abs(0.8*x1 - .4) > if (x2 < b) then > f = 100*(x2 - x1^2)^2 + (1 - x1)^2 - 200 > else > f = 400*(x1^2 - x1*x2 + .2*x2^4) - 1000*sin(x2^2 - x1^3) > endif > > Thank you, > -- > Hugo Gagnon > > ------------------------------------------------------------------------------ > Let Crystal Reports handle the reporting - Free Crystal Reports 2008 > 30-Day > trial. Simplify your report design, integration and deployment - and focus > on > what you do best, core application coding. Discover what's new with > Crystal Reports now. http://p.sf.net/sfu/bobj-july > _______________________________________________ > Gnuplot-info mailing list > Gnu...@li... > https://lists.sourceforge.net/lists/listinfo/gnuplot-info > > -- View this message in context: http://old.nabble.com/plotting-a-not-so-easy-function...-tp26462957p26464170.html Sent from the Gnuplot - User mailing list archive at Nabble.com. |
|
From: Hugo G. <gn...@li...> - 2009-11-22 05:33:06
|
Hello, I am relatively new to gnuplot and I would like your opinion on how to plot f(x1,x2) as follows: b = -abs(0.8*x1 - .4) if (x2 < b) then f = 100*(x2 - x1^2)^2 + (1 - x1)^2 - 200 else f = 400*(x1^2 - x1*x2 + .2*x2^4) - 1000*sin(x2^2 - x1^3) endif Thank you, -- Hugo Gagnon |
|
From: Hans-Bernhard B. <HBB...@t-...> - 2009-11-21 22:33:40
|
Boniforti Flavio wrote: > A) the graph should be generated *new* when the actual month is over > (I'd like to have different PNGs for each month); That's mainly between you and your data generation scripts to handle. > B) it should be schedulable, but I don't know how to put or pass > variables to the plot script There are several approaches. The basic choice is between parametrizing a canned gnuplot script from the outside using environment variables (`echo $VARIABLE` style), and modifying the script on the fly (HERE script or piping individual commands from another scripting language to gnuplot). |
|
From: Murray C. <mu...@mu...> - 2009-11-20 16:06:40
|
On Fri, 2009-11-20 at 07:54 -0800, Thomas Sefzick wrote: > increase the size of the postscript output: > > set terminal postscript enhanced color size 80cm,29.7cm Thanks. Is there any generic way to make it "big enough", or to know how much space would be needed? -- mu...@mu... www.murrayc.com www.openismus.com |
|
From: Thomas S. <t.s...@fz...> - 2009-11-20 16:00:54
|
each plot needs it's own data: http://www.gnuplot.info/docs/node131.html stevecoh1 wrote: > > I am having trouble getting a histogram plot to work. > > As an experiment I tried the following which is approximately similar to > my script" > > Take the histogram4.gnu script from demos. > Replace the "immigration.dat" file reference with "-" and copy the data > inline data from immigration.dat into the script, resulting in the > attached histograms4a.gnu. > > The original script works fine. The script with the inline data > produces the following and a graph with only the first set plotted. > This pattern is observed whether or not the final "e" line is present in > the script. What is happening here and how may it be fixed? > > plot '-' using 2:xtic(1), '' using 3, '' using 4, '' using 5, '' using > 6, '' using 7, '' using 8, '' using 9, '' using 10, '' using 11, '' > using 12, '' using 13, '' using 14, '' using 15, '' using 16, '' using > 17, '' using 18, '' using 19, '' using 20, '' using 21, '' using 22 > ^ > "histograms.4a.gnu", line 37: warning: Skipping data file with no valid > points > > plot '-' using 2:xtic(1), '' using 3, '' using 4, '' using 5, '' using > 6, '' using 7, '' using 8, '' using 9, '' using 10, '' using 11, '' > using 12, '' using 13, '' using 14, '' using 15, '' using 16, '' using > 17, '' using 18, '' using 19, '' using 20, '' using 21, '' using 22 > ^ > "histograms.4a.gnu", line 37: warning: Skipping data file with no valid > points > > plot '-' using 2:xtic(1), '' using 3, '' using 4, '' using 5, '' using > 6, '' using 7, '' using 8, '' using 9, '' using 10, '' using 11, '' > using 12, '' using 13, '' using 14, '' using 15, '' using 16, '' using > 17, '' using 18, '' using 19, '' using 20, '' using 21, '' using 22 > ^ > "histograms.4a.gnu", line 37: warning: Skipping data file with no valid > points > > plot '-' using 2:xtic(1), '' using 3, '' using 4, '' using 5, '' using > 6, '' using 7, '' using 8, '' using 9, '' using 10, '' using 11, '' > using 12, '' using 13, '' using 14, '' using 15, '' using 16, '' using > 17, '' using 18, '' using 19, '' using 20, '' using 21, '' using 22 > ^ > "histograms.4a.gnu", line 37: warning: Skipping data file with no valid > points > > plot '-' using 2:xtic(1), '' using 3, '' using 4, '' using 5, '' using > 6, '' using 7, '' using 8, '' using 9, '' using 10, '' using 11, '' > using 12, '' using 13, '' using 14, '' using 15, '' using 16, '' using > 17, '' using 18, '' using 19, '' using 20, '' using 21, '' using 22 > > ^ > "histograms.4a.gnu", line 37: warning: Skipping data file with no valid > points > > plot '-' using 2:xtic(1), '' using 3, '' using 4, '' using 5, '' using > 6, '' using 7, '' using 8, '' using 9, '' using 10, '' using 11, '' > using 12, '' using 13, '' using 14, '' using 15, '' using 16, '' using > 17, '' using 18, '' using 19, '' using 20, '' using 21, '' using 22 > > ^ > "histograms.4a.gnu", line 37: warning: Skipping data file with no valid > points > > plot '-' using 2:xtic(1), '' using 3, '' using 4, '' using 5, '' using > 6, '' using 7, '' using 8, '' using 9, '' using 10, '' using 11, '' > using 12, '' using 13, '' using 14, '' using 15, '' using 16, '' using > 17, '' using 18, '' using 19, '' using 20, '' using 21, '' using 22 > > ^ > "histograms.4a.gnu", line 37: warning: Skipping data file with no valid > points > > plot '-' using 2:xtic(1), '' using 3, '' using 4, '' using 5, '' using > 6, '' using 7, '' using 8, '' using 9, '' using 10, '' using 11, '' > using 12, '' using 13, '' using 14, '' using 15, '' using 16, '' using > 17, '' using 18, '' using 19, '' using 20, '' using 21, '' using 22 > > ^ > "histograms.4a.gnu", line 37: warning: Skipping data file with no valid > points > > plot '-' using 2:xtic(1), '' using 3, '' using 4, '' using 5, '' using > 6, '' using 7, '' using 8, '' using 9, '' using 10, '' using 11, '' > using 12, '' using 13, '' using 14, '' using 15, '' using 16, '' using > 17, '' using 18, '' using 19, '' using 20, '' using 21, '' using 22 > > ^ > "histograms.4a.gnu", line 37: warning: Skipping data file with no valid > points > > plot '-' using 2:xtic(1), '' using 3, '' using 4, '' using 5, '' using > 6, '' using 7, '' using 8, '' using 9, '' using 10, '' using 11, '' > using 12, '' using 13, '' using 14, '' using 15, '' using 16, '' using > 17, '' using 18, '' using 19, '' using 20, '' using 21, '' using 22 > > ^ > "histograms.4a.gnu", line 37: warning: Skipping data file with no valid > points > > plot '-' using 2:xtic(1), '' using 3, '' using 4, '' using 5, '' using > 6, '' using 7, '' using 8, '' using 9, '' using 10, '' using 11, '' > using 12, '' using 13, '' using 14, '' using 15, '' using 16, '' using > 17, '' using 18, '' using 19, '' using 20, '' using 21, '' using 22 > > > ^ > "histograms.4a.gnu", line 37: warning: Skipping data file with no valid > points > > plot '-' using 2:xtic(1), '' using 3, '' using 4, '' using 5, '' using > 6, '' using 7, '' using 8, '' using 9, '' using 10, '' using 11, '' > using 12, '' using 13, '' using 14, '' using 15, '' using 16, '' using > 17, '' using 18, '' using 19, '' using 20, '' using 21, '' using 22 > > > ^ > "histograms.4a.gnu", line 37: warning: Skipping data file with no valid > points > > plot '-' using 2:xtic(1), '' using 3, '' using 4, '' using 5, '' using > 6, '' using 7, '' using 8, '' using 9, '' using 10, '' using 11, '' > using 12, '' using 13, '' using 14, '' using 15, '' using 16, '' using > 17, '' using 18, '' using 19, '' using 20, '' using 21, '' using 22 > > > ^ > "histograms.4a.gnu", line 37: warning: Skipping data file with no valid > points > > plot '-' using 2:xtic(1), '' using 3, '' using 4, '' using 5, '' using > 6, '' using 7, '' using 8, '' using 9, '' using 10, '' using 11, '' > using 12, '' using 13, '' using 14, '' using 15, '' using 16, '' using > 17, '' using 18, '' using 19, '' using 20, '' using 21, '' using 22 > > > ^ > "histograms.4a.gnu", line 37: warning: Skipping data file with no valid > points > > plot '-' using 2:xtic(1), '' using 3, '' using 4, '' using 5, '' using > 6, '' using 7, '' using 8, '' using 9, '' using 10, '' using 11, '' > using 12, '' using 13, '' using 14, '' using 15, '' using 16, '' using > 17, '' using 18, '' using 19, '' using 20, '' using 21, '' using 22 > > > ^ > "histograms.4a.gnu", line 37: warning: Skipping data file with no valid > points > > plot '-' using 2:xtic(1), '' using 3, '' using 4, '' using 5, '' using > 6, '' using 7, '' using 8, '' using 9, '' using 10, '' using 11, '' > using 12, '' using 13, '' using 14, '' using 15, '' using 16, '' using > 17, '' using 18, '' using 19, '' using 20, '' using 21, '' using 22 > > > > ^ > "histograms.4a.gnu", line 37: warning: Skipping data file with no valid > points > > plot '-' using 2:xtic(1), '' using 3, '' using 4, '' using 5, '' using > 6, '' using 7, '' using 8, '' using 9, '' using 10, '' using 11, '' > using 12, '' using 13, '' using 14, '' using 15, '' using 16, '' using > 17, '' using 18, '' using 19, '' using 20, '' using 21, '' using 22 > > > > ^ > "histograms.4a.gnu", line 37: warning: Skipping data file with no valid > points > > plot '-' using 2:xtic(1), '' using 3, '' using 4, '' using 5, '' using > 6, '' using 7, '' using 8, '' using 9, '' using 10, '' using 11, '' > using 12, '' using 13, '' using 14, '' using 15, '' using 16, '' using > 17, '' using 18, '' using 19, '' using 20, '' using 21, '' using 22 > > > > ^ > "histograms.4a.gnu", line 37: warning: Skipping data file with no valid > points > > plot '-' using 2:xtic(1), '' using 3, '' using 4, '' using 5, '' using > 6, '' using 7, '' using 8, '' using 9, '' using 10, '' using 11, '' > using 12, '' using 13, '' using 14, '' using 15, '' using 16, '' using > 17, '' using 18, '' using 19, '' using 20, '' using 21, '' using 22 > > > > ^ > "histograms.4a.gnu", line 37: warning: Skipping data file with no valid > points > > plot '-' using 2:xtic(1), '' using 3, '' using 4, '' using 5, '' using > 6, '' using 7, '' using 8, '' using 9, '' using 10, '' using 11, '' > using 12, '' using 13, '' using 14, '' using 15, '' using 16, '' using > 17, '' using 18, '' using 19, '' using 20, '' using 21, '' using 22 > > > > ^ > "histograms.4a.gnu", line 37: warning: Skipping data file with no valid > points > > # set terminal png transparent nocrop enhanced font arial 8 size 500,350 > # set output 'histograms.4.png' > set bar 1.000000 > set boxwidth 0.75 absolute > set style fill solid 1.00 border -1 > set style rectangle back fc lt -3 fillstyle solid 1.00 border -1 > set key outside right top vertical Left reverse enhanced autotitles > columnhead nobox > set key invert samplen 4 spacing 1 width 0 height 0 > set style histogram rowstacked title offset character 0, 0, 0 > set datafile missing '-' > set style data histograms > set xtics border in scale 1,0.5 nomirror rotate by -45 offset character > 0, 0, 0 > set xtics norangelimit > set xtics ("1891-1900" 0.00000 -1, "1901-1910" 1.00000 -1, "1911-1920" > 2.00000 -1, "1921-1930" 3.00000 -1, "1931-1940" 4.00000 -1, "1941-1950" > 5.00000 -1, "1951-1960" 6.00000 -1, "1961-1970" 7.00000 -1) > set title "US immigration from Europe by decade\nPlot as stacked > histogram" > set rrange [ * : * ] noreverse nowriteback # (currently [0.00000:10.0000] > ) > set trange [ * : * ] noreverse nowriteback # (currently > [-5.00000:5.00000] ) > set urange [ * : * ] noreverse nowriteback # (currently > [-5.00000:5.00000] ) > set vrange [ * : * ] noreverse nowriteback # (currently > [-5.00000:5.00000] ) > set ylabel offset character 0, 0, 0 font "" textcolor lt -1 rotate by 90 > set y2label offset character 0, 0, 0 font "" textcolor lt -1 rotate by 90 > set yrange [ 0.00000 : 7.00000e+06 ] noreverse nowriteback > set cblabel offset character 0, 0, 0 font "" textcolor lt -1 rotate by 90 > set locale "C" > plot '-' using 2:xtic(1), '' using 3, '' using 4, '' using 5, '' using 6, > '' using 7, '' using 8, '' using 9, '' using 10, '' using 11, '' using 12, > '' using 13, '' using 14, '' using 15, '' using 16, '' using 17, '' using > 18, '' using 19, '' using 20, '' using 21, '' using 22 > # IMMIGRATION BY REGION AND SELECTED COUNTRY OF LAST RESIDENCE > # > Region Austria Hungary Belgium Czechoslovakia Denmark France Germany > Greece Ireland Italy Netherlands Norway Sweden Poland Portugal Romania > Soviet_Union Spain Switzerland United_Kingdom Yugoslavia Other_Europe > TOTAL > 1891-1900 234081 181288 18167 - 50231 30770 505152 15979 388416 651893 > 26758 95015 226266 96720 27508 12750 505290 8731 31179 271538 - 282 > 3378014 > 1901-1910 668209 808511 41635 - 65285 73379 341498 167519 339065 2045877 > 48262 190505 249534 - 69149 53008 1597306 27935 34922 525950 - 39945 > 7387494 > 1911-1920 453649 442693 33746 3426 41983 61897 143945 184201 146181 > 1109524 43718 66395 95074 4813 89732 13311 921201 68611 23091 341408 1888 > 31400 4321887 > 1921-1930 32868 30680 15846 102194 32430 49610 412202 51084 211234 455315 > 26948 68531 97249 227734 29994 67646 61742 28958 29676 339570 49064 42619 > 2463194 > 1931-1940 3563 7861 4817 14393 2559 12623 144058 9119 10973 68028 7150 > 4740 3960 17026 3329 3871 1370 3258 5512 31572 5835 11949 377566 > 1941-1950 24860 3469 12189 8347 5393 38809 226578 8973 19789 57661 14860 > 10100 10665 7571 7423 1076 571 2898 10547 139306 1576 8486 621147 > 1951-1960 67106 36637 18575 918 10984 51121 477765 47608 43362 185491 > 52277 22935 21697 9985 19588 1039 671 7894 17675 202824 8225 16350 1325727 > 1961-1970 20621 5401 9192 3273 9201 45237 190796 85969 32966 214111 30606 > 15484 17116 53539 76065 3531 2465 44659 18453 213822 20381 11604 1124492 > e > > > ------------------------------------------------------------------------------ > Let Crystal Reports handle the reporting - Free Crystal Reports 2008 > 30-Day > trial. Simplify your report design, integration and deployment - and focus > on > what you do best, core application coding. Discover what's new with > Crystal Reports now. http://p.sf.net/sfu/bobj-july > _______________________________________________ > Gnuplot-info mailing list > Gnu...@li... > https://lists.sourceforge.net/lists/listinfo/gnuplot-info > > -- View this message in context: http://old.nabble.com/Histogram-plots-not-working-as-inline-data--tp26443503p26443560.html Sent from the Gnuplot - User mailing list archive at Nabble.com. |
|
From: Steve C. <sc...@ja...> - 2009-11-20 13:47:47
|
I am having trouble getting a histogram plot to work.
As an experiment I tried the following which is approximately similar to
my script"
Take the histogram4.gnu script from demos.
Replace the "immigration.dat" file reference with "-" and copy the data
inline data from immigration.dat into the script, resulting in the
attached histograms4a.gnu.
The original script works fine. The script with the inline data
produces the following and a graph with only the first set plotted.
This pattern is observed whether or not the final "e" line is present in
the script. What is happening here and how may it be fixed?
plot '-' using 2:xtic(1), '' using 3, '' using 4, '' using 5, '' using
6, '' using 7, '' using 8, '' using 9, '' using 10, '' using 11, ''
using 12, '' using 13, '' using 14, '' using 15, '' using 16, '' using
17, '' using 18, '' using 19, '' using 20, '' using 21, '' using 22
^
"histograms.4a.gnu", line 37: warning: Skipping data file with no valid
points
plot '-' using 2:xtic(1), '' using 3, '' using 4, '' using 5, '' using
6, '' using 7, '' using 8, '' using 9, '' using 10, '' using 11, ''
using 12, '' using 13, '' using 14, '' using 15, '' using 16, '' using
17, '' using 18, '' using 19, '' using 20, '' using 21, '' using 22
^
"histograms.4a.gnu", line 37: warning: Skipping data file with no valid
points
plot '-' using 2:xtic(1), '' using 3, '' using 4, '' using 5, '' using
6, '' using 7, '' using 8, '' using 9, '' using 10, '' using 11, ''
using 12, '' using 13, '' using 14, '' using 15, '' using 16, '' using
17, '' using 18, '' using 19, '' using 20, '' using 21, '' using 22
^
"histograms.4a.gnu", line 37: warning: Skipping data file with no valid
points
plot '-' using 2:xtic(1), '' using 3, '' using 4, '' using 5, '' using
6, '' using 7, '' using 8, '' using 9, '' using 10, '' using 11, ''
using 12, '' using 13, '' using 14, '' using 15, '' using 16, '' using
17, '' using 18, '' using 19, '' using 20, '' using 21, '' using 22
^
"histograms.4a.gnu", line 37: warning: Skipping data file with no valid
points
plot '-' using 2:xtic(1), '' using 3, '' using 4, '' using 5, '' using
6, '' using 7, '' using 8, '' using 9, '' using 10, '' using 11, ''
using 12, '' using 13, '' using 14, '' using 15, '' using 16, '' using
17, '' using 18, '' using 19, '' using 20, '' using 21, '' using 22
^
"histograms.4a.gnu", line 37: warning: Skipping data file with no valid
points
plot '-' using 2:xtic(1), '' using 3, '' using 4, '' using 5, '' using
6, '' using 7, '' using 8, '' using 9, '' using 10, '' using 11, ''
using 12, '' using 13, '' using 14, '' using 15, '' using 16, '' using
17, '' using 18, '' using 19, '' using 20, '' using 21, '' using 22
^
"histograms.4a.gnu", line 37: warning: Skipping data file with no valid
points
plot '-' using 2:xtic(1), '' using 3, '' using 4, '' using 5, '' using
6, '' using 7, '' using 8, '' using 9, '' using 10, '' using 11, ''
using 12, '' using 13, '' using 14, '' using 15, '' using 16, '' using
17, '' using 18, '' using 19, '' using 20, '' using 21, '' using 22
^
"histograms.4a.gnu", line 37: warning: Skipping data file with no valid
points
plot '-' using 2:xtic(1), '' using 3, '' using 4, '' using 5, '' using
6, '' using 7, '' using 8, '' using 9, '' using 10, '' using 11, ''
using 12, '' using 13, '' using 14, '' using 15, '' using 16, '' using
17, '' using 18, '' using 19, '' using 20, '' using 21, '' using 22
^
"histograms.4a.gnu", line 37: warning: Skipping data file with no valid
points
plot '-' using 2:xtic(1), '' using 3, '' using 4, '' using 5, '' using
6, '' using 7, '' using 8, '' using 9, '' using 10, '' using 11, ''
using 12, '' using 13, '' using 14, '' using 15, '' using 16, '' using
17, '' using 18, '' using 19, '' using 20, '' using 21, '' using 22
^
"histograms.4a.gnu", line 37: warning: Skipping data file with no valid
points
plot '-' using 2:xtic(1), '' using 3, '' using 4, '' using 5, '' using
6, '' using 7, '' using 8, '' using 9, '' using 10, '' using 11, ''
using 12, '' using 13, '' using 14, '' using 15, '' using 16, '' using
17, '' using 18, '' using 19, '' using 20, '' using 21, '' using 22
^
"histograms.4a.gnu", line 37: warning: Skipping data file with no valid
points
plot '-' using 2:xtic(1), '' using 3, '' using 4, '' using 5, '' using
6, '' using 7, '' using 8, '' using 9, '' using 10, '' using 11, ''
using 12, '' using 13, '' using 14, '' using 15, '' using 16, '' using
17, '' using 18, '' using 19, '' using 20, '' using 21, '' using 22
^
"histograms.4a.gnu", line 37: warning: Skipping data file with no valid
points
plot '-' using 2:xtic(1), '' using 3, '' using 4, '' using 5, '' using
6, '' using 7, '' using 8, '' using 9, '' using 10, '' using 11, ''
using 12, '' using 13, '' using 14, '' using 15, '' using 16, '' using
17, '' using 18, '' using 19, '' using 20, '' using 21, '' using 22
^
"histograms.4a.gnu", line 37: warning: Skipping data file with no valid
points
plot '-' using 2:xtic(1), '' using 3, '' using 4, '' using 5, '' using
6, '' using 7, '' using 8, '' using 9, '' using 10, '' using 11, ''
using 12, '' using 13, '' using 14, '' using 15, '' using 16, '' using
17, '' using 18, '' using 19, '' using 20, '' using 21, '' using 22
^
"histograms.4a.gnu", line 37: warning: Skipping data file with no valid
points
plot '-' using 2:xtic(1), '' using 3, '' using 4, '' using 5, '' using
6, '' using 7, '' using 8, '' using 9, '' using 10, '' using 11, ''
using 12, '' using 13, '' using 14, '' using 15, '' using 16, '' using
17, '' using 18, '' using 19, '' using 20, '' using 21, '' using 22
^
"histograms.4a.gnu", line 37: warning: Skipping data file with no valid
points
plot '-' using 2:xtic(1), '' using 3, '' using 4, '' using 5, '' using
6, '' using 7, '' using 8, '' using 9, '' using 10, '' using 11, ''
using 12, '' using 13, '' using 14, '' using 15, '' using 16, '' using
17, '' using 18, '' using 19, '' using 20, '' using 21, '' using 22
^
"histograms.4a.gnu", line 37: warning: Skipping data file with no valid
points
plot '-' using 2:xtic(1), '' using 3, '' using 4, '' using 5, '' using
6, '' using 7, '' using 8, '' using 9, '' using 10, '' using 11, ''
using 12, '' using 13, '' using 14, '' using 15, '' using 16, '' using
17, '' using 18, '' using 19, '' using 20, '' using 21, '' using 22
^
"histograms.4a.gnu", line 37: warning: Skipping data file with no valid
points
plot '-' using 2:xtic(1), '' using 3, '' using 4, '' using 5, '' using
6, '' using 7, '' using 8, '' using 9, '' using 10, '' using 11, ''
using 12, '' using 13, '' using 14, '' using 15, '' using 16, '' using
17, '' using 18, '' using 19, '' using 20, '' using 21, '' using 22
^
"histograms.4a.gnu", line 37: warning: Skipping data file with no valid
points
plot '-' using 2:xtic(1), '' using 3, '' using 4, '' using 5, '' using
6, '' using 7, '' using 8, '' using 9, '' using 10, '' using 11, ''
using 12, '' using 13, '' using 14, '' using 15, '' using 16, '' using
17, '' using 18, '' using 19, '' using 20, '' using 21, '' using 22
^
"histograms.4a.gnu", line 37: warning: Skipping data file with no valid
points
plot '-' using 2:xtic(1), '' using 3, '' using 4, '' using 5, '' using
6, '' using 7, '' using 8, '' using 9, '' using 10, '' using 11, ''
using 12, '' using 13, '' using 14, '' using 15, '' using 16, '' using
17, '' using 18, '' using 19, '' using 20, '' using 21, '' using 22
^
"histograms.4a.gnu", line 37: warning: Skipping data file with no valid
points
plot '-' using 2:xtic(1), '' using 3, '' using 4, '' using 5, '' using
6, '' using 7, '' using 8, '' using 9, '' using 10, '' using 11, ''
using 12, '' using 13, '' using 14, '' using 15, '' using 16, '' using
17, '' using 18, '' using 19, '' using 20, '' using 21, '' using 22
^
"histograms.4a.gnu", line 37: warning: Skipping data file with no valid
points
|
|
From: Boniforti F. <fl...@pi...> - 2009-11-20 08:47:35
|
Hello everybody. I'm pretty new at gnuplot, but I already achieved my first result... (see: http://yfrog.com/j8polti200911p ) Now, what I'm doing is to grab every night the total amount of traffic being sent/received via SSH between my server and a couple of different remote hosts. I achieved this via iptables, but I don't want to bother you all... The result of this data collection is like: 2009-11-16 4296994550 155016994 2009-11-17 6458167774 228657538 2009-11-18 8776045950 424622670 The columns represent date, bytes received, bytes sent. I now would like to schedule a daily update of the graph you can see at the above URL, but also: A) the graph should be generated *new* when the actual month is over (I'd like to have different PNGs for each month); B) it should be schedulable, but I don't know how to put or pass variables to the plot script Here the plot script I'm using: set term png set output 'polti-2009-11.png' set timestamp 'Ultimo aggiornamento: %d.%m.%Y' top set xdata time set timefmt '%Y-%m-%d' set xrange ['2009-11-01':'2009-11-30'] set xlabel 'Data' set format x '%d.%m' set ylabel 'Bytes' set format y '%.0s %cb' set title 'Traffico' set key off set boxwidth 0.8 relative set style fill solid 1.0 plot '2009-11-213.200.254.141.dat' using 1:2 with boxes fs solid,\ '2009-11-213.200.254.141.dat' using 1:3 with boxes fs solid Any help will be appreciated, thanks in advance! Flavio Boniforti PIRAMIDE INFORMATICA SAGL Via Ballerini 21 6600 Locarno Switzerland Phone: +41 91 751 68 81 Fax: +41 91 751 69 14 URL: http://www.piramide.ch E-mail: fl...@pi... |
|
From: Murray C. <mu...@mu...> - 2009-11-19 09:46:33
|
I'm using gnuplot with "histogram rowstacked" to plot many columns from a data file. The column titles are quite long too. But the key (legend) is then too big for the page, and even pushes the graph off the page when I place the key outside the graph. Is there any generic way to just get everything to scale down enough to fit on the page? I'm outputing to .ps, so I don't mind if people have to zoom in to actually read things. Here's my whole set of commands. set terminal postscript enhanced color set output 'massif_pretty.ps' set datafile separator '\t' set key autotitle columnheader set style data histogram set style histogram rowstacked set style fill solid border -1 set xlabel 'Instructions (millions)' set ylabel 'Kilobytes (KiB)' set key outside bottom reverse set xtics nomirror rotate by 90 set format x "%.0f" set ytics nomirror set format y "%.0fk" plot 'gnuplot.data' using using=2:xtic(1), '' using 2, '' using 3, '' using 4, '' using 5, '' using 6, '' using 7, '' using 8, '' using 9, '' using 10, '' using 11, '' using 12, '' using 13, '' using 14, '' using 15, '' using 16, '' using 17, '' using 18, '' using 19, '' using 20, '' using 21, '' using 22, '' using 23, '' using 24, '' using 25, '' using 26, '' using 27, '' using 28, '' using 29, '' using 30, '' using 31, '' using 32, '' using 33, '' using 34, '' using 35, '' using 36, '' using 37, '' using 38, '' using 39, '' using 40, '' using 41, '' using 42, '' using 43, '' using 44, '' using 45, '' using 46, '' using 47, '' using 48, '' using 49, '' using 50, '' using 51, '' using 52, '' using 53, '' using 54, '' using 55, '' using 56, '' using 57, '' using 58, '' using 59 -- mu...@mu... www.murrayc.com www.openismus.com |
|
From: Steve C. <sc...@ja...> - 2009-11-18 04:02:03
|
Thanks for that hint. I like learning something new every day. :-) Steve Thomas Sefzick wrote: > i'm not sure if 'flush' is really needed for perl. > > python has the '-u' option to have stdin, stdout, > and stderr unbuffered. > perl doesn't have a similar option. > so i think it's a python-specific problem. > > BTW, by using > #!/usr/bin/python -u > as the 1st line of your script, you need no 'flush()' > > > stevecoh1 wrote: >> Thank you! That's the answer. Might want to tell Mr. Janert about this >> so they can print an errata. Or is the flush not necessary in Perl? >> >> >> Thomas Sefzick wrote: >> >>> you need a 'flush' after 'print'ing the two lines: >>> >>> #!/usr/bin/python >>> >>> import os >>> import sys >>> import math >>> >> ------------------------------------------------------------------------------ >> Let Crystal Reports handle the reporting - Free Crystal Reports 2008 >> 30-Day >> trial. Simplify your report design, integration and deployment - and focus >> on >> what you do best, core application coding. Discover what's new with >> Crystal Reports now. http://p.sf.net/sfu/bobj-july >> _______________________________________________ >> Gnuplot-info mailing list >> Gnu...@li... >> https://lists.sourceforge.net/lists/listinfo/gnuplot-info >> >> > |
|
From: Steven M. <smi...@gm...> - 2009-11-17 21:53:03
|
Auto flush might be turned on in perl $|=1 I suspect that this is like python unbuffered.... Steve On Nov 16, 2009, at 8:47 AM, Steve Cohen wrote: > Thank you! That's the answer. Might want to tell Mr. Janert about > this > so they can print an errata. Or is the flush not necessary in Perl? > > > Thomas Sefzick wrote: > >> >> you need a 'flush' after 'print'ing the two lines: >> >> #!/usr/bin/python >> >> import os >> import sys >> import math >> > > ------------------------------------------------------------------------------ > Let Crystal Reports handle the reporting - Free Crystal Reports 2008 > 30-Day > trial. Simplify your report design, integration and deployment - and > focus on > what you do best, core application coding. Discover what's new with > Crystal Reports now. http://p.sf.net/sfu/bobj-july > _______________________________________________ > Gnuplot-info mailing list > Gnu...@li... > https://lists.sourceforge.net/lists/listinfo/gnuplot-info |
|
From: Thomas S. <t.s...@fz...> - 2009-11-17 19:42:52
|
i'm not sure if 'flush' is really needed for perl. python has the '-u' option to have stdin, stdout, and stderr unbuffered. perl doesn't have a similar option. so i think it's a python-specific problem. BTW, by using #!/usr/bin/python -u as the 1st line of your script, you need no 'flush()' stevecoh1 wrote: > > Thank you! That's the answer. Might want to tell Mr. Janert about this > so they can print an errata. Or is the flush not necessary in Perl? > > > Thomas Sefzick wrote: > >> >> you need a 'flush' after 'print'ing the two lines: >> >> #!/usr/bin/python >> >> import os >> import sys >> import math >> > > ------------------------------------------------------------------------------ > Let Crystal Reports handle the reporting - Free Crystal Reports 2008 > 30-Day > trial. Simplify your report design, integration and deployment - and focus > on > what you do best, core application coding. Discover what's new with > Crystal Reports now. http://p.sf.net/sfu/bobj-july > _______________________________________________ > Gnuplot-info mailing list > Gnu...@li... > https://lists.sourceforge.net/lists/listinfo/gnuplot-info > > -- View this message in context: http://old.nabble.com/strange-behavior-on-calling-gnuplot-from-cgi-script-written-in-python-tp26356744p26396244.html Sent from the Gnuplot - User mailing list archive at Nabble.com. |
|
From: Steve C. <sc...@ja...> - 2009-11-17 01:00:04
|
Duh, answering my own question, this one was in the book (p.230).
This version works. I had been under the mistaken impression that the
"pipe" version of "data files" had to follow the disk version exactly,
but it's actually MORE flexible. You don't have to have all this double
line hackery. "e" should be thought of as standing for "end of data" as
opposed to "end of file" which is how I was thinking of it.
#!/usr/bin/python
import os
import sys
print "Content-Type: image/png" # This is an image
print # blank line, end of headers
sys.stdout.flush()
gp = os.popen("/usr/bin/gnuplot", 'w')
gp.write('reset\n')
gp.write('set xdata time\n')
gp.write('set timefmt "%Y-%m-%d"\n')
gp.write('set format x "%b"\n')
gp.write('set xrange ["2008-11-15":"2009-11-14"]\n')
gp.write('set yrange [0:24]\n')
gp.write('set ylabel "Hours in use per day"\n')
gp.write('set term png size 960,400 x000000 xdfdfdf xffffff xffff00
x0000ff\n')
gp.write('set output "~/test.png"\n')
gp.write('plot "-" u 1:2 ti "Weekday" w impulses, "-" u 1:2 ti
"Weekend" w impulses\n')
gp.write('2009-07-13 0.5799 6\n')
gp.write('2009-07-14 0.2618 3\n')
gp.write('2009-07-15 0.4646 4\n')
gp.write('2009-07-28 0.2069 2\n')
gp.write('2009-08-18 1.1181 11\n')
gp.write('e\n')
gp.write('2009-07-11 0.7243 7\n')
gp.write('2009-08-30 0.1646 4\n')
gp.write('e\n')
gp.close()
Steve Cohen wrote:
> How is it possible to show multiple data series from a script?
>
> The following doesn't work. Only the first series gets plotted
>
>
> #!/usr/bin/python
>
> import os
> import sys
>
> print "Content-Type: image/png" # This is an image
> print # blank line, end of headers
> sys.stdout.flush()
>
> gp = os.popen("/usr/bin/gnuplot", 'w')
> gp.write('reset\n')
> gp.write('set xdata time\n')
> gp.write('set timefmt "%Y-%m-%d"\n')
> gp.write('set format x "%b"\n')
> gp.write('set xrange ["2008-11-15":"2009-11-14"]\n')
> gp.write('set yrange [0:24]\n')
> gp.write('set ylabel "Hours in use per day"\n')
> gp.write('set term png size 960,400 x000000 xdfdfdf xffffff xffff00
> x0000ff\n')
> gp.write('set output "~/test.png"\n')
> gp.write('plot "-" index 0 u 1:2 ti "Weekday" w impulses, "" index 1
> u 1:2 ti "Weekend" w impulses\n')
> gp.write('2009-07-13 0.5799 6\n')
> gp.write('2009-07-14 0.2618 3\n')
> gp.write('2009-07-15 0.4646 4\n')
> gp.write('2009-07-28 0.2069 2\n')
> gp.write('2009-08-18 1.1181 11\n')
> gp.write('\n')
> gp.write('\n')
> gp.write('2009-07-11 0.7243 7\n')
> gp.write('2009-08-30 0.1646 4\n')
> gp.write('e\n')
> gp.close()
>
> The following error message is seen.
>
> gnuplot> plot "-" index 0 u 1:2 ti "Weekday" w impulses, "" index 1
> u 1:2 ti "Weekend" w impulses
>
> ^
> line 10: warning: Skipping data file with no valid points
>
>
> If instead I modify the script to read the same data from a data file
> both sets are plotted:
>
> #!/usr/bin/python
>
> import os
> import sys
>
> print "Content-Type: image/png" # This is an image
> print # blank line, end of headers
> sys.stdout.flush()
>
> gp = os.popen("/usr/bin/gnuplot", 'w')
> gp.write('reset\n')
> gp.write('set xdata time\n')
> gp.write('set timefmt "%Y-%m-%d"\n')
> gp.write('set format x "%b"\n')
> gp.write('set xrange ["2008-11-15":"2009-11-14"]\n')
> gp.write('set yrange [0:24]\n')
> gp.write('set ylabel "Hours in use per day"\n')
> gp.write('set term png size 960,400 x000000 xdfdfdf xffffff xffff00
> x0000ff\n')
> gp.write('set output "~/test.png"\n')
> gp.write('plot "~/script.data" index 0 u 1:2 ti "Weekday" w impulses,
> "" index 1 u 1:2 ti "Weekend" w impulses\n')
> gp.close()
>
>
>
>
>
>
>
>
>
>
>
> ------------------------------------------------------------------------------
> Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
> trial. Simplify your report design, integration and deployment - and focus on
> what you do best, core application coding. Discover what's new with
> Crystal Reports now. http://p.sf.net/sfu/bobj-july
> _______________________________________________
> Gnuplot-info mailing list
> Gnu...@li...
> https://lists.sourceforge.net/lists/listinfo/gnuplot-info
>
>
|
|
From: Steve C. <sc...@ja...> - 2009-11-16 19:59:03
|
How is it possible to show multiple data series from a script?
The following doesn't work. Only the first series gets plotted
#!/usr/bin/python
import os
import sys
print "Content-Type: image/png" # This is an image
print # blank line, end of headers
sys.stdout.flush()
gp = os.popen("/usr/bin/gnuplot", 'w')
gp.write('reset\n')
gp.write('set xdata time\n')
gp.write('set timefmt "%Y-%m-%d"\n')
gp.write('set format x "%b"\n')
gp.write('set xrange ["2008-11-15":"2009-11-14"]\n')
gp.write('set yrange [0:24]\n')
gp.write('set ylabel "Hours in use per day"\n')
gp.write('set term png size 960,400 x000000 xdfdfdf xffffff xffff00
x0000ff\n')
gp.write('set output "~/test.png"\n')
gp.write('plot "-" index 0 u 1:2 ti "Weekday" w impulses, "" index 1
u 1:2 ti "Weekend" w impulses\n')
gp.write('2009-07-13 0.5799 6\n')
gp.write('2009-07-14 0.2618 3\n')
gp.write('2009-07-15 0.4646 4\n')
gp.write('2009-07-28 0.2069 2\n')
gp.write('2009-08-18 1.1181 11\n')
gp.write('\n')
gp.write('\n')
gp.write('2009-07-11 0.7243 7\n')
gp.write('2009-08-30 0.1646 4\n')
gp.write('e\n')
gp.close()
The following error message is seen.
gnuplot> plot "-" index 0 u 1:2 ti "Weekday" w impulses, "" index 1
u 1:2 ti "Weekend" w impulses
^
line 10: warning: Skipping data file with no valid points
If instead I modify the script to read the same data from a data file
both sets are plotted:
#!/usr/bin/python
import os
import sys
print "Content-Type: image/png" # This is an image
print # blank line, end of headers
sys.stdout.flush()
gp = os.popen("/usr/bin/gnuplot", 'w')
gp.write('reset\n')
gp.write('set xdata time\n')
gp.write('set timefmt "%Y-%m-%d"\n')
gp.write('set format x "%b"\n')
gp.write('set xrange ["2008-11-15":"2009-11-14"]\n')
gp.write('set yrange [0:24]\n')
gp.write('set ylabel "Hours in use per day"\n')
gp.write('set term png size 960,400 x000000 xdfdfdf xffffff xffff00
x0000ff\n')
gp.write('set output "~/test.png"\n')
gp.write('plot "~/script.data" index 0 u 1:2 ti "Weekday" w impulses,
"" index 1 u 1:2 ti "Weekend" w impulses\n')
gp.close()
|
|
From: Steve C. <sc...@ja...> - 2009-11-16 16:47:49
|
Thank you! That's the answer. Might want to tell Mr. Janert about this so they can print an errata. Or is the flush not necessary in Perl? Thomas Sefzick wrote: > > you need a 'flush' after 'print'ing the two lines: > > #!/usr/bin/python > > import os > import sys > import math > |
|
From: Thomas S. <t.s...@fz...> - 2009-11-16 16:08:35
|
you're right, there are no 'separate ways' (i first thought the
'Content-Type' lines would go somewhere else than the gnuplot
output, but that's not the case).
both, the print commands and gnuplots output go through stdout - but,
i just ran your little script and realized that the 'Content-Type' lines are
at the end.
you can reproduce this by running your script in a terminal and
piping the output into a file.
you need a 'flush' after 'print'ing the two lines:
#!/usr/bin/python
import os
import sys
import math
print "Content-Type: image/png" # This is an image
print # blank line, end of headers
sys.stdout.flush();
gp = os.popen("/usr/bin/gnuplot", 'w')
gp.write("set term png;set o;")
gp.write("plot '-' u 1:2 w linesp\n")
xs = [a/10.0 for a in range(0,101,1)]
for x in xs:
y = x * math.sin(x)
gp.write( "%f %f\n" % (x, y))
gp.write("e\n")
gp.close()
stevecoh1 wrote:
>
> OK, I feel like an idiot but I guess I'm really not understanding you
> even after reading the document you referred me to. The specific words
> I'm not understanding are "going separate ways".
>
> To that end I've gone back to basics and rewritten the example on p. 241
> in python. I believe my translation is more or less exact:
>
> ================================
> #!/usr/bin/python
>
> import os
> import math
>
> print "Content-Type: image/png" # This is an image
> print # blank line, end of headers
>
> gp = os.popen("/usr/bin/gnuplot", 'w')
> gp.write("set term png;set o;")
> gp.write("plot '-' u 1:2 w linesp\n")
>
> xs = [a/10.0 for a in range(0,101,1)]
> for x in xs:
> y = x * math.sin(x)
> gp.write( "%f %f\n" % (x, y))
> gp.write("e\n")
> gp.close()
>
>
>
> =================================
>
> This fails with the following message
> [error] [client ::1] malformed header from script. Bad header=\x89PNG:
>
> whether or not the gp.close() line is commented out.
>
> What am I missing?
>
>
>
>
>
> Thomas Sefzick wrote:
>> seems that your header:
>>
>> print "Content-Type: image/png" # This is an image
>> print # blank line, end of headers
>>
>> and gnuplots output (png graphics) are going different
>> ways, because the png graphics is sent without header
>> (a png file starts with "\x89PNG").
>>
>> have a look at the section "Object Headers" in
>> http://marc.merlins.org/htmlearn/misc/cgi-faq.txt
>>
>>
>> stevecoh1 wrote:
>>> Here's the error:
>>>
>>> [error] [client ::1] malformed header from script. Bad header=\x89PNG:
>>> usage_graph.cgi
>>>
>
> ...
>
>
>
> ------------------------------------------------------------------------------
> Let Crystal Reports handle the reporting - Free Crystal Reports 2008
> 30-Day
> trial. Simplify your report design, integration and deployment - and focus
> on
> what you do best, core application coding. Discover what's new with
> Crystal Reports now. http://p.sf.net/sfu/bobj-july
> _______________________________________________
> Gnuplot-info mailing list
> Gnu...@li...
> https://lists.sourceforge.net/lists/listinfo/gnuplot-info
>
>
--
View this message in context: http://old.nabble.com/strange-behavior-on-calling-gnuplot-from-cgi-script-written-in-python-tp26356744p26374508.html
Sent from the Gnuplot - User mailing list archive at Nabble.com.
|