Group Abstract Group Abstract

Message Boards Message Boards

0
|
2.9K Views
|
1 Reply
|
2 Total Likes
View groups...
Share
Share this post:

Make a continuous plot and fill closed ranges for shear diagram?

Posted 5 years ago
POSTED BY: Gustavo Tena

I would use Piecewise:

f[x_] := Piecewise[{{40 - 6 x, 0 <= x < 3}, {12 - 6 x, 
     3 <= x < 8}, {60 - 6 x, 8 <= x <= 10}}];
Plot[f[x], {x, 0, 10}, Filling -> Axis]
Plot[f[x], {x, 0, 10}, Exclusions -> Automatic, 
 ExclusionsStyle -> Directive[Red, Dashed]]
Show[%, %%]

Curiously, I could not combine Exclusions with Filling in a single Plot command.

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