;i ddlZddlZddlZddlmZddlZddlmZm Z ddlm Z ddlm Z ddl m Z ddlmZmZd d lmZd d gZgd ZedeDZedejddd d edejddd d d6dZeed<gdgdgdgdgdgdgdgdgdgdgdd ZeD]a\ZZeejeded dD]!\ZZeeee"ee bej!Z"e"#d!e"$ed"ed#<e"#d!e"$ed$ed%<e"$ed%ed&<e"$ed&ed'<e"$ed(ed)<dd*ddd+d,Z%d-Z&d7d/Z'd0Z(d1Z)Gd2d3e*Z+Gd4d eZ,Gd5d e*Z-dS)8N) OrderedDict)Qtdebug) functions)getConfigOption)Point)QtCoreQtGui)GraphicsObjectScatterPlotItemSpotItem)ostt1t2t3d+xphstar|_arrow_up arrow_right arrow_down arrow_left crosshairc8g|]}|tjfS)r QPainterPath).0names [C:\PYTHON\MyICR_Workspace\venv\Lib\site-packages\pyqtgraph/graphicsItems/ScatterPlotItem.py r)s&JJJe0223JJJrr?cHtj}tj| | |dz|dz}|||| d||d|d| |d||S)Nrr)r r%r QRectF addEllipsemoveTolineTo)rwrpathrects r( makeCrosshairr6s    D =!aRQA . .DOODKKAKK1KKA2KK1 Kr*r")r+r+rr,r,r+)r+r,rr+r,r,)r7r:)r,r)r<r9)r+r))r+)gٿr=r8)g?r) )r+皙)r+皙?)r>r?r>r,r?r,)r?r?)r,r?)r,r>)r?r>r?r+r>r+)r>r>)r;g;On޿-ÿgsAҿS?gsA?rGg;On?rE))ʡE??)r=r,)ʡEۿrK)rLпr;)rJrM) r;)g>W[rErD)gz6>ǿh|?5?rF)rg r?rH)gz6>?rNrI)g>W[?rE)r@rArBrC))g?rr)rOrO)皙?rO)rQr,)皙r,)rRrO) rrrrrrrrrrr-rrrrr r!rrT)symbolsizepenbrushvisiblec|dS|||||||t|tr t |}t j|rAtt |tt z}| |dSN) scalesetPensetBrush isinstancestrSymbolsnpisscalarlistvalueslendrawPath)painterrUrVrWrXs r( drawSymbolriOs ~ MM$ NN3 U&#! {6?gnn&&''W(=> Vr*?cttj|d}|t tj|||zz}t j||t jjj}| || tj j jt j|} ||jj|||z dz||z dzt-||||||n#|wxYw|S)a7 Render a symbol specification to QImage. Symbol may be either a QPainterPath or one of the keys in the Symbols dict. If *device* is None, a new QPixmap will be returned. Otherwise, the symbol will be rendered into the device specified (See QPainter documentation for more information). r Nr,)maxmathceilwidthFintr QImageFormatFormat_ARGB32_PremultipliedsetDevicePixelRatiofillr r GlobalColor transparentQPainter setRenderHint RenderHint Antialiasing translatewidthheightriend) rUrVrWrXdevicedpr penPxWidthsiders r( renderSymbolr\s2TYszz||,,a00J ~49S$z/23344dD%,*=*YZZ""3''' FI)5666 vA  1222 FLLNN3&s*FMMOOC,?,CDDD1fdC///  Ms A8E((E>ct|dkr(t|dtjr|dSt j|i|S)z Wrapper for fn.mkPen which avoids creating a new QPen object if passed one as its sole argument. This is used to avoid unnecessary cache misses in SymbolAtlas which uses the QPen object id in its key. r r)rfr_r QPenfnmkPenargskwargss r(_mkPenrusE  4yyA~~*T!Wej99~Awx((((r*ct|dkr(t|dtjr|dSt j|i|S)z Wrapper for fn.mkBrush which avoids creating a new QBrush object if passed one as its sole argument. This is used to avoid unnecessary cache misses in SymbolAtlas which uses the QBrush object id in its key. r r)rfr_r QBrushrmkBrushrs r(_mkBrushrsE  4yyA~~*T!Wel;;~Awz4*6***r*ceZdZdZejZdZdZdZ dZ dZ e dZ e dZdd Zd Zd Zd ZdZdZdZdZdZdZd S) SymbolAtlasaT Used to efficiently construct a single QPixmap containing all rendered symbols for a ScatterPlotItem. This is required for fragment rendering. Use example: atlas = SymbolAtlas() sc1 = atlas[[('o', 5, QPen(..), QBrush(..))]] sc2 = atlas[[('t', 10, QPen(..), QBrush(..))]] pm = atlas.pixmap c<d|_|dSNrj)_dprclearselfs r(__init__zSymbolAtlas.__init__s  r*c|}fdt||D}|r|tt jj|S)z Given a list of tuples, (symbol, size, pen, brush), return a list of coordinates of corresponding symbols within the atlas. Note that these coordinates may change if the atlas is rebuilt. c.i|]\}}|jv||Sr$)_coords)r&keystylers r( z+SymbolAtlas.__getitem__..s+YYYjc5DLAXAXsEAXAXAXr*)_keyszip_extendrdmapr __getitem__)rstyleskeysnews` r(rzSymbolAtlas.__getitem__sp zz&!!YYYYCf,=,=YYY   LL   C 0$77888r*c*t|jSr[)rfrrs r(__len__zSymbolAtlas.__len__s4<   r*c|jSr[rrs r(devicePixelRatiozSymbolAtlas.devicePixelRatios yr*c||_dSr[r)rrs r(rtzSymbolAtlas.setDevicePixelRatios  r*cP|j||_|jSr[)_pixmap _createPixmaprs r(pixmapzSymbolAtlas.pixmaps% < --//DL|r*c |j|jz Sr[) _maxWidthrrs r(maxWidthzSymbolAtlas.maxWidths~ ))r*Nctj}|g}nDt||}t ||}||r||dSdSr[)rProfilersetrrd _itemDatar_extendFromData)rrprofilerdatars r(rebuildzSymbolAtlas.rebuilds>## >DDtzz&))**Dt,,--D  '   & & & & & ' 'r*ctjdtj|_i|_d|_d|_d|_d|_d|_ d|_ dS)N)rrdtyperrP) rbzerosubyte_datarrr _totalWidth _totalArea_pos _rowShapers r(rzSymbolAtlas.clearsPXirx888    r*c t|}|jj\}}}|j}t |||||z|dkrdn|||zz |dkrdnd|z|z|dz|dzzz S)Nrrjr)countr}r~area area_used squareness)rfrshaperdict)rnr3rras r( diagnosticszSymbolAtlas.diagnosticss II*"1a O!Q%&!VVcca!e&'1ffss!a%!)q!tad{2K MMM Mr*c&dfd|DS)Nc| |jS#t$r(ttj|_|jcYSwxYwr[)_idAttributeErrornextr _idGenerator)objs r(getIdz SymbolAtlas._keys..getIdsF w!   {788w s  /;;cg|]F\}}}}t|ttfr|n ||||fGSr$)r_r`rp)r&rUrVrWrXrs r(r)z%SymbolAtlas._keys..ss   (c5"&3*55 HVV55==$PUPUVYPZPZ\a\abg\h\h i   r*r$)rrrs @r(rzSymbolAtlas._keyss=       ,2    r*c#rK|D]1}|j|\}}}}||j|||z|||zffV2dSr[)rr)rrryrrr3s r(rzSymbolAtlas._itemDatasc 4 4Cc*JAq!Qtz!AE'1QU7"233 3 3 3 3 4 4r*c`tj}g}g}|D]V\}}t|d|ji}t j|}|||||fW|d|||ddS)Nrrenderinsert) rritemsrrrndarray_from_qimageappendr) rrrimagesrrrimgarrs r(rzSymbolAtlas._extends>## ,,.. $ $JC54955C(--C MM#    KKc # # # # T"""r*cx|||\}}|jj\}}}||ks||kr:t j||dftj}|j|d|d|f<||_|D]-\}}|j|\} } } } ||j| | | z| | | zf<.d|_dS)Nrr) _pack _minDataShaperrrbrrrr) rrwNewhNewwOldhOldrrrrrrr3s r(rzSymbolAtlas._extendFromDatas 4'')) d ( dA 4KKTD[[(D$?"(;;;C $ Cuu DJ + +HCc*JAq!Q'*DJq1ua!e| $ $ r*cXt|}|j}|j}|j}|j\}}|j\}} |D]-\} } | j\} } } t| |}|| z }|| | zz }.|t|z }t||dzz }|d|zkr|}t||}t|dD]E\}} | j\} } } || z|kr d}|| z }| } t| | } ||| | f|j |<|| z }F||_||_||_||f|_|| f|_dS)Nr,rc(|djdS)Nr )rrs r(z#SymbolAtlas._pack..-sd1gmA6Fr*)rr) rfrrrrrrrlrpsortedr)rrrwMaxwSumaSumrrwRowhRowrrr3rwRowEstrs r(rzSymbolAtlas._packsw II~y1^ d  FAsiGAq!q$<s3y1~11vvs1q5zz!!r*ctj}|jjdkrt jdd}nBt j|jtjj j }t j|}|SNr) rrrrVr QPixmaprndarray_to_qimagerqrrrs)rrpmrs r(rzSymbolAtlas._createPixmapCsh>## :?a  q!$$BB&tz #?AACs##B r*r[)__name__ __module__ __qualname____doc__ itertoolsrrrrrrrtpropertyrrrrrrrrrrrrr$r*r(rrsO  #9?$$L 9 9 9!!!X **X* ' ' ' '    M M M    444   $(&(&(&T""" r*rcfeZdZdZejeeeZejeeeZejeZ dZ dZ dZ dZ dZd'dZd Zd Zd Zd(d Zd(dZd(dZd)dZdZd'dZd*dZd+dZdZdZdZd,dZdZdZ dZ!dZ"e#j$d Z%d!Z&d"Z'd#Z(d$Z)d%Z*d&Z+dS)-raV Displays a set of x/y points. Instances of this class are created automatically as part of PlotDataItem; these rarely need to be instantiated directly. The size, shape, pen, and fill brush may be set for each point individually or for all points. ============================ =============================================== **Signals:** sigPlotChanged(self) Emitted when the data being plotted has changed sigClicked(self, points, ev) Emitted when points are clicked. Sends a list of all the points under the mouse pointer. sigHovered(self, points, ev) Emitted when the item is hovered. Sends a list of all the points under the mouse pointer. ============================ =============================================== c tj}tj|d|_t |_tj x}r,|j | dtfdtfdtfdtfdtfdtfdtfd tfd tfd tfd dtfdtfd tfdtfgfg }t!jd||_ddg|_d|_d|_t,jtjjd|_ddt9dddddt;jt9dt;jdddddj d |_!|j!"ddD||j#|i||dd|_$dS)z9 Accepts the same arguments as setData() NrrrVrUrWrXrYrhovereditem sourceRectr3rrr T antialiasr foregrounddFz!x: {x:.3g} y: {y:.3g} data={data}) pxModeuseCacher compositionModer'rUrVrWrX hoverabletipcTi|]%}d|zt|&S)hover)title_DEFAULT_STYLE)r&opts r(rz,ScatterPlotItem.__init__..s, f f fCWsyy{{ "N3$7 f f fr*rUrVrWrXsetData)%rrr rpicturer fragmentAtlasr QGuiApplication primaryScreenrtrfloatobjectboolrprbemptyrbounds _maxSpotWidth_maxSpotPxWidthr internalsPrimitiveArrayrxPixmapFragment_pixmapFragmentsrrrrformatoptsupdater_toolTipCleared)rrkargsrscreenrs r(rzScatterPlotItem.__init__gs>##%%% (]]*88:: :6 N   2 263J3J3L3L M M M%L %L UO v  FO f    V    V  c c c c   &HQe,,, Tl   " ; ;EN>!!WE'NN YY!^^aE#JaE#JJ YY]]KLL L E>>,C#rz**  1Xc  1Xc ''A!!V^44'11c c  e  w((FF E\\eCj4s__FFE#JE#JF"& &#)HS\\&0 HHH $+ -3w<<- )CLLMM*!  e  'NE3u::&& J JQxJJAEzz"1g%c6>::1"%%%''35577aAA"%a&#a&aA*+ 3*+ 3e(.tAw 1 g(0a(9(9 1 BBB(,Q 1 '(Dq(HIII!J J&E\\ :GCL :GCL U?? %f DIf  u   NN5? + + + %  %*;%7DIk " %  %)% *<%=%=DIk " E>>$U|DIe    $)*$5DIj !4 # #AEzz#D%!A$**,,*>122*FGG  %(5' RXZ^H_H_````17799$BU{{2Y::BB'\\!"B " " U??   eFmW  = = = ""$$$ $$&&&Tl   !!!   &&&&&r*c<d|_|dSr[)rr,rs r(rCzScatterPlotItem.invalidateRs  r*c6|jd|jdfSNrrrrs r(getDatazScatterPlotItem.getDataWsy~ty~--r*Ncdg}||S||vS)NplotDatar$)r interfaceintss r( implementszScatterPlotItem.implementsZs|  KD  r*c8|jddS)Nr')r+r?rs r(r'zScatterPlotItem.name`sy}}VT***r*c|dd}|d|j}t|dkrt|dtjst|dt r|d}d|vr|d||d}t|t|kr.tdt|t|fzt tt||d <nt|i||j d <d|d <|r| |dSdS) a&Set the pen(s) used to draw the outline around each spot. If a list or array is provided, then the pen for each spot will be set separately. Otherwise, the arguments are passed to pg.mkPen and used as the default pen for all spots which do not have a pen explicitly set.r,Tr7r rr6Nz9Number of pens does not match number of points (%d != %d)rWr) poprrfr_rbr9rdr8rrr+rD)rrr.r,r7penss r(r]zScatterPlotItem.setPencs< 8T**))Ity11 t99>>z$q'2:>>>*TRSWVZB[B[>7D5=#<E&M*4yyCLL(( [_bcg_h_hjmnujvjv^w wxxx!#fd"3"344GENN%t5u55DIe  !   &   W % % % % % & &r*c|dd}|d|j}t|dkrt|dtjst|dt r|d}d|vr|d||d}t|t|kr.tdt|t|fzt tt||d <nt|i||j d <d|d <|r| |dSdS) a.Set the brush(es) used to fill the interior of each spot. If a list or array is provided, then the brush for each spot will be set separately. Otherwise, the arguments are passed to pg.mkBrush and used as the default brush for all spots which do not have a brush explicitly set.r,Tr7r rr6Nz 8T**))Ity11 t99>>z$q'2:>>>*TRSWVZB[B[>1gG5=#<!%-07||s7||++ ^befmbnbnpst{p|p|a} }~~~#C'$:$:;;GG  !)4!95!9!9DIg  !   &   W % % % % % & &r*Tc||j}t|tjst|tr`|}|||}t |t |kr.t dt |t |fz||d<n||jd<d|_d|d<|r| |dSdS)amSet the symbol(s) used to draw each spot. If a list or array is provided, then the symbol for each spot will be set separately. Otherwise, the argument will be used as the default symbol for all spots which do not have a symbol explicitly set. **Supported symbols:** * 'o' circle (default) * 's' square * 't' triangle * 'd' diamond * '+' plus * 't1' triangle pointing upwards * 't2' triangle pointing right side * 't3' triangle pointing left side * 'p' pentagon * 'h' hexagon * 'star' * '|' vertical line * '_' horizontal line * 'x' cross * 'arrow_up' * 'arrow_right' * 'arrow_down' * 'arrow_left' * 'crosshair' * any QPainterPath to specify custom symbol shapes. NzLength of meta data does not match number of points (%d != %d)r r) rr_rbr9rdrfr8rfields enumerate)rrr7r6rIrecs r(r@zScatterPlotItem.setPointDatas ?iG dBJ ' ' ~:dD+A+A ~Dz4yyCLL(( `dghldmdmorszo{o{c| |}}} dBJ ' ' #TZ->-JsSWS]SdOeOehiOiOi#D// ) )3%("" ) )#GFOOOr*ch|jd|krdS||jd<|dS)Nr)r+rC)rmodes r(r<zScatterPlotItem.setPxModes; 9X $ & & F" ( r*c tj}||j}d}|jdr|jdr|dddk}t j|rFd}|jtt| gd|| }||d|<| nd}| | |r| dSdS) NFrrrr3rTr)ridxr) rrrr+rbanyrrdr_style_maybeRebuildAtlas_updateMaxSpotSizesrC)rr7rrCr6coordss r(rDzScatterPlotItem.updateSpotss>## ?iG 9X  49Z#8 <(-2Dvd|| 5! +dkk*L*L*LSZ`dkeefgg/5 %d+  # # % % % %J   g ...   OO       r*rc :t|j}||kr~||t|jzkre|jt t |gdd|jd<|dSdSdS)Nrrr)rfrrrrdrrrrD)r thresholdminlenrs r(rsz"ScatterPlotItem._maybeRebuildAtlass " # # JJQS^^!;;;   & &S$++&H&H&HIIJKK   '(DIl #         J;;r*c#K||j}|tjdd}|D]}|||}|j|}|jdrD|jd|z}|t|kr|||d|<|j||tj|t|<|dkr|||z}|VdS)NrrrrV) rrbs_basecopyr+rrequal)rr+rrpr\rcolvals r(rrzScatterPlotItem._style&s <9D ;%(C  Cs)C.Cx#hhjjy% 4i#))++ 56.---03CY,-6:inCnS122 3f}}!2u IIII  r*c |jdr|jdrd|jj}}n=tt j|j|jfg|jdi|\}}||_||_ddg|_ dS)Nrrrr$) r+rrrlrchainr$r%_measureSpotSizesr#)rrr3pws r(rtz#ScatterPlotItem._updateMaxSpotSizes>s 9X  A49Z#8 At)2rAA $*R)S(T4d4>>v>>@@AAEAr!Tl r*c+<Kt|jddgfi|}|jdr%|D] \}}d||zfV!dS|D]M\}}|r||fV2||zdfVNdS)z1Generate pairs (width, pxWidth) for spots in datarVrWrrN)rrrr+ro isCosmetic)rrrrVrWs r(rz!ScatterPlotItem._measureSpotSizesHskdk65/<>##1 ,,,,,-q00000  1 1r*cd|_d|_tjd|jj|_ddg|_|dS)z&Remove all spots from the scatter plotrrN)r$r%rbr"rrr#rCrs r(rzScatterPlotItem.clearVsO HQdio666 Tl  r*rjc|dkr||j| |j|S|jt|jdkrdS|dkr|jd}|jd}n0|dkr|jd}|jd}ntd|.||dk||dkz}||}|jdkrdS|dkrSt j||jdzz t j||jdzzf|j|<|j|S|d krtd t|zt j |}||}t j |d d|z zd d|zzgS) NrjrNNrrr zInvalid axis valueea?r=z0Value for parameter 'frac' must be > 0. (got %s)2) r#rrf ValueErrorrVrbnanminr$nanmaxr8r`isfinite percentile)raxfrac orthoRangerd2r6s r( dataBoundszScatterPlotItem.dataBounds_s 3;;:-$+b/2M;r? " 9 DI! 3 3< 77 #A3BB 1WW #A3BB122 2  !*Q-'B*Q-,?@D$Av{{#| 3;;!y||d.@.GGSTX\XjkqXqIqrDKO;r? " S[[NQTUYQZQZZ[[ [;q>>D$A=R1t8_bAHo$FGG Gr*c|jdzS)Nr)r%rs r( pixelPaddingzScatterPlotItem.pixelPaddings#F**r*c|d\}}|d\}}||d}d}||d}d}dx}}|}|dkry|\}} |dn|}n#t$rd}YnwxYw |dn|}n#t$rd}YnwxYw||z}||z}t j||z ||z d|z|z|z d|z|z|z S)Nr)rr r=r)rr pixelVectorslength OverflowErrorr r.)rxmnxmxymnymxpxpypxPads r( boundingRectzScatterPlotItem.boundingRectsX___** c___** c ;#+CC ;#+CC R!!## 199&&((FB *QQ"))++      *QQ"))++      %KB %KB}SVSVadCZ^adCZ^LLLs$9B B! B!%B>> C  C ch|tj|ddg|_dSr[)rAr viewTransformChangedr#rs r(rz$ScatterPlotItem.viewTransformChangeds4 ""$$$+D111Tl r*cXtj|g|Ri||dSr[)r setExportModerC)rrkwdss r(rzScatterPlotItem.setExportModes9$T9D999D999 r*c  tj}|jdd}||||jdur7|jdd}|jdd}n|jd}d}|jddur||}tj |j d|j d g} tj | | } tj| d d } ||jd r|jdur|j} |m|x} | krS| } |j| |jd |j d<|| dd|fj} |j d|} |j| j|j}| |ddd df<tj| t8d|ddddf<d| z d| z ddg|ddddf<|d|j}|jg||jj R|ddS|!|j"j#|tI| dd|fjtI|%gd||D]0\}}||j&|tO|g|R1dS|j(tSj*|_(tSj+|j(}tI|j d|j d tI|%gd|D]=\}}}||&||tO|g|R>|,|!|j"j#||j(-|dS)NrFr TresolutionScalerjrrrii@rrrrr)rTrr r=r prepdrawr)rpr\)r\).rrr+r?setCompositionMode _exportOpts_maskAtviewRectrbvstackrrtransformCoordinates transform clip_arrayresetTransformrrdevicePixelRatioFrtrrDTr)resizerVr9 frombufferrpreshapedrawargsdrawPixmapFragmentsrryrzr{rrrr|rirr QPicturerxrplay)rroptionwidgetrcmodeaar\viewMaskptsrdpr_newxysrfragsrptrp2rrs r(paintzScatterPlotItem.paints>## /66    ' ' '  5 ( (!%%k488B$(():C@@EE;'BE 9X $ & &||DMMOO44H)TYs^TYs^<==C)!++--==C-Xw77C     y$$ *)9U)B)B(99;;%f6N6N6P6P+P7UX*X*X!C&::3???&,,..../DIl+$$&&&H%'Y|,X6%,,RW555-5577 "aaa1f " b < < < D DW M Maaa1f "#C%3S!9aaa2g   099;;%%KxK1C1JKKKK      92>>>!$AAAxK(*dkk*L*L*LRZbgkhhj""**IB$$&&&AK$$q)5))))) **|#$~// ^DL11#& # #T[[)K)K)KSX[YYZ$$++KAq% %%'''LLA&&&r*E***** OOAL5r : : : L  a r*ctj|jdd}tj|dddfD]+}|j|}|dt ||||d<,|jdS)Nrr)rbr~rargwherer)rmrIrls r(pointszScatterPlotItem.pointssv HTYv& - -Q1% 5 5A)A,C6{"&sD!44F y  r*cn|||dddS)NrT)rr)rr5s r(pointsAtzScatterPlotItem.pointsAts,{{}}T\\#../"55r*ct|tjr-|x}}|x}}nrt|tjrQ|}|}|}| }nt|j dr4|j dr'|j dd}|j dd}n| dg\}|x}}|dz }|dz }|j dry|\} } | d n| } n#t $rd } YnwxYw | d n| } n#t $rd } YnwxYw|| z}|| z}|j d |j d |z|kz|j d |z |kz|j d |z|kz|j d |z |kzS) zd Return a boolean mask indicating all points that overlap obj, a QPointF or QRectF. rrrr3rrVrNrrYrr)r_r r:rrr.leftrighttopbottom TypeErrorr+rrrrrr) rrlr2rbr3rrrrs r(rzScatterPlotItem._maskAts% c6> * * EEGGOAEEGGOA V] + +  A A A AAO 9X  49Z#8  ,',A ,',AAfX&&BAIA E E 9X  &&((FB *QQ"))++      *QQ"))++      GA GA )$9S>A%)+9S>A%)+9S>A%)+9S>A%) + ,s$E E.-E.2F FFc|tjjjkr||}t|dkr>||_| |j ||j|dS| dS| dSr) buttonr r MouseButton LeftButtonrr5rf ptsClickedaccept sigClickedrFignore)revrs r(mouseClickEventzScatterPlotItem.mouseClickEvent3s 99;;&)/: : :--))C3xx!||"% $$T4?B????? IIKKKKKr*cjdr͉jd}|jr tjjd}n'|}r1djd||z <|jd< |ddd} }|։jdt|dkrd}fd|d|D}t||kr8| d t||z |d |d _n#js|d d _j||dSdS)NrrrrrTrcg|]u}jd|||vS)r)rrr)r+r5rrr)r&rrs r(r)z.ScatterPlotItem.hoverEvent..Usn666!,49U+bffhhjjllbffhhjjllQSQXQXQZQZ[[[666r*z({} others...)z FT)r+rexitrb zeros_likerr5_hasHoverStylerDr getViewBoxrfrr* setToolTipjoinr- sigHoveredrF)rroldrrvbcutoffrs` r( hoverEventzScatterPlotItem.hoverEvent@s 9[ ! 3)I&Cw -mDIi$899ll26688,,""$$ #56 ,'c 2'* )$  """[[]]3'"-F""B~$)E"2">v;;??F6666%+GVG_666C6{{V++ #3#:#:3v;;;O#P#PQQQMM&++c"2"2333+0D((-0MM"%%%+/D( O vr 2 2 2 2 2= 3 3r*c:tfddDS)Nc3zK|]5}jd|zt|kV6dS)rN)r+rr)r&rrs r( z1ScatterPlotItem._hasHoverStyle..bs]BB9Wsyy{{23~c7JJBBBBBBr*r)rqrs`r(rzScatterPlotItem._hasHoverStyleasEBBBB@BBBBB Br*r[)TNNr)rrv)NNN)rjN),rrrrr Signalr rrrErrr1rCrRrWr'r]r^rbrerhr@r<rDrsrrrtrrrrrrrrwarnOnExceptionrrrrrrrr$r*r(rrNs(vvv66Jvvv66J"V]6**N<$<$<$|2'2'2'hw'w'w'r ...!!!! +++&&&,&&&,.&.&.&.&`&&&&0&&&&*####$00### 1 1 1 H H H HD+++MMM:###  N!N!N!`!!!666+,+,+,Z   333BBBBBBr*ceZdZdZdZedZdZdZdZ dZ dZ d Z d Z d Zd Zd ZdZdZdZdZdZdZdZdZdS)rz Class referring to individual spots in a scatter plot. These can be retrieved by calling ScatterPlotItem.points() or by connecting to the ScatterPlotItem's click signals. cT||_||_tj||_dSr[)r_indexweakrefref_SpotItem__plot_ref)rrplotindexs r(rzSpotItem.__init__ms'  "+d++r*c*|Sr[)rrs r(_plotzSpotItem._plotus   r*c|jdS)z/Return the user data associated with this spot.rrrs r(rz SpotItem.dataysz&!!r*c|jS)zAReturn the index of this point as given in the scatter plot data.)rrs r(rzSpotItem.index}s {r*cb|jddkr|jjdS|jdS)zReturn the size of this spot. If the spot has no explicit size set, then return the ScatterPlotItem's default size instead.rVrT)rrr+rs r(rVz SpotItem.sizes2 :f  # #:?6* *:f% %r*cNt|jd|jdSrQ)r rrs r(r5z SpotItem.possTZ_djo666r*cZ|j|Sr[)r mapToViewr5rs r(viewPoszSpotItem.viewPoss z##DHHJJ///r*cB||jd<|dS)zSet the size of this spot. If the size is set to -1, then the ScatterPlotItem's default size will be used instead.rVNr updateItem)rrVs r(rezSpotItem.setSizes&" 6 r*c|jd}||jjd} t|}t t |tt z}n#YnxYw|S)zReturn the symbol of this spot. If the spot has no explicit symbol set, then return the ScatterPlotItem's default symbol instead. rU)rrr+rprdrarrf)rrUrs r(rUzSpotItem.symbolsmH% >Z_X.F F A',,..))!c'll*:;FF  D s AA44A8cB||jd<|dS)zSet the symbol for this spot. If the symbol is set to '', then the ScatterPlotItem's default symbol will be used instead.rUNr )rrUs r(rbzSpotItem.setSymbols& & 8 r*cl|jd}||jjd}tj|S)NrW)rrr+rr)rrWs r(rWz SpotItem.pens/j ;*/%(Cx}}r*cVt|i||jd<|dS)z!Set the outline pen for this spotrWN)rrr rrr.s r(r]zSpotItem.setPens1"D2E22 5 r*cBd|jd<|dS)zVRemove the pen set for this spot; the scatter plot's default pen will be used instead.NrWr rs r(resetPenzSpotItem.resetPens$  5 r*cl|jd}||jjd}tj|S)NrX)rrr+rr)rrXs r(rXzSpotItem.brushs1 7# =JOG,Ez%   r*cVt|i||jd<|dS)z Set the fill brush for this spotrXN)rrr rs r(r^zSpotItem.setBrushs1&666 7 r*cBd|jd<|dS)zZRemove the brush set for this spot; the scatter plot's default brush will be used instead.NrXr rs r( resetBrushzSpotItem.resetBrushs$" 7 r*c|jdS)NrYrrs r( isVisiblezSpotItem.isVisiblesz)$$r*cB||jd<|dS)z(Set whether or not this spot is visible.rYNr )rrYs r( setVisiblezSpotItem.setVisibles$ ' 9 r*c||jd<dS)z+Set the user-data associated with this spotrNr)rrs r(rzSpotItem.setDatas! 6r*c~d|jd<|j|jddS)N)rrrrrr )rrrDrrs r(r zSpotItem.updateItems:#/ <  tz11!4455555r*N)rrrrrrrrrrVr5r rerUrbrWr]rrXr^rrrrr r$r*r(rrfsV ,,,!!X!"""&&&777000       !!!   %%% """66666r*)r,r r r).rrmr collectionsrnumpyrbrrrrrrr r r r __all__ name_listrar/r.addRectr6rurrKcr0rrr1 closeSubpath QTransformtrrotaterrrirrrr rrrr$r*r(r)s: ######****** j ) Q Q Q +JJ JJJ K K   dD!Q77888 ]V]4q!44555%}  / . . . . . / / / . . . 5 5 5     / / / % % %    = < <)  2 LLNNDAqGAJqtu  ! !Q AJU " vvgcl##  "  344 w}566 w|455 vvgcl##  "TDUYZZ   2 ) ) ) + + +~~~~~&~~~BU BU BU BU BU BnU BU BU Bps6s6s6s6s6vs6s6s6s6s6r*