How to plot this frequency graph?

5 次查看(过去 30 天)
Dear all,
I have runoff and precipitation data (as I attached), how I can achieve such a plot?
I tried this script:
histogram2(precipitation,runoff,'Normalization','count')
But it seems wrong and the range of x and y lines doesn't set between 0 to 1. The name of this plot below is bivariate frequency graph which is a histogram of precipitation and runoff.
Thank you in advance
  2 个评论
Ive J
Ive J 2021-10-10
Do you mean something like this?
pn = normalize(precipitation, 'range');
rn = normalize(runoff, 'range');
histogram2(rn, pn)
BN
BN 2021-10-10
Yes, Thank you, and why do I have blank mosaics in the plot? is there any way to force it to show zero values, instead of leaving them blank? thank you

请先登录,再进行评论。

采纳的回答

Chunru
Chunru 2021-10-10
编辑:Chunru 2021-10-10
load runoff
load precipitation
precipitation = normalize(precipitation, 'range');
runoff = normalize(runoff, 'range');
histogram2(runoff, precipitation, 'Normalization', 'pdf', 'ShowEmptyBins','on'); % for probability density function

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Weather and Atmospheric Science 的更多信息

产品


版本

R2021a

Community Treasure Hunt

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

Start Hunting!

Translated by