Plotly.js: Pattern filled bar plots

Created on 29 Apr 2019  Â·  9Comments  Â·  Source: plotly/plotly.js

Originally requested in https://github.com/plotly/plotly.py/issues/1538

Feature request: pattern filled bar plots - mainly for grey scale printing.
E.g. https://matplotlib.org/examples/pylab_examples/hatch_demo.html

This is something that's come up before as a publication requirement. Could this be done with SVG pattern fills? https://iros.github.io/patternfills/sample_svg.html

feature ♥ NEEDS SPON$OR

Most helpful comment

Even if the original paper isn't in black and white, the printed version might be. This is also an important feature for colorblind people :) . Note that up to 10% of men are red-green color blind.

All 9 comments

Heh, there are still places that publish in black and white? I suppose so.

Sure, pattern fills seem like the way to go. We should make our own though, rather than using a package like patternfills. They're pretty easy to generate on the fly, similar to how we generate gradients, and AFAICT you need to fully specify colors and everything, so there are going to be far too many possibilities to preload them. Ideally it seems like we'd allow you to specify at least three attributes: shape, orientation, and solidity, and combine these with the fill color to make a pattern.

Even if the original paper isn't in black and white, the printed version might be. This is also an important feature for colorblind people :) . Note that up to 10% of men are red-green color blind.

Patterns can be used to represent relationships between traces also.
For instance, if one trace is depicted with diagonal stripes and another one with dots, a third trace resulting from their addition could be represented with a dotted-diagonal-stripe pattern.
Thanks a lot!

I agree - pattern filled bar and area charts would be great!

Will this be implemented anytime soon?

I am also trying to reproduce a figure from a paper that needs this feature.
We are interested in using this with Python 3, Plotly.

Hope this is still been worked on, thanks!

I would really appreciate having access to this feature as well; sometimes pattern fills are useful for distinguishing between closely-related items in plots, so those items can have a similar colour but a different pattern. This feature isn't available (yet) through other Julia plotting tools. Thank you.

It's a good feature and we'd love to have it in the library but it's not on anyone's roadmap at the moment as far as I know. That said, we as maintainers would be happy to help someone from the community to implement it in Plotly.js, or to accept sponsorship to get it on to our short-term roadmap :)

This issue has been tagged with NEEDS SPON$OR

A community PR for this feature would certainly be welcome, but our experience is deeper features like this are difficult to complete without the Plotly maintainers leading the effort.

Sponsorship range: $10k-$15k

What Sponsorship includes:

  • Completion of this feature to the Sponsor's satisfaction, in a manner coherent with the rest of the Plotly.js library and API
  • Tests for this feature
  • Long-term support (continued support of this feature in the latest version of Plotly.js)
  • Documentation at plotly.com/javascript
  • Possibility of integrating this feature with Plotly Graphing Libraries (Python, R, F#, Julia, MATLAB, etc)
  • Possibility of integrating this feature with Dash
  • Feature announcement on community.plotly.com with shout out to Sponsor (or can remain anonymous)
  • Gratification of advancing the world's most downloaded, interactive scientific graphing libraries (>50M downloads across supported languages)

Please include the link to this issue when contacting us to discuss.

Was this page helpful?
0 / 5 - 0 ratings