1.191 FAQ-892 How to plot evenly spaced column/bar for unevenly spaced numeric X?

Last Update: 1/27/2021

If you have numeric X and select one Y column to plot column/bar chart

Columns/Bars are plotted at numeric X location.

Show As Evenly Spaced Bar 1Y.png

To plot them as evenly spaced, you can use Plot Setup dialog to Plot against row index. That is,

  1. Highlight and right click on X column, select Set As: Categorical from the context menu.
    Show As Evenly Spaced Bar 05.png
  2. Highlight Y column to plot a column/bar graph.
Notes:
  • !!!Drawback: Since the X column is changed to text, you will not be able to use it as numeric data for subsequent analysis such as curve fitting.
  • If you want to reorder the categorical values, double click on the Categorical cell and then change the order in the Categories dialog.
Show As Evenly Spaced Bar 07.png
  • In Origin 2017 or earlier versions, column/bar chart always plots column/bars at numeric X location no matter you choose one or more Y columns. So if you have non-evenly spaced X values and want to plot them as evenly spaced columns/bars, you can follow the above method.

If you have numeric X and selects more than one Y columns to plot column/bar chart

Columns/Bars are plotted with evenly spaced X by default.

Show As Evenly Spaced Bar.png
X tick labels are set as Text from X dataset.
Show As Evenly Spaced Bar axis 1.png
Notes:

If you really wants to show columns/bars at numeric X location, there are two approaches.

  1. Double click on any X tick label to open Axis dialog.
  2. Set Display> Type as Numeric on Tick Lables tab. Click OK.
    Show As Evenly Spaced Bar axis 2.png
  3. Click Rescale to show all to see the update.

Alternatively,

  1. Select Preferences: System Variables... menu.
  2. Set system variable @DRX as 0.

Keywords:unevenly spaced, column, bar, evenly spaceD, equally spaced, isometric, discrete