
    >hG                     0    S SK rSSKJr         SS jrg)    N   )utilsc                    SSK Jn  [        R                  " U5      u  nn[        R
                  " U 5      n S nU" U5      nU" U5      nU" U5      nU" U5      n[        U 5      nUc  [        R                  " U5      nUc  [        R                  " U5      nUc  [        R                  " U5      nSn[        [        U5      5      nUb  [        [        U5      5      nUSL a  SnSnOUSL a  SnUnOUS:  nUS:  a  UOSnUU-  nUR                  S5        UR                  S5        Uc%  [        [        U5      5      nUR                  5         OUnU	c%  [        [        U5      5      nUR                  5         OU	n0 n[        U5       HH  nUb  UU   U;  a  M  U	b  UU   U	;  a  M  UU   UU   4n U U;  a  / UU '   UU    R                  U5        MJ     UR!                  5       R#                  UR$                  R'                  5       5      n!U!R(                  U!R*                  n#n"[        U5      n$S	u  n%n&U(       a'  UR-                  UR.                  UR0                  5      n'O&UR-                  UR0                  UR.                  5      n'UU#-  n(U(       a  U&U%-
  UU(-  -
  [3        U$5      -  n)OU&U%-
  [3        U$5      -  n)Ub  Un*O$[        [        U5      5      n*U*R                  5         U(       a  U*SSS
2   n*[        U*5      n+U+S:  a  U)S[3        U+5      S-
  -  -  n,OSn,U* V-s0 s H  n-U-U*R5                  U-5      _M     n.n-/ SQn/Uc  U* V-s0 s H  n-U-0 _M     nn-[        U+5       HT  n0U*U0   n1SUU1   ;  a  U/U0[        U/5      -     UU1   S'   SUU1   ;  a  SUU1   S'   SUU1   ;  d  MD  U,S:X  a  SOSUU1   S'   MV     Uc  U* V-s0 s H  n-U-0 _M     nn-[        U+5       H4  n0U*U0   n1SUU1   ;  a  SUU1   S'   SUU1   ;  d  M$  U,S:  a  SOSUU1   S'   M6     U(       a  US:X  a  U&U)S-  -
  OU&n2OU%U)S-  -   n2[        5       n3/ n4U GHl  n5U(       Ga!  U(       a|  U5US   :X  a  U2U)S-  -   OU2n6UR7                  S	U6U64U2SU(-  -
  U2SU(-  -
  4SUR0                  SS9  UR9                  SU2SU(-  -
  U5SSUR0                  S9n7U7R;                  S5        U2U(-  n2O[        U V8s/ s H  n8U8S   U5:X  d  M  U8PM     sn85      n9UR7                  U2U)S-  -
  S-   U2U9S-
  U)-  -   U)S-  -   S-
  4S S!SUR0                  SSS"9  UR9                  U2U9S-
  U)-  S-  -   S#U5SS$UR0                  S9n7U7R;                  S5        Sn:U GH6  n;U5U;4U;  a  M  U(       a  UR=                  U2SS%9  OUR?                  U2SS%9  Ub0  U;RA                  U5      n<[        U<5      S:  a  U<S   U<S   n>n=O	U;Sn>n=OU;Sn>n=Ub  U" U=5      n=Ub  U" U>5      n>U(       aw  U:S-  S:X  an  U(       a;  UR7                  S	U2U)S-  -
  U2U)S-  -
  4U2U)S-  -   U2U)S-  -   4S&UR0                  SS9  O,UR7                  U2U)S-  -
  U2U)S-  -   4S'S(S&UR0                  SS9  U:S-  n:URC                  5       S);   aL  U(       a#  UR9                  S*U"-  U2U=S+SUR0                  S,S-9  O"UR9                  U2S*U#-  U=SS.UR0                  S,S-9  URC                  5       S/;   aU  U>bR  U(       a&  UR9                  SS0U"-  -   U2U>S1SUR0                  S,S-9  O%UR9                  U2SS0U#-  -   U>SS$UR0                  S,S-9  U4R                  U25        [E        UU5U;4   5       GH-  u  n?n@SnAU
(       a  U)* S2-  U.UW@      U,-  -   nAU W@   nBUb  [        RF                  " UW@   5      (       a  WBUW@   -
  UBUU@   -   nDnCOWBUW@   S   -
  UBUU@   S   -   nDnCU(       a'  URH                  " WCWD/U2WA-   U2UA-   /S34S4U'0XdW@      D6  O&URH                  " U2WA-   U2UA-   /WCWD/S34S4U'0XdW@      D6  UW@   nEUEU3;  a  WEOSnFU3RK                  WE5        U(       a#  URH                  " WB/U2WA-   /4S5U'WFS6.UWE   D6  GM  URH                  " U2WA-   /WB/4S5U'WFS6.UWE   D6  GM0     U(       a  U2U)-  n2GM1  U2U)-  n2GM9     GMo     U(       Ga  URL                  RO                  S$5        URP                  RO                  S75        URS                  / 5        URT                  S1   RW                  S75        URT                  S+   RW                  S75        URT                  S.   RW                  S75        URT                  S$   RY                  S8S*U#-  45        UR[                  SS5        URP                  R]                  U45        UR_                  SSS99  U$ URP                  RO                  S15        URL                  RO                  S75        URa                  / 5        URT                  S$   RW                  S75        URT                  S+   RW                  S75        URT                  S.   RW                  S75        URT                  S1   RY                  S8S*U"-  45        URc                  SS5        URL                  R]                  U45        UR_                  SSS:9  U$ s  sn-f s  sn-f s  sn-f s  sn8f );a  
Dot plotting (also known as forest and blobbogram).

Produce a dotplot similar in style to those in Cleveland's
"Visualizing Data" book ([1]_).  These are also known as "forest plots".

Parameters
----------
points : array_like
    The quantitative values to be plotted as markers.
intervals : array_like
    The intervals to be plotted around the points.  The elements
    of `intervals` are either scalars or sequences of length 2.  A
    scalar indicates the half width of a symmetric interval.  A
    sequence of length 2 contains the left and right half-widths
    (respectively) of a nonsymmetric interval.  If None, no
    intervals are drawn.
lines : array_like
    A grouping variable indicating which points/intervals are
    drawn on a common line.  If None, each point/interval appears
    on its own line.
sections : array_like
    A grouping variable indicating which lines are grouped into
    sections.  If None, everything is drawn in a single section.
styles : array_like
    A grouping label defining the plotting style of the markers
    and intervals.
marker_props : dict
    A dictionary mapping style codes (the values in `styles`) to
    dictionaries defining key/value pairs to be passed as keyword
    arguments to `plot` when plotting markers.  Useful keyword
    arguments are "color", "marker", and "ms" (marker size).
line_props : dict
    A dictionary mapping style codes (the values in `styles`) to
    dictionaries defining key/value pairs to be passed as keyword
    arguments to `plot` when plotting interval lines.  Useful
    keyword arguments are "color", "linestyle", "solid_capstyle",
    and "linewidth".
split_names : str
    If not None, this is used to split the values of `lines` into
    substrings that are drawn in the left and right margins,
    respectively.  If None, the values of `lines` are drawn in the
    left margin.
section_order : array_like
    The section labels in the order in which they appear in the
    dotplot.
line_order : array_like
    The line labels in the order in which they appear in the
    dotplot.
stacked : bool
    If True, when multiple points or intervals are drawn on the
    same line, they are offset from each other.
styles_order : array_like
    If stacked=True, this is the order in which the point styles
    on a given line are drawn from top to bottom (if horizontal
    is True) or from left to right (if horizontal is False).  If
    None (default), the order is lexical.
striped : bool
    If True, every other line is enclosed in a shaded box.
horizontal : bool
    If True (default), the lines are drawn horizontally, otherwise
    they are drawn vertically.
show_names : str
    Determines whether labels (names) are shown in the left and/or
    right margins (top/bottom margins if `horizontal` is True).
    If `both`, labels are drawn in both margins, if 'left', labels
    are drawn in the left or top margin.  If `right`, labels are
    drawn in the right or bottom margin.
fmt_left_name : callable
    The left/top margin names are passed through this function
    before drawing on the plot.
fmt_right_name : callable
    The right/bottom marginnames are passed through this function
    before drawing on the plot.
show_section_titles : bool or None
    If None, section titles are drawn only if there is more than
    one section.  If False/True, section titles are never/always
    drawn, respectively.
ax : matplotlib.axes
    The axes on which the dotplot is drawn.  If None, a new axes
    is created.

Returns
-------
fig : Figure
    The figure given by `ax.figure` or a new instance.

Notes
-----
`points`, `intervals`, `lines`, `sections`, `styles` must all have
the same length whenever present.

References
----------
.. [1] Cleveland, William S. (1993). "Visualizing Data". Hobart Press.
.. [2] Jacoby, William G. (2006) "The Dot Plot: A Graphical Display
   for Labeled Quantitative Values." The Political Methodologist
   14(1): 6-14.

Examples
--------
This is a simple dotplot with one point per line:

>>> dot_plot(points=point_values)

This dotplot has labels on the lines (if elements in
`label_values` are repeated, the corresponding points appear on
the same line):

>>> dot_plot(points=point_values, lines=label_values)
r   Nc                 8    U c  S $ [         R                  " U 5      $ )N)npasarray)xs    pC:\Users\julio\OneDrive\Documentos\Trabajo\Ideas Frescas\venv\Lib\site-packages\statsmodels/graphics/dotplots.py<lambda>dot_plot.<locals>.<lambda>   s    !E

1!E    g      ?FTr   g{Gz?)r   r   g      @g        )rgbykpurpleorangecolormarkeroms
      grey	linewidth      gffffff?darkgrey)r   	transformzordergffffff?center)horizontalalignmentverticalalignmentr!   boldg{Gz?))\(?r'   )(\?r(   )r   r!   r"   clip_ongRQ?bottom)r   	lightgrey)r   r   )r   r   )leftbothgright	monospace)r$   r%   r!   familytop)r.   r-   g?r,      -r!   None)lsr!   labelnoneaxes)scaleytight)scalexr:   )2matplotlib.transforms
transformsr   create_mpl_axr   r   lenarangezerossetset_xmarginset_ymarginlistsortrangeappendget_window_extenttransformeddpi_scale_transinvertedwidthheightblended_transform_factory	transData	transAxesfloatindexfill_betweentextset_fontweightaxhlineaxvlinesplitlower	enumerateisscalarplotaddxaxisset_ticks_positionyaxisset_yticklabelsspines	set_colorset_positionset_ylim	set_ticksautoscale_viewset_xticklabelsset_xlim)Gpoints	intervalslinessectionsstylesmarker_props
line_propssplit_namessection_order
line_orderstackedstyles_orderstriped
horizontal
show_namesfmt_left_namefmt_right_nameshow_section_titlesaxr=   figasarray_or_nonenpointsection_title_spacensectdraw_section_titlesnsect_titlesection_space_totallines0lines1	lines_mapikybboxawidthaheightnrowsr*   r1   transtitle_space_axesdposstyle_codesnvalstackdr	   style_codes_mapcolorsjscposlabeledticksk0y0txtr   mjrowk1us
left_labelright_labeljijpyoptlcbucbslsllsG                                                                          r
   dot_plotr      s   n /!!"%GC ZZFEO	*IE"Ex(HV$F [F }		&! 88F# ~&!  HE C&' e##		$"#ai$qyea .; NN4NN4c(m$c%j! I6]$!M)I!eAhj&@qk58$YIbM"Q  !--$$&(Djj$++GF 	NE
 KFC44R\\57\\C 44R\\57\\C +W4 f{+;;;%L fe, "3v;' !$B$'{DaxeDk!m,- 9DD1q+++A..OD ;F'23{!2{34[^,r**(.q3v;(?LW%<++),LX&|B''+1Q;RALT"  %01[ae[
14[^*R.(&,JrN7#jn,/5z!qJrN;'  #qjcDFlc tAvo eG E  %'6!9_S46\#B!$S)9%9!9!$S)9%9!9!;&0*,,,'(   * ggc3.>)>#>2:08(*  6 ""6*'' I<Iq1I<=T!VD!$ac4ZQ!6t!;!= +[&0*,,,'(%   9 ggcQqS$JqL0$2:08(*  6 ""6*B Bxy( 

3f
-

3f
- &XXk*r7a<.0eRUJ.0$J*,dK
(*:6
),[9 4!8q=OOFSaZT!V,D%(aZT!V$<*5.0ll+,	 $ . OOSaZT!V$<$*F*5.0ll+,	 $ . AID !%55GGDKj07.6&(ll#.	  0 GGCgz08.3&(ll#.	  0 !%66*!CJ[4:2:*,,,'2	   4 QW_k4<2:*,,,'2	   4 LL #9bW#562 q?6":#>v#EEBBZ ( {{9R=11#%	"#52. !S
 $&	"a(8#82q!11 ! "c
SVSV,<c :*/:",BZ"8: RR 03*c :*/:",BZ"8: BZg-b4BGGRECF9 0&+30*2.0 GGSVIu 0&+30*2.0U 7\ ttE S \ 
##H-
##F+
2
		&##F+
		'$$V,
		%""6*
		(((&$w,)?@
Aq
5!
d3 J 	##F+
##F+
2
		(%%f-
		'$$V,
		%""6*
		&&&V'<=
Aq
5!
d3JY E
 4 2^ =s    k	kkk
+k
)NNNNNNNNNFNFTr-   NNNN)numpyr    r   r    r   r
   <module>r      s(      ;?8<>B7<)/04*.cr   