From: Benjamin R. <ben...@ou...> - 2015-07-01 18:10:06
|
You would need to save the artist object that is returned by drawshapefile() in a list or something. Then, when you want to get rid of it. you can call its `remove()` method or just do a `set_visible(False)` to just hide it. This all requires having a reference to the artist object itself. Does that help? Ben Root On Wed, Jul 1, 2015 at 1:58 PM, Ronquillo, Edgar Nahum <ero...@la...> wrote: > Hello All, > > > > I am working with Basemap and loading several shapefiles using checkboxes > in python. However, when I uncheck a checkbox I would like a shapefile to > be removed and stay with the other shapefiles that are already loaded. I > tried reloading and replotting the whole thing when I remove a checkbox but > it will remove all the other shapefiles as well. In simpler words, is it > possible to remove a shapefile from Basemap after m.readshapefile() has > been called? > > > > Thanks in advance > > > > > > > ------------------------------------------------------------------------------ > Don't Limit Your Business. Reach for the Cloud. > GigeNET's Cloud Solutions provide you with the tools and support that > you need to offload your IT needs and focus on growing your business. > Configured For All Businesses. Start Your Cloud Today. > https://www.gigenetcloud.com/ > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users > > |