Histogram in App Designer
Mostrar comentarios más antiguos
So I have this excel file and i want to make an histogram or scatter in app desginer for smoke and non smoker, can someone help me out ? I can't figure it out, because in the excel Smoker is just one column, and i want to make a histogram with 2 bars (different colours), one is for the smokers, and the other one is for non smokers.
9 comentarios
Rik
el 3 de Jul. de 2020
The first step is to get your data into Matlab. How did you do that? What is the next step?
Diogo Costa
el 3 de Jul. de 2020
Editada: Diogo Costa
el 3 de Jul. de 2020
Diogo Costa
el 3 de Jul. de 2020
Rik
el 3 de Jul. de 2020
Feel free to move your solution to the answer section.
For next time you can also separately calculate the histcounts and then plot the frequencies as a bar chart.
Diogo Costa
el 3 de Jul. de 2020
Rik
el 3 de Jul. de 2020
And that is why I tend to use histcounts. Have you tried reading the documentation for the histogram function to see what properties you can modify?
Diogo Costa
el 3 de Jul. de 2020
Diogo Costa
el 3 de Jul. de 2020
Rik
el 3 de Jul. de 2020
I don't think that is possible with histogram, so you will have to create two bar objects.
Respuestas (1)
Harry Smith
el 18 de Jun. de 2022
1 voto
This may help:
histogram(app.histogramPlot,data)
1 comentario
Gligan Miron Marius
el 18 de Mayo de 2023
Yes, in my case it works correctly.
...
I_hist=histogram(app.Hist, I_rgb);
...
Categorías
Más información sobre Data Distribution Plots en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!