Re: question on Plot and Show plus Axis Labels:

*To*: mathgroup at smc.vnet.net*Subject*: [mg72564] Re: question on Plot and Show plus Axis Labels:*From*: Bill Rowe <readnewsciv at sbcglobal.net>*Date*: Mon, 8 Jan 2007 05:24:55 -0500 (EST)

On 1/6/07 at 11:43 PM, gopinathv at ou.edu (Gopinath Venkatesan) wrote: >Objective: to plot several graphs in a single plot as well as use >labels for axis, and different colors or dashing and other styles >for individual plots to distinguish. What I want to know is what are >the graphic format commands that would work with the command "Show" >(because I tried RotateLabel and its not working with Show). Or >please read the below for more details. >I have y0, y, y1, and y2 as a list of values, and first I tried to >plot all these list values using Plot (by default Plot function >increments the x by fractions but in my case it is integer, like >x={0,1,..10}; It didn't work. So I tried with ListPlot. >p0 = ListPlot[Thread[y0, x], PlotJoined -> True] >p = ListPlot[Thread[y, x], PlotJoined -> True] >p1 = ListPlot[Thread[y1, x], PlotJoined -> True] >p2 = ListPlot[Thread[y2, x], PlotJoined -> True] >Show[p0, p, p1, p2, AxesLabel -> {"x-value", "y-value"}, RotateLabel -> True] Hmm... The usage of Thread above doesn't look right to me. I assume you want to create a list of {x,y} pairs to supply to ListPlot. If so, I would use Thread[{x,y}] instead of what you've done above. And in the particular case where x takes on the values {1,2,3...} it suffices to do simply ListPlot[y] rather than ListPlot[Thread[{x,y}]] >And I used Show to plot all of them in a plot and tried to label the >axis. >1. Problem is RotateLabel is not working with Show. >2. If I use a longer text label for axes (without RotateLabel option), >the plot size gets smaller and text is as big as plots. Some scaling >operation need to be done. no clue how to do this. Or should I change >the font size of the text. I prefer not to change the text font size >and keep the plot unscaled. I would use the following approach First, generating some data y = Table[Random[], {10}]; y1 = Sort@Table[Random[], {10}]; y2 = Reverse@Sort@Table[Random[], {10}]; then to plot the data Show[ Block[{$DisplayFunction = Identity}, ListPlot[#, PlotJoined -> True] & /@ {y, y1, y2}], FrameLabel -> {"x-value", "y-value"}, Axes -> None, Frame -> {True, True, False, False}]; Here, I've used FrameLabels in place of AxesLabels and replaced the axes with a frame constructed to look like a set of axes. -- To reply via email subtract one hundred and four