cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
  • Sign-in to the JMP Community will be unavailable intermittently Dec. 6-7 due to a system update. Thank you for your understanding!
  • We’re retiring the File Exchange at the end of this year. The JMP Marketplace is now your destination for add-ins and extensions.
  • JMP 19 is here! Learn more about the new features.

Discussions

Solve problems, and share tips and tricks with other JMP users.
Choose Language Hide Translation Bar

Having trouble changing the y axis scale

I am working on a graph of Voltage vs Current. I have my y axis (current scale) set to log and i want to change the scale to the format 10e-2 (for example). Everytime I try to do this, the graph scale to 1e-1. I need the scale to be in the notaion 10e not 1e. Can anyone hlep with this?

1 ACCEPTED SOLUTION

Accepted Solutions
ih
Super User (Alumni) ih
Super User (Alumni)

Re: Having trouble changing the y axis scale

Hi @hannahmcnamara,

 

You can have complete control over the format if you specify a custom format for the axis, like this:

ih_0-1635946696388.png

 

ih_1-1635946745991.png

 

Script to recreate graph:

View more...
Names default to here(1);

//Make some example data and specify a couple values to check results
dt = New Table( "Example Data",
	Add Rows( 1000 ),
	New Column( "Data",
		Numeric,
		"Continuous",
		Format( "Best", 12 ),
		Formula( Exp( Random Uniform( 1, 100 ) ) ),
		Set Selected
	)
);
dt:Data << Delete Formula;
dt:Data[1] = 1;
dt:Data[2] = 10;

//In graph builder choose the log scale and then specify a custom format
gb = dt << Graph Builder(
	Size( 822, 339 ),
	Show Control Panel( 0 ),
	Variables( X( :Data ) ),
	Elements( Points( X, Legend( 25 ) ) ),
	SendToReport(
		Dispatch(
			{},
			"Data",
			ScaleBox,
			{Scale( "Log" ), Format(
				"Custom",
				Formula( "10^" || Char( Log10( value ) ) ),
				12
			), Min( 1 ), Max( 1e+45 ), Inc( 1 ), Minor Ticks( 0 )}
		)
	)
);

View solution in original post

3 REPLIES 3
ih
Super User (Alumni) ih
Super User (Alumni)

Re: Having trouble changing the y axis scale

Hi @hannahmcnamara,

 

You can have complete control over the format if you specify a custom format for the axis, like this:

ih_0-1635946696388.png

 

ih_1-1635946745991.png

 

Script to recreate graph:

View more...
Names default to here(1);

//Make some example data and specify a couple values to check results
dt = New Table( "Example Data",
	Add Rows( 1000 ),
	New Column( "Data",
		Numeric,
		"Continuous",
		Format( "Best", 12 ),
		Formula( Exp( Random Uniform( 1, 100 ) ) ),
		Set Selected
	)
);
dt:Data << Delete Formula;
dt:Data[1] = 1;
dt:Data[2] = 10;

//In graph builder choose the log scale and then specify a custom format
gb = dt << Graph Builder(
	Size( 822, 339 ),
	Show Control Panel( 0 ),
	Variables( X( :Data ) ),
	Elements( Points( X, Legend( 25 ) ) ),
	SendToReport(
		Dispatch(
			{},
			"Data",
			ScaleBox,
			{Scale( "Log" ), Format(
				"Custom",
				Formula( "10^" || Char( Log10( value ) ) ),
				12
			), Min( 1 ), Max( 1e+45 ), Inc( 1 ), Minor Ticks( 0 )}
		)
	)
);

Re: Having trouble changing the y axis scale

Thank you! This worked for me. I was wondering how you get the double line symbol before "Char"?

ih
Super User (Alumni) ih
Super User (Alumni)

Re: Having trouble changing the y axis scale

Good question because it took me a while to figure out how to do that interactively too.  If you type the upper bar character '|' in the formula editor you will first get the or symbol, then if you type it again you will get the concatenate operator '||'.  Also, if you double click on the formula it will open a text editor where you can type the two upper bars.

Recommended Articles