help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: linestyle problem while using plot.


From: David Bateman
Subject: Re: linestyle problem while using plot.
Date: Sat, 31 May 2008 08:10:28 +0200
User-agent: Thunderbird 2.0.0.12 (X11/20080306)

Jinzhi Lei wrote:
> Hi, all,
> 
> I'm new to  Octave, and have a problem while I try to use plot. It seems
> that the
> 'linestyle' option doesn't work with plot at it does in matlab.
> 
> I use
> 
> plot(X,Y,'linestyle','--');
> print -deps test.eps;
> 
> to plot the curve and export to the file test.eps. However, when I open
> test.eps, the curve is not plot in dashed line, but a solid line.
> 
> When I plot two curves as follows:
> 
> hold on;
> plot(X,Y,'r-');
> plot(X,Y,'b-');
> print -deps test.eps;
> 
> the second curve always appear as dashed curve. 
> 
> It seems that I can't control the line style by myself. If any one an
> tell me how to resolve this problem? Thanks.
> 

There is the following comment in scripts/plot/__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);
    ##      found_style = true;
    ##    endif

so this feature is disabled and doesn't work in a x11 terminal in any
case. As suggested in the comment use the "-dashed' option to the print
command.

D.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]