Excel Color Area between Two Curves with Different Colors
SoftTech Tutorials
In this tutorial, we will explain how you can color the area between two curves on an Excel graph. We focus on coloring the area with only one color.
0:00 Excel Color Area between Two Curves – Intro 0:37 Creating a Line Chart and Adjusting its Appearance 1:40 Coloring the Area Between Two Curves 1:57 Defining Support and Difference Curves 3:13 Stacked Area Chart 4:02 Data Order Importance
#1 Excel Color Area between Two Curves
On the sheet, you can see the return of a certain index over a year and the return of a portfolio that tries to replicate the index. We are interested in the difference between these curves, so we will make a graph of both curves and highlight the area between them.
#2 Creating a Line Chart and Adjusting its Appearance
We start by creating a graph with the two curves for the returns. To do this, we first select all data: the months that represent the x-values in the graph and the index and portfolio returns that represent the y-values in the graph. Then, we navigate to “Insert”, and in the “Charts” section we select the line chart.
A graph appears on the screen with two curves: one for the index return and one for the portfolio return. The x-axis appears in the middle of our curves since it is located at the 0 y-value.
We give the graph a name, let’s take “Index vs Portfolio Return” and we’re done with the graph appearance for this video.
#3 Coloring the Area Between Two Curves
Now we are ready to color the area between the curves. The idea is to make use of the stacked area chart. This chart fills the area under a curve, we name it support, and then for each additional curve the area between this curve and the previous one is filled with a new color.
3.1 Defining Support and Difference Curves To create these additional stacked area elements on the chart, we first need to add two more columns of data. We start by defining the support curve and then we define the difference between both curves in order to color the area between the curves.
For the support curve, we choose one of both curves, let’s take the index return. Next, in the “Difference” column, we define the area that we need on top of the index return curve to obtain the portfolio return curve. To find that, we simply compute the difference between the portfolio return and index return. Remark that we do minus the index return, since this is the support curve.
Now we go back to our chart, select Chart Design, and click on Select Data. A menu opens where we will add the newly defined data columns.
3.2 Stacked Area Chart
As mentioned before, we want to make this extra data appear as stacked areas in the chart. To do this, we select Change Chart Type. In the menu we select Combo. For both the index and portfolio returns, we choo ... https://www.youtube.com/watch?v=qk-V-nShBmQ
33222555 Bytes