# Set dashed lines in plot points?

**URL:** <https://community.wolfram.com/t/set-dashed-lines-in-plot-points/14506>\
**Category:** Questions\
**Tags:** algebra, calculus, geometry, graphics-and-visualization\
**Created:** [July 21, 2019, 7:24pm UTC](https://community.wolfram.com/t/set-dashed-lines-in-plot-points/14506 "2019-07-21T19:24:28Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![dimipk](https://avatars.discourse-cdn.com/v4/letter/d/e8c25b/32.png) [@dimipk](https://community.wolfram.com/u/dimipk)\
**Post date:** [July 21, 2019, 7:24pm UTC](https://community.wolfram.com/t/set-dashed-lines-in-plot-points/14506/1 "2019-07-21T19:24:28Z")

</div>

hi,  
i’made a graphic represantation of f(x)=2x function and i want to mark some of the points with dashed lines across the axes x and y.Can anybody help me please?Below i give you the code so far.  
Thank you.

```
Plot[{2 x}, {x, 0, 10}, PlotLabel -> ??????? ?????????, AxesLabel -> {?????????, ???????}, 
 Epilog -> {PointSize[Large], Point[{{0, 0}, {1, 2}, {2, 4}, {3, 6}, {6, 12}, {10, 20}}]}, 
 Ticks -> {{0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10}, {0, 1, 2, 3, 5, 10, 12,15, 20}}]

```

---

<div class="post-metadata">

**Author:** ![rohitnamjoshi](https://avatars.discourse-cdn.com/v4/letter/r/f1d935/32.png) [@rohitnamjoshi](https://community.wolfram.com/u/rohitnamjoshi)\
**Post date:** [July 21, 2019, 10:16pm UTC](https://community.wolfram.com/t/set-dashed-lines-in-plot-points/14506/2 "2019-07-21T22:16:40Z")

</div>

Hi Dimitris,

Is this what you are trying to do?

```
points = {{0, 0}, {1, 2}, {2, 4}, {3, 6}, {6, 12}, {10, 20}};
yAxisPoints = {0, Last[#]} & /@ points;
xAxisPoints = {First[#], 0} & /@ points;
yLines = {Directive[Dashed], Line[#]} & /@ Transpose[{points, yAxisPoints}];
xLines = {Directive[Dashed], Line[#]} & /@ Transpose[{points, xAxisPoints}];

Plot[{2 x}, {x, 0, 10}, 
 Epilog -> {PointSize[Large], Point[points], yLines, xLines}, 
 Ticks -> {{0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10}, {0, 1, 2, 3, 5, 10, 12, 15, 20}}]

```

I left out the labels

 ![10492plot.png](https://global.discourse-cdn.com/wolfram/original/3X/7/a/7adee46bce2d1892ae4d6724d2a102ad328bbafa.png)

---

<div class="post-metadata">

**Author:** ![dimipk](https://avatars.discourse-cdn.com/v4/letter/d/e8c25b/32.png) [@dimipk](https://community.wolfram.com/u/dimipk)\
**Post date:** [July 22, 2019, 8:47am UTC](https://community.wolfram.com/t/set-dashed-lines-in-plot-points/14506/3 "2019-07-22T08:47:40Z")

</div>

Yes, thank you very much for the reply!
