{"cells":[{"metadata":{"trusted":false},"cell_type":"markdown","source":"# TP 6 Circuit RC \n\n### Determination de la capacité d'un condensateur\n\n###### Principe\n\n$$ \\tau = R*C = 10^{-4} s $$\n\n###### Mesure experimentale\n\nL'oscilloscope sert a afficher et mesurer des tensions en fonction du temps\nUn signal analogique est continue et un signal numérique est discret (echantilloné)\n"},{"metadata":{"trusted":true},"cell_type":"code","source":"import numpy as np\nimport numpy.random as rd\nimport matplotlib.pyplot as plt","execution_count":8,"outputs":[]},{"metadata":{"trusted":true},"cell_type":"code","source":"def incert(mesure, precision, digits, resolution):\n    return (mesure*precision/100 + digits*resolution)/np.sqrt(3)\n\nC = 10.28*10**-9 #Farad \nu_C = incert(C, 3, 3, 0.01)\n\nR = 9.99*10**3 # Ohm\nu_R = incert(R, 2, 3, 0.01)\n\ntau = 0.104*10**-3\nDelta_tau = 0.001*10**-3\n\nN = 100000\n\nR_sim = rd.uniform(R - np.sqrt(3) * u_R, R + np.sqrt(3) * u_R, N)\ntau_sim = rd.uniform(tau - Delta_tau, tau + Delta_tau, N)\nC_sim = tau_sim / R_sim\n\nC_exp = np.mean(C_sim)\nu_C_exp = np.std(C_sim, ddof=1)\nprint(f\"C_exp = {C_exp*1e9:.3f} nF   u(C_exp) = {u_C_exp*1e9:.3f} nF   ({100*u_C_exp/C_exp:.2f} %)\")\n\nprint(f\"Ecart normalisé : {(abs(C_exp-C)/np.sqrt(u_C**2 + u_C_exp**2)):.2}\")","execution_count":29,"outputs":[{"output_type":"stream","text":"C_exp = 10.412 nF   u(C_exp) = 0.134 nF   (1.28 %)\nEcart normalisé : 7.6e-09\n","name":"stdout"}]},{"metadata":{},"cell_type":"markdown","source":"L'écart normalisé est faible donc les mesures sont cohérentes\nτ est lié proportionellement à R et C"},{"metadata":{},"cell_type":"markdown","source":"###### Exploitation informatique\n**Acquisition**"},{"metadata":{"trusted":true},"cell_type":"code","source":"import numpy as np\nt=np.load('data-t.npy')\nUc=np.load('data-Uc.npy')","execution_count":30,"outputs":[]},{"metadata":{},"cell_type":"markdown","source":"**Exploitation par regression linéaire**\n\nOn a $$ U_c = 10*e^{-\\frac{t}{\\tau}} $$\nDonc \n$$ ln(U_c) = ln(10) - t* \\frac{1}{\\tau}$$\n"},{"metadata":{"trusted":true},"cell_type":"code","source":"plt.close()\nplt.plot(t[:100], np.log(Uc[:100]), \"r+\")\nplt.show()","execution_count":45,"outputs":[{"output_type":"display_data","data":{"text/json-kernel-iframe":"{\"key\":\"4bce8a3c22a3c0f6c92b3aeb0ddabefe\",\"html\":\"<!doctype html><head><meta charset=utf-8><style>/* General styling */\\n.ui-helper-clearfix:before,\\n.ui-helper-clearfix:after {\\n  content: \\\"\\\";\\n  display: table;\\n  border-collapse: collapse;\\n}\\n.ui-helper-clearfix:after {\\n  clear: both;\\n}\\n\\n/* Header */\\n.ui-widget-header {\\n  border: 1px solid #dddddd;\\n  border-top-left-radius: 6px;\\n  border-top-right-radius: 6px;\\n  background: #e9e9e9;\\n  color: #333333;\\n  font-weight: bold;\\n}\\n\\n/* Toolbar and items */\\n.mpl-toolbar {\\n  width: 100%;\\n}\\n\\n.mpl-toolbar div.mpl-button-group {\\n  display: inline-block;\\n}\\n\\n.mpl-button-group + .mpl-button-group {\\n  margin-left: 0.5em;\\n}\\n\\n.mpl-widget {\\n  background-color: #fff;\\n  border: 1px solid #ccc;\\n  display: inline-block;\\n  cursor: pointer;\\n  color: #333;\\n  padding: 6px;\\n  vertical-align: middle;\\n}\\n\\n.mpl-widget:disabled,\\n.mpl-widget[disabled] {\\n  background-color: #ddd;\\n  border-color: #ddd !important;\\n  cursor: not-allowed;\\n}\\n\\n.mpl-widget:disabled img,\\n.mpl-widget[disabled] img {\\n  /* Convert black to grey */\\n  filter: contrast(0%);\\n}\\n\\n.mpl-widget.active img {\\n  /* Convert black to tab:blue, approximately */\\n  filter: invert(34%) sepia(97%) saturate(468%) hue-rotate(162deg) brightness(96%) contrast(91%);\\n}\\n\\nbutton.mpl-widget:focus,\\nbutton.mpl-widget:hover {\\n  background-color: #ddd;\\n  border-color: #aaa;\\n}\\n\\n.mpl-button-group button.mpl-widget {\\n  margin-left: -1px;\\n}\\n.mpl-button-group button.mpl-widget:first-child {\\n  border-top-left-radius: 6px;\\n  border-bottom-left-radius: 6px;\\n  margin-left: 0px;\\n}\\n.mpl-button-group button.mpl-widget:last-child {\\n  border-top-right-radius: 6px;\\n  border-bottom-right-radius: 6px;\\n}\\n\\nselect.mpl-widget {\\n  cursor: default;\\n}\\n</style><script>/* Put everything inside the global mpl namespace */\\n/* global mpl */\\nwindow.mpl = {};\\n\\nmpl.get_websocket_type = function () {\\n    if (typeof WebSocket !== 'undefined') {\\n        return WebSocket;\\n    } else if (typeof MozWebSocket !== 'undefined') {\\n        return MozWebSocket;\\n    } else {\\n        alert(\\n            'Your browser does not have WebSocket support. ' +\\n                'Please try Chrome, Safari or Firefox ≥ 6. ' +\\n                'Firefox 4 and 5 are also supported but you ' +\\n                'have to enable WebSockets in about:config.'\\n        );\\n    }\\n};\\n\\nmpl.figure = function (figure_id, websocket, ondownload, parent_element) {\\n    this.id = figure_id;\\n\\n    this.ws = websocket;\\n\\n    this.supports_binary = this.ws.binaryType !== undefined;\\n\\n    if (!this.supports_binary) {\\n        var warnings = document.getElementById('mpl-warnings');\\n        if (warnings) {\\n            warnings.style.display = 'block';\\n            warnings.textContent =\\n                'This browser does not support binary websocket messages. ' +\\n                'Performance may be slow.';\\n        }\\n    }\\n\\n    this.imageObj = new Image();\\n\\n    this.context = undefined;\\n    this.message = undefined;\\n    this.canvas = undefined;\\n    this.rubberband_canvas = undefined;\\n    this.rubberband_context = undefined;\\n    this.format_dropdown = undefined;\\n\\n    this.image_mode = 'full';\\n\\n    this.root = document.createElement('div');\\n    this.root.setAttribute('style', 'display: inline-block');\\n    this._root_extra_style(this.root);\\n\\n    parent_element.appendChild(this.root);\\n\\n    this._init_header(this);\\n    this._init_canvas(this);\\n    this._init_toolbar(this);\\n\\n    var fig = this;\\n\\n    this.waiting = false;\\n\\n    this.ws.onopen = function () {\\n        fig.send_message('supports_binary', { value: fig.supports_binary });\\n        fig.send_message('send_image_mode', {});\\n        if (fig.ratio !== 1) {\\n            fig.send_message('set_device_pixel_ratio', {\\n                device_pixel_ratio: fig.ratio,\\n            });\\n        }\\n        fig.send_message('refresh', {});\\n    };\\n\\n    this.imageObj.onload = function () {\\n        if (fig.image_mode === 'full') {\\n            // Full images could contain transparency (where diff images\\n            // almost always do), so we need to clear the canvas so that\\n            // there is no ghosting.\\n            fig.context.clearRect(0, 0, fig.canvas.width, fig.canvas.height);\\n        }\\n        fig.context.drawImage(fig.imageObj, 0, 0);\\n    };\\n\\n    this.imageObj.onunload = function () {\\n        fig.ws.close();\\n    };\\n\\n    this.ws.onmessage = this._make_on_message_function(this);\\n\\n    this.ondownload = ondownload;\\n};\\n\\nmpl.figure.prototype._init_header = function () {\\n    var titlebar = document.createElement('div');\\n    titlebar.classList =\\n        'ui-dialog-titlebar ui-widget-header ui-corner-all ui-helper-clearfix';\\n    var titletext = document.createElement('div');\\n    titletext.classList = 'ui-dialog-title';\\n    titletext.setAttribute(\\n        'style',\\n        'width: 100%; text-align: center; padding: 3px;'\\n    );\\n    titlebar.appendChild(titletext);\\n    this.root.appendChild(titlebar);\\n    this.header = titletext;\\n};\\n\\nmpl.figure.prototype._canvas_extra_style = function (_canvas_div) {};\\n\\nmpl.figure.prototype._root_extra_style = function (_canvas_div) {};\\n\\nmpl.figure.prototype._init_canvas = function () {\\n    var fig = this;\\n\\n    var canvas_div = (this.canvas_div = document.createElement('div'));\\n    canvas_div.setAttribute(\\n        'style',\\n        'border: 1px solid #ddd;' +\\n            'box-sizing: content-box;' +\\n            'clear: both;' +\\n            'min-height: 1px;' +\\n            'min-width: 1px;' +\\n            'outline: 0;' +\\n            'overflow: hidden;' +\\n            'position: relative;' +\\n            'resize: both;'\\n    );\\n\\n    function on_keyboard_event_closure(name) {\\n        return function (event) {\\n            return fig.key_event(event, name);\\n        };\\n    }\\n\\n    canvas_div.addEventListener(\\n        'keydown',\\n        on_keyboard_event_closure('key_press')\\n    );\\n    canvas_div.addEventListener(\\n        'keyup',\\n        on_keyboard_event_closure('key_release')\\n    );\\n\\n    this._canvas_extra_style(canvas_div);\\n    this.root.appendChild(canvas_div);\\n\\n    var canvas = (this.canvas = document.createElement('canvas'));\\n    canvas.classList.add('mpl-canvas');\\n    canvas.setAttribute('style', 'box-sizing: content-box;');\\n\\n    this.context = canvas.getContext('2d');\\n\\n    var backingStore =\\n        this.context.backingStorePixelRatio ||\\n        this.context.webkitBackingStorePixelRatio ||\\n        this.context.mozBackingStorePixelRatio ||\\n        this.context.msBackingStorePixelRatio ||\\n        this.context.oBackingStorePixelRatio ||\\n        this.context.backingStorePixelRatio ||\\n        1;\\n\\n    this.ratio = (window.devicePixelRatio || 1) / backingStore;\\n\\n    var rubberband_canvas = (this.rubberband_canvas = document.createElement(\\n        'canvas'\\n    ));\\n    rubberband_canvas.setAttribute(\\n        'style',\\n        'box-sizing: content-box; position: absolute; left: 0; top: 0; z-index: 1;'\\n    );\\n\\n    // Apply a ponyfill if ResizeObserver is not implemented by browser.\\n    if (this.ResizeObserver === undefined) {\\n        if (window.ResizeObserver !== undefined) {\\n            this.ResizeObserver = window.ResizeObserver;\\n        } else {\\n            var obs = _JSXTOOLS_RESIZE_OBSERVER({});\\n            this.ResizeObserver = obs.ResizeObserver;\\n        }\\n    }\\n\\n    this.resizeObserverInstance = new this.ResizeObserver(function (entries) {\\n        var nentries = entries.length;\\n        for (var i = 0; i < nentries; i++) {\\n            var entry = entries[i];\\n            var width, height;\\n            if (entry.contentBoxSize) {\\n                if (entry.contentBoxSize instanceof Array) {\\n                    // Chrome 84 implements new version of spec.\\n                    width = entry.contentBoxSize[0].inlineSize;\\n                    height = entry.contentBoxSize[0].blockSize;\\n                } else {\\n                    // Firefox implements old version of spec.\\n                    width = entry.contentBoxSize.inlineSize;\\n                    height = entry.contentBoxSize.blockSize;\\n                }\\n            } else {\\n                // Chrome <84 implements even older version of spec.\\n                width = entry.contentRect.width;\\n                height = entry.contentRect.height;\\n            }\\n\\n            // Keep the size of the canvas and rubber band canvas in sync with\\n            // the canvas container.\\n            if (entry.devicePixelContentBoxSize) {\\n                // Chrome 84 implements new version of spec.\\n                canvas.setAttribute(\\n                    'width',\\n                    entry.devicePixelContentBoxSize[0].inlineSize\\n                );\\n                canvas.setAttribute(\\n                    'height',\\n                    entry.devicePixelContentBoxSize[0].blockSize\\n                );\\n            } else {\\n                canvas.setAttribute('width', width * fig.ratio);\\n                canvas.setAttribute('height', height * fig.ratio);\\n            }\\n            canvas.setAttribute(\\n                'style',\\n                'width: ' + width + 'px; height: ' + height + 'px;'\\n            );\\n\\n            rubberband_canvas.setAttribute('width', width);\\n            rubberband_canvas.setAttribute('height', height);\\n\\n            // And update the size in Python. We ignore the initial 0/0 size\\n            // that occurs as the element is placed into the DOM, which should\\n            // otherwise not happen due to the minimum size styling.\\n            if (fig.ws.readyState == 1 && width != 0 && height != 0) {\\n                fig.request_resize(width, height);\\n            }\\n        }\\n    });\\n    this.resizeObserverInstance.observe(canvas_div);\\n\\n    function on_mouse_event_closure(name) {\\n        return function (event) {\\n            return fig.mouse_event(event, name);\\n        };\\n    }\\n\\n    rubberband_canvas.addEventListener(\\n        'mousedown',\\n        on_mouse_event_closure('button_press')\\n    );\\n    rubberband_canvas.addEventListener(\\n        'mouseup',\\n        on_mouse_event_closure('button_release')\\n    );\\n    rubberband_canvas.addEventListener(\\n        'dblclick',\\n        on_mouse_event_closure('dblclick')\\n    );\\n    // Throttle sequential mouse events to 1 every 20ms.\\n    rubberband_canvas.addEventListener(\\n        'mousemove',\\n        on_mouse_event_closure('motion_notify')\\n    );\\n\\n    rubberband_canvas.addEventListener(\\n        'mouseenter',\\n        on_mouse_event_closure('figure_enter')\\n    );\\n    rubberband_canvas.addEventListener(\\n        'mouseleave',\\n        on_mouse_event_closure('figure_leave')\\n    );\\n\\n    canvas_div.addEventListener('wheel', function (event) {\\n        if (event.deltaY < 0) {\\n            event.step = 1;\\n        } else {\\n            event.step = -1;\\n        }\\n        on_mouse_event_closure('scroll')(event);\\n    });\\n\\n    canvas_div.appendChild(canvas);\\n    canvas_div.appendChild(rubberband_canvas);\\n\\n    this.rubberband_context = rubberband_canvas.getContext('2d');\\n    this.rubberband_context.strokeStyle = '#000000';\\n\\n    this._resize_canvas = function (width, height, forward) {\\n        if (forward) {\\n            canvas_div.style.width = width + 'px';\\n            canvas_div.style.height = height + 'px';\\n        }\\n    };\\n\\n    // Disable right mouse context menu.\\n    this.rubberband_canvas.addEventListener('contextmenu', function (_e) {\\n        event.preventDefault();\\n        return false;\\n    });\\n\\n    function set_focus() {\\n        canvas.focus();\\n        canvas_div.focus();\\n    }\\n\\n    window.setTimeout(set_focus, 100);\\n};\\n\\nmpl.figure.prototype._init_toolbar = function () {\\n    var fig = this;\\n\\n    var toolbar = document.createElement('div');\\n    toolbar.classList = 'mpl-toolbar';\\n    this.root.appendChild(toolbar);\\n\\n    function on_click_closure(name) {\\n        return function (_event) {\\n            return fig.toolbar_button_onclick(name);\\n        };\\n    }\\n\\n    function on_mouseover_closure(tooltip) {\\n        return function (event) {\\n            if (!event.currentTarget.disabled) {\\n                return fig.toolbar_button_onmouseover(tooltip);\\n            }\\n        };\\n    }\\n\\n    fig.buttons = {};\\n    var buttonGroup = document.createElement('div');\\n    buttonGroup.classList = 'mpl-button-group';\\n    for (var toolbar_ind in mpl.toolbar_items) {\\n        var name = mpl.toolbar_items[toolbar_ind][0];\\n        var tooltip = mpl.toolbar_items[toolbar_ind][1];\\n        var image = mpl.toolbar_items[toolbar_ind][2];\\n        var method_name = mpl.toolbar_items[toolbar_ind][3];\\n\\n        if (!name) {\\n            /* Instead of a spacer, we start a new button group. */\\n            if (buttonGroup.hasChildNodes()) {\\n                toolbar.appendChild(buttonGroup);\\n            }\\n            buttonGroup = document.createElement('div');\\n            buttonGroup.classList = 'mpl-button-group';\\n            continue;\\n        }\\n\\n        var button = (fig.buttons[name] = document.createElement('button'));\\n        button.classList = 'mpl-widget';\\n        button.setAttribute('role', 'button');\\n        button.setAttribute('aria-disabled', 'false');\\n        button.addEventListener('click', on_click_closure(method_name));\\n        button.addEventListener('mouseover', on_mouseover_closure(tooltip));\\n\\n        var icon_img = document.createElement('img');\\n        icon_img.src = '_images/' + image + '.png';\\n        icon_img.srcset = '_images/' + image + '_large.png 2x';\\n        icon_img.alt = tooltip;\\n        button.appendChild(icon_img);\\n\\n        buttonGroup.appendChild(button);\\n    }\\n\\n    if (buttonGroup.hasChildNodes()) {\\n        toolbar.appendChild(buttonGroup);\\n    }\\n\\n    var fmt_picker = document.createElement('select');\\n    fmt_picker.classList = 'mpl-widget';\\n    toolbar.appendChild(fmt_picker);\\n    this.format_dropdown = fmt_picker;\\n\\n    for (var ind in mpl.extensions) {\\n        var fmt = mpl.extensions[ind];\\n        var option = document.createElement('option');\\n        option.selected = fmt === mpl.default_extension;\\n        option.innerHTML = fmt;\\n        fmt_picker.appendChild(option);\\n    }\\n\\n    var status_bar = document.createElement('span');\\n    status_bar.classList = 'mpl-message';\\n    toolbar.appendChild(status_bar);\\n    this.message = status_bar;\\n};\\n\\nmpl.figure.prototype.request_resize = function (x_pixels, y_pixels) {\\n    // Request matplotlib to resize the figure. Matplotlib will then trigger a resize in the client,\\n    // which will in turn request a refresh of the image.\\n    this.send_message('resize', { width: x_pixels, height: y_pixels });\\n};\\n\\nmpl.figure.prototype.send_message = function (type, properties) {\\n    properties['type'] = type;\\n    properties['figure_id'] = this.id;\\n    this.ws.send(JSON.stringify(properties));\\n};\\n\\nmpl.figure.prototype.send_draw_message = function () {\\n    if (!this.waiting) {\\n        this.waiting = true;\\n        this.ws.send(JSON.stringify({ type: 'draw', figure_id: this.id }));\\n    }\\n};\\n\\nmpl.figure.prototype.handle_save = function (fig, _msg) {\\n    var format_dropdown = fig.format_dropdown;\\n    var format = format_dropdown.options[format_dropdown.selectedIndex].value;\\n    fig.ondownload(fig, format);\\n};\\n\\nmpl.figure.prototype.handle_resize = function (fig, msg) {\\n    var size = msg['size'];\\n    if (size[0] !== fig.canvas.width || size[1] !== fig.canvas.height) {\\n        fig._resize_canvas(size[0], size[1], msg['forward']);\\n        fig.send_message('refresh', {});\\n    }\\n};\\n\\nmpl.figure.prototype.handle_rubberband = function (fig, msg) {\\n    var x0 = msg['x0'] / fig.ratio;\\n    var y0 = (fig.canvas.height - msg['y0']) / fig.ratio;\\n    var x1 = msg['x1'] / fig.ratio;\\n    var y1 = (fig.canvas.height - msg['y1']) / fig.ratio;\\n    x0 = Math.floor(x0) + 0.5;\\n    y0 = Math.floor(y0) + 0.5;\\n    x1 = Math.floor(x1) + 0.5;\\n    y1 = Math.floor(y1) + 0.5;\\n    var min_x = Math.min(x0, x1);\\n    var min_y = Math.min(y0, y1);\\n    var width = Math.abs(x1 - x0);\\n    var height = Math.abs(y1 - y0);\\n\\n    fig.rubberband_context.clearRect(\\n        0,\\n        0,\\n        fig.canvas.width / fig.ratio,\\n        fig.canvas.height / fig.ratio\\n    );\\n\\n    fig.rubberband_context.strokeRect(min_x, min_y, width, height);\\n};\\n\\nmpl.figure.prototype.handle_figure_label = function (fig, msg) {\\n    // Updates the figure title.\\n    fig.header.textContent = msg['label'];\\n};\\n\\nmpl.figure.prototype.handle_cursor = function (fig, msg) {\\n    fig.rubberband_canvas.style.cursor = msg['cursor'];\\n};\\n\\nmpl.figure.prototype.handle_message = function (fig, msg) {\\n    fig.message.textContent = msg['message'];\\n};\\n\\nmpl.figure.prototype.handle_draw = function (fig, _msg) {\\n    // Request the server to send over a new figure.\\n    fig.send_draw_message();\\n};\\n\\nmpl.figure.prototype.handle_image_mode = function (fig, msg) {\\n    fig.image_mode = msg['mode'];\\n};\\n\\nmpl.figure.prototype.handle_history_buttons = function (fig, msg) {\\n    for (var key in msg) {\\n        if (!(key in fig.buttons)) {\\n            continue;\\n        }\\n        fig.buttons[key].disabled = !msg[key];\\n        fig.buttons[key].setAttribute('aria-disabled', !msg[key]);\\n    }\\n};\\n\\nmpl.figure.prototype.handle_navigate_mode = function (fig, msg) {\\n    if (msg['mode'] === 'PAN') {\\n        fig.buttons['Pan'].classList.add('active');\\n        fig.buttons['Zoom'].classList.remove('active');\\n    } else if (msg['mode'] === 'ZOOM') {\\n        fig.buttons['Pan'].classList.remove('active');\\n        fig.buttons['Zoom'].classList.add('active');\\n    } else {\\n        fig.buttons['Pan'].classList.remove('active');\\n        fig.buttons['Zoom'].classList.remove('active');\\n    }\\n};\\n\\nmpl.figure.prototype.updated_canvas_event = function () {\\n    // Called whenever the canvas gets updated.\\n    this.send_message('ack', {});\\n};\\n\\n// A function to construct a web socket function for onmessage handling.\\n// Called in the figure constructor.\\nmpl.figure.prototype._make_on_message_function = function (fig) {\\n    return function socket_on_message(evt) {\\n        if (evt.data instanceof Blob) {\\n            var img = evt.data;\\n            if (img.type !== 'image/png') {\\n                /* FIXME: We get \\\"Resource interpreted as Image but\\n                 * transferred with MIME type text/plain:\\\" errors on\\n                 * Chrome.  But how to set the MIME type?  It doesn't seem\\n                 * to be part of the websocket stream */\\n                img.type = 'image/png';\\n            }\\n\\n            /* Free the memory for the previous frames */\\n            if (fig.imageObj.src) {\\n                (window.URL || window.webkitURL).revokeObjectURL(\\n                    fig.imageObj.src\\n                );\\n            }\\n\\n            fig.imageObj.src = (window.URL || window.webkitURL).createObjectURL(\\n                img\\n            );\\n            fig.updated_canvas_event();\\n            fig.waiting = false;\\n            return;\\n        } else if (\\n            typeof evt.data === 'string' &&\\n            evt.data.slice(0, 21) === 'data:image/png;base64'\\n        ) {\\n            fig.imageObj.src = evt.data;\\n            fig.updated_canvas_event();\\n            fig.waiting = false;\\n            return;\\n        }\\n\\n        var msg = JSON.parse(evt.data);\\n        var msg_type = msg['type'];\\n\\n        // Call the  \\\"handle_{type}\\\" callback, which takes\\n        // the figure and JSON message as its only arguments.\\n        try {\\n            var callback = fig['handle_' + msg_type];\\n        } catch (e) {\\n            console.log(\\n                \\\"No handler for the '\\\" + msg_type + \\\"' message type: \\\",\\n                msg\\n            );\\n            return;\\n        }\\n\\n        if (callback) {\\n            try {\\n                // console.log(\\\"Handling '\\\" + msg_type + \\\"' message: \\\", msg);\\n                callback(fig, msg);\\n            } catch (e) {\\n                console.log(\\n                    \\\"Exception inside the 'handler_\\\" + msg_type + \\\"' callback:\\\",\\n                    e,\\n                    e.stack,\\n                    msg\\n                );\\n            }\\n        }\\n    };\\n};\\n\\n// from https://stackoverflow.com/questions/1114465/getting-mouse-location-in-canvas\\nmpl.findpos = function (e) {\\n    //this section is from http://www.quirksmode.org/js/events_properties.html\\n    var targ;\\n    if (!e) {\\n        e = window.event;\\n    }\\n    if (e.target) {\\n        targ = e.target;\\n    } else if (e.srcElement) {\\n        targ = e.srcElement;\\n    }\\n    if (targ.nodeType === 3) {\\n        // defeat Safari bug\\n        targ = targ.parentNode;\\n    }\\n\\n    // pageX,Y are the mouse positions relative to the document\\n    var boundingRect = targ.getBoundingClientRect();\\n    var x = e.pageX - (boundingRect.left + document.body.scrollLeft);\\n    var y = e.pageY - (boundingRect.top + document.body.scrollTop);\\n\\n    return { x: x, y: y };\\n};\\n\\n/*\\n * return a copy of an object with only non-object keys\\n * we need this to avoid circular references\\n * https://stackoverflow.com/a/24161582/3208463\\n */\\nfunction simpleKeys(original) {\\n    return Object.keys(original).reduce(function (obj, key) {\\n        if (typeof original[key] !== 'object') {\\n            obj[key] = original[key];\\n        }\\n        return obj;\\n    }, {});\\n}\\n\\nmpl.figure.prototype.mouse_event = function (event, name) {\\n    var canvas_pos = mpl.findpos(event);\\n\\n    if (name === 'button_press') {\\n        this.canvas.focus();\\n        this.canvas_div.focus();\\n    }\\n\\n    var x = canvas_pos.x * this.ratio;\\n    var y = canvas_pos.y * this.ratio;\\n\\n    this.send_message(name, {\\n        x: x,\\n        y: y,\\n        button: event.button,\\n        step: event.step,\\n        guiEvent: simpleKeys(event),\\n    });\\n\\n    /* This prevents the web browser from automatically changing to\\n     * the text insertion cursor when the button is pressed.  We want\\n     * to control all of the cursor setting manually through the\\n     * 'cursor' event from matplotlib */\\n    event.preventDefault();\\n    return false;\\n};\\n\\nmpl.figure.prototype._key_event_extra = function (_event, _name) {\\n    // Handle any extra behaviour associated with a key event\\n};\\n\\nmpl.figure.prototype.key_event = function (event, name) {\\n    // Prevent repeat events\\n    if (name === 'key_press') {\\n        if (event.key === this._key) {\\n            return;\\n        } else {\\n            this._key = event.key;\\n        }\\n    }\\n    if (name === 'key_release') {\\n        this._key = null;\\n    }\\n\\n    var value = '';\\n    if (event.ctrlKey && event.key !== 'Control') {\\n        value += 'ctrl+';\\n    }\\n    else if (event.altKey && event.key !== 'Alt') {\\n        value += 'alt+';\\n    }\\n    else if (event.shiftKey && event.key !== 'Shift') {\\n        value += 'shift+';\\n    }\\n\\n    value += 'k' + event.key;\\n\\n    this._key_event_extra(event, name);\\n\\n    this.send_message(name, { key: value, guiEvent: simpleKeys(event) });\\n    return false;\\n};\\n\\nmpl.figure.prototype.toolbar_button_onclick = function (name) {\\n    if (name === 'download') {\\n        this.handle_save(this, null);\\n    } else {\\n        this.send_message('toolbar_button', { name: name });\\n    }\\n};\\n\\nmpl.figure.prototype.toolbar_button_onmouseover = function (tooltip) {\\n    this.message.textContent = tooltip;\\n};\\n\\n///////////////// REMAINING CONTENT GENERATED BY embed_js.py /////////////////\\n// prettier-ignore\\nvar _JSXTOOLS_RESIZE_OBSERVER=function(A){var t,i=new WeakMap,n=new WeakMap,a=new WeakMap,r=new WeakMap,o=new Set;function s(e){if(!(this instanceof s))throw new TypeError(\\\"Constructor requires 'new' operator\\\");i.set(this,e)}function h(){throw new TypeError(\\\"Function is not a constructor\\\")}function c(e,t,i,n){e=0 in arguments?Number(arguments[0]):0,t=1 in arguments?Number(arguments[1]):0,i=2 in arguments?Number(arguments[2]):0,n=3 in arguments?Number(arguments[3]):0,this.right=(this.x=this.left=e)+(this.width=i),this.bottom=(this.y=this.top=t)+(this.height=n),Object.freeze(this)}function d(){t=requestAnimationFrame(d);var s=new WeakMap,p=new Set;o.forEach((function(t){r.get(t).forEach((function(i){var r=t instanceof window.SVGElement,o=a.get(t),d=r?0:parseFloat(o.paddingTop),f=r?0:parseFloat(o.paddingRight),l=r?0:parseFloat(o.paddingBottom),u=r?0:parseFloat(o.paddingLeft),g=r?0:parseFloat(o.borderTopWidth),m=r?0:parseFloat(o.borderRightWidth),w=r?0:parseFloat(o.borderBottomWidth),b=u+f,F=d+l,v=(r?0:parseFloat(o.borderLeftWidth))+m,W=g+w,y=r?0:t.offsetHeight-W-t.clientHeight,E=r?0:t.offsetWidth-v-t.clientWidth,R=b+v,z=F+W,M=r?t.width:parseFloat(o.width)-R-E,O=r?t.height:parseFloat(o.height)-z-y;if(n.has(t)){var k=n.get(t);if(k[0]===M&&k[1]===O)return}n.set(t,[M,O]);var S=Object.create(h.prototype);S.target=t,S.contentRect=new c(u,d,M,O),s.has(i)||(s.set(i,[]),p.add(i)),s.get(i).push(S)}))})),p.forEach((function(e){i.get(e).call(e,s.get(e),e)}))}return s.prototype.observe=function(i){if(i instanceof window.Element){r.has(i)||(r.set(i,new Set),o.add(i),a.set(i,window.getComputedStyle(i)));var n=r.get(i);n.has(this)||n.add(this),cancelAnimationFrame(t),t=requestAnimationFrame(d)}},s.prototype.unobserve=function(i){if(i instanceof window.Element&&r.has(i)){var n=r.get(i);n.has(this)&&(n.delete(this),n.size||(r.delete(i),o.delete(i))),n.size||r.delete(i),o.size||cancelAnimationFrame(t)}},A.DOMRectReadOnly=c,A.ResizeObserver=s,A.ResizeObserverEntry=h,A}; // eslint-disable-line\\nmpl.toolbar_items = [[\\\"Home\\\", \\\"Revenir \\\\u00e0 la vue d'origine\\\", \\\"home\\\", \\\"home\\\"], [\\\"Back\\\", \\\"Vue pr\\\\u00e9c\\\\u00e9dente\\\", \\\"back\\\", \\\"back\\\"], [\\\"Forward\\\", \\\"Vue suivante\\\", \\\"forward\\\", \\\"forward\\\"], [\\\"\\\", \\\"\\\", \\\"\\\", \\\"\\\"], [\\\"Pan\\\", \\\"Glisser pour d\\\\u00e9placer, clic droit pour zoomer\\\", \\\"move\\\", \\\"pan\\\"], [\\\"Zoom\\\", \\\"Tracer un rectangle pour zoomer\\\", \\\"zoom_to_rect\\\", \\\"zoom\\\"], [\\\"\\\", \\\"\\\", \\\"\\\", \\\"\\\"], [\\\"Download\\\", \\\"T\\\\u00e9l\\\\u00e9charger au format choisi\\\", \\\"filesave\\\", \\\"download\\\"]];\\n\\nmpl.extensions = [\\\"eps\\\", \\\"jpeg\\\", \\\"pgf\\\", \\\"pdf\\\", \\\"png\\\", \\\"ps\\\", \\\"raw\\\", \\\"svg\\\", \\\"tif\\\"];\\n\\nmpl.default_extension = \\\"png\\\";\\nmpl.extensions = [\\\"eps\\\", \\\"jpeg\\\", \\\"pdf\\\", \\\"png\\\", \\\"ps\\\", \\\"raw\\\", \\\"svg\\\", \\\"tif\\\"];\\nwindow.basthonMplImages = {\\\"_images/home.png\\\": \\\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAADsAAAA7ABJ8QPrQAAAXZJREFUSInt1LFLllEUBvDfSSPFJTfHlpoih1YhSjLaam/LocgG+xMaXBoKarP+ASF0iZbmmgKnaq4hKS3bTMvT4BVu76ff91oKCR048N5zOM/z3HPOeyMzHaQdOVD0/wSHiyAiLkTEx4j4HBGXq/iHiMiI2IyIiY7CzOzpuIENZPEfmC65L1X8SkdtD+A+PKwAHmCmOs9itRtB7PajRcRxzOFiUX8L3zCATTzGsUbZ1cxc6NkinMS7omoZ53G3UnoPY1iqYu1ahPGqr29wBk8bQIlnOI3FKjbVlQA3q2E+L+CLO4BnJWAU8+X8E3c6CGyt66Oq8D7O4VMX8G1fKXOqh/8E/TXBcOnnOiZxHd9bgG/7BqZwDWulxSO/bVFEnMVgueZLf2aXbK1tX2a+wq5Dbqu86R1b1L8HdbN4Ub7HcLtN0V4IXmfmHETE0bYE/85rup8Eq3+B97UZ2PGxi4hTGGq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sJbogyMJ46o64DhHjugfiSQoMKqqQ166fA1MV8yaEE9b/AYHSRClnvMAQQAAAABJRU5ErkJggg==\\\", \\\"_images/back.png\\\": \\\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAADsAAAA7ABJ8QPrQAAAR5JREFUSIm1lLFKA0EQhr8/EUHF9FaKTd4hL2BnbxFSBSvNVb6GWNsLiTY+gGjvE+QBTGFjY3eGsQiRY83ezmWTgYFlj3++uZnZkZmxTWttNfo6AEmnko7dAjNzO3AFzIESGLg0DYJfA1bxOXCW0rlKJGkE3AXXLaCXXSJgFGS+9BlwklWiRPBuVg+AIjd4FLCp4GaGwpcsqQBuIy37AD4Tbf0GhmY2/ddk4DKSeVN/jo1pkcjOa4fLQwh42RCg/DsFJWoDY/LKUwLn0SlKQN6BI6BT47ueMd2pgbwBB1nvoAKZ1ED2swAOyCuwlwWoQB4jkJuUPrmuzewHuACeVnz+SundO2XFn9zDYtU02kV1JqkN9FnM+oM5xI0A69gvQ2TbY/OHay4AAAAASUVORK5CYII=\\\", \\\"_images/back_large.png\\\": \\\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAYAAABXAvmHAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAAHYQAAB2EBlcO4tgAAAg5JREFUaIHtmb1LHEEYh5/RYGvhmTaCH43YpIgEm2BnI/4b4vlxrX+BIKQKpBdJFSJYWijYWfrViDZnAuJx4J3YiOdrcXfkvI+9ndkZ9z3wB2+zu7PzPPsxs8sYEaGX05c2QNK8C6Sdnhf4ELoDY8wnYB54AH6LSNlrByISrIBF4AmQWhWBr177CAifbQBvrDIwo1ogAr5e98AXlQLAchf4eh2qE7CAr1efGgFgxRI+r+YOOMALkFUh4Ai/4e3OJ4RfTRM+kYAGeGcBLfBOAsCaFnhrAW3wVgIa4UUEU4OLjDEmB3zveuDrlIA/lm3apQIcAVsi8tiyN8aVz2F/5UPUjvUjpAi+XtPNjB1/KY0xc9g/NqHzuXlD1D/xUkAQ1/Q3b4gS+BgQxFuiBPbejCJ+WobMKIFN4CQci1OKLVu6jEIZ4Jj0Rx8B7oBB65lYicQl8C3JTJwB9oGprgf/TwlYAC4s2rRLBSiIyHPbvRbfQhmq74TNlfsHTKj4mEsoMa5CoCYx7CDxFxhTIdAgcapBwr2hm8Q1MKpCQItE8hNUJc4sJfLAiAqBBBK7PvqONZHFiTFmGDgAJmM2qQAD0mmCihlva2QiUgBmgfOYTe6SwoPnRT4RuSW+xA9fnXovqj9D53R+/rfxsDbg7SW2lPgF9HvrJ5RATWII+AncAFfAuk94r6NQWun5lfqeF3gBKjvAnb7bVwoAAAAASUVORK5CYII=\\\", \\\"_images/forward.png\\\": \\\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAADsAAAA7ABJ8QPrQAAAQdJREFUSIm1lD9OAlEQh78R/NOAHbEwQOMlLLmBIfEM1mxlbPUAnsAQ7iB0JBxEr2BLKMYCVh6bfb6Zl91JfsV7yfy+2Z2ZJ6pKm3HWqrsHICK3InLnJqhqUsAU2AIKPFty/nIN5vfA7mBe6qVJQFExd0EsgBvgKxdi7cEwF2JvFoyAby/EDMiFdIM5HwMfwHVisjuR+1cRQVXfavcAWEQq86oIvyDc5F6icmvMwkMI2DUEWJ+cgl804fgc5OoTuIxOEXAO9P/RANhYzb17cAWsPOaeTc4yt75FF7nmVsBTrnl1D2LxU3O3BB5UdZvMNvbg3Vt5KTkYJENEHtmP6lxVzUtpBuTGL/zMDtAHluTmAAAAAElFTkSuQmCC\\\", \\\"_images/forward_large.png\\\": \\\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAYAAABXAvmHAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAAHYQAAB2EBlcO4tgAAAfNJREFUaIHtl79KXEEUh79jdhELIw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2a2bak80RFe5V/qavAGeC9mX1PW5iZHsdtj62sdSERn3Qun/92SdkENF5AiO70GvAJ2I1HH3cg6yfW7QDX627udmLyPqi1ubsLvPSwf+7b3PUSEF93lykWIzYJ0Tjw/Q8WTMXHJmaFfIf4yIQigpEPKiCniKDkgwvIEBGcfCkCHCJKIW/mGQfSEJent4jy+1Uz840XY/EbWU5kqYWiQGsAAAAASUVORK5CYII=\\\", \\\"_images/zoom_to_rect.png\\\": \\\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAADsAAAA7ABJ8QPrQAAAbRJREFUSIm1lb1KXFEQx3//KCjYabFgYZNYGGwVKwVFQiCQIoUSiE3U9HaCKL6ApEiTB4iNhcFHELRJHkAjSsCkSJQICpqFXcdi74W5Z+/HCdGBgcvc/8feOXNmZWY8ZDx6UPUyA0ldkuYk7Uo6lfRH0ndJO5KeS1KUg5m1JbAM/AasJL8Bs3n8jFaO+IcKYZ+3wEK0QY54E/gMvAFeAovA3r+YePHJgHgIPC5o4Thw4bB1oFZlsO0Ix0B/6afDCHDlOKuFBsAA0HDguarDS3jvHecn0FlksOCA50BXpMFg0NaREJPegz43uQdmVi8aax9mdgTcuFJviEkNLKcWGyp4zoidudpTST1RytIw0O1Kp22gpJc1WqOW9vJd5Bl8dJyTqjH9RHYinlSITwF/HWejymCM7ET8IGcqkj6/Aq4d9pKCexOS1wITA/aBJWAeWKF1w0PMNTAdu+zyTGIy16Sov28Lfmm4q9bJboA2k7JDFPAM2AK+AgfAF2ADmAA6EtzrMpPKUYwc19DkBhj1q+K/wsw2af1nNJNSN/AifXlvCczQuhu/gCEzQ8mLe4tkzTTShXkHu78AJI6s+WwAAAAASUVORK5CYII=\\\", \\\"_images/zoom_to_rect_large.png\\\": \\\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAYAAABXAvmHAAAABHNCSVQICAgIfAhkiAAAAAlw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hH0m3A7CxcFQ4dYjQR+RNTEEqpMvTVeCZQjH4Y+YS+Er8Skf6Q/5ej31DMsaQNAE0icnvEr1FGYDQCfdi5jERd7Ck0yiY6QkzcSHwKJYn0dLoGzLWk5YvIEOTgh24ReYf+KNJpSOn5LR5y0ACAiLxHm+jI0rw3MzlnA5gOHEW/MX8ONI/KNjqWyMkp5INfkG9PhY1CxMkAAAAASUVORK5CYII=\\\", \\\"_images/filesave.png\\\": \\\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAADsAAAA7ABJ8QPrQAAAWxJREFUSInVlr1KA0EUhb8bgrERBMEylRbRBwgWggbtbMRCUKt0qVJYamvjO9jZCIKK4gvYCVZBtA1apBIUlYA/xyKzuK6z2WRxAx4Y5nL3zjlz7/ytSSJL5DJlB/KBYWY5oAwM9TG+DVxJeo+NkIQr0w6gFO0OmAt4oi1comngBagCB565HLpvVWDf+fZcxudmVknK4Bh4cPamZ6a1UOy68y0AJaAFvAKVbhmkgqQbYB54As6imfzJLvKITKURsBg7LLIIFIB64M9HAx0+PL4tM1tzdtEXJ6lhZvfARJLAEbAKjEX8465vA6fApWesCGXoFZDUBGZixPtC5lfF4O6iMMxsEjjh9xrE4RFYkdToSQBYonNCL4DnBPJhOmdgGehZIChdTdJ1N3YzKwJNYsr9/xd5oLtIQMHM6sCs822YWSuBY9T1ZTd2xHE51u87fpt0L5qv7Qa8Fv6rMLMS/b3JPrwBt5I+gZ8CWeALA9y6UzVKmtYAAAAASUVORK5CYII=\\\", \\\"_images/filesave_large.png\\\": \\\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAYAAABXAvmHAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAAHYQAAB2EBlcO4tgAAAnJJREFUaIHtmr9rFUEQxz+TaF5CokZBK7Gw0tSGqH+AadQilZ0iWNiI2GhhJVaC/4Cp7ew0GF8pFhIQC3+AWloIkaci6oP4YyzuJPvWvbvdu/eyd3BfWNidm9mZ780yu9yeqCpNxljsAKqiJRAbjSewzSUUkWngDLBnhL5/Ae+BFVXtl55FVQcaMA08BnSLWg+4BUzZsfg0F4GzWxi82Z4Cs6EEXEtot9H/Abw0xvOA5GU0xSvguyWbAeaM8TqwC+ik4wWgKyInVPWLh48EjgxcZvOtPLOe9Sl+k8+dqU6IvzD0rgL7gFXLfo2ATIyiCn3NeFFqP1PVdeA0sGKI50kyMevjLHoZVdUNYImSJKITgGokakEAypOoDQHIJbEqIlMum1oRgEwSC8B1l37tCMAAia4hviAiE7buKAjkbXTe/lIS54DfqWgvsGjrOQ9zFXFURG4D3yz5TuBIyESq+kFE3gGHUtF+WyeUQB+YLNDZDlzxnMsHG0Z/3H4YuoTuBupnoQc8GsZEoRm4BHwEjpew/YfPwE1VfVPSfgBBQaTnmRvDcDws1LKMhqAlEBstgdgIqkIiMk7yBaFKGc3CT+AJcE1V//gahQZxBzgfaBOCY8AO4KKvQegSWgrUL4MgH6EZMM9By8DbQPssHGYzs0VnrQFUWcf3VLVbrFYMETlJyaXZ+CrUEoiNlkBstARio/EEXBuZefM9JyKvjXHH6C+LiH2JURYzZt/yeTAjNsBNoGf0J0m2eRcOeIcXhrEcn73/JI6blA7wkDj3ZHntATBhxyuufyVEpAOcYrTXrL5Q4BNwP/3cOAAngSah8VWo8QT+AinIt5vrPaigAAAAAElFTkSuQmCC\\\"};\\n</script></head><body><div id=figure></div><script defer>(()=>{\\\"use strict\\\";const e=document.createElement(\\\"style\\\");e.textContent=\\\"html,\\\\nbody {\\\\n  margin: 0;\\\\n  padding: 0;\\\\n  overflow: hidden;\\\\n  background: transparent;\\\\n}\\\\n\\\\nbody {\\\\n  /*\\\\n   * body size is the requested iframe size (see auto resizing): the\\\\n   * natural figure size, not constrained by the iframe size (that could\\\\n   * be 0 when hidden), the frontend is responsible for scaling it down\\\\n   */\\\\n  width: fit-content;\\\\n  /* room for the focus outline */\\\\n  padding: 3px;\\\\n  font-family: sans-serif;\\\\n  font-size: 13px;\\\\n}\\\\n\\\\n/* canvas container (focusable for keyboard events) */\\\\n#figure div[tabindex]:focus-visible {\\\\n  outline: 2px solid #1f77b4;\\\\n}\\\\n\\\\n/*\\\\n * the status message (cursor position, tooltips) must not change the\\\\n * body size (auto-resizing would rescale the figure on mouse move):\\\\n * the toolbar is as wide as the figure (whatever its content), the message\\\\n * takes the remaining width (its own line on narrow figures), always one\\\\n * line, cut if too long\\\\n */\\\\n.mpl-toolbar {\\\\n  display: flex;\\\\n  flex-wrap: wrap;\\\\n  align-items: center;\\\\n  width: 0;\\\\n  min-width: 100%;\\\\n}\\\\n\\\\n.mpl-message {\\\\n  margin-left: 0.5em;\\\\n  flex: 1 0 10em;\\\\n  height: 1.2em;\\\\n  line-height: 1.2em;\\\\n  white-space: nowrap;\\\\n  overflow: hidden;\\\\n  text-overflow: ellipsis;\\\\n}\\\\n\\\",document.head.appendChild(e);const{mpl:t}=window,n=document.getElementById(\\\"figure\\\");t.figure.prototype._canvas_extra_style=e=>e.setAttribute(\\\"tabindex\\\",\\\"0\\\");const s=new class{binaryType=\\\"blob\\\";readyState=0;onopen=null;onmessage=null;port=null;connect(e){this.port=e,e.onmessage=e=>{const{data:t}=e;this.onmessage?.({data:\\\"string\\\"==typeof t?t:new Blob([t],{type:\\\"image/png\\\"})})},this.readyState=1,this.onopen?.()}send(e){this.port?.postMessage(e)}close(){this.port?.close(),this.readyState=3}},o=(e,t)=>e.send_message(\\\"basthon_download\\\",{format:t}),{setTimeout:i}=window;let a;window.setTimeout=()=>0;try{a=new t.figure(\\\"basthon\\\",s,o,n)}finally{window.setTimeout=i}const r=\\\"undefined\\\"!=typeof ResizeObserverEntry&&\\\"devicePixelContentBoxSize\\\"in ResizeObserverEntry.prototype;new MutationObserver(()=>{const{width:e,height:t}=a.canvas;1===s.readyState&&e>0&&t>0&&((()=>{const e=(()=>{const e=window.devicePixelRatio||1,{canvas:t}=a,n=parseFloat(t.style.width);return r&&n>0&&0!==t.width?Math.abs(n*e-t.width)<=1?e:t.width/n:e})();e!==a.ratio&&(a.ratio=e,1===s.readyState&&a.send_message(\\\"set_device_pixel_ratio\\\",{device_pixel_ratio:e}))})(),a.send_message(\\\"refresh\\\",{}))}).observe(a.canvas,{attributeFilter:[\\\"width\\\",\\\"height\\\"]});const d=window.basthonMplImages??{},l=e=>d[e]??e;for(const e of Array.from(n.querySelectorAll(\\\"img\\\"))){const t=e.getAttribute(\\\"src\\\");null!=t&&e.setAttribute(\\\"src\\\",l(t));const n=e.getAttribute(\\\"srcset\\\");null!=n&&e.setAttribute(\\\"srcset\\\",n.replace(/^\\\\S+/,l))}let c=null;const h=()=>{const{body:e}=document,t={type:\\\"size\\\",content:{width:e.offsetWidth,height:e.offsetHeight}};c?.postMessage(t)};new ResizeObserver(h).observe(document.body),window.addEventListener(\\\"message\\\",e=>{const t=e.data;t instanceof MessagePort?0===s.readyState&&s.connect(t):(e=>\\\"gui-port\\\"===e?.type&&e.port instanceof MessagePort)(t)&&(c=t.port,h())})})();</script></body></html>\"}"},"metadata":{}}]},{"metadata":{"trusted":true},"cell_type":"code","source":"a, b = np.polyfit(t[:100], np.log(Uc[:100]), 1)\nplt.close()\nplt.plot(t[:100], np.log(Uc[:100]), \"r+\")\nplt.plot(t[:100], a*t[:100]+b, \"-b\")\nplt.show()","execution_count":46,"outputs":[{"output_type":"display_data","data":{"text/json-kernel-iframe":"{\"key\":\"d20a795a131fabac70088e17bee1b14d\",\"html\":\"<!doctype html><head><meta charset=utf-8><style>/* General styling */\\n.ui-helper-clearfix:before,\\n.ui-helper-clearfix:after {\\n  content: \\\"\\\";\\n  display: table;\\n  border-collapse: collapse;\\n}\\n.ui-helper-clearfix:after {\\n  clear: both;\\n}\\n\\n/* Header */\\n.ui-widget-header {\\n  border: 1px solid #dddddd;\\n  border-top-left-radius: 6px;\\n  border-top-right-radius: 6px;\\n  background: #e9e9e9;\\n  color: #333333;\\n  font-weight: bold;\\n}\\n\\n/* Toolbar and items */\\n.mpl-toolbar {\\n  width: 100%;\\n}\\n\\n.mpl-toolbar div.mpl-button-group {\\n  display: inline-block;\\n}\\n\\n.mpl-button-group + .mpl-button-group {\\n  margin-left: 0.5em;\\n}\\n\\n.mpl-widget {\\n  background-color: #fff;\\n  border: 1px solid #ccc;\\n  display: inline-block;\\n  cursor: pointer;\\n  color: #333;\\n  padding: 6px;\\n  vertical-align: middle;\\n}\\n\\n.mpl-widget:disabled,\\n.mpl-widget[disabled] {\\n  background-color: #ddd;\\n  border-color: #ddd !important;\\n  cursor: not-allowed;\\n}\\n\\n.mpl-widget:disabled img,\\n.mpl-widget[disabled] img {\\n  /* Convert black to grey */\\n  filter: contrast(0%);\\n}\\n\\n.mpl-widget.active img {\\n  /* Convert black to tab:blue, approximately */\\n  filter: invert(34%) sepia(97%) saturate(468%) hue-rotate(162deg) brightness(96%) contrast(91%);\\n}\\n\\nbutton.mpl-widget:focus,\\nbutton.mpl-widget:hover {\\n  background-color: #ddd;\\n  border-color: #aaa;\\n}\\n\\n.mpl-button-group button.mpl-widget {\\n  margin-left: -1px;\\n}\\n.mpl-button-group button.mpl-widget:first-child {\\n  border-top-left-radius: 6px;\\n  border-bottom-left-radius: 6px;\\n  margin-left: 0px;\\n}\\n.mpl-button-group button.mpl-widget:last-child {\\n  border-top-right-radius: 6px;\\n  border-bottom-right-radius: 6px;\\n}\\n\\nselect.mpl-widget {\\n  cursor: default;\\n}\\n</style><script>/* Put everything inside the global mpl namespace */\\n/* global mpl */\\nwindow.mpl = {};\\n\\nmpl.get_websocket_type = function () {\\n    if (typeof WebSocket !== 'undefined') {\\n        return WebSocket;\\n    } else if (typeof MozWebSocket !== 'undefined') {\\n        return MozWebSocket;\\n    } else {\\n        alert(\\n            'Your browser does not have WebSocket support. ' +\\n                'Please try Chrome, Safari or Firefox ≥ 6. ' +\\n                'Firefox 4 and 5 are also supported but you ' +\\n                'have to enable WebSockets in about:config.'\\n        );\\n    }\\n};\\n\\nmpl.figure = function (figure_id, websocket, ondownload, parent_element) {\\n    this.id = figure_id;\\n\\n    this.ws = websocket;\\n\\n    this.supports_binary = this.ws.binaryType !== undefined;\\n\\n    if (!this.supports_binary) {\\n        var warnings = document.getElementById('mpl-warnings');\\n        if (warnings) {\\n            warnings.style.display = 'block';\\n            warnings.textContent =\\n                'This browser does not support binary websocket messages. ' +\\n                'Performance may be slow.';\\n        }\\n    }\\n\\n    this.imageObj = new Image();\\n\\n    this.context = undefined;\\n    this.message = undefined;\\n    this.canvas = undefined;\\n    this.rubberband_canvas = undefined;\\n    this.rubberband_context = undefined;\\n    this.format_dropdown = undefined;\\n\\n    this.image_mode = 'full';\\n\\n    this.root = document.createElement('div');\\n    this.root.setAttribute('style', 'display: inline-block');\\n    this._root_extra_style(this.root);\\n\\n    parent_element.appendChild(this.root);\\n\\n    this._init_header(this);\\n    this._init_canvas(this);\\n    this._init_toolbar(this);\\n\\n    var fig = this;\\n\\n    this.waiting = false;\\n\\n    this.ws.onopen = function () {\\n        fig.send_message('supports_binary', { value: fig.supports_binary });\\n        fig.send_message('send_image_mode', {});\\n        if (fig.ratio !== 1) {\\n            fig.send_message('set_device_pixel_ratio', {\\n                device_pixel_ratio: fig.ratio,\\n            });\\n        }\\n        fig.send_message('refresh', {});\\n    };\\n\\n    this.imageObj.onload = function () {\\n        if (fig.image_mode === 'full') {\\n            // Full images could contain transparency (where diff images\\n            // almost always do), so we need to clear the canvas so that\\n            // there is no ghosting.\\n            fig.context.clearRect(0, 0, fig.canvas.width, fig.canvas.height);\\n        }\\n        fig.context.drawImage(fig.imageObj, 0, 0);\\n    };\\n\\n    this.imageObj.onunload = function () {\\n        fig.ws.close();\\n    };\\n\\n    this.ws.onmessage = this._make_on_message_function(this);\\n\\n    this.ondownload = ondownload;\\n};\\n\\nmpl.figure.prototype._init_header = function () {\\n    var titlebar = document.createElement('div');\\n    titlebar.classList =\\n        'ui-dialog-titlebar ui-widget-header ui-corner-all ui-helper-clearfix';\\n    var titletext = document.createElement('div');\\n    titletext.classList = 'ui-dialog-title';\\n    titletext.setAttribute(\\n        'style',\\n        'width: 100%; text-align: center; padding: 3px;'\\n    );\\n    titlebar.appendChild(titletext);\\n    this.root.appendChild(titlebar);\\n    this.header = titletext;\\n};\\n\\nmpl.figure.prototype._canvas_extra_style = function (_canvas_div) {};\\n\\nmpl.figure.prototype._root_extra_style = function (_canvas_div) {};\\n\\nmpl.figure.prototype._init_canvas = function () {\\n    var fig = this;\\n\\n    var canvas_div = (this.canvas_div = document.createElement('div'));\\n    canvas_div.setAttribute(\\n        'style',\\n        'border: 1px solid #ddd;' +\\n            'box-sizing: content-box;' +\\n            'clear: both;' +\\n            'min-height: 1px;' +\\n            'min-width: 1px;' +\\n            'outline: 0;' +\\n            'overflow: hidden;' +\\n            'position: relative;' +\\n            'resize: both;'\\n    );\\n\\n    function on_keyboard_event_closure(name) {\\n        return function (event) {\\n            return fig.key_event(event, name);\\n        };\\n    }\\n\\n    canvas_div.addEventListener(\\n        'keydown',\\n        on_keyboard_event_closure('key_press')\\n    );\\n    canvas_div.addEventListener(\\n        'keyup',\\n        on_keyboard_event_closure('key_release')\\n    );\\n\\n    this._canvas_extra_style(canvas_div);\\n    this.root.appendChild(canvas_div);\\n\\n    var canvas = (this.canvas = document.createElement('canvas'));\\n    canvas.classList.add('mpl-canvas');\\n    canvas.setAttribute('style', 'box-sizing: content-box;');\\n\\n    this.context = canvas.getContext('2d');\\n\\n    var backingStore =\\n        this.context.backingStorePixelRatio ||\\n        this.context.webkitBackingStorePixelRatio ||\\n        this.context.mozBackingStorePixelRatio ||\\n        this.context.msBackingStorePixelRatio ||\\n        this.context.oBackingStorePixelRatio ||\\n        this.context.backingStorePixelRatio ||\\n        1;\\n\\n    this.ratio = (window.devicePixelRatio || 1) / backingStore;\\n\\n    var rubberband_canvas = (this.rubberband_canvas = document.createElement(\\n        'canvas'\\n    ));\\n    rubberband_canvas.setAttribute(\\n        'style',\\n        'box-sizing: content-box; position: absolute; left: 0; top: 0; z-index: 1;'\\n    );\\n\\n    // Apply a ponyfill if ResizeObserver is not implemented by browser.\\n    if (this.ResizeObserver === undefined) {\\n        if (window.ResizeObserver !== undefined) {\\n            this.ResizeObserver = window.ResizeObserver;\\n        } else {\\n            var obs = _JSXTOOLS_RESIZE_OBSERVER({});\\n            this.ResizeObserver = obs.ResizeObserver;\\n        }\\n    }\\n\\n    this.resizeObserverInstance = new this.ResizeObserver(function (entries) {\\n        var nentries = entries.length;\\n        for (var i = 0; i < nentries; i++) {\\n            var entry = entries[i];\\n            var width, height;\\n            if (entry.contentBoxSize) {\\n                if (entry.contentBoxSize instanceof Array) {\\n                    // Chrome 84 implements new version of spec.\\n                    width = entry.contentBoxSize[0].inlineSize;\\n                    height = entry.contentBoxSize[0].blockSize;\\n                } else {\\n                    // Firefox implements old version of spec.\\n                    width = entry.contentBoxSize.inlineSize;\\n                    height = entry.contentBoxSize.blockSize;\\n                }\\n            } else {\\n                // Chrome <84 implements even older version of spec.\\n                width = entry.contentRect.width;\\n                height = entry.contentRect.height;\\n            }\\n\\n            // Keep the size of the canvas and rubber band canvas in sync with\\n            // the canvas container.\\n            if (entry.devicePixelContentBoxSize) {\\n                // Chrome 84 implements new version of spec.\\n                canvas.setAttribute(\\n                    'width',\\n                    entry.devicePixelContentBoxSize[0].inlineSize\\n                );\\n                canvas.setAttribute(\\n                    'height',\\n                    entry.devicePixelContentBoxSize[0].blockSize\\n                );\\n            } else {\\n                canvas.setAttribute('width', width * fig.ratio);\\n                canvas.setAttribute('height', height * fig.ratio);\\n            }\\n            canvas.setAttribute(\\n                'style',\\n                'width: ' + width + 'px; height: ' + height + 'px;'\\n            );\\n\\n            rubberband_canvas.setAttribute('width', width);\\n            rubberband_canvas.setAttribute('height', height);\\n\\n            // And update the size in Python. We ignore the initial 0/0 size\\n            // that occurs as the element is placed into the DOM, which should\\n            // otherwise not happen due to the minimum size styling.\\n            if (fig.ws.readyState == 1 && width != 0 && height != 0) {\\n                fig.request_resize(width, height);\\n            }\\n        }\\n    });\\n    this.resizeObserverInstance.observe(canvas_div);\\n\\n    function on_mouse_event_closure(name) {\\n        return function (event) {\\n            return fig.mouse_event(event, name);\\n        };\\n    }\\n\\n    rubberband_canvas.addEventListener(\\n        'mousedown',\\n        on_mouse_event_closure('button_press')\\n    );\\n    rubberband_canvas.addEventListener(\\n        'mouseup',\\n        on_mouse_event_closure('button_release')\\n    );\\n    rubberband_canvas.addEventListener(\\n        'dblclick',\\n        on_mouse_event_closure('dblclick')\\n    );\\n    // Throttle sequential mouse events to 1 every 20ms.\\n    rubberband_canvas.addEventListener(\\n        'mousemove',\\n        on_mouse_event_closure('motion_notify')\\n    );\\n\\n    rubberband_canvas.addEventListener(\\n        'mouseenter',\\n        on_mouse_event_closure('figure_enter')\\n    );\\n    rubberband_canvas.addEventListener(\\n        'mouseleave',\\n        on_mouse_event_closure('figure_leave')\\n    );\\n\\n    canvas_div.addEventListener('wheel', function (event) {\\n        if (event.deltaY < 0) {\\n            event.step = 1;\\n        } else {\\n            event.step = -1;\\n        }\\n        on_mouse_event_closure('scroll')(event);\\n    });\\n\\n    canvas_div.appendChild(canvas);\\n    canvas_div.appendChild(rubberband_canvas);\\n\\n    this.rubberband_context = rubberband_canvas.getContext('2d');\\n    this.rubberband_context.strokeStyle = '#000000';\\n\\n    this._resize_canvas = function (width, height, forward) {\\n        if (forward) {\\n            canvas_div.style.width = width + 'px';\\n            canvas_div.style.height = height + 'px';\\n        }\\n    };\\n\\n    // Disable right mouse context menu.\\n    this.rubberband_canvas.addEventListener('contextmenu', function (_e) {\\n        event.preventDefault();\\n        return false;\\n    });\\n\\n    function set_focus() {\\n        canvas.focus();\\n        canvas_div.focus();\\n    }\\n\\n    window.setTimeout(set_focus, 100);\\n};\\n\\nmpl.figure.prototype._init_toolbar = function () {\\n    var fig = this;\\n\\n    var toolbar = document.createElement('div');\\n    toolbar.classList = 'mpl-toolbar';\\n    this.root.appendChild(toolbar);\\n\\n    function on_click_closure(name) {\\n        return function (_event) {\\n            return fig.toolbar_button_onclick(name);\\n        };\\n    }\\n\\n    function on_mouseover_closure(tooltip) {\\n        return function (event) {\\n            if (!event.currentTarget.disabled) {\\n                return fig.toolbar_button_onmouseover(tooltip);\\n            }\\n        };\\n    }\\n\\n    fig.buttons = {};\\n    var buttonGroup = document.createElement('div');\\n    buttonGroup.classList = 'mpl-button-group';\\n    for (var toolbar_ind in mpl.toolbar_items) {\\n        var name = mpl.toolbar_items[toolbar_ind][0];\\n        var tooltip = mpl.toolbar_items[toolbar_ind][1];\\n        var image = mpl.toolbar_items[toolbar_ind][2];\\n        var method_name = mpl.toolbar_items[toolbar_ind][3];\\n\\n        if (!name) {\\n            /* Instead of a spacer, we start a new button group. */\\n            if (buttonGroup.hasChildNodes()) {\\n                toolbar.appendChild(buttonGroup);\\n            }\\n            buttonGroup = document.createElement('div');\\n            buttonGroup.classList = 'mpl-button-group';\\n            continue;\\n        }\\n\\n        var button = (fig.buttons[name] = document.createElement('button'));\\n        button.classList = 'mpl-widget';\\n        button.setAttribute('role', 'button');\\n        button.setAttribute('aria-disabled', 'false');\\n        button.addEventListener('click', on_click_closure(method_name));\\n        button.addEventListener('mouseover', on_mouseover_closure(tooltip));\\n\\n        var icon_img = document.createElement('img');\\n        icon_img.src = '_images/' + image + '.png';\\n        icon_img.srcset = '_images/' + image + '_large.png 2x';\\n        icon_img.alt = tooltip;\\n        button.appendChild(icon_img);\\n\\n        buttonGroup.appendChild(button);\\n    }\\n\\n    if (buttonGroup.hasChildNodes()) {\\n        toolbar.appendChild(buttonGroup);\\n    }\\n\\n    var fmt_picker = document.createElement('select');\\n    fmt_picker.classList = 'mpl-widget';\\n    toolbar.appendChild(fmt_picker);\\n    this.format_dropdown = fmt_picker;\\n\\n    for (var ind in mpl.extensions) {\\n        var fmt = mpl.extensions[ind];\\n        var option = document.createElement('option');\\n        option.selected = fmt === mpl.default_extension;\\n        option.innerHTML = fmt;\\n        fmt_picker.appendChild(option);\\n    }\\n\\n    var status_bar = document.createElement('span');\\n    status_bar.classList = 'mpl-message';\\n    toolbar.appendChild(status_bar);\\n    this.message = status_bar;\\n};\\n\\nmpl.figure.prototype.request_resize = function (x_pixels, y_pixels) {\\n    // Request matplotlib to resize the figure. Matplotlib will then trigger a resize in the client,\\n    // which will in turn request a refresh of the image.\\n    this.send_message('resize', { width: x_pixels, height: y_pixels });\\n};\\n\\nmpl.figure.prototype.send_message = function (type, properties) {\\n    properties['type'] = type;\\n    properties['figure_id'] = this.id;\\n    this.ws.send(JSON.stringify(properties));\\n};\\n\\nmpl.figure.prototype.send_draw_message = function () {\\n    if (!this.waiting) {\\n        this.waiting = true;\\n        this.ws.send(JSON.stringify({ type: 'draw', figure_id: this.id }));\\n    }\\n};\\n\\nmpl.figure.prototype.handle_save = function (fig, _msg) {\\n    var format_dropdown = fig.format_dropdown;\\n    var format = format_dropdown.options[format_dropdown.selectedIndex].value;\\n    fig.ondownload(fig, format);\\n};\\n\\nmpl.figure.prototype.handle_resize = function (fig, msg) {\\n    var size = msg['size'];\\n    if (size[0] !== fig.canvas.width || size[1] !== fig.canvas.height) {\\n        fig._resize_canvas(size[0], size[1], msg['forward']);\\n        fig.send_message('refresh', {});\\n    }\\n};\\n\\nmpl.figure.prototype.handle_rubberband = function (fig, msg) {\\n    var x0 = msg['x0'] / fig.ratio;\\n    var y0 = (fig.canvas.height - msg['y0']) / fig.ratio;\\n    var x1 = msg['x1'] / fig.ratio;\\n    var y1 = (fig.canvas.height - msg['y1']) / fig.ratio;\\n    x0 = Math.floor(x0) + 0.5;\\n    y0 = Math.floor(y0) + 0.5;\\n    x1 = Math.floor(x1) + 0.5;\\n    y1 = Math.floor(y1) + 0.5;\\n    var min_x = Math.min(x0, x1);\\n    var min_y = Math.min(y0, y1);\\n    var width = Math.abs(x1 - x0);\\n    var height = Math.abs(y1 - y0);\\n\\n    fig.rubberband_context.clearRect(\\n        0,\\n        0,\\n        fig.canvas.width / fig.ratio,\\n        fig.canvas.height / fig.ratio\\n    );\\n\\n    fig.rubberband_context.strokeRect(min_x, min_y, width, height);\\n};\\n\\nmpl.figure.prototype.handle_figure_label = function (fig, msg) {\\n    // Updates the figure title.\\n    fig.header.textContent = msg['label'];\\n};\\n\\nmpl.figure.prototype.handle_cursor = function (fig, msg) {\\n    fig.rubberband_canvas.style.cursor = msg['cursor'];\\n};\\n\\nmpl.figure.prototype.handle_message = function (fig, msg) {\\n    fig.message.textContent = msg['message'];\\n};\\n\\nmpl.figure.prototype.handle_draw = function (fig, _msg) {\\n    // Request the server to send over a new figure.\\n    fig.send_draw_message();\\n};\\n\\nmpl.figure.prototype.handle_image_mode = function (fig, msg) {\\n    fig.image_mode = msg['mode'];\\n};\\n\\nmpl.figure.prototype.handle_history_buttons = function (fig, msg) {\\n    for (var key in msg) {\\n        if (!(key in fig.buttons)) {\\n            continue;\\n        }\\n        fig.buttons[key].disabled = !msg[key];\\n        fig.buttons[key].setAttribute('aria-disabled', !msg[key]);\\n    }\\n};\\n\\nmpl.figure.prototype.handle_navigate_mode = function (fig, msg) {\\n    if (msg['mode'] === 'PAN') {\\n        fig.buttons['Pan'].classList.add('active');\\n        fig.buttons['Zoom'].classList.remove('active');\\n    } else if (msg['mode'] === 'ZOOM') {\\n        fig.buttons['Pan'].classList.remove('active');\\n        fig.buttons['Zoom'].classList.add('active');\\n    } else {\\n        fig.buttons['Pan'].classList.remove('active');\\n        fig.buttons['Zoom'].classList.remove('active');\\n    }\\n};\\n\\nmpl.figure.prototype.updated_canvas_event = function () {\\n    // Called whenever the canvas gets updated.\\n    this.send_message('ack', {});\\n};\\n\\n// A function to construct a web socket function for onmessage handling.\\n// Called in the figure constructor.\\nmpl.figure.prototype._make_on_message_function = function (fig) {\\n    return function socket_on_message(evt) {\\n        if (evt.data instanceof Blob) {\\n            var img = evt.data;\\n            if (img.type !== 'image/png') {\\n                /* FIXME: We get \\\"Resource interpreted as Image but\\n                 * transferred with MIME type text/plain:\\\" errors on\\n                 * Chrome.  But how to set the MIME type?  It doesn't seem\\n                 * to be part of the websocket stream */\\n                img.type = 'image/png';\\n            }\\n\\n            /* Free the memory for the previous frames */\\n            if (fig.imageObj.src) {\\n                (window.URL || window.webkitURL).revokeObjectURL(\\n                    fig.imageObj.src\\n                );\\n            }\\n\\n            fig.imageObj.src = (window.URL || window.webkitURL).createObjectURL(\\n                img\\n            );\\n            fig.updated_canvas_event();\\n            fig.waiting = false;\\n            return;\\n        } else if (\\n            typeof evt.data === 'string' &&\\n            evt.data.slice(0, 21) === 'data:image/png;base64'\\n        ) {\\n            fig.imageObj.src = evt.data;\\n            fig.updated_canvas_event();\\n            fig.waiting = false;\\n            return;\\n        }\\n\\n        var msg = JSON.parse(evt.data);\\n        var msg_type = msg['type'];\\n\\n        // Call the  \\\"handle_{type}\\\" callback, which takes\\n        // the figure and JSON message as its only arguments.\\n        try {\\n            var callback = fig['handle_' + msg_type];\\n        } catch (e) {\\n            console.log(\\n                \\\"No handler for the '\\\" + msg_type + \\\"' message type: \\\",\\n                msg\\n            );\\n            return;\\n        }\\n\\n        if (callback) {\\n            try {\\n                // console.log(\\\"Handling '\\\" + msg_type + \\\"' message: \\\", msg);\\n                callback(fig, msg);\\n            } catch (e) {\\n                console.log(\\n                    \\\"Exception inside the 'handler_\\\" + msg_type + \\\"' callback:\\\",\\n                    e,\\n                    e.stack,\\n                    msg\\n                );\\n            }\\n        }\\n    };\\n};\\n\\n// from https://stackoverflow.com/questions/1114465/getting-mouse-location-in-canvas\\nmpl.findpos = function (e) {\\n    //this section is from http://www.quirksmode.org/js/events_properties.html\\n    var targ;\\n    if (!e) {\\n        e = window.event;\\n    }\\n    if (e.target) {\\n        targ = e.target;\\n    } else if (e.srcElement) {\\n        targ = e.srcElement;\\n    }\\n    if (targ.nodeType === 3) {\\n        // defeat Safari bug\\n        targ = targ.parentNode;\\n    }\\n\\n    // pageX,Y are the mouse positions relative to the document\\n    var boundingRect = targ.getBoundingClientRect();\\n    var x = e.pageX - (boundingRect.left + document.body.scrollLeft);\\n    var y = e.pageY - (boundingRect.top + document.body.scrollTop);\\n\\n    return { x: x, y: y };\\n};\\n\\n/*\\n * return a copy of an object with only non-object keys\\n * we need this to avoid circular references\\n * https://stackoverflow.com/a/24161582/3208463\\n */\\nfunction simpleKeys(original) {\\n    return Object.keys(original).reduce(function (obj, key) {\\n        if (typeof original[key] !== 'object') {\\n            obj[key] = original[key];\\n        }\\n        return obj;\\n    }, {});\\n}\\n\\nmpl.figure.prototype.mouse_event = function (event, name) {\\n    var canvas_pos = mpl.findpos(event);\\n\\n    if (name === 'button_press') {\\n        this.canvas.focus();\\n        this.canvas_div.focus();\\n    }\\n\\n    var x = canvas_pos.x * this.ratio;\\n    var y = canvas_pos.y * this.ratio;\\n\\n    this.send_message(name, {\\n        x: x,\\n        y: y,\\n        button: event.button,\\n        step: event.step,\\n        guiEvent: simpleKeys(event),\\n    });\\n\\n    /* This prevents the web browser from automatically changing to\\n     * the text insertion cursor when the button is pressed.  We want\\n     * to control all of the cursor setting manually through the\\n     * 'cursor' event from matplotlib */\\n    event.preventDefault();\\n    return false;\\n};\\n\\nmpl.figure.prototype._key_event_extra = function (_event, _name) {\\n    // Handle any extra behaviour associated with a key event\\n};\\n\\nmpl.figure.prototype.key_event = function (event, name) {\\n    // Prevent repeat events\\n    if (name === 'key_press') {\\n        if (event.key === this._key) {\\n            return;\\n        } else {\\n            this._key = event.key;\\n        }\\n    }\\n    if (name === 'key_release') {\\n        this._key = null;\\n    }\\n\\n    var value = '';\\n    if (event.ctrlKey && event.key !== 'Control') {\\n        value += 'ctrl+';\\n    }\\n    else if (event.altKey && event.key !== 'Alt') {\\n        value += 'alt+';\\n    }\\n    else if (event.shiftKey && event.key !== 'Shift') {\\n        value += 'shift+';\\n    }\\n\\n    value += 'k' + event.key;\\n\\n    this._key_event_extra(event, name);\\n\\n    this.send_message(name, { key: value, guiEvent: simpleKeys(event) });\\n    return false;\\n};\\n\\nmpl.figure.prototype.toolbar_button_onclick = function (name) {\\n    if (name === 'download') {\\n        this.handle_save(this, null);\\n    } else {\\n        this.send_message('toolbar_button', { name: name });\\n    }\\n};\\n\\nmpl.figure.prototype.toolbar_button_onmouseover = function (tooltip) {\\n    this.message.textContent = tooltip;\\n};\\n\\n///////////////// REMAINING CONTENT GENERATED BY embed_js.py /////////////////\\n// prettier-ignore\\nvar _JSXTOOLS_RESIZE_OBSERVER=function(A){var t,i=new WeakMap,n=new WeakMap,a=new WeakMap,r=new WeakMap,o=new Set;function s(e){if(!(this instanceof s))throw new TypeError(\\\"Constructor requires 'new' operator\\\");i.set(this,e)}function h(){throw new TypeError(\\\"Function is not a constructor\\\")}function c(e,t,i,n){e=0 in arguments?Number(arguments[0]):0,t=1 in arguments?Number(arguments[1]):0,i=2 in arguments?Number(arguments[2]):0,n=3 in arguments?Number(arguments[3]):0,this.right=(this.x=this.left=e)+(this.width=i),this.bottom=(this.y=this.top=t)+(this.height=n),Object.freeze(this)}function d(){t=requestAnimationFrame(d);var s=new WeakMap,p=new Set;o.forEach((function(t){r.get(t).forEach((function(i){var r=t instanceof window.SVGElement,o=a.get(t),d=r?0:parseFloat(o.paddingTop),f=r?0:parseFloat(o.paddingRight),l=r?0:parseFloat(o.paddingBottom),u=r?0:parseFloat(o.paddingLeft),g=r?0:parseFloat(o.borderTopWidth),m=r?0:parseFloat(o.borderRightWidth),w=r?0:parseFloat(o.borderBottomWidth),b=u+f,F=d+l,v=(r?0:parseFloat(o.borderLeftWidth))+m,W=g+w,y=r?0:t.offsetHeight-W-t.clientHeight,E=r?0:t.offsetWidth-v-t.clientWidth,R=b+v,z=F+W,M=r?t.width:parseFloat(o.width)-R-E,O=r?t.height:parseFloat(o.height)-z-y;if(n.has(t)){var k=n.get(t);if(k[0]===M&&k[1]===O)return}n.set(t,[M,O]);var S=Object.create(h.prototype);S.target=t,S.contentRect=new c(u,d,M,O),s.has(i)||(s.set(i,[]),p.add(i)),s.get(i).push(S)}))})),p.forEach((function(e){i.get(e).call(e,s.get(e),e)}))}return s.prototype.observe=function(i){if(i instanceof window.Element){r.has(i)||(r.set(i,new Set),o.add(i),a.set(i,window.getComputedStyle(i)));var n=r.get(i);n.has(this)||n.add(this),cancelAnimationFrame(t),t=requestAnimationFrame(d)}},s.prototype.unobserve=function(i){if(i instanceof window.Element&&r.has(i)){var n=r.get(i);n.has(this)&&(n.delete(this),n.size||(r.delete(i),o.delete(i))),n.size||r.delete(i),o.size||cancelAnimationFrame(t)}},A.DOMRectReadOnly=c,A.ResizeObserver=s,A.ResizeObserverEntry=h,A}; // eslint-disable-line\\nmpl.toolbar_items = [[\\\"Home\\\", \\\"Revenir \\\\u00e0 la vue d'origine\\\", \\\"home\\\", \\\"home\\\"], [\\\"Back\\\", \\\"Vue pr\\\\u00e9c\\\\u00e9dente\\\", \\\"back\\\", \\\"back\\\"], [\\\"Forward\\\", \\\"Vue suivante\\\", \\\"forward\\\", \\\"forward\\\"], [\\\"\\\", \\\"\\\", \\\"\\\", \\\"\\\"], [\\\"Pan\\\", \\\"Glisser pour d\\\\u00e9placer, clic droit pour zoomer\\\", \\\"move\\\", \\\"pan\\\"], [\\\"Zoom\\\", \\\"Tracer un rectangle pour zoomer\\\", \\\"zoom_to_rect\\\", \\\"zoom\\\"], [\\\"\\\", \\\"\\\", \\\"\\\", \\\"\\\"], [\\\"Download\\\", \\\"T\\\\u00e9l\\\\u00e9charger au format choisi\\\", \\\"filesave\\\", \\\"download\\\"]];\\n\\nmpl.extensions = [\\\"eps\\\", \\\"jpeg\\\", \\\"pgf\\\", \\\"pdf\\\", \\\"png\\\", \\\"ps\\\", \\\"raw\\\", \\\"svg\\\", \\\"tif\\\"];\\n\\nmpl.default_extension = \\\"png\\\";\\nmpl.extensions = [\\\"eps\\\", \\\"jpeg\\\", \\\"pdf\\\", \\\"png\\\", \\\"ps\\\", \\\"raw\\\", \\\"svg\\\", \\\"tif\\\"];\\nwindow.basthonMplImages = {\\\"_images/home.png\\\": \\\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAABHNCSVQ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DYtU02kV1JqkN9FnM+oM5xI0A69gvQ2TbY/OHay4AAAAASUVORK5CYII=\\\", \\\"_images/back_large.png\\\": \\\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAYAAABXAvmHAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAAHYQAAB2EBlcO4tgAAAg5JREFUaIHtmb1LHEEYh5/RYGvhmTaCH43YpIgEm2BnI/4b4vlxrX+BIKQKpBdJFSJYWijYWfrViDZnAuJx4J3YiOdrcXfkvI+9ndkZ9z3wB2+zu7PzPPsxs8sYEaGX05c2QNK8C6Sdnhf4ELoDY8wnYB54AH6LSNlrByISrIBF4AmQWhWBr177CAifbQBvrDIwo1ogAr5e98AXlQLAchf4eh2qE7CAr1efGgFgxRI+r+YOOMALkFUh4Ai/4e3OJ4RfTRM+kYAGeGcBLfBOAsCaFnhrAW3wVgIa4UUEU4OLjDEmB3zveuDrlIA/lm3apQIcAVsi8tiyN8aVz2F/5UPUjvUjpAi+XtPNjB1/KY0xc9g/NqHzuXlD1D/xUkAQ1/Q3b4gS+BgQxFuiBPbejCJ+WobMKIFN4CQci1OKLVu6jEIZ4Jj0Rx8B7oBB65lYicQl8C3JTJwB9oGprgf/TwlYAC4s2rRLBSiIyHPbvRbfQhmq74TNlfsHTKj4mEsoMa5CoCYx7CDxFxhTIdAgcapBwr2hm8Q1MKpCQItE8hNUJc4sJfLAiAqBBBK7PvqONZHFiTFmGDgAJmM2qQAD0mmCihlva2QiUgBmgfOYTe6SwoPnRT4RuSW+xA9fnXovqj9D53R+/rfxsDbg7SW2lPgF9HvrJ5RATWII+AncAFfAuk94r6NQWun5lfqeF3gBKjvAnb7bVwoAAAAASUVORK5CYII=\\\", \\\"_images/forward.png\\\": \\\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAADsAAAA7ABJ8QPrQAAAQdJREFUSIm1lD9OAlEQh78R/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X5G1pvBgIKDFFL6PKDWHHwJYvAMd4CMJ1rzLS1wj4QZvKjAisUtxFP8GnACrXvAmu1DutOVSX5nWC/wDCDO0hf1f5TcAAAAASUVORK5CYII=\\\", \\\"_images/move.png\\\": \\\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAADsAAAA7ABJ8QPrQAAAYNJREFUSIm1lTtLA0EUhb8TggqBEEJqLewFtRFB8JF/oNhZiV2wM621ttrYa6OFRbooFkYrrfQPCIKViBAVFORaOOo4yW52Vzxw2d37OGd25s6MzIz/RC5NsqQlScupFMwskQE1wJzVE9dlIE8lkpU8sYjiFlmSgDZQiEh5A4pm9hrFEbvI9qk+CkwDDS905HwjceRfJEnXYYefqdlNWtfxB5ImJRVjR9UFkgqSpkJ/LkiqAefAWloBYBU4lVTvKuDIt9znQAaBfvfc+CUS0YpPwF1gz178pUu8TZcWBpggus//ajMAReDiH8ivgLLMDEkl4BgYdzPXAPaCOV4B5tz7GbAdxBecAVwDs2Z27/d5Cbh06ptp9wGw7o280rEPzOwRqAIHQJP0OAEOv0fukPcznMhiBnLMrAW0Qn+qCycLYk9TAEn7wDAwCFSc+wG4AW6BeTN7j6rPRwU8DAFjga/srHd9glPU766wzys96xMe1aFIIvKeN5oPtxmbQB9Q9VsxDh9ePiFv5GfibAAAAABJRU5ErkJggg==\\\", \\\"_images/move_large.png\\\": \\\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAYAAABXAvmHAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAAHYQAAB2EBlcO4tgAAAqFJREFUaIHtmL1rFEEYxn9PkstBBEEugkmlgjaWFmlFsbBNYQr/iIC2ud5S7AVBiB8QxMbaf8DCCxIVFa1SRIvgiaiJr8Xumb3cze7ezuyuKz4wcDs7777PM3PM+yEzo8mYqpuAL2bK+rCkWWAV2Adum9leKY7MLPgA2sBTwOKxAbRK8V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H6EZMM9By8DbQPssHGYzs0VnrQFUWcf3VLVbrFYMETlJyaXZ+CrUEoiNlkBstARio/EEXBuZefM9JyKvjXHH6C+LiH2JURYzZt/yeTAjNsBNoGf0J0m2eRcOeIcXhrEcn73/JI6blA7wkDj3ZHntATBhxyuufyVEpAOcYrTXrL5Q4BNwP/3cOAAngSah8VWo8QT+AinIt5vrPaigAAAAAElFTkSuQmCC\\\"};\\n</script></head><body><div id=figure></div><script defer>(()=>{\\\"use strict\\\";const e=document.createElement(\\\"style\\\");e.textContent=\\\"html,\\\\nbody {\\\\n  margin: 0;\\\\n  padding: 0;\\\\n  overflow: hidden;\\\\n  background: transparent;\\\\n}\\\\n\\\\nbody {\\\\n  /*\\\\n   * body size is the requested iframe size (see auto resizing): the\\\\n   * natural figure size, not constrained by the iframe size (that could\\\\n   * be 0 when hidden), the frontend is responsible for scaling it down\\\\n   */\\\\n  width: fit-content;\\\\n  /* room for the focus outline */\\\\n  padding: 3px;\\\\n  font-family: sans-serif;\\\\n  font-size: 13px;\\\\n}\\\\n\\\\n/* canvas container (focusable for keyboard events) */\\\\n#figure div[tabindex]:focus-visible {\\\\n  outline: 2px solid #1f77b4;\\\\n}\\\\n\\\\n/*\\\\n * the status message (cursor position, tooltips) must not change the\\\\n * body size (auto-resizing would rescale the figure on mouse move):\\\\n * the toolbar is as wide as the figure (whatever its content), the message\\\\n * takes the remaining width (its own line on narrow figures), always one\\\\n * line, cut if too long\\\\n */\\\\n.mpl-toolbar {\\\\n  display: flex;\\\\n  flex-wrap: wrap;\\\\n  align-items: center;\\\\n  width: 0;\\\\n  min-width: 100%;\\\\n}\\\\n\\\\n.mpl-message {\\\\n  margin-left: 0.5em;\\\\n  flex: 1 0 10em;\\\\n  height: 1.2em;\\\\n  line-height: 1.2em;\\\\n  white-space: nowrap;\\\\n  overflow: hidden;\\\\n  text-overflow: ellipsis;\\\\n}\\\\n\\\",document.head.appendChild(e);const{mpl:t}=window,n=document.getElementById(\\\"figure\\\");t.figure.prototype._canvas_extra_style=e=>e.setAttribute(\\\"tabindex\\\",\\\"0\\\");const s=new class{binaryType=\\\"blob\\\";readyState=0;onopen=null;onmessage=null;port=null;connect(e){this.port=e,e.onmessage=e=>{const{data:t}=e;this.onmessage?.({data:\\\"string\\\"==typeof t?t:new Blob([t],{type:\\\"image/png\\\"})})},this.readyState=1,this.onopen?.()}send(e){this.port?.postMessage(e)}close(){this.port?.close(),this.readyState=3}},o=(e,t)=>e.send_message(\\\"basthon_download\\\",{format:t}),{setTimeout:i}=window;let a;window.setTimeout=()=>0;try{a=new t.figure(\\\"basthon\\\",s,o,n)}finally{window.setTimeout=i}const r=\\\"undefined\\\"!=typeof ResizeObserverEntry&&\\\"devicePixelContentBoxSize\\\"in ResizeObserverEntry.prototype;new MutationObserver(()=>{const{width:e,height:t}=a.canvas;1===s.readyState&&e>0&&t>0&&((()=>{const e=(()=>{const e=window.devicePixelRatio||1,{canvas:t}=a,n=parseFloat(t.style.width);return r&&n>0&&0!==t.width?Math.abs(n*e-t.width)<=1?e:t.width/n:e})();e!==a.ratio&&(a.ratio=e,1===s.readyState&&a.send_message(\\\"set_device_pixel_ratio\\\",{device_pixel_ratio:e}))})(),a.send_message(\\\"refresh\\\",{}))}).observe(a.canvas,{attributeFilter:[\\\"width\\\",\\\"height\\\"]});const d=window.basthonMplImages??{},l=e=>d[e]??e;for(const e of Array.from(n.querySelectorAll(\\\"img\\\"))){const t=e.getAttribute(\\\"src\\\");null!=t&&e.setAttribute(\\\"src\\\",l(t));const n=e.getAttribute(\\\"srcset\\\");null!=n&&e.setAttribute(\\\"srcset\\\",n.replace(/^\\\\S+/,l))}let c=null;const h=()=>{const{body:e}=document,t={type:\\\"size\\\",content:{width:e.offsetWidth,height:e.offsetHeight}};c?.postMessage(t)};new ResizeObserver(h).observe(document.body),window.addEventListener(\\\"message\\\",e=>{const t=e.data;t instanceof MessagePort?0===s.readyState&&s.connect(t):(e=>\\\"gui-port\\\"===e?.type&&e.port instanceof MessagePort)(t)&&(c=t.port,h())})})();</script></body></html>\"}"},"metadata":{}}]},{"metadata":{"trusted":true},"cell_type":"code","source":"tau_reg = -1/a\nprint(f\"On a tau = {tau:.2} et on verifie qe l'abcisse à l'origine est bien ln(10) = {}\")","execution_count":null,"outputs":[]}],"metadata":{"kernelspec":{"name":"python3","display_name":"Python 3","language":"python"}},"nbformat":4,"nbformat_minor":2}