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

Home » Public Forums » archive » Re: problem:symbol not be showed in IdlgrPlot object etc.
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: problem:symbol not be showed in IdlgrPlot object etc. [message #46012 is a reply to message #46011] Wed, 26 October 2005 21:09 Go to previous messageGo to previous message
Mark Hadfield is currently offline  Mark Hadfield
Messages: 783
Registered: May 1995
Senior Member
shengbaojun wrote:
> Hello,I have draw the background map.Thanks for Mr.Rick Towler and
> Mr.Mark Hadfield a lot.
> But I met some difficulties when I try something else,so could you give
> me some adivce please.
>
> 1, I want to draw some cities above the background map,but the symbols
> can not be showed.
> I use the code as follows:
> ;-----------------------------------------------------
> ;draw cities
> cityUV = map_proj_forward(lon, lat, $
> map=map_info.smap $
> )
> ;define the symbol
> pentagon=OBJ_NEW('IDLgrPolygon', [0.1,0.5,0.9,0.7,0.3], $
> [0.6,0.9,0.6,0.1,0.1], $
> COLOR=Color_cities $
> )
> symModel = OBJ_NEW('IDLgrModel')
> symModel -> Add, pentagon
> symModel -> Scale, 8, 8, 1
> symModel -> Translate, -1, -1, 0
> ocitiesSymbol = OBJ_NEW('IDLgrSymbol', symModel)
> ; ocitiesSymbol=OBJ_NEW('IDLgrSymbol',4,$
> ; color=Color_NoData,$
> ; thick=8.0,$
> ; size=[9.0,9.0]$
> ; )
> map_info.ocitiesSymbol=ocitiesSymbol
>
> oPlotCities=OBJ_NEW('IDLgrPlot',cityUV[0,*],cityUV[1,*], $
> Symbol=ocitiesSymbol,$
> _Extra=extra,$
> ;Thick=2 ,$
> LINESTYLE =6 $
> )
>
> map_info.omodel->ADD,oPlotCities
> map_info.owindow->DRAW,map_info.oview,/draw_instance
> ;--------------------------------------------------------
> If I change the LINESTYLE value from 6 to 3,The lines has been
> showed,but the Symbols also can not be showed .

Can you see the symbols when you use one of the standard symbol types
(eg type 4, or diamonds, which you've commented out)?

If you can see the standard symbols but not the user-defined ones, then
you must have done something odd in setting up the symbol polygon or
model. Actually, I can see from your code that you *have* done something
odd. The guideline in the IDL documentation is that a user-defined
symbol's data should extend from -1 to +1 in the x & y directions. The
SIZE property is then used to scale the symbol to an appropriate size
for the plot. Your symbol polygon extends from 0 to 1 and then you scale
and translate the symbol model. I don't know why you did this, but I'm
sure it's a not a good idea.
>
> 2,I use the develop model of C# plus axIDLWidgetControl 3.0,I write
> the mouse event in C#,so I must obtain the value of IDL's variable from
> IDL's .pro file.But I can not get them .The code is as follows:

Woooaa. That's way beyond me, sorry.

I don't know how to put this without sounding condescending, but are you
sure you know enough about basic IDL programming to start trying to mix
it with C#?

--
Mark Hadfield "Kei puwaha te tai nei, Hoea tahi tatou"
m.hadfield@niwa.co.nz
National Institute for Water and Atmospheric Research (NIWA)
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Previous Topic: the AVHRR NDVI data series analysis
Next Topic: middle mouse button emulation in widget_draw

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

Current Time: Thu Oct 09 21:08:08 PDT 2025

Total time taken to generate the page: 0.64140 seconds