getting point position in pixels and then to start a plot from this point but using another axis
2 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
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 Kommentar
Walter Roberson
am 30 Mai 2012
You might want to start with plotxx
http://www.mathworks.com/matlabcentral/fileexchange/317-plotxx-m
Antworten (0)
Siehe auch
Kategorien
Mehr zu Data Exploration finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!