cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Choose Language Hide Translation Bar
Benjamin_Fuerst
Level III

Hide x-axis and y-axis number label

Hello JMP community,

 

I am preparing my talk on the upcoming discovery summit.

 

Because of confidentiality reasons I cannot show the y and x-axis labels.

See pic, where I removed the axis box via the properties visibility option.

 

Benjamin_Fuerst_1-1637561675406.pngBenjamin_Fuerst_2-1637561728035.png

 

 

Normalizing all the data to range 0 to 1 changes all the analyses I did with scripts.

So as I see it, I need to keep the original (confidential) numbers but need to hide the Axis Box.

 

Can anybody assist me with a better idea than doing it manually in the properties or something totally different approach how to avoid showing confidential data?

Ideally there would be something like a column properties which suppresses the number showing on the axises in all analyses.

 

Appreciate a hint for an easier way to do this!

 

Thanks!
Ben

 

 

 

2 ACCEPTED SOLUTIONS

Accepted Solutions
txnelson
Super User

Re: Hide x-axis and y-axis number label

Here is a simple script that will hide the axis values for all windows in your session.  To make the axis values visible, change "hidden" to "visible" and rerun the script.

Names Default To Here( 1 );
i = 1;
While( Window( i ) << get window title != {},
	Try( (Window( i ) << xpath( "//AxisBox" )) << visibility( hidden ) );
	i++;
);

 

Jim

View solution in original post

ian_jmp
Staff

Re: Hide x-axis and y-axis number label

Depending on exactly what's needed, you can just suppress the numbers that appear on the axes too:

NamesDefaultToHere(1);

dt = Open("$SAMPLE_DATA/Big Class.jmp");

biv = dt << Bivariate(X(:height), Y(:weight));

Wait(2);

bivRep = Report(biv);
abs = bivRep << Xpath("//AxisBox");
abs << Show Major Labels( 0 );

View solution in original post

9 REPLIES 9
txnelson
Super User

Re: Hide x-axis and y-axis number label

Here is a simple script that will hide the axis values for all windows in your session.  To make the axis values visible, change "hidden" to "visible" and rerun the script.

Names Default To Here( 1 );
i = 1;
While( Window( i ) << get window title != {},
	Try( (Window( i ) << xpath( "//AxisBox" )) << visibility( hidden ) );
	i++;
);

 

Jim
ian_jmp
Staff

Re: Hide x-axis and y-axis number label

Depending on exactly what's needed, you can just suppress the numbers that appear on the axes too:

NamesDefaultToHere(1);

dt = Open("$SAMPLE_DATA/Big Class.jmp");

biv = dt << Bivariate(X(:height), Y(:weight));

Wait(2);

bivRep = Report(biv);
abs = bivRep << Xpath("//AxisBox");
abs << Show Major Labels( 0 );
Benjamin_Fuerst
Level III

Re: Hide x-axis and y-axis number label

@txnelson @ian_jmp : Thanks a lot.

Actually a mixture of both of your answers did the thing, I needed at this point.

Names Default To Here( 1 );
i= 1;
While( Window( i ) << get window title != {},
	Try( (Window( i ) << xpath( "//AxisBox" )) << Show Major Labels( 0 ) );
	i++;
)

For removing all the axis items of a profiler axis (except the title), I extended the script with this 

Names Default To Here( 1 );
i = 1;
While( Window( i ) << get window title != {},
	Try( (Window( i ) << xpath( "//TextBox" )) << visibility( hidden ) );
	i++;
);
i= 1;
While( Window( i ) << get window title != {},
	Try( (Window( i ) << xpath( "//AxisBox" )) << Show Major Labels( 0 ) );
	i++;
);
i= 1;
While( Window( i ) << get window title != {},
	Try( (Window( i ) << xpath( "//NumberEditBox" )) << visibility( hidden ) );
	i++;
);

One has to be cautious, since e.g. xpath( "//TextBox" ))  then attributes the visibility to all TextBoxes. 

This removes other things one probably does not want to remove!

@Florian_Vogt @Emmanuel_Romeu : Since we discussed this, possible interesting to know this work around!

 

 

 

MELIU
Level I

Re: Hide x-axis and y-axis number label

HI Jim,

 

Thanks for sharing this with the community, I found it very useful!

Can you please help tell me how to modify the code so it only hides the values on the Y-axis ?

 

Thanks!

ML

ron_horne
Super User (Alumni)

Re: Hide x-axis and y-axis number label

Hi @Benjamin_Fuerst ,

I think @txnelson gave a good solution.

I was expecting to have this ability in the preferences but i didn't manage to see any difference with or without these options selected. Can anyone demonstrate the difference?

ron_horne_1-1637578645412.png

 

 

Benjamin_Fuerst
Level III

Re: Hide x-axis and y-axis number label

@ron_horne I could not see a difference having it ticked or not in the graphbuilder... 

Re: Hide x-axis and y-axis number label

Hi @ron_horne , 

 

have you restarted JMP after changing the preference?

ron_horne
Super User (Alumni)

Re: Hide x-axis and y-axis number label

Hi @Florian_Vogt 

i did restart, could you show me a picture of with and without these boxes checked?

so i know what to look for.

Re: Hide x-axis and y-axis number label

Hi @ron_horne ,

 

I was initially rather generally speaking - while I wanted to prepare the screenshots, I found out this is a bug which is already under construction and will be solved.

 

The correct way is, the boxes (that you have outlined by a box in your screenshot) are ticked as default. If you uncheck them and restart JMP, the graph builder will not show the axes.

 

Best

Florian