<jupyter_start><jupyter_text>Visual Data Exporation Using MatplotLib<jupyter_code>"""Generating some random data using python"""
%matplotlib inline
import matplotlib.pyplot as plt
import pandas as pd
import numpy as np
data1 = np.random.normal(0,0.1,1000)
data2 = np.random.normal(1,0.4,1000) + np.linspace(0,1,1000)
data3 = 2 + np.random.random(1000) * np.linspace(0,5,1000)
data4 = np.random.normal(3,0.2,1000) + 0.3 * np.sin(np.linspace(0,20,1000))
data = np.vstack([data1,data2,data3,data4]).transpose()
data
df = pd.DataFrame(data, columns =['data1','data2','data3','data4'] )
df.head()<jupyter_output><empty_output><jupyter_text>Line Plotting using Pandas and Matplotlib<jupyter_code>"""For Pandas,Line Plot is default."""
df.plot(title = 'Line plot')
plt.plot(df)
plt.title('Line Plot')
plt.legend(['data1','data2','data3','data4'])<jupyter_output><empty_output><jupyter_text>Scatter Plot<jupyter_code>df.plot(style = '.')
"""this can be useful for seeing any co relation between any two features"""
df.plot(kind = 'scatter' ,x = 'data1', y = 'data2', xlim = (-1.5,1.5), ylim = (0,3))
"""No co erlation between the data"""<jupyter_output><empty_output><jupyter_text>Historigram<jupyter_code>df.plot(kind = 'hist',bins = 50,title = 'Histogram',alpha =0.6)<jupyter_output><empty_output><jupyter_text>Cummalative Distribution<jupyter_code>df.plot(kind = 'hist',
          bins = 50,
          title = 'Cumulative Distributions ',
          normed = True,
          cumulative = True,
          alpha = 0.4)<jupyter_output><empty_output><jupyter_text>Box Plot   Sub-Plot<jupyter_code>fig,ax = plt.subplots(2,2,figsize = (10,10))

df.plot(ax = ax[0][0],
       title = 'Line plot')
df.plot(ax = ax[0][1],style = 'o',
       title = 'scatter plot')
df.plot(ax = ax[1][0],kind = 'hist',
       title = 'Historigram plot',alpha =0.6)
df.plot(ax = ax[1][1],kind = 'box',
       title = 'Line plot',)<jupyter_output><empty_output><jupyter_text>Pie Charts<jupyter_code>df.plot.line()<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.17471378795420608, 'fraction_numerical': 0.04728720756595321, 'mean_word_length': 5.568627450980392, 'pattern_counts': {'":': 0, '<': 29, '<?xml version=': 0, '>': 29, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '7', 'dir': 'jupyter-structured-clean-dedup', 'id': '447417', 'license': 'MIT', 'n_tokens_mistral': 822, 'n_tokens_neox': 784, 'n_words': 137, 'path': 'GuideToMatPlotLib.ipynb', 'repo_name': 'jaikumardas577/projects', 'size': '2009'}