cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Discussions

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

Using Hex values for the Y-Axis Labels

In JMP 18,

I have a set of data grouped by category.  The X-Axis holds the category (character) and the Y-Axis is the value in hexadecimal.

I have three columns of the data:

1) original value as hex

      - character nominal

      - :mv  

      - eg. 0x066F

2) :mv converted to a decimal number

       - continuous number format

       - :mv_number

       - eg 1647

3) :mv_number converted back to hex, but without the 0x

       - character - nominal

       - :mv_hex_label

       - eg 066F

 

Is there a way to graph this data so that the labels for the tick marks on the Y-Axis are in Hex, and in numerical order as opposed to alphabetical order?

6 REPLIES 6
jthi
Super User

Re: Using Hex values for the Y-Axis Labels

Take a look at Value Labels column property

jthi_0-1746199162240.png

-Jarmo
txnelson
Super User

Re: Using Hex values for the Y-Axis Labels

You could also look at displaying the Hex values and then using Value Ordering column property to set the order in the graph.

Jim
hogi
Level XII

Re: Using Hex values for the Y-Axis Labels

as a third option, use the hex labels, and in addition drag the numeric column into this drop zone - to use it for ordering.
The same can be done via right click / order by  / Others ...

just takes a few seconds - independent of the number of entries.

hogi_0-1746213382408.png

steidley
Level I

Re: Using Hex values for the Y-Axis Labels

Reading all three suggestions got me in the ballpark for an answer.  Thank you!

 

What I ultimately have done is to set up the Y axis with the original data column 'mv'.  I then drug the decimal version of the data next to the Y axis and dropped it in the "Order By" section:

steidley_0-1746214766537.png

This did in fact order the values correctly.

 

Now, my only lament is that I have lost the sense of scale.  Values like 03DB are right next to 0668.  This has lost a lot of the intuition about data points that exhibit bi-modeality.

 

Here, you can see that data passes in one region and fails in other regions:

steidley_1-1746215052235.png

 

Since exact hex values are not critical, I think what I will do is explore creating reference lines to let me know where 0x100, 0x800, 0xF00 are...

hogi
Level XII

Re: Using Hex values for the Y-Axis Labels

Happy to see that you like the "order by" functionality.

 

 

hogi
Level XII

Re: Using Hex values for the Y-Axis Labels

To add some structure, you can use nested levels on the Y axis:

hogi_0-1746286214117.png

 

dt = New Table( "Hex",
	Add Rows( 20 ),
	New Column( "Hex",
		Character,
		Set Values(
			{"0x0EB6", "0x00E0", "0x0052", "0x0059", "0x0052", "0x0037", "0x002E",
			"0x0025", "0x0C74", "0x0C6B", "0x0C5E", "0x0C55", "0x0C2E", "0x0C19",
			"0x0BE7", "0x0B9A", "0x0B8E", "0x0B53", "0x0B30", "0x00B5"}
		)
	),
	New Column( "Hex Group", Character, "Nominal", Formula( Substr( :Hex, 1, 4 ) ) ),
	New Column( "decimal",
		Formula( Hex To Number( Substr( :Hex, 3 ) ) )
	)
);

dt << Graph Builder(
	Variables(
		X( :decimal ),
		Y( :Hex Group, Order By( :decimal, Ascending) ),
		Y( :Hex, Position( 1 ), Order By( :decimal, Ascending ) ),
		Color( :Hex Group )
	),
	Elements( Bar( X, Y( 1 ), Y( 2 ) ) )
);

Recommended Articles