RE: DisplayTogether & PlotLegend incompatibility

*To*: mathgroup at smc.vnet.net*Subject*: [mg70847] RE: [mg70815] DisplayTogether & PlotLegend incompatibility*From*: "David Park" <djmp at earthlink.net>*Date*: Sat, 28 Oct 2006 23:39:27 -0400 (EDT)

Will, I want to add to my first reply. You don't actually need DrawGraphics for this example. Everything is a graphical primitive so just use Show[Graphics[{...}],opts] instead of Draw2D. DrawGraphics would only be usful if you wanted to, say, add fitted curves to the plot or do other customizations. David Park djmp at earthlink.net http://home.earthlink.net/~djmp/ From: Will Robertson [mailto:wspr81 at gmail.com] To: mathgroup at smc.vnet.net Hello, Having been used to plotting graphs in another system, I find myself out of my depth in Mathematica :) In the attached code, I use the MultipleListPlot & Legend packages to try and plot a set of curves with some overlayed points using DisplayTogether. This works well until I try and add a legend (with PlotLegend) as you can see. The second set of data is scaled way out of proportion. Is this a misconception on my part? (I don't really want to do everything in a single MultipleListPlot because I algorithmically assign colours to the first set of graphs with something like manyHues[steps_] := Table[{Hue[i/steps, 1, 0.8]}, {i, 1, steps, 1}] Maybe there's a better way to do this...) Any help would be greatly appreciated. Many thanks! Will Robertson Adelaide, Australia <<Graphics`MultipleListPlot` <<Graphics`Legend` DisplayTogether[ MultipleListPlot[ {{1,0},{2,1},{3,2}}, {{1,1},{2,2},{3,3}}, {{1,2},{2,3},{3,4}}, {PlotJoined\[Rule]True, AxesLabel\[Rule]{"Displacement, mm","Force, N"}, SymbolShape\[Rule] None}], MultipleListPlot[ {{1.5,2.5},{2,2},{2.5,1.5}}, {PlotJoined\[Rule]False}]] DisplayTogether[ MultipleListPlot[ {{1,0},{2,1},{3,2}}, {{1,1},{2,2},{3,3}}, {{1,2},{2,3},{3,4}}, {PlotJoined\[Rule]True, AxesLabel\[Rule]{"Displacement, mm","Force, N"}, SymbolShape\[Rule] None, PlotLegend\[Rule]{"one","two","three"}}], MultipleListPlot[ {{1,3},{2,2},{3,1}}, {PlotJoined\[Rule]False}]]