bubblelegend doesn't work (2021b)

3 ビュー (過去 30 日間)
Shivanesh Rao
Shivanesh Rao 2022 年 11 月 1 日
コメント済み: Shivanesh Rao 2022 年 11 月 1 日
Hi,
I've been trying to plot bubblechart but the bubblelegend doesn't work for the simplest output.
x = (1:5)';
bubblechart(x,x,x)
bubblelegend('Population','Location','northeastoutside')
The above is the plot is 2022b. Works here!!
But my 2021b gives following error for bubblelegend command
Warning: Error updating BubbleLegend.
Too many input arguments.
Warning: Error updating BubbleLegend.
Array is null
Warning: Error updating BubbleLegend.
Array is null
Warning: Error updating BubbleLegend.
Array is null
Then the legend box appears but is empty.
I have not been able to replicate the example codes for bubblelegend from any matlab online examples either.
Is this a version issue?

採用された回答

Benjamin Kraus
Benjamin Kraus 2022 年 11 月 1 日
bubblelegend was released in R2020b, so it should work in R2021b. My guess is you have something wrong with your MATLAB path. Try this:
restoredefaultpath
rehash toolboxcache
If bubblelegend works after that, then there was something wrong with your path. Most likely you have a copy of pathdef.m in your user directory, which is overloading the official version. You can confirm that with this command:
which pathdef
If the answer is in your user directory (something like C:\Users\<username>\Documents\MATLAB) then that is the problem. The file in that directory will be used by all versions of MATLAB, but pathdef.m needs to be different for each version of MATLAB. You can try deleting that file, but first make sure you've captured any customizations you've made to the file.
If that doesn't help, or if you need further assistance, I suggest contacting technical support.
  1 件のコメント
Shivanesh Rao
Shivanesh Rao 2022 年 11 月 1 日
Hi Benjamin,
The bubblelegend works after I do
restoredefaultpath
The path seems to be fine:
C:\Program Files\MATLAB\R2021b\toolbox\local\pathdef.m
Perhaps it is the startup script I have running that maybe messing with the path.
Thanks for the suggestions. I can debug from here.

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

その他の回答 (0 件)

カテゴリ

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

タグ

製品


リリース

R2021b

Community Treasure Hunt

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

Start Hunting!

Translated by