Coder Social home page Coder Social logo

Comments (7)

andrea-cuttone avatar andrea-cuttone commented on August 15, 2024

Hi

you can use geoplotlib.savefig('myfile') instead of geoplotlib.show()

from geoplotlib.

sabinej avatar sabinej commented on August 15, 2024

Thanks a lot! It works, but it generates the messages below. That's not really a problem, but can I suppress this somehow?

%run C:/Users/sjeschonnek/Documents/Network_Research/geoplotlib_ex_flights.py
flightmap.png saved
Traceback (most recent call last):
File "C:\Users\sjeschonnek\AppData\Local\Enthought\Canopy\User\lib\site-packages\geoplotlib-0.2.0-py2.7.egg\geoplotlib__init__.py", line 30, in runapp
app.start()
File "C:\Users\sjeschonnek\AppData\Local\Enthought\Canopy\User\lib\site-packages\geoplotlib-0.2.0-py2.7.egg\geoplotlib\core.py", line 311, in start
pyglet.app.run()
File "C:\Users\sjeschonnek\AppData\Local\Enthought\Canopy\User\lib\site-packages\pyglet-1.2.2-py2.7.egg\pyglet\app__init
_.py", line 143, in run
event_loop.run()
File "C:\Users\sjeschonnek\AppData\Local\Enthought\Canopy\User\lib\site-packages\pyglet-1.2.2-py2.7.egg\pyglet\app\base.py", line 136, in run
self.run_estimated()
File "C:\Users\sjeschonnek\AppData\Local\Enthought\Canopy\User\lib\site-packages\pyglet-1.2.2-py2.7.egg\pyglet\app\base.py", line 165, in run_estimated
timeout = self.idle()
File "C:\Users\sjeschonnek\AppData\Local\Enthought\Canopy\User\lib\site-packages\pyglet-1.2.2-py2.7.egg\pyglet\app\base.py", line 281, in idle
window.flip()
File "C:\Users\sjeschonnek\AppData\Local\Enthought\Canopy\User\lib\site-packages\pyglet-1.2.2-py2.7.egg\pyglet\window\win32__init
.py", line 309, in flip
self.context.flip()
AttributeError: 'NoneType' object has no attribute 'flip'

from geoplotlib.

andrea-cuttone avatar andrea-cuttone commented on August 15, 2024

could you provide the minimal source code that produces this issue?

from geoplotlib.

sabinej avatar sabinej commented on August 15, 2024

"""
Example of spatial graph
"""
import geoplotlib
from geoplotlib.utils import read_csv
import pyglet

data = read_csv('./data/flights.csv')
geoplotlib.graph(data,
src_lat='lat_departure',
src_lon='lon_departure',
dest_lat='lat_arrival',
dest_lon='lon_arrival',
color='hot_r',
alpha=16,
linewidth=5)
#geoplotlib.show()
geoplotlib.savefig('flightmap4')

from geoplotlib.

sabinej avatar sabinej commented on August 15, 2024

The line with "import pyglet" can be removed, and it still happens. I was just trying out things. Thanks a lot for your help!

from geoplotlib.

andrea-cuttone avatar andrea-cuttone commented on August 15, 2024

should be fixed in 7b86203

from geoplotlib.

sabinej avatar sabinej commented on August 15, 2024

Thanks, it works fine now!

from geoplotlib.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.