MathGroup Archive 2001

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

Search the Archive

RE: Hiding parts of a graph

  • To: mathgroup at smc.vnet.net
  • Subject: [mg30370] RE: [mg30336] Hiding parts of a graph
  • From: "David Park" <djmp at earthlink.net>
  • Date: Sun, 12 Aug 2001 02:29:59 -0400 (EDT)
  • Sender: owner-wri-mathgroup at wolfram.com

Amy,

Another wonderful place to use a pure function. Again we Map the plotting
function onto the desired list of values. Pure functions and Map are great
for doing things like this. I also suppressed the display of the individual
plots and reactivated the display in the Show statement.
In your example, the individual functions are not well distinguished, but I
trust that they are in your actual application.

list = Plot[x^2 + #, {x, #, 10}, DisplayFunction -> Identity] & /@ {1, 3,
5.6,
         99, 101.01};
Show[list, DisplayFunction -> $DisplayFunction];

David Park
djmp at earthlink.net
http://home.earthlink.net/~djmp/



> From: Amy Sommer [mailto:amsommer at pacific.mps.ohio-state.edu]
To: mathgroup at smc.vnet.net
>
> I have been trying to plot several variations of a parabola-like function
> on one graph.  The problem that I am encountering is that I only want part
> of each function to appear on the graph.  I have tried the following
> example:
>
> list = Table[Plot[x^2 + n, {x, n, 10}], {n, 0, 10, 1}]
> Show[list]
>
> That example works and graphs each function starting at the desired point.
> The problem I am having is that I do not want equal intervals of n.  I
> have a list of values that I need to use as my n value.  I have tried the
> following with no success:
>
> (This is an extremely simplified example of the function and n values that
> I need to graph)
>
> a={1,3,5.6,99,101.01}
> Plot[Evaluate[ReplaceAll[x^2 + n, n->a]],{x, n, 10}] -- I have also tried
> this with {x, a, 10}
>
> If there are any ideas on how I might go about doing this please let me
> know.
>
> Thanks,
> Amy Sommer
>
>
>
>



  • Prev by Date: Re: Point order
  • Next by Date: Re: Input in batch script
  • Previous by thread: Re: Hiding parts of a graph
  • Next by thread: New Mathematica Courses