80
votes
4answers
60k views

How do you change the size of figures drawn with matplotlib?

How do you change the size of figure drawn with matplotlib?
48
votes
3answers
47k views

Plot logarithmic axes with matplotlib in python

I want to plot a graph with one logarithmic axis using matplotlib. I've been reading the docs, but can't figure out the syntax. I know that it's probably something simple like 'scale=linear' in the ...
34
votes
5answers
12k views

gnuplot vs Matplotlib

I've started on a project graphing Tomcat logs using gnuplot-py, specifically correlating particular requests with memory allocation and garbage collection. What is the collective wisdom on ...
32
votes
3answers
52k views

Python, Matplotlib, subplot: How to set the axis range?

How can I set the y axis range of the second subplot to e.g. [0,1000] ? The FFT plot of my data (a column in a text file) results in a (inf.?) spike so that the actual data is not visible. ...
31
votes
1answer
9k 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", ...
29
votes
3answers
24k views

How to change the font size on a matplotlib plot

How does one change the font size for all elements (ticks, labels, title) on a matplotlib plot? I know how to change the tick label sizes, this is done with: import matplotlib ...
28
votes
4answers
19k views

How to change legend size with matplotlib.pyplot

Simple question here: I'm just trying to get the size of my legend using matplotlib.pyplot to be smaller (ie, the text to be smaller). The code I'm using goes something like this: plot.figure() ...
28
votes
1answer
913 views

How do I configure the behavior of the Qt4Agg backend?

In an earlier question I learned that the behavior on show() was dependent on the backend in use by matplotlib. At that time I was looking for a way to keep show() from deleting the drawing elements ...
26
votes
4answers
20k 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 ...
26
votes
1answer
11k views

Text box in matplotlib?

Is it possible to display text in a box through Matplotlib, with automatic line breaks? By using pyplot.text(), I was only able to print multi-line text that flows beyond the boundaries of the ...
25
votes
1answer
1k views

change strength of antialiasing in matplotlib

Is it possible to increase the antialiasing in matplotlib? I can still see some aliasing in my data, I tried several backends and it is still there. The antialiasing flag of the lines is set. Here ...
24
votes
4answers
22k views

How do I tell matplotlib that I am done with a plot?

The following code plots two .ps files, but the second one contains both lines. import matplotlib import matplotlib.pyplot as plt import matplotlib.mlab as mlab plt.subplot(111) x = [1,10] y = [30, ...
24
votes
1answer
16k views

Hiding axis text in matplotlib plots

I'm trying to plot a figure without tickmarks or numbers on either of the axes (I use axes in the traditional sense, not the matplotlib nomenclature!). An issue I have come across is where matplotlib ...
24
votes
4answers
1k views

making matplotlib graphs look like R by default?

Is there a way to make matplotlib behave identically to R, or almost like R, in terms of plotting defaults? For example R treats its axes pretty differently from matplotlib. The following histogram ...
23
votes
17answers
18k 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 ...

1 2 3 4 5 211
15 30 50 per page