Skip to main content
deleted 46 characters in body
Source Link

There is a good demonstration of how ExclusionStyleExclusionsStyle works here. Check
Plot[Floor[x], {x, 0, 5}, ExclusionsStyle -> {Red, Blue}]

If you use the second form of ExclusionsStyle, you will see the points (boundary of exclusion region) that are being connected withby your asymptote:

Plot[1/(x - 1)^3, {x, -5, 5}, PlotRange -> {{-5, 5}, {-5, 25}}, PlotStyle -> {Thick}, BaseStyle -> {FontSize -> 14}, Exclusions -> {x - 1 == 0}, ExclusionsStyle -> {Directive[Red, Dashed], Directive[PointSize -> 0.05, Green]}] 

enter image description hereplot with asymptote

When you have even powerpowers, those two points degenerate into one point and your line becomes invisible.

enter image description hereno asymptote

A possible workaround would be drawing the line separately with Epilog or ListPlot

Plot[1/(x - 1)^2, {x, -5, 5}, PlotRange -> {{-5, 5}, {-5, 5}}, PlotStyle -> {Thick}, BaseStyle -> {FontSize -> 14}, Epilog -> {Directive[Red, Dashed], Line[{{1, -1000}, {1, 1000}}]}] 

Or

Show[Plot[1/(x - 1)^2, {x, -5, 5}, PlotRange -> {{-5, 5}, {-5, 5}}, PlotStyle -> {Thick}, BaseStyle -> {FontSize -> 14}], ListPlot[{{1, -1000}, {1, 1000}}, Joined -> True, PlotStyle -> Directive[Red, Dashed]]] 

Or per Kuba's comment:

Plot[1/(x - 1)^2, {x, -5, 5}, PlotRange -> {{-5, 5}, {-5, 5}}, PlotStyle -> {Thick}, BaseStyle -> {FontSize -> 14}, GridLines -> {{1}, None}, GridLinesStyle -> Directive[Red, Dashed]] 

enter image description herealternative

In the most general case, when your asymptote isn't horizontal or vertical, you will need to plot it as a separate plot. So Exclusions is not the best option:

Plot[{4/(x^2 + 1) + x, x}, {x, -5, 5}, PlotRange -> {{-5, 5}, {-5, 5}},   PlotStyle -> {Thick, Directive[Red, Dashed]}, BaseStyle -> {FontSize -> 14}] 

enter image description hereoblique asymptote

There is a good demonstration how ExclusionStyle works here. Check
Plot[Floor[x], {x, 0, 5}, ExclusionsStyle -> {Red, Blue}]

If you use the second form of ExclusionsStyle you will see the points (boundary of exclusion region) that are being connected with your asymptote:

Plot[1/(x - 1)^3, {x, -5, 5}, PlotRange -> {{-5, 5}, {-5, 25}}, PlotStyle -> {Thick}, BaseStyle -> {FontSize -> 14}, Exclusions -> {x - 1 == 0}, ExclusionsStyle -> {Directive[Red, Dashed], Directive[PointSize -> 0.05, Green]}] 

enter image description here

When you have even power those two points degenerate into one point and your line becomes invisible.

enter image description here

A possible workaround would be drawing the line separately with Epilog or ListPlot

Plot[1/(x - 1)^2, {x, -5, 5}, PlotRange -> {{-5, 5}, {-5, 5}}, PlotStyle -> {Thick}, BaseStyle -> {FontSize -> 14}, Epilog -> {Directive[Red, Dashed], Line[{{1, -1000}, {1, 1000}}]}] 

Or

Show[Plot[1/(x - 1)^2, {x, -5, 5}, PlotRange -> {{-5, 5}, {-5, 5}}, PlotStyle -> {Thick}, BaseStyle -> {FontSize -> 14}], ListPlot[{{1, -1000}, {1, 1000}}, Joined -> True, PlotStyle -> Directive[Red, Dashed]]] 

Or per Kuba's comment:

Plot[1/(x - 1)^2, {x, -5, 5}, PlotRange -> {{-5, 5}, {-5, 5}}, PlotStyle -> {Thick}, BaseStyle -> {FontSize -> 14}, GridLines -> {{1}, None}, GridLinesStyle -> Directive[Red, Dashed]] 

enter image description here

In most general case, when your asymptote isn't horizontal or vertical, you will need to plot it as a separate plot. So Exclusions is not the best option:

Plot[{4/(x^2 + 1) + x, x}, {x, -5, 5}, PlotRange -> {{-5, 5}, {-5, 5}}, PlotStyle -> {Thick, Directive[Red, Dashed]}, BaseStyle -> {FontSize -> 14}] 

enter image description here

There is a good demonstration of how ExclusionsStyle works here. Check
Plot[Floor[x], {x, 0, 5}, ExclusionsStyle -> {Red, Blue}]

If you use the second form of ExclusionsStyle, you will see the points (boundary of exclusion region) that are being connected by your asymptote:

Plot[1/(x - 1)^3, {x, -5, 5}, PlotRange -> {{-5, 5}, {-5, 25}}, PlotStyle -> {Thick}, BaseStyle -> {FontSize -> 14}, Exclusions -> {x - 1 == 0}, ExclusionsStyle -> {Directive[Red, Dashed], Directive[PointSize -> 0.05, Green]}] 

plot with asymptote

When you have even powers, those two points degenerate into one point and your line becomes invisible.

no asymptote

A possible workaround would be drawing the line separately with Epilog or ListPlot

Plot[1/(x - 1)^2, {x, -5, 5}, PlotRange -> {{-5, 5}, {-5, 5}}, PlotStyle -> {Thick}, BaseStyle -> {FontSize -> 14}, Epilog -> {Directive[Red, Dashed], Line[{{1, -1000}, {1, 1000}}]}] 

Or

Show[Plot[1/(x - 1)^2, {x, -5, 5}, PlotRange -> {{-5, 5}, {-5, 5}}, PlotStyle -> {Thick}, BaseStyle -> {FontSize -> 14}], ListPlot[{{1, -1000}, {1, 1000}}, Joined -> True, PlotStyle -> Directive[Red, Dashed]]] 

Or per Kuba's comment:

Plot[1/(x - 1)^2, {x, -5, 5}, PlotRange -> {{-5, 5}, {-5, 5}}, PlotStyle -> {Thick}, BaseStyle -> {FontSize -> 14}, GridLines -> {{1}, None}, GridLinesStyle -> Directive[Red, Dashed]] 

alternative

In the most general case, when your asymptote isn't horizontal or vertical, you will need to plot it as a separate plot. So Exclusions is not the best option:

Plot[{4/(x^2 + 1) + x, x}, {x, -5, 5}, PlotRange -> {{-5, 5}, {-5, 5}},   PlotStyle -> {Thick, Directive[Red, Dashed]}, BaseStyle -> {FontSize -> 14}] 

oblique asymptote

added 408 characters in body
Source Link
BlacKow
  • 6.5k
  • 20
  • 33

There is a good demonstration how ExclusionStyle works here. Check
Plot[Floor[x], {x, 0, 5}, ExclusionsStyle -> {Red, Blue}]

If you use the second form of ExclusionsStyle you will see the points (boundary of exclusion region) that are being connected with your asymptote:

Plot[1/(x - 1)^3, {x, -5, 5}, PlotRange -> {{-5, 5}, {-5, 25}}, PlotStyle -> {Thick}, BaseStyle -> {FontSize -> 14}, Exclusions -> {x - 1 == 0}, ExclusionsStyle -> {Directive[Red, Dashed], Directive[PointSize -> 0.05, Green]}] 

enter image description here

When you have even power those two points degenerate into one point and your line becomes invisible.

enter image description here

A possible workaround would be drawing the line separately with Epilog or ListPlot

Plot[1/(x - 1)^2, {x, -5, 5}, PlotRange -> {{-5, 5}, {-5, 5}}, PlotStyle -> {Thick}, BaseStyle -> {FontSize -> 14}, Epilog -> {Directive[Red, Dashed], Line[{{1, -1000}, {1, 1000}}]}] 

Or

Show[Plot[1/(x - 1)^2, {x, -5, 5}, PlotRange -> {{-5, 5}, {-5, 5}}, PlotStyle -> {Thick}, BaseStyle -> {FontSize -> 14}], ListPlot[{{1, -1000}, {1, 1000}}, Joined -> True, PlotStyle -> Directive[Red, Dashed]]] 

Or per Kuba's comment:

Plot[1/(x - 1)^2, {x, -5, 5}, PlotRange -> {{-5, 5}, {-5, 5}}, PlotStyle -> {Thick}, BaseStyle -> {FontSize -> 14}, GridLines -> {{1}, None}, GridLinesStyle -> Directive[Red, Dashed]] 

enter image description here

In most general case, when your asymptote isn't horizontal or vertical, you will need to plot it as a separate plot. So Exclusions is not the best option:

Plot[{4/(x^2 + 1) + x, x}, {x, -5, 5}, PlotRange -> {{-5, 5}, {-5, 5}}, PlotStyle -> {Thick, Directive[Red, Dashed]}, BaseStyle -> {FontSize -> 14}] 

enter image description here

There is a good demonstration how ExclusionStyle works here. Check
Plot[Floor[x], {x, 0, 5}, ExclusionsStyle -> {Red, Blue}]

If you use the second form of ExclusionsStyle you will see the points (boundary of exclusion region) that are being connected with your asymptote:

Plot[1/(x - 1)^3, {x, -5, 5}, PlotRange -> {{-5, 5}, {-5, 25}}, PlotStyle -> {Thick}, BaseStyle -> {FontSize -> 14}, Exclusions -> {x - 1 == 0}, ExclusionsStyle -> {Directive[Red, Dashed], Directive[PointSize -> 0.05, Green]}] 

enter image description here

When you have even power those two points degenerate into one point and your line becomes invisible.

enter image description here

A possible workaround would be drawing the line separately with Epilog or ListPlot

Plot[1/(x - 1)^2, {x, -5, 5}, PlotRange -> {{-5, 5}, {-5, 5}}, PlotStyle -> {Thick}, BaseStyle -> {FontSize -> 14}, Epilog -> {Directive[Red, Dashed], Line[{{1, -1000}, {1, 1000}}]}] 

Or

Show[Plot[1/(x - 1)^2, {x, -5, 5}, PlotRange -> {{-5, 5}, {-5, 5}}, PlotStyle -> {Thick}, BaseStyle -> {FontSize -> 14}], ListPlot[{{1, -1000}, {1, 1000}}, Joined -> True, PlotStyle -> Directive[Red, Dashed]]] 

Or per Kuba's comment:

Plot[1/(x - 1)^2, {x, -5, 5}, PlotRange -> {{-5, 5}, {-5, 5}}, PlotStyle -> {Thick}, BaseStyle -> {FontSize -> 14}, GridLines -> {{1}, None}, GridLinesStyle -> Directive[Red, Dashed]] 

enter image description here

There is a good demonstration how ExclusionStyle works here. Check
Plot[Floor[x], {x, 0, 5}, ExclusionsStyle -> {Red, Blue}]

If you use the second form of ExclusionsStyle you will see the points (boundary of exclusion region) that are being connected with your asymptote:

Plot[1/(x - 1)^3, {x, -5, 5}, PlotRange -> {{-5, 5}, {-5, 25}}, PlotStyle -> {Thick}, BaseStyle -> {FontSize -> 14}, Exclusions -> {x - 1 == 0}, ExclusionsStyle -> {Directive[Red, Dashed], Directive[PointSize -> 0.05, Green]}] 

enter image description here

When you have even power those two points degenerate into one point and your line becomes invisible.

enter image description here

A possible workaround would be drawing the line separately with Epilog or ListPlot

Plot[1/(x - 1)^2, {x, -5, 5}, PlotRange -> {{-5, 5}, {-5, 5}}, PlotStyle -> {Thick}, BaseStyle -> {FontSize -> 14}, Epilog -> {Directive[Red, Dashed], Line[{{1, -1000}, {1, 1000}}]}] 

Or

Show[Plot[1/(x - 1)^2, {x, -5, 5}, PlotRange -> {{-5, 5}, {-5, 5}}, PlotStyle -> {Thick}, BaseStyle -> {FontSize -> 14}], ListPlot[{{1, -1000}, {1, 1000}}, Joined -> True, PlotStyle -> Directive[Red, Dashed]]] 

Or per Kuba's comment:

Plot[1/(x - 1)^2, {x, -5, 5}, PlotRange -> {{-5, 5}, {-5, 5}}, PlotStyle -> {Thick}, BaseStyle -> {FontSize -> 14}, GridLines -> {{1}, None}, GridLinesStyle -> Directive[Red, Dashed]] 

enter image description here

In most general case, when your asymptote isn't horizontal or vertical, you will need to plot it as a separate plot. So Exclusions is not the best option:

Plot[{4/(x^2 + 1) + x, x}, {x, -5, 5}, PlotRange -> {{-5, 5}, {-5, 5}}, PlotStyle -> {Thick, Directive[Red, Dashed]}, BaseStyle -> {FontSize -> 14}] 

enter image description here

added 233 characters in body
Source Link
BlacKow
  • 6.5k
  • 20
  • 33

There is a good demonstration how ExclusionStyle works here. Check
Plot[Floor[x], {x, 0, 5}, ExclusionsStyle -> {Red, Blue}]

If you use the second form of ExclusionsStyle you will see the points (boundary of exclusion region) that are being connected with your asymptote:

Plot[1/(x - 1)^3, {x, -5, 5}, PlotRange -> {{-5, 5}, {-5, 25}}, PlotStyle -> {Thick}, BaseStyle -> {FontSize -> 14}, Exclusions -> {x - 1 == 0}, ExclusionsStyle -> {Directive[Red, Dashed], Directive[PointSize -> 0.05, Green]}] 

enter image description here

When you have even power those two points degenerate into one point and your line becomes invisible.

enter image description here

A possible workaround would be drawing the line separately with Epilog or ListPlot

Plot[1/(x - 1)^2, {x, -5, 5}, PlotRange -> {{-5, 5}, {-5, 5}}, PlotStyle -> {Thick}, BaseStyle -> {FontSize -> 14}, Epilog -> {Directive[Red, Dashed], Line[{{1, -1000}, {1, 1000}}]}] 

Or

Show[Plot[1/(x - 1)^2, {x, -5, 5}, PlotRange -> {{-5, 5}, {-5, 5}}, PlotStyle -> {Thick}, BaseStyle -> {FontSize -> 14}], ListPlot[{{1, -1000}, {1, 1000}}, Joined -> True, PlotStyle -> Directive[Red, Dashed]]] 

Or per Kuba's comment:

Plot[1/(x - 1)^2, {x, -5, 5}, PlotRange -> {{-5, 5}, {-5, 5}}, PlotStyle -> {Thick}, BaseStyle -> {FontSize -> 14}, GridLines -> {{1}, None}, GridLinesStyle -> Directive[Red, Dashed]] 

enter image description here

There is a good demonstration how ExclusionStyle works here. Check
Plot[Floor[x], {x, 0, 5}, ExclusionsStyle -> {Red, Blue}]

If you use the second form of ExclusionsStyle you will see the points (boundary of exclusion region) that are being connected with your asymptote:

Plot[1/(x - 1)^3, {x, -5, 5}, PlotRange -> {{-5, 5}, {-5, 25}}, PlotStyle -> {Thick}, BaseStyle -> {FontSize -> 14}, Exclusions -> {x - 1 == 0}, ExclusionsStyle -> {Directive[Red, Dashed], Directive[PointSize -> 0.05, Green]}] 

enter image description here

When you have even power those two points degenerate into one point and your line becomes invisible.

enter image description here

A possible workaround would be drawing the line separately with Epilog or ListPlot

Plot[1/(x - 1)^2, {x, -5, 5}, PlotRange -> {{-5, 5}, {-5, 5}}, PlotStyle -> {Thick}, BaseStyle -> {FontSize -> 14}, Epilog -> {Directive[Red, Dashed], Line[{{1, -1000}, {1, 1000}}]}] 

Or

Show[Plot[1/(x - 1)^2, {x, -5, 5}, PlotRange -> {{-5, 5}, {-5, 5}}, PlotStyle -> {Thick}, BaseStyle -> {FontSize -> 14}], ListPlot[{{1, -1000}, {1, 1000}}, Joined -> True, PlotStyle -> Directive[Red, Dashed]]] 

enter image description here

There is a good demonstration how ExclusionStyle works here. Check
Plot[Floor[x], {x, 0, 5}, ExclusionsStyle -> {Red, Blue}]

If you use the second form of ExclusionsStyle you will see the points (boundary of exclusion region) that are being connected with your asymptote:

Plot[1/(x - 1)^3, {x, -5, 5}, PlotRange -> {{-5, 5}, {-5, 25}}, PlotStyle -> {Thick}, BaseStyle -> {FontSize -> 14}, Exclusions -> {x - 1 == 0}, ExclusionsStyle -> {Directive[Red, Dashed], Directive[PointSize -> 0.05, Green]}] 

enter image description here

When you have even power those two points degenerate into one point and your line becomes invisible.

enter image description here

A possible workaround would be drawing the line separately with Epilog or ListPlot

Plot[1/(x - 1)^2, {x, -5, 5}, PlotRange -> {{-5, 5}, {-5, 5}}, PlotStyle -> {Thick}, BaseStyle -> {FontSize -> 14}, Epilog -> {Directive[Red, Dashed], Line[{{1, -1000}, {1, 1000}}]}] 

Or

Show[Plot[1/(x - 1)^2, {x, -5, 5}, PlotRange -> {{-5, 5}, {-5, 5}}, PlotStyle -> {Thick}, BaseStyle -> {FontSize -> 14}], ListPlot[{{1, -1000}, {1, 1000}}, Joined -> True, PlotStyle -> Directive[Red, Dashed]]] 

Or per Kuba's comment:

Plot[1/(x - 1)^2, {x, -5, 5}, PlotRange -> {{-5, 5}, {-5, 5}}, PlotStyle -> {Thick}, BaseStyle -> {FontSize -> 14}, GridLines -> {{1}, None}, GridLinesStyle -> Directive[Red, Dashed]] 

enter image description here

added 207 characters in body
Source Link
BlacKow
  • 6.5k
  • 20
  • 33
Loading
added 690 characters in body
Source Link
BlacKow
  • 6.5k
  • 20
  • 33
Loading
Source Link
BlacKow
  • 6.5k
  • 20
  • 33
Loading