Controlling the extent of a map while animating<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
Hi all,
I was wondering if it is possible to determine and maintain a fixed extent to a map while animating. After running the following script, if you press the Play button you can see that for each Storm Category the background mapsâ position changes. I would like to keep the background map constant while the animation goes ahead.
Thanks!
dt = Open( "$SAMPLE_DATA/Hurricanes.jmp" );
New Window( "Map",
Graph Builder(
Auto Stretching( 0 ),
Variables( X( :Longitude ), Y( :Latitude ) ),
Elements( Contour( X, Y, Legend( 5 ), Number of Levels( 0 ) ) ),
Local Data Filter(
Location( {290, 21} ),
Add Filter(
columns( :Storm Category ),
Where( :Storm Category == "TD" ),
Display( :Storm Category, Size( 204, 264 ), List Display )
),
Mode( Select( 0 ), Show( 1 ), Include( 1 ) ),
Animation( Animate Column( :Storm Category ) )
),
SendToReport(
Dispatch(
{},
"Graph Builder",
FrameBox,
{Background Map( Images( "Simple Earth" ) ), Grid Line Order( 2 ), Reference Line Order( 3 )}
)
)
)
);
Re: Controlling the extent of a map while animatingThere's another way that might be easier. Right click on the graph builder red triangle and select Lock Scales.
New Window( "Map",
Graph Builder(
Show Control Panel( 0 ),
Auto Stretching( 0 ),
Lock Scales( 1 ),
Variables( X( :Longitude ), Y( :Latitude ) ),
Re: Controlling the extent of a map while animatingthank you jim,
this does the trick perfectly.
Re: Controlling the extent of a map while animatingIn the script that you provided in your question, does not define the axes, so the Graph Builder platform is left on it's own to define the axes. All I did, was to run your script, go to the graph and change bot the x and y axes very slightly, and then copy the new script into the script window. The new script now holds the axes from display to display.
Graph Builder(
Fit to Window( "Off" ),
Variables( X( :Longitude ), Y( :Latitude ) ),
Elements( Contour( X, Y, Legend( 5 ) ) ),
Local Data Filter(
Add Filter(
columns( :Storm Category ),
Where( :Storm Category == "TD" ),
Display( :Storm Category, Size( 208, 259 ), List Display )
),
Animation( Animate Column( :Storm Category ) )
),
SendToReport(
Dispatch(
{},
"Longitude",
ScaleBox,
{Min( -121.705030849549 ), Max( 3.22722958105018 ), Inc( 20 ),
Minor Ticks( 0 ) }
),
Dispatch(
{},
"Latitude",
ScaleBox,
{Min( -25.3559216730956 ), Max( 78.1820193180142 ), Inc( 25 ),
Minor Ticks( 0 )}
),
Dispatch(
{},
"Graph Builder",
FrameBox,
{Background Map( Images( "Simple Earth" ) ), Grid Line Order( 2 ),
Reference Line Order( 3 )}
)
)
);