I try to make bar graph with error bar like attached image.
Error bars placed on the side of bar graph,
and I don't know how to put error bars on the center of each bar.
I suspect you have created the plot as an x-y plot (or y - calculated plot), mode=5 (bars), and perhaps with an x-offset=-0.5 to get the axis labels centred?
You can plot the data again (as a dot) and add the error bars to this data to achieve the desired (?) result.
But, I think it is easier by plotting a category plot.
Here is an example of both methods:
Function Test()// make some datamake/O/T wCat={"7","8","9","10","11"}make/O wData={10,9,10,11,8}make/O wError={2,3,3,1,2}// category plotDisplay wData vs wCat
ErrorBars wData Y,wave=(wError,wError)// bar plotDisplay/W=(312,369.5,706.5,578) wData,wData
ModifyGraph mode(wData)=5,mode(wData#1)=2ModifyGraph hbFill(wData)=4ModifyGraph offset(wData)={-0.5,0}ErrorBars wData#1Y,wave=(wError,wError)End
You can get make a category plot from the user interface using the menu item Windows > New > Category Plot...
I suspect you have created the plot as an x-y plot (or y - calculated plot), mode=5 (bars), and perhaps with an x-offset=-0.5 to get the axis labels centred?
You can plot the data again (as a dot) and add the error bars to this data to achieve the desired (?) result.
But, I think it is easier by plotting a category plot.
Here is an example of both methods:
Function Test()// make some datamake/O/T wCat={"7","8","9","10","11"}make/O wData={10,9,10,11,8}make/O wError={2,3,3,1,2}// category plotDisplay wData vs wCat
ErrorBars wData Y,wave=(wError,wError)// bar plotDisplay/W=(312,369.5,706.5,578) wData,wData
ModifyGraph mode(wData)=5,mode(wData#1)=2ModifyGraph hbFill(wData)=4ModifyGraph offset(wData)={-0.5,0}ErrorBars wData#1Y,wave=(wError,wError)End
You can get make a category plot from the user interface using the menu item Windows > New > Category Plot...
Hope this helps,
Kurt
Thank you Kurt for your quick response!
I got the graph and could achieve the desired results.
You can plot the data again (as a dot) and add the error bars to this data to achieve the desired (?) result.
But, I think it is easier by plotting a category plot.
Here is an example of both methods:
You can get make a category plot from the user interface using the menu item Windows > New > Category Plot...
Hope this helps,
Kurt
November 6, 2014 at 06:22 am - Permalink
Thank you Kurt for your quick response!
I got the graph and could achieve the desired results.
Thank you so much.
November 6, 2014 at 07:02 am - Permalink