APS Excellence in Physics Education Award
November 2019

Education Prize Logo
Science SPORE Prize
November 2011

NSF Logo
The Open Source Physics Project is supported by NSF DUE-0442581.

Hiding coordinate values in Plotting Panel post and replies

Return to the Hiding coordinate values in Plotting Panel thread
Login to post to this thread

Hiding coordinate values in Plotting Panel
Ng Kit
3 Posts

Dear All,

Is it possible to hide the x-values (but displaying the y-values) when displaying a graph using the Plotting panel?

Many thanks!
kit
Singapore


Replies to Hiding coordinate values in Plotting Panel

Re: Hiding coordinate values in Plotting Panel -
Mariusz Krasinski
17 Posts

I think this is what you need

_view.plottingPanel.getAxisX().setShow(false);



Re: Re: Hiding coordinate values in Plotting Panel -
Ng Kit
3 Posts

Thank you for the advice.
I'm new to this programing.... do I type this code in Custom?

This is what I type:

function lib_Page () {
_view.plottingPanel.getAxisX().setShow(false);
}

But it doesn't seem to work.

What am I missing?

Many thanks!



Re: Re: Re: Hiding coordinate values in Plotting Panel -
Mariusz Krasinski
17 Posts

Sorry. I am fixed now on Javascript simulations.

I did not ask if you write Java or Javascript code.
The method I described works for Javascript version. The line should be placed for example in Initialization if you want it to work for every moment of simulation or later in proper moment.

In Java it does not work perhaps. Probably syntax should be different.



Re: Re: Re: Re: Hiding coordinate values in Plotting Panel -
Ng Kit
3 Posts

Got it !
I'm using Javascript and your code works !
Thank you very much for your help !



OSP Projects:
Open Source Physics - EJS Modeling
Tracker
Physlet Physics
Physlet Quantum Physics
STP Book