Subplots with axes of same scale but different lengths

12 Ansichten (letzte 30 Tage)
Rosalie Tostevin
Rosalie Tostevin am 14 Feb. 2019
Kommentiert: Star Strider am 14 Feb. 2019
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 Kommentar
Rik
Rik am 14 Feb. 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.

Melden Sie sich an, um zu kommentieren.

Akzeptierte Antwort

Star Strider
Star Strider am 14 Feb. 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 Kommentare
Rosalie Tostevin
Rosalie Tostevin am 14 Feb. 2019
This works perfectly - thank you!!
Star Strider
Star Strider am 14 Feb. 2019
As always, my pleasure!

Melden Sie sich an, um zu kommentieren.

Weitere Antworten (0)

Community Treasure Hunt

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

Start Hunting!

Translated by