getting point position in pixels and then to start a plot from this point but using another axis
1 次查看(过去 30 天)
显示 更早的评论
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 个评论
Walter Roberson
2012-5-30
You might want to start with plotxx
http://www.mathworks.com/matlabcentral/fileexchange/317-plotxx-m
回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Annotations 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!