How to display small values in boxplot
显示 更早的评论
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 个评论
Kishan Dhakan
2021-6-30
Can you try creating an Axes programatically (using uiaxes() function) and setting the axes property YLim or YTicks manually?
采纳的回答
更多回答(0 个)
类别
在 帮助中心 和 File Exchange 中查找有关 Box Plots 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
