comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Window Background
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Window Background [message #22373] Fri, 03 November 2000 16:08 Go to previous message
eak is currently offline  eak
Messages: 5
Registered: December 1998
Junior Member
Hello all,

Since I got such a great response to my last post I thought I'd try one
more time. Thanks to JD I got the code running but now the
behaviour on Windows and Linux is different. On the Linux side my plot
window comes up with a white background, on the Windows side a black one.
Same code and version of IDL 5.3. Since I need the white BG I tried
!P.BACKGROUND = 255 on windows but no change.

;-----
; Define color table.
;-----
r = [ 255, 68, 87, 58, 0, 0, 0, 0, 0, 0, $
8, 93, 169, 255, 255, 255, 255, 0]
g = [ 255, 0, 0, 0, 8, 97, 182, 255, 255, 255, $
255, 255, 255, 255, 170, 80, 0, 0]
b = [ 255, 72, 145, 218, 255, 255, 255, 242, 165, 80, $
0, 0, 0, 0, 0, 0, 0, 0]

tvlct, r, g, b

;-----
; Store images in arrays.
;-----
elec_image = transpose( j4_data( min_data_rec: $

max_data_rec).diff_num_flux_electrons(*))
ion_image = transpose( j4_data( min_data_rec: $
max_data_rec).diff_num_flux_ions(*))
image_size = size( elec_image)
;-----
; Set window size and plot position info.
;-----
num_colors = 17
!order = 1

x_size = 1000
y_size = 600

x_data_start = 150
x_data_end = 900
x_data_extent = x_data_end - x_data_start

y_data_e_top = 540
y_data_e_bottom = 340
y_data_i_top = 320
y_data_i_bottom = 120
y_data_extent = y_data_e_top - y_data_e_bottom
if ( y_data_extent NE y_data_i_top - y_data_i_bottom) then $
begin
print, 'Error in J4_COLOR_SPECTROGRAM: ', $ image = 0
return
endif

x_color_bar_left = x_data_end + 55
x_color_bar_right = x_color_bar_left + 20
y_color_bar_bottom = y_data_i_bottom + 50
y_color_bar_top = y_color_bar_bottom + 20 * ( num_colors - 1)

min_data_value = 1.0E05
max_data_value = 1.0E09

min_channel_energy = 30.0 ; eV
max_channel_energy = 30000.0 ; eV
;;;; Shouldn't this be trick ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
!P.BACKGROUND = 255
window, /free, xsize = x_size, ysize = y_size

;-----
; Labels.
;-----
x_tick_labels = [' ', ' ', ' ', ' ', ' ']
[Message index]
 
Read Message
Read Message
Previous Topic: BYTES to LONG
Next Topic: Re: Arrays in Structures Question (newbie)

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Fri Oct 10 04:37:18 PDT 2025

Total time taken to generate the page: 0.63942 seconds