Change model color on pdegplot and pdeplot3D
26 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
Santiago
il 3 Feb 2022
Risposto: Sourav Karmakar
il 14 Feb 2022
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')
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/883640/image.bmp)
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)
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/883645/image.bmp)
0 Commenti
Risposta accettata
Sourav Karmakar
il 14 Feb 2022
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 Commenti
Più risposte (0)
Vedere anche
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!