Re: display groups of same lines types with different scale

On Sat, 26 Oct 2002, Thomas Bauer wrote:
> ok, now i add all Maps before i set the DataReferences - the source looks
> like this:
> myDisplay.clearMaps();
> myDisplay.getGraphicsModeControl().setScaleEnable(true);
> myDisplay.addMap(new ScalarMap(RealType.XAxis, Display.XAxis)); //x map
> myDisplay.addMap(new ScalarMap( RealType.YAxis, Display.YAxis)); //ymap 1
> myDisplay.addMap(new ScalarMap( RealType.YAxis, Display.YAxis)); //ymap 2
> i get the following error in  line 4:
> visad.BadMappingException: Display.addMap: two ScalarMaps with the same
> RealType & DisplayRealType
> is it possible to add more than one ScalarMap with identical type?

No, recall I said:

> > Note also that you cannot add another identical:
> >   ScalarMap( RealType.YAxis, Display.YAxis)

> or, what should i use instead of that to display lines of same data-type
> with different scales on YAxis . Do you have a short example to do this?

I also said:

> > To get different axis scales etc, use different RealTypes
> > in each Set, each with its own ScalarMap (addMap() all at
> > the start).

If you want different Sets displayed with different scales,
use different RealTypes.