6 Replies Latest reply on Sep 26, 2016 1:30 PM by J. Nolfo

# How to put different colors in different 4 quadrants of Scatter plot graph ????

Hi,

I was trying to put the conditional colors for all the 4 quadrants on scatter Plot graph.  But it is not happening. I tried also reference line to do so but it didn’t work. I have attached the picture of the graph where there are 4 quadrants 1c/2c/3c/4c and I want to put different colors for all the 4 quadrants.

Thanks

Ajit

• ###### 1. Re: How to put different colors in different 4 quadrants of Scatter plot graph ????

Ajit, this thread talks about how to do this, specifically Joe's comment #5.

--Shawn

• ###### 2. Re: How to put different colors in different 4 quadrants of Scatter plot graph ????

Hi Viz,

It was helpful. I went through the attached tableau report but I didn’t get how to make it. Actually It solve my purpose but I need to understand the How factor.

It will be really helpful if you can make me understand how to create this stuff.

Please let me know if you want to look at my raw data.

Thanks,

Ajit

• ###### 3. Re: How to put different colors in different 4 quadrants of Scatter plot graph ????

in case you have not check this link,

basically, using the background images from the map menu.

• ###### 4. Re: How to put different colors in different 4 quadrants of Scatter plot graph ????

HI Beni,

I have checked the link, it was pretty simple and I have already used background image in tableau.

But What Shawan(Data Viz) was trying to show me is totally different form this and was helpful for me but I don’t understand How to go about that……..

Ajit

• ###### 5. Re: How to put different colors in different 4 quadrants of Scatter plot graph ????

Ajit, this is classic Joe Mako: clever, efficient, and difficult to understand (at first glance). I'll try to give you a bit of a road map of what Joe's doing.

I'm going to assume you understand that he is using a dual axis set up to display two different mark types: polygons for the quadrant boxes, and shapes for the scatter plot. I'm also going to assume it's the quadrant polygons you are having difficulties figuring out. I've attached a stripped down version of Joe's workbook with only the quadrant polygons showing. If you right-click in the white space just below the color area and select 'View Data' you'll see how the polygons are drawn:

He uses the Point ID field (values 0-4) to tell Tableau what path to use for drawing the four corners of each of the polygons. To get the coordinates for each point he use a couple of calculated fields. Here's the X Value one:

For our purposes you can ignore the first line, it's just dealing with the scatter plot side of the house. Lines 2-4 is where the polygon values are being determined. On the second line change the 'Median([x])' to say 8 and watch what happens to the quadrants. Do the same thing for the values in lines 3 & 4. This will give you a good idea of how he's generating the coordinates for the boxes. The Y coordinates are figured the same way:

Once you've got the quadrants set up, then you can add in the scatter plot points as a dual axis. Let me know if you have other questions.

--Shawn

1 of 1 people found this helpful
• ###### 6. Re: How to put different colors in different 4 quadrants of Scatter plot graph ????

I know this thread is old and I might not get a response, but figured I try.  This is exactly what I am looking at doing.  However, I am trying to figure out what seems like a first step, and that is establishing the quadrant polygons.  Is this something that was set up within the data itself or do the X Value and Y Value calculations make the box and the table you showed?  Your help is appreciated, if you get this.