Skip to content

Commit

Permalink
Merge pull request #17 from guiwitz/default_color
Browse files Browse the repository at this point in the history
Default color to CMY
  • Loading branch information
guiwitz committed Apr 5, 2022
2 parents 21bad0e + 1529509 commit cb12cd8
Show file tree
Hide file tree
Showing 3 changed files with 51 additions and 50 deletions.
2 changes: 1 addition & 1 deletion docs/first_plot.ipynb

Large diffs are not rendered by default.

13 changes: 7 additions & 6 deletions microfilm/colorify.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ def cmaps_def(cmap_name, num_colors=256, flip_map=False):
Parameters
----------
cmap_name: str
Matplotlib colormap or 'pure_red', 'pure_green', 'pure_blue'
'pure_magenta', 'pure_cyan', 'pure_yellow'
{'pure_red', 'pure_green', 'pure_blue', 'pure_magenta',
'pure_cyan', 'pure_yellow'} or Matplotlib colormap
num_colors: int
number of steps in color scale
flip_map: bool
Expand Down Expand Up @@ -135,7 +135,8 @@ def colorify_by_name(image, cmap_name, flip_map=False, rescale_type='min_max', l
image: 2d array
image to convert to RGB
cmap_name: str
Matplotlib colormap or 'pure_red', 'pure_green', 'pure_blue'
{'pure_red', 'pure_green', 'pure_blue', 'pure_magenta',
'pure_cyan', 'pure_yellow'} or Matplotlib colormap
flip_map: bool
invert colormap
rescale_type: str
Expand Down Expand Up @@ -177,8 +178,8 @@ def colorify_by_hex(image, cmap_hex='#ff6600', flip_map=False, rescale_type='min
----------
image: 2d array
image to convert to RGB
cmap_name: str
Matplotlib colormap or 'pure_red', 'pure_green', 'pure_blue'
cmap_hex: str
hex string defining color, default '#ff6600'
flip_map: bool
invert colormap
rescale_type: str
Expand Down Expand Up @@ -401,7 +402,7 @@ def multichannel_to_rgb(images, cmaps=None, flip_map=False, rescale_type='min_ma
# if no colormap is provided use true RGB for d<4
if cmaps is None:
if len(images) < 4:
cmaps = ['pure_red','pure_green','pure_blue']
cmaps = ['pure_cyan','pure_magenta','pure_yellow']
else:
cmaps = ['ran_gradient' for x in images]

Expand Down
86 changes: 43 additions & 43 deletions notebooks/create_plots.ipynb

Large diffs are not rendered by default.

0 comments on commit cb12cd8

Please sign in to comment.