Translate JSON references in docs to R equivalents
Nessuno ha ancora preso questa issue.
- Lingua principale
- R
- Stelle
- 2.7k
- Fork
- 641
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Descrizione
Is this an error in the documentation for R? This is for heatmap > colorscale section link:
Sets the colorscale. The colorscale must be an array containing arrays mapping a normalized value to an rgb, rgba, hex, hsl, hsv, or named color string. At minimum, a mapping for the lowest (0) and highest (1) values are required. For example,
[[0, 'rgb(0,0,255)', [1, 'rgb(255,0,0)']]. To control the bounds of the colorscale in z space, use zmin and amax
Two things, first it's missing a ']'. That's far less important as you can't feed R an array using that syntax. If I take the example from the site:
plot_ly(z = volcano, type = "heatmap")
And I create a var called 'colScale' to add a custom colorscale value, then this (going by the documentation) won't work:
colScale = [[0, 'rgb(10,0,50)'], [1, '#rgb(50,100,10)']]
It gives me an error (in R itself, not in the attempt to draw the plot). If I make a list and add it to the sample it works:
colScale= list(c(0, "rgb(10,0,50)"),list(1, "rgb(50,100,10)"))
plot_ly(z = volcano, type = "heatmap" , colorscale = colScale)
Using a simple 'Find' command it looks like there are multiple instances of the array syntax in the R documentation on the site.
Guida per i contributori
Apri la 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.
Direzione di ricerca
Inizia dal riferimento collegato alla colorscale di heatmap e cerca nella documentazione di R la sintassi degli array segnalata. Aggiorna gli esempi interessati con equivalenti validi in R, incluso l’esempio della colorscale di heatmap, e conferma che la documentazione non presenta più array in stile JSON come codice R.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- r
- Ambito
- data-visualization, documentation
- Tipo di issue
- Documentazione
- Difficoltà
- 3/5
- Tempo stimato
- 1-2 giorni
- Stato di attività
- Ferma
- Chiarezza
- Abbastanza chiara
- Idoneità per principianti
- 42/100