Quantcast
Channel: Active questions tagged r - Stack Overflow
Viewing all articles
Browse latest Browse all 201867

How do I manually assign the location of bars along the x-axis using barplot()?

$
0
0

I have a list of means.

means=c(anc3mean,l3mean,anc5mean,l5mean,anczmean,z12mean);means
[1] 0.07025897 0.42328670 0.05697524 0.53915431 0.01893219 0.10878638

I have created a barplot from those means.

bars=barplot(means,ylim=c(0,.8))

enter image description here

I would like to have the "bars" be centered at the values 1, 2, 4, 5, 7, 8 along the x axis.

I have tried the following:

bars=barplot(means,ylim=c(0,.8),at=c(1,2,4,5,7,8))

This does not work however because "at" is not an argument for "barplot()".

Any help would be greatly appreciated.


Viewing all articles
Browse latest Browse all 201867

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>