How to set the axis steps from a script?

s_o shared this question 3 years ago
Answered

Hey,

I would like know what options are there to set the axis step distance from a script. I know I can use setCoordSystem to change the scaling and it works fine, but I also would like to change the grid as well dynamically. All I found are the commands AxisStepX and AxisStepY, but they only return the axis steps, how can I set them?

Best regards,

Stefan

Comments (4)

photo
1

Try

  1. ggbApplet.setAxisStep()

https://www.geogebra.org/ma...

photo
1

Thanks, my GeoGebra (5.0.269.0-3D) says function not found, is it not implemented in the desktop/java version jet? I inspected the ggpApplet element on the Materials site using Firebug, the function is listed, but with 4 arguments not 3.

photo
1

Found the problem, the correct name of the function is ggbApplet.setAxisSteps() (as shown in Firebug, did not notice the s the first time), the changelog is not correct. Also works with 3 parameters.

photo
1

Thanks, first argument is the view number (now updated here https://www.geogebra.org/ma...)

© 2019 International GeoGebra Institute