MATLAB Answers

0

Axis change - Is it possible to get the data of the new plot?

Asked by Thalles Leite on 5 Aug 2016
Latest activity Commented on by Azzi Abdelmalek
on 22 Aug 2016
Hi,
I have a plot, for example, a surface of a sphere, and I'm changing the axis to view a semi-sphere.
Is it possible to get the data of this new plot?
Thanks

  0 Comments

Sign in to comment.

Tags

3 Answers

Answer by Azzi Abdelmalek
on 5 Aug 2016
Edited by Azzi Abdelmalek
on 5 Aug 2016

Changing the view will not change your data. If you want to get your data from the plot
plot(1:10)
h=findobj('type','line')
x=get(h,'Xdata')
y=get(h,'Ydata')

  2 Comments

Thank you, Azzi. Exactly what I need!
If that s what you need then accept the answer.

Sign in to comment.


Answer by Thalles Leite on 18 Aug 2016

Hi,
I'm trying to use that on the Figure generated by the Surface function, and I'm getting the following error:
Error using matlab.ui.Figure/get There is no Xdata property on the Figure class.

  0 Comments

Sign in to comment.


Answer by Thalles Leite on 22 Aug 2016

Can anyone help me?

  1 Comment

This section is used to answer a question. If your original question was answered then mark it as accepted. And post a new question in the section Ask a question

Sign in to comment.