Drexel dragonThe Math ForumDonate to the Math Forum



Search All of the Math Forum:

Views expressed in these public forums are not endorsed by Drexel University or The Math Forum.


Math Forum » Discussions » Software » comp.soft-sys.matlab

Topic: Problem with Ylim using FEX: addaxis
Replies: 1   Last Post: Jul 16, 2013 4:18 PM

Advanced Search

Back to Topic List Back to Topic List Jump to Tree View Jump to Tree View   Messages: [ Previous | Next ]
Catherine

Posts: 16
Registered: 5/17/09
Problem with Ylim using FEX: addaxis
Posted: Jul 12, 2013 12:54 PM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

Does anyone have a solution to this. FEX:addaxis works really nicely for me, but I can't seem to get the Y limits to change. The example code below illustrates the problem.

Example code:

x = 1:10;
y = x.^2;
figure(1)
plot(x,y)
[hplts,hax2] = addaxis(x,zeros(size(y)),'linewidth',1.5);
% the line is at 0
figure(2)
plot(x,y)
[hplts,hax2] = addaxis(x,zeros(size(y)),'linewidth',1.5);
set(hax2,'Ylim',[0 10]);
% the line is now at 5



Point your RSS reader here for a feed of the latest messages in this topic.

[Privacy Policy] [Terms of Use]

© Drexel University 1994-2014. All Rights Reserved.
The Math Forum is a research and educational enterprise of the Drexel University School of Education.