help-octave
[Top][All Lists]
Advanced

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

Re: fill handle


From: Ben Abbott
Subject: Re: fill handle
Date: Fri, 22 Mar 2013 09:36:04 -0400

On Mar 21, 2013, at 4:09 PM, Luis Espinoza Villasante S188423 wrote:

> good morning
> i'm a universitarian student new to the use of octave, i need your help
> because i don't know how to relate in a drawing a color with the proper
> meaning of this color in a certain drawing
> in other words i need that the command fill (like in matlab) allows an
> handle useful to legend, like plot in the following program
> 
> clf
> x = 0:0.1:7;
> hold on
> h(1) = plot (x, sin(x));
> h(2)=plot(x,cos(x),'r');
> h(3)=plot(x, sin(x.^2/10),'g');
> h(4)=plot(x, cos(x.^2/10),'k');
> title ("Only the sin() objects have keylabels");
> legend (h([1, 3]), {"sin(x)", "sin(x^2/10)"}, "location", "southwest");
> 
> with, instead of "plot", "fill"
> indeed if i put "fill" where is "plot" i cannot see colors in legend
> 
> I thank you in advance for your precious help
> see you soon!

Are you running Octave on Windows?  If so which version of Octave?

I suspect you are running the fltk or qt graphics_toolkit.  For the released 
versions of Octave, I don't think either of these supports patches in the 
legend.

Try using the gnuplot toolkit and then run your script.

        close all
        graphics_toolkit gnuplot
        fill (0:2, [0 1 0], "b")
        legend ("blue triangle")

Ben






reply via email to

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