Slider question about grids

acron shared this question 10 years ago
Answered

Is there a way to have the grid and axis show/hide depending on the value of a slider?


Thanks,


Tony

Comments (4)

photo
1

Well, there are the ShowAxes and ShowGrid commands. They take boolean values to decide if the axes/grid is to be shown (true) or hidden (false).


You can construct an expression to let a boolean value depend on a number easily i.e.

    n != 0

is false when n = 0 and true otherwise.


Puttting this together in the onUpdate tab of the slider's script property page you might try the script

    ShowAxes[n!=0]

. Works like magic :-)

photo
1

Unfortunately, I am currently using version 4.0 due to multiple SAVE failures in 4.2 and it did not recognize the command.


Either Java or GG developers need to figure what the problem causing save to fail in Java 7 update 7. I am not sure how to revert back to update 5...


Tony

photo
1

I am not sure how to revert back


Use the portable version:

http://code.google.com/p/ge...

photo
1

Use the portable version:

http://code.google.com/p/ge...

Does the portable version do auto updates? If it does not, it makes it very inconvenient.


Thanks,


Tony

© 2022 International GeoGebra Institute