Invalid Parameter Name: EdgeColor

7 ビュー (過去 30 日間)
Garrett
Garrett 2024 年 7 月 24 日
コメント済み: Garrett 2024 年 7 月 25 日
Hi all,
I'm trying to set the edgecolor parameter to interp for a hist3 plot. But MATLAB keeps giving me an invalid parameter error on edgecolor. It is in the documentation as a valid parameter and as far as I can tell I'm using the latest version of MATLAB: R2024a Update 2. Another strange thing is that even though I get the error message in the Command Window. The figure that is generated does successfully change the edge colors. It seems like MATLAB is doing what I expected but giving an error message for no apparent reason.
I've included my implementation and error message for reference.
hist3(X,[250 250],"EdgeColor","interp","CdataMode","auto");
Error using internal.stats.parseArgs (line 43)
Invalid parameter name: EdgeColor.
Error in hist3 (line 278)
[cdatamode,facecolor,~] = internal.stats.parseArgs(plnames,pldflts,plotArgs{:});
Error in Heatmap_test (line 26)
hist3(X,[250 250],"EdgeColor","interp","CdataMode","auto");
  7 件のコメント
Garrett
Garrett 2024 年 7 月 24 日
Thank you, I'll give a re-install a try. Interestingly my MATLAB seems to have no problem with the "facecolor" parameter only edgecolor.
Star Strider
Star Strider 2024 年 7 月 24 日
My pleasure!

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

採用された回答

Adam Danz
Adam Danz 2024 年 7 月 24 日
編集済み: Adam Danz 2024 年 7 月 24 日
Thanks for sharing this.
This is a bug that was fixed in MATLAB R2024a Update 5, released on 12 July 2024.
hist3(X,[250 250],"EdgeColor","interp","CdataMode","auto"); no longer throws the error Invalid parameter name: EdgeColor.
Workaround
If you're using a MATLAB release with this issue, you can set the EdgeColor post-creation.
hist3(rand(100,2),[10,10],"CdataMode","auto");
h = findobj(gca,'Type','Surface','Tag','hist3'); % Surface handle
h.EdgeColor ='interp';
  1 件のコメント
Garrett
Garrett 2024 年 7 月 25 日
Thank you much! The update fixed the issue.

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

その他の回答 (0 件)

カテゴリ

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

製品


リリース

R2024a

Community Treasure Hunt

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

Start Hunting!

Translated by