cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Submit your abstract to the call for content for Discovery Summit Americas by April 23. Selected abstracts will be presented at Discovery Summit, Oct. 21- 24.
Discovery is online this week, April 16 and 18. Join us for these exciting interactive sessions.
Choose Language Hide Translation Bar
alexbnieto
Level I

Using Graph or GraphBox - How to change X,Y axis increment & Reverse axis

Hello,

I am trying to use the Graph function but am unsuccessful in making X-axis incremements of 1 and Reversing Y-axis order. 

 

I tried swapping the numbers in the Y Scale properties but no luck. Only way to change is to physically change graph manually. Still unable to figure this out using JSL. 

 

Any help is appreciated!

 

Here is a snippet of my code

 

New Window( "Map",
Graph(
Frame Size( 800, 800 ),
X Scale(-0.6, 40.7),
Y Scale(0.4, 7.6),

...

);

1 REPLY 1
ms
Super User (Alumni) ms
Super User (Alumni)

Re: Using Graph or GraphBox - How to change X,Y axis increment & Reverse axis

Send the commands to each AxisBox(). Use <<show tree structure if uncertain about the naming or numbering of the display boxes of interest.

 

An example:

nw = New Window("Map",
    Graph(Frame Size(800, 800), X Scale(-0.6, 40.7), Y Scale(0.4, 7.6))
);
// nw<<show tree structure();
nw[AxisBox(1)] << reversed scale;
nw[AxisBox(2)] << inc(1);