Contour plot and 1-D plot with different y-axis?

Hi,
I have a contourf plot that I'd like to combine with a normal 1-d plot. Both plots share the same x-axis but have different y-axis. Now I tried to define a second axis like this: ax2 = axes('Position',get(ax1,'Position'),... 'YAxisLocation','right',... 'Color','none',... 'XColor','k','YColor','k'); then after the contour plot I wrote: hold on and the second plot I wrote: plot(x,y,'Parent',ax2) - (ax1 is the axis handle of the contourfplot )
what happens is, that I finally have 2 axis but the contourf plot is not visible any more, only the 1-d plot. Can someone help me here?
cheers

回答 (1 件)

Diego Alonso
Diego Alonso 2013 年 2 月 15 日

0 投票

Without the code, it is hard to say where is the problem; but have a look at this article: http://www.mathworks.se/help/matlab/creating_plots/using-multiple-x-and-y-axes.html

カテゴリ

ヘルプ センター および File ExchangeContour Plots についてさらに検索

タグ

質問済み:

2013 年 2 月 15 日

Community Treasure Hunt

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

Start Hunting!

Translated by