I have the following graph that I generated using ggplot2 
I had finalPlot as the ggplot object. To add labels I used
finalPlot + stat_bin() + scale_x_continuous('Solution Cost') + scale_y_continuous('Number of Solutions')`
How can I change the orientation of the y axis label to make it appear horizontal and if possible span it across two lines like
Number of
Solutions
For the rotation angle of the axis text you need to use
element_text(). See this post on SO for some examples. For spacing over two lines I would add a"\n"on the location in the string where you want to put the newline.This will set the correct orientation for the y axis text and force a line break: