Histogram x axis tick labels – string
14 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Dzerald
el 12 de Abr. de 2019
Comentada: Dzerald
el 12 de Abr. de 2019
Hi,
I've done a simple histogram in Matlab and now I want to change the last tick on x axis. Instead of the "3" number I want string "Others".
How can I do it? I'm at R2015b.
The histogram was done by histogram() function.
![hist.jpg](https://www.mathworks.com/matlabcentral/answers/uploaded_files/213469/hist.jpeg)
0 comentarios
Respuesta aceptada
Más respuestas (2)
David Wilson
el 12 de Abr. de 2019
Hack the final xticklabel
x = randn(1e5,1); x= x-min(x)+1;
histogram(log(x))
xlim([0,3])
xt = xticklabels;
xt{end} = 'other'
xticklabels(xt)
1 comentario
David Wilson
el 12 de Abr. de 2019
Released 2016b. What's your version?
>> which xticklabels
C:\Program Files\MATLAB\R2018b\toolbox\matlab\graph3d\xticklabels.m
Ver también
Categorías
Más información sobre Histograms en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!