source: trunk/MESOSCALE_DEV/PLOT/MINIMAL/fsc/ps_plotter.pro @ 937

Last change on this file since 937 was 85, checked in by aslmd, 14 years ago

LMD_MM_MARS et LMD_LES_MARS: ajout des routines IDL pour tracer les sorties --> voir mesoscale/PLOT

File size: 1.5 KB
Line 
1PRO PS_Plotter, image, $
2   European=european, $   ; Set this keyword if you want European measurements.
3   Font=font, $           ; Set this keyword if you want font information.
4   Object=object          ; Output variable to return FSC_PSConfig object.
5
6   ; Get an image if one is not passed in.
7
8IF N_Elements(image) EQ 0 THEN BEGIN
9   image = BytArr(360, 360)
10   file = Filepath(SubDirectory=['examples', 'data'], 'worldelv.dat')
11   OpenR, lun, file, /Get_Lun
12   ReadU, lun, image
13   Free_Lun, lun
14ENDIF
15
16   ; Create the PostScript configuration object.
17
18object = Obj_New('FSC_PSConfig', European=Keyword_Set(european))
19
20   ; We want hardware fonts.
21
22thisFontType = !P.Font
23!P.Font = 1
24
25   ; Get user input to PostScript configuration.
26
27IF Keyword_Set(font) THEN object->GUI, /Font ELSE object->GUI
28
29   ; Configure the PostScript Device.
30
31thisDevice = !D.Name
32Set_Plot, 'PS'
33keywords = object->GetKeywords(FontType=fonttype)
34Device, _Extra=keywords
35
36   ; Draw the example plots.
37
38!P.Multi = [ 0, 1, 2]
39TVImage, image
40Plot, Histogram(image), Title='Example Histogram Plot', XTitle='Pixel Value', $
41   YTitle='Number of Pixels', XStyle=1, Max_Value=5000
42!P.Multi = 0
43
44   ; Clean up.
45
46Device, /Close_File
47Set_Plot, thisDevice
48!P.Font = thisfontType
49
50   ; Return the PS_Configuration object or destroy it.
51
52IF Arg_Present(object) EQ 0 THEN Obj_Destroy, object
53END ;--------------------------------------------------------------------------------
54
55
56
57
58
59
60
Note: See TracBrowser for help on using the repository browser.