반응형
반응형
Color palette choices seaborn components used: set_theme(), barplot(), barplot(), barplot(), despine() import numpy as np import seaborn as sns import matplotlib.pyplot as plt sns.set_theme(style="white", context="talk") rs = np.random.RandomState(8) # Set up the matplotlib figure f, (ax1, ax2, ax3) = plt.subplots(3, 1, figsize=(7, 5), sharex=True) # Generate some sequential data x = np.array(li..
Grouped violinplots with split violins seaborn components used: set_theme(), load_dataset(), violinplot(), despine() import seaborn as sns sns.set_theme(style="whitegrid") # Load the example tips dataset tips = sns.load_dataset("tips") # Draw a nested violinplot and split the violins for easier comparison sns.violinplot(data=tips, x="day", y="total_bill", hue="smoker", split=True, inner="quart",..
Plotting on a large number of facets seaborn components used: set_theme(), FacetGrid import numpy as np import pandas as pd import seaborn as sns import matplotlib.pyplot as plt sns.set_theme(style="ticks") # Create a dataset with many short random walks rs = np.random.RandomState(4) pos = rs.randint(-1, 2, (20, 5)).cumsum(axis=1) pos -= pos[:, 0, np.newaxis] step = np.tile(range(5), 20) walk = ..
Timeseries plot with error bands seaborn components used: set_theme(), load_dataset(), lineplot() import seaborn as sns sns.set_theme(style="darkgrid") # Load an example dataset with long-form data fmri = sns.load_dataset("fmri") # Plot the responses for different events and regions sns.lineplot(x="timepoint", y="signal", hue="region", style="event", data=fmri) Lineplot from a wide-form dataset ..
Annotated heatmaps seaborn components used: set_theme(), load_dataset(), heatmap() import matplotlib.pyplot as plt import seaborn as sns sns.set_theme() # Load the example flights dataset and convert to long-form flights_long = sns.load_dataset("flights") flights = flights_long.pivot("month", "year", "passengers") # Draw a heatmap with the numeric values in each cell f, ax = plt.subplots(figsize..
내 블로그 - 관리자 홈 전환 |
Q
Q
|
---|---|
새 글 쓰기 |
W
W
|
글 수정 (권한 있는 경우) |
E
E
|
---|---|
댓글 영역으로 이동 |
C
C
|
이 페이지의 URL 복사 |
S
S
|
---|---|
맨 위로 이동 |
T
T
|
티스토리 홈 이동 |
H
H
|
단축키 안내 |
Shift + /
⇧ + /
|
* 단축키는 한글/영문 대소문자로 이용 가능하며, 티스토리 기본 도메인에서만 동작합니다.