# -*- coding: utf-8 -*- """ Created on Mon Nov 14 10:58:13 2022 @author: cpresser """ import numpy as np import matplotlib.pyplot as plt x = np.linspace(-5, 5, 11) print(x) y = -2 * x ** 2 print(y) #plot arrays x and y plt.plot(x, y, marker="x", label="-2*x**2") y1 = x**3 plt.plot(x, y1, marker="o", linestyle="dotted", label="x**3") y2 = 23.2*x**(-.333) plt.plot(x, y2, marker="1", label="23.2*x**(-.333)") #set up the plotting area plt.title("Two Functions") plt.xlabel("x") plt.ylabel("y") plt.legend() #set the ranges plt.axis([-.5, 6, -55, 155]) #minX, maxX, minY, maxY plt.show() #xList = np.array([0, 1, 5, 3.5, -1]) #yList = np.array([1, -1, 1, -1, 2]) #plt.plot(xList, yList) #plt.show() #https://matplotlib.org/stable/api/markers_api.html #https://matplotlib.org/stable/gallery/lines_bars_and_markers/linestyles.html