Center Bar Charts Bars Between Tick Marks

Bar chart bars in Grapher display centered on their respective data ticks. This is Grapher's default.

To change the alignment so that the bars begin at the data value (as seen in the example below) see the following steps. 

Bars are left aligned with the tick mark label. 
Bar chart created from the Vertical Bar Chart in the BarCharts.gpj samples file.


  1. Click the Bar chart plot in the Object Manager. 
  2. Click Graph Tools | Worksheet | Display. 
  3. 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:
    1. Click Data Tools | Data | Transform.
    2. 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.
  4. 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 command. 
  5. Return the plot view and select your bar chart in the Object Manager.
  6. In the Property Manager, click the Plot tab. 
  7. In the Plot Options section, expand the Width settings and change the Type to Variable.
  8. Set the Variable units to Axis units (interval).
  9. Set the X2 variable to the new x column you added to your data file. The bar chart bars will now start at the value. 


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!


March 2023

Was this article helpful?
0 out of 4 found this helpful



Please sign in to leave a comment.