0
votes
1answer
12 views

Legend transparency, when using secondary axis

The legend of the plot of a secondary axis somehow is transparent to the plot of the other axis. A minimal example to reproduce the problem: import matplotlib.pyplot as plt ax1 = plt.subplot(111) ...
2
votes
1answer
26 views

Centering x-tick labels between tick marks in matplotlib

I want to have the x-tick date labels centered between the tick marks, instead of centered about the tick marks as shown in the photo below. I have read the documentation but to no avail - does ...
1
vote
1answer
34 views

Pyplot polar scatter plot color for sign

I have a pyplot polar scatter plot with signed values. Pyplot does the "right" thing and creates only a positive axis, then reflects negative values to look as if they are a positive value 180 ...
0
votes
1answer
34 views

Matplotlib - Force plot display and then return to main code

This is a MWE of what I'm after, adapted from this question: from matplotlib.pyplot import plot, draw, show def make_plot(): plot([1,2,3]) draw() print 'continue computation' print('Do ...
0
votes
0answers
11 views

How to convert plot in gtk canvas from pyplot to pixbuf in python?

I'm plotting something using matplotlib in python and want to show the plot in GTK. I'm following this tutorial. The problem is I want to embedded the plot in textview. So I want to convert it to ...
0
votes
0answers
15 views

PyQt popup on right click wont disappear after selection

I am trying to have a 'right-click' pop up menu on a matplotlib canvas which also updates the cursor position on a window label when the mouse just hovers over a pixel. The problem is, that if I ...
-1
votes
0answers
24 views

I thought that everything in matplotlib is a QWidget. Apparently Figure is not. My interface accepts QWidgets. What to do?

I am learning matplotlib with python. the task is to embed a plot in a UI. the plot is to be redrawn upon reception of some event. The UI application takes a QtDesigner generated class, whic is ...
2
votes
1answer
22 views

Is it possible to plot within user-defined function with python and matplotlib?

What I want to do is define a function which contain plotting sentences. Like this: import matplotlib.pyplot as plt def myfun(args, ax): #...do some calculation with args ax.plot(...) ...
0
votes
2answers
25 views

Python multiprocessing pylab Fourier

I'm trying to plot a fourier sequence of a square wave, but with many terms the program just takes too much time computate all the points. I tried to use multiprocessing module but didnt work.Please ...
2
votes
1answer
27 views

Subscripting text in matplotlib labels

this is my first question and I am a noob at python. So probably more to follow... I would like to create a figure with matplotlib. In the labels, I would like to include a chemical formula, which ...
1
vote
1answer
30 views

Appending a line to a plot in matplotlib, axis glitch

I want to be able to do something like this: In [1]: import matplotlib.pyplot as plt In [2]: plt.ion() In [3]: line = plt.plot([1,2],[1,2]) In [4]: plt.close('all') In [5]: plt.plot([1,2],[1,4]) ...
1
vote
1answer
23 views

How to set ticks on Fixed Position , matplotlib

Can anyone help me set the ticks on a fixed position using matplotlib? I've tried using FixedPosition as this tutorial describes: ax = pl.gca() ax.xaxis.set_major_locator(eval(locator)) ...
0
votes
1answer
38 views

python shell in emacs freezes when using matplotlib

I previously thought that was the issue with ipython, but today i tested again, here is what i did: run emacs -Q in cmd window open a .py file M-x, then run python-shell-switch-to-shell, RET, RET, ...
1
vote
1answer
21 views

matplotlib SpanSelector widget: how to use inside a function?

I'm trying to use a matplotlib SpanSelector inside a function. I modified the original example (http://matplotlib.org/examples/widgets/span_selector.html) but it didn't work. Here is the code: ...
1
vote
1answer
24 views

How to show multiple images in one figure?

I use Python lib matplotlib to plot functions, and I know how to plot several functions in different *subplot*s in one figure, like this one, And when handling images, I use imshow() to plot images, ...
0
votes
2answers
30 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, ...
1
vote
1answer
31 views

Matplotlib - creating a filled 2d contour plot

I've calculated some values representing a potential as a function of x,y using relaxation method. And I want to display a contour plot with colors (not lines) but, the examples at matplotlib are all ...
1
vote
2answers
51 views

separate peaks from each other equidistantly

I have text file which contains for example five columns of data. Here is an example data from the text file- 715.10685 -0.006153 -0.004829 -0.002161 0.000994 0.004024 715.589053 ...
1
vote
2answers
24 views

matplotlib.pyplot will not forget previous plots - how can I flush/refresh?

How do you get matplotlib.pyplot to "forget" previous plots I am trying to plot multiple time using matplotlib.pyplot The code looks like this: def plottest(): import numpy as np import ...
0
votes
1answer
33 views

Matplotlib: Make all values in range show up on x axis

Could someone please guide me on how should I make sure that all ticks (or maybe a better way to specify will be to say all elements in the list passed to plot function) are displayed on the x axis ...
1
vote
1answer
48 views

3D animation using matplotlib that shows a body rotating about a fixed point

I have recently started using python. Currently I am working on a project that simulates the motion of binary starts about a center. I want to represent the starts with a sphere rotating about a ...
0
votes
1answer
16 views

Using PyLab's Specgram In A Headless Environment

Anyone know how to get it working? Unfortunately it seems by default specgram's code wants to generate an image, which I have no use for, only the data behind the image. The error I get is: ...
1
vote
1answer
21 views

Building python pylab/matplotlib exe using pyinstaller

The following code runs fine and displays a simple pie chart when run as an interpreted python py program. A month ago, I used pyinstaller to create a stand-alone exe and that worked great. ...
1
vote
2answers
37 views

plotting a new graph after closing a first one in matplotlib

I am working on a python script where I have the following method in an object Plotter : import matplotlib.pyplot as plt class Plotter: def __init__(self): self.nbfig = 0 def ...
0
votes
2answers
34 views

Plot to Specific Axes in Matplotlib

How can I plot to a specific axes in matplotlib? I created my own object which has its own plot method and takes standard args and kwargs to adjust line color, width, etc, I would also like to be ...
0
votes
2answers
38 views

matplotlib plot csv file of all columns

I have a csv file which contains 20 columns. Right now I can plot using this code taking first column as x axis and rest of them as y axis. import numpy as np import matplotlib.pyplot as plt data = ...
0
votes
1answer
30 views

Reading a huge edgelist and plot it in NetworkX

I have a huge edgelist named Reed98.edgelist. I'm using networkx to read and plot it as graph. This error appears: C:\Python26\lib\site-packages\networkx-1.7-py2.6.egg\networkx\drawing\layout.py:369: ...
1
vote
1answer
31 views

Using text on y axis in matplotlib instead of numbers

I've created a simple word frequency calculator in python 3.2. Now I want to create a plot to visualize the results. I want to add the most frequent words to the y axis and the x axis would contain ...
2
votes
3answers
44 views

Adding an annotation box to a matplotlib contour/heat map plot

I want generate a contour plot/heat map with a color bar and then add an annotation box. This figure is ugly, but gets at what I want: add_subplot() is not enough. If I try to put everything in ...
0
votes
1answer
28 views

Retrieve coordinates from Tkinter Canvas

I have a plotted a set of points and embedded the plot into Tkinter canvas. What I am trying to do is retrieve the coordinates when clicked on one / more points. I was able to do it using the ...

1 2 3 4 5 116
15 30 50 per page