How to plot 3 different data in contour or pcolor ?

I have three different data
  1. Time steps = 1X108 (should be in X-axis)
  2. Data1 = 36X108 (should be in Y-axis(left))
  3. Data2 = 36X108 (should be display in colour/countour/pcolor)
Now I want to plot temporal plot (colour plot ) like the image I attached

댓글 수: 6

Is data1 on y-axis 36x108 or 36x1? If it is 36x108, then is it in the form of a grid?
Data1 is 36X108
Data2 is 36X108
Actually I want to plot each coloumn in Data1 will show the values of each column in Data2 at each timestep.
I am sorry if I confuse you but if you don't understand pls ask me again where you missing.
Thank you for help :)
Can you attach the data in a .mat file? It will make it easy to understand the question.
Jeevan Kumar Bodaballa
Jeevan Kumar Bodaballa 2020년 5월 26일
편집: Jeevan Kumar Bodaballa 2020년 5월 26일
here is the file I attached
data1 = nw_bin
data2 = sizdist
something like this?
p = pcolor(dt, nw_bin, sizdist)
shading interp
xlabel('x');
ylabel('y');
colorbar
it worked
thank you and sorry for late response

댓글을 달려면 로그인하십시오.

 채택된 답변

Ameer Hamza
Ameer Hamza 2020년 6월 2일
p = pcolor(dt, nw_bin, sizdist)
shading interp
xlabel('x');
ylabel('y');
colorbar

댓글 수: 2

Can you try with “contourf” also ?
Try this code
Dt = repmat(dt, 36, 1);
[dt_grid, nw_bin_grid] = meshgrid(dt, mean(nw_bin, 2));
sizdist_grid = griddata(Dt(:), nw_bin(:), sizdist(:), dt_grid, nw_bin_grid);
contourf(dt_grid, nw_bin_grid, sizdist_grid)
shading interp
xlabel('x');
ylabel('y');
colorbar

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

도움말 센터File Exchange에서 Contour Plots에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by