Marker Location Scaling In Plot

2 次查看(过去 30 天)
Dan
Dan 2015-3-25
评论: Dan 2015-3-26
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

采纳的回答

dpb
dpb 2015-3-25
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

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 2-D and 3-D Plots 的更多信息

产品

Community Treasure Hunt

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

Start Hunting!

Translated by