Re: streamline plot with stUseScalarArray = True

From: Mary Haley <haley_at_nyahnyahspammersnyahnyah>
Date: Fri, 7 Sep 2007 06:57:52 -0600 (MDT)

Just FYI all: I've added Ngl.streamline_scalar and
Ngl.streamline_scalar_map so you can generate streamlines colored by a
scalar field in the same way you do for vectors. This will be
available in the next release (no scheduled date yet).

Usually, however, people find that using curly vectors are the way to
go. Dave Brown, who also wrote the curly vector code, said that curly
vectors are like streamlines, only with finite lengths.

--Mary

On Wed, 5 Sep 2007, Mary Haley wrote:

> Hi Radovan,
>
> Sorry for the late response. We had a burst of consulting activity
> yesterday. I guess everybody came back from vacation and had
> immediate software questions. :-)
>
> Anyway, you can't color streamlines according to another field like
> you can with vectors. So, how about instead using curly vectors, and
> then coloring according to a third field that way? The functions to
> use are Ngl.vector_scalar, or Ngl.vector_scalar_map if you want to do
> this over a map.
>
> We have some examples of this. Go to:
>
> http://www.pyngl.ucar.edu/Examples/gallery.shtml
>
> and look at examples ngl03p and ngl06p, and vector_pop. These examples
> don't have curly vectors, but this can easily be remedied by setting
> the "vcGlyphStyle" resource to "CurlyVector". (See vector_pop.py on
> the same page for an example of curly vectors.)
>
> Let me know if this is not the solution you were hoping for.
>
> --Mary
>
>
> On Tue, 4 Sep 2007, radovan bast wrote:
>
>> dear all,
>>
>> first, please let me thank the pyngl/ncl developers for their great work!
>>
>> i would like to plot a streamline plot where the coloring
>> uses a scalar data array.
>> for instance i manage to plot the streamline plot with:
>>
>> plot = Ngl.streamline(wks, u_array, v_array, resources)
>>
>> and now i would like to color the streamlines according to one vector
>> component (i.e. the v_array) or another 2d array
>>
>> i understand that i must specify:
>>
>> resources.stMonoLineColor = False
>> resources.stUseScalarArray = True
>>
>> but how can i specify how/which scalar data array has to be used for the
>> coloring?
>>
>> since i don't i get:
>>
>> warning:StreamlinePlotInitialize: No scalar data: using streamline
>> magnitude for levelsa
>> and pyngl colors according to the norm of the vector
>>
>> the manual indicates: the resource stScalarFieldData is [to be] set with a
>> valid ScalarField object
>> i don't know how this can be done in practice and i would be very grateful
>> for every hint.
>>
>> best greetings,
>>
>>
>> radovan
>> _______________________________________________
>> pyngl-talk mailing list
>> pyngl-talk_at_ucar.edu
>> http://mailman.ucar.edu/mailman/listinfo/pyngl-talk
>>
> _______________________________________________
> pyngl-talk mailing list
> pyngl-talk_at_ucar.edu
> http://mailman.ucar.edu/mailman/listinfo/pyngl-talk
>
_______________________________________________
pyngl-talk mailing list
pyngl-talk_at_ucar.edu
http://mailman.ucar.edu/mailman/listinfo/pyngl-talk
Received on Fri Sep 07 2007 - 06:57:52 MDT

This archive was generated by hypermail 2.2.0 : Fri Sep 07 2007 - 11:01:08 MDT