Data 624- Advanced Exploration and Visualization in Health

Instructor: Zahra Shakeri– Winter 2021

Handout #3-1 Annotating Static Images in Tableau

Here is a general overview of how to add a background image and labels to the image. This can be useful if you want to import R and Python graphs into Tableau and add labels.

This is an example of how to label the discharge destinations present in a graph that you can add as a background to Tableau. You can do the same process with an R or Python graph and add whatever labels you see fit.

  1. Select your image, and take note of the dimension (X by Y pixels)

2. Create a Datasource (a CSV file) for your labels. In this image, we want to label each “discharge destination”, so the data source looks like (note we are adding X and Y column for the location of our labels)

3. Import your dataset into Tableau (notice the X and Y columns have been brought in), need to reformat X and Y to Numbers and drag them down to the measures. We can then put X into the Columns and Y into the rows.
4. Add your image as a map: Under map -> background images -> Sheet 1 (Background Image) -> Add an image -> fill in the X and Y (X from 0 to 3126 and Y from 0 to 2090 (these numbers come from step 1))

5. Uncheck the labels for both X and Y axis and drag the “description” column to the label shelf.

6. Now right-click where you want your label, and click annotate a point. This will give you the coordinates of the point.

7. Fill these coordinates into your data source spreadsheet.

8. Once you have filled in the coordinates refresh your datasource in tableau, and drag name to labels.
9. To remove the staticl annotation, right-click on the annotation -> Mark Label -> Never Show.
10. To remove the X and Y coordinates from the annotation, click on X in columns and Y in Rows and uncheck the “Include in Tooltip” option

Adjust the location of the labels to your liking. This is an example with a plot, but the same concept applies with graphs, find the location on the X and Y, add them to your attached dataset, and refresh, and the labels should appear.