plotly.py icon indicating copy to clipboard operation
plotly.py copied to clipboard

Wishlist: doc examples wanted

Open emmanuelle opened this issue 6 years ago • 14 comments

Most items coming from questions on the community forum

  • [x] a proper multicategory bar example based on https://community.plotly.com/t/multicategory-axis-type-example/26392
  • [ ] example of shape or annotation covering several subplots thanks to xref='paper'. Also the shapes and annotations tutorial should link to each other.
  • [ ] orthographic projection example in 3d axes tutorial (or 3d camera controls)
  • [ ] improve explanations on updatemenus and changing animation speed in animations. See https://stackoverflow.com/questions/59070876/plotly-how-do-the-buttons-for-the-update-menus-really-work/59076340#59076340, https://community.plot.ly/t/scatter-animation-doesnt-work/31944 https://community.plot.ly/t/need-animation-example-with-scattermapbox/9720/10 https://community.plot.ly/t/how-to-slow-down-animation-in-plotly-express/31309/7
  • [ ] in slider page https://plot.ly/python/sliders/, add example using the update method (modifying both traces and layout), as in the buttons tutorial https://plot.ly/python/custom-buttons/, and also an example using relayout. Discussed in https://community.plot.ly/t/update-plot-with-restyle-method-get-the-current-selected-slider-value/36162/4.
  • [x] example using px.strip, see https://community.plotly.com/t/make-a-violin-plot-with-only-points/37412/3. In box plot page, and add a link also in violin page.
  • [x] example of sparkline in scatter and line page. See this community post.
  • [x] example using surfacecolor in 3d surface tutorial. See this community post.
  • [ ] example of how to use go.Frame to target only certain traces in updates https://github.com/plotly/plotly.py/issues/2423#issuecomment-621906844
  • [ ] example of how to use mapbox sourceattribution
  • [ ] example of update_scenes and clarity on how update_xaxes is 2d only https://github.com/plotly/plotly.py/issues/2483 ... similarly let's ensure there's an example somewhere in the docs for every update method: polar, ternary etc
  • [ ] we need an example of append_trace somewhere, even just to say it's equivalent to add_trace except that it doesn't return the figure (for... reasons?)
  • [ ] would be nice to have a demo of a facet grid map like this one: image

emmanuelle avatar Nov 28 '19 20:11 emmanuelle

I've tagged this issue as a good first issue since some examples are quite easy to add (especially if the forum posts have some code examples). Items which have already been ticked are already done. Feel free to ask questions here if you would like to contribute an example but are unsure about how to do it. Please also refer to the doc README https://github.com/plotly/plotly.py/blob/master/doc/README.md

emmanuelle avatar Jan 23 '20 22:01 emmanuelle

Here is also a couple of searches with no result on the doc website, which should return something

  • [ ] lasso and box selection (we do have a page for selection-events but it's for FigureWidget, we don't have anything for selections in plotly figures I believe, only in the config page maybe)
  • [ ] io
  • [ ] modebar
  • [ ] various figure factory names (create_gantt, create_distplot, create_trisurf)
  • [ ] drilldown (to be added to sunburst and treemap)
  • [ ] figsize (this is the matplotlib parameter, we might mention in when talking about the width and height of a figure).

emmanuelle avatar Feb 13 '20 22:02 emmanuelle

I can help with that (I have experience with Plotly, but it's my first Open Source contribution). Are some of the tasks in progress? Or I can pick any that is not done?

SylwiaOliwia2 avatar Feb 24 '20 18:02 SylwiaOliwia2

Thank you @SylwiaOliwia2! I've updated the list by ticking contributions in progress, it was indeed not completely up to date :-). You can also write here on which example you would like to work on, or tick the corresponding box so that we know you're working on it. Thanks again :-)

emmanuelle avatar Feb 24 '20 19:02 emmanuelle

I'll start with the following:

  • [x] add coloraxis example to the subplots tutorial - Pull request #2226
  • [x] example with legend only for a trace - Pull request #2227
  • [x] add an example with matching axes (matches="x")
  • [x] on histogram tutorial, mention that we cannot access the values of counts (it's asked a lot), and maybe mention numpy's function for this. #2242

I'll keep updating this post about the tasks resolved by me.

SylwiaOliwia2 avatar Feb 25 '20 08:02 SylwiaOliwia2

@emmanuelle

on histogram tutorial, mention that we cannot access the values of counts (it's asked a lot), and maybe mention numpy's function for this.

you mean that we can't display the total count of the histogram (ex. 25 for the selected items below)? Plotly_hist

SylwiaOliwia2 avatar Feb 27 '20 09:02 SylwiaOliwia2

@SylwiaOliwia2 thanks for your PRs! Regarding the histogram, what I meant is that you cannot access the count values from Python. As you show in the figure, you can indeed see the count in the hover but it stays in Javascript. Is this clear enough? This confused me a bit when I started using plotly.py

emmanuelle avatar Mar 02 '20 16:03 emmanuelle

I removed some of the completed examples from the list, so that the existing list is more readable.

emmanuelle avatar Mar 13 '20 19:03 emmanuelle

  • [x] example with colored links in sankey page #2291
  • [x] in slider page, add example using the update method #2300

SylwiaOliwia2 avatar Mar 19 '20 07:03 SylwiaOliwia2

@emanuelle, regarding

example of shape or annotation covering several subplots thanks to xref='paper'

The xref="paper" makes the annotation static and assumes that all the subplots are one plotting area. That's the point? It seems to be good to add custom legend or description, but not to annotate within the plot. See the example code here.

SylwiaOliwia2 avatar Mar 19 '20 16:03 SylwiaOliwia2

Is this issue still open? I want to contribute to it if there is some good first issue to be solved! Can anyone guide?

ineelshah avatar May 29 '20 14:05 ineelshah

This issue is still open, although some have been addressed in #2488 which hasn't been merged yet.

nicolaskruchten avatar May 29 '20 17:05 nicolaskruchten

Hi guys, I have used Plotly quite a lot for my school work and I really enjoyed it. I'm hoping to make some contribution to this project. Are the issues here, besides the ones resolved in #2488, still up to date? Would love to pick something simple and get started!

Gravellent avatar Dec 16 '20 02:12 Gravellent

Hey, I want to make some contributions to Plotly as I have been using it a lot lately but this will be my first open-source contribution. So, I have to select any task from the checklist pinned at the top, right? Confirmation on this will be great and I'll start.

aditya172926 avatar Jan 02 '22 20:01 aditya172926

Hey, is this issue still open? Are there any more items in the wishlist still open - if yes, i would try to contribute to that.

Hasshey avatar Feb 28 '25 20:02 Hasshey

@LiamConnors @Coding-with-Adam any examples in particular you'd like?

gvwilson avatar Mar 03 '25 13:03 gvwilson