Every line of 'numpy plot points' code snippets is scanned for vulnerabilities by our powerful machine learning engine that combs millions of open source libraries, ensuring your Python code is secure.
98 def showPlot(points): 99 plt.figure() 100 fig, ax = plt.subplots() 101 # this locator puts ticks at regular intervals 102 loc = ticker.MultipleLocator(base=0.2) 103 ax.yaxis.set_major_locator(loc) 104 plt.plot(points)
81 def plot_points(data, xpower=0): 82 """Make a nice plot 83 """ 84 import matplotlib.pylab as plt 85 x = data[0] 86 y = data[1] * x ** xpower 87 ydn = data[2] * x ** xpower 88 yup = data[3] * x ** xpower 89 plt.errorbar(x, y, [ydn, yup], fmt='o', color='k')
29 def plot_points(ax, coors, vals=None, point_size=20, 30 show_colorbar=False): 31 """ 32 Plot points with given coordinates, optionally colored using `vals` values. 33 """ 34 dim = coors.shape[1] 35 ax = _get_axes(ax, dim) 36 37 colors = 'b' if vals is None else vals 38 39 coors = _to2d(coors) 40 sc = ax.scatter(*coors.T, s=point_size, c=colors, alpha=1) 41 42 if show_colorbar and (vals is not None): 43 plt.colorbar(sc) 44 45 return ax