フィルターのクリア

How to change name of "Others" category for histogram with 'ShowOthers'

3 ビュー (過去 30 日間)
jpfeifer
jpfeifer 2019 年 2 月 27 日
編集済み: Adam Danz 2019 年 2 月 27 日
When using
hh=histogram(C,'ShowOthers','on');
Matlab will create a category "Others". Is there a way to access this name and change it to something else?

採用された回答

Adam Danz
Adam Danz 2019 年 2 月 27 日
編集済み: Adam Danz 2019 年 2 月 27 日
Access the axis handle from the histrogram handle ('hh'), then use strrep() to replace the 'Others' in the XTickLabel with whatever you want (here I use "Misc."). Then reassign the new XTickLabel to the axis. You can do that all in 1 line.
hh.Parent.XTickLabel = strrep(hh.Parent.XTickLabel, 'Others', 'Misc.')

その他の回答 (0 件)

カテゴリ

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

タグ

製品


リリース

R2018b

Community Treasure Hunt

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

Start Hunting!

Translated by