In Octave, when I plot I can get the plot object. For example
pl = get(plot(...))
I can then specify the labels such as:
xlabel("something")
I'm working on an auto-grader and need to check the contents of the xlabel from the plot object pl. I'd think I'd be able to say something like
disp(all(pl.xlabel == "something"))
But, I'm getting an error saying xlabel doesn't belong to the plot object.
get(graphics_object, field)to "struct syntax" (e.g.graphics_object.field) some time in the last couple of years and currently supports both syntaxes. Octave may support "struct syntax" in the future, but for now only supports the "function syntax". Hencepl.xlabeldoes not apply in octave. Use theget/setfunctions on the appropriate objects that have the fields you're interested in instead (which is what you inadvertently show in your answer). - Tasos Papastylianoufindobj()I showed here: stackoverflow.com/questions/47262876/…. I guess you can modify it to find label strings too. - Georg W.