Re: PARTVELVEC procedure not overplotting despite setting over keyword, Trouble with OPLOT [message #77093 is a reply to message #77085] |
Thu, 28 July 2011 06:17  |
David Fanning
Messages: 11724 Registered: August 2001
|
Senior Member |
|
|
jakemccord writes:
> This is my first post on this message board so I will try and be as
> succinct as possible. In essence, I have been trying to plot vector
> arrows (using the partvelvec procedure) ontop of a previously plotted
> flux distribution to help visualize the direction of a gradient. One
> uncertainty I have is the coordinate system Partvelvec expects. One
> individual I have communicated with believes that the program utilizes
> "the data coordinate system of the positions you pass into
> Partvelvec." Is this correct? I have been inclined to use normalized
> coordinates after seeing a null plot spanning from 0 to 1 on the x and
> y axes. I realize that if the positions I define in my argument do not
> match up with the previously established positions, i.e. on the flux
> distribution, then that could be particularly problematic in getting
> the result I want. Apart from this, or perhaps because of this, my
> setting the overplot keyword seemed to have no effect. Just to throw
> in a few lines of interest from my code:
>
> Partvelvec,grad_intensity_x,grad_intensity_y, xarrow, yarrow, $
> color = 'white', /over, length = 0.1.
>
> While this is somewhat vague I have taken care to verify that the
> above arguments are adequately defined.
>
> Also, just to try my luck in plotting something ontop of the
> aforementioned flux distribution I have overplotted a couple asterisks
> upon normalizing my data, calling:
>
> pointx = [0.25, 0.75] & pointy = [0.25, 0.75]
> OPLOT, pointx, pointy, color = 190, linestyle=0, $
> SYMSIZE=10.0, PSYM=2
>
> PLOTS, pointx, pointy, color=190, linestyle=0, $
> SYMSIZE-10.0, PSYM=2, /NORMAL
>
> PLOTS seemed to work better than OPLOT as OPLOT only partially
> displayed an asterisk in the lower left window ontop of my color bar.
> Any ideas why?
Probably because you plot range is not what you think
it is. Why don't you try printing the plotting range of
your plot (!X.CRange and !Y.CRange) before you try to
draw your vectors.
Print, 'X Range: ', !X.CRange
Print, 'Y Range: ', !Y.CRange
Do those ranges correspond at all to the locations you
are trying to plot?
Print, Min(xarrow), Max(xarrow)
Print, Min(yarrow), Max(yarrow)
Cheers,
David
--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.idlcoyote.com/
Sepore ma de ni thui. ("Perhaps thou speakest truth.")
|
|
|