Shading Sections of a Graph and Customizing their Formatting

posted in: Graphing | 2

002ab

To shade only a portion of the area under a plot, you can use Integrate gadget’s “Keep the shading after closing the gadget” option. This can be done from Origin 2016 onward, although the pattern option won’t be customizable until the release of Origin 2016 SR1. In the above figure we see a line graph of some signal noise data which can be found in Origin’s sample files under <Origin EXE Folder>\Samples\Signal Processing. Let’s say we want to shade just the two sections of this graph with y values of approximately 2.

With Graph window active, let’s go to Gadgets: Integrate. First let’s set our region of interest (ROI) from approximately 295 to 355, and under the Integration tab check the tickbox labelled Keep the shading color after closing gadget.

003

Before we close this dialog box, we’ll need to define the lower boundaries of our integrated area. Since the minimum of our y axis is less than 0, let’s go to the Baseline tab, change the mode to Constant Y, and our Constant to Custom, in this case y= -1.

004

We can also shade a second area on our graph by adding another Integrate gadget with these same steps, but changing the ROI boundaries to 565 to 675.

The plot should appear as it does below. If we want to adjust the region of interest later, we can temporarily hide the gadgets by clicking on the red H that appears in the top right corner of the window for printing or graph export purposes. Then click the S to make it reappear. To close the gadgets, click the X button in the upper right corner.

005a

Here we see our data without the Integrate gadget, showing the two sections of our data that we want shaded.

006a

To change the appearance of a shaded area, first close the gadgets and then simply double click on the shaded area to open the Object Properties dialog. Go to the Fill Pattern tab to make modifications to fill color as well as pattern shading. We can also select each area as we would any other object and use the color and pattern buttons on Style toolbar to customize it.

007008

If you want to remove a shaded area from our graph altogether, simply select it and press Delete.

Above we see our finished graph with our data partially shaded. This function can be used with any kind of data plot, highlighting whichever sections of the data that you wish to illustrate.

2 Responses

  1. Umair Gulzar

    I want to remove the shaded area altogether. But I am unable to select it. When i click on it, the whole graph is selected

    • Hello,

      1. Could you let me know which version of Origin are you using?
      2. When using Gadget: Integrate… did you check “Keep the shading color after closing gadget” checkbox on Integration tab of the dialog? If so, if u click x to close the gadget. The shade is left in graph and u should be able to click select it and then press Delete keyboard button to delete it.
      3. If you just click the H button on the upper-right corner of graph to hide the gadget instead of closing it, then u can’t delete the shade. Like you described, it will select the whole graph. If so, u click to click the S button to show the gadget rectangle first. Then click the x button to close the gadget first.

      Thanks, Snow

Leave a Reply