Why is legend not saved with hgsave/savefig?

10 ビュー (過去 30 日間)
Jakob Sievers
Jakob Sievers 2015 年 9 月 4 日
編集済み: Usha Duddu 2015 年 9 月 8 日
Hi there
So I am using hgsave or savefig to save my current figure to a .fig which I then open later on with openfig but when I open it again the legends are missing for some reason. It appears to be the only thing missing as well. I found this thread from 2004 on the subject but no useful solution was found back then: http://www.mathworks.com/matlabcentral/newsreader/view_thread/69620
Can anyone help me?
Cheers
Jakob

回答 (1 件)

Usha Duddu
Usha Duddu 2015 年 9 月 8 日
編集済み: Usha Duddu 2015 年 9 月 8 日
Hi Jakob
I understand that the legend does not get saved in .fig file on using the following commands-
>>hgsave and >>savefig
If you are using MATLAB R14 this is a known bug and there are no workarounds for it. Refer to the following link that has an answer to the issue similar to yours-
Also make sure that legend visibility is set to on before saving and after opening your .fig file. Use the following command to set the visibility of legend to on-
>>legend('show')
Hope this resolves your issue.

カテゴリ

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