diff --git a/FlowCal/mef.py b/FlowCal/mef.py index 1a1e49a..63761ff 100644 --- a/FlowCal/mef.py +++ b/FlowCal/mef.py @@ -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, diff --git a/FlowCal/plot.py b/FlowCal/plot.py index ada8bb7..5698ca0 100644 --- a/FlowCal/plot.py +++ b/FlowCal/plot.py @@ -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 @@ -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 diff --git a/doc/getting_started/install_python.rst b/doc/getting_started/install_python.rst index dcc7d2a..724bbf8 100644 --- a/doc/getting_started/install_python.rst +++ b/doc/getting_started/install_python.rst @@ -14,7 +14,6 @@ Alternatively, download ``FlowCal`` from `here =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) @@ -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. \ No newline at end of file + After this, you may install ``FlowCal`` by following the steps above. diff --git a/requirements.txt b/requirements.txt index f23e2e7..1bfd881 100644 --- a/requirements.txt +++ b/requirements.txt @@ -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 diff --git a/setup.py b/setup.py index 6d84cd1..207a0d5 100644 --- a/setup.py +++ b/setup.py @@ -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',