contourf error
See original GitHub issueHi, Really great work it’s an amazing tool. I managed to make the contour example work and one of my contour plot also. But when I switch the plot to contourf (wich is ok with my plt.show()), mplleaflet crashes with this error :
Traceback (most recent call last):
File "readnc_kb.py", line 37, in <module>
mplleaflet.show(path='test.html')
File "/usr/lib/python2.7/site-packages/mplleaflet/_display.py", line 180, in show
save_html(fig, fileobj=f, **kwargs)
File "/usr/lib/python2.7/site-packages/mplleaflet/_display.py", line 131, in save_html
html = fig_to_html(fig, **kwargs)
File "/usr/lib/python2.7/site-packages/mplleaflet/_display.py", line 84, in fig_to_html
exporter.run(fig)
File "/usr/lib/python2.7/site-packages/mplleaflet/mplexporter/exporter.py", line 51, in run
self.crawl_fig(fig)
File "/usr/lib/python2.7/site-packages/mplleaflet/mplexporter/exporter.py", line 118, in crawl_fig
self.crawl_ax(ax)
File "/usr/lib/python2.7/site-packages/mplleaflet/mplexporter/exporter.py", line 140, in crawl_ax
self.draw_collection(ax, collection)
File "/usr/lib/python2.7/site-packages/mplleaflet/mplexporter/exporter.py", line 272, in draw_collection
mplobj=collection)
File "/usr/lib/python2.7/site-packages/mplleaflet/mplexporter/renderers/base.py", line 272, in draw_path_collection
mplobj=mplobj)
File "/usr/lib/python2.7/site-packages/mplleaflet/leaflet_renderer.py", line 125, in draw_path
rings = list(iter_rings(data, pathcodes))
File "/usr/lib/python2.7/site-packages/mplleaflet/utils.py", line 14, in iter_rings
raise ValueError('Unrecognized code: {}'.format(code))
ValueError: Unrecognized code: Z
Any ideas ?
Issue Analytics
- State:
- Created 6 years ago
- Reactions:1
- Comments:12 (5 by maintainers)
Top Results From Across the Web
pyplot.contourf() returns error when specified levels argument
0. I'm trying to make a contour plot in Python using the matplotlib.pyplot.contourf() function, and it works perfectly like this ...
Read more >Contour Plot gives error - MATLAB Answers - MathWorks
With the above code I am trying to plot contours but I recieve this error. Error using contour3 (line 44). Z must be...
Read more >matplotlib.pyplot.contourf — Matplotlib 3.6.2 documentation
contour and contourf draw contour lines and filled contours, respectively. ... It is an error to use vmin/vmax when a norm instance is...
Read more >Contour Plots - Problem Solving with Python
In Mechanical Engineering a contour plot could show the stress gradient across part surface. Matplotlib's plt.contourf() method. Building contour plots with ...
Read more >Neural network contour error predictor in CNC control systems
Abstract: This article presents a method for predicting contour error using artificial neural networks. Contour error is defined as the minimum distance ......
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 FreeTop 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
Top GitHub Comments
@jwass , please make changes in the code
Got the same error. Added this to the code to bypass it.