# Brush functionality in Plot?

**URL:** <https://talk.observablehq.com/t/brush-functionality-in-plot/6536>\
**Category:** Help\
**Created:** [May 10, 2022, 2:07pm UTC](https://talk.observablehq.com/t/brush-functionality-in-plot/6536 "2022-05-10T14:07:02Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![aallman](https://yyz2.discourse-cdn.com/flex030/user_avatar/talk.observablehq.com/aallman/32/4906_2.png) [@aallman](https://talk.observablehq.com/u/aallman)\
**Post date:** [May 10, 2022, 2:07pm UTC](https://talk.observablehq.com/t/brush-functionality-in-plot/6536/1 "2022-05-10T14:07:02Z")

</div>

Is brush or zoom/pan functionality available in Plot? I’ve only seen references to it in github so I’m guessing either it’s still in development or I’m overlooking something in the documentation.

I’m starting to really enjoy working with Plot. Thanks for everyone’s contributions!

Andy

---

<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:** [May 11, 2022, 2:51pm UTC](https://talk.observablehq.com/t/brush-functionality-in-plot/6536/2 "2022-05-11T14:51:09Z")

</div>

We have been working on interaction, and brushes will be there when this lands, but I can’t share a timeline. In the meantime you can use the experimental plugin.

- [Plot.brush (#71) / Fil / Observable](https://observablehq.com/@fil/plot-brush-71)
- [brush, pointer by mbostock · Pull Request #721 · observablehq/plot · GitHub](https://github.com/observablehq/plot/pull/721)
- [Brushing. · Issue #5 · observablehq/plot · GitHub](https://github.com/observablehq/plot/issues/5)

---

<div class="post-metadata">

**Author:** ![aallman](https://yyz2.discourse-cdn.com/flex030/user_avatar/talk.observablehq.com/aallman/32/4906_2.png) [@aallman](https://talk.observablehq.com/u/aallman)\
**Post date:** [May 13, 2022, 1:29pm UTC](https://talk.observablehq.com/t/brush-functionality-in-plot/6536/3 "2022-05-13T13:29:53Z")

</div>

This looks very promising!

Is this the experimental plugin: “Plot = require(await FileAttachment(“plot@14.umd.js”).url())” ?

Thank you!!!

---

<div class="post-metadata">

**Author:** ![mootari](https://yyz2.discourse-cdn.com/flex030/user_avatar/talk.observablehq.com/mootari/32/581_2.png) [@mootari](https://talk.observablehq.com/u/mootari)\
**Post date:** [May 13, 2022, 2:55pm UTC](https://talk.observablehq.com/t/brush-functionality-in-plot/6536/4 "2022-05-13T14:55:21Z")

</div>

@aallman It’s a modified version of Plot. You can use it in your own notebook via

```javascript
import {Plot} from "@fil/plot-brush-71"

```

or aliased with

```javascript
import {Plot as PlotBrush} from "@fil/plot-brush-71"

```

so that you can still use the bundled `Plot` as well as Fil’s version.

---

<div class="post-metadata">

**Author:** ![oscar6echo](https://yyz2.discourse-cdn.com/flex030/user_avatar/talk.observablehq.com/oscar6echo/32/647_2.png) [@oscar6echo](https://talk.observablehq.com/u/oscar6echo)\
**Post date:** [February 17, 2024, 11:06pm UTC](https://talk.observablehq.com/t/brush-functionality-in-plot/6536/5 "2024-02-17T23:06:08Z")

</div>

For info if it helps anyone:  
I could use d3.brush **with** Plot in this notebook.  
But it is not **in** Plot.

> **[Plot: Attempts on Zoom](https://observablehq.com/@oscar6echo/plot-attempts-on-zoom)**
>
> Using Plot.dot and Plot.density. Observations: Ref: https://talk.observablehq.com/t/misaligned-d3-zoom/8728 TLDR: Do not use \`legend\`, \`title\`, \`subtitle\`, \`caption\` options if you use a zoom. The presence in options of \`legend\`, \`title\`, \`subtitle\`,...
