Hi, I am using mplot3d like this:
fig = plt.figure(figsize=(14,10))
ax = Axes3D(fig,azim=azimuth,elev=elevation)
ax.grid(on=False)
# Additional axes
xspan = np.linspace(0,80+20)
yspan = np.linspace(0,60+20)
zspan = np.linspace(0,60+20)
ax.plot3D(xspan,np.zeros(xspan.shape[0]),np.zeros(xspan.shape[0]),'k--')
ax.plot3D(np.zeros(yspan...
Hi guys!
I want to do a pie chart in matplotlib.
This pie chart will be a representation of two variables: male and female.
That's easy to do :)
What I would like to do next, I'm not even sure if it's possible to do with matplotlib, I would like to make these two variables clickable so if I click on male, I would see another page with...
Hi: I have a plot which has timestamps on the x-axis and some signal data on the y-axis. As a documentation I want to put timestamped pictures in relation to specific points in the plot. Is it possible to draw a line in a plot to a picture in a sequence of pictures below the plot?
...
As I run my code I get these warnings, allways in groups of four, sporadicly. I have tried to locate the source by placing debug messages before and after sertain statements to pin-point its origin.
Warning: invalid value encountered in double_scalars
Warning: invalid value encountered in double_scalars
Warning: invalid value encountere...
Hi,
I need help with setting the limits of y-axis on matplotlib. Here is the code that I tried, unsuccessfully.
import matplotlib.pyplot as plt
plt.figure(1, figsize = (8.5,11))
plt.suptitle('plot title')
ax = []
aPlot = plt.subplot(321, axisbg = 'w', title = "Year 1")
ax.append(aPlot)
plt.plot(paramValues,plotDataPrice[0], color = '#...
I would like to:
pylab.figure()
pylab.plot(x)
pylab.figure()
pylab.plot(y)
# ...
for i, figure in enumerate(pylab.MagicFunctionReturnsListOfAllFigures()):
figure.savefig('figure%d.png' % i)
What is the magic function that returns a list of current figures in pylab?
Websearch didn't help...
...
Hi,
I have a set of data, where each value has a (x, y) coordinate. Different values can have the same coordinate. And I want to draw them in a rectangular collection of boxes.
For example, if I have the data:
A -> (0, 0)
B -> (0, 1)
C -> (1, 2)
D -> (0, 1)
I want to get the following drawing:
0 1 2
+++++++++++++
0 + A + ...
I just installed matplotlib and am trying to run one of there example scripts. However I run into the error detailed below. What am I doing wrong?
from mpl_toolkits.mplot3d import axes3d
import matplotlib.pyplot as plt
fig = plt.figure()
ax = fig.gca(projection='3d')
X, Y, Z = axes3d.get_test_data(0.05)
cset = ax.contour(X, Y, Z, 16, ...
How can a pie chart be drawn with Matplotlib with a first wedge that starts at noon (i.e. on the top of the pie)? The default is for pyplot.pie() to place the first edge at three o'clock, and it would be great to be able to customize this.
...
I'm trying to display a grayscale image using matplotlib.pyplot.imshow(). My problem is that the grayscale image is displayed as a colormap. I need the grayscale because I want to draw on top of the image with color.
I read in the image and convert to grayscale using PIL's Image.open().convert("L")
image = Image.open(file).convert(...
I'd like to annotate a plot in matplotlib with filled and non-filled dots. I can create a circle patch, but the circle scales with my axes which is not my desired effect.
I can achieve this with
plt.plot(x,y,'.',markersize=10)
plt.plot(x,y,'o',markersize=10)
but both markers are filled even if I set markerfacecolor=None.
...
Dear all, I'm trying to perform a scatter plot with color with an associated color bar. I would like the colorbar to have string values rather than numerical values, as I'm comparing two different data sets each one with different colorvalues (but in any case between a maximum and minimum values). Here the code I'm using
import matplotl...
Hi guys!
I've been googleing to find if it's possible to change only the color of a bar in a graph made by matplotlib.
Imagine this graph:
let's say I've evaluation 1 to 10 and for each one I've a graph generate when the user choice the evaluation. For each evaluation one of this boys will win.
So for each graph, I would like to leav...
This is the first time I am using matplotlib and numpy.
Here goes the problem:
If I goto python cli, the intended code works fine. Here is that code
>>> from numpy import *
>>> y = array([1,2])
>>> y = append(y, y[len(y) - 1]+1)
>>> y
array([1, 2, 3])
But if I use it with matplotlib in a script I get this error.
line 26, in onkeypr...
I am doing some animated plotting and using the the matplotlib examples as a guideline. matplotlib examples
With the following linked example from that page the animation has some obvious problems when the frame is resized. What is the correct or best way to deal with this? animation_blit_wx.py
Thanks
...
hi !
i would like to write a server side python script that generate .pdf documents.
for the moment i have Python 2.7 installed server side
and matplolib installed server side too.
A simple script that create a simple plot and generate a .png picture
works.
this is the script i use :
# to access standard output :
import sys
# selec...
I have this beautiful sphere I made in matplotlib. How would I go about putting it in a tkinter frame widget? It'd be nice to be able to integrate it into an existing tkinter GUI. Also is it possible to rid of the menu bar below the display? I have no need to save the output or zoom, so it's useless to me.
from mpl_toolkits.mplot3d imp...
I'm currently trying to graph a sphere in a tkinter window using matplotlib. How do I go about making the display square? I'd like the sphere to have as little distortion as possible.
My code:
#!/usr/bin/env python
import matplotlib
matplotlib.use('TkAgg')
from mpl_toolkits.mplot3d import axes3d,Axes3D
import matplotlib.pyplot as plt...
The following code runs fine in my IDE (PyScripter), however it won't run outside of it. When I go into computer then python26 and double click the file (a .pyw in this case) it fails to run. I have no idea why it's doing this, can anyone please shed some light?
This is in windows 7 BTW.
My code:
#!/usr/bin/env python
import ma...
Hi
I am having problems with creating a matplot lib table using python.
The example i have been following : http://matplotlib.sourceforge.net/examples/pylab_examples/table_demo.html
My data :
I have two for loops where in the first For loop i get the Protocol Name and in the second for loop i get the module name. I need the data to...