Services & Resources / Wolfram Forums
MathGroup Archive
*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
  • Subject: [mg69596] RE: [mg69589] question about plot
  • From: "David Park" <djmp at>
  • Date: Sun, 17 Sep 2006 06:57:07 -0400 (EDT)

The DrawGraphics package from my web site below has routines to eliminate
'return lines' across discontinuities. There are three versions,
SplitLineOnDistance, SplitLineOnVertical and SplitLineOnSlope.

Here is an example on your function plotted over a domain that contains two


h[x_] := x Tan[x]

    {Draw[h[x], {x, 0, 2Pi}] /. SplitLineOnVertical[100]},
    Axes -> True];

What is the syntactical meaning of all the '***' that you include in your

David Park
djmp at

From: dimmechan at [mailto:dimmechan at]
To: mathgroup at

***Hello to all.

***I have a simple function


ln[1]:=h[x_]:=x Tan[x]

***Here its Plot


***Plot has incorrectly connected the points at p/2.

***There are two approaches to deal with this bug.

***The first is to use a Block structure along with Show

ln[6]:=Block[{$DisplayFunction = Identity}, g1 = Plot[h[x], {x, 0,
ln[7]:=g2 = Plot[h[x], {x, Pi/2, Pi}]];
Show[g1, g2, DisplayFunction \[Rule] $DisplayFunction]

***The other is to define your code. Here is my attempt:




***However my plotdisc[] function has the disadvantage that can deal
with only one
discontinuity each time.

***How can I modify it (or if I can't, I look for another more elegant
code) so that to deal with
any number of discontinuities.

***In other words I look for a function (if mine cannot be modified)
which for example has the same output with

ln[16]:=Block[{$DisplayFunction = Identity}, gg1 = plotdisc[h[x], 0,
Pi, Pi/2];
    gg2 = plotdisc[h[x], Pi, 2Pi, 3Pi/2]];
ln[17]:=Show[gg1, gg2, DisplayFunction \[Rule] $DisplayFunction]

***Thanks in advance for any assistance.

  • Prev by Date: question about DiracDelta
  • Next by Date: Re: Variables Within Homemade Functions
  • Previous by thread: Re: question about plot
  • Next by thread: question about plot