NOTICE: This version of the NSF Unidata web site (archive.unidata.ucar.edu) is no longer being updated.
Current content can be found at unidata.ucar.edu.

To learn about what's going on, see About the Archive Site.

Re: setScaleEnable

> 
> Hi John,
> 
> > A while back, I asked about plotting multiple scalars to the same axis
> > and was told that I nust needed to call a SetScaleEnable(true).  Well,
> > I've finally gotten back around to trying this, and I get the error:
> >
> > Single DisplayRealType DisplayYAxis occurs more than once:
> > ShadowType.testIndices
> >
> > What is going wrong?
> 
> This message indicates that more than one RealType is mapped
> to Display.YAxis, and that the display logic is trying to
> apply both at once (e.g., data has MathType (a -> (b, c))
> and both b and c or both a and b are mapped to YAxis).  If
> multiple RealTypes are mapped to YAxis, they cannot be in
> path from root to leaf in the MathType tree (the exact
> defintion is a bit complex, but this is the intuition).
> 
> It is unlikely (but not impossible) that this is caused by the
> ScalarMap.setScaleEnable(true) call.
> 

Right, that's exactly what I want to do.  A while back, I asked about
mapping multiple data sets to the same axis, and got a response saying
that this was possible, if you use setScaleEnable:

<SNIPPET FROM OLD MESSAGE>
-------------------------------------------------------------------
> Is it possible to produce plots with more than one axis scale in the
> same direction?  That is, if you have two or more RealTypes mapped to
> the same domain, is it possible to plot them in the same visualization
> space?  If so, how?
> 

Hi John,

As long as you have called GraphicsModeControl's setScaleEnable(true)
you should get an axis scale for every ScalarMap mapping a RealType to
an Axis. e.g.

  display.getGraphicsModeControl().setScaleEnable(true); 
  display.addMap(new ScalarMap(a, Display.XAxis));
  display.addMap(new ScalarMap(b, Display.XAxis));

should give you a scale for a and b along the x axis, unless I am
missing something.
--------------------------------------------------------------------
</END SNIPPET>

So, was this advice wrong?  Is it not possible to plot two lines or two
surfaces (or whatever) in the same display?  (For instance, a
"climatogram" plotting temperature and precipitation vs. time.)  This
functionality is important to the educational visualization application
I am working on.


-john
begin:vcard 
n:Brecht;John
tel;home:(415)260-7898
tel;work:(650)859-2325
x-mozilla-html:TRUE
url:http://jbrecht.sri.com/john/
org:SRI International;Center for Technology in Learning
version:2.1
email;internet:john.brecht@xxxxxxx
title:Software Engineer
adr;quoted-printable:;;333 Ravenswood=0D=0ABN 261=0D=0A;Menlo Park;CA;94025;USA
fn:John Brecht
end:vcard
  • 1999 messages navigation, sorted by:
    1. Thread
    2. Subject
    3. Author
    4. Date
    5. ↑ Table Of Contents
  • Search the visad archives: