1
vote
1answer
23 views

Draw a step histogram without closing the polygon with the bottom line

How can I remove the bottom line that closes the path of a step histogram? import numpy as np import matplotlib.pyplot as plt mu, sigma = 100, 15 x = mu + sigma * np.random.randn(10000) fig = ...
2
votes
1answer
34 views

Down arrow symbol in matplotlib

I would like to create a plot where some of the points have a downward pointing arrow (see image below). In Astronomy this illustrates that the true value is actually lower than what's measured.Note ...
1
vote
2answers
15 views

Select range of rows from record ndarray

I obtained a NumPy record ndarray from a CSV file using data = matplotlib.mlab.csv2rec('./data.csv', delimiter=b',') The data set is structured as: date,a0,a1,a2,a3, b0, b1, b2, b3,[...], b9 ...
1
vote
2answers
31 views

matplotlib: filling under line in 3d polar plot

I'd like to plot a sine wave on a circle: that is, the circle is in the x,y-plane and the sine wave wraps around it perpendicular to that plane (sticking up the z-axis). I can do this, but when I try ...
0
votes
1answer
20 views

Set ticks that aren't at powers of some base on a loglog plot [duplicate]

I'm plotting over a small range, but I'm using a log-log plot to make certain features more clear. How can I set ticks on the x-axis that aren't powers of any base, but multiples of some value? ...
0
votes
0answers
25 views

Plot a graph in NetworkX

I try to plot a simple graph in networkx, but this error message appears: RuntimeError: module compiled against API version 6 but this version of numpy is 4 Traceback (most recent call last): File ...
3
votes
1answer
34 views

memory leak in matplotlib histogram

Running the following code will result in memory usage rapidly creeping up. import numpy as np import pylab as p mu, sigma = 100, 15 x = mu + sigma*np.random.randn(100000) for i in range(100): ...
3
votes
1answer
46 views

Which is the recommended way to plot: matplotlib or pylab?

I see that I can plot in Python using either: import matplotlib matplotlib.pyplot.plot(...) Or: import pylab pylab.plot(...) Both of these use the same matplotlib plotting code. So, which of ...
1
vote
1answer
26 views

How to limit axis in matplotlib polar plot

I'm trying to plot a piece of pie using a matplotlib polar plot like so: Fig, ax = pyplot.subplots(subplot_kw=dict(polar=True)) ax.bar(math.pi/3.0, 5.0, width=math.pi/3.0) ax.bar(math.pi/3.0, 3.0, ...
3
votes
1answer
70 views

Peak detection in a noisy 2d array

I'm trying to get python to return, as close as possible, the center of the most obvious clustering in an image like the one below: In my previous question I asked how to get the global maximum and ...
0
votes
0answers
25 views

Animation with matplotlib where points are dynamically added to a graph

I've written a simple code which generates random points (x,y) between certain values using a while loop. After the coordinates of each point are set, that point is drawn in an empty graph which is ...
2
votes
1answer
19 views

export axes area only to bitmap using python matplotlib

for scientific conferences, the file size of papers is usually limited. I like to include my plots as pdfs, so text and lines stay crisp. When I create false colour plots or scatter plots with lots of ...
1
vote
1answer
35 views

find parent array of numpy slice array

Is it possible to find the parent array of a slice ie. the array that the slice is taken from? I would like to do this so I can add functionality to matplotlib plots which allows you to change which ...
-1
votes
1answer
33 views

Has anyone Compared Qt Commercial Charts with matplotlib? [closed]

What is better to use for interactive data plotting? matplotlib (http://www.matplotlib.org) or Qt Commercial Charts (http://qt.digia.com/Product/Qt-Add-Ons/Charts/) There are several functionality ...
0
votes
2answers
15 views

default colorbar for matplotlib

I'd like to change the global default colorbar for all graphics commands in Python matplotlib. This is similar to this question about changing the default colorbar in MATLAB. Here there is already a ...
0
votes
1answer
30 views

Create own colormap using matplotlib and plot color scale

I have the following problem, I want to create my own colormap (red-mix-violet-mix-blue) that maps to values between -2 and +2 and want to use it to color points in my plot. The plot should then have ...
-2
votes
2answers
43 views

How can I label the minor tics in a loglog plot in matplotlib?

I'm using a log-log plot with matplotlib.pyplot with an x-axis that only varies over a few orders of magnitude. With only the major tics labeled, the x-axis looks very sparse and a little unclear. How ...
1
vote
1answer
34 views

overlay matplotlib imshow with line plots that are arranged in a grid

I would like to plot a number of curves over an image Using this code I am reasonably close: G=plt.matplotlib.gridspec.GridSpec(64,1) fig = plt.figure() plt.imshow(img.data[:,:],cmap='gray') ...
1
vote
1answer
39 views

Is it possible to add a string as a legend item in matplotlib

I am producing some plots in matplotlib and would like to add explanatory text for some of the data. I want to have a string inside my legend as a separate legend item above the '0-10' item. Does ...
0
votes
1answer
45 views

Python/Matplotlib/Pyside Fast Timetrace scrolling

I have large time-traces that must be inspected visually, so I need a fast scrolling tool. How can I achieve the fastest Maplotlib/Pyside scrolling? Right know, I added a PySide scroll-bar to a MPL ...
0
votes
1answer
31 views

How to use a custom subset of a colormap in a colorbar and pcolosmesh plot?

Using Python and matplotlib, is there a convenient way to do the following: Establish a mapping between colors and values, say -5 = black, -2 = red, 0 = white, +2 = blue, +5 = black Generate a ...
1
vote
2answers
63 views

Find peak of 2d histogram

I make a 2d histogram of some (x, y) data and I get an image like this one: I want a way to get the (x, y) coordinates of the point(s) that store the maximum values in H. For example, in the case ...
0
votes
2answers
18 views

Pylab after upgrading

Today I upgraded to Xubuntu 13.04 which comes with Python 3.3. Before that, I was working with Pyton 3.2, which was working perfectly fine. When running my script under Python 3.3, I get an ...
1
vote
0answers
41 views

Choosing marker size in Matplotlib

I am doing a scatter plot with square marker in matplotlib like this one: . I want to achieve something like this: Which means I have to adjust the marker size and the figure size/ratio in such ...
0
votes
1answer
19 views

Matplotlib mlab: change psd() maximum frequency?

I only just discovered the awesome that is matplotlib.mlab.psd(), but I am having one issue, that is: how can I change the frequency range used by the method? This has two return values: freqs, which ...
2
votes
0answers
28 views

How can I animate a 3d object in numpy

I have the following code : import numpy as np import matplotlib.pyplot as plt import mpl_toolkits.mplot3d.axes3d as p3 from matplotlib import animation fig = plt.figure() p3.autoscale = True ax = ...
0
votes
1answer
31 views

matplotlib: ways of drawing a CDF

In python, with matplotlib, I have to draw 2 CDF curves on the same plot: one for data A, one for data B. If I were to decide the "binning" myself, I would do the following and take 100 histograms ...
1
vote
2answers
42 views

Modal dialog freezes the whole application

I use wxpython altogether with matplotlib backend on an ubuntu machine. I would like to connect my matplotlib canvas to a button_press_event that pops up a wxpython modal dialog. When the modal dialog ...
4
votes
1answer
50 views

Uniform spacing with Matplotlib and TeX

I am drawing up some graphs for a math class, and I can't get the spacing for peacewise definitions quite right in the plot legend. I am currently using \, for a single space in TeX, but run into a ...
0
votes
2answers
37 views

Matplotlib animation with pcolormesh and contour

I'm working with spatio-temporal arrays and I would like to export the results for visualization purposes. I can extract images at certain intervals of time to show the spatial variation. Now, I would ...

1 2 3 4 5 113
15 30 50 per page