Stata The Stata listserver
[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

Re: st: scheme modification to thicken axis lines


From   [email protected] (Jeff Pitblado, StataCorp LP)
To   [email protected]
Subject   Re: st: scheme modification to thicken axis lines
Date   Tue, 06 Jul 2004 14:44:31 -0500

Plummer, Dale <[email protected]> asks about writing a custom scheme
to handle a style change to axes:

> In our shop, we often find ourselves producing graphs with a command
> like this:
> 
>    twoway (scatter systolic age), xscale(lwidth(medium))
> yscale(lwidth(medium)) ///
>                    xlabel(,tlwidth(medium)) ylabel(,tlwidth(medium))
> 
> The xscale, yscale, xlabel, and ylabel options are added to thicken the
> axis and tick lines a little bit.  I would like to define a custom
> scheme that includes this thickening by default.  I have been able to
> make a custom scheme with other changes but this one has eluded me.  Can
> someone help?

This will require a new linestyle for axes, here is how I did it:

***** BEGIN: linestyle-plummer_axis.style
*! version 1.0.0  06jul2004
sequence 102100
                                                                                
set width    scheme plummer_axis
set color    scheme foreground
set pattern  scheme foreground
***** END: linestyle-plummer_axis.style

The above is a modified (and renamed) copy of linestyle-foreground.style.  The
"set width" refers to a "linestyle" in the scheme, so now I can refer to
plummer_axis within my scheme file:

***** BEGIN: scheme-plummer.style
* scheme-plummer.scheme
*! version 1.0.0  06jul2004
                                                                                
#include s2color
                                                                                
sequence 102150
label "Dale Plummer's scheme"
                                                                                
linestyle axis          plummer_axis
linestyle axis_withgrid plummer_axis
linestyle tick          plummer_axis
linewidth plummer_axis  medium
***** END: scheme-plummer.style

The first 2 linestyle make changes to the linestyles for all axes, and the
third changes the linestyles for all major ticks.  The linestyle for minor
ticks is governed by "minortick".  The last line defines "plummer_axis" to mean medium for linewidths.

--Jeff
[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/



© Copyright 1996–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index