Effacer les filtres
Effacer les filtres

How to plot this frequency graph?

1 vue (au cours des 30 derniers jours)
BN
BN le 9 Oct 2021
Commenté : BN le 10 Oct 2021
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 commentaires
Ive J
Ive J le 10 Oct 2021
Do you mean something like this?
pn = normalize(precipitation, 'range');
rn = normalize(runoff, 'range');
histogram2(rn, pn)
BN
BN le 10 Oct 2021
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

Connectez-vous pour commenter.

Réponse acceptée

Chunru
Chunru le 10 Oct 2021
Modifié(e) : Chunru le 10 Oct 2021
load runoff
load precipitation
precipitation = normalize(precipitation, 'range');
runoff = normalize(runoff, 'range');
histogram2(runoff, precipitation, 'Normalization', 'pdf', 'ShowEmptyBins','on'); % for probability density function
  1 commentaire
BN
BN le 10 Oct 2021
Thank you so much

Connectez-vous pour commenter.

Plus de réponses (0)

Catégories

En savoir plus sur MATLAB dans Help Center et File Exchange

Produits


Version

R2021a

Community Treasure Hunt

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

Start Hunting!

Translated by