Plot colour issue - Strange change of shade

classic Classic list List threaded Threaded
8 messages Options
Reply | Threaded
Open this post in threaded view
|

Plot colour issue - Strange change of shade

steve wood
CONTENTS DELETED
The author has deleted this message.
Reply | Threaded
Open this post in threaded view
|

Re: Plot colour issue - Strange change of shade

siko1056
On 3/11/20 1:24 AM, steve wood wrote:

> Hi all,
>
> My apologies if my issue is due to my inexperience and is a simple fix but I
> only started using Octave (or any software of the type) yesterday.
>
> The colour in my graph appears strange and seems to have different shades or
> go greyish (see image). I just want it to be the same shade of dark green
> all along. Is there too many datapoints or something like that ?
>
>>> plot(x, y, "color", [0, 0.45, 0], "linewidth", 3);
>
> Many thanks,
>
>
> <https://octave.1599824.n4.nabble.com/file/t373672/Octave_Graph.png>
>

Indeed, this does not seem right.  The problem must be in your data, as
I cannot reproduce it with made up x,y data.  Can you store it at some
temporary file hosting service and send the link to this list?

Additionally, it is nice to know, which operating system and Octave
version you are using.  In case of plotting, it might also be
interesting to know the output of

   graphics_toolkit ()

HTH,
Kai


Reply | Threaded
Open this post in threaded view
|

Re: Plot colour issue - Strange change of shade

steve wood
CONTENTS DELETED
The author has deleted this message.
Reply | Threaded
Open this post in threaded view
|

Re: Plot colour issue - Strange change of shade

mmuetzel
Am 11. März 2020 um 14:03 Uhr schrieb "steve wood":

> > Hi all,
> >
> > My apologies if my issue is due to my inexperience and is a simple fix but
> > I
> > only started using Octave (or any software of the type) yesterday.
> >
> > The colour in my graph appears strange and seems to have different shades
> > or
> > go greyish (see image). I just want it to be the same shade of dark green
> > all along. Is there too many datapoints or something like that ?
> >
> >>> plot(x, y, "color", [0, 0.45, 0], "linewidth", 3);
> >
> > Many thanks,
> >
> >
> > <https://octave.1599824.n4.nabble.com/file/t373672/Octave_Graph.png>
> >
>
>
> Hi again,
>
> I did further research and it appear that other users encountered the same
> issue when plotting a graph using a very large assay. As an example if I
> plot:
>
> plot(sin((1:550000)*2*pi/550000), "color", [0,0.45,0], "linewidth", 4)
>
> The curves fades where a lot of points are close to each other, in my first
> example the curve is darker where there are less points close to each other.
>
> Any idea how this can be fixed ?

This might be an issue of the graphics driver. Which OS? Which version of Octave?

Markus


Reply | Threaded
Open this post in threaded view
|

Re: Plot colour issue - Strange change of shade

steve wood
CONTENTS DELETED
The author has deleted this message.
Reply | Threaded
Open this post in threaded view
|

Re: Plot colour issue - Strange change of shade

siko1056
In reply to this post by steve wood
On 3/11/20 6:18 PM, Etienne Brouillet-Coquillat wrote:

>
> On Wed, 11 Mar 2020 at 02:34, Kai Torben Ohlhus <[hidden email]
> <mailto:[hidden email]>> wrote:
>
>     On 3/11/20 1:24 AM, steve wood wrote:
>     > Hi all,
>     >
>     > My apologies if my issue is due to my inexperience and is a simple
>     fix but I
>     > only started using Octave (or any software of the type) yesterday.
>     >
>     > The colour in my graph appears strange and seems to have different
>     shades or
>     > go greyish (see image). I just want it to be the same shade of
>     dark green
>     > all along. Is there too many datapoints or something like that ?
>     >
>     >>> plot(x, y, "color", [0, 0.45, 0], "linewidth", 3);
>     >
>     > Many thanks,
>     >
>     >
>     > <https://octave.1599824.n4.nabble.com/file/t373672/Octave_Graph.png>
>     >
>
>     Indeed, this does not seem right.  The problem must be in your
data, as

>     I cannot reproduce it with made up x,y data.  Can you store it at some
>     temporary file hosting service and send the link to this list?
>
>     Additionally, it is nice to know, which operating system and Octave
>     version you are using.  In case of plotting, it might also be
>     interesting to know the output of
>
>        graphics_toolkit ()
>
>     HTH,
>     Kai
>
> Hi Kai,
>
> Thank you for your reply, I am on windows 10 and I use the Octave 5.2.0
> version a so far as I an aware I didn't use a graphics_toolkit () unless
> there is a default one. My data was recorded with a sampling rate of 10
> Hz over 240 min so with a lot of datapoints. I attached the file I used.
> To plot I did:
>
> load RS52.txt;
> x = RS52(:,1);
> y = RS52(:,2);
> plot(x, y, "color", [0, 0.45, 0], "linewidth", 3);
>
> Regards,
>
> Steve
>

Thank you for the details.  Please keep the mailing list in the CC, so
others may benefit from our conversation as well and answer at the
bottom of the email (bottom-posting [1]) to facilitate our conversation.

In my MS Windows 10 virtual machine I could reproduce your problem, not
on Linux.  It seems like this is related to bug #54554 [2]?  Because
where there are many data points, the green line becomes more light
green (invisible elements?).

HTH,
Kai

[1] https://en.wikipedia.org/wiki/Posting_style#Bottom-posting
[2] https://savannah.gnu.org/bugs/?54554



RS52.txt (3M) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Plot colour issue - Strange change of shade

steve wood
This post was updated on .
CONTENTS DELETED
The author has deleted this message.
Reply | Threaded
Open this post in threaded view
|

Re: Plot colour issue - Strange change of shade

Francesco Potortì
In reply to this post by steve wood
>I did further research and it appear that other users encountered the same
>issue when plotting a graph using a very large assay. As an example if I
>plot:
>
>plot(sin((1:550000)*2*pi/550000), "color", [0,0.45,0], "linewidth", 4)

I see from subsequent messages that the problem is caused by a bug.

However, from a general point of view, asking any plotting program to
draw a line with half a million points is vastly inefficient unless the
plotting is done occasionally (not programmatically).  Depending on what
is the use of your grpah, a reasonable number of points may be 100 for
looking at an educated function on a screen.  Multiply this by 10 if
your function is badly behaved.  Multiply by 10 for publication quality.

Having too many points slows down the plotting routine and creates
postscript files which are much bigger than necessary for publication
quality, and PDF files which are big and slow to render and print.

Should you encounter any of these problems, I suggest using
plotdecimate, from the plot package, which takes points from a line to
be plotted and reduces their number intelligently.

Unfortunately, I see that the plot package is unmaintained and was taken
out of Octave forge.  I specifically miss the tic and the plotdecimate
functions.  Maybe they could be moved to a different package?  Any ideas?

By the way, you can find plotdecimate here:

http://fly.isti.cnr.it/pub/software/octave/plotdecimate.m

--
Francesco Potortì (ricercatore)        Voice:  +39.050.621.3058
ISTI - Area della ricerca CNR          Mobile: +39.348.8283.107
via G. Moruzzi 1, I-56124 Pisa         Skype:  wnlabisti
(gate 20, 1st floor, room C71)         Web:    http://fly.isti.cnr.it