Skip to content

Commit

Permalink
Use gray colormap on black & while images
Browse files Browse the repository at this point in the history
  • Loading branch information
rocky committed Jul 13, 2022
1 parent 8e7d06f commit dee2341
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion mathicsscript/format.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,8 @@ def eval_boxes(result, fn, obj, **options):
result = png_expr.evaluate(obj)
plt.axes().set_axis_off()
img = mpimg.imread(temp_png)
plt.imshow(img)
cmap="gray" if expr.color_space == "Grayscale" else None
plt.imshow(img, cmap=cmap)
plt.show()
except: # noqa
pass
Expand Down

0 comments on commit dee2341

Please sign in to comment.