Skip to content

Instantly share code, notes, and snippets.

@mikekenneth
Created September 27, 2022 08:16
Show Gist options
  • Select an option

  • Save mikekenneth/ea2438b266c57bdc4a57361e79765a09 to your computer and use it in GitHub Desktop.

Select an option

Save mikekenneth/ea2438b266c57bdc4a57361e79765a09 to your computer and use it in GitHub Desktop.
Plotting multilple line plot with Pandas & Matplotlib
import pandas as pd
import matplotlib.pyplot as plt
data = {
'ip_address': ['10.10.1.2','10.10.1.3','10.10.1.4','10.10.1.5','10.10.1.6','10.10.1.7','10.10.1.8'],
'latency': [278,353,658,517,62,485,875],
'packet_size': [773,9860,4618,1056,9568,8124,4605]}
df = pd.DataFrame(data=data)
print(df.head())
df.plot(x='ip_address', y=['latency', 'packet_size'], kind='line')
plt.show()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment