Subplots with axes of same scale but different lengths

7 ビュー (過去 30 日間)
Rosalie Tostevin
Rosalie Tostevin 2019 年 2 月 14 日
コメント済み: Star Strider 2019 年 2 月 14 日
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 件のコメント
Rik
Rik 2019 年 2 月 14 日
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.

サインインしてコメントする。

採用された回答

Star Strider
Star Strider 2019 年 2 月 14 日
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 件のコメント
Rosalie Tostevin
Rosalie Tostevin 2019 年 2 月 14 日
This works perfectly - thank you!!
Star Strider
Star Strider 2019 年 2 月 14 日
As always, my pleasure!

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeSubplots についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by