Remove a graphical shape from the canvas.
692
public void remove(Plot p) {
        shapes.remove(p);

        JComponent[] tb = p.getToolBar();
        if (tb != null) {
            for (JComponent comp : tb) {
                toolbar.remove(comp);
            }
        }

        repaint();
    }
723411
def remove(self, predicate=None, obj=None):
        
        self.graph.remove((self.asNode(), predicate, obj))
875264
def teardown_handles(self):
        
        if not isinstance(self.handles.get('artist'), GoogleTiles):
            self.handles['artist'].remove()
239443
def reject(self):
        """"""
        self.canvas.unsetMapTool(self.tool)
        if self.previous_map_tool != self.tool:
            self.canvas.setMapTool(self.previous_map_tool)
        self.tool.reset()
        self.extent_selector_closed.emit()
        super(ExtentSelectorDialog, self).reject()
1332306
def hl_canvas2table_box(self, canvas, tag):
        """"""
        self.treeview.clear_selection()

        # Remove existing box
        cobj = canvas.get_object_by_tag(tag)
        if cobj.kind != 'rectangle':
            return
        canvas.delete_object_by_tag(tag, redraw=False)

        # Remove existing highlight
        if self.maskhltag:
            try:
                canvas.delete_object_by_tag(self.maskhltag, redraw=True)
            except Exception:
                pass

        # Nothing to do if no masks are displayed
        try:
            obj = canvas.get_object_by_tag(self.masktag)
        except Exception:
            return

        if obj.kind != 'compound':
            return

        # Nothing to do if table has no data
        if len(self._maskobjs) == 0:
            return

        # Find masks that intersect the rectangle
        for i, mobj in enumerate(self._maskobjs):
            # The actual mask
            mask1 = self._rgbtomask(mobj)

            # The selected area
            rgbimage = mobj.get_image()
            mask2 = rgbimage.get_shape_mask(cobj)

            # Highlight mask with intersect
            if np.any(mask1 & mask2):
                self._highlight_path(self._treepaths[i])
788300
def remove(self):
        
        self.canvas.get_first_view().unselect_item(self)

        for child in self.canvas.get_children(self)[:]:
            child.remove()

        self.remove_income()
        for outcome_v in self.outcomes[:]:
            self.remove_outcome(outcome_v)
        for input_port_v in self.inputs[:]:
            self.remove_input_port(input_port_v)
        for output_port_v in self.outputs[:]:
            self.remove_output_port(output_port_v)
        for scoped_variable_port_v in self.scoped_variables[:]:
            self.remove_scoped_variable(scoped_variable_port_v)

        self.remove_keep_rect_within_constraint_from_parent()
        for constraint in self._constraints[:]:
            self.canvas.solver.remove_constraint(constraint)
            self._constraints.remove(constraint)
        self.canvas.remove(self)
1242466
function() {
   
      // Remove the canvas from the dom
      this.parentEl.removeChild(this.element);
   
      // Remove the wire reference from the connected terminals
    	if(this.terminal1 && this.terminal1.removeWire) {
			this.terminal1.removeWire(this);
    	}
    	if(this.terminal2 && this.terminal2.removeWire) {
			this.terminal2.removeWire(this);
    	}

    	// Remove references to old terminals
    	this.terminal1 = null;
    	this.terminal2 = null;

		// Remove Label
		if(this.labelEl) {
			if(this.labelField) {
				this.labelField.destroy();
			}
			this.labelEl.innerHTML = "";
		}
   }
750885
def _cleanPictures(self):
        

        # Project have been deleted
        if not os.path.exists(self.path):
            return
        try:
            pictures = set(os.listdir(self.pictures_directory))
            for drawing in self._drawings.values():
                try:
                    pictures.remove(drawing.ressource_filename)
                except KeyError:
                    pass

            for pict in pictures:
                os.remove(os.path.join(self.pictures_directory, pict))
        except OSError as e:
            log.warning(str(e))
192500
public void removeVertex(int i) {
        this.x.remove(i);
        this.y.remove(i);
        this.z.remove(i);
        this.colors.remove(i);
        calcG();
    }
879480
function() {
        if(this.vertices.length > 0) {
            this.layer.removeFeatures(this.vertices, {silent: true});
            this.vertices = [];
        }
        if(this.virtualVertices.length > 0) {
            this.layer.removeFeatures(this.virtualVertices, {silent: true});
            this.virtualVertices = [];
        }
        if(this.dragHandle) {
            this.layer.destroyFeatures([this.dragHandle], {silent: true});
            this.dragHandle = null;
        }
        if(this.radiusHandle) {
            this.layer.destroyFeatures([this.radiusHandle], {silent: true});
            this.radiusHandle = null;
        }
        if(this.feature &&
           this.feature.geometry.CLASS_NAME != "OpenLayers.Geometry.Point") {
            if((this.mode & OpenLayers.Control.ModifyFeature.DRAG)) {
                this.collectDragHandle();
            }
            if((this.mode & (OpenLayers.Control.ModifyFeature.ROTATE |
                             OpenLayers.Control.ModifyFeature.RESIZE))) {
                this.collectRadiusHandle();
            }
            if(this.mode & OpenLayers.Control.ModifyFeature.RESHAPE){
                // Don't collect vertices when we're resizing
                if (!(this.mode & OpenLayers.Control.ModifyFeature.RESIZE)){
                    this.collectVertices();
                }
            }
        }
    }
527768
def remove(image):
    """"""
    path = os.path.join(IMG_DIR, image)
    if os.path.isfile(path):
        os.remove(path)
241432
def remove_style(self):
        """"""

        for n in self.root.xpath('.//w:rStyle[@w:val="%s"]' % self.style, namespaces=self.namespaces):
            n.getparent().remove(n)
850400
def remove_subvisual(self, visual):
        
        visual.events.update.disconnect(self._subv_update)
        self._subvisuals.remove(visual)
        self.update()
970098
function () {
		var wrapper = this,
			element = wrapper.element || {},
			shadows = wrapper.shadows,
			parentNode = element.parentNode,
			key,
			i;

		// remove events
		element.onclick = element.onmouseout = element.onmouseover = element.onmousemove = null;
		stop(wrapper); // stop running animations

		if (wrapper.clipPath) {
			wrapper.clipPath = wrapper.clipPath.destroy();
		}

		// Destroy stops in case this is a gradient object
		if (wrapper.stops) {
			for (i = 0; i < wrapper.stops.length; i++) {
				wrapper.stops[i] = wrapper.stops[i].destroy();
			}
			wrapper.stops = null;
		}

		// remove element
		if (parentNode) {
			parentNode.removeChild(element);
		}

		// destroy shadows
		if (shadows) {
			each(shadows, function (shadow) {
				parentNode = shadow.parentNode;
				if (parentNode) { // the entire chart HTML can be overwritten
					parentNode.removeChild(shadow);
				}
			});
		}

		// remove from alignObjects
		erase(wrapper.renderer.alignedObjects, wrapper);

		for (key in wrapper) {
			delete wrapper[key];
		}

		return null;
	}
404086
def _hide_box(self, annotation):
        """"""
        annotation.set_visible(False)

        if self.display == 'multiple':
            annotation.axes.figure.texts.remove(annotation)
            # Remove the annotation from self.annotations.
            lookup = dict((self.annotations[k], k) for k in self.annotations)
            del self.annotations[lookup[annotation]]

        annotation.figure.canvas.draw()
613516
def remove_bg(img, th=(240, 255)):
    
    if img.size == 0:
        return img

    img = gray3(img)

    # delete rows with complete background color
    h, w = img.shape[:2]
    i = 0
    while i < h:
        mask = np.logical_or(img[i, :, :] < th[0], img[i, :, :] > th[1])
        if not mask.any():
            img = np.delete(img, i, axis=0)
            i -= 1
            h -= 1
        i += 1

    # if image is complete background only
    if img.size == 0:
        return img

    # delete columns with complete background color
    h, w = img.shape[:2]
    i = 0
    while i < w:
        mask = np.logical_or(img[:, i, :] < th[0], img[:, i, :] > th[1])
        if not mask.any():
            img = np.delete(img, i, axis=1)
            i -= 1
            w -= 1
        i += 1

    return img
319243
def clear(self):
        """"""

        for ax in self.flat_grid:
            for im_h in ax.findobj(AxesImage):
                im_h.remove()