Re: What's wrong in this plot?
- To: mathgroup at smc.vnet.net
- Subject: [mg15049] Re: [mg15003] What's wrong in this plot?
- From: Jens-Peer Kuska <kuska at informatik.uni-leipzig.de>
- Date: Wed, 9 Dec 1998 04:12:31 -0500
- Organization: Universitaet Leipzig, Institut fuer Informatik
- References: <199812050630.BAA04468@smc.vnet.net.>
- Sender: owner-wri-mathgroup at wolfram.com
Hi Sergio, You have *one* Epilog option per one Graphics object. So You must add the labels Text[label,{midx,midy}] to the graphics primitives in the plot and You will see the labels. Otherwise Show[] takes the options from the first object in its arguments and use this options (including the Epilog-option) for the combinated graph. Hope that helps Jens sergio at scisun.sci.ccny.cuny.edu wrote: > (* > Hello everyone: > > I'm using the following code to plot a set of individual > rectangles, labeling each each rectangle with a number at > the center. After that, the plots are combined in a single > one using Show. The problem is that only the label of the first > rectangle is shown in the combined plot. Could somebody point > out what is going and how to overcome the problem? > > Regards, > Sergio > E-mail: sergio at scisun.sci.ccny.cuny.edu *) > > Clear[data]; > data = {{-20., 0.}, {-20., -10.}, {-10., -10.}, {-10., 0.}, {-20., 10.}, > {-20., 0.}, {-10., 0.}, {-10., 10.}, {-10., 0.}, {-10., -10.}, > {0., -10.}, {0., 0.}, {-10., 10.}, {-10., 0.}, {0., 0.}, {0., > 10.}, > {0., 0.}, {0., -10.}, {10., -10.}, {10., 0.}, {0., 10.}, {0., > 0.}, > {10., 0.}, {10., 10.}, {10., 0.}, {10., -10.}, {20., -10.}, > {20., 0.}, > {10., 10.}, {10., 0.}, {20., 0.}, {20., 10.}}; > > Clear[gridplot, label, midx, midy]; > gridplot = {}; > label = 0; > Do[ > midx = (data[[k]][[1]] + data[[k+3]][[1]])/2.0 ; > midy = (data[[k]][[2]] + data[[k+1]][[2]])/2.0 ; > label = label + 1; > AppendTo[gridplot, > > ListPlot[Append[Table[data[[i]],{i,k,k+3}],data[[k]]], > PlotJoined -> True, > Axes -> False, > Epilog -> Text[label,{midx,midy}], > DisplayFunction -> Identity]], > {k,1,Length[data],4}]; > Show[gridplot[[4]], Frame -> True, DisplayFunction -> $DisplayFunction]; > Show[gridplot[[7]], Frame -> True, DisplayFunction -> > $DisplayFunction]; Show[gridplot, Frame -> True, DisplayFunction -> > $DisplayFunction]; > > -----------== Posted via Deja News, The Discussion Network ==---------- > http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own
- References:
- What's wrong in this plot?
- From: sergio@scisun.sci.ccny.cuny.edu
- What's wrong in this plot?