Tue 02 Nov 2010 07:33:58 PM UTC, original submission:
I was unable to print plots with solid lines. Even the "whiskers" in the errorbars were printing as various dashed lines!
Using hours to dig up the cause I found this in _go_draw_axes_.m
## FIXME -- linetype is currently broken, since it disables the
## gnuplot default dashed and solid linestyles with the only
## benefit of being able to specify '--' and get a single sized
## dashed line of identical dash pattern for all called this way.
## All dash patterns are a subset of "with lines" and none of the
## lt specifications will correctly propagate into the x11 terminal
## or the print command. Therefore, it is currently disabled in
## order to allow print (..., "-dashed") etc. to work correctly.
## if (! isempty (lt))
## fprintf (plot_stream, " linetype %s", lt);
## endif
Changing the commented code to the following allows linetypes set to "-" to always print as solid lines:
## Jarno Rajahalme 2.11.2010
## Allow lt 1 to go through to force solid lines, use "--" to use
## the various dashed backend linestyles
if (! isempty (lt))
if (lt == "1")
fprintf (plot_stream, " linetype %s", lt);
endif
endif
This is not any prettier than the disabling the linetype setting, but I think this works better. Octave's errorbar code uses linetype "-" for the error "whiskers", and with this change they actually print like they should, even when plotting multiple errorbars on the same plot.
|