KNOWLEDGEBASE - ARTICLE #2265

When the fill color for confidence ellipses/convex hulls are defined using a 'single color', the corresponding legend only includes one item (even if there are multiple different ellipses/hulls)

The Problem

Under the right conditions, a single-value legend is shown for Confidence Ellipses/Convex Hulls even when there are multiple ellipses/hulls on the graph. This happens in Prism version 10.3.0 and later. In the images below, note that there are two ellipses/hulls (one with a blue border and one with a red border), but there is a single legend item (with a black border).

Why does this happen?

This issue occurs when confidence ellipses or convex hulls are generated/defined by a categorical variable, but the fill color for these ellipses is set to the option "Single Color". Under these conditions, a separate ellipse/hull will be generated for the data belonging to each level of the defining categorical variable, but all resulting ellipses/hulls will have the same fill color (as expected). Due to a bug in Prism, only the fill color for ellipses/hulls are considered when creating the legend items. This means that - even if the ellipses/hulls have different border colors, Prism will not generate separate legend items for each ellipse/hull.

What can I do?

If you want to display separate legend items for each confidence ellipse/convex hull, choose the fill option "Variable (by group)". This will allow you to assign different fill colors for each ellipse/hull, and will create a legend item for each one. If you still want the fill colors for all ellipses/hulls to be the same, simply choose the fill option "Variable (by group)", but then assign the same fill color to each group. As a result, the legend will contain individual items for each ellipse/hull with the same fill color (but optionally different border colors if so specified).

This issue will be fixed in a future version of Prism.



Keywords: confidence ellipses convex hulls legends

Explore the Knowledgebase

Analyze, graph and present your scientific work easily with GraphPad Prism. No coding required.