Re: lighten plots
- To: mathgroup at smc.vnet.net
- Subject: [mg5611] Re: [mg5579] lighten plots
- From: Mario Sancho Graca <M.S.Graca at Warwick.ac.uk>
- Date: Fri, 27 Dec 1996 23:43:41 -0500
- Organization: University of Warwick
- Sender: owner-wri-mathgroup at wolfram.com
Jeff Copes wrote:
>=20
> Dear Mathgroupies:
> The following code creates a matrix of plots representing a vibrating
> square membrane. The numerical output is great, but I need to lighten u=
p
> the plots for print. I tried different schemes, but after a few hours, =
I
> got nowhere near where I wanted to be. If I changed the ViewPoint optio=
n,
> I could lighten the plot, but not display the plots as needed. Any help
> would be appreciated.
>=20
> For[k =3D 0, k < 5, k++ ,
> {Share[],
> t =3D k Pi/4,
> m =3D Table[
> Table[ Sin[2 x] Sin[2 y] Cos[t],
> {y,0,Pi,Pi/50}]
> {x,0,Pi,Pi/50}],
> ListPlot3D[m, PlotRange -> {-1,1},
> Boxed -> False,
> ColorOutput -> GrayLevel,
> AspectRatio -> 1.5,
> ViewPoint -> {2.787, 1.067, 1.595}]}
> ]
>=20
> Yours truly,
> Jeff Copes
1. The code you provide has wrong syntax (commas and semicolons). The
working code would be:
For[k =3D 0, k < 5, k++,
{Share[];
t =3D k Pi/4;
m =3D Table[
Table[ Sin[2 x] Sin[2 y] Cos[t],
{y,0,Pi,Pi/50}],
{x,0,Pi,Pi/50}];
ListPlot3D[m, PlotRange -> {-1,1},
Boxed -> False,
ColorOutput -> GrayLevel,
AspectRatio -> 1.5,
ViewPoint -> {2.787, 1.067, 1.595}]}
]=20
2. I gather the problem is to make the pictures looking less dense. The
code provided does create "dark" pictures. First, remove the shading by
the option Shading -> False. Also increase the spacing between grid
lines, as nothing relevant about the shape is really lost. So for the
first plot we have the code,
t =3D 0 Pi/4;
m =3D Table[
Table[ Sin[2 x] Sin[2 y] Cos[t], {y,0,Pi,Pi/25}],
{x,0,Pi,Pi/25}];
ListPlot3D[m, PlotRange -> {-1,1},
Boxed -> False,
AspectRatio -> 1.5,
ViewPoint -> {2.787, 1.067, 1.595},
ColorOutput -> GrayLevel,
Shading -> False]
3. Is it not easier to use Plot3D instead? It takes care of the function
so that we do not really need to define a list of points. The spacing
between grid lines is established with the option PlotPoints. For the
first plot:
Plot3D[Sin[2 x] Sin[2 y], {y, 0, Pi}, {x, 0, Pi},
PlotRange -> {-1,1},
Boxed -> False,
AspectRatio -> 1.5,
ViewPoint -> {2.787, 1.067, 1.595},
ColorOutput -> GrayLevel,
Shading -> False,
PlotPoints -> 30]
Regards,
--=20
M=E1rio Sancho Gra=E7a
University of Warwick
Department of Engineering
Coventry CV4 7AL
United Kingdom
Email: M.S.Graca at Warwick.ac.uk