You can subscribe to this list here.
| 2003 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(3) |
Jun
|
Jul
|
Aug
(12) |
Sep
(12) |
Oct
(56) |
Nov
(65) |
Dec
(37) |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2004 |
Jan
(59) |
Feb
(78) |
Mar
(153) |
Apr
(205) |
May
(184) |
Jun
(123) |
Jul
(171) |
Aug
(156) |
Sep
(190) |
Oct
(120) |
Nov
(154) |
Dec
(223) |
| 2005 |
Jan
(184) |
Feb
(267) |
Mar
(214) |
Apr
(286) |
May
(320) |
Jun
(299) |
Jul
(348) |
Aug
(283) |
Sep
(355) |
Oct
(293) |
Nov
(232) |
Dec
(203) |
| 2006 |
Jan
(352) |
Feb
(358) |
Mar
(403) |
Apr
(313) |
May
(165) |
Jun
(281) |
Jul
(316) |
Aug
(228) |
Sep
(279) |
Oct
(243) |
Nov
(315) |
Dec
(345) |
| 2007 |
Jan
(260) |
Feb
(323) |
Mar
(340) |
Apr
(319) |
May
(290) |
Jun
(296) |
Jul
(221) |
Aug
(292) |
Sep
(242) |
Oct
(248) |
Nov
(242) |
Dec
(332) |
| 2008 |
Jan
(312) |
Feb
(359) |
Mar
(454) |
Apr
(287) |
May
(340) |
Jun
(450) |
Jul
(403) |
Aug
(324) |
Sep
(349) |
Oct
(385) |
Nov
(363) |
Dec
(437) |
| 2009 |
Jan
(500) |
Feb
(301) |
Mar
(409) |
Apr
(486) |
May
(545) |
Jun
(391) |
Jul
(518) |
Aug
(497) |
Sep
(492) |
Oct
(429) |
Nov
(357) |
Dec
(310) |
| 2010 |
Jan
(371) |
Feb
(657) |
Mar
(519) |
Apr
(432) |
May
(312) |
Jun
(416) |
Jul
(477) |
Aug
(386) |
Sep
(419) |
Oct
(435) |
Nov
(320) |
Dec
(202) |
| 2011 |
Jan
(321) |
Feb
(413) |
Mar
(299) |
Apr
(215) |
May
(284) |
Jun
(203) |
Jul
(207) |
Aug
(314) |
Sep
(321) |
Oct
(259) |
Nov
(347) |
Dec
(209) |
| 2012 |
Jan
(322) |
Feb
(414) |
Mar
(377) |
Apr
(179) |
May
(173) |
Jun
(234) |
Jul
(295) |
Aug
(239) |
Sep
(276) |
Oct
(355) |
Nov
(144) |
Dec
(108) |
| 2013 |
Jan
(170) |
Feb
(89) |
Mar
(204) |
Apr
(133) |
May
(142) |
Jun
(89) |
Jul
(160) |
Aug
(180) |
Sep
(69) |
Oct
(136) |
Nov
(83) |
Dec
(32) |
| 2014 |
Jan
(71) |
Feb
(90) |
Mar
(161) |
Apr
(117) |
May
(78) |
Jun
(94) |
Jul
(60) |
Aug
(83) |
Sep
(102) |
Oct
(132) |
Nov
(154) |
Dec
(96) |
| 2015 |
Jan
(45) |
Feb
(138) |
Mar
(176) |
Apr
(132) |
May
(119) |
Jun
(124) |
Jul
(77) |
Aug
(31) |
Sep
(34) |
Oct
(22) |
Nov
(23) |
Dec
(9) |
| 2016 |
Jan
(26) |
Feb
(17) |
Mar
(10) |
Apr
(8) |
May
(4) |
Jun
(8) |
Jul
(6) |
Aug
(5) |
Sep
(9) |
Oct
(4) |
Nov
|
Dec
|
| 2017 |
Jan
(5) |
Feb
(7) |
Mar
(1) |
Apr
(5) |
May
|
Jun
(3) |
Jul
(6) |
Aug
(1) |
Sep
|
Oct
(2) |
Nov
(1) |
Dec
|
| 2018 |
Jan
|
Feb
|
Mar
|
Apr
(1) |
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
| 2020 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(1) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
| 2025 |
Jan
(1) |
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
| S | M | T | W | T | F | S |
|---|---|---|---|---|---|---|
|
|
|
1
(8) |
2
(7) |
3
(8) |
4
(12) |
5
(1) |
|
6
(1) |
7
(9) |
8
(2) |
9
|
10
(1) |
11
|
12
(6) |
|
13
(6) |
14
(2) |
15
(7) |
16
(10) |
17
|
18
(3) |
19
(4) |
|
20
(4) |
21
(10) |
22
(8) |
23
(17) |
24
(13) |
25
(9) |
26
(1) |
|
27
(1) |
28
(4) |
29
(7) |
30
(2) |
31
(10) |
|
|
|
From: Jerzy K. <jer...@un...> - 2012-05-12 19:55:10
|
Arek Ke;dzior: > If you pick one of the curves in the close location to tangancy area, > the OnPick function will be executed twice (2 curves) and will display > 2 markers. I want to find the shortest distance from the pick location > (mouse coord.) to a discrete point on the curve and draw marker on the > curve at this location (only one). See the line with "print lineObj" Ok, now I -- perhaps -- understand. This is a speculation... Your approach cannot work, since the low level event handling issues TWO pick events, one for each curve. Everything works very well, your program finds the appropriate point ... on both curves, separately. I suggest that you try to react to lower level mouse events. Look into the Pick code within the Artist class. The system tries to pick all the children, and here - I believe - resides your problem. You should perhaps discriminate the picked target at this point. Jerzy Karczmarczuk |
|
From: Arek K. <ake...@ya...> - 2012-05-12 17:12:25
|
If you pick one of the curves in the close location to tangancy area, the OnPick function will be ececuted twice (2 curves) and will display 2 markers. I want to find the shortest distance from the pick location (mouse coord.) to a discrete point on the curve and draw marker on the curve at this location (only one). See the line with "print lineObj" ________________________________ From: "mat...@li..." <mat...@li...> To: mat...@li... Sent: Saturday, May 12, 2012 10:59 AM Subject: Matplotlib-users Digest, Vol 72, Issue 10 Send Matplotlib-users mailing list submissions to mat...@li... To subscribe or unsubscribe via the World Wide Web, visit https://lists.sourceforge.net/lists/listinfo/matplotlib-users or, via email, send a message with subject or body 'help' to mat...@li... You can reach the person managing the list at mat...@li... When replying, please edit your Subject line so it is more specific than "Re: Contents of Matplotlib-users digest..." Today's Topics: 1. pick event (Arek Kedzior) 2. Re: pick event (Jerzy Karczmarczuk) 3. Re: pick event (Benjamin Root) ---------------------------------------------------------------------- Message: 1 Date: Sat, 12 May 2012 06:07:37 -0700 (PDT) From: Arek Kedzior <ake...@ya...> Subject: [Matplotlib-users] pick event To: "mat...@li..." <mat...@li...> Message-ID: <133...@we...> Content-Type: text/plain; charset="iso-8859-1" I am trying to use pick event.? See the simple script below.? I am interested to find the shortest distance between pick point (mouse coord.) and the ?line at the discrete points only (points on the curve from data) What am I doing wrong ? Regards, Arek ? import numpy as np import matplotlib.pyplot as plt from matplotlib.lines import Line2D import math as math ? # create figure and attach axes to it fig = plt.figure(1) ax = fig.add_subplot(111) ? ? def getMinDistance(xmouse, ymouse, xList, yList): ??? """ ??? find shortest distance between mouse coordinates and pick point ??? point pick may be a list of points if data is clouded ??? Input ??? xmouse - x coordinate of mouse (x - pick) ??? ymouse - y coordinate of mouse (y - pick) ??? xList? - xData from curve ??? yList? - yData from curve ??? Returns: ??? dmin? - minimum distance ??? index - index of data point in the xList and yList ??? """ ????dmin? = math.sqrt((xList[0] - xmouse)**2. + (yList[0]-ymouse)**2.)? ????index = 0 ??? for idx in range(1,len(xList)): ??????? d = math.sqrt((xList[idx] - xmouse)**2. + (yList[idx]-ymouse)**2.) ??????? if(d < dmin): ??????????? dmin = d ??????????? index = idx ????return dmin, index ? def showMarker(x, y, color): ??? """ ??? draw marker at loction x, y with color ??? """ ??? # draw marker ??? markerOn, = ax.plot(x, y, 'o', color = color) ???? def OnPick(event): ??? """ ??? pick event ??? """ ??? print '****************************' ??? mouseEvent = event.mouseevent ??? # get pick coord ??? xmouse, ymouse = mouseEvent.xdata, mouseEvent.ydata ??? # get the artist ??? lineObj = event.artist ????print lineObj ????if not isinstance(lineObj, Line2D): ??????? return ????ind = event.ind ????# check if indexes exist of the pick object ??? N = len(ind) ??? if not N: ??????? return ??? # get curve picked data ??? Xdata, Ydata = lineObj.get_data() ??? color = lineObj.get_color() ????xLi = np.take(Xdata, ind) ??? yLi = np.take(Ydata, ind) ??? dmin, index = getMinDistance(xmouse, ymouse, xLi, yLi) ??? ????xP = xLi[index] ??? yP = yLi[index] ??? ????xStr = '%.4g' % xP ??? yStr = '%.4g' % yP ??? txt = 'X = ' + xStr + ' ;? ' + 'Y = ' + yStr ??? print txt ??? # show marker ??? showMarker(xP, yP, color) ??? # redraw to show marker ??? fig.canvas.draw() ??? # connect to pick event??? fig.canvas.mpl_connect('pick_event',OnPick) ? # generate data for display x = np.arange(-4,4,0.1)????? # x- coord y2 = x**2 + 5.0????????????? # y coord of first curve y? = 2*x + 4.0?????????????? # y coord of the second curve # create the list of x and y data xList = [x, x]?????????????? yList = [y, y2] objList = []???? # store draw lines (artists) # display 2 curves for idx in range(len(xList)): ??? obj, = ax.plot(xList[idx], yList[idx], picker = 5) ??? objList.append(obj) ? # display plot plt.show(1) -------------- next part -------------- An HTML attachment was scrubbed... ------------------------------ Message: 2 Date: Sat, 12 May 2012 16:44:16 +0200 From: Jerzy Karczmarczuk <jer...@un...> Subject: Re: [Matplotlib-users] pick event To: mat...@li... Message-ID: <4FA...@un...> Content-Type: text/plain; charset="iso-8859-1" Arek Ke;dzior: > I am trying to use pick event. ... > What am I doing wrong ? Wrong with WHAT? What do you expect? Jerzy Karczmarczuk -------------- next part -------------- An HTML attachment was scrubbed... ------------------------------ Message: 3 Date: Sat, 12 May 2012 10:59:39 -0400 From: Benjamin Root <ben...@ou...> Subject: Re: [Matplotlib-users] pick event To: "jer...@un..." <jer...@un...> Cc: "mat...@li..." <mat...@li...> Message-ID: <CAN...@ma...> Content-Type: text/plain; charset="utf-8" On Saturday, May 12, 2012, Jerzy Karczmarczuk wrote: > Arek K?dzior: > > I am trying to use pick event. > > ... > > What am I doing wrong ? > > Wrong with WHAT? > What do you expect? > > Jerzy Karczmarczuk > Arek. Could you provide a little more detail about your issue? Cheers! Ben Root -------------- next part -------------- An HTML attachment was scrubbed... ------------------------------ ------------------------------------------------------------------------------ Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ ------------------------------ _______________________________________________ Matplotlib-users mailing list Mat...@li... https://lists.sourceforge.net/lists/listinfo/matplotlib-users End of Matplotlib-users Digest, Vol 72, Issue 10 ************************************************ |
|
From: Arek K. <ake...@ya...> - 2012-05-12 16:36:06
|
If you pick one of the curves in the close location to tangancy area, the OnPick function will be ececuted twice (2 curves) and will display 2 markers. I want to find the shortest distance from the pick location (mouse coord.) to a discrete point on the curve and draw marker on the curve at this location (only one). See the line with "print lineObj" ________________________________ From: "mat...@li..." <mat...@li...> To: mat...@li... Sent: Saturday, May 12, 2012 10:59 AM Subject: Matplotlib-users Digest, Vol 72, Issue 10 Send Matplotlib-users mailing list submissions to mat...@li... To subscribe or unsubscribe via the World Wide Web, visit https://lists.sourceforge.net/lists/listinfo/matplotlib-users or, via email, send a message with subject or body 'help' to mat...@li... You can reach the person managing the list at mat...@li... When replying, please edit your Subject line so it is more specific than "Re: Contents of Matplotlib-users digest..." Today's Topics: 1. pick event (Arek Kedzior) 2. Re: pick event (Jerzy Karczmarczuk) 3. Re: pick event (Benjamin Root) ---------------------------------------------------------------------- Message: 1 Date: Sat, 12 May 2012 06:07:37 -0700 (PDT) From: Arek Kedzior <ake...@ya...> Subject: [Matplotlib-users] pick event To: "mat...@li..." <mat...@li...> Message-ID: <133...@we...> Content-Type: text/plain; charset="iso-8859-1" I am trying to use pick event.? See the simple script below.? I am interested to find the shortest distance between pick point (mouse coord.) and the ?line at the discrete points only (points on the curve from data) What am I doing wrong ? Regards, Arek ? import numpy as np import matplotlib.pyplot as plt from matplotlib.lines import Line2D import math as math ? # create figure and attach axes to it fig = plt.figure(1) ax = fig.add_subplot(111) ? ? def getMinDistance(xmouse, ymouse, xList, yList): ??? """ ??? find shortest distance between mouse coordinates and pick point ??? point pick may be a list of points if data is clouded ??? Input ??? xmouse - x coordinate of mouse (x - pick) ??? ymouse - y coordinate of mouse (y - pick) ??? xList? - xData from curve ??? yList? - yData from curve ??? Returns: ??? dmin? - minimum distance ??? index - index of data point in the xList and yList ??? """ ????dmin? = math.sqrt((xList[0] - xmouse)**2. + (yList[0]-ymouse)**2.)? ????index = 0 ??? for idx in range(1,len(xList)): ??????? d = math.sqrt((xList[idx] - xmouse)**2. + (yList[idx]-ymouse)**2.) ??????? if(d < dmin): ??????????? dmin = d ??????????? index = idx ????return dmin, index ? def showMarker(x, y, color): ??? """ ??? draw marker at loction x, y with color ??? """ ??? # draw marker ??? markerOn, = ax.plot(x, y, 'o', color = color) ???? def OnPick(event): ??? """ ??? pick event ??? """ ??? print '****************************' ??? mouseEvent = event.mouseevent ??? # get pick coord ??? xmouse, ymouse = mouseEvent.xdata, mouseEvent.ydata ??? # get the artist ??? lineObj = event.artist ????print lineObj ????if not isinstance(lineObj, Line2D): ??????? return ????ind = event.ind ????# check if indexes exist of the pick object ??? N = len(ind) ??? if not N: ??????? return ??? # get curve picked data ??? Xdata, Ydata = lineObj.get_data() ??? color = lineObj.get_color() ????xLi = np.take(Xdata, ind) ??? yLi = np.take(Ydata, ind) ??? dmin, index = getMinDistance(xmouse, ymouse, xLi, yLi) ??? ????xP = xLi[index] ??? yP = yLi[index] ??? ????xStr = '%.4g' % xP ??? yStr = '%.4g' % yP ??? txt = 'X = ' + xStr + ' ;? ' + 'Y = ' + yStr ??? print txt ??? # show marker ??? showMarker(xP, yP, color) ??? # redraw to show marker ??? fig.canvas.draw() ??? # connect to pick event??? fig.canvas.mpl_connect('pick_event',OnPick) ? # generate data for display x = np.arange(-4,4,0.1)????? # x- coord y2 = x**2 + 5.0????????????? # y coord of first curve y? = 2*x + 4.0?????????????? # y coord of the second curve # create the list of x and y data xList = [x, x]?????????????? yList = [y, y2] objList = []???? # store draw lines (artists) # display 2 curves for idx in range(len(xList)): ??? obj, = ax.plot(xList[idx], yList[idx], picker = 5) ??? objList.append(obj) ? # display plot plt.show(1) -------------- next part -------------- An HTML attachment was scrubbed... ------------------------------ Message: 2 Date: Sat, 12 May 2012 16:44:16 +0200 From: Jerzy Karczmarczuk <jer...@un...> Subject: Re: [Matplotlib-users] pick event To: mat...@li... Message-ID: <4FA...@un...> Content-Type: text/plain; charset="iso-8859-1" Arek Ke;dzior: > I am trying to use pick event. ... > What am I doing wrong ? Wrong with WHAT? What do you expect? Jerzy Karczmarczuk -------------- next part -------------- An HTML attachment was scrubbed... ------------------------------ Message: 3 Date: Sat, 12 May 2012 10:59:39 -0400 From: Benjamin Root <ben...@ou...> Subject: Re: [Matplotlib-users] pick event To: "jer...@un..." <jer...@un...> Cc: "mat...@li..." <mat...@li...> Message-ID: <CAN...@ma...> Content-Type: text/plain; charset="utf-8" On Saturday, May 12, 2012, Jerzy Karczmarczuk wrote: > Arek K?dzior: > > I am trying to use pick event. > > ... > > What am I doing wrong ? > > Wrong with WHAT? > What do you expect? > > Jerzy Karczmarczuk > Arek. Could you provide a little more detail about your issue? Cheers! Ben Root -------------- next part -------------- An HTML attachment was scrubbed... ------------------------------ ------------------------------------------------------------------------------ Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ ------------------------------ _______________________________________________ Matplotlib-users mailing list Mat...@li... https://lists.sourceforge.net/lists/listinfo/matplotlib-users End of Matplotlib-users Digest, Vol 72, Issue 10 ************************************************ |
|
From: Benjamin R. <ben...@ou...> - 2012-05-12 14:59:45
|
On Saturday, May 12, 2012, Jerzy Karczmarczuk wrote: > Arek Kędzior: > > I am trying to use pick event. > > ... > > What am I doing wrong ? > > Wrong with WHAT? > What do you expect? > > Jerzy Karczmarczuk > Arek. Could you provide a little more detail about your issue? Cheers! Ben Root |
|
From: Jerzy K. <jer...@un...> - 2012-05-12 14:44:29
|
Arek Ke;dzior: > I am trying to use pick event. ... > What am I doing wrong ? Wrong with WHAT? What do you expect? Jerzy Karczmarczuk |
|
From: Arek K. <ake...@ya...> - 2012-05-12 13:07:44
|
I am trying to use pick event. See the simple script
below. I am interested to find the shortest distance between pick
point (mouse coord.) and the line at the discrete points only (points on
the curve from data)
What am I doing wrong ?
Regards,
Arek
import numpy as np
import matplotlib.pyplot as plt
from matplotlib.lines import Line2D
import math as math
# create figure and attach axes to it
fig = plt.figure(1)
ax = fig.add_subplot(111)
def getMinDistance(xmouse, ymouse, xList, yList):
"""
find shortest distance between mouse
coordinates and pick point
point pick may be a list of points if
data is clouded
Input
xmouse - x coordinate of mouse (x - pick)
ymouse - y coordinate of mouse (y - pick)
xList - xData from curve
yList - yData from curve
Returns:
dmin - minimum distance
index - index of data point in the xList
and yList
"""
dmin = math.sqrt((xList[0] -
xmouse)**2. + (yList[0]-ymouse)**2.)
index = 0
for idx in range(1,len(xList)):
d =
math.sqrt((xList[idx] - xmouse)**2. + (yList[idx]-ymouse)**2.)
if(d < dmin):
dmin = d
index = idx
return dmin, index
def showMarker(x, y, color):
"""
draw marker at loction x, y with color
"""
# draw marker
markerOn, = ax.plot(x, y, 'o', color =
color)
def OnPick(event):
"""
pick event
"""
print '****************************'
mouseEvent = event.mouseevent
# get pick coord
xmouse, ymouse = mouseEvent.xdata,
mouseEvent.ydata
# get the artist
lineObj = event.artist
print lineObj
if not isinstance(lineObj, Line2D):
return
ind = event.ind
# check if indexes exist of the pick
object
N = len(ind)
if not N:
return
# get curve picked data
Xdata, Ydata = lineObj.get_data()
color = lineObj.get_color()
xLi = np.take(Xdata, ind)
yLi = np.take(Ydata, ind)
dmin, index = getMinDistance(xmouse,
ymouse, xLi, yLi)
xP = xLi[index]
yP = yLi[index]
xStr = '%.4g' % xP
yStr = '%.4g' % yP
txt = 'X = ' + xStr + ' ; ' + 'Y =
' + yStr
print txt
# show marker
showMarker(xP, yP, color)
# redraw to show marker
fig.canvas.draw()
# connect to pick event
fig.canvas.mpl_connect('pick_event',OnPick)
# generate data for display
x = np.arange(-4,4,0.1) # x-
coord
y2 = x**2 + 5.0
# y coord of first curve
y = 2*x +
4.0
# y coord of the second curve
# create the list of x and y data
xList = [x,
x]
yList = [y, y2]
objList = [] # store draw lines
(artists)
# display 2 curves
for idx in range(len(xList)):
obj, = ax.plot(xList[idx], yList[idx],
picker = 5)
objList.append(obj)
# display plot
plt.show(1) |