The art of ukiyo-e ("pictures of the floating world"), originated in the metropolitan culture of Edo (Tokyo) during the period of Japanese history, when the political and military power was in the hands of the shoguns, and the country was virtually isolated from the rest of the world. It is an art closely connected with the pleasures of theatres, restaurants, teahouses, geisha and courtesans in the even then very large city. Many ukiyo-e prints by artists like Utamaro and Sharaku were in fact posters, advertising theatre performances and brothels, or idol portraits of popular actors and beautiful teahouse girls. But this more or less sophisticated world of urban pleasures was also animated by the traditional Japanese love of nature, and ukiyo-e artists like Hokusai and Hiroshige have had an enormous impact on landscape painting all over the world.
Ukiyo-e were affordable because they could be mass-produced. They were mainly meant for townsmen, who were generally not wealthy enough to afford an original painting. The original subject of ukiyo-e was city life, in particular activities and scenes from the entertainment district. Beautiful courtesans, bulky sumo wrestlers and popular actors would be portrayed while engaged in appealing activities. Later on landscapes also became popular. Political subjects, and individuals above the lowest strata of society (courtesans, wrestlers and actors) were not sanctioned in these prints and very rarely appeared. Sex was not a sanctioned subject either, but continually appeared in ukiyo-e prints. Artists and publishers were sometimes punished for creating these sexually explicit shunga.