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

st: defining new colors or scheming too hard


From   Bill Rising <[email protected]>
To   [email protected]
Subject   st: defining new colors or scheming too hard
Date   Fri, 8 Oct 2004 11:04:03 -0400

Hello people,

I'd like to define a scheme, call it 'foo', to be able to easily switch the looks of graphs using something like

-graph use nicegraph, scheme(foo)-

When I went to poke through the scheme s2color.scheme, I found the following chunk of code:

---------------------------- cut here ----------------------------
color background ltbluishgray
color foreground black
* do NOT use "r g b" numbers for background and foreground
---------------------------- cut here ----------------------------

This gives the appearance that only named colors can be used for background and foreground colors. Unfortunately, there is no named color which matches the background color I'd like to use (this is just the first of the colors which need to be changed). Not only does "r g b" fail, but trying something like -red*.1- also fails.

This brings me to my question: is there a way to define new named colors? This seems possible by looking through the color.class file, but my class programming skills are weak enough that I'm not sure how the color name would be made persistent.

I tried searching all the text files from the mother ship (i.e. in all subdirectories of /Path_to_Stata/Stata/ado) for the text ltbluishgray, but found nothing which would show where the color was defined.

Perhaps I'm going about this all wrong, and I should instead satisfy myself with manual overrides of the background and foreground colors. I'd rather use schemes, however, because the series of graphs I'm trying to tweak are used in various media (presentation, paper, poster, etc.), and it would be safer and nicer to use schemes to switch between media.

Any hints or other viewpoints about how to approach this problem would be much appreciated.

Bill Rising
System: Mac OS X 10.3.5
Stata: 8.2 born on October 5, 2004

Attachment: smime.p7s
Description: application/pkcs7-signature




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