Re: display groups of same lines types with different scale

Hi Thomas,

> i'm looking forward to display multiple lines in same display. now i want to 
> group the scale of some lines and display axis-title and axis-thick for each 
> group of line.
> .
> e. g.:
> line1, line2 -> scale 1 -> axis-scale on primary
> line3 -> scale 2 -> axis-scale on secondary
> line4, line5, line6 -> axis-scale on primary
> line7 -> axis-scale on secondary
> ... and so on
>
> my code:
>
> ....
> myDisplay.removeAllReferences();
> myDisplay.addMap(new ScalarMap(RealType.XAxis, Display.XAxis)); //x map
> myDisplay.addMap(new ScalarMap( RealType.YAxis, Display.YAxis)); //y-map
>
> Gridded2DDoubleSet set = new Gridded2DDoubleSet(new 
> RealTupleType(RealType.XAxis ,
> RealType.YAxis),
> values,
> values[0].length);
>
> DataReference ref = new DataReferenceImpl("data" + i); //data-reference
> ref.setData(set);
> ...
> myDisplay.addReference(ref,new ConstantMap[] {r,g,b});
>
> if i want to add a second y-map to the display, i have got this error message:
> visad.DisplayException: DisplayImpl.addMap(): ScalarType may not occur in any 
> DataReference

This message indicates that the RealType in your ScalarMap
occurs in a DataReference already linked to the DisplayImpl.

If possible, addMap() all the ScalarMaps before your
addReference() any Data.

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

> whats my  problem?
> is it possible to display a few groups of Griddet2DDoubleSet with different 
> scale, seperate axis-titles and axis-labels?

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

> is the issue with "axis title overlaps axis tick labels resolved? I asked 
> this question about five month ago and found and answer in the
> archives. i have tested this problem using a new version of visAD, but i did 
> not see it fixed.

Perhaps Don knows the answer to this.

Good luck,
Bill