Is it possible to set the opacity of a plot?
See original GitHub issuemplleaflet
seems to respect most of the options you can set on a matplotlib
plot, except for one crucial one, which is opacity. That is, at least AFAIK.
Am I wrong (in that case, what’s the parameter name!)? If not, then I believe that such a control should be made a feature.
Issue Analytics
- State:
- Created 7 years ago
- Comments:6 (1 by maintainers)
Top Results From Across the Web
matlab - How to set the opacity for a plot? - Stack Overflow
How can I change the transparency level of a given data? In my case, I'm using hold all command for plotting several data....
Read more >How can I make the 'plot' function markers and lines ...
Right, yes, the 'plot' function won't allow you to change transparency for markers, just lines. One alterrnative is to use the 'scatter' function...
Read more >Change the line opacity in Matplotlib - GeeksforGeeks
In this article, we will learn how to Create the line opacity in Matplotlib. Let's discuss some concepts : A line chart or...
Read more >Add Transparency to Plots - Wolfram Language Documentation
Transparency is useful in plots when you need an unobstructed view of multiple components of one plot, or simply want to lighten a...
Read more >Transparency in graphs | Stata
Adjust color transparency in almost every element of a Stata graph · See aspects of your data that weren't visible before · Print...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Same problem here.
matplotlib:![image](https://user-images.githubusercontent.com/25772536/63520070-6231b580-c4f4-11e9-9782-dcf400b518af.png)
mplleaflet:![image](https://user-images.githubusercontent.com/25772536/63520125-7f668400-c4f4-11e9-9b18-537bf7babc91.png)
As @alephcero mentions, no matter what I use for
alpha=
it still gets rendered with 0.2After this issue bugged me for a while I think I was able to track the problem down:
The code in this repository is fully functional when it comes to the alpha-value/opacity of patch plots. People experiencing said problem most probably installed mplleaflet via conda or pip.
The corresponding pypi and conda-forge distributions of mplleaflet (https://pypi.org/project/mplleaflet/) are not up to date with this repository. Specifically, they do not include the changes which where introduced in commit 205716786559edeb8342293e59a1e1f26d93227e. Hence, the patch fill opacity will not be set by mplleaflet and therefore defaults to leaflet’s standard value which seems to be 0.2 .
@jwass : The easiest way to solve this issue is to update the mplleaflet pypi/conda-forge version, which should not be too much of a hustle.
In the meantime users may work around this problem by cloning the repository recursively (to include mplexplorer) and installing the package manually.