Closed lizhiwei1994 closed 4 years ago
You need to use guide = "none"
inside the scale_*
call. Something like this:
p + geom_map(map = us, aes(map_id = region, fill = temp), color = 'grey') +
scale_fill_continuous(guide = "none") + # removes the guide associated with the map fill.
new_scale('fill') +
geom_scatterpie(data = category_data,
aes(long, lat),
cols = c("cat_1", "cat_2", "cat_3"),
alpha = 0.5)
ggnewscale
is really a helpful package, but I have a little question about the package is it possible to show specific legend?Such as only show the
temp
legend on the plot and drop thetype
legend. I know we can drop it usingguide = 'none'
innew_scale_fill()
andnew_scale_color()
, but in my code I usenew_scale('fill')
.Any help will be highly appreciated!