<jupyter_start><jupyter_text>Basic graph<jupyter_code>x = [0, 1, 2, 3, 4]
y = [0, 2, 4, 6, 8]

plt.figure(figsize=(5,3), dpi=200)

font={'name': 'arial',
     'size': 16,
     'color': 'darkblue'}

plt.plot(x, y, label='y=2x', color='black', linewidth=2, linestyle='--', marker='o', markersize=5, markerfacecolor='red', mec='blue')
# alternative short hand fmt
# plt.plot(x, y,  'bo--', label='y=3x')
x2 = np.arange(0, 4.5, 0.5)
plt.plot(x2[:6], x2[:6]**2, 'b.-', label='x2')
plt.plot(x2[4:], x2[4:]**2, 'b.--')
# plt.xticks([0, 1, 2, 3, 4])
plt.xlabel('This is axis X')
plt.ylabel('This is axis Y')
plt.title('This is just a basic graph', fontdict=font)
plt.legend()
plt.savefig('samplegraph.png', dpi=300)
plt.show()<jupyter_output><empty_output><jupyter_text>Bar Charts<jupyter_code>labels=['A', 'B', 'C']
values=[2,9,5]

bars = plt.bar(labels, values)
plt.title('This is a sampe bar graph', fontdict=font)
plt.figure(figsize=(10,4))
# bars[0].set_hatch('/')
# bars[1].set_hatch('o')
# bars[2].set_hatch('*')
patterns=['/', 'o', '*']
for bar in bars:
    bar.set_hatch(patterns.pop(0))
plt.savefig('samplebar.png')


plt.show()<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.2482758620689655, 'fraction_numerical': 0.04827586206896552, 'mean_word_length': 5.7894736842105265, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 9, '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': '2', 'dir': 'jupyter-structured-clean-dedup', 'id': '542254', 'license': 'MIT', 'n_tokens_mistral': 561, 'n_tokens_neox': 522, 'n_words': 101, 'path': 'matplotlib_tutorial.ipynb', 'repo_name': 'Anitcant/Learning-Notebooks', 'size': '1160'}