Services & Resources / Wolfram Forums
-----
 /
MathGroup Archive
2004
*January
*February
*March
*April
*May
*June
*July
*August
*September
*October
*November
*December
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 2004

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

Search the Archive

Custom Points (filled circles, etc) for Plots and ListPlots (summary)

  • To: mathgroup at smc.vnet.net
  • Subject: [mg49595] Custom Points (filled circles, etc) for Plots and ListPlots (summary)
  • From: AES/newspost <siegman at stanford.edu>
  • Date: Sat, 24 Jul 2004 03:47:25 -0400 (EDT)
  • Sender: owner-wri-mathgroup at wolfram.com

Some weeks back I posted a query about generating custom symbols, such 
as filled or opaque circles, for Plots and ListPlots.  The following is 
a summary of replies I received, and the solution I elected to go with. 

1)  The solution I elected to pursue, as suggested by "Yas" and Bob 
Hanlon, is illustrated by the following example:

        Needs["Graphics`Colors`"];

        dataPoints=Table[{Random[Real,{-1,1}],Random[Real,{-5,5}]},{10}];

        ListPlot[dataPoints, 
                PlotJoined->True,    
                PlotRange->{{-1,1},{-5,5}}, 
                ImageSize->5*72,
        Epilog->{
            White, Disk[#,Scaled[0.01{1, GoldenRatio}]]&/@dataPoints, 
            Red, AbsoluteThickness[3], 
            Circle[#, Scaled[0.01{1, GoldenRatio}]]&/@dataPoints}];

Notes:

*  Doing it this way, with the Disk before the Circle, creates a Circle 
with a red rim and a white fill, and doing this in an Epilog puts this 
white-filled circle over each data point, hiding the lines beneath the 
circle (if that's the way you want it).  Converting the Epilog to a 
Prolog draws the circles before the lines, so that the lines then 
overwrite the circles.

*  If I used a custom AspectRatio, I'd presumably have to substitute 
that for the GoldenRatio.

*  I went with this particular approach because it seems (to me, anyway) 
straightforward and readable; uses only standard Mathematica syntax and 
resources; and seems to produce straightforward and editable results 
when exported as EPS and edited in Illustrator.

2)  "Jens" suggested using the Mathematica \[FilledCircle] symbol, but 
(a) I'm don't see how it differs from just a Point or Disk, i.e., I 
don't see how to adjust fill and rim color separately; and (b) I'm not 
sure (though I didn't test) whether it will produce editable EPS when 
Exported.

3)  Hartmut Wolf wrote detailed suggestions on using the SymbolShape and 
other capabilities in the MultipleListPlot package (and thanks much for 
the information).  This is clearly a broader and more powerful approach, 
with more capability for expansion; but also more than I needed, or 
wanted to try to absorb, for my limited needs.

4)  David Park suggested that nice-looking points could be made using 
the  CirclePoint[location, absolutesize, rimcolor, diskcolor] capability 
from his (?) DrawGraphics package, which I suspect would indeed be very 
good for this and other purposes, but I preferred to stay within 
"native" Mathematica as above.

Thanks to all, and I hope I've not misrepresented anything here.


  • Prev by Date: RE: Quantum Mechanics, Boundary Value Problem
  • Next by Date: Help wanted to find out if bounding function is pierced for n even > 10^7.
  • Previous by thread: Re: 3D Pascal's beta cube
  • Next by thread: Re: Custom Points (filled circles, etc) for Plots and ListPlots (summary)