Re: List plot with + possible?

• To: mathgroup at smc.vnet.net
• Subject: [mg7564] Re: List plot with + possible?
• From: tharter at nswc.navy.mil (Terry Harter)
• Date: Sun, 15 Jun 1997 16:32:30 -0400 (EDT)
• Organization: Naval Surface Warfare Center, Dahlgren Division
• Sender: owner-wri-mathgroup at wolfram.com

```On June 8, 1997 Sudeep K. Palat wrote:
================================================================
Can one use a '+' or an 'x' instead of points for a ListPlot?

What I am trying to so is to plot a curve with + or x in them as:

-----+----+----+----

or

-----x----x----x----

The purpose is to identify multiple curves in one graph and add a legend.

Any suggestions?

sudeep
======================================================================

First, what version of MMA are you running?  While not *quite* the
same, the following code gives "dots" and "diamonds" as the plotting
identifiers, one for each distinct set of list values:

dot = RegularPolygon[12,.015]
diamond = RegularPolygon[4,.015]

plotbothsetsofpoints = MultipleListPlot[list1,list2,
DotShapes-> {MakeSymbol[dot],MakeSymbol[diamond]},
PlotStyle -> { {RGBColor[1,0,0],PointSize[.350]},
{RGBColor[0,1,0],PointSize[.020]}]

works for Ver 2.2.3  giving you red and green ploting symbology - one color
for each list of points. (I can't say anything about Ver 3.0 as we have not
installed it yet).

To incorporate a legend, try something like:

legend = ShadowBox[{x coord of lower left corner of legend placement,
y coord of lower left corner of legend placement},
{x coord of upper right corner of legend placement,
y coord of upper right corner of legend placement},
ShadowBackground -> GrayLevel[ -you decide- ],
]

showlegend = Show[plotbothsetsofpoints,
Graphics[{legend,{
(* Graphics dot*)
Text[FontForm["Dots are list1",
{"font_name",point_size}],
{x location of start of legend string 1,
y location of start of legend string 1},
{-1.0}],
(* Graphics diamond *)
Text[FontForm["Diamonds are list2",
{"font_name",point_size}]
{x location of start of legend string 2,
y location of start of legend string 2},
{-1.0}]
}
}
]
]

While there  is a LegendListPlot fcn that you can download from MathSource,
I did not have any success with it.

Hope that this helps,

Dr Terry Harter
Code B35
NSWCDD

```

• Prev by Date: Book on logic using Mma
• Next by Date: Re: combinatorics problem
• Previous by thread: Re: List plot with + possible?
• Next by thread: Help in solving wave equation