Services & Resources / Wolfram Forums
-----
 /
MathGroup Archive
2006
*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 2006

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

Search the Archive

Re: question about plot

  • To: mathgroup at smc.vnet.net
  • Subject: [mg69606] Re: question about plot
  • From: dimmechan at yahoo.com
  • Date: Sun, 17 Sep 2006 06:57:39 -0400 (EDT)
  • References: <eegb71$ke$1@smc.vnet.net>

Bob and David many thanks for your responses.

Here is my modified function which works as desired, although it cannot
be compared with your (amazing!) solutions.

This time I choose to add mine plotdisc function as a rule for Plot.
It is very simple as you see below.

ln[123]:=Quit

ln[1]:=Unprotect[Plot];
ln[2]:=Plot[f_, x_, a_, b_, c___, {opts___}] := Show[Map[Plot[f, {x,
#[[1]], #[[2]]},
                            DisplayFunction -> Identity, opts] &,
                            Partition[{a, c, b}, 2, 1]],
DisplayFunction -> $DisplayFunction]
ln[3]:=Protect[Plot];

Here is an example of application.

ln[4]:=Plot[x Tan[x], x, 0, 5Pi, Pi/2, 3Pi/2, 5Pi/2, 7Pi/2,
          9Pi/2, {Frame -> True, Axes -> False, FrameTicks -> {Range[0,
5Pi, Pi/2],
          Automatic, None, None}}];

Of course, although this rule is much better than my previous attempt
(it needs just one call of the function now) the problem is you must
clearfy in advance where are the discontinuities.

So here come David's package and Bob's function to deal completely with
this disadvantage.

Dimitris Anagnostou
NTUA


  • Prev by Date: attention 64 bit Mathematica users - would you please test a command for me?
  • Next by Date: Re: Calculation of a very ugly integral
  • Previous by thread: question about plot
  • Next by thread: Re: question about plot