All Questions
Tagged with plot matplotlib
7,950 questions
0
votes
1
answer
24
views
Basemap plots in Matplotlib have cutoff map boundary lines
When trying to create a grid of maps in matplotlib using the Basemap toolkit, I noticed that the line that bounds the map projection is cut off on all four sides.
Look at the following minimal example ...
0
votes
1
answer
26
views
Why can I not get a continous curve when manually splitting a fitted curve into two parts?
I aim to fit the following function to my data:
def P(t, CP, Pan, tau):
P_val = CP + Pan / (1 + t / tau)
P_val = np.where(t >= 900, P_val - 0.8 * np.log(t / 900), P_val)
return P_val
...
1
vote
1
answer
79
views
Plot a Torus with Python
I'm new in python and I'm trying to draw a Torus. I want my torus to look like the one here, but my following code doesn't work.
import numpy as np
import matplotlib.pyplot as plt
from mpl_toolkits....
0
votes
2
answers
56
views
Wrong color values for 3d plot in matplotlib
I'm trying to render a complex function using matplotlib. I'm trying to plot a 3d graph using (x = Re z, y = Im z, arg(f(z))). The idea was to color the faces of the plot in a way that represents mod(...
0
votes
0
answers
20
views
Overploting healpy gnomview with data points ignores the data points
I am trying to create a figure in Python containing subplots with a gnomview map inside and data points overplotted. I am using this code:
import healpy as hp
import matplotlib.pyplot as plt
import ...
-4
votes
1
answer
68
views
How to recreate this tile plot in python
I found this plot/diagram and I would like to recreate it in Python. It feels like a heatmap with fixed labels or something, but I think there should be a better solution than that. Any help or hints ...
2
votes
1
answer
71
views
Add space between xlabels in matplotlib
I have the following issue:
I need to create a graph showing the results of an experiment I did in the lab recently. Unfortunately, two of these values are very close together due to an error (which ...
1
vote
2
answers
49
views
Saving A plot using matplotlib, seaborn
I am trying to plot Facet Grid, I have created whole function so it is more convenient, when I test it in my code editor it shows like it is in this
, but when I actually save it is shown like this:
...
0
votes
0
answers
22
views
How to plot date data from my pandas dataframe [duplicate]
Hey im a beginner struggling to plot a date (x-axis) vs a float (y-axis). Im struggling to understand the matplotlib documentation around dates or find an answer on SO.
I have a pandas dataframe with ...
0
votes
2
answers
87
views
Different sized Subplots with same scale in Python [closed]
I would like to plot some drilling data with python. As these are drilled at different levels above sea, I would like to align that all three subplots are aligned with the main plot Y-axis. I prepared ...
9
votes
3
answers
430
views
How to plot polygons from categorical grid points in matplotlib? (phase-diagram generation)
I have a dataframe that contains 1681 evenly distributed 2D grid points. Each data point has its x and y coordinates, a label representing its category (or phase), and a color for that category.
...
0
votes
3
answers
83
views
Why does matplotlib draw updates for the first interactive plot I show, but not the second?
I'm trying to show two interactive plots. The second plot is displayed after the first plot is closed. In this minimal example, the interactive part just draws a dot wherever the user clicks and ...
0
votes
1
answer
44
views
Gui to view matplotlib figure with forward and backward button
I want to build a GUI to view matplotlib figures with forward and backward buttons.
GUI is just similar to view images.
To an extent, I could get the results I need.
The problem is: that when I use ...
0
votes
1
answer
50
views
In python matplotlib, when plotting a multi-bar graph can I skip bars if the value is NaN so they do not appear?
I'm coding in Python using the library matplotlib to make a multi-bar graph, like a double-bar graph but I have 7 bars per category. I'm not sure what I have is necessarily the best way for me to plot ...
0
votes
0
answers
34
views
matplotlib/pandas multiple boxplots with an additional subplot
I would like to create 5 boxplots from a pandas dataframe and add an additional plot with a bar chart to create a full 3x2 matrix of plots. However, I am getting an error in several approaches.
Try #1:...