Change model color on pdegplot and pdeplot3D

23 次查看(过去 30 天)
I'm a newbie on PDE Toolbox on MATLAB, by default it plots the sphere gray when I use 'pdegplot'
radiusE = 230
gm = multisphere(radiusE)
model = createpde
model.Geometry = gm
pdegplot(model,'CellLabels','on','EdgeLabels','on')
And when I plot the model meshed with pdeplot3D, it turns to cyan, when I open the function I see a paramater "Facecolor" on cyan, but I can't manipulate It.
generateMesh(model)
pdeplot3D(model)

采纳的回答

Sourav Karmakar
Sourav Karmakar 2022-2-14
Hey Santiago ,
As per my understanding, you want to change the ‘FaceColor’ property of pdegplot and pdeplot3D plot figures. You can not change the ‘FaceColor’ property as an input argument to the "pdegplot" or "pdeplot3D" . You can refer to the following document to see the list of valid name-value pair arguments that can be passed as input to "pdegplot" and "pdeplot3D" :
So, to change any property in the plot, first store the plot in a handle and set value to that property using dot method on the handle. For example,
radiusE = 230;
gm = multisphere(radiusE);
model = createpde;
model.Geometry = gm;
p = pdegplot(model,'CellLabels','on','EdgeLabels','on'); %store the plot in a handle (here, it’s p)
p % Here, you can see all the plot properties
p.FaceColor = [1 0 0]; %Now, you can set any [r g b] value to ‘FaceColor’ property
Do same for the "pdeplot3D" in order to change the face colour.
Hope this helps!

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Geometry and Mesh 的更多信息

标签

Community Treasure Hunt

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

Start Hunting!

Translated by