# Brush not working anymore!

**URL:** <https://talk.observablehq.com/t/brush-not-working-anymore/4430>\
**Category:** Help\
**Created:** [January 5, 2021, 2:58pm UTC](https://talk.observablehq.com/t/brush-not-working-anymore/4430 "2021-01-05T14:58:54Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Emo-Lightning](https://yyz2.discourse-cdn.com/flex030/user_avatar/talk.observablehq.com/emo-lightning/32/4060_2.png) [@Emo-Lightning](https://talk.observablehq.com/u/Emo-Lightning)\
**Post date:** [January 5, 2021, 2:58pm UTC](https://talk.observablehq.com/t/brush-not-working-anymore/4430/1 "2021-01-05T14:58:54Z")

</div>

Hi!  
Why is it when i try to change the shapes from circles to squares(rectangles) in this code:

> **[Brushable Scatterplot Matrix](https://observablehq.com/@d3/brushable-scatterplot-matrix)**
>
> This scatterplot matrix allows brushing to select data points in one cell, and highlight them across all other cells.

… the brush doesn’t work any more?  
While, if i change it in this code:

> **[Brushable Scatterplot](https://observablehq.com/@d3/brushable-scatterplot)**
>
> This chart shows the inverse relationship between engine power (y-axis) and fuel efficiency (x-axis) in cars from 1970–1982. Brushing this scatterplot will show the selected data points. Thanks to John Alexis Guerra Gómez for suggestions.

… it still works?

What could be the difference even though it’s the same concept for the code but instead of a single plot where the brush is working, the SPLOM (scatter-plot matrix) doesn’t work with brushing with shapes other than circles? 😕

---

<div class="post-metadata">

**Author:** ![radames](https://yyz2.discourse-cdn.com/flex030/user_avatar/talk.observablehq.com/radames/32/1699_2.png) [@radames](https://talk.observablehq.com/u/radames)\
**Post date:** [January 5, 2021, 7:46pm UTC](https://talk.observablehq.com/t/brush-not-working-anymore/4430/2 "2021-01-05T19:46:35Z")

</div>

hi @Emo-Lightning do you have a work in progress notebook?

It does work if you change shapes, it just need a few tweaks

https://observablehq.com/embed/26009f2ff80a0508?cell=viewof+selection

> **[Comparing ‘Brushable Scatterplot Matrix’ by D3 to ‘Brushable Scatterplot...](https://observablehq.com/compare/4710d9b97a7416b3@270...26009f2ff80a0508@289)**
>
> A comparison of two Observable notebooks.

---

<div class="post-metadata">

**Author:** ![Emo-Lightning](https://yyz2.discourse-cdn.com/flex030/user_avatar/talk.observablehq.com/emo-lightning/32/4060_2.png) [@Emo-Lightning](https://talk.observablehq.com/u/Emo-Lightning)\
**Post date:** [January 5, 2021, 8:27pm UTC](https://talk.observablehq.com/t/brush-not-working-anymore/4430/3 "2021-01-05T20:27:06Z")

</div>

OMG!  
Thank you soooo much for your help! 😭  
It took me hours and i couldn’t solve this 😅  
Apparently i had 2 mistakes which your code helped me figure out:

1. at the beginning i didn’t change this line  
svg.append(“style”) .text(`circle.hidden { fill: #000; fill-opacity: 1; r: 1px; }`);  
to rect instead of circle…
2. in the brush function i called circles instead of rectangles!

I busted my eyes out trying to figure out what was the issue and searching everywhere, but all i needed was another pair of eyes to pinpoint what i forgot… I feel so dumb hahaha…  
Thank you sincerely once again 🤗
