MathGroup Archive 2008

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

Search the Archive

Re: Listplot with closed and open symbols

  • To: mathgroup at smc.vnet.net
  • Subject: [mg93492] Re: [mg93482] Listplot with closed and open symbols
  • From: Bob Hanlon <hanlonr at cox.net>
  • Date: Wed, 12 Nov 2008 06:44:09 -0500 (EST)
  • Reply-to: hanlonr at cox.net

{lattice1, lattice2, lattice3, lattice4, lattice5} = 
  RandomReal[{0, 10}, {5, 2}];

{lattice1a, lattice2a, lattice3a, lattice4a, lattice5a} = 
  RandomReal[{0, 10}, {5, 2}];

b = ListPlot[{lattice1, lattice2, lattice3, lattice4, lattice5}, 
  PlotStyle -> {{PointSize[0.04], Red}, {PointSize[0.01], 
     Blue}, {PointSize[0.035], Green}, {PointSize[0.03], 
     Brown}, {PointSize[0.02], Yellow}},
  PlotRange -> {{-0.5, 10.5}, {-0.5, 10.5}}]

Note that in the ListPlot above that all the points are the same size and color. The size and color specified by the first element of PlotStyle since there is only one list of points. However, if you make each point into a separate list:

b = ListPlot[List /@ {lattice1, lattice2, lattice3, lattice4, lattice5}, 
  PlotStyle -> {{PointSize[0.04], Red}, {PointSize[0.01], 
     Blue}, {PointSize[0.035], Green}, {PointSize[0.03], 
     Brown}, {PointSize[0.02], Yellow}},
  PlotRange -> {{-0.5, 10.5}, {-0.5, 10.5}}]

Similarly for ListPlot a, for which you assign the PointSize and the colors are the defaults

a = ListPlot[List /@ {lattice1a, lattice2a, lattice3a, lattice4a, lattice5a}, 
  PlotStyle -> {PointSize[0.04], PointSize[0.01], PointSize[0.035], 
    PointSize[0.03], PointSize[0.02]},
  PlotRange -> {{-0.5, 10.5}, {-0.5, 10.5}}]

By "keep the scaling of the sub-lists" I am guessing that you want the PlotRange fixed as I have done above. I don't know what you mean by "open symbols".


Bob Hanlon

---- kmd <JMDensmore at gmail.com> wrote: 

=============
I have two list plots

b = ListPlot[{lattice1, lattice2, lattice3, lattice4, lattice5},
  PlotStyle -> {{PointSize[0.04], Red}, {PointSize[0.01],
     Blue}, {PointSize[0.035], Green}, {PointSize[0.03],
     Brown}, {PointSize[0.02], Yellow}}]

a = ListPlot[{lattice1a, lattice2a, lattice3a, lattice4a, lattice5a},
  PlotStyle -> {PointSize[0.04], PointSize[0.01], PointSize[0.035],
    PointSize[0.03], PointSize[0.02]}]

how do I get listplot a to have open symbols? I've tried using the
plotmarker option but just can't get it to work. I would also like to
keep the scaling of the sub-lists. Thanks


--

Bob Hanlon



  • Prev by Date: Re: Syntax Coloring
  • Next by Date: Re: Re: Re: 6.0.3 Windows front end won't connect
  • Previous by thread: Re: Listplot with closed and open symbols
  • Next by thread: DensityPlot + LogarithmicScale