フィルターのクリア

Slowing of program when adding legend.

6 ビュー (過去 30 日間)
Isktaine
Isktaine 2012 年 10 月 4 日
Hi,
I'm plotting 4 functions in one graph and then adding a legend. For some reason adding the legend is really slowing the computation time - are there any things that slow the legend function down? For example I'm plotting vectors (about 20,000 elements) inside cell arrays in a for and if loop - does this sort of set up slow the legend function?
Any insight is appreciated,
Thanks!

回答 (1 件)

per isakson
per isakson 2012 年 10 月 4 日
編集済み: per isakson 2012 年 10 月 4 日
legend is slow, especially if it runs into trouble finding a suitable position. Specify a position and see if that improves the speed, e.g.
legend( ...,'Location', 'NorthEast' )
  4 件のコメント
per isakson
per isakson 2012 年 10 月 4 日
  • Long ago I made a simple replacement for legend because I found it so slow.
  • You might check with profile too see what is going on.
Isktaine
Isktaine 2012 年 10 月 4 日
Thanks, I had no idea it was slow in general - good to know!

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

カテゴリ

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

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by