Tuesday, 30 June 2015

Creating transparent fills for Igor Pro graphs

For several of my experiments I’ve profiled retinal functioning using electroretinograms (ERGs) and graphed the averages with dynamic error bars in Igor Pro. Using a transparent fill for the error bars of these graphs allows clear visualization of overlaps. Unfortunately this capability isn’t available in Igor. Exporting the graphs or layouts in EPS format and editing in Adobe Illustrator (or freeware vector editing software) provides an easy workaround.

Creating transparent error bar fills in Illustrator

  1. Open your EPS layout file in Adobe illustrator.
  2. Ungroup the objects.
    • Using the selection tool (top arrow in the left sidebar), select the entire graph/s
    • From the top menu, choose ‘object/ungroup’
  3. If you click on one of the error bar fills, you’ll notice that Igor has exported it in chunks. Grouping these chunks into a single object makes them easier to edit.
    • From the top menu, choose ‘window/pathfinder’ (this will open the pathfinder window).
    • Select a chunk of fill from one of the waves using the selection tool.
    • From the top menu, choose ‘select/same/fill color’.
    • Click on the first shape mode (unite) in the pathfinder window. The error bars of this color are now a single object.
  4. Edit the opacity value of the error bars.
    • With the error bars still selected, edit the opacity value in the transparency window (if you don’t have this window in your right sidebar, select ‘window/transparency’). In the example above I’ve set the opacity to 55% for all of the wave errors.
  5. When you deselect the object you’ll notice that there are some outlines remaining. These are darker as they overlap with the underlying fill.
    • Click on one of the lines. From the top menu choose, ‘select/same/stroke colour’. Hit delete to remove the extraneous lines.
  6. Repeat these steps for each of your fill colors. Once you’ve finished you can tweak the graph colors as necessary using the color and transparency palettes (see below for tips on using global color swatches to do this). 

Creating a global swatch to quickly edit a color across your entire layout

If you update the color of a global swatch, all objects using that swatch are also updated. This means that you can edit a color across the entire layout simultaneously. You can also save your swatch library for future use.

Creating a global swatch

Select a line (e.g. the wave average) from one graph. In the color window you’ll notice that there are two boxes- one indicates the stroke color and the other the fill color. Because you’ve selected a line (rather than a fill), the fill color is blank. 
Click on the stroke color box to bring it to the foreground.

In the swatch window, click ‘new swatch’.
In the popup window, tick ‘global’ and click ‘okay’. Your new swatch should now appear in the swatch window. You can double-click on it to open the swatch options menu and edit the color.

Apply the global swatch to all of the relevant fill/stroke colors in the layout

  1. Using the selection tool, select the fill or stroke color you want to change. 
  2. In the top menu, choose ‘select/same/fill color’ (or stroke color).
  3. Make sure the appropriate fill or stroke box is in the foreground in the swatch window.
  4. Click on the global swatch color you want to apply. This will apply the color across the selected objects in your layout.

2 comments:

  1. This comment has been removed by a blog administrator.

    ReplyDelete
  2. our enthusiasm leads you beyond the limits. When you feel yourself enthusiastic that’s the time you can cross any limit. You seek to get perfection by using the ability of work. Read such motivational article and definitely it will help you to know new facts.การรักษาสิว

    ReplyDelete