question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Is it possible to set the opacity of a plot?

See original GitHub issue

mplleaflet 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:closed
  • Created 7 years ago
  • Comments:6 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
michaelwittmanncommented, Aug 22, 2019

Same problem here.

matplotlib: image

mplleaflet: image

As @alephcero mentions, no matter what I use for alpha= it still gets rendered with 0.2

0reactions
ladenawcommented, Nov 29, 2019

After 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.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found