Message Boards Message Boards

1
|
7943 Views
|
4 Replies
|
2 Total Likes
View groups...
Share
Share this post:

Exclude a vertical asymptote from a Plot?

Posted 8 years ago

In a simple plot like this;

f[x_]:=(2x+3)/(3x-2)
Plot[f[x],{x,-3,3}]

I don't want to see the vertical asymptote.

How can I tell the Plot function to do this?

Thank you! Marcel.

POSTED BY: Marcel Pelletier
4 Replies

Hi Tomas,

I will try your technique.

I like Mathematica for the fact that every body can do thing with a different technique!

Thank you!

Marcel Pelletier

POSTED BY: Marcel Pelletier

As an exercise in dealing with FullForm, I suggest also trying this:

f[x_] := (2 x + 3)/(3 x - 2); a = Plot[f[x], {x, -3, 3}]; DeleteCases[a, Line[List[List[, ], List[, ]]], Infinity]

This removes manually the vertical line in the graph.

POSTED BY: Tomas Garza

Hi Sander,

Thank you very much for this help!

Marcel Pelletier

POSTED BY: Marcel Pelletier

Look in the documentation for the option Exclusions

POSTED BY: Sander Huisman
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract