RE: MultipleListPlot
- To: mathgroup at smc.vnet.net
- Subject: [mg46251] RE: [mg46243] MultipleListPlot
- From: "David Park" <djmp at earthlink.net>
- Date: Thu, 12 Feb 2004 22:46:11 -0500 (EST)
- Sender: owner-wri-mathgroup at wolfram.com
Naima, I always find it easiest to use the MultipleListPlot package, but not use the actual MultipleListPlot routine. Here is an example with some sample data. list1 = Table[{x, Sin[x]}, {x, 0, 3.2, 0.20}]; list2 = Table[{x, Cos[x]}, {x, 0, 3.2, 0.20}]; Needs["Graphics`MultipleListPlot`"] Needs["Graphics`Colors`"] ?PlotSymbol The following plots the points using a Triangle of pointsize 6 and a Box of pointsize 3. Each PlotSymbol is simple mapped onto the list of points. /@ is the shorthand notation for Map. Show[Graphics[ {PlotSymbol[Triangle, 6] /@ list1, PlotSymbol[Box, 3, Filled -> False] /@ list2}], Frame -> True]; If you also want to draw lines through the points you can just wrap each list of data points in Line. The following is a fairly complete plot statement using graphics directives to control the colors and dashing of the lines and symbols. I also added Text labels for the two curves. I clicked the positions of the Text labels off the plot by selecting the plot, holding down Ctrl, clicking the point where I wanted the label, copying and then pasting into the Text statement. Show[Graphics[ {(* Draw the Lines *) Red, Line[list1], Black, AbsoluteDashing[{4}], Line[list2], (* Plot the points *) AbsoluteDashing[{}], SteelBlue, PlotSymbol[Triangle, 6] /@ list1, Black, PlotSymbol[Box, 3, Filled -> False] /@ list2, (* Label the curves *) Text["Sin", {1.58463, -0.197368}, {1, 0}], Text["Cos", {2.62543, 0.390548}, {1, 0}]}], Frame -> True, FrameLabel -> {"x", "f"}, PlotLabel -> "Plotting Multiple Sets of Data", Background -> Linen, ImageSize -> 500]; David Park djmp at earthlink.net http://home.earthlink.net/~djmp/ From: Naima Khelfaoui [mailto:khelfaou at ese-metz.fr] To: mathgroup at smc.vnet.net I used MultipleListPlot to plot many list , I want to change the size of points but I don't know how, I used Plotsize but it don't change any thing. Thanking you.