Hi,
I want to show the same data on multiple plots. Is it possible to re-use
the Line2D object for that? t.m.,
line = axes1.plot(xdata, ydata, ...)
...
axes2.lines.append(line)
Or is a Line2D bound to a certain axes instance?
Best regards
Ole
Hi Brian,
I have also some layout problems with the Qt4 backend. The worst one is
a SegFault when adjusting the width.
Brian Zambrano bri...@gmail.com writes:
vbox = QVBoxLayout()
vbox.addWidget(self.canvas)
self.setLayout(vbox)
Could you just try to add a second canvas to the layout?
vbox
Hello Darren,
Darren Dale dsdal...@gmail.com writes:
I can't produce a segfault with the attached script. I have Qt-4.5.2,
PyQt-4.5.1, and a checkout of the matplotlib trunk.
OK, in this context it seems to work.
I attach a script that shows the problem.
Run it, move the second diagram below
Hello Darren,
Darren Dale dsdal...@gmail.com writes:
I can't produce a segfault with the attached script. I have Qt-4.5.2,
PyQt-4.5.1, and a checkout of the matplotlib trunk.
OK, in this context it seems to work.
I attach a script that shows the problem.
Run it, move the second diagram below
Hi,
could anyone reproduce this problem and/or has a solution for it? Is
there anything wrong with my code?
Best regards
Ole
Ole Streicher ole-usenet-s...@gmx.net writes:
Hi Darren,
Darren Dale dsdal...@gmail.com writes:
I am really busy with other things, and can't offer suggestions
Hi,
I want to change the value of a line in an axes. What I tried is
myline = axes.plot(...)
xdata, ydata = myline.get_data()
for i in range(ydata.__len__()):
ydata[i] += 50
to shift all y values up by 50.
But I dont see the change I made, even after a show(). How can I force
the diagram to
Hi Mathias,
Matthias Michler matthiasmich...@gmx.net writes:
you can reset the ydata using:
ydata = myline.get_ydata()
ydata += 50
myline.set_ydata(ydata) # pass new data to line object
Does this work for you?
Yes. Altough I dont understand why I have to set it again (the ydata
still belong
Hi again,
when right-clicking on one or more lines in a plot, I want to present
the user a context menu where he can select to remove these lines.
Preferrably I want to do this not with a 'pick_event' connection but
with the (Qt) backend methods since the context menu should contain more
options
Hi John,
John Hunter jdh2...@gmail.com writes:
If for some reason the built in pick_event is unsuitable, you can
create your own matplotlib.backend_bases.MouseEvent and call
line.contains(event) for each line you want to hit test.
Thank you, that works for me. But for some reason, the y
Hi John,
John Hunter jdh2...@gmail.com writes:
On Wed, Jun 10, 2009 at 9:11 AM, John Hunterjdh2...@gmail.com wrote:
ax.lines.remove(someline)
fig.canvas.draw()
See also
http://matplotlib.sourceforge.net/users/artists.html
Thank you very much, this helped a lot. (the manpages to artists
Hi,
I want to implement a cursor on a diagram using native Qt routines. For
this, I would need to transform data (axis) coordinates to display
coordinates.
The manual of matplotlib, API axes just jays that there are some
public attributes 'transData' and 'transAxis', but without an
explanation.
Hi again,
when I scroll or zoom with the mouse wheel, the scaling of the x and y
axes are changed within the event. I would need now the new value of
these to update the status bar. How can I get them without waiting for a
new mouse event?
Cheers
Ole
Hi John,
thank you four your helpful answer.
John Hunter jdh2...@gmail.com writes:
On Thu, Jun 4, 2009 at 8:49 AM, Ole Streicher ole-usenet-s...@gmx.net wrote:
def on_move(self, event)
mouse_pos_diag_x = ???(event.xdata)
mouse_pos_diag_y = ???(event.ydata)
where I would
Hi John,
John Hunter jdh2...@gmail.com writes:
On Thu, Jun 4, 2009 at 9:00 AM, Ole Streicher ole-usenet-s...@gmx.net wrote:
when I scroll or zoom with the mouse wheel, the scaling of the x and y
axes are changed within the event. I would need now the new value of
these to update the status
Hi again,
I have another problem: I try to connect Control + mouse drag to some
zoom event. On mouse press, I need to check whether the Ctrol key is
pressed:
8
import random
import sys
from PyQt4 import QtGui, QtCore
from
Hallo Theodore,
Drain, Theodore R
theodore.r.dr...@jpl.nasa.gov writes:
Remember, this is not a multi-threaded system. You can't receive a
second repaint event while the drawing code is happening because the
event loop is not in a separate thread.
This is not my choice. If the user resizes
Hi,
I am using matplotlib for some data vizualization. To ensure a
consistent user interface among the whole application, I do the
scrolling/zooming stuff myself. So, for a diagram, a horizontal
scrollbar is displayed below the diagram that enabled to shift along the
x axis. This is (part of) the
17 matches
Mail list logo