help-octave
[Top][All Lists]
Advanced

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

Re: Colors in plots and legend position


From: avraham
Subject: Re: Colors in plots and legend position
Date: Wed, 21 Sep 2005 17:30:01 +0300
User-agent: Mutt/1.5.5.1+cvs20040105i

On Wed, Sep 21, 2005 at 01:59:55PM +0200, Javier Arantegui wrote:
> Hello,
> 
> I'm pretty sure that these questions have been discused in the list before 
> but 
> I haven't been able to find the messages in the archive :-(
> 
> I'm using Octave 2.9.3.
> 
> I am programing a function that plots a graphic and I need more than 6 
> colors. 
> Is possible to use more than 6?
> 
> 'help plot' says:
> 
> "   `C'
>           If C is one of `"r"', `"g"', `"b"', `"m"', `"c"', or `"w"',
>           it is interpreted as the plot color (red, green, blue,
>           magenta, cyan, or white)."
> 
> OK. But, below that you can read:
> 
> "     The color line styles have the following meanings on terminals that
>      support color.
> 
>           Number  Gnuplot colors  (lines)points style
>             1       red                   *
>             2       green                 +
>             3       blue                  o
>             4       magenta               x
>             5       cyan                house
>             6       brown            there exists"
> 
> That is a little bit inconsistent because in one of the cases there is white 
> but in the other it mutates to brown.
> 
> Another question, is possible change the place where the legend is written 
> withou use the command 'legend' from octave-forge?
> 
> Thanks in advance,
> 
> Javier
> 
> 
> -- 
> Javier Ar?ntegui
> Dept. Tecnologia de Alimentos / Dept. of Food Technology
> Universitat de Lleida / University of Lleida (Spain)
>          
> Tel. +34 973702595
> Fax  +34 973702596
> IM: Jabber - javier.arantegui (AT) jabberes.org
> http://www.tecal.udl.es
> 
> 
> 
> -------------------------------------------------------------
> 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
> -------------------------------------------------------------
> 
Hi Xavier,
1-The number of colors offered by gnuplot and gnuplot-based octave
graphics is very limited. I guess that the idea is that it is
easier to distinguish between curves with markedly different
colours and, if need be, different line types/thicknesses than
between close hues.
A different approach is taken by the eplot function of
octave-epstk. There you can define the color of the lines by the
RGB content. You may have a look into that.
This being said I also recall a thread about adding black to the
colours available in gnuplot-based graphics. Unfortunately I
cannot remember any details.
2-The help for legend in gnuplot gives:
 The `set key` enables a key (or legend) describing plots on a plot.

 The contents of the key, i.e., the names given to each plotted data set and
 function and samples of the lines and/or symbols used to represent them, are
 determined by the `title` and `with` options of the {`s`}`plot` command.
 Please see `plot title` and `plot with` for more information.

 Syntax:
       set key {on|off} {default}
               {left | right | top | bottom | outside | below | <position>}
               {Left | Right} {{no}reverse}
               {samplen <sample_length>} {spacing <vertical_spacing>}
               {width <width_increment>}
               {height <height_increment>}
               {{no}autotitles}
               {title "<text>"} {{no}enhanced}
               {{no}box { {linestyle | ls <line_style>}
                          | {linetype | lt <line_type>}
                            {linewidth | lw <line_width>}}}
       unset key
       show key

Press return for more: position
 By default the key is placed in the upper right corner of the graph.  The
 keywords `left`, `right`, `top`, `bottom`, `outside` and `below` may be used
 to place the key in the other corners inside the graph or to the right
 (outside) or below the graph.  They may be given alone or combined.

The same commands can be given from within octave, in the older versions
using gset insted of set, in the new versions using
__gnuplot_set__ instead of set.

Cheers, Avraham



-------------------------------------------------------------
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]