How can I plot polarplot in AppDesigner?
37 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Beket
el 30 de En. de 2023
Respondida: Cris LaPierre
el 30 de En. de 2023
Hello, I am making app in Matlab App designer using .m file calculation. In .m file, I wrote polar plot like this:
polarplot(thettar, r)
After that, I have to write and show this in App Designer, but I don't realize how
I tried write like this, but it doesn't work
app.pax = polaraxes(app.UIAxes2);
polarplot(app.pax,thettar,r)
0 comentarios
Respuesta aceptada
Cris LaPierre
el 30 de En. de 2023
Take a look at this example app.
Create Axes Programmatically
Some graphics functions plot data on specialized axes. For example, functions that plot polar data must do so on a PolarAxes object. Unlike UIAxes objects, which you can add to your app from the Component Library, you must add specialized axes to your app programmatically in your code. To create an axes object programmatically, create a StartupFcn callback for your app. Within it, call the appropriate graphics function and specify a parent container in your app as the target.
Plot on Polar Axes
Functions such as polarplot, polarhistogram, and polarscatter take a polar axes object as a target. Create a polar axes programmatically by calling the polaraxes function. For example, to plot a polar equation in a panel, first drag a panel component from the Component Library onto your canvas. In the code for your app, create the polar axes object by calling the polaraxes function and specifying the panel as the parent container. Then, plot your equation with the polarplot function, specifying the polar axes as the target axes.
theta = 0:0.01:2*pi;
rho = sin(2*theta).*cos(2*theta);
pax = polaraxes(app.Panel);
polarplot(pax,theta,rho)
0 comentarios
Más respuestas (0)
Ver también
Categorías
Más información sobre Polar Plots en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!