Sometimes user wants to fill area both above and below curves. Unfortunately in one layer of a graph, user can only choose to fill area from curve to bottom axis or the additional line set on Grids tab of Axis dialog. To fill both above and below, user has to create a second layer that overlaps with first one and put some plot in first layer and some in second. Then on one layer, fill below and one second layer fill to additional line which is set to be some position above the curve. The process could be cumbersome.
In this blog, we will introduce another way to do this using Fill to next plot – one color feature newly introduced in recent versions of Origin. Please open the linked opj file in Origin and go to Book1 under folder Data, I want to fill area below Col(B) and fill area above Col(C) to 10. Therefore an an extra column D with constant value 10 was added there.
Highlight all 4 columns and plot a line graph, then go to Layer Contents dialog to ungroup the plots and delete the legend. Note: If the plots are grouped, then the same Fill area settings will be used for all plots in the group.
Double click to open Plot Details dialog, choose the first dataset, on which we need fill below, set the filling as usual, and give it 50% transparency.
The go to the second one, choose fill area by method Fill to next data plot, which is the extra col(D).
Uncheck the checkbox before D(Y) plot to hide the extra line since we don’t need it to be on the graph. And set the axis scales to cut off redundant margins.
Note: If you want to fill area above col(B) to 10 and fill area below col(C), then in Layer Contents dialog, make sure move Col(D) to be next to Col(B) in right panel.
Also don’t forget we also support Fill background of a layer. So if you only have one plot and wants to fill both below and above a plot in the whole graph, just Fill area under Curve to bottom axis. And then go to Layer level of Plot Details dialog and turn on Background Color.
By this trick, you can make much complex graphs like below, just keep adding reference lines. See folder Result in attached opj.