getting point position in pixels and then to start a plot from this point but using another axis
1 view (last 30 days)
Show older comments
Hi all,
I have GUI application with two x-axes (top and bottom) and one y-axes.
So I need to draw a point using top x-axes, and then get position in pixels of this point to draw a plot on bottom x-axes using this point as a start point.
I write for point.
x1 = 6;
y1 = 4.2;
xlimit=[2 8]
ylimit=[2 6]
axesPosition = [100 108 430 209];
h1 = axes('Units','pixels','Position',axesPosition,...
'Color','none','XColor','r','YColor','r',...
'yticklabel',[],'ytick',[],'xlim',xlimit,'ylim',ylimit,...
'NextPlot','add');
set(h1,'xaxislocation','top','yaxislocation','right')
h1=plot(x1,y1,'r')
What should I write for a line starting from this point, but with 'xaxislocation','bottom' and the same 'yaxislocation'?
Thank you!
1 Comment
Walter Roberson
on 30 May 2012
You might want to start with plotxx
http://www.mathworks.com/matlabcentral/fileexchange/317-plotxx-m
Answers (0)
See Also
Categories
Find more on Annotations in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!