Seth Masket charts it:
Peter Hanson and I directed a University of Denver survey back in the fall of 2012 that addressed this issue, among others. We asked respondents whether they thought marijuana should be illegal for all purposes, legal for medicinal use only, or available recreationally. [Above is] how the answers broke down by party …
These are pretty sharp differences. Notably, nearly all Democrats favor some sort of marijuana legality, with 60 percent supporting full recreational availability. Republicans are much more divided on the matter, with about a third taking each position. As Hanson notes, the divisions fall along predictable lines, with frequent church attenders opposing legalization and self-described libertarians supporting it.
Josh Voorhees also examines support for recreational and medical marijuana:
Some pot opponents warn that medical marijuana serves as a Trojan Horse for the larger legalization movement, but that argument relies on Americans believing that the dangers of possibly legalizing recreational weed tomorrow outweigh the benefits of actually prescribing it to cancer patients and others in need today—a viewpoint shared by a diminishing number of Americans. While 54 percent of respondents told Pew they thought “the use of marijuana” should be made legal, things were more complicated when the question changed from a simple yes-or-no to one where people were asked to pick between three choices: 39 percent said that pot “should be legal for personal use”; 44 percent said it “should be legal only for medicinal use”; and 16 percent said it “should not be legal.” Still, the answers to the original question—“Do you think the use of marijuana should be made legal, or not?”—suggests in an all-or-nothing environment, most Americans choose the former.