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

Box-plot with points aligned in box plus violin plot

Good afternoon all,

I wanted to create a graph in which the points fell exactly within each box-plot and the related violin plot.
Using the graph builder, I realized that the points don't line up inside the box.
Anyone have any idea how to fix this?
I attach photos.

 

Schermata 2022-03-24 alle 17.12.47.png

13 REPLIES 13
GiuseppeC
Level II

Re: Box-plot with points aligned in box plus violin plot

THANK YOU VERY MUCH,

 

very useful and decisive advice.

 

Best wishes

 

Giuseppe

 

P.S. 18F-FDG with 18 as exponent among the unicode I can't find the solution. Do you know how to do it?

txnelson
Super User

Re: Box-plot with points aligned in box plus violin plot

I found the codes on Wikipedia

print("18F-FDG\!U00B9\!U2078");
"18F-FDG¹⁸"
Jim
GiuseppeC
Level II

Re: Box-plot with points aligned in box plus violin plot

THANK YOU VERY VERY VERY MUCH

 

Giuseppe

jthi
Super User

Re: Box-plot with points aligned in box plus violin plot

If you are using Windows you can also find these from Character Map:

jthi_0-1648480922460.png

 

There is also an option to create addin / custom function to do this. This wouldn't be perfect, but it could be helpful? Here is quick example of possible function (I would make it more robust if I were to create one):

Names Default To Here(1);

replace_str = Function({str}, {Default Local},
	aa_unicode = Associative Array();
	aa_unicode["\sigma"] = "\!U03C3";
	aa_unicode["\mu"] = "\!U03BC";
	aa_unicode["\subscript1"] = "\!U2081";
	aa_unicode["\subscript2"] = "\!U00B2";
	aa_unicode["\subscript3"] = "\!U00B3";
	aa_unicode["\subscript4"] = "\!U2074";
	return(Substitute(str, aa_unicode << get keys, aa_unicode << get values));
);

dt = New Table("Untitled 3",
	Add Rows(0),
	New Column("kg/m\subscript2"),
	New Column("\sigma*\mu"),
	New Column("\subscript1\subscript3")
);

wait(2);

For Each({col_name}, dt << Get Column Names(String),	
	Column(dt, col_name) << Set Name(replace_str(col_name));
);
-Jarmo