Our World Statistics Day conversations have been a great reminder of how much statistics can inform our lives. Do you have an example of how statistics has made a difference in your life? Share your story with the Community!
Choose Language Hide Translation Bar
Staff
Using custom shapes in Bubble Plot in JMP

Bubble Plots are very popular for their ability to display many dimensions at once (X, Y, Size, Color, ID, Time). As the name suggests, a traditional Bubble Plot uses a circular shape to represent each row or aggregation of rows based on the ID(s). The radius of the circle is scaled by the square root of the Size column, ensuring that the area contained by the circle scales linearly with the value of Size.

Starting with JMP 10, an option was introduced to use alternate shapes in place of a circle. Built-in shapes include Triangle, Square, Diamond and Arrow. There is also an option to set a custom shape from JSL, using the same syntax as the Path() graphics function. A poster by Rosemary Lucas and Kyoko Keener at JMP Discovery Summit 2013 used a custom bird shape to visualize the FAA Wildlife Strike Database. Custom shapes retain the linear scaling property, allowing for visual ranking of bubble sizes. Paths in JMP consist of a sequence of XY points with control information specifying whether to move, draw a line or draw a curve. Using a vector drawing program such as Inkscape, paths can be interactively created and edited, as shown in the figure to the right.

Unfortunately, the process of applying these paths to a Bubble Plot in JMP requires manual steps and JSL scripting to transfer the path from a file or vector drawing program into JMP. I recently created a JMP add-in that makes this much easier, providing a graphical interface for opening a file in SVG format, extracting the paths, using transformations to recenter and scale the shape, and applying the result to an existing Bubble Plot report. You can get my Bubble Shapes Editor add-in for free from the JMP File Exchange. (Download requires a free SAS profile.)

After installing the add-in, open the Bubble Shape Editor from the Add-Ins menu to create the dialog shown to the left. The add-in includes several public-domain shapes (Dollar Sign, Euro, Plane, Car) downloaded from Wikimedia Commons. You can also download or create an SVG file and open the file directly from the interface. The add-in will locate all of the paths in the file and give you the choice of which one to use. The shape is automatically translated and scaled, and shown graphically with a comparison circle to demonstrate how it will look compared to the default Bubble Plot shape. You can perform additional transformations to position the shape relative to the reference circle. When you are satisfied with the look of the shape, you can select a Bubble Plot from the list on the right, and click Apply to update the plot with the new shape. In the figure below, the Dollar Sign was used to emphasize the use of Expenditure in the Size role of the plot.

Thousands of shapes are readily available to represent nature, transportation, manufacturing, society and many other topics. In addition, you may find that your own organization has SVG shapes available with company, product or industry-specific logos. When choosing a shape and selecting a transformation, keep in mind that the viewer will attempt to compare shape sizes and estimate XY positions from the shape. While circles have good characteristics in this respect, linear or asymmetric shapes will have an effect on the perception of the viewer. In a future post, I will show how you can use another feature of the JMP Bubble Plot to allow your shape to rotate to align with the bubble trajectory. How do you think you will use custom shapes? Let me know in comments.

Article Labels

There are no labels assigned to this post.

Article Tags
Visitor

Sebastian wrote:

Hello,

the Plug-In is throwing an error, somehwat like:

"Paramter is invalid, wrong argument (xshape), Path To Char (xshape)".

anyone else got this?

Staff

Dan Schikore wrote:

This response generally means that JMP was not able to translate the SVG path data. Several improvements were made in JMP 11.1 to better handle variations in the formatting. In JMP 11 the shapes are limited to linear & cubic Bezier segments - elliptical arcs will be supported in future versions. In some cases the formatting issues are specific to a particular editor - opening the file in an editor such as Inkscape and doing a "Save-As" may result in a file that works fine.

Visitor

Sebastian wrote:

but I also got this problem with the standard-shapes (dollar sign, euro, plane, etc.), not only with my custom shapes ... is it the same problem? thought it should work with them ;)

JMPÂ® Pro 10.0.1 Version: 2

Microsoft Windows 7 Enterprise 64-bit Service Pack 1

Staff

Dan Schikore wrote:

Are you using the built-in shapes (from the "Choose Shape" button), or did you download the SVG files? The built-in shapes have been formatted so that they should work with JMP 10.0.x or JMP 11.x. The original files from Wikimedia resulted in some of the improvements for parsing in JMP 11.1, so they may not work with older versions of JMP. Another thing to watch for when downloading files is to make sure you are getting the SVG file, rather than saving the HTML file (which also has a .svg extension - not sure why they did that!).

Visitor

Sebastian wrote:

The built-in shapes from the dropwdown-menue/"Choose Shape" button.