Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove palettable #328

Merged
merged 5 commits into from
Jun 13, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 1 addition & 8 deletions FlowCal/mef.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,14 +24,7 @@
import FlowCal.transform
import FlowCal.stats

# Use default colors from palettable if available
try:
import palettable
except ImportError as e:
standard_curve_colors = ['b', 'g', 'r']
else:
standard_curve_colors = \
palettable.colorbrewer.qualitative.Paired_12.mpl_colors[1::2]
standard_curve_colors = ['tab:blue', 'tab:green', 'tab:red']

def clustering_gmm(data,
n_clusters,
Expand Down
11 changes: 3 additions & 8 deletions FlowCal/plot.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,13 +58,7 @@
from matplotlib.font_manager import FontProperties
import warnings

# Use default colors from palettable if available
try:
import palettable
except ImportError as e:
cmap_default = plt.get_cmap(matplotlib.rcParams['image.cmap'])
else:
cmap_default = palettable.colorbrewer.diverging.Spectral_8_r.mpl_colormap
cmap_default = plt.get_cmap('Spectral_r')

savefig_dpi = 250

Expand Down Expand Up @@ -1786,7 +1780,8 @@ def density_and_hist(data,

# Colors
n_colors = n_plots - 1
colors = [cmap_default(i) for i in np.linspace(0, 1, n_colors)]
default_property_cycler = plt.rcParams['axes.prop_cycle']()
colors = [next(default_property_cycler)['color'] for i in range(n_colors)]
# Histogram
for i, hist_channel in enumerate(hist_channels):
# Define subplot
Expand Down
3 changes: 1 addition & 2 deletions doc/getting_started/install_python.rst
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ Alternatively, download ``FlowCal`` from `here <https://github.com/taborlab/Flow
* ``numpy`` (>=1.8.2)
* ``scipy`` (>=0.14.0)
* ``matplotlib`` (>=2.0.0)
* ``palettable`` (>=2.1.1)
* ``scikit-image`` (>=0.10.0)
* ``scikit-learn`` (>=0.16.0)
* ``pandas`` (>=0.16.1)
Expand Down Expand Up @@ -52,4 +51,4 @@ Again, some users may need to precede the previous commands with ``sudo``.

sudo pip install --upgrade pip

After this, you may install ``FlowCal`` by following the steps above.
After this, you may install ``FlowCal`` by following the steps above.
1 change: 0 additions & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ six>=1.10.0
numpy>=1.8.2
scipy>=0.14.0
matplotlib>=2.0.0
palettable>=2.1.1
scikit-image>=0.10.0
scikit-learn>=0.16.0
pandas>=0.16.1
Expand Down
1 change: 0 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,6 @@ def find_version(file_path):
'numpy>=1.8.2',
'scipy>=0.14.0',
'matplotlib>=2.0.0',
'palettable>=2.1.1',
'scikit-image>=0.10.0',
'scikit-learn>=0.16.0',
'pandas>=0.16.1',
Expand Down