how to redraw contourf after changing scale

2 ビュー (過去 30 日間)
roudan
roudan 2018 年 4 月 18 日
回答済み: roudan 2018 年 4 月 19 日
I used contourf. after changing the scales like colorbar min/max/interval, contour line interval etc, how to redraw the contour quickly? I found some contour in previous plot still exist so cause overlapping. Do I have to delete the contourf first? Thanks

採用された回答

Walter Roberson
Walter Roberson 2018 年 4 月 19 日

If you are just changing the properties of the contour object returned by contourf() then the graphics will update by themselves the next time the event queue is flushed.

If you already have the handle of a contour object returned by contourf(), and you want to change x, y, z data, and the other properties are going to remain the same, then you can update the XData, YData, or ZData properties of the contour object. The graphic will update by itself the next time the event queue is flushed.

  3 件のコメント
roudan
roudan 2018 年 4 月 19 日
Walter, one more question, how to modify the contour's title? I didn't find title property of contour. The contour was plot on subplot. I also tried to set subplot's title using its handle. it didn't work either. it say "No public property title exists for class matlab.graphics.axis.Axes"
Thanks for helping.
Walter Roberson
Walter Roberson 2018 年 4 月 19 日
It is case sensitive, Title not title, if you are using dot notation.
ax = gca;
ax.Title
However, Title is a text object, not a string directly.
ax.Title.String = 'new title'

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

その他の回答 (1 件)

roudan
roudan 2018 年 4 月 19 日
thank you Walter

カテゴリ

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

Community Treasure Hunt

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

Start Hunting!

Translated by