X-axis coincidence in different subplots

1 回表示 (過去 30 日間)
Miguel Ángel
Miguel Ángel 2013 年 6 月 5 日
コメント済み: Miguel Ángel 2014 年 1 月 9 日
Hello:
I have some problems with colorbar. I have to subplot n figures in a column. They have the same x-axis, some of them are pcolor and others no. I want to locate the colorbar in the left or right in all the pcolor. The “vertical” x-axis of these pcolor coincide, but the others subplots, despite of having the same limits, don’t coincide because of the colorbar. I want a kind of EastOutside location that “works” as NorthOutside location (don’t disturb the x-axis). Here is an example of my problem.
x=1:10; y=1:10; [X,Y]=meshgrid(x,y); Z=(X.^2+Y.^2);
figure
subplot 211
pcolor(X,Y,Z)
shading interp
colorbar
%colorbar('location','Northoutside')
%”solves” my problem but I want it left o right
subplot 212
plot(x,y)
Thanks in advance.

採用された回答

Johan
Johan 2014 年 1 月 8 日
On the URL below you will find something that might solve your problem
/Johan
  1 件のコメント
Miguel Ángel
Miguel Ángel 2014 年 1 月 9 日
Just what I needed, thanks!

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

その他の回答 (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