Loading…
DS · Visualisation · Program 09 · In the record
Visualize data using Matplotlib and Seaborn.
1import pandas as pd2import matplotlib.pyplot as plt3import seaborn as sns4 5df = pd.DataFrame({'Age': [25, 30, 35, 40, 45], 'Salary': [50000, 60000, 70000, 80000, 90000]})6 7fig, ax = plt.subplots(1, 2, figsize=(12, 5))8ax[0].plot(df['Age'], df['Salary'], marker='o')9ax[0].set_title("Matplotlib Line Plot")10sns.scatterplot(data=df, x='Age', y='Salary', ax=ax[1]).set_title("Seaborn Scatter Plot")11plt.show()(graph only - no printed output)

Run program 09 in your browser
Python 3.14 · Pyodide. Change the code or the input, run it, break it, and see what happens.