plotly / plotly/plotly.R

Zoom all facets at the same time

Aperta
#2,142 1 commento 6 reazioni 0 assegnatari Vedi su GitHub

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

There seems to be a discrepancy between plotly for R and for python in how it handles zooming across facets.

To take my examples directly from the documentation: https://plotly.com/ggplot2/facet-plots/ vs https://plotly.com/python/facet-plots/

In the python version, if I select a region to zoom in on, the same zoom is applied to all facets, regardless of position.

In the r version, if I zoom on one facet, the 'x' zoom is applied to facets in the same column, and the 'y' zoom is applied to facets in the same row - but other facets are unaffected.

I would like to replicate the python behaviour in r. Any clues for how to do this?

Reprex: Compare zoom behaviour between R and python

library(reshape2)
library(plotly)

p <- ggplot(tips, aes(x=total_bill)) + geom_histogram(binwidth=2,colour="white")

# Histogram of total_bill, divided by sex and smoker
p <- p + facet_grid(sex ~ smoker)

ggplotly(p)
import plotly.express as px
df = px.data.gapminder()
fig = px.scatter(df, x='gdpPercap', y='lifeExp', color='continent', size='pop',
                facet_col='year', facet_col_wrap=4)
fig.show()

Guida per i contributori

Apri la guida per i contributori

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Direzione di ricerca

Inizia eseguendo il R reprex dell’issue e confrontando il suo comportamento di zoom dei facet con l’esempio di facet Python collegato. L’issue non indica file o test del repository; completato significa che la selezione di una regione in un facet applica lo stesso zoom x e y a ogni facet.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Valutazione

Stack tecnologico
python, r
Ambito
data-visualization
Tipo di issue
Bug
Difficoltà
4/5
Tempo stimato
3-5 giorni
Stato di attività
Ferma
Chiarezza
Abbastanza chiara
Idoneità per principianti
35/100

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.