Group Abstract Group Abstract

Message Boards Message Boards

0
|
39 Views
|
2 Replies
|
2 Total Likes
View groups...
Share
Share this post:

How to add a perpendicular symbol at the intersection of two mutually perpendicular lines?

Posted 2 days ago
ContourPlot[Evaluate@{x + y == 1, x - y == 1}, {x, -2, 2}, {y, -2, 2}]

enter image description here

How can I add the perpendicularity symbol (like the red symbol shown) exactly at the vertex where the two lines meet, to indicate that they are mutually perpendicular?

POSTED BY: Wen Dao
2 Replies

Playing around with this problem I came up with a couple of variations:

ContourPlot[{x + y == 1, x - y == 1},
 {x, -2, 2}, {y, -2, 2},
 Epilog -> Translate[Rotate[Line[1/5 {{1, 0},
       {1, 1}, {0, 1}}], Pi/4, {0, 0}],
   {1, 0}]]
ContourPlot[{x + y == 1, x - y == 1,
  ChessboardDistance[{x + y, x - y},
    {1, 1}] == 1/5},
 {x, -2, 2}, {y, -2, 2},
 Exclusions -> None]
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