Home > Blog

Adding pictures to axis

 This is a follow on from the post on adding pictures to data point markers and the title is a bit misleading - you can't add pictures to axis...however you can add them next to axis using an x-y scatter plot to position the pictures next to you axis.

To do this you first have to set up the data with your chart data and then a set of x-y points where your flags will be positioned.

  • In this case the Y element in in column C and is calculated by dividing 10 by the total number of items (in this case 10) to make an interval between data points of 1 and then starting the series from 10-half the interval (9.5).
  • The X element is driven by the size of your picture - you can easily vary this once the chart is built.

You need the pictures (in their final sizes) displayed on the sheet - it is simplest to align them with the data as shown here.  A further advantage of this is that if you sort the data and include the picture column the pictures will remain aligned with the data.

To build the initial chart select columns A and B and insert a Clustered Bar chart

insert clustered bar chart

Then reverse the Y axis so that the chart is in the same order as your data table; this will also help when associating the pictures with th right data.

reverse data option

Now you need to add the x-y data points which will position the images by the y axis.  This is a three stage process.

First add in Y element by selecting the data in the C column and copying and pasting it into the chart to make a new series

add in y data

 Then you have to  change the new data into an x-y scatter chart

hange to x-y scatter

Then finally edit the data for the new series so that it is correctly picking up the x axis element from column D and the y axis from column C.

orrect x-y scatter chart data

Now you have the data in place it is simply a case of tidying up a bit ready to add the pictures.

  • Delete the secondary Y axis by selecting it and pressing the <delete> key.
  • Move the Y axis labels away to make space for the pictures by editing the Y axis and changing the distance of the labels from the axis to 800 (again this is set by the size of your pictures)

move labels

  • Remove the negative elements from the X axis by changing the number format to 0;;0 as we only want whole numbers (if you wanted 2 decimal points it would be 0.00;;0)

change number format

Now the chart is ready to have the pictures applied.  Copy the first flag and the select the x-y data point which will be changed to this image and paste.  For each image ensure that you have only one data point selected:

select only one

Repeat for all images and your chart will be complete.

Final image

Miles Goodchild

Miles Goodchild has been a Program and Programme Planner, PMO lead and Project Manger since 1998.  He enjoys using MS Office, especially Project, Excel and Visio to make life easier and simpler.  In the course of this he created SummaryPro.  In this blog he shares some of the tips and techniques he has learnt over the years in the hope that they will be useful to you.