|
From: theozh <th...@gm...> - 2018-06-13 06:46:08
|
Hi, I am trying to plot datablocks separated by some empty lines using fillsteps with "noautoscale". See the example code below. Top left: OK. That's the data with autoscale Top right: Not what I expect. Strange lines with steps when using "noautoscale" Bottom left: OK. fillsteps with autoscale Bottom right: Not what I expect. Strange fillsteps when using "noautoscale" What's wrong with me or my code? # datablocks with empty lines and steps and noautoscale reset $Data <<EOD 1 0 2 0 3 1 4 1 5 0 6 0 10 0 11 0 12 1 13 1 17 1 18 1 19 0 20 0 EOD set multiplot layout 2,2 set key top left plot x,\ $Data u 1:($2*10) w p lt 7 lw 2 title "points",\ $Data u 1:($2*10) w steps lw 2 title "steps" plot x,\ $Data u 1:($2*10) w p lt 7 lw 2 title "noautoscale" noautoscale,\ $Data u 1:($2*10) w steps lw 2 title "noautoscale" noautoscale plot x,\ $Data u 1:($2*10) w fillsteps fs transparent solid 0.1 title "fillsteps" plot x,\ $Data u 1:($2*999) w fillsteps fs transparent solid 0.1 title "noautoscale" noautoscale unset multiplot # EOF |
|
From: Ethan A M. <eam...@gm...> - 2018-06-13 16:06:48
|
On Wednesday, 13 June 2018 08:45:55 theozh wrote: > Hi, > I am trying to plot datablocks separated by some empty lines using fillsteps with "noautoscale". > See the example code below. > Top left: OK. That's the data with autoscale > Top right: Not what I expect. Strange lines with steps when using "noautoscale" > Bottom left: OK. fillsteps with autoscale > Bottom right: Not what I expect. Strange fillsteps when using "noautoscale" > > What's wrong with me or my code? I am not sure I understand the question, but I'll try to add some information that might help. The default range on both x and y is [-10:10]. If you do not specify a different range and you do not use autoscaling, then that's what you get. Normally the presence of blank lines in a data file indicates separate data sets that will be selected using the "index" keyword. I am not certain whether the presence of blank lines in a data block works identically to those in a file. I think there were some relevant patches recently but I did not pay much attention to them. In any case your plot commands do not include any "index" keyword so the intent in unclear. If I fill in the first column of data "7\n8\n9\n ..." but leave the second column blank then I get a plot which may be more like you were expecting except that the lower left plot has fill areas extending below zero. I can't immediately explain why the fill area goes negative, but also I think the documentation for "help fillsteps" is not entirely clear on what to expect in this case. Does that clarify anything? Ethan > > # datablocks with empty lines and steps and noautoscale > reset > $Data <<EOD > 1 0 > 2 0 > 3 1 > 4 1 > 5 0 > 6 0 > > 10 0 > 11 0 > 12 1 > 13 1 > > 17 1 > 18 1 > 19 0 > 20 0 > EOD > > set multiplot layout 2,2 > set key top left > > plot x,\ > $Data u 1:($2*10) w p lt 7 lw 2 title "points",\ > $Data u 1:($2*10) w steps lw 2 title "steps" > plot x,\ > $Data u 1:($2*10) w p lt 7 lw 2 title "noautoscale" noautoscale,\ > $Data u 1:($2*10) w steps lw 2 title "noautoscale" noautoscale > plot x,\ > $Data u 1:($2*10) w fillsteps fs transparent solid 0.1 title "fillsteps" > plot x,\ > $Data u 1:($2*999) w fillsteps fs transparent solid 0.1 title "noautoscale" noautoscale > unset multiplot > # EOF > > > > ------------------------------------------------------------------------------ > Check out the vibrant tech community on one of the world's most > engaging tech sites, Slashdot.org! http://sdm.link/slashdot > _______________________________________________ > gnuplot-info mailing list > gnu...@li... > Membership management via: https://lists.sourceforge.net/lists/listinfo/gnuplot-info -- |
|
From: Ethan M. <eam...@gm...> - 2018-06-13 19:59:05
|
After more experimentation I find that there is indeed a bug triggered by the combination of "noautoscale" and data points that receive a categorization "UNDEFINED". It is not specific to plot style "fillsteps" but it may explain the unexpected fill areas in your test case. On Wed, Jun 13, 2018 at 9:06 AM, Ethan A Merritt <eam...@gm...> wrote: > On Wednesday, 13 June 2018 08:45:55 theozh wrote: > > Hi, > > I am trying to plot datablocks separated by some empty lines using > fillsteps with "noautoscale". > > See the example code below. > > Top left: OK. That's the data with autoscale > > Top right: Not what I expect. Strange lines with steps when using > "noautoscale" > > Bottom left: OK. fillsteps with autoscale > > Bottom right: Not what I expect. Strange fillsteps when using > "noautoscale" > > > > What's wrong with me or my code? > > > I am not sure I understand the question, but I'll try to add some > information that might help. > > The default range on both x and y is [-10:10]. > If you do not specify a different range and you do not use autoscaling, > then that's what you get. > > Normally the presence of blank lines in a data file indicates > separate data sets that will be selected using the "index" keyword. > I am not certain whether the presence of blank lines in a data block > works identically to those in a file. I think there were some relevant > patches recently but I did not pay much attention to them. > In any case your plot commands do not include any "index" keyword > so the intent in unclear. > > If I fill in the first column of data "7\n8\n9\n ..." but leave the > second column blank then I get a plot which may be more like you > were expecting except that the lower left plot has fill areas > extending below zero. I can't immediately explain why the fill area > goes negative, but also I think the documentation for "help fillsteps" > is not entirely clear on what to expect in this case. > > Does that clarify anything? > > Ethan > > > > > > > # datablocks with empty lines and steps and noautoscale > > reset > > $Data <<EOD > > 1 0 > > 2 0 > > 3 1 > > 4 1 > > 5 0 > > 6 0 > > > > 10 0 > > 11 0 > > 12 1 > > 13 1 > > > > 17 1 > > 18 1 > > 19 0 > > 20 0 > > EOD > > > > set multiplot layout 2,2 > > set key top left > > > > plot x,\ > > $Data u 1:($2*10) w p lt 7 lw 2 title "points",\ > > $Data u 1:($2*10) w steps lw 2 title "steps" > > plot x,\ > > $Data u 1:($2*10) w p lt 7 lw 2 title "noautoscale" noautoscale,\ > > $Data u 1:($2*10) w steps lw 2 title "noautoscale" noautoscale > > plot x,\ > > $Data u 1:($2*10) w fillsteps fs transparent solid 0.1 title > "fillsteps" > > plot x,\ > > $Data u 1:($2*999) w fillsteps fs transparent solid 0.1 title > "noautoscale" noautoscale > > unset multiplot > > # EOF > > > > > > > > ------------------------------------------------------------ > ------------------ > > Check out the vibrant tech community on one of the world's most > > engaging tech sites, Slashdot.org! http://sdm.link/slashdot > > _______________________________________________ > > gnuplot-info mailing list > > gnu...@li... > > Membership management via: https://lists.sourceforge.net/ > lists/listinfo/gnuplot-info > > -- > > |
|
From: theozh <th...@gm...> - 2018-06-14 04:25:25
|
Thank you for checking this. I hope it is "easy" to fix...?! > After more experimentation I find that there is indeed a bug triggered by> the combination of "noautoscale" and data points that receive a> categorization "UNDEFINED". It is not specific to plot style "fillsteps"> but it may explain the unexpected fill areas in your test case.> |