1

I create a data frame with four different rows. Every row has decreasing numbers. But I have some problems with the plot in the picture:

enter image description here

Everything is correct with the plot except that the grey bars are the wrong way round. Actually they would have to rise.

This is the syntax:

plot(z_RMSE_MAE$max_diff, z_RMSE_MAE$z_images_left, col.lab="black",yaxt='n',type = "o", xlab = "max Differenz", ylab ="", main ="",col = "red") 
axis(4, col = "red")
par(new = T)
barplot(z_RMSE_MAE$z_MAE, type= "h", col = "grey",xlab ="", ylab = "",space = 0.8, density = 40, decreasing ="FALSE")
mtext(side = 2, line = 3, col = "grey" ,'MAE')
mtext(side = 4, line = 3, col = "red" ,'images left')
axis(side = 2 )

Can someone help me?

Tim Wendt
  • 11
  • 4
  • 1
    Welcome to StackOverflow! Please read the info about [how to ask a good question](http://stackoverflow.com/help/how-to-ask) and how to give a [reproducible example](http://stackoverflow.com/questions/5963269). This will make it much easier for others to help you. – zx8754 Oct 02 '17 at 08:44
  • https://stats.stackexchange.com/questions/14942/can-i-pass-an-at-parameter-for-the-x-axis-locations-of-bars-to-an-r-barplot might be helpful – rawr Oct 02 '17 at 08:59
  • Thanks for your comment :) – Tim Wendt Oct 02 '17 at 09:07

0 Answers0