# Appending a new mark after Plot.plot has been called

**URL:** <https://talk.observablehq.com/t/appending-a-new-mark-after-plot-plot-has-been-called/9060>\
**Category:** Help\
**Created:** [April 3, 2024, 9:29am UTC](https://talk.observablehq.com/t/appending-a-new-mark-after-plot-plot-has-been-called/9060 "2024-04-03T09:29:31Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![josesho](https://yyz2.discourse-cdn.com/flex030/user_avatar/talk.observablehq.com/josesho/32/3412_2.png) [@josesho](https://talk.observablehq.com/u/josesho)\
**Post date:** [April 3, 2024, 9:29am UTC](https://talk.observablehq.com/t/appending-a-new-mark-after-plot-plot-has-been-called/9060/1 "2024-04-03T09:29:31Z")

</div>

Is there a way to add a new mark to a Plot after it has been created?

More broadly, I have a few lines I want to display, but only one of the lines (call this the prediction line) will be displayed when the pointer moves across the chart. I want to be able to only display the prediction line to the right of `pointerX`.

I imagine one option will be to use the input EventListener to feed into a callback that can dynamically filter what should be displayed for the prediction line, but this would require being able to also append a `Plot.line` mark in the callback.

I hope this is clear! Any help is much appreciated, thanks in advance!

---

<div class="post-metadata">

**Author:** ![Fil](https://yyz2.discourse-cdn.com/flex030/user_avatar/talk.observablehq.com/fil/32/207_2.png) [@Fil](https://talk.observablehq.com/u/Fil)\
**Post date:** [April 3, 2024, 9:55am UTC](https://talk.observablehq.com/t/appending-a-new-mark-after-plot-plot-has-been-called/9060/2 "2024-04-03T09:55:39Z")

</div>

It’s not possible to add marks after the chart is rendered, but here are two ways to do what you want:

1. create the mark initially, and use the **render** option to display it later (interactively); or
2. create the line as a new path in the generated SVG, possibly building on the scales to make it consistent with the other marks.

See [document the custom render option by Fil · Pull Request #1811 · observablehq/plot · GitHub](https://github.com/observablehq/plot/pull/1811/files) and [Interactions | Observable Plot](https://observablehq.com/plot/features/interactions#custom-reactivity)
