help-octave
[Top][All Lists]
Advanced

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

plotting questions


From: John W. Eaton
Subject: plotting questions
Date: Tue, 4 Apr 2006 22:33:03 -0400

On  4-Apr-2006, Ron Crummett wrote:

| I have been playing with some basic plotting and have a couple questions 
| about it:
| 
| -We can specify different point plotting styles using flags such as '*', 
| 'o', '+', 'x' (and maybe others too,  but these are the main ones I've 
| been playing with.  I would expect these to plot something similar on 
| the plot window, but I find that
| '*' plots what I would expect from 'o'
| 'o' plots what I would expect from '+'
| '+' plots what I would expect from 'x'
| 'x' plots a square
| 
| It seems reasonable to me that if I am to enter "plot(x, y, 'x')" I 
| should get 'x' points on the plot, but instead I get little squares.  Am 
| I the only one that has this, or does something need to be changed in 
| general?

I'm assuming you are using the default gnuplot plotting code.  If not,
then it would help to tell us what you are using.

To handle these options, Octave's __pltopt1__.m file does something
like

    elseif (strcmp (char, "+"))
      set_points = 1;
      set_symbol = 1;
      symbol = "2";
    elseif (strcmp (char, "o"))
      set_points = 1;
      set_symbol = 1;
      symbol = "1";
    elseif (strcmp (char, "x"))
      set_points = 1;
      set_symbol = 1;
      symbol = "4";

Unless things have changed, there is no way to symbolically tell
gnuplot what marker types, so we have to rely on numbers like this.
So this means that if the numbers change meaning in gnuplot, Octave's
code won't be right.  Maybe that is what has happened.  Or, maybe it
is wrong for the terminal driver you are using, but right for some
other terminal driver?  As I recall, not all gnuplot terminal drivers
do the same thing for the same symbol numbers or line types (for
example, the colors may be different and some terminal drivers have a
black and white option, so color is not even possible).

| -Secondly, I have noticed that when I expand a plot window, the point 
| size expands.  Take the example I just laid out.  If I have a small plot 
| window, I can hardly tell that they are squares, but if I expand to a 
| full screen then I can tell for sure.  I prefer to have my plots small 
| so that I can view them and my terminal window at the same time, but if 
| I do this plotted points hardly look different from lines.  I have 
| noticed that in Matlab the point plots stay the same.  Is there 
| something that can be done about this?

Since you are asking about features of a gnuplot terminal (the X11
terminal, I guess?) maybe you should complain about those problems to
the gnuplot people?

jwe



-------------------------------------------------------------
Octave is freely available under the terms of the GNU GPL.

Octave's home on the web:  http://www.octave.org
How to fund new projects:  http://www.octave.org/funding.html
Subscription information:  http://www.octave.org/archive.html
-------------------------------------------------------------



reply via email to

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