# Interpolation of Histogram plot

14 visualizzazioni (ultimi 30 giorni)
Mitulkumar Vasani il 29 Mar 2021
is there any option to make interpolation between three histogram plot output and at the end we get one main histogram plot.
is there any matlab function avalible for this?
i used Histogramm2 function and genrate 3 plot. and i want to interpolate this three plot in one as answer.
##### 2 CommentiMostra NessunoNascondi Nessuno
Steven Lord il 29 Mar 2021
is there any option to make interpolation between three histogram plot output and at the end we get one main histogram plot.
I don't understand your question. What do you mean when you say "three histogram plot output"?
Can you show us a picture or explain in more detail what data you have and what you want the final product of your code to be?
Mitulkumar Vasani il 29 Mar 2021
in photo you will find three diffrent plot by histogram function and as value you can see three difreent row in second photo.
i want to again make interpolation between this three row and merge into one result and plot again a one histogram plot.
is this possible?

Accedi per commentare.

### Risposte (1)

Pratheek Punchathody il 1 Apr 2021
Modificato: Pratheek Punchathody il 1 Apr 2021
As per my understanding, you have 3 different "histogram2" plots and you are looking for creating a single figure with all the 3 histogram plots merged together.
You can use "hold on" command to merge/ interpolate all the plots into a single plot and analyse the data.
Follow the following command to merge all the plots into single plot.
x = [1265 1315 2135 1595 1440 1231 1724 1613]; %some input data1
y = [1562 1058 9165 1462 1236 1286 1395 1111];
u = [125 115 135 195 140 121 174 163]; %some imput data2
v = [162 108 165 142 136 186 195 111];
m = [35 65 95 25 40 61 24 43]; %some input data3
n = [92 38 85 22 46 96 45 21];
histogram2(x,y,'FaceColor','g'); %plot histogram command
hold on; %waits and plots the next plot into the same plot as above
histogram2(u,v,'FaceColor','b');
hold on;
histogram2(m,n,'FaceColor','r');
hold off;
This above figure contains different histograms plotted together in the same figure.
You can also refer to the documentation on "histogram2" and "histogram2 properties" for more information. Also refer to the documentation on "hold" to know more about Retaining current plot when adding new plots.
Hope this helps..!
##### 0 CommentiMostra -2 commenti meno recentiNascondi -2 commenti meno recenti

Accedi per commentare.

### Categorie

Scopri di più su Histograms in Help Center e File Exchange

### Community Treasure Hunt

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

Start Hunting!

Translated by