-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
1a20194
commit 351d7c0
Showing
55 changed files
with
467 additions
and
50 deletions.
There are no files selected for viewing
Binary file not shown.
Binary file modified
BIN
+81 Bytes
(110%)
aaanalysis/plotting/__pycache__/plot_get_cdict_.cpython-39.pyc
Binary file not shown.
Binary file modified
BIN
+4 Bytes
(100%)
aaanalysis/plotting/__pycache__/plot_get_clist_.cpython-39.pyc
Binary file not shown.
Binary file modified
BIN
-17 Bytes
(100%)
aaanalysis/plotting/__pycache__/plot_get_cmap_.cpython-39.pyc
Binary file not shown.
Binary file modified
BIN
+80 Bytes
(100%)
aaanalysis/plotting/__pycache__/plot_set_legend_.cpython-39.pyc
Binary file not shown.
Binary file modified
BIN
-345 Bytes
(95%)
aaanalysis/plotting/__pycache__/plot_settings_.cpython-39.pyc
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
Binary file modified
BIN
+738 Bytes
(110%)
docs/build/doctrees/generated/aaanalysis.plot_gcfs.doctree
Binary file not shown.
Binary file modified
BIN
+705 Bytes
(100%)
docs/build/doctrees/generated/aaanalysis.plot_get_cdict.doctree
Binary file not shown.
Binary file modified
BIN
+12 Bytes
(100%)
docs/build/doctrees/generated/aaanalysis.plot_get_clist.doctree
Binary file not shown.
Binary file modified
BIN
-51 Bytes
(100%)
docs/build/doctrees/generated/aaanalysis.plot_get_cmap.doctree
Binary file not shown.
Binary file modified
BIN
+1.72 KB
(100%)
docs/build/doctrees/generated/aaanalysis.plot_set_legend.doctree
Binary file not shown.
Binary file modified
BIN
-586 Bytes
(99%)
docs/build/doctrees/generated/aaanalysis.plot_settings.doctree
Binary file not shown.
Binary file not shown.
Binary file modified
BIN
+0 Bytes
(100%)
docs/build/html/_downloads/004048c0cbb6684bdb9047282ab71735/aaanalysis-plot_settings-2.pdf
Binary file not shown.
Binary file modified
BIN
+0 Bytes
(100%)
docs/build/html/_downloads/163aacac4bd235c9af7a62d7b4d0c89f/aaanalysis-plot_get_cdict-1.pdf
Binary file not shown.
Binary file modified
BIN
+0 Bytes
(100%)
docs/build/html/_downloads/1f3abea1675a65bb341756c52c9927f4/aaanalysis-plot_gcfs-1.pdf
Binary file not shown.
Binary file modified
BIN
+0 Bytes
(100%)
docs/build/html/_downloads/35bc22b1e83749ed4d42c9955ce176d6/aaanalysis-plot_set_legend-1.pdf
Binary file not shown.
Binary file modified
BIN
+0 Bytes
(100%)
docs/build/html/_downloads/795a736e5af756908120c8bda412fd28/aaanalysis-plot_get_cmap-1.pdf
Binary file not shown.
Binary file modified
BIN
+0 Bytes
(100%)
docs/build/html/_downloads/88d7f3f7cb5a284c0bfaa377fb4ce1d8/aaanalysis-plot_get_clist-1.pdf
Binary file not shown.
Binary file modified
BIN
+0 Bytes
(100%)
docs/build/html/_downloads/fb29bffb69140db4f68c4eb913c6f7d3/aaanalysis-plot_settings-1.pdf
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed
BIN
-47.8 KB
...ld/html/_images/social_previews/summary_generated_plotting_prelude_2fbce2d7.png
Binary file not shown.
Binary file added
BIN
+47.6 KB
...ld/html/_images/social_previews/summary_generated_plotting_prelude_53cbcc27.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
90 changes: 87 additions & 3 deletions
90
docs/build/html/_sources/generated/plotting_prelude.rst.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,91 @@ | ||
Plotting prelude | ||
================ | ||
|
||
This is a short overview of our utility plotting functions to make | ||
publication-ready visualizations with a view extra lines of code using | ||
the three following functions: | ||
These are some of our utility plotting functions to make | ||
publication-ready visualizations with a view extra lines of code. | ||
|
||
Let us first make all imports and create some data | ||
|
||
.. code:: ipython2 | ||
import matplotlib.pyplot as plt | ||
import seaborn as sns | ||
import warnings | ||
warnings.simplefilter(action='ignore', category=FutureWarning) | ||
data = {'Classes': ['Class A', 'Class B', 'Class C'], 'Values': [23, 27, 43]} | ||
The default seaborn output with removed top and right spines looks like | ||
this: | ||
|
||
.. code:: ipython2 | ||
sns.barplot(x='Classes', y='Values', data=data) | ||
sns.despine() | ||
plt.title("Seaborn default") | ||
plt.tight_layout() | ||
plt.show() | ||
.. image:: output_3_0.png | ||
|
||
|
||
Just call our ``aa.plot_setting`` function with our optimized color set | ||
to get this: | ||
|
||
.. code:: ipython2 | ||
import aaanalysis as aa | ||
colors = aa.plot_get_clist() | ||
aa.plot_settings() | ||
sns.barplot(x='Classes', y='Values', data=data, palette=colors) | ||
sns.despine() | ||
plt.title("Adjusted by AAanalysis 1") | ||
plt.tight_layout() | ||
plt.show() | ||
.. image:: output_5_0.png | ||
|
||
|
||
The settings can be easily adjusted and colors are provided for up to 9 | ||
classes: | ||
|
||
.. code:: ipython2 | ||
data = {'Classes': ['Class A', 'Class B', 'Class C', "Class D", "Class E"], 'Values': [23, 27, 43, 9, 14]} | ||
colors = aa.plot_get_clist(n_colors=5) | ||
aa.plot_settings(no_ticks_x=True, short_ticks_y=True, grid=True, grid_axis="y") | ||
sns.barplot(x='Classes', y='Values', data=data, palette=colors) | ||
sns.despine() | ||
plt.title("Adjusted by AAanalysis 2") | ||
plt.tight_layout() | ||
plt.show() | ||
.. image:: output_7_0.png | ||
|
||
|
||
Retrieve the set font size and create an independent legend like this: | ||
|
||
.. code:: ipython2 | ||
data = {'Classes': ['Class A', 'Class B', 'Class C', "Class D", "Class E"], 'Values': [23, 27, 43, 9, 14]} | ||
colors = aa.plot_get_clist(n_colors=5) | ||
aa.plot_settings(no_ticks_x=True, short_ticks_y=True) | ||
sns.barplot(x='Classes', y='Values', data=data, palette=colors, hatch=["/", "/", "/", ".", "."]) | ||
fontsize = aa.plot_gcfs() | ||
sns.despine() | ||
plt.title("Adjusted by AAanalysis 3") | ||
dict_color = {"Group 1": "black", "Group 2": "black"} | ||
aa.plot_set_legend(dict_color=dict_color, ncol=1, x=0.7, y=0.9, hatch=["/", "."]) | ||
plt.tight_layout() | ||
plt.show() | ||
.. image:: output_9_0.png | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.