A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://github.com/ponnhide/patchworklib/issues/36 below:

The position of the title cannot be set in plotnine. · Issue #36 · ponnhide/patchworklib · GitHub

Hi ponnhide. I want to set the title to the left. This is used to tag the image.

from plotnine import ggplot, geom_point, aes, ggtitle, theme, element_text
from plotnine.data import mtcars
import patchworklib as pw
ggplot(mtcars, aes('wt', 'mpg', color='factor(gear)'))+ geom_point()+ggtitle('A')+theme(plot_title=element_text(size=30,ha='left'))
ggplot(mtcars, aes('wt', 'mpg', color='factor(gear)'))+ geom_point()+ggtitle('B')+theme(plot_title=element_text(size=30,ha='left'))
A=ggplot(mtcars, aes('wt', 'mpg', color='factor(gear)'))+ geom_point()+ggtitle('A')+theme(plot_title=element_text(size=30,ha='left'))
B=ggplot(mtcars, aes('wt', 'mpg', color='factor(gear)'))+ geom_point()+ggtitle('B')+theme(plot_title=element_text(size=30,ha='left'))
section1=pw.load_ggplot(A)|pw.load_ggplot(B)
section1.savefig()

However, the title can be left in plotnine. but it is still in the center in patchworklib.


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4