Spineplot wishlist
I maintainer di solito rispondono entro 1 giorno
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 5/5
- Tempo stimato
- Più di una settimana
- Idoneità per principianti
- 35/100
- Tipo di issue
- Funzionalità
- Chiarezza
- Da chiarire
- Stato di attività
- Tranquilla
- Stack tecnologico
- r
- Ambito
- data-visualization
Direzione di ricerca
Inizia dal punto di ingresso type_spineplot() e riproduci gli esempi di tinyplot() nell'issue, confrontandoli con spineplot() e mosaicplot() di base R. Risolvi le questioni di progettazione ancora aperte relative alla gestione dei bordi, alla variabile by e ai colori sequenziali grigi prima di modificare l'implementazione; il lavoro è concluso quando le visualizzazioni richieste e il comportamento dei colori sono coerenti con gli esempi concordati.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Disclaimer: I have collected a few issues that could be improved in spineplots, some of which were already discussed in #657. I'm happy to start addressing the issues but would appreciate some guidance/feedback first. This can easily wait until after the summer vacation!
Border color
In #657 spineplots received border = par("fg") as the border color rather than border = icol. Wouldn't the latter be more consistent, e.g., with boxplot? Also, I think that this means that the border color cannot be set as an argument to tinyplot(...) or type_spineplot(...).
My suggestion would be to export a border = NULL argument in type_spineplot(). Possibly additionally switch to border = icol internally when the user specifies border = "by"?
As an illustration we can use the following code. The first plot shows the current border = par("fg") and the latter shows what we would get with border = icol.
tinyplot(species ~ bill_dep | sex, facet = "by", data = penguins, legend = FALSE, theme = "clean2")
by variable
The current implementation of the by variable was always just a poor interim solution which was only marginally better than saying that by was not supported.
The natural strategy would be to simply add further vertical splits for the by variable (in addition to the x variable). The basic idea is straightforward and can be approximated by using interaction(x, by).
ucb = as.data.frame(UCBAdmissions)
tinyplot(Admit ~ interaction(Gender, Dept, sep = "\n"), data = ucb, weights = Freq)
However, the spacing (tol) should be improved and it would also be possible to get nicer axis labels. This could be similar to what mosaicplot() in base R does:
mosaicplot(aperm(UCBAdmissions, 3:1), dir = c("v", "v", "h"), off = c(6, 3, 0), col = gray.colors(2, rev = TRUE), main = "")
An open question is whether this display should be produced with Gender as the by variable (i.e., Admit ~ Dept | Gender) or with Dept (i.e., Admit ~ Gender | Dept). For categorical x variables like here, I would find Gender as the by variable a bit more intuitive. However, it wouldn't look good to use the same display for a numeric x variable. So I think we should go with Dept as the by variable here.
Note that the display is similar to but not quite the same as the corresponding faceted display below. The crucial difference is that in the faceted display every Dept gets the same size for the facet. In contrast in the by display you should be able to see the marginal distribution of Dept as well, e.g., that there are more observations in department A than in department B.
tinyplot(Admit ~ Gender, data = ucb, facet = 1 ~ Dept, weights = Freq)
Black-based gray sequential colors
In the single-group case the sequential palette constructed from black is actually set up via gray.colors() to match what base R does in spineplot().
However, in the multi-group case the same is not done. See the left group below which really uses full black as the base color which is probably a bit too "heavy". Switching to gray.colors() here would also work better.
tinyplot(Admit ~ Gender | Dept, data = ucb, facet = 1 ~ Dept, weights = Freq)
- Lingua principale
- R
- Stelle
- 430
- Fork
- 24
- Merge medio
- 14h 17m
- PR unite (30g)
- 8
Preparare l'ambiente
Avvia il container di sviluppo del progetto nel browser, con il tuo account GitHub.
- Nessun Dockerfile né file Docker Compose
- Nessun modello di pull request
- Nessuna guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di grantmcdermott/tinyplot
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 63/100
grantmcdermott/tinyplot#759 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 3/5 1-2 giorni Idoneità per principianti 67/100
grantmcdermott/tinyplot#664 · 4 commenti ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 45/100
grantmcdermott/tinyplot#663 · 1 reazione ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 3/5 1-2 giorni Idoneità per principianti 62/100
grantmcdermott/tinyplot#659 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 45/100
grantmcdermott/tinyplot#612 · 3 commenti ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di grantmcdermott/tinyplot
Issue simili
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 84/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
bcgov/aqwarnings_shiny#128 ·
-
tech-debt
Difficoltà 2/5 1-3 ore Idoneità per principianti 70/100
sagemathinc/sagebrush#3570 ·
I maintainer di solito rispondono entro 1 giorno
-
bug upkeep
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
I maintainer di solito rispondono entro 1 giorno
-
phoible.feature() failsAperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 66/100
ropensci/lingtypology#94 ·