Interpolation of Histogram plot
조회 수: 5 (최근 30일)
이전 댓글 표시
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
Steven Lord
2021년 3월 29일
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?
답변 (1개)
Pratheek Punchathody
2021년 4월 1일
편집: Pratheek Punchathody
2021년 4월 1일
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
참고 항목
카테고리
Help Center 및 File Exchange에서 Histograms에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!