Group Abstract Group Abstract

Message Boards Message Boards

Invert colors in graphics created using the drawing palette?

POSTED BY: George Hrabovsky
11 Replies
POSTED BY: Kyle Keane
POSTED BY: Vitaliy Kaurov

In some cases a black background changes automatically the color of the plot elements to a light color:

Plot[Sin[x], {x, 0, 2 Pi}, Background -> Black]

but you may have to check and tweak case by case.

POSTED BY: Gianluca Gorni

I'm sorry to hear about the eye problems. I don't know if this is quite what you want, but you might convert to image (by Rasterize), invert the ImageData, and make an image from that.

Example:

Image[1 - ImageData[Rasterize[Plot[Sin[x], {x, 0, 3}]]]]

enter image description here

POSTED BY: Daniel Lichtblau

I think I understand what you are saying. Convert the picture I draw into a labeled graphics object, and then transform it using the method you suggest. I will try that. Thanks. Just FYI, I am unable to read the attached graphic as the white background washes out everything in the foreground.

POSTED BY: George Hrabovsky

Probably not that easy like from drawing tools. But all that advise given to you is still relevant even if you want to use drawing system in Mathematica. It creates a Graphics object that you can place inside Show to adjust properties or use image processing to process. Everything is an expression in Wolfram Language

http://reference.wolfram.com/language/tutorial/EverythingIsAnExpression.html

even Graphics, so it can be manipulated further. For example see GIF below where I use

ColorNegate@Rasterize@object

to upgrade Danny's method. Just apply InputForm to your Graphics object to see code inside.

enter image description here

POSTED BY: Vitaliy Kaurov

I guess I was not too clear, I need a way to invert graphics created using the drawing system in Mathematica.

POSTED BY: George Hrabovsky

I am actually looking for images using the drawing system.

POSTED BY: George Hrabovsky

Thanks, I was hoping fo some clues as to drawn graphics.

POSTED BY: George Hrabovsky

Also PlotTheme -> "Marketing" seem to give a dark background.

POSTED BY: Gianluca Gorni

I will give this a try! Thanks much!

POSTED BY: George Hrabovsky
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard