Brendan Halpin <[email protected]> reports,
> With Stata 9's graph matrix command, the title option has problems
> with apostrophes:
>
> . graph matrix Xo Xv100, title("test's")
> quotes unbalanced
> r(198);
>
> it doesn't seem to happen with other formats:
>
> . scatter Xo Xv100, title("test's")
Brendan's right, -graph matrix- has problems with titles (and subtitles,
notes, and captions) that have contain apostrophes -- "'". At first glance,
this problem appears to be limited to -graph matrix-, though we will look
further.
We will fix this in the next ado update.
Regarding, Sergiy Radyakin's <[email protected]> creative work-around
(Sergiy must be doing an awful lot of playing with the underpinnings of
graphics, reading my talks about those underpinnings, or both), I have two
comments. Sergiy suggested,
. sysuse auto
. graph matrix l w, title("whatever")
. .Graph.title.text[1]="test's"
. .Graph.drawgraph
First, change
. .Graph.title.text[1]="test's"
to
. _gm_edit .Graph.title.text[1]="test's"
Prefixing with -_gm_edit- registers the edit with the graph so that it will be
shown if the graph is saved and used. Without the -_gm_edit- the title will
not appear if the graph is saved and later -graph use-ed. Don't look for
documentation on this trick, we have not formalized access to this layer of
the graphics system.
Second, change
. .Graph.drawgraph
to
. graph display
This just replaces the low-level invocation of the drawing member function of
the graph class with it's nearly equivalent, but documented and easier to use,
command -- -graph display-.
-- Vince
[email protected]
*
* For searches and help try:
* http://www.stata.com/support/faqs/res/findit.html
* http://www.stata.com/support/statalist/faq
* http://www.ats.ucla.edu/stat/stata/