필터 지우기
필터 지우기

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 CenterFile Exchange에서 Annotations에 대해 자세히 알아보기

태그

제품


릴리스

R2018b

Community Treasure Hunt

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

Start Hunting!

Translated by