Re: plotting graphs with asymptotes

• To: mathgroup at yoda.physics.unc.edu
• Subject: Re: plotting graphs with asymptotes
• From: Jack K. Cohen <jkc at dix.mines.colorado.edu>
• Date: Sun, 5 Sep 93 06:34:41 -0600

```Tom Wickham-Jones at Wolfram, solved this problem elegantly a few months ago
in response to a similar query.  I made a nice NeXT notebook---mail me
if you can take NeXTMail.  But here is Tom's code:

Unprotect[Plot];
Plot[ f_, {x_, lims__ /; Length[ {lims}] > 2}, opts___] :=
Module[ (* Tom Wickham-Jones, WRI *)
{temp, eps = 10^-15, d},

temp =
Partition[{lims}, 2, 1]; (* make pairs offset by 1 *)

temp =
( d = (#[] - #[])*eps; (* get a delta *)
# + {d, -d}  (* shrink both ends by delta *)
)&  (* map over pairs to get shrunken pairs *)
/@ temp;

temp =
Plot[f, Evaluate[Prepend[#,x]], (* iter triplets *)
DisplayFunction -> Identity, opts
]& /@ temp;

Show[temp, DisplayFunction -> \$DisplayFunction]]
Protect[Plot];

---
I call this "elegant" because you use this extended Plot in an already
existing Mma syntax (that of NIntegrate) by specifying extra internal
points at singularities:

Plot[Tan[x], {x, 0, Pi/2, 3Pi/2, 2Pi}]

```

• Prev by Date: Re: conditional limits
• Next by Date: Re: conditional limits
{"ft_lang_label":"__label__en","ft_lang_prob":0.72225845,"math_prob":0.794574,"size":1140,"snap":"2021-04-2021-17","text_gpt3_token_len":358,"char_repetition_ratio":0.07746479,"word_repetition_ratio":0.010638298,"special_character_ratio":0.3491228,"punctuation_ratio":0.21304348,"nsfw_num_words":0,"has_unicode_error":false,"math_prob_llama3":0.9860764,"pos_list":[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14],"im_url_duplicate_count":[null,null,null,null,null,null,null,null,null,null,null,null,null,null,null],"WARC_HEADER":"{\"WARC-Type\":\"response\",\"WARC-Date\":\"2021-01-19T19:15:07Z\",\"WARC-Record-ID\":\"<urn:uuid:051430b1-c474-496f-8e77-c9a9e3851267>\",\"Content-Length\":\"44582\",\"Content-Type\":\"application/http; msgtype=response\",\"WARC-Warcinfo-ID\":\"<urn:uuid:176b4d4d-ebfa-4694-9fbf-b4aed354bda4>\",\"WARC-Concurrent-To\":\"<urn:uuid:4e7b7183-e813-40de-be40-3b0b562b1238>\",\"WARC-IP-Address\":\"140.177.205.73\",\"WARC-Target-URI\":\"http://forums.wolfram.com/mathgroup/archive/1993/Sep/msg00002.html\",\"WARC-Payload-Digest\":\"sha1:T7NULQBS4ED5FMOPVW3FV2T4I3YTDEC5\",\"WARC-Block-Digest\":\"sha1:LYSDY4P4G3545LQLPFCP6Q34E26XME2Q\",\"WARC-Identified-Payload-Type\":\"text/html\",\"warc_filename\":\"/cc_download/warc_2021/CC-MAIN-2021-04/CC-MAIN-2021-04_segments_1610703519600.31_warc_CC-MAIN-20210119170058-20210119200058-00490.warc.gz\"}"}