octave-bug-tracker
[Top][All Lists]
Advanced

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

[Octave-bug-tracker] [bug #36014] Wrong second axes when saved in pdf


From: Dik Dirk
Subject: [Octave-bug-tracker] [bug #36014] Wrong second axes when saved in pdf
Date: Thu, 29 Mar 2012 08:22:37 +0000
User-agent: Mozilla/5.0 (Windows NT 5.1; rv:11.0) Gecko/20100101 Firefox/11.0

Follow-up Comment #6, bug #36014 (project octave):

Thank you, it is currently working in the way I want it to work. For
completeness, this is the code

clf()
x1 = [0:.1:40];
y1 = 4.*cos(x1)./(x1+2);
plot(x1,y1)
ax1 = gca;
ax2=axes('Color','none','XTick',[],'YAxisLocation','right','YTick',exp(get(ax1,'YTick')),'YLim',exp(get(ax1,'YLim')),'XLim',get(ax1,'XLim'),'YScale','log');
h1=ylabel(ax1,'Log Index');
h2=ylabel(ax2,'Index');
position1 = get (ax1, "position");
position2 = get (ax2, "position");
position =
[max(position1(1),position2(1))*0.95,max(position1(2),position2(2)),min(position1(3),position2(3))*0.9,min(position1(4),position2(4))];
set ([ax1, ax2], "position", position, "activepositionproperty", "position")

set(gcf,'PaperUnits','centimeters')
set(gcf,'PaperSize', [15 12])
set(gcf,'PaperPosition',[0 0 15 12])
drawnow

saveas(gcf,'test3.pdf')

    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?36014>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/




reply via email to

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