[R-SIG-Mac]Barplot axes on MacOS 9.01, R 1.2.3

Peter Paul Sint sint@oeaw.ac.at
Wed, 6 Jun 2001 05:59:40 +0200


I am not able to restrict axes to a given extension if I want to add text to a plot outside the area of the xlim(or ylim) area.
I tried to use par(usr) or par(xaxp) both seem not to work. (I am fairly new to R and did not use a non-Mac version before - possibly I misunderstand those par or some other function/approach makes this easy).
Does anybody have an idea how to get rid of surplus axes.

I hope this example is easily reproducable (Wanted: to get rid of negative axis in this case):

ws<- c(0,0,5,7,18,31)
labF2<- c("Industrie","Finanzdienst","Transport,Telekom","Tourismus","Gewerbe,andere Dienstleistung" "Handel" )

> ws
F2.3 F2.5 F2.6 F2.2 F2.1 F2.4 
   0    0    5    7   18   31 
> labF2
[1] "Industrie"                     "Finanzdienst"                 
[3] "Transport,Telekom"             "Tourismus"                    
[5] "Gewerbe,andere Dienstleistung" "Handel"                       
> 

barplot(ws,  main="Wirtschaftssektor, Fachgruppe",horiz=T,names.arg=NULL,xlim=c(-68,40),xaxp=c(0,40,4)  )
text(-63,seq(0.6,length=6,by=1.2),labF2,adj=0)

wsc<- as.character(ws)
barplot(ws,  main="Wirtschaftssektor, Fachgruppe",horiz=T,names.arg=NULL,xlim=c(-68,40),xaxp=c(0,40,4)  )
text(-63,seq(0.6,length=6,by=1.2),labF2,adj=0)
text(ws-nchar(wsc)-3,seq(0.6,length=6,by=1.2),wsc,adj=0)


(right hand justification needs Hershey fonts which print not so clean numbers inside the bars)



-- 
Peter Paul Sint    (sint@oeaw.ac.at, http://www.iwe.oeaw.ac.at/sint )
Institutional Change and European Integration, Austrian Academy of Sciences 
ICE,Baeckerstr.13 ,A-1010 Wien/Vienna, Austria, EU +431-51581-445(fax-566)