Welcome to iraf.net Tuesday, April 16 2024 @ 06:49 PM GMT


 Forum Index > Help Desk > General IRAF New Topic Post Reply
 Splot background color
   
dmag
 09/14/2016 04:13PM (Read 2320 times)  
+----
Newbie

Status: offline


Registered: 09/14/2016
Posts: 3
Hi,
i know that it is probably a stupid question but i am not able to find a solution.
How can i invert the background-foreground color in the IRAF plot windows?
Splot, specplot, identify, continuum.. every task show a white plot on black background.
I can change every color in the window. I can change the titles color, the axes color, the frame color, the numbers color... everything but the foreground/background.
Is there a solution to have it black on white?
Thanks

 
Profile Email
 Quote
fitz
 09/14/2016 04:17PM  
AAAAA
Admin

Status: offline


Registered: 09/30/2005
Posts: 4040
From the old FAQ .....


14.6 How can I change the background color in my ximtool window - the default
color is black - I want white?

The image display window in XImtool is nothing more than a GTerm widget
so the trick is to simply change the background and foreground colors. A
"reverse video" option may be included in a later release to simplify this,
for now defining the following resources in your .Xdefaults file should
work:

XImtool*imagewin.color0: white
XImtool*imagewin.color1: black

These may also be specified on the command line using

% ximtool -xrm "*imagewin.color0:white" -xrm "*imagewin.color1: black"

[NOTE for SAOtng Users: resource settings for SAOtng should be specified
as e.g. "*color0" instead of "*imagewin.color0" due to small differences
in the code.]


 
Profile Email
 Quote
fitz
 09/14/2016 04:19PM  
AAAAA
Admin

Status: offline


Registered: 09/30/2005
Posts: 4040
Sorry, wrong question, the point is: the color0 and color1 resources define the background/foreground colors.


14.1 How do I change colors (cursor, background, text, etc) in my XGterm
window?

The crosshair cursor color is set by the "crosshairCursorColor" X
resource, you would reset it by defining e.g.

*Gterm.crosshairCursorColor: cyan

in your .Xdefaults file. The background and text colors are set using a
combination of X resources to set the predefined colors and an iraf environ-
ment variable to say which colors are used for text, background, axis labels,
etc. The color resources are named 'color0' through 'color9', colors zero
and one are the background and foreground colors respectively and defaults
to white on black. You set these resources using e.g.

*Gterm*color0: darkslategrey
*Gterm*color1: linen
*Gterm*color2: red
*Gterm*color3: green
*Gterm*color4: blue
*Gterm*color5: cyan
*Gterm*color6: yellow
*Gterm*color7: purple
*Gterm*color8: magenta
*Gterm*color9: slategray

The environment variable I mentioned is called 'glbcolor' and is defined in
V2.10.3 (or after) to be

pt=3,fr=9,al=3,tl=6,ax=5,tk=5
where
pt - plot title
fr - viewport frame (the background around the plotting area)
al - axis labels
tl - tick label
ax - axis
tk - tick
gr - grid between tick marks

The numbers are the color indices above (i.e. "tk=5" say that the tick marks
are done in color5 (cyan)). To make use of xgterm color graphics you
should have the following set in your login.cl or loginuser.cl file:

stty xgterm

Color graphics is enabled only if you are using V2.10.3BETA or a
later version of IRAF, but using X resources you can still change
the background and foreground colors when working with an earlier version
of IRAF. Resources for the text window are the same as for xterm.


 
Profile Email
 Quote
dmag
 09/14/2016 04:40PM  
+----
Newbie

Status: offline


Registered: 09/14/2016
Posts: 3
I saw that old post but it doesn't help me...

In my .Xdefaults file there are not such lines
*Gterm*color0:
*Gterm*color1:
and so on
Even adding these lines to the file indicating the correct colors i have no changes in IRAF.
I'm able to change the other colors using
pt=3,fr=9,al=3,tl=6,ax=5,tk=5
but not the background/foreground.

There are some lines in the .Xdefauts that state
XTerm*background: black
XTerm*foreground: white
But also inverting these lines with white and black IRAF doesn't change

Other ideas?



 
Profile Email
 Quote
fitz
 09/14/2016 06:08PM  
AAAAA
Admin

Status: offline


Registered: 09/30/2005
Posts: 4040
Those resources wouldn't be there by default, you would need to add them and then load them using

% xrdb -load ~/.Xdefaults

before starting a new XGTerm window. In the unlikely event you have a 'XGterm.ad' file in the same directory these would override the resource settings. Also note that under OSX the .Xdefaults file is normally called ".Xresources".

Now the bad news is that setting the resources, or starting with,

xgterm -xrm "*Gterm*color0:white" -xrm "*Gterm*color1:black"

to set the reverse video no longer appears to work under the OSX XQuartz server and I haven't been able to find a workaround. If you experiment with the resource settings and find a workable solution please post it here.

 
Profile Email
 Quote
   
Content generated in: 0.33 seconds
New Topic Post Reply

Normal Topic Normal Topic
Sticky Topic Sticky Topic
Locked Topic Locked Topic
New Post New Post
Sticky Topic W/ New Post Sticky Topic W/ New Post
Locked Topic W/ New Post Locked Topic W/ New Post
View Anonymous Posts 
Anonymous users can post 
Filtered HTML Allowed 
Censored Content 
dog allergies remedies cialis 20 mg chilblain remedies


Privacy Policy
Terms of Use

User Functions

Login