graph - make barplot start from number other than 0 in base R graphics and plot values beneath this startpoint -


is possible make barplot start number other 0 in base r graphics , plot values beneath startpoint? example, create barplot origin on y-axis 1 , draw boxes go 4 , down -3.

for example, draw barplot starting 1, instead of drawing bars 0.

barplot(c(4,-3)) 

this question distinct from: different starting point (not 0) in barplot y-axis?, plots values above startpoint different 0. plot them below new startpoint.

one hackish possibility -- tweak values , adjust axis accordingly:

barplot(c(4,-3)-1,axes=false) axis(side=2,at=(-3:4)-1,labels=(-3:4)) abline(h=0) 

Comments

Popular posts from this blog

commonjs - How to write a typescript definition file for a node module that exports a function? -

openid - Okta: Failed to get authorization code through API call -

thorough guide for profiling racket code -