# How to make plot marker sizes for scientific plots seem consistent?

It is common to use different shapes like circle, square, triangle, diamond, star, pentagon and hexagon for representing different datasets on scientific plots. These shapes can be further complicated to allow distinguishing even more datasets on one plot. Here is a subset of such shapes built-in in industry-standard scientific plotting software Origin:

The shapes on the plots produced by Origin are easy distinguishable and look almost equal in sizes. My question is: how is this effect achieved?

My first thought was that the shapes look equal in sizes if their bounding boxes have identical sizes. But I quickly realized that it is not true. Moreover, the bounding boxes cannot be used as a basis for creation of such shapes because for some shapes the center of the bounding box does not coincide with the center of the shape:

My second thought was that the shapes look equal in sizes if they have equal areas. The areas of the shapes on the above figure are:

``````{4, π, 2, 1.29904, 1.12257}
``````

Let us scale the shapes so that all the areas become equal to the area of the disk:

It is hard to believe but all these figures have equal areas! Apparently they do not look equal in size.

After first attempts to find the principle by myself I decided to check how the problem is solved in Origin. So I created a scatter plot with basic shapes in Origin, exported it to PDF and then imported in Mathematica 10. Then I calculated areas of the shapes and got the following table (all the areas are given relative to the area of the disk):

``````shape         area
-----------------------
square        0.957802
disk          1
diamond       1.03429
triangle      0.782499
star          0.489003
hexagon       1.01036
pentagon      1.03624
``````

First of all we see that the diamond (which is just a square rotated on 45°) has larger area than the square. It is surprising and even feels as incorrect implementation. But visually the difference is just noticeable. As to the other shapes, they look really similar in sizes on the plot but occupy vastly different areas and have different linear sizes. I cannot reveal any simple logical principle behind the scales of the shapes chosen by the developers of Origin. It looks like they have scaled them by eye.

Are there any research works on the perception of the sizes of shapes?

What are the best practices to choose the relative sizes of plot markers for scientific plots?

There are 2 main parts to this: Alignment and Size – other things like whitespace and shape are harder to objectively analyse but still important. As with most art and designs, balance is not exact, but a close approximation.

# Alignment

Instead of aligning the bases or the centres of the “bounding box”, objects are aligned by their centroid, show below.

This is like an objects centre of mass so if something was super unbalanced in terms of weight, this is where a 3D object would revolve around with minimal effort. Just from a quick estimate, the centroid of the below arrow would be somewhere near what I highlighted. (There are high level math courses for finding out the centroids of irregular shapes as they are often applicable in engineering.)

# Size

First off, Origin is not without fault. As you can see below, the left object is larger than the right – but the main purpose of the different shapes is to differentiate the markers, so as long as a user can tell the difference from a high level view, this works.

The way Adobe Illustrator works, is create objects that extend radially from the centre to a peak value. This doesn’t work perfectly, but it’s a good basis to start from.

I couldn’t find any mathematical study for geometric balancing, but other than just “eyeing it”, what I did here is to create balance:

1. Outline the imaginary square bounding box. This is the same for all shapes.

2. Expand the object to the maximum size without overflow. I made the square 85% of the max because it needed some white space. Make sure it’s still centroid aligned.

[Please ignore the fact that I forgot to update the values for the pentagon]

# My Final Product:

If anyone has research or anything I’d be interested in seeing it, but I wasn’t able to find anything so this is just my two cents with some math thrown in.

TLDR: Pretty much what you did initially but I made sure it was aligned properly and added padding to the square.

Edit: There definitely is a relation between size, shape, angles, and areas – and maybe this is something I could do a report on at a later date – but ignoring everything I said earlier, here’s a comparison of balance between a star shape with different inner-radius, while the outer radius is the same. There is no mathematical model or reasoning I applied to this other than just estimating, which is why I didn’t really expand.

That said, I think colours are a much more intuitive way of sorting out different objects, especially when they are very small and numerous, as long as they remain under a certain limit.