code: def create_plot():
      fig, ax = plt.subplots()
  
      x = np.linspace(0, 10, 100)
      ax.scatter(x, np.sin(x), label="sin", alpha=0.5)
      ax.scatter(x, np.cos(x), label="cos", c="g", alpha=0.5)
      ax.scatter(x[::5], 0.5 * np.sin(x[::5] + 2), c="b", label="dots")
  
      ax.legend(fancybox=True)
      ax.set_title("Legend Scatter test", size=20)
  
      return fig
  
imports: import matplotlib.pyplot
  import numpy
  import mpld3
label_desc: Use image node_id 1 for calling a global function with example usage: create_plot() and returns: fig