comp.lang.idl-pvwave archive - RDF feed
type: channel
description: Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado
items: HELP! Color problem
items: Re: HELP! Color problem

HELP! Color problem
type: item
description: Hello! I have a great problem with the colors....!! We are working in developing a user-surface for IDL, in which you can draw xy-plots, countour-plots, surface-plots and so on. Normally, I want the colour of background white and the color of text, axes and so on black. The colormap for my data I want to use a spectrum from blue for the minimum data value (eg. z value at surface) and red for the highest value. But how can I use then white for my background and black for my text??? Next problem: if I work something with shades=bytscl(... what I have to specify, that he dont use my white and black in the colormap?? Next problem: I have e.g. a contour plot in and a surface in the same picture. But how can I get, that e.g. value 10 = yellow in my surface plot is the same in my countour plot?? Any help is welcome...!! Regards, Astrid Kuhr
creator: rew032
date: 1997-02-14T08:00:00-00:00

Re: HELP! Color problem
type: item
description: Astrid Kuhr <a.kuhr@kfa-juelich.de> writes: > I have a great problem with the colors....!! You know, some days you wake up and it's like, "Wow, my prayers are answered. An IDL question I *know* how to answer!" > Normally, I want the colour of background white and the color > of text, axes and so on black. > The colormap for my data I want to use a spectrum from blue for > the minimum data value (eg. z value at surface) and red > for the highest value. > But how can I use then white for my background and black for my text??? Well, do this. Suppose you want to have 200 "data" colors, and then a couple of "drawing" colors for your background, plots, etc. First, let's build a color table that goes from blue to red. This is pretty easy. Here are 200 data colors going from pure blue at one end to pure red at the other end. blue = Congrid(Findgen(256), 200) blue = Reverse(blue) red = Congrid(Findgen(256), 200) green = FltArr(200) TVLCT, red, green, blue Now, let's have some "drawing colors". I want black (0,0,0), white(255,255,255), charcoal(70,70,70), and yellow(255,255,0). I want to load these colors "above" my drawing colors, starting at index 200. I do this: TVLCT, [0, 255, 70, 255], [0, 255, 70, 255], [0, 255, 70, 0], 200 Let's draw a surface in which the surface is shaded with the data colors, but I use a charcoal background and yellow axes. SURFACE, DIST(30), Background=202, Color=203, $ Shades=BYTSCL(DIST(30), TOP=199) > Next problem: I have e.g. a contour plot in and a surface in the same > picture. But how can I get, that e.g. value 10 = yellow in my surface > plot is the same in my contour plot?? !P.MULTI=[0, 2, 1] SURFACE, DIST(30), Background=202, Color=203, $ Shades=BYTSCL(DIST(30), TOP=199) CONTOUR, DIST(30), NLEVELS=12, Color=201, C_Color=203 This is good fodder for the "tips" section on my web page. I'll put it in with the other color stuff. Cheers! David ----------------------------------------------------------- David Fanning, Ph.D. Fanning Software Cons…
creator: davidf
date: 1997-02-14T08:00:00-00:00