<jupyter_start><jupyter_text>Inisialisasi Figure dan Axes<jupyter_code>fig = plt.figure()
ax = plt.axes()
fig = plt.figure(figsize=(6,6))
ax = plt.axes()
ax.plot(x, y)
fig = plt.figure(figsize=(6,6))
ax = plt.axes()
ax.plot(x, y1)
ax.plot(x, y2)<jupyter_output><empty_output><jupyter_text>shortcut<jupyter_code>plt.figure(figsize=(8,8))
plt.plot(x, y1, 'r-.')
plt.plot(x, y2, 'b.')
plt.xlim(0, 10)
plt.ylim(-2, 2)
plt.axis('equal')
plt.title('Sin dan Cos')
fig = plt.figure(figsize=(8,8))
ax = plt.axes()

ax.plot(x, y1, 'r-.')
ax.plot(x, y2, 'b.')
ax.set_xlim(0, 10)
ax.set_ylim(-2, 2)
ax.set_title("sin dan cos")
ax.axis('equal')
fig = plt.figure(figsize=(8,8))
ax = plt.axes()

ax.plot(x, y1, 'r-.')
ax.plot(x, y2, 'b.')
ax.set(xlim=(0, 10), ylim=(-2, 2), title="sin dan cos", xlabel = 'x', ylabel = 'y')

ax.axis('equal')
fig = plt.figure(figsize=(8,8))
ax = plt.axes()

ax.plot(x, y1, 'r-.', label='sin')
ax.plot(x, y2, 'b.', label='cos')
ax.set(xlim=(0, 10), ylim=(-2, 2), title="sin dan cos", xlabel = 'x', ylabel = 'y')

ax.axis('equal')<jupyter_output><empty_output><jupyter_text>Scatter Plot<jupyter_code>df = pd.read_csv("data/circle_data.csv", delimiter=";")
df.head()
x = df.x
y = df.y
rad = df.radius
plt.scatter(x, y)
plt.axis('equal')
plt.scatter(x, y, c='r', s=10)
plt.axis('equal')
plt.scatter(x, y, c=rad, s=rad*90)
plt.axis('equal')<jupyter_output><empty_output><jupyter_text>Histogram<jupyter_code>numbers = np.random.rand(10000)
plt.hist(numbers, bins=25)
numbers = np.random.randn(10000)
plt.hist(numbers, bins=25)
numbers = np.random.randn(100000)
plt.hist(numbers, bins=80, density=1)
numbers = np.random.randn(100000)
plt.hist(numbers, bins=80, density=1, cumulative=True)<jupyter_output><empty_output><jupyter_text>Subplot  MATLAB Style<jupyter_code>plt.figure(figsize=(15, 10))

plt.subplot(231)
plt.hist(numbers, bins=80, density=1)

plt.subplot(233)
plt.hist(numbers, bins=80, density=1)

plt.subplot(235)
plt.scatter(x, y, c=rad, s=rad*90)
plt.axis('equal')

plt.subplot(236)
plt.hist(numbers, bins=80, density=1)<jupyter_output><empty_output><jupyter_text>Matplotlib Style<jupyter_code>fig, ax = plt.subplots(2,3, figsize=(15,10))

ax[0,0].hist(numbers, bins=80, density=1)
ax[0,1].hist(numbers, bins=80, density=1)
ax[1,1].scatter(x, y, c=rad, s=rad*90)
ax[1,2].hist(numbers, bins=80, density=1)<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.2222222222222222, 'fraction_numerical': 0.0551314673452078, 'mean_word_length': 6.709150326797386, 'pattern_counts': {'":': 0, '<': 25, '<?xml version=': 0, '>': 25, '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': '6', 'dir': 'jupyter-structured-clean-dedup', 'id': '58951', 'license': 'MIT', 'n_tokens_mistral': 1200, 'n_tokens_neox': 1094, 'n_words': 178, 'path': '03 - Matplotlib Intro/.ipynb_checkpoints/Part 1 - Matplotlib-checkpoint.ipynb', 'repo_name': 'AdamArthurF/supervised_learning', 'size': '2358'}