All Questions
1,577 questions
0
votes
0
answers
70
views
Seaborn swarmplot [duplicate]
I am trying to plot a seaborn swarplot and it looks like this:
But I want the first and last vertical lines removed (but without gaps in horisontal lines)
Here is snippet from my full code:
# ...
1
vote
0
answers
60
views
How can I show overlapping circles that depict quantities based on size using Python?
I am trying to find a way in VS code to create overlapping circles, much like an Euler diagram, that show different quantities of things. Different items would overlap or not depending on what they ...
0
votes
3
answers
134
views
Matplotlib KDE on Ternary Plot – Unexpected Density Scaling
I am working on a ternary KDE (kernel density estimate) plot using Matplotlib + SciPy’s gaussian_kde, but the density scaling is not behaving as expected.
The top panel (scatter plots) shows ternary ...
1
vote
1
answer
36
views
How to fix alignment of projection from (x,y,z) coordinates onto xy-plane in matplotlib 3d plot?
I was trying to make a 3D visualization of the joint probability mass function with the following code:
import math
import numpy as np
import matplotlib.pyplot as plt
def f(x, y):
if(1 <= x + ...
0
votes
0
answers
43
views
Getting an TypeError for a serborn code for visualisation [duplicate]
Getting this error:
TypeError: 'Axes' object is not subscriptable
this is the code :
fig, ax = plt.subplots(len(job_titles), 1)
sns.set_theme(style='ticks')
for i, job_title in enumerate(...
1
vote
1
answer
69
views
reserve space for a legend in pyplot while fixing plot size and x-axis position
here are two of my plotting functions and example use:
import matplotlib.pyplot as plt
def set_legend(ax, item_count, title=None):
legend = ax.legend(
title=title,
loc='upper ...
1
vote
2
answers
49
views
Matplotlib polar chart not showing all xy-ticks
Issue 1: The x-ticks (pie pieces) aren't ordered from 0 to 24 (my bad, should be 1)
Issue 2: all y-ticks (rings) aren't showing
Issue 3: Someone seems to have eaten a part of the polar chart ...
I ...
1
vote
2
answers
55
views
Presenting complex table data in chart for a single slide
Tables allow to summarise complex information. I have a table similar following one (this is produce for this question) in my latex document, like so:
\documentclass{article}
\usepackage{graphicx} % ...
0
votes
0
answers
50
views
Plotting results diagrams in a curve line, how can i do this in Python?
I need to plot post-processed results extracted from a tunnel lining plate in PLAXIS 2D.
Do you have any ideas on how to present these results in Python/Matplotlib similarly to how they are displayed ...
1
vote
1
answer
139
views
`inner_kws` having no effect on Seaborn violin plot
I generated a bunch of violin plots, here is an example of one and the code that generates it:
plt.figure(figsize=(8, 4))
ax = sns.violinplot(
x=data, # `data` is a few thousand float values ...
0
votes
0
answers
43
views
How to bold only e.g. the first, second, and second-to-last horizontal lines in a matplotlib table?
I'm working with matplotlib to create a table, and I need to bold specific horizontal lines.
Here's my current code:
np_table = table1(data)
fig, ax = plt.subplots(figsize=(6, 2.5))
ax.axis('off')
...
0
votes
1
answer
52
views
How to activate plt.show() when creating axes without pyplot in matplotlib?
I have a script like this which when executed opens up a new window with the figure.
import matplotlib.pyplot as plt
fig = plt.Figure()
# ax = fig.add_axes(rect=(0.1, 0.0, 0.9, 1.0)) # does not open ...
1
vote
0
answers
74
views
Why is there an offset between grey bars and width of arrows in upper limits
For the image shown below, which shows upper limits in red arrows between two variables X and Y and on the right side there is Z axis showing value of grey bars, why is their an offset between grey ...
0
votes
1
answer
61
views
How to dynamically update a bar plot in Python
I have a barplot that I'd like to update dynamically using data from a dataframe.
The original plot is based on dataframe, d:
d
Position Operation Side Price Size
1 9 0 1 0.7289 -19
...
1
vote
0
answers
66
views
How to create a custom color map [duplicate]
I need to create a custom cmap. I have made a dictionary of color and associated value from image:
{
100: "RGB(170, 170, 170)",
75: "RGB(90, 0, 0)",
50: "RGB(180, ...