Unlock the full potential of your data visualization with Grapher's versatile bar chart features. This guide provides a detailed walkthrough, showing you how to set up your data for various displays, including grouped bars (stacked or adjacent) and integrating data from multiple sources. Explore how to customize your bar charts with image fills, distinct colors for positive and negative values, and other advanced options to create clear and impactful bar charts that effectively tell your data's story.
Section 1: Understanding bar chart fundamentals
Bar chart data layout
To create effective bar charts in Grapher, you'll organize your data into columns, where each column represents a separate bar chart plot. Within that column, each row corresponds to an individual bar. For a vertical bar chart, ensure each row has a unique X value to define its position. Similarly, for horizontal bar charts, each row needs a distinct Y value. This setup allows Grapher to accurately plot your bars, like in the example data provided, which generates evenly spaced bars one month apart.
The table shows three columns: Month, Kwh/mon 2009 and Kwh/mon 2008.
Using Month as the unique value will have bars spaced evenly at a one month interval.
Creating grouped bar charts: adjacent and stacked displays
Grouped bar charts let you compare related data series side-by-side or as cumulative totals, providing clear visual insights. Grapher makes it easy to arrange your bars in both adjacent and stacked layouts, helping you highlight trends and relationships within your datasets.
The bar charts on the left are stacked. The bar charts on the right are adjacent.
To begin, generate your initial bar chart:
- Navigate to the Home | New Graph | Bar | Vertical Bar Chart command.
- Select your data file and click Open. Grapher will automatically plot the bars.
Now, to add a second bar chart, perhaps from column C, and ensure it's grouped with the first:
- In the Object Manager, click the existing Bar Chart object.
- In the Property Manager, select the Plot tab.
- Scroll to the bottom and in the New Plot field click the Create button.
- Grapher will automatically add the second bar chart, using data from column C.
- When you use the "Create New plot" command with data from the same worksheet, the bars are automatically grouped.
- If desired, you can customize the color of this new bar chart by clicking on the Fill tab.
These grouped bars can be displayed as either stacked or adjacent. To switch between these layouts:
- Click on any bar chart within the group to select it.
- In the Property Manager, select the Plot tab.
- In the Plot Options section set the Stacking field to the desired option.
Grouping bars from multiple data files [Top]
Even when your data resides in separate files, Grapher provides a seamless way to group your bar charts for comparative analysis. You can effectively group data even if it's spread across multiple worksheets. For instance, imagine you have a second dataset, like the one below, which you want to compare with your original data.
Average energy usage per month for focus area.
This data contains energy usage averages for our focus area. To compare the kilowatt-hours from the original data set with this data, use these steps:
Start by creating the first bar chart
- Click the Home | New Graphs | Bar | Vertical Bar Chart command.
- Select your original data file and click Open. Grapher will automatically generate the bars.
Next, add the second bar chart using your new data file:
- Click Home | Add to Graph | Plot.
- Select Vertical Bar Chart and click OK.
- In the Choose Axes dialog, click OK, ensuring you select the same axes for consistency.
- In the Open Worksheet dialog, select the new worksheet and click Open. The second set of bars is automatically created.
- Click the Fill tab to change the color of the newly created bar chart so that each set of bars are separate colors.
Notice that the second set of bars initially overlays the first. To arrange these bars adjacently for a clear comparison, you'll need to designate both datasets as a single group.
- In the Object Manager, click either of the Bar Chart objects.
- In the Property Manager, select the Groups tab.
- In Plots section adjust the selection so both Bar Chart 1 and Bar Chart 2 are in Group 1. The bar charts are now grouped.
- Under the Bar Charts list, adjust the selection so that both Bar Chart 1 and Bar Chart 2 are assigned to Group 1. The bar charts are now grouped!
Once grouped, these bars can be displayed as either stacked or adjacent. To switch between stacked and adjacent bars, click once of either bar chart to select it.
- In the Property Manager, select the Plot tab.
- In the Plot Options section set the Stacking field to the desired option.
Section 2: Enhancing Bar Chart Visuals
Using an image for bar chart fill [Top]
Move beyond solid colors and give your bar charts a unique visual flair! Grapher offers advanced customization for your bar charts, including the ability to fill bars with any image, transforming your data visualization into something truly distinct and memorable.
Using an image for bar chart fill increases the effectiveness of your graph.
- In the Object Manager, select the Bar Chart.
- In the Property Manager, select the Plot tab.
- Expand the Fill Properties section.
- Change the Style field to Pattern.
- In the Pattern field click the Custom pattern button
- In the Import dialog, select the image and click Open.
- Check the Stretch field to stretch image fills to completely fill the geometry. If Stretch is not selected, the image will be repeated to fill the geometry.
- The Scale field controls the density of the bitmap fill Pattern. Clear the box next to the Stretch option and set the Scale factor to a value between 0.1 and 10. The larger the Scale, the larger the resulting pattern.
Using different colors for positive and negative bar values [Top]
Easily highlight trends and distinctions in your bar charts! Grapher allows you to visually differentiate positive and negative bar values in your 2D and 3D bar charts, making it simple to convey increases, decreases, or deviations from a baseline. This dramatically improves clarity when visualizing data that crosses a threshold.
Grapher with different color fills for positive and negative values.
To color positive and negative bars different colors:
- Create the bar chart of your choice using the Home | New Graph | Basic | <bar chart type> select the data file and click Open.
- In the Object Manager, select the bar chart layer.
- In the Property Manager, select the Plot tab.
- In the Plot Options section, set the Base field to Zero.
- In the Property Manager, select the Fill tab.
- Check the box next to Different fill if bars<base field.
- Expand each Fill Properties section and select the desired Foreground color.
Centering bar charts between tick marks [Top]
While Grapher typically centers bar chart bars on their data ticks, you may need a different alignment to better represent your data. Whether you prefer bars centered or starting precisely at the tick mark, these instructions shows you how to easily adjust bar positioning in Grapher. Learn to customize your bar chart's appearance for optimal clarity.
On the left a graph with the default bar positions.
On the right a graph that has been adjusted so that the bars are centered between the tick marks.
- Click the Bar chart plot in the Object Manager.
- In the Property Manager, select the Plot tab.
- Expand the Plot Options section, then expand Width settings.
- Take note of the Bar width field setting and update it as necessary.
- In the ribbon, click Graph Tools | Worksheet | Display.
Add a new column to your data file and populate the cell with the original X value plus the width of the bar chart using the steps below:
- Click Data | Data | Transform.
- In the Transform dialog, enter the equation C = A + 1, where C is the column the data will be populated; A is the column containing the X values; and the 1 is the bar width.
- Calculate your bar width by multiplying the Bar width percentage you notes earlier and multiplying it by the distance between ticks. In this example (100% * 1).
- The data updates immediately when the data is opened via the Display command, however, you may want to save your worksheet using the File | Save or File | Save As command.
- Return the plot view and select your bar chart in the Object Manager.
- In the Property Manager, click the Plot tab.
- In the Data section, set the X variable field to the column with the new data from step 2 above.
Would you like to see a built-in feature to align the bars left, right, or center of a tick mark?
Let us know and we'll add your vote!
Individual Bar Color Customization : Manual / Color Table [Top]
To manually apply specific colors to your bar chart, utilize the color table. This enables you to meticulously select and implement unique color schemes for each bar, or for distinct sets of bars, enhancing visual differentiation without having to add information to your worksheet. Use a color table when you need to define many colors (or a Color Palette) to fill each bar in order. You can define as many colors as you wish. By default, the colors in your color table will repeat if you have more bars than colors defined.
On the left a bar chart with the colors set by a color table. On the right the Color Table window.
- Create your bar chart.
- In the Object Manager, click the Bar Chart to select it.
- In the Property Manager, select the Fill tab.
- Check the box next to Use color table. The bar chart will change to a variety of default colors.
- In the Color table field, click the Set button.
- The Color Table window will open.
- In the Color Table window, make any changes to customize the individual bar colors or patterns. The colors will appear in the order they are listed on the left side of the dialog. To change a color or pattern, click on the color on the left side and make changes on the right side of the dialog.
- Click OK to update the plot.
- To show a legend of the Color table fill colors, check the Show color table legend on the Fill tab in the Property Manager.
Color Table Options [Top]
When utilizing a Color Table, Grapher offers three distinct methods for assigning colors to your bar chart, as detailed below with examples:
-
Assigning Colors to All Bars: Manually define a unique color for each bar by ensuring the number of colors in your table matches the total number of bars in your graph.
-
Applying Colors to Specific Bars (No Repeat): Define colors for a subset of your bars without enabling the "Repeat colors" option. In this scenario, any bars beyond the specified colors in the table will revert to the graph's default fill color and properties.
- Define a color for some of your bars in your graph and check the Repeat colors checkbox. The colors will repeat throughout the chart whenever the end of the color list is reached.
Individual Bar Color Customization : From worksheet [Top]
Achieve dynamic bar chart coloring by linking colors directly from your worksheet in Grapher. This method efficiently uses a specified worksheet column to define bar colors, ensuring a direct connection between your data and your chart's appearance. A prerequisite for this approach is a separate worksheet column or row containing your color values, which must be correctly formatted as outlined below.
Color variable formatting options [Top]
For Grapher to properly read and apply your custom colors, the worksheet column must be formatted in one of nine specified methods. These formats offer flexibility for defining colors, including various RGB and RGBA notations, as well as named colors from the Color Palette. Across all methods, <r>, <g>, <b> values are between 0-255, and <a> (alpha) controls transparency, from 0 (transparent) to 255 (opaque).
Color Variable formatting methods
- <color>
- <color>:<a>
- RGB(<r>,<g>,<b>)
- RGB(<r>,<g>,<b>,<a>)
- \COLOR(<r>,<g>,<b>,<a>)
- R<r> G<g> B<b>
- R<r> G<g> B<b> A<a>
- \RGBR<r> \RGBG<g> \RGBB<b>
- \RGBR<r> \RGBG<g> \RGBB<b> \RGBA<a>
How to define <color>
To determine appropriate color names, click on any filled object in Grapher. On the Fill page in the Property Manager, click the color next to Foreground color. Select the desired color and the color name is shown.
Select the desired color and the color name appears beside it.
Color Variable formatting examples
Method | Example | Worksheet example |
---|---|---|
<color> | Red | |
<color>:<a> | Red:255 | |
RGB(<r>,<g>,<b>) | RGB(23,42,60) | |
RGB(<r>,<g>,<b>,<a>) | RGB(74,82,130,140) | |
\COLOR(<r>,<g>,<b>,<a>) | \COLOR(210,36,91) | |
R<r> G<g> B<b> | R233 G111 B68 | |
R<r> G<g> B<b> A<a> | R9 G163 B24 A210 | |
\RGBR<r> \RGBG<g> \RGBB<b> | \RGBR255 \RGBG0 \RGBB0 | |
\RGBR<r> \RGBG<g> \RGBB<b> \RGBA<a> | \RGBR83 \RGBG25 \RGBB155 \RGBA101 |
- Create your bar chart.
- In the Object Manager, click the Bar Chart to select it.
- In the Property Manager, click on the Fill tab.
- In the Color variable field click the dropdown field and select the worksheet color column/row. The bars are each filled appropriately.
Section 3: Advanced Bar Chart Types and Customizations
Floating bar chart (Gantt charts) [Top]
Floating bar charts, often referred to as Gantt charts, are ideal for visualizing data ranges rather than single data points. Grapher allows you to create these powerful charts to effectively display intervals, durations, or spans, such as stock price changes or project timelines. Additional information about this graph type can be found in the Floating Bart Charts Grapher help page.
Horizontal Floating Bar Chart displaying a project timeline in Grapher
- Click the Home | New Graph | Bar | Horizontal Floating Bar Chart or Home | New Graph | Bar | Vertical Floating Bar Chart command.
- Select a data file in the Open Worksheet dialog. You can select a new data file or you can select an open data file in the Open worksheets section.
- Click the Open button. A floating bar chart is created using the default properties.
Default horizontal floating bar chart in Grapher
A floating bar chart's default appearance may not fully communicate its meaning, like a project timeline. To make it more informative, consider adding a title, defining each of the items the data range apply to, and indicating the current date.
Add graph and axis titles
- In the Object Manager, click the Graph to select it.
- In the Property Manager, select the Title tab.
- Enter the desired title in the Text field under Title Properties.
- In the Object Manager, click Axis 1 to select it.
- Click the Axis tab in the Property Manager.
- Enter the desired title in the Text field under Title Properties.
- Repeat steps 4-6 for the Y Axis.
Add category names
- In the Object Manager, click the Y Axis to select it.
- In the Property Manager, select the Labels tab.
- Click in the Label source field and select From worksheet.
- Click in the Worksheet field and select your open worksheet.
- Click in the Data variable field and select Sequence number, Row number, or the appropriate Column. This selection should match the Y variable for your plot
- Click in the Label variable field and select the column/row containing the text categories.
- If your data has a header row/column that is currently included, click the + next to Worksheet range to expand the section, and then increase the value in the First row or First column field to 2.
Add a custom grid line the X axis
- Click the X Axis in the Object Manager to select it.
- Click the Line tab in the Property Manager.
- Click the Worksheet grid line checkbox
- Click the + next to Worksheet grid lines to expand the section.
- Click in the Worksheet field and select your worksheet.
- Click in the Variable field and select the worksheet column containing the current date.
- If desired, adjust the Worksheet line properties. You can also turn on major and minor grid lines here.
Adjacent category bar chart [Top]
When you need to compare multiple bar charts within distinct categories, Grapher's adjacent category bar chart feature is ideal. This section guides you through creating a graph where all bars for a given category are displayed next to each other, improving comparative insights.
Grapher adjacent category bar chart with classes displayed on the X axis.
- Click the Home | New Graph | Bar | Vertical Category Bar Chart command.
- In the Open Worksheet dialog, select your data file and click Open.
- In the Object Manager, click the bar chart to select it.
- In the Property Manager, select the the Plot tab, if your data is in rows rather than in columns, check the checkbox next to Data in rows.
- Verify that the Y variable is the column/row containing your first set of bar data.
- Scroll down to the bottom of the Plot page and click Create in the New plot field. By default, a new bar chart will be added to the graph with the Y variable set to the next column/row in the worksheet, and it will be stacked on the first bar chart.
- Repeat the previous step for each bar chart you wish to add.
- Under Plot Options, Select Adjacent from the Stacking field list.
- If the bars do not display as adjacent,
- Click on the Groups tab.
- Expand the Plots section, and assign the same Group to each bar chart.
Variable width bar chart [Top]
Go beyond uniform bar widths! Grapher allows you to create variable width bar charts, where the width of each bar dynamically adjusts based on specific values in your data. This unique visualization method uses axis units to define bar width, providing a powerful way to convey additional dimensions of your data.
Bar width indicates percentage increase/decrease over previous year. Label is the actual percentage increase/decrease over previous year.
- Click Home | New Graph | Bar and select one of the bar chart plot types.
- In the Open Worksheet dialog, navigate to the data file and click Open.
- In the Object Manager, click on the Bar Chart to select it.
- In the Property Manager, select the Plot tab.
- In the Plot Options section, expand the Width settings section.
- Click next to Type and select Variable from the drop-down menu.
- Set Variable units to Axis units (width) or Axis units (interval).
- Set the Width variable or X2 variable/Y2 variable to the appropriate width or ending interval column/row from your data file.
Category floating bar chart [Top]
When your floating bar data needs to be organized and displayed according to specific categories or descriptive labels, Grapher's category floating bar chart provides the perfect solution. For instance, if you're tracking the start and end times of tasks for different departments, this chart type offers clear visual segmentation. Learn how to construct a horizontal category floating bar chart to group and present your range-based categorical data effectively.
- Click Home | New Graph | Bar | Horizontal floating bar chart.
- In the Open Worksheet dialog, select your data file and click Open.
- Click the floating bar chart in the Object Manager to select it.
- In the Property Manager, select the Plot tab.
- If your data is in rows rather than in columns, check the box next to Data in rows field.
- In the Data section, set the Y variable to Sequence number.
- Set the X variable and X2 variable to the desired data columns/rows using the drop down.
- In the Object Manager, click the Y Axis to select it.
- In the Property Manager, select the Labels tab.
- In the General section, in the Label source field select From worksheet.
- In the Worksheet field click on None and select your open worksheet from the dropdown.
- If your text categories are listed in a row rather than a column, check the box next to Data in rows.
- Click in the Data variable field and select Sequence number.
- Click in the Label variable field and select the column/row containing the text categories.
- If your data has a header row/column, click the
next to Worksheet range to expand the section, and then increase the value in the First row or First column field to 2.
Comments
Please sign in to leave a comment.