[Top][All Lists]

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

Re: Customizing legends

From: Juan Pablo Carbajal
Subject: Re: Customizing legends
Date: Fri, 14 Dec 2012 08:27:12 +0100

On Fri, Dec 14, 2012 at 7:19 AM, Reza Housseini <address@hidden> wrote:
> 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
> Reza
> _______________________________________________
> Help-octave mailing list
> address@hidden

Yet another option is to export your plot in SVG format and edit it at
your will with Inkscape.

The latest options given are not so good if you need to automatize the
creation process. However in my experience, I do rather quick plots
until the document I need to create is in finla draft form. At that
point I spend some time making the final figures beautiful with



reply via email to

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