import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
np.random.seed(2023)
df = pd.DataFrame({
    "x": np.linspace(0, 1, 10),
    "A": np.random.rand(10),
    "B": np.random.rand(10),
    "C": np.random.rand(10),
})
for column in df:
    if column != 'x':
        plt.plot(df['x'], df[column],label=f"x vs. {column}")
        plt.scatter(df['x'], df[column])
    
plt.title("Performance")
plt.grid()
plt.xlabel('x')
plt.ylabel('Efficiency')
plt.legend()
plt.show()
plt.savefig('ex421.png', dpi=100)

Discover more from Tips and Hints for Aerospace Engineers

Subscribe now to keep reading and get access to the full archive.

Continue reading