Support direct labels for `type_barplot` & co.?

Offen
#471 0 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen

Maintainer antworten meist innerhalb von 1 Tag

Dieses Issue hat noch niemand übernommen.

Bewertung

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

Rechercherichtung

Beginne mit dem Lesen von Issue #469 und der bestehenden Schnittstelle von type_barplot, einschließlich der aktuellen Verwendung von plt_add(type = "text", ...) mit beside = TRUE. Lege vor der Implementierung die Label-Daten und Formatter-Optionen, die Platzierung, die Anpassung und die Textgestaltung fest; abgeschlossen ist die Aufgabe, wenn diese API-Entscheidungen dokumentiert sind und das daraus resultierende Verhalten für die relevanten Barplot-Fälle abgedeckt ist.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Beschreibung

Follow up from #469:

I wonder if we shouldn't support a type_barplot(label = TRUE) argument that would add these labels directly?

Apart from requiring less typing than the current, manual plt_add(type = "text", ...) approach, this would also be easier to integrate with dodged barplots where beside = TRUE. At least, in principle.

But also see @zeileis's reply:

Yes, maybe. Although one argument wouldn't be enough, would it? We would need to decide whether we want to display

  • absolute and/or (conditional) relative frequencies
  • ...or use some other formatter, e.g., for adding custom prefixes, suffixes, rounding, etc. (especially for other aggregation FUNctions)
  • at the top or bottom or center of the box
  • whether to adjust or modify the position
  • what cex or col to use for the text (or possibly other font properties)
  • ...

In short, this is not so trivial, unfortunately.

Vorherrschende Sprache
R
Sterne
430
Forks
24
Ø Merge
14 Std. 17 Min.
Gemergte PRs (30 T.)
8

Entwicklungsumgebung

In Codespaces öffnen

Startet den Dev-Container des Projekts im Browser, mit Ihrem eigenen GitHub-Konto.

  • Kein Dockerfile und keine Docker-Compose-Datei
  • Keine Pull-Request-Vorlage
  • Kein Beitragsleitfaden

Erste Schritte

  1. Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
  3. Forken Sie das Repository und arbeiten Sie in einem Branch.
  4. Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.

Mehr aus grantmcdermott/tinyplot

Alle Issues in grantmcdermott/tinyplot

Ähnliche Issues

Weitere Issues zu R

Neue Issues direkt in Ihr Postfach

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