basemap icon indicating copy to clipboard operation
basemap copied to clipboard

add missing "#!" sequence that marks interpreted scripts

Open mr-c opened this issue 4 months ago • 1 comments

since these files have their executable bit set

mr-c avatar Oct 14 '25 13:10 mr-c

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.

efiring avatar Oct 18 '25 21:10 efiring