cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Try the Materials Informatics Toolkit, which is designed to easily handle SMILES data. This and other helpful add-ins are available in the JMP® Marketplace
Choose Language Hide Translation Bar
HydroBug
Level II

When I save figure as SVG, text rotation is lost.

Hello all -

I'm running JMP Pro 16.1.0 and I have an issue that is driving me insane. I have a fairly complex figure with tons of data.  I need to add some text labels to it so I can describe different periods of time. The text needs to be rotated so that it will fit in the space and read well. I read on a post that Text Annotations cannot be rotated counterclockwise, but plain old text text can.  So I added my text labels as shown in the script below:

Capture3.PNG

When I run the script, the figure is PERFECT.  Took a long time to get to this point.  I am super happy with it in JMP, this is what it looks like:

Capture2.PNG

Here is my problem: When I export/save the graph as an SVG, the text rotation is lost as is shown below:

Capture1.PNG

If I export as an EMF file, the text rotation is kept, but I want to save as an SVG. Any ideas why this is happening or if it has to do with the scripting?  It is really driving me insane, I have spent HOURS on these sets of graphs and I just want those labels rotate and a nice SVG file.

Thank you all for ANY input you can provide.

1 ACCEPTED SOLUTION

Accepted Solutions
Craige_Hales
Super User

Re: When I save figure as SVG, text rotation is lost.

Looks like a bug. You can work around it like this:

Use the TextFont command to specify the font name and rotation.Use the TextFont command to specify the font name and rotation.

@Audrey_Shull - the bottom graph is the saved SVG, opened in an external viewer, Firefox in this case.

 

gb = Graph Builder(
	Show Control Panel( 0 ),
	Variables( X( :height ), Y( :weight ), Overlay( :sex ) ),
	Elements(
		Points( X, Y, Legend( 1 ) ),
		Smoother( X, Y, Legend( 2 ) )
	),
	SendToReport(
		Dispatch( {}, "height", ScaleBox,
			{Label Row( Label Orientation( "Perpendicular" ) )}
		),
		Dispatch( {}, "weight", ScaleBox,
			{Label Row( Label Orientation( "Angled" ) )}
		)
	)
);

Report( gb )[framebox( 1 )] <<
addgraphicsscript( Text( counterclockwise, {60, 60}, "Hello" ) );

Report( gb )[framebox( 1 )] <<
addgraphicsscript(
	{fname, fsize, fstyle, fangle} = Text Font();
	Text Font( fname, fsize, fstyle, -90 );
	Text( {65, 60}, "Hello" );
);
Craige

View solution in original post

4 REPLIES 4
Craige_Hales
Super User

Re: When I save figure as SVG, text rotation is lost.

Looks like a bug. You can work around it like this:

Use the TextFont command to specify the font name and rotation.Use the TextFont command to specify the font name and rotation.

@Audrey_Shull - the bottom graph is the saved SVG, opened in an external viewer, Firefox in this case.

 

gb = Graph Builder(
	Show Control Panel( 0 ),
	Variables( X( :height ), Y( :weight ), Overlay( :sex ) ),
	Elements(
		Points( X, Y, Legend( 1 ) ),
		Smoother( X, Y, Legend( 2 ) )
	),
	SendToReport(
		Dispatch( {}, "height", ScaleBox,
			{Label Row( Label Orientation( "Perpendicular" ) )}
		),
		Dispatch( {}, "weight", ScaleBox,
			{Label Row( Label Orientation( "Angled" ) )}
		)
	)
);

Report( gb )[framebox( 1 )] <<
addgraphicsscript( Text( counterclockwise, {60, 60}, "Hello" ) );

Report( gb )[framebox( 1 )] <<
addgraphicsscript(
	{fname, fsize, fstyle, fangle} = Text Font();
	Text Font( fname, fsize, fstyle, -90 );
	Text( {65, 60}, "Hello" );
);
Craige

Re: When I save figure as SVG, text rotation is lost.

Thanks for the example @Craige_Hales - we opened a ticket with the dev team, but it's nice to have this workaround documented too.

HydroBug
Level II

Re: When I save figure as SVG, text rotation is lost.

Thank you!  I will give it a try later today and report back.

-Erika.

HydroBug
Level II

Re: When I save figure as SVG, text rotation is lost.

Hi Craige -

It works!!!  The text exports perfectly.

Thank you, thank you, thank you!

-Erika.