Tagged Questions
21
votes
4answers
16k views
Generate a heatmap in MatPlotLib using a scatter data set
I have a set of X,Y data points (about 10k) that are easy to plot as a scatter plot but that I would like to represent as a heatmap.
I looked through the examples in MatPlotLib and they all seem to ...
12
votes
1answer
1k views
Is there a matplotlib equivalent of matlab's datacursormode?
In matlab, one can use datacursormode to add annotation to a graph when user mouses over. Is there such thing in matplotlib? Or I need to write my own event using matplotlib.text.Annotation? Many ...
12
votes
3answers
10k views
matplotlib Update a Plot
I'm having issues with redrawing the figure here. I allow the user to specify the units in the time scale (x-axis) and then I recalculate and call this function plots(). I want the plot to simply ...
65
votes
4answers
47k views
How do you change the size of figures drawn with matplotlib?
How do you change the size of figure drawn with matplotlib?
19
votes
1answer
6k views
Matplotlib: How to put individual tags for a scatter plot
I am trying to do a scatter plot in Matplotlib and I couldn't find a way to add tags to the points. For example:
scatter1=plt.scatter(data1["x"], data1["y"], marker="o",
...
22
votes
17answers
15k views
What is the best plotting library for Python? [closed]
What Python plotting library do you recommend?
It should be noted the following considerations:
is it cross-OS?
speed
how clean it's interface?
"prettyness" of the resulting plots
License
etc?
In ...
18
votes
2answers
2k views
Python/Matplotlib - Is there a way to make a discontinuous axis?
I'm trying to create a plot using pyplot that has a discontinuous x-axis. The usual way this is drawn is that the axis will have something like this:
(values)----//----(later values)
where the // ...
12
votes
1answer
3k views
plotting results of hierarchical clustering ontop of a matrix of data in python
How can I plot a dendrogram right on top of a matrix of values, reordered appropriately to reflect the clustering, in Python? An example is in the bottom of the following figure:
...
19
votes
4answers
4k views
Why does pip install matplotlib version 0.91.1 when PyPi shows version 1.0.0?
Update Oct 15, 2012
PyPi is now showing matplotlib at 1.1.0 so this issue is resolved. Install matplotlib via:
pip install matplotlib
Outdated Information Below
PyPi shows matplotlib 1.0.0. ...
16
votes
2answers
3k views
How can I plot NaN values as a special color with imshow in matplotlib?
I am trying to use imshow in matplotlib to plot data as a heatmap, but some of the values are NaNs. I'd like the NaNs to be rendered as a special color not found in the colormap.
example:
import ...
11
votes
1answer
8k views
How do I convert (or scale) axis values and redefine the tick frequency in matplotlib?
I am displaying a jpg image (I rotate this by 90 degrees, if this is relevant) and of course
the axes display the pixel coordinates. I would like to convert the axis so that instead of displaying the ...
10
votes
3answers
12k views
Set Colorbar Range in matplotlib
I have the following code:
import matplotlib.pyplot as plt
cdict = {
'red' : ( (0.0, 0.25, .25), (0.02, .59, .59), (1., 1., 1.)),
'green': ( (0.0, 0.0, 0.0), (0.02, .45, .45), (1., .97, ...
5
votes
1answer
849 views
Why doesn't the save button work on a matplotlib plot?
I have matplotlib 1.0.0 installed in a Python 2.7 virtualenv on Mac OS X 10.6. I can create plots fine. However, whenever I press the Save button, I can't type text into the save dialog window nor can ...
2
votes
1answer
319 views
Visualization of 3D-numpy-array frame by frame
# -*- coding: utf-8 -*-
"""
slider 3D numpy array
"""
import numpy
import pylab
from matplotlib.widgets import Slider
data = numpy.random.rand(100,256,256) #3d-array with 100 frames 256x256
ax = ...
1
vote
1answer
1k views
Embedding a matplotlib figure inside a WxPython panel
How do I embed a matplotlib figure object inside a WxPython panel?
I googled around and saw complicated examples involving interactive graphics and other extra stuff. Can anybody help with a minimal ...