Re: Using Comm... err, alternative? [message #21181 is a reply to message #21180] |
Thu, 17 August 2000 15:08   |
Mark Hadfield
Messages: 783 Registered: May 1995
|
Senior Member |
|
|
"Pavel Romashkin" <promashkin@cmdl.noaa.gov> wrote in message
news:399C243A.8EAF52C6@cmdl.noaa.gov...
> David Fanning wrote:
>>
>> The "self" object
>> reference comes immediately to mind, but then your
>> user is going to know for sure that this thing is an
>> object and run like hell in the other direction. :-(
>
> This is *exactly* what I am thinking. I wanted to make this PLOT
> substitute (re-inventing the wheel again) so transparent that they have
> no clue they use object graphics :-) I'll release it when this thread is
forgotten.
And here I am trying to make direct graphics more object-like:
; Plot a map in one window
odg0 = obj_new('MGHdgWindow', DIMENSIONS=[400,400])
odg0->plot, '!p.color = 255 & !p.background = 0', /EXECUTE
odg0->plot, 'map_set', 0, 170, LIMIT=[-50,160,-30,180], /ISOTROPIC,
/MERCATOR
odg0->plot, 'map_continents', /HIRES, /FILL_CONTINENTS
; A line plot in another window (with different colours)
odg1 = obj_new('MGHdgWindow', DIMENSIONS=[450,350], RESIZEABLE=0)
odg1->plot, '!p.color = 0 & !p.background = 255', /EXECUTE
odg1->plot, 'plot', findgen(100000)
; Go back and add something to the map.
odg0->refresh
odg0->plot, 'map_grid'
---
Mark Hadfield
m.hadfield@niwa.cri.nz http://katipo.niwa.cri.nz/~hadfield/
National Institute for Water and Atmospheric Research
PO Box 14-901, Wellington, New Zealand
|
|
|