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

Support Inverse scale for Axes

In Graph Builder the axes can be scaled as linear, log, power, probability, etc.  (which is great, BTW!)  Can you add the option to scale as "inverse,"  that is, 1/x or 1/Y?
I tried using power and setting the parameter to -1 but this doesn't appear to work.  No scripting please.

4 Comments

You could create a transform column within Graph Builder for the reciprocal. Just right click on the column, select Transform->Reciprocal and then use the new column on the axis.

zmike
Level II

I appreciate the suggestion; I guess my question is not clear, or, perhaps I didn't understand your answer.  I can easily calculate the inverse and plot "Y" vs. "inverse X".  However, what I am trying to do is plot "Y" vs."X" but have the axis values show at the locations where their reciprocal would be.   

 

An analogous situation is easy with logs.   If I plot Y vs X where the {(X,Y)}  pairs {(10,3) (100,4) (1000,5)} there is a strong curvature; however, this is transformed to a straight line when the log transformation is used on the axis.  However, the x-axis values still show up as 10, 100, 1000 and the actual values are quite easily comprehended.  (They're the same)   There are axis transformations for log, power, probability, etc. but noting for inverse.    I'm trying to keep my audience from having to deal with an x-axis where the displayed values are inverse temperature, for example.    298 K is much easier than 0.00336 1/K .. .

 

zmike
Level II

Here is an example in Excel.

I copied this from Peltiertech.com:

 

reciprocal temperature.PNG

The x-axis is transformed so the data are plotted as 1/Temp but the values can be read off the axis as Temp.

XanGregg
Staff

Good idea. I thought a Power scale with -1 would do it, but it doesn't. In the mean time you can use a custom scale:

 

Open( "$sample_data/big class.jmp" );
gb = Graph Builder(
	Variables( X( :height ), Y( :weight ) ),
	Elements( Points( X, Y, Legend( 2 ) ), Smoother( X, Y, Legend( 1 ) ) )
);
gbr = Report( gb );
gbr[axisbox( 1 )] << scale(
	custom scale,
	Scale To Internal( Function( {x}, 1/x ) ),
	Scale To External( Function( {x}, 1/x ) )
) << Min( 30 ) << Max( 100 ) << Inc(5);