Skip to main content
edited title
Link
M--
  • 33.6k
  • 12
  • 74
  • 115

Plot ggplot with 2 y axes, one y axis on the left,each side and another y axis on the rightdifferent scales

edited tags
Link
Gregor Thomas
  • 147.4k
  • 22
  • 185
  • 320
Question Protected by zx8754
added 2 characters in body; edited title
Source Link
zx8754
  • 56.7k
  • 12
  • 131
  • 229

How to use ggplot2 make plot Plot with 2 y axes, one y axis on the left, and another y axis on the right?

I need to plot a bar chart showing counts and a line chart showing rate all in one chart, I can do both of them separately, but when I put them together, I scale of the first layer (i.e. the geom_bar), is overlapped by the second layer (i.e. the geom_line), can.

Can I move the axis of the geom_line to the right?

How to use ggplot2 make plot with 2 y axes, one y axis on the left, and another y axis on the right?

I need to plot a bar chart showing counts and a line chart showing rate all in one chart, I can do both of them separately, but when I put them together, I scale of the first layer (i.e. the geom_bar), is overlapped by the second layer (i.e. the geom_line), can I move the axis of the geom_line to the right?

Plot with 2 y axes, one y axis on the left, and another y axis on the right

I need to plot a bar chart showing counts and a line chart showing rate all in one chart, I can do both of them separately, but when I put them together, I scale of the first layer (i.e. the geom_bar) is overlapped by the second layer (i.e. the geom_line).

Can I move the axis of the geom_line to the right?

deleted 11 characters in body
Source Link
Cole Tobin
  • 9.4k
  • 15
  • 52
  • 77
Loading
edited tags
Link
Matt Parker
  • 27.4k
  • 7
  • 58
  • 73
Loading
Source Link
lokheart
  • 24.9k
  • 40
  • 108
  • 175
Loading