RE: mixing points and lines in a display

> Hi Henner,
> 
> > i have a new problem that i didn't manage to get rid of for hours:
> > 
> > i have a model class that can be plugged into a display class that uses
a
> > DisplayImplJ(2/3)D. an instance of this model contains a time series
with
> > realtime data and also computes an average curve that just has one
sample
> > per day. both can be received as datareferences that are ready to add to
the
> > display. here are the lines of code that should do the work:
> > 
>
> This is unreadable.  Please indent less (in VisAD we only indent
> by 2 spaces) and set your email program to send much longer lines.
> 
> > the both graphs (assuming the code above would get one model by calling
> > getModels()) are always displayed as lines - both. although i can't see
any
> > significant difference to the code of example P2_05.
> 
> Picking through your code, there is not enough informration
> to tell why you are getting only lines.  It depends on your
> MathTypes and ScalarMaps.  If you print your MathTypes and
> your ScalarMaps, and do the same for P2_05, you may see the
> difference.

good tip! now i understood what i did wrong. i always used the same
functionType - still (time -> currency) where i should have used (index ->
(time, currency)).
but can you tell me if there is an easier way to get the data displayed as
points than constructing everything new?
i already have a datareference that can be displayed (time -> currency).
especially regarding the same problem for the 3d display, i get a bit
worried because i don't think i understood how to construct a point plot.
what would it have to look like???

> 
> > in a 3d plot it is even worse. the above code produces the following
stack
> > trace:
> > 
> > ______________________________________________________
> > java.lang.ArrayIndexOutOfBoundsException: 1
> >         at
> >
visad.ShadowFunctionOrSetType.doTransform(ShadowFunctionOrSetType.java:2147)
> >         at
> >
visad.java3d.ShadowFunctionOrSetTypeJ3D.doTransform(ShadowFunctionOrSetTypeJ
> > 3D.java, Compiled Code)
> >         at
> > visad.java3d.DefaultRendererJ3D.doTransform(DefaultRendererJ3D.java,
> > Compiled Code)
> >         at visad.java3d.RendererJ3D.doAction(RendererJ3D.java, Compiled
> > Code)
> >         at visad.DisplayImpl.doAction(DisplayImpl.java, Compiled Code)
> >         at visad.ActionImpl.run(ActionImpl.java, Compiled Code)
> >         at visad.util.ThreadPool$ThreadMinnow.run(ThreadPool.java,
Compiled
> > Code)
> > java.lang.ArrayIndexOutOfBoundsException: 1
> >         at
> >
visad.ShadowFunctionOrSetType.doTransform(ShadowFunctionOrSetType.java:2147)
> >         at
> >
visad.java3d.ShadowFunctionOrSetTypeJ3D.doTransform(ShadowFunctionOrSetTypeJ
> > 3D.java, Compiled Code)
> >         at
> > visad.java3d.DefaultRendererJ3D.doTransform(DefaultRendererJ3D.java,
> > Compiled Code)
> >         at visad.java3d.RendererJ3D.doAction(RendererJ3D.java, Compiled
> > Code)
> >         at visad.DisplayImpl.doAction(DisplayImpl.java, Compiled Code)
> >         at visad.ActionImpl.run(ActionImpl.java, Compiled Code)
> >         at visad.util.ThreadPool$ThreadMinnow.run(ThreadPool.java,
Compiled
> > Code)
> > ______________________________________________________
> > 
> > ... and the display hangs, reading : "please wait". but if i choose
point
> > mode (in the corresponding widget panel) the data gets visible -
visualized
> > as points. if i switch back the exception occurs again.
> 
> It is failing in the texture mapping logic, and setting point
> mode disables texture mapping.  There is not enough information
> to understand the Exception.  Somehow domain_set.getLengths()
> is returning an array of length 0.  Since I know you can't
> send me your application to run, can you please run it under
> jdb, catch the ArrayIndexOutOfBoundsException, and send me the
> output of 'dump domain_set' and 'dump lengths' after the
> ArrayIndexOutOfBoundsException.
> 
> Cheers,
> Bill
> ----------------------------------------------------------
> Bill Hibbard, SSEC, 1225 W. Dayton St., Madison, WI  53706
> hibbard@xxxxxxxxxxxxxxxxx  608-263-4427  fax: 608-263-6738
> http://www.ssec.wisc.edu/~billh/vis.html