Plots this mapping on a map.
503067
def plot_station_mapping(
    target_latitude,
    target_longitude,
    isd_station,
    distance_meters,
    target_label="target",
):  # pragma: no cover
    
    try:
        import matplotlib.pyplot as plt
    except ImportError:
        raise ImportError("Plotting requires matplotlib.")

    try:
        import cartopy.crs as ccrs
        import cartopy.feature as cfeature
        import cartopy.io.img_tiles as cimgt
    except ImportError:
        raise ImportError("Plotting requires cartopy.")

    lat, lng = isd_station.coords
    t_lat, t_lng = float(target_latitude), float(target_longitude)

    # fiture
    fig = plt.figure(figsize=(16, 8))

    # axes
    tiles = cimgt.StamenTerrain()
    ax = plt.subplot(1, 1, 1, projection=tiles.crs)

    # offsets for labels
    x_max = max([lng, t_lng])
    x_min = min([lng, t_lng])
    x_diff = x_max - x_min

    y_max = max([lat, t_lat])
    y_min = min([lat, t_lat])
    y_diff = y_max - y_min

    xoffset = x_diff * 0.05
    yoffset = y_diff * 0.05

    # minimum
    left = x_min - x_diff * 0.5
    right = x_max + x_diff * 0.5
    bottom = y_min - y_diff * 0.3
    top = y_max + y_diff * 0.3

    width_ratio = 2.
    height_ratio = 1.

    if (right - left) / (top - bottom) > width_ratio / height_ratio:
        # too short
        goal = (right - left) * height_ratio / width_ratio
        diff = goal - (top - bottom)
        bottom = bottom - diff / 2.
        top = top + diff / 2.
    else:
        # too skinny
        goal = (top - bottom) * width_ratio / height_ratio
        diff = goal - (right - left)
        left = left - diff / 2.
        right = right + diff / 2.

    ax.set_extent([left, right, bottom, top])

    # determine zoom level
    # tile size at level 1 = 64 km
    # level 2 = 32 km, level 3 = 16 km, etc, i.e. 128/(2^n) km
    N_TILES = 600  # (how many tiles approximately fit in distance)
    km = distance_meters / 1000.0
    zoom_level = int(np.log2(128 * N_TILES / km))

    ax.add_image(tiles, zoom_level)

    # line between
    plt.plot(
        [lng, t_lng],
        [lat, t_lat],
        linestyle="-",
        dashes=[2, 2],
        transform=ccrs.Geodetic(),
    )

    # station
    ax.plot(lng, lat, "ko", markersize=7, transform=ccrs.Geodetic())

    # target
    ax.plot(t_lng, t_lat, "ro", markersize=7, transform=ccrs.Geodetic())

    # station label
    station_label = "{} ({})".format(isd_station.usaf_id, isd_station.name)
    ax.text(lng + xoffset, lat + yoffset, station_label, transform=ccrs.Geodetic())

    # target label
    ax.text(t_lng + xoffset, t_lat + yoffset, target_label, transform=ccrs.Geodetic())

    # distance labels
    mid_lng = (lng + t_lng) / 2
    mid_lat = (lat + t_lat) / 2
    dist_text = "{:.01f} km".format(km)
    ax.text(mid_lng + xoffset, mid_lat + yoffset, dist_text, transform=ccrs.Geodetic())

    plt.show()
333184
def _plot(self):
        """"""
        for serie in self.series[::-1 if self.stack_from_top else 1]:
            self.bar(serie)
        for serie in self.secondary_series[::-1 if self.stack_from_top else 1]:
            self.bar(serie, True)
1316569
def doplot(self):
        
        w = self
        w.delete(ALL)
        w.coord_grid()
        w.objList.delete(0, END)
        self._plot()
604838
def plot_gos(fout_img, goids, go2obj, **kws):
    """"""
    gosubdag = GoSubDag(goids, go2obj, rcntobj=True)
    godagplot = GoSubDagPlot(gosubdag, **kws)
    godagplot.plt_dag(fout_img)
281820
def plot(self, key, part='re', scale='log', steps=50, legend=True, plotargs={}):
        
        try:
            import matplotlib.pyplot as plt
        except ImportError:
            raise ImportError("Please install matplotlib if you want to use the plot method")
        pdat = self.plotdata(key, part=part, scale=scale, steps=steps)
        plt.plot(*pdat, label=key, **plotargs)
        if scale == 'log':
            plt.xscale('log')
        if legend:
            plt.legend()
426130
private Properties mapToProperties(Map<String, String> map) {
		   Properties p = new Properties();
		   for (Map.Entry<String,String> entry : map.entrySet()) {
		     p.put(entry.getKey(), entry.getValue());
		   }
		   return p;
		 }
682773
def plot(self, ax: GeoAxesSubplot, **kwargs) -> Artist:
        """"""

        if "facecolor" not in kwargs:
            kwargs["facecolor"] = "None"
        if "edgecolor" not in kwargs:
            kwargs["edgecolor"] = ax._get_lines.get_next_color()

        if "projection" in ax.__dict__:
            return ax.add_geometries([self.shape], crs=PlateCarree(), **kwargs)
        else:
            return ax.add_patch(
                MplPolygon(list(self.shape.exterior.coords), **kwargs)
            )
531808
function () {

            // render the axis
            this.render();

            // move plot lines and bands
            each(this.plotLinesAndBands, function (plotLine) {
                plotLine.render();
            });

            // mark associated series as dirty and ready for redraw
            each(this.series, function (series) {
                series.isDirty = true;
            });

        }
979267
def show(cmap, var, vmin=None, vmax=None):
    '''

    '''

    # get variable data
    lat, lon, z, data = read(var)

    fig = plt.figure(figsize=(16, 12))

    # Plot with grayscale
    ax = fig.add_subplot(3, 1, 1)
    map1 = ax.scatter(lon, -z, c=data, cmap='gray', s=10, linewidths=0., vmin=vmin, vmax=vmax)
    plt.colorbar(map1, ax=ax)

    # Plot with jet
    ax = fig.add_subplot(3, 1, 2)
    map1 = ax.scatter(lon, -z, c=data, cmap='jet', s=10, linewidths=0., vmin=vmin, vmax=vmax)
    plt.colorbar(map1, ax=ax)

    # Plot with cmap
    ax = fig.add_subplot(3, 1, 3)
    map1 = ax.scatter(lon, -z, c=data, cmap=cmap, s=10, linewidths=0., vmin=vmin, vmax=vmax)
    ax.set_xlabel('Longitude [degrees]')
    ax.set_ylabel('Depth [m]')
    plt.colorbar(map1, ax=ax)

    plt.suptitle(var)
1029117
def plot(self, flip=False, ax_channels=None, ax=None, *args, **kwargs):
        
        for gate in self.gates:
            gate.plot(flip=flip, ax_channels=ax_channels, ax=ax, *args, **kwargs)
969999
def map(self, fn):
        """"""
        return TimeSeries([(x, fn(y)) for x, y in self.points])
368213
public void draw() {
		//=================================================================
		//Now plot the STP with the Utility.PlotSTPTemporalModule class
		//=================================================================
		PlotSTPTemporalModule view;
		Toolkit tk = Toolkit.getDefaultToolkit();
		int xSize = ((int) tk.getScreenSize().getWidth());
		int ySize = ((int) tk.getScreenSize().getHeight());
		//int ySize = 500;

		//GIVE tm TO VISIUALIZER		
		view = new PlotSTPTemporalModule(this, xSize, ySize);
		JFrame myFrame = new JFrame("Simple Temporal Network");

		Container pane = myFrame.getContentPane();
		pane.setLayout(new BorderLayout());
		pane.add(view, BorderLayout.NORTH);
		myFrame.setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);

		myFrame.setSize(xSize,ySize);

		myFrame.pack();
		myFrame.setVisible(true);

		view.touchLBUBNodes();
		//=================================================================
		//End STP plotting
		//=================================================================
	}
813280
def plot(self, x, y, color="black"):
        
        p = Point(x, y)
        p.fill(color)
        p.draw(self)
22421
def show(self, *args, **kwargs):
        
        plt = self.get_pourbaix_plot(*args, **kwargs)
        plt.show()
361428
def plot_data(self):
        
        self.plt.plot(*self.fit.data, **self.options['data'])
1098798
function(map) {
        OpenLayers.Control.prototype.setMap.apply(this, arguments);

        //make sure we have an arg parser attached
        for(var i=0, len=this.map.controls.length; i<len; i++) {
            var control = this.map.controls[i];
            if (control.CLASS_NAME == this.argParserClass.CLASS_NAME) {
                
                // If a permalink is added to the map, and an ArgParser already
                // exists, we override the displayProjection to be the one
                // on the permalink. 
                if (control.displayProjection != this.displayProjection) {
                    this.displayProjection = control.displayProjection;
                }    
                
                break;
            }
        }
        if (i == this.map.controls.length) {
            this.map.addControl(new this.argParserClass(
                { 'displayProjection': this.displayProjection }));       
        }

    }
939616
def scatterplot(self, x, y, **kw):
        
        self.panel.scatterplot(x, y, **kw)