From: Simon Croft on 27 May 2010 10:12 I'm producing surface plots where the x and y axes denote different parameter choices. The problem I'm having is that for example the different values represented along the x-axis are 1,2,3,5,10. I only seem to be able to manipulate the axis properties to linear ranges by specifying the limits, and so in the case of my X axis I have 5 data points across the range 1-10, but with a big void between 5 and 10. I would like the points for value 5 and 10 to lie adjacent on the plot. It's even worse for my Y axis as that takes values 2,3,4,5,6,7,8,9,10,100. I've looked into it and have tried messing with the Xdata/Ydata properties, but am having no joy. I basically want to have a surface plot where the values along the x and y axes relate directly to a parameter choice I want to specify (from a vector or whatever works) without having to keep the axis constant scale. Is there any way to do this? If not, is there an alternative way of doing 3-dimensional plots that does offer this freedom? My best bet at the minute seems to be opening them in PS and manually painting over the numbers. I'm not relishing that prospect... Any help much appreciated. Regards, Simon
From: us on 27 May 2010 10:36 "Simon Croft" <sac125(a)york.ac.uk> wrote in message <htlujk$25l$1(a)fred.mathworks.com>... > I'm producing surface plots where the x and y axes denote different parameter choices. The problem I'm having is that for example the different values represented along the x-axis are 1,2,3,5,10. > > I only seem to be able to manipulate the axis properties to linear ranges by specifying the limits, and so in the case of my X axis I have 5 data points across the range 1-10, but with a big void between 5 and 10. I would like the points for value 5 and 10 to lie adjacent on the plot. It's even worse for my Y axis as that takes values 2,3,4,5,6,7,8,9,10,100. I've looked into it and have tried messing with the Xdata/Ydata properties, but am having no joy. > > I basically want to have a surface plot where the values along the x and y axes relate directly to a parameter choice I want to specify (from a vector or whatever works) without having to keep the axis constant scale. Is there any way to do this? > > If not, is there an alternative way of doing 3-dimensional plots that does offer this freedom? My best bet at the minute seems to be opening them in PS and manually painting over the numbers. I'm not relishing that prospect... > > Any help much appreciated. > Regards, > Simon one of the (possible) solutions vr=0:4; v=10.^vr; line(log10(v),v,'marker','s'); % use a transformation appropriate for your data set(gca,'xtick',vr,'xticklabel',v); % also, look at the set(gca,'xscale'); % values for simple cases... us
From: Simon Croft on 27 May 2010 11:54 "us " <us(a)neurol.unizh.ch> wrote in message <htm00k$d3p$1(a)fred.mathworks.com>... > > one of the (possible) solutions > > vr=0:4; > v=10.^vr; > line(log10(v),v,'marker','s'); % use a transformation appropriate for your data > set(gca,'xtick',vr,'xticklabel',v); > > % also, look at the > set(gca,'xscale'); > % values for simple cases... > > us Hi, thank you for the reply. Yeah, that's worked a treat. Letting Xr=1:5 and Yr=1:10, and then X and Y as I want them and subbing for 'vr'/'v' in the final line has done exactly as I wanted. Thanks again for your quick reply. Simon
|
Pages: 1 Prev: AI based robo. Next: ndft (non-uniform discrete fourier transform) and reconstructing |