1
$\begingroup$

I have a Piecewise. For vertical line I have to add Exclusions -> None.

 a1 = 1; b1 = 2; c1 = 2; L[x_] := (x - a1)/(b1 - a1); R[x_] := (c1 - x)/(c1 - b1); A[x_] = Simplify[Piecewise[{{0, x < a1}, {L[x], a1 <= x <= b1}, {R[x], Inequality[b1, LessEqual, x, Less, c1]}, {0, x >= c1}}, 0]]; p1 = Plot[A[x], {x, a1, c1 + 0.1}, PlotStyle -> {Black, Dashed}, Exclusions -> None] 

What are the other options available? Can I make dashed to * or o. enter image description here

$\endgroup$
5
  • $\begingroup$ Have you read the documentation for DotDashed, Dotted, Dashing, AbsoluteDashing ? $\endgroup$ Commented Apr 22, 2021 at 10:09
  • $\begingroup$ You can remove Exclusions->None and add ExclusionsStyle -> {Directive[Blue, Dotted], Directive[Red, AbsolutePointSize[10]]} $\endgroup$ Commented Apr 22, 2021 at 10:14
  • $\begingroup$ @yarchik My goal is to replace the all dash with circles. $\endgroup$ Commented Apr 22, 2021 at 10:53
  • $\begingroup$ You can try PlotStyle -> {None}, Mesh -> 10, MeshStyle -> Automatic $\endgroup$ Commented Apr 22, 2021 at 11:49
  • $\begingroup$ @yarchik I use it. But this style not work for ExclusionsStyle $\endgroup$ Commented Apr 22, 2021 at 11:58

1 Answer 1

2
$\begingroup$

You can use the option Mesh with PlotStyle -> None (as suggested by yarchik in comments) and post-process Plot output to replace mesh Points and the exclusion Line with desired markers:

Normal[Plot[A[x], {x, a1, c1 + 0.1}, PlotStyle -> None, ExclusionsStyle -> Blue, Mesh -> 30, MeshStyle -> Blue]] /. {Point[x_] :> Inset["○", x], Line[x_] :> (Inset["○", #] & /@ BSplineFunction[x] /@ Rest @ Subdivide[20])} 

enter image description here

Note: We get the same picture if we replace PlotStyle -> None with MeshShading -> {None, None}.

$\endgroup$

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.