Hideo Fujii
USA
1582 Posts |
Posted - 09/22/2015 : 3:05:40 PM
|
Hi student 123, It probably depends on which kind of "automatization" you are considering - either you have one bar graph, and want a simple procedure to highlight bars in a certain X range; or you have lots of similar datasets, and want to create bar charts highlighted with the same X range.
<<A simple procedure to highlight some bars >> This is a possible simple way. See the screenshot below. Apply the Worksheet Query ("Worksheet: Worksheet Query" menu) with your condition to select the rows. Drag-and-drop the edge of the highlighted cell block onto your graph. This creates another plot of this specific range. Finally, double-click the plot to show the Plot Details dialog, and in the Spacing tab, set the Overlap(in%) field to 100 to overlap the second plot over the first plot. (Thus, the first plot is partially covered by the second plot.)
<<To create bar charts repeatedly with highlighted bars with the same condition>> Make the third column, and using Set Column Values tool, set the index color with a formula using a conditional operator. Create a bar chart, and set the bar color as the index color from this third column (in the "Pattern" tab of Plot Details dialog). Right-click the grey area of the worksheet window, and select "Add Graph" flyout so that you can embed the graph in the worksheet. Save this worksheet as an Analysis Template ("File: Save Workbook as Analysis Template" menu) to make an .OGW file. When you have a new set of data, you can first drag-and-drop this OGW file onto the Origin workspace, then fill the data into the column. Origin automatically create an embedded bar chart with highlighted bars according to the condition.
Hope this helps.
--Hideo Fujii OriginLab |
|
|