Marker Location Scaling In Plot

2 visualizaciones (últimos 30 días)
Dan
Dan el 25 de Mzo. de 2015
Comentada: Dan el 26 de Mzo. de 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

Respuesta aceptada

dpb
dpb el 25 de Mzo. de 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
  1 comentario
Dan
Dan el 26 de Mzo. de 2015
Thanks, dpb! Appreciate it.

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

Más información sobre 2-D and 3-D Plots en Help Center y File Exchange.

Etiquetas

Productos

Community Treasure Hunt

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

Start Hunting!

Translated by