5 Replies Latest reply on Jul 11, 2013 11:31 PM by eraufars

Logarithmic tick marks, logarithmic bins, and coloured parts of background in a plot

I want to create a plot like the picture attached, and put scatter plot circles on it based on 2 measures.

I have some specific problems to solve for this:

1. The Y-axis. Logarithmic I can make it, with range from 1 to 1000 and tick marks at each power of 10. But a normal such plot starts at the origin with the value 1, and I want another 'section' from  1 down to 0.

2. The X axis. Even worse here. I read about bins and try to figure it. Each 'section' of the x axis is logarithmic in itself, from 0 to 1,   from 1 to 5,   from 5 to 25  and so on, but as you can see the axis as a whole is not logarithmis in the normal way.

3. Some parts of the background are to be custom colored (but with constant colors, not depending on any measure).

Does anyone have pointers for how to achieve this?

• 1. Re: Logarithmic tick marks, logarithmic bins, and coloured parts of background in a plot

Some problems solved, others not.

For the colored sections, I found it quite easy to create some images of colored squares and add them as background images with the menu Map - Background Images

This allows you to specify the coordinates of the image, perfect with rectangles as these.

For the Y axis, it was good enough to let it display from 0.1  to 1000 and use 0.1 instead of 0 at the origin.

However, for the X axis, it seems impossible to do just that. Why would it be any different? I set it to fixed range from 0.1 to 100 but then it gives me an X axis from 1 to 200. What is the problem here?

I'm just trying to do the X axis as a normal log axis as a first step. Will look more into grouping after.

• 2. Re: Logarithmic tick marks, logarithmic bins, and coloured parts of background in a plot

There is some problem related to the background images. When I remove them, it seems I can change the axis as I want.

• 3. Re: Re: Logarithmic tick marks, logarithmic bins, and coloured parts of background in a plot

Almost done, got most of the problems solved. See picture.

Background image seems like there's a bug with Tableau. Adding a 1 pixel background image and unchecking "Lock aspect ratio", clicking Apply, if done in the right order, will get a nice background without messing up the scales. It took a while to get this right though and it seems to me like there is a bug here because when doing it in different order with the same intended result, it sometimes messes up and sometimes not.

Anyway, what is now left is changing the scale of the X axis to a custom one according to the original image. I don't know if this can be done, but if anyone has ideas, please shoot.

• 4. Re: Logarithmic tick marks, logarithmic bins, and coloured parts of background in a plot

I don't know of any way to make the X-axis scale look like that in Tableau.

My suggestion is to create a background image that has the axes, tick marks, and gridlines and then align the Tableau plot on top of that (ultimately hiding Tableau's axes), and have the X-axis continuous pill be a calculated field that appropriately scales to the results you want. For example, you could say that the X axis scale has a fixed size of 1000, and then create a calc that takes the actual measure and ranges the numbers between 0 and 1 to be between 0 and roughly 300, then 1 to 5 between 300 and 500, etc.

• 5. Re: Logarithmic tick marks, logarithmic bins, and coloured parts of background in a plot

Thanks, that's a great idea!

Thinking of it, something like that is probably how the original plot was made too, just not with Tableau.

Will try it.