Recap of the hierarchy of each plot element: Difference between revisions

Jump to navigation Jump to search
no edit summary
No edit summary
No edit summary
Line 34: Line 34:
* the actual data and data-plot-properties are inside the handles {{Codeline|p}} and {{Codeline|r}}.
* the actual data and data-plot-properties are inside the handles {{Codeline|p}} and {{Codeline|r}}.


To understand how to change things in this situation you ''have to know where you 'are' at this moment''. You 'are' in the second axes object {{Codeline|q}} of the second figure!
So let's say you want to change the line thickness of the data in the first figure:
So let's say you want to change the line thickness of the data in the first figure:


Line 48: Line 47:
  get(q)
  get(q)


And {{Codeline|set} anything that is not to your taste to something else (for what's available see the [http://www.gnu.org/software/octave/doc/interpreter/ manual].
And {{Codeline|set}} anything that is not to your taste to something else (for what's available see the [http://www.gnu.org/software/octave/doc/interpreter/ manual]).
  set(p,'marker','*')
  set(p,'marker','*')
Adding {{Codeline|text()}} inside an {{Codeline|axes()}} object is done by
text(2,0.8,'HERE');
... but it now inserted in figure1, which ''might NOT be want you anticipated''.
The {{Codeline|text()}} command does ''not'' have the option to tell it in which figure or axes object to write the text.
Make sure you have moved current figure and axes ''before'' calling {{Codeline|text()}} to insert text:
figure(2)
set(gcf(),'currentaxes',r);
text(1,0.5,"This is where I wanted my text");
22

edits

Navigation menu