Skip to content

Conversation

mr-c
Copy link

@mr-c mr-c commented Oct 14, 2025

since these files have their executable bit set

since these files have their executable bit set
@efiring
Copy link
Member

efiring commented Oct 18, 2025

lic_demo.py depends on a library that hasn't been touched since 2015:
https://pypi.org/project/scikits.vectorplot/#history
https://github.com/aarchiba/scikits-vectorplot

streamplot_demo.py doesn't run in a reasonably up-to-date environment:

(pycurrents_basic) ~/work/programs/py/mpl/basemap/examples $ python streamplot_demo.py
Traceback (most recent call last):
  File "/Volumes/work/programs/py/mpl/basemap/examples/streamplot_demo.py", line 42, in <module>
    m.streamplot(x,y,udat,vdat,color=speed,linewidth=2,density=2,cmap=plt.cm.Spectral)
  File "/Users/efiring/micromamba/envs/pycurrents_basic/lib/python3.12/site-packages/mpl_toolkits/basemap/__init__.py", line 583, in with_transform
    return plotfunc(self,x,y,u,v,*args,**kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/efiring/micromamba/envs/pycurrents_basic/lib/python3.12/site-packages/mpl_toolkits/basemap/__init__.py", line 3757, in streamplot
    ret =  ax.streamplot(x,y,u,v,*args,**kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/efiring/micromamba/envs/pycurrents_basic/lib/python3.12/site-packages/matplotlib/__init__.py", line 1476, in inner
    return func(
           ^^^^^
  File "/Users/efiring/micromamba/envs/pycurrents_basic/lib/python3.12/site-packages/matplotlib/streamplot.py", line 91, in streamplot
    grid = Grid(x, y)
           ^^^^^^^^^^
  File "/Users/efiring/micromamba/envs/pycurrents_basic/lib/python3.12/site-packages/matplotlib/streamplot.py", line 365, in __init__
    raise ValueError("'x' values must be equally spaced")
ValueError: 'x' values must be equally spaced

I suspect that updating the streamplot_demo to run would not be difficult, so maybe an updated version should be kept.

For both files, instead of adding a shebang, I would either delete the file or update it and remove the execute bit, which is just an accidental holdover from long ago.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants