Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I would like to fill the area between two graphs.

My data is in the following format:

x y
0 0
1 1
2 4
....
0 0 

As you can see they start and end at the same point. For my data it draws a chart but I can't fill inside that axis area.

Example taken from the comments
enter image description here

share|improve this question

migrated from stackoverflow.com Feb 11 '13 at 12:45

This question came from our site for professional and enthusiast programmers.

    
I am not really sure what you want to achieve. Do you have a sample chart or drawing? –  hsan Feb 11 '13 at 10:52
    
So you've managed to draw the chart, you just need to fill the area below the line like you would see in an area line graph? –  DMK Feb 11 '13 at 10:57
    
I would like to have some shape, for example circle, from axis(x,Y) And I would to fill that circle inside... –  user2050796 Feb 11 '13 at 11:03
    
Like this? i.stack.imgur.com/6ZD88.png –  hsan Feb 11 '13 at 11:14
    
yes something like that i need –  user2050796 Feb 11 '13 at 12:18

1 Answer 1

This can be accomplished in Excel, but it's not native and requires a bit of creativity. Here's a brief concept (if you provide more accurate sample data, I can provide you a better description of your specific example):

  1. Split your data into two halves, with a common horizontal edge. These can mirror, but don't have to.
  2. Adjust your data so that the X Axis is the split.
  3. Add your top half data as an Area Chart. This will create the top half of your shape with fill down to the X Axis (light blue in the sample).
  4. Add your bottom half data as a second series to your chart. This will create the bottom half of your shape with fill up to the X Axis (light red in the sample).
  5. Format the fill so that the colors match, and adjust any other aesthetics you want.
  6. Since the shape's X Axis (light gray) may not match your measured values (light blue), you can add a second set of Axis to show your actual values.

Excel fill shape

share|improve this answer
1  
In fact, you don't need to put the horizontal axis in the middle of the area shapes. And you may be able to get away with one filled area. Use stacked area series, make one series go from the axis up to (or down to, or both, doesn't matter) the X values along the lower edge of the colored region. Make the other series go from the bottom to the top of the filled region. Use no fill to format the first series, and any desired fill for the second. See Fill Under or Between Series in an Excel XY Chart. –  Jon Peltier Oct 7 '13 at 18:35

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.