OwlCyberSecurity - MANAGER
Edit File: _secondary_axes.cpython-38.pyc
U ��]r= � @ s� d dl Z d dlZd dlZd dlZd dlmZ d dlmZ d dl mZ d dl mZ d dlmZ d dlmZ d dlmZmZmZmZmZmZmZmZmZ d dl mZ dd� ZG dd� de�Zd Z ej!j"e d � dS )� N)� _AxesBase) �AutoLocator�AutoMinorLocator�FixedLocator� FuncFormatter�LogFormatterSciNotation� LogLocator�NullLocator� NullFormatter�ScalarFormatter)�Log10Transformc s t jj| � � � �fdd�}|S )a Helper function to locate the secondary axes. A locator gets used in `Axes.set_aspect` to override the default locations... It is a function that takes an axes object and a renderer and tells `set_aspect` where it is to be placed. This locator make the transform be in axes-relative co-coordinates because that is how we specify the "location" of the secondary axes. Here *rect* is a rectangle [l, b, w, h] that specifies the location for the axes in the transform given by *trans* on the *parent*. c s* t �� �j�}�jj�� }t �||�}|S �N)�mtransformsZTransformedBboxZ transAxes�figureZtransFigure�inverted)Zax�renderer�bbZtr�Z_rect�parent� �A/usr/lib/python3/dist-packages/matplotlib/axes/_secondary_axes.py�secondary_locator. s z2_make_secondary_locator.<locals>.secondary_locator)r �BboxZfrom_bounds)Zrectr r r r r �_make_secondary_locator s r c s� e Zd ZdZ� fdd�Zdd� Zdd� Zd!� fd d � Zd"dd �Zdd� Z d#� fdd� Z dd� Zdd� Zd$dd�Z dd� Zd%dd�Zd&dd�Zdd � Z� ZS )'� SecondaryAxisz4 General class to hold a Secondary_X/Yaxis. c s^ || _ || _|| _d| _| jdkr^t� j| jjddddgf|� | j| _ddg| _ d d g| _ nD| jdkr�t� j| jjddddgf|� | j| _d d g| _ ddg| _ d| _d| _ | �|� | �|� | jdkr�| j}n| j}|�t�� � |�d � | j D ]}| j| �d� q�| j D ]}| j| �d� �q| jdk �rJ| j ddd� | _ | �| j d � dS )z� See `.secondary_xaxis` and `.secondary_yaxis` for the doc string. While there is no need for this to be private, it should really be called by those higher level functions. F�xr � �?� g-C��6?�top�bottom�left�right�yNZnoneTg �?���)� _functions�_parent�_orientation� _ticks_set�super�__init__r �xaxis�_axis�_locstringsZ _otherstrings�yaxisZ _layoutboxZ _poslayoutbox�set_location� set_functions�set_major_locator�mtickerr �set_ticks_position�spines�set_visible�_pos� set_alignment)�selfr Zorientation�location� functions�kwargsZ otheraxis�st�� __class__r r r) >