New graphics primitive: "Curve"?
- To: mathgroup at smc.vnet.net
- Subject: [mg79248] New graphics primitive: "Curve"?
- From: AES <siegman at stanford.edu>
- Date: Sun, 22 Jul 2007 04:18:48 -0400 (EDT)
- Organization: Stanford University
I'd like to create named graphics elements ["curves"] that would contain the graphic content of just a single curve in a Plot or ParametricPlot (no axes or anything else, just the data curve), and that could then be displayed as graphics elements like pseudo primitives, e.g. curveA = Graphics[<some coding>] curveB = Graphics[<more coding>] Show[curveA, curveB, <other graphics stuff>] What might be preferred ways to do this? I suppose one way would be to make a Plot or ParametricPlot with everything but the function curve suppressed? curveA = Plot[f, range, <options to suppress Axes, etc>] Or, is there a way to pull just the curve out of a plot? curveA = Part[Plot[], i] ???? (and if so, is that Part a graphic element already? Or must it then be wrapped in Graphics[]?) Or, generate a Line or a Polygon with lots of points? (Sounds inefficient) Or, what other approaches might be easy, fast, and efficient? [Thanks for any ideas. I've been reading Section 2.10, "The Structure of Graphics" in The Mathematica Book 5.2, but it's hard going.] [And P.S. -- Are there any good reasons to choose between wrapping each individual graphics element in Graphics[] as above and then Show-ing them using the syntax at the top of this msg, or alternatively leaving the individual named elements unwrapped and using instead Show[Graphics[{ curveA, curveB, <other stuff> }]] ]