§
    nŸr]>  ã                   ó¢  — d Z ddlZddlmZmZ  G d„ d¦  «        Z G d„ de¦  «        Z G d„ d	e¦  «        Z G d
„ de¦  «        Z G d„ de¦  «        Z	 G d„ de¦  «        Z
 G d„ de¦  «        Z G d„ de¦  «        Zi Z eg d¢d¬¦  «         eddgej        j        rdpd¬¦  «         eddg¬¦  «         eddg¬¦  «         eg d¢d ¬¦  «         ed!¬"¦  «         e	d#¬"¦  «        ged$<    eg d¢d¬¦  «         eddg¬¦  «         eddg¬¦  «         eg d¢d ¬¦  «         ed!¬"¦  «         e	d#¬"¦  «        ged%<    eg d&¢d#¬¦  «         eg d'¢¬¦  «        ged(<    eddg¬¦  «         ed)d*g¬¦  «         e	d+d+¬,¦  «         ed-d.g¬¦  «         ed/d0g¬¦  «         e	d#¬"¦  «         e	d1¬"¦  «         e	d2¬"¦  «         e	d3¬"¦  «        g	ed4<    eg d5¢d¬¦  «         eddg¬¦  «         ed6d7g¬¦  «         e	d8d8¬,¦  «         e	d9d9¬,¦  «         ed:¬"¦  «         e	d#¬"¦  «        ged;<    eg d5¢d¬¦  «         eddg¬¦  «         ed<d=g¬¦  «         ed!¬"¦  «         e	d#¬"¦  «         e	d8¬"¦  «         e	d>¬"¦  «        ged?<    eg d@¢¬¦  «         eddg¬¦  «         eg dA¢¬¦  «         e	dB¬"¦  «         eg dC¢¬¦  «         e	dD¬"¦  «         edEg¬¦  «         edFg¬¦  «         ed!¬"¦  «         e	d#¬"¦  «        g
edG<    e	d1d1¬,¦  «         edHdIg¬¦  «         edJdJ¬,¦  «         e	dKdK¬,¦  «         eddg¬¦  «         edLdL¬,¦  «        gedM<   dS )Na©  Terminal definition file.

This module describes the options available to gnuplot's various
terminals.  For the moment, it only supports a few terminals, but the
infrastructure is here to add others as they are needed.

Part of the trick is that the 'set terminal' command takes myriad
suboptions with various argument types, and order is sometimes
significant.  The other part of the trick is that there are over 50
terminal types, and each terminal has its own set of options.

The strategy here is to define a general mechanism for turning Python
keyword parameters into fragments of gnuplot command strings.  There
are a number of classes derived from Arg that do this.  Some take
string args, some boolean, etc.  Then the list of options that each
terminal accepts is stored in the terminal_opts dictionary.
Gnuplot.hardcopy(), in turn, uses this dictionary to interpret its
keyword arguments and build the 'set terminal' command.

é    N)ÚgpÚErrorsc                   ó   — e Zd ZdZdS )ÚArgaÐ  Process terminal subargs and return a command fragment.

    Pull one or more arguments from keyw and output a list of strings
    that will be appended to the 'set terminal' (separated by spaces).
    Delete any used args from keyw.  If no relevant options are found,
    return None.

    This is a base class for the actual argument-processing classes.
    Derived classes must define a __call__(self, keyw) method
    returning a list of strings or None.

    N)Ú__name__Ú
__module__Ú__qualname__Ú__doc__© ó    ú2/usr/lib/python3/dist-packages/Gnuplot/termdefs.pyr   r   #   s   € € € € € ðð ð 	€Dr   r   c                   ó   — e Zd ZdZd„ Zd„ ZdS )ÚArgOneParamaa  Arg abstract base class specialized for exactly one parameter.

    Members:

        'argname' -- The name of the keyword argument used to pass
            this argument to Python.

        'default' -- The default value of the argument, used if no
            keyword parameter is found.  If this is None, then no
            default is assumed.

    c                 ó"   — || _         || _        d S ©N)ÚargnameÚdefault)Úselfr   r   s      r   Ú__init__zArgOneParam.__init__B   s   € ØˆŒØˆŒˆˆr   c                 ób   — 	 || j                  }|| j         = n# t          $ r
 | j        cY S w xY w|S )zîGet the keyword argument corresponding to this Arg.

        Look in keyw for the keyword argument needed by this Arg.  If
        it is found, delete it from keyw and return it.  If it is not
        found, return self.default.

        )r   ÚKeyErrorr   ©r   ÚkeywÚks      r   Ú
get_optionzArgOneParam.get_optionF   sT   € ð	#Ø�T”\Ô"ˆAð �T”\Ð"Ð"øõ ð 	 ð 	 ð 	 Ø”<ÐÐÐð	 øøøð ˆs   ‚ ˜,«,N)r   r   r	   r
   r   r   r   r   r   r   r   4   s<   € € € € € ðð ðð ð ðð ð ð ð r   r   c                   ó    — e Zd ZdZdd„Zd„ ZdS )Ú
KeywordArgaT  Represent an argument that must be passed as a keyword to gnuplot.

    Some gnuplot options take the form of single unquoted keywords
    (possibly preceded by a fixed keyword).  We allow those to be
    passed as strings 'option="keyword"'.  Check that the option
    supplied is in the list of allowed options.

    Members:

        'fixedword' -- the fixed keyword that must precede the
            variable keyword in the gnuplot command, or None if none
            is required.

        'options' -- a list of strings containing the legal
            alternatives for this argument.

    Nc                 óZ   — t                                | ||¦  «         || _        || _        d S r   )r   r   Ú	fixedwordÚoptions)r   r   r    r   r   s        r   r   zKeywordArg.__init__k   s,   € Ý×Ò˜T 7¨GÑ4Ô4Ð4Ø"ˆŒØˆŒˆˆr   c                 ó¬   — |                       |¦  «        }|€d S || j        v r| j        €|gS | j        |gS t          j        d| j        ›d|›d�¦  «        ‚)NúIllegal option z="ú")r   r    r   r   ÚOptionErrorr   r   s      r   Ú__call__zKeywordArg.__call__p   sp   € Ø�OŠO˜DÑ!Ô!ˆàˆ9Ø�4Ø�$”,ÐÐØŒ~Ð%Ø�s�
àœ¨Ð*Ð*åÔ$Ð$Ø,0¬L¨L¨L¸!¸!¸!Ð=ñ?ô ?ð ?r   ©NN©r   r   r	   r
   r   r%   r   r   r   r   r   X   sA   € € € € € ðð ð$ð ð ð ð
?ð ?ð ?ð ?ð ?r   r   c                   ó    — e Zd ZdZdd„Zd„ ZdS )Ú	StringArgz*An option taking a quoted string argument.Nc                 óL   — t                                | ||¦  «         || _        d S r   ©r   r   r   ©r   r   r   r   s       r   r   zStringArg.__init__‚   ó%   € Ý×Ò˜T 7¨GÑ4Ô4Ð4Ø"ˆŒˆˆr   c                 ó  — |                       |¦  «        }|€d S t          |¦  «        t          j        urt	          j        d| j        ›d�¦  «        ‚g }| j        �|                     | j        ¦  «         |                     d|z  ¦  «         |S )NzOption z must be a stringz"%s")	r   ÚtypeÚtypesÚ
StringTyper   r$   r   r   Úappend)r   r   r   Úretvals       r   r%   zStringArg.__call__†   s–   € Ø�OŠO˜DÑ!Ô!ˆàˆ9Ø�4Ý�!‰WŒW�EÔ,Ð,Ð,ÝÔ$Ð$Ø04´°°Ð>ñ@ô @ð @ð ˆFØŒ~Ð)Ø—’˜dœnÑ-Ô-Ð-Ø�MŠM˜& 1™*Ñ%Ô%Ð%ØˆMr   r&   r'   r   r   r   r)   r)      s=   € € € € € Ø4Ð4ð#ð #ð #ð #ðð ð ð ð r   r)   c                   ó    — e Zd ZdZdd„Zd„ ZdS )ÚBareStringArga¬  An arbitrary argument output without quotes.

    The argument can be a string or anything with a str()
    representation, or a tuple of such things.  Thus this can be used
    for strings (which will be output without quotation marks),
    integers, floating point arguments, or multiple arguments of the
    above types (which will be output separated by spaces).  No
    checking is done that the argument is sensible.

    Nc                 óL   — t                                | ||¦  «         || _        d S r   r+   r,   s       r   r   zBareStringArg.__init__¢   r-   r   c                 ó`  — |                       |¦  «        }|€d S g }| j        �|                     | j        ¦  «         t          |¦  «        t          j        t          j        fv r(|D ]$}|                     t          |¦  «        ¦  «         Œ%n"|                     t          |¦  «        ¦  «         |S r   )r   r   r2   r/   r0   Ú	TupleTypeÚListTypeÚstr)r   r   r   r3   Úis        r   r%   zBareStringArg.__call__¦   s¦   € Ø�OŠO˜DÑ!Ô!ˆàˆ9Ø�4àˆFØŒ~Ð)Ø—’˜dœnÑ-Ô-Ð-Ý�A‰wŒw�5œ?­E¬NÐ;Ð;Ð;Øð *ð *�AØ—M’M¥# a¡&¤&Ñ)Ô)Ð)Ð)ð*ð —’�c !™fœfÑ%Ô%Ð%ØˆMr   r&   r'   r   r   r   r5   r5   –   sA   € € € € € ð	ð 	ð#ð #ð #ð #ðð ð ð ð r   r5   c                   ó"   — e Zd ZdZ	 dd„Zd„ ZdS )Ú
BooleanArga+  An argument that takes a true/false value.

    The argument should be 0 or 1.  The option is output to gnuplot as
    'trueval' if the argument is true or 'falseval' if the argument is
    false.  Either one can be 'None', in which case nothing is output.
    'default' should also be 0 or 1.

    Nc                 óh   — t                                | ||¦  «         || _        || _        || _        d S r   )r   r   ÚtruevalÚfalsevalr   )r   r   r?   r@   r   r   s         r   r   zBooleanArg.__init__Á   s3   € å×Ò˜T 7¨GÑ4Ô4Ð4ØˆŒØ ˆŒØ"ˆŒˆˆr   c                 óÎ   — |                       |¦  «        }|€d S g }| j        �|                     | j        ¦  «         |r| j        }n| j        }|�|                     |¦  «         |S r   )r   r   r2   r?   r@   )r   r   r   r3   Úvals        r   r%   zBooleanArg.__call__È   sr   € Ø�OŠO˜DÑ!Ô!ˆØˆ9Ø�4àˆFØŒ~Ð)Ø—’˜dœnÑ-Ô-Ð-Øð $Ø”l��à”m�ØˆØ—’˜cÑ"Ô"Ð"ØˆMr   r&   r'   r   r   r   r=   r=   ·   sF   € € € € € ðð ð *.ð#ð #ð #ð #ðð ð ð ð r   r=   c                   ó   — e Zd ZdZd„ Zd„ ZdS )ÚMutuallyExclusiveArgsa^  A group of args, of which either zero or one may be set, but not more.

    Members:

        subargs -- a list [('argname', arg), ...] of Arg instances.
            'argname' is used to identify the corresponding arg in
            error messages.  (The name of the corresponding keyword
            args is determined internally by each arg.)

    c                 ó.   — t          |¦  «        | _        d S r   )ÚlistÚsubargs)r   rG   s     r   r   zMutuallyExclusiveArgs.__init__å   s   € Ý˜G‘}”}ˆŒˆˆr   c                 ó„   — d }d }| j         D ]3\  }} ||¦  «        }|�!|�t          j        d|›d|›d�¦  «        ‚|}|}Œ4|S )Nú
Arguments ú and ú cannot both be specified)rG   r   r$   )r   r   Úfoundargnamer3   r   ÚargÚcmds          r   r%   zMutuallyExclusiveArgs.__call__è   su   € ØˆØˆØ#œ|ð 
	!ð 
	!‰OˆW�cØ�#�d‘)”)ˆCØˆØÐ+Ý Ô,Ð,à'˜<˜<¨¨¨ð3ñô ð ð
 $+�LØ �FøØˆr   Nr'   r   r   r   rD   rD   Ù   s<   € € € € € ð	ð 	ð%ð %ð %ðð ð ð ð r   rD   c                   ó    — e Zd ZdZdd„Zd„ ZdS )ÚKeywordOrBooleanArga¢  Allow a keyword arg to be specified either as a keyword or a boolean.

    This arg type is the most flexible way to allow keyword parameters
    to be specified.  Say there is an option like 'fontsize' that can
    take the values 'small' or 'large'.  This could be represented as

        'KeywordOrBooleanArg(options=["small", "large"], argname="fontsize")'

    In that case, the fontsize could be specified in any of the
    following ways:

        'g.hardcopy(..., fontsize="small", ...)'
        'g.hardcopy(..., fontsize="large", ...)'
        'g.hardcopy(..., small=1, ...)'
        'g.hardcopy(..., large=1, ...)'

    If 'argname' is set to be 'None', then the first two possibilities
    are omitted.

    In the special case that there are exactly two alternatives, one
    can also use:

        'g.hardcopy(..., small=0, ...) # implies fontsize="large"'
        'g.hardcopy(..., large=0, ...) # implies fontsize="small"'

    Obviously care must be taken to ensure that none of the implied
    keyword parameter names conflict with one another or with any of
    the other Args allowed by a function.

    Members:

        'options' -- a list of strings representing allowed keyword
            values.  These options can be used as boolean values in
            the style 'option=1'.

        'argname' -- the name of the argname for the 'arg=value' style
            of setting the argument.  If 'None', then this style is
            not allowed.

        'fixedword' -- a fixed keyword that must precede the option,
            or 'None'.

        'default' -- the default option to set if nothing is set
            explicitly, or None to leave nothing set in that case.

    Nc                 ó€   — || _         || _        || _        || _        | j        �| j        | j         v sJ d¦   «         ‚d S d S )Nzdefault must be a valid option)r    r   r   r   )r   r    r   r   r   s        r   r   zKeywordOrBooleanArg.__init__)  sR   € ØˆŒØˆŒØ"ˆŒØˆŒØŒ|Ð# t¤|°t´|Ð'CÐ'CÐ'CØ/ñ (DÔ'CÐ'CÐ#Ð#Ð'CÐ'Cr   c                 óº  — | j         �{| j         |v rr|| j                  }|| j         = |€nZ|| j        v r2||v r(||         s t          j        d| j         ›d|›d�¦  «        ‚d||<   nt          j        d| j         ›d|›�¦  «        ‚d }t	          t          | j        ¦  «        ¦  «        D ]j}| j        |         }||v rW||         }||= |r |�t          j        d|›d|›d�¦  «        ‚|}Œ@t          | j        ¦  «        dk    r| j        d|z
           }Œi	 Œk|€| j        €d S | j        }g }| j        �|                     | j        ¦  «         |                     |¦  «         |S )	NrI   rJ   z are contradictoryé   r"   ú=rK   é   )	r   r    r   r$   ÚrangeÚlenr   r   r2   )r   r   r   Úoptionr;   Únewvalr3   s          r   r%   zKeywordOrBooleanArg.__call__1  sÁ  € ØŒ<Ð#¨¬¸Ð(<Ð(<Ø�T”\Ô"ˆAØ�T”\Ð"ØˆyØØ�d”lÐ"Ð"à˜�9�9 T¨!¤W�9Ý Ô,Ð,àœ<˜<˜<¨¨¨ð-ñô ð ð  �D˜‘G�GåÔ(Ð(Ø.2¬l¨l¨l¸A¸AÐ?ñAô Að Að ˆÝ•s˜4œ<Ñ(Ô(Ñ)Ô)ð 	ð 	ˆAØ”˜Q”ˆAØ�DˆyˆyØ˜aœ�Ø˜�GØð ØÐ)Ý$Ô0Ð0à%˜v˜v q q qð+ñô ð ð
 "#˜˜õ ˜4œ<Ñ(Ô(¨AÒ-Ð-Ø!%¤¨a°!©eÔ!4˜˜àøàˆ>ØŒ|Ð#Ø�tàœ�ØˆØŒ>Ð%Ø�MŠM˜$œ.Ñ)Ô)Ð)Ø�Š�fÑÔÐØˆr   )NNNr'   r   r   r   rP   rP   ù   sB   € € € € € ð-ð -ð^0ð 0ð 0ð 0ð4ð 4ð 4ð 4ð 4r   rP   )Ú	landscapeÚportraitÚepsr   Úmode)r    r   ÚenhancedÚ
noenhanced)r    r   ÚcolorÚ
monochrome)r    ÚsolidÚdashed)ÚdefaultplexÚsimplexÚduplexÚ	duplexingÚfontname)r   ÚfontsizeÚ
postscriptÚpdf)ÚsmallÚmediumÚlarge)ra   Úgrayr`   Úpngrl   ÚbigÚ	pointsmax)r   r   rZ   r[   ÚmetricÚinchesÚsizeÚ	thicknessÚdepthÚfig)rZ   r[   r   ÚrotateÚnorotateÚwidthÚ	linewidthÚfontÚcgmÚdashesÚnodashesÚheightÚpict)r`   Úcolourra   )ÚnotexÚtexÚlatexÚmagnification)Úpsnfsszpsnfss-version7ÚnopsnfssÚ	prologuesÚa4paperÚamstexÚmpÚfixedÚdynamicÚfnameÚfsizeÚfontfileÚsvg)r
   r0   ÚGnuplotr   r   r   r   r   r)   r5   r=   rD   rP   Úterminal_optsÚGnuplotOptsÚprefer_enhanced_postscriptr   r   r   ú<module>r˜      s¯  ððð ð, €€€à Ð Ð Ð Ð Ð Ð Ð ð	ð 	ð 	ð 	ð 	ñ 	ô 	ð 	ð"!ð !ð !ð !ð !�#ñ !ô !ð !ðH$?ð $?ð $?ð $?ð $?�ñ $?ô $?ð $?ðNð ð ð ð �ñ ô ð ð.ð ð ð ð �Kñ ô ð ðBð ð ð ð �ñ ô ð ðDð ð ð ð ˜Cñ ô ð ð@lð lð lð lð l˜#ñ lô lð lðf €ð ÐØ;Ð;Ð;Øð
ñ 
ô 
ð ÐØ˜\Ð*ð ”Ô:ð  Øð!à ð
ñ 
ô 
ð Ð ¨,Ð 7Ð8Ñ8Ô8ØÐ ¨(Ð 3Ð4Ñ4Ô4ØÐØ4Ð4Ð4Øð
ñ 
ô 
ð €I�jÐ!Ñ!Ô!Ø€M˜*Ð%Ñ%Ô%ð)€ˆlÑ ð0 ÐØ;Ð;Ð;Øð
ñ 
ô 
ð Ð ¨,Ð 7Ð8Ñ8Ô8ØÐ ¨(Ð 3Ð4Ñ4Ô4ØÐØ4Ð4Ð4Øð
ñ 
ô 
ð €I�jÐ!Ñ!Ô!Ø€M˜*Ð%Ñ%Ô%ð€ˆeÑ ð  ÐØ,Ð,Ð,Øð
ñ 
ô 
ð ÐÐ ?Ð ?Ð ?Ð@Ñ@Ô@ð€ˆeÑ ð Ð ¨wÐ 7Ð8Ñ8Ô8ØÐ ¨%Ð 0Ð1Ñ1Ô1Ø€M˜+°Ð=Ñ=Ô=ØÐ ¨jÐ 9Ð:Ñ:Ô:ØÐ ¨8Ð 4Ð5Ñ5Ô5Ø€M˜*Ð%Ñ%Ô%Ø€M˜&Ð!Ñ!Ô!Ø€M˜+Ð&Ñ&Ô&Ø€M˜'Ð"Ñ"Ô"ð
€ˆeÑ ð ÐØ4Ð4Ð4Øð
ñ 
ô 
ð Ð ¨,Ð 7Ð8Ñ8Ô8ØÐ ¨:Ð 6Ð7Ñ7Ô7Ø€M˜'¨WÐ5Ñ5Ô5Ø€M˜+°Ð=Ñ=Ô=Ø€I�fÐÑÔØ€M˜*Ð%Ñ%Ô%ð€ˆeÑ ð ÐØ4Ð4Ð4Øð
ñ 
ô 
ð Ð ¨,Ð 7Ð8Ñ8Ô8ØÐ ¨:Ð 6Ð7Ñ7Ô7ð €I�jÐ!Ñ!Ô!ð €M˜*Ð%Ñ%Ô%ð €M˜'Ð"Ñ"Ô"ð €M˜(Ð#Ñ#Ô#ð%€ˆfÑ ð. ÐÐ AÐ AÐ AÐBÑBÔBØÐ ¨(Ð 3Ð4Ñ4Ô4ØÐÐ 9Ð 9Ð 9Ð:Ñ:Ô:Ø€M˜/Ð*Ñ*Ô*ØÐÐ IÐ IÐ IÐJÑJÔJØ€M˜+Ð&Ñ&Ô&ØÐ  Ð,Ñ,Ô,ØÐ  
Ð+Ñ+Ô+Ø€I�jÐ!Ñ!Ô!Ø€M˜*Ð%Ñ%Ô%ð€ˆdÑ ð €M˜&¨FÐ3Ñ3Ô3ØÐ ¨)Ð 4Ð5Ñ5Ô5Ø€I�g¨Ð1Ñ1Ô1Ø€M˜'¨WÐ5Ñ5Ô5ØÐ ¨\Ð :Ð;Ñ;Ô;Ø€I�j¨JÐ7Ñ7Ô7ð€ˆeÑ Ð Ð r   