help-octave
[Top][All Lists]
Advanced

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

Re: Problem getting legend to work with plotyy


From: Mahdi Habibi Doost
Subject: Re: Problem getting legend to work with plotyy
Date: Wed, 3 Feb 2016 13:40:46 +0000 (UTC)

Hi, 
I also have the similar problem with plotyy command. I do not know how to adjust the marker, linestyle, linewidth of the curves. I so not know how to change the font size of labels and the set command does not seem to work well with plotyy.

Regards


On Wednesday, February 3, 2016 5:02 PM, Carl Poirier <address@hidden> wrote:


Hi folks,

I run Octave 4.0.0 on Linux. I need some help generating a plot with two axis and a legend indicating which curve is which. The latter however appears offset from the plot and also makes two new axis appear out of nowhere.

I crafted a small example, derived from the demonstration 1 in the plotyy documentation. Here it is:

 clf;
 x = 0:0.1:2*pi;
 y1 = sin (x);
 y2 = exp (x - 1);
 [ax, h1, h2] = plotyy (x,y1, x-1,y2, @plot, @semilogy);
 xlabel ('X');
 ylabel (ax(1), 'Axis 1');
 ylabel (ax(2), 'Axis 2');
 text (0.5, 0.5, 'Left Axis', ...
       'color', [0 0 1], 'horizontalalignment', 'center', 'parent', ax(1));
 text (4.5, 80, 'Right Axis', ...
       'color', [0 0.5 0], 'horizontalalignment', 'center', 'parent', ax(2));
 title ({'plotyy() example'; 'Left axis uses @plot, Right axis uses @semilogy'});
 legend ([h1, h2], {'one', 'two'}, 'location', 'northwest');

Would any of you know how to solve this? To me it sounds like a bug.

Regards,

Carl

_______________________________________________
Help-octave mailing list
address@hidden
https://lists.gnu.org/mailman/listinfo/help-octave



reply via email to

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