Skip to content
Advertisement

Get pandas boxplot in one plot and matplotlib plot in another figure

JavaScript

When I run the program, the two plots are plotted in one figure, but I want them in two separate figures.

Advertisement

Answer

The pandas.DataFrame.boxplot takes an ax parameter, as written in the docs.

So you can use:

JavaScript

Otherwise, you can plot in different subplots of the same figure by applying minimal changes.

User contributions licensed under: CC BY-SA
3 People found this is helpful
Advertisement