[Top][All Lists]
[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: |
Ben Abbott |
Subject: |
[Octave-bug-tracker] [bug #36014] Wrong second axes when saved in pdf |
Date: |
Tue, 27 Mar 2012 15:41:13 +0000 |
User-agent: |
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_7_3) AppleWebKit/535.11 (KHTML, like Gecko) Chrome/17.0.963.83 Safari/535.11 |
Update of bug #36014 (project octave):
Assigned to: None => bpabbott
Release: 3.4.3 => dev
Operating System: Microsoft Windows => Any
_______________________________________________________
Follow-up Comment #1:
Your example has a bug in it. The "activepositionproperty" for ax1 is
"outerposition" and that for ax2 is "position".
The following fixes that
clf ()
x1 = [0:.1:40];
y1 = 4.*cos(x1)./(x1+2);
plot(x1,y1)
ax1 = gca;
set (ax1, "activepositionproperty", "position");
ax2 = axes ();
set (ax2, 'OuterPosition', get (ax1, 'OuterPosition'),
'Position', get (ax1, 'Position'),
'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 (gcf, 'PaperUnits', 'centimeters')
set (gcf, 'PaperSize', [15 12])
set (gcf, 'PaperPosition', [0 0 15 12])
saveas(gcf,'test.pdf')
However, this still does not work. The updater for "position" should be
changing the "activepositionproperty" for ax2, but is not.
I'll take a look.
For now, a work around is to add the following lines.
set (ax2, 'OuterPosition', get (ax1, 'OuterPosition'),
'Position', get (ax1, 'Position'),
'ActivePositionProperty', 'Position')
_______________________________________________________
Reply to this item at:
<http://savannah.gnu.org/bugs/?36014>
_______________________________________________
Message sent via/by Savannah
http://savannah.gnu.org/