How can I create an x,y plot where the grid spacing is not equal?
2 次查看(过去 30 天)
显示 更早的评论
I have a 5x50 matrix of temperature measurements taken across a metal plate which I would like to plot. The spacing of the x-axis measurements was 1.1cm and the y-axis was 0.6cm. Somehow I need to plot the measurements according to this spacing and interpolate the temperatures between the measurements. Here's what I have so far:
% Temperature data is stored in T
[X,Y]=meshgrid(0:1.1:4.9,-15:0.6:14.4);
contourf(X,Y,T)
title('Temperature Distribution')
I am not convinced this is producing the correct result also, I am not able to interpolate the shading when using contourf, if there a better plot to use?
2 个评论
Doug Hull
2013-1-16
What makes you think this is incorrect?
What is the purpose of the visualization?
回答(1 个)
Irl
2013-1-16
You might prefer to interpolate the data first, before plotting. Look at the help for interp2, perhaps with method set to bicubic.
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Contour Plots 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!