RE: FilledListPlot with StackGraphics
- To: mathgroup at smc.vnet.net
- Subject: [mg66798] RE: [mg66765] FilledListPlot with StackGraphics
- From: "David Park" <djmp at earthlink.net>
- Date: Tue, 30 May 2006 05:49:32 -0400 (EDT)
- Sender: owner-wri-mathgroup at wolfram.com
Seo Ho, You could skip FilledListPlot and try something like the following. data = {{1, 1}, {2, 1}, {2, 2}, {3, 2}}; data2 = Partition[data, 2, 2] {{{1, 1}, {2, 1}}, {{2, 2}, {3, 2}}} data3 = data2 /. {{x1_?NumericQ, y1_}, {x2_, y2_}} -> Polygon[{{x1, 0}, {x1, y1}, {x2, y2}, {x2, 0}}] {Polygon[{{1, 0}, {1, 1}, {2, 1}, {2, 0}}], Polygon[{{2, 0}, {2, 2}, {3, 2}, {3, 0}}]} Show[StackGraphics[Graphics@data3]] Or you could also dispense with StackGraphics and write a routine that will convert your list specification to 3d Polygons at a specific y value. data3d[data2d_, y_] := Module[{work}, work = Partition[data2d, 2, 2]; work /. {{x1_?NumericQ, z1_}, {x2_, z2_}} -> Polygon[{{x1, y, 0}, {x1, y, z1}, {x2, y, z2}, {x2, y, 0}}] ] data1 = {{1, 1}, {2, 1}, {2, 2}, {3, 2}, {3, 1/2}, {4, 1/2}}; data2 = {{1, 1}, {2, 1}, {2, 3}, {3, 3}, {3, 1}, {4, 1}}; Show[ Graphics3D[ {data3d[data1, 1], data3d[data2, 2]}] You might also be able to simplify how you specify and process your lists of data. It is almost always easier to work directly with primitive graphics objects than to try to twist some of the Mathematica plot types to special use. David Park djmp at earthlink.net http://home.earthlink.net/~djmp/ From: Seo Ho Youn [mailto:ysh7873 at hotmail.com] To: mathgroup at smc.vnet.net Hi, all. I am trying to use FilledListPlot with StackGraphics. The plot of FilledListPlot looks fine, but when I bring it to 3D with StackGraphics, it ``overfilled''. I know that I can use Fills-> White in order not to show this overfilled region. However, since I am trying to use several layers, this overfilled region blocks the ones behind it. Here's my simplified code. <<Graphics`FilledPlot` <<Graphics`Graphics3D` FLP = FilledListPlot[{{1, 1}, {2, 1}, {2, 2}, {3, 2}}]; Show[StackGraphics[FLP]]; In my code, there is a step plot in FilledListPlot. However, in 3D (StackGraphics), there is an extra filled triangle with points (1,1), (2,1), and (2,2), which is not filled in FilledListPlot. How can I get rid of this extra filled region? Thank you for reading. Have a good day. Seo Ho