필터 지우기
필터 지우기

Editing zData field of a contour plot via Property Inspector in R2018b

조회 수: 6 (최근 30일)
GC
GC 2019년 2월 20일
답변: Xeozim 2019년 4월 3일
In 2016b you could access and edit the zData used to generate a contour plot via the property inpector by clicking on a yellow matrix icon next to the zData property. In 2018b, the zData field in the property inspector shows the size of the matrix (e.g. 7x8 double ) but there seems to be no way of accessing the matrix values themselves directly from the inspector window.
Is this functionality still available in 2018b? If so, how?

채택된 답변

Fraser Macmillen
Fraser Macmillen 2019년 2월 21일
This functionality has been removed as of R2018b.

추가 답변 (1개)

Xeozim
Xeozim 2019년 4월 3일
You can't edit it through the Property Inspector but you can still edit the contour after it's created by getting the Contour object and editing it's ZData property through a script / the command window:
% Create a figure and keep the Figure object handle
fig = figure();
% Draw the contour plot
contour(X,Y,Z);
% Get the handle to the contour object
% Note that this assumes the contour is the first child of your figure's axes
con = fig.CurrentAxes.Children(1);
% Edit the ZData property of the contour in place
con.ZData(1,2) = 3.45;
Hope this helps,
Dave

카테고리

Help CenterFile Exchange에서 Contour Plots에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by