- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
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:
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:
Here is my problem: When I export/save the graph as an SVG, the text rotation is lost as is shown below:
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.
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
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.
@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" );
);
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
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.
@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" );
);
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
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.