Marker Location Scaling In Plot

6 views (last 30 days)
Dan
Dan on 25 Mar 2015
Commented: Dan on 26 Mar 2015
Hi everyone,
I have a set of data taken at the following intervals for the x axis: 20,50,100,200,400,1000.
I have set the xtick values accordingly, but when I plot this, the values for 20 and 50 are scrunched up such that it is hard to discriminate between them, yet there are nice large spaces between 100, 200, 400, and 1000.
Is there a way I can adjust the spacing between data points without adjusting their value? I'm envisioning a solution in which the spacing between markers can be adjusted to make the plot points more viewable.
Thanks, Dan

Accepted Answer

dpb
dpb on 25 Mar 2015
Not without distorting the plot in linear space, not really. You can, of course, plot the values against their index which will space them uniformly across the axis and label the ticks the actual values which will give the maximum spacing between each point. Whether this is useful or totally misleading to the reader of the graph will depend greatly on what the data actually represent and what the graph is intending to show.
The classic way to handle such an issue that stretches out the smaller range in comparison to the larger that keeps a real correlation between the distance and the values is to use a logarithmic axes for the data with such a range; in this case that would be semilogx instead of plot

More Answers (0)

Categories

Find more on 2-D and 3-D Plots in Help Center and File Exchange

Products

Community Treasure Hunt

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

Start Hunting!