Re: DisplayTogether & PlotLegend incompatibility
- To: mathgroup at smc.vnet.net
- Subject: [mg70832] Re: [mg70815] DisplayTogether & PlotLegend incompatibility
- From: "Chris Chiasson" <chris at chiasson.name>
- Date: Sat, 28 Oct 2006 23:38:09 -0400 (EDT)
- References: <200610280921.FAA16113@smc.vnet.net>
Welcome to the insanity of trying to plot something in Mathematica. I recommend "manually" drawing the things you want in the picture. If you don't know how to use Graphics primitives, start at the help entry on Graphics. About the legend: you may have some luck asking Mathematica to draw the legend by itself and then placing that into your plot (via scaling and translation). You may need to read about typesetting and box structures if you want to wrap text inside the legend in a sane manner. Also, there is a small Google group called Mathematica that operates on a faster schedule if you need more help quickly. http://groups.google.com/group/mathematica/ On 10/28/06, Will Robertson <wspr81 at gmail.com> wrote: > 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}]] > > -- http://chris.chiasson.name/
- References:
- DisplayTogether & PlotLegend incompatibility
- From: "Will Robertson" <wspr81@gmail.com>
- DisplayTogether & PlotLegend incompatibility