Sat 03 Sep 2016 12:32:49 AM UTC, comment #5:
Yeah, the {} empty cell notation, analogous to [] from way back...
I think I see what the issue is, and it is a bit confusing because of the gnuplot syntax.
First, let me point out where the problem lies. This change that causes lines to appear properly, but not of the dash illustrates:
I think that gnuplot_linetype() should probably return something even if there is no dashtype feature or there is no linetype feature (but hold on, "linetype" is the confusion).
I look at gnuplot_linetype() and I see
There are two occurrences of "linetype" at the start of the above hunk, but I think they refer to two different gnuplot concepts. The _gnuplot_has_feature_ I believe refers to "linetype" as an alternative to "linestyle", while the "opt" linetype is a qualifier for a line style. That is, in gnuplot 4.4.0 there is no valid
set linetype 9 default;
, for example, but there is a valid qualifier "linetype" in the plot command
So, we have double meaning for "linetype", but of course the _gnuplot_has_feature_ can't distinguish between what is being referred to.
Either we have to get more granular on "linetype" within _gnuplot_has_feature_, e.g., "linetype" and "stylelinetype", or we can just assume that the "linetype" option has always existed and just do:
The only other place that gnuplot_linetype() is used is for patch outlines. We should somehow comment, or actually better would be to change the name of "gnuplot_linetype()" to clear confusion. In the attached patch I've done just that...think it over I guess. If you want to add something new to _gnuplot_has_feature_, I'll look how far back "linetype" has been a valid "line style" qualifier.
I verified that the changeset also works for the line style around patches.
(file #38419)
|
Fri 02 Sep 2016 09:53:58 PM UTC, comment #1:
Probably have to step through the code with the debugger. According the the information in _gnuplot_has_feature_, 'linetype' should be used only for 4.6 and above.
In _gnuplot_draw_axes_ I see lots of constructs like this
I suppose it's possible that somewhere an instance of this was missed and it needs something like that above.
The other possibility is that the gnuplot_linetype routine is wrong.
"dashtype" is available only with 5.0. "linetype" is available only with 4.6 and above. For gnuplot 4.4, both of these would be false and linetype (lt) would be set to "".
|
Fri 02 Sep 2016 09:37:58 PM UTC, original submission:
On the discussion list was noted that:
graphics_toolkit ('gnuplot');
plot (1:10, '--');
print -dpng 'test.png';
produces only a blank page with gnuplot version 4.4.0. I have confirmed this.
I used
drawnow ('x11', "/dev/null", "foo-4.6.6.gp"); ## for gnuplot 4.6.6
and
drawnow ('x11', "/dev/null", "foo-4.4.0.gp"); ## for gnuplot 4.4.0
to create gnuplot command files. The files differ as:
INTENDED FOR GNUPLOT 4.4.0
INTENDED FOR GNUPLOT 4.6.6
Octave gnuplot scripts are choosing to not plot any lines because of the age of gnuplot. But, if I change the code intended for gnuplot 4.4.0 so the plot command looks like:
(i.e., "linetype 9" replaced by the older "linestyle 9") the code run through gnuplot 4.4.0 is dashed blue lines, as expected.
|