MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

# Thread Subject: import the data in figure

 Subject: import the data in figure From: Il Yoon Date: 25 Sep, 2008 00:05:04 Message: 1 of 5 Hello, I plotted a figure file (*.fig) from the matrix data file using Matlab. But, I deleted the matrix file. So, I want to import the data from figure. Then, how can I import the data in figure? Thanks. Yoon
 Subject: import the data in figure From: Matt Fig Date: 25 Sep, 2008 01:39:02 Message: 2 of 5 For example: x = 1:10; y = x.^2; plot(x,y) clear x y % x and y are lost. ch = get(gca,'ch'); x = get(ch,'xd') y = get(ch,'yd')
 Subject: import the data in figure From: Il Yoon Date: 25 Sep, 2008 16:41:02 Message: 3 of 5 "Matt Fig" wrote in message ... > For example: > > > x = 1:10; > y = x.^2; > plot(x,y) > clear x y % x and y are lost. > ch = get(gca,'ch'); > x = get(ch,'xd') > y = get(ch,'yd') Thanks a lot for your help. Yoon
 Subject: import the data in figure From: grega Date: 7 Sep, 2012 10:08:07 Message: 4 of 5 It works nice. BUT, what if you zoom in a fig and then want to get [X,Y] pairs from zoomed fig/axes?
 Subject: import the data in figure From: Steven_Lord Date: 7 Sep, 2012 13:27:18 Message: 5 of 5 "grega " wrote in message news:k2ch27\$prg\$1@newscl01ah.mathworks.com... > It works nice. > > BUT, what if you zoom in a fig and then want to get [X,Y] pairs from > zoomed fig/axes? Zooming into a figure or axes doesn't change the coordinates of the points in the data space. It does change them in the pixel space, but that's a separate question. Are the data space coordinates what you're after, the pixel space coordinates, or something else? -- Steve Lord slord@mathworks.com To contact Technical Support use the Contact Us link on http://www.mathworks.com