フィルターのクリア

How to make contour plot with two y axes.

3 ビュー (過去 30 日間)
ref
ref 2013 年 2 月 8 日
Hello, I am running the code shown bellow to create contour plots. What I do not get is what to change in order to create a contour plot with two y axes.
% Determine the minimum and the maximum x and y values:
xVarMin = min(dataByColumn.(colheaders{1}));
xVarMax = max(dataByColumn.(colheaders{1}));
yVarMin = min(dataByColumn.(colheaders{2}));
yVarMax = max(dataByColumn.(colheaders{2}));
% Define the resolution of the grid:
xVarRes=200;
yVarRes=200;
gx=xVarMin:0.1:xVarMax;
gy=yVarMin:1:yVarMax;
Zinterp=gridfit(dataByColumn.(colheaders{1}),dataByColumn.(colheaders{2}),dataByColumn.(colheaders{i}),gx,gy);
% Generate the mesh plot :
fig(j) = figure('name',vars{i});
contour(gx,gy,Zinterp,50)
colormap(jet(100));
xlabel(vars(1)); ylabel(vars(2)); zlabel(vars(i));
% Generate data point on the same axes with specified properties:
figure(fig(j));
hold on
plot3(dataByColumn.(colheaders{1}),dataByColumn.(colheaders{2}),dataByColumn.(colheaders{i}),'marker','o','markerfacecolor','r','linestyle','none');
hidden off
colorbar('EastOutSide')%North, NorthOutSide,East, EastOutSide etc
If I insert the 2nd y axis values how the gridfit or a meshgrid command is been manipulated?
  1 件のコメント
ref
ref 2013 年 2 月 13 日
The example of the link creates two different contour plots and combines them, which is not correct if you have the same z values for the two y axes.

サインインしてコメントする。

回答 (0 件)

カテゴリ

Help Center および File ExchangeSurface and Mesh Plots についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by