# Mayor Library imports from numpy import linspace, random, pi # Enthought library imports from enthought.chaco.shell import plot, hold, title, show # Create some data x = linspace(-2*pi, 2*pi, 100) y1 = random.random(100) y2 = random.random(100) # Create some scatter plots plot(x, y1, "b.") hold() plot(x, y2, "g+", marker_size=2) # Add some titles title("simple scatter plots") # This command is only necessary if running from command line show()
# Mayor Library imports from numpy import linspace, exp # Enthought library imports from enthought.chaco.shell import semilogy, hold, title, show # Create some data x = linspace(1, 10, 200) # Create some line plots semilogy(x, exp(x), "b-", name="y=exp(x)", bgcolor="white") hold(True) semilogy(x, x**x, "r--", name="y=x**x") semilogy(x, x, "g-", name="y=x") # Add some titles title("simple semilog plots") #This command is only necessary if running from command line show()