MathGroup Archive 2006

[Date Index] [Thread Index] [Author Index]

Search the Archive

DisplayTogether & PlotLegend incompatibility

  • To: mathgroup at smc.vnet.net
  • Subject: [mg70815] DisplayTogether & PlotLegend incompatibility
  • From: "Will Robertson" <wspr81 at gmail.com>
  • Date: Sat, 28 Oct 2006 05:21:59 -0400 (EDT)

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}]]


  • Prev by Date: Re: package problem
  • Next by Date: Re: DownValues and Cases
  • Previous by thread: Re: Modify a list of pure functions
  • Next by thread: Re: DisplayTogether & PlotLegend incompatibility