matplotlib / matplotlib/matplotlib
Gouraud shading with tripcolor renders incorrectly as SVG in Jupyter notebook
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 23.2k
- Forks
- 8.5k
- Avg merge
- 1d 6h
- Merged PRs (30d)
- 66
Description
### Bug report
**Bug summary**
When the matplotlib backend is set to 'SVG' in a Jupyter Notebook, it seems that matplotlib does not render 'gouraud' shading correctly.
**Code for reproduction**
I've uploaded a minimal example of my problem here:
https://nbviewer.jupyter.org/github/CorbinFoucart/FEMexperiment/blob/master/app/mpl_bug.ipynb
**Actual outcome**
Note the 'gouraud' shading with SVG in the notebook. If I save the output to file and view the output, it is similarly not shaded, which indicates to me that this is not a Jupyter issue, nor a browser issue.
**Matplotlib version**
* Operating system: OSX El Capitan 10.11.6
* Matplotlib version: 2.2.2
* Matplotlib backend (`print(matplotlib.get_backend())`): module://ipykernel.pylab.backend_inline
* Python version: 3.6.4
* Jupyter version:
```
ipykernel==4.8.2
jupyter==1.0.0
jupyter-client==5.2.3
jupyter-console==5.2.0
jupyter-core==4.4.0
```
I installed matplotlib in a virtual environment with `pip`.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by running the linked mpl_bug.ipynb minimal reproduction with the SVG backend and inspect both the notebook output and the saved SVG. Trace the SVG rendering path for tripcolor with gouraud shading. Done means the shading appears correctly in both the notebook and saved output.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- jupyter-notebook, python
- Domain
- data-visualization
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100