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: Wed, 28 Mar 2012 09:08:40 +0000
User-agent: Mozilla/5.0 (Windows NT 5.1; rv:11.0) Gecko/20100101 Firefox/11.0

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

Thanks for all the work you are doing on octave, it's a great product!
I have also tested the following code and have set properties of ax1 to the
ones of ax2 (i.e. if I understand correctly adding a label to ax2 changes the
position of the axis, so then we have to relocate ax1). Afterwards I checked
the settings of position, outerposition and activepositionproperty for both
axes... they are the same.
The output however, is not correct or I don't understand why it is correct,
see test3.pdf. I hope this helps in sorting this out.

x1 = [0:.1:40];
y1 = 4.*cos(x1)./(x1+2);
plot(x1,y1)

ax1 = gca;
ax2=axes('ActivePositionProperty','outerposition','Color','none','XTick',[],'YAxisLocation','right','YTick',exp(get(ax1,'YTick')),'YLim',exp(get(ax1,'YLim')),'XLim',exp(get(ax1,'XLim')),'YScale','log');
ylabel(ax1,'Log Index')
ylabel(ax2,'Index')
set (ax1,'OuterPosition', get (ax2, 'OuterPosition'))
set (ax1,'ActivePositionProperty','outerposition')


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

drawnow
pause(2)
saveas(gcf,'test3.pdf')

(file #25489)
    _______________________________________________________

Additional Item Attachment:

File name: test3.pdf                      Size:6 KB


    _______________________________________________________

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]