cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Check out the JMP® Marketplace featured Capability Explorer add-in
Choose Language Hide Translation Bar
WakuWakuGoku
Level II

How do I get the setting for Dec in "Fixed Dec" format in Axis Column Property??

I need to get the setting for Dec in "Fixed Dec" format in Axis Column property. I can get similar setting, e.g. Max, Min etc by running "get property("Axis")", but cannot get the Dec number. Here is one example of the Axis property info. In this case, I need to get "0", but only "Fixed Dec" is seen, not "5" & "0".

 

Probably we can get it as we like by having proper "character function" like Substr etc, but I suppose we can have it simpler way like we do for the number for "Max", "11" in this case..

 

Sorry if my question above is unclear, but thank you for your support!

 

 

{Format( "Fixed Dec", 5, 0 ), Min( -1 ), Max( 11 ), Inc( 1 ), Minor Ticks( 4 )}

1 ACCEPTED SOLUTION

Accepted Solutions
jthi
Super User

Re: How do I get the setting for Dec in "Fixed Dec" format in Axis Column Property??

Ah.. I think you running into the problem (or feature) where if you are using "defaults" it won't show you anything. In this case it will work because I set them by script, but if you clear the property and set it as "default" by hand it will return empty list

Names Default To Here(1); 

dt = open("$SAMPLE_DATA/Big Class.jmp");
Column(dt, "weight") << Set Property("Axis", {Format("Fixed Dec", 12, 0)});
Column(dt, "height") << Set Property("Axis", {Format("Fixed Dec", 12, 1)});

prop1 = Column(dt, "weight") << Get Property("Axis");
prop2 = Column(dt, "height") << Get Property("Axis");

show(prop1, prop2);

 

So one option is to add some sort of a check for that (if the property isn't set at all it should be Empty() not empty list) and if that matches use the defaults

If(Type(prop) == "List",
	If(N Items(prop) == 0,
		cur_prop = {Format("Fixed Dec", 12, 0)};
	);
);
-Jarmo

View solution in original post

3 REPLIES 3
jthi
Super User

Re: How do I get the setting for Dec in "Fixed Dec" format in Axis Column Property??

Are you looking for axis scale format or column format? This maybe gives you some idea

Names Default To Here(1); 

dt = open("$SAMPLE_DATA/Big Class.jmp");
col_format = Column(dt, "height") << Get Format;

gb = dt << Graph Builder(
	Size(528, 456),
	Show Control Panel(0),
	Variables(X(:weight), Y(:height), Overlay(:sex)),
	Elements(Points(X, Y, Legend(9)), Line Of Fit(X, Y, Legend(11)))
);

ab_format = Report(gb)[AxisBox(1)] << get format;

show(col_format, ab_format)
-Jarmo
WakuWakuGoku
Level II

Re: How do I get the setting for Dec in "Fixed Dec" format in Axis Column Property??

Thank you for your reply and sorry for my unclear question.

 

I think it's not exactly the same as the column format, but more like ab format.

 

I would like to have several graphs whose scales are defined in the column properties of "Axis" we can add like we can add "Spec Limits" in the column property. I understood that "Axis" properties is used for changing default axis settng for graphs. 

 

I hope my comment and what i would like to do is clear enough... I am so sorry..

Thank you very much for you help!

jthi
Super User

Re: How do I get the setting for Dec in "Fixed Dec" format in Axis Column Property??

Ah.. I think you running into the problem (or feature) where if you are using "defaults" it won't show you anything. In this case it will work because I set them by script, but if you clear the property and set it as "default" by hand it will return empty list

Names Default To Here(1); 

dt = open("$SAMPLE_DATA/Big Class.jmp");
Column(dt, "weight") << Set Property("Axis", {Format("Fixed Dec", 12, 0)});
Column(dt, "height") << Set Property("Axis", {Format("Fixed Dec", 12, 1)});

prop1 = Column(dt, "weight") << Get Property("Axis");
prop2 = Column(dt, "height") << Get Property("Axis");

show(prop1, prop2);

 

So one option is to add some sort of a check for that (if the property isn't set at all it should be Empty() not empty list) and if that matches use the defaults

If(Type(prop) == "List",
	If(N Items(prop) == 0,
		cur_prop = {Format("Fixed Dec", 12, 0)};
	);
);
-Jarmo