Is it possible to export a color plot in grayscale?

asked 2020-06-27 02:28:10 +0200

dsejas gravatar image

Hello, Sage Community!

I have pieces of code for 200+ plots that I made in color, but now I need to convert them to grayscale. Is that possible in Sage?

By the way, using Imagemagick won't work, since I need eps vector graphics, and Imagemagick rasterizes the images.

Thanks in advance for your answers!

edit retag flag offensive close merge delete

Comments

What is exactly what you want to convert? The code to generate the plots? Will you rerun that code? The graphic files themselves? IMHO, your question is quite ambiguous.

Juanjo gravatar imageJuanjo ( 2020-06-27 15:44:03 +0200 )edit

Hello, @Juanjo! You are right, my question is not very specific. Imagine I have my plot stored in a variable---let's say P. I wonder if there is a method, command or function that I can call on P so it converts my plot to grayscale.

dsejas gravatar imagedsejas ( 2020-07-01 18:29:40 +0200 )edit