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: Fausto Arinos de A. Barbuto
Subject: Re: Line plotting not working in an Octave 3.8.1 script
Date: Wed, 11 Jun 2014 07:32:55 -0700 (PDT)


Hi Ben,

Thanks for your help.

Well, nothing different happens when I add the command you suggested.
Except, the blue diamonds get uglier (as if their contours were kind
of blurred).

And, sorry for that, but I forgot to say that the following command:

plot(arg,t,'bd',arg,sqrt(arg)*besselj(1, 2.0*sqrt(2.0*arg)),'ro');

plots BOTH curves -- the 1st with blue diamonds, the 2nd with red
little circles.  So, the problem is apparently related to the use of
lines as markers.  Mystery.

Fausto




On Wednesday, June 11, 2014 11:20:44 AM, Ben Abbott <address@hidden> wrote:


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]