[Top][All Lists]

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

Re: Customizing legends

From: Reza Housseini
Subject: Re: Customizing legends
Date: Fri, 14 Dec 2012 07:19:33 +0100

On Fri, Dec 14, 2012 at 6:16 AM, JaWiB <address@hidden> wrote:
> Thanks guys. I went with something like Torsten's solution:
> octave:62> plotColors = colormap;
> octave:63> plot(temps(:,1),caps(:,1),";Capacitance;")
> octave:64> hold on
> octave:65> plot(temps(:,1),cons(:,1),"--;Conductance;")
> octave:66> for i=2:size(temps,2)
>> plotColorsI = round( size(plotColors,1)*i/size(temps,2));
>> h1 = plot(temps(:,i),caps(:,i));
>> h2 = plot(temps(:,i),cons(:,i),"--");
>> set(h1,'Color',plotColors(plotColorsI,:));
>> set(h2,'Color',plotColors(plotColorsI,:));
>> endfor
> A bit more effort than I'd hoped, but still not bad. If I really care to
> change the legend to black, I guess I could plot an additional data series
> that won't show up (maybe a single data point or just manually set the axes
> so it's off the screen?)
> --
> View this message in context: 
> Sent from the Octave - General mailing list archive at
> _______________________________________________
> Help-octave mailing list
> address@hidden

Hello JaWIB

Another possibility is to print your plot with matlab2tikz an m script which generates a
tikz/pgf data file which can be easily changed according to your
wishes with the rich features of pgfplots Like this you don't have to fiddle
with the plot internals and can use instead the clean API of pgfplots.

Best wishes

reply via email to

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