Re: VisAD: thow graphs in the same window

On Thu, 10 Apr 2003, [Windows-1252] Stig Frode Samnøy wrote:

> I'm sorry to bother you directly (not going through the mailing list), but 
> I'm inn a hurry (abstract deadline 15th of Mars).

Send all technical questions to visad-list rather than to me.
Sometimes I am travelling and do not answer email for days at
a time.

> I'm using VisAD for visualizing data generated by MR. Now I have the same 
> problem as described below (copied from the mailing list).
>
> I do not quite understand how to solve this problem. Taking P2_08 (Ugo's 
> tutorial) as an example, is it correct that you say that adding two 
> horizontal axis to one display would create to displays with the same 
> horizontal axis? In  that case the following code would apply:

I never said that "adding two horizontal axis to one display
would create two displays with the same horizontal axis". My
message to the list was about creating identical horizontal
axes in two different DisplayImpls. If you want two DisplayImpls,
then construct two DisplayImpls.

Good luck,
Bill

> // Add maps to display
>
>     display.addMap( timeMap );
>     display.addMap( heightYMap );
>
>     display.addMap( timeMap2 ); //added for testing
>     display.addMap( speedYMap );
>
> This only produces an additional horizontal axis on the same display (as 
> expected). What is it i'm not getting here? Can you please help me?
>
>
> Best regards (and thanks for developing VisAD!),
>
> M.Sc. Stig F. Samnøy
> Haukeland University Hospital
> Dept. of Clinical Engineering
> N-5021 Bergen, Norway
>
>
> **copy from mailing list
>
> > I've been trying to get two graphs to show up in the same widget
> > (Swing/Jython). I want to have two separate vertical axes (vertically
> > displaced from one another), and two horizontal axes (again vertically
> > displaced) with the same quantity and scale on each. Like this:
> >
> >          |
> >    y     |
> >          |
> >          |
> >          |-------------------------------------------
> >                                x
> >
> >          |
> >    y     |
> >          |
> >          |
> >          |-------------------------------------------
> >                                x
> >
> > Another example would be Ugo Taddei's  display at
> > http://www.geogr.uni-jena.de/~p6taug/demviewer/more/modv.jpg, except that
> > he's got three aligned vertically, though two of them do use the same
> > horizontal axis. I had thought that using two displays, giving them the
> > same horizontal ScalarMap, and adding them to the same Swing widget would
> > accomplish that, but I get a message from VisAD about not being allowed to
> > use the same ScalarMap on more than one display.
>
> Instead of adding the same ScalarMap to two DisplayImpls,
> construct two identical ScalarMaps and add each to only
> one DisplayImpl. If they will have state changes, you can
> keep them synced by adding ScalarMapListeners to them. But
> be careful to avoid event loops between ScalarMapListeners
> for two ScalarMaps - the easy way to do that is to never
> call a method of a ScalarMap or Control that tries to set
> it to a state that is identical to its current state.
>
> Cheers,
> Bill
>


  • 2003 messages navigation, sorted by:
    1. Thread
    2. Subject
    3. Author
    4. Date
    5. ↑ Table Of Contents
  • Search the visad archives: