[FEATURE]: Access values calculated / derived by plotly.js as part of plotting
Mantenedores costumam responder em até 1 dia
Ninguém assumiu esta issue ainda.
Avaliação
- Dificuldade
- 5/5
- Tempo estimado
- Mais de uma semana
- Facilidade para iniciantes
- 25/100
- Tipo de issue
- Funcionalidade
- Clareza
- Precisa de esclarecimento
- Status de atividade
- Pouca atividade
- Stack de tecnologia
- javascript, python
- Domínio
- api, data-visualization, frontend
Direção de pesquisa
Comece com full_figure_for_development e com a fronteira entre FigureWidget e JavaScript; em seguida, revise como plotly.js expõe o graph div, _fullLayout e _fullData. A issue lista muitos valores calculados possíveis, mas não define um escopo inicial, o formato da API ou testes; para considerar o trabalho concluído, seria necessário concordar com uma interface de retrieval focada para produção e sua cobertura.
Escrita pelo modelo de indexação a partir do texto da issue.
Descrição
Description
There are a lot of things that plotly.js has to calculate in the course of creating a plot from your data, and many of these would be useful for other purposes, either (1) to avoid repeating the calculation, (2) because there's some nuance about how the calculation should be done, or (3) because as a user you don't even have access to the information needed to do the calculation.
This is similar to full_figure_for_development, but that feature is intended (per the name) just for use during development in order to understand how plotly.js sets attribute defaults, and which attributes are available and meaningful in a particular situation. It should not be used in production because it's slow and the resulting object can be very large, and it only includes information from the "full" figure data and layout objects, which generally means it captures interactions between attributes but NOT values that are derived from data arrays. One exception is automatically-calculated axis ranges, which clearly depend on the data and ARE available from full_figure_for_development - but we'd love a more efficient (and more accurate, see below) way to get these as well.
The intent here is to allow users to retrieve calculated values that may be useful for other purposes in production situations, without all the overhead of full_figure_for_development. But I'm imagining the usage (and implementation) would be similar to full_figure_for_development, with the exception that that one is implemented via Kaleido only, whereas for this purpose at least if you've displayed your figure as a FigureWidget it should be possible to query the displayed figure directly rather than remaking it in Kaleido. This will ensure any calculations that depend on the display environment (for example the actual displayed size, if that's inherited from the container, and the exact fonts used by the browser) are properly reflected in the result.
Why should this feature be added?
Some examples of information to be included here:
- Axis ranges
tick0anddtick(or perhaps the list of precise tick values and associated text that we displayed?)- Tick rotation angle
- Margins, so you can align neighboring elements with specific data positions or ensure multiple plots are properly aligned
- Box and violin plots: statistics shown on the plot: min, max, median, quartiles, standard deviation, fences, outliers (see discussion in https://github.com/plotly/plotly.py/issues/5550 re: the ambiguity of quartile values)
- Grouped plots (bar, histogram, box, violin): width and position offset for each trace
- Stacked plots (bar, histogram, scatter): final base & top for each trace (this could be large, as it'll be two values per data point, so may need to be opt-in?)
- Automatic colorscales: the min and max values
I'm sure there are many more. These values would also be useful to JavaScript users, and for their use perhaps we can either just put them into a new data structure we attach to the graph div, or new objects we attach to gd._fullLayout and each trace in gd._fullData, then they can access them directly, no need for a new method. For Python users though this requires a new method to retrieve this info from JS.
- Linguagem predominante
- Python
- Estrelas
- 18.8k
- Forks
- 2.9k
- Merge médio
- 14h 12min
- PRs com merge (30d)
- 19
Preparar o ambiente
- Sem Dockerfile nem arquivo Docker Compose
- Tem um modelo de pull request
- Ler o guia de contribuição
Primeiros passos
- Leia a issue inteira e depois o guia de contribuição do projeto.
- Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
- Faça um fork do repositório e trabalhe em uma branch.
- Abra um pull request que referencie o número da issue.
Mais de plotly/plotly.py
-
[BUG]: Unnecessary `UserWarning` when using `fig.write_image()` with `kaleido.start_sync_server()`Abertabug
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 74/100
Mantenedores costumam responder em até 1 dia
-
P3 size: 1 task
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 65/100
plotly/plotly.py#5769 · 1 reação ·
Mantenedores costumam responder em até 1 dia
-
P3 size: 1 task
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 72/100
Mantenedores costumam responder em até 1 dia
-
bug P1
Dificuldade 1/5 Menos de uma hora Facilidade para iniciantes 68/100
Mantenedores costumam responder em até 1 dia
-
feature P3
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 62/100
Mantenedores costumam responder em até 1 dia
Todas as issues de plotly/plotly.py
Issues semelhantes
-
adr
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 72/100
kristofdegrave/homeassistant-smart-charging#1607 ·
Mantenedores costumam responder em até 1 dia
-
namespace operations
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 64/100
EclipseFdn/open-vsx.org#13665 ·
Mantenedores costumam responder em até 1 dia
-
doc good first issue help wanted
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 68/100
collective/icalendar#1865 · 2 comentários ·
Mantenedores costumam responder em até 1 dia
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 82/100
canonical/opentelemetry-collector-operator#409 ·
Mantenedores costumam responder em até 1 dia
-
Dificuldade 1/5 Menos de uma hora Facilidade para iniciantes 85/100
mozilla/addons-release-tests#1243 ·
Mantenedores costumam responder em até 1 dia