Using the Legend
The legend panel lets you filter, customize, and explore protein annotations. Most annotations are categorical, but scalar numeric annotations such as length are handled a little differently.
Rows
Each category is one row: its colour, its name and its protein count. A long name ends in an ellipsis and shows in full on hover. Click the colour to change the category's colour and shape (see Shapes); Other and numeric rows have no picker, so their colour does nothing. Hovering a row shows its controls:
- a grip in the margin left of the colour, which moves the row (see Reordering),
- an eye at the right, which hides or shows the category.
A hidden row keeps its crossed-out eye in that same place, so nothing moves when you hover it.
On a touch screen the controls are always shown, the grip sits inside the row before the colour, and every control is a 40 px target.
Hold Shift over a point in the plot to focus its category: its legend row is highlighted too, and so is its dot in the score strips when there are any. A point in Other highlights the Other row. Release Shift and the highlight goes.
It works the other way round too: hold Shift over a legend row to focus that category in the plot, for any annotation. The Other row focuses every category under it.
Show And Hide Values
Click any legend row to toggle its visibility:
- Click once, or press its eye, to hide that value. A hidden row stays in the list, dimmed, with a crossed-out eye.
- Click again, or press the eye again, to show it.
- Double-click a row to show that value and hide the rest.
- Double-click the only shown value again to show all values.
- If only one value remains visible, clicking it restores the full set.
While categories are hidden, the plot's status corner shows N categories hidden; its ✕ shows them all again. On a touch screen, tap a row to hide or show it and double-tap it to show only that value.
From the keyboard: the arrow keys, Home and End move between rows, Enter hides or shows the focused row, and i shows only it. A row's colour is a button of its own: Tab to it and press Enter to open its picker.
Reordering And Draw Order
Drag a row by its grip up or down to change the draw order in the scatterplot. Items near the top are drawn on top of items below them.
Dragging switches the annotation's order to Your order. On a touch screen, hold the grip for a moment, then drag. From the keyboard, focus a row's grip, press Space to pick the row up, move it with the arrow keys and press Space again to drop it (Escape cancels).
The "Other" Group
Categorical annotations group less frequent values into Other once the visible list exceeds the current legend cap (Max legend items in the settings). The row reads Other · N categories.
- Press View on the
Otherrow to open a popover listing the grouped values, largest first, each with its count. - Type in its search box to find one, then press Add to legend to give it its own row (the legend cap rises by one). Add all moves every value out of
Other. - Drag a row onto
Otherto group it there again.
Other is always the last row, in every sort, Your order included, however many values you move into it or take out of it.


Numeric annotations do not use Other. They are binned directly from the raw numeric values.
Transferred Annotations (EAT)
When the selected annotation carries values borrowed from nearby annotated proteins, one line under the legend's title says so, such as Includes 659 predicted, with an EAT › link. Once you narrow the reliability range it adds what happens to the predictions outside it, · outside 50–100 % hidden (or faded), and with predictions off it reads 659 predictions off, shown as N/A. The line holds no controls: EAT › opens the EAT panel, which has them all. Borrowed values join their label's row and count while predictions are shown.
See Transferred Annotations (EAT) for the EAT panel, where the borrowed values come from and how to read them in the plot.
Separation Score Strips
When the dataset was prepared with statistics and the selected annotation was scored in the current projection, two strips appear near the top of the legend panel, above the category list: one for Silhouette, one for Davies–Bouldin. Each plots one dot per category, in that category's legend color, so you can see which values sit apart from the rest and which overlap.
- Hovering a dot highlights the matching legend row and focuses its category in the plot, as holding Shift over one of its points does (a tap only highlights the row). Hovering a row highlights its dot; hold Shift as well and the plot focuses that category too (the
Otherrow focuses every category under it). Holding Shift over a point in the plot highlights its category's dot and row as well. - Clicking a dot toggles that category, exactly like clicking its legend row.
- The strips are where to read the ranking: the legend's own order stays the plot's draw order.
- While a filter or isolation narrows the view, the strips are replaced by the note
Separation scores are hidden while the view is filtered.
See Separation Scores for what the numbers mean and how they are computed.
Sorting
The sort button in the legend's header shows the active order in its tooltip, such as Sort: By count, largest first. Press it to open the Sort legend menu:
- By count, largest first (categorical annotations)
- By name (categorical) or By value (numeric)
- Your order, the order you dragged the rows into
- Reverse order, a checkbox that flips the active order:
- Numeric
By value: low-to-high vs high-to-low Your order: reverses your orderBy countandBy name: the reverse of each
- Numeric
The order is also the plot's draw order. To see which categories separate best, read the score strips. Settings or bundles saved with the former separation sort open sorted by count.
Settings
The sliders button in the legend's header opens Legend settings for the selected annotation. Changes apply as you make them: there is no Save button. A number applies a moment after you stop typing, or at once on Enter or when you leave the field.


Reset to defaults, at the bottom, restores the defaults for the selected annotation: its colours, order, hidden categories, palette and item count, and the dataset's point size. It is unavailable while nothing is changed.
Shared Settings
| Setting | What it does |
|---|---|
| Palette | Picks the active palette for the selected annotation from its swatches. |
| Max legend items | Categorical annotations: maximum number of visible values before grouping into Other. Numeric annotations (labelled Bins): target maximum number of bins. |
| Shape size / Point size | Adjusts marker size in the scatterplot (range 1 to 64, up to 128 on a dataset of fewer than 10,000 proteins; a larger size from a bundle or an earlier session is capped). The default and the largest size follow the dataset's protein count, see Default dot size. The size you pick holds for every annotation of the dataset. Numeric annotations use the label Point size because numeric legends always render circles. |
| Show duplicate counts and spread overlaps | Shows duplicate count badges and spreads overlapping points when you expand them. |
Default dot size
Until you pick a size, the dot size follows how many proteins the dataset has. A small dataset opens with dots large enough to read, and a large one with dots small enough that one category does not cover the others. Small datasets also accept larger sizes: the GPU draws every dot's pixels at each redraw, so a size above 64 is offered only while the dataset draws no more than 10,000 proteins at 64 would.
| Proteins in the dataset | 10 | 100 | 1,000 | 5,000 | 10,000 | 40,000 | 100,000 | 570,000 |
|---|---|---|---|---|---|---|---|---|
| Default shape size | 40 | 32 | 18 | 12 | 10 | 4 | 2 | 1 |
| Largest shape size | 128 | 128 | 128 | 128 | 64 | 64 | 64 | 64 |
Between 5,000 and 10,000 proteins the largest size falls from 128 to 64.
The count is the whole dataset, so hiding categories, filtering or isolating does not change it. Legend settings show the dataset's default under the size field. A size you type is stored for the dataset and exported with Include legend settings. A size a bundle sets for an annotation, other than 10 or 30, also overrides the default. To return to the default, clear the size field. This drops the size you picked and every size a bundle set per annotation, but keeps the annotation's other settings. Reset to defaults does the same for the size, and also resets the selected annotation's colours, order and hidden values.
Numeric Bin Distribution
When the selected annotation is numeric and a numeric gradient palette is active, an extra Bin distribution row appears, with its three choices side by side; click one to apply it:
LinearQuantileLogarithmic
Quantile is the default distribution, automatically falling back to Linear when the number of distinct values is small enough that quantile edges would collapse. Logarithmic is only available when all non-null values are strictly positive; otherwise it is greyed out, its tooltip says why, and ProtSpace falls back to Quantile (and from there to Linear, as above).
Reverse Gradient Direction
Numeric annotations also have a Reverse gradient switch in Legend settings.
- Off: lower numeric values use the low end of the selected gradient and higher values use the high end.
- On: the gradient is flipped so higher numeric values receive the colors that would normally be used for lower values, and vice versa.
This setting is saved with the rest of the numeric legend settings and is restored on reload or bundle import.
Numeric Annotations
Scalar numeric annotations are stored as raw numbers and binned in the browser from the current numeric settings.
Numeric Labels
Numeric legend labels are display summaries for humans:
- They use
min - maxformatting instead of comparison syntax like<. - Integer-only data stays integer-only in the legend.
- Decimal labels only appear when the source data actually needs decimal precision.
- Single-value bins are shown as a single number.
The exact runtime bin edges are still used for membership. The displayed label is a summary of the values observed in that bin.
Why Fewer Bins Can Appear Than The Max
For numeric annotations, Max legend items (Bins) is a target cap, not a hard guarantee. You can request 10 bins and still see fewer when the data does not support all of them.
Common reasons:
- A linear or logarithmic interval ends up empty, so it is dropped from the realized legend.
- Quantile cut points collapse because many proteins share the same value.
- A constant numeric column produces exactly one bin.
- An all-null numeric column produces zero bins.
- Very narrow ranges can collapse after precision/topology normalization.
This is why you might see 10 requested bins become 9, and 9 become 8, without anything being wrong.
Predicted Annotations
Some annotations are computational predictions rather than experimentally curated records. When one is selected, the legend header shows a PRED badge next to the annotation title; hover it for the note Predicted: computational, not experimentally curated. The same badge appears next to the annotation in the view bar's Color by menu and in the Filter panel's annotation picker.
The badge marks columns produced by a machine-learning model, a de-novo sequence-topology predictor, or predicted 3D structure. Reference signature matches such as Pfam, CATH-Gene3D and SUPERFAMILY, and curated or factual UniProt and Taxonomy fields, are not badged. Any unknown column whose name starts with predicted_ is treated as a prediction.
Which built-in columns carry the badge is listed per annotation in the Annotations reference, which is generated from the same table the app reads.
The PRED badge is a property of the whole column and is decided from the annotation's name, not from its values, so it is not the same thing as the EAT badge, which marks an otherwise curated column in which some individual proteins carry a transferred value.
Colors, Gradients, And Shapes
Categorical Palettes
Categorical annotations use discrete palettes. ProtSpace keeps the established categorical options for contrast and colorblind safety:
- Kelly's Colors
- Okabe-Ito
- Tol Bright
- Set2
- Dark2
- Tableau 10
Colors stay attached to categories when you reorder or sort them, under every palette. Filtering or isolating never recolors a category: a category the filter hides keeps its color for when it comes back, and removing the filter restores every color. A color is freed for another category only when you move a category into Other (or lower Max legend items) with no filter applied.
Numeric Gradients
Gradients are only shown for numeric annotations. ProtSpace currently ships five curated sequential gradients:
Batlow: scientific-publication oriented sequential ramp from Fabio Crameri's Scientific Colour Maps (default)Cividis: colorblind-friendly sequential gradientViridis: balanced perceptually uniform sequential gradientInferno: high-contrast dark-to-bright rampPlasma: vivid exploratory sequential ramp
These were chosen because they are either perceptually uniform, publication-friendly, accessibility-aware, or visually distinctive for ordered data. Rainbow-style maps are intentionally excluded because they are a poor default for numeric interpretation.
Numeric bin colors are derived from the gradient and the selected distribution. They are not manually edited per bin.
If an imported bundle or saved browser state references an unsupported numeric gradient ID, ProtSpace falls back to batlow.
Special Categories
| Category | Color | Shape |
|---|---|---|
| Other | #888888 | Circle |
| N/A | #DDDDDD | Circle |
Shapes
Every category renders as a circle by default. To give a category another colour or shape (square, diamond, plus, triangle-up, triangle-down), click its colour in the legend row (its tooltip reads Change colour and shape): the popover has a Shape section underneath the colour picker. Its shapes are drawn filled, as the plot draws curated proteins; a hollow marker in the plot means an EAT prediction. Click the colour again, press Escape or click elsewhere to close it.
Numeric and multi-label annotations always render as circles; per-category shape assignment is not available for those.
Saved Settings
Legend settings are saved per dataset and per annotation in the browser.
- Saved examples: visibility, palette, ordering, numeric binning settings, and duplicate-count preferences
- Numeric binning settings such as palette, gradient direction, strategy, and target bin count are restored on reload/import
- Numeric hidden values and your order are only restored when the current numeric topology still matches the saved one
- The shape size is the exception: it is saved once per dataset, applies to every annotation, and travels in exported bundles with Include legend settings
- Use Reset to defaults in Legend settings to clear saved preferences for the selected annotation; it also clears the dataset's shape size and every annotation's own size, including sizes a bundle set per annotation, so the default applies to every annotation again
Styling From The Python CLI
protspace style can pre-set legend styling inside a bundle, but its keys are categorical only. For a numeric annotation the web app reinterprets or ignores most of them, because numeric legend entries are bin IDs such as num:quantile:150:200 rather than per-value keys.
Bin distribution and Reverse gradient are UI-only settings and cannot be authored from the CLI.
See How CLI keys are reinterpreted for numeric columns for the per-key reference.
Multi-Label Annotations
When proteins have multiple values, such as multiple EC numbers:
- Points display as pie charts
- Each slice represents one value
- All unique values appear in the legend
Next Steps
- Separation Scores - the strips at the top of the legend panel, and how well each category separates
- Bars and Tools - projections, colour, contours, search, import and export
- Filtering - narrow the plot to proteins that match conditions
- Viewing 3D Structures - AlphaFold integration