getting user input in title and legend
4 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
the code is you want to create a graph showing the relationship of an ideal gas between pressure (P) and temperature (T).
the first 2 are Nitrogen, and oxygen the third will be ser input of gas. I created 2 figures. Figure (1) for all plots on the same axis, and the figure 2 is for sublpot of each gas.And ask the user to input the gas name. But how can I input the gas name from the user to the legend or title.
I hope that was clear.
0 Kommentare
Antworten (2)
Star Strider
am 22 Apr. 2019
3 Kommentare
Star Strider
am 22 Apr. 2019
mat geek’s Answer moved here:
How can You do that and place it in title or legend?
Star Strider
am 22 Apr. 2019
Use that to get the user input.
Then use the sprintf function to print it in the title or legend.
Adam Danz
am 22 Apr. 2019
In addition to Star Strider's method, the user can directly edit titles and legend strings by selecting them on the figure itself (the user won't be prompted and will have to know how to edit these objects).
Just click on the white arrow, then double-click the title and/or legend to change the string.
0 Kommentare
Siehe auch
Kategorien
Mehr zu Legend finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!