How do I set the limit for one axis on 3D plot?

23 Ansichten (letzte 30 Tage)
Frances
Frances am 11 Jan. 2013
Seems like a simple question but I cant get it figured out. I have a data set from experiment which looks vaguely like:
  • two columns of data:
  • first column = 'sets' of data range 200 to 750 with 70 interval steps. Approx 300 consecutive sets.
  • second column = associated reading for value in column one.
  • So basically I would like to plot y-axis with second column, z-axis of set number (i.e from 1 to 300), and x-axis of 400 to 750 instead of 200 to 750.I have tried every xlimit function I can find, and the plot tool has no problem setting the axis, however it plots the outlying data outside the axis!Please help, it is really frustrating as I have spent days trying to fix it already :-/
  10 Kommentare
Frances
Frances am 11 Jan. 2013
Basically it is still plotting outide the axis limits.

Melden Sie sich an, um zu kommentieren.

Antworten (1)

José-Luis
José-Luis am 11 Jan. 2013
Bearbeitet: José-Luis am 15 Jan. 2013
If col1 is your x data:
idx = col1>=400 && col1 <=750;
lH = plot3(col1(idx),col2(idx),col3(idx),'k.');
aH = ancestor(lH,'axes');
set(aH,'XLim',[400 750])
  1 Kommentar
Frances
Frances am 14 Jan. 2013
Hi, I tried this too and had to change it about a bit for my data but it still wont work. I'm using the surf plot so maybe that is where the issue lies? I think I will re-write the code and start from the beginning!

Melden Sie sich an, um zu kommentieren.

Kategorien

Mehr zu 2-D and 3-D Plots finden Sie in Help Center und File Exchange

Produkte

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by