MathGroup Archive 2006

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

Search the Archive

Re: Change Symbol in ListPlot

  • To: mathgroup at smc.vnet.net
  • Subject: [mg67532] Re: [mg67507] Change Symbol in ListPlot
  • From: Bob Hanlon <hanlonr at cox.net>
  • Date: Fri, 30 Jun 2006 04:13:54 -0400 (EDT)
  • Reply-to: hanlonr at cox.net
  • Sender: owner-wri-mathgroup at wolfram.com

Use MultipleListPlot instead of ListPlot

Needs["Statistics`"];
Needs["Graphics`"];

dist=NormalDistribution[2,1.5];
SeedRandom[1];
x1=RandomArray[dist,100];

dist2=NormalDistribution[0,1];
SeedRandom[2];
y1=RandomArray[dist2,100];

z=0.8*x1+y1;

cy=Transpose[{x1,z}];

MultipleListPlot[cy,
    Frame->True,
    FrameLabel->{"t1","z"},
    SymbolShape->MakeSymbol[{
          Line[{{2,2},{-2,-2}}],
          Line[{{-2,2},{2,-2}}]}],
    SymbolStyle->GrayLevel[0.1]];

Show[Graphics[ 
       {MakeSymbol[{
              Line[{{2,2},{-2,-2}}],
              Line[{{-2,2},{2,-2}}]}]/@cy}], 
    Frame -> True,Axes->True,
    FrameLabel->{"t1","z"}];


Bob Hanlon

---- Claus <Clausenator at gmail.com> wrote: 
> Hello,
> I'm creating a List Plot in the following way. That is fine, "but" it 
> creates dots as the symbols. Is there a way to change the symbol (from a 
> dot to say a cross) in a ListPlot environment?
> I got it to change in a Graphics environment, but then there are no 
> axes. Which environment is better for which occasions?
> Thank you all for your help, I am really new to Mathematica!
> 
> Now the "code" with Listplot, that I can make to show plots only:
> <<Statistics`StatisticsPlots`
> <<Statistics`NormalDistribution`
> 
> dist=NormalDistribution[2,1.5];
> SeedRandom[1];
> x1=RandomArray[dist,100];
> 
> dist2-NormalDistribution[0,1];
> SeedRandom[2];
> y1=RandomArray[dist2,100];
> 
> z=0.8*x1+y1
> 
> cy=Transpose[{x1,z}];
> 
> ListPlot[cy, Frame -> True, FrameLabel -> {"t1", "z"},
>      PlotStyle -> {GrayLevel[0.1], AbsolutePointSize[10]}];
> 
> \\If I use the Graphics package, I can use "PlotSymbol", but I don't 
> have axes:
> 
> Show[Graphics[
>        {PlotSymbol[Box, 5] /@ cy2}], Frame -> True];
> 
> 
> 
> 
> Thanks for your help!
> Claus
> 


  • Prev by Date: Recognizing newline character in regular expressions
  • Next by Date: Color names and the 10 elementary colors?
  • Previous by thread: RE: Change Symbol in ListPlot
  • Next by thread: Bugs--Bugs Report in List Operation