Skip to content

Instantly share code, notes, and snippets.

@rickiepark
Last active May 13, 2026 06:44
Show Gist options
  • Select an option

  • Save rickiepark/b37d04a95a42ef6757e4a99214d61697 to your computer and use it in GitHub Desktop.

Select an option

Save rickiepark/b37d04a95a42ef6757e4a99214d61697 to your computer and use it in GitHub Desktop.
도미의 길이, 무게 데이터
bream_length = [25.4, 26.3, 26.5, 29.0, 29.0, 29.7, 29.7, 30.0, 30.0, 30.7, 31.0, 31.0,
31.5, 32.0, 32.0, 32.0, 33.0, 33.0, 33.5, 33.5, 34.0, 34.0, 34.5, 35.0,
35.0, 35.0, 35.0, 36.0, 36.0, 37.0, 38.5, 38.5, 39.5, 41.0, 41.0]
bream_weight = [242.0, 290.0, 340.0, 363.0, 430.0, 450.0, 500.0, 390.0, 450.0, 500.0, 475.0, 500.0,
500.0, 340.0, 600.0, 600.0, 700.0, 700.0, 610.0, 650.0, 575.0, 685.0, 620.0, 680.0,
700.0, 725.0, 720.0, 714.0, 850.0, 1000.0, 920.0, 955.0, 925.0, 975.0, 950.0]
@ANJEONGHEE

Copy link
Copy Markdown

import matplotlib.pyplot as plt

plt.scatter(bream_length, bream_weight)
plt.xtable('length')
plt.ylable('weight)')
plt.show()

@khdbsfdk

Copy link
Copy Markdown

import matplotlib.pyplot as plt

plt.scatter(bream_length, bream_weight)
plt.xlabel('length')
plt.ylabel('weight')
plt.show()

@jjy0607

jjy0607 commented Jun 27, 2022

Copy link
Copy Markdown

import matplotlib.pyplot as plt

plt.scatter(bream_length, bream_weight)
plt.xlabel('length')
plt.ylabel('weight')
plt.show()

@jjy0607

jjy0607 commented Jun 27, 2022

Copy link
Copy Markdown

@annylee0723

Copy link
Copy Markdown

import matplotlib.pyplot as plt

plt.scatter(bream_length, bream_weight)
plt.xlabel('length')
plt.ylabel('weight')
plt.show()

@dlclxkzk87

Copy link
Copy Markdown

import pandas as pd
import plotly.graph_objects as go

fig = go.Figure()
fig.add_trace(
go.Scatter(
x=bream_length,
y=bream_weight,
mode="markers",
name="Bream",
showlegend=True
))

fig.update_layout(
title = {'text' : "Bream Fish Market",
'font' : {'size': 20, 'color':'darkblue'}},
xaxis_title="Length",
yaxis_title="Weight"
)

fig.show()

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment