How to make hide/unhide grids and axis ?

RolandMoutal shared this question 10 years ago
Answered

Hello everyone,

I am wondering if it is possible in a given construction, to create a script associated to a button that can hide or show either the grid, the axis, or both? I can't find a command that will do the trick.

Any help or suggestion will be greatly appreciated.

Thanks,

Roland :D

Comments (2)

photo
1

Hi, with JavaScript script from :

    var a=true;

    ggbApplet.setGridVisible(a);

    ggbApplet.setAxesVisible(a,a);

    ggbApplet.refreshViews();

or a=false

Note that setGridVisible() works for both graph and graph2

but setAxesVisible() works only for graph

Michel

https://ggbm.at/554399

© 2022 International GeoGebra Institute