Subplots with axes of same scale but different lengths

12 visualizaciones (últimos 30 días)
I'm trying to plot some geological data. I have multiple subplots in the same figure, representing similar geological units sampled at different locations. Each section has a different height. I want all the subplots to have the same scale (i.e. 1 cm = 100 m), but since the sections are all different heights, the axes will end up being different lengths. I can't work out how to do this! Thanks
  1 comentario
Rik
Rik el 14 de Feb. de 2019
Try to make a MWE so we can run your code without any other dependencies and can reproduce your issue. It is easier to edit existing code with feasible data. If you generate random data, you can make sure the magnitudes are more or less correct.

Iniciar sesión para comentar.

Respuesta aceptada

Star Strider
Star Strider el 14 de Feb. de 2019
I am not certain what you are asking. If you want all the subplots to have the same axis limits, use the axis (link) function. You can also set the axis limits individually with xlim and ylim (linked to in that page).
  4 comentarios
Rosalie Tostevin
Rosalie Tostevin el 14 de Feb. de 2019
This works perfectly - thank you!!
Star Strider
Star Strider el 14 de Feb. de 2019
As always, my pleasure!

Iniciar sesión para comentar.

Más respuestas (0)

Community Treasure Hunt

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

Start Hunting!

Translated by