Tagged Questions
Matplotlib is a plotting library for Python, built on NumPy and often used interactively with IPython. Its compact "pylab" interface is similar to the plotting functions of MATLAB®.
2
votes
1answer
20 views
Issues with python matplotlib and subplot sizes
I am trying to create a figure with 6 sub-plots in python but I am having a problem. Here is a simplified version of my code:
import matplotlib.pyplot as plt
import numpy
g_width = 200
g_height = ...
1
vote
1answer
19 views
How to plot pcolor colorbar in a different subplot - matplotlib
I am trying to split my plots in different subplots.. What I want to achieve is to put a colorbar for a subplot in a different subplot.
Right now I am using:
# first graph
axes = plt.subplot2grid((4, ...
0
votes
1answer
7 views
matplotlib and apect ratio of geographical-data plots
I process geographical information and present the results using
matplotlib. All input is lattitude/longitude [degree]. I convert into
x/y [meter] for my calculations. And I present my results in
...
1
vote
2answers
44 views
Simpler way to break a list of comma separated values into many lists in Python 3
I have a file codereview_stats.txt which has data in the following format. The date at the top represents the last date at which data was written in the file and is there for the way I am collecting ...
2
votes
1answer
18 views
Incorrect rectangle location in matplotlib
I'm making a plot with bars and I'm trying to find their absolute location (in pixels) on the plot for further processing later. It seems to me that this should be able to be figured out from ...
1
vote
0answers
23 views
Why do i get KeyError: 'Patch' when using Spyder?
When i run the code using Spyder, I get a KeyError:'Patch' error:
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File ...
1
vote
3answers
30 views
Step plot by reading from file
I am a newbie to matplotlib. I am trying to plot step function and having some trouble. Right now I am able to read from the file and plot it as shown below. But the graph in the top is not in steps ...
1
vote
1answer
16 views
error in dynamic bar chart generation on python
Going by the this example,
http://matplotlib.org/examples/pylab_examples/barchart_demo.html
I wanted to generated the dynamic bar chart.so far I have following script.
import sys
import ...
0
votes
0answers
21 views
Matplotlib: how to combine wireframes
I am trying to understand how to create wireframes of closed surfaces. I have looked at the sphere example and was hoping to get it working on my data. For sake of illustration, I have a toy problem ...
-4
votes
1answer
49 views
DateFormatter returning wrong dates - Matplotlib/Pandas [on hold]
I am trying to plot some data using matplotlib and pandas. However when using the DateFormatter, dates are being rendered incorrectly depending on what I filter out of the DataFrame:
The dates in ...
0
votes
2answers
20 views
remove x ticks but keep grid lines
I have a Pyplot plot, which I want to add gridlines to. I did this using:
plt.grid(True)
I then removed my x ticks using:
ax1.xaxis.set_visible(False)
My x ticks were removed, but so were the x ...
1
vote
1answer
25 views
Overlaying the numeric value of median/variance in boxplots
When using box plots in Python, is there any way to automatically/easily overlay the value of the median & variance on top of each box (or at least the numerical value of the median)?
E.g. in the ...
0
votes
0answers
13 views
How to match cmyk colors between matplotlib and LaTeX
I'm plotting something using matplotlib and I'm using the matplotlib.cm.rainbow colormap. I need to match the same colors in my LaTeX document, but I'm having a difficult time making the colors match ...
1
vote
1answer
31 views
Xaxis Labels not matching Data Points - Pandas/Matplotlib
I have a TimeSeries in Pandas that I want to plot. I have 336 records in the TimeSeries. I only want to show the date/time (index of the TimeSeries) on the x-axis once per every 20 or so data ...
0
votes
0answers
16 views
How to shrink a subplot colorbar
starting from this code:
import numpy as np
import matplotlib.pyplot as pl
import matplotlib
from matplotlib.gridspec import GridSpec
x=np.linspace(0.0,1.0,100)
y=np.linspace(0.0,1.0,100)
...