Skip to main content
0 votes
1 answer
187 views

How can I make this plot using Seaborn or matplotlib? A key requirement is that the plot code be less than about 10 lines (this code is meant to go in a book and should not require a PhD in matplotlib)...
Ian Gow's user avatar
  • 3,577
3264 votes
16 answers
6.4m views

How do I change the size of figure drawn with Matplotlib?
tatwright's user avatar
  • 38.7k
1727 votes
18 answers
2.1m views

I have a series of 20 plots (not subplots) to be made in a single figure. I want the legend to be outside of the box. At the same time, I do not want to change the axes, as the size of the figure gets ...
pottigopi's user avatar
  • 17.3k
4 votes
1 answer
117 views

I have a dataset for simulated and experimental values for different categories (temperatures, design). I want to create two figures to compare simulated and experimental values for 1.) temperature (...
Katharina's user avatar
3 votes
1 answer
108 views

I am in the process of migrating code and workflows from R-tidyverse/ggplot2 to Python and I'm trying to replicate something that worked for me in R. My challenge in this case is working with split ...
Bill Capehart's user avatar
0 votes
2 answers
158 views

I am making a histogram where all the bars are overlapped, but even with the transparency lowered for the bars, it still looks like a mess to me. I thought if I could make the bars themselves ...
katlynisgreatlyn's user avatar
2 votes
0 answers
53 views

I have script that loops over a set of json color themes, uses seaborn and matplotlib to generate a labeled swatch and then saves it to a buffer. I want to paste the buffer into a new PIL.Image but ...
zoof's user avatar
  • 181
3 votes
2 answers
98 views

I have the following plot made with Python seaborn: The plot I have: Obtained by this piece of code: plot = sns.scatterplot(data=by_sent_type, s=50) plot.set(xlabel="pair", ylabel="...
Ivy's user avatar
  • 33
527 votes
14 answers
1.4m views

How do I change the size of my image so it's suitable for printing? For example, I'd like to use an A4 paper, whose dimensions are 11.7 inches by 8.27 inches in landscape orientation.
Michael Grazebrook's user avatar
4 votes
1 answer
135 views

I'm working on a scatterplot done with Seaborn; now, I'm pretty happy with the result achieved so far but there is one thing I wish to fix. In my legend I have two type of entries: sample and genome, ...
Matteo's user avatar
  • 693
602 votes
12 answers
1.0m views

I need to generate a whole bunch of vertically-stacked plots in matplotlib. The result will be saved using savefig and viewed on a webpage, so I don't care how tall the final image is, as long as the ...
mcstrother's user avatar
  • 7,587
Tooling
0 votes
3 replies
57 views

What I want to achieve is something as below: I have found the brokenaxes package here, and tried it: from brokenaxes import brokenaxes import numpy as np bax = brokenaxes(xlims=((0, 10), (195, 200))...
Explorer's user avatar
  • 117
Best practices
2 votes
4 replies
81 views

I am performing Exploratory Data Analysis (EDA) on a medical dataset (Primary Biliary Cirrhosis) to select features for a multiclass classification model. My target variable is Stage (1, 2, 3, 4). The ...
DJTrevor Philips's user avatar
306 votes
12 answers
550k views

I tried the following code (test_seaborn.py): import matplotlib matplotlib.use('Agg') import matplotlib.pyplot as plt matplotlib.style.use('ggplot') import seaborn as sns sns.set() df = sns....
neversaint's user avatar
  • 64.6k
377 votes
7 answers
858k views

How do I add a horizontal line to an existing plot?
Ibe's user avatar
  • 6,155

15 30 50 per page
1
2 3 4 5
652