# How to create a custom coloscale on top of a scatter plot

**URL:** <https://community.plotly.com/t/how-to-create-a-custom-coloscale-on-top-of-a-scatter-plot/3624>\
**Category:** 📊 Plotly Python\
**Created:** [March 13, 2017, 6:37am UTC](https://community.plotly.com/t/how-to-create-a-custom-coloscale-on-top-of-a-scatter-plot/3624 "2017-03-13T06:37:55Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![lycheenmango](https://avatars.discourse-cdn.com/v4/letter/l/9fc29f/32.png) [@lycheenmango](https://community.plotly.com/u/lycheenmango)\
**Post date:** [March 13, 2017, 6:37am UTC](https://community.plotly.com/t/how-to-create-a-custom-coloscale-on-top-of-a-scatter-plot/3624/1 "2017-03-13T06:37:55Z")

</div>

I am really new to Plot.ly (just started working on it yesterday) and I am using the Python offline version.

I am building a simple scatter plot with 2 Categories (Category 1 - square markers, Category 2 - circular markers) and both the markers are black in color. I have used two traces to come to this scatter plot.

Now I want to use another attribute “Algo X” which can have value -1 (red), 0(orange) or 1 (green) and add that to my plot such that the colors of the square and circular markers change based on the value in “Algo X” that is the circle/square become red or orange or green.

Any ideas how I can achieve this?

 ![](https://us1.discourse-cdn.com/flex024/uploads/plot/original/1X/e0e7852e31f65d8deec924bcdf3f07947277f681.PNG)
