0

I'd like to switch the legend text and the symbols in that way, that first the symbols appear and then the text right to it. At the moment you see first the describing text and then the symbol. But my text is so long that it would be better to have it the other way around. Do you have any suggestion? Here is my code. Unfortunately, I can't show a picture of the plot according to the constraints of this page.

MyText<-c("Subbasin 1")

barchart(Sub1_AbflussMittel_cms ~ Aufforstungsart, data = Abfluss_Means_Sub1, groups = Waldanteil, 
     scales=list(x=list(rot=90,cex=0.6,alternating=1)),  #alternating bestimmt wo die x-Achse Beschriftet wird (2 wäre oberhalb)
     origin=0,
     ylab="Mittlerer Abfluss über die Simulationsdauer [m³/s]", xlab="Szenarien - Waldzusammensetzung",
     main="Abflussveränderung", 
     auto.key=list(space="top", 
                   #columns=1, 
                   title="Szenarien - Waldanteil im Einzugsgebiet [%]",
                   points=FALSE, rectangles=TRUE,
                   size=4,#Breite der Rechtecke
                   height=0.5, #Höhe der Rechtecke
                   background = "gray97",
                   cex=0.8, cex.title=0.9),  
     par.settings = my.settings,
     panel=function(x,y,...){   
            panel.grid(h=-1, v=0)     # macht die horizontalen Linien
            panel.barchart(x,y,...)
            panel.text(4.5,-1.5,labels=MyText[panel.number()],font=2)}
              )
Susi
  • 1

0 Answers0