# How to plot a specific gene effect vs different cell lines in DepMap?

**URL:** <https://forum.depmap.org/t/how-to-plot-a-specific-gene-effect-vs-different-cell-lines-in-depmap/3539>\
**Category:** Q&A\
**Tags:** data\
**Created:** [September 2, 2024, 2:11am UTC](https://forum.depmap.org/t/how-to-plot-a-specific-gene-effect-vs-different-cell-lines-in-depmap/3539 "2024-09-02T02:11:51Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![jmankan](https://avatars.discourse-cdn.com/v4/letter/j/9f8e36/32.png) [@jmankan](https://forum.depmap.org/u/jmankan)\
**Post date:** [September 2, 2024, 2:11am UTC](https://forum.depmap.org/t/how-to-plot-a-specific-gene-effect-vs-different-cell-lines-in-depmap/3539/1 "2024-09-02T02:11:51Z")

</div>

For example _gene name_ gene effect on the y-axis and then cell lines as points (Cell lines are in two categories). I am especially struggling on where to find this information.

---

<div class="post-metadata">

**Author:** ![pmontgom](https://yyz1.discourse-cdn.com/flex035/user_avatar/forum.depmap.org/pmontgom/32/4_2.png) [@pmontgom](https://forum.depmap.org/u/pmontgom)\
**Post date:** [September 9, 2024, 8:09pm UTC](https://forum.depmap.org/t/how-to-plot-a-specific-gene-effect-vs-different-cell-lines-in-depmap/3539/2 "2024-09-09T20:09:37Z")

</div>

We don’t have a mechanism to control which axis is used when plotting a single variable. However, one can put gene effect along the x-axis and then cell lines in two different groups.

You’d start by defining a context for the two groups in context manager, and then creating a 1D Density plot, and choosing the gene’s gene effect and the under view options “color by” the context  
 ![image](https://canada1.discourse-cdn.com/flex035/uploads/depmap/original/2X/7/7b7ba4d72cb3e10df2a80cd40cfa0fde293500aa.png)

This will yield two density plots where the points are cell lines and the x-axis is gene effect

 ![image](https://canada1.discourse-cdn.com/flex035/uploads/depmap/original/2X/d/d8121f8f0e1d447c7e4808943b086718bad4dcd1.png)

Is this similar enough to what you were looking for, or is this plot missing information that were trying to capture?

Thanks,  
Phil
