Temperature and rainfall graph

You can do it easily with ggplot2 package, you can learn how by reading this chapter from R4DS

If you need more specific help, please provide a proper REPRoducible EXample (reprex) illustrating your issue.