plotly / plotly/plotly.py

Add Custom Marker Symbols for Scatter Trace

Open
#3,672 2 comments 5 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

feature P3
Dominant language
Python
Stars
18.8k
Forks
2.8k
Avg merge
16h 26m
Merged PRs (30d)
21

Description

Hi all, really liking this framework so far. One feature that would be great to have would be the ability to add custom marker symbols to the scatter trace. It looks like I'm not the first person to be in need of this: https://community.plotly.com/t/i-want-to-use-custom-icon-for-the-scatter-markers-how-to-do-it/6644

I'm currently trying to overlay 2 of the existing symbols on top of one another to get a square with the 'Y' symbol inside. I can achieve this within the plot window easily enough by using two separate scatter traces, one with each symbol. Unfortunately there doesn't seem to be a way to make this look right in the legend. If I could instead use a single trace that would solve the legend issue, either by stacking shapes or more generally accessing the SVG syntax that's already used behind the scenes to render these symbols.

Any thoughts on whether this is feasible?

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

No file or test is named. Start by tracing how scatter marker symbols and legend entries are represented, focusing on whether the existing SVG-based symbols can support a composed or custom symbol in one trace. Done means a custom marker renders correctly and the corresponding single-trace legend entry matches it.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
data-visualization
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.