Timeline for Treating the output of a plot function as a graphics object, changing the opacity
Current License: CC BY-SA 3.0
13 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Jul 1, 2016 at 14:39 | history | edited | glwhart | CC BY-SA 3.0 |
Added the options that weren't explicit in my plot command
|
Jul 1, 2016 at 14:17 | comment | added | glwhart | @ciao If this didn't have the problem Jens points out, it would be perfect. Thanks. | |
Jul 1, 2016 at 14:14 | answer | added | glwhart | timeline score: 1 | |
Jul 1, 2016 at 5:19 | comment | added | Jens |
@ciao That works sort of, but then it makes the mesh lines too dark for values near Opacity[1] (i.e., darker than they were in the original).
|
|
Jul 1, 2016 at 4:31 | comment | added | ciao |
If the plot is produced as described, plot/. GrayLevel[__] -> Opacity[n] where plot, n are symbol of plot and desired opacity is a QND way to get it done.
|
|
Jul 1, 2016 at 3:04 | answer | added | Jens | timeline score: 7 | |
Jul 1, 2016 at 2:00 | review | Close votes | |||
Jul 1, 2016 at 17:02 | |||||
Jul 1, 2016 at 1:12 | comment | added | glwhart | @Jens: Intended application? I want to make a GraphicsRow of some 2D basis functions. I want to "weight" their contribution to an eigenfunction by their opacity. So the plots that don't contribute at all with have an opacity of 0 | |
Jul 1, 2016 at 1:07 | comment | added | glwhart | g1 = DensityPlot... g1 /. Graphics[a_, b___] :> Graphics[{Opacity[0.1], a}, b] This didn't actually change the opacity of anything... BaseStyle -> Opacity[0.1] This helped---it did change the opacity of the colored patches but doesn't change the opacity of the mesh. (I forgot to include the fact that I have "MeshFunctions -> {#3 &, #3 &}, Mesh -> 10" included in my Options for Density plot, so it looks a lot like a ContourPlot.) | |
Jun 30, 2016 at 23:38 | comment | added | Jens |
What is the intended application? Do you mean you want the output to have Head of Graphics , or be a graphics object of the kind that goes inside a Graphics ?
|
|
Jun 30, 2016 at 23:03 | comment | added | march |
Actually, even better: DensityPlot[x^2 - y^2, {x, -1, 1}, {y, -1, 1}, ColorFunction -> "SunsetColors", Frame -> False, BaseStyle -> Opacity[0.1]]
|
|
Jun 30, 2016 at 23:00 | comment | added | march |
If the DensityPlot is called plot , then: plot /. Graphics[a_, b___] :> Graphics[{Opacity[0.1], a}, b] .
|
|
Jun 30, 2016 at 22:52 | history | asked | glwhart | CC BY-SA 3.0 |