plotly / plotly/plotly.py

Add Custom Marker Symbols for Scatter Trace

Offen
#3,672 2 Kommentare 5 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen

Dieses Issue hat noch niemand übernommen.

feature P3
Vorherrschende Sprache
Python
Sterne
18.8k
Forks
2.8k
Ø Merge
16 Std. 26 Min.
Gemergte PRs (30 T.)
21

Beschreibung

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?

Beitragsleitfaden

Beitragsleitfaden öffnen

Erste Schritte

  1. Lies das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreib ins Issue, dass du es übernimmst — das erspart doppelte Arbeit.
  3. Forke das Repository und arbeite in einem Branch.
  4. Öffne einen Pull Request, der die Issue-Nummer nennt.

Rechercherichtung

Es ist keine Datei und kein Test benannt. Beginne damit nachzuverfolgen, wie Scatter-Markersymbole und Legendeneinträge dargestellt werden, und konzentriere dich darauf, ob die vorhandenen SVG-basierten Symbole ein zusammengesetztes oder benutzerdefiniertes Symbol in einem trace unterstützen können. Erledigt ist die Aufgabe, wenn ein benutzerdefinierter Marker korrekt gerendert wird und der entsprechende Legendeneintrag für einen einzelnen trace mit ihm übereinstimmt.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Bewertung

Tech-Stack
python
Bereich
data-visualization
Issue-Typ
Feature
Schwierigkeit
5/5
Geschätzter Aufwand
Über eine Woche
Aktivitätsstatus
Veraltet
Klarheit
Muss geklärt werden
Anfängerfreundlichkeit
25/100

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.