cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
JMP is taking Discovery online, April 16 and 18. Register today and join us for interactive sessions featuring popular presentation topics, networking, and discussions with the experts.
Choose Language Hide Translation Bar
Mickyboy
Level V

Scatter plot x and y axis values

Hi All, 

 

i would like to replicate the following scatter plots in JMP, the problem i am having is when i go to axis setting and request a log scale with a base 2 the scale starts from 1, so the scales is 1,2,4,8,16, 32, 64 etc i would like it to start at 5, 10, 20,40, 80,160,320 etc does anyone have any advice??

 

Scatter.png

 

Any help would be appreciated.

 

Thanks

18 REPLIES 18
gzmorgan0
Super User (Alumni)

Re: Scatter plot x and y axis values

@Mickyboy,

 

The tick increment is 2. This is happening either because inc is 2 or your frame size needs to be bigger to show all ticks.

Mickyboy
Level V

Re: Scatter plot x and y axis values

Hi gzmorgan0,

 

no problems, i worked it out, thanks very much

Mickyboy
Level V

Re: Scatter plot x and y axis values

Hi @gzmorgan0,

 

Its Ok, I have worked it out, I think I'm learning!!

Dispatch(
			{},
			"Graph Builder",
			FrameBox,
			{Marker Size( 5 ), Add Graphics Script(
				2,
				Description( "Script" ),
				Pen Color( "black" );
				Pen Size( 2 );
				Line Style( "Dotted" );
				Y Function( x, x );
			), Add Graphics Script(
				4,
				Description( "Script" ),
				Pen Color( "red" );
				Pen Size( 2 );
				Line Style( "Dotted" );
				X Function( y - 1, y );
			), Add Graphics Script(
				5,
				Description( "Script" ),
				Pen Color( "red" );
				Pen Size( 2 );
				Line Style( "Dotted" );
				X Function( y + 1, y );
			), Grid Line Order( 1 ), Reference Line Order( 3 )}
		)
	)
);
gzmorgan0
Super User (Alumni)

Re: Scatter plot x and y axis values

Congratulations!
Mickyboy
Level V

Re: Scatter plot x and y axis values

@gzmorgan0,

 

thanks mate, I really do try to do a lot by myself, sometimes i jump the gun in asking for help, need a little more patience and belief!!!

 

Thanks again

Mickyboy
Level V

Re: Scatter plot x and y axis values

Hi @gzmorgan0 ,

 

I need your assistance again if possible, i need another two reference lines on my chart, you produced the syntax for the equality reference line where x=y, if i wanted a line two represent a 100% increase for the values of x when the values of y = the original references line, so x= 5, 10, 20, 40, 80, 160, 320, 640, 1280, 2560 where y= 10, 20, 40, 80,160, 320, 640, 1280, 2560, 5120. Is this possible?

Re: Scatter plot x and y axis values

The expression for the identity line:

 

Y Function( x, x );

 in the graphics script becomes this expression for the 100% increase:

 

Y Function( 2*x, x );

 

 

gzmorgan0
Super User (Alumni)

Re: Scatter plot x and y axis values

Hi Dan,

 

@Mickyboy figured out a solution, but he posted it a couple enties above.  The graph is rather unusual. The original task was to create a custom scale where the ticks/units were 5 * 2^x.  I reposted the small table with script attached.

 

Due to the unusual power scaling, of this graph, a solution to this the 100% increase/decrease is

Y Function( x - 1, x) and Y Function(x + 1, x)

 

or as Mickey figured out X Function( y - 1, y) and X Function( y + 1, y) 

 

Log and Power scaled axes can be challenging when it comes to reference functions. 

Mickyboy
Level V

Re: Scatter plot x and y axis values

Hi @Mark_Bailey.,

 

Thanks for your input, appreciate it, i eventually figured it out.

 

Regards

Mick