# A question about interaction mode of scatterplot

**URL:** <https://discourse.slicer.org/t/a-question-about-interaction-mode-of-scatterplot/19420>\
**Category:** Development\
**Created:** [August 30, 2021, 11:47pm UTC](https://discourse.slicer.org/t/a-question-about-interaction-mode-of-scatterplot/19420 "2021-08-30T23:47:35Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![chz31](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/chz31/32/77363_2.png) [@chz31](https://discourse.slicer.org/u/chz31)\
**Post date:** [August 30, 2021, 11:47pm UTC](https://discourse.slicer.org/t/a-question-about-interaction-mode-of-scatterplot/19420/1 "2021-08-30T23:47:35Z")

</div>

Hi all,

I am thinking about including a module for offering better interaction about visualizing shape.deformation in a Principal Component (PC) scatterplot. Currently, the SlicerMorph module has functions to visualize shape deformation along each individual PC.

What I am thinking about is that I could draw a line in a PC scatterplot (as the picture below shows). Shape difference along this direction can then be visualized as mean shape deformation. I believe it is doable as long as I combine the visualization of individual PC

In order to do this, I may need to be able to draw a line in a scatterplot and get the coordinates of the two end points as well as the slope of this line. In this way, I can show the shape deformation by combining the deformation along two individual PCs.

Does Slicer include such functions that allow me to interact with the scatterplot?

Thank you very much!

Best,  
Chi

 ![InkedPC1_PC2_plot_LI](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/a/b/abc5c8a128db96ad98309e0aa4f6e95383ce9d5c.jpeg)

---

<div class="post-metadata">

**Author:** ![lassoan](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/lassoan/32/13_2.png) [@lassoan](https://discourse.slicer.org/u/lassoan)\
**Post date:** [August 31, 2021, 2:43am UTC](https://discourse.slicer.org/t/a-question-about-interaction-mode-of-scatterplot/19420/2 "2021-08-31T02:43:19Z")

</div>

The easiest way to draw a line is to add a scatter plot series with two points and set _Interation mode_ → _move points_.

[https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/d/1/d1b65dddce4d9287efe57e4d8db5d03b001b69e3.mp4](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/d/1/d1b65dddce4d9287efe57e4d8db5d03b001b69e3.mp4)

---

<div class="post-metadata">

**Author:** ![chz31](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/chz31/32/77363_2.png) [@chz31](https://discourse.slicer.org/u/chz31)\
**Post date:** [August 31, 2021, 6:24pm UTC](https://discourse.slicer.org/t/a-question-about-interaction-mode-of-scatterplot/19420/3 "2021-08-31T18:24:17Z")

</div>

Thank you! This is very helpful!
