Surface Plot Marker Edge Colour

5 ビュー (過去 30 日間)
Joe Fleming
Joe Fleming 2016 年 12 月 2 日
編集済み: dpb 2016 年 12 月 4 日
I am plotting some data using the following:
surfacefit = fit([C(:,Var_1), C(:,Var_2)],C(:,Var_3),'poly23');
plot(surfacefit,[C(:,Var_1), C(:,Var_2)],C(:,Var_3));
The default colour of the markers is blue with a white edge but I wish to change this. I have tried adding
'MarkerEdgeColor','k',
to the end of the plot command but it returns "'MarkerEdgeColor' is not a recognized parameter. For a list of valid name-value pair arguments, see the documentation for plot."
Thanks, Joe
  2 件のコメント
KSSV
KSSV 2016 年 12 月 2 日
How you are plotting a surface with plot? Where you want to change the marker? Is it here? plot(surfacefit,[C(:,Var_1), C(:,Var_2)],C(:,Var_3));
dpb
dpb 2016 年 12 月 2 日
編集済み: dpb 2016 年 12 月 2 日
Is default behavior for the fit -aware version of plot...this "isn't your father's Oldsmobile" of the standard plot function (which is why the property isn't valid).

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

回答 (1 件)

dpb
dpb 2016 年 12 月 2 日
編集済み: dpb 2016 年 12 月 4 日
Use
hSF=plot(surfacefit,[C(:,Var_1), C(:,Var_2)],C(:,Var_3));
instead to get the handles of the objects created. One of those will be the datapoints that are the markers you can then address to change properties(*). May be simplest to first use the figure-edit tool to find where they are before delving into "handle-diving" programmatically. I don't have release w/ HG2 to be able to do same here, sorry...but that's where the issue is.
() You can use the DataLineSpec optional character vector argument using the same values as LineSpec in *plot classic. With it, you can use named properties as well in lieu of later set commands but looks like that's not an option for the version in Fitting Toolbox that handles the object.

カテゴリ

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