def boxplot(self, fig_width: Number, fig_height: Number = None):
"""
Creates a (horizontal) box plot comparing all single object for a given property.
:param fig_width: width of the figure in cm
:param fig_height: height of the figure in cm, if None it is calculated from the figure width using the
aesthetic ratio
"""
import seaborn as sns
import matplotlib.pyplot as plt
self.reset_plt()
if fig_height is None:
fig_height = self._height_for_width(fig_width)
self._fig = plt.figure(figsize=self._fig_size_cm_to_inch(fig_width, fig_height))
df = self.get_data_frame()
sns.boxplot(data=df, orient="h")
评论列表
文章目录