Re: Combining graphics objects
- To: mathgroup at smc.vnet.net
- Subject: [mg7744] Re: Combining graphics objects
- From: gah <gah at math.umd.edu>
- Date: Mon, 7 Jul 1997 04:41:18 -0400
- Organization: University of Maryland, College Park
- Sender: owner-wri-mathgroup at wolfram.com
Joel Bock wrote: > > Hello Mathematica Addicts: > > I'm trying to do something ostensibly very simple in Mathematica 3.0. > I want to create a scatterplot with different symbols representing various > quantities of interest. On top of this, I'd like to overlay some straight > lines indicating boundaries delimiting regions of 2D space with distinct > probabilities of occurrence. I have tried to combine "MultipleListPlot" > with "Line" graphics primitives, with no success. For example: > > line1 = Line[{0,1.75},{4.667,0}]; > > plt1 = MultipleListPlot[y1,y2,y3, > Frame->True, > FrameLabel->{"ylabel","xlabel"}, > AxesOrigin->{0,0}, > PlotRange->{0,2.5}, > PlotLabel->"label", > SymbolShape->{PlotSymbol[Box],PlotSymbol[Triangle],PlotSymbol[Di > amond]}, > TextStyle->{FontFamily->"Helvetica", > FontSize->10} > ]; > > Show[plt1,line1]; > > I'm getting an error after the "Show" call that says > Show::"gcomb": > "An error was encountered in combining the graphics objects in > Show[-Graphics-, Line[{x1,y1},{x2,y2}}]" > > Can anyone help decipher this problem? Thanks!! Show only combines Graphics objects and Line[...] is not yet a Graphics object. You need to wrap Graphics around it. Show[plt1,Graphics[{line1}]]; --Garry Helzer