help-octave
[Top][All Lists]
Advanced

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

Re: Line plotting not working in an Octave 3.8.1 script


From: Ben Abbott
Subject: Re: Line plotting not working in an Octave 3.8.1 script
Date: Wed, 11 Jun 2014 10:20:42 -0400

On Jun 11, 2014, at 10:17 AM, Fausto Arinos de A. Barbuto <address@hidden> 
wrote:

> Hi,
> 
> I wrote a script containing a plot() command aimed at plotting two
> curves on the same chart.  When the command has the following form:
> 
> plot(arg,t,'bd',arg, sqrt(arg)*besselj(1, 2.0*sqrt(2.0*arg)),'r-');
> 
> The 1st curve is plotted with neat blue diamonds but the second
> curve, that should display a red line, is not plotted.  Then when
> I invert the markers:
> 
> plot(arg,t,'r-',arg, sqrt(arg)*besselj(1, 2.0*sqrt(2.0*arg)),'bd');
> 
> The 2nd curve is plotted with blue diamonds, but now the 1st curve
> is not there.
> 
> And finally, when I try this:
> 
> plot(arg,t,'r-',arg, sqrt(arg)*besselj(1, 2.0*sqrt(2.0*arg)),'b-');
> 
> Nothing is plotted at all.  A blank chart shows only axes and axes'
> titles.  Same behaviour on either Windows, Linux or Cygwin-X.  I'm
> using the experimental GUI.
> 
> Nevertheless, in "command line mode", the following lines produce
> the expected, correct results:
> 
> >> t = [0:0.05:10];
> >> plot(t,sin(t),'bd',t,cos(t),'r-');
> 
> What's going on here?  Any hints?
> 
> Thanks,
> 
> Fausto

I assume there is some psuedo anti-aliasing algorithm that is to blame?

What happens if you widen the lines by ...

        set (findobj (gcf (), "-property", "linewidth"), "linewidth", 2)

Ben





reply via email to

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