In a recent blog post, I introduced an add-in, the Bubble Shape Editor, that makes it easier to use custom shapes in place of the default circle in Bubble Plot. The add-in takes advantage of JMP's ability to draw shapes based on SVG path specifications. When custom shapes were introduced to Bubble Plot in JMP 10, a related new feature allowed the custom shapes to be oriented in the direction of motion for an animated Bubble Plot. In this post, I will describe a new update to the SVG Bubble Shape Editor to make it easier to create oriented Bubble Shapes. You can download the Bubble Shapes Editor v1.1 add-in for free from the JMP File Exchange. (Download requires a free SAS profile.)
Why use oriented shapes?
First, what do I mean by oriented shapes, and why would you want to use them? The default circle shape has symmetry in all directions -- you can rotate it about its center, and you always have a circle. With custom shapes, this is no longer true. You may have a picture of a car, a plane or a simple shape such as an arrow. These particular shapes have a predefined direction in which they are "pointing." When you toggle on the option for oriented shapes in Bubble Plot, the shape will rotate so that it is pointing along the direction of motion.
As shown in the updated Add In dialog to the right, the interface now includes controls to rotate the shape by a specified angle, as well as quick controls for 90-degree rotations and horizontal/vertical mirroring. The rotation controls are integral to the use of oriented shapes, because Bubble Plot has to know the axis of the shape to align with the direction of motion. By arbitrary convention, the alignment axis is defined to point from the bottom of the shape to the top, at X=0. The Reset button in the lower left-hand corner has also been renamed to Recenter. This button computes the bounds of the shape in X and Y, and then translates and scales the shape to roughly match the reference circle. With the addition of rotation, it is especially useful to be able to perform these actions without also reinitializing the rotation.
The shape that I am using here is the Dark Blue Right Arrow downloaded from Wikimedia Commons. Note that colors are not considered when opening an SVG path in the SVG Bubble Shape Editor. Colors in Bubble Plot are determined by row states or the Color role. In this case, the arrow is pointing directly to the right, so one application of the 90-degree counterclockwise rotation results in an arrow pointing up. The final shape is shown to the left.
An example: Napoleon's March
With the shape properly formatted, we can apply this shape to a Bubble Plot. As an example, I will use the well-known Napoleon's March, mapping the advance of Napoleon's army on Moscow and the subsequent retreat. I select the Bubble Plot report in the SVG Bubble Shape Editor and click Apply, which transfers the shape to the Bubble Plot. Finally, from the red-triangle menu, I select the Orient Shapes option, resulting in the animation below.
I pointed out in my previous post that there are perceptual concerns with custom shapes in Bubble Plot. The circle shape allows for estimation of XY position from a shape, as well as visual ranking of bubble sizes when comparing bubbles. With custom shapes, these tasks become more complicated for the user, and the addition of rotation introduces additional perceptual issues. Be aware that shapes that are not balanced about the origin may be perceived to drift in location as the shape is rotated, and the addition of rotation may complicate the task of comparing the areas of two shapes.
If you work with time-varying spatial data, I hope this post points you in the right direction. Are there other classes of data that you can think of that will benefit from oriented shapes?