1
vote
1answer
22 views

cannot execute matplotlib example

I installed python3.2.3 on Debian 7.1 and installed numpy, scipy, matplotlib with it. When I wanted to test matplotlib with the basic example, it didn't execute and didn't error the execution. Here is ...
0
votes
2answers
31 views

change figure size and figure format in matplotlib

I want to obtain fig1 exactly of 4 by 3 inch sized, and in tiff format correcting the program below: import matplotlib.pyplot as plt list1 = [3,4,5,6,9,12] list2 = [8,12,14,15,17,20] plt.plot(list1, ...
0
votes
2answers
134 views

Python - FFT leads to wrong physical meanings

I am new to Python. I intend to do Fourier Transform to an array of discrete points, (time, acceleration), and plot the result out. I copy and paste the sample FFT code, and modify accordingly. ...
1
vote
0answers
66 views

AttributeError: 'map' object has no attribute 'extend' in matplotlib setup

I cloned the git master branch of matplotlib and I got to build it in Mac OSX. When I try to do the same in x86_64 GNU/Linux I get this output and error: BUILDING MATPLOTLIB matplotlib: yes ...
1
vote
1answer
64 views

Variable point size in matplotlib

This is my code: import numpy as np import matplotlib.pyplot as plt from os import getcwd from os.path import join, realpath, dirname mypath = realpath(join(getcwd(), dirname(__file__))) myfile = ...
0
votes
1answer
61 views

matplotlib basemap no module named axes_grid1

i have a problem after installing Basemap 1.0.6. I'm running a virtualenv, first a activated my virtualenv, went into my home directory and downloaded the latest Basemap version. Then i installed it ...
0
votes
1answer
77 views

OS X 10.7 + Python 3.3 + numpy + matplotlib

I have been trying to get Matplotlib running in 3.3 with no luck. I downloaded the latest github repos for matplotlib, which depends on numpy. For numpy I did 'python3 setup.py build ...
0
votes
1answer
81 views

TypeError when using Matplotlib's strpdate2num with Python 3.2

In my current project I want to read some experimental data from a text file into Python using the following code: import numpy as np from matplotlib.dates import strpdate2num data = ...
0
votes
0answers
31 views

Matplotlib: contourf3d_demo2 example doesn't work with python3.3

The current docs for the matplotlib mplot3d contourf function contain two examples: mplot3d tutorial - Matplotlib 1.2.1 documentation One of them, contourf3d_demo2.py works with python v2.7.3, but ...
1
vote
1answer
97 views

Python 3.3 + Matplotlib 1.2.0: pdf export generates “'str' does not support the buffer interface” error

I just started migrating from matlab/mathematica to python for technical computing. I have been learning how to use the matplotlib.pyplot package and was hoping someone could help me with fonts. I ...
2
votes
1answer
91 views

Plotting data in Python using matplotlib

I'm currently reading "Machine Learning in Action". In the chapter 8 of Regression, p.158 , there are few codes to plot original data point and a fitted line together. import matplotlib.pyplot as ...
0
votes
1answer
37 views

Empty square for legend for stackplot

I'm trying to generate a stack plot of version data using matplotlib. I have that portion working and displaying properly, but I'm unable to get the legend to display anything other than an empty ...
0
votes
1answer
47 views

Can I convert a contour plot in matplotlib to a format that can be imported and edited in AutoCAD?

I have written a script in Python 3.3 which reads position (x, y coordinate) and risk values from a text file and saves the resulting contour plot using matplotlib. My company needs to be able to ...
3
votes
3answers
130 views

use of // in python

I am new in python programming. I have come to piece of program in which if (pos.x//1,pos.y//1) not in self.cleaned: self.cleaned.append((pos.x//1,pos.y//1)) is used. It might be silly of me. ...
0
votes
1answer
61 views

Matplotlib and subinterpreter for embedded python in c++

I just added subinterpreter to my c++ embedded python editor to have a clean interpreter for each execution. PyThreadState* tmpstate = Py_NewInterpreter(); PyThreadState_Swap(tmpstate); ... run ...
1
vote
0answers
83 views

Destroying tkinter figures with keyboard interrupt in a embedded c++ python editor

I am addind a python editor to a C++ application. In order to be able to stop the python process when the user presses ctrl-c, I have 2 threads: 1- the first one runs the python string; 2- the ...
1
vote
1answer
258 views

python3.3 matplotlib cannot import name _tkagg

The default backend for my matplotlib is 'agg'. I read on stackoverflow (how to set 'backend' in matplotlib in python) that in order to display graphics I need to use TkAgg, WX, QTAgg, or ...
2
votes
1answer
130 views

matplotlib path linewidth connected to figure zoom

Is it possible to tie the linewidth of a matplotlib path to the figure zoom/scale level? I am drawing a map where the matplotlib path (with bezier curves) draws the road on the map. Upon zooming in ...
2
votes
1answer
243 views

AttributeError: 'numpy.ndarray' object has no attribute '_hold'

I am using numpy and matplotlib in Python3. The following code is causing the error: import matplotlib from matplotlib.backends.backend_qt4agg import FigureCanvasQTAgg as FigureCanvas from ...
2
votes
1answer
198 views

cumulative distribution plots python

I am doing a project using python where I have two arrays of data. Let's call them pc and pnc. I am required to plot a cumulative distribution of both of these on the same graph. For pc it is supposed ...
0
votes
1answer
46 views

Modifying filled area in matplotlib

I've an interactive figure on which plot is drawn incrementally, one chunk at time. That is, in a loop I get some sampling data, then I add them to existing curves in the plot and redraw the picture. ...
0
votes
1answer
110 views

Matplotlib ft2font build error (python3)

Experiencing the following error when trying to build matplotlib for Python3. I have installed Numpy and Scipy already (including debug extensions). I have also installed libpng12-0 and libfreetype6 ...
0
votes
2answers
303 views

Matplotlib - Stacked Bar Chart with ~1000 Bars

Background: I'm working on a program to show a 2d cross section of 3d data. The data is stored in a simple text csv file in the format x, y, z1, z2, z3, etc. I take a start and end point and flick ...
1
vote
1answer
218 views

Fixing axes ranges in pyplot subplots

I am trying to plot data sets U(x,t) and V(x,t) using Python's matplotlib.pyplot subplots. I want to manually set the axes of the first subplot, while the second subplot can choose its own axis: ...
0
votes
1answer
379 views

No module named pylab

I just upgraded to python3 on Fedora, and was trying to import pylab. But instead I got an error ImportError: No module named 'pylab' After some research I found some information about installing ...
2
votes
1answer
78 views

matplotlib sequence of figures in the same window

I'm testing an algorithm and I'd like to produce a sequence of figures displaying intermediate results using matplotlib. I'm not needing animations, nor multiple figures all on the screens, nor ...
9
votes
2answers
1k views

matplotlib wont draw python3

I installed matplotlib successfully inside a virtualenv. Now I'm trying to get it to draw. I know how to change the backend, but I'm having a whole lot of trouble figuring out what to change it to. ...
1
vote
1answer
287 views

Using converter function in genfromtxt fails

When I try to read a space separated file using genfromtxt and using a converter function to convert numbers with a comma as decimal separator, I get a type error. It seems there is something wrong ...
0
votes
2answers
786 views

error with gcc when install matplotlib with python3

I'm trying to install matplotlib with python3 as mentionned in How to install matplotlib with Python3.2. An error occurs: command 'gcc' failed with exit status 1 when i do python3 setup.py build ...
2
votes
1answer
185 views

Get Binary Image Data From a MatPlotLib Canvas?

I'm trying to get the binary data from a matplotlib canvas so I can attach it to an email, but the only way I've found to do so is by saying: filename = 'image.png' canvas.print_figure(filename) with ...
1
vote
1answer
124 views

Python3: Date strings to chronological order

I have a dictionary where the keys are date strings. The format is: %d.%m.%Y ie. "5.11.2008". The dates have corresponding data for each day. What would be the easiest way to collect them in to ...
0
votes
2answers
152 views

How to work with matplotlib?

I can not import matplotlib.pyplot/matplotlib.pylab and if I have to download where from I may download? I am using Python3.2.1 on Windows7(64 bit). But without a separate download how come ...
0
votes
2answers
372 views

Matplotlib histogram2d normalize not equal 1

Having one of those days, I can't get my head around what is going on. I have a tool which generates 2D histograms from arrays (Numpy arrays) of X,Y,Z coords (Z is unimportant at the minute). I need ...
1
vote
2answers
211 views

draw candlesticks(matploblit)

#!/usr/bin/env python from pylab import * from matplotlib.finance import candlestick from datetime import datetime data2 = [(datetime(2012, 2, 1), 3103, 3102.01, 3103.62, 3101.90), ...
1
vote
2answers
924 views

Matplotlib pylab savefig runtime error in python 3.2.3

I am trying to test whether matplotlib installed properly in python3. I am following this basic tutorial: http://www.scipy.org/Plotting_Tutorial This question is similar to one asked previously but ...
1
vote
1answer
162 views

Curl error while installing numpy and matplotlib for Python 3 on Mac OS X 10.6

Matplotlib has recently released a python 3 compatible version. To install matplotlib, you need numpy. I was following the instructions here for installing matplotlib. I tried installing numpy ...
1
vote
2answers
430 views

Select image region (programmically!): Python 3, matplotlib

I have an image and want to get somehow a new image which will be a rectangle region of the original image centered at the middle point of the original image. Say, the original image is 1000x1000 ...
0
votes
0answers
113 views

Cryptic error while installing matplotlib

When trying to pip install matplotlib I get this massive error message (-> pastebin). Can anyone help me to make sense of this?
1
vote
1answer
2k views

Install MatPlotLib 1.2.x on OS X Lion 10.7.4 and Python 3.2.2

I asked a question a couple of days ago regarding installing numpy on the same system. Thankfully, I managed to solve that one myself but unfortunately I am now stuck trying to install matplotlib. I ...
6
votes
4answers
5k views

Install NumPy for Python 3.2.3 on OS X 10.7.4

I have been trying for months to get numpy installed for Python 3 but despite copious amounts of Googling and even posting to the numpy mailing list I am still no closer to a solution. I have managed ...
1
vote
1answer
130 views

plotting more than one plot with different axes types

I have the following code but I want them to be on the same graph but different subplots. What's the simplest way to create different axes? from pylab import * figure(0) x =1 y = 2 plot(x, y, ...
9
votes
2answers
3k views

Matplotlib for Python 3 and Linux

I understand that Matplotlib has been ported to Python 3 (matplotlib-python-3-thanks-cape-town-group). However, it seems that I can only find Windows executables. The matplotlib-py3 page claims that ...
-1
votes
2answers
647 views

Installing Python 3's matplotlib library on OS X

How do I install Python's matplotlib library for Python 3 on Mac OS X?
6
votes
2answers
1k views

Matplotlib Agg Rendering Complexity Error

I am trying to print a 600 dpi graph using Python matplotlib. However Python plotted 2 out of 8 graphs, and output the error: OverflowError: Agg rendering complexity exceeded. Consider downsampling ...
3
votes
1answer
2k views

matplotlib widget for Qt 4, Python 3

I'm writing a GUI application in Python 3 using PyQt4 and matplotlib. User would have to select certain field names, then programm would read corresponding values from the database, process them and ...
3
votes
2answers
501 views

Exporting plot with full data or saving as a script

I'm using python with matplotlib to create plots out of data, an I'd like to save this plots on a pdf file (but I could use also a more specific format). I'm using basically this instructions: ...
3
votes
4answers
528 views

connecting all numpy array plot points to each other using plt.plot() from matplotlib

I have a numpy array with xy co-ordinates for points. I have plotted each of these points and want a line connecting each point to every other point (a complete graph). The array is a 2x50 structure ...
3
votes
1answer
1k views

Unable to use Matplotlib - Ubuntu 10.10 and Python 3.2

I am running python3.2 on Ubuntu 10.10 i386 (32 bit). I just installed matplotlib-py3 (from source) for learning purposes and when I try one of the many examples on the website: ...
1
vote
1answer
214 views

Multi-Coloured bars in matplotlib

I have a graph in matplotlib (that displays correctly), but I was hoping to have a different colour for each bar (still the same bar graph though). Is this possible? Thanks
0
votes
2answers
690 views

Error installing matplotlib for Python 3: “Python 3.1. required which was not found in registry”

I downloaded matplotlib here. I'm running Windows 7 and have python in a folder C:\Python31.

1 2
15 30 50 per page