How to display small values in boxplot
Mostrar comentarios más antiguos
Hello! I have temperature and precipitation data values from years 1931-2020. I am looking at precipitation values each 30 years. I want to create a boxplot with precipitation values, but the numbers are very small (starting on 0 up to 0.8300 inches) and do not show up in my boxplot.
I tried to edit the Y-axis to make values smaller than 0, but it doesn't work. Attached is a picture of how the boxplot comes up and the code I used.
Thank you!
hold on
xPR = [DailyPR_1; DailyPR_2; DailyPR_3];
gP1 = repmat({'1931-1960'},10321,1);
gP2 = repmat({'1961-1990'},11243,1);
gP3 = repmat({'1991-2020'},10792,1);
gPR = [gP1; gP2; gP3];
boxplot(xPR,gPR)
title('Daily Precipitation (in)')
xlabel('Years')
ylabel('Precipitation (in)')

1 comentario
Kishan Dhakan
el 30 de Jun. de 2021
Can you try creating an Axes programatically (using uiaxes() function) and setting the axes property YLim or YTicks manually?
Respuesta aceptada
Más respuestas (0)
Categorías
Más información sobre Box Plots en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
