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®.
0
votes
0answers
14 views
SimpleServer Python27 generate broken png created in Matplotlib
I Have SimpleServer created in Python27 in which I call cgi script, where Matplotlib returns a .png image. But when i try to show the PNG in html it's always broken.
This is how i do it:
imgdata = ...
0
votes
0answers
4 views
Embed Matplotlib into PyQt as a custom widget
I was trying embed matplotlib in python into Qt Designer as a custom widget, i followed one of those instruction online, i promote the widget to mplwidget.py and i coded file as code following
from ...
-2
votes
1answer
17 views
matplotlib plotting dictionary keys as column labels
I'm tripping over my feet here with this very simple task.
I want to plot as a bar chart in matplotlib, where the keys are the labels of the columns, and the height of each bar is the value.
e.g.
...
1
vote
1answer
15 views
matplotlib backend wrongly combines multiple graphs when used on nginx server
I am developing a Django based site that does language processing. Part of the site is generating Matplotlib graphs from textual data. I have everything up and running and it works perfectly on my ...
0
votes
0answers
5 views
matplotlibwidget Install issue
I have a strange problem. I am using a program developed in python 2.7 (not by me). The software use matplotlib and I installed it fine. But somehow I still get this error. Anyone has any idea what to ...
0
votes
0answers
10 views
How can I install python-matplotlib installation in archlinux? [on hold]
I have python, python2, python3 installed in /usr/bin/
When ever I am trying to install matplotlib by pacman -S python-matplotlib, some packages were trying to dwonload and finally displays, no ...
1
vote
1answer
14 views
Python- Connecting Lines with plot_date in Matplotlib
I am using matplotlib to graph out some data in which takes time over a time, therefore I have to use plot_date in order to plot my lines. But for some reason Plot_Date and Plot have completely ...
0
votes
0answers
12 views
matplotlib update data in thread
I'm new in matplotlib.
I want to update a data in an endless while loop in a different thread
in addition to updating the plot in the pyplot.show method.
I tried using the threading import but ...
1
vote
1answer
14 views
Matplotlib slider color change
I have small question.
How can I change slider color in matplotlib? by default it`s blue. And in my project I need two sliders, one green and one red.
here is code:
import numpy as np
import ...
0
votes
0answers
7 views
ax.set_xlim3d has no effect in Matplotlib with ax.plot_wireframe
I'm having a conceptual problem with my data constraining boundary conditions for a wireframe plot in python. Could anyone explain to me where I have gone wrong?
I would like the boundaries to be ...
0
votes
1answer
14 views
Different colors for each label on an axis of a matplotlib chart?
Is it possible to have a different color for certain labels on an axis?
import matplotlib.pyplot as plt
fig = plt.figure()
ax1 = fig.add_subplot(111)
ax1.set_yticks([0,1,2])
...
2
votes
3answers
30 views
Plotting functions at a specific y-interval
I need to plot a few exponential curves on the same plot - with the constraint that the plot ends at y=1.
For reference, here is the code:
from numpy import arange
from matplotlib import pyplot as ...
0
votes
0answers
18 views
Plotting an histogram in log log scale with identical bar thickness
I'm trying to plot input data in an histogram in log-log scale (to quickly view if this could fit a power law), but I'm having trouble in outputting the way I want. I'm using Python and more ...
1
vote
1answer
25 views
How to color bars who make up 50% of the data?
I am plotting a histogram for some data points with bar heights being the percentage of that bin from the whole data:
x = normal(size=1000)
hist, bins = np.histogram(x, bins=20)
plt.bar(bins[:-1], ...
1
vote
1answer
55 views
Superscript in Python plots
I want to label my x axis at follows :
pylab.xlabel('metres 10^1')
But I don't want to have the ^ symbol included .
pylab.xlabel('metres 10$^{one}$')
This method works and will superscript ...
1
vote
0answers
38 views
matplotlib - Spectrogram (v1.3.1)
I'm interested in knowing just how matplotlib processes the spectrogram. I understand most parts, specifically in the FFT and others, but, to me the scaling does not seem correct. The default is to ...
0
votes
2answers
51 views
Python Error: “ImportError: No module named six”
I am running Python 2.7 on a Windows 7 OS
Here is what I run:
>>> import matplotlib.pyplot as plt
Then I get this:
Traceback (most recent call last):
File "<pyshell#3>", line 1, ...
1
vote
2answers
43 views
Separating arrays with numpy to plot with matplotlib in python
I have an array containing 2 data curves, imported from excel. Below is my array. Column 1 is the x axis, while column 3 is the y axis.
[[ 0.00000000e+00 8.57250668e-06 0.00000000e+00]
[ ...
0
votes
0answers
25 views
Python filled contour plot with lat longs
I have a list of lat longs with associated data, I would like to plot this as a filled contour map in python. I have played around with converting the lat longs to x,y coordinates but this doesn't ...
1
vote
1answer
24 views
Hold is not working for pyplot
I have a problem using pyplot. I am new to Python so sorry if I am doing some obvious mistake.
After I have plotted something using pyplot it shows the graph, but when I then try and add e.g. ylabel ...
3
votes
1answer
29 views
How do I get the modern style matplotlib plots often seen in iPython Notebook examples?
Take this page, for example, a sample of which is posted below:
It has matplotlib examples with gray background and more subtle coloring, but when I'm running the same examples, I get the more ...
0
votes
1answer
26 views
ImportError: No module named matplotlib.python-dateutil
I'm trying to use py2exe to convert my .pyw to executable file, and
encountered this error - "ImportError: No module named matplotlib.python-dateutil"
I've installed dateutil before trying to ...
0
votes
0answers
15 views
ax.transAxes matplotlib on basemap doesn't work
I'm doing a map plot use basemap and I want some artist (ex: Polygon) on a graph get transform (when zooming) with apply the transform=ax.transAxes but I doesn't work and I can't see why. here's code:
...
0
votes
1answer
13 views
Scatter plot in matplotlib origin aligned
I've looked all over the net for this incredibly simple thing and can't find it.
I have a list of (x,y) points and want to plot them, with the origin in the lower left, grid marks showing ...
1
vote
1answer
13 views
Matplotlib: determining when mouse is in axis text rectangle
So it's somewhat well known that in matplotlib zoom, pressing 'x' or 'y' when zooming will zoom on only the x or y axis. I would like to modify this slightly by subclassing the NavigationToolbar2 in ...
0
votes
0answers
16 views
Convert PNG image (using pypng) for use in matplotlib with figure.figimage
I need a little help. I have a chart that is produced with matplotlib, and the last requirement is to display the company logo (.PNG file) on the chart. However, I cannot use the Python Image Library ...
0
votes
1answer
14 views
Matplotlib Basemap animation
I'm using basemap to plot some points on a map, and I want to add any kind of animation to it. It could literally serve no purpose at all, as long as it is an animation it would be nice.
This is what ...
0
votes
1answer
25 views
Calculating PSD
I'm trying to create a spectrogram like the one in matplotlib and in this library, they return the PSD (Power Spectra Density) rather than the absolute magnitude etc..
I want to implement the PSD ...
1
vote
2answers
19 views
Drawing tangent plot in Python (matplotlib)
Today I decided to write simple program in Python, just to practice before exam. Firstly, I wanted to draw sin and cos plot, which wasn't so hard. But then, I decided to challenge myself and draw ...
0
votes
0answers
33 views
How to make a publication quality 3D figure? [on hold]
I am trying to use Mayavi2 from Enthought to make some publication quality figures, but the axes, both normal axes and orientation axes, is too ugly to put into papers. I used Inkscape to add 2D axes ...
0
votes
0answers
8 views
Matplotlib + Ubuntu + GTK3 no plot shown
I can see the GUI but not the plot. No errors, even the mouse coordinates are okay, but no plot using
import matplotlib.pyplot as plt
plt.plot([1,2,3,4])
plt.ylabel('some numbers')
plt.show()
Then
...
2
votes
1answer
29 views
Embedding a matplotlib animation into a tkinter frame
For a project I am working on a simple harmonic motion simulator (How a mass oscillates over time). I have got the data produced correctly and already have a graph produced within a tkinter frame ...
1
vote
1answer
33 views
loading a table in numpy as in R?
I would like to load a table in numpy, so that the first row and first column would be considered text labels. Something equivalent to this R code:
read.table("filename.txt", row.header=T)
Where ...
0
votes
1answer
10 views
unable to install matplotlib under pythonw3.3 on mac
I am trying to install matplotlib using this command:
pip install matplotlib
I get this error:
src/ft2font.h:16:10: fatal error: 'ft2build.h' file not found
#include <ft2build.h>
...
0
votes
2answers
31 views
Plot a histogram from a Dictionary
I created a dictionary that counts the occurrences in a list of every key and I would now like to plot the histogram of its content.
This is the content of the dictionary I want to plot:
{1: 27, 34: ...
1
vote
1answer
37 views
getting errors when trying to install matplotlib and numpy using pip
I have python version 3.3. I did install pip and now trying to install matplotlib and numpy.
pip install matplotlib
pip install numpy
I get these errors:
File ...
1
vote
2answers
31 views
Matplotlib: Vertical lines in scatter plot
I have posted a fair amount of code here and it's at the bottom of this post. The code opens a tkinter GUI with various buttons and fields etc. It also displays a graph at the very bottom using ...
2
votes
2answers
37 views
Python- Matplotlib Moving Graph title to the y axis
I am currently using matplotlib in python to graph some data, however I want the titles of the graph to be on the Y axis because there is not enough room for both the title of one graph and the x-axis ...
1
vote
1answer
30 views
Simple 3D barplot of a 2D histogram after PCA
I already read some the question that I could find here or elsewhere. I wrote the code using other questions available on stackoverflow but still it doesn't work sometimes. There are three types of ...
0
votes
1answer
11 views
Plot stack of unit vectors in cylindrical coordinates - matplotlib
I have a python program that calculates angles for me and outputs them in a list.
What I would like to do is plot a stack of arrows that are unit vectors pointing in the direction of the angle. So I ...
0
votes
0answers
34 views
Can pandas plot a time-series without trying to convert the index to Periods?
When plotting a time-series, I observe an unusual behavior, which eventually results in not being able to format the xticks of the plot.
It seems that pandas internally tries to convert the index into ...
0
votes
1answer
14 views
Hexadecimal X-axis in matplotlib?
Is it possible to somehow have the values on the X-axis be printed in hexadecimal notation in matplotlib? For my plot the X-axis represents memory addresses.
Thanks.
0
votes
1answer
20 views
How to increase the values size in a matplotlib colorbar
I'm trying to increase the values size in a colorbar. Seems trivial but I have not been able to figure it out.
I have produced a heatmap and here is the code:
def heatmap_binary(df,
...
0
votes
1answer
21 views
Matplotlib and django templates
I have a Django application, with charts from Googles image chart api. I want to replace the charts (they are depreciated), and start using Matplotlib.
So I have followed the example here, to get ...
1
vote
1answer
17 views
axhspan set limits using coordinates
Is it possible to set the limits of the how far axhspan spand the x axis using coordinates rather than a value of 0-1? Usually the command takes:
axhspan(ymin, ymax, xmin=0, xmax=1, **kwargs)
I know ...
0
votes
0answers
13 views
Grey area while plotting inline in Ipython Qt console
I have used the Ipython Qtconsole 1.1.0. together with Matplotlib 1.3.1. I want to plot my figures in the Qt-console and I therefore follow the examples from this page. When I follow their ...
1
vote
1answer
32 views
Embedding an animated matplotlib in tk
I am fairly new to python and a real beginner to tkinter and matplotlib.
I have the following code which essentially is a testbed for what I eventually want to do.
#!/usr/bin/env python
import ...
1
vote
3answers
43 views
Automatically run %matplotlib inline in iPython Notebook
Every time I launch iPython Notebook, the first command I run is
%matplotlib inline
Is there some way to change my config file so that when I launch iPython, it is automatically in this mode?
2
votes
1answer
34 views
How to fetch timestamp in Pandas DataFrame
I'm trying to plot pandas to the web using Flask. I think i'm on the right track but i'm struggling to grab the date to put on the x axis.
for the y axis data, its easy:
aapl = ...
0
votes
2answers
21 views
Reduce Whitespace in pcolor matplotlib plot
I'm currently working on plotting pivoted tables using matplotlib pcolor but my axes are not functioning like i would like them to.
I plot the tables using:
pyl.pcolor(pivot_99)
pyl.colorbar()
...