72,783 questions
3
votes
0
answers
69
views
plt.show() does not display plots when running python venv through crontab
I have a python script, test.py:
import matplotlib.pyplot as plt
plt.plot()
plt.show()
plt.savefig("/home/user/Desktop/test.png")
When I run it in a virtual environment using this,
user@...
0
votes
1
answer
61
views
calplot height does not match Plotly chart height in two-column layout
I am building a Streamlit dashboard with two columns:
Left: a Plotly pie chart
Right: a calendar heatmap using calplot
My issue is that I cannot make both visualizations have the same height. Even ...
-1
votes
0
answers
70
views
Is it possible to cut a axis on Matlib
I am currently experimenting with Matplotlib, and I am quite struggling to figure out the best way to display following type of graph.
The challenge is that I have 90% of very low values and then the ...
Best practices
2
votes
3
replies
98
views
Approach to graphing with matplot
So I have the following problem:
I have several pandas Series's which I want to graph using matplotlib's subplot.
I came up with the following code
items = [expcat, inccat, expmonth, incmonth]
fig, ...
Tooling
1
vote
3
replies
115
views
Colorbar not completely filled
I have a contour plot here with data that ranges from 10 to 60 ish but i need the colorbar to show from 0 to 330 (for comparison with a similar plot), I've had a few python classes but its been mostly ...
-1
votes
2
answers
103
views
Why can't I turn off legend warnings in Matplotlib?
Does anyone know why this isn't working?
plot.py:
355 logging.getLogger('matplotlib.legend').setLevel(logging.ERROR)
356 plt.set_loglevel("error")
357 plt.legend()
I'm getting this:...
-1
votes
1
answer
128
views
Nested pie chart with variable number of subsections per section
I am using: https://matplotlib.org/stable/gallery/pie_and_polar_charts/nested_pie.html
BUT I'm feeding it a jagged array in the form of a masked array (through zero-padding), rectangularising it into ...
0
votes
1
answer
129
views
How to plot PCoA ellipsoids in Python?
I have a set of biological samples divided in three types (1, 2 and 3). I have managed to plot a PCoa analysis based on the Bray-Curtis distances regarding the relative abundance of some genes in the ...
0
votes
2
answers
100
views
plt.savefig() truncates the image
I have to display a plot and the corresponding data juxtaposed next to each other. The following code produces the result, but there are 2 problems:
import numpy as np
import pandas as pd
import ...
0
votes
0
answers
57
views
Matplotlib 3D plot Z-axis label not showing [duplicate]
So im trying to plot a 3D figure as shown in here.
The problem is that Z label is not appearing at all. Is there a way to make like the box smaller or make the figure larger so it can fit in ?
Below ...
1
vote
0
answers
128
views
Legends and handles not showing correctly in subplots
I have some figures with subplots where I compare various parameters from two tests (excel files Testdata1 and Testdata2) . Since the same two test is in all the subplots I use legend on the figure ...
Advice
0
votes
2
replies
105
views
Python mandelbrot set iteration slider
I've got a class project to do, it's supposed to display the mandelbrot set with a customizable colour map and a max_iter slider. I've got the colour map radio buttons working, but I can't manage the ...
0
votes
0
answers
58
views
Matplotlib figsize has no visible effect in Spyder plots pane
I am using Matplotlib in Spyder and I am trying to change the figure size with figsize, but it does not seem to make any visible difference no matter what values I use.
For example, even if I change:
...
3
votes
2
answers
120
views
How to visualize a dense, gappy time series with spikes in Python?
I have a sensor time series with these properties:
~250,000 data points at high sampling rate over ~12 hours
~11 continuous segments separated by 30-40 minute gaps (sensor goes offline periodically)
...
0
votes
1
answer
207
views
How can I make this plot using Seaborn or matplotlib?
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)...
