How I remove edge lines and add reference lines into contour plot generated with plot(array​,'style','​contour')?

9 ビュー (過去 30 日間)
Hi
My matlab version is 2016b. I have three 861*1 double arrays; X, Y, Z I attached the .mat file for these variable. With the codes below, I generated attached contour plot. (I deeleted the attached matlab file and the image files due this question was solved.)
plot_data = fit ([X, Y], Z, 'cubicinterp');
contourplot = plot(plot_data,'style','contour');
1. How I remove black edge lines? -> I solved this issue with "set (plotname, 'edgecolor', 'none')"
2. I want to add two reference lines having Z values of 'min(Z)+1.00' and 'min(Z)+4.00'.
Below is image what I want to make. I made this one with OriginPro2016 but I need to make it with Matlab.
Thanks

採用された回答

Joseph Cheng
Joseph Cheng 2017 年 3 月 31 日
you would do something like
clf
load variables
plot_data = fit ([X, Y], Z, 'cubicinterp');
contourplot = plot(plot_data,'style','contour');
set (contourplot, 'edgecolor', 'none')
x= linspace(min(X),max(X));
y= linspace(min(Y),max(Y));
[xx yy]=meshgrid(x,y);
zz = plot_data(xx,yy);
hold on
contourplotline = contour3(xx,yy,zz,[8.754 11.75],'LineWidth',2,'color','k');
then use the text() function to insert the text values where you want. or color the lines differently and put it as a legend.

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeContour Plots についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by