| 11 | 0 |
new file mode 100644 |
| ... | ... |
@@ -0,0 +1,14 @@ |
| 1 |
+import seaborn as sns |
|
| 2 |
+import matplotlib.pyplot as plt |
|
| 3 |
+ |
|
| 4 |
+sns.set(style="darkgrid") |
|
| 5 |
+ |
|
| 6 |
+# Load an example dataset with long-form data |
|
| 7 |
+fmri = sns.load_dataset("fmri")
|
|
| 8 |
+ |
|
| 9 |
+# Plot the responses for different events and regions |
|
| 10 |
+sns.lineplot(x="timepoint", y="signal", |
|
| 11 |
+ hue="region", style="event", |
|
| 12 |
+ data=fmri) |
|
| 13 |
+ |
|
| 14 |
+plt.show(); |
| 0 | 15 |
new file mode 100644 |
| ... | ... |
@@ -0,0 +1,14 @@ |
| 1 |
+import seaborn as sns |
|
| 2 |
+import matplotlib.pyplot as plt |
|
| 3 |
+ |
|
| 4 |
+sns.set(style="white") |
|
| 5 |
+ |
|
| 6 |
+# Load the example mpg dataset |
|
| 7 |
+mpg = sns.load_dataset("mpg")
|
|
| 8 |
+ |
|
| 9 |
+# Plot miles per gallon against horsepower with other semantics |
|
| 10 |
+sns.relplot(x="horsepower", y="mpg", hue="origin", size="weight", |
|
| 11 |
+ sizes=(40, 400), alpha=.5, palette="muted", |
|
| 12 |
+ height=6, data=mpg) |
|
| 13 |
+ |
|
| 14 |
+plt.show() |