diff --git a/.venv_haddock/lib/python3.12/site-packages/pip-26.0.1.dist-info/licenses/src/pip/_vendor/._tomli b/.venv_haddock/lib/python3.12/site-packages/pip-26.0.1.dist-info/licenses/src/pip/_vendor/._tomli new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/pip-26.0.1.dist-info/licenses/src/pip/_vendor/._tomli differ diff --git a/.venv_haddock/lib/python3.12/site-packages/pip-26.0.1.dist-info/licenses/src/pip/_vendor/._tomli_w b/.venv_haddock/lib/python3.12/site-packages/pip-26.0.1.dist-info/licenses/src/pip/_vendor/._tomli_w new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/pip-26.0.1.dist-info/licenses/src/pip/_vendor/._tomli_w differ diff --git a/.venv_haddock/lib/python3.12/site-packages/pip-26.0.1.dist-info/licenses/src/pip/_vendor/._truststore b/.venv_haddock/lib/python3.12/site-packages/pip-26.0.1.dist-info/licenses/src/pip/_vendor/._truststore new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/pip-26.0.1.dist-info/licenses/src/pip/_vendor/._truststore differ diff --git a/.venv_haddock/lib/python3.12/site-packages/pip-26.0.1.dist-info/licenses/src/pip/_vendor/._urllib3 b/.venv_haddock/lib/python3.12/site-packages/pip-26.0.1.dist-info/licenses/src/pip/_vendor/._urllib3 new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/pip-26.0.1.dist-info/licenses/src/pip/_vendor/._urllib3 differ diff --git a/.venv_haddock/lib/python3.12/site-packages/pip-26.0.1.dist-info/licenses/src/pip/_vendor/cachecontrol/._LICENSE.txt b/.venv_haddock/lib/python3.12/site-packages/pip-26.0.1.dist-info/licenses/src/pip/_vendor/cachecontrol/._LICENSE.txt new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/pip-26.0.1.dist-info/licenses/src/pip/_vendor/cachecontrol/._LICENSE.txt differ diff --git a/.venv_haddock/lib/python3.12/site-packages/pip-26.0.1.dist-info/licenses/src/pip/_vendor/cachecontrol/LICENSE.txt b/.venv_haddock/lib/python3.12/site-packages/pip-26.0.1.dist-info/licenses/src/pip/_vendor/cachecontrol/LICENSE.txt new file mode 100644 index 0000000000000000000000000000000000000000..d8b3b56d361cfaa04de6304c96c328f27266f74e --- /dev/null +++ b/.venv_haddock/lib/python3.12/site-packages/pip-26.0.1.dist-info/licenses/src/pip/_vendor/cachecontrol/LICENSE.txt @@ -0,0 +1,13 @@ +Copyright 2012-2021 Eric Larson + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. diff --git a/.venv_haddock/lib/python3.12/site-packages/pip-26.0.1.dist-info/licenses/src/pip/_vendor/certifi/._LICENSE b/.venv_haddock/lib/python3.12/site-packages/pip-26.0.1.dist-info/licenses/src/pip/_vendor/certifi/._LICENSE new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/pip-26.0.1.dist-info/licenses/src/pip/_vendor/certifi/._LICENSE differ diff --git a/.venv_haddock/lib/python3.12/site-packages/pip-26.0.1.dist-info/licenses/src/pip/_vendor/certifi/LICENSE b/.venv_haddock/lib/python3.12/site-packages/pip-26.0.1.dist-info/licenses/src/pip/_vendor/certifi/LICENSE new file mode 100644 index 0000000000000000000000000000000000000000..62b076cdee58ec8f34034141ba0befd9015b0c7e --- /dev/null +++ b/.venv_haddock/lib/python3.12/site-packages/pip-26.0.1.dist-info/licenses/src/pip/_vendor/certifi/LICENSE @@ -0,0 +1,20 @@ +This package contains a modified version of ca-bundle.crt: + +ca-bundle.crt -- Bundle of CA Root Certificates + +This is a bundle of X.509 certificates of public Certificate Authorities +(CA). These were automatically extracted from Mozilla's root certificates +file (certdata.txt). This file can be found in the mozilla source tree: +https://hg.mozilla.org/mozilla-central/file/tip/security/nss/lib/ckfw/builtins/certdata.txt +It contains the certificates in PEM format and therefore +can be directly used with curl / libcurl / php_curl, or with +an Apache+mod_ssl webserver for SSL client authentication. +Just configure this file as the SSLCACertificateFile.# + +***** BEGIN LICENSE BLOCK ***** +This Source Code Form is subject to the terms of the Mozilla Public License, +v. 2.0. If a copy of the MPL was not distributed with this file, You can obtain +one at http://mozilla.org/MPL/2.0/. + +***** END LICENSE BLOCK ***** +@(#) $RCSfile: certdata.txt,v $ $Revision: 1.80 $ $Date: 2011/11/03 15:11:58 $ diff --git a/.venv_haddock/lib/python3.12/site-packages/pip-26.0.1.dist-info/licenses/src/pip/_vendor/dependency_groups/._LICENSE.txt b/.venv_haddock/lib/python3.12/site-packages/pip-26.0.1.dist-info/licenses/src/pip/_vendor/dependency_groups/._LICENSE.txt new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/pip-26.0.1.dist-info/licenses/src/pip/_vendor/dependency_groups/._LICENSE.txt differ diff --git a/.venv_haddock/lib/python3.12/site-packages/pip-26.0.1.dist-info/licenses/src/pip/_vendor/dependency_groups/LICENSE.txt b/.venv_haddock/lib/python3.12/site-packages/pip-26.0.1.dist-info/licenses/src/pip/_vendor/dependency_groups/LICENSE.txt new file mode 100644 index 0000000000000000000000000000000000000000..b9723b85ed7adb32f8c2b4ee880c06ec3061da50 --- /dev/null +++ b/.venv_haddock/lib/python3.12/site-packages/pip-26.0.1.dist-info/licenses/src/pip/_vendor/dependency_groups/LICENSE.txt @@ -0,0 +1,9 @@ +MIT License + +Copyright (c) 2024-present Stephen Rosen + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/.venv_haddock/lib/python3.12/site-packages/pip-26.0.1.dist-info/licenses/src/pip/_vendor/distlib/._LICENSE.txt b/.venv_haddock/lib/python3.12/site-packages/pip-26.0.1.dist-info/licenses/src/pip/_vendor/distlib/._LICENSE.txt new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/pip-26.0.1.dist-info/licenses/src/pip/_vendor/distlib/._LICENSE.txt differ diff --git a/.venv_haddock/lib/python3.12/site-packages/pip-26.0.1.dist-info/licenses/src/pip/_vendor/distlib/LICENSE.txt b/.venv_haddock/lib/python3.12/site-packages/pip-26.0.1.dist-info/licenses/src/pip/_vendor/distlib/LICENSE.txt new file mode 100644 index 0000000000000000000000000000000000000000..c31ac56d772f7061c8b42f0ee96063b7a94a4859 --- /dev/null +++ b/.venv_haddock/lib/python3.12/site-packages/pip-26.0.1.dist-info/licenses/src/pip/_vendor/distlib/LICENSE.txt @@ -0,0 +1,284 @@ +A. HISTORY OF THE SOFTWARE +========================== + +Python was created in the early 1990s by Guido van Rossum at Stichting +Mathematisch Centrum (CWI, see http://www.cwi.nl) in the Netherlands +as a successor of a language called ABC. Guido remains Python's +principal author, although it includes many contributions from others. + +In 1995, Guido continued his work on Python at the Corporation for +National Research Initiatives (CNRI, see http://www.cnri.reston.va.us) +in Reston, Virginia where he released several versions of the +software. + +In May 2000, Guido and the Python core development team moved to +BeOpen.com to form the BeOpen PythonLabs team. In October of the same +year, the PythonLabs team moved to Digital Creations (now Zope +Corporation, see http://www.zope.com). In 2001, the Python Software +Foundation (PSF, see http://www.python.org/psf/) was formed, a +non-profit organization created specifically to own Python-related +Intellectual Property. Zope Corporation is a sponsoring member of +the PSF. + +All Python releases are Open Source (see http://www.opensource.org for +the Open Source Definition). Historically, most, but not all, Python +releases have also been GPL-compatible; the table below summarizes +the various releases. + + Release Derived Year Owner GPL- + from compatible? (1) + + 0.9.0 thru 1.2 1991-1995 CWI yes + 1.3 thru 1.5.2 1.2 1995-1999 CNRI yes + 1.6 1.5.2 2000 CNRI no + 2.0 1.6 2000 BeOpen.com no + 1.6.1 1.6 2001 CNRI yes (2) + 2.1 2.0+1.6.1 2001 PSF no + 2.0.1 2.0+1.6.1 2001 PSF yes + 2.1.1 2.1+2.0.1 2001 PSF yes + 2.2 2.1.1 2001 PSF yes + 2.1.2 2.1.1 2002 PSF yes + 2.1.3 2.1.2 2002 PSF yes + 2.2.1 2.2 2002 PSF yes + 2.2.2 2.2.1 2002 PSF yes + 2.2.3 2.2.2 2003 PSF yes + 2.3 2.2.2 2002-2003 PSF yes + 2.3.1 2.3 2002-2003 PSF yes + 2.3.2 2.3.1 2002-2003 PSF yes + 2.3.3 2.3.2 2002-2003 PSF yes + 2.3.4 2.3.3 2004 PSF yes + 2.3.5 2.3.4 2005 PSF yes + 2.4 2.3 2004 PSF yes + 2.4.1 2.4 2005 PSF yes + 2.4.2 2.4.1 2005 PSF yes + 2.4.3 2.4.2 2006 PSF yes + 2.4.4 2.4.3 2006 PSF yes + 2.5 2.4 2006 PSF yes + 2.5.1 2.5 2007 PSF yes + 2.5.2 2.5.1 2008 PSF yes + 2.5.3 2.5.2 2008 PSF yes + 2.6 2.5 2008 PSF yes + 2.6.1 2.6 2008 PSF yes + 2.6.2 2.6.1 2009 PSF yes + 2.6.3 2.6.2 2009 PSF yes + 2.6.4 2.6.3 2009 PSF yes + 2.6.5 2.6.4 2010 PSF yes + 3.0 2.6 2008 PSF yes + 3.0.1 3.0 2009 PSF yes + 3.1 3.0.1 2009 PSF yes + 3.1.1 3.1 2009 PSF yes + 3.1.2 3.1 2010 PSF yes + 3.2 3.1 2010 PSF yes + +Footnotes: + +(1) GPL-compatible doesn't mean that we're distributing Python under + the GPL. All Python licenses, unlike the GPL, let you distribute + a modified version without making your changes open source. The + GPL-compatible licenses make it possible to combine Python with + other software that is released under the GPL; the others don't. + +(2) According to Richard Stallman, 1.6.1 is not GPL-compatible, + because its license has a choice of law clause. According to + CNRI, however, Stallman's lawyer has told CNRI's lawyer that 1.6.1 + is "not incompatible" with the GPL. + +Thanks to the many outside volunteers who have worked under Guido's +direction to make these releases possible. + + +B. TERMS AND CONDITIONS FOR ACCESSING OR OTHERWISE USING PYTHON +=============================================================== + +PYTHON SOFTWARE FOUNDATION LICENSE VERSION 2 +-------------------------------------------- + +1. This LICENSE AGREEMENT is between the Python Software Foundation +("PSF"), and the Individual or Organization ("Licensee") accessing and +otherwise using this software ("Python") in source or binary form and +its associated documentation. + +2. Subject to the terms and conditions of this License Agreement, PSF hereby +grants Licensee a nonexclusive, royalty-free, world-wide license to reproduce, +analyze, test, perform and/or display publicly, prepare derivative works, +distribute, and otherwise use Python alone or in any derivative version, +provided, however, that PSF's License Agreement and PSF's notice of copyright, +i.e., "Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 +Python Software Foundation; All Rights Reserved" are retained in Python alone or +in any derivative version prepared by Licensee. + +3. In the event Licensee prepares a derivative work that is based on +or incorporates Python or any part thereof, and wants to make +the derivative work available to others as provided herein, then +Licensee hereby agrees to include in any such work a brief summary of +the changes made to Python. + +4. PSF is making Python available to Licensee on an "AS IS" +basis. PSF MAKES NO REPRESENTATIONS OR WARRANTIES, EXPRESS OR +IMPLIED. BY WAY OF EXAMPLE, BUT NOT LIMITATION, PSF MAKES NO AND +DISCLAIMS ANY REPRESENTATION OR WARRANTY OF MERCHANTABILITY OR FITNESS +FOR ANY PARTICULAR PURPOSE OR THAT THE USE OF PYTHON WILL NOT +INFRINGE ANY THIRD PARTY RIGHTS. + +5. PSF SHALL NOT BE LIABLE TO LICENSEE OR ANY OTHER USERS OF PYTHON +FOR ANY INCIDENTAL, SPECIAL, OR CONSEQUENTIAL DAMAGES OR LOSS AS +A RESULT OF MODIFYING, DISTRIBUTING, OR OTHERWISE USING PYTHON, +OR ANY DERIVATIVE THEREOF, EVEN IF ADVISED OF THE POSSIBILITY THEREOF. + +6. This License Agreement will automatically terminate upon a material +breach of its terms and conditions. + +7. Nothing in this License Agreement shall be deemed to create any +relationship of agency, partnership, or joint venture between PSF and +Licensee. This License Agreement does not grant permission to use PSF +trademarks or trade name in a trademark sense to endorse or promote +products or services of Licensee, or any third party. + +8. By copying, installing or otherwise using Python, Licensee +agrees to be bound by the terms and conditions of this License +Agreement. + + +BEOPEN.COM LICENSE AGREEMENT FOR PYTHON 2.0 +------------------------------------------- + +BEOPEN PYTHON OPEN SOURCE LICENSE AGREEMENT VERSION 1 + +1. This LICENSE AGREEMENT is between BeOpen.com ("BeOpen"), having an +office at 160 Saratoga Avenue, Santa Clara, CA 95051, and the +Individual or Organization ("Licensee") accessing and otherwise using +this software in source or binary form and its associated +documentation ("the Software"). + +2. Subject to the terms and conditions of this BeOpen Python License +Agreement, BeOpen hereby grants Licensee a non-exclusive, +royalty-free, world-wide license to reproduce, analyze, test, perform +and/or display publicly, prepare derivative works, distribute, and +otherwise use the Software alone or in any derivative version, +provided, however, that the BeOpen Python License is retained in the +Software, alone or in any derivative version prepared by Licensee. + +3. BeOpen is making the Software available to Licensee on an "AS IS" +basis. BEOPEN MAKES NO REPRESENTATIONS OR WARRANTIES, EXPRESS OR +IMPLIED. BY WAY OF EXAMPLE, BUT NOT LIMITATION, BEOPEN MAKES NO AND +DISCLAIMS ANY REPRESENTATION OR WARRANTY OF MERCHANTABILITY OR FITNESS +FOR ANY PARTICULAR PURPOSE OR THAT THE USE OF THE SOFTWARE WILL NOT +INFRINGE ANY THIRD PARTY RIGHTS. + +4. BEOPEN SHALL NOT BE LIABLE TO LICENSEE OR ANY OTHER USERS OF THE +SOFTWARE FOR ANY INCIDENTAL, SPECIAL, OR CONSEQUENTIAL DAMAGES OR LOSS +AS A RESULT OF USING, MODIFYING OR DISTRIBUTING THE SOFTWARE, OR ANY +DERIVATIVE THEREOF, EVEN IF ADVISED OF THE POSSIBILITY THEREOF. + +5. This License Agreement will automatically terminate upon a material +breach of its terms and conditions. + +6. This License Agreement shall be governed by and interpreted in all +respects by the law of the State of California, excluding conflict of +law provisions. Nothing in this License Agreement shall be deemed to +create any relationship of agency, partnership, or joint venture +between BeOpen and Licensee. This License Agreement does not grant +permission to use BeOpen trademarks or trade names in a trademark +sense to endorse or promote products or services of Licensee, or any +third party. As an exception, the "BeOpen Python" logos available at +http://www.pythonlabs.com/logos.html may be used according to the +permissions granted on that web page. + +7. By copying, installing or otherwise using the software, Licensee +agrees to be bound by the terms and conditions of this License +Agreement. + + +CNRI LICENSE AGREEMENT FOR PYTHON 1.6.1 +--------------------------------------- + +1. This LICENSE AGREEMENT is between the Corporation for National +Research Initiatives, having an office at 1895 Preston White Drive, +Reston, VA 20191 ("CNRI"), and the Individual or Organization +("Licensee") accessing and otherwise using Python 1.6.1 software in +source or binary form and its associated documentation. + +2. Subject to the terms and conditions of this License Agreement, CNRI +hereby grants Licensee a nonexclusive, royalty-free, world-wide +license to reproduce, analyze, test, perform and/or display publicly, +prepare derivative works, distribute, and otherwise use Python 1.6.1 +alone or in any derivative version, provided, however, that CNRI's +License Agreement and CNRI's notice of copyright, i.e., "Copyright (c) +1995-2001 Corporation for National Research Initiatives; All Rights +Reserved" are retained in Python 1.6.1 alone or in any derivative +version prepared by Licensee. Alternately, in lieu of CNRI's License +Agreement, Licensee may substitute the following text (omitting the +quotes): "Python 1.6.1 is made available subject to the terms and +conditions in CNRI's License Agreement. This Agreement together with +Python 1.6.1 may be located on the Internet using the following +unique, persistent identifier (known as a handle): 1895.22/1013. This +Agreement may also be obtained from a proxy server on the Internet +using the following URL: http://hdl.handle.net/1895.22/1013". + +3. In the event Licensee prepares a derivative work that is based on +or incorporates Python 1.6.1 or any part thereof, and wants to make +the derivative work available to others as provided herein, then +Licensee hereby agrees to include in any such work a brief summary of +the changes made to Python 1.6.1. + +4. CNRI is making Python 1.6.1 available to Licensee on an "AS IS" +basis. CNRI MAKES NO REPRESENTATIONS OR WARRANTIES, EXPRESS OR +IMPLIED. BY WAY OF EXAMPLE, BUT NOT LIMITATION, CNRI MAKES NO AND +DISCLAIMS ANY REPRESENTATION OR WARRANTY OF MERCHANTABILITY OR FITNESS +FOR ANY PARTICULAR PURPOSE OR THAT THE USE OF PYTHON 1.6.1 WILL NOT +INFRINGE ANY THIRD PARTY RIGHTS. + +5. CNRI SHALL NOT BE LIABLE TO LICENSEE OR ANY OTHER USERS OF PYTHON +1.6.1 FOR ANY INCIDENTAL, SPECIAL, OR CONSEQUENTIAL DAMAGES OR LOSS AS +A RESULT OF MODIFYING, DISTRIBUTING, OR OTHERWISE USING PYTHON 1.6.1, +OR ANY DERIVATIVE THEREOF, EVEN IF ADVISED OF THE POSSIBILITY THEREOF. + +6. This License Agreement will automatically terminate upon a material +breach of its terms and conditions. + +7. This License Agreement shall be governed by the federal +intellectual property law of the United States, including without +limitation the federal copyright law, and, to the extent such +U.S. federal law does not apply, by the law of the Commonwealth of +Virginia, excluding Virginia's conflict of law provisions. +Notwithstanding the foregoing, with regard to derivative works based +on Python 1.6.1 that incorporate non-separable material that was +previously distributed under the GNU General Public License (GPL), the +law of the Commonwealth of Virginia shall govern this License +Agreement only as to issues arising under or with respect to +Paragraphs 4, 5, and 7 of this License Agreement. Nothing in this +License Agreement shall be deemed to create any relationship of +agency, partnership, or joint venture between CNRI and Licensee. This +License Agreement does not grant permission to use CNRI trademarks or +trade name in a trademark sense to endorse or promote products or +services of Licensee, or any third party. + +8. By clicking on the "ACCEPT" button where indicated, or by copying, +installing or otherwise using Python 1.6.1, Licensee agrees to be +bound by the terms and conditions of this License Agreement. + + ACCEPT + + +CWI LICENSE AGREEMENT FOR PYTHON 0.9.0 THROUGH 1.2 +-------------------------------------------------- + +Copyright (c) 1991 - 1995, Stichting Mathematisch Centrum Amsterdam, +The Netherlands. All rights reserved. + +Permission to use, copy, modify, and distribute this software and its +documentation for any purpose and without fee is hereby granted, +provided that the above copyright notice appear in all copies and that +both that copyright notice and this permission notice appear in +supporting documentation, and that the name of Stichting Mathematisch +Centrum or CWI not be used in advertising or publicity pertaining to +distribution of the software without specific, written prior +permission. + +STICHTING MATHEMATISCH CENTRUM DISCLAIMS ALL WARRANTIES WITH REGARD TO +THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND +FITNESS, IN NO EVENT SHALL STICHTING MATHEMATISCH CENTRUM BE LIABLE +FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT +OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. diff --git a/.venv_haddock/lib/python3.12/site-packages/pip-26.0.1.dist-info/licenses/src/pip/_vendor/distro/._LICENSE b/.venv_haddock/lib/python3.12/site-packages/pip-26.0.1.dist-info/licenses/src/pip/_vendor/distro/._LICENSE new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/pip-26.0.1.dist-info/licenses/src/pip/_vendor/distro/._LICENSE differ diff --git a/.venv_haddock/lib/python3.12/site-packages/pip-26.0.1.dist-info/licenses/src/pip/_vendor/distro/LICENSE b/.venv_haddock/lib/python3.12/site-packages/pip-26.0.1.dist-info/licenses/src/pip/_vendor/distro/LICENSE new file mode 100644 index 0000000000000000000000000000000000000000..e06d2081865a766a8668acc12878f98b27fc9ea0 --- /dev/null +++ b/.venv_haddock/lib/python3.12/site-packages/pip-26.0.1.dist-info/licenses/src/pip/_vendor/distro/LICENSE @@ -0,0 +1,202 @@ +Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "{}" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright {yyyy} {name of copyright owner} + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + diff --git a/.venv_haddock/lib/python3.12/site-packages/pip-26.0.1.dist-info/licenses/src/pip/_vendor/idna/._LICENSE.md b/.venv_haddock/lib/python3.12/site-packages/pip-26.0.1.dist-info/licenses/src/pip/_vendor/idna/._LICENSE.md new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/pip-26.0.1.dist-info/licenses/src/pip/_vendor/idna/._LICENSE.md differ diff --git a/.venv_haddock/lib/python3.12/site-packages/pip-26.0.1.dist-info/licenses/src/pip/_vendor/idna/LICENSE.md b/.venv_haddock/lib/python3.12/site-packages/pip-26.0.1.dist-info/licenses/src/pip/_vendor/idna/LICENSE.md new file mode 100644 index 0000000000000000000000000000000000000000..256ba90cd91190a6c980bd44663dc51c201c14d3 --- /dev/null +++ b/.venv_haddock/lib/python3.12/site-packages/pip-26.0.1.dist-info/licenses/src/pip/_vendor/idna/LICENSE.md @@ -0,0 +1,31 @@ +BSD 3-Clause License + +Copyright (c) 2013-2025, Kim Davies and contributors. +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + +1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + +2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + +3. Neither the name of the copyright holder nor the names of its + contributors may be used to endorse or promote products derived from + this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED +TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF +LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING +NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/.venv_haddock/lib/python3.12/site-packages/pip-26.0.1.dist-info/licenses/src/pip/_vendor/msgpack/._COPYING b/.venv_haddock/lib/python3.12/site-packages/pip-26.0.1.dist-info/licenses/src/pip/_vendor/msgpack/._COPYING new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/pip-26.0.1.dist-info/licenses/src/pip/_vendor/msgpack/._COPYING differ diff --git a/.venv_haddock/lib/python3.12/site-packages/pip-26.0.1.dist-info/licenses/src/pip/_vendor/msgpack/COPYING b/.venv_haddock/lib/python3.12/site-packages/pip-26.0.1.dist-info/licenses/src/pip/_vendor/msgpack/COPYING new file mode 100644 index 0000000000000000000000000000000000000000..f067af3aae15a5b494f0eeb15a7064c176e30fd5 --- /dev/null +++ b/.venv_haddock/lib/python3.12/site-packages/pip-26.0.1.dist-info/licenses/src/pip/_vendor/msgpack/COPYING @@ -0,0 +1,14 @@ +Copyright (C) 2008-2011 INADA Naoki + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + diff --git a/.venv_haddock/lib/python3.12/site-packages/pip-26.0.1.dist-info/licenses/src/pip/_vendor/packaging/._LICENSE b/.venv_haddock/lib/python3.12/site-packages/pip-26.0.1.dist-info/licenses/src/pip/_vendor/packaging/._LICENSE new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/pip-26.0.1.dist-info/licenses/src/pip/_vendor/packaging/._LICENSE differ diff --git a/.venv_haddock/lib/python3.12/site-packages/pip-26.0.1.dist-info/licenses/src/pip/_vendor/packaging/._LICENSE.APACHE b/.venv_haddock/lib/python3.12/site-packages/pip-26.0.1.dist-info/licenses/src/pip/_vendor/packaging/._LICENSE.APACHE new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/pip-26.0.1.dist-info/licenses/src/pip/_vendor/packaging/._LICENSE.APACHE differ diff --git a/.venv_haddock/lib/python3.12/site-packages/pip-26.0.1.dist-info/licenses/src/pip/_vendor/packaging/._LICENSE.BSD b/.venv_haddock/lib/python3.12/site-packages/pip-26.0.1.dist-info/licenses/src/pip/_vendor/packaging/._LICENSE.BSD new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/pip-26.0.1.dist-info/licenses/src/pip/_vendor/packaging/._LICENSE.BSD differ diff --git a/.venv_haddock/lib/python3.12/site-packages/pip-26.0.1.dist-info/licenses/src/pip/_vendor/packaging/LICENSE b/.venv_haddock/lib/python3.12/site-packages/pip-26.0.1.dist-info/licenses/src/pip/_vendor/packaging/LICENSE new file mode 100644 index 0000000000000000000000000000000000000000..6f62d44e4ef733c0e713afcd2371fed7f2b3de67 --- /dev/null +++ b/.venv_haddock/lib/python3.12/site-packages/pip-26.0.1.dist-info/licenses/src/pip/_vendor/packaging/LICENSE @@ -0,0 +1,3 @@ +This software is made available under the terms of *either* of the licenses +found in LICENSE.APACHE or LICENSE.BSD. Contributions to this software is made +under the terms of *both* these licenses. diff --git a/.venv_haddock/lib/python3.12/site-packages/pip-26.0.1.dist-info/licenses/src/pip/_vendor/packaging/LICENSE.APACHE b/.venv_haddock/lib/python3.12/site-packages/pip-26.0.1.dist-info/licenses/src/pip/_vendor/packaging/LICENSE.APACHE new file mode 100644 index 0000000000000000000000000000000000000000..f433b1a53f5b830a205fd2df78e2b34974656c7b --- /dev/null +++ b/.venv_haddock/lib/python3.12/site-packages/pip-26.0.1.dist-info/licenses/src/pip/_vendor/packaging/LICENSE.APACHE @@ -0,0 +1,177 @@ + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS diff --git a/.venv_haddock/lib/python3.12/site-packages/pip-26.0.1.dist-info/licenses/src/pip/_vendor/packaging/LICENSE.BSD b/.venv_haddock/lib/python3.12/site-packages/pip-26.0.1.dist-info/licenses/src/pip/_vendor/packaging/LICENSE.BSD new file mode 100644 index 0000000000000000000000000000000000000000..42ce7b75c92fb01a3f6ed17eea363f756b7da582 --- /dev/null +++ b/.venv_haddock/lib/python3.12/site-packages/pip-26.0.1.dist-info/licenses/src/pip/_vendor/packaging/LICENSE.BSD @@ -0,0 +1,23 @@ +Copyright (c) Donald Stufft and individual contributors. +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer. + + 2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/.venv_haddock/lib/python3.12/site-packages/pip-26.0.1.dist-info/licenses/src/pip/_vendor/pkg_resources/._LICENSE b/.venv_haddock/lib/python3.12/site-packages/pip-26.0.1.dist-info/licenses/src/pip/_vendor/pkg_resources/._LICENSE new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/pip-26.0.1.dist-info/licenses/src/pip/_vendor/pkg_resources/._LICENSE differ diff --git a/.venv_haddock/lib/python3.12/site-packages/pip-26.0.1.dist-info/licenses/src/pip/_vendor/pkg_resources/LICENSE b/.venv_haddock/lib/python3.12/site-packages/pip-26.0.1.dist-info/licenses/src/pip/_vendor/pkg_resources/LICENSE new file mode 100644 index 0000000000000000000000000000000000000000..1bb5a44356f00884a71ceeefd24ded6caaba2418 --- /dev/null +++ b/.venv_haddock/lib/python3.12/site-packages/pip-26.0.1.dist-info/licenses/src/pip/_vendor/pkg_resources/LICENSE @@ -0,0 +1,17 @@ +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to +deal in the Software without restriction, including without limitation the +rights to use, copy, modify, merge, publish, distribute, sublicense, and/or +sell copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS +IN THE SOFTWARE. diff --git a/.venv_haddock/lib/python3.12/site-packages/pip-26.0.1.dist-info/licenses/src/pip/_vendor/platformdirs/._LICENSE b/.venv_haddock/lib/python3.12/site-packages/pip-26.0.1.dist-info/licenses/src/pip/_vendor/platformdirs/._LICENSE new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/pip-26.0.1.dist-info/licenses/src/pip/_vendor/platformdirs/._LICENSE differ diff --git a/.venv_haddock/lib/python3.12/site-packages/pip-26.0.1.dist-info/licenses/src/pip/_vendor/platformdirs/LICENSE b/.venv_haddock/lib/python3.12/site-packages/pip-26.0.1.dist-info/licenses/src/pip/_vendor/platformdirs/LICENSE new file mode 100644 index 0000000000000000000000000000000000000000..f35fed9191b1142ddaada8a96de4a9461c5d796c --- /dev/null +++ b/.venv_haddock/lib/python3.12/site-packages/pip-26.0.1.dist-info/licenses/src/pip/_vendor/platformdirs/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2010-202x The platformdirs developers + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/.venv_haddock/lib/python3.12/site-packages/pip-26.0.1.dist-info/licenses/src/pip/_vendor/pygments/._LICENSE b/.venv_haddock/lib/python3.12/site-packages/pip-26.0.1.dist-info/licenses/src/pip/_vendor/pygments/._LICENSE new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/pip-26.0.1.dist-info/licenses/src/pip/_vendor/pygments/._LICENSE differ diff --git a/.venv_haddock/lib/python3.12/site-packages/pip-26.0.1.dist-info/licenses/src/pip/_vendor/pygments/LICENSE b/.venv_haddock/lib/python3.12/site-packages/pip-26.0.1.dist-info/licenses/src/pip/_vendor/pygments/LICENSE new file mode 100644 index 0000000000000000000000000000000000000000..446a1a805c8a949579fb8a9799f2bec7777349dc --- /dev/null +++ b/.venv_haddock/lib/python3.12/site-packages/pip-26.0.1.dist-info/licenses/src/pip/_vendor/pygments/LICENSE @@ -0,0 +1,25 @@ +Copyright (c) 2006-2022 by the respective authors (see AUTHORS file). +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + +* Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + +* Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/.venv_haddock/lib/python3.12/site-packages/pip-26.0.1.dist-info/licenses/src/pip/_vendor/pyproject_hooks/._LICENSE b/.venv_haddock/lib/python3.12/site-packages/pip-26.0.1.dist-info/licenses/src/pip/_vendor/pyproject_hooks/._LICENSE new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/pip-26.0.1.dist-info/licenses/src/pip/_vendor/pyproject_hooks/._LICENSE differ diff --git a/.venv_haddock/lib/python3.12/site-packages/pip-26.0.1.dist-info/licenses/src/pip/_vendor/pyproject_hooks/LICENSE b/.venv_haddock/lib/python3.12/site-packages/pip-26.0.1.dist-info/licenses/src/pip/_vendor/pyproject_hooks/LICENSE new file mode 100644 index 0000000000000000000000000000000000000000..b0ae9dbc262b5f7ed4cb6f964cfb5eb5c0d0b0be --- /dev/null +++ b/.venv_haddock/lib/python3.12/site-packages/pip-26.0.1.dist-info/licenses/src/pip/_vendor/pyproject_hooks/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2017 Thomas Kluyver + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/.venv_haddock/lib/python3.12/site-packages/pip-26.0.1.dist-info/licenses/src/pip/_vendor/requests/._LICENSE b/.venv_haddock/lib/python3.12/site-packages/pip-26.0.1.dist-info/licenses/src/pip/_vendor/requests/._LICENSE new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/pip-26.0.1.dist-info/licenses/src/pip/_vendor/requests/._LICENSE differ diff --git a/.venv_haddock/lib/python3.12/site-packages/pip-26.0.1.dist-info/licenses/src/pip/_vendor/requests/LICENSE b/.venv_haddock/lib/python3.12/site-packages/pip-26.0.1.dist-info/licenses/src/pip/_vendor/requests/LICENSE new file mode 100644 index 0000000000000000000000000000000000000000..67db8588217f266eb561f75fae738656325deac9 --- /dev/null +++ b/.venv_haddock/lib/python3.12/site-packages/pip-26.0.1.dist-info/licenses/src/pip/_vendor/requests/LICENSE @@ -0,0 +1,175 @@ + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. diff --git a/.venv_haddock/lib/python3.12/site-packages/pip-26.0.1.dist-info/licenses/src/pip/_vendor/resolvelib/._LICENSE b/.venv_haddock/lib/python3.12/site-packages/pip-26.0.1.dist-info/licenses/src/pip/_vendor/resolvelib/._LICENSE new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/pip-26.0.1.dist-info/licenses/src/pip/_vendor/resolvelib/._LICENSE differ diff --git a/.venv_haddock/lib/python3.12/site-packages/pip-26.0.1.dist-info/licenses/src/pip/_vendor/resolvelib/LICENSE b/.venv_haddock/lib/python3.12/site-packages/pip-26.0.1.dist-info/licenses/src/pip/_vendor/resolvelib/LICENSE new file mode 100644 index 0000000000000000000000000000000000000000..b9077766e9b9bdcae49ea5c8fced750ed13ec8f7 --- /dev/null +++ b/.venv_haddock/lib/python3.12/site-packages/pip-26.0.1.dist-info/licenses/src/pip/_vendor/resolvelib/LICENSE @@ -0,0 +1,13 @@ +Copyright (c) 2018, Tzu-ping Chung + +Permission to use, copy, modify, and distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF +OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. diff --git a/.venv_haddock/lib/python3.12/site-packages/pip-26.0.1.dist-info/licenses/src/pip/_vendor/rich/._LICENSE b/.venv_haddock/lib/python3.12/site-packages/pip-26.0.1.dist-info/licenses/src/pip/_vendor/rich/._LICENSE new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/pip-26.0.1.dist-info/licenses/src/pip/_vendor/rich/._LICENSE differ diff --git a/.venv_haddock/lib/python3.12/site-packages/pip-26.0.1.dist-info/licenses/src/pip/_vendor/rich/LICENSE b/.venv_haddock/lib/python3.12/site-packages/pip-26.0.1.dist-info/licenses/src/pip/_vendor/rich/LICENSE new file mode 100644 index 0000000000000000000000000000000000000000..4415505566f261c802b671426be529a31f914137 --- /dev/null +++ b/.venv_haddock/lib/python3.12/site-packages/pip-26.0.1.dist-info/licenses/src/pip/_vendor/rich/LICENSE @@ -0,0 +1,19 @@ +Copyright (c) 2020 Will McGugan + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/.venv_haddock/lib/python3.12/site-packages/pip-26.0.1.dist-info/licenses/src/pip/_vendor/tomli/._LICENSE b/.venv_haddock/lib/python3.12/site-packages/pip-26.0.1.dist-info/licenses/src/pip/_vendor/tomli/._LICENSE new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/pip-26.0.1.dist-info/licenses/src/pip/_vendor/tomli/._LICENSE differ diff --git a/.venv_haddock/lib/python3.12/site-packages/pip-26.0.1.dist-info/licenses/src/pip/_vendor/tomli/LICENSE b/.venv_haddock/lib/python3.12/site-packages/pip-26.0.1.dist-info/licenses/src/pip/_vendor/tomli/LICENSE new file mode 100644 index 0000000000000000000000000000000000000000..e859590f886cd78344206af1a8ccb3080d4385e0 --- /dev/null +++ b/.venv_haddock/lib/python3.12/site-packages/pip-26.0.1.dist-info/licenses/src/pip/_vendor/tomli/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2021 Taneli Hukkinen + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/.venv_haddock/lib/python3.12/site-packages/pip-26.0.1.dist-info/licenses/src/pip/_vendor/tomli_w/._LICENSE b/.venv_haddock/lib/python3.12/site-packages/pip-26.0.1.dist-info/licenses/src/pip/_vendor/tomli_w/._LICENSE new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/pip-26.0.1.dist-info/licenses/src/pip/_vendor/tomli_w/._LICENSE differ diff --git a/.venv_haddock/lib/python3.12/site-packages/pip-26.0.1.dist-info/licenses/src/pip/_vendor/tomli_w/LICENSE b/.venv_haddock/lib/python3.12/site-packages/pip-26.0.1.dist-info/licenses/src/pip/_vendor/tomli_w/LICENSE new file mode 100644 index 0000000000000000000000000000000000000000..e859590f886cd78344206af1a8ccb3080d4385e0 --- /dev/null +++ b/.venv_haddock/lib/python3.12/site-packages/pip-26.0.1.dist-info/licenses/src/pip/_vendor/tomli_w/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2021 Taneli Hukkinen + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/.venv_haddock/lib/python3.12/site-packages/pip-26.0.1.dist-info/licenses/src/pip/_vendor/truststore/._LICENSE b/.venv_haddock/lib/python3.12/site-packages/pip-26.0.1.dist-info/licenses/src/pip/_vendor/truststore/._LICENSE new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/pip-26.0.1.dist-info/licenses/src/pip/_vendor/truststore/._LICENSE differ diff --git a/.venv_haddock/lib/python3.12/site-packages/pip-26.0.1.dist-info/licenses/src/pip/_vendor/truststore/LICENSE b/.venv_haddock/lib/python3.12/site-packages/pip-26.0.1.dist-info/licenses/src/pip/_vendor/truststore/LICENSE new file mode 100644 index 0000000000000000000000000000000000000000..7ec568c1136eb8ec86aa05cf7abacfb54c3e5ead --- /dev/null +++ b/.venv_haddock/lib/python3.12/site-packages/pip-26.0.1.dist-info/licenses/src/pip/_vendor/truststore/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2022 Seth Michael Larson + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/.venv_haddock/lib/python3.12/site-packages/pip-26.0.1.dist-info/licenses/src/pip/_vendor/urllib3/._LICENSE.txt b/.venv_haddock/lib/python3.12/site-packages/pip-26.0.1.dist-info/licenses/src/pip/_vendor/urllib3/._LICENSE.txt new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/pip-26.0.1.dist-info/licenses/src/pip/_vendor/urllib3/._LICENSE.txt differ diff --git a/.venv_haddock/lib/python3.12/site-packages/pip-26.0.1.dist-info/licenses/src/pip/_vendor/urllib3/LICENSE.txt b/.venv_haddock/lib/python3.12/site-packages/pip-26.0.1.dist-info/licenses/src/pip/_vendor/urllib3/LICENSE.txt new file mode 100644 index 0000000000000000000000000000000000000000..429a1767e4476707d2e45ee499e3c834ca4b187f --- /dev/null +++ b/.venv_haddock/lib/python3.12/site-packages/pip-26.0.1.dist-info/licenses/src/pip/_vendor/urllib3/LICENSE.txt @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2008-2020 Andrey Petrov and contributors (see CONTRIBUTORS.txt) + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/.___init__.py b/.venv_haddock/lib/python3.12/site-packages/plotly/.___init__.py new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/.___init__.py differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/.___pycache__ b/.venv_haddock/lib/python3.12/site-packages/plotly/.___pycache__ new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/.___pycache__ differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/.__subplots.py b/.venv_haddock/lib/python3.12/site-packages/plotly/.__subplots.py new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/.__subplots.py differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/._animation.py b/.venv_haddock/lib/python3.12/site-packages/plotly/._animation.py new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/._animation.py differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/._api b/.venv_haddock/lib/python3.12/site-packages/plotly/._api new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/._api differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/._basedatatypes.py b/.venv_haddock/lib/python3.12/site-packages/plotly/._basedatatypes.py new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/._basedatatypes.py differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/._basewidget.py b/.venv_haddock/lib/python3.12/site-packages/plotly/._basewidget.py new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/._basewidget.py differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/._callbacks.py b/.venv_haddock/lib/python3.12/site-packages/plotly/._callbacks.py new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/._callbacks.py differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/._colors b/.venv_haddock/lib/python3.12/site-packages/plotly/._colors new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/._colors differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/._conftest.py b/.venv_haddock/lib/python3.12/site-packages/plotly/._conftest.py new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/._conftest.py differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/._data b/.venv_haddock/lib/python3.12/site-packages/plotly/._data new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/._data differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/._exceptions.py b/.venv_haddock/lib/python3.12/site-packages/plotly/._exceptions.py new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/._exceptions.py differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/._express b/.venv_haddock/lib/python3.12/site-packages/plotly/._express new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/._express differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/._figure_factory b/.venv_haddock/lib/python3.12/site-packages/plotly/._figure_factory new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/._figure_factory differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/._files.py b/.venv_haddock/lib/python3.12/site-packages/plotly/._files.py new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/._files.py differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/._graph_objects b/.venv_haddock/lib/python3.12/site-packages/plotly/._graph_objects new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/._graph_objects differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/._graph_objs b/.venv_haddock/lib/python3.12/site-packages/plotly/._graph_objs new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/._graph_objs differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/._io b/.venv_haddock/lib/python3.12/site-packages/plotly/._io new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/._io differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/._labextension b/.venv_haddock/lib/python3.12/site-packages/plotly/._labextension new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/._labextension differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/._matplotlylib b/.venv_haddock/lib/python3.12/site-packages/plotly/._matplotlylib new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/._matplotlylib differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/._missing_anywidget.py b/.venv_haddock/lib/python3.12/site-packages/plotly/._missing_anywidget.py new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/._missing_anywidget.py differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/._offline b/.venv_haddock/lib/python3.12/site-packages/plotly/._offline new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/._offline differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/._optional_imports.py b/.venv_haddock/lib/python3.12/site-packages/plotly/._optional_imports.py new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/._optional_imports.py differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/._package_data b/.venv_haddock/lib/python3.12/site-packages/plotly/._package_data new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/._package_data differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/._serializers.py b/.venv_haddock/lib/python3.12/site-packages/plotly/._serializers.py new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/._serializers.py differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/._shapeannotation.py b/.venv_haddock/lib/python3.12/site-packages/plotly/._shapeannotation.py new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/._shapeannotation.py differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/._subplots.py b/.venv_haddock/lib/python3.12/site-packages/plotly/._subplots.py new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/._subplots.py differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/._tools.py b/.venv_haddock/lib/python3.12/site-packages/plotly/._tools.py new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/._tools.py differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/._utils.py b/.venv_haddock/lib/python3.12/site-packages/plotly/._utils.py new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/._utils.py differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/._validator_cache.py b/.venv_haddock/lib/python3.12/site-packages/plotly/._validator_cache.py new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/._validator_cache.py differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/._validators b/.venv_haddock/lib/python3.12/site-packages/plotly/._validators new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/._validators differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/__init__.py b/.venv_haddock/lib/python3.12/site-packages/plotly/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..8caefd30072c55db8e491beabd29cdffa913bb3b --- /dev/null +++ b/.venv_haddock/lib/python3.12/site-packages/plotly/__init__.py @@ -0,0 +1,194 @@ +""" +https://plot.ly/python/ + +Plotly's Python API allows users to programmatically access Plotly's +server resources. + +This package is organized as follows: + +Subpackages: + +- plotly: all functionality that requires access to Plotly's servers + +- graph_objs: objects for designing figures and visualizing data + +- matplotlylib: tools to convert matplotlib figures + +Modules: + +- tools: some helpful tools that do not require access to Plotly's servers + +- utils: functions that you probably won't need, but that subpackages use + +- version: holds the current API version + +- exceptions: defines our custom exception classes + +""" + +from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import +import importlib.metadata + +# This is the version of the plotly package +__version__ = importlib.metadata.version("plotly") +version = __version__ + +if TYPE_CHECKING: + from plotly import ( + graph_objs, + tools, + utils, + offline, + colors, + io, + data, + ) + from plotly.version import __version__ + + __all__ = [ + "graph_objs", + "tools", + "utils", + "offline", + "colors", + "io", + "data", + "__version__", + ] + + # Set default template (for >= 3.7 this is done in ploty/io/__init__.py) + from plotly.io import templates + + templates._default = "plotly" +else: + __all__, __getattr__, __dir__ = relative_import( + __name__, + [ + ".graph_objs", + ".graph_objects", + ".tools", + ".utils", + ".offline", + ".colors", + ".io", + ".data", + ], + [".version.__version__"], + ) + + +def plot(data_frame, kind, **kwargs): + """ + Pandas plotting backend function, not meant to be called directly. + To activate, set pandas.options.plotting.backend="plotly" + See https://github.com/pandas-dev/pandas/blob/master/pandas/plotting/__init__.py + """ + from .express import ( + scatter, + line, + area, + bar, + box, + histogram, + violin, + strip, + funnel, + density_contour, + density_heatmap, + imshow, + ) + + if kind == "scatter": + new_kwargs = {k: kwargs[k] for k in kwargs if k not in ["s", "c"]} + return scatter(data_frame, **new_kwargs) + if kind == "line": + return line(data_frame, **kwargs) + if kind == "area": + new_kwargs = {k: kwargs[k] for k in kwargs if k not in ["stacked"]} + return area(data_frame, **new_kwargs) + if kind == "bar": + return bar(data_frame, **kwargs) + if kind == "barh": + return bar(data_frame, orientation="h", **kwargs) + if kind == "box": + new_kwargs = {k: kwargs[k] for k in kwargs if k not in ["by"]} + return box(data_frame, **new_kwargs) + if kind in ["hist", "histogram"]: + new_kwargs = {k: kwargs[k] for k in kwargs if k not in ["by", "bins"]} + return histogram(data_frame, **new_kwargs) + if kind == "violin": + return violin(data_frame, **kwargs) + if kind == "strip": + return strip(data_frame, **kwargs) + if kind == "funnel": + return funnel(data_frame, **kwargs) + if kind == "density_contour": + return density_contour(data_frame, **kwargs) + if kind == "density_heatmap": + return density_heatmap(data_frame, **kwargs) + if kind == "imshow": + return imshow(data_frame, **kwargs) + if kind == "heatmap": + raise ValueError( + "kind='heatmap' not supported plotting.backend='plotly'. " + "Please use kind='imshow' or kind='density_heatmap'." + ) + + raise NotImplementedError( + "kind='%s' not yet supported for plotting.backend='plotly'" % kind + ) + + +def boxplot_frame(data_frame, **kwargs): + """ + Pandas plotting backend function, not meant to be called directly. + To activate, set pandas.options.plotting.backend="plotly" + See https://github.com/pandas-dev/pandas/blob/master/pandas/plotting/__init__.py + """ + from .express import box + + skip = ["by", "column", "ax", "fontsize", "rot", "grid", "figsize", "layout"] + skip += ["return_type"] + new_kwargs = {k: kwargs[k] for k in kwargs if k not in skip} + return box(data_frame, **new_kwargs) + + +def hist_frame(data_frame, **kwargs): + """ + Pandas plotting backend function, not meant to be called directly. + To activate, set pandas.options.plotting.backend="plotly" + See https://github.com/pandas-dev/pandas/blob/master/pandas/plotting/__init__.py + """ + from .express import histogram + + skip = ["column", "by", "grid", "xlabelsize", "xrot", "ylabelsize", "yrot"] + skip += ["ax", "sharex", "sharey", "figsize", "layout", "bins", "legend"] + new_kwargs = {k: kwargs[k] for k in kwargs if k not in skip} + return histogram(data_frame, **new_kwargs) + + +def hist_series(data_frame, **kwargs): + """ + Pandas plotting backend function, not meant to be called directly. + To activate, set pandas.options.plotting.backend="plotly" + See https://github.com/pandas-dev/pandas/blob/master/pandas/plotting/__init__.py + """ + from .express import histogram + + skip = ["by", "grid", "xlabelsize", "xrot", "ylabelsize", "yrot", "ax"] + skip += ["figsize", "bins", "legend"] + new_kwargs = {k: kwargs[k] for k in kwargs if k not in skip} + return histogram(data_frame, **new_kwargs) + + +def _jupyter_labextension_paths(): + """Called by Jupyter Lab Server to detect if it is a valid labextension and + to install the extension. + """ + return [ + { + "src": "labextension/static", + "dest": "jupyterlab-plotly", + } + ] diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/_subplots.py b/.venv_haddock/lib/python3.12/site-packages/plotly/_subplots.py new file mode 100644 index 0000000000000000000000000000000000000000..16a3958637ec6d031de49c22ff9209d9f3a01404 --- /dev/null +++ b/.venv_haddock/lib/python3.12/site-packages/plotly/_subplots.py @@ -0,0 +1,1549 @@ +# Constants +# --------- +# Subplot types that are each individually positioned with a domain +# +# Each of these subplot types has a `domain` property with `x`/`y` +# properties. +# Note that this set does not contain `xaxis`/`yaxis` because these behave a +# little differently. +import collections + +_single_subplot_types = {"scene", "geo", "polar", "ternary", "map", "mapbox"} +_subplot_types = set.union(_single_subplot_types, {"xy", "domain"}) + +# For most subplot types, a trace is associated with a particular subplot +# using a trace property with a name that matches the subplot type. For +# example, a `scatter3d.scene` property set to `'scene2'` associates a +# scatter3d trace with the second `scene` subplot in the figure. +# +# There are a few subplot types that don't follow this pattern, and instead +# the trace property is just named `subplot`. For example setting +# the `scatterpolar.subplot` property to `polar3` associates the scatterpolar +# trace with the third polar subplot in the figure +_subplot_prop_named_subplot = {"polar", "ternary", "map", "mapbox"} + + +# Named tuple to hold an xaxis/yaxis pair that represent a single subplot +SubplotXY = collections.namedtuple("SubplotXY", ("xaxis", "yaxis")) +SubplotDomain = collections.namedtuple("SubplotDomain", ("x", "y")) + +SubplotRef = collections.namedtuple( + "SubplotRef", ("subplot_type", "layout_keys", "trace_kwargs") +) + + +def _get_initial_max_subplot_ids(): + max_subplot_ids = {subplot_type: 0 for subplot_type in _single_subplot_types} + max_subplot_ids["xaxis"] = 0 + max_subplot_ids["yaxis"] = 0 + return max_subplot_ids + + +def make_subplots( + rows=1, + cols=1, + shared_xaxes=False, + shared_yaxes=False, + start_cell="top-left", + print_grid=False, + horizontal_spacing=None, + vertical_spacing=None, + subplot_titles=None, + column_widths=None, + row_heights=None, + specs=None, + insets=None, + column_titles=None, + row_titles=None, + x_title=None, + y_title=None, + figure=None, + **kwargs, +): + """ + Return an instance of plotly.graph_objs.Figure with predefined subplots + configured in 'layout'. + + Parameters + ---------- + rows: int (default 1) + Number of rows in the subplot grid. Must be greater than zero. + + cols: int (default 1) + Number of columns in the subplot grid. Must be greater than zero. + + shared_xaxes: boolean or str (default False) + Assign shared (linked) x-axes for 2D cartesian subplots + + - True or 'columns': Share axes among subplots in the same column + - 'rows': Share axes among subplots in the same row + - 'all': Share axes across all subplots in the grid. + + shared_yaxes: boolean or str (default False) + Assign shared (linked) y-axes for 2D cartesian subplots + + - 'columns': Share axes among subplots in the same column + - True or 'rows': Share axes among subplots in the same row + - 'all': Share axes across all subplots in the grid. + + start_cell: 'bottom-left' or 'top-left' (default 'top-left') + Choose the starting cell in the subplot grid used to set the + domains_grid of the subplots. + + - 'top-left': Subplots are numbered with (1, 1) in the top + left corner + - 'bottom-left': Subplots are numbererd with (1, 1) in the bottom + left corner + + print_grid: boolean (default True): + If True, prints a string representation of the plot grid. Grid may + also be printed using the `Figure.print_grid()` method on the + resulting figure. + + horizontal_spacing: float (default 0.2 / cols) + Space between subplot columns in normalized plot coordinates. Must be + a float between 0 and 1. + + Applies to all columns (use 'specs' subplot-dependents spacing) + + vertical_spacing: float (default 0.3 / rows) + Space between subplot rows in normalized plot coordinates. Must be + a float between 0 and 1. + + Applies to all rows (use 'specs' subplot-dependents spacing) + + subplot_titles: list of str or None (default None) + Title of each subplot as a list in row-major ordering. + + Empty strings ("") can be included in the list if no subplot title + is desired in that space so that the titles are properly indexed. + + specs: list of lists of dict or None (default None) + Per subplot specifications of subplot type, row/column spanning, and + spacing. + + ex1: specs=[[{}, {}], [{'colspan': 2}, None]] + + ex2: specs=[[{'rowspan': 2}, {}], [None, {}]] + + - Indices of the outer list correspond to subplot grid rows + starting from the top, if start_cell='top-left', + or bottom, if start_cell='bottom-left'. + The number of rows in 'specs' must be equal to 'rows'. + + - Indices of the inner lists correspond to subplot grid columns + starting from the left. The number of columns in 'specs' + must be equal to 'cols'. + + - Each item in the 'specs' list corresponds to one subplot + in a subplot grid. (N.B. The subplot grid has exactly 'rows' + times 'cols' cells.) + + - Use None for a blank a subplot cell (or to move past a col/row span). + + - Note that specs[0][0] has the specs of the 'start_cell' subplot. + + - Each item in 'specs' is a dictionary. + The available keys are: + * type (string, default 'xy'): Subplot type. One of + - 'xy': 2D Cartesian subplot type for scatter, bar, etc. + - 'scene': 3D Cartesian subplot for scatter3d, cone, etc. + - 'polar': Polar subplot for scatterpolar, barpolar, etc. + - 'ternary': Ternary subplot for scatterternary + - 'map': Map subplot for scattermap, choroplethmap and densitymap + - 'mapbox': Mapbox subplot for scattermapbox, choroplethmapbox and densitymapbox + - 'domain': Subplot type for traces that are individually + positioned. pie, parcoords, parcats, etc. + - trace type: A trace type which will be used to determine + the appropriate subplot type for that trace + + * secondary_y (bool, default False): If True, create a secondary + y-axis positioned on the right side of the subplot. Only valid + if type='xy'. + * colspan (int, default 1): number of subplot columns + for this subplot to span. + * rowspan (int, default 1): number of subplot rows + for this subplot to span. + * l (float, default 0.0): padding left of cell + * r (float, default 0.0): padding right of cell + * t (float, default 0.0): padding right of cell + * b (float, default 0.0): padding bottom of cell + + - Note: Use 'horizontal_spacing' and 'vertical_spacing' to adjust + the spacing in between the subplots. + + insets: list of dict or None (default None): + Inset specifications. Insets are subplots that overlay grid subplots + + - Each item in 'insets' is a dictionary. + The available keys are: + + * cell (tuple, default=(1,1)): (row, col) index of the + subplot cell to overlay inset axes onto. + * type (string, default 'xy'): Subplot type + * l (float, default=0.0): padding left of inset + in fraction of cell width + * w (float or 'to_end', default='to_end') inset width + in fraction of cell width ('to_end': to cell right edge) + * b (float, default=0.0): padding bottom of inset + in fraction of cell height + * h (float or 'to_end', default='to_end') inset height + in fraction of cell height ('to_end': to cell top edge) + + column_widths: list of numbers or None (default None) + list of length `cols` of the relative widths of each column of subplots. + Values are normalized internally and used to distribute overall width + of the figure (excluding padding) among the columns. + + For backward compatibility, may also be specified using the + `column_width` keyword argument. + + row_heights: list of numbers or None (default None) + list of length `rows` of the relative heights of each row of subplots. + If start_cell='top-left' then row heights are applied top to bottom. + Otherwise, if start_cell='bottom-left' then row heights are applied + bottom to top. + + For backward compatibility, may also be specified using the + `row_width` kwarg. If specified as `row_width`, then the width values + are applied from bottom to top regardless of the value of start_cell. + This matches the legacy behavior of the `row_width` argument. + + column_titles: list of str or None (default None) + list of length `cols` of titles to place above the top subplot in + each column. + + row_titles: list of str or None (default None) + list of length `rows` of titles to place on the right side of each + row of subplots. If start_cell='top-left' then row titles are + applied top to bottom. Otherwise, if start_cell='bottom-left' then + row titles are applied bottom to top. + + x_title: str or None (default None) + Title to place below the bottom row of subplots, + centered horizontally + + y_title: str or None (default None) + Title to place to the left of the left column of subplots, + centered vertically + + figure: go.Figure or None (default None) + If None, a new go.Figure instance will be created and its axes will be + populated with those corresponding to the requested subplot geometry and + this new figure will be returned. + If a go.Figure instance, the axes will be added to the + layout of this figure and this figure will be returned. If the figure + already contains axes, they will be overwritten. + + Examples + -------- + + Example 1: + + >>> # Stack two subplots vertically, and add a scatter trace to each + >>> from plotly.subplots import make_subplots + >>> import plotly.graph_objects as go + >>> fig = make_subplots(rows=2) + + This is the format of your plot grid: + [ (1,1) xaxis1,yaxis1 ] + [ (2,1) xaxis2,yaxis2 ] + + >>> fig.add_scatter(y=[2, 1, 3], row=1, col=1) # doctest: +ELLIPSIS + Figure(...) + >>> fig.add_scatter(y=[1, 3, 2], row=2, col=1) # doctest: +ELLIPSIS + Figure(...) + + or see Figure.append_trace + + Example 2: + + >>> # Stack a scatter plot + >>> fig = make_subplots(rows=2, shared_xaxes=True) + + This is the format of your plot grid: + [ (1,1) xaxis1,yaxis1 ] + [ (2,1) xaxis2,yaxis2 ] + + >>> fig.add_scatter(y=[2, 1, 3], row=1, col=1) # doctest: +ELLIPSIS + Figure(...) + >>> fig.add_scatter(y=[1, 3, 2], row=2, col=1) # doctest: +ELLIPSIS + Figure(...) + + Example 3: + + >>> # irregular subplot layout (more examples below under 'specs') + >>> fig = make_subplots(rows=2, cols=2, + ... specs=[[{}, {}], + ... [{'colspan': 2}, None]]) + + This is the format of your plot grid: + [ (1,1) xaxis1,yaxis1 ] [ (1,2) xaxis2,yaxis2 ] + [ (2,1) xaxis3,yaxis3 - ] + + >>> fig.add_trace(go.Scatter(x=[1,2,3], y=[2,1,2]), row=1, col=1) # doctest: +ELLIPSIS + Figure(...) + >>> fig.add_trace(go.Scatter(x=[1,2,3], y=[2,1,2]), row=1, col=2) # doctest: +ELLIPSIS + Figure(...) + >>> fig.add_trace(go.Scatter(x=[1,2,3], y=[2,1,2]), row=2, col=1) # doctest: +ELLIPSIS + Figure(...) + + Example 4: + + >>> # insets + >>> fig = make_subplots(insets=[{'cell': (1,1), 'l': 0.7, 'b': 0.3}]) + + This is the format of your plot grid: + [ (1,1) xaxis1,yaxis1 ] + + With insets: + [ xaxis2,yaxis2 ] over [ (1,1) xaxis1,yaxis1 ] + + >>> fig.add_scatter(x=[1,2,3], y=[2,1,1]) # doctest: +ELLIPSIS + Figure(...) + >>> fig.add_scatter(x=[1,2,3], y=[2,1,2], xaxis='x2', yaxis='y2') # doctest: +ELLIPSIS + Figure(...) + + Example 5: + + >>> # include subplot titles + >>> fig = make_subplots(rows=2, subplot_titles=('Plot 1','Plot 2')) + + This is the format of your plot grid: + [ (1,1) x1,y1 ] + [ (2,1) x2,y2 ] + + >>> fig.add_scatter(x=[1,2,3], y=[2,1,2], row=1, col=1) # doctest: +ELLIPSIS + Figure(...) + >>> fig.add_bar(x=[1,2,3], y=[2,1,2], row=2, col=1) # doctest: +ELLIPSIS + Figure(...) + + Example 6: + + Subplot with mixed subplot types + + >>> fig = make_subplots(rows=2, cols=2, + ... specs=[[{'type': 'xy'}, {'type': 'polar'}], + ... [{'type': 'scene'}, {'type': 'ternary'}]]) + + >>> fig.add_traces( + ... [go.Scatter(y=[2, 3, 1]), + ... go.Scatterpolar(r=[1, 3, 2], theta=[0, 45, 90]), + ... go.Scatter3d(x=[1, 2, 1], y=[2, 3, 1], z=[0, 3, 5]), + ... go.Scatterternary(a=[0.1, 0.2, 0.1], + ... b=[0.2, 0.3, 0.1], + ... c=[0.7, 0.5, 0.8])], + ... rows=[1, 1, 2, 2], + ... cols=[1, 2, 1, 2]) # doctest: +ELLIPSIS + Figure(...) + """ + + import plotly.graph_objs as go + + # Handle backward compatibility + # ----------------------------- + use_legacy_row_heights_order = "row_width" in kwargs + row_heights = kwargs.pop("row_width", row_heights) + column_widths = kwargs.pop("column_width", column_widths) + + if kwargs: + raise TypeError( + "make_subplots() got unexpected keyword argument(s): {}".format( + list(kwargs) + ) + ) + + # Validate coerce inputs + # ---------------------- + # ### rows ### + if not isinstance(rows, int) or rows <= 0: + raise ValueError( + """ +The 'rows' argument to make_subplots must be an int greater than 0. + Received value of type {typ}: {val}""".format(typ=type(rows), val=repr(rows)) + ) + + # ### cols ### + if not isinstance(cols, int) or cols <= 0: + raise ValueError( + """ +The 'cols' argument to make_subplots must be an int greater than 0. + Received value of type {typ}: {val}""".format(typ=type(cols), val=repr(cols)) + ) + + # ### start_cell ### + if start_cell == "bottom-left": + col_dir = 1 + row_dir = 1 + elif start_cell == "top-left": + col_dir = 1 + row_dir = -1 + else: + raise ValueError( + """ +The 'start_cell` argument to make_subplots must be one of \ +['bottom-left', 'top-left'] + Received value of type {typ}: {val}""".format( + typ=type(start_cell), val=repr(start_cell) + ) + ) + + # ### Helper to validate coerce elements of lists of dictionaries ### + def _check_keys_and_fill(name, arg, defaults): + def _checks(item, defaults): + if item is None: + return + if not isinstance(item, dict): + raise ValueError( + """ +Elements of the '{name}' argument to make_subplots must be dictionaries \ +or None. + Received value of type {typ}: {val}""".format( + name=name, typ=type(item), val=repr(item) + ) + ) + + for k in item: + if k not in defaults: + raise ValueError( + """ +Invalid key specified in an element of the '{name}' argument to \ +make_subplots: {k} + Valid keys include: {valid_keys}""".format( + k=repr(k), name=name, valid_keys=repr(list(defaults)) + ) + ) + for k, v in defaults.items(): + item.setdefault(k, v) + + for arg_i in arg: + if isinstance(arg_i, (list, tuple)): + # 2D list + for arg_ii in arg_i: + _checks(arg_ii, defaults) + elif isinstance(arg_i, dict): + # 1D list + _checks(arg_i, defaults) + + # ### specs ### + if specs is None: + specs = [[{} for c in range(cols)] for r in range(rows)] + elif not ( + isinstance(specs, (list, tuple)) + and specs + and all(isinstance(row, (list, tuple)) for row in specs) + and len(specs) == rows + and all(len(row) == cols for row in specs) + and all(all(v is None or isinstance(v, dict) for v in row) for row in specs) + ): + raise ValueError( + """ +The 'specs' argument to make_subplots must be a 2D list of dictionaries with \ +dimensions ({rows} x {cols}). + Received value of type {typ}: {val}""".format( + rows=rows, cols=cols, typ=type(specs), val=repr(specs) + ) + ) + + for row in specs: + for spec in row: + # For backward compatibility, + # convert is_3d flag to type='scene' kwarg + if spec and spec.pop("is_3d", None): + spec["type"] = "scene" + + spec_defaults = dict( + type="xy", secondary_y=False, colspan=1, rowspan=1, l=0.0, r=0.0, b=0.0, t=0.0 + ) + _check_keys_and_fill("specs", specs, spec_defaults) + + # Validate secondary_y + has_secondary_y = False + for row in specs: + for spec in row: + if spec is not None: + has_secondary_y = has_secondary_y or spec["secondary_y"] + if spec and spec["type"] != "xy" and spec["secondary_y"]: + raise ValueError( + """ +The 'secondary_y' spec property is not supported for subplot of type '{s_typ}' + 'secondary_y' is only supported for subplots of type 'xy' +""".format(s_typ=spec["type"]) + ) + + # ### insets ### + if insets is None or insets is False: + insets = [] + elif not ( + isinstance(insets, (list, tuple)) and all(isinstance(v, dict) for v in insets) + ): + raise ValueError( + """ +The 'insets' argument to make_subplots must be a list of dictionaries. + Received value of type {typ}: {val}""".format(typ=type(insets), val=repr(insets)) + ) + + if insets: + for inset in insets: + if inset and inset.pop("is_3d", None): + inset["type"] = "scene" + + inset_defaults = dict( + cell=(1, 1), type="xy", l=0.0, w="to_end", b=0.0, h="to_end" + ) + _check_keys_and_fill("insets", insets, inset_defaults) + + # ### shared_xaxes / shared_yaxes + valid_shared_vals = [None, True, False, "rows", "columns", "all"] + shared_err_msg = """ +The {arg} argument to make_subplots must be one of: {valid_vals} + Received value of type {typ}: {val}""" + + if shared_xaxes not in valid_shared_vals: + val = shared_xaxes + raise ValueError( + shared_err_msg.format( + arg="shared_xaxes", + valid_vals=valid_shared_vals, + typ=type(val), + val=repr(val), + ) + ) + if shared_yaxes not in valid_shared_vals: + val = shared_yaxes + raise ValueError( + shared_err_msg.format( + arg="shared_yaxes", + valid_vals=valid_shared_vals, + typ=type(val), + val=repr(val), + ) + ) + + def _check_hv_spacing(dimsize, spacing, name, dimvarname, dimname): + if spacing < 0 or spacing > 1: + raise ValueError("%s spacing must be between 0 and 1." % (name,)) + if dimsize <= 1: + return + max_spacing = 1.0 / float(dimsize - 1) + if spacing > max_spacing: + raise ValueError( + """{name} spacing cannot be greater than (1 / ({dimvarname} - 1)) = {max_spacing:f}. +The resulting plot would have {dimsize} {dimname} ({dimvarname}={dimsize}).""".format( + dimvarname=dimvarname, + name=name, + dimname=dimname, + max_spacing=max_spacing, + dimsize=dimsize, + ) + ) + + # ### horizontal_spacing ### + if horizontal_spacing is None: + if has_secondary_y: + horizontal_spacing = 0.4 / cols + else: + horizontal_spacing = 0.2 / cols + # check horizontal_spacing can be satisfied: + _check_hv_spacing(cols, horizontal_spacing, "Horizontal", "cols", "columns") + + # ### vertical_spacing ### + if vertical_spacing is None: + if subplot_titles is not None: + vertical_spacing = 0.5 / rows + else: + vertical_spacing = 0.3 / rows + # check vertical_spacing can be satisfied: + _check_hv_spacing(rows, vertical_spacing, "Vertical", "rows", "rows") + + # ### subplot titles ### + if subplot_titles is None: + subplot_titles = [""] * rows * cols + + # ### column_widths ### + if has_secondary_y: + # Add room for secondary y-axis title + max_width = 0.94 + elif row_titles: + # Add a little breathing room between row labels and legend + max_width = 0.98 + else: + max_width = 1.0 + + if column_widths is None: + widths = [(max_width - horizontal_spacing * (cols - 1)) / cols] * cols + elif isinstance(column_widths, (list, tuple)) and len(column_widths) == cols: + cum_sum = float(sum(column_widths)) + widths = [] + for w in column_widths: + widths.append((max_width - horizontal_spacing * (cols - 1)) * (w / cum_sum)) + else: + raise ValueError( + """ +The 'column_widths' argument to make_subplots must be a list of numbers of \ +length {cols}. + Received value of type {typ}: {val}""".format( + cols=cols, typ=type(column_widths), val=repr(column_widths) + ) + ) + + # ### row_heights ### + if row_heights is None: + heights = [(1.0 - vertical_spacing * (rows - 1)) / rows] * rows + elif isinstance(row_heights, (list, tuple)) and len(row_heights) == rows: + cum_sum = float(sum(row_heights)) + heights = [] + for h in row_heights: + heights.append((1.0 - vertical_spacing * (rows - 1)) * (h / cum_sum)) + if row_dir < 0 and not use_legacy_row_heights_order: + heights = list(reversed(heights)) + else: + raise ValueError( + """ +The 'row_heights' argument to make_subplots must be a list of numbers of \ +length {rows}. + Received value of type {typ}: {val}""".format( + rows=rows, typ=type(row_heights), val=repr(row_heights) + ) + ) + + # ### column_titles / row_titles ### + if column_titles and not isinstance(column_titles, (list, tuple)): + raise ValueError( + """ +The column_titles argument to make_subplots must be a list or tuple + Received value of type {typ}: {val}""".format( + typ=type(column_titles), val=repr(column_titles) + ) + ) + + if row_titles and not isinstance(row_titles, (list, tuple)): + raise ValueError( + """ +The row_titles argument to make_subplots must be a list or tuple + Received value of type {typ}: {val}""".format( + typ=type(row_titles), val=repr(row_titles) + ) + ) + + # Init layout + # ----------- + layout = go.Layout() + + # Build grid reference + # -------------------- + # Built row/col sequence using 'row_dir' and 'col_dir' + col_seq = range(cols)[::col_dir] + row_seq = range(rows)[::row_dir] + + # Build 2D array of tuples of the start x and start y coordinate of each + # subplot + grid = [ + [ + ( + (sum(widths[:c]) + c * horizontal_spacing), + (sum(heights[:r]) + r * vertical_spacing), + ) + for c in col_seq + ] + for r in row_seq + ] + + domains_grid = [[None for _ in range(cols)] for _ in range(rows)] + + # Initialize subplot reference lists for the grid and insets + grid_ref = [[None for c in range(cols)] for r in range(rows)] + + list_of_domains = [] # added for subplot titles + + max_subplot_ids = _get_initial_max_subplot_ids() + + # Loop through specs -- (r, c) <-> (row, col) + for r, spec_row in enumerate(specs): + for c, spec in enumerate(spec_row): + if spec is None: # skip over None cells + continue + + # ### Compute x and y domain for subplot ### + c_spanned = c + spec["colspan"] - 1 # get spanned c + r_spanned = r + spec["rowspan"] - 1 # get spanned r + + # Throw exception if 'colspan' | 'rowspan' is too large for grid + if c_spanned >= cols: + raise Exception( + "Some 'colspan' value is too large for this subplot grid." + ) + if r_spanned >= rows: + raise Exception( + "Some 'rowspan' value is too large for this subplot grid." + ) + + # Get x domain using grid and colspan + x_s = grid[r][c][0] + spec["l"] + + x_e = grid[r][c_spanned][0] + widths[c_spanned] - spec["r"] + x_domain = [x_s, x_e] + + # Get y domain (dep. on row_dir) using grid & r_spanned + if row_dir > 0: + y_s = grid[r][c][1] + spec["b"] + y_e = grid[r_spanned][c][1] + heights[r_spanned] - spec["t"] + else: + y_s = grid[r_spanned][c][1] + spec["b"] + y_e = grid[r][c][1] + heights[-1 - r] - spec["t"] + + if y_s < 0.0: + # round for values very close to one + # handles some floating point errors + if y_s > -0.01: + y_s = 0.0 + else: + raise Exception( + "A combination of the 'b' values, heights, and " + "number of subplots too large for this subplot grid." + ) + if y_s > 1.0: + # round for values very close to one + # handles some floating point errors + if y_s < 1.01: + y_s = 1.0 + else: + raise Exception( + "A combination of the 'b' values, heights, and " + "number of subplots too large for this subplot grid." + ) + + if y_e < 0.0: + if y_e > -0.01: + y_e = 0.0 + else: + raise Exception( + "A combination of the 't' values, heights, and " + "number of subplots too large for this subplot grid." + ) + + if y_e > 1.0: + if y_e < 1.01: + y_e = 1.0 + else: + raise Exception( + "A combination of the 't' values, heights, and " + "number of subplots too large for this subplot grid." + ) + + y_domain = [y_s, y_e] + + list_of_domains.append(x_domain) + list_of_domains.append(y_domain) + + domains_grid[r][c] = [x_domain, y_domain] + + # ### construct subplot container ### + subplot_type = spec["type"] + secondary_y = spec["secondary_y"] + subplot_refs = _init_subplot( + layout, subplot_type, secondary_y, x_domain, y_domain, max_subplot_ids + ) + grid_ref[r][c] = subplot_refs + + _configure_shared_axes(layout, grid_ref, specs, "x", shared_xaxes, row_dir, False) + _configure_shared_axes(layout, grid_ref, specs, "y", shared_yaxes, row_dir, False) + + any_secondary_y = any( + spec["secondary_y"] + for spec_row in specs + for spec in spec_row + if spec is not None + ) + if any_secondary_y: + _configure_shared_axes( + layout, grid_ref, specs, "y", shared_yaxes, row_dir, True + ) + + # Build inset reference + # --------------------- + # Loop through insets + insets_ref = [None for inset in range(len(insets))] if insets else None + if insets: + for i_inset, inset in enumerate(insets): + r = inset["cell"][0] - 1 + c = inset["cell"][1] - 1 + + # Throw exception if r | c is out of range + if not (0 <= r < rows): + raise Exception( + "Some 'cell' row value is out of range. " + "Note: the starting cell is (1, 1)" + ) + if not (0 <= c < cols): + raise Exception( + "Some 'cell' col value is out of range. " + "Note: the starting cell is (1, 1)" + ) + + # Get inset x domain using grid + x_s = grid[r][c][0] + inset["l"] * widths[c] + if inset["w"] == "to_end": + x_e = grid[r][c][0] + widths[c] + else: + x_e = x_s + inset["w"] * widths[c] + x_domain = [x_s, x_e] + + # Get inset y domain using grid + y_s = grid[r][c][1] + inset["b"] * heights[-1 - r] + if inset["h"] == "to_end": + y_e = grid[r][c][1] + heights[-1 - r] + else: + y_e = y_s + inset["h"] * heights[-1 - r] + y_domain = [y_s, y_e] + + list_of_domains.append(x_domain) + list_of_domains.append(y_domain) + + subplot_type = inset["type"] + + subplot_refs = _init_subplot( + layout, subplot_type, False, x_domain, y_domain, max_subplot_ids + ) + + insets_ref[i_inset] = subplot_refs + + # Build grid_str + # This is the message printed when print_grid=True + grid_str = _build_grid_str(specs, grid_ref, insets, insets_ref, row_seq) + + # Add subplot titles + plot_title_annotations = _build_subplot_title_annotations( + subplot_titles, list_of_domains + ) + + layout["annotations"] = plot_title_annotations + + # Add column titles + if column_titles: + domains_list = [] + if row_dir > 0: + for c in range(cols): + domain_pair = domains_grid[-1][c] + if domain_pair: + domains_list.extend(domain_pair) + else: + for c in range(cols): + domain_pair = domains_grid[0][c] + if domain_pair: + domains_list.extend(domain_pair) + + # Add subplot titles + column_title_annotations = _build_subplot_title_annotations( + column_titles, domains_list + ) + + layout["annotations"] += tuple(column_title_annotations) + + if row_titles: + domains_list = [] + for r in range(rows): + domain_pair = domains_grid[r][-1] + if domain_pair: + domains_list.extend(domain_pair) + + # Add subplot titles + column_title_annotations = _build_subplot_title_annotations( + row_titles, domains_list, title_edge="right" + ) + + layout["annotations"] += tuple(column_title_annotations) + + if x_title: + domains_list = [(0, max_width), (0, 1)] + + # Add subplot titles + column_title_annotations = _build_subplot_title_annotations( + [x_title], domains_list, title_edge="bottom", offset=30 + ) + + layout["annotations"] += tuple(column_title_annotations) + + if y_title: + domains_list = [(0, 1), (0, 1)] + + # Add subplot titles + column_title_annotations = _build_subplot_title_annotations( + [y_title], domains_list, title_edge="left", offset=40 + ) + + layout["annotations"] += tuple(column_title_annotations) + + # Handle displaying grid information + if print_grid: + print(grid_str) + + # Build resulting figure + if figure is None: + figure = go.Figure() + figure.update_layout(layout) + + # Attach subplot grid info to the figure + figure.__dict__["_grid_ref"] = grid_ref + figure.__dict__["_grid_str"] = grid_str + + return figure + + +def _configure_shared_axes( + layout, grid_ref, specs, x_or_y, shared, row_dir, secondary_y +): + rows = len(grid_ref) + cols = len(grid_ref[0]) + + layout_key_ind = ["x", "y"].index(x_or_y) + + if row_dir < 0: + rows_iter = range(rows - 1, -1, -1) + else: + rows_iter = range(rows) + + if secondary_y: + cols_iter = range(cols - 1, -1, -1) + axis_index = 1 + else: + cols_iter = range(cols) + axis_index = 0 + + def update_axis_matches(first_axis_id, subplot_ref, spec, remove_label): + if subplot_ref is None: + return first_axis_id + + if x_or_y == "x": + span = spec["colspan"] + else: + span = spec["rowspan"] + + if subplot_ref.subplot_type == "xy" and span == 1: + if first_axis_id is None: + first_axis_name = subplot_ref.layout_keys[layout_key_ind] + first_axis_id = first_axis_name.replace("axis", "") + else: + axis_name = subplot_ref.layout_keys[layout_key_ind] + axis_to_match = layout[axis_name] + axis_to_match.matches = first_axis_id + if remove_label: + axis_to_match.showticklabels = False + + return first_axis_id + + if shared == "columns" or (x_or_y == "x" and shared is True): + for c in cols_iter: + first_axis_id = None + ok_to_remove_label = x_or_y == "x" + for r in rows_iter: + if not grid_ref[r][c]: + continue + if axis_index >= len(grid_ref[r][c]): + continue + subplot_ref = grid_ref[r][c][axis_index] + spec = specs[r][c] + first_axis_id = update_axis_matches( + first_axis_id, subplot_ref, spec, ok_to_remove_label + ) + + elif shared == "rows" or (x_or_y == "y" and shared is True): + for r in rows_iter: + first_axis_id = None + ok_to_remove_label = x_or_y == "y" + for c in cols_iter: + if not grid_ref[r][c]: + continue + if axis_index >= len(grid_ref[r][c]): + continue + subplot_ref = grid_ref[r][c][axis_index] + spec = specs[r][c] + first_axis_id = update_axis_matches( + first_axis_id, subplot_ref, spec, ok_to_remove_label + ) + + elif shared == "all": + first_axis_id = None + for ri, r in enumerate(rows_iter): + for c in cols_iter: + if not grid_ref[r][c]: + continue + if axis_index >= len(grid_ref[r][c]): + continue + subplot_ref = grid_ref[r][c][axis_index] + spec = specs[r][c] + + if x_or_y == "y": + ok_to_remove_label = c < cols - 1 if secondary_y else c > 0 + else: + ok_to_remove_label = ri > 0 if row_dir > 0 else r < rows - 1 + + first_axis_id = update_axis_matches( + first_axis_id, subplot_ref, spec, ok_to_remove_label + ) + + +def _init_subplot_xy(layout, secondary_y, x_domain, y_domain, max_subplot_ids=None): + if max_subplot_ids is None: + max_subplot_ids = _get_initial_max_subplot_ids() + + # Get axis label and anchor + x_cnt = max_subplot_ids["xaxis"] + 1 + y_cnt = max_subplot_ids["yaxis"] + 1 + + # Compute x/y labels (the values of trace.xaxis/trace.yaxis + x_label = "x{cnt}".format(cnt=x_cnt if x_cnt > 1 else "") + y_label = "y{cnt}".format(cnt=y_cnt if y_cnt > 1 else "") + + # Anchor x and y axes to each other + x_anchor, y_anchor = y_label, x_label + + # Build layout.xaxis/layout.yaxis containers + xaxis_name = "xaxis{cnt}".format(cnt=x_cnt if x_cnt > 1 else "") + yaxis_name = "yaxis{cnt}".format(cnt=y_cnt if y_cnt > 1 else "") + x_axis = {"domain": x_domain, "anchor": x_anchor} + y_axis = {"domain": y_domain, "anchor": y_anchor} + + layout[xaxis_name] = x_axis + layout[yaxis_name] = y_axis + + subplot_refs = [ + SubplotRef( + subplot_type="xy", + layout_keys=(xaxis_name, yaxis_name), + trace_kwargs={"xaxis": x_label, "yaxis": y_label}, + ) + ] + + if secondary_y: + y_cnt += 1 + secondary_yaxis_name = "yaxis{cnt}".format(cnt=y_cnt if y_cnt > 1 else "") + secondary_y_label = "y{cnt}".format(cnt=y_cnt) + + # Add secondary y-axis to subplot reference + subplot_refs.append( + SubplotRef( + subplot_type="xy", + layout_keys=(xaxis_name, secondary_yaxis_name), + trace_kwargs={"xaxis": x_label, "yaxis": secondary_y_label}, + ) + ) + + # Add secondary y axis to layout + secondary_y_axis = {"anchor": y_anchor, "overlaying": y_label, "side": "right"} + layout[secondary_yaxis_name] = secondary_y_axis + + # increment max_subplot_ids + max_subplot_ids["xaxis"] = x_cnt + max_subplot_ids["yaxis"] = y_cnt + + return tuple(subplot_refs) + + +def _init_subplot_single( + layout, subplot_type, x_domain, y_domain, max_subplot_ids=None +): + if max_subplot_ids is None: + max_subplot_ids = _get_initial_max_subplot_ids() + + # Add scene to layout + cnt = max_subplot_ids[subplot_type] + 1 + label = "{subplot_type}{cnt}".format( + subplot_type=subplot_type, cnt=cnt if cnt > 1 else "" + ) + scene = dict(domain={"x": x_domain, "y": y_domain}) + layout[label] = scene + + trace_key = ( + "subplot" if subplot_type in _subplot_prop_named_subplot else subplot_type + ) + + subplot_ref = SubplotRef( + subplot_type=subplot_type, layout_keys=(label,), trace_kwargs={trace_key: label} + ) + + # increment max_subplot_id + max_subplot_ids[subplot_type] = cnt + + return (subplot_ref,) + + +def _init_subplot_domain(x_domain, y_domain): + # No change to layout since domain traces are labeled individually + subplot_ref = SubplotRef( + subplot_type="domain", + layout_keys=(), + trace_kwargs={"domain": {"x": tuple(x_domain), "y": tuple(y_domain)}}, + ) + + return (subplot_ref,) + + +def _subplot_type_for_trace_type(trace_type): + from plotly.validator_cache import ValidatorCache + + DataValidator = ValidatorCache.get_validator("", "data") + + trace_validator = DataValidator + if trace_type in trace_validator.class_strs_map: + # subplot_type is a trace name, find the subplot type for trace + trace = trace_validator.validate_coerce([{"type": trace_type}])[0] + if "domain" in trace: + return "domain" + elif "xaxis" in trace and "yaxis" in trace: + return "xy" + elif "geo" in trace: + return "geo" + elif "scene" in trace: + return "scene" + elif "subplot" in trace: + for t in _subplot_prop_named_subplot: + try: + trace.subplot = t + return t + except ValueError: + pass + + return None + + +def _validate_coerce_subplot_type(subplot_type): + # Lowercase subplot_type + orig_subplot_type = subplot_type + subplot_type = subplot_type.lower() + + # Check if it's a named subplot type + if subplot_type in _subplot_types: + return subplot_type + + # Try to determine subplot type for trace + subplot_type = _subplot_type_for_trace_type(subplot_type) + + if subplot_type is None: + raise ValueError("Unsupported subplot type: {}".format(repr(orig_subplot_type))) + else: + return subplot_type + + +def _init_subplot( + layout, subplot_type, secondary_y, x_domain, y_domain, max_subplot_ids=None +): + # Normalize subplot type + subplot_type = _validate_coerce_subplot_type(subplot_type) + + if max_subplot_ids is None: + max_subplot_ids = _get_initial_max_subplot_ids() + + # Clamp domain elements between [0, 1]. + # This is only needed to combat numerical precision errors + # See GH1031 + x_domain = [max(0.0, x_domain[0]), min(1.0, x_domain[1])] + y_domain = [max(0.0, y_domain[0]), min(1.0, y_domain[1])] + + if subplot_type == "xy": + subplot_refs = _init_subplot_xy( + layout, secondary_y, x_domain, y_domain, max_subplot_ids + ) + elif subplot_type in _single_subplot_types: + subplot_refs = _init_subplot_single( + layout, subplot_type, x_domain, y_domain, max_subplot_ids + ) + elif subplot_type == "domain": + subplot_refs = _init_subplot_domain(x_domain, y_domain) + else: + raise ValueError("Unsupported subplot type: {}".format(repr(subplot_type))) + + return subplot_refs + + +def _get_cartesian_label(x_or_y, r, c, cnt): + # Default label (given strictly by cnt) + label = "{x_or_y}{cnt}".format(x_or_y=x_or_y, cnt=cnt) + return label + + +def _build_subplot_title_annotations( + subplot_titles, list_of_domains, title_edge="top", offset=0 +): + # If shared_axes is False (default) use list_of_domains + # This is used for insets and irregular layouts + # if not shared_xaxes and not shared_yaxes: + x_dom = list_of_domains[::2] + y_dom = list_of_domains[1::2] + subtitle_pos_x = [] + subtitle_pos_y = [] + + if title_edge == "top": + text_angle = 0 + xanchor = "center" + yanchor = "bottom" + + for x_domains in x_dom: + subtitle_pos_x.append(sum(x_domains) / 2.0) + for y_domains in y_dom: + subtitle_pos_y.append(y_domains[1]) + + yshift = offset + xshift = 0 + elif title_edge == "bottom": + text_angle = 0 + xanchor = "center" + yanchor = "top" + + for x_domains in x_dom: + subtitle_pos_x.append(sum(x_domains) / 2.0) + for y_domains in y_dom: + subtitle_pos_y.append(y_domains[0]) + + yshift = -offset + xshift = 0 + elif title_edge == "right": + text_angle = 90 + xanchor = "left" + yanchor = "middle" + + for x_domains in x_dom: + subtitle_pos_x.append(x_domains[1]) + for y_domains in y_dom: + subtitle_pos_y.append(sum(y_domains) / 2.0) + + yshift = 0 + xshift = offset + elif title_edge == "left": + text_angle = -90 + xanchor = "right" + yanchor = "middle" + + for x_domains in x_dom: + subtitle_pos_x.append(x_domains[0]) + for y_domains in y_dom: + subtitle_pos_y.append(sum(y_domains) / 2.0) + + yshift = 0 + xshift = -offset + else: + raise ValueError("Invalid annotation edge '{edge}'".format(edge=title_edge)) + + plot_titles = [] + for index in range(len(subplot_titles)): + if not subplot_titles[index] or index >= len(subtitle_pos_y): + pass + else: + annot = { + "y": subtitle_pos_y[index], + "xref": "paper", + "x": subtitle_pos_x[index], + "yref": "paper", + "text": subplot_titles[index], + "showarrow": False, + "font": dict(size=16), + "xanchor": xanchor, + "yanchor": yanchor, + } + + if xshift != 0: + annot["xshift"] = xshift + + if yshift != 0: + annot["yshift"] = yshift + + if text_angle != 0: + annot["textangle"] = text_angle + + plot_titles.append(annot) + return plot_titles + + +def _build_grid_str(specs, grid_ref, insets, insets_ref, row_seq): + # Compute rows and columns + rows = len(specs) + cols = len(specs[0]) + + # Initialize constants + sp = " " # space between cell + s_str = "[ " # cell start string + e_str = " ]" # cell end string + + s_top = "⎡ " # U+23A1 + s_mid = "⎢ " # U+23A2 + s_bot = "⎣ " # U+23A3 + + e_top = " ⎤" # U+23A4 + e_mid = " ⎟" # U+239F + e_bot = " ⎦" # U+23A6 + + colspan_str = " -" # colspan string + rowspan_str = " :" # rowspan string + empty_str = " (empty) " # empty cell string + # Init grid_str with intro message + grid_str = "This is the format of your plot grid:\n" + + # Init tmp list of lists of strings (sorta like 'grid_ref' but w/ strings) + _tmp = [["" for c in range(cols)] for r in range(rows)] + + # Define cell string as function of (r, c) and grid_ref + def _get_cell_str(r, c, subplot_refs): + layout_keys = sorted({k for ref in subplot_refs for k in ref.layout_keys}) + + ref_str = ",".join(layout_keys) + + # Replace yaxis2 -> y2 + ref_str = ref_str.replace("axis", "") + return "({r},{c}) {ref}".format(r=r + 1, c=c + 1, ref=ref_str) + + # Find max len of _cell_str, add define a padding function + cell_len = ( + max( + [ + len(_get_cell_str(r, c, ref)) + for r, row_ref in enumerate(grid_ref) + for c, ref in enumerate(row_ref) + if ref + ] + ) + + len(s_str) + + len(e_str) + ) + + def _pad(s, cell_len=cell_len): + return " " * (cell_len - len(s)) + + # Loop through specs, fill in _tmp + for r, spec_row in enumerate(specs): + for c, spec in enumerate(spec_row): + ref = grid_ref[r][c] + if ref is None: + if _tmp[r][c] == "": + _tmp[r][c] = empty_str + _pad(empty_str) + continue + + if spec["rowspan"] > 1: + cell_str = s_top + _get_cell_str(r, c, ref) + else: + cell_str = s_str + _get_cell_str(r, c, ref) + + if spec["colspan"] > 1: + for cc in range(1, spec["colspan"] - 1): + _tmp[r][c + cc] = colspan_str + _pad(colspan_str) + + if spec["rowspan"] > 1: + _tmp[r][c + spec["colspan"] - 1] = ( + colspan_str + _pad(colspan_str + e_str) + ) + e_top + else: + _tmp[r][c + spec["colspan"] - 1] = ( + colspan_str + _pad(colspan_str + e_str) + ) + e_str + else: + padding = " " * (cell_len - len(cell_str) - 2) + if spec["rowspan"] > 1: + cell_str += padding + e_top + else: + cell_str += padding + e_str + + if spec["rowspan"] > 1: + for cc in range(spec["colspan"]): + for rr in range(1, spec["rowspan"]): + row_str = rowspan_str + _pad(rowspan_str) + if cc == 0: + if rr < spec["rowspan"] - 1: + row_str = s_mid + row_str[2:] + else: + row_str = s_bot + row_str[2:] + + if cc == spec["colspan"] - 1: + if rr < spec["rowspan"] - 1: + row_str = row_str[:-2] + e_mid + else: + row_str = row_str[:-2] + e_bot + + _tmp[r + rr][c + cc] = row_str + + _tmp[r][c] = cell_str + _pad(cell_str) + + # Append grid_str using data from _tmp in the correct order + for r in row_seq[::-1]: + grid_str += sp.join(_tmp[r]) + "\n" + + # Append grid_str to include insets info + if insets: + grid_str += "\nWith insets:\n" + for i_inset, inset in enumerate(insets): + r = inset["cell"][0] - 1 + c = inset["cell"][1] - 1 + ref = grid_ref[r][c] + + subplot_labels_str = ",".join(insets_ref[i_inset][0].layout_keys) + + # Replace, e.g., yaxis2 -> y2 + subplot_labels_str = subplot_labels_str.replace("axis", "") + + grid_str += ( + s_str + + subplot_labels_str + + e_str + + " over " + + s_str + + _get_cell_str(r, c, ref) + + e_str + + "\n" + ) + return grid_str + + +def _set_trace_grid_reference(trace, layout, grid_ref, row, col, secondary_y=False): + if row <= 0: + raise Exception("Row value is out of range. Note: the starting cell is (1, 1)") + if col <= 0: + raise Exception("Col value is out of range. Note: the starting cell is (1, 1)") + try: + subplot_refs = grid_ref[row - 1][col - 1] + except IndexError: + raise Exception( + "The (row, col) pair sent is out of " + "range. Use Figure.print_grid to view the " + "subplot grid. " + ) + + if not subplot_refs: + raise ValueError( + """ +No subplot specified at grid position ({row}, {col})""".format(row=row, col=col) + ) + + if secondary_y: + if len(subplot_refs) < 2: + raise ValueError( + """ +Subplot with type '{subplot_type}' at grid position ({row}, {col}) was not +created with the secondary_y spec property set to True. See the docstring +for the specs argument to plotly.subplots.make_subplots for more information. +""" + ) + trace_kwargs = subplot_refs[1].trace_kwargs + else: + trace_kwargs = subplot_refs[0].trace_kwargs + + for k in trace_kwargs: + if k not in trace: + raise ValueError( + """\ +Trace type '{typ}' is not compatible with subplot type '{subplot_type}' +at grid position ({row}, {col}) + +See the docstring for the specs argument to plotly.subplots.make_subplots +for more information on subplot types""".format( + typ=trace.type, + subplot_type=subplot_refs[0].subplot_type, + row=row, + col=col, + ) + ) + + # Update trace reference + trace.update(trace_kwargs) + + +def _get_grid_subplot(fig, row, col, secondary_y=False): + try: + grid_ref = fig._grid_ref + except AttributeError: + raise Exception( + "In order to reference traces by row and column, " + "you must first use " + "plotly.tools.make_subplots " + "to create the figure with a subplot grid." + ) + + rows = len(grid_ref) + cols = len(grid_ref[0]) + + # Validate row + if not isinstance(row, int) or row < 1 or rows < row: + raise ValueError( + """ +The row argument to get_subplot must be an integer where 1 <= row <= {rows} + Received value of type {typ}: {val}""".format( + rows=rows, typ=type(row), val=repr(row) + ) + ) + + if not isinstance(col, int) or col < 1 or cols < col: + raise ValueError( + """ +The col argument to get_subplot must be an integer where 1 <= row <= {cols} + Received value of type {typ}: {val}""".format( + cols=cols, typ=type(col), val=repr(col) + ) + ) + + subplot_refs = fig._grid_ref[row - 1][col - 1] + if not subplot_refs: + return None + + if secondary_y: + if len(subplot_refs) > 1: + layout_keys = subplot_refs[1].layout_keys + else: + return None + else: + layout_keys = subplot_refs[0].layout_keys + + if len(layout_keys) == 0: + return SubplotDomain(**subplot_refs[0].trace_kwargs["domain"]) + elif len(layout_keys) == 1: + return fig.layout[layout_keys[0]] + elif len(layout_keys) == 2: + return SubplotXY( + xaxis=fig.layout[layout_keys[0]], yaxis=fig.layout[layout_keys[1]] + ) + else: + raise ValueError( + """ +Unexpected subplot type with layout_keys of {}""".format(layout_keys) + ) + + +def _get_subplot_ref_for_trace(trace): + if "domain" in trace: + return SubplotRef( + subplot_type="domain", + layout_keys=(), + trace_kwargs={"domain": {"x": trace.domain.x, "y": trace.domain.y}}, + ) + + elif "xaxis" in trace and "yaxis" in trace: + xaxis_name = "xaxis" + trace.xaxis[1:] if trace.xaxis else "xaxis" + yaxis_name = "yaxis" + trace.yaxis[1:] if trace.yaxis else "yaxis" + + return SubplotRef( + subplot_type="xy", + layout_keys=(xaxis_name, yaxis_name), + trace_kwargs={"xaxis": trace.xaxis, "yaxis": trace.yaxis}, + ) + elif "geo" in trace: + return SubplotRef( + subplot_type="geo", + layout_keys=(trace.geo,), + trace_kwargs={"geo": trace.geo}, + ) + elif "scene" in trace: + return SubplotRef( + subplot_type="scene", + layout_keys=(trace.scene,), + trace_kwargs={"scene": trace.scene}, + ) + elif "subplot" in trace: + for t in _subplot_prop_named_subplot: + try: + validator = trace._get_prop_validator("subplot") + validator.validate_coerce(t) + return SubplotRef( + subplot_type=t, + layout_keys=(trace.subplot,), + trace_kwargs={"subplot": trace.subplot}, + ) + except ValueError: + pass + + return None diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/animation.py b/.venv_haddock/lib/python3.12/site-packages/plotly/animation.py new file mode 100644 index 0000000000000000000000000000000000000000..1cf5e3a4d909638e91dff3747ef10ed371cf7b2e --- /dev/null +++ b/.venv_haddock/lib/python3.12/site-packages/plotly/animation.py @@ -0,0 +1,54 @@ +from _plotly_utils.basevalidators import EnumeratedValidator, NumberValidator + + +class EasingValidator(EnumeratedValidator): + def __init__(self, plotly_name="easing", parent_name="batch_animate", **_): + super(EasingValidator, self).__init__( + plotly_name=plotly_name, + parent_name=parent_name, + values=[ + "linear", + "quad", + "cubic", + "sin", + "exp", + "circle", + "elastic", + "back", + "bounce", + "linear-in", + "quad-in", + "cubic-in", + "sin-in", + "exp-in", + "circle-in", + "elastic-in", + "back-in", + "bounce-in", + "linear-out", + "quad-out", + "cubic-out", + "sin-out", + "exp-out", + "circle-out", + "elastic-out", + "back-out", + "bounce-out", + "linear-in-out", + "quad-in-out", + "cubic-in-out", + "sin-in-out", + "exp-in-out", + "circle-in-out", + "elastic-in-out", + "back-in-out", + "bounce-in-out", + ], + ) + + +class DurationValidator(NumberValidator): + def __init__(self, plotly_name="duration"): + super(DurationValidator, self).__init__( + plotly_name=plotly_name, parent_name="batch_animate", min=0 + ) diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/api/.___init__.py b/.venv_haddock/lib/python3.12/site-packages/plotly/api/.___init__.py new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/api/.___init__.py differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/api/.___pycache__ b/.venv_haddock/lib/python3.12/site-packages/plotly/api/.___pycache__ new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/api/.___pycache__ differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/api/__init__.py b/.venv_haddock/lib/python3.12/site-packages/plotly/api/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/basedatatypes.py b/.venv_haddock/lib/python3.12/site-packages/plotly/basedatatypes.py new file mode 100644 index 0000000000000000000000000000000000000000..1384e08d543a16346e95f059d0c43fb159d2520f --- /dev/null +++ b/.venv_haddock/lib/python3.12/site-packages/plotly/basedatatypes.py @@ -0,0 +1,6434 @@ +import collections +from collections import OrderedDict +import re +import warnings +from contextlib import contextmanager +from copy import deepcopy, copy +import itertools +from functools import reduce + +from _plotly_utils.utils import ( + _natural_sort_strings, + _get_int_type, + split_multichar, + split_string_positions, + display_string_positions, + chomp_empty_strings, + find_closest_string, + convert_to_base64, +) +from _plotly_utils.exceptions import PlotlyKeyError +from .optional_imports import get_module + +from . import shapeannotation +from . import _subplots + +# Create Undefined sentinel value +# - Setting a property to None removes any existing value +# - Setting a property to Undefined leaves existing value unmodified +Undefined = object() + + +def _len_dict_item(item): + """ + Because a parsed dict path is a tuple containings strings or integers, to + know the length of the resulting string when printing we might need to + convert to a string before calling len on it. + """ + try: + temp = len(item) + except TypeError: + try: + temp = len("%d" % (item,)) + except TypeError: + raise ValueError( + "Cannot find string length of an item that is not string-like nor an integer." + ) + return temp + + +def _str_to_dict_path_full(key_path_str): + """ + Convert a key path string into a tuple of key path elements and also + return a tuple of indices marking the beginning of each element in the + string. + + Parameters + ---------- + key_path_str : str + Key path string, where nested keys are joined on '.' characters + and array indexes are specified using brackets + (e.g. 'foo.bar[1]') + Returns + ------- + tuple[str | int] + tuple [int] + """ + # skip all the parsing if the string is empty + if len(key_path_str): + # split string on ".[]" and filter out empty strings + key_path2 = split_multichar([key_path_str], list(".[]")) + # Split out underscore + # e.g. ['foo', 'bar_baz', '1'] -> ['foo', 'bar', 'baz', '1'] + key_path3 = [] + underscore_props = BaseFigure._valid_underscore_properties + + def _make_hyphen_key(key): + if "_" in key[1:]: + # For valid properties that contain underscores (error_x) + # replace the underscores with hyphens to protect them + # from being split up + for under_prop, hyphen_prop in underscore_props.items(): + key = key.replace(under_prop, hyphen_prop) + return key + + def _make_underscore_key(key): + return key.replace("-", "_") + + key_path2b = list(map(_make_hyphen_key, key_path2)) + + # Here we want to split up each non-empty string in the list at + # underscores and recombine the strings using chomp_empty_strings so + # that leading, trailing and multiple _ will be preserved + def _split_and_chomp(s): + if not len(s): + return s + s_split = split_multichar([s], list("_")) + # handle key paths like "a_path_", "_another_path", or + # "yet__another_path" by joining extra "_" to the string to the right or + # the empty string if at the end + s_chomped = chomp_empty_strings(s_split, "_", reverse=True) + return s_chomped + + # after running _split_and_chomp on key_path2b, it will be a list + # containing strings and lists of strings; concatenate the sublists with + # the list ("lift" the items out of the sublists) + key_path2c = list( + reduce( + lambda x, y: x + y if isinstance(y, list) else x + [y], + map(_split_and_chomp, key_path2b), + [], + ) + ) + + key_path2d = list(map(_make_underscore_key, key_path2c)) + all_elem_idcs = tuple(split_string_positions(list(key_path2d))) + # remove empty strings, and indices pointing to them + key_elem_pairs = list(filter(lambda t: len(t[1]), enumerate(key_path2d))) + key_path3 = [x for _, x in key_elem_pairs] + elem_idcs = [all_elem_idcs[i] for i, _ in key_elem_pairs] + + # Convert elements to ints if possible. + # e.g. ['foo', 'bar', '0'] -> ['foo', 'bar', 0] + for i in range(len(key_path3)): + try: + key_path3[i] = int(key_path3[i]) + except ValueError as _: + pass + else: + key_path3 = [] + elem_idcs = [] + + return (tuple(key_path3), elem_idcs) + + +def _remake_path_from_tuple(props): + """ + try to remake a path using the properties in props + """ + if len(props) == 0: + return "" + + def _add_square_brackets_to_number(n): + if isinstance(n, int): + return "[%d]" % (n,) + return n + + def _prepend_dot_if_not_number(s): + if not s.startswith("["): + return "." + s + return s + + props_all_str = list(map(_add_square_brackets_to_number, props)) + props_w_underscore = props_all_str[:1] + list( + map(_prepend_dot_if_not_number, props_all_str[1:]) + ) + return "".join(props_w_underscore) + + +def _check_path_in_prop_tree(obj, path, error_cast=None): + """ + obj: the object in which the first property is looked up + path: the path that will be split into properties to be looked up + path can also be a tuple. In this case, it is combined using . + and [] because it is impossible to reconstruct the string fully + in order to give a decent error message. + error_cast: this function walks down the property tree by looking up values + in objects. So this will throw exceptions that are thrown by + __getitem__, but in some cases we are checking the path for a + different reason and would prefer throwing a more relevant + exception (e.g., __getitem__ throws KeyError but __setitem__ + throws ValueError for subclasses of BasePlotlyType and + BaseFigure). So the resulting error can be "casted" to the + passed in type, if not None. + returns + an Exception object or None. The caller can raise this + exception to see where the lookup error occurred. + """ + if isinstance(path, tuple): + path = _remake_path_from_tuple(path) + prop, prop_idcs = _str_to_dict_path_full(path) + prev_objs = [] + for i, p in enumerate(prop): + arg = "" + prev_objs.append(obj) + try: + obj = obj[p] + except (ValueError, KeyError, IndexError, TypeError) as e: + arg = e.args[0] + if issubclass(e.__class__, TypeError): + # If obj doesn't support subscripting, state that and show the + # (valid) property that gives the object that doesn't support + # subscripting. + if i > 0: + validator = prev_objs[i - 1]._get_validator(prop[i - 1]) + arg += """ + +Invalid value received for the '{plotly_name}' property of {parent_name} + +{description}""".format( + parent_name=validator.parent_name, + plotly_name=validator.plotly_name, + description=validator.description(), + ) + # In case i is 0, the best we can do is indicate the first + # property in the string as having caused the error + disp_i = max(i - 1, 0) + dict_item_len = _len_dict_item(prop[disp_i]) + # if the path has trailing underscores, the prop string will start with "_" + trailing_underscores = "" + if prop[i][0] == "_": + trailing_underscores = " and path has trailing underscores" + # if the path has trailing underscores and the display index is + # one less than the prop index (see above), then we can also + # indicate the offending underscores + if (trailing_underscores != "") and (disp_i != i): + dict_item_len += _len_dict_item(prop[i]) + arg += """ + +Property does not support subscripting%s: +%s +%s""" % ( + trailing_underscores, + path, + display_string_positions( + prop_idcs, disp_i, length=dict_item_len, char="^" + ), + ) + else: + # State that the property for which subscripting was attempted + # is bad and indicate the start of the bad property. + arg += """ +Bad property path: +%s +%s""" % ( + path, + display_string_positions( + prop_idcs, i, length=_len_dict_item(prop[i]), char="^" + ), + ) + # Make KeyError more pretty by changing it to a PlotlyKeyError, + # because the Python interpreter has a special way of printing + # KeyError + if isinstance(e, KeyError): + e = PlotlyKeyError() + if error_cast is not None: + e = error_cast() + e.args = (arg,) + return e + return None + + +def _combine_dicts(dicts): + all_args = dict() + for d in dicts: + for k in d: + all_args[k] = d[k] + return all_args + + +def _indexing_combinations(dims, alls, product=False): + """ + Gives indexing tuples specified by the coordinates in dims. + If a member of dims is 'all' then it is replaced by the corresponding member + in alls. + If product is True, then the cartesian product of all the indices is + returned, otherwise the zip (that means index lists of mis-matched length + will yield a list of tuples whose length is the length of the shortest + list). + """ + if len(dims) == 0: + # this is because list(itertools.product(*[])) returns [()] which has non-zero + # length! + return [] + if len(dims) != len(alls): + raise ValueError( + "Must have corresponding values in alls for each value of dims. Got dims=%s and alls=%s." + % (str(dims), str(alls)) + ) + r = [] + for d, a in zip(dims, alls): + if d == "all": + d = a + elif not isinstance(d, list): + d = [d] + r.append(d) + if product: + return itertools.product(*r) + else: + return zip(*r) + + +def _is_select_subplot_coordinates_arg(*args): + """Returns true if any args are lists or the string 'all'""" + return any((a == "all") or isinstance(a, list) for a in args) + + +def _axis_spanning_shapes_docstr(shape_type): + docstr = "" + if shape_type == "hline": + docstr = """ +Add a horizontal line to a plot or subplot that extends infinitely in the +x-dimension. + +Parameters +---------- +y: float or int + A number representing the y coordinate of the horizontal line.""" + elif shape_type == "vline": + docstr = """ +Add a vertical line to a plot or subplot that extends infinitely in the +y-dimension. + +Parameters +---------- +x: float or int + A number representing the x coordinate of the vertical line.""" + elif shape_type == "hrect": + docstr = """ +Add a rectangle to a plot or subplot that extends infinitely in the +x-dimension. + +Parameters +---------- +y0: float or int + A number representing the y coordinate of one side of the rectangle. +y1: float or int + A number representing the y coordinate of the other side of the rectangle.""" + elif shape_type == "vrect": + docstr = """ +Add a rectangle to a plot or subplot that extends infinitely in the +y-dimension. + +Parameters +---------- +x0: float or int + A number representing the x coordinate of one side of the rectangle. +x1: float or int + A number representing the x coordinate of the other side of the rectangle.""" + docstr += """ +exclude_empty_subplots: Boolean + If True (default) do not place the shape on subplots that have no data + plotted on them. +row: None, int or 'all' + Subplot row for shape indexed starting at 1. If 'all', addresses all rows in + the specified column(s). If both row and col are None, addresses the + first subplot if subplots exist, or the only plot. By default is "all". +col: None, int or 'all' + Subplot column for shape indexed starting at 1. If 'all', addresses all rows in + the specified column(s). If both row and col are None, addresses the + first subplot if subplots exist, or the only plot. By default is "all". +annotation: dict or plotly.graph_objects.layout.Annotation. If dict(), + it is interpreted as describing an annotation. The annotation is + placed relative to the shape based on annotation_position (see + below) unless its x or y value has been specified for the annotation + passed here. xref and yref are always the same as for the added + shape and cannot be overridden.""" + if shape_type in ["hline", "vline"]: + docstr += """ +annotation_position: a string containing optionally ["top", "bottom"] + and ["left", "right"] specifying where the text should be anchored + to on the line. Example positions are "bottom left", "right top", + "right", "bottom". If an annotation is added but annotation_position is + not specified, this defaults to "top right".""" + elif shape_type in ["hrect", "vrect"]: + docstr += """ +annotation_position: a string containing optionally ["inside", "outside"], ["top", "bottom"] + and ["left", "right"] specifying where the text should be anchored + to on the rectangle. Example positions are "outside top left", "inside + bottom", "right", "inside left", "inside" ("outside" is not supported). If + an annotation is added but annotation_position is not specified this + defaults to "inside top right".""" + docstr += """ +annotation_*: any parameters to go.layout.Annotation can be passed as + keywords by prefixing them with "annotation_". For example, to specify the + annotation text "example" you can pass annotation_text="example" as a + keyword argument. +**kwargs: + Any named function parameters that can be passed to 'add_shape', + except for x0, x1, y0, y1 or type.""" + return docstr + + +def _generator(i): + """ "cast" an iterator to a generator""" + for x in i: + yield x + + +def _set_property_provided_value(obj, name, arg, provided): + """ + Initialize a property of this object using the provided value + or a value popped from the arguments dictionary. If neither + is available, do not set the property. + """ + val = arg.pop(name, None) + val = provided if provided is not None else val + if val is not None: + obj[name] = val + + +class BaseFigure(object): + """ + Base class for all figure types (both widget and non-widget) + """ + + _bracket_re = re.compile(r"^(.*)\[(\d+)\]$") + + _valid_underscore_properties = { + "error_x": "error-x", + "error_y": "error-y", + "error_z": "error-z", + "copy_xstyle": "copy-xstyle", + "copy_ystyle": "copy-ystyle", + "copy_zstyle": "copy-zstyle", + "paper_bgcolor": "paper-bgcolor", + "plot_bgcolor": "plot-bgcolor", + } + + _set_trace_uid = False + _allow_disable_validation = True + + # Constructor + # ----------- + def __init__( + self, data=None, layout_plotly=None, frames=None, skip_invalid=False, **kwargs + ): + """ + Construct a BaseFigure object + + Parameters + ---------- + data + One of: + - A list or tuple of trace objects (or dicts that can be coerced + into trace objects) + + - If `data` is a dict that contains a 'data', + 'layout', or 'frames' key then these values are used to + construct the figure. + + - If `data` is a `BaseFigure` instance then the `data`, `layout`, + and `frames` properties are extracted from the input figure + layout_plotly + The plotly layout dict. + + Note: this property is named `layout_plotly` rather than `layout` + to deconflict it with the `layout` constructor parameter of the + `widgets.DOMWidget` ipywidgets class, as the `BaseFigureWidget` + class is a subclass of both BaseFigure and widgets.DOMWidget. + + If the `data` property is a BaseFigure instance, or a dict that + contains a 'layout' key, then this property is ignored. + frames + A list or tuple of `plotly.graph_objs.Frame` objects (or dicts + that can be coerced into Frame objects) + + If the `data` property is a BaseFigure instance, or a dict that + contains a 'frames' key, then this property is ignored. + + skip_invalid: bool + If True, invalid properties in the figure specification will be + skipped silently. If False (default) invalid properties in the + figure specification will result in a ValueError + + Raises + ------ + ValueError + if a property in the specification of data, layout, or frames + is invalid AND skip_invalid is False + """ + from .validator_cache import ValidatorCache + + data_validator = ValidatorCache.get_validator("", "data") + frames_validator = ValidatorCache.get_validator("", "frames") + layout_validator = ValidatorCache.get_validator("", "layout") + + super(BaseFigure, self).__init__() + + # Initialize validation + self._validate = kwargs.pop("_validate", True) + + # Assign layout_plotly to layout + # ------------------------------ + # See docstring note for explanation + layout = layout_plotly + + # Subplot properties + # ------------------ + # These properties are used by the tools.make_subplots logic. + # We initialize them to None here, before checking if the input data + # object is a BaseFigure, or a dict with _grid_str and _grid_ref + # properties, in which case we bring over the _grid* properties of + # the input + self._grid_str = None + self._grid_ref = None + + # Handle case where data is a Figure or Figure-like dict + # ------------------------------------------------------ + if isinstance(data, BaseFigure): + # Bring over subplot fields + self._grid_str = data._grid_str + self._grid_ref = data._grid_ref + + # Extract data, layout, and frames + data, layout, frames = data.data, data.layout, data.frames + + elif isinstance(data, dict) and ( + "data" in data or "layout" in data or "frames" in data + ): + # Bring over subplot fields + self._grid_str = data.get("_grid_str", None) + self._grid_ref = data.get("_grid_ref", None) + + # Extract data, layout, and frames + data, layout, frames = ( + data.get("data", None), + data.get("layout", None), + data.get("frames", None), + ) + + # Handle data (traces) + # -------------------- + # ### Construct data validator ### + # This is the validator that handles importing sequences of trace + # objects + # We make a copy because we are overriding the set_uid attribute + # and do not want to alter all other uses of the cached data_validator + self._data_validator = copy(data_validator) + self._data_validator.set_uid = self._set_trace_uid + + # ### Import traces ### + data = self._data_validator.validate_coerce( + data, skip_invalid=skip_invalid, _validate=self._validate + ) + + # ### Save tuple of trace objects ### + self._data_objs = data + + # ### Import clone of trace properties ### + # The _data property is a list of dicts containing the properties + # explicitly set by the user for each trace. + self._data = [deepcopy(trace._props) for trace in data] + + # ### Create data defaults ### + # _data_defaults is a tuple of dicts, one for each trace. When + # running in a widget context, these defaults are populated with + # all property values chosen by the Plotly.js library that + # aren't explicitly specified by the user. + # + # Note: No property should exist in both the _data and + # _data_defaults for the same trace. + self._data_defaults = [{} for _ in data] + + # ### Reparent trace objects ### + for trace_ind, trace in enumerate(data): + # By setting the trace's parent to be this figure, we tell the + # trace object to use the figure's _data and _data_defaults + # dicts to get/set it's properties, rather than using the trace + # object's internal _orphan_props dict. + trace._parent = self + + # We clear the orphan props since the trace no longer needs then + trace._orphan_props.clear() + + # Set trace index + trace._trace_ind = trace_ind + + # Layout + # ------ + # ### Construct layout validator ### + # This is the validator that handles importing Layout objects + self._layout_validator = layout_validator + + # ### Import Layout ### + self._layout_obj = self._layout_validator.validate_coerce( + layout, skip_invalid=skip_invalid, _validate=self._validate + ) + + # ### Import clone of layout properties ### + self._layout = deepcopy(self._layout_obj._props) + + # ### Initialize layout defaults dict ### + self._layout_defaults = {} + + # ### Reparent layout object ### + self._layout_obj._orphan_props.clear() + self._layout_obj._parent = self + + # Config + # ------ + # Pass along default config to the front end. For now this just + # ensures that the plotly domain url gets passed to the front end. + # In the future we can extend this to allow the user to supply + # arbitrary config options like in plotly.offline.plot/iplot. But + # this will require a fair amount of testing to determine which + # options are compatible with FigureWidget. + from plotly.offline.offline import _get_jconfig + + self._config = _get_jconfig(None) + + # Frames + # ------ + + # ### Construct frames validator ### + # This is the validator that handles importing sequences of frame + # objects + self._frames_validator = frames_validator + + # ### Import frames ### + self._frame_objs = self._frames_validator.validate_coerce( + frames, skip_invalid=skip_invalid + ) + + # Note: Because frames are not currently supported in the widget + # context, we don't need to follow the pattern above and create + # _frames and _frame_defaults properties and then reparent the + # frames. The figure doesn't need to be notified of + # changes to the properties in the frames object hierarchy. + + # Context manager + # --------------- + + # ### batch mode indicator ### + # Flag that indicates whether we're currently inside a batch_*() + # context + self._in_batch_mode = False + + # ### Batch trace edits ### + # Dict from trace indexes to trace edit dicts. These trace edit dicts + # are suitable as `data` elements of Plotly.animate, but not + # the Plotly.update (See `_build_update_params_from_batch`) + self._batch_trace_edits = OrderedDict() + + # ### Batch layout edits ### + # Dict from layout properties to new layout values. This dict is + # directly suitable for use in Plotly.animate and Plotly.update + self._batch_layout_edits = OrderedDict() + + # Animation property validators + # ----------------------------- + from . import animation + + self._animation_duration_validator = animation.DurationValidator() + self._animation_easing_validator = animation.EasingValidator() + + # Template + # -------- + # ### Check for default template ### + self._initialize_layout_template() + + # Process kwargs + # -------------- + for k, v in kwargs.items(): + err = _check_path_in_prop_tree(self, k) + if err is None: + self[k] = v + elif not skip_invalid: + type_err = TypeError("invalid Figure property: {}".format(k)) + type_err.args = ( + type_err.args[0] + + """ +%s""" + % (err.args[0],), + ) + raise type_err + + # Magic Methods + # ------------- + def __reduce__(self): + """ + Custom implementation of reduce is used to support deep copying + and pickling + """ + props = self.to_dict() + props["_grid_str"] = self._grid_str + props["_grid_ref"] = self._grid_ref + return (self.__class__, (props,)) + + def __setitem__(self, prop, value): + # Normalize prop + # -------------- + # Convert into a property tuple + orig_prop = prop + prop = BaseFigure._str_to_dict_path(prop) + + # Handle empty case + # ----------------- + if len(prop) == 0: + raise KeyError(orig_prop) + + # Handle scalar case + # ------------------ + # e.g. ('foo',) + elif len(prop) == 1: + # ### Unwrap scalar tuple ### + prop = prop[0] + + if prop == "data": + self.data = value + elif prop == "layout": + self.layout = value + elif prop == "frames": + self.frames = value + else: + raise KeyError(prop) + + # Handle non-scalar case + # ---------------------- + # e.g. ('foo', 1) + else: + err = _check_path_in_prop_tree(self, orig_prop, error_cast=ValueError) + if err is not None: + raise err + res = self + for p in prop[:-1]: + res = res[p] + + res._validate = self._validate + + res[prop[-1]] = value + + def __setattr__(self, prop, value): + """ + Parameters + ---------- + prop : str + The name of a direct child of this object + value + New property value + Returns + ------- + None + """ + if prop.startswith("_") or hasattr(self, prop): + # Let known properties and private properties through + super(BaseFigure, self).__setattr__(prop, value) + else: + # Raise error on unknown public properties + raise AttributeError(prop) + + def __getitem__(self, prop): + # Normalize prop + # -------------- + # Convert into a property tuple + orig_prop = prop + prop = BaseFigure._str_to_dict_path(prop) + + # Handle scalar case + # ------------------ + # e.g. ('foo',) + if len(prop) == 1: + # Unwrap scalar tuple + prop = prop[0] + + if prop == "data": + return self._data_validator.present(self._data_objs) + elif prop == "layout": + return self._layout_validator.present(self._layout_obj) + elif prop == "frames": + return self._frames_validator.present(self._frame_objs) + else: + raise KeyError(orig_prop) + + # Handle non-scalar case + # ---------------------- + # e.g. ('foo', 1) + else: + err = _check_path_in_prop_tree(self, orig_prop, error_cast=PlotlyKeyError) + if err is not None: + raise err + res = self + for p in prop: + res = res[p] + + return res + + def __iter__(self): + return iter(("data", "layout", "frames")) + + def __contains__(self, prop): + prop = BaseFigure._str_to_dict_path(prop) + if prop[0] not in ("data", "layout", "frames"): + return False + elif len(prop) == 1: + return True + else: + return prop[1:] in self[prop[0]] + + def __eq__(self, other): + if not isinstance(other, BaseFigure): + # Require objects to both be BaseFigure instances + return False + else: + # Compare plotly_json representations + + # Use _vals_equal instead of `==` to handle cases where + # underlying dicts contain numpy arrays + return BasePlotlyType._vals_equal( + self.to_plotly_json(), other.to_plotly_json() + ) + + def __repr__(self): + """ + Customize Figure representation when displayed in the + terminal/notebook + """ + props = self.to_plotly_json() + + # Elide template + template_props = props.get("layout", {}).get("template", {}) + if template_props: + props["layout"]["template"] = "..." + + repr_str = BasePlotlyType._build_repr_for_class( + props=props, class_name=self.__class__.__name__ + ) + + return repr_str + + def _repr_html_(self): + """ + Customize html representation + """ + bundle = self._repr_mimebundle_() + if "text/html" in bundle: + return bundle["text/html"] + else: + return self.to_html(full_html=False, include_plotlyjs="cdn") + + def _repr_mimebundle_(self, include=None, exclude=None, validate=True, **kwargs): + """ + Return mimebundle corresponding to default renderer. + """ + import plotly.io as pio + + renderer_str = pio.renderers.default + renderers = pio._renderers.renderers + from plotly.io._utils import validate_coerce_fig_to_dict + + fig_dict = validate_coerce_fig_to_dict(self, validate) + return renderers._build_mime_bundle(fig_dict, renderer_str, **kwargs) + + def _ipython_display_(self): + """ + Handle rich display of figures in ipython contexts + """ + import plotly.io as pio + + if pio.renderers.render_on_display and pio.renderers.default: + pio.show(self) + else: + print(repr(self)) + + def _set_property(self, name, arg, provided): + """ + Initialize a property of this object using the provided value + or a value popped from the arguments dictionary. If neither + is available, do not set the property. + """ + _set_property_provided_value(self, name, arg, provided) + + def update(self, dict1=None, overwrite=False, **kwargs): + """ + Update the properties of the figure with a dict and/or with + keyword arguments. + + This recursively updates the structure of the figure + object with the values in the input dict / keyword arguments. + + Parameters + ---------- + dict1 : dict + Dictionary of properties to be updated + overwrite: bool + If True, overwrite existing properties. If False, apply updates + to existing properties recursively, preserving existing + properties that are not specified in the update operation. + kwargs : + Keyword/value pair of properties to be updated + + Examples + -------- + >>> import plotly.graph_objs as go + >>> fig = go.Figure(data=[{'y': [1, 2, 3]}]) + >>> fig.update(data=[{'y': [4, 5, 6]}]) # doctest: +ELLIPSIS + Figure(...) + >>> fig.to_plotly_json() # doctest: +SKIP + {'data': [{'type': 'scatter', + 'uid': 'e86a7c7a-346a-11e8-8aa8-a0999b0c017b', + 'y': array([4, 5, 6], dtype=int32)}], + 'layout': {}} + + >>> fig = go.Figure(layout={'xaxis': + ... {'color': 'green', + ... 'range': [0, 1]}}) + >>> fig.update({'layout': {'xaxis': {'color': 'pink'}}}) # doctest: +ELLIPSIS + Figure(...) + >>> fig.to_plotly_json() # doctest: +SKIP + {'data': [], + 'layout': {'xaxis': + {'color': 'pink', + 'range': [0, 1]}}} + + Returns + ------- + BaseFigure + Updated figure + """ + with self.batch_update(): + for d in [dict1, kwargs]: + if d: + for k, v in d.items(): + update_target = self[k] + if update_target == () or overwrite: + if k == "data": + # Overwrite all traces as special due to + # restrictions on trace assignment + self.data = () + self.add_traces(v) + else: + # Accept v + self[k] = v + elif ( + isinstance(update_target, BasePlotlyType) + and isinstance(v, (dict, BasePlotlyType)) + ) or ( + isinstance(update_target, tuple) + and isinstance(update_target[0], BasePlotlyType) + ): + BaseFigure._perform_update(self[k], v) + else: + self[k] = v + return self + + def pop(self, key, *args): + """ + Remove the value associated with the specified key and return it + + Parameters + ---------- + key: str + Property name + dflt + The default value to return if key was not found in figure + + Returns + ------- + value + The removed value that was previously associated with key + + Raises + ------ + KeyError + If key is not in object and no dflt argument specified + """ + # Handle default + if key not in self and args: + return args[0] + elif key in self: + val = self[key] + self[key] = None + return val + else: + raise KeyError(key) + + # Data + # ---- + @property + def data(self): + """ + The `data` property is a tuple of the figure's trace objects + + Returns + ------- + tuple[BaseTraceType] + """ + return self["data"] + + @data.setter + def data(self, new_data): + # Validate new_data + # ----------------- + err_header = ( + "The data property of a figure may only be assigned \n" + "a list or tuple that contains a permutation of a " + "subset of itself.\n" + ) + + # ### Treat None as empty ### + if new_data is None: + new_data = () + + # ### Check valid input type ### + if not isinstance(new_data, (list, tuple)): + err_msg = err_header + " Received value with type {typ}".format( + typ=type(new_data) + ) + raise ValueError(err_msg) + + # ### Check valid element types ### + for trace in new_data: + if not isinstance(trace, BaseTraceType): + err_msg = ( + err_header + + " Received element value of type {typ}".format(typ=type(trace)) + ) + raise ValueError(err_msg) + + # ### Check trace objects ### + # Require that no new traces are introduced + orig_uids = [id(trace) for trace in self.data] + new_uids = [id(trace) for trace in new_data] + + invalid_uids = set(new_uids).difference(set(orig_uids)) + if invalid_uids: + err_msg = err_header + + raise ValueError(err_msg) + + # ### Check for duplicates in assignment ### + uid_counter = collections.Counter(new_uids) + duplicate_uids = [uid for uid, count in uid_counter.items() if count > 1] + if duplicate_uids: + err_msg = err_header + " Received duplicated traces" + + raise ValueError(err_msg) + + # Remove traces + # ------------- + remove_uids = set(orig_uids).difference(set(new_uids)) + delete_inds = [] + + # ### Unparent removed traces ### + for i, trace in enumerate(self.data): + if id(trace) in remove_uids: + delete_inds.append(i) + + # Unparent trace object to be removed + old_trace = self.data[i] + old_trace._orphan_props.update(deepcopy(old_trace._props)) + old_trace._parent = None + old_trace._trace_ind = None + + # ### Compute trace props / defaults after removal ### + traces_props_post_removal = [t for t in self._data] + traces_prop_defaults_post_removal = [t for t in self._data_defaults] + uids_post_removal = [id(trace_data) for trace_data in self.data] + + for i in reversed(delete_inds): + del traces_props_post_removal[i] + del traces_prop_defaults_post_removal[i] + del uids_post_removal[i] + + # Modify in-place so we don't trigger serialization + del self._data[i] + + if delete_inds: + # Update widget, if any + self._send_deleteTraces_msg(delete_inds) + + # Move traces + # ----------- + + # ### Compute new index for each remaining trace ### + new_inds = [] + for uid in uids_post_removal: + new_inds.append(new_uids.index(uid)) + + # ### Compute current index for each remaining trace ### + current_inds = list(range(len(traces_props_post_removal))) + + # ### Check whether a move is needed ### + if not all([i1 == i2 for i1, i2 in zip(new_inds, current_inds)]): + # #### Save off index lists for moveTraces message #### + msg_current_inds = current_inds + msg_new_inds = new_inds + + # #### Reorder trace elements #### + # We do so in-place so we don't trigger traitlet property + # serialization for the FigureWidget case + # ##### Remove by curr_inds in reverse order ##### + moving_traces_data = [] + for ci in reversed(current_inds): + # Push moving traces data to front of list + moving_traces_data.insert(0, self._data[ci]) + del self._data[ci] + + # #### Sort new_inds and moving_traces_data by new_inds #### + new_inds, moving_traces_data = zip( + *sorted(zip(new_inds, moving_traces_data)) + ) + + # #### Insert by new_inds in forward order #### + for ni, trace_data in zip(new_inds, moving_traces_data): + self._data.insert(ni, trace_data) + + # #### Update widget, if any #### + self._send_moveTraces_msg(msg_current_inds, msg_new_inds) + + # ### Update data defaults ### + # There is to front-end syncronization to worry about so this + # operations doesn't need to be in-place + self._data_defaults = [ + _trace + for i, _trace in sorted(zip(new_inds, traces_prop_defaults_post_removal)) + ] + + # Update trace objects tuple + self._data_objs = list(new_data) + + # Update trace indexes + for trace_ind, trace in enumerate(self._data_objs): + trace._trace_ind = trace_ind + + def select_traces(self, selector=None, row=None, col=None, secondary_y=None): + """ + Select traces from a particular subplot cell and/or traces + that satisfy custom selection criteria. + + Parameters + ---------- + selector: dict, function, int, str or None (default None) + Dict to use as selection criteria. + Traces will be selected if they contain properties corresponding + to all of the dictionary's keys, with values that exactly match + the supplied values. If None (the default), all traces are + selected. If a function, it must be a function accepting a single + argument and returning a boolean. The function will be called on + each trace and those for which the function returned True + will be in the selection. If an int N, the Nth trace matching row + and col will be selected (N can be negative). If a string S, the selector + is equivalent to dict(type=S). + row, col: int or None (default None) + Subplot row and column index of traces to select. + To select traces by row and column, the Figure must have been + created using plotly.subplots.make_subplots. If None + (the default), all traces are selected. + secondary_y: boolean or None (default None) + * If True, only select traces associated with the secondary + y-axis of the subplot. + * If False, only select traces associated with the primary + y-axis of the subplot. + * If None (the default), do not filter traces based on secondary + y-axis. + + To select traces by secondary y-axis, the Figure must have been + created using plotly.subplots.make_subplots. See the docstring + for the specs argument to make_subplots for more info on + creating subplots with secondary y-axes. + Returns + ------- + generator + Generator that iterates through all of the traces that satisfy + all of the specified selection criteria + """ + if not selector and not isinstance(selector, int): + selector = {} + + if row is not None or col is not None or secondary_y is not None: + grid_ref = self._validate_get_grid_ref() + filter_by_subplot = True + + if row is None and col is not None: + # All rows for column + grid_subplot_ref_tuples = [ref_row[col - 1] for ref_row in grid_ref] + elif col is None and row is not None: + # All columns for row + grid_subplot_ref_tuples = grid_ref[row - 1] + elif col is not None and row is not None: + # Single grid cell + grid_subplot_ref_tuples = [grid_ref[row - 1][col - 1]] + else: + # row and col are None, secondary_y not None + grid_subplot_ref_tuples = [ + refs for refs_row in grid_ref for refs in refs_row + ] + + # Collect list of subplot refs, taking secondary_y into account + grid_subplot_refs = [] + for refs in grid_subplot_ref_tuples: + if not refs: + continue + if secondary_y is not True: + grid_subplot_refs.append(refs[0]) + + if secondary_y is not False and len(refs) > 1: + grid_subplot_refs.append(refs[1]) + + else: + filter_by_subplot = False + grid_subplot_refs = None + + return self._perform_select_traces( + filter_by_subplot, grid_subplot_refs, selector + ) + + def _perform_select_traces(self, filter_by_subplot, grid_subplot_refs, selector): + from plotly._subplots import _get_subplot_ref_for_trace + + # functions for filtering + def _filter_by_subplot_ref(trace): + trace_subplot_ref = _get_subplot_ref_for_trace(trace) + return trace_subplot_ref in grid_subplot_refs + + funcs = [] + if filter_by_subplot: + funcs.append(_filter_by_subplot_ref) + + return _generator(self._filter_by_selector(self.data, funcs, selector)) + + @staticmethod + def _selector_matches(obj, selector): + if selector is None: + return True + # If selector is a string then put it at the 'type' key of a dictionary + # to select objects where "type":selector + if isinstance(selector, str): + selector = dict(type=selector) + # If selector is a dict, compare the fields + if isinstance(selector, dict) or isinstance(selector, BasePlotlyType): + # This returns True if selector is an empty dict + for k in selector: + if k not in obj: + return False + + obj_val = obj[k] + selector_val = selector[k] + + if isinstance(obj_val, BasePlotlyType): + obj_val = obj_val.to_plotly_json() + + if isinstance(selector_val, BasePlotlyType): + selector_val = selector_val.to_plotly_json() + + if obj_val != selector_val: + return False + return True + # If selector is a function, call it with the obj as the argument + elif callable(selector): + return selector(obj) + else: + raise TypeError( + "selector must be dict or a function " + "accepting a graph object returning a boolean." + ) + + def _filter_by_selector(self, objects, funcs, selector): + """ + objects is a sequence of objects, funcs a list of functions that + return True if the object should be included in the selection and False + otherwise and selector is an argument to the self._selector_matches + function. + If selector is an integer, the resulting sequence obtained after + sucessively filtering by each function in funcs is indexed by this + integer. + Otherwise selector is used as the selector argument to + self._selector_matches which is used to filter down the sequence. + The function returns the sequence (an iterator). + """ + + # if selector is not an int, we call it on each trace to test it for selection + if not isinstance(selector, int): + funcs.append(lambda obj: self._selector_matches(obj, selector)) + + def _filt(last, f): + return filter(f, last) + + filtered_objects = reduce(_filt, funcs, objects) + + if isinstance(selector, int): + return iter([list(filtered_objects)[selector]]) + + return filtered_objects + + def for_each_trace(self, fn, selector=None, row=None, col=None, secondary_y=None): + """ + Apply a function to all traces that satisfy the specified selection + criteria + + Parameters + ---------- + fn: + Function that inputs a single trace object. + selector: dict, function, int, str or None (default None) + Dict to use as selection criteria. + Traces will be selected if they contain properties corresponding + to all of the dictionary's keys, with values that exactly match + the supplied values. If None (the default), all traces are + selected. If a function, it must be a function accepting a single + argument and returning a boolean. The function will be called on + each trace and those for which the function returned True + will be in the selection. If an int N, the Nth trace matching row + and col will be selected (N can be negative). If a string S, the selector + is equivalent to dict(type=S). + row, col: int or None (default None) + Subplot row and column index of traces to select. + To select traces by row and column, the Figure must have been + created using plotly.subplots.make_subplots. If None + (the default), all traces are selected. + secondary_y: boolean or None (default None) + * If True, only select traces associated with the secondary + y-axis of the subplot. + * If False, only select traces associated with the primary + y-axis of the subplot. + * If None (the default), do not filter traces based on secondary + y-axis. + + To select traces by secondary y-axis, the Figure must have been + created using plotly.subplots.make_subplots. See the docstring + for the specs argument to make_subplots for more info on + creating subplots with secondary y-axes. + Returns + ------- + self + Returns the Figure object that the method was called on + """ + for trace in self.select_traces( + selector=selector, row=row, col=col, secondary_y=secondary_y + ): + fn(trace) + + return self + + def update_traces( + self, + patch=None, + selector=None, + row=None, + col=None, + secondary_y=None, + overwrite=False, + **kwargs, + ): + """ + Perform a property update operation on all traces that satisfy the + specified selection criteria + + Parameters + ---------- + patch: dict or None (default None) + Dictionary of property updates to be applied to all traces that + satisfy the selection criteria. + selector: dict, function, int, str or None (default None) + Dict to use as selection criteria. + Traces will be selected if they contain properties corresponding + to all of the dictionary's keys, with values that exactly match + the supplied values. If None (the default), all traces are + selected. If a function, it must be a function accepting a single + argument and returning a boolean. The function will be called on + each trace and those for which the function returned True + will be in the selection. If an int N, the Nth trace matching row + and col will be selected (N can be negative). If a string S, the selector + is equivalent to dict(type=S). + row, col: int or None (default None) + Subplot row and column index of traces to select. + To select traces by row and column, the Figure must have been + created using plotly.subplots.make_subplots. If None + (the default), all traces are selected. + secondary_y: boolean or None (default None) + * If True, only select traces associated with the secondary + y-axis of the subplot. + * If False, only select traces associated with the primary + y-axis of the subplot. + * If None (the default), do not filter traces based on secondary + y-axis. + + To select traces by secondary y-axis, the Figure must have been + created using plotly.subplots.make_subplots. See the docstring + for the specs argument to make_subplots for more info on + creating subplots with secondary y-axes. + overwrite: bool + If True, overwrite existing properties. If False, apply updates + to existing properties recursively, preserving existing + properties that are not specified in the update operation. + **kwargs + Additional property updates to apply to each selected trace. If + a property is specified in both patch and in **kwargs then the + one in **kwargs takes precedence. + + Returns + ------- + self + Returns the Figure object that the method was called on + """ + for trace in self.select_traces( + selector=selector, row=row, col=col, secondary_y=secondary_y + ): + trace.update(patch, overwrite=overwrite, **kwargs) + return self + + def update_layout(self, dict1=None, overwrite=False, **kwargs): + """ + Update the properties of the figure's layout with a dict and/or with + keyword arguments. + + This recursively updates the structure of the original + layout with the values in the input dict / keyword arguments. + + Parameters + ---------- + dict1 : dict + Dictionary of properties to be updated + overwrite: bool + If True, overwrite existing properties. If False, apply updates + to existing properties recursively, preserving existing + properties that are not specified in the update operation. + kwargs : + Keyword/value pair of properties to be updated + + Returns + ------- + BaseFigure + The Figure object that the update_layout method was called on + """ + self.layout.update(dict1, overwrite=overwrite, **kwargs) + return self + + def _select_layout_subplots_by_prefix( + self, prefix, selector=None, row=None, col=None, secondary_y=None + ): + """ + Helper called by code generated select_* methods + """ + + if row is not None or col is not None or secondary_y is not None: + # Build mapping from container keys ('xaxis2', 'scene4', etc.) + # to (row, col, secondary_y) triplets + grid_ref = self._validate_get_grid_ref() + container_to_row_col = {} + for r, subplot_row in enumerate(grid_ref): + for c, subplot_refs in enumerate(subplot_row): + if not subplot_refs: + continue + + # collect primary keys + for i, subplot_ref in enumerate(subplot_refs): + for layout_key in subplot_ref.layout_keys: + if layout_key.startswith(prefix): + is_secondary_y = i == 1 + container_to_row_col[layout_key] = ( + r + 1, + c + 1, + is_secondary_y, + ) + else: + container_to_row_col = None + + layout_keys_filters = [ + lambda k: k.startswith(prefix) and self.layout[k] is not None, + lambda k: row is None + or container_to_row_col.get(k, (None, None, None))[0] == row, + lambda k: col is None + or container_to_row_col.get(k, (None, None, None))[1] == col, + lambda k: ( + secondary_y is None + or container_to_row_col.get(k, (None, None, None))[2] == secondary_y + ), + ] + layout_keys = reduce( + lambda last, f: filter(f, last), + layout_keys_filters, + # Natural sort keys so that xaxis20 is after xaxis3 + _natural_sort_strings(list(self.layout)), + ) + layout_objs = [self.layout[k] for k in layout_keys] + return _generator(self._filter_by_selector(layout_objs, [], selector)) + + def _select_annotations_like( + self, prop, selector=None, row=None, col=None, secondary_y=None + ): + """ + Helper to select annotation-like elements from a layout object array. + Compatible with layout.annotations, layout.shapes, and layout.images + """ + xref_to_col = {} + yref_to_row = {} + yref_to_secondary_y = {} + if isinstance(row, int) or isinstance(col, int) or secondary_y is not None: + grid_ref = self._validate_get_grid_ref() + for r, subplot_row in enumerate(grid_ref): + for c, subplot_refs in enumerate(subplot_row): + if not subplot_refs: + continue + + for i, subplot_ref in enumerate(subplot_refs): + if subplot_ref.subplot_type == "xy": + is_secondary_y = i == 1 + xaxis, yaxis = subplot_ref.layout_keys + xref = xaxis.replace("axis", "") + yref = yaxis.replace("axis", "") + xref_to_col[xref] = c + 1 + yref_to_row[yref] = r + 1 + yref_to_secondary_y[yref] = is_secondary_y + + # filter down (select) which graph objects, by applying the filters + # successively + def _filter_row(obj): + """Filter objects in rows by column""" + return (col is None) or (xref_to_col.get(obj.xref, None) == col) + + def _filter_col(obj): + """Filter objects in columns by row""" + return (row is None) or (yref_to_row.get(obj.yref, None) == row) + + def _filter_sec_y(obj): + """Filter objects on secondary y axes""" + return (secondary_y is None) or ( + yref_to_secondary_y.get(obj.yref, None) == secondary_y + ) + + funcs = [_filter_row, _filter_col, _filter_sec_y] + + return _generator(self._filter_by_selector(self.layout[prop], funcs, selector)) + + def _add_annotation_like( + self, + prop_singular, + prop_plural, + new_obj, + row=None, + col=None, + secondary_y=None, + exclude_empty_subplots=False, + ): + # Make sure we have both row and col or neither + if row is not None and col is None: + raise ValueError( + "Received row parameter but not col.\n" + "row and col must be specified together" + ) + elif col is not None and row is None: + raise ValueError( + "Received col parameter but not row.\n" + "row and col must be specified together" + ) + + # Address multiple subplots + if row is not None and _is_select_subplot_coordinates_arg(row, col): + # TODO product argument could be added + rows_cols = self._select_subplot_coordinates(row, col) + for r, c in rows_cols: + self._add_annotation_like( + prop_singular, + prop_plural, + new_obj, + row=r, + col=c, + secondary_y=secondary_y, + exclude_empty_subplots=exclude_empty_subplots, + ) + return self + + # Get grid_ref if specific row or column requested + if row is not None: + grid_ref = self._validate_get_grid_ref() + if row > len(grid_ref): + raise IndexError( + "row index %d out-of-bounds, row index must be between 1 and %d, inclusive." + % (row, len(grid_ref)) + ) + if col > len(grid_ref[row - 1]): + raise IndexError( + "column index %d out-of-bounds, " + "column index must be between 1 and %d, inclusive." + % (row, len(grid_ref[row - 1])) + ) + refs = grid_ref[row - 1][col - 1] + if not refs: + raise ValueError( + "No subplot found at position ({r}, {c})".format(r=row, c=col) + ) + + if refs[0].subplot_type != "xy": + raise ValueError( + """ +Cannot add {prop_singular} to subplot at position ({r}, {c}) because subplot +is of type {subplot_type}.""".format( + prop_singular=prop_singular, + r=row, + c=col, + subplot_type=refs[0].subplot_type, + ) + ) + + # If the new_object was created with a yref specified that did not include paper or domain, the specified yref should be used otherwise assign the xref and yref from the layout_keys + if ( + new_obj.yref is None + or new_obj.yref == "y" + or "paper" in new_obj.yref + or "domain" in new_obj.yref + ): + if len(refs) == 1 and secondary_y: + raise ValueError( + """ + Cannot add {prop_singular} to secondary y-axis of subplot at position ({r}, {c}) + because subplot does not have a secondary y-axis""".format( + prop_singular=prop_singular, r=row, c=col + ) + ) + if secondary_y: + xaxis, yaxis = refs[1].layout_keys + else: + xaxis, yaxis = refs[0].layout_keys + xref, yref = xaxis.replace("axis", ""), yaxis.replace("axis", "") + else: + yref = new_obj.yref + xaxis = refs[0].layout_keys[0] + xref = xaxis.replace("axis", "") + # if exclude_empty_subplots is True, check to see if subplot is + # empty and return if it is + if exclude_empty_subplots and ( + not self._subplot_not_empty( + xref, yref, selector=bool(exclude_empty_subplots) + ) + ): + return self + + # in case the user specified they wanted an axis to refer to the + # domain of that axis and not the data, append ' domain' to the + # computed axis accordingly + def _add_domain(ax_letter, new_axref): + axref = ax_letter + "ref" + if axref in new_obj._props.keys() and "domain" in new_obj[axref]: + new_axref += " domain" + return new_axref + + xref, yref = map(lambda t: _add_domain(*t), zip(["x", "y"], [xref, yref])) + new_obj.update(xref=xref, yref=yref) + + self.layout[prop_plural] += (new_obj,) + # The 'new_obj.xref' and 'new_obj.yref' parameters need to be reset otherwise it + # will appear as if user supplied yref params when looping through subplots and + # will force annotation to be on the axis of the last drawn annotation + # i.e. they all end up on the same axis. + new_obj.update(xref=None, yref=None) + + return self + + # Restyle + # ------- + def plotly_restyle(self, restyle_data, trace_indexes=None, **kwargs): + """ + Perform a Plotly restyle operation on the figure's traces + + Parameters + ---------- + restyle_data : dict + Dict of trace style updates. + + Keys are strings that specify the properties to be updated. + Nested properties are expressed by joining successive keys on + '.' characters (e.g. 'marker.color'). + + Values may be scalars or lists. When values are scalars, + that scalar value is applied to all traces specified by the + `trace_indexes` parameter. When values are lists, + the restyle operation will cycle through the elements + of the list as it cycles through the traces specified by the + `trace_indexes` parameter. + + Caution: To use plotly_restyle to update a list property (e.g. + the `x` property of the scatter trace), the property value + should be a scalar list containing the list to update with. For + example, the following command would be used to update the 'x' + property of the first trace to the list [1, 2, 3] + + >>> import plotly.graph_objects as go + >>> fig = go.Figure(go.Scatter(x=[2, 4, 6])) + >>> fig.plotly_restyle({'x': [[1, 2, 3]]}, 0) + + trace_indexes : int or list of int + Trace index, or list of trace indexes, that the restyle operation + applies to. Defaults to all trace indexes. + + Returns + ------- + None + """ + + # Normalize trace indexes + # ----------------------- + trace_indexes = self._normalize_trace_indexes(trace_indexes) + + # Handle source_view_id + # --------------------- + # If not None, the source_view_id is the UID of the frontend + # Plotly.js view that initially triggered this restyle operation + # (e.g. the user clicked on the legend to hide a trace). We pass + # this UID along so that the frontend views can determine whether + # they need to apply the restyle operation on themselves. + source_view_id = kwargs.get("source_view_id", None) + + # Perform restyle on trace dicts + # ------------------------------ + restyle_changes = self._perform_plotly_restyle(restyle_data, trace_indexes) + if restyle_changes: + # The restyle operation resulted in a change to some trace + # properties, so we dispatch change callbacks and send the + # restyle message to the frontend (if any) + msg_kwargs = ( + {"source_view_id": source_view_id} if source_view_id is not None else {} + ) + + self._send_restyle_msg( + restyle_changes, trace_indexes=trace_indexes, **msg_kwargs + ) + + self._dispatch_trace_change_callbacks(restyle_changes, trace_indexes) + + def _perform_plotly_restyle(self, restyle_data, trace_indexes): + """ + Perform a restyle operation on the figure's traces data and return + the changes that were applied + + Parameters + ---------- + restyle_data : dict[str, any] + See docstring for plotly_restyle + trace_indexes : list[int] + List of trace indexes that restyle operation applies to + Returns + ------- + restyle_changes: dict[str, any] + Subset of restyle_data including only the keys / values that + resulted in a change to the figure's traces data + """ + # Initialize restyle changes + # -------------------------- + # This will be a subset of the restyle_data including only the + # keys / values that are changed in the figure's trace data + restyle_changes = {} + + # Process each key + # ---------------- + for key_path_str, v in restyle_data.items(): + # Track whether any of the new values are cause a change in + # self._data + any_vals_changed = False + for i, trace_ind in enumerate(trace_indexes): + if trace_ind >= len(self._data): + raise ValueError( + "Trace index {trace_ind} out of range".format( + trace_ind=trace_ind + ) + ) + + # Get new value for this particular trace + trace_v = v[i % len(v)] if isinstance(v, list) else v + + if trace_v is not Undefined: + # Get trace being updated + trace_obj = self.data[trace_ind] + + # Validate key_path_str + if not BaseFigure._is_key_path_compatible(key_path_str, trace_obj): + trace_class = trace_obj.__class__.__name__ + raise ValueError( + """ +Invalid property path '{key_path_str}' for trace class {trace_class} +""".format(key_path_str=key_path_str, trace_class=trace_class) + ) + + # Apply set operation for this trace and thist value + val_changed = BaseFigure._set_in( + self._data[trace_ind], key_path_str, trace_v + ) + + # Update any_vals_changed status + any_vals_changed = any_vals_changed or val_changed + + if any_vals_changed: + restyle_changes[key_path_str] = v + + return restyle_changes + + def _restyle_child(self, child, key_path_str, val): + """ + Process restyle operation on a child trace object + + Note: This method name/signature must match the one in + BasePlotlyType. BasePlotlyType objects call their parent's + _restyle_child method without knowing whether their parent is a + BasePlotlyType or a BaseFigure. + + Parameters + ---------- + child : BaseTraceType + Child being restyled + key_path_str : str + A key path string (e.g. 'foo.bar[0]') + val + Restyle value + + Returns + ------- + None + """ + + # Compute trace index + # ------------------- + trace_index = child._trace_ind + + # Not in batch mode + # ----------------- + # Dispatch change callbacks and send restyle message + if not self._in_batch_mode: + send_val = [val] + restyle = {key_path_str: send_val} + self._send_restyle_msg(restyle, trace_indexes=trace_index) + self._dispatch_trace_change_callbacks(restyle, [trace_index]) + + # In batch mode + # ------------- + # Add key_path_str/val to saved batch edits + else: + if trace_index not in self._batch_trace_edits: + self._batch_trace_edits[trace_index] = OrderedDict() + self._batch_trace_edits[trace_index][key_path_str] = val + + def _normalize_trace_indexes(self, trace_indexes): + """ + Input trace index specification and return list of the specified trace + indexes + + Parameters + ---------- + trace_indexes : None or int or list[int] + + Returns + ------- + list[int] + """ + if trace_indexes is None: + trace_indexes = list(range(len(self.data))) + if not isinstance(trace_indexes, (list, tuple)): + trace_indexes = [trace_indexes] + return list(trace_indexes) + + @staticmethod + def _str_to_dict_path(key_path_str): + """ + Convert a key path string into a tuple of key path elements. + + Parameters + ---------- + key_path_str : str + Key path string, where nested keys are joined on '.' characters + and array indexes are specified using brackets + (e.g. 'foo.bar[1]') + Returns + ------- + tuple[str | int] + """ + if ( + isinstance(key_path_str, str) + and "." not in key_path_str + and "[" not in key_path_str + and "_" not in key_path_str + ): + # Fast path for common case that avoids regular expressions + return (key_path_str,) + elif isinstance(key_path_str, tuple): + # Nothing to do + return key_path_str + else: + ret = _str_to_dict_path_full(key_path_str)[0] + return ret + + @staticmethod + def _set_in(d, key_path_str, v): + """ + Set a value in a nested dict using a key path string + (e.g. 'foo.bar[0]') + + Parameters + ---------- + d : dict + Input dict to set property in + key_path_str : str + Key path string, where nested keys are joined on '.' characters + and array indexes are specified using brackets + (e.g. 'foo.bar[1]') + v + New value + Returns + ------- + bool + True if set resulted in modification of dict (i.e. v was not + already present at the specified location), False otherwise. + """ + + # Validate inputs + # --------------- + assert isinstance(d, dict) + + # Compute key path + # ---------------- + # Convert the key_path_str into a tuple of key paths + # e.g. 'foo.bar[0]' -> ('foo', 'bar', 0) + key_path = BaseFigure._str_to_dict_path(key_path_str) + + # Initialize val_parent + # --------------------- + # This variable will be assigned to the parent of the next key path + # element currently being processed + val_parent = d + + # Initialize parent dict or list of value to be assigned + # ----------------------------------------------------- + for kp, key_path_el in enumerate(key_path[:-1]): + # Extend val_parent list if needed + if isinstance(val_parent, list) and isinstance(key_path_el, int): + while len(val_parent) <= key_path_el: + val_parent.append(None) + + elif isinstance(val_parent, dict) and key_path_el not in val_parent: + if isinstance(key_path[kp + 1], int): + val_parent[key_path_el] = [] + else: + val_parent[key_path_el] = {} + + val_parent = val_parent[key_path_el] + + # Assign value to to final parent dict or list + # -------------------------------------------- + # ### Get reference to final key path element ### + last_key = key_path[-1] + + # ### Track whether assignment alters parent ### + val_changed = False + + # v is Undefined + # -------------- + # Don't alter val_parent + if v is Undefined: + pass + + # v is None + # --------- + # Check whether we can remove key from parent + elif v is None: + if isinstance(val_parent, dict): + if last_key in val_parent: + # Parent is a dict and has last_key as a current key so + # we can pop the key, which alters parent + val_parent.pop(last_key) + val_changed = True + elif isinstance(val_parent, list): + if isinstance(last_key, int) and 0 <= last_key < len(val_parent): + # Parent is a list and last_key is a valid index so we + # can set the element value to None + val_parent[last_key] = None + val_changed = True + else: + # Unsupported parent type (numpy array for example) + raise ValueError( + """ + Cannot remove element of type {typ} at location {raw_key}""".format( + typ=type(val_parent), raw_key=key_path_str + ) + ) + # v is a valid value + # ------------------ + # Check whether parent should be updated + else: + if isinstance(val_parent, dict): + if last_key not in val_parent or not BasePlotlyType._vals_equal( + val_parent[last_key], v + ): + # Parent is a dict and does not already contain the + # value v at key last_key + val_parent[last_key] = v + val_changed = True + elif isinstance(val_parent, list): + if isinstance(last_key, int): + # Extend list with Nones if needed so that last_key is + # in bounds + while len(val_parent) <= last_key: + val_parent.append(None) + + if not BasePlotlyType._vals_equal(val_parent[last_key], v): + # Parent is a list and does not already contain the + # value v at index last_key + val_parent[last_key] = v + val_changed = True + else: + # Unsupported parent type (numpy array for example) + raise ValueError( + """ + Cannot set element of type {typ} at location {raw_key}""".format( + typ=type(val_parent), raw_key=key_path_str + ) + ) + return val_changed + + # Add traces + # ---------- + @staticmethod + def _raise_invalid_rows_cols(name, n, invalid): + rows_err_msg = """ + If specified, the {name} parameter must be a list or tuple of integers + of length {n} (The number of traces being added) + + Received: {invalid} + """.format(name=name, n=n, invalid=invalid) + + raise ValueError(rows_err_msg) + + @staticmethod + def _validate_rows_cols(name, n, vals): + if vals is None: + pass + elif isinstance(vals, (list, tuple)): + if len(vals) != n: + BaseFigure._raise_invalid_rows_cols(name=name, n=n, invalid=vals) + + int_type = _get_int_type() + + if [r for r in vals if not isinstance(r, int_type)]: + BaseFigure._raise_invalid_rows_cols(name=name, n=n, invalid=vals) + else: + BaseFigure._raise_invalid_rows_cols(name=name, n=n, invalid=vals) + + def add_trace( + self, trace, row=None, col=None, secondary_y=None, exclude_empty_subplots=False + ): + """ + Add a trace to the figure + + Parameters + ---------- + trace : BaseTraceType or dict + Either: + - An instances of a trace classe from the plotly.graph_objs + package (e.g plotly.graph_objs.Scatter, plotly.graph_objs.Bar) + - or a dicts where: + + - The 'type' property specifies the trace type (e.g. + 'scatter', 'bar', 'area', etc.). If the dict has no 'type' + property then 'scatter' is assumed. + - All remaining properties are passed to the constructor + of the specified trace type. + + row : 'all', int or None (default) + Subplot row index (starting from 1) for the trace to be + added. Only valid if figure was created using + `plotly.tools.make_subplots`. + If 'all', addresses all rows in the specified column(s). + col : 'all', int or None (default) + Subplot col index (starting from 1) for the trace to be + added. Only valid if figure was created using + `plotly.tools.make_subplots`. + If 'all', addresses all columns in the specified row(s). + secondary_y: boolean or None (default None) + If True, associate this trace with the secondary y-axis of the + subplot at the specified row and col. Only valid if all of the + following conditions are satisfied: + * The figure was created using `plotly.subplots.make_subplots`. + * The row and col arguments are not None + * The subplot at the specified row and col has type xy + (which is the default) and secondary_y True. These + properties are specified in the specs argument to + make_subplots. See the make_subplots docstring for more info. + * The trace argument is a 2D cartesian trace + (scatter, bar, etc.) + exclude_empty_subplots: boolean + If True, the trace will not be added to subplots that don't already + have traces. + Returns + ------- + BaseFigure + The Figure that add_trace was called on + + Examples + -------- + + >>> from plotly import subplots + >>> import plotly.graph_objs as go + + Add two Scatter traces to a figure + + >>> fig = go.Figure() + >>> fig.add_trace(go.Scatter(x=[1,2,3], y=[2,1,2])) # doctest: +ELLIPSIS + Figure(...) + >>> fig.add_trace(go.Scatter(x=[1,2,3], y=[2,1,2])) # doctest: +ELLIPSIS + Figure(...) + + + Add two Scatter traces to vertically stacked subplots + + >>> fig = subplots.make_subplots(rows=2) + >>> fig.add_trace(go.Scatter(x=[1,2,3], y=[2,1,2]), row=1, col=1) # doctest: +ELLIPSIS + Figure(...) + >>> fig.add_trace(go.Scatter(x=[1,2,3], y=[2,1,2]), row=2, col=1) # doctest: +ELLIPSIS + Figure(...) + """ + # Make sure we have both row and col or neither + if row is not None and col is None: + raise ValueError( + "Received row parameter but not col.\n" + "row and col must be specified together" + ) + elif col is not None and row is None: + raise ValueError( + "Received col parameter but not row.\n" + "row and col must be specified together" + ) + + # Address multiple subplots + if row is not None and _is_select_subplot_coordinates_arg(row, col): + # TODO add product argument + rows_cols = self._select_subplot_coordinates(row, col) + for r, c in rows_cols: + self.add_trace( + trace, + row=r, + col=c, + secondary_y=secondary_y, + exclude_empty_subplots=exclude_empty_subplots, + ) + return self + + return self.add_traces( + data=[trace], + rows=[row] if row is not None else None, + cols=[col] if col is not None else None, + secondary_ys=[secondary_y] if secondary_y is not None else None, + exclude_empty_subplots=exclude_empty_subplots, + ) + + def add_traces( + self, + data, + rows=None, + cols=None, + secondary_ys=None, + exclude_empty_subplots=False, + ): + """ + Add traces to the figure + + Parameters + ---------- + data : list[BaseTraceType or dict] + A list of trace specifications to be added. + Trace specifications may be either: + + - Instances of trace classes from the plotly.graph_objs + package (e.g plotly.graph_objs.Scatter, plotly.graph_objs.Bar) + - Dicts where: + + - The 'type' property specifies the trace type (e.g. + 'scatter', 'bar', 'area', etc.). If the dict has no 'type' + property then 'scatter' is assumed. + - All remaining properties are passed to the constructor + of the specified trace type. + + rows : None, list[int], or int (default None) + List of subplot row indexes (starting from 1) for the traces to be + added. Only valid if figure was created using + `plotly.tools.make_subplots` + If a single integer is passed, all traces will be added to row number + + cols : None or list[int] (default None) + List of subplot column indexes (starting from 1) for the traces + to be added. Only valid if figure was created using + `plotly.tools.make_subplots` + If a single integer is passed, all traces will be added to column number + + + secondary_ys: None or list[boolean] (default None) + List of secondary_y booleans for traces to be added. See the + docstring for `add_trace` for more info. + + exclude_empty_subplots: boolean + If True, the trace will not be added to subplots that don't already + have traces. + + Returns + ------- + BaseFigure + The Figure that add_traces was called on + + Examples + -------- + + >>> from plotly import subplots + >>> import plotly.graph_objs as go + + Add two Scatter traces to a figure + + >>> fig = go.Figure() + >>> fig.add_traces([go.Scatter(x=[1,2,3], y=[2,1,2]), + ... go.Scatter(x=[1,2,3], y=[2,1,2])]) # doctest: +ELLIPSIS + Figure(...) + + Add two Scatter traces to vertically stacked subplots + + >>> fig = subplots.make_subplots(rows=2) + >>> fig.add_traces([go.Scatter(x=[1,2,3], y=[2,1,2]), + ... go.Scatter(x=[1,2,3], y=[2,1,2])], + ... rows=[1, 2], cols=[1, 1]) # doctest: +ELLIPSIS + Figure(...) + """ + + # Validate traces + data = self._data_validator.validate_coerce(data) + + # Set trace indexes + for ind, new_trace in enumerate(data): + new_trace._trace_ind = ind + len(self.data) + + # Allow integers as inputs to subplots + int_type = _get_int_type() + + if isinstance(rows, int_type): + rows = [rows] * len(data) + + if isinstance(cols, int_type): + cols = [cols] * len(data) + + # Validate rows / cols + n = len(data) + BaseFigure._validate_rows_cols("rows", n, rows) + BaseFigure._validate_rows_cols("cols", n, cols) + + # Make sure we have both rows and cols or neither + if rows is not None and cols is None: + raise ValueError( + "Received rows parameter but not cols.\n" + "rows and cols must be specified together" + ) + elif cols is not None and rows is None: + raise ValueError( + "Received cols parameter but not rows.\n" + "rows and cols must be specified together" + ) + + # Process secondary_ys defaults + if secondary_ys is not None and rows is None: + # Default rows/cols to 1s if secondary_ys specified but not rows + # or cols + rows = [1] * len(secondary_ys) + cols = rows + elif secondary_ys is None and rows is not None: + # Default secondary_ys to Nones if secondary_ys is not specified + # but not rows and cols are specified + secondary_ys = [None] * len(rows) + + # Apply rows / cols + if rows is not None: + for trace, row, col, secondary_y in zip(data, rows, cols, secondary_ys): + self._set_trace_grid_position(trace, row, col, secondary_y) + + if exclude_empty_subplots: + data = list( + filter( + lambda trace: self._subplot_not_empty( + trace["xaxis"], trace["yaxis"], bool(exclude_empty_subplots) + ), + data, + ) + ) + + # Make deep copy of trace data (Optimize later if needed) + new_traces_data = [deepcopy(trace._props) for trace in data] + + # Update trace parent + for trace in data: + trace._parent = self + trace._orphan_props.clear() + + # Update python side + # Use extend instead of assignment so we don't trigger serialization + self._data.extend(new_traces_data) + self._data_defaults = self._data_defaults + [{} for _ in data] + self._data_objs = self._data_objs + data + + # Update messages + self._send_addTraces_msg(new_traces_data) + + return self + + # Subplots + # -------- + def print_grid(self): + """ + Print a visual layout of the figure's axes arrangement. + This is only valid for figures that are created + with plotly.tools.make_subplots. + """ + if self._grid_str is None: + raise Exception("Use plotly.tools.make_subplots to create a subplot grid.") + print(self._grid_str) + + def append_trace(self, trace, row, col): + """ + Add a trace to the figure bound to axes at the specified row, + col index. + + A row, col index grid is generated for figures created with + plotly.tools.make_subplots, and can be viewed with the `print_grid` + method + + Parameters + ---------- + trace + The data trace to be bound + row: int + Subplot row index (see Figure.print_grid) + col: int + Subplot column index (see Figure.print_grid) + + Examples + -------- + + >>> from plotly import tools + >>> import plotly.graph_objs as go + >>> # stack two subplots vertically + >>> fig = tools.make_subplots(rows=2) + + This is the format of your plot grid: + [ (1,1) x1,y1 ] + [ (2,1) x2,y2 ] + + >>> fig.append_trace(go.Scatter(x=[1,2,3], y=[2,1,2]), row=1, col=1) + >>> fig.append_trace(go.Scatter(x=[1,2,3], y=[2,1,2]), row=2, col=1) + """ + warnings.warn( + """\ +The append_trace method is deprecated and will be removed in a future version. +Please use the add_trace method with the row and col parameters. +""", + DeprecationWarning, + ) + + self.add_trace(trace=trace, row=row, col=col) + + def _set_trace_grid_position(self, trace, row, col, secondary_y=False): + from plotly._subplots import _set_trace_grid_reference + + grid_ref = self._validate_get_grid_ref() + return _set_trace_grid_reference( + trace, self.layout, grid_ref, row, col, secondary_y + ) + + def _validate_get_grid_ref(self): + try: + grid_ref = self._grid_ref + if grid_ref is None: + raise AttributeError("_grid_ref") + except AttributeError: + raise Exception( + "In order to reference traces by row and column, " + "you must first use " + "plotly.tools.make_subplots " + "to create the figure with a subplot grid." + ) + return grid_ref + + def _get_subplot_rows_columns(self): + """ + Returns a pair of lists, the first containing all the row indices and + the second all the column indices. + """ + # currently, this just iterates over all the rows and columns (because + # self._grid_ref is currently always rectangular) + grid_ref = self._validate_get_grid_ref() + nrows = len(grid_ref) + ncols = len(grid_ref[0]) + return (range(1, nrows + 1), range(1, ncols + 1)) + + def _get_subplot_coordinates(self): + """ + Returns an iterator over (row,col) pairs representing all the possible + subplot coordinates. + """ + return itertools.product(*self._get_subplot_rows_columns()) + + def _select_subplot_coordinates(self, rows, cols, product=False): + """ + Allows selecting all or a subset of the subplots. + If any of rows or columns is 'all', product is set to True. This is + probably the expected behaviour, so that rows=1,cols='all' selects all + the columns in row 1 (otherwise it would just select the subplot in the + first row and first column). + """ + product |= any([s == "all" for s in [rows, cols]]) + # TODO: If grid_ref ever becomes non-rectangular, then t should be the + # set-intersection of the result of _indexing_combinations and + # _get_subplot_coordinates, because some coordinates given by + # the _indexing_combinations function might be invalid. + t = _indexing_combinations( + [rows, cols], + list(self._get_subplot_rows_columns()), + product=product, + ) + t = list(t) + # remove rows and cols where the subplot is "None" + grid_ref = self._validate_get_grid_ref() + t = list(filter(lambda u: grid_ref[u[0] - 1][u[1] - 1] is not None, t)) + return t + + def get_subplot(self, row, col, secondary_y=False): + """ + Return an object representing the subplot at the specified row + and column. May only be used on Figures created using + plotly.tools.make_subplots + + Parameters + ---------- + row: int + 1-based index of subplot row + col: int + 1-based index of subplot column + secondary_y: bool + If True, select the subplot that consists of the x-axis and the + secondary y-axis at the specified row/col. Only valid if the + subplot at row/col is an 2D cartesian subplot that was created + with a secondary y-axis. See the docstring for the specs argument + to make_subplots for more info on creating a subplot with a + secondary y-axis. + Returns + ------- + subplot + * None: if subplot is empty + * plotly.graph_objs.layout.Scene: if subplot type is 'scene' + * plotly.graph_objs.layout.Polar: if subplot type is 'polar' + * plotly.graph_objs.layout.Ternary: if subplot type is 'ternary' + * plotly.graph_objs.layout.Mapbox: if subplot type is 'ternary' + * SubplotDomain namedtuple with `x` and `y` fields: + if subplot type is 'domain'. + - x: length 2 list of the subplot start and stop width + - y: length 2 list of the subplot start and stop height + * SubplotXY namedtuple with `xaxis` and `yaxis` fields: + if subplot type is 'xy'. + - xaxis: plotly.graph_objs.layout.XAxis instance for subplot + - yaxis: plotly.graph_objs.layout.YAxis instance for subplot + """ + from plotly._subplots import _get_grid_subplot + + return _get_grid_subplot(self, row, col, secondary_y) + + # Child property operations + # ------------------------- + def _get_child_props(self, child): + """ + Return the properties dict for a child trace or child layout + + Note: this method must match the name/signature of one on + BasePlotlyType + + Parameters + ---------- + child : BaseTraceType | BaseLayoutType + + Returns + ------- + dict + """ + # Try to find index of child as a trace + # ------------------------------------- + if isinstance(child, BaseTraceType): + # ### Child is a trace ### + trace_index = child._trace_ind + return self._data[trace_index] + + # Child is the layout + # ------------------- + elif child is self.layout: + return self._layout + + # Unknown child + # ------------- + else: + raise ValueError("Unrecognized child: %s" % child) + + def _get_child_prop_defaults(self, child): + """ + Return the default properties dict for a child trace or child layout + + Note: this method must match the name/signature of one on + BasePlotlyType + + Parameters + ---------- + child : BaseTraceType | BaseLayoutType + + Returns + ------- + dict + """ + # Child is a trace + # ---------------- + if isinstance(child, BaseTraceType): + trace_index = child._trace_ind + return self._data_defaults[trace_index] + + # Child is the layout + # ------------------- + elif child is self.layout: + return self._layout_defaults + + # Unknown child + # ------------- + else: + raise ValueError("Unrecognized child: %s" % child) + + def _init_child_props(self, child): + """ + Initialize the properties dict for a child trace or layout + + Note: this method must match the name/signature of one on + BasePlotlyType + + Parameters + ---------- + child : BaseTraceType | BaseLayoutType + + Returns + ------- + None + """ + # layout and traces dict are initialize when figure is constructed + # and when new traces are added to the figure + pass + + # Layout + # ------ + def _initialize_layout_template(self): + import plotly.io as pio + + if self._layout_obj._props.get("template", None) is None: + if pio.templates.default is not None: + # Assume default template is already validated + if self._allow_disable_validation: + self._layout_obj._validate = False + try: + if isinstance(pio.templates.default, BasePlotlyType): + # Template object. Don't want to actually import `Template` + # here for performance so we check against `BasePlotlyType` + template_object = pio.templates.default + else: + # Name of registered template object + template_object = pio.templates[pio.templates.default] + self._layout_obj.template = template_object + finally: + self._layout_obj._validate = self._validate + + @property + def layout(self): + """ + The `layout` property of the figure + + Returns + ------- + plotly.graph_objs.Layout + """ + return self["layout"] + + @layout.setter + def layout(self, new_layout): + # Validate new layout + # ------------------- + new_layout = self._layout_validator.validate_coerce(new_layout) + new_layout_data = deepcopy(new_layout._props) + + # Unparent current layout + # ----------------------- + if self._layout_obj: + old_layout_data = deepcopy(self._layout_obj._props) + self._layout_obj._orphan_props.update(old_layout_data) + self._layout_obj._parent = None + + # Parent new layout + # ----------------- + self._layout = new_layout_data + new_layout._parent = self + new_layout._orphan_props.clear() + self._layout_obj = new_layout + + # Initialize template object + # -------------------------- + self._initialize_layout_template() + + # Notify JS side + self._send_relayout_msg(new_layout_data) + + def plotly_relayout(self, relayout_data, **kwargs): + """ + Perform a Plotly relayout operation on the figure's layout + + Parameters + ---------- + relayout_data : dict + Dict of layout updates + + dict keys are strings that specify the properties to be updated. + Nested properties are expressed by joining successive keys on + '.' characters (e.g. 'xaxis.range') + + dict values are the values to use to update the layout. + + Returns + ------- + None + """ + + # Handle source_view_id + # --------------------- + # If not None, the source_view_id is the UID of the frontend + # Plotly.js view that initially triggered this relayout operation + # (e.g. the user clicked on the toolbar to change the drag mode + # from zoom to pan). We pass this UID along so that the frontend + # views can determine whether they need to apply the relayout + # operation on themselves. + if "source_view_id" in kwargs: + msg_kwargs = {"source_view_id": kwargs["source_view_id"]} + else: + msg_kwargs = {} + + # Perform relayout operation on layout dict + # ----------------------------------------- + relayout_changes = self._perform_plotly_relayout(relayout_data) + if relayout_changes: + # The relayout operation resulted in a change to some layout + # properties, so we dispatch change callbacks and send the + # relayout message to the frontend (if any) + self._send_relayout_msg(relayout_changes, **msg_kwargs) + + self._dispatch_layout_change_callbacks(relayout_changes) + + def _perform_plotly_relayout(self, relayout_data): + """ + Perform a relayout operation on the figure's layout data and return + the changes that were applied + + Parameters + ---------- + relayout_data : dict[str, any] + See the docstring for plotly_relayout + Returns + ------- + relayout_changes: dict[str, any] + Subset of relayout_data including only the keys / values that + resulted in a change to the figure's layout data + """ + # Initialize relayout changes + # --------------------------- + # This will be a subset of the relayout_data including only the + # keys / values that are changed in the figure's layout data + relayout_changes = {} + + # Process each key + # ---------------- + for key_path_str, v in relayout_data.items(): + if not BaseFigure._is_key_path_compatible(key_path_str, self.layout): + raise ValueError( + """ +Invalid property path '{key_path_str}' for layout +""".format(key_path_str=key_path_str) + ) + + # Apply set operation on the layout dict + val_changed = BaseFigure._set_in(self._layout, key_path_str, v) + + if val_changed: + relayout_changes[key_path_str] = v + + return relayout_changes + + @staticmethod + def _is_key_path_compatible(key_path_str, plotly_obj): + """ + Return whether the specifieid key path string is compatible with + the specified plotly object for the purpose of relayout/restyle + operation + """ + + # Convert string to tuple of path components + # e.g. 'foo[0].bar[1]' -> ('foo', 0, 'bar', 1) + key_path_tuple = BaseFigure._str_to_dict_path(key_path_str) + + # Remove trailing integer component + # e.g. ('foo', 0, 'bar', 1) -> ('foo', 0, 'bar') + # We do this because it's fine for relayout/restyle to create new + # elements in the final array in the path. + if isinstance(key_path_tuple[-1], int): + key_path_tuple = key_path_tuple[:-1] + + # Test whether modified key path tuple is in plotly_obj + return key_path_tuple in plotly_obj + + def _relayout_child(self, child, key_path_str, val): + """ + Process relayout operation on child layout object + + Parameters + ---------- + child : BaseLayoutType + The figure's layout + key_path_str : + A key path string (e.g. 'foo.bar[0]') + val + Relayout value + + Returns + ------- + None + """ + + # Validate input + # -------------- + assert child is self.layout + + # Not in batch mode + # ------------- + # Dispatch change callbacks and send relayout message + if not self._in_batch_mode: + relayout_msg = {key_path_str: val} + self._send_relayout_msg(relayout_msg) + self._dispatch_layout_change_callbacks(relayout_msg) + + # In batch mode + # ------------- + # Add key_path_str/val to saved batch edits + else: + self._batch_layout_edits[key_path_str] = val + + # Dispatch change callbacks + # ------------------------- + @staticmethod + def _build_dispatch_plan(key_path_strs): + """ + Build a dispatch plan for a list of key path strings + + A dispatch plan is a dict: + - *from* path tuples that reference an object that has descendants + that are referenced in `key_path_strs`. + - *to* sets of tuples that correspond to descendants of the object + above. + + Parameters + ---------- + key_path_strs : list[str] + List of key path strings. For example: + + ['xaxis.rangeselector.font.color', 'xaxis.rangeselector.bgcolor'] + + Returns + ------- + dispatch_plan: dict[tuple[str|int], set[tuple[str|int]]] + + Examples + -------- + + >>> key_path_strs = ['xaxis.rangeselector.font.color', + ... 'xaxis.rangeselector.bgcolor'] + + >>> BaseFigure._build_dispatch_plan(key_path_strs) # doctest: +SKIP + {(): {'xaxis', + ('xaxis', 'rangeselector'), + ('xaxis', 'rangeselector', 'bgcolor'), + ('xaxis', 'rangeselector', 'font'), + ('xaxis', 'rangeselector', 'font', 'color')}, + ('xaxis',): {('rangeselector',), + ('rangeselector', 'bgcolor'), + ('rangeselector', 'font'), + ('rangeselector', 'font', 'color')}, + ('xaxis', 'rangeselector'): {('bgcolor',), + ('font',), + ('font', 'color')}, + ('xaxis', 'rangeselector', 'font'): {('color',)}} + """ + dispatch_plan = {} + + for key_path_str in key_path_strs: + key_path = BaseFigure._str_to_dict_path(key_path_str) + key_path_so_far = () + keys_left = key_path + + # Iterate down the key path + for next_key in key_path: + if key_path_so_far not in dispatch_plan: + dispatch_plan[key_path_so_far] = set() + + to_add = [keys_left[: i + 1] for i in range(len(keys_left))] + dispatch_plan[key_path_so_far].update(to_add) + + key_path_so_far = key_path_so_far + (next_key,) + keys_left = keys_left[1:] + + return dispatch_plan + + def _dispatch_layout_change_callbacks(self, relayout_data): + """ + Dispatch property change callbacks given relayout_data + + Parameters + ---------- + relayout_data : dict[str, any] + See docstring for plotly_relayout. + + Returns + ------- + None + """ + # Build dispatch plan + # ------------------- + key_path_strs = list(relayout_data.keys()) + dispatch_plan = BaseFigure._build_dispatch_plan(key_path_strs) + + # Dispatch changes to each layout objects + # --------------------------------------- + for path_tuple, changed_paths in dispatch_plan.items(): + if path_tuple in self.layout: + dispatch_obj = self.layout[path_tuple] + if isinstance(dispatch_obj, BasePlotlyType): + dispatch_obj._dispatch_change_callbacks(changed_paths) + + def _dispatch_trace_change_callbacks(self, restyle_data, trace_indexes): + """ + Dispatch property change callbacks given restyle_data + + Parameters + ---------- + restyle_data : dict[str, any] + See docstring for plotly_restyle. + + trace_indexes : list[int] + List of trace indexes that restyle operation applied to + + Returns + ------- + None + """ + + # Build dispatch plan + # ------------------- + key_path_strs = list(restyle_data.keys()) + dispatch_plan = BaseFigure._build_dispatch_plan(key_path_strs) + + # Dispatch changes to each object in each trace + # --------------------------------------------- + for path_tuple, changed_paths in dispatch_plan.items(): + for trace_ind in trace_indexes: + trace = self.data[trace_ind] + if path_tuple in trace: + dispatch_obj = trace[path_tuple] + if isinstance(dispatch_obj, BasePlotlyType): + dispatch_obj._dispatch_change_callbacks(changed_paths) + + # Frames + # ------ + @property + def frames(self): + """ + The `frames` property is a tuple of the figure's frame objects + + Returns + ------- + tuple[plotly.graph_objs.Frame] + """ + return self["frames"] + + @frames.setter + def frames(self, new_frames): + # Note: Frames are not supported by the FigureWidget subclass so we + # only validate coerce the frames. We don't emit any events on frame + # changes, and we don't reparent the frames. + + # Validate frames + self._frame_objs = self._frames_validator.validate_coerce(new_frames) + + # Update + # ------ + def plotly_update( + self, restyle_data=None, relayout_data=None, trace_indexes=None, **kwargs + ): + """ + Perform a Plotly update operation on the figure. + + Note: This operation both mutates and returns the figure + + Parameters + ---------- + restyle_data : dict + Traces update specification. See the docstring for the + `plotly_restyle` method for details + relayout_data : dict + Layout update specification. See the docstring for the + `plotly_relayout` method for details + trace_indexes : + Trace index, or list of trace indexes, that the update operation + applies to. Defaults to all trace indexes. + + Returns + ------- + BaseFigure + None + """ + + # Handle source_view_id + # --------------------- + # If not None, the source_view_id is the UID of the frontend + # Plotly.js view that initially triggered this update operation + # (e.g. the user clicked a button that triggered an update + # operation). We pass this UID along so that the frontend views can + # determine whether they need to apply the update operation on + # themselves. + if "source_view_id" in kwargs: + msg_kwargs = {"source_view_id": kwargs["source_view_id"]} + else: + msg_kwargs = {} + + # Perform update operation + # ------------------------ + # This updates the _data and _layout dicts, and returns the changes + # to the traces (restyle_changes) and layout (relayout_changes) + ( + restyle_changes, + relayout_changes, + trace_indexes, + ) = self._perform_plotly_update( + restyle_data=restyle_data, + relayout_data=relayout_data, + trace_indexes=trace_indexes, + ) + + # Send update message + # ------------------- + # Send a plotly_update message to the frontend (if any) + if restyle_changes or relayout_changes: + self._send_update_msg( + restyle_data=restyle_changes, + relayout_data=relayout_changes, + trace_indexes=trace_indexes, + **msg_kwargs, + ) + + # Dispatch changes + # ---------------- + # ### Dispatch restyle changes ### + if restyle_changes: + self._dispatch_trace_change_callbacks(restyle_changes, trace_indexes) + + # ### Dispatch relayout changes ### + if relayout_changes: + self._dispatch_layout_change_callbacks(relayout_changes) + + def _perform_plotly_update( + self, restyle_data=None, relayout_data=None, trace_indexes=None + ): + # Check for early exist + # --------------------- + if not restyle_data and not relayout_data: + # Nothing to do + return None, None, None + + # Normalize input + # --------------- + if restyle_data is None: + restyle_data = {} + if relayout_data is None: + relayout_data = {} + + trace_indexes = self._normalize_trace_indexes(trace_indexes) + + # Perform relayout + # ---------------- + relayout_changes = self._perform_plotly_relayout(relayout_data) + + # Perform restyle + # --------------- + restyle_changes = self._perform_plotly_restyle(restyle_data, trace_indexes) + + # Return changes + # -------------- + return restyle_changes, relayout_changes, trace_indexes + + # Plotly message stubs + # -------------------- + # send-message stubs that may be overridden by the widget subclass + def _send_addTraces_msg(self, new_traces_data): + pass + + def _send_moveTraces_msg(self, current_inds, new_inds): + pass + + def _send_deleteTraces_msg(self, delete_inds): + pass + + def _send_restyle_msg(self, style, trace_indexes=None, source_view_id=None): + pass + + def _send_relayout_msg(self, layout, source_view_id=None): + pass + + def _send_update_msg( + self, restyle_data, relayout_data, trace_indexes=None, source_view_id=None + ): + pass + + def _send_animate_msg( + self, styles_data, relayout_data, trace_indexes, animation_opts + ): + pass + + # Context managers + # ---------------- + @contextmanager + def batch_update(self): + """ + A context manager that batches up trace and layout assignment + operations into a singe plotly_update message that is executed when + the context exits. + + Examples + -------- + For example, suppose we have a figure widget, `fig`, with a single + trace. + + >>> import plotly.graph_objs as go + >>> fig = go.FigureWidget(data=[{'y': [3, 4, 2]}]) + + If we want to update the xaxis range, the yaxis range, and the + marker color, we could do so using a series of three property + assignments as follows: + + >>> fig.layout.xaxis.range = [0, 5] + >>> fig.layout.yaxis.range = [0, 10] + >>> fig.data[0].marker.color = 'green' + + This will work, however it will result in three messages being + sent to the front end (two relayout messages for the axis range + updates followed by one restyle message for the marker color + update). This can cause the plot to appear to stutter as the + three updates are applied incrementally. + + We can avoid this problem by performing these three assignments in a + `batch_update` context as follows: + + >>> with fig.batch_update(): + ... fig.layout.xaxis.range = [0, 5] + ... fig.layout.yaxis.range = [0, 10] + ... fig.data[0].marker.color = 'green' + + Now, these three property updates will be sent to the frontend in a + single update message, and they will be applied by the front end + simultaneously. + """ + if self._in_batch_mode is True: + yield + else: + try: + self._in_batch_mode = True + yield + finally: + # ### Disable batch mode ### + self._in_batch_mode = False + + # ### Build plotly_update params ### + ( + restyle_data, + relayout_data, + trace_indexes, + ) = self._build_update_params_from_batch() + + # ### Call plotly_update ### + self.plotly_update( + restyle_data=restyle_data, + relayout_data=relayout_data, + trace_indexes=trace_indexes, + ) + + # ### Clear out saved batch edits ### + self._batch_layout_edits.clear() + self._batch_trace_edits.clear() + + def _build_update_params_from_batch(self): + """ + Convert `_batch_trace_edits` and `_batch_layout_edits` into the + `restyle_data`, `relayout_data`, and `trace_indexes` params accepted + by the `plotly_update` method. + + Returns + ------- + (dict, dict, list[int]) + """ + + # Handle Style / Trace Indexes + # ---------------------------- + batch_style_commands = self._batch_trace_edits + trace_indexes = sorted(set([trace_ind for trace_ind in batch_style_commands])) + + all_props = sorted( + set( + [ + prop + for trace_style in self._batch_trace_edits.values() + for prop in trace_style + ] + ) + ) + + # Initialize restyle_data dict with all values undefined + restyle_data = { + prop: [Undefined for _ in range(len(trace_indexes))] for prop in all_props + } + + # Fill in values + for trace_ind, trace_style in batch_style_commands.items(): + for trace_prop, trace_val in trace_style.items(): + restyle_trace_index = trace_indexes.index(trace_ind) + restyle_data[trace_prop][restyle_trace_index] = trace_val + + # Handle Layout + # ------------- + relayout_data = self._batch_layout_edits + + # Return plotly_update params + # --------------------------- + return restyle_data, relayout_data, trace_indexes + + @contextmanager + def batch_animate(self, duration=500, easing="cubic-in-out"): + """ + Context manager to animate trace / layout updates + + Parameters + ---------- + duration : number + The duration of the transition, in milliseconds. + If equal to zero, updates are synchronous. + easing : string + The easing function used for the transition. + One of: + - linear + - quad + - cubic + - sin + - exp + - circle + - elastic + - back + - bounce + - linear-in + - quad-in + - cubic-in + - sin-in + - exp-in + - circle-in + - elastic-in + - back-in + - bounce-in + - linear-out + - quad-out + - cubic-out + - sin-out + - exp-out + - circle-out + - elastic-out + - back-out + - bounce-out + - linear-in-out + - quad-in-out + - cubic-in-out + - sin-in-out + - exp-in-out + - circle-in-out + - elastic-in-out + - back-in-out + - bounce-in-out + + Examples + -------- + Suppose we have a figure widget, `fig`, with a single trace. + + >>> import plotly.graph_objs as go + >>> fig = go.FigureWidget(data=[{'y': [3, 4, 2]}]) + + 1) Animate a change in the xaxis and yaxis ranges using default + duration and easing parameters. + + >>> with fig.batch_animate(): + ... fig.layout.xaxis.range = [0, 5] + ... fig.layout.yaxis.range = [0, 10] + + 2) Animate a change in the size and color of the trace's markers + over 2 seconds using the elastic-in-out easing method + + >>> with fig.batch_animate(duration=2000, easing='elastic-in-out'): + ... fig.data[0].marker.color = 'green' + ... fig.data[0].marker.size = 20 + """ + + # Validate inputs + # --------------- + duration = self._animation_duration_validator.validate_coerce(duration) + easing = self._animation_easing_validator.validate_coerce(easing) + + if self._in_batch_mode is True: + yield + else: + try: + self._in_batch_mode = True + yield + finally: + # Exit batch mode + # --------------- + self._in_batch_mode = False + + # Apply batch animate + # ------------------- + self._perform_batch_animate( + { + "transition": {"duration": duration, "easing": easing}, + "frame": {"duration": duration}, + } + ) + + def _perform_batch_animate(self, animation_opts): + """ + Perform the batch animate operation + + This method should be called with the batch_animate() context + manager exits. + + Parameters + ---------- + animation_opts : dict + Animation options as accepted by frontend Plotly.animation command + + Returns + ------- + None + """ + # Apply commands to internal dictionaries as an update + # ---------------------------------------------------- + ( + restyle_data, + relayout_data, + trace_indexes, + ) = self._build_update_params_from_batch() + + ( + restyle_changes, + relayout_changes, + trace_indexes, + ) = self._perform_plotly_update(restyle_data, relayout_data, trace_indexes) + + # Convert style / trace_indexes into animate form + # ----------------------------------------------- + if self._batch_trace_edits: + animate_styles, animate_trace_indexes = zip( + *[ + (trace_style, trace_index) + for trace_index, trace_style in self._batch_trace_edits.items() + ] + ) + else: + animate_styles, animate_trace_indexes = {}, [] + + animate_layout = copy(self._batch_layout_edits) + + # Send animate message + # -------------------- + # Sends animate message to the front end (if any) + self._send_animate_msg( + styles_data=list(animate_styles), + relayout_data=animate_layout, + trace_indexes=list(animate_trace_indexes), + animation_opts=animation_opts, + ) + + # Clear batched commands + # ---------------------- + self._batch_layout_edits.clear() + self._batch_trace_edits.clear() + + # Dispatch callbacks + # ------------------ + # ### Dispatch restyle changes ### + if restyle_changes: + self._dispatch_trace_change_callbacks(restyle_changes, trace_indexes) + + # ### Dispatch relayout changes ### + if relayout_changes: + self._dispatch_layout_change_callbacks(relayout_changes) + + # Exports + # ------- + def to_dict(self): + """ + Convert figure to a dictionary + + Note: the dictionary includes the properties explicitly set by the + user, it does not include default values of unspecified properties + + Returns + ------- + dict + """ + # Handle data + # ----------- + data = deepcopy(self._data) + + # Handle layout + # ------------- + layout = deepcopy(self._layout) + + # Handle frames + # ------------- + # Frame key is only added if there are any frames + res = {"data": data, "layout": layout} + frames = deepcopy([frame._props for frame in self._frame_objs]) + + if frames: + res["frames"] = frames + + # Add base64 conversion before sending to the front-end + convert_to_base64(res) + + return res + + def to_plotly_json(self): + """ + Convert figure to a JSON representation as a Python dict + + Note: May include some JSON-invalid data types, use the `PlotlyJSONEncoder` util + or the `to_json` method to encode to a string. + + Returns + ------- + dict + """ + return self.to_dict() + + @staticmethod + def _to_ordered_dict(d, skip_uid=False): + """ + Static helper for converting dict or list to structure of ordered + dictionaries + """ + if isinstance(d, dict): + # d is a dict + result = collections.OrderedDict() + for key in sorted(d.keys()): + if skip_uid and key == "uid": + continue + else: + result[key] = BaseFigure._to_ordered_dict(d[key], skip_uid=skip_uid) + + elif isinstance(d, list) and d and isinstance(d[0], dict): + # d is a list of dicts + result = [BaseFigure._to_ordered_dict(el, skip_uid=skip_uid) for el in d] + else: + result = d + + return result + + def to_ordered_dict(self, skip_uid=True): + # Initialize resulting OrderedDict + # -------------------------------- + result = collections.OrderedDict() + + # Handle data + # ----------- + result["data"] = BaseFigure._to_ordered_dict(self._data, skip_uid=skip_uid) + + # Handle layout + # ------------- + result["layout"] = BaseFigure._to_ordered_dict(self._layout) + + # Handle frames + # ------------- + if self._frame_objs: + frames_props = [frame._props for frame in self._frame_objs] + result["frames"] = BaseFigure._to_ordered_dict(frames_props) + + return result + + # plotly.io methods + # ----------------- + # Note that docstrings are auto-generated in plotly/_docstring_gen.py + def show(self, *args, **kwargs): + """ + Show a figure using either the default renderer(s) or the renderer(s) + specified by the renderer argument + + Parameters + ---------- + renderer: str or None (default None) + A string containing the names of one or more registered renderers + (separated by '+' characters) or None. If None, then the default + renderers specified in plotly.io.renderers.default are used. + + validate: bool (default True) + True if the figure should be validated before being shown, + False otherwise. + + width: int or float + An integer or float that determines the number of pixels wide the + plot is. The default is set in plotly.js. + + height: int or float + An integer or float specifying the height of the plot in pixels. + The default is set in plotly.js. + + config: dict + A dict of parameters to configure the figure. The defaults are set + in plotly.js. + + Returns + ------- + None + """ + import plotly.io as pio + + return pio.show(self, *args, **kwargs) + + def to_json(self, *args, **kwargs): + """ + Convert a figure to a JSON string representation + + Parameters + ---------- + validate: bool (default True) + True if the figure should be validated before being converted to + JSON, False otherwise. + + pretty: bool (default False) + True if JSON representation should be pretty-printed, False if + representation should be as compact as possible. + + remove_uids: bool (default True) + True if trace UIDs should be omitted from the JSON representation + + engine: str (default None) + The JSON encoding engine to use. One of: + - "json" for an encoder based on the built-in Python json module + - "orjson" for a fast encoder the requires the orjson package + If not specified, the default encoder is set to the current value of + plotly.io.json.config.default_encoder. + + Returns + ------- + str + Representation of figure as a JSON string + """ + import plotly.io as pio + + return pio.to_json(self, *args, **kwargs) + + def full_figure_for_development(self, warn=True, as_dict=False): + """ + Compute default values for all attributes not specified in the input figure and + returns the output as a "full" figure. This function calls Plotly.js via Kaleido + to populate unspecified attributes. This function is intended for interactive use + during development to learn more about how Plotly.js computes default values and is + not generally necessary or recommended for production use. + + Parameters + ---------- + fig: + Figure object or dict representing a figure + + warn: bool + If False, suppress warnings about not using this in production. + + as_dict: bool + If True, output is a dict with some keys that go.Figure can't parse. + If False, output is a go.Figure with unparseable keys skipped. + + Returns + ------- + plotly.graph_objects.Figure or dict + The full figure + """ + import plotly.io as pio + + return pio.full_figure_for_development(self, warn, as_dict) + + def write_json(self, *args, **kwargs): + """ + Convert a figure to JSON and write it to a file or writeable + object + + Parameters + ---------- + file: str or writeable + A string representing a local file path or a writeable object + (e.g. an open file descriptor) + + pretty: bool (default False) + True if JSON representation should be pretty-printed, False if + representation should be as compact as possible. + + remove_uids: bool (default True) + True if trace UIDs should be omitted from the JSON representation + + engine: str (default None) + The JSON encoding engine to use. One of: + - "json" for an encoder based on the built-in Python json module + - "orjson" for a fast encoder the requires the orjson package + If not specified, the default encoder is set to the current value of + plotly.io.json.config.default_encoder. + + Returns + ------- + None + """ + import plotly.io as pio + + return pio.write_json(self, *args, **kwargs) + + def to_html(self, *args, **kwargs): + """ + Convert a figure to an HTML string representation. + + Parameters + ---------- + config: dict or None (default None) + Plotly.js figure config options + auto_play: bool (default=True) + Whether to automatically start the animation sequence on page load + if the figure contains frames. Has no effect if the figure does not + contain frames. + include_plotlyjs: bool or string (default True) + Specifies how the plotly.js library is included/loaded in the output + div string. + + If True, a script tag containing the plotly.js source code (~3MB) + is included in the output. HTML files generated with this option are + fully self-contained and can be used offline. + + If 'cdn', a script tag that references the plotly.js CDN is included + in the output. HTML files generated with this option are about 3MB + smaller than those generated with include_plotlyjs=True, but they + require an active internet connection in order to load the plotly.js + library. + + If 'directory', a script tag is included that references an external + plotly.min.js bundle that is assumed to reside in the same + directory as the HTML file. + + If a string that ends in '.js', a script tag is included that + references the specified path. This approach can be used to point + the resulting HTML file to an alternative CDN or local bundle. + + If False, no script tag referencing plotly.js is included. This is + useful when the resulting div string will be placed inside an HTML + document that already loads plotly.js. This option is not advised + when full_html=True as it will result in a non-functional html file. + include_mathjax: bool or string (default False) + Specifies how the MathJax.js library is included in the output html + div string. MathJax is required in order to display labels + with LaTeX typesetting. + + If False, no script tag referencing MathJax.js will be included in the + output. + + If 'cdn', a script tag that references a MathJax CDN location will be + included in the output. HTML div strings generated with this option + will be able to display LaTeX typesetting as long as internet access + is available. + + If a string that ends in '.js', a script tag is included that + references the specified path. This approach can be used to point the + resulting HTML div string to an alternative CDN. + post_script: str or list or None (default None) + JavaScript snippet(s) to be included in the resulting div just after + plot creation. The string(s) may include '{plot_id}' placeholders + that will then be replaced by the `id` of the div element that the + plotly.js figure is associated with. One application for this script + is to install custom plotly.js event handlers. + full_html: bool (default True) + If True, produce a string containing a complete HTML document + starting with an tag. If False, produce a string containing + a single
element. + animation_opts: dict or None (default None) + dict of custom animation parameters to be passed to the function + Plotly.animate in Plotly.js. See + https://github.com/plotly/plotly.js/blob/master/src/plots/animation_attributes.js + for available options. Has no effect if the figure does not contain + frames, or auto_play is False. + default_width, default_height: number or str (default '100%') + The default figure width/height to use if the provided figure does not + specify its own layout.width/layout.height property. May be + specified in pixels as an integer (e.g. 500), or as a css width style + string (e.g. '500px', '100%'). + validate: bool (default True) + True if the figure should be validated before being converted to + JSON, False otherwise. + div_id: str (default None) + If provided, this is the value of the id attribute of the div tag. If None, the + id attribute is a UUID. + + Returns + ------- + str + Representation of figure as an HTML div string + """ + import plotly.io as pio + + return pio.to_html(self, *args, **kwargs) + + def write_html(self, *args, **kwargs): + """ + Write a figure to an HTML file representation + + Parameters + ---------- + file: str or writeable + A string representing a local file path or a writeable object + (e.g. a pathlib.Path object or an open file descriptor) + config: dict or None (default None) + Plotly.js figure config options + auto_play: bool (default=True) + Whether to automatically start the animation sequence on page load + if the figure contains frames. Has no effect if the figure does not + contain frames. + include_plotlyjs: bool or string (default True) + Specifies how the plotly.js library is included/loaded in the output + div string. + + If True, a script tag containing the plotly.js source code (~3MB) + is included in the output. HTML files generated with this option are + fully self-contained and can be used offline. + + If 'cdn', a script tag that references the plotly.js CDN is included + in the output. HTML files generated with this option are about 3MB + smaller than those generated with include_plotlyjs=True, but they + require an active internet connection in order to load the plotly.js + library. + + If 'directory', a script tag is included that references an external + plotly.min.js bundle that is assumed to reside in the same + directory as the HTML file. If `file` is a string to a local file + path and `full_html` is True, then the plotly.min.js bundle is copied + into the directory of the resulting HTML file. If a file named + plotly.min.js already exists in the output directory then this file + is left unmodified and no copy is performed. HTML files generated + with this option can be used offline, but they require a copy of + the plotly.min.js bundle in the same directory. This option is + useful when many figures will be saved as HTML files in the same + directory because the plotly.js source code will be included only + once per output directory, rather than once per output file. + + If a string that ends in '.js', a script tag is included that + references the specified path. This approach can be used to point + the resulting HTML file to an alternative CDN or local bundle. + + If False, no script tag referencing plotly.js is included. This is + useful when the resulting div string will be placed inside an HTML + document that already loads plotly.js. This option is not advised + when full_html=True as it will result in a non-functional html file. + + include_mathjax: bool or string (default False) + Specifies how the MathJax.js library is included in the output html + div string. MathJax is required in order to display labels + with LaTeX typesetting. + + If False, no script tag referencing MathJax.js will be included in the + output. + + If 'cdn', a script tag that references a MathJax CDN location will be + included in the output. HTML div strings generated with this option + will be able to display LaTeX typesetting as long as internet access + is available. + + If a string that ends in '.js', a script tag is included that + references the specified path. This approach can be used to point the + resulting HTML div string to an alternative CDN. + post_script: str or list or None (default None) + JavaScript snippet(s) to be included in the resulting div just after + plot creation. The string(s) may include '{plot_id}' placeholders + that will then be replaced by the `id` of the div element that the + plotly.js figure is associated with. One application for this script + is to install custom plotly.js event handlers. + full_html: bool (default True) + If True, produce a string containing a complete HTML document + starting with an tag. If False, produce a string containing + a single
element. + animation_opts: dict or None (default None) + dict of custom animation parameters to be passed to the function + Plotly.animate in Plotly.js. See + https://github.com/plotly/plotly.js/blob/master/src/plots/animation_attributes.js + for available options. Has no effect if the figure does not contain + frames, or auto_play is False. + default_width, default_height: number or str (default '100%') + The default figure width/height to use if the provided figure does not + specify its own layout.width/layout.height property. May be + specified in pixels as an integer (e.g. 500), or as a css width style + string (e.g. '500px', '100%'). + validate: bool (default True) + True if the figure should be validated before being converted to + JSON, False otherwise. + auto_open: bool (default True) + If True, open the saved file in a web browser after saving. + This argument only applies if `full_html` is True. + div_id: str (default None) + If provided, this is the value of the id attribute of the div tag. If None, the + id attribute is a UUID. + + Returns + ------- + None + """ + import plotly.io as pio + + return pio.write_html(self, *args, **kwargs) + + def to_image(self, *args, **kwargs): + """ + Convert a figure to a static image bytes string + + Parameters + ---------- + format: str or None + The desired image format. One of + - 'png' + - 'jpg' or 'jpeg' + - 'webp' + - 'svg' + - 'pdf' + - 'eps' (deprecated) (Requires the poppler library to be installed) + + If not specified, will default to: + - `plotly.io.defaults.default_format` if engine is "kaleido" + - `plotly.io.orca.config.default_format` if engine is "orca" (deprecated) + + width: int or None + The width of the exported image in layout pixels. If the `scale` + property is 1.0, this will also be the width of the exported image + in physical pixels. + + If not specified, will default to: + - `plotly.io.defaults.default_width` if engine is "kaleido" + - `plotly.io.orca.config.default_width` if engine is "orca" (deprecated) + + height: int or None + The height of the exported image in layout pixels. If the `scale` + property is 1.0, this will also be the height of the exported image + in physical pixels. + + If not specified, will default to: + - `plotly.io.defaults.default_height` if engine is "kaleido" + - `plotly.io.orca.config.default_height` if engine is "orca" (deprecated) + + scale: int or float or None + The scale factor to use when exporting the figure. A scale factor + larger than 1.0 will increase the image resolution with respect + to the figure's layout pixel dimensions. Whereas as scale factor of + less than 1.0 will decrease the image resolution. + + If not specified, will default to: + - `plotly.io.defaults.default_scale` if engine is "kaliedo" + - `plotly.io.orca.config.default_scale` if engine is "orca" (deprecated) + + validate: bool + True if the figure should be validated before being converted to + an image, False otherwise. + + engine (deprecated): str + Image export engine to use. This parameter is deprecated and Orca engine support will be + dropped in the next major Plotly version. Until then, the following values are supported: + - "kaleido": Use Kaleido for image export + - "orca": Use Orca for image export + - "auto" (default): Use Kaleido if installed, otherwise use Orca + + Returns + ------- + bytes + The image data + """ + import plotly.io as pio + from plotly.io.kaleido import ( + kaleido_available, + kaleido_major, + ENABLE_KALEIDO_V0_DEPRECATION_WARNINGS, + KALEIDO_DEPRECATION_MSG, + ORCA_DEPRECATION_MSG, + ENGINE_PARAM_DEPRECATION_MSG, + ) + + if ENABLE_KALEIDO_V0_DEPRECATION_WARNINGS: + if ( + kwargs.get("engine", None) in {None, "auto", "kaleido"} + and kaleido_available() + and kaleido_major() < 1 + ): + warnings.warn(KALEIDO_DEPRECATION_MSG, DeprecationWarning, stacklevel=2) + if kwargs.get("engine", None) == "orca": + warnings.warn(ORCA_DEPRECATION_MSG, DeprecationWarning, stacklevel=2) + if kwargs.get("engine", None): + warnings.warn( + ENGINE_PARAM_DEPRECATION_MSG, DeprecationWarning, stacklevel=2 + ) + + return pio.to_image(self, *args, **kwargs) + + def write_image(self, *args, **kwargs): + """ + Convert a figure to a static image and write it to a file or writeable + object + + Parameters + ---------- + file: str or writeable + A string representing a local file path or a writeable object + (e.g. a pathlib.Path object or an open file descriptor) + + format: str or None + The desired image format. One of + - 'png' + - 'jpg' or 'jpeg' + - 'webp' + - 'svg' + - 'pdf' + - 'eps' (deprecated) (Requires the poppler library to be installed) + + If not specified and `file` is a string then this will default to the + file extension. If not specified and `file` is not a string then this + will default to: + - `plotly.io.defaults.default_format` if engine is "kaleido" + - `plotly.io.orca.config.default_format` if engine is "orca" (deprecated) + + width: int or None + The width of the exported image in layout pixels. If the `scale` + property is 1.0, this will also be the width of the exported image + in physical pixels. + + If not specified, will default to: + - `plotly.io.defaults.default_width` if engine is "kaleido" + - `plotly.io.orca.config.default_width` if engine is "orca" (deprecated) + + height: int or None + The height of the exported image in layout pixels. If the `scale` + property is 1.0, this will also be the height of the exported image + in physical pixels. + + If not specified, will default to: + - `plotly.io.defaults.default_height` if engine is "kaleido" + - `plotly.io.orca.config.default_height` if engine is "orca" (deprecated) + + scale: int or float or None + The scale factor to use when exporting the figure. A scale factor + larger than 1.0 will increase the image resolution with respect + to the figure's layout pixel dimensions. Whereas as scale factor of + less than 1.0 will decrease the image resolution. + + If not specified, will default to: + - `plotly.io.defaults.default_scale` if engine is "kaleido" + - `plotly.io.orca.config.default_scale` if engine is "orca" (deprecated) + + validate: bool + True if the figure should be validated before being converted to + an image, False otherwise. + + engine (deprecated): str + Image export engine to use. This parameter is deprecated and Orca engine support will be + dropped in the next major Plotly version. Until then, the following values are supported: + - "kaleido": Use Kaleido for image export + - "orca": Use Orca for image export + - "auto" (default): Use Kaleido if installed, otherwise use Orca + + Returns + ------- + None + """ + import plotly.io as pio + from plotly.io.kaleido import ( + kaleido_available, + kaleido_major, + ENABLE_KALEIDO_V0_DEPRECATION_WARNINGS, + KALEIDO_DEPRECATION_MSG, + ORCA_DEPRECATION_MSG, + ENGINE_PARAM_DEPRECATION_MSG, + ) + + if ENABLE_KALEIDO_V0_DEPRECATION_WARNINGS: + if ( + kwargs.get("engine", None) in {None, "auto", "kaleido"} + and kaleido_available() + and kaleido_major() < 1 + ): + warnings.warn(KALEIDO_DEPRECATION_MSG, DeprecationWarning, stacklevel=2) + if kwargs.get("engine", None) == "orca": + warnings.warn(ORCA_DEPRECATION_MSG, DeprecationWarning, stacklevel=2) + if kwargs.get("engine", None): + warnings.warn( + ENGINE_PARAM_DEPRECATION_MSG, DeprecationWarning, stacklevel=2 + ) + return pio.write_image(self, *args, **kwargs) + + # Static helpers + # -------------- + @staticmethod + def _is_dict_list(v): + """ + Return true of the input object is a list of dicts + """ + return isinstance(v, list) and len(v) > 0 and isinstance(v[0], dict) + + @staticmethod + def _perform_update(plotly_obj, update_obj, overwrite=False): + """ + Helper to support the update() methods on :class:`BaseFigure` and + :class:`BasePlotlyType` + + Parameters + ---------- + plotly_obj : BasePlotlyType|tuple[BasePlotlyType] + Object to up updated + update_obj : dict|list[dict]|tuple[dict] + When ``plotly_obj`` is an instance of :class:`BaseFigure`, + ``update_obj`` should be a dict + + When ``plotly_obj`` is a tuple of instances of + :class:`BasePlotlyType`, ``update_obj`` should be a tuple or list + of dicts + """ + from _plotly_utils.basevalidators import ( + CompoundValidator, + CompoundArrayValidator, + ) + + if update_obj is None: + # Nothing to do + return + elif isinstance(plotly_obj, BasePlotlyType): + # Handle initializing subplot ids + # ------------------------------- + # This should be valid even if xaxis2 hasn't been initialized: + # >>> layout.update(xaxis2={'title': 'xaxis 2'}) + for key in update_obj: + # special handling for missing keys that match _subplot_re_match + if key not in plotly_obj and isinstance(plotly_obj, BaseLayoutType): + # try _subplot_re_match + match = plotly_obj._subplot_re_match(key) + if match: + # We need to create a subplotid object + plotly_obj[key] = {} + continue + + err = _check_path_in_prop_tree(plotly_obj, key, error_cast=ValueError) + if err is not None: + raise err + + # Convert update_obj to dict + # -------------------------- + if isinstance(update_obj, BasePlotlyType): + update_obj = update_obj.to_plotly_json() + + # Process valid properties + # ------------------------ + for key in update_obj: + val = update_obj[key] + + if overwrite: + # Don't recurse and assign property as-is + plotly_obj[key] = val + continue + + validator = plotly_obj._get_prop_validator(key) + + if isinstance(validator, CompoundValidator) and isinstance(val, dict): + # Update compound objects recursively + # plotly_obj[key].update(val) + BaseFigure._perform_update(plotly_obj[key], val) + elif isinstance(validator, CompoundArrayValidator): + if plotly_obj[key]: + # plotly_obj has an existing non-empty array for key + # In this case we merge val into the existing elements + BaseFigure._perform_update(plotly_obj[key], val) + + # If update tuple is longer that current tuple, append the + # extra elements to the end + if isinstance(val, (list, tuple)) and len(val) > len( + plotly_obj[key] + ): + plotly_obj[key] = plotly_obj[key] + tuple( + val[len(plotly_obj[key]) :] + ) + else: + # plotly_obj is an empty or uninitialized list for key + # In this case we accept val as is + plotly_obj[key] = val + else: + # Assign non-compound value + plotly_obj[key] = val + + elif isinstance(plotly_obj, tuple): + if len(update_obj) == 0: + # Nothing to do + return + else: + for i, plotly_element in enumerate(plotly_obj): + if isinstance(update_obj, dict): + if i in update_obj: + update_element = update_obj[i] + else: + continue + else: + update_element = update_obj[i % len(update_obj)] + BaseFigure._perform_update(plotly_element, update_element) + else: + raise ValueError( + "Unexpected plotly object with type {typ}".format(typ=type(plotly_obj)) + ) + + @staticmethod + def _index_is(iterable, val): + """ + Return the index of a value in an iterable using object identity + (not object equality as is the case for list.index) + + """ + index_list = [i for i, curr_val in enumerate(iterable) if curr_val is val] + if not index_list: + raise ValueError("Invalid value") + + return index_list[0] + + def _make_axis_spanning_layout_object(self, direction, shape): + """ + Convert a shape drawn on a plot or a subplot into one whose yref or xref + ends with " domain" and has coordinates so that the shape will seem to + extend infinitely in that dimension. This is useful for drawing lines or + boxes on a plot where one dimension of the shape will not move out of + bounds when moving the plot's view. + Note that the shape already added to the (sub)plot must have the + corresponding axis reference referring to an actual axis (e.g., 'x', + 'y2' etc. are accepted, but not 'paper'). This will be the case if the + shape was added with "add_shape". + Shape must have the x0, x1, y0, y1 fields already initialized. + """ + if direction == "vertical": + # fix y points to top and bottom of subplot + ref = "yref" + elif direction == "horizontal": + # fix x points to left and right of subplot + ref = "xref" + else: + raise ValueError( + "Bad direction: %s. Permissible values are 'vertical' and 'horizontal'." + % (direction,) + ) + # set the ref to " domain" so that its size is based on the + # axis's size + shape[ref] += " domain" + return shape + + def _process_multiple_axis_spanning_shapes( + self, + shape_args, + row, + col, + shape_type, + exclude_empty_subplots=True, + annotation=None, + **kwargs, + ): + """ + Add a shape or multiple shapes and call _make_axis_spanning_layout_object on + all the new shapes. + """ + if shape_type in ["vline", "vrect"]: + direction = "vertical" + elif shape_type in ["hline", "hrect"]: + direction = "horizontal" + else: + raise ValueError( + "Bad shape_type %s, needs to be one of 'vline', 'hline', 'vrect', 'hrect'" + % (shape_type,) + ) + if (row is not None or col is not None) and (not self._has_subplots()): + # this has no subplots to address, so we force row and col to be None + row = None + col = None + n_shapes_before = len(self.layout["shapes"]) + n_annotations_before = len(self.layout["annotations"]) + # shapes are always added at the end of the tuple of shapes, so we see + # how long the tuple is before the call and after the call, and adjust + # the new shapes that were added at the end + # extract annotation prefixed kwargs + # annotation with extra parameters based on the annotation_position + # argument and other annotation_ prefixed kwargs + shape_kwargs, annotation_kwargs = shapeannotation.split_dict_by_key_prefix( + kwargs, "annotation_" + ) + augmented_annotation = shapeannotation.axis_spanning_shape_annotation( + annotation, shape_type, shape_args, annotation_kwargs + ) + self.add_shape( + row=row, + col=col, + exclude_empty_subplots=exclude_empty_subplots, + **_combine_dicts([shape_args, shape_kwargs]), + ) + if augmented_annotation is not None: + self.add_annotation( + augmented_annotation, + row=row, + col=col, + exclude_empty_subplots=exclude_empty_subplots, + yref=shape_kwargs.get("yref", "y"), + ) + # update xref and yref for the new shapes and annotations + for layout_obj, n_layout_objs_before in zip( + ["shapes", "annotations"], [n_shapes_before, n_annotations_before] + ): + n_layout_objs_after = len(self.layout[layout_obj]) + if (n_layout_objs_after > n_layout_objs_before) and ( + row is None and col is None + ): + # this was called intending to add to a single plot (and + # self.add_{layout_obj} succeeded) + # however, in the case of a single plot, xref and yref MAY not be + # specified, IF they are not specified we specify them here so the following routines can work + # (they need to append " domain" to xref or yref). If they are specified, we leave them alone. + if self.layout[layout_obj][-1].xref is None: + self.layout[layout_obj][-1].update(xref="x") + if self.layout[layout_obj][-1].yref is None: + self.layout[layout_obj][-1].update(yref="y") + new_layout_objs = tuple( + filter( + lambda x: x is not None, + [ + self._make_axis_spanning_layout_object( + direction, + self.layout[layout_obj][n], + ) + for n in range(n_layout_objs_before, n_layout_objs_after) + ], + ) + ) + self.layout[layout_obj] = ( + self.layout[layout_obj][:n_layout_objs_before] + new_layout_objs + ) + + def add_vline( + self, + x, + row="all", + col="all", + exclude_empty_subplots=True, + annotation=None, + **kwargs, + ): + self._process_multiple_axis_spanning_shapes( + dict(type="line", x0=x, x1=x, y0=0, y1=1), + row, + col, + "vline", + exclude_empty_subplots=exclude_empty_subplots, + annotation=annotation, + **kwargs, + ) + return self + + add_vline.__doc__ = _axis_spanning_shapes_docstr("vline") + + def add_hline( + self, + y, + row="all", + col="all", + exclude_empty_subplots=True, + annotation=None, + **kwargs, + ): + self._process_multiple_axis_spanning_shapes( + dict( + type="line", + x0=0, + x1=1, + y0=y, + y1=y, + ), + row, + col, + "hline", + exclude_empty_subplots=exclude_empty_subplots, + annotation=annotation, + **kwargs, + ) + return self + + add_hline.__doc__ = _axis_spanning_shapes_docstr("hline") + + def add_vrect( + self, + x0, + x1, + row="all", + col="all", + exclude_empty_subplots=True, + annotation=None, + **kwargs, + ): + self._process_multiple_axis_spanning_shapes( + dict(type="rect", x0=x0, x1=x1, y0=0, y1=1), + row, + col, + "vrect", + exclude_empty_subplots=exclude_empty_subplots, + annotation=annotation, + **kwargs, + ) + return self + + add_vrect.__doc__ = _axis_spanning_shapes_docstr("vrect") + + def add_hrect( + self, + y0, + y1, + row="all", + col="all", + exclude_empty_subplots=True, + annotation=None, + **kwargs, + ): + self._process_multiple_axis_spanning_shapes( + dict(type="rect", x0=0, x1=1, y0=y0, y1=y1), + row, + col, + "hrect", + exclude_empty_subplots=exclude_empty_subplots, + annotation=annotation, + **kwargs, + ) + return self + + add_hrect.__doc__ = _axis_spanning_shapes_docstr("hrect") + + def _has_subplots(self): + """Returns True if figure contains subplots, otherwise it contains a + single plot and so this returns False.""" + return self._grid_ref is not None + + def _subplot_not_empty(self, xref, yref, selector="all"): + """ + xref: string representing the axis. Objects in the plot will be checked + for this xref (for layout objects) or xaxis (for traces) to + determine if they lie in a certain subplot. + yref: string representing the axis. Objects in the plot will be checked + for this yref (for layout objects) or yaxis (for traces) to + determine if they lie in a certain subplot. + selector: can be "all" or an iterable containing some combination of + "traces", "shapes", "annotations", "images". Only the presence + of objects specified in selector will be checked. So if + ["traces","shapes"] is passed then a plot we be considered + non-empty if it contains traces or shapes. If + bool(selector) returns False, no checking is performed and + this function returns True. If selector is True, it is + converted to "all". + """ + if not selector: + # If nothing to select was specified then a subplot is always deemed non-empty + return True + if selector is True: + selector = "all" + if selector == "all": + selector = ["traces", "shapes", "annotations", "images"] + ret = False + for s in selector: + if s == "traces": + obj = self.data + xaxiskw = "xaxis" + yaxiskw = "yaxis" + elif s in ["shapes", "annotations", "images"]: + obj = self.layout[s] + xaxiskw = "xref" + yaxiskw = "yref" + else: + obj = None + if obj: + ret |= any( + t == (xref, yref) + for t in [ + # if a object exists but has no xaxis or yaxis keys, then it + # is plotted with xaxis/xref 'x' and yaxis/yref 'y' + ( + "x" if d[xaxiskw] is None else d[xaxiskw], + "y" if d[yaxiskw] is None else d[yaxiskw], + ) + for d in obj + ] + ) + return ret + + def set_subplots(self, rows=None, cols=None, **make_subplots_args): + """ + Add subplots to this figure. If the figure already contains subplots, + then this throws an error. Accepts any keyword arguments that + plotly.subplots.make_subplots accepts. + """ + # rows, cols provided so that this can be called like + # fig.set_subplots(2,3), say + if rows is not None: + make_subplots_args["rows"] = rows + if cols is not None: + make_subplots_args["cols"] = cols + if self._has_subplots(): + raise ValueError("This figure already has subplots.") + return _subplots.make_subplots(figure=self, **make_subplots_args) + + +class BasePlotlyType(object): + """ + BasePlotlyType is the base class for all objects in the trace, layout, + and frame object hierarchies + """ + + # ### Mapped (deprecated) properties ### + # dict for deprecated property name (e.g. 'title_font') to tuple + # of relative path to new property (e.g. ('title', 'font') + _mapped_properties = {} + + _parent_path_str = "" + _path_str = "" + _valid_props = set() + + def __init__(self, plotly_name, **kwargs): + """ + Construct a new BasePlotlyType + + Parameters + ---------- + plotly_name : str + The lowercase name of the plotly object + kwargs : dict + Invalid props/values to raise on + """ + # ### _skip_invalid ## + # If True, then invalid properties should be skipped, if False then + # invalid properties will result in an exception + self._skip_invalid = False + + self._validate = True + + # Validate inputs + # --------------- + self._process_kwargs(**kwargs) + + # Store params + # ------------ + self._plotly_name = plotly_name + + # Initialize properties + # --------------------- + # ### _compound_props ### + # A dict from compound property names to compound objects + self._compound_props = {} + + # ### _compound_array_props ### + # A dict from compound array property names to tuples of compound + # objects + self._compound_array_props = {} + + # ### _orphan_props ### + # A dict of properties for use while object has no parent. When + # object has a parent, it requests its properties dict from its + # parent and doesn't use this. + self._orphan_props = {} + + # ### _parent ### + # The parent of the object. May be another BasePlotlyType or it may + # be a BaseFigure (as is the case for the Layout and Trace objects) + self._parent = None + + # ### _change_callbacks ### + # A dict from tuples of child property path tuples to lists + # of callbacks that should be executed whenever any of these + # properties is modified + self._change_callbacks = {} + + # ### Backing property for backward compatible _validator property ## + self.__validators = None + + # @property + # def _validate(self): + # fig = self.figure + # if fig is None: + # return True + # else: + # return fig._validate + + def _get_validator(self, prop): + from .validator_cache import ValidatorCache + + return ValidatorCache.get_validator(self._path_str, prop) + + def _set_property(self, name, arg, provided): + """ + Initialize a property of this object using the provided value + or a value popped from the arguments dictionary. If neither + is available, do not set the property. + """ + _set_property_provided_value(self, name, arg, provided) + + @property + def _validators(self): + """ + Validators used to be stored in a private _validators property. This was + eliminated when we switched to building validators on demand using the + _get_validator method. + + This property returns a simple object that + + Returns + ------- + dict-like interface for accessing the object's validators + """ + obj = self + if self.__validators is None: + + class ValidatorCompat(object): + def __getitem__(self, item): + return obj._get_validator(item) + + def __contains__(self, item): + return obj.__contains__(item) + + def __iter__(self): + return iter(obj) + + def items(self): + return [(k, self[k]) for k in self] + + self.__validators = ValidatorCompat() + + return self.__validators + + def _process_kwargs(self, **kwargs): + """ + Process any extra kwargs that are not predefined as constructor params + """ + for k, v in kwargs.items(): + err = _check_path_in_prop_tree(self, k, error_cast=ValueError) + if err is None: + # e.g. underscore kwargs like marker_line_color + self[k] = v + elif not self._validate: + # Set extra property as-is + self[k] = v + elif not self._skip_invalid: + raise err + # No need to call _raise_on_invalid_property_error here, + # because we have it set up so that the singular case of calling + # __setitem__ will raise this. If _check_path_in_prop_tree + # raised that in its travels, it will already be in the error + # message. + + @property + def plotly_name(self): + """ + The plotly name of the object + + Returns + ------- + str + """ + return self._plotly_name + + @property + def _prop_descriptions(self): + """ + Formatted string containing all of this obejcts child properties + and their descriptions + + Returns + ------- + str + """ + raise NotImplementedError + + @property + def _props(self): + """ + Dictionary used to store this object properties. When the object + has a parent, this dict is retreived from the parent. When the + object does not have a parent, this dict is the object's + `_orphan_props` property + + Note: Property will return None if the object has a parent and the + object's properties have not been initialized using the + `_init_props` method. + + Returns + ------- + dict|None + """ + if self.parent is None: + # Use orphan data + return self._orphan_props + else: + # Get data from parent's dict + return self.parent._get_child_props(self) + + def _get_child_props(self, child): + """ + Return properties dict for child + + Parameters + ---------- + child : BasePlotlyType + + Returns + ------- + dict + """ + if self._props is None: + # If this node's properties are uninitialized then so are its + # child's + return None + else: + # ### Child a compound property ### + if child.plotly_name in self: + from _plotly_utils.basevalidators import ( + CompoundValidator, + CompoundArrayValidator, + ) + + validator = self._get_validator(child.plotly_name) + + if isinstance(validator, CompoundValidator): + return self._props.get(child.plotly_name, None) + + # ### Child an element of a compound array property ### + elif isinstance(validator, CompoundArrayValidator): + children = self[child.plotly_name] + child_ind = BaseFigure._index_is(children, child) + assert child_ind is not None + + children_props = self._props.get(child.plotly_name, None) + return ( + children_props[child_ind] + if children_props is not None + and len(children_props) > child_ind + else None + ) + + # ### Invalid child ### + else: + raise ValueError("Invalid child with name: %s" % child.plotly_name) + + def _init_props(self): + """ + Ensure that this object's properties dict has been initialized. When + the object has a parent, this ensures that the parent has an + initialized properties dict with this object's plotly_name as a key. + + Returns + ------- + None + """ + # Ensure that _data is initialized. + if self._props is not None: + pass + else: + self._parent._init_child_props(self) + + def _init_child_props(self, child): + """ + Ensure that a properties dict has been initialized for a child object + + Parameters + ---------- + child : BasePlotlyType + + Returns + ------- + None + """ + # Init our own properties + # ----------------------- + self._init_props() + + # Child a compound property + # ------------------------- + if child.plotly_name in self._compound_props: + if child.plotly_name not in self._props: + self._props[child.plotly_name] = {} + + # Child an element of a compound array property + # --------------------------------------------- + elif child.plotly_name in self._compound_array_props: + children = self._compound_array_props[child.plotly_name] + child_ind = BaseFigure._index_is(children, child) + assert child_ind is not None + + if child.plotly_name not in self._props: + # Initialize list + self._props[child.plotly_name] = [] + + # Make sure list is long enough for child + children_list = self._props[child.plotly_name] + while len(children_list) <= child_ind: + children_list.append({}) + + # Invalid child + # ------------- + else: + raise ValueError("Invalid child with name: %s" % child.plotly_name) + + def _get_child_prop_defaults(self, child): + """ + Return default properties dict for child + + Parameters + ---------- + child : BasePlotlyType + + Returns + ------- + dict + """ + if self._prop_defaults is None: + # If this node's default properties are uninitialized then so are + # its child's + return None + else: + # ### Child a compound property ### + if child.plotly_name in self._compound_props: + return self._prop_defaults.get(child.plotly_name, None) + + # ### Child an element of a compound array property ### + elif child.plotly_name in self._compound_array_props: + children = self._compound_array_props[child.plotly_name] + child_ind = BaseFigure._index_is(children, child) + + assert child_ind is not None + + children_props = self._prop_defaults.get(child.plotly_name, None) + + return ( + children_props[child_ind] + if children_props is not None and len(children_props) > child_ind + else None + ) + + # ### Invalid child ### + else: + raise ValueError("Invalid child with name: %s" % child.plotly_name) + + @property + def _prop_defaults(self): + """ + Return default properties dict + + Returns + ------- + dict + """ + if self.parent is None: + return None + else: + return self.parent._get_child_prop_defaults(self) + + def _get_prop_validator(self, prop): + """ + Return the validator associated with the specified property + + Parameters + ---------- + prop: str + A property that exists in this object + + Returns + ------- + BaseValidator + """ + + # Handle remapping + # ---------------- + if prop in self._mapped_properties: + prop_path = self._mapped_properties[prop] + plotly_obj = self[prop_path[:-1]] + prop = prop_path[-1] + else: + prop_path = BaseFigure._str_to_dict_path(prop) + plotly_obj = self[prop_path[:-1]] + prop = prop_path[-1] + + # Return validator + # ---------------- + return plotly_obj._get_validator(prop) + + @property + def parent(self): + """ + Return the object's parent, or None if the object has no parent + Returns + ------- + BasePlotlyType|BaseFigure + """ + return self._parent + + @property + def figure(self): + """ + Reference to the top-level Figure or FigureWidget that this object + belongs to. None if the object does not belong to a Figure + + Returns + ------- + Union[BaseFigure, None] + """ + top_parent = self + while top_parent is not None: + if isinstance(top_parent, BaseFigure): + break + else: + top_parent = top_parent.parent + + return top_parent + + # Magic Methods + # ------------- + def __reduce__(self): + """ + Custom implementation of reduce is used to support deep copying + and pickling + """ + props = self.to_plotly_json() + return (self.__class__, (props,)) + + def __getitem__(self, prop): + """ + Get item or nested item from object + + Parameters + ---------- + prop : str|tuple + + If prop is the name of a property of this object, then the + property is returned. + + If prop is a nested property path string (e.g. 'foo[1].bar'), + then a nested property is returned (e.g. obj['foo'][1]['bar']) + + If prop is a path tuple (e.g. ('foo', 1, 'bar')), then a nested + property is returned (e.g. obj['foo'][1]['bar']). + + Returns + ------- + Any + """ + from _plotly_utils.basevalidators import ( + CompoundValidator, + CompoundArrayValidator, + BaseDataValidator, + ) + + # Normalize prop + # -------------- + # Convert into a property tuple + orig_prop = prop + prop = BaseFigure._str_to_dict_path(prop) + + # Handle remapping + # ---------------- + if prop and prop[0] in self._mapped_properties: + prop = self._mapped_properties[prop[0]] + prop[1:] + orig_prop = _remake_path_from_tuple(prop) + + # Handle scalar case + # ------------------ + # e.g. ('foo',) + if len(prop) == 1: + # Unwrap scalar tuple + prop = prop[0] + if prop not in self._valid_props: + self._raise_on_invalid_property_error(_error_to_raise=PlotlyKeyError)( + prop + ) + + validator = self._get_validator(prop) + + if isinstance(validator, CompoundValidator): + if self._compound_props.get(prop, None) is None: + # Init compound objects + self._compound_props[prop] = validator.data_class( + _parent=self, plotly_name=prop + ) + # Update plotly_name value in case the validator applies + # non-standard name (e.g. imagedefaults instead of image) + self._compound_props[prop]._plotly_name = prop + + return validator.present(self._compound_props[prop]) + elif isinstance(validator, (CompoundArrayValidator, BaseDataValidator)): + if self._compound_array_props.get(prop, None) is None: + # Init list of compound objects + if self._props is not None: + self._compound_array_props[prop] = [ + validator.data_class(_parent=self) + for _ in self._props.get(prop, []) + ] + else: + self._compound_array_props[prop] = [] + + return validator.present(self._compound_array_props[prop]) + elif self._props is not None and prop in self._props: + return validator.present(self._props[prop]) + elif self._prop_defaults is not None: + return validator.present(self._prop_defaults.get(prop, None)) + else: + return None + + # Handle non-scalar case + # ---------------------- + # e.g. ('foo', 1), () + else: + err = _check_path_in_prop_tree(self, orig_prop, error_cast=PlotlyKeyError) + if err is not None: + raise err + res = self + for p in prop: + res = res[p] + + return res + + def __contains__(self, prop): + """ + Determine whether object contains a property or nested property + + Parameters + ---------- + prop : str|tuple + If prop is a simple string (e.g. 'foo'), then return true of the + object contains an element named 'foo' + + If prop is a property path string (e.g. 'foo[0].bar'), + then return true if the obejct contains the nested elements for + each entry in the path string (e.g. 'bar' in obj['foo'][0]) + + If prop is a property path tuple (e.g. ('foo', 0, 'bar')), + then return true if the object contains the nested elements for + each entry in the path string (e.g. 'bar' in obj['foo'][0]) + + Returns + ------- + bool + """ + prop = BaseFigure._str_to_dict_path(prop) + + # Handle remapping + if prop and prop[0] in self._mapped_properties: + prop = self._mapped_properties[prop[0]] + prop[1:] + + obj = self + for p in prop: + if isinstance(p, int): + if isinstance(obj, tuple) and 0 <= p < len(obj): + obj = obj[p] + else: + return False + else: + if hasattr(obj, "_valid_props") and p in obj._valid_props: + obj = obj[p] + else: + return False + + return True + + def __setitem__(self, prop, value): + """ + Parameters + ---------- + prop : str + The name of a direct child of this object + + Note: Setting nested properties using property path string or + property path tuples is not supported. + value + New property value + + Returns + ------- + None + """ + from _plotly_utils.basevalidators import ( + CompoundValidator, + CompoundArrayValidator, + BaseDataValidator, + ) + + # Normalize prop + # -------------- + # Convert into a property tuple + orig_prop = prop + prop = BaseFigure._str_to_dict_path(prop) + + # Handle empty case + # ----------------- + if len(prop) == 0: + raise KeyError(orig_prop) + + # Handle remapping + # ---------------- + if prop[0] in self._mapped_properties: + prop = self._mapped_properties[prop[0]] + prop[1:] + + # Handle scalar case + # ------------------ + # e.g. ('foo',) + if len(prop) == 1: + # ### Unwrap scalar tuple ### + prop = prop[0] + + if self._validate: + if prop not in self._valid_props: + self._raise_on_invalid_property_error()(prop) + + # ### Get validator for this property ### + validator = self._get_validator(prop) + + # ### Handle compound property ### + if isinstance(validator, CompoundValidator): + self._set_compound_prop(prop, value) + + # ### Handle compound array property ### + elif isinstance(validator, (CompoundArrayValidator, BaseDataValidator)): + self._set_array_prop(prop, value) + + # ### Handle simple property ### + else: + self._set_prop(prop, value) + else: + # Make sure properties dict is initialized + self._init_props() + + if isinstance(value, BasePlotlyType): + # Extract json from graph objects + value = value.to_plotly_json() + + # Check for list/tuple of graph objects + if ( + isinstance(value, (list, tuple)) + and value + and isinstance(value[0], BasePlotlyType) + ): + value = [ + v.to_plotly_json() if isinstance(v, BasePlotlyType) else v + for v in value + ] + + self._props[prop] = value + + # Remove any already constructed graph object so that it will be + # reconstructed on property access + self._compound_props.pop(prop, None) + self._compound_array_props.pop(prop, None) + + # Handle non-scalar case + # ---------------------- + # e.g. ('foo', 1), () + else: + err = _check_path_in_prop_tree(self, orig_prop, error_cast=ValueError) + if err is not None: + raise err + res = self + for p in prop[:-1]: + res = res[p] + + res._validate = self._validate + + res[prop[-1]] = value + + def __setattr__(self, prop, value): + """ + Parameters + ---------- + prop : str + The name of a direct child of this object + value + New property value + Returns + ------- + None + """ + if prop.startswith("_") or hasattr(self, prop) or prop in self._valid_props: + # Let known properties and private properties through + super(BasePlotlyType, self).__setattr__(prop, value) + else: + # Raise error on unknown public properties + self._raise_on_invalid_property_error()(prop) + + def __iter__(self): + """ + Return an iterator over the object's properties + """ + res = list(self._valid_props) + for prop in self._mapped_properties: + res.append(prop) + return iter(res) + + def __eq__(self, other): + """ + Test for equality + + To be considered equal, `other` must have the same type as this object + and their `to_plotly_json` representaitons must be identical. + + Parameters + ---------- + other + The object to compare against + + Returns + ------- + bool + """ + if not isinstance(other, self.__class__): + # Require objects to be of the same plotly type + return False + else: + # Compare plotly_json representations + + # Use _vals_equal instead of `==` to handle cases where + # underlying dicts contain numpy arrays + return BasePlotlyType._vals_equal( + self._props if self._props is not None else {}, + other._props if other._props is not None else {}, + ) + + @staticmethod + def _build_repr_for_class(props, class_name, parent_path_str=None): + """ + Helper to build representation string for a class + + Parameters + ---------- + class_name : str + Name of the class being represented + parent_path_str : str of None (default) + Name of the class's parent package to display + props : dict + Properties to unpack into the constructor + + Returns + ------- + str + The representation string + """ + from plotly.utils import ElidedPrettyPrinter + + if parent_path_str: + class_name = parent_path_str + "." + class_name + + if len(props) == 0: + repr_str = class_name + "()" + else: + pprinter = ElidedPrettyPrinter(threshold=200, width=120) + pprint_res = pprinter.pformat(props) + + # pprint_res is indented by 1 space. Add extra 3 spaces for PEP8 + # complaint indent + body = " " + pprint_res[1:-1].replace("\n", "\n ") + + repr_str = class_name + "({\n " + body + "\n})" + + return repr_str + + def __repr__(self): + """ + Customize object representation when displayed in the + terminal/notebook + """ + from _plotly_utils.basevalidators import LiteralValidator + + # Get all properties + props = self._props if self._props is not None else {} + + # Remove literals (These can't be specified in the constructor) + props = { + p: v + for p, v in props.items() + if p in self._valid_props + and not isinstance(self._get_validator(p), LiteralValidator) + } + + # Elide template + if "template" in props: + props["template"] = "..." + + # Build repr string + repr_str = BasePlotlyType._build_repr_for_class( + props=props, + class_name=self.__class__.__name__, + parent_path_str=self._parent_path_str, + ) + + return repr_str + + def _raise_on_invalid_property_error(self, _error_to_raise=None): + """ + Returns a function that raises informative exception when invalid + property names are encountered. The _error_to_raise argument allows + specifying the exception to raise, which is ValueError if None. + + Parameters + ---------- + args : list[str] + List of property names that have already been determined to be + invalid + + Raises + ------ + ValueError by default, or _error_to_raise if not None + """ + if _error_to_raise is None: + _error_to_raise = ValueError + + def _ret(*args): + invalid_props = args + if invalid_props: + if len(invalid_props) == 1: + prop_str = "property" + invalid_str = repr(invalid_props[0]) + else: + prop_str = "properties" + invalid_str = repr(invalid_props) + + module_root = "plotly.graph_objs." + if self._parent_path_str: + full_obj_name = ( + module_root + + self._parent_path_str + + "." + + self.__class__.__name__ + ) + else: + full_obj_name = module_root + self.__class__.__name__ + + guessed_prop = None + if len(invalid_props) == 1: + try: + guessed_prop = find_closest_string( + invalid_props[0], self._valid_props + ) + except Exception: + pass + guessed_prop_suggestion = "" + if guessed_prop is not None: + guessed_prop_suggestion = 'Did you mean "%s"?' % (guessed_prop,) + raise _error_to_raise( + "Invalid {prop_str} specified for object of type " + "{full_obj_name}: {invalid_str}\n" + "\n{guessed_prop_suggestion}\n" + "\n Valid properties:\n" + "{prop_descriptions}" + "\n{guessed_prop_suggestion}\n".format( + prop_str=prop_str, + full_obj_name=full_obj_name, + invalid_str=invalid_str, + prop_descriptions=self._prop_descriptions, + guessed_prop_suggestion=guessed_prop_suggestion, + ) + ) + + return _ret + + def update(self, dict1=None, overwrite=False, **kwargs): + """ + Update the properties of an object with a dict and/or with + keyword arguments. + + This recursively updates the structure of the original + object with the values in the input dict / keyword arguments. + + Parameters + ---------- + dict1 : dict + Dictionary of properties to be updated + overwrite: bool + If True, overwrite existing properties. If False, apply updates + to existing properties recursively, preserving existing + properties that are not specified in the update operation. + kwargs : + Keyword/value pair of properties to be updated + + Returns + ------- + BasePlotlyType + Updated plotly object + """ + if self.figure: + with self.figure.batch_update(): + BaseFigure._perform_update(self, dict1, overwrite=overwrite) + BaseFigure._perform_update(self, kwargs, overwrite=overwrite) + else: + BaseFigure._perform_update(self, dict1, overwrite=overwrite) + BaseFigure._perform_update(self, kwargs, overwrite=overwrite) + + return self + + def pop(self, key, *args): + """ + Remove the value associated with the specified key and return it + + Parameters + ---------- + key: str + Property name + dflt + The default value to return if key was not found in object + + Returns + ------- + value + The removed value that was previously associated with key + + Raises + ------ + KeyError + If key is not in object and no dflt argument specified + """ + # Handle default + if key not in self and args: + return args[0] + elif key in self: + val = self[key] + self[key] = None + return val + else: + raise KeyError(key) + + @property + def _in_batch_mode(self): + """ + True if the object belongs to a figure that is currently in batch mode + Returns + ------- + bool + """ + return self.parent and self.parent._in_batch_mode + + def _set_prop(self, prop, val): + """ + Set the value of a simple property + + Parameters + ---------- + prop : str + Name of a simple (non-compound, non-array) property + val + The new property value + + Returns + ------- + Any + The coerced assigned value + """ + + # val is Undefined + # ---------------- + if val is Undefined: + # Do nothing + return + + # Import value + # ------------ + validator = self._get_validator(prop) + + try: + val = validator.validate_coerce(val) + except ValueError as err: + if self._skip_invalid: + return + else: + raise err + + # val is None + # ----------- + if val is None: + # Check if we should send null update + if self._props and prop in self._props: + # Remove property if not in batch mode + if not self._in_batch_mode: + self._props.pop(prop) + + # Send property update message + self._send_prop_set(prop, val) + + # val is valid value + # ------------------ + else: + # Make sure properties dict is initialized + self._init_props() + + # Check whether the value is a change + if prop not in self._props or not BasePlotlyType._vals_equal( + self._props[prop], val + ): + # Set property value if not in batch mode + if not self._in_batch_mode: + self._props[prop] = val + + # Send property update message + self._send_prop_set(prop, val) + + return val + + def _set_compound_prop(self, prop, val): + """ + Set the value of a compound property + + Parameters + ---------- + prop : str + Name of a compound property + val + The new property value + + Returns + ------- + BasePlotlyType + The coerced assigned object + """ + + # val is Undefined + # ---------------- + if val is Undefined: + # Do nothing + return + + # Import value + # ------------ + validator = self._get_validator(prop) + val = validator.validate_coerce(val, skip_invalid=self._skip_invalid) + + # Save deep copies of current and new states + # ------------------------------------------ + curr_val = self._compound_props.get(prop, None) + if curr_val is not None: + curr_dict_val = deepcopy(curr_val._props) + else: + curr_dict_val = None + + if val is not None: + new_dict_val = deepcopy(val._props) + else: + new_dict_val = None + + # Update _props dict + # ------------------ + if not self._in_batch_mode: + if not new_dict_val: + if self._props and prop in self._props: + self._props.pop(prop) + else: + self._init_props() + self._props[prop] = new_dict_val + + # Send update if there was a change in value + # ------------------------------------------ + if not BasePlotlyType._vals_equal(curr_dict_val, new_dict_val): + self._send_prop_set(prop, new_dict_val) + + # Reparent + # -------- + # ### Reparent new value and clear orphan data ### + if isinstance(val, BasePlotlyType): + val._parent = self + val._orphan_props.clear() + + # ### Unparent old value and update orphan data ### + if curr_val is not None: + if curr_dict_val is not None: + curr_val._orphan_props.update(curr_dict_val) + curr_val._parent = None + + # Update _compound_props + # ---------------------- + self._compound_props[prop] = val + return val + + def _set_array_prop(self, prop, val): + """ + Set the value of a compound property + + Parameters + ---------- + prop : str + Name of a compound property + val + The new property value + + Returns + ------- + tuple[BasePlotlyType] + The coerced assigned object + """ + + # val is Undefined + # ---------------- + if val is Undefined: + # Do nothing + return + + # Import value + # ------------ + validator = self._get_validator(prop) + val = validator.validate_coerce(val, skip_invalid=self._skip_invalid) + + # Save deep copies of current and new states + # ------------------------------------------ + curr_val = self._compound_array_props.get(prop, None) + if curr_val is not None: + curr_dict_vals = [deepcopy(cv._props) for cv in curr_val] + else: + curr_dict_vals = None + + if val is not None: + new_dict_vals = [deepcopy(nv._props) for nv in val] + else: + new_dict_vals = None + + # Update _props dict + # ------------------ + if not self._in_batch_mode: + if not new_dict_vals: + if self._props and prop in self._props: + self._props.pop(prop) + else: + self._init_props() + self._props[prop] = new_dict_vals + + # Send update if there was a change in value + # ------------------------------------------ + if not BasePlotlyType._vals_equal(curr_dict_vals, new_dict_vals): + self._send_prop_set(prop, new_dict_vals) + + # Reparent + # -------- + # ### Reparent new values and clear orphan data ### + if val is not None: + for v in val: + v._orphan_props.clear() + v._parent = self + + # ### Unparent old value and update orphan data ### + if curr_val is not None: + for cv, cv_dict in zip(curr_val, curr_dict_vals): + if cv_dict is not None: + cv._orphan_props.update(cv_dict) + cv._parent = None + + # Update _compound_array_props + # ---------------------------- + self._compound_array_props[prop] = val + return val + + def _send_prop_set(self, prop_path_str, val): + """ + Notify parent that a property has been set to a new value + + Parameters + ---------- + prop_path_str : str + Property path string (e.g. 'foo[0].bar') of property that + was set, relative to this object + val + New value for property. Either a simple value, a dict, + or a tuple of dicts. This should *not* be a BasePlotlyType object. + + Returns + ------- + None + """ + raise NotImplementedError() + + def _prop_set_child(self, child, prop_path_str, val): + """ + Propagate property setting notification from child to parent + + Parameters + ---------- + child : BasePlotlyType + Child object + prop_path_str : str + Property path string (e.g. 'foo[0].bar') of property that + was set, relative to `child` + val + New value for property. Either a simple value, a dict, + or a tuple of dicts. This should *not* be a BasePlotlyType object. + + Returns + ------- + None + """ + + # Child is compound array property + # -------------------------------- + child_prop_val = getattr(self, child.plotly_name) + if isinstance(child_prop_val, (list, tuple)): + child_ind = BaseFigure._index_is(child_prop_val, child) + obj_path = "{child_name}.{child_ind}.{prop}".format( + child_name=child.plotly_name, child_ind=child_ind, prop=prop_path_str + ) + + # Child is compound property + # -------------------------- + else: + obj_path = "{child_name}.{prop}".format( + child_name=child.plotly_name, prop=prop_path_str + ) + + # Propagate to parent + # ------------------- + self._send_prop_set(obj_path, val) + + def _restyle_child(self, child, prop, val): + """ + Propagate _restyle_child to parent + + Note: This method must match the name and signature of the + corresponding method on BaseFigure + """ + self._prop_set_child(child, prop, val) + + def _relayout_child(self, child, prop, val): + """ + Propagate _relayout_child to parent + + Note: This method must match the name and signature of the + corresponding method on BaseFigure + """ + self._prop_set_child(child, prop, val) + + # Callbacks + # --------- + def _dispatch_change_callbacks(self, changed_paths): + """ + Execute the appropriate change callback functions given a set of + changed property path tuples + + Parameters + ---------- + changed_paths : set[tuple[int|str]] + + Returns + ------- + None + """ + # Loop over registered callbacks + # ------------------------------ + for prop_path_tuples, callbacks in self._change_callbacks.items(): + # ### Compute callback paths that changed ### + common_paths = changed_paths.intersection(set(prop_path_tuples)) + if common_paths: + # #### Invoke callback #### + callback_args = [self[cb_path] for cb_path in prop_path_tuples] + + for callback in callbacks: + callback(self, *callback_args) + + def on_change(self, callback, *args, **kwargs): + """ + Register callback function to be called when certain properties or + subproperties of this object are modified. + + Callback will be invoked whenever ANY of these properties is + modified. Furthermore, the callback will only be invoked once even + if multiple properties are modified during the same restyle / + relayout / update operation. + + Parameters + ---------- + callback : function + Function that accepts 1 + len(`args`) parameters. First parameter + is this object. Second through last parameters are the + property / subpropery values referenced by args. + args : list[str|tuple[int|str]] + List of property references where each reference may be one of: + + 1) A property name string (e.g. 'foo') for direct properties + 2) A property path string (e.g. 'foo[0].bar') for + subproperties + 3) A property path tuple (e.g. ('foo', 0, 'bar')) for + subproperties + + append : bool + True if callback should be appended to previously registered + callback on the same properties, False if callback should replace + previously registered callbacks on the same properties. Defaults + to False. + + Examples + -------- + + Register callback that prints out the range extents of the xaxis and + yaxis whenever either either of them changes. + + >>> import plotly.graph_objects as go + >>> fig = go.Figure(go.Scatter(x=[1, 2], y=[1, 0])) + >>> fig.layout.on_change( + ... lambda obj, xrange, yrange: print("%s-%s" % (xrange, yrange)), + ... ('xaxis', 'range'), ('yaxis', 'range')) + + + Returns + ------- + None + """ + + # Warn if object not descendent of a figure + # ----------------------------------------- + if not self.figure: + class_name = self.__class__.__name__ + msg = """ +{class_name} object is not a descendant of a Figure. +on_change callbacks are not supported in this case. +""".format(class_name=class_name) + raise ValueError(msg) + + # Validate args not empty + # ----------------------- + if len(args) == 0: + raise ValueError("At least one change property must be specified") + + # Validate args + # ------------- + invalid_args = [arg for arg in args if arg not in self] + if invalid_args: + raise ValueError("Invalid property specification(s): %s" % invalid_args) + + # Process append option + # --------------------- + append = kwargs.get("append", False) + + # Normalize args to path tuples + # ----------------------------- + arg_tuples = tuple([BaseFigure._str_to_dict_path(a) for a in args]) + + # Initialize callbacks list + # ------------------------- + # Initialize an empty callbacks list if there are no previously + # defined callbacks for this collection of args, or if append is False + if arg_tuples not in self._change_callbacks or not append: + self._change_callbacks[arg_tuples] = [] + + # Register callback + # ----------------- + self._change_callbacks[arg_tuples].append(callback) + + def to_plotly_json(self): + """ + Return plotly JSON representation of object as a Python dict + + Note: May include some JSON-invalid data types, use the `PlotlyJSONEncoder` util + or the `to_json` method to encode to a string. + + Returns + ------- + dict + """ + return deepcopy(self._props if self._props is not None else {}) + + def to_json(self, *args, **kwargs): + """ + Convert object to a JSON string representation + + Parameters + ---------- + validate: bool (default True) + True if the object should be validated before being converted to + JSON, False otherwise. + + pretty: bool (default False) + True if JSON representation should be pretty-printed, False if + representation should be as compact as possible. + + remove_uids: bool (default True) + True if trace UIDs should be omitted from the JSON representation + + engine: str (default None) + The JSON encoding engine to use. One of: + - "json" for an encoder based on the built-in Python json module + - "orjson" for a fast encoder the requires the orjson package + If not specified, the default encoder is set to the current value of + plotly.io.json.config.default_encoder. + + Returns + ------- + str + Representation of object as a JSON string + """ + import plotly.io as pio + + return pio.to_json(self, *args, **kwargs) + + @staticmethod + def _vals_equal(v1, v2): + """ + Recursive equality function that handles nested dicts / tuples / lists + that contain numpy arrays. + + v1 + First value to compare + v2 + Second value to compare + + Returns + ------- + bool + True if v1 and v2 are equal, False otherwise + """ + np = get_module("numpy", should_load=False) + if np is not None and ( + isinstance(v1, np.ndarray) or isinstance(v2, np.ndarray) + ): + return np.array_equal(v1, v2) + elif isinstance(v1, (list, tuple)): + # Handle recursive equality on lists and tuples + return ( + isinstance(v2, (list, tuple)) + and len(v1) == len(v2) + and all(BasePlotlyType._vals_equal(e1, e2) for e1, e2 in zip(v1, v2)) + ) + elif isinstance(v1, dict): + # Handle recursive equality on dicts + return ( + isinstance(v2, dict) + and set(v1.keys()) == set(v2.keys()) + and all(BasePlotlyType._vals_equal(v1[k], v2[k]) for k in v1) + ) + else: + return v1 == v2 + + +class BaseLayoutHierarchyType(BasePlotlyType): + """ + Base class for all types in the layout hierarchy + """ + + @property + def _parent_path_str(self): + pass + + def __init__(self, plotly_name, **kwargs): + super(BaseLayoutHierarchyType, self).__init__(plotly_name, **kwargs) + + def _send_prop_set(self, prop_path_str, val): + if self.parent: + # ### Inform parent of relayout operation ### + self.parent._relayout_child(self, prop_path_str, val) + + +class BaseLayoutType(BaseLayoutHierarchyType): + """ + Base class for the layout type. The Layout class itself is a + code-generated subclass. + """ + + # Dynamic properties + # ------------------ + # Unlike all other plotly types, BaseLayoutType has dynamic properties. + # These are used when a layout has multiple instances of subplot types + # (xaxis2, yaxis3, geo4, etc.) + # + # The base version of each subplot type is defined in the schema and code + # generated. So the Layout subclass has statically defined properties + # for xaxis, yaxis, geo, ternary, and scene. But, we need to dynamically + # generated properties/validators as needed for xaxis2, yaxis3, etc. + + @property + def _subplotid_validators(self): + """ + dict of validator classes for each subplot type + + Returns + ------- + dict + """ + raise NotImplementedError() + + def _subplot_re_match(self, prop): + raise NotImplementedError() + + def __init__(self, plotly_name, **kwargs): + """ + Construct a new BaseLayoutType object + + Parameters + ---------- + plotly_name : str + Name of the object (should always be 'layout') + kwargs : dict[str, any] + Properties that were not recognized by the Layout subclass. + These are subplot identifiers (xaxis2, geo4, etc.) or they are + invalid properties. + """ + # Validate inputs + # --------------- + assert plotly_name == "layout" + + # Call superclass constructor + # --------------------------- + super(BaseLayoutHierarchyType, self).__init__(plotly_name) + + # Initialize _subplotid_props + # --------------------------- + # This is a set storing the names of the layout's dynamic subplot + # properties + self._subplotid_props = set() + + # Process kwargs + # -------------- + self._process_kwargs(**kwargs) + + def _process_kwargs(self, **kwargs): + """ + Process any extra kwargs that are not predefined as constructor params + """ + unknown_kwargs = { + k: v for k, v in kwargs.items() if not self._subplot_re_match(k) + } + super(BaseLayoutHierarchyType, self)._process_kwargs(**unknown_kwargs) + + subplot_kwargs = {k: v for k, v in kwargs.items() if self._subplot_re_match(k)} + + for prop, value in subplot_kwargs.items(): + self._set_subplotid_prop(prop, value) + + def _set_subplotid_prop(self, prop, value): + """ + Set a subplot property on the layout + + Parameters + ---------- + prop : str + A valid subplot property + value + Subplot value + """ + # Get regular expression match + # ---------------------------- + # Note: we already tested that match exists in the constructor + match = self._subplot_re_match(prop) + subplot_prop = match.group(1) + suffix_digit = int(match.group(2)) + + # Validate suffix digit + # --------------------- + if suffix_digit == 0: + raise TypeError( + "Subplot properties may only be suffixed by an " + "integer >= 1\n" + "Received {k}".format(k=prop) + ) + + # Handle suffix_digit == 1 + # ------------------------ + # In this case we remove suffix digit (e.g. xaxis1 -> xaxis) + if suffix_digit == 1: + prop = subplot_prop + + # Construct and add validator + # --------------------------- + if prop not in self._valid_props: + self._valid_props.add(prop) + + # Import value + # ------------ + # Use the standard _set_compound_prop method to + # validate/coerce/import subplot value. This must be called AFTER + # the validator instance is added to self._validators above. + self._set_compound_prop(prop, value) + self._subplotid_props.add(prop) + + def _strip_subplot_suffix_of_1(self, prop): + """ + Strip the suffix for subplot property names that have a suffix of 1. + All other properties are returned unchanged + + e.g. 'xaxis1' -> 'xaxis' + + Parameters + ---------- + prop : str|tuple + + Returns + ------- + str|tuple + """ + # Let parent handle non-scalar cases + # ---------------------------------- + # e.g. ('xaxis', 'range') or 'xaxis.range' + prop_tuple = BaseFigure._str_to_dict_path(prop) + if len(prop_tuple) != 1 or not isinstance(prop_tuple[0], str): + return prop + else: + # Unwrap to scalar string + prop = prop_tuple[0] + + # Handle subplot suffix digit of 1 + # -------------------------------- + # Remove digit of 1 from subplot id (e.g.. xaxis1 -> xaxis) + match = self._subplot_re_match(prop) + + if match: + subplot_prop = match.group(1) + suffix_digit = int(match.group(2)) + if subplot_prop and suffix_digit == 1: + prop = subplot_prop + + return prop + + def _get_prop_validator(self, prop): + """ + Custom _get_prop_validator that handles subplot properties + """ + prop = self._strip_subplot_suffix_of_1(prop) + return super(BaseLayoutHierarchyType, self)._get_prop_validator(prop) + + def __getattr__(self, prop): + """ + Custom __getattr__ that handles dynamic subplot properties + """ + prop = self._strip_subplot_suffix_of_1(prop) + if prop != "_subplotid_props" and prop in self._subplotid_props: + validator = self._get_validator(prop) + return validator.present(self._compound_props[prop]) + else: + return super(BaseLayoutHierarchyType, self).__getattribute__(prop) + + def __getitem__(self, prop): + """ + Custom __getitem__ that handles dynamic subplot properties + """ + prop = self._strip_subplot_suffix_of_1(prop) + return super(BaseLayoutHierarchyType, self).__getitem__(prop) + + def __contains__(self, prop): + """ + Custom __contains__ that handles dynamic subplot properties + """ + prop = self._strip_subplot_suffix_of_1(prop) + return super(BaseLayoutHierarchyType, self).__contains__(prop) + + def __setitem__(self, prop, value): + """ + Custom __setitem__ that handles dynamic subplot properties + """ + # Convert prop to prop tuple + # -------------------------- + prop_tuple = BaseFigure._str_to_dict_path(prop) + if len(prop_tuple) != 1 or not isinstance(prop_tuple[0], str): + # Let parent handle non-scalar non-string cases + super(BaseLayoutHierarchyType, self).__setitem__(prop, value) + return + else: + # Unwrap prop tuple + prop = prop_tuple[0] + + # Check for subplot assignment + # ---------------------------- + match = self._subplot_re_match(prop) + if match is None: + # Set as ordinary property + super(BaseLayoutHierarchyType, self).__setitem__(prop, value) + else: + # Set as subplotid property + self._set_subplotid_prop(prop, value) + + def __setattr__(self, prop, value): + """ + Custom __setattr__ that handles dynamic subplot properties + """ + # Check for subplot assignment + # ---------------------------- + match = self._subplot_re_match(prop) + if match is None: + # Set as ordinary property + super(BaseLayoutHierarchyType, self).__setattr__(prop, value) + else: + # Set as subplotid property + self._set_subplotid_prop(prop, value) + + def __dir__(self): + """ + Custom __dir__ that handles dynamic subplot properties + """ + # Include any active subplot values + return list(super(BaseLayoutHierarchyType, self).__dir__()) + sorted( + self._subplotid_props + ) + + +class BaseTraceHierarchyType(BasePlotlyType): + """ + Base class for all types in the trace hierarchy + """ + + def __init__(self, plotly_name, **kwargs): + super(BaseTraceHierarchyType, self).__init__(plotly_name, **kwargs) + + def _send_prop_set(self, prop_path_str, val): + if self.parent: + # ### Inform parent of restyle operation ### + self.parent._restyle_child(self, prop_path_str, val) + + +class BaseTraceType(BaseTraceHierarchyType): + """ + Base class for the all trace types. + + Specific trace type classes (Scatter, Bar, etc.) are code generated as + subclasses of this class. + """ + + def __init__(self, plotly_name, **kwargs): + super(BaseTraceHierarchyType, self).__init__(plotly_name, **kwargs) + + # Initialize callback function lists + # ---------------------------------- + # ### Callbacks to be called on hover ### + self._hover_callbacks = [] + + # ### Callbacks to be called on unhover ### + self._unhover_callbacks = [] + + # ### Callbacks to be called on click ### + self._click_callbacks = [] + + # ### Callbacks to be called on selection ### + self._select_callbacks = [] + + # ### Callbacks to be called on deselect ### + self._deselect_callbacks = [] + + # ### Trace index in figure ### + self._trace_ind = None + + # uid + # --- + # All trace types must have a top-level UID + @property + def uid(self): + raise NotImplementedError + + @uid.setter + def uid(self, val): + raise NotImplementedError + + # Hover + # ----- + def on_hover(self, callback, append=False): + """ + Register function to be called when the user hovers over one or more + points in this trace + + Note: Callbacks will only be triggered when the trace belongs to a + instance of plotly.graph_objs.FigureWidget and it is displayed in an + ipywidget context. Callbacks will not be triggered on figures + that are displayed using plot/iplot. + + Parameters + ---------- + callback + Callable function that accepts 3 arguments + + - this trace + - plotly.callbacks.Points object + - plotly.callbacks.InputDeviceState object + + append : bool + If False (the default), this callback replaces any previously + defined on_hover callbacks for this trace. If True, + this callback is appended to the list of any previously defined + callbacks. + + Returns + ------- + None + + Examples + -------- + + >>> import plotly.graph_objects as go + >>> from plotly.callbacks import Points, InputDeviceState + >>> points, state = Points(), InputDeviceState() + + >>> def hover_fn(trace, points, state): + ... inds = points.point_inds + ... # Do something + + >>> trace = go.Scatter(x=[1, 2], y=[3, 0]) + >>> trace.on_hover(hover_fn) + + Note: The creation of the `points` and `state` objects is optional, + it's simply a convenience to help the text editor perform completion + on the arguments inside `hover_fn` + """ + if not append: + del self._hover_callbacks[:] + + if callback: + self._hover_callbacks.append(callback) + + def _dispatch_on_hover(self, points, state): + """ + Dispatch points and device state all all hover callbacks + """ + for callback in self._hover_callbacks: + callback(self, points, state) + + # Unhover + # ------- + def on_unhover(self, callback, append=False): + """ + Register function to be called when the user unhovers away from one + or more points in this trace. + + Note: Callbacks will only be triggered when the trace belongs to a + instance of plotly.graph_objs.FigureWidget and it is displayed in an + ipywidget context. Callbacks will not be triggered on figures + that are displayed using plot/iplot. + + Parameters + ---------- + callback + Callable function that accepts 3 arguments + + - this trace + - plotly.callbacks.Points object + - plotly.callbacks.InputDeviceState object + + append : bool + If False (the default), this callback replaces any previously + defined on_unhover callbacks for this trace. If True, + this callback is appended to the list of any previously defined + callbacks. + + Returns + ------- + None + + Examples + -------- + + >>> import plotly.graph_objects as go + >>> from plotly.callbacks import Points, InputDeviceState + >>> points, state = Points(), InputDeviceState() + + >>> def unhover_fn(trace, points, state): + ... inds = points.point_inds + ... # Do something + + >>> trace = go.Scatter(x=[1, 2], y=[3, 0]) + >>> trace.on_unhover(unhover_fn) + + Note: The creation of the `points` and `state` objects is optional, + it's simply a convenience to help the text editor perform completion + on the arguments inside `unhover_fn` + """ + if not append: + del self._unhover_callbacks[:] + + if callback: + self._unhover_callbacks.append(callback) + + def _dispatch_on_unhover(self, points, state): + """ + Dispatch points and device state all all hover callbacks + """ + for callback in self._unhover_callbacks: + callback(self, points, state) + + # Click + # ----- + def on_click(self, callback, append=False): + """ + Register function to be called when the user clicks on one or more + points in this trace. + + Note: Callbacks will only be triggered when the trace belongs to a + instance of plotly.graph_objs.FigureWidget and it is displayed in an + ipywidget context. Callbacks will not be triggered on figures + that are displayed using plot/iplot. + + Parameters + ---------- + callback + Callable function that accepts 3 arguments + + - this trace + - plotly.callbacks.Points object + - plotly.callbacks.InputDeviceState object + + append : bool + If False (the default), this callback replaces any previously + defined on_click callbacks for this trace. If True, + this callback is appended to the list of any previously defined + callbacks. + + Returns + ------- + None + + Examples + -------- + + >>> import plotly.graph_objects as go + >>> from plotly.callbacks import Points, InputDeviceState + >>> points, state = Points(), InputDeviceState() + + >>> def click_fn(trace, points, state): + ... inds = points.point_inds + ... # Do something + + >>> trace = go.Scatter(x=[1, 2], y=[3, 0]) + >>> trace.on_click(click_fn) + + Note: The creation of the `points` and `state` objects is optional, + it's simply a convenience to help the text editor perform completion + on the arguments inside `click_fn` + """ + if not append: + del self._click_callbacks[:] + if callback: + self._click_callbacks.append(callback) + + def _dispatch_on_click(self, points, state): + """ + Dispatch points and device state all all hover callbacks + """ + for callback in self._click_callbacks: + callback(self, points, state) + + # Select + # ------ + def on_selection(self, callback, append=False): + """ + Register function to be called when the user selects one or more + points in this trace. + + Note: Callbacks will only be triggered when the trace belongs to a + instance of plotly.graph_objs.FigureWidget and it is displayed in an + ipywidget context. Callbacks will not be triggered on figures + that are displayed using plot/iplot. + + Parameters + ---------- + callback + Callable function that accepts 4 arguments + + - this trace + - plotly.callbacks.Points object + - plotly.callbacks.BoxSelector or plotly.callbacks.LassoSelector + + append : bool + If False (the default), this callback replaces any previously + defined on_selection callbacks for this trace. If True, + this callback is appended to the list of any previously defined + callbacks. + + Returns + ------- + None + + Examples + -------- + + >>> import plotly.graph_objects as go + >>> from plotly.callbacks import Points + >>> points = Points() + + >>> def selection_fn(trace, points, selector): + ... inds = points.point_inds + ... # Do something + + >>> trace = go.Scatter(x=[1, 2], y=[3, 0]) + >>> trace.on_selection(selection_fn) + + Note: The creation of the `points` object is optional, + it's simply a convenience to help the text editor perform completion + on the `points` arguments inside `selection_fn` + """ + if not append: + del self._select_callbacks[:] + + if callback: + self._select_callbacks.append(callback) + + def _dispatch_on_selection(self, points, selector): + """ + Dispatch points and selector info to selection callbacks + """ + if "selectedpoints" in self: + # Update the selectedpoints property, which will notify all views + # of the selection change. This is a special case because no + # restyle event is emitted by plotly.js on selection events + # even though these events update the selectedpoints property. + self.selectedpoints = points.point_inds + + for callback in self._select_callbacks: + callback(self, points, selector) + + # deselect + # -------- + def on_deselect(self, callback, append=False): + """ + Register function to be called when the user deselects points + in this trace using doubleclick. + + Note: Callbacks will only be triggered when the trace belongs to a + instance of plotly.graph_objs.FigureWidget and it is displayed in an + ipywidget context. Callbacks will not be triggered on figures + that are displayed using plot/iplot. + + Parameters + ---------- + callback + Callable function that accepts 3 arguments + + - this trace + - plotly.callbacks.Points object + + append : bool + If False (the default), this callback replaces any previously + defined on_deselect callbacks for this trace. If True, + this callback is appended to the list of any previously defined + callbacks. + + Returns + ------- + None + + Examples + -------- + + >>> import plotly.graph_objects as go + >>> from plotly.callbacks import Points + >>> points = Points() + + >>> def deselect_fn(trace, points): + ... inds = points.point_inds + ... # Do something + + >>> trace = go.Scatter(x=[1, 2], y=[3, 0]) + >>> trace.on_deselect(deselect_fn) + + Note: The creation of the `points` object is optional, + it's simply a convenience to help the text editor perform completion + on the `points` arguments inside `selection_fn` + """ + if not append: + del self._deselect_callbacks[:] + + if callback: + self._deselect_callbacks.append(callback) + + def _dispatch_on_deselect(self, points): + """ + Dispatch points info to deselection callbacks + """ + if "selectedpoints" in self: + # Update the selectedpoints property, which will notify all views + # of the selection change. This is a special case because no + # restyle event is emitted by plotly.js on selection events + # even though these events update the selectedpoints property. + self.selectedpoints = None + + for callback in self._deselect_callbacks: + callback(self, points) + + +class BaseFrameHierarchyType(BasePlotlyType): + """ + Base class for all types in the trace hierarchy + """ + + def __init__(self, plotly_name, **kwargs): + super(BaseFrameHierarchyType, self).__init__(plotly_name, **kwargs) + + def _send_prop_set(self, prop_path_str, val): + # Note: Frames are not supported by FigureWidget, and updates are not + # propagated to parents + pass + + def _restyle_child(self, child, key_path_str, val): + # Note: Frames are not supported by FigureWidget, and updates are not + # propagated to parents + pass + + def on_change(self, callback, *args): + raise NotImplementedError("Change callbacks are not supported on Frames") + + def _get_child_props(self, child): + """ + Return the properties dict for a child trace or child layout + + Note: this method must match the name/signature of one on + BasePlotlyType + + Parameters + ---------- + child : BaseTraceType | BaseLayoutType + + Returns + ------- + dict + """ + # Try to find index of child as a trace + # ------------------------------------- + try: + trace_index = BaseFigure._index_is(self.data, child) + except ValueError: + trace_index = None + + # Child is a trace + # ---------------- + if trace_index is not None: + if "data" in self._props: + return self._props["data"][trace_index] + else: + return None + + # Child is the layout + # ------------------- + elif child is self.layout: + return self._props.get("layout", None) + + # Unknown child + # ------------- + else: + raise ValueError("Unrecognized child: %s" % child) diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/basewidget.py b/.venv_haddock/lib/python3.12/site-packages/plotly/basewidget.py new file mode 100644 index 0000000000000000000000000000000000000000..08c655fe92e7d87620cbcc15082f4825f21a6406 --- /dev/null +++ b/.venv_haddock/lib/python3.12/site-packages/plotly/basewidget.py @@ -0,0 +1,989 @@ +from copy import deepcopy +import pathlib +from traitlets import List, Dict, observe, Integer +from plotly.io._renderers import display_jupyter_version_warnings + +from .basedatatypes import BaseFigure, BasePlotlyType +from .callbacks import BoxSelector, LassoSelector, InputDeviceState, Points +from .serializers import custom_serializers +import anywidget + + +class BaseFigureWidget(BaseFigure, anywidget.AnyWidget): + """ + Base class for FigureWidget. The FigureWidget class is code-generated as a + subclass + """ + + _esm = pathlib.Path(__file__).parent / "package_data" / "widgetbundle.js" + + # ### _data and _layout ### + # These properties store the current state of the traces and + # layout as JSON-style dicts. These dicts do not store any subclasses of + # `BasePlotlyType` + # + # Note: These are only automatically synced with the frontend on full + # assignment, not on mutation. We use this fact to only directly sync + # them to the front-end on FigureWidget construction. All other updates + # are made using mutation, and they are manually synced to the frontend + # using the relayout/restyle/update/etc. messages. + _widget_layout = Dict().tag(sync=True, **custom_serializers) + _widget_data = List().tag(sync=True, **custom_serializers) + _config = Dict().tag(sync=True, **custom_serializers) + + # ### Python -> JS message properties ### + # These properties are used to send messages from Python to the + # frontend. Messages are sent by assigning the message contents to the + # appropriate _py2js_* property and then immediatly assigning None to the + # property. + # + # See JSDoc comments in the FigureModel class in js/src/Figure.js for + # detailed descriptions of the messages. + _py2js_addTraces = Dict(allow_none=True).tag(sync=True, **custom_serializers) + _py2js_restyle = Dict(allow_none=True).tag(sync=True, **custom_serializers) + _py2js_relayout = Dict(allow_none=True).tag(sync=True, **custom_serializers) + _py2js_update = Dict(allow_none=True).tag(sync=True, **custom_serializers) + _py2js_animate = Dict(allow_none=True).tag(sync=True, **custom_serializers) + + _py2js_deleteTraces = Dict(allow_none=True).tag(sync=True, **custom_serializers) + _py2js_moveTraces = Dict(allow_none=True).tag(sync=True, **custom_serializers) + + _py2js_removeLayoutProps = Dict(allow_none=True).tag( + sync=True, **custom_serializers + ) + _py2js_removeTraceProps = Dict(allow_none=True).tag(sync=True, **custom_serializers) + + # ### JS -> Python message properties ### + # These properties are used to receive messages from the frontend. + # Messages are received by defining methods that observe changes to these + # properties. Receive methods are named `_handler_js2py_*` where '*' is + # the name of the corresponding message property. Receive methods are + # responsible for setting the message property to None after retreiving + # the message data. + # + # See JSDoc comments in the FigureModel class in js/src/Figure.js for + # detailed descriptions of the messages. + _js2py_traceDeltas = Dict(allow_none=True).tag(sync=True, **custom_serializers) + _js2py_layoutDelta = Dict(allow_none=True).tag(sync=True, **custom_serializers) + _js2py_restyle = Dict(allow_none=True).tag(sync=True, **custom_serializers) + _js2py_relayout = Dict(allow_none=True).tag(sync=True, **custom_serializers) + _js2py_update = Dict(allow_none=True).tag(sync=True, **custom_serializers) + _js2py_pointsCallback = Dict(allow_none=True).tag(sync=True, **custom_serializers) + + # ### Message tracking properties ### + # The _last_layout_edit_id and _last_trace_edit_id properties are used + # to keep track of the edit id of the message that most recently + # requested an update to the Figures layout or traces respectively. + # + # We track this information because we don't want to update the Figure's + # default layout/trace properties (_layout_defaults, _data_defaults) + # while edits are in process. This can lead to inconsistent property + # states. + _last_layout_edit_id = Integer(0).tag(sync=True) + _last_trace_edit_id = Integer(0).tag(sync=True) + + _set_trace_uid = True + _allow_disable_validation = False + + # Constructor + # ----------- + def __init__( + self, data=None, layout=None, frames=None, skip_invalid=False, **kwargs + ): + # Call superclass constructors + # ---------------------------- + # Note: We rename layout to layout_plotly because to deconflict it + # with the `layout` constructor parameter of the `widgets.DOMWidget` + # ipywidgets class + super(BaseFigureWidget, self).__init__( + data=data, + layout_plotly=layout, + frames=frames, + skip_invalid=skip_invalid, + **kwargs, + ) + + # Validate Frames + # --------------- + # Frames are not supported by figure widget + if self._frame_objs: + BaseFigureWidget._display_frames_error() + + # Message States + # -------------- + # ### Layout ### + + # _last_layout_edit_id is described above + self._last_layout_edit_id = 0 + + # _layout_edit_in_process is set to True if there are layout edit + # operations that have been sent to the frontend that haven't + # completed yet. + self._layout_edit_in_process = False + + # _waiting_edit_callbacks is a list of callback functions that + # should be executed as soon as all pending edit operations are + # completed + self._waiting_edit_callbacks = [] + + # ### Trace ### + # _last_trace_edit_id: described above + self._last_trace_edit_id = 0 + + # _trace_edit_in_process is set to True if there are trace edit + # operations that have been sent to the frontend that haven't + # completed yet. + self._trace_edit_in_process = False + + # View count + # ---------- + # ipywidget property that stores the number of active frontend + # views of this widget + self._view_count = 0 + + # Initialize widget layout and data for third-party widget integration + # -------------------------------------------------------------------- + self._widget_layout = deepcopy(self._layout_obj._props) + self._widget_data = deepcopy(self._data) + + def show(self, *args, **kwargs): + return self + + # Python -> JavaScript Messages + # ----------------------------- + def _send_relayout_msg(self, layout_data, source_view_id=None): + """ + Send Plotly.relayout message to the frontend + + Parameters + ---------- + layout_data : dict + Plotly.relayout layout data + source_view_id : str + UID of view that triggered this relayout operation + (e.g. By the user clicking 'zoom' in the toolbar). None if the + operation was not triggered by a frontend view + """ + # Increment layout edit messages IDs + # ---------------------------------- + layout_edit_id = self._last_layout_edit_id + 1 + self._last_layout_edit_id = layout_edit_id + self._layout_edit_in_process = True + + # Build message + # ------------- + msg_data = { + "relayout_data": layout_data, + "layout_edit_id": layout_edit_id, + "source_view_id": source_view_id, + } + + # Send message + # ------------ + self._py2js_relayout = msg_data + self._py2js_relayout = None + + def _send_restyle_msg(self, restyle_data, trace_indexes=None, source_view_id=None): + """ + Send Plotly.restyle message to the frontend + + Parameters + ---------- + restyle_data : dict + Plotly.restyle restyle data + trace_indexes : list[int] + List of trace indexes that the restyle operation + applies to + source_view_id : str + UID of view that triggered this restyle operation + (e.g. By the user clicking the legend to hide a trace). + None if the operation was not triggered by a frontend view + """ + + # Validate / normalize inputs + # --------------------------- + trace_indexes = self._normalize_trace_indexes(trace_indexes) + + # Increment layout/trace edit message IDs + # --------------------------------------- + layout_edit_id = self._last_layout_edit_id + 1 + self._last_layout_edit_id = layout_edit_id + self._layout_edit_in_process = True + + trace_edit_id = self._last_trace_edit_id + 1 + self._last_trace_edit_id = trace_edit_id + self._trace_edit_in_process = True + + # Build message + # ------------- + restyle_msg = { + "restyle_data": restyle_data, + "restyle_traces": trace_indexes, + "trace_edit_id": trace_edit_id, + "layout_edit_id": layout_edit_id, + "source_view_id": source_view_id, + } + + # Send message + # ------------ + self._py2js_restyle = restyle_msg + self._py2js_restyle = None + + def _send_addTraces_msg(self, new_traces_data): + """ + Send Plotly.addTraces message to the frontend + + Parameters + ---------- + new_traces_data : list[dict] + List of trace data for new traces as accepted by Plotly.addTraces + """ + + # Increment layout/trace edit message IDs + # --------------------------------------- + layout_edit_id = self._last_layout_edit_id + 1 + self._last_layout_edit_id = layout_edit_id + self._layout_edit_in_process = True + + trace_edit_id = self._last_trace_edit_id + 1 + self._last_trace_edit_id = trace_edit_id + self._trace_edit_in_process = True + + # Build message + # ------------- + add_traces_msg = { + "trace_data": new_traces_data, + "trace_edit_id": trace_edit_id, + "layout_edit_id": layout_edit_id, + } + + # Send message + # ------------ + self._py2js_addTraces = add_traces_msg + self._py2js_addTraces = None + + def _send_moveTraces_msg(self, current_inds, new_inds): + """ + Send Plotly.moveTraces message to the frontend + + Parameters + ---------- + current_inds : list[int] + List of current trace indexes + new_inds : list[int] + List of new trace indexes + """ + + # Build message + # ------------- + move_msg = {"current_trace_inds": current_inds, "new_trace_inds": new_inds} + + # Send message + # ------------ + self._py2js_moveTraces = move_msg + self._py2js_moveTraces = None + + def _send_update_msg( + self, restyle_data, relayout_data, trace_indexes=None, source_view_id=None + ): + """ + Send Plotly.update message to the frontend + + Parameters + ---------- + restyle_data : dict + Plotly.update restyle data + relayout_data : dict + Plotly.update relayout data + trace_indexes : list[int] + List of trace indexes that the update operation applies to + source_view_id : str + UID of view that triggered this update operation + (e.g. By the user clicking a button). + None if the operation was not triggered by a frontend view + """ + + # Validate / normalize inputs + # --------------------------- + trace_indexes = self._normalize_trace_indexes(trace_indexes) + + # Increment layout/trace edit message IDs + # --------------------------------------- + trace_edit_id = self._last_trace_edit_id + 1 + self._last_trace_edit_id = trace_edit_id + self._trace_edit_in_process = True + + layout_edit_id = self._last_layout_edit_id + 1 + self._last_layout_edit_id = layout_edit_id + self._layout_edit_in_process = True + + # Build message + # ------------- + update_msg = { + "style_data": restyle_data, + "layout_data": relayout_data, + "style_traces": trace_indexes, + "trace_edit_id": trace_edit_id, + "layout_edit_id": layout_edit_id, + "source_view_id": source_view_id, + } + + # Send message + # ------------ + self._py2js_update = update_msg + self._py2js_update = None + + def _send_animate_msg( + self, styles_data, relayout_data, trace_indexes, animation_opts + ): + """ + Send Plotly.update message to the frontend + + Note: there is no source_view_id parameter because animations + triggered by the fontend are not currently supported + + Parameters + ---------- + styles_data : list[dict] + Plotly.animate styles data + relayout_data : dict + Plotly.animate relayout data + trace_indexes : list[int] + List of trace indexes that the animate operation applies to + """ + + # Validate / normalize inputs + # --------------------------- + trace_indexes = self._normalize_trace_indexes(trace_indexes) + + # Increment layout/trace edit message IDs + # --------------------------------------- + trace_edit_id = self._last_trace_edit_id + 1 + self._last_trace_edit_id = trace_edit_id + self._trace_edit_in_process = True + + layout_edit_id = self._last_layout_edit_id + 1 + self._last_layout_edit_id = layout_edit_id + self._layout_edit_in_process = True + + # Build message + # ------------- + animate_msg = { + "style_data": styles_data, + "layout_data": relayout_data, + "style_traces": trace_indexes, + "animation_opts": animation_opts, + "trace_edit_id": trace_edit_id, + "layout_edit_id": layout_edit_id, + "source_view_id": None, + } + + # Send message + # ------------ + self._py2js_animate = animate_msg + self._py2js_animate = None + + def _send_deleteTraces_msg(self, delete_inds): + """ + Send Plotly.deleteTraces message to the frontend + + Parameters + ---------- + delete_inds : list[int] + List of trace indexes of traces to delete + """ + + # Increment layout/trace edit message IDs + # --------------------------------------- + trace_edit_id = self._last_trace_edit_id + 1 + self._last_trace_edit_id = trace_edit_id + self._trace_edit_in_process = True + + layout_edit_id = self._last_layout_edit_id + 1 + self._last_layout_edit_id = layout_edit_id + self._layout_edit_in_process = True + + # Build message + # ------------- + delete_msg = { + "delete_inds": delete_inds, + "layout_edit_id": layout_edit_id, + "trace_edit_id": trace_edit_id, + } + + # Send message + # ------------ + self._py2js_deleteTraces = delete_msg + self._py2js_deleteTraces = None + + # JavaScript -> Python Messages + # ----------------------------- + @observe("_js2py_traceDeltas") + def _handler_js2py_traceDeltas(self, change): + """ + Process trace deltas message from the frontend + """ + + # Receive message + # --------------- + msg_data = change["new"] + if not msg_data: + self._js2py_traceDeltas = None + return + + trace_deltas = msg_data["trace_deltas"] + trace_edit_id = msg_data["trace_edit_id"] + + # Apply deltas + # ------------ + # We only apply the deltas if this message corresponds to the most + # recent trace edit operation + if trace_edit_id == self._last_trace_edit_id: + # ### Loop over deltas ### + for delta in trace_deltas: + # #### Find existing trace for uid ### + trace_uid = delta["uid"] + trace_uids = [trace.uid for trace in self.data] + trace_index = trace_uids.index(trace_uid) + uid_trace = self.data[trace_index] + + # #### Transform defaults to delta #### + delta_transform = BaseFigureWidget._transform_data( + uid_trace._prop_defaults, delta + ) + + # #### Remove overlapping properties #### + # If a property is present in both _props and _prop_defaults + # then we remove the copy from _props + remove_props = self._remove_overlapping_props( + uid_trace._props, uid_trace._prop_defaults + ) + + # #### Notify frontend model of property removal #### + if remove_props: + remove_trace_props_msg = { + "remove_trace": trace_index, + "remove_props": remove_props, + } + self._py2js_removeTraceProps = remove_trace_props_msg + self._py2js_removeTraceProps = None + + # #### Dispatch change callbacks #### + self._dispatch_trace_change_callbacks(delta_transform, [trace_index]) + + # ### Trace edits no longer in process ### + self._trace_edit_in_process = False + + # ### Call any waiting trace edit callbacks ### + if not self._layout_edit_in_process: + while self._waiting_edit_callbacks: + self._waiting_edit_callbacks.pop()() + + self._js2py_traceDeltas = None + + @observe("_js2py_layoutDelta") + def _handler_js2py_layoutDelta(self, change): + """ + Process layout delta message from the frontend + """ + + # Receive message + # --------------- + msg_data = change["new"] + if not msg_data: + self._js2py_layoutDelta = None + return + + layout_delta = msg_data["layout_delta"] + layout_edit_id = msg_data["layout_edit_id"] + + # Apply delta + # ----------- + # We only apply the delta if this message corresponds to the most + # recent layout edit operation + if layout_edit_id == self._last_layout_edit_id: + # ### Transform defaults to delta ### + delta_transform = BaseFigureWidget._transform_data( + self._layout_defaults, layout_delta + ) + + # ### Remove overlapping properties ### + # If a property is present in both _layout and _layout_defaults + # then we remove the copy from _layout + removed_props = self._remove_overlapping_props( + self._widget_layout, self._layout_defaults + ) + + # ### Notify frontend model of property removal ### + if removed_props: + remove_props_msg = {"remove_props": removed_props} + + self._py2js_removeLayoutProps = remove_props_msg + self._py2js_removeLayoutProps = None + + # ### Create axis objects ### + # For example, when a SPLOM trace is created the layout defaults + # may include axes that weren't explicitly defined by the user. + for proppath in delta_transform: + prop = proppath[0] + match = self.layout._subplot_re_match(prop) + if match and prop not in self.layout: + # We need to create a subplotid object + self.layout[prop] = {} + + # ### Dispatch change callbacks ### + self._dispatch_layout_change_callbacks(delta_transform) + + # ### Layout edits no longer in process ### + self._layout_edit_in_process = False + + # ### Call any waiting layout edit callbacks ### + if not self._trace_edit_in_process: + while self._waiting_edit_callbacks: + self._waiting_edit_callbacks.pop()() + + self._js2py_layoutDelta = None + + @observe("_js2py_restyle") + def _handler_js2py_restyle(self, change): + """ + Process Plotly.restyle message from the frontend + """ + + # Receive message + # --------------- + restyle_msg = change["new"] + + if not restyle_msg: + self._js2py_restyle = None + return + + style_data = restyle_msg["style_data"] + style_traces = restyle_msg["style_traces"] + source_view_id = restyle_msg["source_view_id"] + + # Perform restyle + # --------------- + self.plotly_restyle( + restyle_data=style_data, + trace_indexes=style_traces, + source_view_id=source_view_id, + ) + + self._js2py_restyle = None + + @observe("_js2py_update") + def _handler_js2py_update(self, change): + """ + Process Plotly.update message from the frontend + """ + + # Receive message + # --------------- + update_msg = change["new"] + + if not update_msg: + self._js2py_update = None + return + + style = update_msg["style_data"] + trace_indexes = update_msg["style_traces"] + layout = update_msg["layout_data"] + source_view_id = update_msg["source_view_id"] + + # Perform update + # -------------- + self.plotly_update( + restyle_data=style, + relayout_data=layout, + trace_indexes=trace_indexes, + source_view_id=source_view_id, + ) + + self._js2py_update = None + + @observe("_js2py_relayout") + def _handler_js2py_relayout(self, change): + """ + Process Plotly.relayout message from the frontend + """ + + # Receive message + # --------------- + relayout_msg = change["new"] + + if not relayout_msg: + self._js2py_relayout = None + return + + relayout_data = relayout_msg["relayout_data"] + source_view_id = relayout_msg["source_view_id"] + + if "lastInputTime" in relayout_data: + # Remove 'lastInputTime'. Seems to be an internal plotly + # property that is introduced for some plot types, but it is not + # actually a property in the schema + relayout_data.pop("lastInputTime") + + # Perform relayout + # ---------------- + self.plotly_relayout(relayout_data=relayout_data, source_view_id=source_view_id) + + self._js2py_relayout = None + + @observe("_js2py_pointsCallback") + def _handler_js2py_pointsCallback(self, change): + """ + Process points callback message from the frontend + """ + + # Receive message + # --------------- + callback_data = change["new"] + + if not callback_data: + self._js2py_pointsCallback = None + return + + # Get event type + # -------------- + event_type = callback_data["event_type"] + + # Build Selector Object + # --------------------- + if callback_data.get("selector", None): + selector_data = callback_data["selector"] + selector_type = selector_data["type"] + selector_state = selector_data["selector_state"] + if selector_type == "box": + selector = BoxSelector(**selector_state) + elif selector_type == "lasso": + selector = LassoSelector(**selector_state) + else: + raise ValueError("Unsupported selector type: %s" % selector_type) + else: + selector = None + + # Build Input Device State Object + # ------------------------------- + if callback_data.get("device_state", None): + device_state_data = callback_data["device_state"] + state = InputDeviceState(**device_state_data) + else: + state = None + + # Build Trace Points Dictionary + # ----------------------------- + points_data = callback_data["points"] + trace_points = { + trace_ind: { + "point_inds": [], + "xs": [], + "ys": [], + "trace_name": self._data_objs[trace_ind].name, + "trace_index": trace_ind, + } + for trace_ind in range(len(self._data_objs)) + } + + for x, y, point_ind, trace_ind in zip( + points_data["xs"], + points_data["ys"], + points_data["point_indexes"], + points_data["trace_indexes"], + ): + trace_dict = trace_points[trace_ind] + trace_dict["xs"].append(x) + trace_dict["ys"].append(y) + trace_dict["point_inds"].append(point_ind) + + # Dispatch callbacks + # ------------------ + for trace_ind, trace_points_data in trace_points.items(): + points = Points(**trace_points_data) + trace = self.data[trace_ind] + + if event_type == "plotly_click": + trace._dispatch_on_click(points, state) + elif event_type == "plotly_hover": + trace._dispatch_on_hover(points, state) + elif event_type == "plotly_unhover": + trace._dispatch_on_unhover(points, state) + elif event_type == "plotly_selected": + trace._dispatch_on_selection(points, selector) + elif event_type == "plotly_deselect": + trace._dispatch_on_deselect(points) + + self._js2py_pointsCallback = None + + # Display + # ------- + def _repr_html_(self): + """ + Customize html representation + """ + raise NotImplementedError # Prefer _repr_mimebundle_ + + def _repr_mimebundle_(self, include=None, exclude=None, validate=True, **kwargs): + """ + Return mimebundle corresponding to default renderer. + """ + display_jupyter_version_warnings() + + # Widget layout and data need to be set here in case there are + # changes made to the figure after the widget is created but before + # the cell is run. + self._widget_layout = deepcopy(self._layout_obj._props) + self._widget_data = deepcopy(self._data) + return { + "application/vnd.jupyter.widget-view+json": { + "version_major": 2, + "version_minor": 0, + "model_id": self._model_id, + }, + } + + def _ipython_display_(self): + """ + Handle rich display of figures in ipython contexts + """ + raise NotImplementedError # Prefer _repr_mimebundle_ + + # Callbacks + # --------- + def on_edits_completed(self, fn): + """ + Register a function to be called after all pending trace and layout + edit operations have completed + + If there are no pending edit operations then function is called + immediately + + Parameters + ---------- + fn : callable + Function of zero arguments to be called when all pending edit + operations have completed + """ + if self._layout_edit_in_process or self._trace_edit_in_process: + self._waiting_edit_callbacks.append(fn) + else: + fn() + + # Validate No Frames + # ------------------ + @property + def frames(self): + # Note: This property getter is identical to that of the superclass, + # but it must be included here because we're overriding the setter + # below. + return self._frame_objs + + @frames.setter + def frames(self, new_frames): + if new_frames: + BaseFigureWidget._display_frames_error() + + @staticmethod + def _display_frames_error(): + """ + Display an informative error when user attempts to set frames on a + FigureWidget + + Raises + ------ + ValueError + always + """ + msg = """ +Frames are not supported by the plotly.graph_objs.FigureWidget class. +Note: Frames are supported by the plotly.graph_objs.Figure class""" + raise ValueError(msg) + + # Static Helpers + # -------------- + @staticmethod + def _remove_overlapping_props(input_data, delta_data, prop_path=()): + """ + Remove properties in input_data that are also in delta_data, and do so + recursively. + + Exception: Never remove 'uid' from input_data, this property is used + to align traces + + Parameters + ---------- + input_data : dict|list + delta_data : dict|list + + Returns + ------- + list[tuple[str|int]] + List of removed property path tuples + """ + + # Initialize removed + # ------------------ + # This is the list of path tuples to the properties that were + # removed from input_data + removed = [] + + # Handle dict + # ----------- + if isinstance(input_data, dict): + assert isinstance(delta_data, dict) + + for p, delta_val in delta_data.items(): + if isinstance(delta_val, dict) or BaseFigure._is_dict_list(delta_val): + if p in input_data: + # ### Recurse ### + input_val = input_data[p] + recur_prop_path = prop_path + (p,) + recur_removed = BaseFigureWidget._remove_overlapping_props( + input_val, delta_val, recur_prop_path + ) + removed.extend(recur_removed) + + # Check whether the last property in input_val + # has been removed. If so, remove it entirely + if not input_val: + input_data.pop(p) + removed.append(recur_prop_path) + + elif p in input_data and p != "uid": + # ### Remove property ### + input_data.pop(p) + removed.append(prop_path + (p,)) + + # Handle list + # ----------- + elif isinstance(input_data, list): + assert isinstance(delta_data, list) + + for i, delta_val in enumerate(delta_data): + if i >= len(input_data): + break + + input_val = input_data[i] + if ( + input_val is not None + and isinstance(delta_val, dict) + or BaseFigure._is_dict_list(delta_val) + ): + # ### Recurse ### + recur_prop_path = prop_path + (i,) + recur_removed = BaseFigureWidget._remove_overlapping_props( + input_val, delta_val, recur_prop_path + ) + + removed.extend(recur_removed) + + return removed + + @staticmethod + def _transform_data(to_data, from_data, should_remove=True, relayout_path=()): + """ + Transform to_data into from_data and return relayout-style + description of the transformation + + Parameters + ---------- + to_data : dict|list + from_data : dict|list + + Returns + ------- + dict + relayout-style description of the transformation + """ + + # Initialize relayout data + # ------------------------ + relayout_data = {} + + # Handle dict + # ----------- + if isinstance(to_data, dict): + # ### Validate from_data ### + if not isinstance(from_data, dict): + raise ValueError( + "Mismatched data types: {to_dict} {from_data}".format( + to_dict=to_data, from_data=from_data + ) + ) + + # ### Add/modify properties ### + # Loop over props/vals + for from_prop, from_val in from_data.items(): + # #### Handle compound vals recursively #### + if isinstance(from_val, dict) or BaseFigure._is_dict_list(from_val): + # ##### Init property value if needed ##### + if from_prop not in to_data: + to_data[from_prop] = {} if isinstance(from_val, dict) else [] + + # ##### Transform property val recursively ##### + input_val = to_data[from_prop] + relayout_data.update( + BaseFigureWidget._transform_data( + input_val, + from_val, + should_remove=should_remove, + relayout_path=relayout_path + (from_prop,), + ) + ) + + # #### Handle simple vals directly #### + else: + if from_prop not in to_data or not BasePlotlyType._vals_equal( + to_data[from_prop], from_val + ): + to_data[from_prop] = from_val + relayout_path_prop = relayout_path + (from_prop,) + relayout_data[relayout_path_prop] = from_val + + # ### Remove properties ### + if should_remove: + for remove_prop in set(to_data.keys()).difference( + set(from_data.keys()) + ): + to_data.pop(remove_prop) + + # Handle list + # ----------- + elif isinstance(to_data, list): + # ### Validate from_data ### + if not isinstance(from_data, list): + raise ValueError( + "Mismatched data types: to_data: {to_data} {from_data}".format( + to_data=to_data, from_data=from_data + ) + ) + + # ### Add/modify properties ### + # Loop over indexes / elements + for i, from_val in enumerate(from_data): + # #### Initialize element if needed #### + if i >= len(to_data): + to_data.append(None) + input_val = to_data[i] + + # #### Handle compound element recursively #### + if input_val is not None and ( + isinstance(from_val, dict) or BaseFigure._is_dict_list(from_val) + ): + relayout_data.update( + BaseFigureWidget._transform_data( + input_val, + from_val, + should_remove=should_remove, + relayout_path=relayout_path + (i,), + ) + ) + + # #### Handle simple elements directly #### + else: + if not BasePlotlyType._vals_equal(to_data[i], from_val): + to_data[i] = from_val + relayout_data[relayout_path + (i,)] = from_val + + return relayout_data diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/callbacks.py b/.venv_haddock/lib/python3.12/site-packages/plotly/callbacks.py new file mode 100644 index 0000000000000000000000000000000000000000..4e2f9e919590eba0770d6ab61fa27b24542ba332 --- /dev/null +++ b/.venv_haddock/lib/python3.12/site-packages/plotly/callbacks.py @@ -0,0 +1,294 @@ +from plotly.utils import _list_repr_elided + + +class InputDeviceState: + def __init__( + self, ctrl=None, alt=None, shift=None, meta=None, button=None, buttons=None, **_ + ): + self._ctrl = ctrl + self._alt = alt + self._meta = meta + self._shift = shift + self._button = button + self._buttons = buttons + + def __repr__(self): + return """\ +InputDeviceState( + ctrl={ctrl}, + alt={alt}, + shift={shift}, + meta={meta}, + button={button}, + buttons={buttons})""".format( + ctrl=repr(self.ctrl), + alt=repr(self.alt), + meta=repr(self.meta), + shift=repr(self.shift), + button=repr(self.button), + buttons=repr(self.buttons), + ) + + @property + def alt(self): + """ + Whether alt key pressed + + Returns + ------- + bool + """ + return self._alt + + @property + def ctrl(self): + """ + Whether ctrl key pressed + + Returns + ------- + bool + """ + return self._ctrl + + @property + def shift(self): + """ + Whether shift key pressed + + Returns + ------- + bool + """ + return self._shift + + @property + def meta(self): + """ + Whether meta key pressed + + Returns + ------- + bool + """ + return self._meta + + @property + def button(self): + """ + Integer code for the button that was pressed on the mouse to trigger + the event + + - 0: Main button pressed, usually the left button or the + un-initialized state + - 1: Auxiliary button pressed, usually the wheel button or the middle + button (if present) + - 2: Secondary button pressed, usually the right button + - 3: Fourth button, typically the Browser Back button + - 4: Fifth button, typically the Browser Forward button + + Returns + ------- + int + """ + return self._button + + @property + def buttons(self): + """ + Integer code for which combination of buttons are pressed on the + mouse when the event is triggered. + + - 0: No button or un-initialized + - 1: Primary button (usually left) + - 2: Secondary button (usually right) + - 4: Auxilary button (usually middle or mouse wheel button) + - 8: 4th button (typically the "Browser Back" button) + - 16: 5th button (typically the "Browser Forward" button) + + Combinations of buttons are represented as the decimal form of the + bitmask of the values above. + + For example, pressing both the primary (1) and auxilary (4) buttons + will result in a code of 5 + + Returns + ------- + int + """ + return self._buttons + + +class Points: + def __init__(self, point_inds=[], xs=[], ys=[], trace_name=None, trace_index=None): + self._point_inds = point_inds + self._xs = xs + self._ys = ys + self._trace_name = trace_name + self._trace_index = trace_index + + def __repr__(self): + return """\ +Points(point_inds={point_inds}, + xs={xs}, + ys={ys}, + trace_name={trace_name}, + trace_index={trace_index})""".format( + point_inds=_list_repr_elided( + self.point_inds, indent=len("Points(point_inds=") + ), + xs=_list_repr_elided(self.xs, indent=len(" xs=")), + ys=_list_repr_elided(self.ys, indent=len(" ys=")), + trace_name=repr(self.trace_name), + trace_index=repr(self.trace_index), + ) + + @property + def point_inds(self): + """ + List of selected indexes into the trace's points + + Returns + ------- + list[int] + """ + return self._point_inds + + @property + def xs(self): + """ + List of x-coordinates of selected points + + Returns + ------- + list[float] + """ + return self._xs + + @property + def ys(self): + """ + List of y-coordinates of selected points + + Returns + ------- + list[float] + """ + return self._ys + + @property + def trace_name(self): + """ + Name of the trace + + Returns + ------- + str + """ + return self._trace_name + + @property + def trace_index(self): + """ + Index of the trace in the figure + + Returns + ------- + int + """ + return self._trace_index + + +class BoxSelector: + def __init__(self, xrange=None, yrange=None, **_): + self._type = "box" + self._xrange = xrange + self._yrange = yrange + + def __repr__(self): + return """\ +BoxSelector(xrange={xrange}, + yrange={yrange})""".format(xrange=self.xrange, yrange=self.yrange) + + @property + def type(self): + """ + The selector's type + + Returns + ------- + str + """ + return self._type + + @property + def xrange(self): + """ + x-axis range extents of the box selection + + Returns + ------- + (float, float) + """ + return self._xrange + + @property + def yrange(self): + """ + y-axis range extents of the box selection + + Returns + ------- + (float, float) + """ + return self._yrange + + +class LassoSelector: + def __init__(self, xs=None, ys=None, **_): + self._type = "lasso" + self._xs = xs + self._ys = ys + + def __repr__(self): + return """\ +LassoSelector(xs={xs}, + ys={ys})""".format( + xs=_list_repr_elided(self.xs, indent=len("LassoSelector(xs=")), + ys=_list_repr_elided(self.ys, indent=len(" ys=")), + ) + + @property + def type(self): + """ + The selector's type + + Returns + ------- + str + """ + return self._type + + @property + def xs(self): + """ + list of x-axis coordinates of each point in the lasso selection + boundary + + Returns + ------- + list[float] + """ + return self._xs + + @property + def ys(self): + """ + list of y-axis coordinates of each point in the lasso selection + boundary + + Returns + ------- + list[float] + """ + return self._ys diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/colors/.___init__.py b/.venv_haddock/lib/python3.12/site-packages/plotly/colors/.___init__.py new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/colors/.___init__.py differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/colors/.___pycache__ b/.venv_haddock/lib/python3.12/site-packages/plotly/colors/.___pycache__ new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/colors/.___pycache__ differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/colors/__init__.py b/.venv_haddock/lib/python3.12/site-packages/plotly/colors/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..3a58bfe8d71781d198493260ab08289750e9fa41 --- /dev/null +++ b/.venv_haddock/lib/python3.12/site-packages/plotly/colors/__init__.py @@ -0,0 +1,51 @@ +# ruff: noqa: F405 + +"""For a list of colors available in `plotly.colors`, please see + +* the `tutorial on discrete color sequences `_ +* the `list of built-in continuous color scales `_ +* the `tutorial on continuous colors `_ + +Color scales and sequences are available within the following namespaces + +* cyclical +* diverging +* qualitative +* sequential +""" + +from _plotly_utils.colors import * # noqa: F403 + +__all__ = [ + "named_colorscales", + "cyclical", + "diverging", + "sequential", + "qualitative", + "colorbrewer", + "carto", + "cmocean", + "color_parser", + "colorscale_to_colors", + "colorscale_to_scale", + "convert_colors_to_same_type", + "convert_colorscale_to_rgb", + "convert_dict_colors_to_same_type", + "convert_to_RGB_255", + "find_intermediate_color", + "hex_to_rgb", + "label_rgb", + "make_colorscale", + "n_colors", + "sample_colorscale", + "unconvert_from_RGB_255", + "unlabel_rgb", + "validate_colors", + "validate_colors_dict", + "validate_colorscale", + "validate_scale_values", + "plotlyjs", + "DEFAULT_PLOTLY_COLORS", + "PLOTLY_SCALES", + "get_colorscale", +] diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/conftest.py b/.venv_haddock/lib/python3.12/site-packages/plotly/conftest.py new file mode 100644 index 0000000000000000000000000000000000000000..1e1361dd518d4c4c3a74cc91e160fc00e5184440 --- /dev/null +++ b/.venv_haddock/lib/python3.12/site-packages/plotly/conftest.py @@ -0,0 +1,24 @@ +import os + + +def pytest_ignore_collect(path): + # Ignored files, most of them are raising a chart studio error + ignored_paths = [ + "exploding_module.py", + "chunked_requests.py", + "v2.py", + "v1.py", + "presentation_objs.py", + "widgets.py", + "dashboard_objs.py", + "grid_objs.py", + "config.py", + "presentation_objs.py", + "session.py", + ] + if ( + os.path.basename(str(path)) in ignored_paths + or "plotly/plotly/plotly/__init__.py" in str(path) + or "plotly/api/utils.py" in str(path) + ): + return True diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/data/.___init__.py b/.venv_haddock/lib/python3.12/site-packages/plotly/data/.___init__.py new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/data/.___init__.py differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/data/.___pycache__ b/.venv_haddock/lib/python3.12/site-packages/plotly/data/.___pycache__ new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/data/.___pycache__ differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/data/__init__.py b/.venv_haddock/lib/python3.12/site-packages/plotly/data/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..3bba38974b93cda0e29f16a78e1a7af4888d59bc --- /dev/null +++ b/.venv_haddock/lib/python3.12/site-packages/plotly/data/__init__.py @@ -0,0 +1,430 @@ +""" +Built-in datasets for demonstration, educational and test purposes. +""" + +import os +from importlib import import_module + +import narwhals.stable.v1 as nw + +AVAILABLE_BACKENDS = {"pandas", "polars", "pyarrow", "modin", "cudf"} +BACKENDS_WITH_INDEX_SUPPORT = {"pandas", "modin", "cudf"} + + +def gapminder( + datetimes=False, + centroids=False, + year=None, + pretty_names=False, + return_type="pandas", +): + """ + Each row represents a country on a given year. + + https://www.gapminder.org/data/ + + Parameters + ---------- + datetimes: bool + Whether or not 'year' column will converted to datetime type + + centroids: bool + If True, ['centroid_lat', 'centroid_lon'] columns are added + + year: int | None + If provided, the dataset will be filtered for that year + + pretty_names: bool + If True, prettifies the column names + + return_type: {'pandas', 'polars', 'pyarrow', 'modin', 'cudf'} + Type of the resulting dataframe + + Returns + ------- + Dataframe of `return_type` type + Dataframe with 1704 rows and the following columns: + `['country', 'continent', 'year', 'lifeExp', 'pop', 'gdpPercap', + 'iso_alpha', 'iso_num']`. + + If `datetimes` is True, the 'year' column will be a datetime column + If `centroids` is True, two new columns are added: ['centroid_lat', 'centroid_lon'] + If `year` is an integer, the dataset will be filtered for that year + """ + df = nw.from_native( + _get_dataset("gapminder", return_type=return_type), eager_only=True + ) + if year: + df = df.filter(nw.col("year") == year) + if datetimes: + df = df.with_columns( + # Concatenate the year value with the literal "-01-01" so that it can be + # casted to datetime from "%Y-%m-%d" format + nw.concat_str( + [nw.col("year").cast(nw.String()), nw.lit("-01-01")] + ).str.to_datetime(format="%Y-%m-%d") + ) + if not centroids: + df = df.drop("centroid_lat", "centroid_lon") + if pretty_names: + df = df.rename( + dict( + country="Country", + continent="Continent", + year="Year", + lifeExp="Life Expectancy", + gdpPercap="GDP per Capita", + pop="Population", + iso_alpha="ISO Alpha Country Code", + iso_num="ISO Numeric Country Code", + centroid_lat="Centroid Latitude", + centroid_lon="Centroid Longitude", + ) + ) + return df.to_native() + + +def tips(pretty_names=False, return_type="pandas"): + """ + Each row represents a restaurant bill. + + https://vincentarelbundock.github.io/Rdatasets/doc/reshape2/tips.html + + Parameters + ---------- + pretty_names: bool + If True, prettifies the column names + + return_type: {'pandas', 'polars', 'pyarrow', 'modin', 'cudf'} + Type of the resulting dataframe + + Returns + ------- + Dataframe of `return_type` type + Dataframe with 244 rows and the following columns: + `['total_bill', 'tip', 'sex', 'smoker', 'day', 'time', 'size']`. + """ + + df = nw.from_native(_get_dataset("tips", return_type=return_type), eager_only=True) + if pretty_names: + df = df.rename( + dict( + total_bill="Total Bill", + tip="Tip", + sex="Payer Gender", + smoker="Smokers at Table", + day="Day of Week", + time="Meal", + size="Party Size", + ) + ) + return df.to_native() + + +def iris(return_type="pandas"): + """ + Each row represents a flower. + + https://en.wikipedia.org/wiki/Iris_flower_data_set + + Parameters + ---------- + return_type: {'pandas', 'polars', 'pyarrow', 'modin', 'cudf'} + Type of the resulting dataframe + + Returns + ------- + Dataframe of `return_type` type + Dataframe with 150 rows and the following columns: + `['sepal_length', 'sepal_width', 'petal_length', 'petal_width', 'species', 'species_id']`. + """ + return _get_dataset("iris", return_type=return_type) + + +def wind(return_type="pandas"): + """ + Each row represents a level of wind intensity in a cardinal direction, and its frequency. + + Parameters + ---------- + return_type: {'pandas', 'polars', 'pyarrow', 'modin', 'cudf'} + Type of the resulting dataframe + + Returns + ------- + Dataframe of `return_type` type + Dataframe with 128 rows and the following columns: + `['direction', 'strength', 'frequency']`. + """ + return _get_dataset("wind", return_type=return_type) + + +def election(return_type="pandas"): + """ + Each row represents voting results for an electoral district in the 2013 Montreal + mayoral election. + + Parameters + ---------- + return_type: {'pandas', 'polars', 'pyarrow', 'modin', 'cudf'} + Type of the resulting dataframe + + Returns + ------- + Dataframe of `return_type` type + Dataframe with 58 rows and the following columns: + `['district', 'Coderre', 'Bergeron', 'Joly', 'total', 'winner', 'result', 'district_id']`. + """ + return _get_dataset("election", return_type=return_type) + + +def election_geojson(): + """ + Each feature represents an electoral district in the 2013 Montreal mayoral election. + + Returns + ------- + A GeoJSON-formatted `dict` with 58 polygon or multi-polygon features whose `id` + is an electoral district numerical ID and whose `district` property is the ID and + district name. + """ + import gzip + import json + import os + + path = os.path.join( + os.path.dirname(os.path.dirname(__file__)), + "package_data", + "datasets", + "election.geojson.gz", + ) + with gzip.GzipFile(path, "r") as f: + result = json.loads(f.read().decode("utf-8")) + return result + + +def carshare(return_type="pandas"): + """ + Each row represents the availability of car-sharing services near the centroid of a zone + in Montreal over a month-long period. + + Parameters + ---------- + return_type: {'pandas', 'polars', 'pyarrow', 'modin', 'cudf'} + Type of the resulting dataframe + + Returns + ------- + Dataframe of `return_type` type + Dataframe` with 249 rows and the following columns: + `['centroid_lat', 'centroid_lon', 'car_hours', 'peak_hour']`. + """ + return _get_dataset("carshare", return_type=return_type) + + +def stocks(indexed=False, datetimes=False, return_type="pandas"): + """ + Each row in this wide dataset represents closing prices from 6 tech stocks in 2018/2019. + + Parameters + ---------- + indexed: bool + Whether or not the 'date' column is used as the index and the column index + is named 'company'. Applicable only if `return_type='pandas'` + + datetimes: bool + Whether or not the 'date' column will be of datetime type + + return_type: {'pandas', 'polars', 'pyarrow', 'modin', 'cudf'} + Type of the resulting dataframe + + Returns + ------- + Dataframe of `return_type` type + Dataframe with 100 rows and the following columns: + `['date', 'GOOG', 'AAPL', 'AMZN', 'FB', 'NFLX', 'MSFT']`. + If `indexed` is True, the 'date' column is used as the index and the column index + is named 'company' + If `datetimes` is True, the 'date' column will be a datetime column + """ + if indexed and return_type not in BACKENDS_WITH_INDEX_SUPPORT: + msg = f"Backend '{return_type}' does not support setting index" + raise NotImplementedError(msg) + + df = nw.from_native( + _get_dataset("stocks", return_type=return_type), eager_only=True + ).with_columns(nw.col("date").cast(nw.String())) + + if datetimes: + df = df.with_columns(nw.col("date").str.to_datetime()) + + if indexed: # then it must be pandas + df = df.to_native().set_index("date") + df.columns.name = "company" + return df + + return df.to_native() + + +def experiment(indexed=False, return_type="pandas"): + """ + Each row in this wide dataset represents the results of 100 simulated participants + on three hypothetical experiments, along with their gender and control/treatment group. + + Parameters + ---------- + indexed: bool + If True, then the index is named "participant". + Applicable only if `return_type='pandas'` + + return_type: {'pandas', 'polars', 'pyarrow', 'modin', 'cudf'} + Type of the resulting dataframe + + Returns + ------- + Dataframe of `return_type` type + Dataframe with 100 rows and the following columns: + `['experiment_1', 'experiment_2', 'experiment_3', 'gender', 'group']`. + If `indexed` is True, the data frame index is named "participant" + """ + + if indexed and return_type not in BACKENDS_WITH_INDEX_SUPPORT: + msg = f"Backend '{return_type}' does not support setting index" + raise NotImplementedError(msg) + + df = nw.from_native( + _get_dataset("experiment", return_type=return_type), eager_only=True + ) + if indexed: # then it must be pandas + df = df.to_native() + df.index.name = "participant" + return df + return df.to_native() + + +def medals_wide(indexed=False, return_type="pandas"): + """ + This dataset represents the medal table for Olympic Short Track Speed Skating for the + top three nations as of 2020. + + Parameters + ---------- + indexed: bool + Whether or not the 'nation' column is used as the index and the column index + is named 'medal'. Applicable only if `return_type='pandas'` + + return_type: {'pandas', 'polars', 'pyarrow', 'modin', 'cudf'} + Type of the resulting dataframe + + Returns + ------- + Dataframe of `return_type` type + Dataframe with 3 rows and the following columns: + `['nation', 'gold', 'silver', 'bronze']`. + If `indexed` is True, the 'nation' column is used as the index and the column index + is named 'medal' + """ + + if indexed and return_type not in BACKENDS_WITH_INDEX_SUPPORT: + msg = f"Backend '{return_type}' does not support setting index" + raise NotImplementedError(msg) + + df = nw.from_native( + _get_dataset("medals", return_type=return_type), eager_only=True + ) + if indexed: # then it must be pandas + df = df.to_native().set_index("nation") + df.columns.name = "medal" + return df + return df.to_native() + + +def medals_long(indexed=False, return_type="pandas"): + """ + This dataset represents the medal table for Olympic Short Track Speed Skating for the + top three nations as of 2020. + + Parameters + ---------- + indexed: bool + Whether or not the 'nation' column is used as the index. + Applicable only if `return_type='pandas'` + + return_type: {'pandas', 'polars', 'pyarrow', 'modin', 'cudf'} + Type of the resulting dataframe + + Returns + ------- + Dataframe of `return_type` type + Dataframe with 9 rows and the following columns: `['nation', 'medal', 'count']`. + If `indexed` is True, the 'nation' column is used as the index. + """ + + if indexed and return_type not in BACKENDS_WITH_INDEX_SUPPORT: + msg = f"Backend '{return_type}' does not support setting index" + raise NotImplementedError(msg) + + df = nw.from_native( + _get_dataset("medals", return_type=return_type), eager_only=True + ).unpivot( + index=["nation"], + value_name="count", + variable_name="medal", + ) + if indexed: + df = nw.maybe_set_index(df, "nation") + return df.to_native() + + +def _get_dataset(d, return_type): + """ + Loads the dataset using the specified backend. + + Notice that the available backends are 'pandas', 'polars', 'pyarrow' and they all have + a `read_csv` function (pyarrow has it via pyarrow.csv). Therefore we can dynamically + load the library using `importlib.import_module` and then call + `backend.read_csv(filepath)`. + + Parameters + ---------- + d: str + Name of the dataset to load. + + return_type: {'pandas', 'polars', 'pyarrow', 'modin', 'cudf'} + Type of the resulting dataframe + + Returns + ------- + Dataframe of `return_type` type + """ + filepath = os.path.join( + os.path.dirname(os.path.dirname(__file__)), + "package_data", + "datasets", + d + ".csv.gz", + ) + + if return_type not in AVAILABLE_BACKENDS: + msg = ( + f"Unsupported return_type. Found {return_type}, expected one " + f"of {AVAILABLE_BACKENDS}" + ) + raise NotImplementedError(msg) + + try: + if return_type == "pyarrow": + module_to_load = "pyarrow.csv" + elif return_type == "modin": + module_to_load = "modin.pandas" + else: + module_to_load = return_type + backend = import_module(module_to_load) + except ModuleNotFoundError: + msg = f"return_type={return_type}, but {return_type} is not installed" + raise ModuleNotFoundError(msg) + + try: + return backend.read_csv(filepath) + except Exception as e: + msg = f"Unable to read '{d}' dataset due to: {e}" + raise Exception(msg).with_traceback(e.__traceback__) diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/exceptions.py b/.venv_haddock/lib/python3.12/site-packages/plotly/exceptions.py new file mode 100644 index 0000000000000000000000000000000000000000..6faa7d996071e6dd2cc0c147061c6ce67621e837 --- /dev/null +++ b/.venv_haddock/lib/python3.12/site-packages/plotly/exceptions.py @@ -0,0 +1 @@ +from _plotly_utils.exceptions import PlotlyError # noqa: F401 diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/express/.___init__.py b/.venv_haddock/lib/python3.12/site-packages/plotly/express/.___init__.py new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/express/.___init__.py differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/express/.___pycache__ b/.venv_haddock/lib/python3.12/site-packages/plotly/express/.___pycache__ new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/express/.___pycache__ differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/express/.__chart_types.py b/.venv_haddock/lib/python3.12/site-packages/plotly/express/.__chart_types.py new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/express/.__chart_types.py differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/express/.__core.py b/.venv_haddock/lib/python3.12/site-packages/plotly/express/.__core.py new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/express/.__core.py differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/express/.__doc.py b/.venv_haddock/lib/python3.12/site-packages/plotly/express/.__doc.py new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/express/.__doc.py differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/express/.__imshow.py b/.venv_haddock/lib/python3.12/site-packages/plotly/express/.__imshow.py new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/express/.__imshow.py differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/express/.__special_inputs.py b/.venv_haddock/lib/python3.12/site-packages/plotly/express/.__special_inputs.py new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/express/.__special_inputs.py differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/express/._colors b/.venv_haddock/lib/python3.12/site-packages/plotly/express/._colors new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/express/._colors differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/express/._data b/.venv_haddock/lib/python3.12/site-packages/plotly/express/._data new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/express/._data differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/express/._imshow_utils.py b/.venv_haddock/lib/python3.12/site-packages/plotly/express/._imshow_utils.py new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/express/._imshow_utils.py differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/express/._trendline_functions b/.venv_haddock/lib/python3.12/site-packages/plotly/express/._trendline_functions new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/express/._trendline_functions differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/express/__init__.py b/.venv_haddock/lib/python3.12/site-packages/plotly/express/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..62a9bca08a27c8d465b176c77bfb264500e49e3b --- /dev/null +++ b/.venv_haddock/lib/python3.12/site-packages/plotly/express/__init__.py @@ -0,0 +1,132 @@ +# ruff: noqa: E402 + +""" +`plotly.express` is a terse, consistent, high-level wrapper around `plotly.graph_objects` +for rapid data exploration and figure generation. Learn more at https://plotly.com/python/plotly-express/ +""" + +from plotly import optional_imports + +np = optional_imports.get_module("numpy") +if np is None: + raise ImportError( + """\ +Plotly Express requires numpy to be installed. You can install numpy using pip with: + +$ pip install numpy + +Or install Plotly Express and its dependencies directly with: + +$ pip install "plotly[express]" + +You can also use Plotly Graph Objects to create a large number of charts without installing +numpy. See examples here: https://plotly.com/python/graph-objects/ +""" + ) + +from ._imshow import imshow +from ._chart_types import ( # noqa: F401 + scatter, + scatter_3d, + scatter_polar, + scatter_ternary, + scatter_map, + scatter_mapbox, + scatter_geo, + line, + line_3d, + line_polar, + line_ternary, + line_map, + line_mapbox, + line_geo, + area, + bar, + timeline, + bar_polar, + violin, + box, + strip, + histogram, + ecdf, + scatter_matrix, + parallel_coordinates, + parallel_categories, + choropleth, + density_contour, + density_heatmap, + pie, + sunburst, + treemap, + icicle, + funnel, + funnel_area, + choropleth_map, + choropleth_mapbox, + density_map, + density_mapbox, +) + + +from ._core import ( # noqa: F401 + set_mapbox_access_token, + defaults, + get_trendline_results, + NO_COLOR, +) + +from ._special_inputs import IdentityMap, Constant, Range # noqa: F401 + +from . import data, colors, trendline_functions # noqa: F401 + +__all__ = [ + "scatter", + "scatter_3d", + "scatter_polar", + "scatter_ternary", + "scatter_map", + "scatter_mapbox", + "scatter_geo", + "scatter_matrix", + "density_contour", + "density_heatmap", + "density_map", + "density_mapbox", + "line", + "line_3d", + "line_polar", + "line_ternary", + "line_map", + "line_mapbox", + "line_geo", + "parallel_coordinates", + "parallel_categories", + "area", + "bar", + "timeline", + "bar_polar", + "violin", + "box", + "strip", + "histogram", + "ecdf", + "choropleth", + "choropleth_map", + "choropleth_mapbox", + "pie", + "sunburst", + "treemap", + "icicle", + "funnel", + "funnel_area", + "imshow", + "data", + "colors", + "trendline_functions", + "set_mapbox_access_token", + "get_trendline_results", + "IdentityMap", + "Constant", + "Range", + "NO_COLOR", +] diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/express/_chart_types.py b/.venv_haddock/lib/python3.12/site-packages/plotly/express/_chart_types.py new file mode 100644 index 0000000000000000000000000000000000000000..2b4b10184e89b350b0abfb0f2a87ecdb7b100120 --- /dev/null +++ b/.venv_haddock/lib/python3.12/site-packages/plotly/express/_chart_types.py @@ -0,0 +1,1970 @@ +from warnings import warn + +from ._core import make_figure +from ._doc import make_docstring +import plotly.graph_objs as go + +_wide_mode_xy_append = [ + "Either `x` or `y` can optionally be a list of column references or array_likes, ", + "in which case the data will be treated as if it were 'wide' rather than 'long'.", +] +_cartesian_append_dict = dict(x=_wide_mode_xy_append, y=_wide_mode_xy_append) + + +def scatter( + data_frame=None, + x=None, + y=None, + color=None, + symbol=None, + size=None, + hover_name=None, + hover_data=None, + custom_data=None, + text=None, + facet_row=None, + facet_col=None, + facet_col_wrap=0, + facet_row_spacing=None, + facet_col_spacing=None, + error_x=None, + error_x_minus=None, + error_y=None, + error_y_minus=None, + animation_frame=None, + animation_group=None, + category_orders=None, + labels=None, + orientation=None, + color_discrete_sequence=None, + color_discrete_map=None, + color_continuous_scale=None, + range_color=None, + color_continuous_midpoint=None, + symbol_sequence=None, + symbol_map=None, + opacity=None, + size_max=None, + marginal_x=None, + marginal_y=None, + trendline=None, + trendline_options=None, + trendline_color_override=None, + trendline_scope="trace", + log_x=False, + log_y=False, + range_x=None, + range_y=None, + render_mode="auto", + title=None, + subtitle=None, + template=None, + width=None, + height=None, +) -> go.Figure: + """ + In a scatter plot, each row of `data_frame` is represented by a symbol + mark in 2D space. + """ + return make_figure(args=locals(), constructor=go.Scatter) + + +scatter.__doc__ = make_docstring(scatter, append_dict=_cartesian_append_dict) + + +def density_contour( + data_frame=None, + x=None, + y=None, + z=None, + color=None, + facet_row=None, + facet_col=None, + facet_col_wrap=0, + facet_row_spacing=None, + facet_col_spacing=None, + hover_name=None, + hover_data=None, + animation_frame=None, + animation_group=None, + category_orders=None, + labels=None, + orientation=None, + color_discrete_sequence=None, + color_discrete_map=None, + marginal_x=None, + marginal_y=None, + trendline=None, + trendline_options=None, + trendline_color_override=None, + trendline_scope="trace", + log_x=False, + log_y=False, + range_x=None, + range_y=None, + histfunc=None, + histnorm=None, + nbinsx=None, + nbinsy=None, + text_auto=False, + title=None, + subtitle=None, + template=None, + width=None, + height=None, +) -> go.Figure: + """ + In a density contour plot, rows of `data_frame` are grouped together + into contour marks to visualize the 2D distribution of an aggregate + function `histfunc` (e.g. the count or sum) of the value `z`. + """ + return make_figure( + args=locals(), + constructor=go.Histogram2dContour, + trace_patch=dict( + contours=dict(coloring="none"), + histfunc=histfunc, + histnorm=histnorm, + nbinsx=nbinsx, + nbinsy=nbinsy, + xbingroup="x", + ybingroup="y", + ), + ) + + +density_contour.__doc__ = make_docstring( + density_contour, + append_dict=dict( + x=_wide_mode_xy_append, + y=_wide_mode_xy_append, + z=[ + "For `density_heatmap` and `density_contour` these values are used as the inputs to `histfunc`.", + ], + histfunc=["The arguments to this function are the values of `z`."], + ), +) + + +def density_heatmap( + data_frame=None, + x=None, + y=None, + z=None, + facet_row=None, + facet_col=None, + facet_col_wrap=0, + facet_row_spacing=None, + facet_col_spacing=None, + hover_name=None, + hover_data=None, + animation_frame=None, + animation_group=None, + category_orders=None, + labels=None, + orientation=None, + color_continuous_scale=None, + range_color=None, + color_continuous_midpoint=None, + marginal_x=None, + marginal_y=None, + opacity=None, + log_x=False, + log_y=False, + range_x=None, + range_y=None, + histfunc=None, + histnorm=None, + nbinsx=None, + nbinsy=None, + text_auto=False, + title=None, + subtitle=None, + template=None, + width=None, + height=None, +) -> go.Figure: + """ + In a density heatmap, rows of `data_frame` are grouped together into + colored rectangular tiles to visualize the 2D distribution of an + aggregate function `histfunc` (e.g. the count or sum) of the value `z`. + """ + return make_figure( + args=locals(), + constructor=go.Histogram2d, + trace_patch=dict( + histfunc=histfunc, + histnorm=histnorm, + nbinsx=nbinsx, + nbinsy=nbinsy, + xbingroup="x", + ybingroup="y", + ), + ) + + +density_heatmap.__doc__ = make_docstring( + density_heatmap, + append_dict=dict( + x=_wide_mode_xy_append, + y=_wide_mode_xy_append, + z=[ + "For `density_heatmap` and `density_contour` these values are used as the inputs to `histfunc`.", + ], + histfunc=[ + "The arguments to this function are the values of `z`.", + ], + ), +) + + +def line( + data_frame=None, + x=None, + y=None, + line_group=None, + color=None, + line_dash=None, + symbol=None, + hover_name=None, + hover_data=None, + custom_data=None, + text=None, + facet_row=None, + facet_col=None, + facet_col_wrap=0, + facet_row_spacing=None, + facet_col_spacing=None, + error_x=None, + error_x_minus=None, + error_y=None, + error_y_minus=None, + animation_frame=None, + animation_group=None, + category_orders=None, + labels=None, + orientation=None, + color_discrete_sequence=None, + color_discrete_map=None, + line_dash_sequence=None, + line_dash_map=None, + symbol_sequence=None, + symbol_map=None, + markers=False, + log_x=False, + log_y=False, + range_x=None, + range_y=None, + line_shape=None, + render_mode="auto", + title=None, + subtitle=None, + template=None, + width=None, + height=None, +) -> go.Figure: + """ + In a 2D line plot, each row of `data_frame` is represented as a vertex of + a polyline mark in 2D space. + """ + return make_figure(args=locals(), constructor=go.Scatter) + + +line.__doc__ = make_docstring(line, append_dict=_cartesian_append_dict) + + +def area( + data_frame=None, + x=None, + y=None, + line_group=None, + color=None, + pattern_shape=None, + symbol=None, + hover_name=None, + hover_data=None, + custom_data=None, + text=None, + facet_row=None, + facet_col=None, + facet_col_wrap=0, + facet_row_spacing=None, + facet_col_spacing=None, + animation_frame=None, + animation_group=None, + category_orders=None, + labels=None, + color_discrete_sequence=None, + color_discrete_map=None, + pattern_shape_sequence=None, + pattern_shape_map=None, + symbol_sequence=None, + symbol_map=None, + markers=False, + orientation=None, + groupnorm=None, + log_x=False, + log_y=False, + range_x=None, + range_y=None, + line_shape=None, + title=None, + subtitle=None, + template=None, + width=None, + height=None, +) -> go.Figure: + """ + In a stacked area plot, each row of `data_frame` is represented as + a vertex of a polyline mark in 2D space. The area between + successive polylines is filled. + """ + return make_figure( + args=locals(), + constructor=go.Scatter, + trace_patch=dict(stackgroup=1, mode="lines", groupnorm=groupnorm), + ) + + +area.__doc__ = make_docstring(area, append_dict=_cartesian_append_dict) + + +def bar( + data_frame=None, + x=None, + y=None, + color=None, + pattern_shape=None, + facet_row=None, + facet_col=None, + facet_col_wrap=0, + facet_row_spacing=None, + facet_col_spacing=None, + hover_name=None, + hover_data=None, + custom_data=None, + text=None, + base=None, + error_x=None, + error_x_minus=None, + error_y=None, + error_y_minus=None, + animation_frame=None, + animation_group=None, + category_orders=None, + labels=None, + color_discrete_sequence=None, + color_discrete_map=None, + color_continuous_scale=None, + pattern_shape_sequence=None, + pattern_shape_map=None, + range_color=None, + color_continuous_midpoint=None, + opacity=None, + orientation=None, + barmode="relative", + log_x=False, + log_y=False, + range_x=None, + range_y=None, + text_auto=False, + title=None, + subtitle=None, + template=None, + width=None, + height=None, +) -> go.Figure: + """ + In a bar plot, each row of `data_frame` is represented as a rectangular + mark. + """ + return make_figure( + args=locals(), + constructor=go.Bar, + trace_patch=dict(textposition="auto"), + layout_patch=dict(barmode=barmode), + ) + + +bar.__doc__ = make_docstring(bar, append_dict=_cartesian_append_dict) + + +def timeline( + data_frame=None, + x_start=None, + x_end=None, + y=None, + color=None, + pattern_shape=None, + facet_row=None, + facet_col=None, + facet_col_wrap=0, + facet_row_spacing=None, + facet_col_spacing=None, + hover_name=None, + hover_data=None, + custom_data=None, + text=None, + animation_frame=None, + animation_group=None, + category_orders=None, + labels=None, + color_discrete_sequence=None, + color_discrete_map=None, + pattern_shape_sequence=None, + pattern_shape_map=None, + color_continuous_scale=None, + range_color=None, + color_continuous_midpoint=None, + opacity=None, + range_x=None, + range_y=None, + title=None, + subtitle=None, + template=None, + width=None, + height=None, +) -> go.Figure: + """ + In a timeline plot, each row of `data_frame` is represented as a rectangular + mark on an x axis of type `date`, spanning from `x_start` to `x_end`. + """ + return make_figure( + args=locals(), + constructor="timeline", + trace_patch=dict(textposition="auto", orientation="h"), + layout_patch=dict(barmode="overlay"), + ) + + +timeline.__doc__ = make_docstring(timeline) + + +def histogram( + data_frame=None, + x=None, + y=None, + color=None, + pattern_shape=None, + facet_row=None, + facet_col=None, + facet_col_wrap=0, + facet_row_spacing=None, + facet_col_spacing=None, + hover_name=None, + hover_data=None, + animation_frame=None, + animation_group=None, + category_orders=None, + labels=None, + color_discrete_sequence=None, + color_discrete_map=None, + pattern_shape_sequence=None, + pattern_shape_map=None, + marginal=None, + opacity=None, + orientation=None, + barmode="relative", + barnorm=None, + histnorm=None, + log_x=False, + log_y=False, + range_x=None, + range_y=None, + histfunc=None, + cumulative=None, + nbins=None, + text_auto=False, + title=None, + subtitle=None, + template=None, + width=None, + height=None, +) -> go.Figure: + """ + In a histogram, rows of `data_frame` are grouped together into a + rectangular mark to visualize the 1D distribution of an aggregate + function `histfunc` (e.g. the count or sum) of the value `y` (or `x` if + `orientation` is `'h'`). + """ + return make_figure( + args=locals(), + constructor=go.Histogram, + trace_patch=dict( + histnorm=histnorm, + histfunc=histfunc, + cumulative=dict(enabled=cumulative), + ), + layout_patch=dict(barmode=barmode, barnorm=barnorm), + ) + + +histogram.__doc__ = make_docstring( + histogram, + append_dict=dict( + x=["If `orientation` is `'h'`, these values are used as inputs to `histfunc`."] + + _wide_mode_xy_append, + y=["If `orientation` is `'v'`, these values are used as inputs to `histfunc`."] + + _wide_mode_xy_append, + histfunc=[ + "The arguments to this function are the values of `y` (`x`) if `orientation` is `'v'` (`'h'`).", + ], + ), +) + + +def ecdf( + data_frame=None, + x=None, + y=None, + color=None, + text=None, + line_dash=None, + symbol=None, + facet_row=None, + facet_col=None, + facet_col_wrap=0, + facet_row_spacing=None, + facet_col_spacing=None, + hover_name=None, + hover_data=None, + animation_frame=None, + animation_group=None, + markers=False, + lines=True, + category_orders=None, + labels=None, + color_discrete_sequence=None, + color_discrete_map=None, + line_dash_sequence=None, + line_dash_map=None, + symbol_sequence=None, + symbol_map=None, + marginal=None, + opacity=None, + orientation=None, + ecdfnorm="probability", + ecdfmode="standard", + render_mode="auto", + log_x=False, + log_y=False, + range_x=None, + range_y=None, + title=None, + subtitle=None, + template=None, + width=None, + height=None, +) -> go.Figure: + """ + In a Empirical Cumulative Distribution Function (ECDF) plot, rows of `data_frame` + are sorted by the value `x` (or `y` if `orientation` is `'h'`) and their cumulative + count (or the cumulative sum of `y` if supplied and `orientation` is `h`) is drawn + as a line. + """ + return make_figure(args=locals(), constructor=go.Scatter) + + +ecdf.__doc__ = make_docstring( + ecdf, + append_dict=dict( + x=[ + "If `orientation` is `'h'`, the cumulative sum of this argument is plotted rather than the cumulative count." + ] + + _wide_mode_xy_append, + y=[ + "If `orientation` is `'v'`, the cumulative sum of this argument is plotted rather than the cumulative count." + ] + + _wide_mode_xy_append, + ), +) + + +def violin( + data_frame=None, + x=None, + y=None, + color=None, + facet_row=None, + facet_col=None, + facet_col_wrap=0, + facet_row_spacing=None, + facet_col_spacing=None, + hover_name=None, + hover_data=None, + custom_data=None, + animation_frame=None, + animation_group=None, + category_orders=None, + labels=None, + color_discrete_sequence=None, + color_discrete_map=None, + orientation=None, + violinmode=None, + log_x=False, + log_y=False, + range_x=None, + range_y=None, + points=None, + box=False, + title=None, + subtitle=None, + template=None, + width=None, + height=None, +) -> go.Figure: + """ + In a violin plot, rows of `data_frame` are grouped together into a + curved mark to visualize their distribution. + """ + return make_figure( + args=locals(), + constructor=go.Violin, + trace_patch=dict( + points=points, + box=dict(visible=box), + scalegroup=True, + x0=" ", + y0=" ", + ), + layout_patch=dict(violinmode=violinmode), + ) + + +violin.__doc__ = make_docstring(violin, append_dict=_cartesian_append_dict) + + +def box( + data_frame=None, + x=None, + y=None, + color=None, + facet_row=None, + facet_col=None, + facet_col_wrap=0, + facet_row_spacing=None, + facet_col_spacing=None, + hover_name=None, + hover_data=None, + custom_data=None, + animation_frame=None, + animation_group=None, + category_orders=None, + labels=None, + color_discrete_sequence=None, + color_discrete_map=None, + orientation=None, + boxmode=None, + log_x=False, + log_y=False, + range_x=None, + range_y=None, + points=None, + notched=False, + title=None, + subtitle=None, + template=None, + width=None, + height=None, +) -> go.Figure: + """ + In a box plot, rows of `data_frame` are grouped together into a + box-and-whisker mark to visualize their distribution. + + Each box spans from quartile 1 (Q1) to quartile 3 (Q3). The second + quartile (Q2) is marked by a line inside the box. By default, the + whiskers correspond to the box' edges +/- 1.5 times the interquartile + range (IQR: Q3-Q1), see "points" for other options. + """ + return make_figure( + args=locals(), + constructor=go.Box, + trace_patch=dict(boxpoints=points, notched=notched, x0=" ", y0=" "), + layout_patch=dict(boxmode=boxmode), + ) + + +box.__doc__ = make_docstring(box, append_dict=_cartesian_append_dict) + + +def strip( + data_frame=None, + x=None, + y=None, + color=None, + facet_row=None, + facet_col=None, + facet_col_wrap=0, + facet_row_spacing=None, + facet_col_spacing=None, + hover_name=None, + hover_data=None, + custom_data=None, + animation_frame=None, + animation_group=None, + category_orders=None, + labels=None, + color_discrete_sequence=None, + color_discrete_map=None, + orientation=None, + stripmode=None, + log_x=False, + log_y=False, + range_x=None, + range_y=None, + title=None, + subtitle=None, + template=None, + width=None, + height=None, +) -> go.Figure: + """ + In a strip plot each row of `data_frame` is represented as a jittered + mark within categories. + """ + return make_figure( + args=locals(), + constructor=go.Box, + trace_patch=dict( + boxpoints="all", + pointpos=0, + hoveron="points", + fillcolor="rgba(255,255,255,0)", + line={"color": "rgba(255,255,255,0)"}, + x0=" ", + y0=" ", + ), + layout_patch=dict(boxmode=stripmode), + ) + + +strip.__doc__ = make_docstring(strip, append_dict=_cartesian_append_dict) + + +def scatter_3d( + data_frame=None, + x=None, + y=None, + z=None, + color=None, + symbol=None, + size=None, + text=None, + hover_name=None, + hover_data=None, + custom_data=None, + error_x=None, + error_x_minus=None, + error_y=None, + error_y_minus=None, + error_z=None, + error_z_minus=None, + animation_frame=None, + animation_group=None, + category_orders=None, + labels=None, + size_max=None, + color_discrete_sequence=None, + color_discrete_map=None, + color_continuous_scale=None, + range_color=None, + color_continuous_midpoint=None, + symbol_sequence=None, + symbol_map=None, + opacity=None, + log_x=False, + log_y=False, + log_z=False, + range_x=None, + range_y=None, + range_z=None, + title=None, + subtitle=None, + template=None, + width=None, + height=None, +) -> go.Figure: + """ + In a 3D scatter plot, each row of `data_frame` is represented by a + symbol mark in 3D space. + """ + return make_figure(args=locals(), constructor=go.Scatter3d) + + +scatter_3d.__doc__ = make_docstring(scatter_3d) + + +def line_3d( + data_frame=None, + x=None, + y=None, + z=None, + color=None, + line_dash=None, + text=None, + line_group=None, + symbol=None, + hover_name=None, + hover_data=None, + custom_data=None, + error_x=None, + error_x_minus=None, + error_y=None, + error_y_minus=None, + error_z=None, + error_z_minus=None, + animation_frame=None, + animation_group=None, + category_orders=None, + labels=None, + color_discrete_sequence=None, + color_discrete_map=None, + line_dash_sequence=None, + line_dash_map=None, + symbol_sequence=None, + symbol_map=None, + markers=False, + log_x=False, + log_y=False, + log_z=False, + range_x=None, + range_y=None, + range_z=None, + title=None, + subtitle=None, + template=None, + width=None, + height=None, +) -> go.Figure: + """ + In a 3D line plot, each row of `data_frame` is represented as a vertex of + a polyline mark in 3D space. + """ + return make_figure(args=locals(), constructor=go.Scatter3d) + + +line_3d.__doc__ = make_docstring(line_3d) + + +def scatter_ternary( + data_frame=None, + a=None, + b=None, + c=None, + color=None, + symbol=None, + size=None, + text=None, + hover_name=None, + hover_data=None, + custom_data=None, + animation_frame=None, + animation_group=None, + category_orders=None, + labels=None, + color_discrete_sequence=None, + color_discrete_map=None, + color_continuous_scale=None, + range_color=None, + color_continuous_midpoint=None, + symbol_sequence=None, + symbol_map=None, + opacity=None, + size_max=None, + title=None, + subtitle=None, + template=None, + width=None, + height=None, +) -> go.Figure: + """ + In a ternary scatter plot, each row of `data_frame` is represented by a + symbol mark in ternary coordinates. + """ + return make_figure(args=locals(), constructor=go.Scatterternary) + + +scatter_ternary.__doc__ = make_docstring(scatter_ternary) + + +def line_ternary( + data_frame=None, + a=None, + b=None, + c=None, + color=None, + line_dash=None, + line_group=None, + symbol=None, + hover_name=None, + hover_data=None, + custom_data=None, + text=None, + animation_frame=None, + animation_group=None, + category_orders=None, + labels=None, + color_discrete_sequence=None, + color_discrete_map=None, + line_dash_sequence=None, + line_dash_map=None, + symbol_sequence=None, + symbol_map=None, + markers=False, + line_shape=None, + title=None, + subtitle=None, + template=None, + width=None, + height=None, +) -> go.Figure: + """ + In a ternary line plot, each row of `data_frame` is represented as + a vertex of a polyline mark in ternary coordinates. + """ + return make_figure(args=locals(), constructor=go.Scatterternary) + + +line_ternary.__doc__ = make_docstring(line_ternary) + + +def scatter_polar( + data_frame=None, + r=None, + theta=None, + color=None, + symbol=None, + size=None, + hover_name=None, + hover_data=None, + custom_data=None, + text=None, + animation_frame=None, + animation_group=None, + category_orders=None, + labels=None, + color_discrete_sequence=None, + color_discrete_map=None, + color_continuous_scale=None, + range_color=None, + color_continuous_midpoint=None, + symbol_sequence=None, + symbol_map=None, + opacity=None, + direction="clockwise", + start_angle=90, + size_max=None, + range_r=None, + range_theta=None, + log_r=False, + render_mode="auto", + title=None, + subtitle=None, + template=None, + width=None, + height=None, +) -> go.Figure: + """ + In a polar scatter plot, each row of `data_frame` is represented by a + symbol mark in polar coordinates. + """ + return make_figure(args=locals(), constructor=go.Scatterpolar) + + +scatter_polar.__doc__ = make_docstring(scatter_polar) + + +def line_polar( + data_frame=None, + r=None, + theta=None, + color=None, + line_dash=None, + hover_name=None, + hover_data=None, + custom_data=None, + line_group=None, + text=None, + symbol=None, + animation_frame=None, + animation_group=None, + category_orders=None, + labels=None, + color_discrete_sequence=None, + color_discrete_map=None, + line_dash_sequence=None, + line_dash_map=None, + symbol_sequence=None, + symbol_map=None, + markers=False, + direction="clockwise", + start_angle=90, + line_close=False, + line_shape=None, + render_mode="auto", + range_r=None, + range_theta=None, + log_r=False, + title=None, + subtitle=None, + template=None, + width=None, + height=None, +) -> go.Figure: + """ + In a polar line plot, each row of `data_frame` is represented as a + vertex of a polyline mark in polar coordinates. + """ + return make_figure(args=locals(), constructor=go.Scatterpolar) + + +line_polar.__doc__ = make_docstring(line_polar) + + +def bar_polar( + data_frame=None, + r=None, + theta=None, + color=None, + pattern_shape=None, + hover_name=None, + hover_data=None, + custom_data=None, + base=None, + animation_frame=None, + animation_group=None, + category_orders=None, + labels=None, + color_discrete_sequence=None, + color_discrete_map=None, + color_continuous_scale=None, + pattern_shape_sequence=None, + pattern_shape_map=None, + range_color=None, + color_continuous_midpoint=None, + barnorm=None, + barmode="relative", + direction="clockwise", + start_angle=90, + range_r=None, + range_theta=None, + log_r=False, + title=None, + subtitle=None, + template=None, + width=None, + height=None, +) -> go.Figure: + """ + In a polar bar plot, each row of `data_frame` is represented as a wedge + mark in polar coordinates. + """ + return make_figure( + args=locals(), + constructor=go.Barpolar, + layout_patch=dict(barnorm=barnorm, barmode=barmode), + ) + + +bar_polar.__doc__ = make_docstring(bar_polar) + + +def choropleth( + data_frame=None, + lat=None, + lon=None, + locations=None, + locationmode=None, + geojson=None, + featureidkey=None, + color=None, + facet_row=None, + facet_col=None, + facet_col_wrap=0, + facet_row_spacing=None, + facet_col_spacing=None, + hover_name=None, + hover_data=None, + custom_data=None, + animation_frame=None, + animation_group=None, + category_orders=None, + labels=None, + color_discrete_sequence=None, + color_discrete_map=None, + color_continuous_scale=None, + range_color=None, + color_continuous_midpoint=None, + projection=None, + scope=None, + center=None, + fitbounds=None, + basemap_visible=None, + title=None, + subtitle=None, + template=None, + width=None, + height=None, +) -> go.Figure: + """ + In a choropleth map, each row of `data_frame` is represented by a + colored region mark on a map. + """ + + if locationmode == "country names": + warn( + "The library used by the *country names* `locationmode` option is changing in an upcoming version. " + "Country names in existing plots may not work in the new version. " + "To ensure consistent behavior, consider setting `locationmode` to *ISO-3*.", + DeprecationWarning, + stacklevel=2, + ) + + return make_figure( + args=locals(), + constructor=go.Choropleth, + trace_patch=dict(locationmode=locationmode), + ) + + +choropleth.__doc__ = make_docstring(choropleth) + + +def scatter_geo( + data_frame=None, + lat=None, + lon=None, + locations=None, + locationmode=None, + geojson=None, + featureidkey=None, + color=None, + text=None, + symbol=None, + facet_row=None, + facet_col=None, + facet_col_wrap=0, + facet_row_spacing=None, + facet_col_spacing=None, + hover_name=None, + hover_data=None, + custom_data=None, + size=None, + animation_frame=None, + animation_group=None, + category_orders=None, + labels=None, + color_discrete_sequence=None, + color_discrete_map=None, + color_continuous_scale=None, + range_color=None, + color_continuous_midpoint=None, + symbol_sequence=None, + symbol_map=None, + opacity=None, + size_max=None, + projection=None, + scope=None, + center=None, + fitbounds=None, + basemap_visible=None, + title=None, + subtitle=None, + template=None, + width=None, + height=None, +) -> go.Figure: + """ + In a geographic scatter plot, each row of `data_frame` is represented + by a symbol mark on a map. + """ + + if locationmode == "country names": + warn( + "The library used by the *country names* `locationmode` option is changing in an upcoming version. " + "Country names in existing plots may not work in the new version. " + "To ensure consistent behavior, consider setting `locationmode` to *ISO-3*.", + DeprecationWarning, + stacklevel=2, + ) + + return make_figure( + args=locals(), + constructor=go.Scattergeo, + trace_patch=dict(locationmode=locationmode), + ) + + +scatter_geo.__doc__ = make_docstring(scatter_geo) + + +def line_geo( + data_frame=None, + lat=None, + lon=None, + locations=None, + locationmode=None, + geojson=None, + featureidkey=None, + color=None, + line_dash=None, + text=None, + facet_row=None, + facet_col=None, + facet_col_wrap=0, + facet_row_spacing=None, + facet_col_spacing=None, + hover_name=None, + hover_data=None, + custom_data=None, + line_group=None, + symbol=None, + animation_frame=None, + animation_group=None, + category_orders=None, + labels=None, + color_discrete_sequence=None, + color_discrete_map=None, + line_dash_sequence=None, + line_dash_map=None, + symbol_sequence=None, + symbol_map=None, + markers=False, + projection=None, + scope=None, + center=None, + fitbounds=None, + basemap_visible=None, + title=None, + subtitle=None, + template=None, + width=None, + height=None, +) -> go.Figure: + """ + In a geographic line plot, each row of `data_frame` is represented as + a vertex of a polyline mark on a map. + """ + return make_figure( + args=locals(), + constructor=go.Scattergeo, + trace_patch=dict(locationmode=locationmode), + ) + + +line_geo.__doc__ = make_docstring(line_geo) + + +def scatter_map( + data_frame=None, + lat=None, + lon=None, + color=None, + text=None, + hover_name=None, + hover_data=None, + custom_data=None, + size=None, + animation_frame=None, + animation_group=None, + category_orders=None, + labels=None, + color_discrete_sequence=None, + color_discrete_map=None, + color_continuous_scale=None, + range_color=None, + color_continuous_midpoint=None, + opacity=None, + size_max=None, + zoom=8, + center=None, + map_style=None, + title=None, + subtitle=None, + template=None, + width=None, + height=None, +) -> go.Figure: + """ + In a scatter map, each row of `data_frame` is represented by a + symbol mark on the map. + """ + return make_figure(args=locals(), constructor=go.Scattermap) + + +scatter_map.__doc__ = make_docstring(scatter_map) + + +def choropleth_map( + data_frame=None, + geojson=None, + featureidkey=None, + locations=None, + color=None, + hover_name=None, + hover_data=None, + custom_data=None, + animation_frame=None, + animation_group=None, + category_orders=None, + labels=None, + color_discrete_sequence=None, + color_discrete_map=None, + color_continuous_scale=None, + range_color=None, + color_continuous_midpoint=None, + opacity=None, + zoom=8, + center=None, + map_style=None, + title=None, + subtitle=None, + template=None, + width=None, + height=None, +) -> go.Figure: + """ + In a choropleth map, each row of `data_frame` is represented by a + colored region on the map. + """ + return make_figure(args=locals(), constructor=go.Choroplethmap) + + +choropleth_map.__doc__ = make_docstring(choropleth_map) + + +def density_map( + data_frame=None, + lat=None, + lon=None, + z=None, + hover_name=None, + hover_data=None, + custom_data=None, + animation_frame=None, + animation_group=None, + category_orders=None, + labels=None, + color_continuous_scale=None, + range_color=None, + color_continuous_midpoint=None, + opacity=None, + zoom=8, + center=None, + map_style=None, + radius=None, + title=None, + subtitle=None, + template=None, + width=None, + height=None, +) -> go.Figure: + """ + In a density map, each row of `data_frame` contributes to the intensity of + the color of the region around the corresponding point on the map. + """ + return make_figure( + args=locals(), constructor=go.Densitymap, trace_patch=dict(radius=radius) + ) + + +density_map.__doc__ = make_docstring(density_map) + + +def line_map( + data_frame=None, + lat=None, + lon=None, + color=None, + text=None, + hover_name=None, + hover_data=None, + custom_data=None, + line_group=None, + animation_frame=None, + animation_group=None, + category_orders=None, + labels=None, + color_discrete_sequence=None, + color_discrete_map=None, + zoom=8, + center=None, + map_style=None, + title=None, + subtitle=None, + template=None, + width=None, + height=None, +) -> go.Figure: + """ + In a line map, each row of `data_frame` is represented as + a vertex of a polyline mark on the map. + """ + return make_figure(args=locals(), constructor=go.Scattermap) + + +line_map.__doc__ = make_docstring(line_map) + + +def scatter_mapbox( + data_frame=None, + lat=None, + lon=None, + color=None, + text=None, + hover_name=None, + hover_data=None, + custom_data=None, + size=None, + animation_frame=None, + animation_group=None, + category_orders=None, + labels=None, + color_discrete_sequence=None, + color_discrete_map=None, + color_continuous_scale=None, + range_color=None, + color_continuous_midpoint=None, + opacity=None, + size_max=None, + zoom=8, + center=None, + mapbox_style=None, + title=None, + subtitle=None, + template=None, + width=None, + height=None, +) -> go.Figure: + """ + *scatter_mapbox* is deprecated! Use *scatter_map* instead. + Learn more at: https://plotly.com/python/mapbox-to-maplibre/ + In a Mapbox scatter plot, each row of `data_frame` is represented by a + symbol mark on a Mapbox map. + """ + warn( + "*scatter_mapbox* is deprecated!" + + " Use *scatter_map* instead." + + " Learn more at: https://plotly.com/python/mapbox-to-maplibre/", + stacklevel=2, + category=DeprecationWarning, + ) + return make_figure(args=locals(), constructor=go.Scattermapbox) + + +scatter_mapbox.__doc__ = make_docstring(scatter_mapbox) + + +def choropleth_mapbox( + data_frame=None, + geojson=None, + featureidkey=None, + locations=None, + color=None, + hover_name=None, + hover_data=None, + custom_data=None, + animation_frame=None, + animation_group=None, + category_orders=None, + labels=None, + color_discrete_sequence=None, + color_discrete_map=None, + color_continuous_scale=None, + range_color=None, + color_continuous_midpoint=None, + opacity=None, + zoom=8, + center=None, + mapbox_style=None, + title=None, + subtitle=None, + template=None, + width=None, + height=None, +) -> go.Figure: + """ + *choropleth_mapbox* is deprecated! Use *choropleth_map* instead. + Learn more at: https://plotly.com/python/mapbox-to-maplibre/ + In a Mapbox choropleth map, each row of `data_frame` is represented by a + colored region on a Mapbox map. + """ + warn( + "*choropleth_mapbox* is deprecated!" + + " Use *choropleth_map* instead." + + " Learn more at: https://plotly.com/python/mapbox-to-maplibre/", + stacklevel=2, + category=DeprecationWarning, + ) + return make_figure(args=locals(), constructor=go.Choroplethmapbox) + + +choropleth_mapbox.__doc__ = make_docstring(choropleth_mapbox) + + +def density_mapbox( + data_frame=None, + lat=None, + lon=None, + z=None, + hover_name=None, + hover_data=None, + custom_data=None, + animation_frame=None, + animation_group=None, + category_orders=None, + labels=None, + color_continuous_scale=None, + range_color=None, + color_continuous_midpoint=None, + opacity=None, + zoom=8, + center=None, + mapbox_style=None, + radius=None, + title=None, + subtitle=None, + template=None, + width=None, + height=None, +) -> go.Figure: + """ + *density_mapbox* is deprecated! Use *density_map* instead. + Learn more at: https://plotly.com/python/mapbox-to-maplibre/ + In a Mapbox density map, each row of `data_frame` contributes to the intensity of + the color of the region around the corresponding point on the map + """ + warn( + "*density_mapbox* is deprecated!" + + " Use *density_map* instead." + + " Learn more at: https://plotly.com/python/mapbox-to-maplibre/", + stacklevel=2, + category=DeprecationWarning, + ) + return make_figure( + args=locals(), constructor=go.Densitymapbox, trace_patch=dict(radius=radius) + ) + + +density_mapbox.__doc__ = make_docstring(density_mapbox) + + +def line_mapbox( + data_frame=None, + lat=None, + lon=None, + color=None, + text=None, + hover_name=None, + hover_data=None, + custom_data=None, + line_group=None, + animation_frame=None, + animation_group=None, + category_orders=None, + labels=None, + color_discrete_sequence=None, + color_discrete_map=None, + zoom=8, + center=None, + mapbox_style=None, + title=None, + subtitle=None, + template=None, + width=None, + height=None, +) -> go.Figure: + """ + *line_mapbox* is deprecated! Use *line_map* instead. + Learn more at: https://plotly.com/python/mapbox-to-maplibre/ + In a Mapbox line plot, each row of `data_frame` is represented as + a vertex of a polyline mark on a Mapbox map. + """ + warn( + "*line_mapbox* is deprecated!" + + " Use *line_map* instead." + + " Learn more at: https://plotly.com/python/mapbox-to-maplibre/", + stacklevel=2, + category=DeprecationWarning, + ) + return make_figure(args=locals(), constructor=go.Scattermapbox) + + +line_mapbox.__doc__ = make_docstring(line_mapbox) + + +def scatter_matrix( + data_frame=None, + dimensions=None, + color=None, + symbol=None, + size=None, + hover_name=None, + hover_data=None, + custom_data=None, + category_orders=None, + labels=None, + color_discrete_sequence=None, + color_discrete_map=None, + color_continuous_scale=None, + range_color=None, + color_continuous_midpoint=None, + symbol_sequence=None, + symbol_map=None, + opacity=None, + size_max=None, + title=None, + subtitle=None, + template=None, + width=None, + height=None, +) -> go.Figure: + """ + In a scatter plot matrix (or SPLOM), each row of `data_frame` is + represented by a multiple symbol marks, one in each cell of a grid of + 2D scatter plots, which plot each pair of `dimensions` against each + other. + """ + return make_figure( + args=locals(), constructor=go.Splom, layout_patch=dict(dragmode="select") + ) + + +scatter_matrix.__doc__ = make_docstring(scatter_matrix) + + +def parallel_coordinates( + data_frame=None, + dimensions=None, + color=None, + labels=None, + color_continuous_scale=None, + range_color=None, + color_continuous_midpoint=None, + title=None, + subtitle=None, + template=None, + width=None, + height=None, +) -> go.Figure: + """ + In a parallel coordinates plot, each row of `data_frame` is represented + by a polyline mark which traverses a set of parallel axes, one for each + of the `dimensions`. + """ + return make_figure(args=locals(), constructor=go.Parcoords) + + +parallel_coordinates.__doc__ = make_docstring(parallel_coordinates) + + +def parallel_categories( + data_frame=None, + dimensions=None, + color=None, + labels=None, + color_continuous_scale=None, + range_color=None, + color_continuous_midpoint=None, + title=None, + subtitle=None, + template=None, + width=None, + height=None, + dimensions_max_cardinality=50, +) -> go.Figure: + """ + In a parallel categories (or parallel sets) plot, each row of + `data_frame` is grouped with other rows that share the same values of + `dimensions` and then plotted as a polyline mark through a set of + parallel axes, one for each of the `dimensions`. + """ + return make_figure(args=locals(), constructor=go.Parcats) + + +parallel_categories.__doc__ = make_docstring(parallel_categories) + + +def pie( + data_frame=None, + names=None, + values=None, + color=None, + facet_row=None, + facet_col=None, + facet_col_wrap=0, + facet_row_spacing=None, + facet_col_spacing=None, + color_discrete_sequence=None, + color_discrete_map=None, + hover_name=None, + hover_data=None, + custom_data=None, + category_orders=None, + labels=None, + title=None, + subtitle=None, + template=None, + width=None, + height=None, + opacity=None, + hole=None, +) -> go.Figure: + """ + In a pie plot, each row of `data_frame` is represented as a sector of a + pie. + """ + if color_discrete_sequence is not None: + layout_patch = {"piecolorway": color_discrete_sequence} + else: + layout_patch = {} + return make_figure( + args=locals(), + constructor=go.Pie, + trace_patch=dict(showlegend=(names is not None), hole=hole), + layout_patch=layout_patch, + ) + + +pie.__doc__ = make_docstring( + pie, + override_dict=dict( + hole=[ + "float", + "Sets the fraction of the radius to cut out of the pie." + "Use this to make a donut chart.", + ], + ), +) + + +def sunburst( + data_frame=None, + names=None, + values=None, + parents=None, + path=None, + ids=None, + color=None, + color_continuous_scale=None, + range_color=None, + color_continuous_midpoint=None, + color_discrete_sequence=None, + color_discrete_map=None, + hover_name=None, + hover_data=None, + custom_data=None, + labels=None, + title=None, + subtitle=None, + template=None, + width=None, + height=None, + branchvalues=None, + maxdepth=None, +) -> go.Figure: + """ + A sunburst plot represents hierarchial data as sectors laid out over + several levels of concentric rings. + """ + if color_discrete_sequence is not None: + layout_patch = {"sunburstcolorway": color_discrete_sequence} + else: + layout_patch = {} + if path is not None and (ids is not None or parents is not None): + raise ValueError( + "Either `path` should be provided, or `ids` and `parents`." + "These parameters are mutually exclusive and cannot be passed together." + ) + if path is not None and branchvalues is None: + branchvalues = "total" + return make_figure( + args=locals(), + constructor=go.Sunburst, + trace_patch=dict(branchvalues=branchvalues, maxdepth=maxdepth), + layout_patch=layout_patch, + ) + + +sunburst.__doc__ = make_docstring(sunburst) + + +def treemap( + data_frame=None, + names=None, + values=None, + parents=None, + ids=None, + path=None, + color=None, + color_continuous_scale=None, + range_color=None, + color_continuous_midpoint=None, + color_discrete_sequence=None, + color_discrete_map=None, + hover_name=None, + hover_data=None, + custom_data=None, + labels=None, + title=None, + subtitle=None, + template=None, + width=None, + height=None, + branchvalues=None, + maxdepth=None, +) -> go.Figure: + """ + A treemap plot represents hierarchial data as nested rectangular + sectors. + """ + if color_discrete_sequence is not None: + layout_patch = {"treemapcolorway": color_discrete_sequence} + else: + layout_patch = {} + if path is not None and (ids is not None or parents is not None): + raise ValueError( + "Either `path` should be provided, or `ids` and `parents`." + "These parameters are mutually exclusive and cannot be passed together." + ) + if path is not None and branchvalues is None: + branchvalues = "total" + return make_figure( + args=locals(), + constructor=go.Treemap, + trace_patch=dict(branchvalues=branchvalues, maxdepth=maxdepth), + layout_patch=layout_patch, + ) + + +treemap.__doc__ = make_docstring(treemap) + + +def icicle( + data_frame=None, + names=None, + values=None, + parents=None, + path=None, + ids=None, + color=None, + color_continuous_scale=None, + range_color=None, + color_continuous_midpoint=None, + color_discrete_sequence=None, + color_discrete_map=None, + hover_name=None, + hover_data=None, + custom_data=None, + labels=None, + title=None, + subtitle=None, + template=None, + width=None, + height=None, + branchvalues=None, + maxdepth=None, +) -> go.Figure: + """ + An icicle plot represents hierarchial data with adjoined rectangular + sectors that all cascade from root down to leaf in one direction. + """ + if color_discrete_sequence is not None: + layout_patch = {"iciclecolorway": color_discrete_sequence} + else: + layout_patch = {} + if path is not None and (ids is not None or parents is not None): + raise ValueError( + "Either `path` should be provided, or `ids` and `parents`." + "These parameters are mutually exclusive and cannot be passed together." + ) + if path is not None and branchvalues is None: + branchvalues = "total" + return make_figure( + args=locals(), + constructor=go.Icicle, + trace_patch=dict(branchvalues=branchvalues, maxdepth=maxdepth), + layout_patch=layout_patch, + ) + + +icicle.__doc__ = make_docstring(icicle) + + +def funnel( + data_frame=None, + x=None, + y=None, + color=None, + facet_row=None, + facet_col=None, + facet_col_wrap=0, + facet_row_spacing=None, + facet_col_spacing=None, + hover_name=None, + hover_data=None, + custom_data=None, + text=None, + animation_frame=None, + animation_group=None, + category_orders=None, + labels=None, + color_discrete_sequence=None, + color_discrete_map=None, + opacity=None, + orientation=None, + log_x=False, + log_y=False, + range_x=None, + range_y=None, + title=None, + subtitle=None, + template=None, + width=None, + height=None, +) -> go.Figure: + """ + In a funnel plot, each row of `data_frame` is represented as a + rectangular sector of a funnel. + """ + return make_figure(args=locals(), constructor=go.Funnel) + + +funnel.__doc__ = make_docstring(funnel, append_dict=_cartesian_append_dict) + + +def funnel_area( + data_frame=None, + names=None, + values=None, + color=None, + color_discrete_sequence=None, + color_discrete_map=None, + hover_name=None, + hover_data=None, + custom_data=None, + labels=None, + title=None, + subtitle=None, + template=None, + width=None, + height=None, + opacity=None, +) -> go.Figure: + """ + In a funnel area plot, each row of `data_frame` is represented as a + trapezoidal sector of a funnel. + """ + if color_discrete_sequence is not None: + layout_patch = {"funnelareacolorway": color_discrete_sequence} + else: + layout_patch = {} + return make_figure( + args=locals(), + constructor=go.Funnelarea, + trace_patch=dict(showlegend=(names is not None)), + layout_patch=layout_patch, + ) + + +funnel_area.__doc__ = make_docstring(funnel_area) diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/express/_core.py b/.venv_haddock/lib/python3.12/site-packages/plotly/express/_core.py new file mode 100644 index 0000000000000000000000000000000000000000..9fbf526cdebfaea9a499ab5e8b31051a27546223 --- /dev/null +++ b/.venv_haddock/lib/python3.12/site-packages/plotly/express/_core.py @@ -0,0 +1,2925 @@ +import plotly.graph_objs as go +import plotly.io as pio +from collections import namedtuple, OrderedDict +from ._special_inputs import IdentityMap, Constant, Range +from .trendline_functions import ols, lowess, rolling, expanding, ewm + +from _plotly_utils.basevalidators import ColorscaleValidator +from plotly.colors import qualitative, sequential +import math + +from plotly._subplots import ( + make_subplots, + _set_trace_grid_reference, + _subplot_type_for_trace_type, +) + +import narwhals.stable.v1 as nw + +# The reason to use narwhals.stable.v1 is to have a stable and perfectly +# backwards-compatible API, hence the confidence to not pin the Narwhals version exactly, +# allowing for multiple major libraries to have Narwhals as a dependency without +# forbidding users to install them all together due to dependency conflicts. + +NO_COLOR = "px_no_color_constant" + + +trendline_functions = dict( + lowess=lowess, rolling=rolling, ewm=ewm, expanding=expanding, ols=ols +) + +# Declare all supported attributes, across all plot types +direct_attrables = ( + ["base", "x", "y", "z", "a", "b", "c", "r", "theta", "size", "x_start", "x_end"] + + ["hover_name", "text", "names", "values", "parents", "wide_cross"] + + ["ids", "error_x", "error_x_minus", "error_y", "error_y_minus", "error_z"] + + ["error_z_minus", "lat", "lon", "locations", "animation_group"] +) +array_attrables = ["dimensions", "custom_data", "hover_data", "path", "wide_variable"] +group_attrables = ["animation_frame", "facet_row", "facet_col", "line_group"] +renameable_group_attrables = [ + "color", # renamed to marker.color or line.color in infer_config + "symbol", # renamed to marker.symbol in infer_config + "line_dash", # renamed to line.dash in infer_config + "pattern_shape", # renamed to marker.pattern.shape in infer_config +] +all_attrables = ( + direct_attrables + array_attrables + group_attrables + renameable_group_attrables +) + +cartesians = [go.Scatter, go.Scattergl, go.Bar, go.Funnel, go.Box, go.Violin] +cartesians += [go.Histogram, go.Histogram2d, go.Histogram2dContour] + + +class PxDefaults(object): + __slots__ = [ + "template", + "width", + "height", + "color_discrete_sequence", + "color_discrete_map", + "color_continuous_scale", + "symbol_sequence", + "symbol_map", + "line_dash_sequence", + "line_dash_map", + "pattern_shape_sequence", + "pattern_shape_map", + "size_max", + "category_orders", + "labels", + ] + + def __init__(self): + self.reset() + + def reset(self): + self.template = None + self.width = None + self.height = None + self.color_discrete_sequence = None + self.color_discrete_map = {} + self.color_continuous_scale = None + self.symbol_sequence = None + self.symbol_map = {} + self.line_dash_sequence = None + self.line_dash_map = {} + self.pattern_shape_sequence = None + self.pattern_shape_map = {} + self.size_max = 20 + self.category_orders = {} + self.labels = {} + + +defaults = PxDefaults() +del PxDefaults + + +MAPBOX_TOKEN = None + + +def set_mapbox_access_token(token): + """ + Arguments: + token: A Mapbox token to be used in `plotly.express.scatter_mapbox` and \ + `plotly.express.line_mapbox` figures. See \ + https://docs.mapbox.com/help/how-mapbox-works/access-tokens/ for more details + """ + global MAPBOX_TOKEN + MAPBOX_TOKEN = token + + +def get_trendline_results(fig): + """ + Extracts fit statistics for trendlines (when applied to figures generated with + the `trendline` argument set to `"ols"`). + + Arguments: + fig: the output of a `plotly.express` charting call + Returns: + A `pandas.DataFrame` with a column "px_fit_results" containing the `statsmodels` + results objects, along with columns identifying the subset of the data the + trendline was fit on. + """ + return fig._px_trendlines + + +Mapping = namedtuple( + "Mapping", + [ + "show_in_trace_name", + "grouper", + "val_map", + "sequence", + "updater", + "variable", + "facet", + ], +) +TraceSpec = namedtuple("TraceSpec", ["constructor", "attrs", "trace_patch", "marginal"]) + + +def get_label(args, column): + try: + return args["labels"][column] + except Exception: + return column + + +def invert_label(args, column): + """Invert mapping. + Find key corresponding to value column in dict args["labels"]. + Returns `column` if the value does not exist. + """ + reversed_labels = {value: key for (key, value) in args["labels"].items()} + try: + return reversed_labels[column] + except Exception: + return column + + +def _is_continuous(df: nw.DataFrame, col_name: str) -> bool: + if nw.dependencies.is_pandas_like_dataframe(df_native := df.to_native()): + # fastpath for pandas: Narwhals' Series.dtype has a bit of overhead, as it + # tries to distinguish between true "object" columns, and "string" columns + # disguised as "object". But here, we deal with neither. + return df_native[col_name].dtype.kind in "ifc" + return df.get_column(col_name).dtype.is_numeric() + + +def _to_unix_epoch_seconds(s: nw.Series) -> nw.Series: + dtype = s.dtype + if dtype == nw.Date: + return s.dt.timestamp("ms") / 1_000 + if dtype == nw.Datetime: + if dtype.time_unit in ("s", "ms"): + return s.dt.timestamp("ms") / 1_000 + elif dtype.time_unit == "us": + return s.dt.timestamp("us") / 1_000_000 + elif dtype.time_unit == "ns": + return s.dt.timestamp("ns") / 1_000_000_000 + else: + msg = "Unexpected dtype, please report a bug" + raise ValueError(msg) + else: + msg = f"Expected Date or Datetime, got {dtype}" + raise TypeError(msg) + + +def _generate_temporary_column_name(n_bytes, columns) -> str: + """Wraps of Narwhals generate_temporary_column_name to generate a token + which is guaranteed to not be in columns, nor in [col + token for col in columns] + """ + counter = 0 + while True: + # This is guaranteed to not be in columns by Narwhals + token = nw.generate_temporary_column_name(n_bytes, columns=columns) + + # Now check that it is not in the [col + token for col in columns] list + if token not in {f"{c}{token}" for c in columns}: + return token + + counter += 1 + if counter > 100: + msg = ( + "Internal Error: Plotly was not able to generate a column name with " + f"{n_bytes=} and not in {columns}.\n" + "Please report this to " + "https://github.com/plotly/plotly.py/issues/new and we will try to " + "replicate and fix it." + ) + raise AssertionError(msg) + + +def get_decorated_label(args, column, role): + original_label = label = get_label(args, column) + if "histfunc" in args and ( + (role == "z") + or (role == "x" and "orientation" in args and args["orientation"] == "h") + or (role == "y" and "orientation" in args and args["orientation"] == "v") + ): + histfunc = args["histfunc"] or "count" + if histfunc != "count": + label = "%s of %s" % (histfunc, label) + else: + label = "count" + + if "histnorm" in args and args["histnorm"] is not None: + if label == "count": + label = args["histnorm"] + else: + histnorm = args["histnorm"] + if histfunc == "sum": + if histnorm == "probability": + label = "%s of %s" % ("fraction", label) + elif histnorm == "percent": + label = "%s of %s" % (histnorm, label) + else: + label = "%s weighted by %s" % (histnorm, original_label) + elif histnorm == "probability": + label = "%s of sum of %s" % ("fraction", label) + elif histnorm == "percent": + label = "%s of sum of %s" % ("percent", label) + else: + label = "%s of %s" % (histnorm, label) + + if "barnorm" in args and args["barnorm"] is not None: + label = "%s (normalized as %s)" % (label, args["barnorm"]) + + return label + + +def make_mapping(args, variable): + if variable == "line_group" or variable == "animation_frame": + return Mapping( + show_in_trace_name=False, + grouper=args[variable], + val_map={}, + sequence=[""], + variable=variable, + updater=(lambda trace, v: v), + facet=None, + ) + if variable == "facet_row" or variable == "facet_col": + letter = "x" if variable == "facet_col" else "y" + return Mapping( + show_in_trace_name=False, + variable=letter, + grouper=args[variable], + val_map={}, + sequence=[i for i in range(1, 1000)], + updater=(lambda trace, v: v), + facet="row" if variable == "facet_row" else "col", + ) + (parent, variable, *other_variables) = variable.split(".") + vprefix = variable + arg_name = variable + if variable == "color": + vprefix = "color_discrete" + if variable == "dash": + arg_name = "line_dash" + vprefix = "line_dash" + if variable in ["pattern", "shape"]: + arg_name = "pattern_shape" + vprefix = "pattern_shape" + if args[vprefix + "_map"] == "identity": + val_map = IdentityMap() + else: + val_map = args[vprefix + "_map"].copy() + return Mapping( + show_in_trace_name=True, + variable=variable, + grouper=args[arg_name], + val_map=val_map, + sequence=args[vprefix + "_sequence"], + updater=lambda trace, v: trace.update( + {parent: {".".join([variable] + other_variables): v}} + ), + facet=None, + ) + + +def make_trace_kwargs(args, trace_spec, trace_data, mapping_labels, sizeref): + """Populates a dict with arguments to update trace + + Parameters + ---------- + args : dict + args to be used for the trace + trace_spec : NamedTuple + which kind of trace to be used (has constructor, marginal etc. + attributes) + trace_data : pandas DataFrame + data + mapping_labels : dict + to be used for hovertemplate + sizeref : float + marker sizeref + + Returns + ------- + trace_patch : dict + dict to be used to update trace + fit_results : dict + fit information to be used for trendlines + """ + trace_data: nw.DataFrame + df: nw.DataFrame = args["data_frame"] + + if "line_close" in args and args["line_close"]: + trace_data = nw.concat([trace_data, trace_data.head(1)], how="vertical") + + trace_patch = trace_spec.trace_patch.copy() or {} + fit_results = None + hover_header = "" + for attr_name in trace_spec.attrs: + attr_value = args[attr_name] + attr_label = get_decorated_label(args, attr_value, attr_name) + if attr_name == "dimensions": + dims = [ + (name, trace_data.get_column(name)) + for name in trace_data.columns + if ((not attr_value) or (name in attr_value)) + and (trace_spec.constructor != go.Parcoords or _is_continuous(df, name)) + and ( + trace_spec.constructor != go.Parcats + or (attr_value is not None and name in attr_value) + or nw.to_py_scalar(df.get_column(name).n_unique()) + <= args["dimensions_max_cardinality"] + ) + ] + trace_patch["dimensions"] = [ + dict(label=get_label(args, name), values=column) + for (name, column) in dims + ] + if trace_spec.constructor == go.Splom: + for d in trace_patch["dimensions"]: + d["axis"] = dict(matches=True) + mapping_labels["%{xaxis.title.text}"] = "%{x}" + mapping_labels["%{yaxis.title.text}"] = "%{y}" + + elif attr_value is not None: + if attr_name == "size": + if "marker" not in trace_patch: + trace_patch["marker"] = dict() + trace_patch["marker"]["size"] = trace_data.get_column(attr_value) + trace_patch["marker"]["sizemode"] = "area" + trace_patch["marker"]["sizeref"] = sizeref + mapping_labels[attr_label] = "%{marker.size}" + elif attr_name == "marginal_x": + if trace_spec.constructor == go.Histogram: + mapping_labels["count"] = "%{y}" + elif attr_name == "marginal_y": + if trace_spec.constructor == go.Histogram: + mapping_labels["count"] = "%{x}" + elif attr_name == "trendline": + if ( + args["x"] + and args["y"] + and len( + trace_data.select(nw.col(args["x"], args["y"])).drop_nulls() + ) + > 1 + ): + # sorting is bad but trace_specs with "trendline" have no other attrs + sorted_trace_data = trace_data.sort(by=args["x"], nulls_last=True) + y = sorted_trace_data.get_column(args["y"]) + x = sorted_trace_data.get_column(args["x"]) + + if x.dtype == nw.Datetime or x.dtype == nw.Date: + # convert to unix epoch seconds + x = _to_unix_epoch_seconds(x) + elif not x.dtype.is_numeric(): + try: + x = x.cast(nw.Float64()) + except ValueError: + raise ValueError( + "Could not convert value of 'x' ('%s') into a numeric type. " + "If 'x' contains stringified dates, please convert to a datetime column." + % args["x"] + ) + + if not y.dtype.is_numeric(): + try: + y = y.cast(nw.Float64()) + except ValueError: + raise ValueError( + "Could not convert value of 'y' into a numeric type." + ) + + # preserve original values of "x" in case they're dates + # otherwise numpy/pandas can mess with the timezones + # NB this means trendline functions must output one-to-one with the input series + # i.e. we can't do resampling, because then the X values might not line up! + non_missing = ~(x.is_null() | y.is_null()) + trace_patch["x"] = sorted_trace_data.filter(non_missing).get_column( + args["x"] + ) + if ( + trace_patch["x"].dtype == nw.Datetime + and trace_patch["x"].dtype.time_zone is not None + ): + # Remove time zone so that local time is displayed + trace_patch["x"] = ( + trace_patch["x"].dt.replace_time_zone(None).to_numpy() + ) + else: + trace_patch["x"] = trace_patch["x"].to_numpy() + + trendline_function = trendline_functions[attr_value] + y_out, hover_header, fit_results = trendline_function( + args["trendline_options"], + sorted_trace_data.get_column(args["x"]), # narwhals series + x.to_numpy(), # numpy array + y.to_numpy(), # numpy array + args["x"], + args["y"], + non_missing.to_numpy(), # numpy array + ) + assert len(y_out) == len(trace_patch["x"]), ( + "missing-data-handling failure in trendline code" + ) + trace_patch["y"] = y_out + mapping_labels[get_label(args, args["x"])] = "%{x}" + mapping_labels[get_label(args, args["y"])] = "%{y} (trend)" + elif attr_name.startswith("error"): + error_xy = attr_name[:7] + arr = "arrayminus" if attr_name.endswith("minus") else "array" + if error_xy not in trace_patch: + trace_patch[error_xy] = {} + trace_patch[error_xy][arr] = trace_data.get_column(attr_value) + elif attr_name == "custom_data": + if len(attr_value) > 0: + # here we store a data frame in customdata, and it's serialized + # as a list of row lists, which is what we want + trace_patch["customdata"] = trace_data.select(nw.col(attr_value)) + elif attr_name == "hover_name": + if trace_spec.constructor not in [ + go.Histogram, + go.Histogram2d, + go.Histogram2dContour, + ]: + trace_patch["hovertext"] = trace_data.get_column(attr_value) + if hover_header == "": + hover_header = "%{hovertext}

" + elif attr_name == "hover_data": + if trace_spec.constructor not in [ + go.Histogram, + go.Histogram2d, + go.Histogram2dContour, + ]: + hover_is_dict = isinstance(attr_value, dict) + customdata_cols = args.get("custom_data") or [] + for col in attr_value: + if hover_is_dict and not attr_value[col]: + continue + if col in [ + args.get("x"), + args.get("y"), + args.get("z"), + args.get("base"), + ]: + continue + try: + position = args["custom_data"].index(col) + except (ValueError, AttributeError, KeyError): + position = len(customdata_cols) + customdata_cols.append(col) + attr_label_col = get_decorated_label(args, col, None) + mapping_labels[attr_label_col] = "%%{customdata[%d]}" % ( + position + ) + + if len(customdata_cols) > 0: + # here we store a data frame in customdata, and it's serialized + # as a list of row lists, which is what we want + + # dict.fromkeys(customdata_cols) allows to deduplicate column + # names, yet maintaining the original order. + trace_patch["customdata"] = trace_data.select( + *[nw.col(c) for c in dict.fromkeys(customdata_cols)] + ) + elif attr_name == "color": + if trace_spec.constructor in [ + go.Choropleth, + go.Choroplethmap, + go.Choroplethmapbox, + ]: + trace_patch["z"] = trace_data.get_column(attr_value) + trace_patch["coloraxis"] = "coloraxis1" + mapping_labels[attr_label] = "%{z}" + elif trace_spec.constructor in [ + go.Sunburst, + go.Treemap, + go.Icicle, + go.Pie, + go.Funnelarea, + ]: + if "marker" not in trace_patch: + trace_patch["marker"] = dict() + + if args.get("color_is_continuous"): + trace_patch["marker"]["colors"] = trace_data.get_column( + attr_value + ) + trace_patch["marker"]["coloraxis"] = "coloraxis1" + mapping_labels[attr_label] = "%{color}" + else: + trace_patch["marker"]["colors"] = [] + if args["color_discrete_map"] is not None: + mapping = args["color_discrete_map"].copy() + else: + mapping = {} + for cat in trace_data.get_column(attr_value).to_list(): + # although trace_data.get_column(attr_value) is a Narwhals + # Series, which is an iterable, explicitly calling a to_list() + # makes sure that the elements we loop over are python objects + # in all cases, since depending on the backend this may not be + # the case (e.g. PyArrow) + if mapping.get(cat) is None: + mapping[cat] = args["color_discrete_sequence"][ + len(mapping) % len(args["color_discrete_sequence"]) + ] + trace_patch["marker"]["colors"].append(mapping[cat]) + else: + colorable = "marker" + if trace_spec.constructor in [go.Parcats, go.Parcoords]: + colorable = "line" + if colorable not in trace_patch: + trace_patch[colorable] = dict() + trace_patch[colorable]["color"] = trace_data.get_column(attr_value) + trace_patch[colorable]["coloraxis"] = "coloraxis1" + mapping_labels[attr_label] = "%%{%s.color}" % colorable + elif attr_name == "animation_group": + trace_patch["ids"] = trace_data.get_column(attr_value) + elif attr_name == "locations": + trace_patch[attr_name] = trace_data.get_column(attr_value) + mapping_labels[attr_label] = "%{location}" + elif attr_name == "values": + trace_patch[attr_name] = trace_data.get_column(attr_value) + _label = "value" if attr_label == "values" else attr_label + mapping_labels[_label] = "%{value}" + elif attr_name == "parents": + trace_patch[attr_name] = trace_data.get_column(attr_value) + _label = "parent" if attr_label == "parents" else attr_label + mapping_labels[_label] = "%{parent}" + elif attr_name == "ids": + trace_patch[attr_name] = trace_data.get_column(attr_value) + _label = "id" if attr_label == "ids" else attr_label + mapping_labels[_label] = "%{id}" + elif attr_name == "names": + if trace_spec.constructor in [ + go.Sunburst, + go.Treemap, + go.Icicle, + go.Pie, + go.Funnelarea, + ]: + trace_patch["labels"] = trace_data.get_column(attr_value) + _label = "label" if attr_label == "names" else attr_label + mapping_labels[_label] = "%{label}" + else: + trace_patch[attr_name] = trace_data.get_column(attr_value) + else: + trace_patch[attr_name] = trace_data.get_column(attr_value) + mapping_labels[attr_label] = "%%{%s}" % attr_name + elif (trace_spec.constructor == go.Histogram and attr_name in ["x", "y"]) or ( + trace_spec.constructor in [go.Histogram2d, go.Histogram2dContour] + and attr_name == "z" + ): + # ensure that stuff like "count" gets into the hoverlabel + mapping_labels[attr_label] = "%%{%s}" % attr_name + if trace_spec.constructor not in [go.Parcoords, go.Parcats]: + # Modify mapping_labels according to hover_data keys + # if hover_data is a dict + mapping_labels_copy = OrderedDict(mapping_labels) + if args["hover_data"] and isinstance(args["hover_data"], dict): + for k, v in mapping_labels.items(): + # We need to invert the mapping here + k_args = invert_label(args, k) + if k_args in args["hover_data"]: + formatter = args["hover_data"][k_args][0] + if formatter: + if isinstance(formatter, str): + mapping_labels_copy[k] = v.replace("}", "%s}" % formatter) + else: + _ = mapping_labels_copy.pop(k) + hover_lines = [k + "=" + v for k, v in mapping_labels_copy.items()] + trace_patch["hovertemplate"] = hover_header + "
".join(hover_lines) + trace_patch["hovertemplate"] += "" + return trace_patch, fit_results + + +def configure_axes(args, constructor, fig, orders): + configurators = { + go.Scatter3d: configure_3d_axes, + go.Scatterternary: configure_ternary_axes, + go.Scatterpolar: configure_polar_axes, + go.Scatterpolargl: configure_polar_axes, + go.Barpolar: configure_polar_axes, + go.Scattermap: configure_map, + go.Choroplethmap: configure_map, + go.Densitymap: configure_map, + go.Scattermapbox: configure_mapbox, + go.Choroplethmapbox: configure_mapbox, + go.Densitymapbox: configure_mapbox, + go.Scattergeo: configure_geo, + go.Choropleth: configure_geo, + } + for c in cartesians: + configurators[c] = configure_cartesian_axes + if constructor in configurators: + configurators[constructor](args, fig, orders) + + +def set_cartesian_axis_opts(args, axis, letter, orders): + log_key = "log_" + letter + range_key = "range_" + letter + if log_key in args and args[log_key]: + axis["type"] = "log" + if range_key in args and args[range_key]: + axis["range"] = [math.log(r, 10) for r in args[range_key]] + elif range_key in args and args[range_key]: + axis["range"] = args[range_key] + + if args[letter] in orders: + axis["categoryorder"] = "array" + axis["categoryarray"] = ( + orders[args[letter]] + if isinstance(axis, go.layout.XAxis) + else list(reversed(orders[args[letter]])) # top down for Y axis + ) + + +def configure_cartesian_marginal_axes(args, fig, orders): + nrows = len(fig._grid_ref) + ncols = len(fig._grid_ref[0]) + + # Set y-axis titles and axis options in the left-most column + for yaxis in fig.select_yaxes(col=1): + set_cartesian_axis_opts(args, yaxis, "y", orders) + + # Set x-axis titles and axis options in the bottom-most row + for xaxis in fig.select_xaxes(row=1): + set_cartesian_axis_opts(args, xaxis, "x", orders) + + # Configure axis ticks on marginal subplots + if args["marginal_x"]: + fig.update_yaxes( + showticklabels=False, showline=False, ticks="", range=None, row=nrows + ) + if args["template"].layout.yaxis.showgrid is None: + fig.update_yaxes(showgrid=args["marginal_x"] == "histogram", row=nrows) + if args["template"].layout.xaxis.showgrid is None: + fig.update_xaxes(showgrid=True, row=nrows) + + if args["marginal_y"]: + fig.update_xaxes( + showticklabels=False, showline=False, ticks="", range=None, col=ncols + ) + if args["template"].layout.xaxis.showgrid is None: + fig.update_xaxes(showgrid=args["marginal_y"] == "histogram", col=ncols) + if args["template"].layout.yaxis.showgrid is None: + fig.update_yaxes(showgrid=True, col=ncols) + + # Add axis titles to non-marginal subplots + y_title = get_decorated_label(args, args["y"], "y") + if args["marginal_x"]: + fig.update_yaxes(title_text=y_title, row=1, col=1) + else: + for row in range(1, nrows + 1): + fig.update_yaxes(title_text=y_title, row=row, col=1) + + x_title = get_decorated_label(args, args["x"], "x") + if args["marginal_y"]: + fig.update_xaxes(title_text=x_title, row=1, col=1) + else: + for col in range(1, ncols + 1): + fig.update_xaxes(title_text=x_title, row=1, col=col) + + # Configure axis type across all x-axes + if "log_x" in args and args["log_x"]: + fig.update_xaxes(type="log") + + # Configure axis type across all y-axes + if "log_y" in args and args["log_y"]: + fig.update_yaxes(type="log") + + # Configure matching and axis type for marginal y-axes + matches_y = "y" + str(ncols + 1) + if args["marginal_x"]: + for row in range(2, nrows + 1, 2): + fig.update_yaxes(matches=matches_y, type=None, row=row) + + if args["marginal_y"]: + for col in range(2, ncols + 1, 2): + fig.update_xaxes(matches="x2", type=None, col=col) + + +def configure_cartesian_axes(args, fig, orders): + if ("marginal_x" in args and args["marginal_x"]) or ( + "marginal_y" in args and args["marginal_y"] + ): + configure_cartesian_marginal_axes(args, fig, orders) + return + + # Set y-axis titles and axis options in the left-most column + y_title = get_decorated_label(args, args["y"], "y") + for yaxis in fig.select_yaxes(col=1): + yaxis.update(title_text=y_title) + set_cartesian_axis_opts(args, yaxis, "y", orders) + + # Set x-axis titles and axis options in the bottom-most row + x_title = get_decorated_label(args, args["x"], "x") + for xaxis in fig.select_xaxes(row=1): + if "is_timeline" not in args: + xaxis.update(title_text=x_title) + set_cartesian_axis_opts(args, xaxis, "x", orders) + + # Configure axis type across all x-axes + if "log_x" in args and args["log_x"]: + fig.update_xaxes(type="log") + + # Configure axis type across all y-axes + if "log_y" in args and args["log_y"]: + fig.update_yaxes(type="log") + + if "is_timeline" in args: + fig.update_xaxes(type="date") + + if "ecdfmode" in args: + if args["orientation"] == "v": + fig.update_yaxes(rangemode="tozero") + else: + fig.update_xaxes(rangemode="tozero") + + +def configure_ternary_axes(args, fig, orders): + fig.update_ternaries( + aaxis=dict(title_text=get_label(args, args["a"])), + baxis=dict(title_text=get_label(args, args["b"])), + caxis=dict(title_text=get_label(args, args["c"])), + ) + + +def configure_polar_axes(args, fig, orders): + patch = dict( + angularaxis=dict(direction=args["direction"], rotation=args["start_angle"]), + radialaxis=dict(), + ) + + for var, axis in [("r", "radialaxis"), ("theta", "angularaxis")]: + if args[var] in orders: + patch[axis]["categoryorder"] = "array" + patch[axis]["categoryarray"] = orders[args[var]] + + radialaxis = patch["radialaxis"] + if args["log_r"]: + radialaxis["type"] = "log" + if args["range_r"]: + radialaxis["range"] = [math.log(x, 10) for x in args["range_r"]] + else: + if args["range_r"]: + radialaxis["range"] = args["range_r"] + + if args["range_theta"]: + patch["sector"] = args["range_theta"] + fig.update_polars(patch) + + +def configure_3d_axes(args, fig, orders): + patch = dict( + xaxis=dict(title_text=get_label(args, args["x"])), + yaxis=dict(title_text=get_label(args, args["y"])), + zaxis=dict(title_text=get_label(args, args["z"])), + ) + + for letter in ["x", "y", "z"]: + axis = patch[letter + "axis"] + if args["log_" + letter]: + axis["type"] = "log" + if args["range_" + letter]: + axis["range"] = [math.log(x, 10) for x in args["range_" + letter]] + else: + if args["range_" + letter]: + axis["range"] = args["range_" + letter] + if args[letter] in orders: + axis["categoryorder"] = "array" + axis["categoryarray"] = orders[args[letter]] + fig.update_scenes(patch) + + +def configure_mapbox(args, fig, orders): + center = args["center"] + if not center and "lat" in args and "lon" in args: + center = dict( + lat=args["data_frame"][args["lat"]].mean(), + lon=args["data_frame"][args["lon"]].mean(), + ) + fig.update_mapboxes( + accesstoken=MAPBOX_TOKEN, + center=center, + zoom=args["zoom"], + style=args["mapbox_style"], + ) + + +def configure_map(args, fig, orders): + center = args["center"] + if not center and "lat" in args and "lon" in args: + center = dict( + lat=args["data_frame"][args["lat"]].mean(), + lon=args["data_frame"][args["lon"]].mean(), + ) + fig.update_maps( + center=center, + zoom=args["zoom"], + style=args["map_style"], + ) + + +def configure_geo(args, fig, orders): + fig.update_geos( + center=args["center"], + scope=args["scope"], + fitbounds=args["fitbounds"], + visible=args["basemap_visible"], + projection=dict(type=args["projection"]), + ) + + +def configure_animation_controls(args, constructor, fig): + def frame_args(duration): + return { + "frame": {"duration": duration, "redraw": constructor != go.Scatter}, + "mode": "immediate", + "fromcurrent": True, + "transition": {"duration": duration, "easing": "linear"}, + } + + if "animation_frame" in args and args["animation_frame"] and len(fig.frames) > 1: + fig.layout.updatemenus = [ + { + "buttons": [ + { + "args": [None, frame_args(500)], + "label": "▶", + "method": "animate", + }, + { + "args": [[None], frame_args(0)], + "label": "◼", + "method": "animate", + }, + ], + "direction": "left", + "pad": {"r": 10, "t": 70}, + "showactive": False, + "type": "buttons", + "x": 0.1, + "xanchor": "right", + "y": 0, + "yanchor": "top", + } + ] + fig.layout.sliders = [ + { + "active": 0, + "yanchor": "top", + "xanchor": "left", + "currentvalue": { + "prefix": get_label(args, args["animation_frame"]) + "=" + }, + "pad": {"b": 10, "t": 60}, + "len": 0.9, + "x": 0.1, + "y": 0, + "steps": [ + { + "args": [[f.name], frame_args(0)], + "label": f.name, + "method": "animate", + } + for f in fig.frames + ], + } + ] + + +def make_trace_spec(args, constructor, attrs, trace_patch): + if constructor in [go.Scatter, go.Scatterpolar]: + if "render_mode" in args and ( + args["render_mode"] == "webgl" + or ( + args["render_mode"] == "auto" + and len(args["data_frame"]) > 1000 + and args.get("line_shape") != "spline" + and args["animation_frame"] is None + ) + ): + if constructor == go.Scatter: + constructor = go.Scattergl + if "orientation" in trace_patch: + del trace_patch["orientation"] + else: + constructor = go.Scatterpolargl + # Create base trace specification + result = [TraceSpec(constructor, attrs, trace_patch, None)] + + # Add marginal trace specifications + for letter in ["x", "y"]: + if "marginal_" + letter in args and args["marginal_" + letter]: + trace_spec = None + axis_map = dict( + xaxis="x1" if letter == "x" else "x2", + yaxis="y1" if letter == "y" else "y2", + ) + if args["marginal_" + letter] == "histogram": + trace_spec = TraceSpec( + constructor=go.Histogram, + attrs=[letter, "marginal_" + letter], + trace_patch=dict(opacity=0.5, bingroup=letter, **axis_map), + marginal=letter, + ) + elif args["marginal_" + letter] == "violin": + trace_spec = TraceSpec( + constructor=go.Violin, + attrs=[letter, "hover_name", "hover_data"], + trace_patch=dict(scalegroup=letter), + marginal=letter, + ) + elif args["marginal_" + letter] == "box": + trace_spec = TraceSpec( + constructor=go.Box, + attrs=[letter, "hover_name", "hover_data"], + trace_patch=dict(notched=True), + marginal=letter, + ) + elif args["marginal_" + letter] == "rug": + symbols = {"x": "line-ns-open", "y": "line-ew-open"} + trace_spec = TraceSpec( + constructor=go.Box, + attrs=[letter, "hover_name", "hover_data"], + trace_patch=dict( + fillcolor="rgba(255,255,255,0)", + line={"color": "rgba(255,255,255,0)"}, + boxpoints="all", + jitter=0, + hoveron="points", + marker={"symbol": symbols[letter]}, + ), + marginal=letter, + ) + if "color" in attrs or "color" not in args: + if "marker" not in trace_spec.trace_patch: + trace_spec.trace_patch["marker"] = dict() + first_default_color = args["color_continuous_scale"][0] + trace_spec.trace_patch["marker"]["color"] = first_default_color + result.append(trace_spec) + + # Add trendline trace specifications + if args.get("trendline") and args.get("trendline_scope", "trace") == "trace": + result.append(make_trendline_spec(args, constructor)) + return result + + +def make_trendline_spec(args, constructor): + trace_spec = TraceSpec( + constructor=( + go.Scattergl + if constructor == go.Scattergl # could be contour + else go.Scatter + ), + attrs=["trendline"], + trace_patch=dict(mode="lines"), + marginal=None, + ) + if args["trendline_color_override"]: + trace_spec.trace_patch["line"] = dict(color=args["trendline_color_override"]) + return trace_spec + + +def one_group(x): + return "" + + +def apply_default_cascade(args, constructor): + # first we apply px.defaults to unspecified args + + for param in defaults.__slots__: + if param in args and args[param] is None: + args[param] = getattr(defaults, param) + + # load the default template if set, otherwise "plotly" + if args["template"] is None: + if pio.templates.default is not None: + args["template"] = pio.templates.default + else: + args["template"] = "plotly" + + try: + # retrieve the actual template if we were given a name + args["template"] = pio.templates[args["template"]] + except Exception: + # otherwise try to build a real template + args["template"] = go.layout.Template(args["template"]) + + # if colors not set explicitly or in px.defaults, defer to a template + # if the template doesn't have one, we set some final fallback defaults + if "color_continuous_scale" in args: + if ( + args["color_continuous_scale"] is None + and args["template"].layout.colorscale.sequential + ): + args["color_continuous_scale"] = [ + x[1] for x in args["template"].layout.colorscale.sequential + ] + if args["color_continuous_scale"] is None: + args["color_continuous_scale"] = sequential.Viridis + + # if color_discrete_sequence not set explicitly or in px.defaults, + # see if we can defer to template. Try trace-specific colors first, + # then layout.colorway, then set reasonable defaults + if "color_discrete_sequence" in args: + if args["color_discrete_sequence"] is None and constructor is not None: + if constructor == "timeline": + trace_type = "bar" + else: + trace_type = constructor().type + if trace_data_list := getattr(args["template"].data, trace_type, None): + trace_specific_colors = [ + trace_data.marker.color + for trace_data in trace_data_list + if hasattr(trace_data, "marker") + and hasattr(trace_data.marker, "color") + ] + # If template contains at least one color for this trace type, assign to color_discrete_sequence + if any(trace_specific_colors): + args["color_discrete_sequence"] = trace_specific_colors + # fallback to layout.colorway if trace-specific colors not available + if args["color_discrete_sequence"] is None and args["template"].layout.colorway: + args["color_discrete_sequence"] = args["template"].layout.colorway + # final fallback to default qualitative palette + if args["color_discrete_sequence"] is None: + args["color_discrete_sequence"] = qualitative.D3 + + # if symbol_sequence/line_dash_sequence not set explicitly or in px.defaults, + # see if we can defer to template. If not, set reasonable defaults + if "symbol_sequence" in args: + if args["symbol_sequence"] is None and args["template"].data.scatter: + args["symbol_sequence"] = [ + scatter.marker.symbol for scatter in args["template"].data.scatter + ] + if not args["symbol_sequence"] or not any(args["symbol_sequence"]): + args["symbol_sequence"] = ["circle", "diamond", "square", "x", "cross"] + + if "line_dash_sequence" in args: + if args["line_dash_sequence"] is None and args["template"].data.scatter: + args["line_dash_sequence"] = [ + scatter.line.dash for scatter in args["template"].data.scatter + ] + if not args["line_dash_sequence"] or not any(args["line_dash_sequence"]): + args["line_dash_sequence"] = [ + "solid", + "dot", + "dash", + "longdash", + "dashdot", + "longdashdot", + ] + + if "pattern_shape_sequence" in args: + if args["pattern_shape_sequence"] is None and args["template"].data.bar: + args["pattern_shape_sequence"] = [ + bar.marker.pattern.shape for bar in args["template"].data.bar + ] + if not args["pattern_shape_sequence"] or not any( + args["pattern_shape_sequence"] + ): + args["pattern_shape_sequence"] = ["", "/", "\\", "x", "+", "."] + + +def _check_name_not_reserved(field_name, reserved_names): + if field_name not in reserved_names: + return field_name + else: + raise NameError( + "A name conflict was encountered for argument '%s'. " + "A column or index with name '%s' is ambiguous." % (field_name, field_name) + ) + + +def _get_reserved_col_names(args): + """ + This function builds a list of columns of the data_frame argument used + as arguments, either as str/int arguments or given as columns + (pandas series type). + """ + df: nw.DataFrame = args["data_frame"] + reserved_names = set() + for field in args: + if field not in all_attrables: + continue + names = args[field] if field in array_attrables else [args[field]] + if names is None: + continue + for arg in names: + if arg is None: + continue + elif isinstance(arg, str): # no need to add ints since kw arg are not ints + reserved_names.add(arg) + elif nw.dependencies.is_into_series(arg): + arg_series = nw.from_native(arg, series_only=True) + arg_name = arg_series.name + if arg_name and arg_name in df.columns: + in_df = (arg_series == df.get_column(arg_name)).all() + if in_df: + reserved_names.add(arg_name) + elif arg is nw.maybe_get_index(df) and arg.name is not None: + reserved_names.add(arg.name) + + return reserved_names + + +def _is_col_list(columns, arg, is_pd_like, native_namespace): + """Returns True if arg looks like it's a list of columns or references to columns + in df_input, and False otherwise (in which case it's assumed to be a single column + or reference to a column). + """ + if arg is None or isinstance(arg, str) or isinstance(arg, int): + return False + if is_pd_like and isinstance(arg, native_namespace.MultiIndex): + return False # just to keep existing behaviour for now + try: + iter(arg) + except TypeError: + return False # not iterable + for c in arg: + if isinstance(c, str) or isinstance(c, int): + if columns is None or c not in columns: + return False + else: + try: + iter(c) + except TypeError: + return False # not iterable + return True + + +def _isinstance_listlike(x): + """Returns True if x is an iterable which can be transformed into a pandas Series, + False for the other types of possible values of a `hover_data` dict. + A tuple of length 2 is a special case corresponding to a (format, data) tuple. + """ + if ( + isinstance(x, str) + or (isinstance(x, tuple) and len(x) == 2) + or isinstance(x, bool) + or x is None + ): + return False + else: + return True + + +def _escape_col_name(columns, col_name, extra): + if columns is None: + return col_name + while col_name in columns or col_name in extra: + col_name = "_" + col_name + return col_name + + +def to_named_series(x, name=None, native_namespace=None): + """Assuming x is list-like or even an existing Series, returns a new Series named `name`.""" + # With `pass_through=True`, the original object will be returned if unable to convert + # to a Narwhals Series. + x = nw.from_native(x, series_only=True, pass_through=True) + if isinstance(x, nw.Series): + return x.rename(name) + elif native_namespace is not None: + return nw.new_series(name=name, values=x, native_namespace=native_namespace) + else: + try: + import pandas as pd + + return nw.new_series(name=name, values=x, native_namespace=pd) + except ImportError: + msg = "Pandas installation is required if no dataframe is provided." + raise NotImplementedError(msg) + + +def process_args_into_dataframe( + args, wide_mode, var_name, value_name, is_pd_like, native_namespace +): + """ + After this function runs, the `all_attrables` keys of `args` all contain only + references to columns of `df_output`. This function handles the extraction of data + from `args["attrable"]` and column-name-generation as appropriate, and adds the + data to `df_output` and then replaces `args["attrable"]` with the appropriate + reference. + """ + + df_input: nw.DataFrame | None = args["data_frame"] + df_provided = df_input is not None + + # we use a dict instead of a dataframe directly so that it doesn't cause + # PerformanceWarning by pandas by repeatedly setting the columns. + # a dict is used instead of a list as the columns needs to be overwritten. + df_output = {} + constants = {} + ranges = [] + wide_id_vars = set() + reserved_names = _get_reserved_col_names(args) if df_provided else set() + + # Case of functions with a "dimensions" kw: scatter_matrix, parcats, parcoords + if "dimensions" in args and args["dimensions"] is None: + if not df_provided: + raise ValueError( + "No data were provided. Please provide data either with the `data_frame` or with the `dimensions` argument." + ) + else: + df_output = {col: df_input.get_column(col) for col in df_input.columns} + + # hover_data is a dict + hover_data_is_dict = ( + "hover_data" in args + and args["hover_data"] + and isinstance(args["hover_data"], dict) + ) + # If dict, convert all values of hover_data to tuples to simplify processing + if hover_data_is_dict: + for k in args["hover_data"]: + if _isinstance_listlike(args["hover_data"][k]): + args["hover_data"][k] = (True, args["hover_data"][k]) + if not isinstance(args["hover_data"][k], tuple): + args["hover_data"][k] = (args["hover_data"][k], None) + if df_provided and args["hover_data"][k][1] is not None and k in df_input: + raise ValueError( + "Ambiguous input: values for '%s' appear both in hover_data and data_frame" + % k + ) + # Loop over possible arguments + for field_name in all_attrables: + # Massaging variables + argument_list = ( + [args.get(field_name)] + if field_name not in array_attrables + else args.get(field_name) + ) + + # argument not specified, continue + # The original also tested `or argument_list is [None]` but + # that clause is always False, so it has been removed. The + # alternative fix would have been to test that `argument_list` + # is of length 1 and its sole element is `None`, but that + # feels pedantic. All tests pass with the change below; let's + # see if the world decides we were wrong. + if argument_list is None: + continue + + # Argument name: field_name if the argument is not a list + # Else we give names like ["hover_data_0, hover_data_1"] etc. + field_list = ( + [field_name] + if field_name not in array_attrables + else [field_name + "_" + str(i) for i in range(len(argument_list))] + ) + # argument_list and field_list ready, iterate over them + # Core of the loop starts here + for i, (argument, field) in enumerate(zip(argument_list, field_list)): + length = len(df_output[next(iter(df_output))]) if len(df_output) else 0 + if argument is None: + continue + col_name = None + # Case of multiindex + if is_pd_like and isinstance(argument, native_namespace.MultiIndex): + raise TypeError( + f"Argument '{field}' is a {native_namespace.__name__} MultiIndex. " + f"{native_namespace.__name__} MultiIndex is not supported by plotly " + "express at the moment." + ) + # ----------------- argument is a special value ---------------------- + if isinstance(argument, (Constant, Range)): + col_name = _check_name_not_reserved( + str(argument.label) if argument.label is not None else field, + reserved_names, + ) + if isinstance(argument, Constant): + constants[col_name] = argument.value + else: + ranges.append(col_name) + # ----------------- argument is likely a col name ---------------------- + elif isinstance(argument, str) or not hasattr(argument, "__len__"): + if ( + field_name == "hover_data" + and hover_data_is_dict + and args["hover_data"][str(argument)][1] is not None + ): + # hover_data has onboard data + # previously-checked to have no name-conflict with data_frame + col_name = str(argument) + real_argument = args["hover_data"][col_name][1] + + if length and (real_length := len(real_argument)) != length: + raise ValueError( + "All arguments should have the same length. " + "The length of hover_data key `%s` is %d, whereas the " + "length of previously-processed arguments %s is %d" + % ( + argument, + real_length, + str(list(df_output.keys())), + length, + ) + ) + df_output[col_name] = to_named_series( + real_argument, col_name, native_namespace + ) + elif not df_provided: + raise ValueError( + "String or int arguments are only possible when a " + "DataFrame or an array is provided in the `data_frame` " + "argument. No DataFrame was provided, but argument " + "'%s' is of type str or int." % field + ) + # Check validity of column name + elif argument not in df_input.columns: + if wide_mode and argument in (value_name, var_name): + continue + else: + err_msg = ( + "Value of '%s' is not the name of a column in 'data_frame'. " + "Expected one of %s but received: %s" + % (field, str(list(df_input.columns)), argument) + ) + if argument == "index": + err_msg += "\n To use the index, pass it in directly as `df.index`." + raise ValueError(err_msg) + elif length and (actual_len := len(df_input)) != length: + raise ValueError( + "All arguments should have the same length. " + "The length of column argument `df[%s]` is %d, whereas the " + "length of previously-processed arguments %s is %d" + % ( + field, + actual_len, + str(list(df_output.keys())), + length, + ) + ) + else: + col_name = str(argument) + df_output[col_name] = to_named_series( + df_input.get_column(argument), col_name + ) + # ----------------- argument is likely a column / array / list.... ------- + else: + if df_provided and hasattr(argument, "name"): + if is_pd_like and argument is nw.maybe_get_index(df_input): + if argument.name is None or argument.name in df_input.columns: + col_name = "index" + else: + col_name = argument.name + col_name = _escape_col_name( + df_input.columns, col_name, [var_name, value_name] + ) + else: + if ( + argument.name is not None + and argument.name in df_input.columns + and ( + to_named_series( + argument, argument.name, native_namespace + ) + == df_input.get_column(argument.name) + ).all() + ): + col_name = argument.name + if col_name is None: # numpy array, list... + col_name = _check_name_not_reserved(field, reserved_names) + + if length and (len_arg := len(argument)) != length: + raise ValueError( + "All arguments should have the same length. " + "The length of argument `%s` is %d, whereas the " + "length of previously-processed arguments %s is %d" + % (field, len_arg, str(list(df_output.keys())), length) + ) + + df_output[str(col_name)] = to_named_series( + x=argument, + name=str(col_name), + native_namespace=native_namespace, + ) + + # Finally, update argument with column name now that column exists + assert col_name is not None, ( + "Data-frame processing failure, likely due to a internal bug. " + "Please report this to " + "https://github.com/plotly/plotly.py/issues/new and we will try to " + "replicate and fix it." + ) + if field_name not in array_attrables: + args[field_name] = str(col_name) + elif isinstance(args[field_name], dict): + pass + else: + args[field_name][i] = str(col_name) + if field_name != "wide_variable": + wide_id_vars.add(str(col_name)) + + length = len(df_output[next(iter(df_output))]) if len(df_output) else 0 + + if native_namespace is None: + try: + import pandas as pd + + native_namespace = pd + except ImportError: + msg = "Pandas installation is required if no dataframe is provided." + raise NotImplementedError(msg) + + if ranges: + import numpy as np + + range_series = nw.new_series( + name="__placeholder__", + values=np.arange(length), + native_namespace=native_namespace, + ) + df_output.update( + {col_name: range_series.alias(col_name) for col_name in ranges} + ) + + df_output.update( + { + # constant is single value. repeat by len to avoid creating NaN on concatenating + col_name: nw.new_series( + name=col_name, + values=[constants[col_name]] * length, + native_namespace=native_namespace, + ) + for col_name in constants + } + ) + + if df_output: + df_output = nw.from_dict(df_output) + else: + try: + import pandas as pd + except ImportError: + msg = "Pandas installation is required." + raise NotImplementedError(msg) + df_output = nw.from_native(pd.DataFrame({}), eager_only=True) + return df_output, wide_id_vars + + +def build_dataframe(args, constructor): + """ + Constructs a dataframe and modifies `args` in-place. + + The argument values in `args` can be either strings corresponding to + existing columns of a dataframe, or data arrays (lists, numpy arrays, + pandas columns, series). + + Parameters + ---------- + args : OrderedDict + arguments passed to the px function and subsequently modified + constructor : graph_object trace class + the trace type selected for this figure + """ + + # make copies of all the fields via dict() and list() + for field in args: + if field in array_attrables and args[field] is not None: + if isinstance(args[field], dict): + args[field] = dict(args[field]) + elif field in ["custom_data", "hover_data"] and isinstance( + args[field], str + ): + args[field] = [args[field]] + else: + args[field] = list(args[field]) + + # Cast data_frame argument to DataFrame (it could be a numpy array, dict etc.) + df_provided = args["data_frame"] is not None + + # Flag that indicates if the resulting data_frame after parsing is pandas-like + # (in terms of resulting Narwhals DataFrame). + # True if pandas, modin.pandas or cudf DataFrame/Series instance, or converted from + # PySpark to pandas. + is_pd_like = False + + # Flag that indicates if data_frame needs to be converted to PyArrow. + # True if Ibis, DuckDB, Vaex, or implements __dataframe__ + needs_interchanging = False + + # If data_frame is provided, we parse it into a narwhals DataFrame, while accounting + # for compatibility with pandas specific paths (e.g. Index/MultiIndex case). + if df_provided: + # data_frame is pandas-like DataFrame (pandas, modin.pandas, cudf) + if nw.dependencies.is_pandas_like_dataframe(args["data_frame"]): + columns = args["data_frame"].columns # This can be multi index + args["data_frame"] = nw.from_native(args["data_frame"], eager_only=True) + is_pd_like = True + + # data_frame is pandas-like Series (pandas, modin.pandas, cudf) + elif nw.dependencies.is_pandas_like_series(args["data_frame"]): + args["data_frame"] = nw.from_native( + args["data_frame"], series_only=True + ).to_frame() + columns = args["data_frame"].columns + is_pd_like = True + + # data_frame is any other DataFrame object natively supported via Narwhals. + # With `pass_through=True`, the original object will be returned if unable to convert + # to a Narwhals DataFrame, making this condition False. + elif isinstance( + data_frame := nw.from_native( + args["data_frame"], eager_or_interchange_only=True, pass_through=True + ), + nw.DataFrame, + ): + args["data_frame"] = data_frame + needs_interchanging = nw.get_level(data_frame) == "interchange" + columns = args["data_frame"].columns + + # data_frame is any other Series object natively supported via Narwhals. + # With `pass_through=True`, the original object will be returned if unable to convert + # to a Narwhals Series, making this condition False. + elif isinstance( + series := nw.from_native( + args["data_frame"], series_only=True, pass_through=True + ), + nw.Series, + ): + args["data_frame"] = series.to_frame() + columns = args["data_frame"].columns + + # data_frame is PySpark: it does not support interchange protocol and it is not + # integrated in Narwhals. We use its native method to convert it to pandas. + elif hasattr(args["data_frame"], "toPandas"): + args["data_frame"] = nw.from_native( + args["data_frame"].toPandas(), eager_only=True + ) + columns = args["data_frame"].columns + is_pd_like = True + + # data_frame is some other object type (e.g. dict, list, ...) + # We try to import pandas, and then try to instantiate a pandas dataframe from + # this such object + else: + try: + import pandas as pd + + try: + args["data_frame"] = nw.from_native( + pd.DataFrame(args["data_frame"]) + ) + columns = args["data_frame"].columns + is_pd_like = True + except Exception: + msg = ( + f"Unable to convert data_frame of type {type(args['data_frame'])} " + "to pandas DataFrame. Please provide a supported dataframe type " + "or a type that can be passed to pd.DataFrame." + ) + + raise NotImplementedError(msg) + except ImportError: + msg = ( + f"Attempting to convert data_frame of type {type(args['data_frame'])} " + "to pandas DataFrame, but Pandas is not installed. " + "Convert it to supported dataframe type or install pandas." + ) + raise NotImplementedError(msg) + + # data_frame is not provided + else: + columns = None + + df_input: nw.DataFrame | None = args["data_frame"] + index = ( + nw.maybe_get_index(df_input) + if df_provided and not needs_interchanging + else None + ) + native_namespace = ( + nw.get_native_namespace(df_input) + if df_provided and not needs_interchanging + else None + ) + + # now we handle special cases like wide-mode or x-xor-y specification + # by rearranging args to tee things up for process_args_into_dataframe to work + no_x = args.get("x") is None + no_y = args.get("y") is None + wide_x = ( + False + if no_x + else _is_col_list(columns, args["x"], is_pd_like, native_namespace) + ) + wide_y = ( + False + if no_y + else _is_col_list(columns, args["y"], is_pd_like, native_namespace) + ) + + wide_mode = False + var_name = None # will likely be "variable" in wide_mode + wide_cross_name = None # will likely be "index" in wide_mode + value_name = None # will likely be "value" in wide_mode + hist2d_types = [go.Histogram2d, go.Histogram2dContour] + hist1d_orientation = constructor == go.Histogram or "ecdfmode" in args + if constructor in cartesians: + if wide_x and wide_y: + raise ValueError( + "Cannot accept list of column references or list of columns for both `x` and `y`." + ) + if df_provided and no_x and no_y: + wide_mode = True + if is_pd_like and isinstance(columns, native_namespace.MultiIndex): + raise TypeError( + f"Data frame columns is a {native_namespace.__name__} MultiIndex. " + f"{native_namespace.__name__} MultiIndex is not supported by plotly " + "express at the moment." + ) + args["wide_variable"] = list(columns) + if is_pd_like and isinstance(columns, native_namespace.Index): + var_name = columns.name + else: + var_name = None + if var_name in [None, "value", "index"] or var_name in columns: + var_name = "variable" + if constructor == go.Funnel: + wide_orientation = args.get("orientation") or "h" + else: + wide_orientation = args.get("orientation") or "v" + args["orientation"] = wide_orientation + args["wide_cross"] = None + elif wide_x != wide_y: + wide_mode = True + args["wide_variable"] = args["y"] if wide_y else args["x"] + if df_provided and is_pd_like and args["wide_variable"] is columns: + var_name = columns.name + if is_pd_like and isinstance(args["wide_variable"], native_namespace.Index): + args["wide_variable"] = list(args["wide_variable"]) + if var_name in [None, "value", "index"] or ( + df_provided and var_name in columns + ): + var_name = "variable" + if hist1d_orientation: + wide_orientation = "v" if wide_x else "h" + else: + wide_orientation = "v" if wide_y else "h" + args["y" if wide_y else "x"] = None + args["wide_cross"] = None + if not no_x and not no_y: + wide_cross_name = "__x__" if wide_y else "__y__" + + if wide_mode: + value_name = _escape_col_name(columns, "value", []) + var_name = _escape_col_name(columns, var_name, []) + + # If the data_frame has interchange-only support levelin Narwhals, then we need to + # convert it to a full support level backend. + # Hence we convert requires Interchange to PyArrow. + if needs_interchanging: + if wide_mode: + args["data_frame"] = nw.from_native( + args["data_frame"].to_arrow(), eager_only=True + ) + else: + # Save precious resources by only interchanging columns that are + # actually going to be plotted. This is tricky to do in the general case, + # because Plotly allows calls like `px.line(df, x='x', y=['y1', df['y1']])`, + # but interchange-only objects (e.g. DuckDB) don't typically have a concept + # of self-standing Series. It's more important to perform project pushdown + # here seeing as we're materialising to an (eager) PyArrow table. + necessary_columns = { + i for i in args.values() if isinstance(i, str) and i in columns + } + for field in args: + if args[field] is not None and field in array_attrables: + necessary_columns.update(i for i in args[field] if i in columns) + columns = list(necessary_columns) + args["data_frame"] = nw.from_native( + args["data_frame"].select(columns).to_arrow(), eager_only=True + ) + import pyarrow as pa + + native_namespace = pa + missing_bar_dim = None + if ( + constructor in [go.Scatter, go.Bar, go.Funnel] + hist2d_types + and not hist1d_orientation + ): + if not wide_mode and (no_x != no_y): + for ax in ["x", "y"]: + if args.get(ax) is None: + args[ax] = ( + index + if index is not None + else Range( + label=_escape_col_name(columns, ax, [var_name, value_name]) + ) + ) + if constructor == go.Bar: + missing_bar_dim = ax + else: + if args["orientation"] is None: + args["orientation"] = "v" if ax == "x" else "h" + if wide_mode and wide_cross_name is None: + if no_x != no_y and args["orientation"] is None: + args["orientation"] = "v" if no_x else "h" + if df_provided and is_pd_like and index is not None: + if isinstance(index, native_namespace.MultiIndex): + raise TypeError( + f"Data frame index is a {native_namespace.__name__} MultiIndex. " + f"{native_namespace.__name__} MultiIndex is not supported by " + "plotly express at the moment." + ) + args["wide_cross"] = index + else: + args["wide_cross"] = Range( + label=_escape_col_name(columns, "index", [var_name, value_name]) + ) + + no_color = False + if isinstance(args.get("color"), str) and args["color"] == NO_COLOR: + no_color = True + args["color"] = None + # now that things have been prepped, we do the systematic rewriting of `args` + + df_output, wide_id_vars = process_args_into_dataframe( + args, + wide_mode, + var_name, + value_name, + is_pd_like, + native_namespace, + ) + df_output: nw.DataFrame + # now that `df_output` exists and `args` contains only references, we complete + # the special-case and wide-mode handling by further rewriting args and/or mutating + # df_output + + count_name = _escape_col_name(df_output.columns, "count", [var_name, value_name]) + if not wide_mode and missing_bar_dim and constructor == go.Bar: + # now that we've populated df_output, we check to see if the non-missing + # dimension is categorical: if so, then setting the missing dimension to a + # constant 1 is a less-insane thing to do than setting it to the index by + # default and we let the normal auto-orientation-code do its thing later + other_dim = "x" if missing_bar_dim == "y" else "y" + if not _is_continuous(df_output, args[other_dim]): + args[missing_bar_dim] = count_name + df_output = df_output.with_columns(nw.lit(1).alias(count_name)) + else: + # on the other hand, if the non-missing dimension is continuous, then we + # can use this information to override the normal auto-orientation code + if args["orientation"] is None: + args["orientation"] = "v" if missing_bar_dim == "x" else "h" + + if constructor in hist2d_types: + del args["orientation"] + + if wide_mode: + # at this point, `df_output` is semi-long/semi-wide, but we know which columns + # are which, so we melt it and reassign `args` to refer to the newly-tidy + # columns, keeping track of various names and manglings set up above + wide_value_vars = [c for c in args["wide_variable"] if c not in wide_id_vars] + del args["wide_variable"] + if wide_cross_name == "__x__": + wide_cross_name = args["x"] + elif wide_cross_name == "__y__": + wide_cross_name = args["y"] + else: + wide_cross_name = args["wide_cross"] + del args["wide_cross"] + dtype = None + for v in wide_value_vars: + v_dtype = df_output.get_column(v).dtype + v_dtype = "number" if v_dtype.is_numeric() else str(v_dtype) + if dtype is None: + dtype = v_dtype + elif dtype != v_dtype: + raise ValueError( + "Plotly Express cannot process wide-form data with columns of different type." + ) + df_output = df_output.unpivot( + index=wide_id_vars, + on=wide_value_vars, + variable_name=var_name, + value_name=value_name, + ) + assert len(df_output.columns) == len(set(df_output.columns)), ( + "Wide-mode name-inference failure, likely due to a internal bug. " + "Please report this to " + "https://github.com/plotly/plotly.py/issues/new and we will try to " + "replicate and fix it." + ) + df_output = df_output.with_columns(nw.col(var_name).cast(nw.String)) + orient_v = wide_orientation == "v" + + if hist1d_orientation: + args["x" if orient_v else "y"] = value_name + args["y" if orient_v else "x"] = wide_cross_name + args["color"] = args["color"] or var_name + elif constructor in [go.Scatter, go.Funnel] + hist2d_types: + args["x" if orient_v else "y"] = wide_cross_name + args["y" if orient_v else "x"] = value_name + if constructor != go.Histogram2d: + args["color"] = args["color"] or var_name + if "line_group" in args: + args["line_group"] = args["line_group"] or var_name + elif constructor == go.Bar: + if _is_continuous(df_output, value_name): + args["x" if orient_v else "y"] = wide_cross_name + args["y" if orient_v else "x"] = value_name + args["color"] = args["color"] or var_name + else: + args["x" if orient_v else "y"] = value_name + args["y" if orient_v else "x"] = count_name + df_output = df_output.with_columns(nw.lit(1).alias(count_name)) + args["color"] = args["color"] or var_name + elif constructor in [go.Violin, go.Box]: + args["x" if orient_v else "y"] = wide_cross_name or var_name + args["y" if orient_v else "x"] = value_name + + if hist1d_orientation and constructor == go.Scatter: + if args["x"] is not None and args["y"] is not None: + args["histfunc"] = "sum" + elif args["x"] is None: + args["histfunc"] = None + args["orientation"] = "h" + args["x"] = count_name + df_output = df_output.with_columns(nw.lit(1).alias(count_name)) + else: + args["histfunc"] = None + args["orientation"] = "v" + args["y"] = count_name + df_output = df_output.with_columns(nw.lit(1).alias(count_name)) + + if no_color: + args["color"] = None + args["data_frame"] = df_output + return args + + +def _check_dataframe_all_leaves(df: nw.DataFrame) -> None: + cols = df.columns + df_sorted = df.sort(by=cols, descending=False, nulls_last=True) + null_mask = df_sorted.select(nw.all().is_null()) + df_sorted = df_sorted.select(nw.all().cast(nw.String())) + null_indices_mask = null_mask.select( + null_mask=nw.any_horizontal(nw.all()) + ).get_column("null_mask") + + null_mask_filtered = null_mask.filter(null_indices_mask) + if not null_mask_filtered.is_empty(): + for col_idx in range(1, null_mask_filtered.shape[1]): + # For each row, if a True value is encountered, then check that + # all values in subsequent columns are also True + null_entries_with_non_null_children = ( + ~null_mask_filtered[:, col_idx] & null_mask_filtered[:, col_idx - 1] + ) + if nw.to_py_scalar(null_entries_with_non_null_children.any()): + row_idx = null_entries_with_non_null_children.to_list().index(True) + raise ValueError( + "None entries cannot have not-None children", + df_sorted.row(row_idx), + ) + + fill_series = nw.new_series( + name="fill_value", + values=[""] * len(df_sorted), + dtype=nw.String(), + native_namespace=nw.get_native_namespace(df_sorted), + ) + df_sorted = df_sorted.with_columns( + **{ + c: df_sorted.get_column(c).zip_with(~null_mask.get_column(c), fill_series) + for c in cols + } + ) + + # Conversion to list is due to python native vs pyarrow scalars + row_strings = ( + df_sorted.select( + row_strings=nw.concat_str(cols, separator="", ignore_nulls=False) + ) + .get_column("row_strings") + .to_list() + ) + + null_indices = set(null_indices_mask.arg_true().to_list()) + for i, (current_row, next_row) in enumerate( + zip(row_strings[:-1], row_strings[1:]), start=1 + ): + if (next_row in current_row) and (i in null_indices): + raise ValueError( + "Non-leaves rows are not permitted in the dataframe \n", + df_sorted.row(i), + "is not a leaf.", + ) + + +def process_dataframe_hierarchy(args): + """ + Build dataframe for sunburst, treemap, or icicle when the path argument is provided. + """ + df: nw.DataFrame = args["data_frame"] + path = args["path"][::-1] + _check_dataframe_all_leaves(df[path[::-1]]) + discrete_color = not _is_continuous(df, args["color"]) if args["color"] else False + + df = df.lazy() + + new_path = [col_name + "_path_copy" for col_name in path] + df = df.with_columns( + nw.col(col_name).alias(new_col_name) + for new_col_name, col_name in zip(new_path, path) + ) + path = new_path + # ------------ Define aggregation functions -------------------------------- + agg_f = {} + if args["values"]: + try: + df = df.with_columns(nw.col(args["values"]).cast(nw.Float64())) + + except Exception: # pandas, Polars and pyarrow exception types are different + raise ValueError( + "Column `%s` of `df` could not be converted to a numerical data type." + % args["values"] + ) + + if args["color"] and args["color"] == args["values"]: + new_value_col_name = args["values"] + "_sum" + df = df.with_columns(nw.col(args["values"]).alias(new_value_col_name)) + args["values"] = new_value_col_name + count_colname = args["values"] + else: + # we need a count column for the first groupby and the weighted mean of color + # trick to be sure the col name is unused: take the sum of existing names + columns = df.collect_schema().names() + count_colname = ( + "count" if "count" not in columns else "".join([str(el) for el in columns]) + ) + # we can modify df because it's a copy of the px argument + df = df.with_columns(nw.lit(1).alias(count_colname)) + args["values"] = count_colname + + # Since count_colname is always in agg_f, it can be used later to normalize color + # in the continuous case after some gymnastic + agg_f[count_colname] = nw.sum(count_colname) + + discrete_aggs = [] + continuous_aggs = [] + + n_unique_token = _generate_temporary_column_name( + n_bytes=16, columns=df.collect_schema().names() + ) + + # In theory, for discrete columns aggregation, we should have a way to do + # `.agg(nw.col(x).unique())` in group_by and successively unpack/parse it as: + # ``` + # (nw.when(nw.col(x).list.len()==1) + # .then(nw.col(x).list.first()) + # .otherwise(nw.lit("(?)")) + # ) + # ``` + # which replicates the original pandas only codebase: + # ``` + # def discrete_agg(x): + # uniques = x.unique() + # return uniques[0] if len(uniques) == 1 else "(?)" + # + # df.groupby(path[i:]).agg(...) + # ``` + # However this is not possible, therefore the following workaround is provided. + # We make two aggregations for the same column: + # - take the max value + # - take the number of unique values + # Finally, after the group by statement, it is unpacked via: + # ``` + # (nw.when(nw.col(col_n_unique) == 1) + # .then(nw.col(col_max_value)) # which is the unique value + # .otherwise(nw.lit("(?)")) + # ) + # ``` + + if args["color"]: + if discrete_color: + discrete_aggs.append(args["color"]) + agg_f[args["color"]] = nw.col(args["color"]).max() + agg_f[f"{args['color']}{n_unique_token}"] = ( + nw.col(args["color"]) + .n_unique() + .alias(f"{args['color']}{n_unique_token}") + ) + else: + # This first needs to be multiplied by `count_colname` + continuous_aggs.append(args["color"]) + + agg_f[args["color"]] = nw.sum(args["color"]) + + # Other columns (for color, hover_data, custom_data etc.) + cols = list(set(df.collect_schema().names()).difference(path)) + df = df.with_columns(nw.col(c).cast(nw.String()) for c in cols if c not in agg_f) + + for col in cols: # for hover_data, custom_data etc. + if col not in agg_f: + # Similar trick as above + discrete_aggs.append(col) + agg_f[col] = nw.col(col).max() + agg_f[f"{col}{n_unique_token}"] = ( + nw.col(col).n_unique().alias(f"{col}{n_unique_token}") + ) + # Avoid collisions with reserved names - columns in the path have been copied already + cols = list(set(cols) - set(["labels", "parent", "id"])) + # ---------------------------------------------------------------------------- + all_trees = [] + + if args["color"] and not discrete_color: + df = df.with_columns( + (nw.col(args["color"]) * nw.col(count_colname)).alias(args["color"]) + ) + + def post_agg(dframe: nw.LazyFrame, continuous_aggs, discrete_aggs) -> nw.LazyFrame: + """ + - continuous_aggs is either [] or [args["color"]] + - discrete_aggs is either [args["color"], ] or [] + """ + return dframe.with_columns( + *[nw.col(col) / nw.col(count_colname) for col in continuous_aggs], + *[ + ( + nw.when(nw.col(f"{col}{n_unique_token}") == 1) + .then(nw.col(col)) + .otherwise(nw.lit("(?)")) + .alias(col) + ) + for col in discrete_aggs + ], + ).drop([f"{col}{n_unique_token}" for col in discrete_aggs]) + + for i, level in enumerate(path): + dfg = ( + df.group_by(path[i:], drop_null_keys=True) + .agg(**agg_f) + .pipe(post_agg, continuous_aggs, discrete_aggs) + ) + + # Path label massaging + df_tree = dfg.with_columns( + *cols, + labels=nw.col(level).cast(nw.String()), + parent=nw.lit(""), + id=nw.col(level).cast(nw.String()), + ) + if i < len(path) - 1: + _concat_str_token = _generate_temporary_column_name( + n_bytes=16, columns=[*cols, "labels", "parent", "id"] + ) + df_tree = ( + df_tree.with_columns( + nw.concat_str( + [ + nw.col(path[j]).cast(nw.String()) + for j in range(len(path) - 1, i, -1) + ], + separator="/", + ).alias(_concat_str_token) + ) + .with_columns( + parent=nw.concat_str( + [nw.col(_concat_str_token), nw.col("parent")], separator="/" + ), + id=nw.concat_str( + [nw.col(_concat_str_token), nw.col("id")], separator="/" + ), + ) + .drop(_concat_str_token) + ) + + # strip "/" if at the end of the string, equivalent to `.str.rstrip` + df_tree = df_tree.with_columns( + parent=nw.col("parent").str.replace("/?$", "").str.replace("^/?", "") + ) + + all_trees.append(df_tree.select(*["labels", "parent", "id", *cols])) + + df_all_trees = nw.maybe_reset_index(nw.concat(all_trees, how="vertical").collect()) + + # we want to make sure than (?) is the first color of the sequence + if args["color"] and discrete_color: + sort_col_name = "sort_color_if_discrete_color" + while sort_col_name in df_all_trees.columns: + sort_col_name += "0" + df_all_trees = df_all_trees.with_columns( + nw.col(args["color"]).cast(nw.String()).alias(sort_col_name) + ).sort(by=sort_col_name, nulls_last=True) + + # Now modify arguments + args["data_frame"] = df_all_trees + args["path"] = None + args["ids"] = "id" + args["names"] = "labels" + args["parents"] = "parent" + if args["color"]: + if not args["hover_data"]: + args["hover_data"] = [args["color"]] + elif isinstance(args["hover_data"], dict): + if not args["hover_data"].get(args["color"]): + args["hover_data"][args["color"]] = (True, None) + else: + args["hover_data"].append(args["color"]) + return args + + +def process_dataframe_timeline(args): + """ + Massage input for bar traces for px.timeline() + """ + args["is_timeline"] = True + if args["x_start"] is None or args["x_end"] is None: + raise ValueError("Both x_start and x_end are required") + + df: nw.DataFrame = args["data_frame"] + schema = df.schema + to_convert_to_datetime = [ + col + for col in [args["x_start"], args["x_end"]] + if schema[col] != nw.Datetime and schema[col] != nw.Date + ] + + if to_convert_to_datetime: + try: + df = df.with_columns(nw.col(to_convert_to_datetime).str.to_datetime()) + except Exception as exc: + raise TypeError( + "Both x_start and x_end must refer to data convertible to datetimes." + ) from exc + + # note that we are not adding any columns to the data frame here, so no risk of overwrite + args["data_frame"] = df.with_columns( + (nw.col(args["x_end"]) - nw.col(args["x_start"])) + .dt.total_milliseconds() + .alias(args["x_end"]) + ) + args["x"] = args["x_end"] + args["base"] = args["x_start"] + del args["x_start"], args["x_end"] + return args + + +def process_dataframe_pie(args, trace_patch): + import numpy as np + + names = args.get("names") + if names is None: + return args, trace_patch + order_in = args["category_orders"].get(names, {}).copy() + if not order_in: + return args, trace_patch + df: nw.DataFrame = args["data_frame"] + trace_patch["sort"] = False + trace_patch["direction"] = "clockwise" + uniques = df.get_column(names).unique(maintain_order=True).to_list() + order = [x for x in OrderedDict.fromkeys(list(order_in) + uniques) if x in uniques] + + # Sort args['data_frame'] by column `names` according to order `order`. + token = nw.generate_temporary_column_name(8, df.columns) + args["data_frame"] = ( + df.with_columns( + nw.col(names) + .replace_strict(order, np.arange(len(order)), return_dtype=nw.UInt32) + .alias(token) + ) + .sort(token) + .drop(token) + ) + return args, trace_patch + + +def infer_config(args, constructor, trace_patch, layout_patch): + attrs = [k for k in direct_attrables + array_attrables if k in args] + grouped_attrs = [] + df: nw.DataFrame = args["data_frame"] + + # Compute sizeref + sizeref = 0 + if "size" in args and args["size"]: + sizeref = ( + nw.to_py_scalar(df.get_column(args["size"]).max()) / args["size_max"] ** 2 + ) + + # Compute color attributes and grouping attributes + if "color" in args: + if "color_continuous_scale" in args: + if "color_discrete_sequence" not in args: + attrs.append("color") + else: + if args["color"] and _is_continuous(df, args["color"]): + attrs.append("color") + args["color_is_continuous"] = True + elif constructor in [go.Sunburst, go.Treemap, go.Icicle]: + attrs.append("color") + args["color_is_continuous"] = False + else: + grouped_attrs.append("marker.color") + elif "line_group" in args or constructor == go.Histogram2dContour: + grouped_attrs.append("line.color") + elif constructor in [go.Pie, go.Funnelarea]: + attrs.append("color") + if args["color"]: + if args["hover_data"] is None: + args["hover_data"] = [] + args["hover_data"].append(args["color"]) + else: + grouped_attrs.append("marker.color") + + show_colorbar = bool( + "color" in attrs + and args["color"] + and constructor not in [go.Pie, go.Funnelarea] + and ( + constructor not in [go.Treemap, go.Sunburst, go.Icicle] + or args.get("color_is_continuous") + ) + ) + else: + show_colorbar = False + + if "line_dash" in args: + grouped_attrs.append("line.dash") + + if "symbol" in args: + grouped_attrs.append("marker.symbol") + + if "pattern_shape" in args: + if constructor in [go.Scatter]: + grouped_attrs.append("fillpattern.shape") + else: + grouped_attrs.append("marker.pattern.shape") + + if "orientation" in args: + has_x = args["x"] is not None + has_y = args["y"] is not None + if args["orientation"] is None: + if constructor in [go.Histogram, go.Scatter]: + if has_y and not has_x: + args["orientation"] = "h" + elif constructor in [go.Violin, go.Box, go.Bar, go.Funnel]: + if has_x and not has_y: + args["orientation"] = "h" + + if args["orientation"] is None and has_x and has_y: + x_is_continuous = _is_continuous(df, args["x"]) + y_is_continuous = _is_continuous(df, args["y"]) + if x_is_continuous and not y_is_continuous: + args["orientation"] = "h" + if y_is_continuous and not x_is_continuous: + args["orientation"] = "v" + + if args["orientation"] is None: + args["orientation"] = "v" + + if constructor == go.Histogram: + if has_x and has_y and args["histfunc"] is None: + args["histfunc"] = trace_patch["histfunc"] = "sum" + + orientation = args["orientation"] + nbins = args["nbins"] + trace_patch["nbinsx"] = nbins if orientation == "v" else None + trace_patch["nbinsy"] = None if orientation == "v" else nbins + trace_patch["bingroup"] = "x" if orientation == "v" else "y" + trace_patch["orientation"] = args["orientation"] + + if constructor in [go.Violin, go.Box]: + mode = "boxmode" if constructor == go.Box else "violinmode" + if layout_patch[mode] is None and args["color"] is not None: + if args["y"] == args["color"] and args["orientation"] == "h": + layout_patch[mode] = "overlay" + elif args["x"] == args["color"] and args["orientation"] == "v": + layout_patch[mode] = "overlay" + if layout_patch[mode] is None: + layout_patch[mode] = "group" + + if ( + constructor == go.Histogram2d + and args["z"] is not None + and args["histfunc"] is None + ): + args["histfunc"] = trace_patch["histfunc"] = "sum" + + if args.get("text_auto", False) is not False: + if constructor in [go.Histogram2d, go.Histogram2dContour]: + letter = "z" + elif constructor == go.Bar: + letter = "y" if args["orientation"] == "v" else "x" + else: + letter = "value" + if args["text_auto"] is True: + trace_patch["texttemplate"] = "%{" + letter + "}" + else: + trace_patch["texttemplate"] = "%{" + letter + ":" + args["text_auto"] + "}" + + if constructor in [go.Histogram2d, go.Densitymap, go.Densitymapbox]: + show_colorbar = True + trace_patch["coloraxis"] = "coloraxis1" + + if "opacity" in args: + if args["opacity"] is None: + if "barmode" in args and args["barmode"] == "overlay": + trace_patch["marker"] = dict(opacity=0.5) + elif constructor in [ + go.Densitymap, + go.Densitymapbox, + go.Pie, + go.Funnel, + go.Funnelarea, + ]: + trace_patch["opacity"] = args["opacity"] + else: + trace_patch["marker"] = dict(opacity=args["opacity"]) + if ( + "line_group" in args or "line_dash" in args + ): # px.line, px.line_*, px.area, px.ecdf + modes = set() + if args.get("lines", True): + modes.add("lines") + if args.get("text") or args.get("symbol") or args.get("markers"): + modes.add("markers") + if args.get("text"): + modes.add("text") + if len(modes) == 0: + modes.add("lines") + trace_patch["mode"] = "+".join(sorted(modes)) + elif constructor != go.Splom and ( + "symbol" in args or constructor in [go.Scattermap, go.Scattermapbox] + ): + trace_patch["mode"] = "markers" + ("+text" if args["text"] else "") + + if "line_shape" in args: + trace_patch["line"] = dict(shape=args["line_shape"]) + elif "ecdfmode" in args: + trace_patch["line"] = dict( + shape="vh" if args["ecdfmode"] == "reversed" else "hv" + ) + + if "geojson" in args: + trace_patch["featureidkey"] = args["featureidkey"] + trace_patch["geojson"] = ( + args["geojson"] + if not hasattr(args["geojson"], "__geo_interface__") # for geopandas + else args["geojson"].__geo_interface__ + ) + + # Compute marginal attribute: copy to appropriate marginal_* + if "marginal" in args: + position = "marginal_x" if args["orientation"] == "v" else "marginal_y" + other_position = "marginal_x" if args["orientation"] == "h" else "marginal_y" + args[position] = args["marginal"] + args[other_position] = None + + # Ignore facet rows and columns when data frame is empty so as to prevent nrows/ncols equaling 0 + if df.is_empty(): + args["facet_row"] = args["facet_col"] = None + + # If both marginals and faceting are specified, faceting wins + if args.get("facet_col") is not None and args.get("marginal_y") is not None: + args["marginal_y"] = None + + if args.get("facet_row") is not None and args.get("marginal_x") is not None: + args["marginal_x"] = None + + # facet_col_wrap only works if no marginals or row faceting is used + if ( + args.get("marginal_x") is not None + or args.get("marginal_y") is not None + or args.get("facet_row") is not None + ): + args["facet_col_wrap"] = 0 + + if "trendline" in args and args["trendline"] is not None: + if args["trendline"] not in trendline_functions: + raise ValueError( + "Value '%s' for `trendline` must be one of %s" + % (args["trendline"], trendline_functions.keys()) + ) + + if "trendline_options" in args and args["trendline_options"] is None: + args["trendline_options"] = dict() + + if "ecdfnorm" in args: + if args.get("ecdfnorm", None) not in [None, "percent", "probability"]: + raise ValueError( + "`ecdfnorm` must be one of None, 'percent' or 'probability'. " + + "'%s' was provided." % args["ecdfnorm"] + ) + args["histnorm"] = args["ecdfnorm"] + + # Compute applicable grouping attributes + grouped_attrs.extend([k for k in group_attrables if k in args]) + + # Create grouped mappings + grouped_mappings = [make_mapping(args, a) for a in grouped_attrs] + + # Create trace specs + trace_specs = make_trace_spec(args, constructor, attrs, trace_patch) + return trace_specs, grouped_mappings, sizeref, show_colorbar + + +def get_groups_and_orders(args, grouper): + """ + `orders` is the user-supplied ordering with the remaining data-frame-supplied + ordering appended if the column is used for grouping. It includes anything the user + gave, for any variable, including values not present in the dataset. It's a dict + where the keys are e.g. "x" or "color" + + `groups` is the dicts of groups, ordered by the order above. Its keys are + tuples like [("value1", ""), ("value2", "")] where each tuple contains the name + of a single dimension-group + """ + orders = {} if "category_orders" not in args else args["category_orders"].copy() + df: nw.DataFrame = args["data_frame"] + # figure out orders and what the single group name would be if there were one + single_group_name = [] + unique_cache = dict() + + for i, col in enumerate(grouper): + if col == one_group: + single_group_name.append("") + else: + if col not in unique_cache: + unique_cache[col] = ( + df.get_column(col).unique(maintain_order=True).to_list() + ) + uniques = unique_cache[col] + if len(uniques) == 1: + single_group_name.append(uniques[0]) + if col not in orders: + orders[col] = uniques + else: + orders[col] = list(OrderedDict.fromkeys(list(orders[col]) + uniques)) + + if len(single_group_name) == len(grouper): + # we have a single group, so we can skip all group-by operations! + groups = {tuple(single_group_name): df} + else: + required_grouper = [group for group in orders if group in grouper] + grouped = dict(df.group_by(required_grouper, drop_null_keys=True).__iter__()) + + sorted_group_names = sorted( + grouped.keys(), + key=lambda values: [ + orders[group].index(value) if value in orders[group] else -1 + for group, value in zip(required_grouper, values) + ], + ) + + # calculate the full group_names by inserting "" in the tuple index for one_group groups + full_sorted_group_names = [ + tuple( + [ + ( + "" + if col == one_group + else sub_group_names[required_grouper.index(col)] + ) + for col in grouper + ] + ) + for sub_group_names in sorted_group_names + ] + + groups = { + sf: grouped[s] for sf, s in zip(full_sorted_group_names, sorted_group_names) + } + return groups, orders + + +def make_figure(args, constructor, trace_patch=None, layout_patch=None): + trace_patch = trace_patch or {} + layout_patch = layout_patch or {} + apply_default_cascade(args, constructor=constructor) + + args = build_dataframe(args, constructor) + if constructor in [go.Treemap, go.Sunburst, go.Icicle] and args["path"] is not None: + args = process_dataframe_hierarchy(args) + if constructor in [go.Pie]: + args, trace_patch = process_dataframe_pie(args, trace_patch) + if constructor == "timeline": + constructor = go.Bar + args = process_dataframe_timeline(args) + + # If we have marginal histograms, set barmode to "overlay" + if "histogram" in [args.get("marginal_x"), args.get("marginal_y")]: + layout_patch["barmode"] = "overlay" + + trace_specs, grouped_mappings, sizeref, show_colorbar = infer_config( + args, constructor, trace_patch, layout_patch + ) + grouper = [x.grouper or one_group for x in grouped_mappings] or [one_group] + groups, orders = get_groups_and_orders(args, grouper) + + col_labels = [] + row_labels = [] + nrows = ncols = 1 + for m in grouped_mappings: + if m.grouper not in orders: + m.val_map[""] = m.sequence[0] + else: + sorted_values = orders[m.grouper] + if m.facet == "col": + prefix = get_label(args, args["facet_col"]) + "=" + col_labels = [prefix + str(s) for s in sorted_values] + ncols = len(col_labels) + if m.facet == "row": + prefix = get_label(args, args["facet_row"]) + "=" + row_labels = [prefix + str(s) for s in sorted_values] + nrows = len(row_labels) + for val in sorted_values: + if val not in m.val_map: # always False if it's an IdentityMap + m.val_map[val] = m.sequence[len(m.val_map) % len(m.sequence)] + + subplot_type = _subplot_type_for_trace_type(constructor().type) + + trace_names_by_frame = {} + frames = OrderedDict() + trendline_rows = [] + trace_name_labels = None + facet_col_wrap = args.get("facet_col_wrap", 0) + for group_name, group in groups.items(): + mapping_labels = OrderedDict() + trace_name_labels = OrderedDict() + frame_name = "" + for col, val, m in zip(grouper, group_name, grouped_mappings): + if col != one_group: + key = get_label(args, col) + if not isinstance(m.val_map, IdentityMap): + mapping_labels[key] = str(val) + if m.show_in_trace_name: + trace_name_labels[key] = str(val) + if m.variable == "animation_frame": + frame_name = val + trace_name = ", ".join(trace_name_labels.values()) + if frame_name not in trace_names_by_frame: + trace_names_by_frame[frame_name] = set() + trace_names = trace_names_by_frame[frame_name] + + for trace_spec in trace_specs: + # Create the trace + trace = trace_spec.constructor(name=trace_name) + if trace_spec.constructor not in [ + go.Parcats, + go.Parcoords, + go.Choropleth, + go.Choroplethmap, + go.Choroplethmapbox, + go.Densitymap, + go.Densitymapbox, + go.Histogram2d, + go.Sunburst, + go.Treemap, + go.Icicle, + ]: + trace.update( + legendgroup=trace_name, + showlegend=(trace_name != "" and trace_name not in trace_names), + ) + + # Set 'offsetgroup' only in group barmode (or if no barmode is set) + barmode = layout_patch.get("barmode") + if trace_spec.constructor in [go.Bar, go.Box, go.Violin, go.Histogram] and ( + barmode == "group" or barmode is None + ): + trace.update(alignmentgroup=True, offsetgroup=trace_name) + trace_names.add(trace_name) + + # Init subplot row/col + trace._subplot_row = 1 + trace._subplot_col = 1 + + for i, m in enumerate(grouped_mappings): + val = group_name[i] + try: + m.updater(trace, m.val_map[val]) # covers most cases + except ValueError: + # this catches some odd cases like marginals + if ( + trace_spec != trace_specs[0] + and ( + trace_spec.constructor in [go.Violin, go.Box] + and m.variable in ["symbol", "pattern", "dash"] + ) + or ( + trace_spec.constructor in [go.Histogram] + and m.variable in ["symbol", "dash"] + ) + ): + pass + elif ( + trace_spec != trace_specs[0] + and trace_spec.constructor in [go.Histogram] + and m.variable == "color" + ): + trace.update(marker=dict(color=m.val_map[val])) + elif ( + trace_spec.constructor + in [go.Choropleth, go.Choroplethmap, go.Choroplethmapbox] + and m.variable == "color" + ): + trace.update( + z=[1] * len(group), + colorscale=[m.val_map[val]] * 2, + showscale=False, + showlegend=True, + ) + else: + raise + + # Find row for trace, handling facet_row and marginal_x + if m.facet == "row": + row = m.val_map[val] + else: + if ( + args.get("marginal_x") is not None # there is a marginal + and trace_spec.marginal != "x" # and we're not it + ): + row = 2 + else: + row = 1 + + # Find col for trace, handling facet_col and marginal_y + if m.facet == "col": + col = m.val_map[val] + if facet_col_wrap: # assumes no facet_row, no marginals + row = 1 + ((col - 1) // facet_col_wrap) + col = 1 + ((col - 1) % facet_col_wrap) + else: + if trace_spec.marginal == "y": + col = 2 + else: + col = 1 + + if row > 1: + trace._subplot_row = row + + if col > 1: + trace._subplot_col = col + if ( + trace_specs[0].constructor == go.Histogram2dContour + and trace_spec.constructor == go.Box + and trace.line.color + ): + trace.update(marker=dict(color=trace.line.color)) + + if "ecdfmode" in args: + base = args["x"] if args["orientation"] == "v" else args["y"] + var = args["x"] if args["orientation"] == "h" else args["y"] + ascending = args.get("ecdfmode", "standard") != "reversed" + group = group.sort(by=base, descending=not ascending, nulls_last=True) + group_sum = group.get_column( + var + ).sum() # compute here before next line mutates + group = group.with_columns(nw.col(var).cum_sum().alias(var)) + if not ascending: + group = group.sort(by=base, descending=False, nulls_last=True) + + if args.get("ecdfmode", "standard") == "complementary": + group = group.with_columns((group_sum - nw.col(var)).alias(var)) + + if args["ecdfnorm"] == "probability": + group = group.with_columns(nw.col(var) / group_sum) + elif args["ecdfnorm"] == "percent": + group = group.with_columns((nw.col(var) / group_sum) * 100.0) + + patch, fit_results = make_trace_kwargs( + args, trace_spec, group, mapping_labels.copy(), sizeref + ) + trace.update(patch) + if fit_results is not None: + trendline_rows.append(mapping_labels.copy()) + trendline_rows[-1]["px_fit_results"] = fit_results + if frame_name not in frames: + frames[frame_name] = dict(data=[], name=frame_name) + frames[frame_name]["data"].append(trace) + frame_list = [f for f in frames.values()] + if len(frame_list) > 1: + frame_list = sorted( + frame_list, key=lambda f: orders[args["animation_frame"]].index(f["name"]) + ) + + if show_colorbar: + colorvar = ( + "z" + if constructor in [go.Histogram2d, go.Densitymap, go.Densitymapbox] + else "color" + ) + range_color = args["range_color"] or [None, None] + + colorscale_validator = ColorscaleValidator("colorscale", "make_figure") + layout_patch["coloraxis1"] = dict( + colorscale=colorscale_validator.validate_coerce( + args["color_continuous_scale"] + ), + cmid=args["color_continuous_midpoint"], + cmin=range_color[0], + cmax=range_color[1], + colorbar=dict( + title_text=get_decorated_label(args, args[colorvar], colorvar) + ), + ) + for v in ["height", "width"]: + if args[v]: + layout_patch[v] = args[v] + layout_patch["legend"] = dict(tracegroupgap=0) + if trace_name_labels: + layout_patch["legend"]["title_text"] = ", ".join(trace_name_labels) + if args["title"]: + layout_patch["title_text"] = args["title"] + elif args["template"].layout.margin.t is None: + layout_patch["margin"] = {"t": 60} + if args["subtitle"]: + layout_patch["title_subtitle_text"] = args["subtitle"] + if ( + "size" in args + and args["size"] + and args["template"].layout.legend.itemsizing is None + ): + layout_patch["legend"]["itemsizing"] = "constant" + + if facet_col_wrap: + nrows = math.ceil(ncols / facet_col_wrap) + ncols = min(ncols, facet_col_wrap) + + if args.get("marginal_x") is not None: + nrows += 1 + + if args.get("marginal_y") is not None: + ncols += 1 + + fig = init_figure( + args, subplot_type, frame_list, nrows, ncols, col_labels, row_labels + ) + + # Position traces in subplots + for frame in frame_list: + for trace in frame["data"]: + if isinstance(trace, go.Splom): + # Special case that is not compatible with make_subplots + continue + + _set_trace_grid_reference( + trace, + fig.layout, + fig._grid_ref, + nrows - trace._subplot_row + 1, + trace._subplot_col, + ) + + # Add traces, layout and frames to figure + fig.add_traces(frame_list[0]["data"] if len(frame_list) > 0 else []) + fig.update_layout(layout_patch) + if "template" in args and args["template"] is not None: + fig.update_layout(template=args["template"], overwrite=True) + for f in frame_list: + f["name"] = str(f["name"]) + fig.frames = frame_list if len(frames) > 1 else [] + + if args.get("trendline") and args.get("trendline_scope", "trace") == "overall": + trendline_spec = make_trendline_spec(args, constructor) + trendline_trace = trendline_spec.constructor( + name="Overall Trendline", legendgroup="Overall Trendline", showlegend=False + ) + if "line" not in trendline_spec.trace_patch: # no color override + for m in grouped_mappings: + if m.variable == "color": + next_color = m.sequence[len(m.val_map) % len(m.sequence)] + trendline_spec.trace_patch["line"] = dict(color=next_color) + patch, fit_results = make_trace_kwargs( + args, trendline_spec, args["data_frame"], {}, sizeref + ) + trendline_trace.update(patch) + fig.add_trace( + trendline_trace, row="all", col="all", exclude_empty_subplots=True + ) + fig.update_traces(selector=-1, showlegend=True) + if fit_results is not None: + trendline_rows.append(dict(px_fit_results=fit_results)) + + if trendline_rows: + try: + import pandas as pd + + fig._px_trendlines = pd.DataFrame(trendline_rows) + except ImportError: + msg = "Trendlines require pandas to be installed." + raise NotImplementedError(msg) + else: + fig._px_trendlines = [] + + configure_axes(args, constructor, fig, orders) + configure_animation_controls(args, constructor, fig) + return fig + + +def init_figure(args, subplot_type, frame_list, nrows, ncols, col_labels, row_labels): + # Build subplot specs + specs = [[dict(type=subplot_type or "domain")] * ncols for _ in range(nrows)] + + # Default row/column widths uniform + column_widths = [1.0] * ncols + row_heights = [1.0] * nrows + facet_col_wrap = args.get("facet_col_wrap", 0) + + # Build column_widths/row_heights + if subplot_type == "xy": + if args.get("marginal_x") is not None: + if args["marginal_x"] == "histogram" or ("color" in args and args["color"]): + main_size = 0.74 + else: + main_size = 0.84 + + row_heights = [main_size] * (nrows - 1) + [1 - main_size] + vertical_spacing = 0.01 + elif facet_col_wrap: + vertical_spacing = args.get("facet_row_spacing") or 0.07 + else: + vertical_spacing = args.get("facet_row_spacing") or 0.03 + + if args.get("marginal_y") is not None: + if args["marginal_y"] == "histogram" or ("color" in args and args["color"]): + main_size = 0.74 + else: + main_size = 0.84 + + column_widths = [main_size] * (ncols - 1) + [1 - main_size] + horizontal_spacing = 0.005 + else: + horizontal_spacing = args.get("facet_col_spacing") or 0.02 + else: + # Other subplot types: + # 'scene', 'geo', 'polar', 'ternary', 'mapbox', 'domain', None + # + # We can customize subplot spacing per type once we enable faceting + # for all plot types + if facet_col_wrap: + vertical_spacing = args.get("facet_row_spacing") or 0.07 + else: + vertical_spacing = args.get("facet_row_spacing") or 0.03 + horizontal_spacing = args.get("facet_col_spacing") or 0.02 + + if facet_col_wrap: + subplot_labels = [None] * nrows * ncols + while len(col_labels) < nrows * ncols: + col_labels.append(None) + for i in range(nrows): + for j in range(ncols): + subplot_labels[i * ncols + j] = col_labels[(nrows - 1 - i) * ncols + j] + + def _spacing_error_translator(e, direction, facet_arg): + """ + Translates the spacing errors thrown by the underlying make_subplots + routine into one that describes an argument adjustable through px. + """ + if ("%s spacing" % (direction,)) in e.args[0]: + e.args = ( + e.args[0] + + """ +Use the {facet_arg} argument to adjust this spacing.""".format(facet_arg=facet_arg), + ) + raise e + + # Create figure with subplots + try: + fig = make_subplots( + rows=nrows, + cols=ncols, + specs=specs, + shared_xaxes="all", + shared_yaxes="all", + row_titles=[] if facet_col_wrap else list(reversed(row_labels)), + column_titles=[] if facet_col_wrap else col_labels, + subplot_titles=subplot_labels if facet_col_wrap else [], + horizontal_spacing=horizontal_spacing, + vertical_spacing=vertical_spacing, + row_heights=row_heights, + column_widths=column_widths, + start_cell="bottom-left", + ) + except ValueError as e: + _spacing_error_translator(e, "Horizontal", "facet_col_spacing") + _spacing_error_translator(e, "Vertical", "facet_row_spacing") + raise + + # Remove explicit font size of row/col titles so template can take over + for annot in fig.layout.annotations: + annot.update(font=None) + + return fig diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/express/_doc.py b/.venv_haddock/lib/python3.12/site-packages/plotly/express/_doc.py new file mode 100644 index 0000000000000000000000000000000000000000..59faac4c0b3b7c0520a51de972b28cd83911ad58 --- /dev/null +++ b/.venv_haddock/lib/python3.12/site-packages/plotly/express/_doc.py @@ -0,0 +1,640 @@ +import inspect +from textwrap import TextWrapper + +try: + getfullargspec = inspect.getfullargspec +except AttributeError: # python 2 + getfullargspec = inspect.getargspec + + +colref_type = "str or int or Series or array-like" +colref_desc = "Either a name of a column in `data_frame`, or a pandas Series or array_like object." +colref_list_type = "list of str or int, or Series or array-like" +colref_list_desc = ( + "Either names of columns in `data_frame`, or pandas Series, or array_like objects" +) + +docs = dict( + data_frame=[ + "DataFrame or array-like or dict", + "This argument needs to be passed for column names (and not keyword names) to be used.", + "Array-like and dict are transformed internally to a pandas DataFrame.", + "Optional: if missing, a DataFrame gets constructed under the hood using the other arguments.", + ], + x=[ + colref_type, + colref_desc, + "Values from this column or array_like are used to position marks along the x axis in cartesian coordinates.", + ], + y=[ + colref_type, + colref_desc, + "Values from this column or array_like are used to position marks along the y axis in cartesian coordinates.", + ], + z=[ + colref_type, + colref_desc, + "Values from this column or array_like are used to position marks along the z axis in cartesian coordinates.", + ], + x_start=[ + colref_type, + colref_desc, + "(required)", + "Values from this column or array_like are used to position marks along the x axis in cartesian coordinates.", + ], + x_end=[ + colref_type, + colref_desc, + "(required)", + "Values from this column or array_like are used to position marks along the x axis in cartesian coordinates.", + ], + a=[ + colref_type, + colref_desc, + "Values from this column or array_like are used to position marks along the a axis in ternary coordinates.", + ], + b=[ + colref_type, + colref_desc, + "Values from this column or array_like are used to position marks along the b axis in ternary coordinates.", + ], + c=[ + colref_type, + colref_desc, + "Values from this column or array_like are used to position marks along the c axis in ternary coordinates.", + ], + r=[ + colref_type, + colref_desc, + "Values from this column or array_like are used to position marks along the radial axis in polar coordinates.", + ], + theta=[ + colref_type, + colref_desc, + "Values from this column or array_like are used to position marks along the angular axis in polar coordinates.", + ], + values=[ + colref_type, + colref_desc, + "Values from this column or array_like are used to set values associated to sectors.", + ], + parents=[ + colref_type, + colref_desc, + "Values from this column or array_like are used as parents in sunburst and treemap charts.", + ], + ids=[ + colref_type, + colref_desc, + "Values from this column or array_like are used to set ids of sectors", + ], + path=[ + colref_list_type, + colref_list_desc, + "List of columns names or columns of a rectangular dataframe defining the hierarchy of sectors, from root to leaves.", + "An error is raised if path AND ids or parents is passed", + ], + lat=[ + colref_type, + colref_desc, + "Values from this column or array_like are used to position marks according to latitude on a map.", + ], + lon=[ + colref_type, + colref_desc, + "Values from this column or array_like are used to position marks according to longitude on a map.", + ], + locations=[ + colref_type, + colref_desc, + "Values from this column or array_like are to be interpreted according to `locationmode` and mapped to longitude/latitude.", + ], + base=[ + colref_type, + colref_desc, + "Values from this column or array_like are used to position the base of the bar.", + ], + dimensions=[ + colref_list_type, + colref_list_desc, + "Values from these columns are used for multidimensional visualization.", + ], + dimensions_max_cardinality=[ + "int (default 50)", + "When `dimensions` is `None` and `data_frame` is provided, " + "columns with more than this number of unique values are excluded from the output.", + "Not used when `dimensions` is passed.", + ], + error_x=[ + colref_type, + colref_desc, + "Values from this column or array_like are used to size x-axis error bars.", + "If `error_x_minus` is `None`, error bars will be symmetrical, otherwise `error_x` is used for the positive direction only.", + ], + error_x_minus=[ + colref_type, + colref_desc, + "Values from this column or array_like are used to size x-axis error bars in the negative direction.", + "Ignored if `error_x` is `None`.", + ], + error_y=[ + colref_type, + colref_desc, + "Values from this column or array_like are used to size y-axis error bars.", + "If `error_y_minus` is `None`, error bars will be symmetrical, otherwise `error_y` is used for the positive direction only.", + ], + error_y_minus=[ + colref_type, + colref_desc, + "Values from this column or array_like are used to size y-axis error bars in the negative direction.", + "Ignored if `error_y` is `None`.", + ], + error_z=[ + colref_type, + colref_desc, + "Values from this column or array_like are used to size z-axis error bars.", + "If `error_z_minus` is `None`, error bars will be symmetrical, otherwise `error_z` is used for the positive direction only.", + ], + error_z_minus=[ + colref_type, + colref_desc, + "Values from this column or array_like are used to size z-axis error bars in the negative direction.", + "Ignored if `error_z` is `None`.", + ], + color=[ + colref_type, + colref_desc, + "Values from this column or array_like are used to assign color to marks.", + ], + opacity=["float", "Value between 0 and 1. Sets the opacity for markers."], + line_dash=[ + colref_type, + colref_desc, + "Values from this column or array_like are used to assign dash-patterns to lines.", + ], + line_group=[ + colref_type, + colref_desc, + "Values from this column or array_like are used to group rows of `data_frame` into lines.", + ], + symbol=[ + colref_type, + colref_desc, + "Values from this column or array_like are used to assign symbols to marks.", + ], + pattern_shape=[ + colref_type, + colref_desc, + "Values from this column or array_like are used to assign pattern shapes to marks.", + ], + size=[ + colref_type, + colref_desc, + "Values from this column or array_like are used to assign mark sizes.", + ], + radius=["int (default is 30)", "Sets the radius of influence of each point."], + hover_name=[ + colref_type, + colref_desc, + "Values from this column or array_like appear in bold in the hover tooltip.", + ], + hover_data=[ + "str, or list of str or int, or Series or array-like, or dict", + "Either a name or list of names of columns in `data_frame`, or pandas Series,", + "or array_like objects", + "or a dict with column names as keys, with values True (for default formatting)", + "False (in order to remove this column from hover information),", + "or a formatting string, for example ':.3f' or '|%a'", + "or list-like data to appear in the hover tooltip", + "or tuples with a bool or formatting string as first element,", + "and list-like data to appear in hover as second element", + "Values from these columns appear as extra data in the hover tooltip.", + ], + custom_data=[ + "str, or list of str or int, or Series or array-like", + "Either name or list of names of columns in `data_frame`, or pandas Series, or array_like objects", + "Values from these columns are extra data, to be used in widgets or Dash callbacks for example. This data is not user-visible but is included in events emitted by the figure (lasso selection etc.)", + ], + text=[ + colref_type, + colref_desc, + "Values from this column or array_like appear in the figure as text labels.", + ], + names=[ + colref_type, + colref_desc, + "Values from this column or array_like are used as labels for sectors.", + ], + locationmode=[ + "str", + "One of 'ISO-3', 'USA-states', or 'country names'", + "Determines the set of locations used to match entries in `locations` to regions on the map.", + ], + facet_row=[ + colref_type, + colref_desc, + "Values from this column or array_like are used to assign marks to facetted subplots in the vertical direction.", + ], + facet_col=[ + colref_type, + colref_desc, + "Values from this column or array_like are used to assign marks to facetted subplots in the horizontal direction.", + ], + facet_col_wrap=[ + "int", + "Maximum number of facet columns.", + "Wraps the column variable at this width, so that the column facets span multiple rows.", + "Ignored if 0, and forced to 0 if `facet_row` or a `marginal` is set.", + ], + facet_row_spacing=[ + "float between 0 and 1", + "Spacing between facet rows, in paper units. Default is 0.03 or 0.07 when facet_col_wrap is used.", + ], + facet_col_spacing=[ + "float between 0 and 1", + "Spacing between facet columns, in paper units Default is 0.02.", + ], + animation_frame=[ + colref_type, + colref_desc, + "Values from this column or array_like are used to assign marks to animation frames.", + ], + animation_group=[ + colref_type, + colref_desc, + "Values from this column or array_like are used to provide object-constancy across animation frames: rows with matching `animation_group`s will be treated as if they describe the same object in each frame.", + ], + symbol_sequence=[ + "list of str", + "Strings should define valid plotly.js symbols.", + "When `symbol` is set, values in that column are assigned symbols by cycling through `symbol_sequence` in the order described in `category_orders`, unless the value of `symbol` is a key in `symbol_map`.", + ], + symbol_map=[ + "dict with str keys and str values (default `{}`)", + "String values should define plotly.js symbols", + "Used to override `symbol_sequence` to assign a specific symbols to marks corresponding with specific values.", + "Keys in `symbol_map` should be values in the column denoted by `symbol`.", + "Alternatively, if the values of `symbol` are valid symbol names, the string `'identity'` may be passed to cause them to be used directly.", + ], + line_dash_map=[ + "dict with str keys and str values (default `{}`)", + "Strings values define plotly.js dash-patterns.", + "Used to override `line_dash_sequences` to assign a specific dash-patterns to lines corresponding with specific values.", + "Keys in `line_dash_map` should be values in the column denoted by `line_dash`.", + "Alternatively, if the values of `line_dash` are valid line-dash names, the string `'identity'` may be passed to cause them to be used directly.", + ], + line_dash_sequence=[ + "list of str", + "Strings should define valid plotly.js dash-patterns.", + "When `line_dash` is set, values in that column are assigned dash-patterns by cycling through `line_dash_sequence` in the order described in `category_orders`, unless the value of `line_dash` is a key in `line_dash_map`.", + ], + pattern_shape_map=[ + "dict with str keys and str values (default `{}`)", + "Strings values define plotly.js patterns-shapes.", + "Used to override `pattern_shape_sequences` to assign a specific patterns-shapes to lines corresponding with specific values.", + "Keys in `pattern_shape_map` should be values in the column denoted by `pattern_shape`.", + "Alternatively, if the values of `pattern_shape` are valid patterns-shapes names, the string `'identity'` may be passed to cause them to be used directly.", + ], + pattern_shape_sequence=[ + "list of str", + "Strings should define valid plotly.js patterns-shapes.", + "When `pattern_shape` is set, values in that column are assigned patterns-shapes by cycling through `pattern_shape_sequence` in the order described in `category_orders`, unless the value of `pattern_shape` is a key in `pattern_shape_map`.", + ], + color_discrete_sequence=[ + "list of str", + "Strings should define valid CSS-colors.", + "When `color` is set and the values in the corresponding column are not numeric, values in that column are assigned colors by cycling through `color_discrete_sequence` in the order described in `category_orders`, unless the value of `color` is a key in `color_discrete_map`.", + "Various useful color sequences are available in the `plotly.express.colors` submodules, specifically `plotly.express.colors.qualitative`.", + ], + color_discrete_map=[ + "dict with str keys and str values (default `{}`)", + "String values should define valid CSS-colors", + "Used to override `color_discrete_sequence` to assign a specific colors to marks corresponding with specific values.", + "Keys in `color_discrete_map` should be values in the column denoted by `color`.", + "Alternatively, if the values of `color` are valid colors, the string `'identity'` may be passed to cause them to be used directly.", + ], + color_continuous_scale=[ + "list of str", + "Strings should define valid CSS-colors", + "This list is used to build a continuous color scale when the column denoted by `color` contains numeric data.", + "Various useful color scales are available in the `plotly.express.colors` submodules, specifically `plotly.express.colors.sequential`, `plotly.express.colors.diverging` and `plotly.express.colors.cyclical`.", + ], + color_continuous_midpoint=[ + "number (default `None`)", + "If set, computes the bounds of the continuous color scale to have the desired midpoint.", + "Setting this value is recommended when using `plotly.express.colors.diverging` color scales as the inputs to `color_continuous_scale`.", + ], + size_max=["int (default `20`)", "Set the maximum mark size when using `size`."], + markers=["boolean (default `False`)", "If `True`, markers are shown on lines."], + lines=[ + "boolean (default `True`)", + "If `False`, lines are not drawn (forced to `True` if `markers` is `False`).", + ], + log_x=[ + "boolean (default `False`)", + "If `True`, the x-axis is log-scaled in cartesian coordinates.", + ], + log_y=[ + "boolean (default `False`)", + "If `True`, the y-axis is log-scaled in cartesian coordinates.", + ], + log_z=[ + "boolean (default `False`)", + "If `True`, the z-axis is log-scaled in cartesian coordinates.", + ], + log_r=[ + "boolean (default `False`)", + "If `True`, the radial axis is log-scaled in polar coordinates.", + ], + range_x=[ + "list of two numbers", + "If provided, overrides auto-scaling on the x-axis in cartesian coordinates.", + ], + range_y=[ + "list of two numbers", + "If provided, overrides auto-scaling on the y-axis in cartesian coordinates.", + ], + range_z=[ + "list of two numbers", + "If provided, overrides auto-scaling on the z-axis in cartesian coordinates.", + ], + range_color=[ + "list of two numbers", + "If provided, overrides auto-scaling on the continuous color scale.", + ], + range_r=[ + "list of two numbers", + "If provided, overrides auto-scaling on the radial axis in polar coordinates.", + ], + range_theta=[ + "list of two numbers", + "If provided, overrides auto-scaling on the angular axis in polar coordinates.", + ], + title=["str", "The figure title."], + subtitle=["str", "The figure subtitle."], + template=[ + "str or dict or plotly.graph_objects.layout.Template instance", + "The figure template name (must be a key in plotly.io.templates) or definition.", + ], + width=["int (default `None`)", "The figure width in pixels."], + height=["int (default `None`)", "The figure height in pixels."], + labels=[ + "dict with str keys and str values (default `{}`)", + "By default, column names are used in the figure for axis titles, legend entries and hovers.", + "This parameter allows this to be overridden.", + "The keys of this dict should correspond to column names, and the values should correspond to the desired label to be displayed.", + ], + category_orders=[ + "dict with str keys and list of str values (default `{}`)", + "By default, in Python 3.6+, the order of categorical values in axes, legends and facets depends on the order in which these values are first encountered in `data_frame` (and no order is guaranteed by default in Python below 3.6).", + "This parameter is used to force a specific ordering of values per column.", + "The keys of this dict should correspond to column names, and the values should be lists of strings corresponding to the specific display order desired.", + ], + marginal=[ + "str", + "One of `'rug'`, `'box'`, `'violin'`, or `'histogram'`.", + "If set, a subplot is drawn alongside the main plot, visualizing the distribution.", + ], + marginal_x=[ + "str", + "One of `'rug'`, `'box'`, `'violin'`, or `'histogram'`.", + "If set, a horizontal subplot is drawn above the main plot, visualizing the x-distribution.", + ], + marginal_y=[ + "str", + "One of `'rug'`, `'box'`, `'violin'`, or `'histogram'`.", + "If set, a vertical subplot is drawn to the right of the main plot, visualizing the y-distribution.", + ], + trendline=[ + "str", + "One of `'ols'`, `'lowess'`, `'rolling'`, `'expanding'` or `'ewm'`.", + "If `'ols'`, an Ordinary Least Squares regression line will be drawn for each discrete-color/symbol group.", + "If `'lowess`', a Locally Weighted Scatterplot Smoothing line will be drawn for each discrete-color/symbol group.", + "If `'rolling`', a Rolling (e.g. rolling average, rolling median) line will be drawn for each discrete-color/symbol group.", + "If `'expanding`', an Expanding (e.g. expanding average, expanding sum) line will be drawn for each discrete-color/symbol group.", + "If `'ewm`', an Exponentially Weighted Moment (e.g. exponentially-weighted moving average) line will be drawn for each discrete-color/symbol group.", + "See the docstrings for the functions in `plotly.express.trendline_functions` for more details on these functions and how", + "to configure them with the `trendline_options` argument.", + ], + trendline_options=[ + "dict", + "Options passed as the first argument to the function from `plotly.express.trendline_functions` ", + "named in the `trendline` argument.", + ], + trendline_color_override=[ + "str", + "Valid CSS color.", + "If provided, and if `trendline` is set, all trendlines will be drawn in this color rather than in the same color as the traces from which they draw their inputs.", + ], + trendline_scope=[ + "str (one of `'trace'` or `'overall'`, default `'trace'`)", + "If `'trace'`, then one trendline is drawn per trace (i.e. per color, symbol, facet, animation frame etc) and if `'overall'` then one trendline is computed for the entire dataset, and replicated across all facets.", + ], + render_mode=[ + "str", + "One of `'auto'`, `'svg'` or `'webgl'`, default `'auto'`", + "Controls the browser API used to draw marks.", + "`'svg'` is appropriate for figures of less than 1000 data points, and will allow for fully-vectorized output.", + "`'webgl'` is likely necessary for acceptable performance above 1000 points but rasterizes part of the output. ", + "`'auto'` uses heuristics to choose the mode.", + ], + direction=[ + "str", + "One of '`counterclockwise'` or `'clockwise'`. Default is `'clockwise'`", + "Sets the direction in which increasing values of the angular axis are drawn.", + ], + start_angle=[ + "int (default `90`)", + "Sets start angle for the angular axis, with 0 being due east and 90 being due north.", + ], + histfunc=[ + "str (default `'count'` if no arguments are provided, else `'sum'`)", + "One of `'count'`, `'sum'`, `'avg'`, `'min'`, or `'max'`.", + "Function used to aggregate values for summarization (note: can be normalized with `histnorm`).", + ], + histnorm=[ + "str (default `None`)", + "One of `'percent'`, `'probability'`, `'density'`, or `'probability density'`", + "If `None`, the output of `histfunc` is used as is.", + "If `'probability'`, the output of `histfunc` for a given bin is divided by the sum of the output of `histfunc` for all bins.", + "If `'percent'`, the output of `histfunc` for a given bin is divided by the sum of the output of `histfunc` for all bins and multiplied by 100.", + "If `'density'`, the output of `histfunc` for a given bin is divided by the size of the bin.", + "If `'probability density'`, the output of `histfunc` for a given bin is normalized such that it corresponds to the probability that a random event whose distribution is described by the output of `histfunc` will fall into that bin.", + ], + barnorm=[ + "str (default `None`)", + "One of `'fraction'` or `'percent'`.", + "If `'fraction'`, the value of each bar is divided by the sum of all values at that location coordinate.", + "`'percent'` is the same but multiplied by 100 to show percentages.", + "`None` will stack up all values at each location coordinate.", + ], + groupnorm=[ + "str (default `None`)", + "One of `'fraction'` or `'percent'`.", + "If `'fraction'`, the value of each point is divided by the sum of all values at that location coordinate.", + "`'percent'` is the same but multiplied by 100 to show percentages.", + "`None` will stack up all values at each location coordinate.", + ], + barmode=[ + "str (default `'relative'`)", + "One of `'group'`, `'overlay'` or `'relative'`", + "In `'relative'` mode, bars are stacked above zero for positive values and below zero for negative values.", + "In `'overlay'` mode, bars are drawn on top of one another.", + "In `'group'` mode, bars are placed beside each other.", + ], + boxmode=[ + "str (default `'group'`)", + "One of `'group'` or `'overlay'`", + "In `'overlay'` mode, boxes are on drawn top of one another.", + "In `'group'` mode, boxes are placed beside each other.", + ], + violinmode=[ + "str (default `'group'`)", + "One of `'group'` or `'overlay'`", + "In `'overlay'` mode, violins are on drawn top of one another.", + "In `'group'` mode, violins are placed beside each other.", + ], + stripmode=[ + "str (default `'group'`)", + "One of `'group'` or `'overlay'`", + "In `'overlay'` mode, strips are on drawn top of one another.", + "In `'group'` mode, strips are placed beside each other.", + ], + zoom=["int (default `8`)", "Between 0 and 20.", "Sets map zoom level."], + orientation=[ + "str, one of `'h'` for horizontal or `'v'` for vertical. ", + "(default `'v'` if `x` and `y` are provided and both continuous or both categorical, ", + "otherwise `'v'`(`'h'`) if `x`(`y`) is categorical and `y`(`x`) is continuous, ", + "otherwise `'v'`(`'h'`) if only `x`(`y`) is provided) ", + ], + line_close=[ + "boolean (default `False`)", + "If `True`, an extra line segment is drawn between the first and last point.", + ], + line_shape=[ + "str (default `'linear'`)", + "One of `'linear'`, `'spline'`, `'hv'`, `'vh'`, `'hvh'`, or `'vhv'`", + ], + fitbounds=["str (default `False`).", "One of `False`, `locations` or `geojson`."], + basemap_visible=["bool", "Force the basemap visibility."], + scope=[ + "str (default `'world'`).", + "One of `'world'`, `'usa'`, `'europe'`, `'asia'`, `'africa'`, `'north america'`, or `'south america'`" + "Default is `'world'` unless `projection` is set to `'albers usa'`, which forces `'usa'`.", + ], + projection=[ + "str ", + "One of `'equirectangular'`, `'mercator'`, `'orthographic'`, `'natural earth'`, `'kavrayskiy7'`, `'miller'`, `'robinson'`, `'eckert4'`, `'azimuthal equal area'`, `'azimuthal equidistant'`, `'conic equal area'`, `'conic conformal'`, `'conic equidistant'`, `'gnomonic'`, `'stereographic'`, `'mollweide'`, `'hammer'`, `'transverse mercator'`, `'albers usa'`, `'winkel tripel'`, `'aitoff'`, or `'sinusoidal'`" + "Default depends on `scope`.", + ], + center=[ + "dict", + "Dict keys are `'lat'` and `'lon'`", + "Sets the center point of the map.", + ], + map_style=[ + "str (default `'basic'`)", + "Identifier of base map style.", + "Allowed values are `'basic'`, `'carto-darkmatter'`, `'carto-darkmatter-nolabels'`, `'carto-positron'`, `'carto-positron-nolabels'`, `'carto-voyager'`, `'carto-voyager-nolabels'`, `'dark'`, `'light'`, `'open-street-map'`, `'outdoors'`, `'satellite'`, `'satellite-streets'`, `'streets'`, `'white-bg'`.", + ], + mapbox_style=[ + "str (default `'basic'`, needs Mapbox API token)", + "Identifier of base map style, some of which require a Mapbox or Stadia Maps API token to be set using `plotly.express.set_mapbox_access_token()`.", + "Allowed values which do not require a token are `'open-street-map'`, `'white-bg'`, `'carto-positron'`, `'carto-darkmatter'`.", + "Allowed values which require a Mapbox API token are `'basic'`, `'streets'`, `'outdoors'`, `'light'`, `'dark'`, `'satellite'`, `'satellite-streets'`.", + "Allowed values which require a Stadia Maps API token are `'stamen-terrain'`, `'stamen-toner'`, `'stamen-watercolor'`.", + ], + points=[ + "str or boolean (default `'outliers'`)", + "One of `'outliers'`, `'suspectedoutliers'`, `'all'`, or `False`.", + "If `'outliers'`, only the sample points lying outside the whiskers are shown.", + "If `'suspectedoutliers'`, all outlier points are shown and those less than 4*Q1-3*Q3 or greater than 4*Q3-3*Q1 are highlighted with the marker's `'outliercolor'`.", + "If `'outliers'`, only the sample points lying outside the whiskers are shown.", + "If `'all'`, all sample points are shown.", + "If `False`, no sample points are shown and the whiskers extend to the full range of the sample.", + ], + box=["boolean (default `False`)", "If `True`, boxes are drawn inside the violins."], + notched=["boolean (default `False`)", "If `True`, boxes are drawn with notches."], + geojson=[ + "GeoJSON-formatted dict", + "Must contain a Polygon feature collection, with IDs, which are references from `locations`.", + ], + featureidkey=[ + "str (default: `'id'`)", + "Path to field in GeoJSON feature object with which to match the values passed in to `locations`." + "The most common alternative to the default is of the form `'properties.`.", + ], + cumulative=[ + "boolean (default `False`)", + "If `True`, histogram values are cumulative.", + ], + nbins=["int", "Positive integer.", "Sets the number of bins."], + nbinsx=["int", "Positive integer.", "Sets the number of bins along the x axis."], + nbinsy=["int", "Positive integer.", "Sets the number of bins along the y axis."], + branchvalues=[ + "str", + "'total' or 'remainder'", + "Determines how the items in `values` are summed. When" + "set to 'total', items in `values` are taken to be value" + "of all its descendants. When set to 'remainder', items" + "in `values` corresponding to the root and the branches" + ":sectors are taken to be the extra part not part of the" + "sum of the values at their leaves.", + ], + maxdepth=[ + "int", + "Positive integer", + "Sets the number of rendered sectors from any given `level`. Set `maxdepth` to -1 to render all the" + "levels in the hierarchy.", + ], + ecdfnorm=[ + "string or `None` (default `'probability'`)", + "One of `'probability'` or `'percent'`", + "If `None`, values will be raw counts or sums.", + "If `'probability', values will be probabilities normalized from 0 to 1.", + "If `'percent', values will be percentages normalized from 0 to 100.", + ], + ecdfmode=[ + "string (default `'standard'`)", + "One of `'standard'`, `'complementary'` or `'reversed'`", + "If `'standard'`, the ECDF is plotted such that values represent data at or below the point.", + "If `'complementary'`, the CCDF is plotted such that values represent data above the point.", + "If `'reversed'`, a variant of the CCDF is plotted such that values represent data at or above the point.", + ], + text_auto=[ + "bool or string (default `False`)", + "If `True` or a string, the x or y or z values will be displayed as text, depending on the orientation", + "A string like `'.2f'` will be interpreted as a `texttemplate` numeric formatting directive.", + ], +) + + +def make_docstring(fn, override_dict=None, append_dict=None): + override_dict = {} if override_dict is None else override_dict + append_dict = {} if append_dict is None else append_dict + tw = TextWrapper( + width=75, + initial_indent=" ", + subsequent_indent=" ", + break_on_hyphens=False, + ) + result = (fn.__doc__ or "") + "\nParameters\n----------\n" + for param in getfullargspec(fn)[0]: + if override_dict.get(param): + param_doc = list(override_dict[param]) + else: + param_doc = list(docs[param]) + if append_dict.get(param): + param_doc += append_dict[param] + param_desc_list = param_doc[1:] + param_desc = ( + tw.fill(" ".join(param_desc_list or "")) + if param in docs or param in override_dict + else "(documentation missing from map)" + ) + + param_type = param_doc[0] + result += "%s: %s\n%s\n" % (param, param_type, param_desc) + result += "\nReturns\n-------\n" + result += " plotly.graph_objects.Figure" + return result diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/express/_imshow.py b/.venv_haddock/lib/python3.12/site-packages/plotly/express/_imshow.py new file mode 100644 index 0000000000000000000000000000000000000000..7a3dd8a6df9f3311e7a4d1426efc5bef1bd20785 --- /dev/null +++ b/.venv_haddock/lib/python3.12/site-packages/plotly/express/_imshow.py @@ -0,0 +1,605 @@ +import plotly.graph_objs as go +from _plotly_utils.basevalidators import ColorscaleValidator +from ._core import apply_default_cascade, init_figure, configure_animation_controls +from .imshow_utils import rescale_intensity, _integer_ranges, _integer_types +import narwhals.stable.v1 as nw +import numpy as np +import itertools +from plotly.utils import image_array_to_data_uri + +try: + import xarray + + xarray_imported = True +except ImportError: + xarray_imported = False + +_float_types = [] + + +def _vectorize_zvalue(z, mode="max"): + alpha = 255 if mode == "max" else 0 + if z is None: + return z + elif np.isscalar(z): + return [z] * 3 + [alpha] + elif len(z) == 1: + return list(z) * 3 + [alpha] + elif len(z) == 3: + return list(z) + [alpha] + elif len(z) == 4: + return z + else: + raise ValueError( + "zmax can be a scalar, or an iterable of length 1, 3 or 4. " + "A value of %s was passed for zmax." % str(z) + ) + + +def _infer_zmax_from_type(img): + dt = img.dtype.type + rtol = 1.05 + if dt in _integer_types: + return _integer_ranges[dt][1] + else: + im_max = img[np.isfinite(img)].max() + if im_max <= 1 * rtol: + return 1 + elif im_max <= 255 * rtol: + return 255 + elif im_max <= 65535 * rtol: + return 65535 + else: + return 2**32 + + +def imshow( + img, + zmin=None, + zmax=None, + origin=None, + labels={}, + x=None, + y=None, + animation_frame=None, + facet_col=None, + facet_col_wrap=None, + facet_col_spacing=None, + facet_row_spacing=None, + color_continuous_scale=None, + color_continuous_midpoint=None, + range_color=None, + title=None, + template=None, + width=None, + height=None, + aspect=None, + contrast_rescaling=None, + binary_string=None, + binary_backend="auto", + binary_compression_level=4, + binary_format="png", + text_auto=False, +) -> go.Figure: + """ + Display an image, i.e. data on a 2D regular raster. + + Parameters + ---------- + + img: array-like image, or xarray + The image data. Supported array shapes are + + - (M, N): an image with scalar data. The data is visualized + using a colormap. + - (M, N, 3): an image with RGB values. + - (M, N, 4): an image with RGBA values, i.e. including transparency. + + zmin, zmax : scalar or iterable, optional + zmin and zmax define the scalar range that the colormap covers. By default, + zmin and zmax correspond to the min and max values of the datatype for integer + datatypes (ie [0-255] for uint8 images, [0, 65535] for uint16 images, etc.). For + a multichannel image of floats, the max of the image is computed and zmax is the + smallest power of 256 (1, 255, 65535) greater than this max value, + with a 5% tolerance. For a single-channel image, the max of the image is used. + Overridden by range_color. + + origin : str, 'upper' or 'lower' (default 'upper') + position of the [0, 0] pixel of the image array, in the upper left or lower left + corner. The convention 'upper' is typically used for matrices and images. + + labels : dict with str keys and str values (default `{}`) + Sets names used in the figure for axis titles (keys ``x`` and ``y``), + colorbar title and hoverlabel (key ``color``). The values should correspond + to the desired label to be displayed. If ``img`` is an xarray, dimension + names are used for axis titles, and long name for the colorbar title + (unless overridden in ``labels``). Possible keys are: x, y, and color. + + x, y: list-like, optional + x and y are used to label the axes of single-channel heatmap visualizations and + their lengths must match the lengths of the second and first dimensions of the + img argument. They are auto-populated if the input is an xarray. + + animation_frame: int or str, optional (default None) + axis number along which the image array is sliced to create an animation plot. + If `img` is an xarray, `animation_frame` can be the name of one the dimensions. + + facet_col: int or str, optional (default None) + axis number along which the image array is sliced to create a facetted plot. + If `img` is an xarray, `facet_col` can be the name of one the dimensions. + + facet_col_wrap: int + Maximum number of facet columns. Wraps the column variable at this width, + so that the column facets span multiple rows. + Ignored if `facet_col` is None. + + facet_col_spacing: float between 0 and 1 + Spacing between facet columns, in paper units. Default is 0.02. + + facet_row_spacing: float between 0 and 1 + Spacing between facet rows created when ``facet_col_wrap`` is used, in + paper units. Default is 0.0.7. + + color_continuous_scale : str or list of str + colormap used to map scalar data to colors (for a 2D image). This parameter is + not used for RGB or RGBA images. If a string is provided, it should be the name + of a known color scale, and if a list is provided, it should be a list of CSS- + compatible colors. + + color_continuous_midpoint : number + If set, computes the bounds of the continuous color scale to have the desired + midpoint. Overridden by range_color or zmin and zmax. + + range_color : list of two numbers + If provided, overrides auto-scaling on the continuous color scale, including + overriding `color_continuous_midpoint`. Also overrides zmin and zmax. Used only + for single-channel images. + + title : str + The figure title. + + template : str or dict or plotly.graph_objects.layout.Template instance + The figure template name or definition. + + width : number + The figure width in pixels. + + height: number + The figure height in pixels. + + aspect: 'equal', 'auto', or None + - 'equal': Ensures an aspect ratio of 1 or pixels (square pixels) + - 'auto': The axes is kept fixed and the aspect ratio of pixels is + adjusted so that the data fit in the axes. In general, this will + result in non-square pixels. + - if None, 'equal' is used for numpy arrays and 'auto' for xarrays + (which have typically heterogeneous coordinates) + + contrast_rescaling: 'minmax', 'infer', or None + how to determine data values corresponding to the bounds of the color + range, when zmin or zmax are not passed. If `minmax`, the min and max + values of the image are used. If `infer`, a heuristic based on the image + data type is used. + + binary_string: bool, default None + if True, the image data are first rescaled and encoded as uint8 and + then passed to plotly.js as a b64 PNG string. If False, data are passed + unchanged as a numerical array. Setting to True may lead to performance + gains, at the cost of a loss of precision depending on the original data + type. If None, use_binary_string is set to True for multichannel (eg) RGB + arrays, and to False for single-channel (2D) arrays. 2D arrays are + represented as grayscale and with no colorbar if use_binary_string is + True. + + binary_backend: str, 'auto' (default), 'pil' or 'pypng' + Third-party package for the transformation of numpy arrays to + png b64 strings. If 'auto', Pillow is used if installed, otherwise + pypng. + + binary_compression_level: int, between 0 and 9 (default 4) + png compression level to be passed to the backend when transforming an + array to a png b64 string. Increasing `binary_compression` decreases the + size of the png string, but the compression step takes more time. For most + images it is not worth using levels greater than 5, but it's possible to + test `len(fig.data[0].source)` and to time the execution of `imshow` to + tune the level of compression. 0 means no compression (not recommended). + + binary_format: str, 'png' (default) or 'jpg' + compression format used to generate b64 string. 'png' is recommended + since it uses lossless compression, but 'jpg' (lossy) compression can + result if smaller binary strings for natural images. + + text_auto: bool or str (default `False`) + If `True` or a string, single-channel `img` values will be displayed as text. + A string like `'.2f'` will be interpreted as a `texttemplate` numeric formatting directive. + + Returns + ------- + fig : graph_objects.Figure containing the displayed image + + See also + -------- + + plotly.graph_objects.Image : image trace + plotly.graph_objects.Heatmap : heatmap trace + + Notes + ----- + + In order to update and customize the returned figure, use + `go.Figure.update_traces` or `go.Figure.update_layout`. + + If an xarray is passed, dimensions names and coordinates are used for + axes labels and ticks. + """ + args = locals() + apply_default_cascade(args, constructor=None) + labels = labels.copy() + nslices_facet = 1 + if facet_col is not None: + if isinstance(facet_col, str): + facet_col = img.dims.index(facet_col) + nslices_facet = img.shape[facet_col] + facet_slices = range(nslices_facet) + ncols = int(facet_col_wrap) if facet_col_wrap is not None else nslices_facet + nrows = ( + nslices_facet // ncols + 1 + if nslices_facet % ncols + else nslices_facet // ncols + ) + else: + nrows = 1 + ncols = 1 + if animation_frame is not None: + if isinstance(animation_frame, str): + animation_frame = img.dims.index(animation_frame) + nslices_animation = img.shape[animation_frame] + animation_slices = range(nslices_animation) + slice_dimensions = (facet_col is not None) + ( + animation_frame is not None + ) # 0, 1, or 2 + facet_label = None + animation_label = None + img_is_xarray = False + # ----- Define x and y, set labels if img is an xarray ------------------- + if xarray_imported and isinstance(img, xarray.DataArray): + dims = list(img.dims) + img_is_xarray = True + pop_indexes = [] + if facet_col is not None: + facet_slices = img.coords[img.dims[facet_col]].values + pop_indexes.append(facet_col) + facet_label = img.dims[facet_col] + if animation_frame is not None: + animation_slices = img.coords[img.dims[animation_frame]].values + pop_indexes.append(animation_frame) + animation_label = img.dims[animation_frame] + # Remove indices in sorted order. + for index in sorted(pop_indexes, reverse=True): + _ = dims.pop(index) + y_label, x_label = dims[0], dims[1] + # np.datetime64 is not handled correctly by go.Heatmap + for ax in [x_label, y_label]: + if np.issubdtype(img.coords[ax].dtype, np.datetime64): + img.coords[ax] = img.coords[ax].astype(str) + if x is None: + x = img.coords[x_label].values + if y is None: + y = img.coords[y_label].values + if aspect is None: + aspect = "auto" + if labels.get("x", None) is None: + labels["x"] = x_label + if labels.get("y", None) is None: + labels["y"] = y_label + if labels.get("animation_frame", None) is None: + labels["animation_frame"] = animation_label + if labels.get("facet_col", None) is None: + labels["facet_col"] = facet_label + if labels.get("color", None) is None: + labels["color"] = xarray.plot.utils.label_from_attrs(img) + labels["color"] = labels["color"].replace("\n", "
") + else: + if hasattr(img, "columns") and hasattr(img.columns, "__len__"): + if x is None: + x = img.columns + if labels.get("x", None) is None and hasattr(img.columns, "name"): + labels["x"] = img.columns.name or "" + if hasattr(img, "index") and hasattr(img.index, "__len__"): + if y is None: + y = img.index + if labels.get("y", None) is None and hasattr(img.index, "name"): + labels["y"] = img.index.name or "" + + if labels.get("x", None) is None: + labels["x"] = "" + if labels.get("y", None) is None: + labels["y"] = "" + if labels.get("color", None) is None: + labels["color"] = "" + if aspect is None: + aspect = "equal" + + # --- Set the value of binary_string (forbidden for pandas) + img = nw.from_native(img, pass_through=True) + if isinstance(img, nw.DataFrame): + if binary_string: + raise ValueError("Binary strings cannot be used with pandas arrays") + is_dataframe = True + else: + is_dataframe = False + + # --------------- Starting from here img is always a numpy array -------- + img = np.asanyarray(img) + # Reshape array so that animation dimension comes first, then facets, then images + if facet_col is not None: + img = np.moveaxis(img, facet_col, 0) + if animation_frame is not None and animation_frame < facet_col: + animation_frame += 1 + facet_col = True + if animation_frame is not None: + img = np.moveaxis(img, animation_frame, 0) + animation_frame = True + args["animation_frame"] = ( + "animation_frame" + if labels.get("animation_frame") is None + else labels["animation_frame"] + ) + iterables = () + if animation_frame is not None: + iterables += (range(nslices_animation),) + if facet_col is not None: + iterables += (range(nslices_facet),) + + # Default behaviour of binary_string: True for RGB images, False for 2D + if binary_string is None: + binary_string = img.ndim >= (3 + slice_dimensions) and not is_dataframe + + # Cast bools to uint8 (also one byte) + if img.dtype == bool: + img = 255 * img.astype(np.uint8) + + if range_color is not None: + zmin = range_color[0] + zmax = range_color[1] + + # -------- Contrast rescaling: either minmax or infer ------------------ + if contrast_rescaling is None: + contrast_rescaling = "minmax" if img.ndim == (2 + slice_dimensions) else "infer" + + # We try to set zmin and zmax only if necessary, because traces have good defaults + if contrast_rescaling == "minmax": + # When using binary_string and minmax we need to set zmin and zmax to rescale the image + if (zmin is not None or binary_string) and zmax is None: + zmax = img.max() + if (zmax is not None or binary_string) and zmin is None: + zmin = img.min() + else: + # For uint8 data and infer we let zmin and zmax to be None if passed as None + if zmax is None and img.dtype != np.uint8: + zmax = _infer_zmax_from_type(img) + if zmin is None and zmax is not None: + zmin = 0 + + # For 2d data, use Heatmap trace, unless binary_string is True + if img.ndim == 2 + slice_dimensions and not binary_string: + y_index = slice_dimensions + if y is not None and img.shape[y_index] != len(y): + raise ValueError( + "The length of the y vector must match the length of the first " + + "dimension of the img matrix." + ) + x_index = slice_dimensions + 1 + if x is not None and img.shape[x_index] != len(x): + raise ValueError( + "The length of the x vector must match the length of the second " + + "dimension of the img matrix." + ) + + texttemplate = None + if text_auto is True: + texttemplate = "%{z}" + elif text_auto is not False: + texttemplate = "%{z:" + text_auto + "}" + + traces = [ + go.Heatmap( + x=x, + y=y, + z=img[index_tup], + coloraxis="coloraxis1", + name=str(i), + texttemplate=texttemplate, + ) + for i, index_tup in enumerate(itertools.product(*iterables)) + ] + autorange = True if origin == "lower" else "reversed" + layout = dict(yaxis=dict(autorange=autorange)) + if aspect == "equal": + layout["xaxis"] = dict(scaleanchor="y", constrain="domain") + layout["yaxis"]["constrain"] = "domain" + colorscale_validator = ColorscaleValidator("colorscale", "imshow") + layout["coloraxis1"] = dict( + colorscale=colorscale_validator.validate_coerce( + args["color_continuous_scale"] + ), + cmid=color_continuous_midpoint, + cmin=zmin, + cmax=zmax, + ) + if labels["color"]: + layout["coloraxis1"]["colorbar"] = dict(title_text=labels["color"]) + + # For 2D+RGB data, use Image trace + elif ( + img.ndim >= 3 + and (img.shape[-1] in [3, 4] or slice_dimensions and binary_string) + ) or (img.ndim == 2 and binary_string): + rescale_image = True # to check whether image has been modified + if zmin is not None and zmax is not None: + zmin, zmax = ( + _vectorize_zvalue(zmin, mode="min"), + _vectorize_zvalue(zmax, mode="max"), + ) + x0, y0, dx, dy = (None,) * 4 + error_msg_xarray = ( + "Non-numerical coordinates were passed with xarray `img`, but " + "the Image trace cannot handle it. Please use `binary_string=False` " + "for 2D data or pass instead the numpy array `img.values` to `px.imshow`." + ) + if x is not None: + x = np.asanyarray(x) + if np.issubdtype(x.dtype, np.number): + x0 = x[0] + dx = x[1] - x[0] + else: + error_msg = ( + error_msg_xarray + if img_is_xarray + else ( + "Only numerical values are accepted for the `x` parameter " + "when an Image trace is used." + ) + ) + raise ValueError(error_msg) + if y is not None: + y = np.asanyarray(y) + if np.issubdtype(y.dtype, np.number): + y0 = y[0] + dy = y[1] - y[0] + else: + error_msg = ( + error_msg_xarray + if img_is_xarray + else ( + "Only numerical values are accepted for the `y` parameter " + "when an Image trace is used." + ) + ) + raise ValueError(error_msg) + if binary_string: + if zmin is None and zmax is None: # no rescaling, faster + img_rescaled = img + rescale_image = False + elif img.ndim == 2 + slice_dimensions: # single-channel image + img_rescaled = rescale_intensity( + img, in_range=(zmin[0], zmax[0]), out_range=np.uint8 + ) + else: + img_rescaled = np.stack( + [ + rescale_intensity( + img[..., ch], + in_range=(zmin[ch], zmax[ch]), + out_range=np.uint8, + ) + for ch in range(img.shape[-1]) + ], + axis=-1, + ) + img_str = [ + image_array_to_data_uri( + img_rescaled[index_tup], + backend=binary_backend, + compression=binary_compression_level, + ext=binary_format, + ) + for index_tup in itertools.product(*iterables) + ] + + traces = [ + go.Image(source=img_str_slice, name=str(i), x0=x0, y0=y0, dx=dx, dy=dy) + for i, img_str_slice in enumerate(img_str) + ] + else: + colormodel = "rgb" if img.shape[-1] == 3 else "rgba256" + traces = [ + go.Image( + z=img[index_tup], + zmin=zmin, + zmax=zmax, + colormodel=colormodel, + x0=x0, + y0=y0, + dx=dx, + dy=dy, + ) + for index_tup in itertools.product(*iterables) + ] + layout = {} + if origin == "lower" or (dy is not None and dy < 0): + layout["yaxis"] = dict(autorange=True) + if dx is not None and dx < 0: + layout["xaxis"] = dict(autorange="reversed") + else: + raise ValueError( + "px.imshow only accepts 2D single-channel, RGB or RGBA images. " + "An image of shape %s was provided. " + "Alternatively, 3- or 4-D single or multichannel datasets can be " + "visualized using the `facet_col` or/and `animation_frame` arguments." + % str(img.shape) + ) + + # Now build figure + col_labels = [] + if facet_col is not None: + slice_label = ( + "facet_col" if labels.get("facet_col") is None else labels["facet_col"] + ) + col_labels = [f"{slice_label}={i}" for i in facet_slices] + fig = init_figure(args, "xy", [], nrows, ncols, col_labels, []) + for attr_name in ["height", "width"]: + if args[attr_name]: + layout[attr_name] = args[attr_name] + if args["title"]: + layout["title_text"] = args["title"] + elif args["template"].layout.margin.t is None: + layout["margin"] = {"t": 60} + + frame_list = [] + for index, trace in enumerate(traces): + if (facet_col and index < nrows * ncols) or index == 0: + fig.add_trace(trace, row=nrows - index // ncols, col=index % ncols + 1) + if animation_frame is not None: + for i, index in zip(range(nslices_animation), animation_slices): + frame_list.append( + dict( + data=traces[nslices_facet * i : nslices_facet * (i + 1)], + layout=layout, + name=str(index), + ) + ) + if animation_frame: + fig.frames = frame_list + fig.update_layout(layout) + # Hover name, z or color + if binary_string and rescale_image and not np.all(img == img_rescaled): + # we rescaled the image, hence z is not displayed in hover since it does + # not correspond to img values + hovertemplate = "%s: %%{x}
%s: %%{y}" % ( + labels["x"] or "x", + labels["y"] or "y", + ) + else: + if trace["type"] == "heatmap": + hover_name = "%{z}" + elif img.ndim == 2: + hover_name = "%{z[0]}" + elif img.ndim == 3 and img.shape[-1] == 3: + hover_name = "[%{z[0]}, %{z[1]}, %{z[2]}]" + else: + hover_name = "%{z}" + hovertemplate = "%s: %%{x}
%s: %%{y}
%s: %s" % ( + labels["x"] or "x", + labels["y"] or "y", + labels["color"] or "color", + hover_name, + ) + fig.update_traces(hovertemplate=hovertemplate) + if labels["x"]: + fig.update_xaxes(title_text=labels["x"], row=1) + if labels["y"]: + fig.update_yaxes(title_text=labels["y"], col=1) + configure_animation_controls(args, go.Image, fig) + fig.update_layout(template=args["template"], overwrite=True) + return fig diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/express/_special_inputs.py b/.venv_haddock/lib/python3.12/site-packages/plotly/express/_special_inputs.py new file mode 100644 index 0000000000000000000000000000000000000000..c1b3d4d102f8c1081fe5cfa94e510d84782fcac1 --- /dev/null +++ b/.venv_haddock/lib/python3.12/site-packages/plotly/express/_special_inputs.py @@ -0,0 +1,40 @@ +class IdentityMap(object): + """ + `dict`-like object which acts as if the value for any key is the key itself. Objects + of this class can be passed in to arguments like `color_discrete_map` to + use the provided data values as colors, rather than mapping them to colors cycled + from `color_discrete_sequence`. This works for any `_map` argument to Plotly Express + functions, such as `line_dash_map` and `symbol_map`. + """ + + def __getitem__(self, key): + return key + + def __contains__(self, key): + return True + + def copy(self): + return self + + +class Constant(object): + """ + Objects of this class can be passed to Plotly Express functions that expect column + identifiers or list-like objects to indicate that this attribute should take on a + constant value. An optional label can be provided. + """ + + def __init__(self, value, label=None): + self.value = value + self.label = label + + +class Range(object): + """ + Objects of this class can be passed to Plotly Express functions that expect column + identifiers or list-like objects to indicate that this attribute should be mapped + onto integers starting at 0. An optional label can be provided. + """ + + def __init__(self, label=None): + self.label = label diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/express/colors/.___init__.py b/.venv_haddock/lib/python3.12/site-packages/plotly/express/colors/.___init__.py new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/express/colors/.___init__.py differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/express/colors/.___pycache__ b/.venv_haddock/lib/python3.12/site-packages/plotly/express/colors/.___pycache__ new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/express/colors/.___pycache__ differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/express/colors/__init__.py b/.venv_haddock/lib/python3.12/site-packages/plotly/express/colors/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..62cd3cac2de6810afb2c7361bfdb87b4ae497998 --- /dev/null +++ b/.venv_haddock/lib/python3.12/site-packages/plotly/express/colors/__init__.py @@ -0,0 +1,52 @@ +# ruff: noqa: F405 +"""For a list of colors available in `plotly.express.colors`, please see + +* the `tutorial on discrete color sequences `_ +* the `list of built-in continuous color scales `_ +* the `tutorial on continuous colors `_ + +Color scales are available within the following namespaces + +* cyclical +* diverging +* qualitative +* sequential +""" + +from plotly.colors import * # noqa: F403 + + +__all__ = [ + "named_colorscales", + "cyclical", + "diverging", + "sequential", + "qualitative", + "colorbrewer", + "colorbrewer", + "carto", + "cmocean", + "color_parser", + "colorscale_to_colors", + "colorscale_to_scale", + "convert_colors_to_same_type", + "convert_colorscale_to_rgb", + "convert_dict_colors_to_same_type", + "convert_to_RGB_255", + "find_intermediate_color", + "hex_to_rgb", + "label_rgb", + "make_colorscale", + "n_colors", + "unconvert_from_RGB_255", + "unlabel_rgb", + "validate_colors", + "validate_colors_dict", + "validate_colorscale", + "validate_scale_values", + "plotlyjs", + "DEFAULT_PLOTLY_COLORS", + "PLOTLY_SCALES", + "get_colorscale", + "sample_colorscale", +] diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/express/data/.___init__.py b/.venv_haddock/lib/python3.12/site-packages/plotly/express/data/.___init__.py new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/express/data/.___init__.py differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/express/data/.___pycache__ b/.venv_haddock/lib/python3.12/site-packages/plotly/express/data/.___pycache__ new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/express/data/.___pycache__ differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/express/data/__init__.py b/.venv_haddock/lib/python3.12/site-packages/plotly/express/data/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..5096f3339a4ca3ff93bcffe43198489555d84cf0 --- /dev/null +++ b/.venv_haddock/lib/python3.12/site-packages/plotly/express/data/__init__.py @@ -0,0 +1,18 @@ +# ruff: noqa: F405 +"""Built-in datasets for demonstration, educational and test purposes.""" + +from plotly.data import * # noqa: F403 + +__all__ = [ + "carshare", + "election", + "election_geojson", + "experiment", + "gapminder", + "iris", + "medals_wide", + "medals_long", + "stocks", + "tips", + "wind", +] diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/express/imshow_utils.py b/.venv_haddock/lib/python3.12/site-packages/plotly/express/imshow_utils.py new file mode 100644 index 0000000000000000000000000000000000000000..7f110ede4d062be9b8d9133022bd67f3fe1a4118 --- /dev/null +++ b/.venv_haddock/lib/python3.12/site-packages/plotly/express/imshow_utils.py @@ -0,0 +1,247 @@ +"""Vendored code from scikit-image in order to limit the number of dependencies +Extracted from scikit-image/skimage/exposure/exposure.py +""" + +import numpy as np + +from warnings import warn + +_integer_types = ( + np.byte, + np.ubyte, # 8 bits + np.short, + np.ushort, # 16 bits + np.intc, + np.uintc, # 16 or 32 or 64 bits + np.int_, + np.uint, # 32 or 64 bits + np.longlong, + np.ulonglong, +) # 64 bits +_integer_ranges = {t: (np.iinfo(t).min, np.iinfo(t).max) for t in _integer_types} +dtype_range = { + np.bool_: (False, True), + np.float16: (-1, 1), + np.float32: (-1, 1), + np.float64: (-1, 1), +} +dtype_range.update(_integer_ranges) + + +DTYPE_RANGE = dtype_range.copy() +DTYPE_RANGE.update((d.__name__, limits) for d, limits in dtype_range.items()) +DTYPE_RANGE.update( + { + "uint10": (0, 2**10 - 1), + "uint12": (0, 2**12 - 1), + "uint14": (0, 2**14 - 1), + "bool": dtype_range[np.bool_], + "float": dtype_range[np.float64], + } +) + + +def intensity_range(image, range_values="image", clip_negative=False): + """Return image intensity range (min, max) based on desired value type. + + Parameters + ---------- + image : array + Input image. + range_values : str or 2-tuple, optional + The image intensity range is configured by this parameter. + The possible values for this parameter are enumerated below. + + 'image' + Return image min/max as the range. + 'dtype' + Return min/max of the image's dtype as the range. + dtype-name + Return intensity range based on desired `dtype`. Must be valid key + in `DTYPE_RANGE`. Note: `image` is ignored for this range type. + 2-tuple + Return `range_values` as min/max intensities. Note that there's no + reason to use this function if you just want to specify the + intensity range explicitly. This option is included for functions + that use `intensity_range` to support all desired range types. + + clip_negative : bool, optional + If True, clip the negative range (i.e. return 0 for min intensity) + even if the image dtype allows negative values. + """ + if range_values == "dtype": + range_values = image.dtype.type + + if range_values == "image": + i_min = np.min(image) + i_max = np.max(image) + elif range_values in DTYPE_RANGE: + i_min, i_max = DTYPE_RANGE[range_values] + if clip_negative: + i_min = 0 + else: + i_min, i_max = range_values + return i_min, i_max + + +def _output_dtype(dtype_or_range): + """Determine the output dtype for rescale_intensity. + + The dtype is determined according to the following rules: + - if ``dtype_or_range`` is a dtype, that is the output dtype. + - if ``dtype_or_range`` is a dtype string, that is the dtype used, unless + it is not a NumPy data type (e.g. 'uint12' for 12-bit unsigned integers), + in which case the data type that can contain it will be used + (e.g. uint16 in this case). + - if ``dtype_or_range`` is a pair of values, the output data type will be + float. + + Parameters + ---------- + dtype_or_range : type, string, or 2-tuple of int/float + The desired range for the output, expressed as either a NumPy dtype or + as a (min, max) pair of numbers. + + Returns + ------- + out_dtype : type + The data type appropriate for the desired output. + """ + if type(dtype_or_range) in [list, tuple, np.ndarray]: + # pair of values: always return float. + return np.float_ + if isinstance(dtype_or_range, type): + # already a type: return it + return dtype_or_range + if dtype_or_range in DTYPE_RANGE: + # string key in DTYPE_RANGE dictionary + try: + # if it's a canonical numpy dtype, convert + return np.dtype(dtype_or_range).type + except TypeError: # uint10, uint12, uint14 + # otherwise, return uint16 + return np.uint16 + else: + raise ValueError( + "Incorrect value for out_range, should be a valid image data " + "type or a pair of values, got %s." % str(dtype_or_range) + ) + + +def rescale_intensity(image, in_range="image", out_range="dtype"): + """Return image after stretching or shrinking its intensity levels. + + The desired intensity range of the input and output, `in_range` and + `out_range` respectively, are used to stretch or shrink the intensity range + of the input image. See examples below. + + Parameters + ---------- + image : array + Image array. + in_range, out_range : str or 2-tuple, optional + Min and max intensity values of input and output image. + The possible values for this parameter are enumerated below. + + 'image' + Use image min/max as the intensity range. + 'dtype' + Use min/max of the image's dtype as the intensity range. + dtype-name + Use intensity range based on desired `dtype`. Must be valid key + in `DTYPE_RANGE`. + 2-tuple + Use `range_values` as explicit min/max intensities. + + Returns + ------- + out : array + Image array after rescaling its intensity. This image is the same dtype + as the input image. + + Notes + ----- + .. versionchanged:: 0.17 + The dtype of the output array has changed to match the output dtype, or + float if the output range is specified by a pair of floats. + + See Also + -------- + equalize_hist + + Examples + -------- + By default, the min/max intensities of the input image are stretched to + the limits allowed by the image's dtype, since `in_range` defaults to + 'image' and `out_range` defaults to 'dtype': + + >>> image = np.array([51, 102, 153], dtype=np.uint8) + >>> rescale_intensity(image) + array([ 0, 127, 255], dtype=uint8) + + It's easy to accidentally convert an image dtype from uint8 to float: + + >>> 1.0 * image + array([ 51., 102., 153.]) + + Use `rescale_intensity` to rescale to the proper range for float dtypes: + + >>> image_float = 1.0 * image + >>> rescale_intensity(image_float) + array([0. , 0.5, 1. ]) + + To maintain the low contrast of the original, use the `in_range` parameter: + + >>> rescale_intensity(image_float, in_range=(0, 255)) + array([0.2, 0.4, 0.6]) + + If the min/max value of `in_range` is more/less than the min/max image + intensity, then the intensity levels are clipped: + + >>> rescale_intensity(image_float, in_range=(0, 102)) + array([0.5, 1. , 1. ]) + + If you have an image with signed integers but want to rescale the image to + just the positive range, use the `out_range` parameter. In that case, the + output dtype will be float: + + >>> image = np.array([-10, 0, 10], dtype=np.int8) + >>> rescale_intensity(image, out_range=(0, 127)) + array([ 0. , 63.5, 127. ]) + + To get the desired range with a specific dtype, use ``.astype()``: + + >>> rescale_intensity(image, out_range=(0, 127)).astype(np.int8) + array([ 0, 63, 127], dtype=int8) + + If the input image is constant, the output will be clipped directly to the + output range: + >>> image = np.array([130, 130, 130], dtype=np.int32) + >>> rescale_intensity(image, out_range=(0, 127)).astype(np.int32) + array([127, 127, 127], dtype=int32) + """ + if out_range in ["dtype", "image"]: + out_dtype = _output_dtype(image.dtype.type) + else: + out_dtype = _output_dtype(out_range) + + imin, imax = map(float, intensity_range(image, in_range)) + omin, omax = map( + float, intensity_range(image, out_range, clip_negative=(imin >= 0)) + ) + + if np.any(np.isnan([imin, imax, omin, omax])): + warn( + "One or more intensity levels are NaN. Rescaling will broadcast " + "NaN to the full image. Provide intensity levels yourself to " + "avoid this. E.g. with np.nanmin(image), np.nanmax(image).", + stacklevel=2, + ) + + image = np.clip(image, imin, imax) + + if imin != imax: + image = (image - imin) / (imax - imin) + return np.asarray(image * (omax - omin) + omin, dtype=out_dtype) + else: + return np.clip(image, omin, omax).astype(out_dtype) diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/express/trendline_functions/.___init__.py b/.venv_haddock/lib/python3.12/site-packages/plotly/express/trendline_functions/.___init__.py new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/express/trendline_functions/.___init__.py differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/express/trendline_functions/.___pycache__ b/.venv_haddock/lib/python3.12/site-packages/plotly/express/trendline_functions/.___pycache__ new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/express/trendline_functions/.___pycache__ differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/express/trendline_functions/__init__.py b/.venv_haddock/lib/python3.12/site-packages/plotly/express/trendline_functions/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..18ff219979a1b9af1f51cf9b5a4dca9192d7fda3 --- /dev/null +++ b/.venv_haddock/lib/python3.12/site-packages/plotly/express/trendline_functions/__init__.py @@ -0,0 +1,170 @@ +""" +The `trendline_functions` module contains functions which are called by Plotly Express +when the `trendline` argument is used. Valid values for `trendline` are the names of the +functions in this module, and the value of the `trendline_options` argument to PX +functions is passed in as the first argument to these functions when called. + +Note that the functions in this module are not meant to be called directly, and are +exposed as part of the public API for documentation purposes. +""" + +__all__ = ["ols", "lowess", "rolling", "ewm", "expanding"] + + +def ols(trendline_options, x_raw, x, y, x_label, y_label, non_missing): + """Ordinary Least Squares (OLS) trendline function + + Requires `statsmodels` to be installed. + + This trendline function causes fit results to be stored within the figure, + accessible via the `plotly.express.get_trendline_results` function. The fit results + are the output of the `statsmodels.api.OLS` function. + + Valid keys for the `trendline_options` dict are: + + - `add_constant` (`bool`, default `True`): if `False`, the trendline passes through + the origin but if `True` a y-intercept is fitted. + + - `log_x` and `log_y` (`bool`, default `False`): if `True` the OLS is computed with + respect to the base 10 logarithm of the input. Note that this means no zeros can + be present in the input. + """ + import numpy as np + + valid_options = ["add_constant", "log_x", "log_y"] + for k in trendline_options.keys(): + if k not in valid_options: + raise ValueError( + "OLS trendline_options keys must be one of [%s] but got '%s'" + % (", ".join(valid_options), k) + ) + + import statsmodels.api as sm + + add_constant = trendline_options.get("add_constant", True) + log_x = trendline_options.get("log_x", False) + log_y = trendline_options.get("log_y", False) + + if log_y: + if np.any(y <= 0): + raise ValueError( + "Can't do OLS trendline with `log_y=True` when `y` contains non-positive values." + ) + y = np.log10(y) + y_label = "log10(%s)" % y_label + if log_x: + if np.any(x <= 0): + raise ValueError( + "Can't do OLS trendline with `log_x=True` when `x` contains non-positive values." + ) + x = np.log10(x) + x_label = "log10(%s)" % x_label + if add_constant: + x = sm.add_constant(x) + fit_results = sm.OLS(y, x, missing="drop").fit() + y_out = fit_results.predict() + if log_y: + y_out = np.power(10, y_out) + hover_header = "OLS trendline
" + if len(fit_results.params) == 2: + hover_header += "%s = %g * %s + %g
" % ( + y_label, + fit_results.params[1], + x_label, + fit_results.params[0], + ) + elif not add_constant: + hover_header += "%s = %g * %s
" % (y_label, fit_results.params[0], x_label) + else: + hover_header += "%s = %g
" % (y_label, fit_results.params[0]) + hover_header += "R2=%f

" % fit_results.rsquared + return y_out, hover_header, fit_results + + +def lowess(trendline_options, x_raw, x, y, x_label, y_label, non_missing): + """LOcally WEighted Scatterplot Smoothing (LOWESS) trendline function + + Requires `statsmodels` to be installed. + + Valid keys for the `trendline_options` dict are: + + - `frac` (`float`, default `0.6666666`): the `frac` parameter from the + `statsmodels.api.nonparametric.lowess` function + """ + + valid_options = ["frac"] + for k in trendline_options.keys(): + if k not in valid_options: + raise ValueError( + "LOWESS trendline_options keys must be one of [%s] but got '%s'" + % (", ".join(valid_options), k) + ) + + import statsmodels.api as sm + + frac = trendline_options.get("frac", 0.6666666) + y_out = sm.nonparametric.lowess(y, x, missing="drop", frac=frac)[:, 1] + hover_header = "LOWESS trendline

" + return y_out, hover_header, None + + +def _pandas(mode, trendline_options, x_raw, y, non_missing): + import numpy as np + + try: + import pandas as pd + except ImportError: + msg = "Trendline requires pandas to be installed" + raise ImportError(msg) + + modes = dict(rolling="Rolling", ewm="Exponentially Weighted", expanding="Expanding") + trendline_options = trendline_options.copy() + function_name = trendline_options.pop("function", "mean") + function_args = trendline_options.pop("function_args", dict()) + + series = pd.Series(np.copy(y), index=x_raw.to_pandas()) + + # TODO: Narwhals Series/DataFrame do not support rolling, ewm nor expanding, therefore + # it fallbacks to pandas Series independently of the original type. + # Plotly issue: https://github.com/plotly/plotly.py/issues/4834 + # Narwhals issue: https://github.com/narwhals-dev/narwhals/issues/1254 + agg = getattr(series, mode) # e.g. series.rolling + agg_obj = agg(**trendline_options) # e.g. series.rolling(**opts) + function = getattr(agg_obj, function_name) # e.g. series.rolling(**opts).mean + y_out = function(**function_args) # e.g. series.rolling(**opts).mean(**opts) + y_out = y_out[non_missing] + hover_header = "%s %s trendline

" % (modes[mode], function_name) + return y_out, hover_header, None + + +def rolling(trendline_options, x_raw, x, y, x_label, y_label, non_missing): + """Rolling trendline function + + The value of the `function` key of the `trendline_options` dict is the function to + use (defaults to `mean`) and the value of the `function_args` key are taken to be + its arguments as a dict. The remainder of the `trendline_options` dict is passed as + keyword arguments into the `pandas.Series.rolling` function. + """ + return _pandas("rolling", trendline_options, x_raw, y, non_missing) + + +def expanding(trendline_options, x_raw, x, y, x_label, y_label, non_missing): + """Expanding trendline function + + The value of the `function` key of the `trendline_options` dict is the function to + use (defaults to `mean`) and the value of the `function_args` key are taken to be + its arguments as a dict. The remainder of the `trendline_options` dict is passed as + keyword arguments into the `pandas.Series.expanding` function. + """ + return _pandas("expanding", trendline_options, x_raw, y, non_missing) + + +def ewm(trendline_options, x_raw, x, y, x_label, y_label, non_missing): + """Exponentially Weighted Moment (EWM) trendline function + + The value of the `function` key of the `trendline_options` dict is the function to + use (defaults to `mean`) and the value of the `function_args` key are taken to be + its arguments as a dict. The remainder of the `trendline_options` dict is passed as + keyword arguments into the `pandas.Series.ewm` function. + """ + return _pandas("ewm", trendline_options, x_raw, y, non_missing) diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/figure_factory/.__2d_density.py b/.venv_haddock/lib/python3.12/site-packages/plotly/figure_factory/.__2d_density.py new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/figure_factory/.__2d_density.py differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/figure_factory/.___init__.py b/.venv_haddock/lib/python3.12/site-packages/plotly/figure_factory/.___init__.py new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/figure_factory/.___init__.py differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/figure_factory/.___pycache__ b/.venv_haddock/lib/python3.12/site-packages/plotly/figure_factory/.___pycache__ new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/figure_factory/.___pycache__ differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/figure_factory/.__annotated_heatmap.py b/.venv_haddock/lib/python3.12/site-packages/plotly/figure_factory/.__annotated_heatmap.py new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/figure_factory/.__annotated_heatmap.py differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/figure_factory/.__bullet.py b/.venv_haddock/lib/python3.12/site-packages/plotly/figure_factory/.__bullet.py new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/figure_factory/.__bullet.py differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/figure_factory/.__candlestick.py b/.venv_haddock/lib/python3.12/site-packages/plotly/figure_factory/.__candlestick.py new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/figure_factory/.__candlestick.py differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/figure_factory/.__county_choropleth.py b/.venv_haddock/lib/python3.12/site-packages/plotly/figure_factory/.__county_choropleth.py new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/figure_factory/.__county_choropleth.py differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/figure_factory/.__dendrogram.py b/.venv_haddock/lib/python3.12/site-packages/plotly/figure_factory/.__dendrogram.py new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/figure_factory/.__dendrogram.py differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/figure_factory/.__distplot.py b/.venv_haddock/lib/python3.12/site-packages/plotly/figure_factory/.__distplot.py new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/figure_factory/.__distplot.py differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/figure_factory/.__facet_grid.py b/.venv_haddock/lib/python3.12/site-packages/plotly/figure_factory/.__facet_grid.py new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/figure_factory/.__facet_grid.py differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/figure_factory/.__gantt.py b/.venv_haddock/lib/python3.12/site-packages/plotly/figure_factory/.__gantt.py new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/figure_factory/.__gantt.py differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/figure_factory/.__hexbin_map.py b/.venv_haddock/lib/python3.12/site-packages/plotly/figure_factory/.__hexbin_map.py new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/figure_factory/.__hexbin_map.py differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/figure_factory/.__ohlc.py b/.venv_haddock/lib/python3.12/site-packages/plotly/figure_factory/.__ohlc.py new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/figure_factory/.__ohlc.py differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/figure_factory/.__quiver.py b/.venv_haddock/lib/python3.12/site-packages/plotly/figure_factory/.__quiver.py new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/figure_factory/.__quiver.py differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/figure_factory/.__scatterplot.py b/.venv_haddock/lib/python3.12/site-packages/plotly/figure_factory/.__scatterplot.py new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/figure_factory/.__scatterplot.py differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/figure_factory/.__streamline.py b/.venv_haddock/lib/python3.12/site-packages/plotly/figure_factory/.__streamline.py new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/figure_factory/.__streamline.py differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/figure_factory/.__table.py b/.venv_haddock/lib/python3.12/site-packages/plotly/figure_factory/.__table.py new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/figure_factory/.__table.py differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/figure_factory/.__ternary_contour.py b/.venv_haddock/lib/python3.12/site-packages/plotly/figure_factory/.__ternary_contour.py new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/figure_factory/.__ternary_contour.py differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/figure_factory/.__trisurf.py b/.venv_haddock/lib/python3.12/site-packages/plotly/figure_factory/.__trisurf.py new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/figure_factory/.__trisurf.py differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/figure_factory/.__violin.py b/.venv_haddock/lib/python3.12/site-packages/plotly/figure_factory/.__violin.py new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/figure_factory/.__violin.py differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/figure_factory/._utils.py b/.venv_haddock/lib/python3.12/site-packages/plotly/figure_factory/._utils.py new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/figure_factory/._utils.py differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/figure_factory/_2d_density.py b/.venv_haddock/lib/python3.12/site-packages/plotly/figure_factory/_2d_density.py new file mode 100644 index 0000000000000000000000000000000000000000..3094d0bcad0decc0432cb852e714bf8c3d4be1bc --- /dev/null +++ b/.venv_haddock/lib/python3.12/site-packages/plotly/figure_factory/_2d_density.py @@ -0,0 +1,155 @@ +from numbers import Number + +import plotly.exceptions + +import plotly.colors as clrs +from plotly.graph_objs import graph_objs + + +def make_linear_colorscale(colors): + """ + Makes a list of colors into a colorscale-acceptable form + + For documentation regarding to the form of the output, see + https://plot.ly/python/reference/#mesh3d-colorscale + """ + scale = 1.0 / (len(colors) - 1) + return [[i * scale, color] for i, color in enumerate(colors)] + + +def create_2d_density( + x, + y, + colorscale="Earth", + ncontours=20, + hist_color=(0, 0, 0.5), + point_color=(0, 0, 0.5), + point_size=2, + title="2D Density Plot", + height=600, + width=600, +): + """ + **deprecated**, use instead + :func:`plotly.express.density_heatmap`. + + :param (list|array) x: x-axis data for plot generation + :param (list|array) y: y-axis data for plot generation + :param (str|tuple|list) colorscale: either a plotly scale name, an rgb + or hex color, a color tuple or a list or tuple of colors. An rgb + color is of the form 'rgb(x, y, z)' where x, y, z belong to the + interval [0, 255] and a color tuple is a tuple of the form + (a, b, c) where a, b and c belong to [0, 1]. If colormap is a + list, it must contain the valid color types aforementioned as its + members. + :param (int) ncontours: the number of 2D contours to draw on the plot + :param (str) hist_color: the color of the plotted histograms + :param (str) point_color: the color of the scatter points + :param (str) point_size: the color of the scatter points + :param (str) title: set the title for the plot + :param (float) height: the height of the chart + :param (float) width: the width of the chart + + Examples + -------- + + Example 1: Simple 2D Density Plot + + >>> from plotly.figure_factory import create_2d_density + >>> import numpy as np + + >>> # Make data points + >>> t = np.linspace(-1,1.2,2000) + >>> x = (t**3)+(0.3*np.random.randn(2000)) + >>> y = (t**6)+(0.3*np.random.randn(2000)) + + >>> # Create a figure + >>> fig = create_2d_density(x, y) + + >>> # Plot the data + >>> fig.show() + + Example 2: Using Parameters + + >>> from plotly.figure_factory import create_2d_density + + >>> import numpy as np + + >>> # Make data points + >>> t = np.linspace(-1,1.2,2000) + >>> x = (t**3)+(0.3*np.random.randn(2000)) + >>> y = (t**6)+(0.3*np.random.randn(2000)) + + >>> # Create custom colorscale + >>> colorscale = ['#7A4579', '#D56073', 'rgb(236,158,105)', + ... (1, 1, 0.2), (0.98,0.98,0.98)] + + >>> # Create a figure + >>> fig = create_2d_density(x, y, colorscale=colorscale, + ... hist_color='rgb(255, 237, 222)', point_size=3) + + >>> # Plot the data + >>> fig.show() + """ + + # validate x and y are filled with numbers only + for array in [x, y]: + if not all(isinstance(element, Number) for element in array): + raise plotly.exceptions.PlotlyError( + "All elements of your 'x' and 'y' lists must be numbers." + ) + + # validate x and y are the same length + if len(x) != len(y): + raise plotly.exceptions.PlotlyError( + "Both lists 'x' and 'y' must be the same length." + ) + + colorscale = clrs.validate_colors(colorscale, "rgb") + colorscale = make_linear_colorscale(colorscale) + + # validate hist_color and point_color + hist_color = clrs.validate_colors(hist_color, "rgb") + point_color = clrs.validate_colors(point_color, "rgb") + + trace1 = graph_objs.Scatter( + x=x, + y=y, + mode="markers", + name="points", + marker=dict(color=point_color[0], size=point_size, opacity=0.4), + ) + trace2 = graph_objs.Histogram2dContour( + x=x, + y=y, + name="density", + ncontours=ncontours, + colorscale=colorscale, + reversescale=True, + showscale=False, + ) + trace3 = graph_objs.Histogram( + x=x, name="x density", marker=dict(color=hist_color[0]), yaxis="y2" + ) + trace4 = graph_objs.Histogram( + y=y, name="y density", marker=dict(color=hist_color[0]), xaxis="x2" + ) + data = [trace1, trace2, trace3, trace4] + + layout = graph_objs.Layout( + showlegend=False, + autosize=False, + title=title, + height=height, + width=width, + xaxis=dict(domain=[0, 0.85], showgrid=False, zeroline=False), + yaxis=dict(domain=[0, 0.85], showgrid=False, zeroline=False), + margin=dict(t=50), + hovermode="closest", + bargap=0, + xaxis2=dict(domain=[0.85, 1], showgrid=False, zeroline=False), + yaxis2=dict(domain=[0.85, 1], showgrid=False, zeroline=False), + ) + + fig = graph_objs.Figure(data=data, layout=layout) + return fig diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/figure_factory/__init__.py b/.venv_haddock/lib/python3.12/site-packages/plotly/figure_factory/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..c0ded37ca28afa3fa198817d0594b72d77c89b2b --- /dev/null +++ b/.venv_haddock/lib/python3.12/site-packages/plotly/figure_factory/__init__.py @@ -0,0 +1,76 @@ +# ruff: noqa: E402 + +from plotly import optional_imports + +# Require that numpy exists for figure_factory +np = optional_imports.get_module("numpy") +if np is None: + raise ImportError( + """\ +The figure factory module requires the numpy package""" + ) + + +from plotly.figure_factory._2d_density import create_2d_density +from plotly.figure_factory._annotated_heatmap import create_annotated_heatmap +from plotly.figure_factory._bullet import create_bullet +from plotly.figure_factory._candlestick import create_candlestick +from plotly.figure_factory._dendrogram import create_dendrogram +from plotly.figure_factory._distplot import create_distplot +from plotly.figure_factory._facet_grid import create_facet_grid +from plotly.figure_factory._gantt import create_gantt +from plotly.figure_factory._ohlc import create_ohlc +from plotly.figure_factory._quiver import create_quiver +from plotly.figure_factory._scatterplot import create_scatterplotmatrix +from plotly.figure_factory._streamline import create_streamline +from plotly.figure_factory._table import create_table +from plotly.figure_factory._trisurf import create_trisurf +from plotly.figure_factory._violin import create_violin + +if optional_imports.get_module("pandas") is not None: + from plotly.figure_factory._county_choropleth import create_choropleth + from plotly.figure_factory._hexbin_map import ( + create_hexbin_map, + create_hexbin_mapbox, + ) +else: + + def create_choropleth(*args, **kwargs): + raise ImportError("Please install pandas to use `create_choropleth`") + + def create_hexbin_map(*args, **kwargs): + raise ImportError("Please install pandas to use `create_hexbin_map`") + + def create_hexbin_mapbox(*args, **kwargs): + raise ImportError("Please install pandas to use `create_hexbin_mapbox`") + + +if optional_imports.get_module("skimage") is not None: + from plotly.figure_factory._ternary_contour import create_ternary_contour +else: + + def create_ternary_contour(*args, **kwargs): + raise ImportError("Please install scikit-image to use `create_ternary_contour`") + + +__all__ = [ + "create_2d_density", + "create_annotated_heatmap", + "create_bullet", + "create_candlestick", + "create_choropleth", + "create_dendrogram", + "create_distplot", + "create_facet_grid", + "create_gantt", + "create_hexbin_map", + "create_hexbin_mapbox", + "create_ohlc", + "create_quiver", + "create_scatterplotmatrix", + "create_streamline", + "create_table", + "create_ternary_contour", + "create_trisurf", + "create_violin", +] diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/figure_factory/_annotated_heatmap.py b/.venv_haddock/lib/python3.12/site-packages/plotly/figure_factory/_annotated_heatmap.py new file mode 100644 index 0000000000000000000000000000000000000000..5da24ae5bc35f8b87b16872e0421ecd77c93a5f0 --- /dev/null +++ b/.venv_haddock/lib/python3.12/site-packages/plotly/figure_factory/_annotated_heatmap.py @@ -0,0 +1,307 @@ +import plotly.colors as clrs +from plotly import exceptions, optional_imports +from plotly.figure_factory import utils +from plotly.graph_objs import graph_objs +from plotly.validator_cache import ValidatorCache + +# Optional imports, may be None for users that only use our core functionality. +np = optional_imports.get_module("numpy") + + +def validate_annotated_heatmap(z, x, y, annotation_text): + """ + Annotated-heatmap-specific validations + + Check that if a text matrix is supplied, it has the same + dimensions as the z matrix. + + See FigureFactory.create_annotated_heatmap() for params + + :raises: (PlotlyError) If z and text matrices do not have the same + dimensions. + """ + if annotation_text is not None and isinstance(annotation_text, list): + utils.validate_equal_length(z, annotation_text) + for lst in range(len(z)): + if len(z[lst]) != len(annotation_text[lst]): + raise exceptions.PlotlyError( + "z and text should have the same dimensions" + ) + + if x: + if len(x) != len(z[0]): + raise exceptions.PlotlyError( + "oops, the x list that you " + "provided does not match the " + "width of your z matrix " + ) + + if y: + if len(y) != len(z): + raise exceptions.PlotlyError( + "oops, the y list that you " + "provided does not match the " + "length of your z matrix " + ) + + +def create_annotated_heatmap( + z, + x=None, + y=None, + annotation_text=None, + colorscale="Plasma", + font_colors=None, + showscale=False, + reversescale=False, + **kwargs, +): + """ + **deprecated**, use instead + :func:`plotly.express.imshow`. + + Function that creates annotated heatmaps + + This function adds annotations to each cell of the heatmap. + + :param (list[list]|ndarray) z: z matrix to create heatmap. + :param (list) x: x axis labels. + :param (list) y: y axis labels. + :param (list[list]|ndarray) annotation_text: Text strings for + annotations. Should have the same dimensions as the z matrix. If no + text is added, the values of the z matrix are annotated. Default = + z matrix values. + :param (list|str) colorscale: heatmap colorscale. + :param (list) font_colors: List of two color strings: [min_text_color, + max_text_color] where min_text_color is applied to annotations for + heatmap values < (max_value - min_value)/2. If font_colors is not + defined, the colors are defined logically as black or white + depending on the heatmap's colorscale. + :param (bool) showscale: Display colorscale. Default = False + :param (bool) reversescale: Reverse colorscale. Default = False + :param kwargs: kwargs passed through plotly.graph_objs.Heatmap. + These kwargs describe other attributes about the annotated Heatmap + trace such as the colorscale. For more information on valid kwargs + call help(plotly.graph_objs.Heatmap) + + Example 1: Simple annotated heatmap with default configuration + + >>> import plotly.figure_factory as ff + + >>> z = [[0.300000, 0.00000, 0.65, 0.300000], + ... [1, 0.100005, 0.45, 0.4300], + ... [0.300000, 0.00000, 0.65, 0.300000], + ... [1, 0.100005, 0.45, 0.00000]] + + >>> fig = ff.create_annotated_heatmap(z) + >>> fig.show() + """ + + # Avoiding mutables in the call signature + font_colors = font_colors if font_colors is not None else [] + validate_annotated_heatmap(z, x, y, annotation_text) + + # validate colorscale + colorscale_validator = ValidatorCache.get_validator("heatmap", "colorscale") + colorscale = colorscale_validator.validate_coerce(colorscale) + + annotations = _AnnotatedHeatmap( + z, x, y, annotation_text, colorscale, font_colors, reversescale, **kwargs + ).make_annotations() + + if x or y: + trace = dict( + type="heatmap", + z=z, + x=x, + y=y, + colorscale=colorscale, + showscale=showscale, + reversescale=reversescale, + **kwargs, + ) + layout = dict( + annotations=annotations, + xaxis=dict(ticks="", dtick=1, side="top", gridcolor="rgb(0, 0, 0)"), + yaxis=dict(ticks="", dtick=1, ticksuffix=" "), + ) + else: + trace = dict( + type="heatmap", + z=z, + colorscale=colorscale, + showscale=showscale, + reversescale=reversescale, + **kwargs, + ) + layout = dict( + annotations=annotations, + xaxis=dict( + ticks="", side="top", gridcolor="rgb(0, 0, 0)", showticklabels=False + ), + yaxis=dict(ticks="", ticksuffix=" ", showticklabels=False), + ) + + data = [trace] + + return graph_objs.Figure(data=data, layout=layout) + + +def to_rgb_color_list(color_str, default): + color_str = color_str.strip() + if color_str.startswith("rgb"): + return [int(v) for v in color_str.strip("rgba()").split(",")] + elif color_str.startswith("#"): + return clrs.hex_to_rgb(color_str) + else: + return default + + +def should_use_black_text(background_color): + return ( + background_color[0] * 0.299 + + background_color[1] * 0.587 + + background_color[2] * 0.114 + ) > 186 + + +class _AnnotatedHeatmap(object): + """ + Refer to TraceFactory.create_annotated_heatmap() for docstring + """ + + def __init__( + self, z, x, y, annotation_text, colorscale, font_colors, reversescale, **kwargs + ): + self.z = z + if x: + self.x = x + else: + self.x = range(len(z[0])) + if y: + self.y = y + else: + self.y = range(len(z)) + if annotation_text is not None: + self.annotation_text = annotation_text + else: + self.annotation_text = self.z + self.colorscale = colorscale + self.reversescale = reversescale + self.font_colors = font_colors + + if np and isinstance(self.z, np.ndarray): + self.zmin = np.amin(self.z) + self.zmax = np.amax(self.z) + else: + self.zmin = min([v for row in self.z for v in row]) + self.zmax = max([v for row in self.z for v in row]) + + if kwargs.get("zmin", None) is not None: + self.zmin = kwargs["zmin"] + if kwargs.get("zmax", None) is not None: + self.zmax = kwargs["zmax"] + + self.zmid = (self.zmax + self.zmin) / 2 + + if kwargs.get("zmid", None) is not None: + self.zmid = kwargs["zmid"] + + def get_text_color(self): + """ + Get font color for annotations. + + The annotated heatmap can feature two text colors: min_text_color and + max_text_color. The min_text_color is applied to annotations for + heatmap values < (max_value - min_value)/2. The user can define these + two colors. Otherwise the colors are defined logically as black or + white depending on the heatmap's colorscale. + + :rtype (string, string) min_text_color, max_text_color: text + color for annotations for heatmap values < + (max_value - min_value)/2 and text color for annotations for + heatmap values >= (max_value - min_value)/2 + """ + # Plotly colorscales ranging from a lighter shade to a darker shade + colorscales = [ + "Greys", + "Greens", + "Blues", + "YIGnBu", + "YIOrRd", + "RdBu", + "Picnic", + "Jet", + "Hot", + "Blackbody", + "Earth", + "Electric", + "Viridis", + "Cividis", + ] + # Plotly colorscales ranging from a darker shade to a lighter shade + colorscales_reverse = ["Reds"] + + white = "#FFFFFF" + black = "#000000" + if self.font_colors: + min_text_color = self.font_colors[0] + max_text_color = self.font_colors[-1] + elif self.colorscale in colorscales and self.reversescale: + min_text_color = black + max_text_color = white + elif self.colorscale in colorscales: + min_text_color = white + max_text_color = black + elif self.colorscale in colorscales_reverse and self.reversescale: + min_text_color = white + max_text_color = black + elif self.colorscale in colorscales_reverse: + min_text_color = black + max_text_color = white + elif isinstance(self.colorscale, list): + min_col = to_rgb_color_list(self.colorscale[0][1], [255, 255, 255]) + max_col = to_rgb_color_list(self.colorscale[-1][1], [255, 255, 255]) + + # swap min/max colors if reverse scale + if self.reversescale: + min_col, max_col = max_col, min_col + + if should_use_black_text(min_col): + min_text_color = black + else: + min_text_color = white + + if should_use_black_text(max_col): + max_text_color = black + else: + max_text_color = white + else: + min_text_color = black + max_text_color = black + return min_text_color, max_text_color + + def make_annotations(self): + """ + Get annotations for each cell of the heatmap with graph_objs.Annotation + + :rtype (list[dict]) annotations: list of annotations for each cell of + the heatmap + """ + min_text_color, max_text_color = _AnnotatedHeatmap.get_text_color(self) + annotations = [] + for n, row in enumerate(self.z): + for m, val in enumerate(row): + font_color = min_text_color if val < self.zmid else max_text_color + annotations.append( + graph_objs.layout.Annotation( + text=str(self.annotation_text[n][m]), + x=self.x[m], + y=self.y[n], + xref="x1", + yref="y1", + font=dict(color=font_color), + showarrow=False, + ) + ) + return annotations diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/figure_factory/_bullet.py b/.venv_haddock/lib/python3.12/site-packages/plotly/figure_factory/_bullet.py new file mode 100644 index 0000000000000000000000000000000000000000..ce51e9360c8dd98054ab9c7fc631a8eec1a449d4 --- /dev/null +++ b/.venv_haddock/lib/python3.12/site-packages/plotly/figure_factory/_bullet.py @@ -0,0 +1,366 @@ +import math + +from plotly import exceptions, optional_imports +import plotly.colors as clrs +from plotly.figure_factory import utils + +import plotly +import plotly.graph_objs as go + +pd = optional_imports.get_module("pandas") + + +def _bullet( + df, + markers, + measures, + ranges, + subtitles, + titles, + orientation, + range_colors, + measure_colors, + horizontal_spacing, + vertical_spacing, + scatter_options, + layout_options, +): + num_of_lanes = len(df) + num_of_rows = num_of_lanes if orientation == "h" else 1 + num_of_cols = 1 if orientation == "h" else num_of_lanes + if not horizontal_spacing: + horizontal_spacing = 1.0 / num_of_lanes + if not vertical_spacing: + vertical_spacing = 1.0 / num_of_lanes + fig = plotly.subplots.make_subplots( + num_of_rows, + num_of_cols, + print_grid=False, + horizontal_spacing=horizontal_spacing, + vertical_spacing=vertical_spacing, + ) + + # layout + fig["layout"].update( + dict(shapes=[]), + title="Bullet Chart", + height=600, + width=1000, + showlegend=False, + barmode="stack", + annotations=[], + margin=dict(l=120 if orientation == "h" else 80), + ) + + # update layout + fig["layout"].update(layout_options) + + if orientation == "h": + width_axis = "yaxis" + length_axis = "xaxis" + else: + width_axis = "xaxis" + length_axis = "yaxis" + + for key in fig["layout"]: + if "xaxis" in key or "yaxis" in key: + fig["layout"][key]["showgrid"] = False + fig["layout"][key]["zeroline"] = False + if length_axis in key: + fig["layout"][key]["tickwidth"] = 1 + if width_axis in key: + fig["layout"][key]["showticklabels"] = False + fig["layout"][key]["range"] = [0, 1] + + # narrow domain if 1 bar + if num_of_lanes <= 1: + fig["layout"][width_axis + "1"]["domain"] = [0.4, 0.6] + + if not range_colors: + range_colors = ["rgb(200, 200, 200)", "rgb(245, 245, 245)"] + if not measure_colors: + measure_colors = ["rgb(31, 119, 180)", "rgb(176, 196, 221)"] + + for row in range(num_of_lanes): + # ranges bars + for idx in range(len(df.iloc[row]["ranges"])): + inter_colors = clrs.n_colors( + range_colors[0], range_colors[1], len(df.iloc[row]["ranges"]), "rgb" + ) + x = ( + [sorted(df.iloc[row]["ranges"])[-1 - idx]] + if orientation == "h" + else [0] + ) + y = ( + [0] + if orientation == "h" + else [sorted(df.iloc[row]["ranges"])[-1 - idx]] + ) + bar = go.Bar( + x=x, + y=y, + marker=dict(color=inter_colors[-1 - idx]), + name="ranges", + hoverinfo="x" if orientation == "h" else "y", + orientation=orientation, + width=2, + base=0, + xaxis="x{}".format(row + 1), + yaxis="y{}".format(row + 1), + ) + fig.add_trace(bar) + + # measures bars + for idx in range(len(df.iloc[row]["measures"])): + inter_colors = clrs.n_colors( + measure_colors[0], + measure_colors[1], + len(df.iloc[row]["measures"]), + "rgb", + ) + x = ( + [sorted(df.iloc[row]["measures"])[-1 - idx]] + if orientation == "h" + else [0.5] + ) + y = ( + [0.5] + if orientation == "h" + else [sorted(df.iloc[row]["measures"])[-1 - idx]] + ) + bar = go.Bar( + x=x, + y=y, + marker=dict(color=inter_colors[-1 - idx]), + name="measures", + hoverinfo="x" if orientation == "h" else "y", + orientation=orientation, + width=0.4, + base=0, + xaxis="x{}".format(row + 1), + yaxis="y{}".format(row + 1), + ) + fig.add_trace(bar) + + # markers + x = df.iloc[row]["markers"] if orientation == "h" else [0.5] + y = [0.5] if orientation == "h" else df.iloc[row]["markers"] + markers = go.Scatter( + x=x, + y=y, + name="markers", + hoverinfo="x" if orientation == "h" else "y", + xaxis="x{}".format(row + 1), + yaxis="y{}".format(row + 1), + **scatter_options, + ) + + fig.add_trace(markers) + + # titles and subtitles + title = df.iloc[row]["titles"] + if "subtitles" in df: + subtitle = "
{}".format(df.iloc[row]["subtitles"]) + else: + subtitle = "" + label = "{}".format(title) + subtitle + annot = utils.annotation_dict_for_label( + label, + (num_of_lanes - row if orientation == "h" else row + 1), + num_of_lanes, + vertical_spacing if orientation == "h" else horizontal_spacing, + "row" if orientation == "h" else "col", + True if orientation == "h" else False, + False, + ) + fig["layout"]["annotations"] += (annot,) + + return fig + + +def create_bullet( + data, + markers=None, + measures=None, + ranges=None, + subtitles=None, + titles=None, + orientation="h", + range_colors=("rgb(200, 200, 200)", "rgb(245, 245, 245)"), + measure_colors=("rgb(31, 119, 180)", "rgb(176, 196, 221)"), + horizontal_spacing=None, + vertical_spacing=None, + scatter_options={}, + **layout_options, +): + """ + **deprecated**, use instead the plotly.graph_objects trace + :class:`plotly.graph_objects.Indicator`. + + :param (pd.DataFrame | list | tuple) data: either a list/tuple of + dictionaries or a pandas DataFrame. + :param (str) markers: the column name or dictionary key for the markers in + each subplot. + :param (str) measures: the column name or dictionary key for the measure + bars in each subplot. This bar usually represents the quantitative + measure of performance, usually a list of two values [a, b] and are + the blue bars in the foreground of each subplot by default. + :param (str) ranges: the column name or dictionary key for the qualitative + ranges of performance, usually a 3-item list [bad, okay, good]. They + correspond to the grey bars in the background of each chart. + :param (str) subtitles: the column name or dictionary key for the subtitle + of each subplot chart. The subplots are displayed right underneath + each title. + :param (str) titles: the column name or dictionary key for the main label + of each subplot chart. + :param (bool) orientation: if 'h', the bars are placed horizontally as + rows. If 'v' the bars are placed vertically in the chart. + :param (list) range_colors: a tuple of two colors between which all + the rectangles for the range are drawn. These rectangles are meant to + be qualitative indicators against which the marker and measure bars + are compared. + Default=('rgb(200, 200, 200)', 'rgb(245, 245, 245)') + :param (list) measure_colors: a tuple of two colors which is used to color + the thin quantitative bars in the bullet chart. + Default=('rgb(31, 119, 180)', 'rgb(176, 196, 221)') + :param (float) horizontal_spacing: see the 'horizontal_spacing' param in + plotly.tools.make_subplots. Ranges between 0 and 1. + :param (float) vertical_spacing: see the 'vertical_spacing' param in + plotly.tools.make_subplots. Ranges between 0 and 1. + :param (dict) scatter_options: describes attributes for the scatter trace + in each subplot such as name and marker size. Call + help(plotly.graph_objs.Scatter) for more information on valid params. + :param layout_options: describes attributes for the layout of the figure + such as title, height and width. Call help(plotly.graph_objs.Layout) + for more information on valid params. + + Example 1: Use a Dictionary + + >>> import plotly.figure_factory as ff + + >>> data = [ + ... {"label": "revenue", "sublabel": "us$, in thousands", + ... "range": [150, 225, 300], "performance": [220,270], "point": [250]}, + ... {"label": "Profit", "sublabel": "%", "range": [20, 25, 30], + ... "performance": [21, 23], "point": [26]}, + ... {"label": "Order Size", "sublabel":"US$, average","range": [350, 500, 600], + ... "performance": [100,320],"point": [550]}, + ... {"label": "New Customers", "sublabel": "count", "range": [1400, 2000, 2500], + ... "performance": [1000, 1650],"point": [2100]}, + ... {"label": "Satisfaction", "sublabel": "out of 5","range": [3.5, 4.25, 5], + ... "performance": [3.2, 4.7], "point": [4.4]} + ... ] + + >>> fig = ff.create_bullet( + ... data, titles='label', subtitles='sublabel', markers='point', + ... measures='performance', ranges='range', orientation='h', + ... title='my simple bullet chart' + ... ) + >>> fig.show() + + Example 2: Use a DataFrame with Custom Colors + + >>> import plotly.figure_factory as ff + >>> import pandas as pd + >>> data = pd.read_json('https://cdn.rawgit.com/plotly/datasets/master/BulletData.json') + + >>> fig = ff.create_bullet( + ... data, titles='title', markers='markers', measures='measures', + ... orientation='v', measure_colors=['rgb(14, 52, 75)', 'rgb(31, 141, 127)'], + ... scatter_options={'marker': {'symbol': 'circle'}}, width=700) + >>> fig.show() + """ + # validate df + if not pd: + raise ImportError("'pandas' must be installed for this figure factory.") + + if utils.is_sequence(data): + if not all(isinstance(item, dict) for item in data): + raise exceptions.PlotlyError( + "Every entry of the data argument list, tuple, etc must " + "be a dictionary." + ) + + elif not isinstance(data, pd.DataFrame): + raise exceptions.PlotlyError( + "You must input a pandas DataFrame, or a list of dictionaries." + ) + + # make DataFrame from data with correct column headers + col_names = ["titles", "subtitle", "markers", "measures", "ranges"] + if utils.is_sequence(data): + df = pd.DataFrame( + [ + [d[titles] for d in data] if titles else [""] * len(data), + [d[subtitles] for d in data] if subtitles else [""] * len(data), + [d[markers] for d in data] if markers else [[]] * len(data), + [d[measures] for d in data] if measures else [[]] * len(data), + [d[ranges] for d in data] if ranges else [[]] * len(data), + ], + index=col_names, + ) + elif isinstance(data, pd.DataFrame): + df = pd.DataFrame( + [ + data[titles].tolist() if titles else [""] * len(data), + data[subtitles].tolist() if subtitles else [""] * len(data), + data[markers].tolist() if markers else [[]] * len(data), + data[measures].tolist() if measures else [[]] * len(data), + data[ranges].tolist() if ranges else [[]] * len(data), + ], + index=col_names, + ) + df = pd.DataFrame.transpose(df) + + # make sure ranges, measures, 'markers' are not NAN or NONE + for needed_key in ["ranges", "measures", "markers"]: + for idx, r in enumerate(df[needed_key]): + try: + r_is_nan = math.isnan(r) + if r_is_nan or r is None: + df[needed_key][idx] = [] + except TypeError: + pass + + # validate custom colors + for colors_list in [range_colors, measure_colors]: + if colors_list: + if len(colors_list) != 2: + raise exceptions.PlotlyError( + "Both 'range_colors' or 'measure_colors' must be a list " + "of two valid colors." + ) + clrs.validate_colors(colors_list) + colors_list = clrs.convert_colors_to_same_type(colors_list, "rgb")[0] + + # default scatter options + default_scatter = { + "marker": {"size": 12, "symbol": "diamond-tall", "color": "rgb(0, 0, 0)"} + } + + if scatter_options == {}: + scatter_options.update(default_scatter) + else: + # add default options to scatter_options if they are not present + for k in default_scatter["marker"]: + if k not in scatter_options["marker"]: + scatter_options["marker"][k] = default_scatter["marker"][k] + + fig = _bullet( + df, + markers, + measures, + ranges, + subtitles, + titles, + orientation, + range_colors, + measure_colors, + horizontal_spacing, + vertical_spacing, + scatter_options, + layout_options, + ) + + return fig diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/figure_factory/_candlestick.py b/.venv_haddock/lib/python3.12/site-packages/plotly/figure_factory/_candlestick.py new file mode 100644 index 0000000000000000000000000000000000000000..572ccfe142f669b3a58cb0fc4afa457daea74b85 --- /dev/null +++ b/.venv_haddock/lib/python3.12/site-packages/plotly/figure_factory/_candlestick.py @@ -0,0 +1,277 @@ +from plotly.figure_factory import utils +from plotly.figure_factory._ohlc import ( + _DEFAULT_INCREASING_COLOR, + _DEFAULT_DECREASING_COLOR, + validate_ohlc, +) +from plotly.graph_objs import graph_objs + + +def make_increasing_candle(open, high, low, close, dates, **kwargs): + """ + Makes boxplot trace for increasing candlesticks + + _make_increasing_candle() and _make_decreasing_candle separate the + increasing traces from the decreasing traces so kwargs (such as + color) can be passed separately to increasing or decreasing traces + when direction is set to 'increasing' or 'decreasing' in + FigureFactory.create_candlestick() + + :param (list) open: opening values + :param (list) high: high values + :param (list) low: low values + :param (list) close: closing values + :param (list) dates: list of datetime objects. Default: None + :param kwargs: kwargs to be passed to increasing trace via + plotly.graph_objs.Scatter. + + :rtype (list) candle_incr_data: list of the box trace for + increasing candlesticks. + """ + increase_x, increase_y = _Candlestick( + open, high, low, close, dates, **kwargs + ).get_candle_increase() + + if "line" in kwargs: + kwargs.setdefault("fillcolor", kwargs["line"]["color"]) + else: + kwargs.setdefault("fillcolor", _DEFAULT_INCREASING_COLOR) + if "name" in kwargs: + kwargs.setdefault("showlegend", True) + else: + kwargs.setdefault("showlegend", False) + kwargs.setdefault("name", "Increasing") + kwargs.setdefault("line", dict(color=_DEFAULT_INCREASING_COLOR)) + + candle_incr_data = dict( + type="box", + x=increase_x, + y=increase_y, + whiskerwidth=0, + boxpoints=False, + **kwargs, + ) + + return [candle_incr_data] + + +def make_decreasing_candle(open, high, low, close, dates, **kwargs): + """ + Makes boxplot trace for decreasing candlesticks + + :param (list) open: opening values + :param (list) high: high values + :param (list) low: low values + :param (list) close: closing values + :param (list) dates: list of datetime objects. Default: None + :param kwargs: kwargs to be passed to decreasing trace via + plotly.graph_objs.Scatter. + + :rtype (list) candle_decr_data: list of the box trace for + decreasing candlesticks. + """ + + decrease_x, decrease_y = _Candlestick( + open, high, low, close, dates, **kwargs + ).get_candle_decrease() + + if "line" in kwargs: + kwargs.setdefault("fillcolor", kwargs["line"]["color"]) + else: + kwargs.setdefault("fillcolor", _DEFAULT_DECREASING_COLOR) + kwargs.setdefault("showlegend", False) + kwargs.setdefault("line", dict(color=_DEFAULT_DECREASING_COLOR)) + kwargs.setdefault("name", "Decreasing") + + candle_decr_data = dict( + type="box", + x=decrease_x, + y=decrease_y, + whiskerwidth=0, + boxpoints=False, + **kwargs, + ) + + return [candle_decr_data] + + +def create_candlestick(open, high, low, close, dates=None, direction="both", **kwargs): + """ + **deprecated**, use instead the plotly.graph_objects trace + :class:`plotly.graph_objects.Candlestick` + + :param (list) open: opening values + :param (list) high: high values + :param (list) low: low values + :param (list) close: closing values + :param (list) dates: list of datetime objects. Default: None + :param (string) direction: direction can be 'increasing', 'decreasing', + or 'both'. When the direction is 'increasing', the returned figure + consists of all candlesticks where the close value is greater than + the corresponding open value, and when the direction is + 'decreasing', the returned figure consists of all candlesticks + where the close value is less than or equal to the corresponding + open value. When the direction is 'both', both increasing and + decreasing candlesticks are returned. Default: 'both' + :param kwargs: kwargs passed through plotly.graph_objs.Scatter. + These kwargs describe other attributes about the ohlc Scatter trace + such as the color or the legend name. For more information on valid + kwargs call help(plotly.graph_objs.Scatter) + + :rtype (dict): returns a representation of candlestick chart figure. + + Example 1: Simple candlestick chart from a Pandas DataFrame + + >>> from plotly.figure_factory import create_candlestick + >>> from datetime import datetime + >>> import pandas as pd + + >>> df = pd.read_csv('https://raw.githubusercontent.com/plotly/datasets/master/finance-charts-apple.csv') + >>> fig = create_candlestick(df['AAPL.Open'], df['AAPL.High'], df['AAPL.Low'], df['AAPL.Close'], + ... dates=df.index) + >>> fig.show() + + Example 2: Customize the candlestick colors + + >>> from plotly.figure_factory import create_candlestick + >>> from plotly.graph_objs import Line, Marker + >>> from datetime import datetime + + >>> import pandas as pd + >>> df = pd.read_csv('https://raw.githubusercontent.com/plotly/datasets/master/finance-charts-apple.csv') + + >>> # Make increasing candlesticks and customize their color and name + >>> fig_increasing = create_candlestick(df['AAPL.Open'], df['AAPL.High'], df['AAPL.Low'], df['AAPL.Close'], + ... dates=df.index, + ... direction='increasing', name='AAPL', + ... marker=Marker(color='rgb(150, 200, 250)'), + ... line=Line(color='rgb(150, 200, 250)')) + + >>> # Make decreasing candlesticks and customize their color and name + >>> fig_decreasing = create_candlestick(df['AAPL.Open'], df['AAPL.High'], df['AAPL.Low'], df['AAPL.Close'], + ... dates=df.index, + ... direction='decreasing', + ... marker=Marker(color='rgb(128, 128, 128)'), + ... line=Line(color='rgb(128, 128, 128)')) + + >>> # Initialize the figure + >>> fig = fig_increasing + + >>> # Add decreasing data with .extend() + >>> fig.add_trace(fig_decreasing['data']) # doctest: +SKIP + >>> fig.show() + + Example 3: Candlestick chart with datetime objects + + >>> from plotly.figure_factory import create_candlestick + + >>> from datetime import datetime + + >>> # Add data + >>> open_data = [33.0, 33.3, 33.5, 33.0, 34.1] + >>> high_data = [33.1, 33.3, 33.6, 33.2, 34.8] + >>> low_data = [32.7, 32.7, 32.8, 32.6, 32.8] + >>> close_data = [33.0, 32.9, 33.3, 33.1, 33.1] + >>> dates = [datetime(year=2013, month=10, day=10), + ... datetime(year=2013, month=11, day=10), + ... datetime(year=2013, month=12, day=10), + ... datetime(year=2014, month=1, day=10), + ... datetime(year=2014, month=2, day=10)] + + >>> # Create ohlc + >>> fig = create_candlestick(open_data, high_data, + ... low_data, close_data, dates=dates) + >>> fig.show() + """ + if dates is not None: + utils.validate_equal_length(open, high, low, close, dates) + else: + utils.validate_equal_length(open, high, low, close) + validate_ohlc(open, high, low, close, direction, **kwargs) + + if direction == "increasing": + candle_incr_data = make_increasing_candle( + open, high, low, close, dates, **kwargs + ) + data = candle_incr_data + elif direction == "decreasing": + candle_decr_data = make_decreasing_candle( + open, high, low, close, dates, **kwargs + ) + data = candle_decr_data + else: + candle_incr_data = make_increasing_candle( + open, high, low, close, dates, **kwargs + ) + candle_decr_data = make_decreasing_candle( + open, high, low, close, dates, **kwargs + ) + data = candle_incr_data + candle_decr_data + + layout = graph_objs.Layout() + return graph_objs.Figure(data=data, layout=layout) + + +class _Candlestick(object): + """ + Refer to FigureFactory.create_candlestick() for docstring. + """ + + def __init__(self, open, high, low, close, dates, **kwargs): + self.open = open + self.high = high + self.low = low + self.close = close + if dates is not None: + self.x = dates + else: + self.x = [x for x in range(len(self.open))] + self.get_candle_increase() + + def get_candle_increase(self): + """ + Separate increasing data from decreasing data. + + The data is increasing when close value > open value + and decreasing when the close value <= open value. + """ + increase_y = [] + increase_x = [] + for index in range(len(self.open)): + if self.close[index] > self.open[index]: + increase_y.append(self.low[index]) + increase_y.append(self.open[index]) + increase_y.append(self.close[index]) + increase_y.append(self.close[index]) + increase_y.append(self.close[index]) + increase_y.append(self.high[index]) + increase_x.append(self.x[index]) + + increase_x = [[x, x, x, x, x, x] for x in increase_x] + increase_x = utils.flatten(increase_x) + + return increase_x, increase_y + + def get_candle_decrease(self): + """ + Separate increasing data from decreasing data. + + The data is increasing when close value > open value + and decreasing when the close value <= open value. + """ + decrease_y = [] + decrease_x = [] + for index in range(len(self.open)): + if self.close[index] <= self.open[index]: + decrease_y.append(self.low[index]) + decrease_y.append(self.open[index]) + decrease_y.append(self.close[index]) + decrease_y.append(self.close[index]) + decrease_y.append(self.close[index]) + decrease_y.append(self.high[index]) + decrease_x.append(self.x[index]) + + decrease_x = [[x, x, x, x, x, x] for x in decrease_x] + decrease_x = utils.flatten(decrease_x) + + return decrease_x, decrease_y diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/figure_factory/_county_choropleth.py b/.venv_haddock/lib/python3.12/site-packages/plotly/figure_factory/_county_choropleth.py new file mode 100644 index 0000000000000000000000000000000000000000..7b397e7c531b7237c543ad9f6f1781aa1e0d1ddd --- /dev/null +++ b/.venv_haddock/lib/python3.12/site-packages/plotly/figure_factory/_county_choropleth.py @@ -0,0 +1,1013 @@ +import io +import numpy as np +import os +import pandas as pd +import warnings + +from math import log, floor +from numbers import Number + +from plotly import optional_imports +import plotly.colors as clrs +from plotly.figure_factory import utils +from plotly.exceptions import PlotlyError +import plotly.graph_objs as go + +pd.options.mode.chained_assignment = None + +shapely = optional_imports.get_module("shapely") +shapefile = optional_imports.get_module("shapefile") +gp = optional_imports.get_module("geopandas") +_plotly_geo = optional_imports.get_module("_plotly_geo") + + +def _create_us_counties_df(st_to_state_name_dict, state_to_st_dict): + # URLS + abs_dir_path = os.path.realpath(_plotly_geo.__file__) + + abs_plotly_geo_path = os.path.dirname(abs_dir_path) + + abs_package_data_dir_path = os.path.join(abs_plotly_geo_path, "package_data") + + shape_pre2010 = "gz_2010_us_050_00_500k.shp" + shape_pre2010 = os.path.join(abs_package_data_dir_path, shape_pre2010) + + df_shape_pre2010 = gp.read_file(shape_pre2010) + df_shape_pre2010["FIPS"] = df_shape_pre2010["STATE"] + df_shape_pre2010["COUNTY"] + df_shape_pre2010["FIPS"] = pd.to_numeric(df_shape_pre2010["FIPS"]) + + states_path = "cb_2016_us_state_500k.shp" + states_path = os.path.join(abs_package_data_dir_path, states_path) + + df_state = gp.read_file(states_path) + df_state = df_state[["STATEFP", "NAME", "geometry"]] + df_state = df_state.rename(columns={"NAME": "STATE_NAME"}) + + filenames = [ + "cb_2016_us_county_500k.dbf", + "cb_2016_us_county_500k.shp", + "cb_2016_us_county_500k.shx", + ] + + for j in range(len(filenames)): + filenames[j] = os.path.join(abs_package_data_dir_path, filenames[j]) + + dbf = io.open(filenames[0], "rb") + shp = io.open(filenames[1], "rb") + shx = io.open(filenames[2], "rb") + + r = shapefile.Reader(shp=shp, shx=shx, dbf=dbf) + + attributes, geometry = [], [] + field_names = [field[0] for field in r.fields[1:]] + for row in r.shapeRecords(): + geometry.append(shapely.geometry.shape(row.shape.__geo_interface__)) + attributes.append(dict(zip(field_names, row.record))) + + gdf = gp.GeoDataFrame(data=attributes, geometry=geometry) + + gdf["FIPS"] = gdf["STATEFP"] + gdf["COUNTYFP"] + gdf["FIPS"] = pd.to_numeric(gdf["FIPS"]) + + # add missing counties + f = 46113 + singlerow = pd.DataFrame( + [ + [ + st_to_state_name_dict["SD"], + "SD", + df_shape_pre2010[df_shape_pre2010["FIPS"] == f]["geometry"].iloc[0], + df_shape_pre2010[df_shape_pre2010["FIPS"] == f]["FIPS"].iloc[0], + "46", + "Shannon", + ] + ], + columns=["State", "ST", "geometry", "FIPS", "STATEFP", "NAME"], + index=[max(gdf.index) + 1], + ) + gdf = pd.concat([gdf, singlerow], sort=True) + + f = 51515 + singlerow = pd.DataFrame( + [ + [ + st_to_state_name_dict["VA"], + "VA", + df_shape_pre2010[df_shape_pre2010["FIPS"] == f]["geometry"].iloc[0], + df_shape_pre2010[df_shape_pre2010["FIPS"] == f]["FIPS"].iloc[0], + "51", + "Bedford City", + ] + ], + columns=["State", "ST", "geometry", "FIPS", "STATEFP", "NAME"], + index=[max(gdf.index) + 1], + ) + gdf = pd.concat([gdf, singlerow], sort=True) + + f = 2270 + singlerow = pd.DataFrame( + [ + [ + st_to_state_name_dict["AK"], + "AK", + df_shape_pre2010[df_shape_pre2010["FIPS"] == f]["geometry"].iloc[0], + df_shape_pre2010[df_shape_pre2010["FIPS"] == f]["FIPS"].iloc[0], + "02", + "Wade Hampton", + ] + ], + columns=["State", "ST", "geometry", "FIPS", "STATEFP", "NAME"], + index=[max(gdf.index) + 1], + ) + gdf = pd.concat([gdf, singlerow], sort=True) + + row_2198 = gdf[gdf["FIPS"] == 2198] + row_2198.index = [max(gdf.index) + 1] + row_2198.loc[row_2198.index[0], "FIPS"] = 2201 + row_2198.loc[row_2198.index[0], "STATEFP"] = "02" + gdf = pd.concat([gdf, row_2198], sort=True) + + row_2105 = gdf[gdf["FIPS"] == 2105] + row_2105.index = [max(gdf.index) + 1] + row_2105.loc[row_2105.index[0], "FIPS"] = 2232 + row_2105.loc[row_2105.index[0], "STATEFP"] = "02" + gdf = pd.concat([gdf, row_2105], sort=True) + gdf = gdf.rename(columns={"NAME": "COUNTY_NAME"}) + + gdf_reduced = gdf[["FIPS", "STATEFP", "COUNTY_NAME", "geometry"]] + gdf_statefp = gdf_reduced.merge(df_state[["STATEFP", "STATE_NAME"]], on="STATEFP") + + ST = [] + for n in gdf_statefp["STATE_NAME"]: + ST.append(state_to_st_dict[n]) + + gdf_statefp["ST"] = ST + return gdf_statefp, df_state + + +st_to_state_name_dict = { + "AK": "Alaska", + "AL": "Alabama", + "AR": "Arkansas", + "AZ": "Arizona", + "CA": "California", + "CO": "Colorado", + "CT": "Connecticut", + "DC": "District of Columbia", + "DE": "Delaware", + "FL": "Florida", + "GA": "Georgia", + "HI": "Hawaii", + "IA": "Iowa", + "ID": "Idaho", + "IL": "Illinois", + "IN": "Indiana", + "KS": "Kansas", + "KY": "Kentucky", + "LA": "Louisiana", + "MA": "Massachusetts", + "MD": "Maryland", + "ME": "Maine", + "MI": "Michigan", + "MN": "Minnesota", + "MO": "Missouri", + "MS": "Mississippi", + "MT": "Montana", + "NC": "North Carolina", + "ND": "North Dakota", + "NE": "Nebraska", + "NH": "New Hampshire", + "NJ": "New Jersey", + "NM": "New Mexico", + "NV": "Nevada", + "NY": "New York", + "OH": "Ohio", + "OK": "Oklahoma", + "OR": "Oregon", + "PA": "Pennsylvania", + "RI": "Rhode Island", + "SC": "South Carolina", + "SD": "South Dakota", + "TN": "Tennessee", + "TX": "Texas", + "UT": "Utah", + "VA": "Virginia", + "VT": "Vermont", + "WA": "Washington", + "WI": "Wisconsin", + "WV": "West Virginia", + "WY": "Wyoming", +} + +state_to_st_dict = { + "Alabama": "AL", + "Alaska": "AK", + "American Samoa": "AS", + "Arizona": "AZ", + "Arkansas": "AR", + "California": "CA", + "Colorado": "CO", + "Commonwealth of the Northern Mariana Islands": "MP", + "Connecticut": "CT", + "Delaware": "DE", + "District of Columbia": "DC", + "Florida": "FL", + "Georgia": "GA", + "Guam": "GU", + "Hawaii": "HI", + "Idaho": "ID", + "Illinois": "IL", + "Indiana": "IN", + "Iowa": "IA", + "Kansas": "KS", + "Kentucky": "KY", + "Louisiana": "LA", + "Maine": "ME", + "Maryland": "MD", + "Massachusetts": "MA", + "Michigan": "MI", + "Minnesota": "MN", + "Mississippi": "MS", + "Missouri": "MO", + "Montana": "MT", + "Nebraska": "NE", + "Nevada": "NV", + "New Hampshire": "NH", + "New Jersey": "NJ", + "New Mexico": "NM", + "New York": "NY", + "North Carolina": "NC", + "North Dakota": "ND", + "Ohio": "OH", + "Oklahoma": "OK", + "Oregon": "OR", + "Pennsylvania": "PA", + "Puerto Rico": "", + "Rhode Island": "RI", + "South Carolina": "SC", + "South Dakota": "SD", + "Tennessee": "TN", + "Texas": "TX", + "United States Virgin Islands": "VI", + "Utah": "UT", + "Vermont": "VT", + "Virginia": "VA", + "Washington": "WA", + "West Virginia": "WV", + "Wisconsin": "WI", + "Wyoming": "WY", +} + +USA_XRANGE = [-125.0, -65.0] +USA_YRANGE = [25.0, 49.0] + + +def _human_format(number): + units = ["", "K", "M", "G", "T", "P"] + k = 1000.0 + magnitude = int(floor(log(number, k))) + return "%.2f%s" % (number / k**magnitude, units[magnitude]) + + +def _intervals_as_labels(array_of_intervals, round_legend_values, exponent_format): + """ + Transform an number interval to a clean string for legend + + Example: [-inf, 30] to '< 30' + """ + infs = [float("-inf"), float("inf")] + string_intervals = [] + for interval in array_of_intervals: + # round to 2nd decimal place + if round_legend_values: + rnd_interval = [ + (int(interval[i]) if interval[i] not in infs else interval[i]) + for i in range(2) + ] + else: + rnd_interval = [round(interval[0], 2), round(interval[1], 2)] + + num0 = rnd_interval[0] + num1 = rnd_interval[1] + if exponent_format: + if num0 not in infs: + num0 = _human_format(num0) + if num1 not in infs: + num1 = _human_format(num1) + else: + if num0 not in infs: + num0 = "{:,}".format(num0) + if num1 not in infs: + num1 = "{:,}".format(num1) + + if num0 == float("-inf"): + as_str = "< {}".format(num1) + elif num1 == float("inf"): + as_str = "> {}".format(num0) + else: + as_str = "{} - {}".format(num0, num1) + string_intervals.append(as_str) + return string_intervals + + +def _calculations( + df, + fips, + values, + index, + f, + simplify_county, + level, + x_centroids, + y_centroids, + centroid_text, + x_traces, + y_traces, + fips_polygon_map, +): + # 0-pad FIPS code to ensure exactly 5 digits + padded_f = str(f).zfill(5) + if fips_polygon_map[f].type == "Polygon": + x = fips_polygon_map[f].simplify(simplify_county).exterior.xy[0].tolist() + y = fips_polygon_map[f].simplify(simplify_county).exterior.xy[1].tolist() + + x_c, y_c = fips_polygon_map[f].centroid.xy + county_name_str = str(df[df["FIPS"] == f]["COUNTY_NAME"].iloc[0]) + state_name_str = str(df[df["FIPS"] == f]["STATE_NAME"].iloc[0]) + + t_c = ( + "County: " + + county_name_str + + "
" + + "State: " + + state_name_str + + "
" + + "FIPS: " + + padded_f + + "
Value: " + + str(values[index]) + ) + + x_centroids.append(x_c[0]) + y_centroids.append(y_c[0]) + centroid_text.append(t_c) + + x_traces[level] = x_traces[level] + x + [np.nan] + y_traces[level] = y_traces[level] + y + [np.nan] + elif fips_polygon_map[f].type == "MultiPolygon": + x = [ + poly.simplify(simplify_county).exterior.xy[0].tolist() + for poly in fips_polygon_map[f].geoms + ] + y = [ + poly.simplify(simplify_county).exterior.xy[1].tolist() + for poly in fips_polygon_map[f].geoms + ] + + x_c = [poly.centroid.xy[0].tolist() for poly in fips_polygon_map[f].geoms] + y_c = [poly.centroid.xy[1].tolist() for poly in fips_polygon_map[f].geoms] + + county_name_str = str(df[df["FIPS"] == f]["COUNTY_NAME"].iloc[0]) + state_name_str = str(df[df["FIPS"] == f]["STATE_NAME"].iloc[0]) + text = ( + "County: " + + county_name_str + + "
" + + "State: " + + state_name_str + + "
" + + "FIPS: " + + padded_f + + "
Value: " + + str(values[index]) + ) + t_c = [text for poly in fips_polygon_map[f].geoms] + x_centroids = x_c + x_centroids + y_centroids = y_c + y_centroids + centroid_text = t_c + centroid_text + for x_y_idx in range(len(x)): + x_traces[level] = x_traces[level] + x[x_y_idx] + [np.nan] + y_traces[level] = y_traces[level] + y[x_y_idx] + [np.nan] + + return x_traces, y_traces, x_centroids, y_centroids, centroid_text + + +def create_choropleth( + fips, + values, + scope=["usa"], + binning_endpoints=None, + colorscale=None, + order=None, + simplify_county=0.02, + simplify_state=0.02, + asp=None, + show_hover=True, + show_state_data=True, + state_outline=None, + county_outline=None, + centroid_marker=None, + round_legend_values=False, + exponent_format=False, + legend_title="", + **layout_options, +): + """ + **deprecated**, use instead + :func:`plotly.express.choropleth` with custom GeoJSON. + + This function also requires `shapely`, `geopandas` and `plotly-geo` to be installed. + + Returns figure for county choropleth. Uses data from package_data. + + :param (list) fips: list of FIPS values which correspond to the con + catination of state and county ids. An example is '01001'. + :param (list) values: list of numbers/strings which correspond to the + fips list. These are the values that will determine how the counties + are colored. + :param (list) scope: list of states and/or states abbreviations. Fits + all states in the camera tightly. Selecting ['usa'] is the equivalent + of appending all 50 states into your scope list. Selecting only 'usa' + does not include 'Alaska', 'Puerto Rico', 'American Samoa', + 'Commonwealth of the Northern Mariana Islands', 'Guam', + 'United States Virgin Islands'. These must be added manually to the + list. + Default = ['usa'] + :param (list) binning_endpoints: ascending numbers which implicitly define + real number intervals which are used as bins. The colorscale used must + have the same number of colors as the number of bins and this will + result in a categorical colormap. + :param (list) colorscale: a list of colors with length equal to the + number of categories of colors. The length must match either all + unique numbers in the 'values' list or if endpoints is being used, the + number of categories created by the endpoints.\n + For example, if binning_endpoints = [4, 6, 8], then there are 4 bins: + [-inf, 4), [4, 6), [6, 8), [8, inf) + :param (list) order: a list of the unique categories (numbers/bins) in any + desired order. This is helpful if you want to order string values to + a chosen colorscale. + :param (float) simplify_county: determines the simplification factor + for the counties. The larger the number, the fewer vertices and edges + each polygon has. See + http://toblerity.org/shapely/manual.html#object.simplify for more + information. + Default = 0.02 + :param (float) simplify_state: simplifies the state outline polygon. + See http://toblerity.org/shapely/manual.html#object.simplify for more + information. + Default = 0.02 + :param (float) asp: the width-to-height aspect ratio for the camera. + Default = 2.5 + :param (bool) show_hover: show county hover and centroid info + :param (bool) show_state_data: reveals state boundary lines + :param (dict) state_outline: dict of attributes of the state outline + including width and color. See + https://plot.ly/python/reference/#scatter-marker-line for all valid + params + :param (dict) county_outline: dict of attributes of the county outline + including width and color. See + https://plot.ly/python/reference/#scatter-marker-line for all valid + params + :param (dict) centroid_marker: dict of attributes of the centroid marker. + The centroid markers are invisible by default and appear visible on + selection. See https://plot.ly/python/reference/#scatter-marker for + all valid params + :param (bool) round_legend_values: automatically round the numbers that + appear in the legend to the nearest integer. + Default = False + :param (bool) exponent_format: if set to True, puts numbers in the K, M, + B number format. For example 4000.0 becomes 4.0K + Default = False + :param (str) legend_title: title that appears above the legend + :param **layout_options: a **kwargs argument for all layout parameters + + + Example 1: Florida:: + + import plotly.plotly as py + import plotly.figure_factory as ff + + import numpy as np + import pandas as pd + + df_sample = pd.read_csv( + 'https://raw.githubusercontent.com/plotly/datasets/master/minoritymajority.csv' + ) + df_sample_r = df_sample[df_sample['STNAME'] == 'Florida'] + + values = df_sample_r['TOT_POP'].tolist() + fips = df_sample_r['FIPS'].tolist() + + binning_endpoints = list(np.mgrid[min(values):max(values):4j]) + colorscale = ["#030512","#1d1d3b","#323268","#3d4b94","#3e6ab0", + "#4989bc","#60a7c7","#85c5d3","#b7e0e4","#eafcfd"] + fig = ff.create_choropleth( + fips=fips, values=values, scope=['Florida'], show_state_data=True, + colorscale=colorscale, binning_endpoints=binning_endpoints, + round_legend_values=True, plot_bgcolor='rgb(229,229,229)', + paper_bgcolor='rgb(229,229,229)', legend_title='Florida Population', + county_outline={'color': 'rgb(255,255,255)', 'width': 0.5}, + exponent_format=True, + ) + + Example 2: New England:: + + import plotly.figure_factory as ff + + import pandas as pd + + NE_states = ['Connecticut', 'Maine', 'Massachusetts', + 'New Hampshire', 'Rhode Island'] + df_sample = pd.read_csv( + 'https://raw.githubusercontent.com/plotly/datasets/master/minoritymajority.csv' + ) + df_sample_r = df_sample[df_sample['STNAME'].isin(NE_states)] + colorscale = ['rgb(68.0, 1.0, 84.0)', + 'rgb(66.0, 64.0, 134.0)', + 'rgb(38.0, 130.0, 142.0)', + 'rgb(63.0, 188.0, 115.0)', + 'rgb(216.0, 226.0, 25.0)'] + + values = df_sample_r['TOT_POP'].tolist() + fips = df_sample_r['FIPS'].tolist() + fig = ff.create_choropleth( + fips=fips, values=values, scope=NE_states, show_state_data=True + ) + fig.show() + + Example 3: California and Surrounding States:: + + import plotly.figure_factory as ff + + import pandas as pd + + df_sample = pd.read_csv( + 'https://raw.githubusercontent.com/plotly/datasets/master/minoritymajority.csv' + ) + df_sample_r = df_sample[df_sample['STNAME'] == 'California'] + + values = df_sample_r['TOT_POP'].tolist() + fips = df_sample_r['FIPS'].tolist() + + colorscale = [ + 'rgb(193, 193, 193)', + 'rgb(239,239,239)', + 'rgb(195, 196, 222)', + 'rgb(144,148,194)', + 'rgb(101,104,168)', + 'rgb(65, 53, 132)' + ] + + fig = ff.create_choropleth( + fips=fips, values=values, colorscale=colorscale, + scope=['CA', 'AZ', 'Nevada', 'Oregon', ' Idaho'], + binning_endpoints=[14348, 63983, 134827, 426762, 2081313], + county_outline={'color': 'rgb(255,255,255)', 'width': 0.5}, + legend_title='California Counties', + title='California and Nearby States' + ) + fig.show() + + Example 4: USA:: + + import plotly.figure_factory as ff + + import numpy as np + import pandas as pd + + df_sample = pd.read_csv( + 'https://raw.githubusercontent.com/plotly/datasets/master/laucnty16.csv' + ) + df_sample['State FIPS Code'] = df_sample['State FIPS Code'].apply( + lambda x: str(x).zfill(2) + ) + df_sample['County FIPS Code'] = df_sample['County FIPS Code'].apply( + lambda x: str(x).zfill(3) + ) + df_sample['FIPS'] = ( + df_sample['State FIPS Code'] + df_sample['County FIPS Code'] + ) + + binning_endpoints = list(np.linspace(1, 12, len(colorscale) - 1)) + colorscale = ["#f7fbff", "#ebf3fb", "#deebf7", "#d2e3f3", "#c6dbef", + "#b3d2e9", "#9ecae1", "#85bcdb", "#6baed6", "#57a0ce", + "#4292c6", "#3082be", "#2171b5", "#1361a9", "#08519c", + "#0b4083","#08306b"] + fips = df_sample['FIPS'] + values = df_sample['Unemployment Rate (%)'] + fig = ff.create_choropleth( + fips=fips, values=values, scope=['usa'], + binning_endpoints=binning_endpoints, colorscale=colorscale, + show_hover=True, centroid_marker={'opacity': 0}, + asp=2.9, title='USA by Unemployment %', + legend_title='Unemployment %' + ) + fig.show() + """ + # ensure optional modules imported + if not _plotly_geo: + raise ValueError( + """ +The create_choropleth figure factory requires the plotly-geo package. +Install using pip with: + +$ pip install plotly-geo + +Or, install using conda with + +$ conda install -c plotly plotly-geo +""" + ) + + if not gp or not shapefile or not shapely: + raise ImportError( + "geopandas, pyshp and shapely must be installed for this figure " + "factory.\n\nRun the following commands to install the correct " + "versions of the following modules:\n\n" + "```\n" + "$ pip install geopandas==0.3.0\n" + "$ pip install pyshp==1.2.10\n" + "$ pip install shapely==1.6.3\n" + "```\n" + "If you are using Windows, follow this post to properly " + "install geopandas and dependencies:" + "http://geoffboeing.com/2014/09/using-geopandas-windows/\n\n" + "If you are using Anaconda, do not use PIP to install the " + "packages above. Instead use conda to install them:\n\n" + "```\n" + "$ conda install plotly\n" + "$ conda install geopandas\n" + "```" + ) + + df, df_state = _create_us_counties_df(st_to_state_name_dict, state_to_st_dict) + + fips_polygon_map = dict(zip(df["FIPS"].tolist(), df["geometry"].tolist())) + + if not state_outline: + state_outline = {"color": "rgb(240, 240, 240)", "width": 1} + if not county_outline: + county_outline = {"color": "rgb(0, 0, 0)", "width": 0} + if not centroid_marker: + centroid_marker = {"size": 3, "color": "white", "opacity": 1} + + # ensure centroid markers appear on selection + if "opacity" not in centroid_marker: + centroid_marker.update({"opacity": 1}) + + if len(fips) != len(values): + raise PlotlyError("fips and values must be the same length") + + # make fips, values into lists + if isinstance(fips, pd.core.series.Series): + fips = fips.tolist() + if isinstance(values, pd.core.series.Series): + values = values.tolist() + + # make fips numeric + fips = map(lambda x: int(x), fips) + + if binning_endpoints: + intervals = utils.endpts_to_intervals(binning_endpoints) + LEVELS = _intervals_as_labels(intervals, round_legend_values, exponent_format) + else: + if not order: + LEVELS = sorted(list(set(values))) + else: + # check if order is permutation + # of unique color col values + same_sets = sorted(list(set(values))) == set(order) + no_duplicates = not any(order.count(x) > 1 for x in order) + if same_sets and no_duplicates: + LEVELS = order + else: + raise PlotlyError( + "if you are using a custom order of unique values from " + "your color column, you must: have all the unique values " + "in your order and have no duplicate items" + ) + + if not colorscale: + colorscale = [] + viridis_colors = clrs.colorscale_to_colors(clrs.PLOTLY_SCALES["Viridis"]) + viridis_colors = clrs.color_parser(viridis_colors, clrs.hex_to_rgb) + viridis_colors = clrs.color_parser(viridis_colors, clrs.label_rgb) + viri_len = len(viridis_colors) + 1 + viri_intervals = utils.endpts_to_intervals(list(np.linspace(0, 1, viri_len)))[ + 1:-1 + ] + + for L in np.linspace(0, 1, len(LEVELS)): + for idx, inter in enumerate(viri_intervals): + if L == 0: + break + elif inter[0] < L <= inter[1]: + break + + intermed = (L - viri_intervals[idx][0]) / ( + viri_intervals[idx][1] - viri_intervals[idx][0] + ) + + float_color = clrs.find_intermediate_color( + viridis_colors[idx], viridis_colors[idx], intermed, colortype="rgb" + ) + + # make R,G,B into int values + float_color = clrs.unlabel_rgb(float_color) + float_color = clrs.unconvert_from_RGB_255(float_color) + int_rgb = clrs.convert_to_RGB_255(float_color) + int_rgb = clrs.label_rgb(int_rgb) + + colorscale.append(int_rgb) + + if len(colorscale) < len(LEVELS): + raise PlotlyError( + "You have {} LEVELS. Your number of colors in 'colorscale' must " + "be at least the number of LEVELS: {}. If you are " + "using 'binning_endpoints' then 'colorscale' must have at " + "least len(binning_endpoints) + 2 colors".format( + len(LEVELS), min(LEVELS, LEVELS[:20]) + ) + ) + + color_lookup = dict(zip(LEVELS, colorscale)) + x_traces = dict(zip(LEVELS, [[] for i in range(len(LEVELS))])) + y_traces = dict(zip(LEVELS, [[] for i in range(len(LEVELS))])) + + # scope + if isinstance(scope, str): + raise PlotlyError("'scope' must be a list/tuple/sequence") + + scope_names = [] + extra_states = [ + "Alaska", + "Commonwealth of the Northern Mariana Islands", + "Puerto Rico", + "Guam", + "United States Virgin Islands", + "American Samoa", + ] + for state in scope: + if state.lower() == "usa": + scope_names = df["STATE_NAME"].unique() + scope_names = list(scope_names) + for ex_st in extra_states: + try: + scope_names.remove(ex_st) + except ValueError: + pass + else: + if state in st_to_state_name_dict.keys(): + state = st_to_state_name_dict[state] + scope_names.append(state) + df_state = df_state[df_state["STATE_NAME"].isin(scope_names)] + + plot_data = [] + x_centroids = [] + y_centroids = [] + centroid_text = [] + fips_not_in_shapefile = [] + if not binning_endpoints: + for index, f in enumerate(fips): + level = values[index] + try: + fips_polygon_map[f].type + + ( + x_traces, + y_traces, + x_centroids, + y_centroids, + centroid_text, + ) = _calculations( + df, + fips, + values, + index, + f, + simplify_county, + level, + x_centroids, + y_centroids, + centroid_text, + x_traces, + y_traces, + fips_polygon_map, + ) + except KeyError: + fips_not_in_shapefile.append(f) + + else: + for index, f in enumerate(fips): + for j, inter in enumerate(intervals): + if inter[0] < values[index] <= inter[1]: + break + level = LEVELS[j] + + try: + fips_polygon_map[f].type + + ( + x_traces, + y_traces, + x_centroids, + y_centroids, + centroid_text, + ) = _calculations( + df, + fips, + values, + index, + f, + simplify_county, + level, + x_centroids, + y_centroids, + centroid_text, + x_traces, + y_traces, + fips_polygon_map, + ) + except KeyError: + fips_not_in_shapefile.append(f) + + if len(fips_not_in_shapefile) > 0: + msg = ( + "Unrecognized FIPS Values\n\nWhoops! It looks like you are " + "trying to pass at least one FIPS value that is not in " + "our shapefile of FIPS and data for the counties. Your " + "choropleth will still show up but these counties cannot " + "be shown.\nUnrecognized FIPS are: {}".format(fips_not_in_shapefile) + ) + warnings.warn(msg) + + x_states = [] + y_states = [] + for index, row in df_state.iterrows(): + if df_state["geometry"][index].type == "Polygon": + x = row.geometry.simplify(simplify_state).exterior.xy[0].tolist() + y = row.geometry.simplify(simplify_state).exterior.xy[1].tolist() + x_states = x_states + x + y_states = y_states + y + elif df_state["geometry"][index].type == "MultiPolygon": + x = [ + poly.simplify(simplify_state).exterior.xy[0].tolist() + for poly in df_state["geometry"][index].geoms + ] + y = [ + poly.simplify(simplify_state).exterior.xy[1].tolist() + for poly in df_state["geometry"][index].geoms + ] + for segment in range(len(x)): + x_states = x_states + x[segment] + y_states = y_states + y[segment] + x_states.append(np.nan) + y_states.append(np.nan) + x_states.append(np.nan) + y_states.append(np.nan) + + for lev in LEVELS: + county_data = dict( + type="scatter", + mode="lines", + x=x_traces[lev], + y=y_traces[lev], + line=county_outline, + fill="toself", + fillcolor=color_lookup[lev], + name=lev, + hoverinfo="none", + ) + plot_data.append(county_data) + + if show_hover: + hover_points = dict( + type="scatter", + showlegend=False, + legendgroup="centroids", + x=x_centroids, + y=y_centroids, + text=centroid_text, + name="US Counties", + mode="markers", + marker={"color": "white", "opacity": 0}, + hoverinfo="text", + ) + centroids_on_select = dict( + selected=dict(marker=centroid_marker), + unselected=dict(marker=dict(opacity=0)), + ) + hover_points.update(centroids_on_select) + plot_data.append(hover_points) + + if show_state_data: + state_data = dict( + type="scatter", + legendgroup="States", + line=state_outline, + x=x_states, + y=y_states, + hoverinfo="text", + showlegend=False, + mode="lines", + ) + plot_data.append(state_data) + + DEFAULT_LAYOUT = dict( + hovermode="closest", + xaxis=dict( + autorange=False, + range=USA_XRANGE, + showgrid=False, + zeroline=False, + fixedrange=True, + showticklabels=False, + ), + yaxis=dict( + autorange=False, + range=USA_YRANGE, + showgrid=False, + zeroline=False, + fixedrange=True, + showticklabels=False, + ), + margin=dict(t=40, b=20, r=20, l=20), + width=900, + height=450, + dragmode="select", + legend=dict(traceorder="reversed", xanchor="right", yanchor="top", x=1, y=1), + annotations=[], + ) + fig = dict(data=plot_data, layout=DEFAULT_LAYOUT) + fig["layout"].update(layout_options) + fig["layout"]["annotations"].append( + dict( + x=1, + y=1.05, + xref="paper", + yref="paper", + xanchor="right", + showarrow=False, + text="" + legend_title + "", + ) + ) + + if len(scope) == 1 and scope[0].lower() == "usa": + xaxis_range_low = -125.0 + xaxis_range_high = -55.0 + yaxis_range_low = 25.0 + yaxis_range_high = 49.0 + else: + xaxis_range_low = float("inf") + xaxis_range_high = float("-inf") + yaxis_range_low = float("inf") + yaxis_range_high = float("-inf") + for trace in fig["data"]: + if all(isinstance(n, Number) for n in trace["x"]): + calc_x_min = min(trace["x"] or [float("inf")]) + calc_x_max = max(trace["x"] or [float("-inf")]) + if calc_x_min < xaxis_range_low: + xaxis_range_low = calc_x_min + if calc_x_max > xaxis_range_high: + xaxis_range_high = calc_x_max + if all(isinstance(n, Number) for n in trace["y"]): + calc_y_min = min(trace["y"] or [float("inf")]) + calc_y_max = max(trace["y"] or [float("-inf")]) + if calc_y_min < yaxis_range_low: + yaxis_range_low = calc_y_min + if calc_y_max > yaxis_range_high: + yaxis_range_high = calc_y_max + + # camera zoom + fig["layout"]["xaxis"]["range"] = [xaxis_range_low, xaxis_range_high] + fig["layout"]["yaxis"]["range"] = [yaxis_range_low, yaxis_range_high] + + # aspect ratio + if asp is None: + usa_x_range = USA_XRANGE[1] - USA_XRANGE[0] + usa_y_range = USA_YRANGE[1] - USA_YRANGE[0] + asp = usa_x_range / usa_y_range + + # based on your figure + width = float( + fig["layout"]["xaxis"]["range"][1] - fig["layout"]["xaxis"]["range"][0] + ) + height = float( + fig["layout"]["yaxis"]["range"][1] - fig["layout"]["yaxis"]["range"][0] + ) + + center = ( + sum(fig["layout"]["xaxis"]["range"]) / 2.0, + sum(fig["layout"]["yaxis"]["range"]) / 2.0, + ) + + if height / width > (1 / asp): + new_width = asp * height + fig["layout"]["xaxis"]["range"][0] = center[0] - new_width * 0.5 + fig["layout"]["xaxis"]["range"][1] = center[0] + new_width * 0.5 + else: + new_height = (1 / asp) * width + fig["layout"]["yaxis"]["range"][0] = center[1] - new_height * 0.5 + fig["layout"]["yaxis"]["range"][1] = center[1] + new_height * 0.5 + + return go.Figure(fig) diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/figure_factory/_dendrogram.py b/.venv_haddock/lib/python3.12/site-packages/plotly/figure_factory/_dendrogram.py new file mode 100644 index 0000000000000000000000000000000000000000..fd6d5050b865ebbbd88bd9c6aeebac24e3994ce2 --- /dev/null +++ b/.venv_haddock/lib/python3.12/site-packages/plotly/figure_factory/_dendrogram.py @@ -0,0 +1,395 @@ +from collections import OrderedDict + +from plotly import exceptions, optional_imports +from plotly.graph_objs import graph_objs + +# Optional imports, may be None for users that only use our core functionality. +np = optional_imports.get_module("numpy") +scp = optional_imports.get_module("scipy") +sch = optional_imports.get_module("scipy.cluster.hierarchy") +scs = optional_imports.get_module("scipy.spatial") + + +def create_dendrogram( + X, + orientation="bottom", + labels=None, + colorscale=None, + distfun=None, + linkagefun=lambda x: sch.linkage(x, "complete"), + hovertext=None, + color_threshold=None, +): + """ + Function that returns a dendrogram Plotly figure object. This is a thin + wrapper around scipy.cluster.hierarchy.dendrogram. + + See also https://dash.plot.ly/dash-bio/clustergram. + + :param (ndarray) X: Matrix of observations as array of arrays + :param (str) orientation: 'top', 'right', 'bottom', or 'left' + :param (list) labels: List of axis category labels(observation labels) + :param (list) colorscale: Optional colorscale for the dendrogram tree. + Requires 8 colors to be specified, the 7th of + which is ignored. With scipy>=1.5.0, the 2nd, 3rd + and 6th are used twice as often as the others. + Given a shorter list, the missing values are + replaced with defaults and with a longer list the + extra values are ignored. + :param (function) distfun: Function to compute the pairwise distance from + the observations + :param (function) linkagefun: Function to compute the linkage matrix from + the pairwise distances + :param (list[list]) hovertext: List of hovertext for constituent traces of dendrogram + clusters + :param (double) color_threshold: Value at which the separation of clusters will be made + + Example 1: Simple bottom oriented dendrogram + + >>> from plotly.figure_factory import create_dendrogram + + >>> import numpy as np + + >>> X = np.random.rand(10,10) + >>> fig = create_dendrogram(X) + >>> fig.show() + + Example 2: Dendrogram to put on the left of the heatmap + + >>> from plotly.figure_factory import create_dendrogram + + >>> import numpy as np + + >>> X = np.random.rand(5,5) + >>> names = ['Jack', 'Oxana', 'John', 'Chelsea', 'Mark'] + >>> dendro = create_dendrogram(X, orientation='right', labels=names) + >>> dendro.update_layout({'width':700, 'height':500}) # doctest: +SKIP + >>> dendro.show() + + Example 3: Dendrogram with Pandas + + >>> from plotly.figure_factory import create_dendrogram + + >>> import numpy as np + >>> import pandas as pd + + >>> Index= ['A','B','C','D','E','F','G','H','I','J'] + >>> df = pd.DataFrame(abs(np.random.randn(10, 10)), index=Index) + >>> fig = create_dendrogram(df, labels=Index) + >>> fig.show() + """ + if not scp or not scs or not sch: + raise ImportError( + "FigureFactory.create_dendrogram requires scipy, \ + scipy.spatial and scipy.hierarchy" + ) + + s = X.shape + if len(s) != 2: + exceptions.PlotlyError("X should be 2-dimensional array.") + + if distfun is None: + distfun = scs.distance.pdist + + dendrogram = _Dendrogram( + X, + orientation, + labels, + colorscale, + distfun=distfun, + linkagefun=linkagefun, + hovertext=hovertext, + color_threshold=color_threshold, + ) + + return graph_objs.Figure(data=dendrogram.data, layout=dendrogram.layout) + + +class _Dendrogram(object): + """Refer to FigureFactory.create_dendrogram() for docstring.""" + + def __init__( + self, + X, + orientation="bottom", + labels=None, + colorscale=None, + width=np.inf, + height=np.inf, + xaxis="xaxis", + yaxis="yaxis", + distfun=None, + linkagefun=lambda x: sch.linkage(x, "complete"), + hovertext=None, + color_threshold=None, + ): + self.orientation = orientation + self.labels = labels + self.xaxis = xaxis + self.yaxis = yaxis + self.data = [] + self.leaves = [] + self.sign = {self.xaxis: 1, self.yaxis: 1} + self.layout = {self.xaxis: {}, self.yaxis: {}} + + if self.orientation in ["left", "bottom"]: + self.sign[self.xaxis] = 1 + else: + self.sign[self.xaxis] = -1 + + if self.orientation in ["right", "bottom"]: + self.sign[self.yaxis] = 1 + else: + self.sign[self.yaxis] = -1 + + if distfun is None: + distfun = scs.distance.pdist + + (dd_traces, xvals, yvals, ordered_labels, leaves) = self.get_dendrogram_traces( + X, colorscale, distfun, linkagefun, hovertext, color_threshold + ) + + self.labels = ordered_labels + self.leaves = leaves + yvals_flat = yvals.flatten() + xvals_flat = xvals.flatten() + + self.zero_vals = [] + + for i in range(len(yvals_flat)): + if yvals_flat[i] == 0.0 and xvals_flat[i] not in self.zero_vals: + self.zero_vals.append(xvals_flat[i]) + + if len(self.zero_vals) > len(yvals) + 1: + # If the length of zero_vals is larger than the length of yvals, + # it means that there are wrong vals because of the identicial samples. + # Three and more identicial samples will make the yvals of spliting + # center into 0 and it will accidentally take it as leaves. + l_border = int(min(self.zero_vals)) + r_border = int(max(self.zero_vals)) + correct_leaves_pos = range( + l_border, r_border + 1, int((r_border - l_border) / len(yvals)) + ) + # Regenerating the leaves pos from the self.zero_vals with equally intervals. + self.zero_vals = [v for v in correct_leaves_pos] + + self.zero_vals.sort() + self.layout = self.set_figure_layout(width, height) + self.data = dd_traces + + def get_color_dict(self, colorscale): + """ + Returns colorscale used for dendrogram tree clusters. + + :param (list) colorscale: Colors to use for the plot in rgb format. + :rtype (dict): A dict of default colors mapped to the user colorscale. + + """ + + # These are the color codes returned for dendrograms + # We're replacing them with nicer colors + # This list is the colors that can be used by dendrogram, which were + # determined as the combination of the default above_threshold_color and + # the default color palette (see scipy/cluster/hierarchy.py) + d = { + "r": "red", + "g": "green", + "b": "blue", + "c": "cyan", + "m": "magenta", + "y": "yellow", + "k": "black", + # TODO: 'w' doesn't seem to be in the default color + # palette in scipy/cluster/hierarchy.py + "w": "white", + } + default_colors = OrderedDict(sorted(d.items(), key=lambda t: t[0])) + + if colorscale is None: + rgb_colorscale = [ + "rgb(0,116,217)", # blue + "rgb(35,205,205)", # cyan + "rgb(61,153,112)", # green + "rgb(40,35,35)", # black + "rgb(133,20,75)", # magenta + "rgb(255,65,54)", # red + "rgb(255,255,255)", # white + "rgb(255,220,0)", # yellow + ] + else: + rgb_colorscale = colorscale + + for i in range(len(default_colors.keys())): + k = list(default_colors.keys())[i] # PY3 won't index keys + if i < len(rgb_colorscale): + default_colors[k] = rgb_colorscale[i] + + # add support for cyclic format colors as introduced in scipy===1.5.0 + # before this, the colors were named 'r', 'b', 'y' etc., now they are + # named 'C0', 'C1', etc. To keep the colors consistent regardless of the + # scipy version, we try as much as possible to map the new colors to the + # old colors + # this mapping was found by inpecting scipy/cluster/hierarchy.py (see + # comment above). + new_old_color_map = [ + ("C0", "b"), + ("C1", "g"), + ("C2", "r"), + ("C3", "c"), + ("C4", "m"), + ("C5", "y"), + ("C6", "k"), + ("C7", "g"), + ("C8", "r"), + ("C9", "c"), + ] + for nc, oc in new_old_color_map: + try: + default_colors[nc] = default_colors[oc] + except KeyError: + # it could happen that the old color isn't found (if a custom + # colorscale was specified), in this case we set it to an + # arbitrary default. + default_colors[nc] = "rgb(0,116,217)" + + return default_colors + + def set_axis_layout(self, axis_key): + """ + Sets and returns default axis object for dendrogram figure. + + :param (str) axis_key: E.g., 'xaxis', 'xaxis1', 'yaxis', yaxis1', etc. + :rtype (dict): An axis_key dictionary with set parameters. + + """ + axis_defaults = { + "type": "linear", + "ticks": "outside", + "mirror": "allticks", + "rangemode": "tozero", + "showticklabels": True, + "zeroline": False, + "showgrid": False, + "showline": True, + } + + if len(self.labels) != 0: + axis_key_labels = self.xaxis + if self.orientation in ["left", "right"]: + axis_key_labels = self.yaxis + if axis_key_labels not in self.layout: + self.layout[axis_key_labels] = {} + self.layout[axis_key_labels]["tickvals"] = [ + zv * self.sign[axis_key] for zv in self.zero_vals + ] + self.layout[axis_key_labels]["ticktext"] = self.labels + self.layout[axis_key_labels]["tickmode"] = "array" + + self.layout[axis_key].update(axis_defaults) + + return self.layout[axis_key] + + def set_figure_layout(self, width, height): + """ + Sets and returns default layout object for dendrogram figure. + + """ + self.layout.update( + { + "showlegend": False, + "autosize": False, + "hovermode": "closest", + "width": width, + "height": height, + } + ) + + self.set_axis_layout(self.xaxis) + self.set_axis_layout(self.yaxis) + + return self.layout + + def get_dendrogram_traces( + self, X, colorscale, distfun, linkagefun, hovertext, color_threshold + ): + """ + Calculates all the elements needed for plotting a dendrogram. + + :param (ndarray) X: Matrix of observations as array of arrays + :param (list) colorscale: Color scale for dendrogram tree clusters + :param (function) distfun: Function to compute the pairwise distance + from the observations + :param (function) linkagefun: Function to compute the linkage matrix + from the pairwise distances + :param (list) hovertext: List of hovertext for constituent traces of dendrogram + :rtype (tuple): Contains all the traces in the following order: + (a) trace_list: List of Plotly trace objects for dendrogram tree + (b) icoord: All X points of the dendrogram tree as array of arrays + with length 4 + (c) dcoord: All Y points of the dendrogram tree as array of arrays + with length 4 + (d) ordered_labels: leaf labels in the order they are going to + appear on the plot + (e) P['leaves']: left-to-right traversal of the leaves + + """ + d = distfun(X) + Z = linkagefun(d) + P = sch.dendrogram( + Z, + orientation=self.orientation, + labels=self.labels, + no_plot=True, + color_threshold=color_threshold, + ) + + icoord = np.array(P["icoord"]) + dcoord = np.array(P["dcoord"]) + ordered_labels = np.array(P["ivl"]) + color_list = np.array(P["color_list"]) + colors = self.get_color_dict(colorscale) + + trace_list = [] + + for i in range(len(icoord)): + # xs and ys are arrays of 4 points that make up the '∩' shapes + # of the dendrogram tree + if self.orientation in ["top", "bottom"]: + xs = icoord[i] + else: + xs = dcoord[i] + + if self.orientation in ["top", "bottom"]: + ys = dcoord[i] + else: + ys = icoord[i] + color_key = color_list[i] + hovertext_label = None + if hovertext: + hovertext_label = hovertext[i] + trace = dict( + type="scatter", + x=np.multiply(self.sign[self.xaxis], xs), + y=np.multiply(self.sign[self.yaxis], ys), + mode="lines", + marker=dict(color=colors[color_key]), + text=hovertext_label, + hoverinfo="text", + ) + + try: + x_index = int(self.xaxis[-1]) + except ValueError: + x_index = "" + + try: + y_index = int(self.yaxis[-1]) + except ValueError: + y_index = "" + + trace["xaxis"] = f"x{x_index}" + trace["yaxis"] = f"y{y_index}" + + trace_list.append(trace) + + return trace_list, icoord, dcoord, ordered_labels, P["leaves"] diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/figure_factory/_distplot.py b/.venv_haddock/lib/python3.12/site-packages/plotly/figure_factory/_distplot.py new file mode 100644 index 0000000000000000000000000000000000000000..73f660964560e0f7d66dfd6ba6cced9ad9e62286 --- /dev/null +++ b/.venv_haddock/lib/python3.12/site-packages/plotly/figure_factory/_distplot.py @@ -0,0 +1,441 @@ +from plotly import exceptions, optional_imports +from plotly.figure_factory import utils +from plotly.graph_objs import graph_objs + +# Optional imports, may be None for users that only use our core functionality. +np = optional_imports.get_module("numpy") +pd = optional_imports.get_module("pandas") +scipy = optional_imports.get_module("scipy") +scipy_stats = optional_imports.get_module("scipy.stats") + + +DEFAULT_HISTNORM = "probability density" +ALTERNATIVE_HISTNORM = "probability" + + +def validate_distplot(hist_data, curve_type): + """ + Distplot-specific validations + + :raises: (PlotlyError) If hist_data is not a list of lists + :raises: (PlotlyError) If curve_type is not valid (i.e. not 'kde' or + 'normal'). + """ + hist_data_types = (list,) + if np: + hist_data_types += (np.ndarray,) + if pd: + hist_data_types += (pd.core.series.Series,) + + if not isinstance(hist_data[0], hist_data_types): + raise exceptions.PlotlyError( + "Oops, this function was written " + "to handle multiple datasets, if " + "you want to plot just one, make " + "sure your hist_data variable is " + "still a list of lists, i.e. x = " + "[1, 2, 3] -> x = [[1, 2, 3]]" + ) + + curve_opts = ("kde", "normal") + if curve_type not in curve_opts: + raise exceptions.PlotlyError("curve_type must be defined as 'kde' or 'normal'") + + if not scipy: + raise ImportError("FigureFactory.create_distplot requires scipy") + + +def create_distplot( + hist_data, + group_labels, + bin_size=1.0, + curve_type="kde", + colors=None, + rug_text=None, + histnorm=DEFAULT_HISTNORM, + show_hist=True, + show_curve=True, + show_rug=True, +): + """ + Function that creates a distplot similar to seaborn.distplot; + **this function is deprecated**, use instead :mod:`plotly.express` + functions, for example + + >>> import plotly.express as px + >>> tips = px.data.tips() + >>> fig = px.histogram(tips, x="total_bill", y="tip", color="sex", marginal="rug", + ... hover_data=tips.columns) + >>> fig.show() + + + The distplot can be composed of all or any combination of the following + 3 components: (1) histogram, (2) curve: (a) kernel density estimation + or (b) normal curve, and (3) rug plot. Additionally, multiple distplots + (from multiple datasets) can be created in the same plot. + + :param (list[list]) hist_data: Use list of lists to plot multiple data + sets on the same plot. + :param (list[str]) group_labels: Names for each data set. + :param (list[float]|float) bin_size: Size of histogram bins. + Default = 1. + :param (str) curve_type: 'kde' or 'normal'. Default = 'kde' + :param (str) histnorm: 'probability density' or 'probability' + Default = 'probability density' + :param (bool) show_hist: Add histogram to distplot? Default = True + :param (bool) show_curve: Add curve to distplot? Default = True + :param (bool) show_rug: Add rug to distplot? Default = True + :param (list[str]) colors: Colors for traces. + :param (list[list]) rug_text: Hovertext values for rug_plot, + :return (dict): Representation of a distplot figure. + + Example 1: Simple distplot of 1 data set + + >>> from plotly.figure_factory import create_distplot + + >>> hist_data = [[1.1, 1.1, 2.5, 3.0, 3.5, + ... 3.5, 4.1, 4.4, 4.5, 4.5, + ... 5.0, 5.0, 5.2, 5.5, 5.5, + ... 5.5, 5.5, 5.5, 6.1, 7.0]] + >>> group_labels = ['distplot example'] + >>> fig = create_distplot(hist_data, group_labels) + >>> fig.show() + + + Example 2: Two data sets and added rug text + + >>> from plotly.figure_factory import create_distplot + >>> # Add histogram data + >>> hist1_x = [0.8, 1.2, 0.2, 0.6, 1.6, + ... -0.9, -0.07, 1.95, 0.9, -0.2, + ... -0.5, 0.3, 0.4, -0.37, 0.6] + >>> hist2_x = [0.8, 1.5, 1.5, 0.6, 0.59, + ... 1.0, 0.8, 1.7, 0.5, 0.8, + ... -0.3, 1.2, 0.56, 0.3, 2.2] + + >>> # Group data together + >>> hist_data = [hist1_x, hist2_x] + + >>> group_labels = ['2012', '2013'] + + >>> # Add text + >>> rug_text_1 = ['a1', 'b1', 'c1', 'd1', 'e1', + ... 'f1', 'g1', 'h1', 'i1', 'j1', + ... 'k1', 'l1', 'm1', 'n1', 'o1'] + + >>> rug_text_2 = ['a2', 'b2', 'c2', 'd2', 'e2', + ... 'f2', 'g2', 'h2', 'i2', 'j2', + ... 'k2', 'l2', 'm2', 'n2', 'o2'] + + >>> # Group text together + >>> rug_text_all = [rug_text_1, rug_text_2] + + >>> # Create distplot + >>> fig = create_distplot( + ... hist_data, group_labels, rug_text=rug_text_all, bin_size=.2) + + >>> # Add title + >>> fig.update_layout(title='Dist Plot') # doctest: +SKIP + >>> fig.show() + + + Example 3: Plot with normal curve and hide rug plot + + >>> from plotly.figure_factory import create_distplot + >>> import numpy as np + + >>> x1 = np.random.randn(190) + >>> x2 = np.random.randn(200)+1 + >>> x3 = np.random.randn(200)-1 + >>> x4 = np.random.randn(210)+2 + + >>> hist_data = [x1, x2, x3, x4] + >>> group_labels = ['2012', '2013', '2014', '2015'] + + >>> fig = create_distplot( + ... hist_data, group_labels, curve_type='normal', + ... show_rug=False, bin_size=.4) + + + Example 4: Distplot with Pandas + + >>> from plotly.figure_factory import create_distplot + >>> import numpy as np + >>> import pandas as pd + + >>> df = pd.DataFrame({'2012': np.random.randn(200), + ... '2013': np.random.randn(200)+1}) + >>> fig = create_distplot([df[c] for c in df.columns], df.columns) + >>> fig.show() + """ + if colors is None: + colors = [] + if rug_text is None: + rug_text = [] + + validate_distplot(hist_data, curve_type) + utils.validate_equal_length(hist_data, group_labels) + + if isinstance(bin_size, (float, int)): + bin_size = [bin_size] * len(hist_data) + + data = [] + if show_hist: + hist = _Distplot( + hist_data, + histnorm, + group_labels, + bin_size, + curve_type, + colors, + rug_text, + show_hist, + show_curve, + ).make_hist() + + data.append(hist) + + if show_curve: + if curve_type == "normal": + curve = _Distplot( + hist_data, + histnorm, + group_labels, + bin_size, + curve_type, + colors, + rug_text, + show_hist, + show_curve, + ).make_normal() + else: + curve = _Distplot( + hist_data, + histnorm, + group_labels, + bin_size, + curve_type, + colors, + rug_text, + show_hist, + show_curve, + ).make_kde() + + data.append(curve) + + if show_rug: + rug = _Distplot( + hist_data, + histnorm, + group_labels, + bin_size, + curve_type, + colors, + rug_text, + show_hist, + show_curve, + ).make_rug() + + data.append(rug) + layout = graph_objs.Layout( + barmode="overlay", + hovermode="closest", + legend=dict(traceorder="reversed"), + xaxis1=dict(domain=[0.0, 1.0], anchor="y2", zeroline=False), + yaxis1=dict(domain=[0.35, 1], anchor="free", position=0.0), + yaxis2=dict(domain=[0, 0.25], anchor="x1", dtick=1, showticklabels=False), + ) + else: + layout = graph_objs.Layout( + barmode="overlay", + hovermode="closest", + legend=dict(traceorder="reversed"), + xaxis1=dict(domain=[0.0, 1.0], anchor="y2", zeroline=False), + yaxis1=dict(domain=[0.0, 1], anchor="free", position=0.0), + ) + + data = sum(data, []) + return graph_objs.Figure(data=data, layout=layout) + + +class _Distplot(object): + """ + Refer to TraceFactory.create_distplot() for docstring + """ + + def __init__( + self, + hist_data, + histnorm, + group_labels, + bin_size, + curve_type, + colors, + rug_text, + show_hist, + show_curve, + ): + self.hist_data = hist_data + self.histnorm = histnorm + self.group_labels = group_labels + self.bin_size = bin_size + self.show_hist = show_hist + self.show_curve = show_curve + self.trace_number = len(hist_data) + if rug_text: + self.rug_text = rug_text + else: + self.rug_text = [None] * self.trace_number + + self.start = [] + self.end = [] + if colors: + self.colors = colors + else: + self.colors = [ + "rgb(31, 119, 180)", + "rgb(255, 127, 14)", + "rgb(44, 160, 44)", + "rgb(214, 39, 40)", + "rgb(148, 103, 189)", + "rgb(140, 86, 75)", + "rgb(227, 119, 194)", + "rgb(127, 127, 127)", + "rgb(188, 189, 34)", + "rgb(23, 190, 207)", + ] + self.curve_x = [None] * self.trace_number + self.curve_y = [None] * self.trace_number + + for trace in self.hist_data: + self.start.append(min(trace) * 1.0) + self.end.append(max(trace) * 1.0) + + def make_hist(self): + """ + Makes the histogram(s) for FigureFactory.create_distplot(). + + :rtype (list) hist: list of histogram representations + """ + hist = [None] * self.trace_number + + for index in range(self.trace_number): + hist[index] = dict( + type="histogram", + x=self.hist_data[index], + xaxis="x1", + yaxis="y1", + histnorm=self.histnorm, + name=self.group_labels[index], + legendgroup=self.group_labels[index], + marker=dict(color=self.colors[index % len(self.colors)]), + autobinx=False, + xbins=dict( + start=self.start[index], + end=self.end[index], + size=self.bin_size[index], + ), + opacity=0.7, + ) + return hist + + def make_kde(self): + """ + Makes the kernel density estimation(s) for create_distplot(). + + This is called when curve_type = 'kde' in create_distplot(). + + :rtype (list) curve: list of kde representations + """ + curve = [None] * self.trace_number + for index in range(self.trace_number): + self.curve_x[index] = [ + self.start[index] + x * (self.end[index] - self.start[index]) / 500 + for x in range(500) + ] + self.curve_y[index] = scipy_stats.gaussian_kde(self.hist_data[index])( + self.curve_x[index] + ) + + if self.histnorm == ALTERNATIVE_HISTNORM: + self.curve_y[index] *= self.bin_size[index] + + for index in range(self.trace_number): + curve[index] = dict( + type="scatter", + x=self.curve_x[index], + y=self.curve_y[index], + xaxis="x1", + yaxis="y1", + mode="lines", + name=self.group_labels[index], + legendgroup=self.group_labels[index], + showlegend=False if self.show_hist else True, + marker=dict(color=self.colors[index % len(self.colors)]), + ) + return curve + + def make_normal(self): + """ + Makes the normal curve(s) for create_distplot(). + + This is called when curve_type = 'normal' in create_distplot(). + + :rtype (list) curve: list of normal curve representations + """ + curve = [None] * self.trace_number + mean = [None] * self.trace_number + sd = [None] * self.trace_number + + for index in range(self.trace_number): + mean[index], sd[index] = scipy_stats.norm.fit(self.hist_data[index]) + self.curve_x[index] = [ + self.start[index] + x * (self.end[index] - self.start[index]) / 500 + for x in range(500) + ] + self.curve_y[index] = scipy_stats.norm.pdf( + self.curve_x[index], loc=mean[index], scale=sd[index] + ) + + if self.histnorm == ALTERNATIVE_HISTNORM: + self.curve_y[index] *= self.bin_size[index] + + for index in range(self.trace_number): + curve[index] = dict( + type="scatter", + x=self.curve_x[index], + y=self.curve_y[index], + xaxis="x1", + yaxis="y1", + mode="lines", + name=self.group_labels[index], + legendgroup=self.group_labels[index], + showlegend=False if self.show_hist else True, + marker=dict(color=self.colors[index % len(self.colors)]), + ) + return curve + + def make_rug(self): + """ + Makes the rug plot(s) for create_distplot(). + + :rtype (list) rug: list of rug plot representations + """ + rug = [None] * self.trace_number + for index in range(self.trace_number): + rug[index] = dict( + type="scatter", + x=self.hist_data[index], + y=([self.group_labels[index]] * len(self.hist_data[index])), + xaxis="x1", + yaxis="y2", + mode="markers", + name=self.group_labels[index], + legendgroup=self.group_labels[index], + showlegend=(False if self.show_hist or self.show_curve else True), + text=self.rug_text[index], + marker=dict( + color=self.colors[index % len(self.colors)], symbol="line-ns-open" + ), + ) + return rug diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/figure_factory/_facet_grid.py b/.venv_haddock/lib/python3.12/site-packages/plotly/figure_factory/_facet_grid.py new file mode 100644 index 0000000000000000000000000000000000000000..06dc71d2ac34cb2461618da5222e9ade4acc9c41 --- /dev/null +++ b/.venv_haddock/lib/python3.12/site-packages/plotly/figure_factory/_facet_grid.py @@ -0,0 +1,1195 @@ +from plotly import exceptions, optional_imports +import plotly.colors as clrs +from plotly.figure_factory import utils +from plotly.subplots import make_subplots + +import math +from numbers import Number + +pd = optional_imports.get_module("pandas") + +TICK_COLOR = "#969696" +AXIS_TITLE_COLOR = "#0f0f0f" +AXIS_TITLE_SIZE = 12 +GRID_COLOR = "#ffffff" +LEGEND_COLOR = "#efefef" +PLOT_BGCOLOR = "#ededed" +ANNOT_RECT_COLOR = "#d0d0d0" +LEGEND_BORDER_WIDTH = 1 +LEGEND_ANNOT_X = 1.05 +LEGEND_ANNOT_Y = 0.5 +MAX_TICKS_PER_AXIS = 5 +THRES_FOR_FLIPPED_FACET_TITLES = 10 +GRID_WIDTH = 1 + +VALID_TRACE_TYPES = ["scatter", "scattergl", "histogram", "bar", "box"] + +CUSTOM_LABEL_ERROR = ( + "If you are using a dictionary for custom labels for the facet row/col, " + "make sure each key in that column of the dataframe is in your facet " + "labels. The keys you need are {}" +) + + +def _is_flipped(num): + if num >= THRES_FOR_FLIPPED_FACET_TITLES: + flipped = True + else: + flipped = False + return flipped + + +def _return_label(original_label, facet_labels, facet_var): + if isinstance(facet_labels, dict): + label = facet_labels[original_label] + elif isinstance(facet_labels, str): + label = "{}: {}".format(facet_var, original_label) + else: + label = original_label + return label + + +def _legend_annotation(color_name): + legend_title = dict( + textangle=0, + xanchor="left", + yanchor="middle", + x=LEGEND_ANNOT_X, + y=1.03, + showarrow=False, + xref="paper", + yref="paper", + text="factor({})".format(color_name), + font=dict(size=13, color="#000000"), + ) + return legend_title + + +def _annotation_dict( + text, lane, num_of_lanes, SUBPLOT_SPACING, row_col="col", flipped=True +): + temp = (1 - (num_of_lanes - 1) * SUBPLOT_SPACING) / (num_of_lanes) + if not flipped: + xanchor = "center" + yanchor = "middle" + if row_col == "col": + x = (lane - 1) * (temp + SUBPLOT_SPACING) + 0.5 * temp + y = 1.03 + textangle = 0 + elif row_col == "row": + y = (lane - 1) * (temp + SUBPLOT_SPACING) + 0.5 * temp + x = 1.03 + textangle = 90 + else: + if row_col == "col": + xanchor = "center" + yanchor = "bottom" + x = (lane - 1) * (temp + SUBPLOT_SPACING) + 0.5 * temp + y = 1.0 + textangle = 270 + elif row_col == "row": + xanchor = "left" + yanchor = "middle" + y = (lane - 1) * (temp + SUBPLOT_SPACING) + 0.5 * temp + x = 1.0 + textangle = 0 + + annotation_dict = dict( + textangle=textangle, + xanchor=xanchor, + yanchor=yanchor, + x=x, + y=y, + showarrow=False, + xref="paper", + yref="paper", + text=str(text), + font=dict(size=13, color=AXIS_TITLE_COLOR), + ) + return annotation_dict + + +def _axis_title_annotation(text, x_or_y_axis): + if x_or_y_axis == "x": + x_pos = 0.5 + y_pos = -0.1 + textangle = 0 + elif x_or_y_axis == "y": + x_pos = -0.1 + y_pos = 0.5 + textangle = 270 + + if not text: + text = "" + + annot = { + "font": {"color": "#000000", "size": AXIS_TITLE_SIZE}, + "showarrow": False, + "text": text, + "textangle": textangle, + "x": x_pos, + "xanchor": "center", + "xref": "paper", + "y": y_pos, + "yanchor": "middle", + "yref": "paper", + } + return annot + + +def _add_shapes_to_fig(fig, annot_rect_color, flipped_rows=False, flipped_cols=False): + shapes_list = [] + for key in fig["layout"].to_plotly_json().keys(): + if "axis" in key and fig["layout"][key]["domain"] != [0.0, 1.0]: + shape = { + "fillcolor": annot_rect_color, + "layer": "below", + "line": {"color": annot_rect_color, "width": 1}, + "type": "rect", + "xref": "paper", + "yref": "paper", + } + + if "xaxis" in key: + shape["x0"] = fig["layout"][key]["domain"][0] + shape["x1"] = fig["layout"][key]["domain"][1] + shape["y0"] = 1.005 + shape["y1"] = 1.05 + + if flipped_cols: + shape["y1"] += 0.5 + shapes_list.append(shape) + + elif "yaxis" in key: + shape["x0"] = 1.005 + shape["x1"] = 1.05 + shape["y0"] = fig["layout"][key]["domain"][0] + shape["y1"] = fig["layout"][key]["domain"][1] + + if flipped_rows: + shape["x1"] += 1 + shapes_list.append(shape) + + fig["layout"]["shapes"] = shapes_list + + +def _make_trace_for_scatter(trace, trace_type, color, **kwargs_marker): + if trace_type in ["scatter", "scattergl"]: + trace["mode"] = "markers" + trace["marker"] = dict(color=color, **kwargs_marker) + return trace + + +def _facet_grid_color_categorical( + df, + x, + y, + facet_row, + facet_col, + color_name, + colormap, + num_of_rows, + num_of_cols, + facet_row_labels, + facet_col_labels, + trace_type, + flipped_rows, + flipped_cols, + show_boxes, + SUBPLOT_SPACING, + marker_color, + kwargs_trace, + kwargs_marker, +): + fig = make_subplots( + rows=num_of_rows, + cols=num_of_cols, + shared_xaxes=True, + shared_yaxes=True, + horizontal_spacing=SUBPLOT_SPACING, + vertical_spacing=SUBPLOT_SPACING, + print_grid=False, + ) + + annotations = [] + if not facet_row and not facet_col: + color_groups = list(df.groupby(color_name)) + for group in color_groups: + trace = dict( + type=trace_type, + name=group[0], + marker=dict(color=colormap[group[0]]), + **kwargs_trace, + ) + if x: + trace["x"] = group[1][x] + if y: + trace["y"] = group[1][y] + trace = _make_trace_for_scatter( + trace, trace_type, colormap[group[0]], **kwargs_marker + ) + + fig.append_trace(trace, 1, 1) + + elif (facet_row and not facet_col) or (not facet_row and facet_col): + groups_by_facet = list(df.groupby(facet_row if facet_row else facet_col)) + for j, group in enumerate(groups_by_facet): + for color_val in df[color_name].unique(): + data_by_color = group[1][group[1][color_name] == color_val] + trace = dict( + type=trace_type, + name=color_val, + marker=dict(color=colormap[color_val]), + **kwargs_trace, + ) + if x: + trace["x"] = data_by_color[x] + if y: + trace["y"] = data_by_color[y] + trace = _make_trace_for_scatter( + trace, trace_type, colormap[color_val], **kwargs_marker + ) + + fig.append_trace( + trace, j + 1 if facet_row else 1, 1 if facet_row else j + 1 + ) + + label = _return_label( + group[0], + facet_row_labels if facet_row else facet_col_labels, + facet_row if facet_row else facet_col, + ) + + annotations.append( + _annotation_dict( + label, + num_of_rows - j if facet_row else j + 1, + num_of_rows if facet_row else num_of_cols, + SUBPLOT_SPACING, + "row" if facet_row else "col", + flipped_rows, + ) + ) + + elif facet_row and facet_col: + groups_by_facets = list(df.groupby([facet_row, facet_col])) + tuple_to_facet_group = {item[0]: item[1] for item in groups_by_facets} + + row_values = df[facet_row].unique() + col_values = df[facet_col].unique() + color_vals = df[color_name].unique() + for row_count, x_val in enumerate(row_values): + for col_count, y_val in enumerate(col_values): + try: + group = tuple_to_facet_group[(x_val, y_val)] + except KeyError: + group = pd.DataFrame( + [[None, None, None]], columns=[x, y, color_name] + ) + + for color_val in color_vals: + if group.values.tolist() != [[None, None, None]]: + group_filtered = group[group[color_name] == color_val] + + trace = dict( + type=trace_type, + name=color_val, + marker=dict(color=colormap[color_val]), + **kwargs_trace, + ) + new_x = group_filtered[x] + new_y = group_filtered[y] + else: + trace = dict( + type=trace_type, + name=color_val, + marker=dict(color=colormap[color_val]), + showlegend=False, + **kwargs_trace, + ) + new_x = group[x] + new_y = group[y] + + if x: + trace["x"] = new_x + if y: + trace["y"] = new_y + trace = _make_trace_for_scatter( + trace, trace_type, colormap[color_val], **kwargs_marker + ) + + fig.append_trace(trace, row_count + 1, col_count + 1) + if row_count == 0: + label = _return_label( + col_values[col_count], facet_col_labels, facet_col + ) + annotations.append( + _annotation_dict( + label, + col_count + 1, + num_of_cols, + SUBPLOT_SPACING, + row_col="col", + flipped=flipped_cols, + ) + ) + label = _return_label(row_values[row_count], facet_row_labels, facet_row) + annotations.append( + _annotation_dict( + label, + num_of_rows - row_count, + num_of_rows, + SUBPLOT_SPACING, + row_col="row", + flipped=flipped_rows, + ) + ) + + return fig, annotations + + +def _facet_grid_color_numerical( + df, + x, + y, + facet_row, + facet_col, + color_name, + colormap, + num_of_rows, + num_of_cols, + facet_row_labels, + facet_col_labels, + trace_type, + flipped_rows, + flipped_cols, + show_boxes, + SUBPLOT_SPACING, + marker_color, + kwargs_trace, + kwargs_marker, +): + fig = make_subplots( + rows=num_of_rows, + cols=num_of_cols, + shared_xaxes=True, + shared_yaxes=True, + horizontal_spacing=SUBPLOT_SPACING, + vertical_spacing=SUBPLOT_SPACING, + print_grid=False, + ) + + annotations = [] + if not facet_row and not facet_col: + trace = dict( + type=trace_type, + marker=dict(color=df[color_name], colorscale=colormap, showscale=True), + **kwargs_trace, + ) + if x: + trace["x"] = df[x] + if y: + trace["y"] = df[y] + trace = _make_trace_for_scatter( + trace, trace_type, df[color_name], **kwargs_marker + ) + + fig.append_trace(trace, 1, 1) + + if (facet_row and not facet_col) or (not facet_row and facet_col): + groups_by_facet = list(df.groupby(facet_row if facet_row else facet_col)) + for j, group in enumerate(groups_by_facet): + trace = dict( + type=trace_type, + marker=dict( + color=df[color_name], + colorscale=colormap, + showscale=True, + colorbar=dict(x=1.15), + ), + **kwargs_trace, + ) + if x: + trace["x"] = group[1][x] + if y: + trace["y"] = group[1][y] + trace = _make_trace_for_scatter( + trace, trace_type, df[color_name], **kwargs_marker + ) + + fig.append_trace( + trace, j + 1 if facet_row else 1, 1 if facet_row else j + 1 + ) + + labels = facet_row_labels if facet_row else facet_col_labels + label = _return_label( + group[0], labels, facet_row if facet_row else facet_col + ) + + annotations.append( + _annotation_dict( + label, + num_of_rows - j if facet_row else j + 1, + num_of_rows if facet_row else num_of_cols, + SUBPLOT_SPACING, + "row" if facet_row else "col", + flipped=flipped_rows, + ) + ) + + elif facet_row and facet_col: + groups_by_facets = list(df.groupby([facet_row, facet_col])) + tuple_to_facet_group = {item[0]: item[1] for item in groups_by_facets} + + row_values = df[facet_row].unique() + col_values = df[facet_col].unique() + for row_count, x_val in enumerate(row_values): + for col_count, y_val in enumerate(col_values): + try: + group = tuple_to_facet_group[(x_val, y_val)] + except KeyError: + group = pd.DataFrame( + [[None, None, None]], columns=[x, y, color_name] + ) + + if group.values.tolist() != [[None, None, None]]: + trace = dict( + type=trace_type, + marker=dict( + color=df[color_name], + colorscale=colormap, + showscale=(row_count == 0), + colorbar=dict(x=1.15), + ), + **kwargs_trace, + ) + + else: + trace = dict(type=trace_type, showlegend=False, **kwargs_trace) + + if x: + trace["x"] = group[x] + if y: + trace["y"] = group[y] + trace = _make_trace_for_scatter( + trace, trace_type, df[color_name], **kwargs_marker + ) + + fig.append_trace(trace, row_count + 1, col_count + 1) + if row_count == 0: + label = _return_label( + col_values[col_count], facet_col_labels, facet_col + ) + annotations.append( + _annotation_dict( + label, + col_count + 1, + num_of_cols, + SUBPLOT_SPACING, + row_col="col", + flipped=flipped_cols, + ) + ) + label = _return_label(row_values[row_count], facet_row_labels, facet_row) + annotations.append( + _annotation_dict( + row_values[row_count], + num_of_rows - row_count, + num_of_rows, + SUBPLOT_SPACING, + row_col="row", + flipped=flipped_rows, + ) + ) + + return fig, annotations + + +def _facet_grid( + df, + x, + y, + facet_row, + facet_col, + num_of_rows, + num_of_cols, + facet_row_labels, + facet_col_labels, + trace_type, + flipped_rows, + flipped_cols, + show_boxes, + SUBPLOT_SPACING, + marker_color, + kwargs_trace, + kwargs_marker, +): + fig = make_subplots( + rows=num_of_rows, + cols=num_of_cols, + shared_xaxes=True, + shared_yaxes=True, + horizontal_spacing=SUBPLOT_SPACING, + vertical_spacing=SUBPLOT_SPACING, + print_grid=False, + ) + annotations = [] + if not facet_row and not facet_col: + trace = dict( + type=trace_type, + marker=dict(color=marker_color, line=kwargs_marker["line"]), + **kwargs_trace, + ) + + if x: + trace["x"] = df[x] + if y: + trace["y"] = df[y] + trace = _make_trace_for_scatter( + trace, trace_type, marker_color, **kwargs_marker + ) + + fig.append_trace(trace, 1, 1) + + elif (facet_row and not facet_col) or (not facet_row and facet_col): + groups_by_facet = list(df.groupby(facet_row if facet_row else facet_col)) + for j, group in enumerate(groups_by_facet): + trace = dict( + type=trace_type, + marker=dict(color=marker_color, line=kwargs_marker["line"]), + **kwargs_trace, + ) + + if x: + trace["x"] = group[1][x] + if y: + trace["y"] = group[1][y] + trace = _make_trace_for_scatter( + trace, trace_type, marker_color, **kwargs_marker + ) + + fig.append_trace( + trace, j + 1 if facet_row else 1, 1 if facet_row else j + 1 + ) + + label = _return_label( + group[0], + facet_row_labels if facet_row else facet_col_labels, + facet_row if facet_row else facet_col, + ) + + annotations.append( + _annotation_dict( + label, + num_of_rows - j if facet_row else j + 1, + num_of_rows if facet_row else num_of_cols, + SUBPLOT_SPACING, + "row" if facet_row else "col", + flipped_rows, + ) + ) + + elif facet_row and facet_col: + groups_by_facets = list(df.groupby([facet_row, facet_col])) + tuple_to_facet_group = {item[0]: item[1] for item in groups_by_facets} + + row_values = df[facet_row].unique() + col_values = df[facet_col].unique() + for row_count, x_val in enumerate(row_values): + for col_count, y_val in enumerate(col_values): + try: + group = tuple_to_facet_group[(x_val, y_val)] + except KeyError: + group = pd.DataFrame([[None, None]], columns=[x, y]) + trace = dict( + type=trace_type, + marker=dict(color=marker_color, line=kwargs_marker["line"]), + **kwargs_trace, + ) + if x: + trace["x"] = group[x] + if y: + trace["y"] = group[y] + trace = _make_trace_for_scatter( + trace, trace_type, marker_color, **kwargs_marker + ) + + fig.append_trace(trace, row_count + 1, col_count + 1) + if row_count == 0: + label = _return_label( + col_values[col_count], facet_col_labels, facet_col + ) + annotations.append( + _annotation_dict( + label, + col_count + 1, + num_of_cols, + SUBPLOT_SPACING, + row_col="col", + flipped=flipped_cols, + ) + ) + + label = _return_label(row_values[row_count], facet_row_labels, facet_row) + annotations.append( + _annotation_dict( + label, + num_of_rows - row_count, + num_of_rows, + SUBPLOT_SPACING, + row_col="row", + flipped=flipped_rows, + ) + ) + + return fig, annotations + + +def create_facet_grid( + df, + x=None, + y=None, + facet_row=None, + facet_col=None, + color_name=None, + colormap=None, + color_is_cat=False, + facet_row_labels=None, + facet_col_labels=None, + height=None, + width=None, + trace_type="scatter", + scales="fixed", + dtick_x=None, + dtick_y=None, + show_boxes=True, + ggplot2=False, + binsize=1, + **kwargs, +): + """ + Returns figure for facet grid; **this function is deprecated**, since + plotly.express functions should be used instead, for example + + >>> import plotly.express as px + >>> tips = px.data.tips() + >>> fig = px.scatter(tips, + ... x='total_bill', + ... y='tip', + ... facet_row='sex', + ... facet_col='smoker', + ... color='size') + + + :param (pd.DataFrame) df: the dataframe of columns for the facet grid. + :param (str) x: the name of the dataframe column for the x axis data. + :param (str) y: the name of the dataframe column for the y axis data. + :param (str) facet_row: the name of the dataframe column that is used to + facet the grid into row panels. + :param (str) facet_col: the name of the dataframe column that is used to + facet the grid into column panels. + :param (str) color_name: the name of your dataframe column that will + function as the colormap variable. + :param (str|list|dict) colormap: the param that determines how the + color_name column colors the data. If the dataframe contains numeric + data, then a dictionary of colors will group the data categorically + while a Plotly Colorscale name or a custom colorscale will treat it + numerically. To learn more about colors and types of colormap, run + `help(plotly.colors)`. + :param (bool) color_is_cat: determines whether a numerical column for the + colormap will be treated as categorical (True) or sequential (False). + Default = False. + :param (str|dict) facet_row_labels: set to either 'name' or a dictionary + of all the unique values in the faceting row mapped to some text to + show up in the label annotations. If None, labeling works like usual. + :param (str|dict) facet_col_labels: set to either 'name' or a dictionary + of all the values in the faceting row mapped to some text to show up + in the label annotations. If None, labeling works like usual. + :param (int) height: the height of the facet grid figure. + :param (int) width: the width of the facet grid figure. + :param (str) trace_type: decides the type of plot to appear in the + facet grid. The options are 'scatter', 'scattergl', 'histogram', + 'bar', and 'box'. + Default = 'scatter'. + :param (str) scales: determines if axes have fixed ranges or not. Valid + settings are 'fixed' (all axes fixed), 'free_x' (x axis free only), + 'free_y' (y axis free only) or 'free' (both axes free). + :param (float) dtick_x: determines the distance between each tick on the + x-axis. Default is None which means dtick_x is set automatically. + :param (float) dtick_y: determines the distance between each tick on the + y-axis. Default is None which means dtick_y is set automatically. + :param (bool) show_boxes: draws grey boxes behind the facet titles. + :param (bool) ggplot2: draws the facet grid in the style of `ggplot2`. See + http://ggplot2.tidyverse.org/reference/facet_grid.html for reference. + Default = False + :param (int) binsize: groups all data into bins of a given length. + :param (dict) kwargs: a dictionary of scatterplot arguments. + + Examples 1: One Way Faceting + + >>> import plotly.figure_factory as ff + >>> import pandas as pd + >>> mpg = pd.read_table('https://raw.githubusercontent.com/plotly/datasets/master/mpg_2017.txt') + + >>> fig = ff.create_facet_grid( + ... mpg, + ... x='displ', + ... y='cty', + ... facet_col='cyl', + ... ) + >>> fig.show() + + Example 2: Two Way Faceting + + >>> import plotly.figure_factory as ff + + >>> import pandas as pd + + >>> mpg = pd.read_table('https://raw.githubusercontent.com/plotly/datasets/master/mpg_2017.txt') + + >>> fig = ff.create_facet_grid( + ... mpg, + ... x='displ', + ... y='cty', + ... facet_row='drv', + ... facet_col='cyl', + ... ) + >>> fig.show() + + Example 3: Categorical Coloring + + >>> import plotly.figure_factory as ff + >>> import pandas as pd + >>> mtcars = pd.read_csv('https://raw.githubusercontent.com/plotly/datasets/master/mtcars.csv') + >>> mtcars.cyl = mtcars.cyl.astype(str) + >>> fig = ff.create_facet_grid( + ... mtcars, + ... x='mpg', + ... y='wt', + ... facet_col='cyl', + ... color_name='cyl', + ... color_is_cat=True, + ... ) + >>> fig.show() + + + """ + if not pd: + raise ImportError("'pandas' must be installed for this figure_factory.") + + if not isinstance(df, pd.DataFrame): + raise exceptions.PlotlyError("You must input a pandas DataFrame.") + + # make sure all columns are of homogenous datatype + utils.validate_dataframe(df) + + if trace_type in ["scatter", "scattergl"]: + if not x or not y: + raise exceptions.PlotlyError( + "You need to input 'x' and 'y' if you are you are using a " + "trace_type of 'scatter' or 'scattergl'." + ) + + for key in [x, y, facet_row, facet_col, color_name]: + if key is not None: + try: + df[key] + except KeyError: + raise exceptions.PlotlyError( + "x, y, facet_row, facet_col and color_name must be keys " + "in your dataframe." + ) + # autoscale histogram bars + if trace_type not in ["scatter", "scattergl"]: + scales = "free" + + # validate scales + if scales not in ["fixed", "free_x", "free_y", "free"]: + raise exceptions.PlotlyError( + "'scales' must be set to 'fixed', 'free_x', 'free_y' and 'free'." + ) + + if trace_type not in VALID_TRACE_TYPES: + raise exceptions.PlotlyError( + "'trace_type' must be in {}".format(VALID_TRACE_TYPES) + ) + + if trace_type == "histogram": + SUBPLOT_SPACING = 0.06 + else: + SUBPLOT_SPACING = 0.015 + + # seperate kwargs for marker and else + if "marker" in kwargs: + kwargs_marker = kwargs["marker"] + else: + kwargs_marker = {} + marker_color = kwargs_marker.pop("color", None) + kwargs.pop("marker", None) + kwargs_trace = kwargs + + if "size" not in kwargs_marker: + if ggplot2: + kwargs_marker["size"] = 5 + else: + kwargs_marker["size"] = 8 + + if "opacity" not in kwargs_marker: + if not ggplot2: + kwargs_trace["opacity"] = 0.6 + + if "line" not in kwargs_marker: + if not ggplot2: + kwargs_marker["line"] = {"color": "darkgrey", "width": 1} + else: + kwargs_marker["line"] = {} + + # default marker size + if not ggplot2: + if not marker_color: + marker_color = "rgb(31, 119, 180)" + else: + marker_color = "rgb(0, 0, 0)" + + num_of_rows = 1 + num_of_cols = 1 + flipped_rows = False + flipped_cols = False + if facet_row: + num_of_rows = len(df[facet_row].unique()) + flipped_rows = _is_flipped(num_of_rows) + if isinstance(facet_row_labels, dict): + for key in df[facet_row].unique(): + if key not in facet_row_labels.keys(): + unique_keys = df[facet_row].unique().tolist() + raise exceptions.PlotlyError(CUSTOM_LABEL_ERROR.format(unique_keys)) + if facet_col: + num_of_cols = len(df[facet_col].unique()) + flipped_cols = _is_flipped(num_of_cols) + if isinstance(facet_col_labels, dict): + for key in df[facet_col].unique(): + if key not in facet_col_labels.keys(): + unique_keys = df[facet_col].unique().tolist() + raise exceptions.PlotlyError(CUSTOM_LABEL_ERROR.format(unique_keys)) + show_legend = False + if color_name: + if isinstance(df[color_name].iloc[0], str) or color_is_cat: + show_legend = True + if isinstance(colormap, dict): + clrs.validate_colors_dict(colormap, "rgb") + + for val in df[color_name].unique(): + if val not in colormap.keys(): + raise exceptions.PlotlyError( + "If using 'colormap' as a dictionary, make sure " + "all the values of the colormap column are in " + "the keys of your dictionary." + ) + else: + # use default plotly colors for dictionary + default_colors = clrs.DEFAULT_PLOTLY_COLORS + colormap = {} + j = 0 + for val in df[color_name].unique(): + if j >= len(default_colors): + j = 0 + colormap[val] = default_colors[j] + j += 1 + fig, annotations = _facet_grid_color_categorical( + df, + x, + y, + facet_row, + facet_col, + color_name, + colormap, + num_of_rows, + num_of_cols, + facet_row_labels, + facet_col_labels, + trace_type, + flipped_rows, + flipped_cols, + show_boxes, + SUBPLOT_SPACING, + marker_color, + kwargs_trace, + kwargs_marker, + ) + + elif isinstance(df[color_name].iloc[0], Number): + if isinstance(colormap, dict): + show_legend = True + clrs.validate_colors_dict(colormap, "rgb") + + for val in df[color_name].unique(): + if val not in colormap.keys(): + raise exceptions.PlotlyError( + "If using 'colormap' as a dictionary, make sure " + "all the values of the colormap column are in " + "the keys of your dictionary." + ) + fig, annotations = _facet_grid_color_categorical( + df, + x, + y, + facet_row, + facet_col, + color_name, + colormap, + num_of_rows, + num_of_cols, + facet_row_labels, + facet_col_labels, + trace_type, + flipped_rows, + flipped_cols, + show_boxes, + SUBPLOT_SPACING, + marker_color, + kwargs_trace, + kwargs_marker, + ) + + elif isinstance(colormap, list): + colorscale_list = colormap + clrs.validate_colorscale(colorscale_list) + + fig, annotations = _facet_grid_color_numerical( + df, + x, + y, + facet_row, + facet_col, + color_name, + colorscale_list, + num_of_rows, + num_of_cols, + facet_row_labels, + facet_col_labels, + trace_type, + flipped_rows, + flipped_cols, + show_boxes, + SUBPLOT_SPACING, + marker_color, + kwargs_trace, + kwargs_marker, + ) + elif isinstance(colormap, str): + if colormap in clrs.PLOTLY_SCALES.keys(): + colorscale_list = clrs.PLOTLY_SCALES[colormap] + else: + raise exceptions.PlotlyError( + "If 'colormap' is a string, it must be the name " + "of a Plotly Colorscale. The available colorscale " + "names are {}".format(clrs.PLOTLY_SCALES.keys()) + ) + fig, annotations = _facet_grid_color_numerical( + df, + x, + y, + facet_row, + facet_col, + color_name, + colorscale_list, + num_of_rows, + num_of_cols, + facet_row_labels, + facet_col_labels, + trace_type, + flipped_rows, + flipped_cols, + show_boxes, + SUBPLOT_SPACING, + marker_color, + kwargs_trace, + kwargs_marker, + ) + else: + colorscale_list = clrs.PLOTLY_SCALES["Reds"] + fig, annotations = _facet_grid_color_numerical( + df, + x, + y, + facet_row, + facet_col, + color_name, + colorscale_list, + num_of_rows, + num_of_cols, + facet_row_labels, + facet_col_labels, + trace_type, + flipped_rows, + flipped_cols, + show_boxes, + SUBPLOT_SPACING, + marker_color, + kwargs_trace, + kwargs_marker, + ) + + else: + fig, annotations = _facet_grid( + df, + x, + y, + facet_row, + facet_col, + num_of_rows, + num_of_cols, + facet_row_labels, + facet_col_labels, + trace_type, + flipped_rows, + flipped_cols, + show_boxes, + SUBPLOT_SPACING, + marker_color, + kwargs_trace, + kwargs_marker, + ) + + if not height: + height = max(600, 100 * num_of_rows) + if not width: + width = max(600, 100 * num_of_cols) + + fig["layout"].update( + height=height, width=width, title="", paper_bgcolor="rgb(251, 251, 251)" + ) + if ggplot2: + fig["layout"].update( + plot_bgcolor=PLOT_BGCOLOR, + paper_bgcolor="rgb(255, 255, 255)", + hovermode="closest", + ) + + # axis titles + x_title_annot = _axis_title_annotation(x, "x") + y_title_annot = _axis_title_annotation(y, "y") + + # annotations + annotations.append(x_title_annot) + annotations.append(y_title_annot) + + # legend + fig["layout"]["showlegend"] = show_legend + fig["layout"]["legend"]["bgcolor"] = LEGEND_COLOR + fig["layout"]["legend"]["borderwidth"] = LEGEND_BORDER_WIDTH + fig["layout"]["legend"]["x"] = 1.05 + fig["layout"]["legend"]["y"] = 1 + fig["layout"]["legend"]["yanchor"] = "top" + + if show_legend: + fig["layout"]["showlegend"] = show_legend + if ggplot2: + if color_name: + legend_annot = _legend_annotation(color_name) + annotations.append(legend_annot) + fig["layout"]["margin"]["r"] = 150 + + # assign annotations to figure + fig["layout"]["annotations"] = annotations + + # add shaded boxes behind axis titles + if show_boxes and ggplot2: + _add_shapes_to_fig(fig, ANNOT_RECT_COLOR, flipped_rows, flipped_cols) + + # all xaxis and yaxis labels + axis_labels = {"x": [], "y": []} + for key in fig["layout"]: + if "xaxis" in key: + axis_labels["x"].append(key) + elif "yaxis" in key: + axis_labels["y"].append(key) + + string_number_in_data = False + for var in [v for v in [x, y] if v]: + if isinstance(df[var].tolist()[0], str): + for item in df[var]: + try: + int(item) + string_number_in_data = True + except ValueError: + pass + + if string_number_in_data: + for x_y in axis_labels.keys(): + for axis_name in axis_labels[x_y]: + fig["layout"][axis_name]["type"] = "category" + + if scales == "fixed": + fixed_axes = ["x", "y"] + elif scales == "free_x": + fixed_axes = ["y"] + elif scales == "free_y": + fixed_axes = ["x"] + elif scales == "free": + fixed_axes = [] + + # fixed ranges + for x_y in fixed_axes: + min_ranges = [] + max_ranges = [] + for trace in fig["data"]: + if trace[x_y] is not None and len(trace[x_y]) > 0: + min_ranges.append(min(trace[x_y])) + max_ranges.append(max(trace[x_y])) + while None in min_ranges: + min_ranges.remove(None) + while None in max_ranges: + max_ranges.remove(None) + + min_range = min(min_ranges) + max_range = max(max_ranges) + + range_are_numbers = isinstance(min_range, Number) and isinstance( + max_range, Number + ) + + if range_are_numbers: + min_range = math.floor(min_range) + max_range = math.ceil(max_range) + + # extend widen frame by 5% on each side + min_range -= 0.05 * (max_range - min_range) + max_range += 0.05 * (max_range - min_range) + + if x_y == "x": + if dtick_x: + dtick = dtick_x + else: + dtick = math.floor((max_range - min_range) / MAX_TICKS_PER_AXIS) + elif x_y == "y": + if dtick_y: + dtick = dtick_y + else: + dtick = math.floor((max_range - min_range) / MAX_TICKS_PER_AXIS) + else: + dtick = 1 + + for axis_title in axis_labels[x_y]: + fig["layout"][axis_title]["dtick"] = dtick + fig["layout"][axis_title]["ticklen"] = 0 + fig["layout"][axis_title]["zeroline"] = False + if ggplot2: + fig["layout"][axis_title]["tickwidth"] = 1 + fig["layout"][axis_title]["ticklen"] = 4 + fig["layout"][axis_title]["gridwidth"] = GRID_WIDTH + + fig["layout"][axis_title]["gridcolor"] = GRID_COLOR + fig["layout"][axis_title]["gridwidth"] = 2 + fig["layout"][axis_title]["tickfont"] = { + "color": TICK_COLOR, + "size": 10, + } + + # insert ranges into fig + if x_y in fixed_axes: + for key in fig["layout"]: + if "{}axis".format(x_y) in key and range_are_numbers: + fig["layout"][key]["range"] = [min_range, max_range] + + return fig diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/figure_factory/_gantt.py b/.venv_haddock/lib/python3.12/site-packages/plotly/figure_factory/_gantt.py new file mode 100644 index 0000000000000000000000000000000000000000..006754a0ff14f35d68da18ff214278e2dd23e22b --- /dev/null +++ b/.venv_haddock/lib/python3.12/site-packages/plotly/figure_factory/_gantt.py @@ -0,0 +1,1035 @@ +from numbers import Number + +import copy + +from plotly import exceptions, optional_imports +import plotly.colors as clrs +from plotly.figure_factory import utils +import plotly.graph_objects as go + +pd = optional_imports.get_module("pandas") + +REQUIRED_GANTT_KEYS = ["Task", "Start", "Finish"] + + +def _get_corner_points(x0, y0, x1, y1): + """ + Returns the corner points of a scatter rectangle + + :param x0: x-start + :param y0: y-lower + :param x1: x-end + :param y1: y-upper + :return: ([x], [y]), tuple of lists containing the x and y values + """ + + return ([x0, x1, x1, x0], [y0, y0, y1, y1]) + + +def validate_gantt(df): + """ + Validates the inputted dataframe or list + """ + if pd and isinstance(df, pd.core.frame.DataFrame): + # validate that df has all the required keys + for key in REQUIRED_GANTT_KEYS: + if key not in df: + raise exceptions.PlotlyError( + "The columns in your dataframe must include the " + "following keys: {0}".format(", ".join(REQUIRED_GANTT_KEYS)) + ) + + columns = {key: df[key].values for key in df} + num_of_rows = len(df.index) + chart = [] + # Using only keys present in the DataFrame columns + keys = list(df.columns) + for index in range(num_of_rows): + task_dict = {key: columns[key][index] for key in keys} + chart.append(task_dict) + + return chart + + # validate if df is a list + if not isinstance(df, list): + raise exceptions.PlotlyError( + "You must input either a dataframe or a list of dictionaries." + ) + + # validate if df is empty + if len(df) <= 0: + raise exceptions.PlotlyError( + "Your list is empty. It must contain at least one dictionary." + ) + if not isinstance(df[0], dict): + raise exceptions.PlotlyError("Your list must only include dictionaries.") + return df + + +def gantt( + chart, + colors, + title, + bar_width, + showgrid_x, + showgrid_y, + height, + width, + tasks=None, + task_names=None, + data=None, + group_tasks=False, + show_hover_fill=True, + show_colorbar=True, +): + """ + Refer to create_gantt() for docstring + """ + if tasks is None: + tasks = [] + if task_names is None: + task_names = [] + if data is None: + data = [] + + for index in range(len(chart)): + task = dict( + x0=chart[index]["Start"], + x1=chart[index]["Finish"], + name=chart[index]["Task"], + ) + if "Description" in chart[index]: + task["description"] = chart[index]["Description"] + tasks.append(task) + + # create a scatter trace for every task group + scatter_data_dict = dict() + marker_data_dict = dict() + + if show_hover_fill: + hoverinfo = "name" + else: + hoverinfo = "skip" + + scatter_data_template = { + "x": [], + "y": [], + "mode": "none", + "fill": "toself", + "hoverinfo": hoverinfo, + } + + marker_data_template = { + "x": [], + "y": [], + "mode": "markers", + "text": [], + "marker": dict(color="", size=1, opacity=0), + "name": "", + "showlegend": False, + } + + # create the list of task names + for index in range(len(tasks)): + tn = tasks[index]["name"] + # Is added to task_names if group_tasks is set to False, + # or if the option is used (True) it only adds them if the + # name is not already in the list + if not group_tasks or tn not in task_names: + task_names.append(tn) + # Guarantees that for grouped tasks the tasks that are inserted first + # are shown at the top + if group_tasks: + task_names.reverse() + + color_index = 0 + for index in range(len(tasks)): + tn = tasks[index]["name"] + del tasks[index]["name"] + + # If group_tasks is True, all tasks with the same name belong + # to the same row. + groupID = index + if group_tasks: + groupID = task_names.index(tn) + tasks[index]["y0"] = groupID - bar_width + tasks[index]["y1"] = groupID + bar_width + + # check if colors need to be looped + if color_index >= len(colors): + color_index = 0 + tasks[index]["fillcolor"] = colors[color_index] + color_id = tasks[index]["fillcolor"] + + if color_id not in scatter_data_dict: + scatter_data_dict[color_id] = copy.deepcopy(scatter_data_template) + + scatter_data_dict[color_id]["fillcolor"] = color_id + scatter_data_dict[color_id]["name"] = str(tn) + scatter_data_dict[color_id]["legendgroup"] = color_id + + # if there are already values append the gap + if len(scatter_data_dict[color_id]["x"]) > 0: + # a gap on the scatterplot separates the rectangles from each other + scatter_data_dict[color_id]["x"].append( + scatter_data_dict[color_id]["x"][-1] + ) + scatter_data_dict[color_id]["y"].append(None) + + xs, ys = _get_corner_points( + tasks[index]["x0"], + tasks[index]["y0"], + tasks[index]["x1"], + tasks[index]["y1"], + ) + + scatter_data_dict[color_id]["x"] += xs + scatter_data_dict[color_id]["y"] += ys + + # append dummy markers for showing start and end of interval + if color_id not in marker_data_dict: + marker_data_dict[color_id] = copy.deepcopy(marker_data_template) + marker_data_dict[color_id]["marker"]["color"] = color_id + marker_data_dict[color_id]["legendgroup"] = color_id + + marker_data_dict[color_id]["x"].append(tasks[index]["x0"]) + marker_data_dict[color_id]["x"].append(tasks[index]["x1"]) + marker_data_dict[color_id]["y"].append(groupID) + marker_data_dict[color_id]["y"].append(groupID) + + if "description" in tasks[index]: + marker_data_dict[color_id]["text"].append(tasks[index]["description"]) + marker_data_dict[color_id]["text"].append(tasks[index]["description"]) + del tasks[index]["description"] + else: + marker_data_dict[color_id]["text"].append(None) + marker_data_dict[color_id]["text"].append(None) + + color_index += 1 + + showlegend = show_colorbar + + layout = dict( + title=title, + showlegend=showlegend, + height=height, + width=width, + shapes=[], + hovermode="closest", + yaxis=dict( + showgrid=showgrid_y, + ticktext=task_names, + tickvals=list(range(len(task_names))), + range=[-1, len(task_names) + 1], + autorange=False, + zeroline=False, + ), + xaxis=dict( + showgrid=showgrid_x, + zeroline=False, + rangeselector=dict( + buttons=list( + [ + dict(count=7, label="1w", step="day", stepmode="backward"), + dict(count=1, label="1m", step="month", stepmode="backward"), + dict(count=6, label="6m", step="month", stepmode="backward"), + dict(count=1, label="YTD", step="year", stepmode="todate"), + dict(count=1, label="1y", step="year", stepmode="backward"), + dict(step="all"), + ] + ) + ), + type="date", + ), + ) + + data = [scatter_data_dict[k] for k in sorted(scatter_data_dict)] + data += [marker_data_dict[k] for k in sorted(marker_data_dict)] + + # fig = dict( + # data=data, layout=layout + # ) + fig = go.Figure(data=data, layout=layout) + return fig + + +def gantt_colorscale( + chart, + colors, + title, + index_col, + show_colorbar, + bar_width, + showgrid_x, + showgrid_y, + height, + width, + tasks=None, + task_names=None, + data=None, + group_tasks=False, + show_hover_fill=True, +): + """ + Refer to FigureFactory.create_gantt() for docstring + """ + if tasks is None: + tasks = [] + if task_names is None: + task_names = [] + if data is None: + data = [] + showlegend = False + + for index in range(len(chart)): + task = dict( + x0=chart[index]["Start"], + x1=chart[index]["Finish"], + name=chart[index]["Task"], + ) + if "Description" in chart[index]: + task["description"] = chart[index]["Description"] + tasks.append(task) + + # create a scatter trace for every task group + scatter_data_dict = dict() + # create scatter traces for the start- and endpoints + marker_data_dict = dict() + + if show_hover_fill: + hoverinfo = "name" + else: + hoverinfo = "skip" + + scatter_data_template = { + "x": [], + "y": [], + "mode": "none", + "fill": "toself", + "showlegend": False, + "hoverinfo": hoverinfo, + "legendgroup": "", + } + + marker_data_template = { + "x": [], + "y": [], + "mode": "markers", + "text": [], + "marker": dict(color="", size=1, opacity=0), + "name": "", + "showlegend": False, + "legendgroup": "", + } + + index_vals = [] + for row in range(len(tasks)): + if chart[row][index_col] not in index_vals: + index_vals.append(chart[row][index_col]) + + index_vals.sort() + + # compute the color for task based on indexing column + if isinstance(chart[0][index_col], Number): + # check that colors has at least 2 colors + if len(colors) < 2: + raise exceptions.PlotlyError( + "You must use at least 2 colors in 'colors' if you " + "are using a colorscale. However only the first two " + "colors given will be used for the lower and upper " + "bounds on the colormap." + ) + + # create the list of task names + for index in range(len(tasks)): + tn = tasks[index]["name"] + # Is added to task_names if group_tasks is set to False, + # or if the option is used (True) it only adds them if the + # name is not already in the list + if not group_tasks or tn not in task_names: + task_names.append(tn) + # Guarantees that for grouped tasks the tasks that are inserted + # first are shown at the top + if group_tasks: + task_names.reverse() + + for index in range(len(tasks)): + tn = tasks[index]["name"] + del tasks[index]["name"] + + # If group_tasks is True, all tasks with the same name belong + # to the same row. + groupID = index + if group_tasks: + groupID = task_names.index(tn) + tasks[index]["y0"] = groupID - bar_width + tasks[index]["y1"] = groupID + bar_width + + # unlabel color + colors = clrs.color_parser(colors, clrs.unlabel_rgb) + lowcolor = colors[0] + highcolor = colors[1] + + intermed = (chart[index][index_col]) / 100.0 + intermed_color = clrs.find_intermediate_color(lowcolor, highcolor, intermed) + intermed_color = clrs.color_parser(intermed_color, clrs.label_rgb) + tasks[index]["fillcolor"] = intermed_color + color_id = tasks[index]["fillcolor"] + + if color_id not in scatter_data_dict: + scatter_data_dict[color_id] = copy.deepcopy(scatter_data_template) + + scatter_data_dict[color_id]["fillcolor"] = color_id + scatter_data_dict[color_id]["name"] = str(chart[index][index_col]) + scatter_data_dict[color_id]["legendgroup"] = color_id + + # relabel colors with 'rgb' + colors = clrs.color_parser(colors, clrs.label_rgb) + + # if there are already values append the gap + if len(scatter_data_dict[color_id]["x"]) > 0: + # a gap on the scatterplot separates the rectangles from each other + scatter_data_dict[color_id]["x"].append( + scatter_data_dict[color_id]["x"][-1] + ) + scatter_data_dict[color_id]["y"].append(None) + + xs, ys = _get_corner_points( + tasks[index]["x0"], + tasks[index]["y0"], + tasks[index]["x1"], + tasks[index]["y1"], + ) + + scatter_data_dict[color_id]["x"] += xs + scatter_data_dict[color_id]["y"] += ys + + # append dummy markers for showing start and end of interval + if color_id not in marker_data_dict: + marker_data_dict[color_id] = copy.deepcopy(marker_data_template) + marker_data_dict[color_id]["marker"]["color"] = color_id + marker_data_dict[color_id]["legendgroup"] = color_id + + marker_data_dict[color_id]["x"].append(tasks[index]["x0"]) + marker_data_dict[color_id]["x"].append(tasks[index]["x1"]) + marker_data_dict[color_id]["y"].append(groupID) + marker_data_dict[color_id]["y"].append(groupID) + + if "description" in tasks[index]: + marker_data_dict[color_id]["text"].append(tasks[index]["description"]) + marker_data_dict[color_id]["text"].append(tasks[index]["description"]) + del tasks[index]["description"] + else: + marker_data_dict[color_id]["text"].append(None) + marker_data_dict[color_id]["text"].append(None) + + # add colorbar to one of the traces randomly just for display + if show_colorbar is True: + k = list(marker_data_dict.keys())[0] + marker_data_dict[k]["marker"].update( + dict( + colorscale=[[0, colors[0]], [1, colors[1]]], + showscale=True, + cmax=100, + cmin=0, + ) + ) + + if isinstance(chart[0][index_col], str): + index_vals = [] + for row in range(len(tasks)): + if chart[row][index_col] not in index_vals: + index_vals.append(chart[row][index_col]) + + index_vals.sort() + + if len(colors) < len(index_vals): + raise exceptions.PlotlyError( + "Error. The number of colors in 'colors' must be no less " + "than the number of unique index values in your group " + "column." + ) + + # make a dictionary assignment to each index value + index_vals_dict = {} + # define color index + c_index = 0 + for key in index_vals: + if c_index > len(colors) - 1: + c_index = 0 + index_vals_dict[key] = colors[c_index] + c_index += 1 + + # create the list of task names + for index in range(len(tasks)): + tn = tasks[index]["name"] + # Is added to task_names if group_tasks is set to False, + # or if the option is used (True) it only adds them if the + # name is not already in the list + if not group_tasks or tn not in task_names: + task_names.append(tn) + # Guarantees that for grouped tasks the tasks that are inserted + # first are shown at the top + if group_tasks: + task_names.reverse() + + for index in range(len(tasks)): + tn = tasks[index]["name"] + del tasks[index]["name"] + + # If group_tasks is True, all tasks with the same name belong + # to the same row. + groupID = index + if group_tasks: + groupID = task_names.index(tn) + tasks[index]["y0"] = groupID - bar_width + tasks[index]["y1"] = groupID + bar_width + + tasks[index]["fillcolor"] = index_vals_dict[chart[index][index_col]] + color_id = tasks[index]["fillcolor"] + + if color_id not in scatter_data_dict: + scatter_data_dict[color_id] = copy.deepcopy(scatter_data_template) + + scatter_data_dict[color_id]["fillcolor"] = color_id + scatter_data_dict[color_id]["legendgroup"] = color_id + scatter_data_dict[color_id]["name"] = str(chart[index][index_col]) + + # relabel colors with 'rgb' + colors = clrs.color_parser(colors, clrs.label_rgb) + + # if there are already values append the gap + if len(scatter_data_dict[color_id]["x"]) > 0: + # a gap on the scatterplot separates the rectangles from each other + scatter_data_dict[color_id]["x"].append( + scatter_data_dict[color_id]["x"][-1] + ) + scatter_data_dict[color_id]["y"].append(None) + + xs, ys = _get_corner_points( + tasks[index]["x0"], + tasks[index]["y0"], + tasks[index]["x1"], + tasks[index]["y1"], + ) + + scatter_data_dict[color_id]["x"] += xs + scatter_data_dict[color_id]["y"] += ys + + # append dummy markers for showing start and end of interval + if color_id not in marker_data_dict: + marker_data_dict[color_id] = copy.deepcopy(marker_data_template) + marker_data_dict[color_id]["marker"]["color"] = color_id + marker_data_dict[color_id]["legendgroup"] = color_id + + marker_data_dict[color_id]["x"].append(tasks[index]["x0"]) + marker_data_dict[color_id]["x"].append(tasks[index]["x1"]) + marker_data_dict[color_id]["y"].append(groupID) + marker_data_dict[color_id]["y"].append(groupID) + + if "description" in tasks[index]: + marker_data_dict[color_id]["text"].append(tasks[index]["description"]) + marker_data_dict[color_id]["text"].append(tasks[index]["description"]) + del tasks[index]["description"] + else: + marker_data_dict[color_id]["text"].append(None) + marker_data_dict[color_id]["text"].append(None) + + if show_colorbar is True: + showlegend = True + for k in scatter_data_dict: + scatter_data_dict[k]["showlegend"] = showlegend + # add colorbar to one of the traces randomly just for display + # if show_colorbar is True: + # k = list(marker_data_dict.keys())[0] + # marker_data_dict[k]["marker"].update( + # dict( + # colorscale=[[0, colors[0]], [1, colors[1]]], + # showscale=True, + # cmax=100, + # cmin=0, + # ) + # ) + + layout = dict( + title=title, + showlegend=showlegend, + height=height, + width=width, + shapes=[], + hovermode="closest", + yaxis=dict( + showgrid=showgrid_y, + ticktext=task_names, + tickvals=list(range(len(task_names))), + range=[-1, len(task_names) + 1], + autorange=False, + zeroline=False, + ), + xaxis=dict( + showgrid=showgrid_x, + zeroline=False, + rangeselector=dict( + buttons=list( + [ + dict(count=7, label="1w", step="day", stepmode="backward"), + dict(count=1, label="1m", step="month", stepmode="backward"), + dict(count=6, label="6m", step="month", stepmode="backward"), + dict(count=1, label="YTD", step="year", stepmode="todate"), + dict(count=1, label="1y", step="year", stepmode="backward"), + dict(step="all"), + ] + ) + ), + type="date", + ), + ) + + data = [scatter_data_dict[k] for k in sorted(scatter_data_dict)] + data += [marker_data_dict[k] for k in sorted(marker_data_dict)] + + # fig = dict( + # data=data, layout=layout + # ) + fig = go.Figure(data=data, layout=layout) + return fig + + +def gantt_dict( + chart, + colors, + title, + index_col, + show_colorbar, + bar_width, + showgrid_x, + showgrid_y, + height, + width, + tasks=None, + task_names=None, + data=None, + group_tasks=False, + show_hover_fill=True, +): + """ + Refer to FigureFactory.create_gantt() for docstring + """ + + if tasks is None: + tasks = [] + if task_names is None: + task_names = [] + if data is None: + data = [] + showlegend = False + + for index in range(len(chart)): + task = dict( + x0=chart[index]["Start"], + x1=chart[index]["Finish"], + name=chart[index]["Task"], + ) + if "Description" in chart[index]: + task["description"] = chart[index]["Description"] + tasks.append(task) + + # create a scatter trace for every task group + scatter_data_dict = dict() + # create scatter traces for the start- and endpoints + marker_data_dict = dict() + + if show_hover_fill: + hoverinfo = "name" + else: + hoverinfo = "skip" + + scatter_data_template = { + "x": [], + "y": [], + "mode": "none", + "fill": "toself", + "hoverinfo": hoverinfo, + "legendgroup": "", + } + + marker_data_template = { + "x": [], + "y": [], + "mode": "markers", + "text": [], + "marker": dict(color="", size=1, opacity=0), + "name": "", + "showlegend": False, + } + + index_vals = [] + for row in range(len(tasks)): + if chart[row][index_col] not in index_vals: + index_vals.append(chart[row][index_col]) + + index_vals.sort() + + # verify each value in index column appears in colors dictionary + for key in index_vals: + if key not in colors: + raise exceptions.PlotlyError( + "If you are using colors as a dictionary, all of its " + "keys must be all the values in the index column." + ) + + # create the list of task names + for index in range(len(tasks)): + tn = tasks[index]["name"] + # Is added to task_names if group_tasks is set to False, + # or if the option is used (True) it only adds them if the + # name is not already in the list + if not group_tasks or tn not in task_names: + task_names.append(tn) + # Guarantees that for grouped tasks the tasks that are inserted first + # are shown at the top + if group_tasks: + task_names.reverse() + + for index in range(len(tasks)): + tn = tasks[index]["name"] + del tasks[index]["name"] + + # If group_tasks is True, all tasks with the same name belong + # to the same row. + groupID = index + if group_tasks: + groupID = task_names.index(tn) + tasks[index]["y0"] = groupID - bar_width + tasks[index]["y1"] = groupID + bar_width + + tasks[index]["fillcolor"] = colors[chart[index][index_col]] + color_id = tasks[index]["fillcolor"] + + if color_id not in scatter_data_dict: + scatter_data_dict[color_id] = copy.deepcopy(scatter_data_template) + + scatter_data_dict[color_id]["legendgroup"] = color_id + scatter_data_dict[color_id]["fillcolor"] = color_id + + # if there are already values append the gap + if len(scatter_data_dict[color_id]["x"]) > 0: + # a gap on the scatterplot separates the rectangles from each other + scatter_data_dict[color_id]["x"].append( + scatter_data_dict[color_id]["x"][-1] + ) + scatter_data_dict[color_id]["y"].append(None) + + xs, ys = _get_corner_points( + tasks[index]["x0"], + tasks[index]["y0"], + tasks[index]["x1"], + tasks[index]["y1"], + ) + + scatter_data_dict[color_id]["x"] += xs + scatter_data_dict[color_id]["y"] += ys + + # append dummy markers for showing start and end of interval + if color_id not in marker_data_dict: + marker_data_dict[color_id] = copy.deepcopy(marker_data_template) + marker_data_dict[color_id]["marker"]["color"] = color_id + marker_data_dict[color_id]["legendgroup"] = color_id + + marker_data_dict[color_id]["x"].append(tasks[index]["x0"]) + marker_data_dict[color_id]["x"].append(tasks[index]["x1"]) + marker_data_dict[color_id]["y"].append(groupID) + marker_data_dict[color_id]["y"].append(groupID) + + if "description" in tasks[index]: + marker_data_dict[color_id]["text"].append(tasks[index]["description"]) + marker_data_dict[color_id]["text"].append(tasks[index]["description"]) + del tasks[index]["description"] + else: + marker_data_dict[color_id]["text"].append(None) + marker_data_dict[color_id]["text"].append(None) + + if show_colorbar is True: + showlegend = True + + for index_value in index_vals: + scatter_data_dict[colors[index_value]]["name"] = str(index_value) + + layout = dict( + title=title, + showlegend=showlegend, + height=height, + width=width, + shapes=[], + hovermode="closest", + yaxis=dict( + showgrid=showgrid_y, + ticktext=task_names, + tickvals=list(range(len(task_names))), + range=[-1, len(task_names) + 1], + autorange=False, + zeroline=False, + ), + xaxis=dict( + showgrid=showgrid_x, + zeroline=False, + rangeselector=dict( + buttons=list( + [ + dict(count=7, label="1w", step="day", stepmode="backward"), + dict(count=1, label="1m", step="month", stepmode="backward"), + dict(count=6, label="6m", step="month", stepmode="backward"), + dict(count=1, label="YTD", step="year", stepmode="todate"), + dict(count=1, label="1y", step="year", stepmode="backward"), + dict(step="all"), + ] + ) + ), + type="date", + ), + ) + + data = [scatter_data_dict[k] for k in sorted(scatter_data_dict)] + data += [marker_data_dict[k] for k in sorted(marker_data_dict)] + + # fig = dict( + # data=data, layout=layout + # ) + fig = go.Figure(data=data, layout=layout) + return fig + + +def create_gantt( + df, + colors=None, + index_col=None, + show_colorbar=False, + reverse_colors=False, + title="Gantt Chart", + bar_width=0.2, + showgrid_x=False, + showgrid_y=False, + height=600, + width=None, + tasks=None, + task_names=None, + data=None, + group_tasks=False, + show_hover_fill=True, +): + """ + **deprecated**, use instead + :func:`plotly.express.timeline`. + + Returns figure for a gantt chart + + :param (array|list) df: input data for gantt chart. Must be either a + a dataframe or a list. If dataframe, the columns must include + 'Task', 'Start' and 'Finish'. Other columns can be included and + used for indexing. If a list, its elements must be dictionaries + with the same required column headers: 'Task', 'Start' and + 'Finish'. + :param (str|list|dict|tuple) colors: either a plotly scale name, an + rgb or hex color, a color tuple or a list of colors. An rgb color + is of the form 'rgb(x, y, z)' where x, y, z belong to the interval + [0, 255] and a color tuple is a tuple of the form (a, b, c) where + a, b and c belong to [0, 1]. If colors is a list, it must + contain the valid color types aforementioned as its members. + If a dictionary, all values of the indexing column must be keys in + colors. + :param (str|float) index_col: the column header (if df is a data + frame) that will function as the indexing column. If df is a list, + index_col must be one of the keys in all the items of df. + :param (bool) show_colorbar: determines if colorbar will be visible. + Only applies if values in the index column are numeric. + :param (bool) show_hover_fill: enables/disables the hovertext for the + filled area of the chart. + :param (bool) reverse_colors: reverses the order of selected colors + :param (str) title: the title of the chart + :param (float) bar_width: the width of the horizontal bars in the plot + :param (bool) showgrid_x: show/hide the x-axis grid + :param (bool) showgrid_y: show/hide the y-axis grid + :param (float) height: the height of the chart + :param (float) width: the width of the chart + + Example 1: Simple Gantt Chart + + >>> from plotly.figure_factory import create_gantt + + >>> # Make data for chart + >>> df = [dict(Task="Job A", Start='2009-01-01', Finish='2009-02-30'), + ... dict(Task="Job B", Start='2009-03-05', Finish='2009-04-15'), + ... dict(Task="Job C", Start='2009-02-20', Finish='2009-05-30')] + + >>> # Create a figure + >>> fig = create_gantt(df) + >>> fig.show() + + + Example 2: Index by Column with Numerical Entries + + >>> from plotly.figure_factory import create_gantt + + >>> # Make data for chart + >>> df = [dict(Task="Job A", Start='2009-01-01', + ... Finish='2009-02-30', Complete=10), + ... dict(Task="Job B", Start='2009-03-05', + ... Finish='2009-04-15', Complete=60), + ... dict(Task="Job C", Start='2009-02-20', + ... Finish='2009-05-30', Complete=95)] + + >>> # Create a figure with Plotly colorscale + >>> fig = create_gantt(df, colors='Blues', index_col='Complete', + ... show_colorbar=True, bar_width=0.5, + ... showgrid_x=True, showgrid_y=True) + >>> fig.show() + + + Example 3: Index by Column with String Entries + + >>> from plotly.figure_factory import create_gantt + + >>> # Make data for chart + >>> df = [dict(Task="Job A", Start='2009-01-01', + ... Finish='2009-02-30', Resource='Apple'), + ... dict(Task="Job B", Start='2009-03-05', + ... Finish='2009-04-15', Resource='Grape'), + ... dict(Task="Job C", Start='2009-02-20', + ... Finish='2009-05-30', Resource='Banana')] + + >>> # Create a figure with Plotly colorscale + >>> fig = create_gantt(df, colors=['rgb(200, 50, 25)', (1, 0, 1), '#6c4774'], + ... index_col='Resource', reverse_colors=True, + ... show_colorbar=True) + >>> fig.show() + + + Example 4: Use a dictionary for colors + + >>> from plotly.figure_factory import create_gantt + >>> # Make data for chart + >>> df = [dict(Task="Job A", Start='2009-01-01', + ... Finish='2009-02-30', Resource='Apple'), + ... dict(Task="Job B", Start='2009-03-05', + ... Finish='2009-04-15', Resource='Grape'), + ... dict(Task="Job C", Start='2009-02-20', + ... Finish='2009-05-30', Resource='Banana')] + + >>> # Make a dictionary of colors + >>> colors = {'Apple': 'rgb(255, 0, 0)', + ... 'Grape': 'rgb(170, 14, 200)', + ... 'Banana': (1, 1, 0.2)} + + >>> # Create a figure with Plotly colorscale + >>> fig = create_gantt(df, colors=colors, index_col='Resource', + ... show_colorbar=True) + + >>> fig.show() + + Example 5: Use a pandas dataframe + + >>> from plotly.figure_factory import create_gantt + >>> import pandas as pd + + >>> # Make data as a dataframe + >>> df = pd.DataFrame([['Run', '2010-01-01', '2011-02-02', 10], + ... ['Fast', '2011-01-01', '2012-06-05', 55], + ... ['Eat', '2012-01-05', '2013-07-05', 94]], + ... columns=['Task', 'Start', 'Finish', 'Complete']) + + >>> # Create a figure with Plotly colorscale + >>> fig = create_gantt(df, colors='Blues', index_col='Complete', + ... show_colorbar=True, bar_width=0.5, + ... showgrid_x=True, showgrid_y=True) + >>> fig.show() + """ + # validate gantt input data + chart = validate_gantt(df) + + if index_col: + if index_col not in chart[0]: + raise exceptions.PlotlyError( + "In order to use an indexing column and assign colors to " + "the values of the index, you must choose an actual " + "column name in the dataframe or key if a list of " + "dictionaries is being used." + ) + + # validate gantt index column + index_list = [] + for dictionary in chart: + index_list.append(dictionary[index_col]) + utils.validate_index(index_list) + + # Validate colors + if isinstance(colors, dict): + colors = clrs.validate_colors_dict(colors, "rgb") + else: + colors = clrs.validate_colors(colors, "rgb") + + if reverse_colors is True: + colors.reverse() + + if not index_col: + if isinstance(colors, dict): + raise exceptions.PlotlyError( + "Error. You have set colors to a dictionary but have not " + "picked an index. An index is required if you are " + "assigning colors to particular values in a dictionary." + ) + fig = gantt( + chart, + colors, + title, + bar_width, + showgrid_x, + showgrid_y, + height, + width, + tasks=None, + task_names=None, + data=None, + group_tasks=group_tasks, + show_hover_fill=show_hover_fill, + show_colorbar=show_colorbar, + ) + return fig + else: + if not isinstance(colors, dict): + fig = gantt_colorscale( + chart, + colors, + title, + index_col, + show_colorbar, + bar_width, + showgrid_x, + showgrid_y, + height, + width, + tasks=None, + task_names=None, + data=None, + group_tasks=group_tasks, + show_hover_fill=show_hover_fill, + ) + return fig + else: + fig = gantt_dict( + chart, + colors, + title, + index_col, + show_colorbar, + bar_width, + showgrid_x, + showgrid_y, + height, + width, + tasks=None, + task_names=None, + data=None, + group_tasks=group_tasks, + show_hover_fill=show_hover_fill, + ) + return fig diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/figure_factory/_hexbin_map.py b/.venv_haddock/lib/python3.12/site-packages/plotly/figure_factory/_hexbin_map.py new file mode 100644 index 0000000000000000000000000000000000000000..792cae5e2388f66d7587c98395a90a2e252f622f --- /dev/null +++ b/.venv_haddock/lib/python3.12/site-packages/plotly/figure_factory/_hexbin_map.py @@ -0,0 +1,546 @@ +from plotly.express._core import build_dataframe +from plotly.express._doc import make_docstring +from plotly.express._chart_types import choropleth_map, scatter_map +import narwhals.stable.v1 as nw +import numpy as np +import warnings + + +def _project_latlon_to_wgs84(lat, lon): + """ + Projects lat and lon to WGS84, used to get regular hexagons on a mapbox map + """ + x = lon * np.pi / 180 + y = np.arctanh(np.sin(lat * np.pi / 180)) + return x, y + + +def _project_wgs84_to_latlon(x, y): + """ + Projects WGS84 to lat and lon, used to get regular hexagons on a mapbox map + """ + lon = x * 180 / np.pi + lat = (2 * np.arctan(np.exp(y)) - np.pi / 2) * 180 / np.pi + return lat, lon + + +def _getBoundsZoomLevel(lon_min, lon_max, lat_min, lat_max, mapDim): + """ + Get the mapbox zoom level given bounds and a figure dimension + Source: https://stackoverflow.com/questions/6048975/google-maps-v3-how-to-calculate-the-zoom-level-for-a-given-bounds + """ + + scale = ( + 2 # adjustment to reflect MapBox base tiles are 512x512 vs. Google's 256x256 + ) + WORLD_DIM = {"height": 256 * scale, "width": 256 * scale} + ZOOM_MAX = 18 + + def latRad(lat): + sin = np.sin(lat * np.pi / 180) + radX2 = np.log((1 + sin) / (1 - sin)) / 2 + return max(min(radX2, np.pi), -np.pi) / 2 + + def zoom(mapPx, worldPx, fraction): + return 0.95 * np.log(mapPx / worldPx / fraction) / np.log(2) + + latFraction = (latRad(lat_max) - latRad(lat_min)) / np.pi + + lngDiff = lon_max - lon_min + lngFraction = ((lngDiff + 360) if lngDiff < 0 else lngDiff) / 360 + + latZoom = zoom(mapDim["height"], WORLD_DIM["height"], latFraction) + lngZoom = zoom(mapDim["width"], WORLD_DIM["width"], lngFraction) + + return min(latZoom, lngZoom, ZOOM_MAX) + + +def _compute_hexbin(x, y, x_range, y_range, color, nx, agg_func, min_count): + """ + Computes the aggregation at hexagonal bin level. + Also defines the coordinates of the hexagons for plotting. + The binning is inspired by matplotlib's implementation. + + Parameters + ---------- + x : np.ndarray + Array of x values (shape N) + y : np.ndarray + Array of y values (shape N) + x_range : np.ndarray + Min and max x (shape 2) + y_range : np.ndarray + Min and max y (shape 2) + color : np.ndarray + Metric to aggregate at hexagon level (shape N) + nx : int + Number of hexagons horizontally + agg_func : function + Numpy compatible aggregator, this function must take a one-dimensional + np.ndarray as input and output a scalar + min_count : int + Minimum number of points in the hexagon for the hexagon to be displayed + + Returns + ------- + np.ndarray + X coordinates of each hexagon (shape M x 6) + np.ndarray + Y coordinates of each hexagon (shape M x 6) + np.ndarray + Centers of the hexagons (shape M x 2) + np.ndarray + Aggregated value in each hexagon (shape M) + + """ + xmin = x_range.min() + xmax = x_range.max() + ymin = y_range.min() + ymax = y_range.max() + + # In the x-direction, the hexagons exactly cover the region from + # xmin to xmax. Need some padding to avoid roundoff errors. + padding = 1.0e-9 * (xmax - xmin) + xmin -= padding + xmax += padding + + Dx = xmax - xmin + Dy = ymax - ymin + if Dx == 0 and Dy > 0: + dx = Dy / nx + elif Dx == 0 and Dy == 0: + dx, _ = _project_latlon_to_wgs84(1, 1) + else: + dx = Dx / nx + dy = dx * np.sqrt(3) + ny = np.ceil(Dy / dy).astype(int) + + # Center the hexagons vertically since we only want regular hexagons + ymin -= (ymin + dy * ny - ymax) / 2 + + x = (x - xmin) / dx + y = (y - ymin) / dy + ix1 = np.round(x).astype(int) + iy1 = np.round(y).astype(int) + ix2 = np.floor(x).astype(int) + iy2 = np.floor(y).astype(int) + + nx1 = nx + 1 + ny1 = ny + 1 + nx2 = nx + ny2 = ny + n = nx1 * ny1 + nx2 * ny2 + + d1 = (x - ix1) ** 2 + 3.0 * (y - iy1) ** 2 + d2 = (x - ix2 - 0.5) ** 2 + 3.0 * (y - iy2 - 0.5) ** 2 + bdist = d1 < d2 + + if color is None: + lattice1 = np.zeros((nx1, ny1)) + lattice2 = np.zeros((nx2, ny2)) + c1 = (0 <= ix1) & (ix1 < nx1) & (0 <= iy1) & (iy1 < ny1) & bdist + c2 = (0 <= ix2) & (ix2 < nx2) & (0 <= iy2) & (iy2 < ny2) & ~bdist + np.add.at(lattice1, (ix1[c1], iy1[c1]), 1) + np.add.at(lattice2, (ix2[c2], iy2[c2]), 1) + if min_count is not None: + lattice1[lattice1 < min_count] = np.nan + lattice2[lattice2 < min_count] = np.nan + accum = np.concatenate([lattice1.ravel(), lattice2.ravel()]) + good_idxs = ~np.isnan(accum) + else: + if min_count is None: + min_count = 1 + + # create accumulation arrays + lattice1 = np.empty((nx1, ny1), dtype=object) + for i in range(nx1): + for j in range(ny1): + lattice1[i, j] = [] + lattice2 = np.empty((nx2, ny2), dtype=object) + for i in range(nx2): + for j in range(ny2): + lattice2[i, j] = [] + + for i in range(len(x)): + if bdist[i]: + if 0 <= ix1[i] < nx1 and 0 <= iy1[i] < ny1: + lattice1[ix1[i], iy1[i]].append(color[i]) + else: + if 0 <= ix2[i] < nx2 and 0 <= iy2[i] < ny2: + lattice2[ix2[i], iy2[i]].append(color[i]) + + for i in range(nx1): + for j in range(ny1): + vals = lattice1[i, j] + if len(vals) >= min_count: + lattice1[i, j] = agg_func(vals) + else: + lattice1[i, j] = np.nan + for i in range(nx2): + for j in range(ny2): + vals = lattice2[i, j] + if len(vals) >= min_count: + lattice2[i, j] = agg_func(vals) + else: + lattice2[i, j] = np.nan + + accum = np.hstack( + (lattice1.astype(float).ravel(), lattice2.astype(float).ravel()) + ) + good_idxs = ~np.isnan(accum) + + agreggated_value = accum[good_idxs] + + centers = np.zeros((n, 2), float) + centers[: nx1 * ny1, 0] = np.repeat(np.arange(nx1), ny1) + centers[: nx1 * ny1, 1] = np.tile(np.arange(ny1), nx1) + centers[nx1 * ny1 :, 0] = np.repeat(np.arange(nx2) + 0.5, ny2) + centers[nx1 * ny1 :, 1] = np.tile(np.arange(ny2), nx2) + 0.5 + centers[:, 0] *= dx + centers[:, 1] *= dy + centers[:, 0] += xmin + centers[:, 1] += ymin + centers = centers[good_idxs] + + # Define normalised regular hexagon coordinates + hx = [0, 0.5, 0.5, 0, -0.5, -0.5] + hy = [ + -0.5 / np.cos(np.pi / 6), + -0.5 * np.tan(np.pi / 6), + 0.5 * np.tan(np.pi / 6), + 0.5 / np.cos(np.pi / 6), + 0.5 * np.tan(np.pi / 6), + -0.5 * np.tan(np.pi / 6), + ] + + # Number of hexagons needed + m = len(centers) + + # Coordinates for all hexagonal patches + hxs = np.array([hx] * m) * dx + np.vstack(centers[:, 0]) + hys = np.array([hy] * m) * dy / np.sqrt(3) + np.vstack(centers[:, 1]) + + return hxs, hys, centers, agreggated_value + + +def _compute_wgs84_hexbin( + lat=None, + lon=None, + lat_range=None, + lon_range=None, + color=None, + nx=None, + agg_func=None, + min_count=None, + native_namespace=None, +): + """ + Computes the lat-lon aggregation at hexagonal bin level. + Latitude and longitude need to be projected to WGS84 before aggregating + in order to display regular hexagons on the map. + + Parameters + ---------- + lat : np.ndarray + Array of latitudes (shape N) + lon : np.ndarray + Array of longitudes (shape N) + lat_range : np.ndarray + Min and max latitudes (shape 2) + lon_range : np.ndarray + Min and max longitudes (shape 2) + color : np.ndarray + Metric to aggregate at hexagon level (shape N) + nx : int + Number of hexagons horizontally + agg_func : function + Numpy compatible aggregator, this function must take a one-dimensional + np.ndarray as input and output a scalar + min_count : int + Minimum number of points in the hexagon for the hexagon to be displayed + + Returns + ------- + np.ndarray + Lat coordinates of each hexagon (shape M x 6) + np.ndarray + Lon coordinates of each hexagon (shape M x 6) + nw.Series + Unique id for each hexagon, to be used in the geojson data (shape M) + np.ndarray + Aggregated value in each hexagon (shape M) + + """ + # Project to WGS 84 + x, y = _project_latlon_to_wgs84(lat, lon) + + if lat_range is None: + lat_range = np.array([lat.min(), lat.max()]) + if lon_range is None: + lon_range = np.array([lon.min(), lon.max()]) + + x_range, y_range = _project_latlon_to_wgs84(lat_range, lon_range) + + hxs, hys, centers, agreggated_value = _compute_hexbin( + x, y, x_range, y_range, color, nx, agg_func, min_count + ) + + # Convert back to lat-lon + hexagons_lats, hexagons_lons = _project_wgs84_to_latlon(hxs, hys) + + # Create unique feature id based on hexagon center + centers = centers.astype(str) + hexagons_ids = ( + nw.from_dict( + {"x1": centers[:, 0], "x2": centers[:, 1]}, + native_namespace=native_namespace, + ) + .select(hexagons_ids=nw.concat_str([nw.col("x1"), nw.col("x2")], separator=",")) + .get_column("hexagons_ids") + ) + + return hexagons_lats, hexagons_lons, hexagons_ids, agreggated_value + + +def _hexagons_to_geojson(hexagons_lats, hexagons_lons, ids=None): + """ + Creates a geojson of hexagonal features based on the outputs of + _compute_wgs84_hexbin + """ + features = [] + if ids is None: + ids = np.arange(len(hexagons_lats)) + for lat, lon, idx in zip(hexagons_lats, hexagons_lons, ids): + points = np.array([lon, lat]).T.tolist() + points.append(points[0]) + features.append( + dict( + type="Feature", + id=idx, + geometry=dict(type="Polygon", coordinates=[points]), + ) + ) + return dict(type="FeatureCollection", features=features) + + +def create_hexbin_map( + data_frame=None, + lat=None, + lon=None, + color=None, + nx_hexagon=5, + agg_func=None, + animation_frame=None, + color_discrete_sequence=None, + color_discrete_map={}, + labels={}, + color_continuous_scale=None, + range_color=None, + color_continuous_midpoint=None, + opacity=None, + zoom=None, + center=None, + map_style=None, + title=None, + template=None, + width=None, + height=None, + min_count=None, + show_original_data=False, + original_data_marker=None, +): + """ + Returns a figure aggregating scattered points into connected hexagons + """ + args = build_dataframe(args=locals(), constructor=None) + native_namespace = nw.get_native_namespace(args["data_frame"]) + if agg_func is None: + agg_func = np.mean + + lat_range = ( + args["data_frame"] + .select( + nw.min(args["lat"]).name.suffix("_min"), + nw.max(args["lat"]).name.suffix("_max"), + ) + .to_numpy() + .squeeze() + ) + + lon_range = ( + args["data_frame"] + .select( + nw.min(args["lon"]).name.suffix("_min"), + nw.max(args["lon"]).name.suffix("_max"), + ) + .to_numpy() + .squeeze() + ) + + hexagons_lats, hexagons_lons, hexagons_ids, count = _compute_wgs84_hexbin( + lat=args["data_frame"].get_column(args["lat"]).to_numpy(), + lon=args["data_frame"].get_column(args["lon"]).to_numpy(), + lat_range=lat_range, + lon_range=lon_range, + color=None, + nx=nx_hexagon, + agg_func=agg_func, + min_count=min_count, + native_namespace=native_namespace, + ) + + geojson = _hexagons_to_geojson(hexagons_lats, hexagons_lons, hexagons_ids) + + if zoom is None: + if height is None and width is None: + mapDim = dict(height=450, width=450) + elif height is None and width is not None: + mapDim = dict(height=450, width=width) + elif height is not None and width is None: + mapDim = dict(height=height, width=height) + else: + mapDim = dict(height=height, width=width) + zoom = _getBoundsZoomLevel( + lon_range[0], lon_range[1], lat_range[0], lat_range[1], mapDim + ) + + if center is None: + center = dict(lat=lat_range.mean(), lon=lon_range.mean()) + + if args["animation_frame"] is not None: + groups = dict( + args["data_frame"] + .group_by(args["animation_frame"], drop_null_keys=True) + .__iter__() + ) + else: + groups = {(0,): args["data_frame"]} + + agg_data_frame_list = [] + for key, df in groups.items(): + _, _, hexagons_ids, aggregated_value = _compute_wgs84_hexbin( + lat=df.get_column(args["lat"]).to_numpy(), + lon=df.get_column(args["lon"]).to_numpy(), + lat_range=lat_range, + lon_range=lon_range, + color=df.get_column(args["color"]).to_numpy() if args["color"] else None, + nx=nx_hexagon, + agg_func=agg_func, + min_count=min_count, + native_namespace=native_namespace, + ) + agg_data_frame_list.append( + nw.from_dict( + { + "frame": [key[0]] * len(hexagons_ids), + "locations": hexagons_ids, + "color": aggregated_value, + }, + native_namespace=native_namespace, + ) + ) + + agg_data_frame = nw.concat(agg_data_frame_list, how="vertical").with_columns( + color=nw.col("color").cast(nw.Int64) + ) + + if range_color is None: + range_color = [ + agg_data_frame["color"].min(), + agg_data_frame["color"].max(), + ] + + fig = choropleth_map( + data_frame=agg_data_frame.to_native(), + geojson=geojson, + locations="locations", + color="color", + hover_data={"color": True, "locations": False, "frame": False}, + animation_frame=("frame" if args["animation_frame"] is not None else None), + color_discrete_sequence=color_discrete_sequence, + color_discrete_map=color_discrete_map, + labels=labels, + color_continuous_scale=color_continuous_scale, + range_color=range_color, + color_continuous_midpoint=color_continuous_midpoint, + opacity=opacity, + zoom=zoom, + center=center, + map_style=map_style, + title=title, + template=template, + width=width, + height=height, + ) + + if show_original_data: + original_fig = scatter_map( + data_frame=( + args["data_frame"].sort( + by=args["animation_frame"], + descending=False, + nulls_last=True, + ) + if args["animation_frame"] is not None + else args["data_frame"] + ).to_native(), + lat=args["lat"], + lon=args["lon"], + animation_frame=args["animation_frame"], + ) + original_fig.data[0].hoverinfo = "skip" + original_fig.data[0].hovertemplate = None + original_fig.data[0].marker = original_data_marker + + fig.add_trace(original_fig.data[0]) + + if args["animation_frame"] is not None: + for i in range(len(original_fig.frames)): + original_fig.frames[i].data[0].hoverinfo = "skip" + original_fig.frames[i].data[0].hovertemplate = None + original_fig.frames[i].data[0].marker = original_data_marker + + fig.frames[i].data = [ + fig.frames[i].data[0], + original_fig.frames[i].data[0], + ] + + return fig + + +create_hexbin_map.__doc__ = make_docstring( + create_hexbin_map, + override_dict=dict( + nx_hexagon=["int", "Number of hexagons (horizontally) to be created"], + agg_func=[ + "function", + "Numpy array aggregator, it must take as input a 1D array", + "and output a scalar value.", + ], + min_count=[ + "int", + "Minimum number of points in a hexagon for it to be displayed.", + "If None and color is not set, display all hexagons.", + "If None and color is set, only display hexagons that contain points.", + ], + show_original_data=[ + "bool", + "Whether to show the original data on top of the hexbin aggregation.", + ], + original_data_marker=["dict", "Scattermap marker options."], + ), +) + + +def create_hexbin_mapbox(*args, **kwargs): + warnings.warn( + "create_hexbin_mapbox() is deprecated and will be removed in the next major version. " + + "Please use create_hexbin_map() instead. " + + "Learn more at: https://plotly.com/python/mapbox-to-maplibre/", + stacklevel=2, + category=DeprecationWarning, + ) + if "mapbox_style" in kwargs: + kwargs["map_style"] = kwargs.pop("mapbox_style") + + return create_hexbin_map(*args, **kwargs) diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/figure_factory/_ohlc.py b/.venv_haddock/lib/python3.12/site-packages/plotly/figure_factory/_ohlc.py new file mode 100644 index 0000000000000000000000000000000000000000..a0b1b4838bed44ee324199c824929e977ae8c77b --- /dev/null +++ b/.venv_haddock/lib/python3.12/site-packages/plotly/figure_factory/_ohlc.py @@ -0,0 +1,295 @@ +from plotly import exceptions +from plotly.graph_objs import graph_objs +from plotly.figure_factory import utils + + +# Default colours for finance charts +_DEFAULT_INCREASING_COLOR = "#3D9970" # http://clrs.cc +_DEFAULT_DECREASING_COLOR = "#FF4136" + + +def validate_ohlc(open, high, low, close, direction, **kwargs): + """ + ohlc and candlestick specific validations + + Specifically, this checks that the high value is the greatest value and + the low value is the lowest value in each unit. + + See FigureFactory.create_ohlc() or FigureFactory.create_candlestick() + for params + + :raises: (PlotlyError) If the high value is not the greatest value in + each unit. + :raises: (PlotlyError) If the low value is not the lowest value in each + unit. + :raises: (PlotlyError) If direction is not 'increasing' or 'decreasing' + """ + for lst in [open, low, close]: + for index in range(len(high)): + if high[index] < lst[index]: + raise exceptions.PlotlyError( + "Oops! Looks like some of " + "your high values are less " + "the corresponding open, " + "low, or close values. " + "Double check that your data " + "is entered in O-H-L-C order" + ) + + for lst in [open, high, close]: + for index in range(len(low)): + if low[index] > lst[index]: + raise exceptions.PlotlyError( + "Oops! Looks like some of " + "your low values are greater " + "than the corresponding high" + ", open, or close values. " + "Double check that your data " + "is entered in O-H-L-C order" + ) + + direction_opts = ("increasing", "decreasing", "both") + if direction not in direction_opts: + raise exceptions.PlotlyError( + "direction must be defined as 'increasing', 'decreasing', or 'both'" + ) + + +def make_increasing_ohlc(open, high, low, close, dates, **kwargs): + """ + Makes increasing ohlc sticks + + _make_increasing_ohlc() and _make_decreasing_ohlc separate the + increasing trace from the decreasing trace so kwargs (such as + color) can be passed separately to increasing or decreasing traces + when direction is set to 'increasing' or 'decreasing' in + FigureFactory.create_candlestick() + + :param (list) open: opening values + :param (list) high: high values + :param (list) low: low values + :param (list) close: closing values + :param (list) dates: list of datetime objects. Default: None + :param kwargs: kwargs to be passed to increasing trace via + plotly.graph_objs.Scatter. + + :rtype (trace) ohlc_incr_data: Scatter trace of all increasing ohlc + sticks. + """ + (flat_increase_x, flat_increase_y, text_increase) = _OHLC( + open, high, low, close, dates + ).get_increase() + + if "name" in kwargs: + showlegend = True + else: + kwargs.setdefault("name", "Increasing") + showlegend = False + + kwargs.setdefault("line", dict(color=_DEFAULT_INCREASING_COLOR, width=1)) + kwargs.setdefault("text", text_increase) + + ohlc_incr = dict( + type="scatter", + x=flat_increase_x, + y=flat_increase_y, + mode="lines", + showlegend=showlegend, + **kwargs, + ) + return ohlc_incr + + +def make_decreasing_ohlc(open, high, low, close, dates, **kwargs): + """ + Makes decreasing ohlc sticks + + :param (list) open: opening values + :param (list) high: high values + :param (list) low: low values + :param (list) close: closing values + :param (list) dates: list of datetime objects. Default: None + :param kwargs: kwargs to be passed to increasing trace via + plotly.graph_objs.Scatter. + + :rtype (trace) ohlc_decr_data: Scatter trace of all decreasing ohlc + sticks. + """ + (flat_decrease_x, flat_decrease_y, text_decrease) = _OHLC( + open, high, low, close, dates + ).get_decrease() + + kwargs.setdefault("line", dict(color=_DEFAULT_DECREASING_COLOR, width=1)) + kwargs.setdefault("text", text_decrease) + kwargs.setdefault("showlegend", False) + kwargs.setdefault("name", "Decreasing") + + ohlc_decr = dict( + type="scatter", x=flat_decrease_x, y=flat_decrease_y, mode="lines", **kwargs + ) + return ohlc_decr + + +def create_ohlc(open, high, low, close, dates=None, direction="both", **kwargs): + """ + **deprecated**, use instead the plotly.graph_objects trace + :class:`plotly.graph_objects.Ohlc` + + :param (list) open: opening values + :param (list) high: high values + :param (list) low: low values + :param (list) close: closing + :param (list) dates: list of datetime objects. Default: None + :param (string) direction: direction can be 'increasing', 'decreasing', + or 'both'. When the direction is 'increasing', the returned figure + consists of all units where the close value is greater than the + corresponding open value, and when the direction is 'decreasing', + the returned figure consists of all units where the close value is + less than or equal to the corresponding open value. When the + direction is 'both', both increasing and decreasing units are + returned. Default: 'both' + :param kwargs: kwargs passed through plotly.graph_objs.Scatter. + These kwargs describe other attributes about the ohlc Scatter trace + such as the color or the legend name. For more information on valid + kwargs call help(plotly.graph_objs.Scatter) + + :rtype (dict): returns a representation of an ohlc chart figure. + + Example 1: Simple OHLC chart from a Pandas DataFrame + + >>> from plotly.figure_factory import create_ohlc + >>> from datetime import datetime + + >>> import pandas as pd + >>> df = pd.read_csv('https://raw.githubusercontent.com/plotly/datasets/master/finance-charts-apple.csv') + >>> fig = create_ohlc(df['AAPL.Open'], df['AAPL.High'], df['AAPL.Low'], df['AAPL.Close'], dates=df.index) + >>> fig.show() + """ + if dates is not None: + utils.validate_equal_length(open, high, low, close, dates) + else: + utils.validate_equal_length(open, high, low, close) + validate_ohlc(open, high, low, close, direction, **kwargs) + + if direction == "increasing": + ohlc_incr = make_increasing_ohlc(open, high, low, close, dates, **kwargs) + data = [ohlc_incr] + elif direction == "decreasing": + ohlc_decr = make_decreasing_ohlc(open, high, low, close, dates, **kwargs) + data = [ohlc_decr] + else: + ohlc_incr = make_increasing_ohlc(open, high, low, close, dates, **kwargs) + ohlc_decr = make_decreasing_ohlc(open, high, low, close, dates, **kwargs) + data = [ohlc_incr, ohlc_decr] + + layout = graph_objs.Layout(xaxis=dict(zeroline=False), hovermode="closest") + + return graph_objs.Figure(data=data, layout=layout) + + +class _OHLC(object): + """ + Refer to FigureFactory.create_ohlc_increase() for docstring. + """ + + def __init__(self, open, high, low, close, dates, **kwargs): + self.open = open + self.high = high + self.low = low + self.close = close + self.empty = [None] * len(open) + self.dates = dates + + self.all_x = [] + self.all_y = [] + self.increase_x = [] + self.increase_y = [] + self.decrease_x = [] + self.decrease_y = [] + self.get_all_xy() + self.separate_increase_decrease() + + def get_all_xy(self): + """ + Zip data to create OHLC shape + + OHLC shape: low to high vertical bar with + horizontal branches for open and close values. + If dates were added, the smallest date difference is calculated and + multiplied by .2 to get the length of the open and close branches. + If no date data was provided, the x-axis is a list of integers and the + length of the open and close branches is .2. + """ + self.all_y = list( + zip( + self.open, + self.open, + self.high, + self.low, + self.close, + self.close, + self.empty, + ) + ) + if self.dates is not None: + date_dif = [] + for i in range(len(self.dates) - 1): + date_dif.append(self.dates[i + 1] - self.dates[i]) + date_dif_min = (min(date_dif)) / 5 + self.all_x = [ + [x - date_dif_min, x, x, x, x, x + date_dif_min, None] + for x in self.dates + ] + else: + self.all_x = [ + [x - 0.2, x, x, x, x, x + 0.2, None] for x in range(len(self.open)) + ] + + def separate_increase_decrease(self): + """ + Separate data into two groups: increase and decrease + + (1) Increase, where close > open and + (2) Decrease, where close <= open + """ + for index in range(len(self.open)): + if self.close[index] is None: + pass + elif self.close[index] > self.open[index]: + self.increase_x.append(self.all_x[index]) + self.increase_y.append(self.all_y[index]) + else: + self.decrease_x.append(self.all_x[index]) + self.decrease_y.append(self.all_y[index]) + + def get_increase(self): + """ + Flatten increase data and get increase text + + :rtype (list, list, list): flat_increase_x: x-values for the increasing + trace, flat_increase_y: y=values for the increasing trace and + text_increase: hovertext for the increasing trace + """ + flat_increase_x = utils.flatten(self.increase_x) + flat_increase_y = utils.flatten(self.increase_y) + text_increase = ("Open", "Open", "High", "Low", "Close", "Close", "") * ( + len(self.increase_x) + ) + + return flat_increase_x, flat_increase_y, text_increase + + def get_decrease(self): + """ + Flatten decrease data and get decrease text + + :rtype (list, list, list): flat_decrease_x: x-values for the decreasing + trace, flat_decrease_y: y=values for the decreasing trace and + text_decrease: hovertext for the decreasing trace + """ + flat_decrease_x = utils.flatten(self.decrease_x) + flat_decrease_y = utils.flatten(self.decrease_y) + text_decrease = ("Open", "Open", "High", "Low", "Close", "Close", "") * ( + len(self.decrease_x) + ) + + return flat_decrease_x, flat_decrease_y, text_decrease diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/figure_factory/_quiver.py b/.venv_haddock/lib/python3.12/site-packages/plotly/figure_factory/_quiver.py new file mode 100644 index 0000000000000000000000000000000000000000..fa182222881bb363f0622f4fe3c890709da19325 --- /dev/null +++ b/.venv_haddock/lib/python3.12/site-packages/plotly/figure_factory/_quiver.py @@ -0,0 +1,265 @@ +import math + +from plotly import exceptions +from plotly.graph_objs import graph_objs +from plotly.figure_factory import utils + + +def create_quiver( + x, y, u, v, scale=0.1, arrow_scale=0.3, angle=math.pi / 9, scaleratio=None, **kwargs +): + """ + Returns data for a quiver plot. + + :param (list|ndarray) x: x coordinates of the arrow locations + :param (list|ndarray) y: y coordinates of the arrow locations + :param (list|ndarray) u: x components of the arrow vectors + :param (list|ndarray) v: y components of the arrow vectors + :param (float in [0,1]) scale: scales size of the arrows(ideally to + avoid overlap). Default = .1 + :param (float in [0,1]) arrow_scale: value multiplied to length of barb + to get length of arrowhead. Default = .3 + :param (angle in radians) angle: angle of arrowhead. Default = pi/9 + :param (positive float) scaleratio: the ratio between the scale of the y-axis + and the scale of the x-axis (scale_y / scale_x). Default = None, the + scale ratio is not fixed. + :param kwargs: kwargs passed through plotly.graph_objs.Scatter + for more information on valid kwargs call + help(plotly.graph_objs.Scatter) + + :rtype (dict): returns a representation of quiver figure. + + Example 1: Trivial Quiver + + >>> from plotly.figure_factory import create_quiver + >>> import math + + >>> # 1 Arrow from (0,0) to (1,1) + >>> fig = create_quiver(x=[0], y=[0], u=[1], v=[1], scale=1) + >>> fig.show() + + + Example 2: Quiver plot using meshgrid + + >>> from plotly.figure_factory import create_quiver + + >>> import numpy as np + >>> import math + + >>> # Add data + >>> x,y = np.meshgrid(np.arange(0, 2, .2), np.arange(0, 2, .2)) + >>> u = np.cos(x)*y + >>> v = np.sin(x)*y + + >>> #Create quiver + >>> fig = create_quiver(x, y, u, v) + >>> fig.show() + + + Example 3: Styling the quiver plot + + >>> from plotly.figure_factory import create_quiver + >>> import numpy as np + >>> import math + + >>> # Add data + >>> x, y = np.meshgrid(np.arange(-np.pi, math.pi, .5), + ... np.arange(-math.pi, math.pi, .5)) + >>> u = np.cos(x)*y + >>> v = np.sin(x)*y + + >>> # Create quiver + >>> fig = create_quiver(x, y, u, v, scale=.2, arrow_scale=.3, angle=math.pi/6, + ... name='Wind Velocity', line=dict(width=1)) + + >>> # Add title to layout + >>> fig.update_layout(title='Quiver Plot') # doctest: +SKIP + >>> fig.show() + + + Example 4: Forcing a fix scale ratio to maintain the arrow length + + >>> from plotly.figure_factory import create_quiver + >>> import numpy as np + + >>> # Add data + >>> x,y = np.meshgrid(np.arange(0.5, 3.5, .5), np.arange(0.5, 4.5, .5)) + >>> u = x + >>> v = y + >>> angle = np.arctan(v / u) + >>> norm = 0.25 + >>> u = norm * np.cos(angle) + >>> v = norm * np.sin(angle) + + >>> # Create quiver with a fix scale ratio + >>> fig = create_quiver(x, y, u, v, scale = 1, scaleratio = 0.5) + >>> fig.show() + """ + utils.validate_equal_length(x, y, u, v) + utils.validate_positive_scalars(arrow_scale=arrow_scale, scale=scale) + + if scaleratio is None: + quiver_obj = _Quiver(x, y, u, v, scale, arrow_scale, angle) + else: + quiver_obj = _Quiver(x, y, u, v, scale, arrow_scale, angle, scaleratio) + + barb_x, barb_y = quiver_obj.get_barbs() + arrow_x, arrow_y = quiver_obj.get_quiver_arrows() + + quiver_plot = graph_objs.Scatter( + x=barb_x + arrow_x, y=barb_y + arrow_y, mode="lines", **kwargs + ) + + data = [quiver_plot] + + if scaleratio is None: + layout = graph_objs.Layout(hovermode="closest") + else: + layout = graph_objs.Layout( + hovermode="closest", yaxis=dict(scaleratio=scaleratio, scaleanchor="x") + ) + + return graph_objs.Figure(data=data, layout=layout) + + +class _Quiver(object): + """ + Refer to FigureFactory.create_quiver() for docstring + """ + + def __init__(self, x, y, u, v, scale, arrow_scale, angle, scaleratio=1, **kwargs): + try: + x = utils.flatten(x) + except exceptions.PlotlyError: + pass + + try: + y = utils.flatten(y) + except exceptions.PlotlyError: + pass + + try: + u = utils.flatten(u) + except exceptions.PlotlyError: + pass + + try: + v = utils.flatten(v) + except exceptions.PlotlyError: + pass + + self.x = x + self.y = y + self.u = u + self.v = v + self.scale = scale + self.scaleratio = scaleratio + self.arrow_scale = arrow_scale + self.angle = angle + self.end_x = [] + self.end_y = [] + self.scale_uv() + barb_x, barb_y = self.get_barbs() + arrow_x, arrow_y = self.get_quiver_arrows() + + def scale_uv(self): + """ + Scales u and v to avoid overlap of the arrows. + + u and v are added to x and y to get the + endpoints of the arrows so a smaller scale value will + result in less overlap of arrows. + """ + self.u = [i * self.scale * self.scaleratio for i in self.u] + self.v = [i * self.scale for i in self.v] + + def get_barbs(self): + """ + Creates x and y startpoint and endpoint pairs + + After finding the endpoint of each barb this zips startpoint and + endpoint pairs to create 2 lists: x_values for barbs and y values + for barbs + + :rtype: (list, list) barb_x, barb_y: list of startpoint and endpoint + x_value pairs separated by a None to create the barb of the arrow, + and list of startpoint and endpoint y_value pairs separated by a + None to create the barb of the arrow. + """ + self.end_x = [i + j for i, j in zip(self.x, self.u)] + self.end_y = [i + j for i, j in zip(self.y, self.v)] + empty = [None] * len(self.x) + barb_x = utils.flatten(zip(self.x, self.end_x, empty)) + barb_y = utils.flatten(zip(self.y, self.end_y, empty)) + return barb_x, barb_y + + def get_quiver_arrows(self): + """ + Creates lists of x and y values to plot the arrows + + Gets length of each barb then calculates the length of each side of + the arrow. Gets angle of barb and applies angle to each side of the + arrowhead. Next uses arrow_scale to scale the length of arrowhead and + creates x and y values for arrowhead point1 and point2. Finally x and y + values for point1, endpoint and point2s for each arrowhead are + separated by a None and zipped to create lists of x and y values for + the arrows. + + :rtype: (list, list) arrow_x, arrow_y: list of point1, endpoint, point2 + x_values separated by a None to create the arrowhead and list of + point1, endpoint, point2 y_values separated by a None to create + the barb of the arrow. + """ + dif_x = [i - j for i, j in zip(self.end_x, self.x)] + dif_y = [i - j for i, j in zip(self.end_y, self.y)] + + # Get barb lengths(default arrow length = 30% barb length) + barb_len = [None] * len(self.x) + for index in range(len(barb_len)): + barb_len[index] = math.hypot(dif_x[index] / self.scaleratio, dif_y[index]) + + # Make arrow lengths + arrow_len = [None] * len(self.x) + arrow_len = [i * self.arrow_scale for i in barb_len] + + # Get barb angles + barb_ang = [None] * len(self.x) + for index in range(len(barb_ang)): + barb_ang[index] = math.atan2(dif_y[index], dif_x[index] / self.scaleratio) + + # Set angles to create arrow + ang1 = [i + self.angle for i in barb_ang] + ang2 = [i - self.angle for i in barb_ang] + + cos_ang1 = [None] * len(ang1) + for index in range(len(ang1)): + cos_ang1[index] = math.cos(ang1[index]) + seg1_x = [i * j for i, j in zip(arrow_len, cos_ang1)] + + sin_ang1 = [None] * len(ang1) + for index in range(len(ang1)): + sin_ang1[index] = math.sin(ang1[index]) + seg1_y = [i * j for i, j in zip(arrow_len, sin_ang1)] + + cos_ang2 = [None] * len(ang2) + for index in range(len(ang2)): + cos_ang2[index] = math.cos(ang2[index]) + seg2_x = [i * j for i, j in zip(arrow_len, cos_ang2)] + + sin_ang2 = [None] * len(ang2) + for index in range(len(ang2)): + sin_ang2[index] = math.sin(ang2[index]) + seg2_y = [i * j for i, j in zip(arrow_len, sin_ang2)] + + # Set coordinates to create arrow + for index in range(len(self.end_x)): + point1_x = [i - j * self.scaleratio for i, j in zip(self.end_x, seg1_x)] + point1_y = [i - j for i, j in zip(self.end_y, seg1_y)] + point2_x = [i - j * self.scaleratio for i, j in zip(self.end_x, seg2_x)] + point2_y = [i - j for i, j in zip(self.end_y, seg2_y)] + + # Combine lists to create arrow + empty = [None] * len(self.end_x) + arrow_x = utils.flatten(zip(point1_x, self.end_x, point2_x, empty)) + arrow_y = utils.flatten(zip(point1_y, self.end_y, point2_y, empty)) + return arrow_x, arrow_y diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/figure_factory/_scatterplot.py b/.venv_haddock/lib/python3.12/site-packages/plotly/figure_factory/_scatterplot.py new file mode 100644 index 0000000000000000000000000000000000000000..758952726150a37ecb194809a9c33415dd22697d --- /dev/null +++ b/.venv_haddock/lib/python3.12/site-packages/plotly/figure_factory/_scatterplot.py @@ -0,0 +1,1135 @@ +from plotly import exceptions, optional_imports +import plotly.colors as clrs +from plotly.figure_factory import utils +from plotly.graph_objs import graph_objs +from plotly.subplots import make_subplots + +pd = optional_imports.get_module("pandas") + +DIAG_CHOICES = ["scatter", "histogram", "box"] +VALID_COLORMAP_TYPES = ["cat", "seq"] + + +def endpts_to_intervals(endpts): + """ + Returns a list of intervals for categorical colormaps + + Accepts a list or tuple of sequentially increasing numbers and returns + a list representation of the mathematical intervals with these numbers + as endpoints. For example, [1, 6] returns [[-inf, 1], [1, 6], [6, inf]] + + :raises: (PlotlyError) If input is not a list or tuple + :raises: (PlotlyError) If the input contains a string + :raises: (PlotlyError) If any number does not increase after the + previous one in the sequence + """ + length = len(endpts) + # Check if endpts is a list or tuple + if not (isinstance(endpts, (tuple)) or isinstance(endpts, (list))): + raise exceptions.PlotlyError( + "The intervals_endpts argument must " + "be a list or tuple of a sequence " + "of increasing numbers." + ) + # Check if endpts contains only numbers + for item in endpts: + if isinstance(item, str): + raise exceptions.PlotlyError( + "The intervals_endpts argument " + "must be a list or tuple of a " + "sequence of increasing " + "numbers." + ) + # Check if numbers in endpts are increasing + for k in range(length - 1): + if endpts[k] >= endpts[k + 1]: + raise exceptions.PlotlyError( + "The intervals_endpts argument " + "must be a list or tuple of a " + "sequence of increasing " + "numbers." + ) + else: + intervals = [] + # add -inf to intervals + intervals.append([float("-inf"), endpts[0]]) + for k in range(length - 1): + interval = [] + interval.append(endpts[k]) + interval.append(endpts[k + 1]) + intervals.append(interval) + # add +inf to intervals + intervals.append([endpts[length - 1], float("inf")]) + return intervals + + +def hide_tick_labels_from_box_subplots(fig): + """ + Hides tick labels for box plots in scatterplotmatrix subplots. + """ + boxplot_xaxes = [] + for trace in fig["data"]: + if trace["type"] == "box": + # stores the xaxes which correspond to boxplot subplots + # since we use xaxis1, xaxis2, etc, in plotly.py + boxplot_xaxes.append("xaxis{}".format(trace["xaxis"][1:])) + for xaxis in boxplot_xaxes: + fig["layout"][xaxis]["showticklabels"] = False + + +def validate_scatterplotmatrix(df, index, diag, colormap_type, **kwargs): + """ + Validates basic inputs for FigureFactory.create_scatterplotmatrix() + + :raises: (PlotlyError) If pandas is not imported + :raises: (PlotlyError) If pandas dataframe is not inputted + :raises: (PlotlyError) If pandas dataframe has <= 1 columns + :raises: (PlotlyError) If diagonal plot choice (diag) is not one of + the viable options + :raises: (PlotlyError) If colormap_type is not a valid choice + :raises: (PlotlyError) If kwargs contains 'size', 'color' or + 'colorscale' + """ + if not pd: + raise ImportError( + "FigureFactory.scatterplotmatrix requires a pandas DataFrame." + ) + + # Check if pandas dataframe + if not isinstance(df, pd.core.frame.DataFrame): + raise exceptions.PlotlyError( + "Dataframe not inputed. Please " + "use a pandas dataframe to pro" + "duce a scatterplot matrix." + ) + + # Check if dataframe is 1 column or less + if len(df.columns) <= 1: + raise exceptions.PlotlyError( + "Dataframe has only one column. To " + "use the scatterplot matrix, use at " + "least 2 columns." + ) + + # Check that diag parameter is a valid selection + if diag not in DIAG_CHOICES: + raise exceptions.PlotlyError( + "Make sure diag is set to one of {}".format(DIAG_CHOICES) + ) + + # Check that colormap_types is a valid selection + if colormap_type not in VALID_COLORMAP_TYPES: + raise exceptions.PlotlyError( + "Must choose a valid colormap type. " + "Either 'cat' or 'seq' for a cate" + "gorical and sequential colormap " + "respectively." + ) + + # Check for not 'size' or 'color' in 'marker' of **kwargs + if "marker" in kwargs: + FORBIDDEN_PARAMS = ["size", "color", "colorscale"] + if any(param in kwargs["marker"] for param in FORBIDDEN_PARAMS): + raise exceptions.PlotlyError( + "Your kwargs dictionary cannot " + "include the 'size', 'color' or " + "'colorscale' key words inside " + "the marker dict since 'size' is " + "already an argument of the " + "scatterplot matrix function and " + "both 'color' and 'colorscale " + "are set internally." + ) + + +def scatterplot(dataframe, headers, diag, size, height, width, title, **kwargs): + """ + Refer to FigureFactory.create_scatterplotmatrix() for docstring + + Returns fig for scatterplotmatrix without index + + """ + dim = len(dataframe) + fig = make_subplots(rows=dim, cols=dim, print_grid=False) + trace_list = [] + # Insert traces into trace_list + for listy in dataframe: + for listx in dataframe: + if (listx == listy) and (diag == "histogram"): + trace = graph_objs.Histogram(x=listx, showlegend=False) + elif (listx == listy) and (diag == "box"): + trace = graph_objs.Box(y=listx, name=None, showlegend=False) + else: + if "marker" in kwargs: + kwargs["marker"]["size"] = size + trace = graph_objs.Scatter( + x=listx, y=listy, mode="markers", showlegend=False, **kwargs + ) + trace_list.append(trace) + else: + trace = graph_objs.Scatter( + x=listx, + y=listy, + mode="markers", + marker=dict(size=size), + showlegend=False, + **kwargs, + ) + trace_list.append(trace) + + trace_index = 0 + indices = range(1, dim + 1) + for y_index in indices: + for x_index in indices: + fig.append_trace(trace_list[trace_index], y_index, x_index) + trace_index += 1 + + # Insert headers into the figure + for j in range(dim): + xaxis_key = "xaxis{}".format((dim * dim) - dim + 1 + j) + fig["layout"][xaxis_key].update(title=headers[j]) + for j in range(dim): + yaxis_key = "yaxis{}".format(1 + (dim * j)) + fig["layout"][yaxis_key].update(title=headers[j]) + + fig["layout"].update(height=height, width=width, title=title, showlegend=True) + + hide_tick_labels_from_box_subplots(fig) + + return fig + + +def scatterplot_dict( + dataframe, + headers, + diag, + size, + height, + width, + title, + index, + index_vals, + endpts, + colormap, + colormap_type, + **kwargs, +): + """ + Refer to FigureFactory.create_scatterplotmatrix() for docstring + + Returns fig for scatterplotmatrix with both index and colormap picked. + Used if colormap is a dictionary with index values as keys pointing to + colors. Forces colormap_type to behave categorically because it would + not make sense colors are assigned to each index value and thus + implies that a categorical approach should be taken + + """ + + theme = colormap + dim = len(dataframe) + fig = make_subplots(rows=dim, cols=dim, print_grid=False) + trace_list = [] + legend_param = 0 + # Work over all permutations of list pairs + for listy in dataframe: + for listx in dataframe: + # create a dictionary for index_vals + unique_index_vals = {} + for name in index_vals: + if name not in unique_index_vals: + unique_index_vals[name] = [] + + # Fill all the rest of the names into the dictionary + for name in sorted(unique_index_vals.keys()): + new_listx = [] + new_listy = [] + for j in range(len(index_vals)): + if index_vals[j] == name: + new_listx.append(listx[j]) + new_listy.append(listy[j]) + # Generate trace with VISIBLE icon + if legend_param == 1: + if (listx == listy) and (diag == "histogram"): + trace = graph_objs.Histogram( + x=new_listx, marker=dict(color=theme[name]), showlegend=True + ) + elif (listx == listy) and (diag == "box"): + trace = graph_objs.Box( + y=new_listx, + name=None, + marker=dict(color=theme[name]), + showlegend=True, + ) + else: + if "marker" in kwargs: + kwargs["marker"]["size"] = size + kwargs["marker"]["color"] = theme[name] + trace = graph_objs.Scatter( + x=new_listx, + y=new_listy, + mode="markers", + name=name, + showlegend=True, + **kwargs, + ) + else: + trace = graph_objs.Scatter( + x=new_listx, + y=new_listy, + mode="markers", + name=name, + marker=dict(size=size, color=theme[name]), + showlegend=True, + **kwargs, + ) + # Generate trace with INVISIBLE icon + else: + if (listx == listy) and (diag == "histogram"): + trace = graph_objs.Histogram( + x=new_listx, + marker=dict(color=theme[name]), + showlegend=False, + ) + elif (listx == listy) and (diag == "box"): + trace = graph_objs.Box( + y=new_listx, + name=None, + marker=dict(color=theme[name]), + showlegend=False, + ) + else: + if "marker" in kwargs: + kwargs["marker"]["size"] = size + kwargs["marker"]["color"] = theme[name] + trace = graph_objs.Scatter( + x=new_listx, + y=new_listy, + mode="markers", + name=name, + showlegend=False, + **kwargs, + ) + else: + trace = graph_objs.Scatter( + x=new_listx, + y=new_listy, + mode="markers", + name=name, + marker=dict(size=size, color=theme[name]), + showlegend=False, + **kwargs, + ) + # Push the trace into dictionary + unique_index_vals[name] = trace + trace_list.append(unique_index_vals) + legend_param += 1 + + trace_index = 0 + indices = range(1, dim + 1) + for y_index in indices: + for x_index in indices: + for name in sorted(trace_list[trace_index].keys()): + fig.append_trace(trace_list[trace_index][name], y_index, x_index) + trace_index += 1 + + # Insert headers into the figure + for j in range(dim): + xaxis_key = "xaxis{}".format((dim * dim) - dim + 1 + j) + fig["layout"][xaxis_key].update(title=headers[j]) + + for j in range(dim): + yaxis_key = "yaxis{}".format(1 + (dim * j)) + fig["layout"][yaxis_key].update(title=headers[j]) + + hide_tick_labels_from_box_subplots(fig) + + if diag == "histogram": + fig["layout"].update( + height=height, width=width, title=title, showlegend=True, barmode="stack" + ) + return fig + + else: + fig["layout"].update(height=height, width=width, title=title, showlegend=True) + return fig + + +def scatterplot_theme( + dataframe, + headers, + diag, + size, + height, + width, + title, + index, + index_vals, + endpts, + colormap, + colormap_type, + **kwargs, +): + """ + Refer to FigureFactory.create_scatterplotmatrix() for docstring + + Returns fig for scatterplotmatrix with both index and colormap picked + + """ + + # Check if index is made of string values + if isinstance(index_vals[0], str): + unique_index_vals = [] + for name in index_vals: + if name not in unique_index_vals: + unique_index_vals.append(name) + n_colors_len = len(unique_index_vals) + + # Convert colormap to list of n RGB tuples + if colormap_type == "seq": + foo = clrs.color_parser(colormap, clrs.unlabel_rgb) + foo = clrs.n_colors(foo[0], foo[1], n_colors_len) + theme = clrs.color_parser(foo, clrs.label_rgb) + + if colormap_type == "cat": + # leave list of colors the same way + theme = colormap + + dim = len(dataframe) + fig = make_subplots(rows=dim, cols=dim, print_grid=False) + trace_list = [] + legend_param = 0 + # Work over all permutations of list pairs + for listy in dataframe: + for listx in dataframe: + # create a dictionary for index_vals + unique_index_vals = {} + for name in index_vals: + if name not in unique_index_vals: + unique_index_vals[name] = [] + + c_indx = 0 # color index + # Fill all the rest of the names into the dictionary + for name in sorted(unique_index_vals.keys()): + new_listx = [] + new_listy = [] + for j in range(len(index_vals)): + if index_vals[j] == name: + new_listx.append(listx[j]) + new_listy.append(listy[j]) + # Generate trace with VISIBLE icon + if legend_param == 1: + if (listx == listy) and (diag == "histogram"): + trace = graph_objs.Histogram( + x=new_listx, + marker=dict(color=theme[c_indx]), + showlegend=True, + ) + elif (listx == listy) and (diag == "box"): + trace = graph_objs.Box( + y=new_listx, + name=None, + marker=dict(color=theme[c_indx]), + showlegend=True, + ) + else: + if "marker" in kwargs: + kwargs["marker"]["size"] = size + kwargs["marker"]["color"] = theme[c_indx] + trace = graph_objs.Scatter( + x=new_listx, + y=new_listy, + mode="markers", + name=name, + showlegend=True, + **kwargs, + ) + else: + trace = graph_objs.Scatter( + x=new_listx, + y=new_listy, + mode="markers", + name=name, + marker=dict(size=size, color=theme[c_indx]), + showlegend=True, + **kwargs, + ) + # Generate trace with INVISIBLE icon + else: + if (listx == listy) and (diag == "histogram"): + trace = graph_objs.Histogram( + x=new_listx, + marker=dict(color=theme[c_indx]), + showlegend=False, + ) + elif (listx == listy) and (diag == "box"): + trace = graph_objs.Box( + y=new_listx, + name=None, + marker=dict(color=theme[c_indx]), + showlegend=False, + ) + else: + if "marker" in kwargs: + kwargs["marker"]["size"] = size + kwargs["marker"]["color"] = theme[c_indx] + trace = graph_objs.Scatter( + x=new_listx, + y=new_listy, + mode="markers", + name=name, + showlegend=False, + **kwargs, + ) + else: + trace = graph_objs.Scatter( + x=new_listx, + y=new_listy, + mode="markers", + name=name, + marker=dict(size=size, color=theme[c_indx]), + showlegend=False, + **kwargs, + ) + # Push the trace into dictionary + unique_index_vals[name] = trace + if c_indx >= (len(theme) - 1): + c_indx = -1 + c_indx += 1 + trace_list.append(unique_index_vals) + legend_param += 1 + + trace_index = 0 + indices = range(1, dim + 1) + for y_index in indices: + for x_index in indices: + for name in sorted(trace_list[trace_index].keys()): + fig.append_trace(trace_list[trace_index][name], y_index, x_index) + trace_index += 1 + + # Insert headers into the figure + for j in range(dim): + xaxis_key = "xaxis{}".format((dim * dim) - dim + 1 + j) + fig["layout"][xaxis_key].update(title=headers[j]) + + for j in range(dim): + yaxis_key = "yaxis{}".format(1 + (dim * j)) + fig["layout"][yaxis_key].update(title=headers[j]) + + hide_tick_labels_from_box_subplots(fig) + + if diag == "histogram": + fig["layout"].update( + height=height, + width=width, + title=title, + showlegend=True, + barmode="stack", + ) + return fig + + elif diag == "box": + fig["layout"].update( + height=height, width=width, title=title, showlegend=True + ) + return fig + + else: + fig["layout"].update( + height=height, width=width, title=title, showlegend=True + ) + return fig + + else: + if endpts: + intervals = utils.endpts_to_intervals(endpts) + + # Convert colormap to list of n RGB tuples + if colormap_type == "seq": + foo = clrs.color_parser(colormap, clrs.unlabel_rgb) + foo = clrs.n_colors(foo[0], foo[1], len(intervals)) + theme = clrs.color_parser(foo, clrs.label_rgb) + + if colormap_type == "cat": + # leave list of colors the same way + theme = colormap + + dim = len(dataframe) + fig = make_subplots(rows=dim, cols=dim, print_grid=False) + trace_list = [] + legend_param = 0 + # Work over all permutations of list pairs + for listy in dataframe: + for listx in dataframe: + interval_labels = {} + for interval in intervals: + interval_labels[str(interval)] = [] + + c_indx = 0 # color index + # Fill all the rest of the names into the dictionary + for interval in intervals: + new_listx = [] + new_listy = [] + for j in range(len(index_vals)): + if interval[0] < index_vals[j] <= interval[1]: + new_listx.append(listx[j]) + new_listy.append(listy[j]) + # Generate trace with VISIBLE icon + if legend_param == 1: + if (listx == listy) and (diag == "histogram"): + trace = graph_objs.Histogram( + x=new_listx, + marker=dict(color=theme[c_indx]), + showlegend=True, + ) + elif (listx == listy) and (diag == "box"): + trace = graph_objs.Box( + y=new_listx, + name=None, + marker=dict(color=theme[c_indx]), + showlegend=True, + ) + else: + if "marker" in kwargs: + kwargs["marker"]["size"] = size + (kwargs["marker"]["color"]) = theme[c_indx] + trace = graph_objs.Scatter( + x=new_listx, + y=new_listy, + mode="markers", + name=str(interval), + showlegend=True, + **kwargs, + ) + else: + trace = graph_objs.Scatter( + x=new_listx, + y=new_listy, + mode="markers", + name=str(interval), + marker=dict(size=size, color=theme[c_indx]), + showlegend=True, + **kwargs, + ) + # Generate trace with INVISIBLE icon + else: + if (listx == listy) and (diag == "histogram"): + trace = graph_objs.Histogram( + x=new_listx, + marker=dict(color=theme[c_indx]), + showlegend=False, + ) + elif (listx == listy) and (diag == "box"): + trace = graph_objs.Box( + y=new_listx, + name=None, + marker=dict(color=theme[c_indx]), + showlegend=False, + ) + else: + if "marker" in kwargs: + kwargs["marker"]["size"] = size + (kwargs["marker"]["color"]) = theme[c_indx] + trace = graph_objs.Scatter( + x=new_listx, + y=new_listy, + mode="markers", + name=str(interval), + showlegend=False, + **kwargs, + ) + else: + trace = graph_objs.Scatter( + x=new_listx, + y=new_listy, + mode="markers", + name=str(interval), + marker=dict(size=size, color=theme[c_indx]), + showlegend=False, + **kwargs, + ) + # Push the trace into dictionary + interval_labels[str(interval)] = trace + if c_indx >= (len(theme) - 1): + c_indx = -1 + c_indx += 1 + trace_list.append(interval_labels) + legend_param += 1 + + trace_index = 0 + indices = range(1, dim + 1) + for y_index in indices: + for x_index in indices: + for interval in intervals: + fig.append_trace( + trace_list[trace_index][str(interval)], y_index, x_index + ) + trace_index += 1 + + # Insert headers into the figure + for j in range(dim): + xaxis_key = "xaxis{}".format((dim * dim) - dim + 1 + j) + fig["layout"][xaxis_key].update(title=headers[j]) + for j in range(dim): + yaxis_key = "yaxis{}".format(1 + (dim * j)) + fig["layout"][yaxis_key].update(title=headers[j]) + + hide_tick_labels_from_box_subplots(fig) + + if diag == "histogram": + fig["layout"].update( + height=height, + width=width, + title=title, + showlegend=True, + barmode="stack", + ) + return fig + + elif diag == "box": + fig["layout"].update( + height=height, width=width, title=title, showlegend=True + ) + return fig + + else: + fig["layout"].update( + height=height, width=width, title=title, showlegend=True + ) + return fig + + else: + theme = colormap + + # add a copy of rgb color to theme if it contains one color + if len(theme) <= 1: + theme.append(theme[0]) + + color = [] + for incr in range(len(theme)): + color.append([1.0 / (len(theme) - 1) * incr, theme[incr]]) + + dim = len(dataframe) + fig = make_subplots(rows=dim, cols=dim, print_grid=False) + trace_list = [] + legend_param = 0 + # Run through all permutations of list pairs + for listy in dataframe: + for listx in dataframe: + # Generate trace with VISIBLE icon + if legend_param == 1: + if (listx == listy) and (diag == "histogram"): + trace = graph_objs.Histogram( + x=listx, marker=dict(color=theme[0]), showlegend=False + ) + elif (listx == listy) and (diag == "box"): + trace = graph_objs.Box( + y=listx, marker=dict(color=theme[0]), showlegend=False + ) + else: + if "marker" in kwargs: + kwargs["marker"]["size"] = size + kwargs["marker"]["color"] = index_vals + kwargs["marker"]["colorscale"] = color + kwargs["marker"]["showscale"] = True + trace = graph_objs.Scatter( + x=listx, + y=listy, + mode="markers", + showlegend=False, + **kwargs, + ) + else: + trace = graph_objs.Scatter( + x=listx, + y=listy, + mode="markers", + marker=dict( + size=size, + color=index_vals, + colorscale=color, + showscale=True, + ), + showlegend=False, + **kwargs, + ) + # Generate trace with INVISIBLE icon + else: + if (listx == listy) and (diag == "histogram"): + trace = graph_objs.Histogram( + x=listx, marker=dict(color=theme[0]), showlegend=False + ) + elif (listx == listy) and (diag == "box"): + trace = graph_objs.Box( + y=listx, marker=dict(color=theme[0]), showlegend=False + ) + else: + if "marker" in kwargs: + kwargs["marker"]["size"] = size + kwargs["marker"]["color"] = index_vals + kwargs["marker"]["colorscale"] = color + kwargs["marker"]["showscale"] = False + trace = graph_objs.Scatter( + x=listx, + y=listy, + mode="markers", + showlegend=False, + **kwargs, + ) + else: + trace = graph_objs.Scatter( + x=listx, + y=listy, + mode="markers", + marker=dict( + size=size, + color=index_vals, + colorscale=color, + showscale=False, + ), + showlegend=False, + **kwargs, + ) + # Push the trace into list + trace_list.append(trace) + legend_param += 1 + + trace_index = 0 + indices = range(1, dim + 1) + for y_index in indices: + for x_index in indices: + fig.append_trace(trace_list[trace_index], y_index, x_index) + trace_index += 1 + + # Insert headers into the figure + for j in range(dim): + xaxis_key = "xaxis{}".format((dim * dim) - dim + 1 + j) + fig["layout"][xaxis_key].update(title=headers[j]) + for j in range(dim): + yaxis_key = "yaxis{}".format(1 + (dim * j)) + fig["layout"][yaxis_key].update(title=headers[j]) + + hide_tick_labels_from_box_subplots(fig) + + if diag == "histogram": + fig["layout"].update( + height=height, + width=width, + title=title, + showlegend=True, + barmode="stack", + ) + return fig + + elif diag == "box": + fig["layout"].update( + height=height, width=width, title=title, showlegend=True + ) + return fig + + else: + fig["layout"].update( + height=height, width=width, title=title, showlegend=True + ) + return fig + + +def create_scatterplotmatrix( + df, + index=None, + endpts=None, + diag="scatter", + height=500, + width=500, + size=6, + title="Scatterplot Matrix", + colormap=None, + colormap_type="cat", + dataframe=None, + headers=None, + index_vals=None, + **kwargs, +): + """ + Returns data for a scatterplot matrix; + **deprecated**, + use instead the plotly.graph_objects trace + :class:`plotly.graph_objects.Splom`. + + :param (array) df: array of the data with column headers + :param (str) index: name of the index column in data array + :param (list|tuple) endpts: takes an increasing sequece of numbers + that defines intervals on the real line. They are used to group + the entries in an index of numbers into their corresponding + interval and therefore can be treated as categorical data + :param (str) diag: sets the chart type for the main diagonal plots. + The options are 'scatter', 'histogram' and 'box'. + :param (int|float) height: sets the height of the chart + :param (int|float) width: sets the width of the chart + :param (float) size: sets the marker size (in px) + :param (str) title: the title label of the scatterplot matrix + :param (str|tuple|list|dict) colormap: either a plotly scale name, + an rgb or hex color, a color tuple, a list of colors or a + dictionary. An rgb color is of the form 'rgb(x, y, z)' where + x, y and z belong to the interval [0, 255] and a color tuple is a + tuple of the form (a, b, c) where a, b and c belong to [0, 1]. + If colormap is a list, it must contain valid color types as its + members. + If colormap is a dictionary, all the string entries in + the index column must be a key in colormap. In this case, the + colormap_type is forced to 'cat' or categorical + :param (str) colormap_type: determines how colormap is interpreted. + Valid choices are 'seq' (sequential) and 'cat' (categorical). If + 'seq' is selected, only the first two colors in colormap will be + considered (when colormap is a list) and the index values will be + linearly interpolated between those two colors. This option is + forced if all index values are numeric. + If 'cat' is selected, a color from colormap will be assigned to + each category from index, including the intervals if endpts is + being used + :param (dict) **kwargs: a dictionary of scatterplot arguments + The only forbidden parameters are 'size', 'color' and + 'colorscale' in 'marker' + + Example 1: Vanilla Scatterplot Matrix + + >>> from plotly.graph_objs import graph_objs + >>> from plotly.figure_factory import create_scatterplotmatrix + + >>> import numpy as np + >>> import pandas as pd + + >>> # Create dataframe + >>> df = pd.DataFrame(np.random.randn(10, 2), + ... columns=['Column 1', 'Column 2']) + + >>> # Create scatterplot matrix + >>> fig = create_scatterplotmatrix(df) + >>> fig.show() + + + Example 2: Indexing a Column + + >>> from plotly.graph_objs import graph_objs + >>> from plotly.figure_factory import create_scatterplotmatrix + + >>> import numpy as np + >>> import pandas as pd + + >>> # Create dataframe with index + >>> df = pd.DataFrame(np.random.randn(10, 2), + ... columns=['A', 'B']) + + >>> # Add another column of strings to the dataframe + >>> df['Fruit'] = pd.Series(['apple', 'apple', 'grape', 'apple', 'apple', + ... 'grape', 'pear', 'pear', 'apple', 'pear']) + + >>> # Create scatterplot matrix + >>> fig = create_scatterplotmatrix(df, index='Fruit', size=10) + >>> fig.show() + + + Example 3: Styling the Diagonal Subplots + + >>> from plotly.graph_objs import graph_objs + >>> from plotly.figure_factory import create_scatterplotmatrix + + >>> import numpy as np + >>> import pandas as pd + + >>> # Create dataframe with index + >>> df = pd.DataFrame(np.random.randn(10, 4), + ... columns=['A', 'B', 'C', 'D']) + + >>> # Add another column of strings to the dataframe + >>> df['Fruit'] = pd.Series(['apple', 'apple', 'grape', 'apple', 'apple', + ... 'grape', 'pear', 'pear', 'apple', 'pear']) + + >>> # Create scatterplot matrix + >>> fig = create_scatterplotmatrix(df, diag='box', index='Fruit', height=1000, + ... width=1000) + >>> fig.show() + + + Example 4: Use a Theme to Style the Subplots + + >>> from plotly.graph_objs import graph_objs + >>> from plotly.figure_factory import create_scatterplotmatrix + + >>> import numpy as np + >>> import pandas as pd + + >>> # Create dataframe with random data + >>> df = pd.DataFrame(np.random.randn(100, 3), + ... columns=['A', 'B', 'C']) + + >>> # Create scatterplot matrix using a built-in + >>> # Plotly palette scale and indexing column 'A' + >>> fig = create_scatterplotmatrix(df, diag='histogram', index='A', + ... colormap='Blues', height=800, width=800) + >>> fig.show() + + + Example 5: Example 4 with Interval Factoring + + >>> from plotly.graph_objs import graph_objs + >>> from plotly.figure_factory import create_scatterplotmatrix + + >>> import numpy as np + >>> import pandas as pd + + >>> # Create dataframe with random data + >>> df = pd.DataFrame(np.random.randn(100, 3), + ... columns=['A', 'B', 'C']) + + >>> # Create scatterplot matrix using a list of 2 rgb tuples + >>> # and endpoints at -1, 0 and 1 + >>> fig = create_scatterplotmatrix(df, diag='histogram', index='A', + ... colormap=['rgb(140, 255, 50)', + ... 'rgb(170, 60, 115)', '#6c4774', + ... (0.5, 0.1, 0.8)], + ... endpts=[-1, 0, 1], height=800, width=800) + >>> fig.show() + + + Example 6: Using the colormap as a Dictionary + + >>> from plotly.graph_objs import graph_objs + >>> from plotly.figure_factory import create_scatterplotmatrix + + >>> import numpy as np + >>> import pandas as pd + >>> import random + + >>> # Create dataframe with random data + >>> df = pd.DataFrame(np.random.randn(100, 3), + ... columns=['Column A', + ... 'Column B', + ... 'Column C']) + + >>> # Add new color column to dataframe + >>> new_column = [] + >>> strange_colors = ['turquoise', 'limegreen', 'goldenrod'] + + >>> for j in range(100): + ... new_column.append(random.choice(strange_colors)) + >>> df['Colors'] = pd.Series(new_column, index=df.index) + + >>> # Create scatterplot matrix using a dictionary of hex color values + >>> # which correspond to actual color names in 'Colors' column + >>> fig = create_scatterplotmatrix( + ... df, diag='box', index='Colors', + ... colormap= dict( + ... turquoise = '#00F5FF', + ... limegreen = '#32CD32', + ... goldenrod = '#DAA520' + ... ), + ... colormap_type='cat', + ... height=800, width=800 + ... ) + >>> fig.show() + """ + # TODO: protected until #282 + if dataframe is None: + dataframe = [] + if headers is None: + headers = [] + if index_vals is None: + index_vals = [] + + validate_scatterplotmatrix(df, index, diag, colormap_type, **kwargs) + + # Validate colormap + if isinstance(colormap, dict): + colormap = clrs.validate_colors_dict(colormap, "rgb") + elif isinstance(colormap, str) and "rgb" not in colormap and "#" not in colormap: + if colormap not in clrs.PLOTLY_SCALES.keys(): + raise exceptions.PlotlyError( + "If 'colormap' is a string, it must be the name " + "of a Plotly Colorscale. The available colorscale " + "names are {}".format(clrs.PLOTLY_SCALES.keys()) + ) + else: + # TODO change below to allow the correct Plotly colorscale + colormap = clrs.colorscale_to_colors(clrs.PLOTLY_SCALES[colormap]) + # keep only first and last item - fix later + colormap = [colormap[0]] + [colormap[-1]] + colormap = clrs.validate_colors(colormap, "rgb") + else: + colormap = clrs.validate_colors(colormap, "rgb") + + if not index: + for name in df: + headers.append(name) + for name in headers: + dataframe.append(df[name].values.tolist()) + # Check for same data-type in df columns + utils.validate_dataframe(dataframe) + figure = scatterplot( + dataframe, headers, diag, size, height, width, title, **kwargs + ) + return figure + else: + # Validate index selection + if index not in df: + raise exceptions.PlotlyError( + "Make sure you set the index " + "input variable to one of the " + "column names of your " + "dataframe." + ) + index_vals = df[index].values.tolist() + for name in df: + if name != index: + headers.append(name) + for name in headers: + dataframe.append(df[name].values.tolist()) + + # check for same data-type in each df column + utils.validate_dataframe(dataframe) + utils.validate_index(index_vals) + + # check if all colormap keys are in the index + # if colormap is a dictionary + if isinstance(colormap, dict): + for key in colormap: + if not all(index in colormap for index in index_vals): + raise exceptions.PlotlyError( + "If colormap is a " + "dictionary, all the " + "names in the index " + "must be keys." + ) + figure = scatterplot_dict( + dataframe, + headers, + diag, + size, + height, + width, + title, + index, + index_vals, + endpts, + colormap, + colormap_type, + **kwargs, + ) + return figure + + else: + figure = scatterplot_theme( + dataframe, + headers, + diag, + size, + height, + width, + title, + index, + index_vals, + endpts, + colormap, + colormap_type, + **kwargs, + ) + return figure diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/figure_factory/_streamline.py b/.venv_haddock/lib/python3.12/site-packages/plotly/figure_factory/_streamline.py new file mode 100644 index 0000000000000000000000000000000000000000..55b74c3e7b7fd886e2d77b7b28aa77cb0c8fca49 --- /dev/null +++ b/.venv_haddock/lib/python3.12/site-packages/plotly/figure_factory/_streamline.py @@ -0,0 +1,406 @@ +import math + +from plotly import exceptions, optional_imports +from plotly.figure_factory import utils +from plotly.graph_objs import graph_objs + +np = optional_imports.get_module("numpy") + + +def validate_streamline(x, y): + """ + Streamline-specific validations + + Specifically, this checks that x and y are both evenly spaced, + and that the package numpy is available. + + See FigureFactory.create_streamline() for params + + :raises: (ImportError) If numpy is not available. + :raises: (PlotlyError) If x is not evenly spaced. + :raises: (PlotlyError) If y is not evenly spaced. + """ + if np is False: + raise ImportError("FigureFactory.create_streamline requires numpy") + for index in range(len(x) - 1): + if ((x[index + 1] - x[index]) - (x[1] - x[0])) > 0.0001: + raise exceptions.PlotlyError( + "x must be a 1 dimensional, evenly spaced array" + ) + for index in range(len(y) - 1): + if ((y[index + 1] - y[index]) - (y[1] - y[0])) > 0.0001: + raise exceptions.PlotlyError( + "y must be a 1 dimensional, evenly spaced array" + ) + + +def create_streamline( + x, y, u, v, density=1, angle=math.pi / 9, arrow_scale=0.09, **kwargs +): + """ + Returns data for a streamline plot. + + :param (list|ndarray) x: 1 dimensional, evenly spaced list or array + :param (list|ndarray) y: 1 dimensional, evenly spaced list or array + :param (ndarray) u: 2 dimensional array + :param (ndarray) v: 2 dimensional array + :param (float|int) density: controls the density of streamlines in + plot. This is multiplied by 30 to scale similiarly to other + available streamline functions such as matplotlib. + Default = 1 + :param (angle in radians) angle: angle of arrowhead. Default = pi/9 + :param (float in [0,1]) arrow_scale: value to scale length of arrowhead + Default = .09 + :param kwargs: kwargs passed through plotly.graph_objs.Scatter + for more information on valid kwargs call + help(plotly.graph_objs.Scatter) + + :rtype (dict): returns a representation of streamline figure. + + Example 1: Plot simple streamline and increase arrow size + + >>> from plotly.figure_factory import create_streamline + >>> import plotly.graph_objects as go + >>> import numpy as np + >>> import math + + >>> # Add data + >>> x = np.linspace(-3, 3, 100) + >>> y = np.linspace(-3, 3, 100) + >>> Y, X = np.meshgrid(x, y) + >>> u = -1 - X**2 + Y + >>> v = 1 + X - Y**2 + >>> u = u.T # Transpose + >>> v = v.T # Transpose + + >>> # Create streamline + >>> fig = create_streamline(x, y, u, v, arrow_scale=.1) + >>> fig.show() + + Example 2: from nbviewer.ipython.org/github/barbagroup/AeroPython + + >>> from plotly.figure_factory import create_streamline + >>> import numpy as np + >>> import math + + >>> # Add data + >>> N = 50 + >>> x_start, x_end = -2.0, 2.0 + >>> y_start, y_end = -1.0, 1.0 + >>> x = np.linspace(x_start, x_end, N) + >>> y = np.linspace(y_start, y_end, N) + >>> X, Y = np.meshgrid(x, y) + >>> ss = 5.0 + >>> x_s, y_s = -1.0, 0.0 + + >>> # Compute the velocity field on the mesh grid + >>> u_s = ss/(2*np.pi) * (X-x_s)/((X-x_s)**2 + (Y-y_s)**2) + >>> v_s = ss/(2*np.pi) * (Y-y_s)/((X-x_s)**2 + (Y-y_s)**2) + + >>> # Create streamline + >>> fig = create_streamline(x, y, u_s, v_s, density=2, name='streamline') + + >>> # Add source point + >>> point = go.Scatter(x=[x_s], y=[y_s], mode='markers', + ... marker_size=14, name='source point') + + >>> fig.add_trace(point) # doctest: +SKIP + >>> fig.show() + """ + utils.validate_equal_length(x, y) + utils.validate_equal_length(u, v) + validate_streamline(x, y) + utils.validate_positive_scalars(density=density, arrow_scale=arrow_scale) + + streamline_x, streamline_y = _Streamline( + x, y, u, v, density, angle, arrow_scale + ).sum_streamlines() + arrow_x, arrow_y = _Streamline( + x, y, u, v, density, angle, arrow_scale + ).get_streamline_arrows() + + streamline = graph_objs.Scatter( + x=streamline_x + arrow_x, y=streamline_y + arrow_y, mode="lines", **kwargs + ) + + data = [streamline] + layout = graph_objs.Layout(hovermode="closest") + + return graph_objs.Figure(data=data, layout=layout) + + +class _Streamline(object): + """ + Refer to FigureFactory.create_streamline() for docstring + """ + + def __init__(self, x, y, u, v, density, angle, arrow_scale, **kwargs): + self.x = np.array(x) + self.y = np.array(y) + self.u = np.array(u) + self.v = np.array(v) + self.angle = angle + self.arrow_scale = arrow_scale + self.density = int(30 * density) # Scale similarly to other functions + self.delta_x = self.x[1] - self.x[0] + self.delta_y = self.y[1] - self.y[0] + self.val_x = self.x + self.val_y = self.y + + # Set up spacing + self.blank = np.zeros((self.density, self.density)) + self.spacing_x = len(self.x) / float(self.density - 1) + self.spacing_y = len(self.y) / float(self.density - 1) + self.trajectories = [] + + # Rescale speed onto axes-coordinates + self.u = self.u / (self.x[-1] - self.x[0]) + self.v = self.v / (self.y[-1] - self.y[0]) + self.speed = np.sqrt(self.u**2 + self.v**2) + + # Rescale u and v for integrations. + self.u *= len(self.x) + self.v *= len(self.y) + self.st_x = [] + self.st_y = [] + self.get_streamlines() + streamline_x, streamline_y = self.sum_streamlines() + arrows_x, arrows_y = self.get_streamline_arrows() + + def blank_pos(self, xi, yi): + """ + Set up positions for trajectories to be used with rk4 function. + """ + return (int((xi / self.spacing_x) + 0.5), int((yi / self.spacing_y) + 0.5)) + + def value_at(self, a, xi, yi): + """ + Set up for RK4 function, based on Bokeh's streamline code + """ + if isinstance(xi, np.ndarray): + self.x = xi.astype(int) + self.y = yi.astype(int) + else: + self.val_x = int(xi) + self.val_y = int(yi) + a00 = a[self.val_y, self.val_x] + a01 = a[self.val_y, self.val_x + 1] + a10 = a[self.val_y + 1, self.val_x] + a11 = a[self.val_y + 1, self.val_x + 1] + xt = xi - self.val_x + yt = yi - self.val_y + a0 = a00 * (1 - xt) + a01 * xt + a1 = a10 * (1 - xt) + a11 * xt + return a0 * (1 - yt) + a1 * yt + + def rk4_integrate(self, x0, y0): + """ + RK4 forward and back trajectories from the initial conditions. + + Adapted from Bokeh's streamline -uses Runge-Kutta method to fill + x and y trajectories then checks length of traj (s in units of axes) + """ + + def f(xi, yi): + dt_ds = 1.0 / self.value_at(self.speed, xi, yi) + ui = self.value_at(self.u, xi, yi) + vi = self.value_at(self.v, xi, yi) + return ui * dt_ds, vi * dt_ds + + def g(xi, yi): + dt_ds = 1.0 / self.value_at(self.speed, xi, yi) + ui = self.value_at(self.u, xi, yi) + vi = self.value_at(self.v, xi, yi) + return -ui * dt_ds, -vi * dt_ds + + def check(xi, yi): + return (0 <= xi < len(self.x) - 1) and (0 <= yi < len(self.y) - 1) + + xb_changes = [] + yb_changes = [] + + def rk4(x0, y0, f): + ds = 0.01 + stotal = 0 + xi = x0 + yi = y0 + xb, yb = self.blank_pos(xi, yi) + xf_traj = [] + yf_traj = [] + while check(xi, yi): + xf_traj.append(xi) + yf_traj.append(yi) + try: + k1x, k1y = f(xi, yi) + k2x, k2y = f(xi + 0.5 * ds * k1x, yi + 0.5 * ds * k1y) + k3x, k3y = f(xi + 0.5 * ds * k2x, yi + 0.5 * ds * k2y) + k4x, k4y = f(xi + ds * k3x, yi + ds * k3y) + except IndexError: + break + xi += ds * (k1x + 2 * k2x + 2 * k3x + k4x) / 6.0 + yi += ds * (k1y + 2 * k2y + 2 * k3y + k4y) / 6.0 + if not check(xi, yi): + break + stotal += ds + new_xb, new_yb = self.blank_pos(xi, yi) + if new_xb != xb or new_yb != yb: + if self.blank[new_yb, new_xb] == 0: + self.blank[new_yb, new_xb] = 1 + xb_changes.append(new_xb) + yb_changes.append(new_yb) + xb = new_xb + yb = new_yb + else: + break + if stotal > 2: + break + return stotal, xf_traj, yf_traj + + sf, xf_traj, yf_traj = rk4(x0, y0, f) + sb, xb_traj, yb_traj = rk4(x0, y0, g) + stotal = sf + sb + x_traj = xb_traj[::-1] + xf_traj[1:] + y_traj = yb_traj[::-1] + yf_traj[1:] + + if len(x_traj) < 1: + return None + if stotal > 0.2: + initxb, inityb = self.blank_pos(x0, y0) + self.blank[inityb, initxb] = 1 + return x_traj, y_traj + else: + for xb, yb in zip(xb_changes, yb_changes): + self.blank[yb, xb] = 0 + return None + + def traj(self, xb, yb): + """ + Integrate trajectories + + :param (int) xb: results of passing xi through self.blank_pos + :param (int) xy: results of passing yi through self.blank_pos + + Calculate each trajectory based on rk4 integrate method. + """ + + if xb < 0 or xb >= self.density or yb < 0 or yb >= self.density: + return + if self.blank[yb, xb] == 0: + t = self.rk4_integrate(xb * self.spacing_x, yb * self.spacing_y) + if t is not None: + self.trajectories.append(t) + + def get_streamlines(self): + """ + Get streamlines by building trajectory set. + """ + for indent in range(self.density // 2): + for xi in range(self.density - 2 * indent): + self.traj(xi + indent, indent) + self.traj(xi + indent, self.density - 1 - indent) + self.traj(indent, xi + indent) + self.traj(self.density - 1 - indent, xi + indent) + + self.st_x = [ + np.array(t[0]) * self.delta_x + self.x[0] for t in self.trajectories + ] + self.st_y = [ + np.array(t[1]) * self.delta_y + self.y[0] for t in self.trajectories + ] + + for index in range(len(self.st_x)): + self.st_x[index] = self.st_x[index].tolist() + self.st_x[index].append(np.nan) + + for index in range(len(self.st_y)): + self.st_y[index] = self.st_y[index].tolist() + self.st_y[index].append(np.nan) + + def get_streamline_arrows(self): + """ + Makes an arrow for each streamline. + + Gets angle of streamline at 1/3 mark and creates arrow coordinates + based off of user defined angle and arrow_scale. + + :param (array) st_x: x-values for all streamlines + :param (array) st_y: y-values for all streamlines + :param (angle in radians) angle: angle of arrowhead. Default = pi/9 + :param (float in [0,1]) arrow_scale: value to scale length of arrowhead + Default = .09 + :rtype (list, list) arrows_x: x-values to create arrowhead and + arrows_y: y-values to create arrowhead + """ + arrow_end_x = np.empty((len(self.st_x))) + arrow_end_y = np.empty((len(self.st_y))) + arrow_start_x = np.empty((len(self.st_x))) + arrow_start_y = np.empty((len(self.st_y))) + for index in range(len(self.st_x)): + arrow_end_x[index] = self.st_x[index][int(len(self.st_x[index]) / 3)] + arrow_start_x[index] = self.st_x[index][ + (int(len(self.st_x[index]) / 3)) - 1 + ] + arrow_end_y[index] = self.st_y[index][int(len(self.st_y[index]) / 3)] + arrow_start_y[index] = self.st_y[index][ + (int(len(self.st_y[index]) / 3)) - 1 + ] + + dif_x = arrow_end_x - arrow_start_x + dif_y = arrow_end_y - arrow_start_y + + orig_err = np.geterr() + np.seterr(divide="ignore", invalid="ignore") + streamline_ang = np.arctan(dif_y / dif_x) + np.seterr(**orig_err) + + ang1 = streamline_ang + (self.angle) + ang2 = streamline_ang - (self.angle) + + seg1_x = np.cos(ang1) * self.arrow_scale + seg1_y = np.sin(ang1) * self.arrow_scale + seg2_x = np.cos(ang2) * self.arrow_scale + seg2_y = np.sin(ang2) * self.arrow_scale + + point1_x = np.empty((len(dif_x))) + point1_y = np.empty((len(dif_y))) + point2_x = np.empty((len(dif_x))) + point2_y = np.empty((len(dif_y))) + + for index in range(len(dif_x)): + if dif_x[index] >= 0: + point1_x[index] = arrow_end_x[index] - seg1_x[index] + point1_y[index] = arrow_end_y[index] - seg1_y[index] + point2_x[index] = arrow_end_x[index] - seg2_x[index] + point2_y[index] = arrow_end_y[index] - seg2_y[index] + else: + point1_x[index] = arrow_end_x[index] + seg1_x[index] + point1_y[index] = arrow_end_y[index] + seg1_y[index] + point2_x[index] = arrow_end_x[index] + seg2_x[index] + point2_y[index] = arrow_end_y[index] + seg2_y[index] + + space = np.empty((len(point1_x))) + space[:] = np.nan + + # Combine arrays into array + arrows_x = np.array([point1_x, arrow_end_x, point2_x, space]) + arrows_x = arrows_x.flatten("F") + arrows_x = arrows_x.tolist() + + # Combine arrays into array + arrows_y = np.array([point1_y, arrow_end_y, point2_y, space]) + arrows_y = arrows_y.flatten("F") + arrows_y = arrows_y.tolist() + + return arrows_x, arrows_y + + def sum_streamlines(self): + """ + Makes all streamlines readable as a single trace. + + :rtype (list, list): streamline_x: all x values for each streamline + combined into single list and streamline_y: all y values for each + streamline combined into single list + """ + streamline_x = sum(self.st_x, []) + streamline_y = sum(self.st_y, []) + return streamline_x, streamline_y diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/figure_factory/_table.py b/.venv_haddock/lib/python3.12/site-packages/plotly/figure_factory/_table.py new file mode 100644 index 0000000000000000000000000000000000000000..bda731f601e5e17e8861ffdaab41ee6a5cfd1b40 --- /dev/null +++ b/.venv_haddock/lib/python3.12/site-packages/plotly/figure_factory/_table.py @@ -0,0 +1,280 @@ +from plotly import exceptions, optional_imports +from plotly.graph_objs import graph_objs + +pd = optional_imports.get_module("pandas") + + +def validate_table(table_text, font_colors): + """ + Table-specific validations + + Check that font_colors is supplied correctly (1, 3, or len(text) + colors). + + :raises: (PlotlyError) If font_colors is supplied incorretly. + + See FigureFactory.create_table() for params + """ + font_colors_len_options = [1, 3, len(table_text)] + if len(font_colors) not in font_colors_len_options: + raise exceptions.PlotlyError( + "Oops, font_colors should be a list of length 1, 3 or len(text)" + ) + + +def create_table( + table_text, + colorscale=None, + font_colors=None, + index=False, + index_title="", + annotation_offset=0.45, + height_constant=30, + hoverinfo="none", + **kwargs, +): + """ + Function that creates data tables. + + See also the plotly.graph_objects trace + :class:`plotly.graph_objects.Table` + + :param (pandas.Dataframe | list[list]) text: data for table. + :param (str|list[list]) colorscale: Colorscale for table where the + color at value 0 is the header color, .5 is the first table color + and 1 is the second table color. (Set .5 and 1 to avoid the striped + table effect). Default=[[0, '#66b2ff'], [.5, '#d9d9d9'], + [1, '#ffffff']] + :param (list) font_colors: Color for fonts in table. Can be a single + color, three colors, or a color for each row in the table. + Default=['#000000'] (black text for the entire table) + :param (int) height_constant: Constant multiplied by # of rows to + create table height. Default=30. + :param (bool) index: Create (header-colored) index column index from + Pandas dataframe or list[0] for each list in text. Default=False. + :param (string) index_title: Title for index column. Default=''. + :param kwargs: kwargs passed through plotly.graph_objs.Heatmap. + These kwargs describe other attributes about the annotated Heatmap + trace such as the colorscale. For more information on valid kwargs + call help(plotly.graph_objs.Heatmap) + + Example 1: Simple Plotly Table + + >>> from plotly.figure_factory import create_table + + >>> text = [['Country', 'Year', 'Population'], + ... ['US', 2000, 282200000], + ... ['Canada', 2000, 27790000], + ... ['US', 2010, 309000000], + ... ['Canada', 2010, 34000000]] + + >>> table = create_table(text) + >>> table.show() + + Example 2: Table with Custom Coloring + + >>> from plotly.figure_factory import create_table + >>> text = [['Country', 'Year', 'Population'], + ... ['US', 2000, 282200000], + ... ['Canada', 2000, 27790000], + ... ['US', 2010, 309000000], + ... ['Canada', 2010, 34000000]] + >>> table = create_table(text, + ... colorscale=[[0, '#000000'], + ... [.5, '#80beff'], + ... [1, '#cce5ff']], + ... font_colors=['#ffffff', '#000000', + ... '#000000']) + >>> table.show() + + Example 3: Simple Plotly Table with Pandas + + >>> from plotly.figure_factory import create_table + >>> import pandas as pd + >>> df = pd.read_csv('http://www.stat.ubc.ca/~jenny/notOcto/STAT545A/examples/gapminder/data/gapminderDataFiveYear.txt', sep='\t') + >>> df_p = df[0:25] + >>> table_simple = create_table(df_p) + >>> table_simple.show() + + """ + + # Avoiding mutables in the call signature + colorscale = ( + colorscale + if colorscale is not None + else [[0, "#00083e"], [0.5, "#ededee"], [1, "#ffffff"]] + ) + font_colors = ( + font_colors if font_colors is not None else ["#ffffff", "#000000", "#000000"] + ) + + validate_table(table_text, font_colors) + table_matrix = _Table( + table_text, + colorscale, + font_colors, + index, + index_title, + annotation_offset, + **kwargs, + ).get_table_matrix() + annotations = _Table( + table_text, + colorscale, + font_colors, + index, + index_title, + annotation_offset, + **kwargs, + ).make_table_annotations() + + trace = dict( + type="heatmap", + z=table_matrix, + opacity=0.75, + colorscale=colorscale, + showscale=False, + hoverinfo=hoverinfo, + **kwargs, + ) + + data = [trace] + layout = dict( + annotations=annotations, + height=len(table_matrix) * height_constant + 50, + margin=dict(t=0, b=0, r=0, l=0), + yaxis=dict( + autorange="reversed", + zeroline=False, + gridwidth=2, + ticks="", + dtick=1, + tick0=0.5, + showticklabels=False, + ), + xaxis=dict( + zeroline=False, + gridwidth=2, + ticks="", + dtick=1, + tick0=-0.5, + showticklabels=False, + ), + ) + return graph_objs.Figure(data=data, layout=layout) + + +class _Table(object): + """ + Refer to TraceFactory.create_table() for docstring + """ + + def __init__( + self, + table_text, + colorscale, + font_colors, + index, + index_title, + annotation_offset, + **kwargs, + ): + if pd and isinstance(table_text, pd.DataFrame): + headers = table_text.columns.tolist() + table_text_index = table_text.index.tolist() + table_text = table_text.values.tolist() + table_text.insert(0, headers) + if index: + table_text_index.insert(0, index_title) + for i in range(len(table_text)): + table_text[i].insert(0, table_text_index[i]) + self.table_text = table_text + self.colorscale = colorscale + self.font_colors = font_colors + self.index = index + self.annotation_offset = annotation_offset + self.x = range(len(table_text[0])) + self.y = range(len(table_text)) + + def get_table_matrix(self): + """ + Create z matrix to make heatmap with striped table coloring + + :rtype (list[list]) table_matrix: z matrix to make heatmap with striped + table coloring. + """ + header = [0] * len(self.table_text[0]) + odd_row = [0.5] * len(self.table_text[0]) + even_row = [1] * len(self.table_text[0]) + table_matrix = [None] * len(self.table_text) + table_matrix[0] = header + for i in range(1, len(self.table_text), 2): + table_matrix[i] = odd_row + for i in range(2, len(self.table_text), 2): + table_matrix[i] = even_row + if self.index: + for array in table_matrix: + array[0] = 0 + return table_matrix + + def get_table_font_color(self): + """ + Fill font-color array. + + Table text color can vary by row so this extends a single color or + creates an array to set a header color and two alternating colors to + create the striped table pattern. + + :rtype (list[list]) all_font_colors: list of font colors for each row + in table. + """ + if len(self.font_colors) == 1: + all_font_colors = self.font_colors * len(self.table_text) + elif len(self.font_colors) == 3: + all_font_colors = list(range(len(self.table_text))) + all_font_colors[0] = self.font_colors[0] + for i in range(1, len(self.table_text), 2): + all_font_colors[i] = self.font_colors[1] + for i in range(2, len(self.table_text), 2): + all_font_colors[i] = self.font_colors[2] + elif len(self.font_colors) == len(self.table_text): + all_font_colors = self.font_colors + else: + all_font_colors = ["#000000"] * len(self.table_text) + return all_font_colors + + def make_table_annotations(self): + """ + Generate annotations to fill in table text + + :rtype (list) annotations: list of annotations for each cell of the + table. + """ + all_font_colors = _Table.get_table_font_color(self) + annotations = [] + for n, row in enumerate(self.table_text): + for m, val in enumerate(row): + # Bold text in header and index + format_text = ( + "" + str(val) + "" + if n == 0 or self.index and m < 1 + else str(val) + ) + # Match font color of index to font color of header + font_color = ( + self.font_colors[0] if self.index and m == 0 else all_font_colors[n] + ) + annotations.append( + graph_objs.layout.Annotation( + text=format_text, + x=self.x[m] - self.annotation_offset, + y=self.y[n], + xref="x1", + yref="y1", + align="left", + xanchor="left", + font=dict(color=font_color), + showarrow=False, + ) + ) + return annotations diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/figure_factory/_ternary_contour.py b/.venv_haddock/lib/python3.12/site-packages/plotly/figure_factory/_ternary_contour.py new file mode 100644 index 0000000000000000000000000000000000000000..b49463dc752859aaf76f8e7f6ac9d75679893fd0 --- /dev/null +++ b/.venv_haddock/lib/python3.12/site-packages/plotly/figure_factory/_ternary_contour.py @@ -0,0 +1,692 @@ +import plotly.colors as clrs +from plotly.graph_objs import graph_objs as go +from plotly import exceptions +from plotly import optional_imports + +from skimage import measure + +np = optional_imports.get_module("numpy") +scipy_interp = optional_imports.get_module("scipy.interpolate") + +# -------------------------- Layout ------------------------------ + + +def _ternary_layout( + title="Ternary contour plot", width=550, height=525, pole_labels=["a", "b", "c"] +): + """ + Layout of ternary contour plot, to be passed to ``go.FigureWidget`` + object. + + Parameters + ========== + title : str or None + Title of ternary plot + width : int + Figure width. + height : int + Figure height. + pole_labels : str, default ['a', 'b', 'c'] + Names of the three poles of the triangle. + """ + return dict( + title=title, + width=width, + height=height, + ternary=dict( + sum=1, + aaxis=dict( + title=dict(text=pole_labels[0]), min=0.01, linewidth=2, ticks="outside" + ), + baxis=dict( + title=dict(text=pole_labels[1]), min=0.01, linewidth=2, ticks="outside" + ), + caxis=dict( + title=dict(text=pole_labels[2]), min=0.01, linewidth=2, ticks="outside" + ), + ), + showlegend=False, + ) + + +# ------------- Transformations of coordinates ------------------- + + +def _replace_zero_coords(ternary_data, delta=0.0005): + """ + Replaces zero ternary coordinates with delta and normalize the new + triplets (a, b, c). + + Parameters + ---------- + + ternary_data : ndarray of shape (N, 3) + + delta : float + Small float to regularize logarithm. + + Notes + ----- + Implements a method + by J. A. Martin-Fernandez, C. Barcelo-Vidal, V. Pawlowsky-Glahn, + Dealing with zeros and missing values in compositional data sets + using nonparametric imputation, Mathematical Geology 35 (2003), + pp 253-278. + """ + zero_mask = ternary_data == 0 + is_any_coord_zero = np.any(zero_mask, axis=0) + + unity_complement = 1 - delta * is_any_coord_zero + if np.any(unity_complement) < 0: + raise ValueError( + "The provided value of delta led to negative" + "ternary coords.Set a smaller delta" + ) + ternary_data = np.where(zero_mask, delta, unity_complement * ternary_data) + return ternary_data + + +def _ilr_transform(barycentric): + """ + Perform Isometric Log-Ratio on barycentric (compositional) data. + + Parameters + ---------- + barycentric: ndarray of shape (3, N) + Barycentric coordinates. + + References + ---------- + "An algebraic method to compute isometric logratio transformation and + back transformation of compositional data", Jarauta-Bragulat, E., + Buenestado, P.; Hervada-Sala, C., in Proc. of the Annual Conf. of the + Intl Assoc for Math Geology, 2003, pp 31-30. + """ + barycentric = np.asarray(barycentric) + x_0 = np.log(barycentric[0] / barycentric[1]) / np.sqrt(2) + x_1 = ( + 1.0 / np.sqrt(6) * np.log(barycentric[0] * barycentric[1] / barycentric[2] ** 2) + ) + ilr_tdata = np.stack((x_0, x_1)) + return ilr_tdata + + +def _ilr_inverse(x): + """ + Perform inverse Isometric Log-Ratio (ILR) transform to retrieve + barycentric (compositional) data. + + Parameters + ---------- + x : array of shape (2, N) + Coordinates in ILR space. + + References + ---------- + "An algebraic method to compute isometric logratio transformation and + back transformation of compositional data", Jarauta-Bragulat, E., + Buenestado, P.; Hervada-Sala, C., in Proc. of the Annual Conf. of the + Intl Assoc for Math Geology, 2003, pp 31-30. + """ + x = np.array(x) + matrix = np.array([[0.5, 1, 1.0], [-0.5, 1, 1.0], [0.0, 0.0, 1.0]]) + s = np.sqrt(2) / 2 + t = np.sqrt(3 / 2) + Sk = np.einsum("ik, kj -> ij", np.array([[s, t], [-s, t]]), x) + Z = -np.log(1 + np.exp(Sk).sum(axis=0)) + log_barycentric = np.einsum( + "ik, kj -> ij", matrix, np.stack((2 * s * x[0], t * x[1], Z)) + ) + iilr_tdata = np.exp(log_barycentric) + return iilr_tdata + + +def _transform_barycentric_cartesian(): + """ + Returns the transformation matrix from barycentric to Cartesian + coordinates and conversely. + """ + # reference triangle + tri_verts = np.array([[0.5, np.sqrt(3) / 2], [0, 0], [1, 0]]) + M = np.array([tri_verts[:, 0], tri_verts[:, 1], np.ones(3)]) + return M, np.linalg.inv(M) + + +def _prepare_barycentric_coord(b_coords): + """ + Check ternary coordinates and return the right barycentric coordinates. + """ + if not isinstance(b_coords, (list, np.ndarray)): + raise ValueError( + "Data should be either an array of shape (n,m)," + "or a list of n m-lists, m=2 or 3" + ) + b_coords = np.asarray(b_coords) + if b_coords.shape[0] not in (2, 3): + raise ValueError( + "A point should have 2 (a, b) or 3 (a, b, c)barycentric coordinates" + ) + if ( + (len(b_coords) == 3) + and not np.allclose(b_coords.sum(axis=0), 1, rtol=0.01) + and not np.allclose(b_coords.sum(axis=0), 100, rtol=0.01) + ): + msg = "The sum of coordinates should be 1 or 100 for all data points" + raise ValueError(msg) + + if len(b_coords) == 2: + A, B = b_coords + C = 1 - (A + B) + else: + A, B, C = b_coords / b_coords.sum(axis=0) + if np.any(np.stack((A, B, C)) < 0): + raise ValueError("Barycentric coordinates should be positive.") + return np.stack((A, B, C)) + + +def _compute_grid(coordinates, values, interp_mode="ilr"): + """ + Transform data points with Cartesian or ILR mapping, then Compute + interpolation on a regular grid. + + Parameters + ========== + + coordinates : array-like + Barycentric coordinates of data points. + values : 1-d array-like + Data points, field to be represented as contours. + interp_mode : 'ilr' (default) or 'cartesian' + Defines how data are interpolated to compute contours. + """ + if interp_mode == "cartesian": + M, invM = _transform_barycentric_cartesian() + coord_points = np.einsum("ik, kj -> ij", M, coordinates) + elif interp_mode == "ilr": + coordinates = _replace_zero_coords(coordinates) + coord_points = _ilr_transform(coordinates) + else: + raise ValueError("interp_mode should be cartesian or ilr") + xx, yy = coord_points[:2] + x_min, x_max = xx.min(), xx.max() + y_min, y_max = yy.min(), yy.max() + n_interp = max(200, int(np.sqrt(len(values)))) + gr_x = np.linspace(x_min, x_max, n_interp) + gr_y = np.linspace(y_min, y_max, n_interp) + grid_x, grid_y = np.meshgrid(gr_x, gr_y) + # We use cubic interpolation, except outside of the convex hull + # of data points where we use nearest neighbor values. + grid_z = scipy_interp.griddata( + coord_points[:2].T, values, (grid_x, grid_y), method="cubic" + ) + return grid_z, gr_x, gr_y + + +# ----------------------- Contour traces ---------------------- + + +def _polygon_area(x, y): + return 0.5 * np.abs(np.dot(x, np.roll(y, 1)) - np.dot(y, np.roll(x, 1))) + + +def _colors(ncontours, colormap=None): + """ + Return a list of ``ncontours`` colors from the ``colormap`` colorscale. + """ + if colormap in clrs.PLOTLY_SCALES.keys(): + cmap = clrs.PLOTLY_SCALES[colormap] + else: + raise exceptions.PlotlyError( + "Colorscale must be a valid Plotly Colorscale." + "The available colorscale names are {}".format(clrs.PLOTLY_SCALES.keys()) + ) + values = np.linspace(0, 1, ncontours) + vals_cmap = np.array([pair[0] for pair in cmap]) + cols = np.array([pair[1] for pair in cmap]) + inds = np.searchsorted(vals_cmap, values) + if "#" in cols[0]: # for Viridis + cols = [clrs.label_rgb(clrs.hex_to_rgb(col)) for col in cols] + + colors = [cols[0]] + for ind, val in zip(inds[1:], values[1:]): + val1, val2 = vals_cmap[ind - 1], vals_cmap[ind] + interm = (val - val1) / (val2 - val1) + col = clrs.find_intermediate_color( + cols[ind - 1], cols[ind], interm, colortype="rgb" + ) + colors.append(col) + return colors + + +def _is_invalid_contour(x, y): + """ + Utility function for _contour_trace + + Contours with an area of the order as 1 pixel are considered spurious. + """ + too_small = np.all(np.abs(x - x[0]) < 2) and np.all(np.abs(y - y[0]) < 2) + return too_small + + +def _extract_contours(im, values, colors): + """ + Utility function for _contour_trace. + + In ``im`` only one part of the domain has valid values (corresponding + to a subdomain where barycentric coordinates are well defined). When + computing contours, we need to assign values outside of this domain. + We can choose a value either smaller than all the values inside the + valid domain, or larger. This value must be chose with caution so that + no spurious contours are added. For example, if the boundary of the valid + domain has large values and the outer value is set to a small one, all + intermediate contours will be added at the boundary. + + Therefore, we compute the two sets of contours (with an outer value + smaller of larger than all values in the valid domain), and choose + the value resulting in a smaller total number of contours. There might + be a faster way to do this, but it works... + """ + mask_nan = np.isnan(im) + im_min, im_max = ( + im[np.logical_not(mask_nan)].min(), + im[np.logical_not(mask_nan)].max(), + ) + zz_min = np.copy(im) + zz_min[mask_nan] = 2 * im_min + zz_max = np.copy(im) + zz_max[mask_nan] = 2 * im_max + all_contours1, all_values1, all_areas1, all_colors1 = [], [], [], [] + all_contours2, all_values2, all_areas2, all_colors2 = [], [], [], [] + for i, val in enumerate(values): + contour_level1 = measure.find_contours(zz_min, val) + contour_level2 = measure.find_contours(zz_max, val) + all_contours1.extend(contour_level1) + all_contours2.extend(contour_level2) + all_values1.extend([val] * len(contour_level1)) + all_values2.extend([val] * len(contour_level2)) + all_areas1.extend( + [_polygon_area(contour.T[1], contour.T[0]) for contour in contour_level1] + ) + all_areas2.extend( + [_polygon_area(contour.T[1], contour.T[0]) for contour in contour_level2] + ) + all_colors1.extend([colors[i]] * len(contour_level1)) + all_colors2.extend([colors[i]] * len(contour_level2)) + if len(all_contours1) <= len(all_contours2): + return all_contours1, all_values1, all_areas1, all_colors1 + else: + return all_contours2, all_values2, all_areas2, all_colors2 + + +def _add_outer_contour( + all_contours, + all_values, + all_areas, + all_colors, + values, + val_outer, + v_min, + v_max, + colors, + color_min, + color_max, +): + """ + Utility function for _contour_trace + + Adds the background color to fill gaps outside of computed contours. + + To compute the background color, the color of the contour with largest + area (``val_outer``) is used. As background color, we choose the next + color value in the direction of the extrema of the colormap. + + Then we add information for the outer contour for the different lists + provided as arguments. + + A discrete colormap with all used colors is also returned (to be used + by colorscale trace). + """ + # The exact value of outer contour is not used when defining the trace + outer_contour = 20 * np.array([[0, 0, 1], [0, 1, 0.5]]).T + all_contours = [outer_contour] + all_contours + delta_values = np.diff(values)[0] + values = np.concatenate( + ([values[0] - delta_values], values, [values[-1] + delta_values]) + ) + colors = np.concatenate(([color_min], colors, [color_max])) + index = np.nonzero(values == val_outer)[0][0] + if index < len(values) / 2: + index -= 1 + else: + index += 1 + all_colors = [colors[index]] + all_colors + all_values = [values[index]] + all_values + all_areas = [0] + all_areas + used_colors = [color for color in colors if color in all_colors] + # Define discrete colorscale + color_number = len(used_colors) + scale = np.linspace(0, 1, color_number + 1) + discrete_cm = [] + for i, color in enumerate(used_colors): + discrete_cm.append([scale[i], used_colors[i]]) + discrete_cm.append([scale[i + 1], used_colors[i]]) + discrete_cm.append([scale[color_number], used_colors[color_number - 1]]) + + return all_contours, all_values, all_areas, all_colors, discrete_cm + + +def _contour_trace( + x, + y, + z, + ncontours=None, + colorscale="Electric", + linecolor="rgb(150,150,150)", + interp_mode="ilr", + coloring=None, + v_min=0, + v_max=1, +): + """ + Contour trace in Cartesian coordinates. + + Parameters + ========== + + x, y : array-like + Cartesian coordinates + z : array-like + Field to be represented as contours. + ncontours : int or None + Number of contours to display (determined automatically if None). + colorscale : None or str (Plotly colormap) + colorscale of the contours. + linecolor : rgb color + Color used for lines. If ``colorscale`` is not None, line colors are + determined from ``colorscale`` instead. + interp_mode : 'ilr' (default) or 'cartesian' + Defines how data are interpolated to compute contours. If 'irl', + ILR (Isometric Log-Ratio) of compositional data is performed. If + 'cartesian', contours are determined in Cartesian space. + coloring : None or 'lines' + How to display contour. Filled contours if None, lines if ``lines``. + vmin, vmax : float + Bounds of interval of values used for the colorspace + + Notes + ===== + """ + # Prepare colors + # We do not take extrema, for example for one single contour + # the color will be the middle point of the colormap + colors = _colors(ncontours + 2, colorscale) + # Values used for contours, extrema are not used + # For example for a binary array [0, 1], the value of + # the contour for ncontours=1 is 0.5. + values = np.linspace(v_min, v_max, ncontours + 2) + color_min, color_max = colors[0], colors[-1] + colors = colors[1:-1] + values = values[1:-1] + + # Color of line contours + if linecolor is None: + linecolor = "rgb(150, 150, 150)" + else: + colors = [linecolor] * ncontours + + # Retrieve all contours + all_contours, all_values, all_areas, all_colors = _extract_contours( + z, values, colors + ) + + # Now sort contours by decreasing area + order = np.argsort(all_areas)[::-1] + + # Add outer contour + all_contours, all_values, all_areas, all_colors, discrete_cm = _add_outer_contour( + all_contours, + all_values, + all_areas, + all_colors, + values, + all_values[order[0]], + v_min, + v_max, + colors, + color_min, + color_max, + ) + order = np.concatenate(([0], order + 1)) + + # Compute traces, in the order of decreasing area + traces = [] + M, invM = _transform_barycentric_cartesian() + dx = (x.max() - x.min()) / x.size + dy = (y.max() - y.min()) / y.size + for index in order: + y_contour, x_contour = all_contours[index].T + val = all_values[index] + if interp_mode == "cartesian": + bar_coords = np.dot( + invM, + np.stack((dx * x_contour, dy * y_contour, np.ones(x_contour.shape))), + ) + elif interp_mode == "ilr": + bar_coords = _ilr_inverse( + np.stack((dx * x_contour + x.min(), dy * y_contour + y.min())) + ) + if index == 0: # outer triangle + a = np.array([1, 0, 0]) + b = np.array([0, 1, 0]) + c = np.array([0, 0, 1]) + else: + a, b, c = bar_coords + if _is_invalid_contour(x_contour, y_contour): + continue + + _col = all_colors[index] if coloring == "lines" else linecolor + trace = dict( + type="scatterternary", + a=a, + b=b, + c=c, + mode="lines", + line=dict(color=_col, shape="spline", width=1), + fill="toself", + fillcolor=all_colors[index], + showlegend=True, + hoverinfo="skip", + name="%.3f" % val, + ) + if coloring == "lines": + trace["fill"] = None + traces.append(trace) + + return traces, discrete_cm + + +# -------------------- Figure Factory for ternary contour ------------- + + +def create_ternary_contour( + coordinates, + values, + pole_labels=["a", "b", "c"], + width=500, + height=500, + ncontours=None, + showscale=False, + coloring=None, + colorscale="Bluered", + linecolor=None, + title=None, + interp_mode="ilr", + showmarkers=False, +): + """ + Ternary contour plot. + + Parameters + ---------- + + coordinates : list or ndarray + Barycentric coordinates of shape (2, N) or (3, N) where N is the + number of data points. The sum of the 3 coordinates is expected + to be 1 for all data points. + values : array-like + Data points of field to be represented as contours. + pole_labels : str, default ['a', 'b', 'c'] + Names of the three poles of the triangle. + width : int + Figure width. + height : int + Figure height. + ncontours : int or None + Number of contours to display (determined automatically if None). + showscale : bool, default False + If True, a colorbar showing the color scale is displayed. + coloring : None or 'lines' + How to display contour. Filled contours if None, lines if ``lines``. + colorscale : None or str (Plotly colormap) + colorscale of the contours. + linecolor : None or rgb color + Color used for lines. ``colorscale`` has to be set to None, otherwise + line colors are determined from ``colorscale``. + title : str or None + Title of ternary plot + interp_mode : 'ilr' (default) or 'cartesian' + Defines how data are interpolated to compute contours. If 'irl', + ILR (Isometric Log-Ratio) of compositional data is performed. If + 'cartesian', contours are determined in Cartesian space. + showmarkers : bool, default False + If True, markers corresponding to input compositional points are + superimposed on contours, using the same colorscale. + + Examples + ======== + + Example 1: ternary contour plot with filled contours + + >>> import plotly.figure_factory as ff + >>> import numpy as np + >>> # Define coordinates + >>> a, b = np.mgrid[0:1:20j, 0:1:20j] + >>> mask = a + b <= 1 + >>> a = a[mask].ravel() + >>> b = b[mask].ravel() + >>> c = 1 - a - b + >>> # Values to be displayed as contours + >>> z = a * b * c + >>> fig = ff.create_ternary_contour(np.stack((a, b, c)), z) + >>> fig.show() + + It is also possible to give only two barycentric coordinates for each + point, since the sum of the three coordinates is one: + + >>> fig = ff.create_ternary_contour(np.stack((a, b)), z) + + + Example 2: ternary contour plot with line contours + + >>> fig = ff.create_ternary_contour(np.stack((a, b, c)), z, coloring='lines') + + Example 3: customize number of contours + + >>> fig = ff.create_ternary_contour(np.stack((a, b, c)), z, ncontours=8) + + Example 4: superimpose contour plot and original data as markers + + >>> fig = ff.create_ternary_contour(np.stack((a, b, c)), z, coloring='lines', + ... showmarkers=True) + + Example 5: customize title and pole labels + + >>> fig = ff.create_ternary_contour(np.stack((a, b, c)), z, + ... title='Ternary plot', + ... pole_labels=['clay', 'quartz', 'fledspar']) + """ + if scipy_interp is None: + raise ImportError( + """\ + The create_ternary_contour figure factory requires the scipy package""" + ) + sk_measure = optional_imports.get_module("skimage") + if sk_measure is None: + raise ImportError( + """\ + The create_ternary_contour figure factory requires the scikit-image + package""" + ) + if colorscale is None: + showscale = False + if ncontours is None: + ncontours = 5 + coordinates = _prepare_barycentric_coord(coordinates) + v_min, v_max = values.min(), values.max() + grid_z, gr_x, gr_y = _compute_grid(coordinates, values, interp_mode=interp_mode) + + layout = _ternary_layout( + pole_labels=pole_labels, width=width, height=height, title=title + ) + + contour_trace, discrete_cm = _contour_trace( + gr_x, + gr_y, + grid_z, + ncontours=ncontours, + colorscale=colorscale, + linecolor=linecolor, + interp_mode=interp_mode, + coloring=coloring, + v_min=v_min, + v_max=v_max, + ) + + fig = go.Figure(data=contour_trace, layout=layout) + + opacity = 1 if showmarkers else 0 + a, b, c = coordinates + hovertemplate = ( + pole_labels[0] + + ": %{a:.3f}
" + + pole_labels[1] + + ": %{b:.3f}
" + + pole_labels[2] + + ": %{c:.3f}
" + "z: %{marker.color:.3f}" + ) + + fig.add_scatterternary( + a=a, + b=b, + c=c, + mode="markers", + marker={ + "color": values, + "colorscale": colorscale, + "line": {"color": "rgb(120, 120, 120)", "width": int(coloring != "lines")}, + }, + opacity=opacity, + hovertemplate=hovertemplate, + ) + if showscale: + if not showmarkers: + colorscale = discrete_cm + colorbar = dict( + { + "type": "scatterternary", + "a": [None], + "b": [None], + "c": [None], + "marker": { + "cmin": values.min(), + "cmax": values.max(), + "colorscale": colorscale, + "showscale": True, + }, + "mode": "markers", + } + ) + fig.add_trace(colorbar) + + return fig diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/figure_factory/_trisurf.py b/.venv_haddock/lib/python3.12/site-packages/plotly/figure_factory/_trisurf.py new file mode 100644 index 0000000000000000000000000000000000000000..f935292efb7e15613ef297cc95fd2854f59c3125 --- /dev/null +++ b/.venv_haddock/lib/python3.12/site-packages/plotly/figure_factory/_trisurf.py @@ -0,0 +1,509 @@ +from plotly import exceptions, optional_imports +import plotly.colors as clrs +from plotly.graph_objs import graph_objs + +np = optional_imports.get_module("numpy") + + +def map_face2color(face, colormap, scale, vmin, vmax): + """ + Normalize facecolor values by vmin/vmax and return rgb-color strings + + This function takes a tuple color along with a colormap and a minimum + (vmin) and maximum (vmax) range of possible mean distances for the + given parametrized surface. It returns an rgb color based on the mean + distance between vmin and vmax + + """ + if vmin >= vmax: + raise exceptions.PlotlyError( + "Incorrect relation between vmin " + "and vmax. The vmin value cannot be " + "bigger than or equal to the value " + "of vmax." + ) + if len(colormap) == 1: + # color each triangle face with the same color in colormap + face_color = colormap[0] + face_color = clrs.convert_to_RGB_255(face_color) + face_color = clrs.label_rgb(face_color) + return face_color + if face == vmax: + # pick last color in colormap + face_color = colormap[-1] + face_color = clrs.convert_to_RGB_255(face_color) + face_color = clrs.label_rgb(face_color) + return face_color + else: + if scale is None: + # find the normalized distance t of a triangle face between + # vmin and vmax where the distance is between 0 and 1 + t = (face - vmin) / float((vmax - vmin)) + low_color_index = int(t / (1.0 / (len(colormap) - 1))) + + face_color = clrs.find_intermediate_color( + colormap[low_color_index], + colormap[low_color_index + 1], + t * (len(colormap) - 1) - low_color_index, + ) + + face_color = clrs.convert_to_RGB_255(face_color) + face_color = clrs.label_rgb(face_color) + else: + # find the face color for a non-linearly interpolated scale + t = (face - vmin) / float((vmax - vmin)) + + low_color_index = 0 + for k in range(len(scale) - 1): + if scale[k] <= t < scale[k + 1]: + break + low_color_index += 1 + + low_scale_val = scale[low_color_index] + high_scale_val = scale[low_color_index + 1] + + face_color = clrs.find_intermediate_color( + colormap[low_color_index], + colormap[low_color_index + 1], + (t - low_scale_val) / (high_scale_val - low_scale_val), + ) + + face_color = clrs.convert_to_RGB_255(face_color) + face_color = clrs.label_rgb(face_color) + return face_color + + +def trisurf( + x, + y, + z, + simplices, + show_colorbar, + edges_color, + scale, + colormap=None, + color_func=None, + plot_edges=False, + x_edge=None, + y_edge=None, + z_edge=None, + facecolor=None, +): + """ + Refer to FigureFactory.create_trisurf() for docstring + """ + # numpy import check + if not np: + raise ImportError("FigureFactory._trisurf() requires numpy imported.") + points3D = np.vstack((x, y, z)).T + simplices = np.atleast_2d(simplices) + + # vertices of the surface triangles + tri_vertices = points3D[simplices] + + # Define colors for the triangle faces + if color_func is None: + # mean values of z-coordinates of triangle vertices + mean_dists = tri_vertices[:, :, 2].mean(-1) + elif isinstance(color_func, (list, np.ndarray)): + # Pre-computed list / array of values to map onto color + if len(color_func) != len(simplices): + raise ValueError( + "If color_func is a list/array, it must " + "be the same length as simplices." + ) + + # convert all colors in color_func to rgb + for index in range(len(color_func)): + if isinstance(color_func[index], str): + if "#" in color_func[index]: + foo = clrs.hex_to_rgb(color_func[index]) + color_func[index] = clrs.label_rgb(foo) + + if isinstance(color_func[index], tuple): + foo = clrs.convert_to_RGB_255(color_func[index]) + color_func[index] = clrs.label_rgb(foo) + + mean_dists = np.asarray(color_func) + else: + # apply user inputted function to calculate + # custom coloring for triangle vertices + mean_dists = [] + for triangle in tri_vertices: + dists = [] + for vertex in triangle: + dist = color_func(vertex[0], vertex[1], vertex[2]) + dists.append(dist) + mean_dists.append(np.mean(dists)) + mean_dists = np.asarray(mean_dists) + + # Check if facecolors are already strings and can be skipped + if isinstance(mean_dists[0], str): + facecolor = mean_dists + else: + min_mean_dists = np.min(mean_dists) + max_mean_dists = np.max(mean_dists) + + if facecolor is None: + facecolor = [] + for index in range(len(mean_dists)): + color = map_face2color( + mean_dists[index], colormap, scale, min_mean_dists, max_mean_dists + ) + facecolor.append(color) + + # Make sure facecolor is a list so output is consistent across Pythons + facecolor = np.asarray(facecolor) + ii, jj, kk = simplices.T + + triangles = graph_objs.Mesh3d( + x=x, y=y, z=z, facecolor=facecolor, i=ii, j=jj, k=kk, name="" + ) + + mean_dists_are_numbers = not isinstance(mean_dists[0], str) + + if mean_dists_are_numbers and show_colorbar is True: + # make a colorscale from the colors + colorscale = clrs.make_colorscale(colormap, scale) + colorscale = clrs.convert_colorscale_to_rgb(colorscale) + + colorbar = graph_objs.Scatter3d( + x=x[:1], + y=y[:1], + z=z[:1], + mode="markers", + marker=dict( + size=0.1, + color=[min_mean_dists, max_mean_dists], + colorscale=colorscale, + showscale=True, + ), + hoverinfo="none", + showlegend=False, + ) + + # the triangle sides are not plotted + if plot_edges is False: + if mean_dists_are_numbers and show_colorbar is True: + return [triangles, colorbar] + else: + return [triangles] + + # define the lists x_edge, y_edge and z_edge, of x, y, resp z + # coordinates of edge end points for each triangle + # None separates data corresponding to two consecutive triangles + is_none = [ii is None for ii in [x_edge, y_edge, z_edge]] + if any(is_none): + if not all(is_none): + raise ValueError( + "If any (x_edge, y_edge, z_edge) is None, all must be None" + ) + else: + x_edge = [] + y_edge = [] + z_edge = [] + + # Pull indices we care about, then add a None column to separate tris + ixs_triangles = [0, 1, 2, 0] + pull_edges = tri_vertices[:, ixs_triangles, :] + x_edge_pull = np.hstack( + [pull_edges[:, :, 0], np.tile(None, [pull_edges.shape[0], 1])] + ) + y_edge_pull = np.hstack( + [pull_edges[:, :, 1], np.tile(None, [pull_edges.shape[0], 1])] + ) + z_edge_pull = np.hstack( + [pull_edges[:, :, 2], np.tile(None, [pull_edges.shape[0], 1])] + ) + + # Now unravel the edges into a 1-d vector for plotting + x_edge = np.hstack([x_edge, x_edge_pull.reshape([1, -1])[0]]) + y_edge = np.hstack([y_edge, y_edge_pull.reshape([1, -1])[0]]) + z_edge = np.hstack([z_edge, z_edge_pull.reshape([1, -1])[0]]) + + if not (len(x_edge) == len(y_edge) == len(z_edge)): + raise exceptions.PlotlyError( + "The lengths of x_edge, y_edge and z_edge are not the same." + ) + + # define the lines for plotting + lines = graph_objs.Scatter3d( + x=x_edge, + y=y_edge, + z=z_edge, + mode="lines", + line=graph_objs.scatter3d.Line(color=edges_color, width=1.5), + showlegend=False, + ) + + if mean_dists_are_numbers and show_colorbar is True: + return [triangles, lines, colorbar] + else: + return [triangles, lines] + + +def create_trisurf( + x, + y, + z, + simplices, + colormap=None, + show_colorbar=True, + scale=None, + color_func=None, + title="Trisurf Plot", + plot_edges=True, + showbackground=True, + backgroundcolor="rgb(230, 230, 230)", + gridcolor="rgb(255, 255, 255)", + zerolinecolor="rgb(255, 255, 255)", + edges_color="rgb(50, 50, 50)", + height=800, + width=800, + aspectratio=None, +): + """ + Returns figure for a triangulated surface plot + + :param (array) x: data values of x in a 1D array + :param (array) y: data values of y in a 1D array + :param (array) z: data values of z in a 1D array + :param (array) simplices: an array of shape (ntri, 3) where ntri is + the number of triangles in the triangularization. Each row of the + array contains the indicies of the verticies of each triangle + :param (str|tuple|list) colormap: either a plotly scale name, an rgb + or hex color, a color tuple or a list of colors. An rgb color is + of the form 'rgb(x, y, z)' where x, y, z belong to the interval + [0, 255] and a color tuple is a tuple of the form (a, b, c) where + a, b and c belong to [0, 1]. If colormap is a list, it must + contain the valid color types aforementioned as its members + :param (bool) show_colorbar: determines if colorbar is visible + :param (list|array) scale: sets the scale values to be used if a non- + linearly interpolated colormap is desired. If left as None, a + linear interpolation between the colors will be excecuted + :param (function|list) color_func: The parameter that determines the + coloring of the surface. Takes either a function with 3 arguments + x, y, z or a list/array of color values the same length as + simplices. If None, coloring will only depend on the z axis + :param (str) title: title of the plot + :param (bool) plot_edges: determines if the triangles on the trisurf + are visible + :param (bool) showbackground: makes background in plot visible + :param (str) backgroundcolor: color of background. Takes a string of + the form 'rgb(x,y,z)' x,y,z are between 0 and 255 inclusive + :param (str) gridcolor: color of the gridlines besides the axes. Takes + a string of the form 'rgb(x,y,z)' x,y,z are between 0 and 255 + inclusive + :param (str) zerolinecolor: color of the axes. Takes a string of the + form 'rgb(x,y,z)' x,y,z are between 0 and 255 inclusive + :param (str) edges_color: color of the edges, if plot_edges is True + :param (int|float) height: the height of the plot (in pixels) + :param (int|float) width: the width of the plot (in pixels) + :param (dict) aspectratio: a dictionary of the aspect ratio values for + the x, y and z axes. 'x', 'y' and 'z' take (int|float) values + + Example 1: Sphere + + >>> # Necessary Imports for Trisurf + >>> import numpy as np + >>> from scipy.spatial import Delaunay + + >>> from plotly.figure_factory import create_trisurf + >>> from plotly.graph_objs import graph_objs + + >>> # Make data for plot + >>> u = np.linspace(0, 2*np.pi, 20) + >>> v = np.linspace(0, np.pi, 20) + >>> u,v = np.meshgrid(u,v) + >>> u = u.flatten() + >>> v = v.flatten() + + >>> x = np.sin(v)*np.cos(u) + >>> y = np.sin(v)*np.sin(u) + >>> z = np.cos(v) + + >>> points2D = np.vstack([u,v]).T + >>> tri = Delaunay(points2D) + >>> simplices = tri.simplices + + >>> # Create a figure + >>> fig1 = create_trisurf(x=x, y=y, z=z, colormap="Rainbow", + ... simplices=simplices) + + Example 2: Torus + + >>> # Necessary Imports for Trisurf + >>> import numpy as np + >>> from scipy.spatial import Delaunay + + >>> from plotly.figure_factory import create_trisurf + >>> from plotly.graph_objs import graph_objs + + >>> # Make data for plot + >>> u = np.linspace(0, 2*np.pi, 20) + >>> v = np.linspace(0, 2*np.pi, 20) + >>> u,v = np.meshgrid(u,v) + >>> u = u.flatten() + >>> v = v.flatten() + + >>> x = (3 + (np.cos(v)))*np.cos(u) + >>> y = (3 + (np.cos(v)))*np.sin(u) + >>> z = np.sin(v) + + >>> points2D = np.vstack([u,v]).T + >>> tri = Delaunay(points2D) + >>> simplices = tri.simplices + + >>> # Create a figure + >>> fig1 = create_trisurf(x=x, y=y, z=z, colormap="Viridis", + ... simplices=simplices) + + Example 3: Mobius Band + + >>> # Necessary Imports for Trisurf + >>> import numpy as np + >>> from scipy.spatial import Delaunay + + >>> from plotly.figure_factory import create_trisurf + >>> from plotly.graph_objs import graph_objs + + >>> # Make data for plot + >>> u = np.linspace(0, 2*np.pi, 24) + >>> v = np.linspace(-1, 1, 8) + >>> u,v = np.meshgrid(u,v) + >>> u = u.flatten() + >>> v = v.flatten() + + >>> tp = 1 + 0.5*v*np.cos(u/2.) + >>> x = tp*np.cos(u) + >>> y = tp*np.sin(u) + >>> z = 0.5*v*np.sin(u/2.) + + >>> points2D = np.vstack([u,v]).T + >>> tri = Delaunay(points2D) + >>> simplices = tri.simplices + + >>> # Create a figure + >>> fig1 = create_trisurf(x=x, y=y, z=z, colormap=[(0.2, 0.4, 0.6), (1, 1, 1)], + ... simplices=simplices) + + Example 4: Using a Custom Colormap Function with Light Cone + + >>> # Necessary Imports for Trisurf + >>> import numpy as np + >>> from scipy.spatial import Delaunay + + >>> from plotly.figure_factory import create_trisurf + >>> from plotly.graph_objs import graph_objs + + >>> # Make data for plot + >>> u=np.linspace(-np.pi, np.pi, 30) + >>> v=np.linspace(-np.pi, np.pi, 30) + >>> u,v=np.meshgrid(u,v) + >>> u=u.flatten() + >>> v=v.flatten() + + >>> x = u + >>> y = u*np.cos(v) + >>> z = u*np.sin(v) + + >>> points2D = np.vstack([u,v]).T + >>> tri = Delaunay(points2D) + >>> simplices = tri.simplices + + >>> # Define distance function + >>> def dist_origin(x, y, z): + ... return np.sqrt((1.0 * x)**2 + (1.0 * y)**2 + (1.0 * z)**2) + + >>> # Create a figure + >>> fig1 = create_trisurf(x=x, y=y, z=z, + ... colormap=['#FFFFFF', '#E4FFFE', + ... '#A4F6F9', '#FF99FE', + ... '#BA52ED'], + ... scale=[0, 0.6, 0.71, 0.89, 1], + ... simplices=simplices, + ... color_func=dist_origin) + + Example 5: Enter color_func as a list of colors + + >>> # Necessary Imports for Trisurf + >>> import numpy as np + >>> from scipy.spatial import Delaunay + >>> import random + + >>> from plotly.figure_factory import create_trisurf + >>> from plotly.graph_objs import graph_objs + + >>> # Make data for plot + >>> u=np.linspace(-np.pi, np.pi, 30) + >>> v=np.linspace(-np.pi, np.pi, 30) + >>> u,v=np.meshgrid(u,v) + >>> u=u.flatten() + >>> v=v.flatten() + + >>> x = u + >>> y = u*np.cos(v) + >>> z = u*np.sin(v) + + >>> points2D = np.vstack([u,v]).T + >>> tri = Delaunay(points2D) + >>> simplices = tri.simplices + + + >>> colors = [] + >>> color_choices = ['rgb(0, 0, 0)', '#6c4774', '#d6c7dd'] + + >>> for index in range(len(simplices)): + ... colors.append(random.choice(color_choices)) + + >>> fig = create_trisurf( + ... x, y, z, simplices, + ... color_func=colors, + ... show_colorbar=True, + ... edges_color='rgb(2, 85, 180)', + ... title=' Modern Art' + ... ) + """ + if aspectratio is None: + aspectratio = {"x": 1, "y": 1, "z": 1} + + # Validate colormap + clrs.validate_colors(colormap) + colormap, scale = clrs.convert_colors_to_same_type( + colormap, colortype="tuple", return_default_colors=True, scale=scale + ) + + data1 = trisurf( + x, + y, + z, + simplices, + show_colorbar=show_colorbar, + color_func=color_func, + colormap=colormap, + scale=scale, + edges_color=edges_color, + plot_edges=plot_edges, + ) + + axis = dict( + showbackground=showbackground, + backgroundcolor=backgroundcolor, + gridcolor=gridcolor, + zerolinecolor=zerolinecolor, + ) + layout = graph_objs.Layout( + title=title, + width=width, + height=height, + scene=graph_objs.layout.Scene( + xaxis=graph_objs.layout.scene.XAxis(**axis), + yaxis=graph_objs.layout.scene.YAxis(**axis), + zaxis=graph_objs.layout.scene.ZAxis(**axis), + aspectratio=dict( + x=aspectratio["x"], y=aspectratio["y"], z=aspectratio["z"] + ), + ), + ) + + return graph_objs.Figure(data=data1, layout=layout) diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/figure_factory/_violin.py b/.venv_haddock/lib/python3.12/site-packages/plotly/figure_factory/_violin.py new file mode 100644 index 0000000000000000000000000000000000000000..55924e69238349e5fbd032c12c428a8d881367f5 --- /dev/null +++ b/.venv_haddock/lib/python3.12/site-packages/plotly/figure_factory/_violin.py @@ -0,0 +1,704 @@ +from numbers import Number + +from plotly import exceptions, optional_imports +import plotly.colors as clrs +from plotly.graph_objs import graph_objs +from plotly.subplots import make_subplots + +pd = optional_imports.get_module("pandas") +np = optional_imports.get_module("numpy") +scipy_stats = optional_imports.get_module("scipy.stats") + + +def calc_stats(data): + """ + Calculate statistics for use in violin plot. + """ + x = np.asarray(data, float) + vals_min = np.min(x) + vals_max = np.max(x) + q2 = np.percentile(x, 50, interpolation="linear") + q1 = np.percentile(x, 25, interpolation="lower") + q3 = np.percentile(x, 75, interpolation="higher") + iqr = q3 - q1 + whisker_dist = 1.5 * iqr + + # in order to prevent drawing whiskers outside the interval + # of data one defines the whisker positions as: + d1 = np.min(x[x >= (q1 - whisker_dist)]) + d2 = np.max(x[x <= (q3 + whisker_dist)]) + return { + "min": vals_min, + "max": vals_max, + "q1": q1, + "q2": q2, + "q3": q3, + "d1": d1, + "d2": d2, + } + + +def make_half_violin(x, y, fillcolor="#1f77b4", linecolor="rgb(0, 0, 0)"): + """ + Produces a sideways probability distribution fig violin plot. + """ + text = [ + "(pdf(y), y)=(" + "{:0.2f}".format(x[i]) + ", " + "{:0.2f}".format(y[i]) + ")" + for i in range(len(x)) + ] + + return graph_objs.Scatter( + x=x, + y=y, + mode="lines", + name="", + text=text, + fill="tonextx", + fillcolor=fillcolor, + line=graph_objs.scatter.Line(width=0.5, color=linecolor, shape="spline"), + hoverinfo="text", + opacity=0.5, + ) + + +def make_violin_rugplot(vals, pdf_max, distance, color="#1f77b4"): + """ + Returns a rugplot fig for a violin plot. + """ + return graph_objs.Scatter( + y=vals, + x=[-pdf_max - distance] * len(vals), + marker=graph_objs.scatter.Marker(color=color, symbol="line-ew-open"), + mode="markers", + name="", + showlegend=False, + hoverinfo="y", + ) + + +def make_non_outlier_interval(d1, d2): + """ + Returns the scatterplot fig of most of a violin plot. + """ + return graph_objs.Scatter( + x=[0, 0], + y=[d1, d2], + name="", + mode="lines", + line=graph_objs.scatter.Line(width=1.5, color="rgb(0,0,0)"), + ) + + +def make_quartiles(q1, q3): + """ + Makes the upper and lower quartiles for a violin plot. + """ + return graph_objs.Scatter( + x=[0, 0], + y=[q1, q3], + text=[ + "lower-quartile: " + "{:0.2f}".format(q1), + "upper-quartile: " + "{:0.2f}".format(q3), + ], + mode="lines", + line=graph_objs.scatter.Line(width=4, color="rgb(0,0,0)"), + hoverinfo="text", + ) + + +def make_median(q2): + """ + Formats the 'median' hovertext for a violin plot. + """ + return graph_objs.Scatter( + x=[0], + y=[q2], + text=["median: " + "{:0.2f}".format(q2)], + mode="markers", + marker=dict(symbol="square", color="rgb(255,255,255)"), + hoverinfo="text", + ) + + +def make_XAxis(xaxis_title, xaxis_range): + """ + Makes the x-axis for a violin plot. + """ + xaxis = graph_objs.layout.XAxis( + title=xaxis_title, + range=xaxis_range, + showgrid=False, + zeroline=False, + showline=False, + mirror=False, + ticks="", + showticklabels=False, + ) + return xaxis + + +def make_YAxis(yaxis_title): + """ + Makes the y-axis for a violin plot. + """ + yaxis = graph_objs.layout.YAxis( + title=yaxis_title, + showticklabels=True, + autorange=True, + ticklen=4, + showline=True, + zeroline=False, + showgrid=False, + mirror=False, + ) + return yaxis + + +def violinplot(vals, fillcolor="#1f77b4", rugplot=True): + """ + Refer to FigureFactory.create_violin() for docstring. + """ + vals = np.asarray(vals, float) + # summary statistics + vals_min = calc_stats(vals)["min"] + vals_max = calc_stats(vals)["max"] + q1 = calc_stats(vals)["q1"] + q2 = calc_stats(vals)["q2"] + q3 = calc_stats(vals)["q3"] + d1 = calc_stats(vals)["d1"] + d2 = calc_stats(vals)["d2"] + + # kernel density estimation of pdf + pdf = scipy_stats.gaussian_kde(vals) + # grid over the data interval + xx = np.linspace(vals_min, vals_max, 100) + # evaluate the pdf at the grid xx + yy = pdf(xx) + max_pdf = np.max(yy) + # distance from the violin plot to rugplot + distance = (2.0 * max_pdf) / 10 if rugplot else 0 + # range for x values in the plot + plot_xrange = [-max_pdf - distance - 0.1, max_pdf + 0.1] + plot_data = [ + make_half_violin(-yy, xx, fillcolor=fillcolor), + make_half_violin(yy, xx, fillcolor=fillcolor), + make_non_outlier_interval(d1, d2), + make_quartiles(q1, q3), + make_median(q2), + ] + if rugplot: + plot_data.append( + make_violin_rugplot(vals, max_pdf, distance=distance, color=fillcolor) + ) + return plot_data, plot_xrange + + +def violin_no_colorscale( + data, + data_header, + group_header, + colors, + use_colorscale, + group_stats, + rugplot, + sort, + height, + width, + title, +): + """ + Refer to FigureFactory.create_violin() for docstring. + + Returns fig for violin plot without colorscale. + + """ + + # collect all group names + group_name = [] + for name in data[group_header]: + if name not in group_name: + group_name.append(name) + if sort: + group_name.sort() + + gb = data.groupby([group_header]) + L = len(group_name) + + fig = make_subplots( + rows=1, cols=L, shared_yaxes=True, horizontal_spacing=0.025, print_grid=False + ) + color_index = 0 + for k, gr in enumerate(group_name): + vals = np.asarray(gb.get_group(gr)[data_header], float) + if color_index >= len(colors): + color_index = 0 + plot_data, plot_xrange = violinplot( + vals, fillcolor=colors[color_index], rugplot=rugplot + ) + for item in plot_data: + fig.append_trace(item, 1, k + 1) + color_index += 1 + + # add violin plot labels + fig["layout"].update( + {"xaxis{}".format(k + 1): make_XAxis(group_name[k], plot_xrange)} + ) + + # set the sharey axis style + fig["layout"].update({"yaxis{}".format(1): make_YAxis("")}) + fig["layout"].update( + title=title, + showlegend=False, + hovermode="closest", + autosize=False, + height=height, + width=width, + ) + + return fig + + +def violin_colorscale( + data, + data_header, + group_header, + colors, + use_colorscale, + group_stats, + rugplot, + sort, + height, + width, + title, +): + """ + Refer to FigureFactory.create_violin() for docstring. + + Returns fig for violin plot with colorscale. + + """ + + # collect all group names + group_name = [] + for name in data[group_header]: + if name not in group_name: + group_name.append(name) + if sort: + group_name.sort() + + # make sure all group names are keys in group_stats + for group in group_name: + if group not in group_stats: + raise exceptions.PlotlyError( + "All values/groups in the index " + "column must be represented " + "as a key in group_stats." + ) + + gb = data.groupby([group_header]) + L = len(group_name) + + fig = make_subplots( + rows=1, cols=L, shared_yaxes=True, horizontal_spacing=0.025, print_grid=False + ) + + # prepare low and high color for colorscale + lowcolor = clrs.color_parser(colors[0], clrs.unlabel_rgb) + highcolor = clrs.color_parser(colors[1], clrs.unlabel_rgb) + + # find min and max values in group_stats + group_stats_values = [] + for key in group_stats: + group_stats_values.append(group_stats[key]) + + max_value = max(group_stats_values) + min_value = min(group_stats_values) + + for k, gr in enumerate(group_name): + vals = np.asarray(gb.get_group(gr)[data_header], float) + + # find intermediate color from colorscale + intermed = (group_stats[gr] - min_value) / (max_value - min_value) + intermed_color = clrs.find_intermediate_color(lowcolor, highcolor, intermed) + + plot_data, plot_xrange = violinplot( + vals, fillcolor="rgb{}".format(intermed_color), rugplot=rugplot + ) + for item in plot_data: + fig.append_trace(item, 1, k + 1) + fig["layout"].update( + {"xaxis{}".format(k + 1): make_XAxis(group_name[k], plot_xrange)} + ) + # add colorbar to plot + trace_dummy = graph_objs.Scatter( + x=[0], + y=[0], + mode="markers", + marker=dict( + size=2, + cmin=min_value, + cmax=max_value, + colorscale=[[0, colors[0]], [1, colors[1]]], + showscale=True, + ), + showlegend=False, + ) + fig.append_trace(trace_dummy, 1, L) + + # set the sharey axis style + fig["layout"].update({"yaxis{}".format(1): make_YAxis("")}) + fig["layout"].update( + title=title, + showlegend=False, + hovermode="closest", + autosize=False, + height=height, + width=width, + ) + + return fig + + +def violin_dict( + data, + data_header, + group_header, + colors, + use_colorscale, + group_stats, + rugplot, + sort, + height, + width, + title, +): + """ + Refer to FigureFactory.create_violin() for docstring. + + Returns fig for violin plot without colorscale. + + """ + + # collect all group names + group_name = [] + for name in data[group_header]: + if name not in group_name: + group_name.append(name) + + if sort: + group_name.sort() + + # check if all group names appear in colors dict + for group in group_name: + if group not in colors: + raise exceptions.PlotlyError( + "If colors is a dictionary, all " + "the group names must appear as " + "keys in colors." + ) + + gb = data.groupby([group_header]) + L = len(group_name) + + fig = make_subplots( + rows=1, cols=L, shared_yaxes=True, horizontal_spacing=0.025, print_grid=False + ) + + for k, gr in enumerate(group_name): + vals = np.asarray(gb.get_group(gr)[data_header], float) + plot_data, plot_xrange = violinplot(vals, fillcolor=colors[gr], rugplot=rugplot) + for item in plot_data: + fig.append_trace(item, 1, k + 1) + + # add violin plot labels + fig["layout"].update( + {"xaxis{}".format(k + 1): make_XAxis(group_name[k], plot_xrange)} + ) + + # set the sharey axis style + fig["layout"].update({"yaxis{}".format(1): make_YAxis("")}) + fig["layout"].update( + title=title, + showlegend=False, + hovermode="closest", + autosize=False, + height=height, + width=width, + ) + + return fig + + +def create_violin( + data, + data_header=None, + group_header=None, + colors=None, + use_colorscale=False, + group_stats=None, + rugplot=True, + sort=False, + height=450, + width=600, + title="Violin and Rug Plot", +): + """ + **deprecated**, use instead the plotly.graph_objects trace + :class:`plotly.graph_objects.Violin`. + + :param (list|array) data: accepts either a list of numerical values, + a list of dictionaries all with identical keys and at least one + column of numeric values, or a pandas dataframe with at least one + column of numbers. + :param (str) data_header: the header of the data column to be used + from an inputted pandas dataframe. Not applicable if 'data' is + a list of numeric values. + :param (str) group_header: applicable if grouping data by a variable. + 'group_header' must be set to the name of the grouping variable. + :param (str|tuple|list|dict) colors: either a plotly scale name, + an rgb or hex color, a color tuple, a list of colors or a + dictionary. An rgb color is of the form 'rgb(x, y, z)' where + x, y and z belong to the interval [0, 255] and a color tuple is a + tuple of the form (a, b, c) where a, b and c belong to [0, 1]. + If colors is a list, it must contain valid color types as its + members. + :param (bool) use_colorscale: only applicable if grouping by another + variable. Will implement a colorscale based on the first 2 colors + of param colors. This means colors must be a list with at least 2 + colors in it (Plotly colorscales are accepted since they map to a + list of two rgb colors). Default = False + :param (dict) group_stats: a dictionary where each key is a unique + value from the group_header column in data. Each value must be a + number and will be used to color the violin plots if a colorscale + is being used. + :param (bool) rugplot: determines if a rugplot is draw on violin plot. + Default = True + :param (bool) sort: determines if violins are sorted + alphabetically (True) or by input order (False). Default = False + :param (float) height: the height of the violin plot. + :param (float) width: the width of the violin plot. + :param (str) title: the title of the violin plot. + + Example 1: Single Violin Plot + + >>> from plotly.figure_factory import create_violin + >>> import plotly.graph_objs as graph_objects + + >>> import numpy as np + >>> from scipy import stats + + >>> # create list of random values + >>> data_list = np.random.randn(100) + + >>> # create violin fig + >>> fig = create_violin(data_list, colors='#604d9e') + + >>> # plot + >>> fig.show() + + Example 2: Multiple Violin Plots with Qualitative Coloring + + >>> from plotly.figure_factory import create_violin + >>> import plotly.graph_objs as graph_objects + + >>> import numpy as np + >>> import pandas as pd + >>> from scipy import stats + + >>> # create dataframe + >>> np.random.seed(619517) + >>> Nr=250 + >>> y = np.random.randn(Nr) + >>> gr = np.random.choice(list("ABCDE"), Nr) + >>> norm_params=[(0, 1.2), (0.7, 1), (-0.5, 1.4), (0.3, 1), (0.8, 0.9)] + + >>> for i, letter in enumerate("ABCDE"): + ... y[gr == letter] *=norm_params[i][1]+ norm_params[i][0] + >>> df = pd.DataFrame(dict(Score=y, Group=gr)) + + >>> # create violin fig + >>> fig = create_violin(df, data_header='Score', group_header='Group', + ... sort=True, height=600, width=1000) + + >>> # plot + >>> fig.show() + + Example 3: Violin Plots with Colorscale + + >>> from plotly.figure_factory import create_violin + >>> import plotly.graph_objs as graph_objects + + >>> import numpy as np + >>> import pandas as pd + >>> from scipy import stats + + >>> # create dataframe + >>> np.random.seed(619517) + >>> Nr=250 + >>> y = np.random.randn(Nr) + >>> gr = np.random.choice(list("ABCDE"), Nr) + >>> norm_params=[(0, 1.2), (0.7, 1), (-0.5, 1.4), (0.3, 1), (0.8, 0.9)] + + >>> for i, letter in enumerate("ABCDE"): + ... y[gr == letter] *=norm_params[i][1]+ norm_params[i][0] + >>> df = pd.DataFrame(dict(Score=y, Group=gr)) + + >>> # define header params + >>> data_header = 'Score' + >>> group_header = 'Group' + + >>> # make groupby object with pandas + >>> group_stats = {} + >>> groupby_data = df.groupby([group_header]) + + >>> for group in "ABCDE": + ... data_from_group = groupby_data.get_group(group)[data_header] + ... # take a stat of the grouped data + ... stat = np.median(data_from_group) + ... # add to dictionary + ... group_stats[group] = stat + + >>> # create violin fig + >>> fig = create_violin(df, data_header='Score', group_header='Group', + ... height=600, width=1000, use_colorscale=True, + ... group_stats=group_stats) + + >>> # plot + >>> fig.show() + """ + + # Validate colors + if isinstance(colors, dict): + valid_colors = clrs.validate_colors_dict(colors, "rgb") + else: + valid_colors = clrs.validate_colors(colors, "rgb") + + # validate data and choose plot type + if group_header is None: + if isinstance(data, list): + if len(data) <= 0: + raise exceptions.PlotlyError( + "If data is a list, it must be " + "nonempty and contain either " + "numbers or dictionaries." + ) + + if not all(isinstance(element, Number) for element in data): + raise exceptions.PlotlyError( + "If data is a list, it must contain only numbers." + ) + + if pd and isinstance(data, pd.core.frame.DataFrame): + if data_header is None: + raise exceptions.PlotlyError( + "data_header must be the " + "column name with the " + "desired numeric data for " + "the violin plot." + ) + + data = data[data_header].values.tolist() + + # call the plotting functions + plot_data, plot_xrange = violinplot( + data, fillcolor=valid_colors[0], rugplot=rugplot + ) + + layout = graph_objs.Layout( + title=title, + autosize=False, + font=graph_objs.layout.Font(size=11), + height=height, + showlegend=False, + width=width, + xaxis=make_XAxis("", plot_xrange), + yaxis=make_YAxis(""), + hovermode="closest", + ) + layout["yaxis"].update(dict(showline=False, showticklabels=False, ticks="")) + + fig = graph_objs.Figure(data=plot_data, layout=layout) + + return fig + + else: + if not isinstance(data, pd.core.frame.DataFrame): + raise exceptions.PlotlyError( + "Error. You must use a pandas " + "DataFrame if you are using a " + "group header." + ) + + if data_header is None: + raise exceptions.PlotlyError( + "data_header must be the column " + "name with the desired numeric " + "data for the violin plot." + ) + + if use_colorscale is False: + if isinstance(valid_colors, dict): + # validate colors dict choice below + fig = violin_dict( + data, + data_header, + group_header, + valid_colors, + use_colorscale, + group_stats, + rugplot, + sort, + height, + width, + title, + ) + return fig + else: + fig = violin_no_colorscale( + data, + data_header, + group_header, + valid_colors, + use_colorscale, + group_stats, + rugplot, + sort, + height, + width, + title, + ) + return fig + else: + if isinstance(valid_colors, dict): + raise exceptions.PlotlyError( + "The colors param cannot be " + "a dictionary if you are " + "using a colorscale." + ) + + if len(valid_colors) < 2: + raise exceptions.PlotlyError( + "colors must be a list with " + "at least 2 colors. A " + "Plotly scale is allowed." + ) + + if not isinstance(group_stats, dict): + raise exceptions.PlotlyError( + "Your group_stats param must be a dictionary." + ) + + fig = violin_colorscale( + data, + data_header, + group_header, + valid_colors, + use_colorscale, + group_stats, + rugplot, + sort, + height, + width, + title, + ) + return fig diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/figure_factory/utils.py b/.venv_haddock/lib/python3.12/site-packages/plotly/figure_factory/utils.py new file mode 100644 index 0000000000000000000000000000000000000000..e20a319af13cc31e14063bac021eb2103d24d34b --- /dev/null +++ b/.venv_haddock/lib/python3.12/site-packages/plotly/figure_factory/utils.py @@ -0,0 +1,249 @@ +from collections.abc import Sequence + +from plotly import exceptions + + +def is_sequence(obj): + return isinstance(obj, Sequence) and not isinstance(obj, str) + + +def validate_index(index_vals): + """ + Validates if a list contains all numbers or all strings + + :raises: (PlotlyError) If there are any two items in the list whose + types differ + """ + from numbers import Number + + if isinstance(index_vals[0], Number): + if not all(isinstance(item, Number) for item in index_vals): + raise exceptions.PlotlyError( + "Error in indexing column. " + "Make sure all entries of each " + "column are all numbers or " + "all strings." + ) + + elif isinstance(index_vals[0], str): + if not all(isinstance(item, str) for item in index_vals): + raise exceptions.PlotlyError( + "Error in indexing column. " + "Make sure all entries of each " + "column are all numbers or " + "all strings." + ) + + +def validate_dataframe(array): + """ + Validates all strings or numbers in each dataframe column + + :raises: (PlotlyError) If there are any two items in any list whose + types differ + """ + from numbers import Number + + for vector in array: + if isinstance(vector[0], Number): + if not all(isinstance(item, Number) for item in vector): + raise exceptions.PlotlyError( + "Error in dataframe. " + "Make sure all entries of " + "each column are either " + "numbers or strings." + ) + elif isinstance(vector[0], str): + if not all(isinstance(item, str) for item in vector): + raise exceptions.PlotlyError( + "Error in dataframe. " + "Make sure all entries of " + "each column are either " + "numbers or strings." + ) + + +def validate_equal_length(*args): + """ + Validates that data lists or ndarrays are the same length. + + :raises: (PlotlyError) If any data lists are not the same length. + """ + length = len(args[0]) + if any(len(lst) != length for lst in args): + raise exceptions.PlotlyError( + "Oops! Your data lists or ndarrays should be the same length." + ) + + +def validate_positive_scalars(**kwargs): + """ + Validates that all values given in key/val pairs are positive. + + Accepts kwargs to improve Exception messages. + + :raises: (PlotlyError) If any value is < 0 or raises. + """ + for key, val in kwargs.items(): + try: + if val <= 0: + raise ValueError("{} must be > 0, got {}".format(key, val)) + except TypeError: + raise exceptions.PlotlyError("{} must be a number, got {}".format(key, val)) + + +def flatten(array): + """ + Uses list comprehension to flatten array + + :param (array): An iterable to flatten + :raises (PlotlyError): If iterable is not nested. + :rtype (list): The flattened list. + """ + try: + return [item for sublist in array for item in sublist] + except TypeError: + raise exceptions.PlotlyError( + "Your data array could not be " + "flattened! Make sure your data is " + "entered as lists or ndarrays!" + ) + + +def endpts_to_intervals(endpts): + """ + Returns a list of intervals for categorical colormaps + + Accepts a list or tuple of sequentially increasing numbers and returns + a list representation of the mathematical intervals with these numbers + as endpoints. For example, [1, 6] returns [[-inf, 1], [1, 6], [6, inf]] + + :raises: (PlotlyError) If input is not a list or tuple + :raises: (PlotlyError) If the input contains a string + :raises: (PlotlyError) If any number does not increase after the + previous one in the sequence + """ + length = len(endpts) + # Check if endpts is a list or tuple + if not (isinstance(endpts, (tuple)) or isinstance(endpts, (list))): + raise exceptions.PlotlyError( + "The intervals_endpts argument must " + "be a list or tuple of a sequence " + "of increasing numbers." + ) + # Check if endpts contains only numbers + for item in endpts: + if isinstance(item, str): + raise exceptions.PlotlyError( + "The intervals_endpts argument " + "must be a list or tuple of a " + "sequence of increasing " + "numbers." + ) + # Check if numbers in endpts are increasing + for k in range(length - 1): + if endpts[k] >= endpts[k + 1]: + raise exceptions.PlotlyError( + "The intervals_endpts argument " + "must be a list or tuple of a " + "sequence of increasing " + "numbers." + ) + else: + intervals = [] + # add -inf to intervals + intervals.append([float("-inf"), endpts[0]]) + for k in range(length - 1): + interval = [] + interval.append(endpts[k]) + interval.append(endpts[k + 1]) + intervals.append(interval) + # add +inf to intervals + intervals.append([endpts[length - 1], float("inf")]) + return intervals + + +def annotation_dict_for_label( + text, + lane, + num_of_lanes, + subplot_spacing, + row_col="col", + flipped=True, + right_side=True, + text_color="#0f0f0f", +): + """ + Returns annotation dict for label of n labels of a 1xn or nx1 subplot. + + :param (str) text: the text for a label. + :param (int) lane: the label number for text. From 1 to n inclusive. + :param (int) num_of_lanes: the number 'n' of rows or columns in subplot. + :param (float) subplot_spacing: the value for the horizontal_spacing and + vertical_spacing params in your plotly.tools.make_subplots() call. + :param (str) row_col: choose whether labels are placed along rows or + columns. + :param (bool) flipped: flips text by 90 degrees. Text is printed + horizontally if set to True and row_col='row', or if False and + row_col='col'. + :param (bool) right_side: only applicable if row_col is set to 'row'. + :param (str) text_color: color of the text. + """ + temp = (1 - (num_of_lanes - 1) * subplot_spacing) / (num_of_lanes) + if not flipped: + xanchor = "center" + yanchor = "middle" + if row_col == "col": + x = (lane - 1) * (temp + subplot_spacing) + 0.5 * temp + y = 1.03 + textangle = 0 + elif row_col == "row": + y = (lane - 1) * (temp + subplot_spacing) + 0.5 * temp + x = 1.03 + textangle = 90 + else: + if row_col == "col": + xanchor = "center" + yanchor = "bottom" + x = (lane - 1) * (temp + subplot_spacing) + 0.5 * temp + y = 1.0 + textangle = 270 + elif row_col == "row": + yanchor = "middle" + y = (lane - 1) * (temp + subplot_spacing) + 0.5 * temp + if right_side: + x = 1.0 + xanchor = "left" + else: + x = -0.01 + xanchor = "right" + textangle = 0 + + annotation_dict = dict( + textangle=textangle, + xanchor=xanchor, + yanchor=yanchor, + x=x, + y=y, + showarrow=False, + xref="paper", + yref="paper", + text=text, + font=dict(size=13, color=text_color), + ) + return annotation_dict + + +def list_of_options(iterable, conj="and", period=True): + """ + Returns an English listing of objects seperated by commas ',' + + For example, ['foo', 'bar', 'baz'] becomes 'foo, bar and baz' + if the conjunction 'and' is selected. + """ + if len(iterable) < 2: + raise exceptions.PlotlyError( + "Your list or tuple must contain at least 2 items." + ) + template = (len(iterable) - 2) * "{}, " + "{} " + conj + " {}" + period * "." + return template.format(*iterable) diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/files.py b/.venv_haddock/lib/python3.12/site-packages/plotly/files.py new file mode 100644 index 0000000000000000000000000000000000000000..74394db05b2d2b427ad2aa97e4678dc9800a4c55 --- /dev/null +++ b/.venv_haddock/lib/python3.12/site-packages/plotly/files.py @@ -0,0 +1 @@ +from _plotly_utils.files import PLOTLY_DIR, ensure_writable_plotly_dir # noqa: F401 diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objects/.___init__.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objects/.___init__.py new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objects/.___init__.py differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objects/.___pycache__ b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objects/.___pycache__ new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objects/.___pycache__ differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objects/__init__.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objects/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..ab87744d0d7c7dfbb2b4bd5be23fdd616928d600 --- /dev/null +++ b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objects/__init__.py @@ -0,0 +1,306 @@ +# ruff: noqa: F401 +import sys +from typing import TYPE_CHECKING + +if TYPE_CHECKING: + from ..graph_objs import Waterfall + from ..graph_objs import Volume + from ..graph_objs import Violin + from ..graph_objs import Treemap + from ..graph_objs import Table + from ..graph_objs import Surface + from ..graph_objs import Sunburst + from ..graph_objs import Streamtube + from ..graph_objs import Splom + from ..graph_objs import Scatterternary + from ..graph_objs import Scattersmith + from ..graph_objs import Scatterpolargl + from ..graph_objs import Scatterpolar + from ..graph_objs import Scattermapbox + from ..graph_objs import Scattermap + from ..graph_objs import Scattergl + from ..graph_objs import Scattergeo + from ..graph_objs import Scattercarpet + from ..graph_objs import Scatter3d + from ..graph_objs import Scatter + from ..graph_objs import Sankey + from ..graph_objs import Pie + from ..graph_objs import Parcoords + from ..graph_objs import Parcats + from ..graph_objs import Ohlc + from ..graph_objs import Mesh3d + from ..graph_objs import Isosurface + from ..graph_objs import Indicator + from ..graph_objs import Image + from ..graph_objs import Icicle + from ..graph_objs import Histogram2dContour + from ..graph_objs import Histogram2d + from ..graph_objs import Histogram + from ..graph_objs import Heatmap + from ..graph_objs import Funnelarea + from ..graph_objs import Funnel + from ..graph_objs import Densitymapbox + from ..graph_objs import Densitymap + from ..graph_objs import Contourcarpet + from ..graph_objs import Contour + from ..graph_objs import Cone + from ..graph_objs import Choroplethmapbox + from ..graph_objs import Choroplethmap + from ..graph_objs import Choropleth + from ..graph_objs import Carpet + from ..graph_objs import Candlestick + from ..graph_objs import Box + from ..graph_objs import Barpolar + from ..graph_objs import Bar + from ..graph_objs import Layout + from ..graph_objs import Frame + from ..graph_objs import Figure + from ..graph_objs import Data + from ..graph_objs import Annotations + from ..graph_objs import Frames + from ..graph_objs import AngularAxis + from ..graph_objs import Annotation + from ..graph_objs import ColorBar + from ..graph_objs import Contours + from ..graph_objs import ErrorX + from ..graph_objs import ErrorY + from ..graph_objs import ErrorZ + from ..graph_objs import Font + from ..graph_objs import Legend + from ..graph_objs import Line + from ..graph_objs import Margin + from ..graph_objs import Marker + from ..graph_objs import RadialAxis + from ..graph_objs import Scene + from ..graph_objs import Stream + from ..graph_objs import XAxis + from ..graph_objs import YAxis + from ..graph_objs import ZAxis + from ..graph_objs import XBins + from ..graph_objs import YBins + from ..graph_objs import Trace + from ..graph_objs import Histogram2dcontour + from ..graph_objs import waterfall + from ..graph_objs import volume + from ..graph_objs import violin + from ..graph_objs import treemap + from ..graph_objs import table + from ..graph_objs import surface + from ..graph_objs import sunburst + from ..graph_objs import streamtube + from ..graph_objs import splom + from ..graph_objs import scatterternary + from ..graph_objs import scattersmith + from ..graph_objs import scatterpolargl + from ..graph_objs import scatterpolar + from ..graph_objs import scattermapbox + from ..graph_objs import scattermap + from ..graph_objs import scattergl + from ..graph_objs import scattergeo + from ..graph_objs import scattercarpet + from ..graph_objs import scatter3d + from ..graph_objs import scatter + from ..graph_objs import sankey + from ..graph_objs import pie + from ..graph_objs import parcoords + from ..graph_objs import parcats + from ..graph_objs import ohlc + from ..graph_objs import mesh3d + from ..graph_objs import isosurface + from ..graph_objs import indicator + from ..graph_objs import image + from ..graph_objs import icicle + from ..graph_objs import histogram2dcontour + from ..graph_objs import histogram2d + from ..graph_objs import histogram + from ..graph_objs import heatmap + from ..graph_objs import funnelarea + from ..graph_objs import funnel + from ..graph_objs import densitymapbox + from ..graph_objs import densitymap + from ..graph_objs import contourcarpet + from ..graph_objs import contour + from ..graph_objs import cone + from ..graph_objs import choroplethmapbox + from ..graph_objs import choroplethmap + from ..graph_objs import choropleth + from ..graph_objs import carpet + from ..graph_objs import candlestick + from ..graph_objs import box + from ..graph_objs import barpolar + from ..graph_objs import bar + from ..graph_objs import layout +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [ + "..graph_objs.waterfall", + "..graph_objs.volume", + "..graph_objs.violin", + "..graph_objs.treemap", + "..graph_objs.table", + "..graph_objs.surface", + "..graph_objs.sunburst", + "..graph_objs.streamtube", + "..graph_objs.splom", + "..graph_objs.scatterternary", + "..graph_objs.scattersmith", + "..graph_objs.scatterpolargl", + "..graph_objs.scatterpolar", + "..graph_objs.scattermapbox", + "..graph_objs.scattermap", + "..graph_objs.scattergl", + "..graph_objs.scattergeo", + "..graph_objs.scattercarpet", + "..graph_objs.scatter3d", + "..graph_objs.scatter", + "..graph_objs.sankey", + "..graph_objs.pie", + "..graph_objs.parcoords", + "..graph_objs.parcats", + "..graph_objs.ohlc", + "..graph_objs.mesh3d", + "..graph_objs.isosurface", + "..graph_objs.indicator", + "..graph_objs.image", + "..graph_objs.icicle", + "..graph_objs.histogram2dcontour", + "..graph_objs.histogram2d", + "..graph_objs.histogram", + "..graph_objs.heatmap", + "..graph_objs.funnelarea", + "..graph_objs.funnel", + "..graph_objs.densitymapbox", + "..graph_objs.densitymap", + "..graph_objs.contourcarpet", + "..graph_objs.contour", + "..graph_objs.cone", + "..graph_objs.choroplethmapbox", + "..graph_objs.choroplethmap", + "..graph_objs.choropleth", + "..graph_objs.carpet", + "..graph_objs.candlestick", + "..graph_objs.box", + "..graph_objs.barpolar", + "..graph_objs.bar", + "..graph_objs.layout", + ], + [ + "..graph_objs.Waterfall", + "..graph_objs.Volume", + "..graph_objs.Violin", + "..graph_objs.Treemap", + "..graph_objs.Table", + "..graph_objs.Surface", + "..graph_objs.Sunburst", + "..graph_objs.Streamtube", + "..graph_objs.Splom", + "..graph_objs.Scatterternary", + "..graph_objs.Scattersmith", + "..graph_objs.Scatterpolargl", + "..graph_objs.Scatterpolar", + "..graph_objs.Scattermapbox", + "..graph_objs.Scattermap", + "..graph_objs.Scattergl", + "..graph_objs.Scattergeo", + "..graph_objs.Scattercarpet", + "..graph_objs.Scatter3d", + "..graph_objs.Scatter", + "..graph_objs.Sankey", + "..graph_objs.Pie", + "..graph_objs.Parcoords", + "..graph_objs.Parcats", + "..graph_objs.Ohlc", + "..graph_objs.Mesh3d", + "..graph_objs.Isosurface", + "..graph_objs.Indicator", + "..graph_objs.Image", + "..graph_objs.Icicle", + "..graph_objs.Histogram2dContour", + "..graph_objs.Histogram2d", + "..graph_objs.Histogram", + "..graph_objs.Heatmap", + "..graph_objs.Funnelarea", + "..graph_objs.Funnel", + "..graph_objs.Densitymapbox", + "..graph_objs.Densitymap", + "..graph_objs.Contourcarpet", + "..graph_objs.Contour", + "..graph_objs.Cone", + "..graph_objs.Choroplethmapbox", + "..graph_objs.Choroplethmap", + "..graph_objs.Choropleth", + "..graph_objs.Carpet", + "..graph_objs.Candlestick", + "..graph_objs.Box", + "..graph_objs.Barpolar", + "..graph_objs.Bar", + "..graph_objs.Layout", + "..graph_objs.Frame", + "..graph_objs.Figure", + "..graph_objs.Data", + "..graph_objs.Annotations", + "..graph_objs.Frames", + "..graph_objs.AngularAxis", + "..graph_objs.Annotation", + "..graph_objs.ColorBar", + "..graph_objs.Contours", + "..graph_objs.ErrorX", + "..graph_objs.ErrorY", + "..graph_objs.ErrorZ", + "..graph_objs.Font", + "..graph_objs.Legend", + "..graph_objs.Line", + "..graph_objs.Margin", + "..graph_objs.Marker", + "..graph_objs.RadialAxis", + "..graph_objs.Scene", + "..graph_objs.Stream", + "..graph_objs.XAxis", + "..graph_objs.YAxis", + "..graph_objs.ZAxis", + "..graph_objs.XBins", + "..graph_objs.YBins", + "..graph_objs.Trace", + "..graph_objs.Histogram2dcontour", + ], + ) + + +if sys.version_info < (3, 7) or TYPE_CHECKING: + try: + import ipywidgets as _ipywidgets + from packaging.version import Version as _Version + + if _Version(_ipywidgets.__version__) >= _Version("7.0.0"): + from ..graph_objs._figurewidget import FigureWidget + else: + raise ImportError() + except Exception: + from ..missing_anywidget import FigureWidget +else: + __all__.append("FigureWidget") + orig_getattr = __getattr__ + + def __getattr__(import_name): + if import_name == "FigureWidget": + try: + import ipywidgets + from packaging.version import Version + + if Version(ipywidgets.__version__) >= Version("7.0.0"): + from ..graph_objs._figurewidget import FigureWidget + + return FigureWidget + else: + raise ImportError() + except Exception: + from ..missing_anywidget import FigureWidget + + return FigureWidget + else: + raise ImportError() + + return orig_getattr(import_name) diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/.___init__.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/.___init__.py new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/.___init__.py differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/.___pycache__ b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/.___pycache__ new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/.___pycache__ differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/.__bar.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/.__bar.py new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/.__bar.py differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/.__barpolar.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/.__barpolar.py new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/.__barpolar.py differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/.__box.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/.__box.py new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/.__box.py differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/.__candlestick.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/.__candlestick.py new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/.__candlestick.py differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/.__carpet.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/.__carpet.py new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/.__carpet.py differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/.__choropleth.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/.__choropleth.py new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/.__choropleth.py differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/.__choroplethmap.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/.__choroplethmap.py new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/.__choroplethmap.py differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/.__choroplethmapbox.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/.__choroplethmapbox.py new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/.__choroplethmapbox.py differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/.__cone.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/.__cone.py new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/.__cone.py differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/.__contour.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/.__contour.py new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/.__contour.py differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/.__contourcarpet.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/.__contourcarpet.py new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/.__contourcarpet.py differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/.__densitymap.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/.__densitymap.py new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/.__densitymap.py differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/.__densitymapbox.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/.__densitymapbox.py new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/.__densitymapbox.py differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/.__deprecations.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/.__deprecations.py new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/.__deprecations.py differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/.__figure.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/.__figure.py new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/.__figure.py differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/.__figurewidget.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/.__figurewidget.py new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/.__figurewidget.py differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/.__frame.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/.__frame.py new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/.__frame.py differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/.__funnel.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/.__funnel.py new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/.__funnel.py differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/.__funnelarea.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/.__funnelarea.py new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/.__funnelarea.py differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/.__heatmap.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/.__heatmap.py new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/.__heatmap.py differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/.__histogram.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/.__histogram.py new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/.__histogram.py differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/.__histogram2d.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/.__histogram2d.py new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/.__histogram2d.py differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/.__histogram2dcontour.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/.__histogram2dcontour.py new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/.__histogram2dcontour.py differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/.__icicle.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/.__icicle.py new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/.__icicle.py differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/.__image.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/.__image.py new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/.__image.py differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/.__indicator.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/.__indicator.py new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/.__indicator.py differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/.__isosurface.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/.__isosurface.py new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/.__isosurface.py differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/.__layout.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/.__layout.py new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/.__layout.py differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/.__mesh3d.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/.__mesh3d.py new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/.__mesh3d.py differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/.__ohlc.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/.__ohlc.py new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/.__ohlc.py differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/.__parcats.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/.__parcats.py new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/.__parcats.py differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/.__parcoords.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/.__parcoords.py new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/.__parcoords.py differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/.__pie.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/.__pie.py new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/.__pie.py differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/.__sankey.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/.__sankey.py new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/.__sankey.py differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/.__scatter.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/.__scatter.py new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/.__scatter.py differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/.__scatter3d.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/.__scatter3d.py new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/.__scatter3d.py differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/.__scattercarpet.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/.__scattercarpet.py new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/.__scattercarpet.py differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/.__scattergeo.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/.__scattergeo.py new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/.__scattergeo.py differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/.__scattergl.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/.__scattergl.py new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/.__scattergl.py differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/.__scattermap.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/.__scattermap.py new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/.__scattermap.py differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/.__scattermapbox.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/.__scattermapbox.py new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/.__scattermapbox.py differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/.__scatterpolar.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/.__scatterpolar.py new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/.__scatterpolar.py differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/.__scatterpolargl.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/.__scatterpolargl.py new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/.__scatterpolargl.py differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/.__scattersmith.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/.__scattersmith.py new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/.__scattersmith.py differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/.__scatterternary.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/.__scatterternary.py new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/.__scatterternary.py differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/.__splom.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/.__splom.py new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/.__splom.py differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/.__streamtube.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/.__streamtube.py new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/.__streamtube.py differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/.__sunburst.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/.__sunburst.py new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/.__sunburst.py differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/.__surface.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/.__surface.py new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/.__surface.py differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/.__table.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/.__table.py new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/.__table.py differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/.__treemap.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/.__treemap.py new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/.__treemap.py differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/.__violin.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/.__violin.py new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/.__violin.py differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/.__volume.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/.__volume.py new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/.__volume.py differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/.__waterfall.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/.__waterfall.py new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/.__waterfall.py differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/._bar b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/._bar new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/._bar differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/._barpolar b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/._barpolar new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/._barpolar differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/._box b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/._box new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/._box differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/._candlestick b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/._candlestick new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/._candlestick differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/._carpet b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/._carpet new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/._carpet differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/._choropleth b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/._choropleth new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/._choropleth differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/._choroplethmap b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/._choroplethmap new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/._choroplethmap differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/._choroplethmapbox b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/._choroplethmapbox new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/._choroplethmapbox differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/._cone b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/._cone new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/._cone differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/._contour b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/._contour new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/._contour differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/._contourcarpet b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/._contourcarpet new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/._contourcarpet differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/._densitymap b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/._densitymap new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/._densitymap differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/._densitymapbox b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/._densitymapbox new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/._densitymapbox differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/._funnel b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/._funnel new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/._funnel differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/._funnelarea b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/._funnelarea new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/._funnelarea differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/._graph_objs.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/._graph_objs.py new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/._graph_objs.py differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/._heatmap b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/._heatmap new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/._heatmap differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/._histogram b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/._histogram new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/._histogram differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/._histogram2d b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/._histogram2d new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/._histogram2d differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/._histogram2dcontour b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/._histogram2dcontour new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/._histogram2dcontour differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/._icicle b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/._icicle new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/._icicle differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/._image b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/._image new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/._image differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/._indicator b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/._indicator new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/._indicator differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/._isosurface b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/._isosurface new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/._isosurface differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/._layout b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/._layout new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/._layout differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/._mesh3d b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/._mesh3d new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/._mesh3d differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/._ohlc b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/._ohlc new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/._ohlc differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/._parcats b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/._parcats new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/._parcats differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/._parcoords b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/._parcoords new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/._parcoords differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/._pie b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/._pie new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/._pie differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/._sankey b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/._sankey new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/._sankey differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/._scatter b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/._scatter new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/._scatter differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/._scatter3d b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/._scatter3d new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/._scatter3d differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/._scattercarpet b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/._scattercarpet new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/._scattercarpet differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/._scattergeo b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/._scattergeo new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/._scattergeo differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/._scattergl b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/._scattergl new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/._scattergl differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/._scattermap b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/._scattermap new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/._scattermap differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/._scattermapbox b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/._scattermapbox new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/._scattermapbox differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/._scatterpolar b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/._scatterpolar new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/._scatterpolar differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/._scatterpolargl b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/._scatterpolargl new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/._scatterpolargl differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/._scattersmith b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/._scattersmith new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/._scattersmith differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/._scatterternary b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/._scatterternary new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/._scatterternary differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/._splom b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/._splom new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/._splom differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/._streamtube b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/._streamtube new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/._streamtube differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/._sunburst b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/._sunburst new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/._sunburst differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/._surface b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/._surface new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/._surface differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/._table b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/._table new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/._table differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/._treemap b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/._treemap new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/._treemap differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/._violin b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/._violin new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/._violin differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/._volume b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/._volume new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/._volume differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/._waterfall b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/._waterfall new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/._waterfall differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/__init__.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..57a7317fd57bb65740e026a53e9e49e67155ea15 --- /dev/null +++ b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/__init__.py @@ -0,0 +1,305 @@ +import sys +from typing import TYPE_CHECKING + +if TYPE_CHECKING: + from ._bar import Bar + from ._barpolar import Barpolar + from ._box import Box + from ._candlestick import Candlestick + from ._carpet import Carpet + from ._choropleth import Choropleth + from ._choroplethmap import Choroplethmap + from ._choroplethmapbox import Choroplethmapbox + from ._cone import Cone + from ._contour import Contour + from ._contourcarpet import Contourcarpet + from ._densitymap import Densitymap + from ._densitymapbox import Densitymapbox + from ._deprecations import AngularAxis + from ._deprecations import Annotation + from ._deprecations import Annotations + from ._deprecations import ColorBar + from ._deprecations import Contours + from ._deprecations import Data + from ._deprecations import ErrorX + from ._deprecations import ErrorY + from ._deprecations import ErrorZ + from ._deprecations import Font + from ._deprecations import Frames + from ._deprecations import Histogram2dcontour + from ._deprecations import Legend + from ._deprecations import Line + from ._deprecations import Margin + from ._deprecations import Marker + from ._deprecations import RadialAxis + from ._deprecations import Scene + from ._deprecations import Stream + from ._deprecations import Trace + from ._deprecations import XAxis + from ._deprecations import XBins + from ._deprecations import YAxis + from ._deprecations import YBins + from ._deprecations import ZAxis + from ._figure import Figure + from ._frame import Frame + from ._funnel import Funnel + from ._funnelarea import Funnelarea + from ._heatmap import Heatmap + from ._histogram import Histogram + from ._histogram2d import Histogram2d + from ._histogram2dcontour import Histogram2dContour + from ._icicle import Icicle + from ._image import Image + from ._indicator import Indicator + from ._isosurface import Isosurface + from ._layout import Layout + from ._mesh3d import Mesh3d + from ._ohlc import Ohlc + from ._parcats import Parcats + from ._parcoords import Parcoords + from ._pie import Pie + from ._sankey import Sankey + from ._scatter import Scatter + from ._scatter3d import Scatter3d + from ._scattercarpet import Scattercarpet + from ._scattergeo import Scattergeo + from ._scattergl import Scattergl + from ._scattermap import Scattermap + from ._scattermapbox import Scattermapbox + from ._scatterpolar import Scatterpolar + from ._scatterpolargl import Scatterpolargl + from ._scattersmith import Scattersmith + from ._scatterternary import Scatterternary + from ._splom import Splom + from ._streamtube import Streamtube + from ._sunburst import Sunburst + from ._surface import Surface + from ._table import Table + from ._treemap import Treemap + from ._violin import Violin + from ._volume import Volume + from ._waterfall import Waterfall + from . import bar + from . import barpolar + from . import box + from . import candlestick + from . import carpet + from . import choropleth + from . import choroplethmap + from . import choroplethmapbox + from . import cone + from . import contour + from . import contourcarpet + from . import densitymap + from . import densitymapbox + from . import funnel + from . import funnelarea + from . import heatmap + from . import histogram + from . import histogram2d + from . import histogram2dcontour + from . import icicle + from . import image + from . import indicator + from . import isosurface + from . import layout + from . import mesh3d + from . import ohlc + from . import parcats + from . import parcoords + from . import pie + from . import sankey + from . import scatter + from . import scatter3d + from . import scattercarpet + from . import scattergeo + from . import scattergl + from . import scattermap + from . import scattermapbox + from . import scatterpolar + from . import scatterpolargl + from . import scattersmith + from . import scatterternary + from . import splom + from . import streamtube + from . import sunburst + from . import surface + from . import table + from . import treemap + from . import violin + from . import volume + from . import waterfall +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [ + ".bar", + ".barpolar", + ".box", + ".candlestick", + ".carpet", + ".choropleth", + ".choroplethmap", + ".choroplethmapbox", + ".cone", + ".contour", + ".contourcarpet", + ".densitymap", + ".densitymapbox", + ".funnel", + ".funnelarea", + ".heatmap", + ".histogram", + ".histogram2d", + ".histogram2dcontour", + ".icicle", + ".image", + ".indicator", + ".isosurface", + ".layout", + ".mesh3d", + ".ohlc", + ".parcats", + ".parcoords", + ".pie", + ".sankey", + ".scatter", + ".scatter3d", + ".scattercarpet", + ".scattergeo", + ".scattergl", + ".scattermap", + ".scattermapbox", + ".scatterpolar", + ".scatterpolargl", + ".scattersmith", + ".scatterternary", + ".splom", + ".streamtube", + ".sunburst", + ".surface", + ".table", + ".treemap", + ".violin", + ".volume", + ".waterfall", + ], + [ + "._bar.Bar", + "._barpolar.Barpolar", + "._box.Box", + "._candlestick.Candlestick", + "._carpet.Carpet", + "._choropleth.Choropleth", + "._choroplethmap.Choroplethmap", + "._choroplethmapbox.Choroplethmapbox", + "._cone.Cone", + "._contour.Contour", + "._contourcarpet.Contourcarpet", + "._densitymap.Densitymap", + "._densitymapbox.Densitymapbox", + "._deprecations.AngularAxis", + "._deprecations.Annotation", + "._deprecations.Annotations", + "._deprecations.ColorBar", + "._deprecations.Contours", + "._deprecations.Data", + "._deprecations.ErrorX", + "._deprecations.ErrorY", + "._deprecations.ErrorZ", + "._deprecations.Font", + "._deprecations.Frames", + "._deprecations.Histogram2dcontour", + "._deprecations.Legend", + "._deprecations.Line", + "._deprecations.Margin", + "._deprecations.Marker", + "._deprecations.RadialAxis", + "._deprecations.Scene", + "._deprecations.Stream", + "._deprecations.Trace", + "._deprecations.XAxis", + "._deprecations.XBins", + "._deprecations.YAxis", + "._deprecations.YBins", + "._deprecations.ZAxis", + "._figure.Figure", + "._frame.Frame", + "._funnel.Funnel", + "._funnelarea.Funnelarea", + "._heatmap.Heatmap", + "._histogram.Histogram", + "._histogram2d.Histogram2d", + "._histogram2dcontour.Histogram2dContour", + "._icicle.Icicle", + "._image.Image", + "._indicator.Indicator", + "._isosurface.Isosurface", + "._layout.Layout", + "._mesh3d.Mesh3d", + "._ohlc.Ohlc", + "._parcats.Parcats", + "._parcoords.Parcoords", + "._pie.Pie", + "._sankey.Sankey", + "._scatter.Scatter", + "._scatter3d.Scatter3d", + "._scattercarpet.Scattercarpet", + "._scattergeo.Scattergeo", + "._scattergl.Scattergl", + "._scattermap.Scattermap", + "._scattermapbox.Scattermapbox", + "._scatterpolar.Scatterpolar", + "._scatterpolargl.Scatterpolargl", + "._scattersmith.Scattersmith", + "._scatterternary.Scatterternary", + "._splom.Splom", + "._streamtube.Streamtube", + "._sunburst.Sunburst", + "._surface.Surface", + "._table.Table", + "._treemap.Treemap", + "._violin.Violin", + "._volume.Volume", + "._waterfall.Waterfall", + ], + ) + + +if sys.version_info < (3, 7) or TYPE_CHECKING: + try: + import ipywidgets as _ipywidgets + from packaging.version import Version as _Version + + if _Version(_ipywidgets.__version__) >= _Version("7.0.0"): + from ..graph_objs._figurewidget import FigureWidget + else: + raise ImportError() + except Exception: + from ..missing_anywidget import FigureWidget +else: + __all__.append("FigureWidget") + orig_getattr = __getattr__ + + def __getattr__(import_name): + if import_name == "FigureWidget": + try: + import ipywidgets + from packaging.version import Version + + if Version(ipywidgets.__version__) >= Version("7.0.0"): + from ..graph_objs._figurewidget import FigureWidget + + return FigureWidget + else: + raise ImportError() + except Exception: + from ..missing_anywidget import FigureWidget + + return FigureWidget + else: + raise ImportError() + + return orig_getattr(import_name) diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/_bar.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/_bar.py new file mode 100644 index 0000000000000000000000000000000000000000..e2cd24617f7094b2904272c1328d99b1ce70f390 --- /dev/null +++ b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/_bar.py @@ -0,0 +1,2690 @@ +# --- THIS FILE IS AUTO-GENERATED --- +# Modifications will be overwitten the next time code generation run. + +from plotly.basedatatypes import BaseTraceType as _BaseTraceType +import copy as _copy + + +class Bar(_BaseTraceType): + _parent_path_str = "" + _path_str = "bar" + _valid_props = { + "alignmentgroup", + "base", + "basesrc", + "cliponaxis", + "constraintext", + "customdata", + "customdatasrc", + "dx", + "dy", + "error_x", + "error_y", + "hoverinfo", + "hoverinfosrc", + "hoverlabel", + "hovertemplate", + "hovertemplatefallback", + "hovertemplatesrc", + "hovertext", + "hovertextsrc", + "ids", + "idssrc", + "insidetextanchor", + "insidetextfont", + "legend", + "legendgroup", + "legendgrouptitle", + "legendrank", + "legendwidth", + "marker", + "meta", + "metasrc", + "name", + "offset", + "offsetgroup", + "offsetsrc", + "opacity", + "orientation", + "outsidetextfont", + "selected", + "selectedpoints", + "showlegend", + "stream", + "text", + "textangle", + "textfont", + "textposition", + "textpositionsrc", + "textsrc", + "texttemplate", + "texttemplatefallback", + "texttemplatesrc", + "type", + "uid", + "uirevision", + "unselected", + "visible", + "width", + "widthsrc", + "x", + "x0", + "xaxis", + "xcalendar", + "xhoverformat", + "xperiod", + "xperiod0", + "xperiodalignment", + "xsrc", + "y", + "y0", + "yaxis", + "ycalendar", + "yhoverformat", + "yperiod", + "yperiod0", + "yperiodalignment", + "ysrc", + "zorder", + } + + @property + def alignmentgroup(self): + """ + Set several traces linked to the same position axis or matching + axes to the same alignmentgroup. This controls whether bars + compute their positional range dependently or independently. + + The 'alignmentgroup' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["alignmentgroup"] + + @alignmentgroup.setter + def alignmentgroup(self, val): + self["alignmentgroup"] = val + + @property + def base(self): + """ + Sets where the bar base is drawn (in position axis units). In + "stack" or "relative" barmode, traces that set "base" will be + excluded and drawn in "overlay" mode instead. + + The 'base' property accepts values of any type + + Returns + ------- + Any|numpy.ndarray + """ + return self["base"] + + @base.setter + def base(self, val): + self["base"] = val + + @property + def basesrc(self): + """ + Sets the source reference on Chart Studio Cloud for `base`. + + The 'basesrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["basesrc"] + + @basesrc.setter + def basesrc(self, val): + self["basesrc"] = val + + @property + def cliponaxis(self): + """ + Determines whether the text nodes are clipped about the subplot + axes. To show the text nodes above axis lines and tick labels, + make sure to set `xaxis.layer` and `yaxis.layer` to *below + traces*. + + The 'cliponaxis' property is a boolean and must be specified as: + - A boolean value: True or False + + Returns + ------- + bool + """ + return self["cliponaxis"] + + @cliponaxis.setter + def cliponaxis(self, val): + self["cliponaxis"] = val + + @property + def constraintext(self): + """ + Constrain the size of text inside or outside a bar to be no + larger than the bar itself. + + The 'constraintext' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['inside', 'outside', 'both', 'none'] + + Returns + ------- + Any + """ + return self["constraintext"] + + @constraintext.setter + def constraintext(self, val): + self["constraintext"] = val + + @property + def customdata(self): + """ + Assigns extra data each datum. This may be useful when + listening to hover, click and selection events. Note that, + "scatter" traces also appends customdata items in the markers + DOM elements + + The 'customdata' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["customdata"] + + @customdata.setter + def customdata(self, val): + self["customdata"] = val + + @property + def customdatasrc(self): + """ + Sets the source reference on Chart Studio Cloud for + `customdata`. + + The 'customdatasrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["customdatasrc"] + + @customdatasrc.setter + def customdatasrc(self, val): + self["customdatasrc"] = val + + @property + def dx(self): + """ + Sets the x coordinate step. See `x0` for more info. + + The 'dx' property is a number and may be specified as: + - An int or float + + Returns + ------- + int|float + """ + return self["dx"] + + @dx.setter + def dx(self, val): + self["dx"] = val + + @property + def dy(self): + """ + Sets the y coordinate step. See `y0` for more info. + + The 'dy' property is a number and may be specified as: + - An int or float + + Returns + ------- + int|float + """ + return self["dy"] + + @dy.setter + def dy(self, val): + self["dy"] = val + + @property + def error_x(self): + """ + The 'error_x' property is an instance of ErrorX + that may be specified as: + - An instance of :class:`plotly.graph_objs.bar.ErrorX` + - A dict of string/value properties that will be passed + to the ErrorX constructor + + Returns + ------- + plotly.graph_objs.bar.ErrorX + """ + return self["error_x"] + + @error_x.setter + def error_x(self, val): + self["error_x"] = val + + @property + def error_y(self): + """ + The 'error_y' property is an instance of ErrorY + that may be specified as: + - An instance of :class:`plotly.graph_objs.bar.ErrorY` + - A dict of string/value properties that will be passed + to the ErrorY constructor + + Returns + ------- + plotly.graph_objs.bar.ErrorY + """ + return self["error_y"] + + @error_y.setter + def error_y(self, val): + self["error_y"] = val + + @property + def hoverinfo(self): + """ + Determines which trace information appear on hover. If `none` + or `skip` are set, no information is displayed upon hovering. + But, if `none` is set, click and hover events are still fired. + + The 'hoverinfo' property is a flaglist and may be specified + as a string containing: + - Any combination of ['x', 'y', 'z', 'text', 'name'] joined with '+' characters + (e.g. 'x+y') + OR exactly one of ['all', 'none', 'skip'] (e.g. 'skip') + - A list or array of the above + + Returns + ------- + Any|numpy.ndarray + """ + return self["hoverinfo"] + + @hoverinfo.setter + def hoverinfo(self, val): + self["hoverinfo"] = val + + @property + def hoverinfosrc(self): + """ + Sets the source reference on Chart Studio Cloud for + `hoverinfo`. + + The 'hoverinfosrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["hoverinfosrc"] + + @hoverinfosrc.setter + def hoverinfosrc(self, val): + self["hoverinfosrc"] = val + + @property + def hoverlabel(self): + """ + The 'hoverlabel' property is an instance of Hoverlabel + that may be specified as: + - An instance of :class:`plotly.graph_objs.bar.Hoverlabel` + - A dict of string/value properties that will be passed + to the Hoverlabel constructor + + Returns + ------- + plotly.graph_objs.bar.Hoverlabel + """ + return self["hoverlabel"] + + @hoverlabel.setter + def hoverlabel(self, val): + self["hoverlabel"] = val + + @property + def hovertemplate(self): + """ + Template string used for rendering the information that appear + on hover box. Note that this will override `hoverinfo`. + Variables are inserted using %{variable}, for example "y: %{y}" + as well as %{xother}, {%_xother}, {%_xother_}, {%xother_}. When + showing info for several points, "xother" will be added to + those with different x positions from the first point. An + underscore before or after "(x|y)other" will add a space on + that side, only when this field is shown. Numbers are formatted + using d3-format's syntax %{variable:d3-format}, for example + "Price: %{y:$.2f}". + https://github.com/d3/d3-format/tree/v1.4.5#d3-format for + details on the formatting syntax. Dates are formatted using + d3-time-format's syntax %{variable|d3-time-format}, for example + "Day: %{2019-01-01|%A}". https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format for details on the date + formatting syntax. Variables that can't be found will be + replaced with the specifier. For example, a template of "data: + %{x}, %{y}" will result in a value of "data: 1, %{y}" if x is 1 + and y is missing. Variables with an undefined value will be + replaced with the fallback value. The variables available in + `hovertemplate` are the ones emitted as event data described at + this link https://plotly.com/javascript/plotlyjs-events/#event- + data. Additionally, all attributes that can be specified per- + point (the ones that are `arrayOk: true`) are available. + Finally, the template string has access to variables `value` + and `label`. Anything contained in tag `` is displayed + in the secondary box, for example + `%{fullData.name}`. To hide the secondary box + completely, use an empty tag ``. + + The 'hovertemplate' property is a string and must be specified as: + - A string + - A number that will be converted to a string + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["hovertemplate"] + + @hovertemplate.setter + def hovertemplate(self, val): + self["hovertemplate"] = val + + @property + def hovertemplatefallback(self): + """ + Fallback string that's displayed when a variable referenced in + a template is missing. If the boolean value 'false' is passed + in, the specifier with the missing variable will be displayed. + + The 'hovertemplatefallback' property accepts values of any type + + Returns + ------- + Any + """ + return self["hovertemplatefallback"] + + @hovertemplatefallback.setter + def hovertemplatefallback(self, val): + self["hovertemplatefallback"] = val + + @property + def hovertemplatesrc(self): + """ + Sets the source reference on Chart Studio Cloud for + `hovertemplate`. + + The 'hovertemplatesrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["hovertemplatesrc"] + + @hovertemplatesrc.setter + def hovertemplatesrc(self, val): + self["hovertemplatesrc"] = val + + @property + def hovertext(self): + """ + Sets hover text elements associated with each (x,y) pair. If a + single string, the same string appears over all the data + points. If an array of string, the items are mapped in order to + the this trace's (x,y) coordinates. To be seen, trace + `hoverinfo` must contain a "text" flag. + + The 'hovertext' property is a string and must be specified as: + - A string + - A number that will be converted to a string + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["hovertext"] + + @hovertext.setter + def hovertext(self, val): + self["hovertext"] = val + + @property + def hovertextsrc(self): + """ + Sets the source reference on Chart Studio Cloud for + `hovertext`. + + The 'hovertextsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["hovertextsrc"] + + @hovertextsrc.setter + def hovertextsrc(self, val): + self["hovertextsrc"] = val + + @property + def ids(self): + """ + Assigns id labels to each datum. These ids for object constancy + of data points during animation. Should be an array of strings, + not numbers or any other type. + + The 'ids' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["ids"] + + @ids.setter + def ids(self, val): + self["ids"] = val + + @property + def idssrc(self): + """ + Sets the source reference on Chart Studio Cloud for `ids`. + + The 'idssrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["idssrc"] + + @idssrc.setter + def idssrc(self, val): + self["idssrc"] = val + + @property + def insidetextanchor(self): + """ + Determines if texts are kept at center or start/end points in + `textposition` "inside" mode. + + The 'insidetextanchor' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['end', 'middle', 'start'] + + Returns + ------- + Any + """ + return self["insidetextanchor"] + + @insidetextanchor.setter + def insidetextanchor(self, val): + self["insidetextanchor"] = val + + @property + def insidetextfont(self): + """ + Sets the font used for `text` lying inside the bar. + + The 'insidetextfont' property is an instance of Insidetextfont + that may be specified as: + - An instance of :class:`plotly.graph_objs.bar.Insidetextfont` + - A dict of string/value properties that will be passed + to the Insidetextfont constructor + + Returns + ------- + plotly.graph_objs.bar.Insidetextfont + """ + return self["insidetextfont"] + + @insidetextfont.setter + def insidetextfont(self, val): + self["insidetextfont"] = val + + @property + def legend(self): + """ + Sets the reference to a legend to show this trace in. + References to these legends are "legend", "legend2", "legend3", + etc. Settings for these legends are set in the layout, under + `layout.legend`, `layout.legend2`, etc. + + The 'legend' property is an identifier of a particular + subplot, of type 'legend', that may be specified as: + - the string 'legend' optionally followed by an integer >= 1 + (e.g. 'legend', 'legend1', 'legend2', 'legend3', etc.) + + Returns + ------- + str + """ + return self["legend"] + + @legend.setter + def legend(self, val): + self["legend"] = val + + @property + def legendgroup(self): + """ + Sets the legend group for this trace. Traces and shapes part of + the same legend group hide/show at the same time when toggling + legend items. + + The 'legendgroup' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["legendgroup"] + + @legendgroup.setter + def legendgroup(self, val): + self["legendgroup"] = val + + @property + def legendgrouptitle(self): + """ + The 'legendgrouptitle' property is an instance of Legendgrouptitle + that may be specified as: + - An instance of :class:`plotly.graph_objs.bar.Legendgrouptitle` + - A dict of string/value properties that will be passed + to the Legendgrouptitle constructor + + Returns + ------- + plotly.graph_objs.bar.Legendgrouptitle + """ + return self["legendgrouptitle"] + + @legendgrouptitle.setter + def legendgrouptitle(self, val): + self["legendgrouptitle"] = val + + @property + def legendrank(self): + """ + Sets the legend rank for this trace. Items and groups with + smaller ranks are presented on top/left side while with + "reversed" `legend.traceorder` they are on bottom/right side. + The default legendrank is 1000, so that you can use ranks less + than 1000 to place certain items before all unranked items, and + ranks greater than 1000 to go after all unranked items. When + having unranked or equal rank items shapes would be displayed + after traces i.e. according to their order in data and layout. + + The 'legendrank' property is a number and may be specified as: + - An int or float + + Returns + ------- + int|float + """ + return self["legendrank"] + + @legendrank.setter + def legendrank(self, val): + self["legendrank"] = val + + @property + def legendwidth(self): + """ + Sets the width (in px or fraction) of the legend for this + trace. + + The 'legendwidth' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["legendwidth"] + + @legendwidth.setter + def legendwidth(self, val): + self["legendwidth"] = val + + @property + def marker(self): + """ + The 'marker' property is an instance of Marker + that may be specified as: + - An instance of :class:`plotly.graph_objs.bar.Marker` + - A dict of string/value properties that will be passed + to the Marker constructor + + Returns + ------- + plotly.graph_objs.bar.Marker + """ + return self["marker"] + + @marker.setter + def marker(self, val): + self["marker"] = val + + @property + def meta(self): + """ + Assigns extra meta information associated with this trace that + can be used in various text attributes. Attributes such as + trace `name`, graph, axis and colorbar `title.text`, annotation + `text` `rangeselector`, `updatemenues` and `sliders` `label` + text all support `meta`. To access the trace `meta` values in + an attribute in the same trace, simply use `%{meta[i]}` where + `i` is the index or key of the `meta` item in question. To + access trace `meta` in layout attributes, use + `%{data[n[.meta[i]}` where `i` is the index or key of the + `meta` and `n` is the trace index. + + The 'meta' property accepts values of any type + + Returns + ------- + Any|numpy.ndarray + """ + return self["meta"] + + @meta.setter + def meta(self, val): + self["meta"] = val + + @property + def metasrc(self): + """ + Sets the source reference on Chart Studio Cloud for `meta`. + + The 'metasrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["metasrc"] + + @metasrc.setter + def metasrc(self, val): + self["metasrc"] = val + + @property + def name(self): + """ + Sets the trace name. The trace name appears as the legend item + and on hover. + + The 'name' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["name"] + + @name.setter + def name(self, val): + self["name"] = val + + @property + def offset(self): + """ + Shifts the position where the bar is drawn (in position axis + units). In "group" barmode, traces that set "offset" will be + excluded and drawn in "overlay" mode instead. + + The 'offset' property is a number and may be specified as: + - An int or float + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + int|float|numpy.ndarray + """ + return self["offset"] + + @offset.setter + def offset(self, val): + self["offset"] = val + + @property + def offsetgroup(self): + """ + Set several traces linked to the same position axis or matching + axes to the same offsetgroup where bars of the same position + coordinate will line up. + + The 'offsetgroup' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["offsetgroup"] + + @offsetgroup.setter + def offsetgroup(self, val): + self["offsetgroup"] = val + + @property + def offsetsrc(self): + """ + Sets the source reference on Chart Studio Cloud for `offset`. + + The 'offsetsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["offsetsrc"] + + @offsetsrc.setter + def offsetsrc(self, val): + self["offsetsrc"] = val + + @property + def opacity(self): + """ + Sets the opacity of the trace. + + The 'opacity' property is a number and may be specified as: + - An int or float in the interval [0, 1] + + Returns + ------- + int|float + """ + return self["opacity"] + + @opacity.setter + def opacity(self, val): + self["opacity"] = val + + @property + def orientation(self): + """ + Sets the orientation of the bars. With "v" ("h"), the value of + the each bar spans along the vertical (horizontal). + + The 'orientation' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['v', 'h'] + + Returns + ------- + Any + """ + return self["orientation"] + + @orientation.setter + def orientation(self, val): + self["orientation"] = val + + @property + def outsidetextfont(self): + """ + Sets the font used for `text` lying outside the bar. + + The 'outsidetextfont' property is an instance of Outsidetextfont + that may be specified as: + - An instance of :class:`plotly.graph_objs.bar.Outsidetextfont` + - A dict of string/value properties that will be passed + to the Outsidetextfont constructor + + Returns + ------- + plotly.graph_objs.bar.Outsidetextfont + """ + return self["outsidetextfont"] + + @outsidetextfont.setter + def outsidetextfont(self, val): + self["outsidetextfont"] = val + + @property + def selected(self): + """ + The 'selected' property is an instance of Selected + that may be specified as: + - An instance of :class:`plotly.graph_objs.bar.Selected` + - A dict of string/value properties that will be passed + to the Selected constructor + + Returns + ------- + plotly.graph_objs.bar.Selected + """ + return self["selected"] + + @selected.setter + def selected(self, val): + self["selected"] = val + + @property + def selectedpoints(self): + """ + Array containing integer indices of selected points. Has an + effect only for traces that support selections. Note that an + empty array means an empty selection where the `unselected` are + turned on for all points, whereas, any other non-array values + means no selection all where the `selected` and `unselected` + styles have no effect. + + The 'selectedpoints' property accepts values of any type + + Returns + ------- + Any + """ + return self["selectedpoints"] + + @selectedpoints.setter + def selectedpoints(self, val): + self["selectedpoints"] = val + + @property + def showlegend(self): + """ + Determines whether or not an item corresponding to this trace + is shown in the legend. + + The 'showlegend' property is a boolean and must be specified as: + - A boolean value: True or False + + Returns + ------- + bool + """ + return self["showlegend"] + + @showlegend.setter + def showlegend(self, val): + self["showlegend"] = val + + @property + def stream(self): + """ + The 'stream' property is an instance of Stream + that may be specified as: + - An instance of :class:`plotly.graph_objs.bar.Stream` + - A dict of string/value properties that will be passed + to the Stream constructor + + Returns + ------- + plotly.graph_objs.bar.Stream + """ + return self["stream"] + + @stream.setter + def stream(self, val): + self["stream"] = val + + @property + def text(self): + """ + Sets text elements associated with each (x,y) pair. If a single + string, the same string appears over all the data points. If an + array of string, the items are mapped in order to the this + trace's (x,y) coordinates. If trace `hoverinfo` contains a + "text" flag and "hovertext" is not set, these elements will be + seen in the hover labels. + + The 'text' property is a string and must be specified as: + - A string + - A number that will be converted to a string + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["text"] + + @text.setter + def text(self, val): + self["text"] = val + + @property + def textangle(self): + """ + Sets the angle of the tick labels with respect to the bar. For + example, a `tickangle` of -90 draws the tick labels vertically. + With "auto" the texts may automatically be rotated to fit with + the maximum size in bars. + + The 'textangle' property is a angle (in degrees) that may be + specified as a number between -180 and 180. + Numeric values outside this range are converted to the equivalent value + (e.g. 270 is converted to -90). + + Returns + ------- + int|float + """ + return self["textangle"] + + @textangle.setter + def textangle(self, val): + self["textangle"] = val + + @property + def textfont(self): + """ + Sets the font used for `text`. + + The 'textfont' property is an instance of Textfont + that may be specified as: + - An instance of :class:`plotly.graph_objs.bar.Textfont` + - A dict of string/value properties that will be passed + to the Textfont constructor + + Returns + ------- + plotly.graph_objs.bar.Textfont + """ + return self["textfont"] + + @textfont.setter + def textfont(self, val): + self["textfont"] = val + + @property + def textposition(self): + """ + Specifies the location of the `text`. "inside" positions `text` + inside, next to the bar end (rotated and scaled if needed). + "outside" positions `text` outside, next to the bar end (scaled + if needed), unless there is another bar stacked on this one, + then the text gets pushed inside. "auto" tries to position + `text` inside the bar, but if the bar is too small and no bar + is stacked on this one the text is moved outside. If "none", no + text appears. + + The 'textposition' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['inside', 'outside', 'auto', 'none'] + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + Any|numpy.ndarray + """ + return self["textposition"] + + @textposition.setter + def textposition(self, val): + self["textposition"] = val + + @property + def textpositionsrc(self): + """ + Sets the source reference on Chart Studio Cloud for + `textposition`. + + The 'textpositionsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["textpositionsrc"] + + @textpositionsrc.setter + def textpositionsrc(self, val): + self["textpositionsrc"] = val + + @property + def textsrc(self): + """ + Sets the source reference on Chart Studio Cloud for `text`. + + The 'textsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["textsrc"] + + @textsrc.setter + def textsrc(self, val): + self["textsrc"] = val + + @property + def texttemplate(self): + """ + Template string used for rendering the information text that + appears on points. Note that this will override `textinfo`. + Variables are inserted using %{variable}, for example "y: + %{y}". Numbers are formatted using d3-format's syntax + %{variable:d3-format}, for example "Price: %{y:$.2f}". + https://github.com/d3/d3-format/tree/v1.4.5#d3-format for + details on the formatting syntax. Dates are formatted using + d3-time-format's syntax %{variable|d3-time-format}, for example + "Day: %{2019-01-01|%A}". https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format for details on the date + formatting syntax. Variables that can't be found will be + replaced with the specifier. For example, a template of "data: + %{x}, %{y}" will result in a value of "data: 1, %{y}" if x is 1 + and y is missing. Variables with an undefined value will be + replaced with the fallback value. All attributes that can be + specified per-point (the ones that are `arrayOk: true`) are + available. Finally, the template string has access to variables + `value` and `label`. + + The 'texttemplate' property is a string and must be specified as: + - A string + - A number that will be converted to a string + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["texttemplate"] + + @texttemplate.setter + def texttemplate(self, val): + self["texttemplate"] = val + + @property + def texttemplatefallback(self): + """ + Fallback string that's displayed when a variable referenced in + a template is missing. If the boolean value 'false' is passed + in, the specifier with the missing variable will be displayed. + + The 'texttemplatefallback' property accepts values of any type + + Returns + ------- + Any + """ + return self["texttemplatefallback"] + + @texttemplatefallback.setter + def texttemplatefallback(self, val): + self["texttemplatefallback"] = val + + @property + def texttemplatesrc(self): + """ + Sets the source reference on Chart Studio Cloud for + `texttemplate`. + + The 'texttemplatesrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["texttemplatesrc"] + + @texttemplatesrc.setter + def texttemplatesrc(self, val): + self["texttemplatesrc"] = val + + @property + def uid(self): + """ + Assign an id to this trace, Use this to provide object + constancy between traces during animations and transitions. + + The 'uid' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["uid"] + + @uid.setter + def uid(self, val): + self["uid"] = val + + @property + def uirevision(self): + """ + Controls persistence of some user-driven changes to the trace: + `constraintrange` in `parcoords` traces, as well as some + `editable: true` modifications such as `name` and + `colorbar.title`. Defaults to `layout.uirevision`. Note that + other user-driven trace attribute changes are controlled by + `layout` attributes: `trace.visible` is controlled by + `layout.legend.uirevision`, `selectedpoints` is controlled by + `layout.selectionrevision`, and `colorbar.(x|y)` (accessible + with `config: {editable: true}`) is controlled by + `layout.editrevision`. Trace changes are tracked by `uid`, + which only falls back on trace index if no `uid` is provided. + So if your app can add/remove traces before the end of the + `data` array, such that the same trace has a different index, + you can still preserve user-driven changes if you give each + trace a `uid` that stays with it as it moves. + + The 'uirevision' property accepts values of any type + + Returns + ------- + Any + """ + return self["uirevision"] + + @uirevision.setter + def uirevision(self, val): + self["uirevision"] = val + + @property + def unselected(self): + """ + The 'unselected' property is an instance of Unselected + that may be specified as: + - An instance of :class:`plotly.graph_objs.bar.Unselected` + - A dict of string/value properties that will be passed + to the Unselected constructor + + Returns + ------- + plotly.graph_objs.bar.Unselected + """ + return self["unselected"] + + @unselected.setter + def unselected(self, val): + self["unselected"] = val + + @property + def visible(self): + """ + Determines whether or not this trace is visible. If + "legendonly", the trace is not drawn, but can appear as a + legend item (provided that the legend itself is visible). + + The 'visible' property is an enumeration that may be specified as: + - One of the following enumeration values: + [True, False, 'legendonly'] + + Returns + ------- + Any + """ + return self["visible"] + + @visible.setter + def visible(self, val): + self["visible"] = val + + @property + def width(self): + """ + Sets the bar width (in position axis units). + + The 'width' property is a number and may be specified as: + - An int or float in the interval [0, inf] + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + int|float|numpy.ndarray + """ + return self["width"] + + @width.setter + def width(self, val): + self["width"] = val + + @property + def widthsrc(self): + """ + Sets the source reference on Chart Studio Cloud for `width`. + + The 'widthsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["widthsrc"] + + @widthsrc.setter + def widthsrc(self, val): + self["widthsrc"] = val + + @property + def x(self): + """ + Sets the x coordinates. + + The 'x' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["x"] + + @x.setter + def x(self, val): + self["x"] = val + + @property + def x0(self): + """ + Alternate to `x`. Builds a linear space of x coordinates. Use + with `dx` where `x0` is the starting coordinate and `dx` the + step. + + The 'x0' property accepts values of any type + + Returns + ------- + Any + """ + return self["x0"] + + @x0.setter + def x0(self, val): + self["x0"] = val + + @property + def xaxis(self): + """ + Sets a reference between this trace's x coordinates and a 2D + cartesian x axis. If "x" (the default value), the x coordinates + refer to `layout.xaxis`. If "x2", the x coordinates refer to + `layout.xaxis2`, and so on. + + The 'xaxis' property is an identifier of a particular + subplot, of type 'x', that may be specified as: + - the string 'x' optionally followed by an integer >= 1 + (e.g. 'x', 'x1', 'x2', 'x3', etc.) + + Returns + ------- + str + """ + return self["xaxis"] + + @xaxis.setter + def xaxis(self, val): + self["xaxis"] = val + + @property + def xcalendar(self): + """ + Sets the calendar system to use with `x` date data. + + The 'xcalendar' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['chinese', 'coptic', 'discworld', 'ethiopian', + 'gregorian', 'hebrew', 'islamic', 'jalali', 'julian', + 'mayan', 'nanakshahi', 'nepali', 'persian', 'taiwan', + 'thai', 'ummalqura'] + + Returns + ------- + Any + """ + return self["xcalendar"] + + @xcalendar.setter + def xcalendar(self, val): + self["xcalendar"] = val + + @property + def xhoverformat(self): + """ + Sets the hover text formatting rulefor `x` using d3 formatting + mini-languages which are very similar to those in Python. For + numbers, see: + https://github.com/d3/d3-format/tree/v1.4.5#d3-format. And for + dates see: https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format. We add two items to d3's date + formatter: "%h" for half of the year as a decimal number as + well as "%{n}f" for fractional seconds with n digits. For + example, *2016-10-13 09:15:23.456* with tickformat + "%H~%M~%S.%2f" would display *09~15~23.46*By default the values + are formatted using `xaxis.hoverformat`. + + The 'xhoverformat' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["xhoverformat"] + + @xhoverformat.setter + def xhoverformat(self, val): + self["xhoverformat"] = val + + @property + def xperiod(self): + """ + Only relevant when the axis `type` is "date". Sets the period + positioning in milliseconds or "M" on the x axis. Special + values in the form of "M" could be used to declare the + number of months. In this case `n` must be a positive integer. + + The 'xperiod' property accepts values of any type + + Returns + ------- + Any + """ + return self["xperiod"] + + @xperiod.setter + def xperiod(self, val): + self["xperiod"] = val + + @property + def xperiod0(self): + """ + Only relevant when the axis `type` is "date". Sets the base for + period positioning in milliseconds or date string on the x0 + axis. When `x0period` is round number of weeks, the `x0period0` + by default would be on a Sunday i.e. 2000-01-02, otherwise it + would be at 2000-01-01. + + The 'xperiod0' property accepts values of any type + + Returns + ------- + Any + """ + return self["xperiod0"] + + @xperiod0.setter + def xperiod0(self, val): + self["xperiod0"] = val + + @property + def xperiodalignment(self): + """ + Only relevant when the axis `type` is "date". Sets the + alignment of data points on the x axis. + + The 'xperiodalignment' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['start', 'middle', 'end'] + + Returns + ------- + Any + """ + return self["xperiodalignment"] + + @xperiodalignment.setter + def xperiodalignment(self, val): + self["xperiodalignment"] = val + + @property + def xsrc(self): + """ + Sets the source reference on Chart Studio Cloud for `x`. + + The 'xsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["xsrc"] + + @xsrc.setter + def xsrc(self, val): + self["xsrc"] = val + + @property + def y(self): + """ + Sets the y coordinates. + + The 'y' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["y"] + + @y.setter + def y(self, val): + self["y"] = val + + @property + def y0(self): + """ + Alternate to `y`. Builds a linear space of y coordinates. Use + with `dy` where `y0` is the starting coordinate and `dy` the + step. + + The 'y0' property accepts values of any type + + Returns + ------- + Any + """ + return self["y0"] + + @y0.setter + def y0(self, val): + self["y0"] = val + + @property + def yaxis(self): + """ + Sets a reference between this trace's y coordinates and a 2D + cartesian y axis. If "y" (the default value), the y coordinates + refer to `layout.yaxis`. If "y2", the y coordinates refer to + `layout.yaxis2`, and so on. + + The 'yaxis' property is an identifier of a particular + subplot, of type 'y', that may be specified as: + - the string 'y' optionally followed by an integer >= 1 + (e.g. 'y', 'y1', 'y2', 'y3', etc.) + + Returns + ------- + str + """ + return self["yaxis"] + + @yaxis.setter + def yaxis(self, val): + self["yaxis"] = val + + @property + def ycalendar(self): + """ + Sets the calendar system to use with `y` date data. + + The 'ycalendar' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['chinese', 'coptic', 'discworld', 'ethiopian', + 'gregorian', 'hebrew', 'islamic', 'jalali', 'julian', + 'mayan', 'nanakshahi', 'nepali', 'persian', 'taiwan', + 'thai', 'ummalqura'] + + Returns + ------- + Any + """ + return self["ycalendar"] + + @ycalendar.setter + def ycalendar(self, val): + self["ycalendar"] = val + + @property + def yhoverformat(self): + """ + Sets the hover text formatting rulefor `y` using d3 formatting + mini-languages which are very similar to those in Python. For + numbers, see: + https://github.com/d3/d3-format/tree/v1.4.5#d3-format. And for + dates see: https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format. We add two items to d3's date + formatter: "%h" for half of the year as a decimal number as + well as "%{n}f" for fractional seconds with n digits. For + example, *2016-10-13 09:15:23.456* with tickformat + "%H~%M~%S.%2f" would display *09~15~23.46*By default the values + are formatted using `yaxis.hoverformat`. + + The 'yhoverformat' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["yhoverformat"] + + @yhoverformat.setter + def yhoverformat(self, val): + self["yhoverformat"] = val + + @property + def yperiod(self): + """ + Only relevant when the axis `type` is "date". Sets the period + positioning in milliseconds or "M" on the y axis. Special + values in the form of "M" could be used to declare the + number of months. In this case `n` must be a positive integer. + + The 'yperiod' property accepts values of any type + + Returns + ------- + Any + """ + return self["yperiod"] + + @yperiod.setter + def yperiod(self, val): + self["yperiod"] = val + + @property + def yperiod0(self): + """ + Only relevant when the axis `type` is "date". Sets the base for + period positioning in milliseconds or date string on the y0 + axis. When `y0period` is round number of weeks, the `y0period0` + by default would be on a Sunday i.e. 2000-01-02, otherwise it + would be at 2000-01-01. + + The 'yperiod0' property accepts values of any type + + Returns + ------- + Any + """ + return self["yperiod0"] + + @yperiod0.setter + def yperiod0(self, val): + self["yperiod0"] = val + + @property + def yperiodalignment(self): + """ + Only relevant when the axis `type` is "date". Sets the + alignment of data points on the y axis. + + The 'yperiodalignment' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['start', 'middle', 'end'] + + Returns + ------- + Any + """ + return self["yperiodalignment"] + + @yperiodalignment.setter + def yperiodalignment(self, val): + self["yperiodalignment"] = val + + @property + def ysrc(self): + """ + Sets the source reference on Chart Studio Cloud for `y`. + + The 'ysrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["ysrc"] + + @ysrc.setter + def ysrc(self, val): + self["ysrc"] = val + + @property + def zorder(self): + """ + Sets the layer on which this trace is displayed, relative to + other SVG traces on the same subplot. SVG traces with higher + `zorder` appear in front of those with lower `zorder`. + + The 'zorder' property is a integer and may be specified as: + - An int (or float that will be cast to an int) + + Returns + ------- + int + """ + return self["zorder"] + + @zorder.setter + def zorder(self, val): + self["zorder"] = val + + @property + def type(self): + return self._props["type"] + + @property + def _prop_descriptions(self): + return """\ + alignmentgroup + Set several traces linked to the same position axis or + matching axes to the same alignmentgroup. This controls + whether bars compute their positional range dependently + or independently. + base + Sets where the bar base is drawn (in position axis + units). In "stack" or "relative" barmode, traces that + set "base" will be excluded and drawn in "overlay" mode + instead. + basesrc + Sets the source reference on Chart Studio Cloud for + `base`. + cliponaxis + Determines whether the text nodes are clipped about the + subplot axes. To show the text nodes above axis lines + and tick labels, make sure to set `xaxis.layer` and + `yaxis.layer` to *below traces*. + constraintext + Constrain the size of text inside or outside a bar to + be no larger than the bar itself. + customdata + Assigns extra data each datum. This may be useful when + listening to hover, click and selection events. Note + that, "scatter" traces also appends customdata items in + the markers DOM elements + customdatasrc + Sets the source reference on Chart Studio Cloud for + `customdata`. + dx + Sets the x coordinate step. See `x0` for more info. + dy + Sets the y coordinate step. See `y0` for more info. + error_x + :class:`plotly.graph_objects.bar.ErrorX` instance or + dict with compatible properties + error_y + :class:`plotly.graph_objects.bar.ErrorY` instance or + dict with compatible properties + hoverinfo + Determines which trace information appear on hover. If + `none` or `skip` are set, no information is displayed + upon hovering. But, if `none` is set, click and hover + events are still fired. + hoverinfosrc + Sets the source reference on Chart Studio Cloud for + `hoverinfo`. + hoverlabel + :class:`plotly.graph_objects.bar.Hoverlabel` instance + or dict with compatible properties + hovertemplate + Template string used for rendering the information that + appear on hover box. Note that this will override + `hoverinfo`. Variables are inserted using %{variable}, + for example "y: %{y}" as well as %{xother}, {%_xother}, + {%_xother_}, {%xother_}. When showing info for several + points, "xother" will be added to those with different + x positions from the first point. An underscore before + or after "(x|y)other" will add a space on that side, + only when this field is shown. Numbers are formatted + using d3-format's syntax %{variable:d3-format}, for + example "Price: %{y:$.2f}". + https://github.com/d3/d3-format/tree/v1.4.5#d3-format + for details on the formatting syntax. Dates are + formatted using d3-time-format's syntax + %{variable|d3-time-format}, for example "Day: + %{2019-01-01|%A}". https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format for details on the + date formatting syntax. Variables that can't be found + will be replaced with the specifier. For example, a + template of "data: %{x}, %{y}" will result in a value + of "data: 1, %{y}" if x is 1 and y is missing. + Variables with an undefined value will be replaced with + the fallback value. The variables available in + `hovertemplate` are the ones emitted as event data + described at this link + https://plotly.com/javascript/plotlyjs-events/#event- + data. Additionally, all attributes that can be + specified per-point (the ones that are `arrayOk: true`) + are available. Finally, the template string has access + to variables `value` and `label`. Anything contained in + tag `` is displayed in the secondary box, for + example `%{fullData.name}`. To hide the + secondary box completely, use an empty tag + ``. + hovertemplatefallback + Fallback string that's displayed when a variable + referenced in a template is missing. If the boolean + value 'false' is passed in, the specifier with the + missing variable will be displayed. + hovertemplatesrc + Sets the source reference on Chart Studio Cloud for + `hovertemplate`. + hovertext + Sets hover text elements associated with each (x,y) + pair. If a single string, the same string appears over + all the data points. If an array of string, the items + are mapped in order to the this trace's (x,y) + coordinates. To be seen, trace `hoverinfo` must contain + a "text" flag. + hovertextsrc + Sets the source reference on Chart Studio Cloud for + `hovertext`. + ids + Assigns id labels to each datum. These ids for object + constancy of data points during animation. Should be an + array of strings, not numbers or any other type. + idssrc + Sets the source reference on Chart Studio Cloud for + `ids`. + insidetextanchor + Determines if texts are kept at center or start/end + points in `textposition` "inside" mode. + insidetextfont + Sets the font used for `text` lying inside the bar. + legend + Sets the reference to a legend to show this trace in. + References to these legends are "legend", "legend2", + "legend3", etc. Settings for these legends are set in + the layout, under `layout.legend`, `layout.legend2`, + etc. + legendgroup + Sets the legend group for this trace. Traces and shapes + part of the same legend group hide/show at the same + time when toggling legend items. + legendgrouptitle + :class:`plotly.graph_objects.bar.Legendgrouptitle` + instance or dict with compatible properties + legendrank + Sets the legend rank for this trace. Items and groups + with smaller ranks are presented on top/left side while + with "reversed" `legend.traceorder` they are on + bottom/right side. The default legendrank is 1000, so + that you can use ranks less than 1000 to place certain + items before all unranked items, and ranks greater than + 1000 to go after all unranked items. When having + unranked or equal rank items shapes would be displayed + after traces i.e. according to their order in data and + layout. + legendwidth + Sets the width (in px or fraction) of the legend for + this trace. + marker + :class:`plotly.graph_objects.bar.Marker` instance or + dict with compatible properties + meta + Assigns extra meta information associated with this + trace that can be used in various text attributes. + Attributes such as trace `name`, graph, axis and + colorbar `title.text`, annotation `text` + `rangeselector`, `updatemenues` and `sliders` `label` + text all support `meta`. To access the trace `meta` + values in an attribute in the same trace, simply use + `%{meta[i]}` where `i` is the index or key of the + `meta` item in question. To access trace `meta` in + layout attributes, use `%{data[n[.meta[i]}` where `i` + is the index or key of the `meta` and `n` is the trace + index. + metasrc + Sets the source reference on Chart Studio Cloud for + `meta`. + name + Sets the trace name. The trace name appears as the + legend item and on hover. + offset + Shifts the position where the bar is drawn (in position + axis units). In "group" barmode, traces that set + "offset" will be excluded and drawn in "overlay" mode + instead. + offsetgroup + Set several traces linked to the same position axis or + matching axes to the same offsetgroup where bars of the + same position coordinate will line up. + offsetsrc + Sets the source reference on Chart Studio Cloud for + `offset`. + opacity + Sets the opacity of the trace. + orientation + Sets the orientation of the bars. With "v" ("h"), the + value of the each bar spans along the vertical + (horizontal). + outsidetextfont + Sets the font used for `text` lying outside the bar. + selected + :class:`plotly.graph_objects.bar.Selected` instance or + dict with compatible properties + selectedpoints + Array containing integer indices of selected points. + Has an effect only for traces that support selections. + Note that an empty array means an empty selection where + the `unselected` are turned on for all points, whereas, + any other non-array values means no selection all where + the `selected` and `unselected` styles have no effect. + showlegend + Determines whether or not an item corresponding to this + trace is shown in the legend. + stream + :class:`plotly.graph_objects.bar.Stream` instance or + dict with compatible properties + text + Sets text elements associated with each (x,y) pair. If + a single string, the same string appears over all the + data points. If an array of string, the items are + mapped in order to the this trace's (x,y) coordinates. + If trace `hoverinfo` contains a "text" flag and + "hovertext" is not set, these elements will be seen in + the hover labels. + textangle + Sets the angle of the tick labels with respect to the + bar. For example, a `tickangle` of -90 draws the tick + labels vertically. With "auto" the texts may + automatically be rotated to fit with the maximum size + in bars. + textfont + Sets the font used for `text`. + textposition + Specifies the location of the `text`. "inside" + positions `text` inside, next to the bar end (rotated + and scaled if needed). "outside" positions `text` + outside, next to the bar end (scaled if needed), unless + there is another bar stacked on this one, then the text + gets pushed inside. "auto" tries to position `text` + inside the bar, but if the bar is too small and no bar + is stacked on this one the text is moved outside. If + "none", no text appears. + textpositionsrc + Sets the source reference on Chart Studio Cloud for + `textposition`. + textsrc + Sets the source reference on Chart Studio Cloud for + `text`. + texttemplate + Template string used for rendering the information text + that appears on points. Note that this will override + `textinfo`. Variables are inserted using %{variable}, + for example "y: %{y}". Numbers are formatted using + d3-format's syntax %{variable:d3-format}, for example + "Price: %{y:$.2f}". + https://github.com/d3/d3-format/tree/v1.4.5#d3-format + for details on the formatting syntax. Dates are + formatted using d3-time-format's syntax + %{variable|d3-time-format}, for example "Day: + %{2019-01-01|%A}". https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format for details on the + date formatting syntax. Variables that can't be found + will be replaced with the specifier. For example, a + template of "data: %{x}, %{y}" will result in a value + of "data: 1, %{y}" if x is 1 and y is missing. + Variables with an undefined value will be replaced with + the fallback value. All attributes that can be + specified per-point (the ones that are `arrayOk: true`) + are available. Finally, the template string has access + to variables `value` and `label`. + texttemplatefallback + Fallback string that's displayed when a variable + referenced in a template is missing. If the boolean + value 'false' is passed in, the specifier with the + missing variable will be displayed. + texttemplatesrc + Sets the source reference on Chart Studio Cloud for + `texttemplate`. + uid + Assign an id to this trace, Use this to provide object + constancy between traces during animations and + transitions. + uirevision + Controls persistence of some user-driven changes to the + trace: `constraintrange` in `parcoords` traces, as well + as some `editable: true` modifications such as `name` + and `colorbar.title`. Defaults to `layout.uirevision`. + Note that other user-driven trace attribute changes are + controlled by `layout` attributes: `trace.visible` is + controlled by `layout.legend.uirevision`, + `selectedpoints` is controlled by + `layout.selectionrevision`, and `colorbar.(x|y)` + (accessible with `config: {editable: true}`) is + controlled by `layout.editrevision`. Trace changes are + tracked by `uid`, which only falls back on trace index + if no `uid` is provided. So if your app can add/remove + traces before the end of the `data` array, such that + the same trace has a different index, you can still + preserve user-driven changes if you give each trace a + `uid` that stays with it as it moves. + unselected + :class:`plotly.graph_objects.bar.Unselected` instance + or dict with compatible properties + visible + Determines whether or not this trace is visible. If + "legendonly", the trace is not drawn, but can appear as + a legend item (provided that the legend itself is + visible). + width + Sets the bar width (in position axis units). + widthsrc + Sets the source reference on Chart Studio Cloud for + `width`. + x + Sets the x coordinates. + x0 + Alternate to `x`. Builds a linear space of x + coordinates. Use with `dx` where `x0` is the starting + coordinate and `dx` the step. + xaxis + Sets a reference between this trace's x coordinates and + a 2D cartesian x axis. If "x" (the default value), the + x coordinates refer to `layout.xaxis`. If "x2", the x + coordinates refer to `layout.xaxis2`, and so on. + xcalendar + Sets the calendar system to use with `x` date data. + xhoverformat + Sets the hover text formatting rulefor `x` using d3 + formatting mini-languages which are very similar to + those in Python. For numbers, see: + https://github.com/d3/d3-format/tree/v1.4.5#d3-format. + And for dates see: https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format. We add two items to + d3's date formatter: "%h" for half of the year as a + decimal number as well as "%{n}f" for fractional + seconds with n digits. For example, *2016-10-13 + 09:15:23.456* with tickformat "%H~%M~%S.%2f" would + display *09~15~23.46*By default the values are + formatted using `xaxis.hoverformat`. + xperiod + Only relevant when the axis `type` is "date". Sets the + period positioning in milliseconds or "M" on the x + axis. Special values in the form of "M" could be + used to declare the number of months. In this case `n` + must be a positive integer. + xperiod0 + Only relevant when the axis `type` is "date". Sets the + base for period positioning in milliseconds or date + string on the x0 axis. When `x0period` is round number + of weeks, the `x0period0` by default would be on a + Sunday i.e. 2000-01-02, otherwise it would be at + 2000-01-01. + xperiodalignment + Only relevant when the axis `type` is "date". Sets the + alignment of data points on the x axis. + xsrc + Sets the source reference on Chart Studio Cloud for + `x`. + y + Sets the y coordinates. + y0 + Alternate to `y`. Builds a linear space of y + coordinates. Use with `dy` where `y0` is the starting + coordinate and `dy` the step. + yaxis + Sets a reference between this trace's y coordinates and + a 2D cartesian y axis. If "y" (the default value), the + y coordinates refer to `layout.yaxis`. If "y2", the y + coordinates refer to `layout.yaxis2`, and so on. + ycalendar + Sets the calendar system to use with `y` date data. + yhoverformat + Sets the hover text formatting rulefor `y` using d3 + formatting mini-languages which are very similar to + those in Python. For numbers, see: + https://github.com/d3/d3-format/tree/v1.4.5#d3-format. + And for dates see: https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format. We add two items to + d3's date formatter: "%h" for half of the year as a + decimal number as well as "%{n}f" for fractional + seconds with n digits. For example, *2016-10-13 + 09:15:23.456* with tickformat "%H~%M~%S.%2f" would + display *09~15~23.46*By default the values are + formatted using `yaxis.hoverformat`. + yperiod + Only relevant when the axis `type` is "date". Sets the + period positioning in milliseconds or "M" on the y + axis. Special values in the form of "M" could be + used to declare the number of months. In this case `n` + must be a positive integer. + yperiod0 + Only relevant when the axis `type` is "date". Sets the + base for period positioning in milliseconds or date + string on the y0 axis. When `y0period` is round number + of weeks, the `y0period0` by default would be on a + Sunday i.e. 2000-01-02, otherwise it would be at + 2000-01-01. + yperiodalignment + Only relevant when the axis `type` is "date". Sets the + alignment of data points on the y axis. + ysrc + Sets the source reference on Chart Studio Cloud for + `y`. + zorder + Sets the layer on which this trace is displayed, + relative to other SVG traces on the same subplot. SVG + traces with higher `zorder` appear in front of those + with lower `zorder`. + """ + + def __init__( + self, + arg=None, + alignmentgroup=None, + base=None, + basesrc=None, + cliponaxis=None, + constraintext=None, + customdata=None, + customdatasrc=None, + dx=None, + dy=None, + error_x=None, + error_y=None, + hoverinfo=None, + hoverinfosrc=None, + hoverlabel=None, + hovertemplate=None, + hovertemplatefallback=None, + hovertemplatesrc=None, + hovertext=None, + hovertextsrc=None, + ids=None, + idssrc=None, + insidetextanchor=None, + insidetextfont=None, + legend=None, + legendgroup=None, + legendgrouptitle=None, + legendrank=None, + legendwidth=None, + marker=None, + meta=None, + metasrc=None, + name=None, + offset=None, + offsetgroup=None, + offsetsrc=None, + opacity=None, + orientation=None, + outsidetextfont=None, + selected=None, + selectedpoints=None, + showlegend=None, + stream=None, + text=None, + textangle=None, + textfont=None, + textposition=None, + textpositionsrc=None, + textsrc=None, + texttemplate=None, + texttemplatefallback=None, + texttemplatesrc=None, + uid=None, + uirevision=None, + unselected=None, + visible=None, + width=None, + widthsrc=None, + x=None, + x0=None, + xaxis=None, + xcalendar=None, + xhoverformat=None, + xperiod=None, + xperiod0=None, + xperiodalignment=None, + xsrc=None, + y=None, + y0=None, + yaxis=None, + ycalendar=None, + yhoverformat=None, + yperiod=None, + yperiod0=None, + yperiodalignment=None, + ysrc=None, + zorder=None, + **kwargs, + ): + """ + Construct a new Bar object + + The data visualized by the span of the bars is set in `y` if + `orientation` is set to "v" (the default) and the labels are + set in `x`. By setting `orientation` to "h", the roles are + interchanged. + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of :class:`plotly.graph_objs.Bar` + alignmentgroup + Set several traces linked to the same position axis or + matching axes to the same alignmentgroup. This controls + whether bars compute their positional range dependently + or independently. + base + Sets where the bar base is drawn (in position axis + units). In "stack" or "relative" barmode, traces that + set "base" will be excluded and drawn in "overlay" mode + instead. + basesrc + Sets the source reference on Chart Studio Cloud for + `base`. + cliponaxis + Determines whether the text nodes are clipped about the + subplot axes. To show the text nodes above axis lines + and tick labels, make sure to set `xaxis.layer` and + `yaxis.layer` to *below traces*. + constraintext + Constrain the size of text inside or outside a bar to + be no larger than the bar itself. + customdata + Assigns extra data each datum. This may be useful when + listening to hover, click and selection events. Note + that, "scatter" traces also appends customdata items in + the markers DOM elements + customdatasrc + Sets the source reference on Chart Studio Cloud for + `customdata`. + dx + Sets the x coordinate step. See `x0` for more info. + dy + Sets the y coordinate step. See `y0` for more info. + error_x + :class:`plotly.graph_objects.bar.ErrorX` instance or + dict with compatible properties + error_y + :class:`plotly.graph_objects.bar.ErrorY` instance or + dict with compatible properties + hoverinfo + Determines which trace information appear on hover. If + `none` or `skip` are set, no information is displayed + upon hovering. But, if `none` is set, click and hover + events are still fired. + hoverinfosrc + Sets the source reference on Chart Studio Cloud for + `hoverinfo`. + hoverlabel + :class:`plotly.graph_objects.bar.Hoverlabel` instance + or dict with compatible properties + hovertemplate + Template string used for rendering the information that + appear on hover box. Note that this will override + `hoverinfo`. Variables are inserted using %{variable}, + for example "y: %{y}" as well as %{xother}, {%_xother}, + {%_xother_}, {%xother_}. When showing info for several + points, "xother" will be added to those with different + x positions from the first point. An underscore before + or after "(x|y)other" will add a space on that side, + only when this field is shown. Numbers are formatted + using d3-format's syntax %{variable:d3-format}, for + example "Price: %{y:$.2f}". + https://github.com/d3/d3-format/tree/v1.4.5#d3-format + for details on the formatting syntax. Dates are + formatted using d3-time-format's syntax + %{variable|d3-time-format}, for example "Day: + %{2019-01-01|%A}". https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format for details on the + date formatting syntax. Variables that can't be found + will be replaced with the specifier. For example, a + template of "data: %{x}, %{y}" will result in a value + of "data: 1, %{y}" if x is 1 and y is missing. + Variables with an undefined value will be replaced with + the fallback value. The variables available in + `hovertemplate` are the ones emitted as event data + described at this link + https://plotly.com/javascript/plotlyjs-events/#event- + data. Additionally, all attributes that can be + specified per-point (the ones that are `arrayOk: true`) + are available. Finally, the template string has access + to variables `value` and `label`. Anything contained in + tag `` is displayed in the secondary box, for + example `%{fullData.name}`. To hide the + secondary box completely, use an empty tag + ``. + hovertemplatefallback + Fallback string that's displayed when a variable + referenced in a template is missing. If the boolean + value 'false' is passed in, the specifier with the + missing variable will be displayed. + hovertemplatesrc + Sets the source reference on Chart Studio Cloud for + `hovertemplate`. + hovertext + Sets hover text elements associated with each (x,y) + pair. If a single string, the same string appears over + all the data points. If an array of string, the items + are mapped in order to the this trace's (x,y) + coordinates. To be seen, trace `hoverinfo` must contain + a "text" flag. + hovertextsrc + Sets the source reference on Chart Studio Cloud for + `hovertext`. + ids + Assigns id labels to each datum. These ids for object + constancy of data points during animation. Should be an + array of strings, not numbers or any other type. + idssrc + Sets the source reference on Chart Studio Cloud for + `ids`. + insidetextanchor + Determines if texts are kept at center or start/end + points in `textposition` "inside" mode. + insidetextfont + Sets the font used for `text` lying inside the bar. + legend + Sets the reference to a legend to show this trace in. + References to these legends are "legend", "legend2", + "legend3", etc. Settings for these legends are set in + the layout, under `layout.legend`, `layout.legend2`, + etc. + legendgroup + Sets the legend group for this trace. Traces and shapes + part of the same legend group hide/show at the same + time when toggling legend items. + legendgrouptitle + :class:`plotly.graph_objects.bar.Legendgrouptitle` + instance or dict with compatible properties + legendrank + Sets the legend rank for this trace. Items and groups + with smaller ranks are presented on top/left side while + with "reversed" `legend.traceorder` they are on + bottom/right side. The default legendrank is 1000, so + that you can use ranks less than 1000 to place certain + items before all unranked items, and ranks greater than + 1000 to go after all unranked items. When having + unranked or equal rank items shapes would be displayed + after traces i.e. according to their order in data and + layout. + legendwidth + Sets the width (in px or fraction) of the legend for + this trace. + marker + :class:`plotly.graph_objects.bar.Marker` instance or + dict with compatible properties + meta + Assigns extra meta information associated with this + trace that can be used in various text attributes. + Attributes such as trace `name`, graph, axis and + colorbar `title.text`, annotation `text` + `rangeselector`, `updatemenues` and `sliders` `label` + text all support `meta`. To access the trace `meta` + values in an attribute in the same trace, simply use + `%{meta[i]}` where `i` is the index or key of the + `meta` item in question. To access trace `meta` in + layout attributes, use `%{data[n[.meta[i]}` where `i` + is the index or key of the `meta` and `n` is the trace + index. + metasrc + Sets the source reference on Chart Studio Cloud for + `meta`. + name + Sets the trace name. The trace name appears as the + legend item and on hover. + offset + Shifts the position where the bar is drawn (in position + axis units). In "group" barmode, traces that set + "offset" will be excluded and drawn in "overlay" mode + instead. + offsetgroup + Set several traces linked to the same position axis or + matching axes to the same offsetgroup where bars of the + same position coordinate will line up. + offsetsrc + Sets the source reference on Chart Studio Cloud for + `offset`. + opacity + Sets the opacity of the trace. + orientation + Sets the orientation of the bars. With "v" ("h"), the + value of the each bar spans along the vertical + (horizontal). + outsidetextfont + Sets the font used for `text` lying outside the bar. + selected + :class:`plotly.graph_objects.bar.Selected` instance or + dict with compatible properties + selectedpoints + Array containing integer indices of selected points. + Has an effect only for traces that support selections. + Note that an empty array means an empty selection where + the `unselected` are turned on for all points, whereas, + any other non-array values means no selection all where + the `selected` and `unselected` styles have no effect. + showlegend + Determines whether or not an item corresponding to this + trace is shown in the legend. + stream + :class:`plotly.graph_objects.bar.Stream` instance or + dict with compatible properties + text + Sets text elements associated with each (x,y) pair. If + a single string, the same string appears over all the + data points. If an array of string, the items are + mapped in order to the this trace's (x,y) coordinates. + If trace `hoverinfo` contains a "text" flag and + "hovertext" is not set, these elements will be seen in + the hover labels. + textangle + Sets the angle of the tick labels with respect to the + bar. For example, a `tickangle` of -90 draws the tick + labels vertically. With "auto" the texts may + automatically be rotated to fit with the maximum size + in bars. + textfont + Sets the font used for `text`. + textposition + Specifies the location of the `text`. "inside" + positions `text` inside, next to the bar end (rotated + and scaled if needed). "outside" positions `text` + outside, next to the bar end (scaled if needed), unless + there is another bar stacked on this one, then the text + gets pushed inside. "auto" tries to position `text` + inside the bar, but if the bar is too small and no bar + is stacked on this one the text is moved outside. If + "none", no text appears. + textpositionsrc + Sets the source reference on Chart Studio Cloud for + `textposition`. + textsrc + Sets the source reference on Chart Studio Cloud for + `text`. + texttemplate + Template string used for rendering the information text + that appears on points. Note that this will override + `textinfo`. Variables are inserted using %{variable}, + for example "y: %{y}". Numbers are formatted using + d3-format's syntax %{variable:d3-format}, for example + "Price: %{y:$.2f}". + https://github.com/d3/d3-format/tree/v1.4.5#d3-format + for details on the formatting syntax. Dates are + formatted using d3-time-format's syntax + %{variable|d3-time-format}, for example "Day: + %{2019-01-01|%A}". https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format for details on the + date formatting syntax. Variables that can't be found + will be replaced with the specifier. For example, a + template of "data: %{x}, %{y}" will result in a value + of "data: 1, %{y}" if x is 1 and y is missing. + Variables with an undefined value will be replaced with + the fallback value. All attributes that can be + specified per-point (the ones that are `arrayOk: true`) + are available. Finally, the template string has access + to variables `value` and `label`. + texttemplatefallback + Fallback string that's displayed when a variable + referenced in a template is missing. If the boolean + value 'false' is passed in, the specifier with the + missing variable will be displayed. + texttemplatesrc + Sets the source reference on Chart Studio Cloud for + `texttemplate`. + uid + Assign an id to this trace, Use this to provide object + constancy between traces during animations and + transitions. + uirevision + Controls persistence of some user-driven changes to the + trace: `constraintrange` in `parcoords` traces, as well + as some `editable: true` modifications such as `name` + and `colorbar.title`. Defaults to `layout.uirevision`. + Note that other user-driven trace attribute changes are + controlled by `layout` attributes: `trace.visible` is + controlled by `layout.legend.uirevision`, + `selectedpoints` is controlled by + `layout.selectionrevision`, and `colorbar.(x|y)` + (accessible with `config: {editable: true}`) is + controlled by `layout.editrevision`. Trace changes are + tracked by `uid`, which only falls back on trace index + if no `uid` is provided. So if your app can add/remove + traces before the end of the `data` array, such that + the same trace has a different index, you can still + preserve user-driven changes if you give each trace a + `uid` that stays with it as it moves. + unselected + :class:`plotly.graph_objects.bar.Unselected` instance + or dict with compatible properties + visible + Determines whether or not this trace is visible. If + "legendonly", the trace is not drawn, but can appear as + a legend item (provided that the legend itself is + visible). + width + Sets the bar width (in position axis units). + widthsrc + Sets the source reference on Chart Studio Cloud for + `width`. + x + Sets the x coordinates. + x0 + Alternate to `x`. Builds a linear space of x + coordinates. Use with `dx` where `x0` is the starting + coordinate and `dx` the step. + xaxis + Sets a reference between this trace's x coordinates and + a 2D cartesian x axis. If "x" (the default value), the + x coordinates refer to `layout.xaxis`. If "x2", the x + coordinates refer to `layout.xaxis2`, and so on. + xcalendar + Sets the calendar system to use with `x` date data. + xhoverformat + Sets the hover text formatting rulefor `x` using d3 + formatting mini-languages which are very similar to + those in Python. For numbers, see: + https://github.com/d3/d3-format/tree/v1.4.5#d3-format. + And for dates see: https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format. We add two items to + d3's date formatter: "%h" for half of the year as a + decimal number as well as "%{n}f" for fractional + seconds with n digits. For example, *2016-10-13 + 09:15:23.456* with tickformat "%H~%M~%S.%2f" would + display *09~15~23.46*By default the values are + formatted using `xaxis.hoverformat`. + xperiod + Only relevant when the axis `type` is "date". Sets the + period positioning in milliseconds or "M" on the x + axis. Special values in the form of "M" could be + used to declare the number of months. In this case `n` + must be a positive integer. + xperiod0 + Only relevant when the axis `type` is "date". Sets the + base for period positioning in milliseconds or date + string on the x0 axis. When `x0period` is round number + of weeks, the `x0period0` by default would be on a + Sunday i.e. 2000-01-02, otherwise it would be at + 2000-01-01. + xperiodalignment + Only relevant when the axis `type` is "date". Sets the + alignment of data points on the x axis. + xsrc + Sets the source reference on Chart Studio Cloud for + `x`. + y + Sets the y coordinates. + y0 + Alternate to `y`. Builds a linear space of y + coordinates. Use with `dy` where `y0` is the starting + coordinate and `dy` the step. + yaxis + Sets a reference between this trace's y coordinates and + a 2D cartesian y axis. If "y" (the default value), the + y coordinates refer to `layout.yaxis`. If "y2", the y + coordinates refer to `layout.yaxis2`, and so on. + ycalendar + Sets the calendar system to use with `y` date data. + yhoverformat + Sets the hover text formatting rulefor `y` using d3 + formatting mini-languages which are very similar to + those in Python. For numbers, see: + https://github.com/d3/d3-format/tree/v1.4.5#d3-format. + And for dates see: https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format. We add two items to + d3's date formatter: "%h" for half of the year as a + decimal number as well as "%{n}f" for fractional + seconds with n digits. For example, *2016-10-13 + 09:15:23.456* with tickformat "%H~%M~%S.%2f" would + display *09~15~23.46*By default the values are + formatted using `yaxis.hoverformat`. + yperiod + Only relevant when the axis `type` is "date". Sets the + period positioning in milliseconds or "M" on the y + axis. Special values in the form of "M" could be + used to declare the number of months. In this case `n` + must be a positive integer. + yperiod0 + Only relevant when the axis `type` is "date". Sets the + base for period positioning in milliseconds or date + string on the y0 axis. When `y0period` is round number + of weeks, the `y0period0` by default would be on a + Sunday i.e. 2000-01-02, otherwise it would be at + 2000-01-01. + yperiodalignment + Only relevant when the axis `type` is "date". Sets the + alignment of data points on the y axis. + ysrc + Sets the source reference on Chart Studio Cloud for + `y`. + zorder + Sets the layer on which this trace is displayed, + relative to other SVG traces on the same subplot. SVG + traces with higher `zorder` appear in front of those + with lower `zorder`. + + Returns + ------- + Bar + """ + super().__init__("bar") + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + if arg is None: + arg = {} + elif isinstance(arg, self.__class__): + arg = arg.to_plotly_json() + elif isinstance(arg, dict): + arg = _copy.copy(arg) + else: + raise ValueError("""\ +The first argument to the plotly.graph_objs.Bar +constructor must be a dict or +an instance of :class:`plotly.graph_objs.Bar`""") + + self._skip_invalid = kwargs.pop("skip_invalid", False) + self._validate = kwargs.pop("_validate", True) + + self._set_property("alignmentgroup", arg, alignmentgroup) + self._set_property("base", arg, base) + self._set_property("basesrc", arg, basesrc) + self._set_property("cliponaxis", arg, cliponaxis) + self._set_property("constraintext", arg, constraintext) + self._set_property("customdata", arg, customdata) + self._set_property("customdatasrc", arg, customdatasrc) + self._set_property("dx", arg, dx) + self._set_property("dy", arg, dy) + self._set_property("error_x", arg, error_x) + self._set_property("error_y", arg, error_y) + self._set_property("hoverinfo", arg, hoverinfo) + self._set_property("hoverinfosrc", arg, hoverinfosrc) + self._set_property("hoverlabel", arg, hoverlabel) + self._set_property("hovertemplate", arg, hovertemplate) + self._set_property("hovertemplatefallback", arg, hovertemplatefallback) + self._set_property("hovertemplatesrc", arg, hovertemplatesrc) + self._set_property("hovertext", arg, hovertext) + self._set_property("hovertextsrc", arg, hovertextsrc) + self._set_property("ids", arg, ids) + self._set_property("idssrc", arg, idssrc) + self._set_property("insidetextanchor", arg, insidetextanchor) + self._set_property("insidetextfont", arg, insidetextfont) + self._set_property("legend", arg, legend) + self._set_property("legendgroup", arg, legendgroup) + self._set_property("legendgrouptitle", arg, legendgrouptitle) + self._set_property("legendrank", arg, legendrank) + self._set_property("legendwidth", arg, legendwidth) + self._set_property("marker", arg, marker) + self._set_property("meta", arg, meta) + self._set_property("metasrc", arg, metasrc) + self._set_property("name", arg, name) + self._set_property("offset", arg, offset) + self._set_property("offsetgroup", arg, offsetgroup) + self._set_property("offsetsrc", arg, offsetsrc) + self._set_property("opacity", arg, opacity) + self._set_property("orientation", arg, orientation) + self._set_property("outsidetextfont", arg, outsidetextfont) + self._set_property("selected", arg, selected) + self._set_property("selectedpoints", arg, selectedpoints) + self._set_property("showlegend", arg, showlegend) + self._set_property("stream", arg, stream) + self._set_property("text", arg, text) + self._set_property("textangle", arg, textangle) + self._set_property("textfont", arg, textfont) + self._set_property("textposition", arg, textposition) + self._set_property("textpositionsrc", arg, textpositionsrc) + self._set_property("textsrc", arg, textsrc) + self._set_property("texttemplate", arg, texttemplate) + self._set_property("texttemplatefallback", arg, texttemplatefallback) + self._set_property("texttemplatesrc", arg, texttemplatesrc) + self._set_property("uid", arg, uid) + self._set_property("uirevision", arg, uirevision) + self._set_property("unselected", arg, unselected) + self._set_property("visible", arg, visible) + self._set_property("width", arg, width) + self._set_property("widthsrc", arg, widthsrc) + self._set_property("x", arg, x) + self._set_property("x0", arg, x0) + self._set_property("xaxis", arg, xaxis) + self._set_property("xcalendar", arg, xcalendar) + self._set_property("xhoverformat", arg, xhoverformat) + self._set_property("xperiod", arg, xperiod) + self._set_property("xperiod0", arg, xperiod0) + self._set_property("xperiodalignment", arg, xperiodalignment) + self._set_property("xsrc", arg, xsrc) + self._set_property("y", arg, y) + self._set_property("y0", arg, y0) + self._set_property("yaxis", arg, yaxis) + self._set_property("ycalendar", arg, ycalendar) + self._set_property("yhoverformat", arg, yhoverformat) + self._set_property("yperiod", arg, yperiod) + self._set_property("yperiod0", arg, yperiod0) + self._set_property("yperiodalignment", arg, yperiodalignment) + self._set_property("ysrc", arg, ysrc) + self._set_property("zorder", arg, zorder) + + self._props["type"] = "bar" + arg.pop("type", None) + self._process_kwargs(**dict(arg, **kwargs)) + self._skip_invalid = False diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/_barpolar.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/_barpolar.py new file mode 100644 index 0000000000000000000000000000000000000000..9f414c9adc829bff98694b1182c625c504c6a919 --- /dev/null +++ b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/_barpolar.py @@ -0,0 +1,1655 @@ +# --- THIS FILE IS AUTO-GENERATED --- +# Modifications will be overwitten the next time code generation run. + +from plotly.basedatatypes import BaseTraceType as _BaseTraceType +import copy as _copy + + +class Barpolar(_BaseTraceType): + _parent_path_str = "" + _path_str = "barpolar" + _valid_props = { + "base", + "basesrc", + "customdata", + "customdatasrc", + "dr", + "dtheta", + "hoverinfo", + "hoverinfosrc", + "hoverlabel", + "hovertemplate", + "hovertemplatefallback", + "hovertemplatesrc", + "hovertext", + "hovertextsrc", + "ids", + "idssrc", + "legend", + "legendgroup", + "legendgrouptitle", + "legendrank", + "legendwidth", + "marker", + "meta", + "metasrc", + "name", + "offset", + "offsetsrc", + "opacity", + "r", + "r0", + "rsrc", + "selected", + "selectedpoints", + "showlegend", + "stream", + "subplot", + "text", + "textsrc", + "theta", + "theta0", + "thetasrc", + "thetaunit", + "type", + "uid", + "uirevision", + "unselected", + "visible", + "width", + "widthsrc", + } + + @property + def base(self): + """ + Sets where the bar base is drawn (in radial axis units). In + "stack" barmode, traces that set "base" will be excluded and + drawn in "overlay" mode instead. + + The 'base' property accepts values of any type + + Returns + ------- + Any|numpy.ndarray + """ + return self["base"] + + @base.setter + def base(self, val): + self["base"] = val + + @property + def basesrc(self): + """ + Sets the source reference on Chart Studio Cloud for `base`. + + The 'basesrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["basesrc"] + + @basesrc.setter + def basesrc(self, val): + self["basesrc"] = val + + @property + def customdata(self): + """ + Assigns extra data each datum. This may be useful when + listening to hover, click and selection events. Note that, + "scatter" traces also appends customdata items in the markers + DOM elements + + The 'customdata' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["customdata"] + + @customdata.setter + def customdata(self, val): + self["customdata"] = val + + @property + def customdatasrc(self): + """ + Sets the source reference on Chart Studio Cloud for + `customdata`. + + The 'customdatasrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["customdatasrc"] + + @customdatasrc.setter + def customdatasrc(self, val): + self["customdatasrc"] = val + + @property + def dr(self): + """ + Sets the r coordinate step. + + The 'dr' property is a number and may be specified as: + - An int or float + + Returns + ------- + int|float + """ + return self["dr"] + + @dr.setter + def dr(self, val): + self["dr"] = val + + @property + def dtheta(self): + """ + Sets the theta coordinate step. By default, the `dtheta` step + equals the subplot's period divided by the length of the `r` + coordinates. + + The 'dtheta' property is a number and may be specified as: + - An int or float + + Returns + ------- + int|float + """ + return self["dtheta"] + + @dtheta.setter + def dtheta(self, val): + self["dtheta"] = val + + @property + def hoverinfo(self): + """ + Determines which trace information appear on hover. If `none` + or `skip` are set, no information is displayed upon hovering. + But, if `none` is set, click and hover events are still fired. + + The 'hoverinfo' property is a flaglist and may be specified + as a string containing: + - Any combination of ['r', 'theta', 'text', 'name'] joined with '+' characters + (e.g. 'r+theta') + OR exactly one of ['all', 'none', 'skip'] (e.g. 'skip') + - A list or array of the above + + Returns + ------- + Any|numpy.ndarray + """ + return self["hoverinfo"] + + @hoverinfo.setter + def hoverinfo(self, val): + self["hoverinfo"] = val + + @property + def hoverinfosrc(self): + """ + Sets the source reference on Chart Studio Cloud for + `hoverinfo`. + + The 'hoverinfosrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["hoverinfosrc"] + + @hoverinfosrc.setter + def hoverinfosrc(self, val): + self["hoverinfosrc"] = val + + @property + def hoverlabel(self): + """ + The 'hoverlabel' property is an instance of Hoverlabel + that may be specified as: + - An instance of :class:`plotly.graph_objs.barpolar.Hoverlabel` + - A dict of string/value properties that will be passed + to the Hoverlabel constructor + + Returns + ------- + plotly.graph_objs.barpolar.Hoverlabel + """ + return self["hoverlabel"] + + @hoverlabel.setter + def hoverlabel(self, val): + self["hoverlabel"] = val + + @property + def hovertemplate(self): + """ + Template string used for rendering the information that appear + on hover box. Note that this will override `hoverinfo`. + Variables are inserted using %{variable}, for example "y: %{y}" + as well as %{xother}, {%_xother}, {%_xother_}, {%xother_}. When + showing info for several points, "xother" will be added to + those with different x positions from the first point. An + underscore before or after "(x|y)other" will add a space on + that side, only when this field is shown. Numbers are formatted + using d3-format's syntax %{variable:d3-format}, for example + "Price: %{y:$.2f}". + https://github.com/d3/d3-format/tree/v1.4.5#d3-format for + details on the formatting syntax. Dates are formatted using + d3-time-format's syntax %{variable|d3-time-format}, for example + "Day: %{2019-01-01|%A}". https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format for details on the date + formatting syntax. Variables that can't be found will be + replaced with the specifier. For example, a template of "data: + %{x}, %{y}" will result in a value of "data: 1, %{y}" if x is 1 + and y is missing. Variables with an undefined value will be + replaced with the fallback value. The variables available in + `hovertemplate` are the ones emitted as event data described at + this link https://plotly.com/javascript/plotlyjs-events/#event- + data. Additionally, all attributes that can be specified per- + point (the ones that are `arrayOk: true`) are available. + Anything contained in tag `` is displayed in the + secondary box, for example `%{fullData.name}`. + To hide the secondary box completely, use an empty tag + ``. + + The 'hovertemplate' property is a string and must be specified as: + - A string + - A number that will be converted to a string + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["hovertemplate"] + + @hovertemplate.setter + def hovertemplate(self, val): + self["hovertemplate"] = val + + @property + def hovertemplatefallback(self): + """ + Fallback string that's displayed when a variable referenced in + a template is missing. If the boolean value 'false' is passed + in, the specifier with the missing variable will be displayed. + + The 'hovertemplatefallback' property accepts values of any type + + Returns + ------- + Any + """ + return self["hovertemplatefallback"] + + @hovertemplatefallback.setter + def hovertemplatefallback(self, val): + self["hovertemplatefallback"] = val + + @property + def hovertemplatesrc(self): + """ + Sets the source reference on Chart Studio Cloud for + `hovertemplate`. + + The 'hovertemplatesrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["hovertemplatesrc"] + + @hovertemplatesrc.setter + def hovertemplatesrc(self, val): + self["hovertemplatesrc"] = val + + @property + def hovertext(self): + """ + Same as `text`. + + The 'hovertext' property is a string and must be specified as: + - A string + - A number that will be converted to a string + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["hovertext"] + + @hovertext.setter + def hovertext(self, val): + self["hovertext"] = val + + @property + def hovertextsrc(self): + """ + Sets the source reference on Chart Studio Cloud for + `hovertext`. + + The 'hovertextsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["hovertextsrc"] + + @hovertextsrc.setter + def hovertextsrc(self, val): + self["hovertextsrc"] = val + + @property + def ids(self): + """ + Assigns id labels to each datum. These ids for object constancy + of data points during animation. Should be an array of strings, + not numbers or any other type. + + The 'ids' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["ids"] + + @ids.setter + def ids(self, val): + self["ids"] = val + + @property + def idssrc(self): + """ + Sets the source reference on Chart Studio Cloud for `ids`. + + The 'idssrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["idssrc"] + + @idssrc.setter + def idssrc(self, val): + self["idssrc"] = val + + @property + def legend(self): + """ + Sets the reference to a legend to show this trace in. + References to these legends are "legend", "legend2", "legend3", + etc. Settings for these legends are set in the layout, under + `layout.legend`, `layout.legend2`, etc. + + The 'legend' property is an identifier of a particular + subplot, of type 'legend', that may be specified as: + - the string 'legend' optionally followed by an integer >= 1 + (e.g. 'legend', 'legend1', 'legend2', 'legend3', etc.) + + Returns + ------- + str + """ + return self["legend"] + + @legend.setter + def legend(self, val): + self["legend"] = val + + @property + def legendgroup(self): + """ + Sets the legend group for this trace. Traces and shapes part of + the same legend group hide/show at the same time when toggling + legend items. + + The 'legendgroup' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["legendgroup"] + + @legendgroup.setter + def legendgroup(self, val): + self["legendgroup"] = val + + @property + def legendgrouptitle(self): + """ + The 'legendgrouptitle' property is an instance of Legendgrouptitle + that may be specified as: + - An instance of :class:`plotly.graph_objs.barpolar.Legendgrouptitle` + - A dict of string/value properties that will be passed + to the Legendgrouptitle constructor + + Returns + ------- + plotly.graph_objs.barpolar.Legendgrouptitle + """ + return self["legendgrouptitle"] + + @legendgrouptitle.setter + def legendgrouptitle(self, val): + self["legendgrouptitle"] = val + + @property + def legendrank(self): + """ + Sets the legend rank for this trace. Items and groups with + smaller ranks are presented on top/left side while with + "reversed" `legend.traceorder` they are on bottom/right side. + The default legendrank is 1000, so that you can use ranks less + than 1000 to place certain items before all unranked items, and + ranks greater than 1000 to go after all unranked items. When + having unranked or equal rank items shapes would be displayed + after traces i.e. according to their order in data and layout. + + The 'legendrank' property is a number and may be specified as: + - An int or float + + Returns + ------- + int|float + """ + return self["legendrank"] + + @legendrank.setter + def legendrank(self, val): + self["legendrank"] = val + + @property + def legendwidth(self): + """ + Sets the width (in px or fraction) of the legend for this + trace. + + The 'legendwidth' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["legendwidth"] + + @legendwidth.setter + def legendwidth(self, val): + self["legendwidth"] = val + + @property + def marker(self): + """ + The 'marker' property is an instance of Marker + that may be specified as: + - An instance of :class:`plotly.graph_objs.barpolar.Marker` + - A dict of string/value properties that will be passed + to the Marker constructor + + Returns + ------- + plotly.graph_objs.barpolar.Marker + """ + return self["marker"] + + @marker.setter + def marker(self, val): + self["marker"] = val + + @property + def meta(self): + """ + Assigns extra meta information associated with this trace that + can be used in various text attributes. Attributes such as + trace `name`, graph, axis and colorbar `title.text`, annotation + `text` `rangeselector`, `updatemenues` and `sliders` `label` + text all support `meta`. To access the trace `meta` values in + an attribute in the same trace, simply use `%{meta[i]}` where + `i` is the index or key of the `meta` item in question. To + access trace `meta` in layout attributes, use + `%{data[n[.meta[i]}` where `i` is the index or key of the + `meta` and `n` is the trace index. + + The 'meta' property accepts values of any type + + Returns + ------- + Any|numpy.ndarray + """ + return self["meta"] + + @meta.setter + def meta(self, val): + self["meta"] = val + + @property + def metasrc(self): + """ + Sets the source reference on Chart Studio Cloud for `meta`. + + The 'metasrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["metasrc"] + + @metasrc.setter + def metasrc(self, val): + self["metasrc"] = val + + @property + def name(self): + """ + Sets the trace name. The trace name appears as the legend item + and on hover. + + The 'name' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["name"] + + @name.setter + def name(self, val): + self["name"] = val + + @property + def offset(self): + """ + Shifts the angular position where the bar is drawn (in + "thetatunit" units). + + The 'offset' property is a number and may be specified as: + - An int or float + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + int|float|numpy.ndarray + """ + return self["offset"] + + @offset.setter + def offset(self, val): + self["offset"] = val + + @property + def offsetsrc(self): + """ + Sets the source reference on Chart Studio Cloud for `offset`. + + The 'offsetsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["offsetsrc"] + + @offsetsrc.setter + def offsetsrc(self, val): + self["offsetsrc"] = val + + @property + def opacity(self): + """ + Sets the opacity of the trace. + + The 'opacity' property is a number and may be specified as: + - An int or float in the interval [0, 1] + + Returns + ------- + int|float + """ + return self["opacity"] + + @opacity.setter + def opacity(self, val): + self["opacity"] = val + + @property + def r(self): + """ + Sets the radial coordinates + + The 'r' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["r"] + + @r.setter + def r(self, val): + self["r"] = val + + @property + def r0(self): + """ + Alternate to `r`. Builds a linear space of r coordinates. Use + with `dr` where `r0` is the starting coordinate and `dr` the + step. + + The 'r0' property accepts values of any type + + Returns + ------- + Any + """ + return self["r0"] + + @r0.setter + def r0(self, val): + self["r0"] = val + + @property + def rsrc(self): + """ + Sets the source reference on Chart Studio Cloud for `r`. + + The 'rsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["rsrc"] + + @rsrc.setter + def rsrc(self, val): + self["rsrc"] = val + + @property + def selected(self): + """ + The 'selected' property is an instance of Selected + that may be specified as: + - An instance of :class:`plotly.graph_objs.barpolar.Selected` + - A dict of string/value properties that will be passed + to the Selected constructor + + Returns + ------- + plotly.graph_objs.barpolar.Selected + """ + return self["selected"] + + @selected.setter + def selected(self, val): + self["selected"] = val + + @property + def selectedpoints(self): + """ + Array containing integer indices of selected points. Has an + effect only for traces that support selections. Note that an + empty array means an empty selection where the `unselected` are + turned on for all points, whereas, any other non-array values + means no selection all where the `selected` and `unselected` + styles have no effect. + + The 'selectedpoints' property accepts values of any type + + Returns + ------- + Any + """ + return self["selectedpoints"] + + @selectedpoints.setter + def selectedpoints(self, val): + self["selectedpoints"] = val + + @property + def showlegend(self): + """ + Determines whether or not an item corresponding to this trace + is shown in the legend. + + The 'showlegend' property is a boolean and must be specified as: + - A boolean value: True or False + + Returns + ------- + bool + """ + return self["showlegend"] + + @showlegend.setter + def showlegend(self, val): + self["showlegend"] = val + + @property + def stream(self): + """ + The 'stream' property is an instance of Stream + that may be specified as: + - An instance of :class:`plotly.graph_objs.barpolar.Stream` + - A dict of string/value properties that will be passed + to the Stream constructor + + Returns + ------- + plotly.graph_objs.barpolar.Stream + """ + return self["stream"] + + @stream.setter + def stream(self, val): + self["stream"] = val + + @property + def subplot(self): + """ + Sets a reference between this trace's data coordinates and a + polar subplot. If "polar" (the default value), the data refer + to `layout.polar`. If "polar2", the data refer to + `layout.polar2`, and so on. + + The 'subplot' property is an identifier of a particular + subplot, of type 'polar', that may be specified as: + - the string 'polar' optionally followed by an integer >= 1 + (e.g. 'polar', 'polar1', 'polar2', 'polar3', etc.) + + Returns + ------- + str + """ + return self["subplot"] + + @subplot.setter + def subplot(self, val): + self["subplot"] = val + + @property + def text(self): + """ + Sets hover text elements associated with each bar. If a single + string, the same string appears over all bars. If an array of + string, the items are mapped in order to the this trace's + coordinates. + + The 'text' property is a string and must be specified as: + - A string + - A number that will be converted to a string + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["text"] + + @text.setter + def text(self, val): + self["text"] = val + + @property + def textsrc(self): + """ + Sets the source reference on Chart Studio Cloud for `text`. + + The 'textsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["textsrc"] + + @textsrc.setter + def textsrc(self, val): + self["textsrc"] = val + + @property + def theta(self): + """ + Sets the angular coordinates + + The 'theta' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["theta"] + + @theta.setter + def theta(self, val): + self["theta"] = val + + @property + def theta0(self): + """ + Alternate to `theta`. Builds a linear space of theta + coordinates. Use with `dtheta` where `theta0` is the starting + coordinate and `dtheta` the step. + + The 'theta0' property accepts values of any type + + Returns + ------- + Any + """ + return self["theta0"] + + @theta0.setter + def theta0(self, val): + self["theta0"] = val + + @property + def thetasrc(self): + """ + Sets the source reference on Chart Studio Cloud for `theta`. + + The 'thetasrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["thetasrc"] + + @thetasrc.setter + def thetasrc(self, val): + self["thetasrc"] = val + + @property + def thetaunit(self): + """ + Sets the unit of input "theta" values. Has an effect only when + on "linear" angular axes. + + The 'thetaunit' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['radians', 'degrees', 'gradians'] + + Returns + ------- + Any + """ + return self["thetaunit"] + + @thetaunit.setter + def thetaunit(self, val): + self["thetaunit"] = val + + @property + def uid(self): + """ + Assign an id to this trace, Use this to provide object + constancy between traces during animations and transitions. + + The 'uid' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["uid"] + + @uid.setter + def uid(self, val): + self["uid"] = val + + @property + def uirevision(self): + """ + Controls persistence of some user-driven changes to the trace: + `constraintrange` in `parcoords` traces, as well as some + `editable: true` modifications such as `name` and + `colorbar.title`. Defaults to `layout.uirevision`. Note that + other user-driven trace attribute changes are controlled by + `layout` attributes: `trace.visible` is controlled by + `layout.legend.uirevision`, `selectedpoints` is controlled by + `layout.selectionrevision`, and `colorbar.(x|y)` (accessible + with `config: {editable: true}`) is controlled by + `layout.editrevision`. Trace changes are tracked by `uid`, + which only falls back on trace index if no `uid` is provided. + So if your app can add/remove traces before the end of the + `data` array, such that the same trace has a different index, + you can still preserve user-driven changes if you give each + trace a `uid` that stays with it as it moves. + + The 'uirevision' property accepts values of any type + + Returns + ------- + Any + """ + return self["uirevision"] + + @uirevision.setter + def uirevision(self, val): + self["uirevision"] = val + + @property + def unselected(self): + """ + The 'unselected' property is an instance of Unselected + that may be specified as: + - An instance of :class:`plotly.graph_objs.barpolar.Unselected` + - A dict of string/value properties that will be passed + to the Unselected constructor + + Returns + ------- + plotly.graph_objs.barpolar.Unselected + """ + return self["unselected"] + + @unselected.setter + def unselected(self, val): + self["unselected"] = val + + @property + def visible(self): + """ + Determines whether or not this trace is visible. If + "legendonly", the trace is not drawn, but can appear as a + legend item (provided that the legend itself is visible). + + The 'visible' property is an enumeration that may be specified as: + - One of the following enumeration values: + [True, False, 'legendonly'] + + Returns + ------- + Any + """ + return self["visible"] + + @visible.setter + def visible(self, val): + self["visible"] = val + + @property + def width(self): + """ + Sets the bar angular width (in "thetaunit" units). + + The 'width' property is a number and may be specified as: + - An int or float in the interval [0, inf] + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + int|float|numpy.ndarray + """ + return self["width"] + + @width.setter + def width(self, val): + self["width"] = val + + @property + def widthsrc(self): + """ + Sets the source reference on Chart Studio Cloud for `width`. + + The 'widthsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["widthsrc"] + + @widthsrc.setter + def widthsrc(self, val): + self["widthsrc"] = val + + @property + def type(self): + return self._props["type"] + + @property + def _prop_descriptions(self): + return """\ + base + Sets where the bar base is drawn (in radial axis + units). In "stack" barmode, traces that set "base" will + be excluded and drawn in "overlay" mode instead. + basesrc + Sets the source reference on Chart Studio Cloud for + `base`. + customdata + Assigns extra data each datum. This may be useful when + listening to hover, click and selection events. Note + that, "scatter" traces also appends customdata items in + the markers DOM elements + customdatasrc + Sets the source reference on Chart Studio Cloud for + `customdata`. + dr + Sets the r coordinate step. + dtheta + Sets the theta coordinate step. By default, the + `dtheta` step equals the subplot's period divided by + the length of the `r` coordinates. + hoverinfo + Determines which trace information appear on hover. If + `none` or `skip` are set, no information is displayed + upon hovering. But, if `none` is set, click and hover + events are still fired. + hoverinfosrc + Sets the source reference on Chart Studio Cloud for + `hoverinfo`. + hoverlabel + :class:`plotly.graph_objects.barpolar.Hoverlabel` + instance or dict with compatible properties + hovertemplate + Template string used for rendering the information that + appear on hover box. Note that this will override + `hoverinfo`. Variables are inserted using %{variable}, + for example "y: %{y}" as well as %{xother}, {%_xother}, + {%_xother_}, {%xother_}. When showing info for several + points, "xother" will be added to those with different + x positions from the first point. An underscore before + or after "(x|y)other" will add a space on that side, + only when this field is shown. Numbers are formatted + using d3-format's syntax %{variable:d3-format}, for + example "Price: %{y:$.2f}". + https://github.com/d3/d3-format/tree/v1.4.5#d3-format + for details on the formatting syntax. Dates are + formatted using d3-time-format's syntax + %{variable|d3-time-format}, for example "Day: + %{2019-01-01|%A}". https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format for details on the + date formatting syntax. Variables that can't be found + will be replaced with the specifier. For example, a + template of "data: %{x}, %{y}" will result in a value + of "data: 1, %{y}" if x is 1 and y is missing. + Variables with an undefined value will be replaced with + the fallback value. The variables available in + `hovertemplate` are the ones emitted as event data + described at this link + https://plotly.com/javascript/plotlyjs-events/#event- + data. Additionally, all attributes that can be + specified per-point (the ones that are `arrayOk: true`) + are available. Anything contained in tag `` is + displayed in the secondary box, for example + `%{fullData.name}`. To hide the + secondary box completely, use an empty tag + ``. + hovertemplatefallback + Fallback string that's displayed when a variable + referenced in a template is missing. If the boolean + value 'false' is passed in, the specifier with the + missing variable will be displayed. + hovertemplatesrc + Sets the source reference on Chart Studio Cloud for + `hovertemplate`. + hovertext + Same as `text`. + hovertextsrc + Sets the source reference on Chart Studio Cloud for + `hovertext`. + ids + Assigns id labels to each datum. These ids for object + constancy of data points during animation. Should be an + array of strings, not numbers or any other type. + idssrc + Sets the source reference on Chart Studio Cloud for + `ids`. + legend + Sets the reference to a legend to show this trace in. + References to these legends are "legend", "legend2", + "legend3", etc. Settings for these legends are set in + the layout, under `layout.legend`, `layout.legend2`, + etc. + legendgroup + Sets the legend group for this trace. Traces and shapes + part of the same legend group hide/show at the same + time when toggling legend items. + legendgrouptitle + :class:`plotly.graph_objects.barpolar.Legendgrouptitle` + instance or dict with compatible properties + legendrank + Sets the legend rank for this trace. Items and groups + with smaller ranks are presented on top/left side while + with "reversed" `legend.traceorder` they are on + bottom/right side. The default legendrank is 1000, so + that you can use ranks less than 1000 to place certain + items before all unranked items, and ranks greater than + 1000 to go after all unranked items. When having + unranked or equal rank items shapes would be displayed + after traces i.e. according to their order in data and + layout. + legendwidth + Sets the width (in px or fraction) of the legend for + this trace. + marker + :class:`plotly.graph_objects.barpolar.Marker` instance + or dict with compatible properties + meta + Assigns extra meta information associated with this + trace that can be used in various text attributes. + Attributes such as trace `name`, graph, axis and + colorbar `title.text`, annotation `text` + `rangeselector`, `updatemenues` and `sliders` `label` + text all support `meta`. To access the trace `meta` + values in an attribute in the same trace, simply use + `%{meta[i]}` where `i` is the index or key of the + `meta` item in question. To access trace `meta` in + layout attributes, use `%{data[n[.meta[i]}` where `i` + is the index or key of the `meta` and `n` is the trace + index. + metasrc + Sets the source reference on Chart Studio Cloud for + `meta`. + name + Sets the trace name. The trace name appears as the + legend item and on hover. + offset + Shifts the angular position where the bar is drawn (in + "thetatunit" units). + offsetsrc + Sets the source reference on Chart Studio Cloud for + `offset`. + opacity + Sets the opacity of the trace. + r + Sets the radial coordinates + r0 + Alternate to `r`. Builds a linear space of r + coordinates. Use with `dr` where `r0` is the starting + coordinate and `dr` the step. + rsrc + Sets the source reference on Chart Studio Cloud for + `r`. + selected + :class:`plotly.graph_objects.barpolar.Selected` + instance or dict with compatible properties + selectedpoints + Array containing integer indices of selected points. + Has an effect only for traces that support selections. + Note that an empty array means an empty selection where + the `unselected` are turned on for all points, whereas, + any other non-array values means no selection all where + the `selected` and `unselected` styles have no effect. + showlegend + Determines whether or not an item corresponding to this + trace is shown in the legend. + stream + :class:`plotly.graph_objects.barpolar.Stream` instance + or dict with compatible properties + subplot + Sets a reference between this trace's data coordinates + and a polar subplot. If "polar" (the default value), + the data refer to `layout.polar`. If "polar2", the data + refer to `layout.polar2`, and so on. + text + Sets hover text elements associated with each bar. If a + single string, the same string appears over all bars. + If an array of string, the items are mapped in order to + the this trace's coordinates. + textsrc + Sets the source reference on Chart Studio Cloud for + `text`. + theta + Sets the angular coordinates + theta0 + Alternate to `theta`. Builds a linear space of theta + coordinates. Use with `dtheta` where `theta0` is the + starting coordinate and `dtheta` the step. + thetasrc + Sets the source reference on Chart Studio Cloud for + `theta`. + thetaunit + Sets the unit of input "theta" values. Has an effect + only when on "linear" angular axes. + uid + Assign an id to this trace, Use this to provide object + constancy between traces during animations and + transitions. + uirevision + Controls persistence of some user-driven changes to the + trace: `constraintrange` in `parcoords` traces, as well + as some `editable: true` modifications such as `name` + and `colorbar.title`. Defaults to `layout.uirevision`. + Note that other user-driven trace attribute changes are + controlled by `layout` attributes: `trace.visible` is + controlled by `layout.legend.uirevision`, + `selectedpoints` is controlled by + `layout.selectionrevision`, and `colorbar.(x|y)` + (accessible with `config: {editable: true}`) is + controlled by `layout.editrevision`. Trace changes are + tracked by `uid`, which only falls back on trace index + if no `uid` is provided. So if your app can add/remove + traces before the end of the `data` array, such that + the same trace has a different index, you can still + preserve user-driven changes if you give each trace a + `uid` that stays with it as it moves. + unselected + :class:`plotly.graph_objects.barpolar.Unselected` + instance or dict with compatible properties + visible + Determines whether or not this trace is visible. If + "legendonly", the trace is not drawn, but can appear as + a legend item (provided that the legend itself is + visible). + width + Sets the bar angular width (in "thetaunit" units). + widthsrc + Sets the source reference on Chart Studio Cloud for + `width`. + """ + + def __init__( + self, + arg=None, + base=None, + basesrc=None, + customdata=None, + customdatasrc=None, + dr=None, + dtheta=None, + hoverinfo=None, + hoverinfosrc=None, + hoverlabel=None, + hovertemplate=None, + hovertemplatefallback=None, + hovertemplatesrc=None, + hovertext=None, + hovertextsrc=None, + ids=None, + idssrc=None, + legend=None, + legendgroup=None, + legendgrouptitle=None, + legendrank=None, + legendwidth=None, + marker=None, + meta=None, + metasrc=None, + name=None, + offset=None, + offsetsrc=None, + opacity=None, + r=None, + r0=None, + rsrc=None, + selected=None, + selectedpoints=None, + showlegend=None, + stream=None, + subplot=None, + text=None, + textsrc=None, + theta=None, + theta0=None, + thetasrc=None, + thetaunit=None, + uid=None, + uirevision=None, + unselected=None, + visible=None, + width=None, + widthsrc=None, + **kwargs, + ): + """ + Construct a new Barpolar object + + The data visualized by the radial span of the bars is set in + `r` + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of :class:`plotly.graph_objs.Barpolar` + base + Sets where the bar base is drawn (in radial axis + units). In "stack" barmode, traces that set "base" will + be excluded and drawn in "overlay" mode instead. + basesrc + Sets the source reference on Chart Studio Cloud for + `base`. + customdata + Assigns extra data each datum. This may be useful when + listening to hover, click and selection events. Note + that, "scatter" traces also appends customdata items in + the markers DOM elements + customdatasrc + Sets the source reference on Chart Studio Cloud for + `customdata`. + dr + Sets the r coordinate step. + dtheta + Sets the theta coordinate step. By default, the + `dtheta` step equals the subplot's period divided by + the length of the `r` coordinates. + hoverinfo + Determines which trace information appear on hover. If + `none` or `skip` are set, no information is displayed + upon hovering. But, if `none` is set, click and hover + events are still fired. + hoverinfosrc + Sets the source reference on Chart Studio Cloud for + `hoverinfo`. + hoverlabel + :class:`plotly.graph_objects.barpolar.Hoverlabel` + instance or dict with compatible properties + hovertemplate + Template string used for rendering the information that + appear on hover box. Note that this will override + `hoverinfo`. Variables are inserted using %{variable}, + for example "y: %{y}" as well as %{xother}, {%_xother}, + {%_xother_}, {%xother_}. When showing info for several + points, "xother" will be added to those with different + x positions from the first point. An underscore before + or after "(x|y)other" will add a space on that side, + only when this field is shown. Numbers are formatted + using d3-format's syntax %{variable:d3-format}, for + example "Price: %{y:$.2f}". + https://github.com/d3/d3-format/tree/v1.4.5#d3-format + for details on the formatting syntax. Dates are + formatted using d3-time-format's syntax + %{variable|d3-time-format}, for example "Day: + %{2019-01-01|%A}". https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format for details on the + date formatting syntax. Variables that can't be found + will be replaced with the specifier. For example, a + template of "data: %{x}, %{y}" will result in a value + of "data: 1, %{y}" if x is 1 and y is missing. + Variables with an undefined value will be replaced with + the fallback value. The variables available in + `hovertemplate` are the ones emitted as event data + described at this link + https://plotly.com/javascript/plotlyjs-events/#event- + data. Additionally, all attributes that can be + specified per-point (the ones that are `arrayOk: true`) + are available. Anything contained in tag `` is + displayed in the secondary box, for example + `%{fullData.name}`. To hide the + secondary box completely, use an empty tag + ``. + hovertemplatefallback + Fallback string that's displayed when a variable + referenced in a template is missing. If the boolean + value 'false' is passed in, the specifier with the + missing variable will be displayed. + hovertemplatesrc + Sets the source reference on Chart Studio Cloud for + `hovertemplate`. + hovertext + Same as `text`. + hovertextsrc + Sets the source reference on Chart Studio Cloud for + `hovertext`. + ids + Assigns id labels to each datum. These ids for object + constancy of data points during animation. Should be an + array of strings, not numbers or any other type. + idssrc + Sets the source reference on Chart Studio Cloud for + `ids`. + legend + Sets the reference to a legend to show this trace in. + References to these legends are "legend", "legend2", + "legend3", etc. Settings for these legends are set in + the layout, under `layout.legend`, `layout.legend2`, + etc. + legendgroup + Sets the legend group for this trace. Traces and shapes + part of the same legend group hide/show at the same + time when toggling legend items. + legendgrouptitle + :class:`plotly.graph_objects.barpolar.Legendgrouptitle` + instance or dict with compatible properties + legendrank + Sets the legend rank for this trace. Items and groups + with smaller ranks are presented on top/left side while + with "reversed" `legend.traceorder` they are on + bottom/right side. The default legendrank is 1000, so + that you can use ranks less than 1000 to place certain + items before all unranked items, and ranks greater than + 1000 to go after all unranked items. When having + unranked or equal rank items shapes would be displayed + after traces i.e. according to their order in data and + layout. + legendwidth + Sets the width (in px or fraction) of the legend for + this trace. + marker + :class:`plotly.graph_objects.barpolar.Marker` instance + or dict with compatible properties + meta + Assigns extra meta information associated with this + trace that can be used in various text attributes. + Attributes such as trace `name`, graph, axis and + colorbar `title.text`, annotation `text` + `rangeselector`, `updatemenues` and `sliders` `label` + text all support `meta`. To access the trace `meta` + values in an attribute in the same trace, simply use + `%{meta[i]}` where `i` is the index or key of the + `meta` item in question. To access trace `meta` in + layout attributes, use `%{data[n[.meta[i]}` where `i` + is the index or key of the `meta` and `n` is the trace + index. + metasrc + Sets the source reference on Chart Studio Cloud for + `meta`. + name + Sets the trace name. The trace name appears as the + legend item and on hover. + offset + Shifts the angular position where the bar is drawn (in + "thetatunit" units). + offsetsrc + Sets the source reference on Chart Studio Cloud for + `offset`. + opacity + Sets the opacity of the trace. + r + Sets the radial coordinates + r0 + Alternate to `r`. Builds a linear space of r + coordinates. Use with `dr` where `r0` is the starting + coordinate and `dr` the step. + rsrc + Sets the source reference on Chart Studio Cloud for + `r`. + selected + :class:`plotly.graph_objects.barpolar.Selected` + instance or dict with compatible properties + selectedpoints + Array containing integer indices of selected points. + Has an effect only for traces that support selections. + Note that an empty array means an empty selection where + the `unselected` are turned on for all points, whereas, + any other non-array values means no selection all where + the `selected` and `unselected` styles have no effect. + showlegend + Determines whether or not an item corresponding to this + trace is shown in the legend. + stream + :class:`plotly.graph_objects.barpolar.Stream` instance + or dict with compatible properties + subplot + Sets a reference between this trace's data coordinates + and a polar subplot. If "polar" (the default value), + the data refer to `layout.polar`. If "polar2", the data + refer to `layout.polar2`, and so on. + text + Sets hover text elements associated with each bar. If a + single string, the same string appears over all bars. + If an array of string, the items are mapped in order to + the this trace's coordinates. + textsrc + Sets the source reference on Chart Studio Cloud for + `text`. + theta + Sets the angular coordinates + theta0 + Alternate to `theta`. Builds a linear space of theta + coordinates. Use with `dtheta` where `theta0` is the + starting coordinate and `dtheta` the step. + thetasrc + Sets the source reference on Chart Studio Cloud for + `theta`. + thetaunit + Sets the unit of input "theta" values. Has an effect + only when on "linear" angular axes. + uid + Assign an id to this trace, Use this to provide object + constancy between traces during animations and + transitions. + uirevision + Controls persistence of some user-driven changes to the + trace: `constraintrange` in `parcoords` traces, as well + as some `editable: true` modifications such as `name` + and `colorbar.title`. Defaults to `layout.uirevision`. + Note that other user-driven trace attribute changes are + controlled by `layout` attributes: `trace.visible` is + controlled by `layout.legend.uirevision`, + `selectedpoints` is controlled by + `layout.selectionrevision`, and `colorbar.(x|y)` + (accessible with `config: {editable: true}`) is + controlled by `layout.editrevision`. Trace changes are + tracked by `uid`, which only falls back on trace index + if no `uid` is provided. So if your app can add/remove + traces before the end of the `data` array, such that + the same trace has a different index, you can still + preserve user-driven changes if you give each trace a + `uid` that stays with it as it moves. + unselected + :class:`plotly.graph_objects.barpolar.Unselected` + instance or dict with compatible properties + visible + Determines whether or not this trace is visible. If + "legendonly", the trace is not drawn, but can appear as + a legend item (provided that the legend itself is + visible). + width + Sets the bar angular width (in "thetaunit" units). + widthsrc + Sets the source reference on Chart Studio Cloud for + `width`. + + Returns + ------- + Barpolar + """ + super().__init__("barpolar") + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + if arg is None: + arg = {} + elif isinstance(arg, self.__class__): + arg = arg.to_plotly_json() + elif isinstance(arg, dict): + arg = _copy.copy(arg) + else: + raise ValueError("""\ +The first argument to the plotly.graph_objs.Barpolar +constructor must be a dict or +an instance of :class:`plotly.graph_objs.Barpolar`""") + + self._skip_invalid = kwargs.pop("skip_invalid", False) + self._validate = kwargs.pop("_validate", True) + + self._set_property("base", arg, base) + self._set_property("basesrc", arg, basesrc) + self._set_property("customdata", arg, customdata) + self._set_property("customdatasrc", arg, customdatasrc) + self._set_property("dr", arg, dr) + self._set_property("dtheta", arg, dtheta) + self._set_property("hoverinfo", arg, hoverinfo) + self._set_property("hoverinfosrc", arg, hoverinfosrc) + self._set_property("hoverlabel", arg, hoverlabel) + self._set_property("hovertemplate", arg, hovertemplate) + self._set_property("hovertemplatefallback", arg, hovertemplatefallback) + self._set_property("hovertemplatesrc", arg, hovertemplatesrc) + self._set_property("hovertext", arg, hovertext) + self._set_property("hovertextsrc", arg, hovertextsrc) + self._set_property("ids", arg, ids) + self._set_property("idssrc", arg, idssrc) + self._set_property("legend", arg, legend) + self._set_property("legendgroup", arg, legendgroup) + self._set_property("legendgrouptitle", arg, legendgrouptitle) + self._set_property("legendrank", arg, legendrank) + self._set_property("legendwidth", arg, legendwidth) + self._set_property("marker", arg, marker) + self._set_property("meta", arg, meta) + self._set_property("metasrc", arg, metasrc) + self._set_property("name", arg, name) + self._set_property("offset", arg, offset) + self._set_property("offsetsrc", arg, offsetsrc) + self._set_property("opacity", arg, opacity) + self._set_property("r", arg, r) + self._set_property("r0", arg, r0) + self._set_property("rsrc", arg, rsrc) + self._set_property("selected", arg, selected) + self._set_property("selectedpoints", arg, selectedpoints) + self._set_property("showlegend", arg, showlegend) + self._set_property("stream", arg, stream) + self._set_property("subplot", arg, subplot) + self._set_property("text", arg, text) + self._set_property("textsrc", arg, textsrc) + self._set_property("theta", arg, theta) + self._set_property("theta0", arg, theta0) + self._set_property("thetasrc", arg, thetasrc) + self._set_property("thetaunit", arg, thetaunit) + self._set_property("uid", arg, uid) + self._set_property("uirevision", arg, uirevision) + self._set_property("unselected", arg, unselected) + self._set_property("visible", arg, visible) + self._set_property("width", arg, width) + self._set_property("widthsrc", arg, widthsrc) + + self._props["type"] = "barpolar" + arg.pop("type", None) + self._process_kwargs(**dict(arg, **kwargs)) + self._skip_invalid = False diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/_box.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/_box.py new file mode 100644 index 0000000000000000000000000000000000000000..0309be1a4056499e0fbbc0279493e15923838590 --- /dev/null +++ b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/_box.py @@ -0,0 +1,3099 @@ +# --- THIS FILE IS AUTO-GENERATED --- +# Modifications will be overwitten the next time code generation run. + +from plotly.basedatatypes import BaseTraceType as _BaseTraceType +import copy as _copy + + +class Box(_BaseTraceType): + _parent_path_str = "" + _path_str = "box" + _valid_props = { + "alignmentgroup", + "boxmean", + "boxpoints", + "customdata", + "customdatasrc", + "dx", + "dy", + "fillcolor", + "hoverinfo", + "hoverinfosrc", + "hoverlabel", + "hoveron", + "hovertemplate", + "hovertemplatefallback", + "hovertemplatesrc", + "hovertext", + "hovertextsrc", + "ids", + "idssrc", + "jitter", + "legend", + "legendgroup", + "legendgrouptitle", + "legendrank", + "legendwidth", + "line", + "lowerfence", + "lowerfencesrc", + "marker", + "mean", + "meansrc", + "median", + "mediansrc", + "meta", + "metasrc", + "name", + "notched", + "notchspan", + "notchspansrc", + "notchwidth", + "offsetgroup", + "opacity", + "orientation", + "pointpos", + "q1", + "q1src", + "q3", + "q3src", + "quartilemethod", + "sd", + "sdmultiple", + "sdsrc", + "selected", + "selectedpoints", + "showlegend", + "showwhiskers", + "sizemode", + "stream", + "text", + "textsrc", + "type", + "uid", + "uirevision", + "unselected", + "upperfence", + "upperfencesrc", + "visible", + "whiskerwidth", + "width", + "x", + "x0", + "xaxis", + "xcalendar", + "xhoverformat", + "xperiod", + "xperiod0", + "xperiodalignment", + "xsrc", + "y", + "y0", + "yaxis", + "ycalendar", + "yhoverformat", + "yperiod", + "yperiod0", + "yperiodalignment", + "ysrc", + "zorder", + } + + @property + def alignmentgroup(self): + """ + Set several traces linked to the same position axis or matching + axes to the same alignmentgroup. This controls whether bars + compute their positional range dependently or independently. + + The 'alignmentgroup' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["alignmentgroup"] + + @alignmentgroup.setter + def alignmentgroup(self, val): + self["alignmentgroup"] = val + + @property + def boxmean(self): + """ + If True, the mean of the box(es)' underlying distribution is + drawn as a dashed line inside the box(es). If "sd" the standard + deviation is also drawn. Defaults to True when `mean` is set. + Defaults to "sd" when `sd` is set Otherwise defaults to False. + + The 'boxmean' property is an enumeration that may be specified as: + - One of the following enumeration values: + [True, 'sd', False] + + Returns + ------- + Any + """ + return self["boxmean"] + + @boxmean.setter + def boxmean(self, val): + self["boxmean"] = val + + @property + def boxpoints(self): + """ + If "outliers", only the sample points lying outside the + whiskers are shown If "suspectedoutliers", the outlier points + are shown and points either less than 4*Q1-3*Q3 or greater than + 4*Q3-3*Q1 are highlighted (see `outliercolor`) If "all", all + sample points are shown If False, only the box(es) are shown + with no sample points Defaults to "suspectedoutliers" when + `marker.outliercolor` or `marker.line.outliercolor` is set. + Defaults to "all" under the q1/median/q3 signature. Otherwise + defaults to "outliers". + + The 'boxpoints' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['all', 'outliers', 'suspectedoutliers', False] + + Returns + ------- + Any + """ + return self["boxpoints"] + + @boxpoints.setter + def boxpoints(self, val): + self["boxpoints"] = val + + @property + def customdata(self): + """ + Assigns extra data each datum. This may be useful when + listening to hover, click and selection events. Note that, + "scatter" traces also appends customdata items in the markers + DOM elements + + The 'customdata' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["customdata"] + + @customdata.setter + def customdata(self, val): + self["customdata"] = val + + @property + def customdatasrc(self): + """ + Sets the source reference on Chart Studio Cloud for + `customdata`. + + The 'customdatasrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["customdatasrc"] + + @customdatasrc.setter + def customdatasrc(self, val): + self["customdatasrc"] = val + + @property + def dx(self): + """ + Sets the x coordinate step for multi-box traces set using + q1/median/q3. + + The 'dx' property is a number and may be specified as: + - An int or float + + Returns + ------- + int|float + """ + return self["dx"] + + @dx.setter + def dx(self, val): + self["dx"] = val + + @property + def dy(self): + """ + Sets the y coordinate step for multi-box traces set using + q1/median/q3. + + The 'dy' property is a number and may be specified as: + - An int or float + + Returns + ------- + int|float + """ + return self["dy"] + + @dy.setter + def dy(self, val): + self["dy"] = val + + @property + def fillcolor(self): + """ + Sets the fill color. Defaults to a half-transparent variant of + the line color, marker color, or marker line color, whichever + is available. + + The 'fillcolor' property is a color and may be specified as: + - A hex string (e.g. '#ff0000') + - An rgb/rgba string (e.g. 'rgb(255,0,0)') + - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') + - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') + - A named CSS color: see https://plotly.com/python/css-colors/ for a list + + Returns + ------- + str + """ + return self["fillcolor"] + + @fillcolor.setter + def fillcolor(self, val): + self["fillcolor"] = val + + @property + def hoverinfo(self): + """ + Determines which trace information appear on hover. If `none` + or `skip` are set, no information is displayed upon hovering. + But, if `none` is set, click and hover events are still fired. + + The 'hoverinfo' property is a flaglist and may be specified + as a string containing: + - Any combination of ['x', 'y', 'z', 'text', 'name'] joined with '+' characters + (e.g. 'x+y') + OR exactly one of ['all', 'none', 'skip'] (e.g. 'skip') + - A list or array of the above + + Returns + ------- + Any|numpy.ndarray + """ + return self["hoverinfo"] + + @hoverinfo.setter + def hoverinfo(self, val): + self["hoverinfo"] = val + + @property + def hoverinfosrc(self): + """ + Sets the source reference on Chart Studio Cloud for + `hoverinfo`. + + The 'hoverinfosrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["hoverinfosrc"] + + @hoverinfosrc.setter + def hoverinfosrc(self, val): + self["hoverinfosrc"] = val + + @property + def hoverlabel(self): + """ + The 'hoverlabel' property is an instance of Hoverlabel + that may be specified as: + - An instance of :class:`plotly.graph_objs.box.Hoverlabel` + - A dict of string/value properties that will be passed + to the Hoverlabel constructor + + Returns + ------- + plotly.graph_objs.box.Hoverlabel + """ + return self["hoverlabel"] + + @hoverlabel.setter + def hoverlabel(self, val): + self["hoverlabel"] = val + + @property + def hoveron(self): + """ + Do the hover effects highlight individual boxes or sample + points or both? + + The 'hoveron' property is a flaglist and may be specified + as a string containing: + - Any combination of ['boxes', 'points'] joined with '+' characters + (e.g. 'boxes+points') + + Returns + ------- + Any + """ + return self["hoveron"] + + @hoveron.setter + def hoveron(self, val): + self["hoveron"] = val + + @property + def hovertemplate(self): + """ + Template string used for rendering the information that appear + on hover box. Note that this will override `hoverinfo`. + Variables are inserted using %{variable}, for example "y: %{y}" + as well as %{xother}, {%_xother}, {%_xother_}, {%xother_}. When + showing info for several points, "xother" will be added to + those with different x positions from the first point. An + underscore before or after "(x|y)other" will add a space on + that side, only when this field is shown. Numbers are formatted + using d3-format's syntax %{variable:d3-format}, for example + "Price: %{y:$.2f}". + https://github.com/d3/d3-format/tree/v1.4.5#d3-format for + details on the formatting syntax. Dates are formatted using + d3-time-format's syntax %{variable|d3-time-format}, for example + "Day: %{2019-01-01|%A}". https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format for details on the date + formatting syntax. Variables that can't be found will be + replaced with the specifier. For example, a template of "data: + %{x}, %{y}" will result in a value of "data: 1, %{y}" if x is 1 + and y is missing. Variables with an undefined value will be + replaced with the fallback value. The variables available in + `hovertemplate` are the ones emitted as event data described at + this link https://plotly.com/javascript/plotlyjs-events/#event- + data. Additionally, all attributes that can be specified per- + point (the ones that are `arrayOk: true`) are available. + Anything contained in tag `` is displayed in the + secondary box, for example `%{fullData.name}`. + To hide the secondary box completely, use an empty tag + ``. + + The 'hovertemplate' property is a string and must be specified as: + - A string + - A number that will be converted to a string + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["hovertemplate"] + + @hovertemplate.setter + def hovertemplate(self, val): + self["hovertemplate"] = val + + @property + def hovertemplatefallback(self): + """ + Fallback string that's displayed when a variable referenced in + a template is missing. If the boolean value 'false' is passed + in, the specifier with the missing variable will be displayed. + + The 'hovertemplatefallback' property accepts values of any type + + Returns + ------- + Any + """ + return self["hovertemplatefallback"] + + @hovertemplatefallback.setter + def hovertemplatefallback(self, val): + self["hovertemplatefallback"] = val + + @property + def hovertemplatesrc(self): + """ + Sets the source reference on Chart Studio Cloud for + `hovertemplate`. + + The 'hovertemplatesrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["hovertemplatesrc"] + + @hovertemplatesrc.setter + def hovertemplatesrc(self, val): + self["hovertemplatesrc"] = val + + @property + def hovertext(self): + """ + Same as `text`. + + The 'hovertext' property is a string and must be specified as: + - A string + - A number that will be converted to a string + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["hovertext"] + + @hovertext.setter + def hovertext(self, val): + self["hovertext"] = val + + @property + def hovertextsrc(self): + """ + Sets the source reference on Chart Studio Cloud for + `hovertext`. + + The 'hovertextsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["hovertextsrc"] + + @hovertextsrc.setter + def hovertextsrc(self, val): + self["hovertextsrc"] = val + + @property + def ids(self): + """ + Assigns id labels to each datum. These ids for object constancy + of data points during animation. Should be an array of strings, + not numbers or any other type. + + The 'ids' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["ids"] + + @ids.setter + def ids(self, val): + self["ids"] = val + + @property + def idssrc(self): + """ + Sets the source reference on Chart Studio Cloud for `ids`. + + The 'idssrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["idssrc"] + + @idssrc.setter + def idssrc(self, val): + self["idssrc"] = val + + @property + def jitter(self): + """ + Sets the amount of jitter in the sample points drawn. If 0, the + sample points align along the distribution axis. If 1, the + sample points are drawn in a random jitter of width equal to + the width of the box(es). + + The 'jitter' property is a number and may be specified as: + - An int or float in the interval [0, 1] + + Returns + ------- + int|float + """ + return self["jitter"] + + @jitter.setter + def jitter(self, val): + self["jitter"] = val + + @property + def legend(self): + """ + Sets the reference to a legend to show this trace in. + References to these legends are "legend", "legend2", "legend3", + etc. Settings for these legends are set in the layout, under + `layout.legend`, `layout.legend2`, etc. + + The 'legend' property is an identifier of a particular + subplot, of type 'legend', that may be specified as: + - the string 'legend' optionally followed by an integer >= 1 + (e.g. 'legend', 'legend1', 'legend2', 'legend3', etc.) + + Returns + ------- + str + """ + return self["legend"] + + @legend.setter + def legend(self, val): + self["legend"] = val + + @property + def legendgroup(self): + """ + Sets the legend group for this trace. Traces and shapes part of + the same legend group hide/show at the same time when toggling + legend items. + + The 'legendgroup' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["legendgroup"] + + @legendgroup.setter + def legendgroup(self, val): + self["legendgroup"] = val + + @property + def legendgrouptitle(self): + """ + The 'legendgrouptitle' property is an instance of Legendgrouptitle + that may be specified as: + - An instance of :class:`plotly.graph_objs.box.Legendgrouptitle` + - A dict of string/value properties that will be passed + to the Legendgrouptitle constructor + + Returns + ------- + plotly.graph_objs.box.Legendgrouptitle + """ + return self["legendgrouptitle"] + + @legendgrouptitle.setter + def legendgrouptitle(self, val): + self["legendgrouptitle"] = val + + @property + def legendrank(self): + """ + Sets the legend rank for this trace. Items and groups with + smaller ranks are presented on top/left side while with + "reversed" `legend.traceorder` they are on bottom/right side. + The default legendrank is 1000, so that you can use ranks less + than 1000 to place certain items before all unranked items, and + ranks greater than 1000 to go after all unranked items. When + having unranked or equal rank items shapes would be displayed + after traces i.e. according to their order in data and layout. + + The 'legendrank' property is a number and may be specified as: + - An int or float + + Returns + ------- + int|float + """ + return self["legendrank"] + + @legendrank.setter + def legendrank(self, val): + self["legendrank"] = val + + @property + def legendwidth(self): + """ + Sets the width (in px or fraction) of the legend for this + trace. + + The 'legendwidth' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["legendwidth"] + + @legendwidth.setter + def legendwidth(self, val): + self["legendwidth"] = val + + @property + def line(self): + """ + The 'line' property is an instance of Line + that may be specified as: + - An instance of :class:`plotly.graph_objs.box.Line` + - A dict of string/value properties that will be passed + to the Line constructor + + Returns + ------- + plotly.graph_objs.box.Line + """ + return self["line"] + + @line.setter + def line(self, val): + self["line"] = val + + @property + def lowerfence(self): + """ + Sets the lower fence values. There should be as many items as + the number of boxes desired. This attribute has effect only + under the q1/median/q3 signature. If `lowerfence` is not + provided but a sample (in `y` or `x`) is set, we compute the + lower as the last sample point below 1.5 times the IQR. + + The 'lowerfence' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["lowerfence"] + + @lowerfence.setter + def lowerfence(self, val): + self["lowerfence"] = val + + @property + def lowerfencesrc(self): + """ + Sets the source reference on Chart Studio Cloud for + `lowerfence`. + + The 'lowerfencesrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["lowerfencesrc"] + + @lowerfencesrc.setter + def lowerfencesrc(self, val): + self["lowerfencesrc"] = val + + @property + def marker(self): + """ + The 'marker' property is an instance of Marker + that may be specified as: + - An instance of :class:`plotly.graph_objs.box.Marker` + - A dict of string/value properties that will be passed + to the Marker constructor + + Returns + ------- + plotly.graph_objs.box.Marker + """ + return self["marker"] + + @marker.setter + def marker(self, val): + self["marker"] = val + + @property + def mean(self): + """ + Sets the mean values. There should be as many items as the + number of boxes desired. This attribute has effect only under + the q1/median/q3 signature. If `mean` is not provided but a + sample (in `y` or `x`) is set, we compute the mean for each box + using the sample values. + + The 'mean' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["mean"] + + @mean.setter + def mean(self, val): + self["mean"] = val + + @property + def meansrc(self): + """ + Sets the source reference on Chart Studio Cloud for `mean`. + + The 'meansrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["meansrc"] + + @meansrc.setter + def meansrc(self, val): + self["meansrc"] = val + + @property + def median(self): + """ + Sets the median values. There should be as many items as the + number of boxes desired. + + The 'median' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["median"] + + @median.setter + def median(self, val): + self["median"] = val + + @property + def mediansrc(self): + """ + Sets the source reference on Chart Studio Cloud for `median`. + + The 'mediansrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["mediansrc"] + + @mediansrc.setter + def mediansrc(self, val): + self["mediansrc"] = val + + @property + def meta(self): + """ + Assigns extra meta information associated with this trace that + can be used in various text attributes. Attributes such as + trace `name`, graph, axis and colorbar `title.text`, annotation + `text` `rangeselector`, `updatemenues` and `sliders` `label` + text all support `meta`. To access the trace `meta` values in + an attribute in the same trace, simply use `%{meta[i]}` where + `i` is the index or key of the `meta` item in question. To + access trace `meta` in layout attributes, use + `%{data[n[.meta[i]}` where `i` is the index or key of the + `meta` and `n` is the trace index. + + The 'meta' property accepts values of any type + + Returns + ------- + Any|numpy.ndarray + """ + return self["meta"] + + @meta.setter + def meta(self, val): + self["meta"] = val + + @property + def metasrc(self): + """ + Sets the source reference on Chart Studio Cloud for `meta`. + + The 'metasrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["metasrc"] + + @metasrc.setter + def metasrc(self, val): + self["metasrc"] = val + + @property + def name(self): + """ + Sets the trace name. The trace name appears as the legend item + and on hover. For box traces, the name will also be used for + the position coordinate, if `x` and `x0` (`y` and `y0` if + horizontal) are missing and the position axis is categorical + + The 'name' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["name"] + + @name.setter + def name(self, val): + self["name"] = val + + @property + def notched(self): + """ + Determines whether or not notches are drawn. Notches displays a + confidence interval around the median. We compute the + confidence interval as median +/- 1.57 * IQR / sqrt(N), where + IQR is the interquartile range and N is the sample size. If two + boxes' notches do not overlap there is 95% confidence their + medians differ. See + https://sites.google.com/site/davidsstatistics/home/notched- + box-plots for more info. Defaults to False unless `notchwidth` + or `notchspan` is set. + + The 'notched' property is a boolean and must be specified as: + - A boolean value: True or False + + Returns + ------- + bool + """ + return self["notched"] + + @notched.setter + def notched(self, val): + self["notched"] = val + + @property + def notchspan(self): + """ + Sets the notch span from the boxes' `median` values. There + should be as many items as the number of boxes desired. This + attribute has effect only under the q1/median/q3 signature. If + `notchspan` is not provided but a sample (in `y` or `x`) is + set, we compute it as 1.57 * IQR / sqrt(N), where N is the + sample size. + + The 'notchspan' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["notchspan"] + + @notchspan.setter + def notchspan(self, val): + self["notchspan"] = val + + @property + def notchspansrc(self): + """ + Sets the source reference on Chart Studio Cloud for + `notchspan`. + + The 'notchspansrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["notchspansrc"] + + @notchspansrc.setter + def notchspansrc(self, val): + self["notchspansrc"] = val + + @property + def notchwidth(self): + """ + Sets the width of the notches relative to the box width. For + example, with 0, the notches are as wide as the box(es). + + The 'notchwidth' property is a number and may be specified as: + - An int or float in the interval [0, 0.5] + + Returns + ------- + int|float + """ + return self["notchwidth"] + + @notchwidth.setter + def notchwidth(self, val): + self["notchwidth"] = val + + @property + def offsetgroup(self): + """ + Set several traces linked to the same position axis or matching + axes to the same offsetgroup where bars of the same position + coordinate will line up. + + The 'offsetgroup' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["offsetgroup"] + + @offsetgroup.setter + def offsetgroup(self, val): + self["offsetgroup"] = val + + @property + def opacity(self): + """ + Sets the opacity of the trace. + + The 'opacity' property is a number and may be specified as: + - An int or float in the interval [0, 1] + + Returns + ------- + int|float + """ + return self["opacity"] + + @opacity.setter + def opacity(self, val): + self["opacity"] = val + + @property + def orientation(self): + """ + Sets the orientation of the box(es). If "v" ("h"), the + distribution is visualized along the vertical (horizontal). + + The 'orientation' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['v', 'h'] + + Returns + ------- + Any + """ + return self["orientation"] + + @orientation.setter + def orientation(self, val): + self["orientation"] = val + + @property + def pointpos(self): + """ + Sets the position of the sample points in relation to the + box(es). If 0, the sample points are places over the center of + the box(es). Positive (negative) values correspond to positions + to the right (left) for vertical boxes and above (below) for + horizontal boxes + + The 'pointpos' property is a number and may be specified as: + - An int or float in the interval [-2, 2] + + Returns + ------- + int|float + """ + return self["pointpos"] + + @pointpos.setter + def pointpos(self, val): + self["pointpos"] = val + + @property + def q1(self): + """ + Sets the Quartile 1 values. There should be as many items as + the number of boxes desired. + + The 'q1' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["q1"] + + @q1.setter + def q1(self, val): + self["q1"] = val + + @property + def q1src(self): + """ + Sets the source reference on Chart Studio Cloud for `q1`. + + The 'q1src' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["q1src"] + + @q1src.setter + def q1src(self, val): + self["q1src"] = val + + @property + def q3(self): + """ + Sets the Quartile 3 values. There should be as many items as + the number of boxes desired. + + The 'q3' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["q3"] + + @q3.setter + def q3(self, val): + self["q3"] = val + + @property + def q3src(self): + """ + Sets the source reference on Chart Studio Cloud for `q3`. + + The 'q3src' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["q3src"] + + @q3src.setter + def q3src(self, val): + self["q3src"] = val + + @property + def quartilemethod(self): + """ + Sets the method used to compute the sample's Q1 and Q3 + quartiles. The "linear" method uses the 25th percentile for Q1 + and 75th percentile for Q3 as computed using method #10 (listed + on http://jse.amstat.org/v14n3/langford.html). The "exclusive" + method uses the median to divide the ordered dataset into two + halves if the sample is odd, it does not include the median in + either half - Q1 is then the median of the lower half and Q3 + the median of the upper half. The "inclusive" method also uses + the median to divide the ordered dataset into two halves but if + the sample is odd, it includes the median in both halves - Q1 + is then the median of the lower half and Q3 the median of the + upper half. + + The 'quartilemethod' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['linear', 'exclusive', 'inclusive'] + + Returns + ------- + Any + """ + return self["quartilemethod"] + + @quartilemethod.setter + def quartilemethod(self, val): + self["quartilemethod"] = val + + @property + def sd(self): + """ + Sets the standard deviation values. There should be as many + items as the number of boxes desired. This attribute has effect + only under the q1/median/q3 signature. If `sd` is not provided + but a sample (in `y` or `x`) is set, we compute the standard + deviation for each box using the sample values. + + The 'sd' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["sd"] + + @sd.setter + def sd(self, val): + self["sd"] = val + + @property + def sdmultiple(self): + """ + Scales the box size when sizemode=sd Allowing boxes to be drawn + across any stddev range For example 1-stddev, 3-stddev, + 5-stddev + + The 'sdmultiple' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["sdmultiple"] + + @sdmultiple.setter + def sdmultiple(self, val): + self["sdmultiple"] = val + + @property + def sdsrc(self): + """ + Sets the source reference on Chart Studio Cloud for `sd`. + + The 'sdsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["sdsrc"] + + @sdsrc.setter + def sdsrc(self, val): + self["sdsrc"] = val + + @property + def selected(self): + """ + The 'selected' property is an instance of Selected + that may be specified as: + - An instance of :class:`plotly.graph_objs.box.Selected` + - A dict of string/value properties that will be passed + to the Selected constructor + + Returns + ------- + plotly.graph_objs.box.Selected + """ + return self["selected"] + + @selected.setter + def selected(self, val): + self["selected"] = val + + @property + def selectedpoints(self): + """ + Array containing integer indices of selected points. Has an + effect only for traces that support selections. Note that an + empty array means an empty selection where the `unselected` are + turned on for all points, whereas, any other non-array values + means no selection all where the `selected` and `unselected` + styles have no effect. + + The 'selectedpoints' property accepts values of any type + + Returns + ------- + Any + """ + return self["selectedpoints"] + + @selectedpoints.setter + def selectedpoints(self, val): + self["selectedpoints"] = val + + @property + def showlegend(self): + """ + Determines whether or not an item corresponding to this trace + is shown in the legend. + + The 'showlegend' property is a boolean and must be specified as: + - A boolean value: True or False + + Returns + ------- + bool + """ + return self["showlegend"] + + @showlegend.setter + def showlegend(self, val): + self["showlegend"] = val + + @property + def showwhiskers(self): + """ + Determines whether or not whiskers are visible. Defaults to + true for `sizemode` "quartiles", false for "sd". + + The 'showwhiskers' property is a boolean and must be specified as: + - A boolean value: True or False + + Returns + ------- + bool + """ + return self["showwhiskers"] + + @showwhiskers.setter + def showwhiskers(self, val): + self["showwhiskers"] = val + + @property + def sizemode(self): + """ + Sets the upper and lower bound for the boxes quartiles means + box is drawn between Q1 and Q3 SD means the box is drawn + between Mean +- Standard Deviation Argument sdmultiple (default + 1) to scale the box size So it could be drawn 1-stddev, + 3-stddev etc + + The 'sizemode' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['quartiles', 'sd'] + + Returns + ------- + Any + """ + return self["sizemode"] + + @sizemode.setter + def sizemode(self, val): + self["sizemode"] = val + + @property + def stream(self): + """ + The 'stream' property is an instance of Stream + that may be specified as: + - An instance of :class:`plotly.graph_objs.box.Stream` + - A dict of string/value properties that will be passed + to the Stream constructor + + Returns + ------- + plotly.graph_objs.box.Stream + """ + return self["stream"] + + @stream.setter + def stream(self, val): + self["stream"] = val + + @property + def text(self): + """ + Sets the text elements associated with each sample value. If a + single string, the same string appears over all the data + points. If an array of string, the items are mapped in order to + the this trace's (x,y) coordinates. To be seen, trace + `hoverinfo` must contain a "text" flag. + + The 'text' property is a string and must be specified as: + - A string + - A number that will be converted to a string + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["text"] + + @text.setter + def text(self, val): + self["text"] = val + + @property + def textsrc(self): + """ + Sets the source reference on Chart Studio Cloud for `text`. + + The 'textsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["textsrc"] + + @textsrc.setter + def textsrc(self, val): + self["textsrc"] = val + + @property + def uid(self): + """ + Assign an id to this trace, Use this to provide object + constancy between traces during animations and transitions. + + The 'uid' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["uid"] + + @uid.setter + def uid(self, val): + self["uid"] = val + + @property + def uirevision(self): + """ + Controls persistence of some user-driven changes to the trace: + `constraintrange` in `parcoords` traces, as well as some + `editable: true` modifications such as `name` and + `colorbar.title`. Defaults to `layout.uirevision`. Note that + other user-driven trace attribute changes are controlled by + `layout` attributes: `trace.visible` is controlled by + `layout.legend.uirevision`, `selectedpoints` is controlled by + `layout.selectionrevision`, and `colorbar.(x|y)` (accessible + with `config: {editable: true}`) is controlled by + `layout.editrevision`. Trace changes are tracked by `uid`, + which only falls back on trace index if no `uid` is provided. + So if your app can add/remove traces before the end of the + `data` array, such that the same trace has a different index, + you can still preserve user-driven changes if you give each + trace a `uid` that stays with it as it moves. + + The 'uirevision' property accepts values of any type + + Returns + ------- + Any + """ + return self["uirevision"] + + @uirevision.setter + def uirevision(self, val): + self["uirevision"] = val + + @property + def unselected(self): + """ + The 'unselected' property is an instance of Unselected + that may be specified as: + - An instance of :class:`plotly.graph_objs.box.Unselected` + - A dict of string/value properties that will be passed + to the Unselected constructor + + Returns + ------- + plotly.graph_objs.box.Unselected + """ + return self["unselected"] + + @unselected.setter + def unselected(self, val): + self["unselected"] = val + + @property + def upperfence(self): + """ + Sets the upper fence values. There should be as many items as + the number of boxes desired. This attribute has effect only + under the q1/median/q3 signature. If `upperfence` is not + provided but a sample (in `y` or `x`) is set, we compute the + upper as the last sample point above 1.5 times the IQR. + + The 'upperfence' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["upperfence"] + + @upperfence.setter + def upperfence(self, val): + self["upperfence"] = val + + @property + def upperfencesrc(self): + """ + Sets the source reference on Chart Studio Cloud for + `upperfence`. + + The 'upperfencesrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["upperfencesrc"] + + @upperfencesrc.setter + def upperfencesrc(self, val): + self["upperfencesrc"] = val + + @property + def visible(self): + """ + Determines whether or not this trace is visible. If + "legendonly", the trace is not drawn, but can appear as a + legend item (provided that the legend itself is visible). + + The 'visible' property is an enumeration that may be specified as: + - One of the following enumeration values: + [True, False, 'legendonly'] + + Returns + ------- + Any + """ + return self["visible"] + + @visible.setter + def visible(self, val): + self["visible"] = val + + @property + def whiskerwidth(self): + """ + Sets the width of the whiskers relative to the box width. For + example, with 1, the whiskers are as wide as the box(es). + + The 'whiskerwidth' property is a number and may be specified as: + - An int or float in the interval [0, 1] + + Returns + ------- + int|float + """ + return self["whiskerwidth"] + + @whiskerwidth.setter + def whiskerwidth(self, val): + self["whiskerwidth"] = val + + @property + def width(self): + """ + Sets the width of the box in data coordinate If 0 (default + value) the width is automatically selected based on the + positions of other box traces in the same subplot. + + The 'width' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["width"] + + @width.setter + def width(self, val): + self["width"] = val + + @property + def x(self): + """ + Sets the x sample data or coordinates. See overview for more + info. + + The 'x' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["x"] + + @x.setter + def x(self, val): + self["x"] = val + + @property + def x0(self): + """ + Sets the x coordinate for single-box traces or the starting + coordinate for multi-box traces set using q1/median/q3. See + overview for more info. + + The 'x0' property accepts values of any type + + Returns + ------- + Any + """ + return self["x0"] + + @x0.setter + def x0(self, val): + self["x0"] = val + + @property + def xaxis(self): + """ + Sets a reference between this trace's x coordinates and a 2D + cartesian x axis. If "x" (the default value), the x coordinates + refer to `layout.xaxis`. If "x2", the x coordinates refer to + `layout.xaxis2`, and so on. + + The 'xaxis' property is an identifier of a particular + subplot, of type 'x', that may be specified as: + - the string 'x' optionally followed by an integer >= 1 + (e.g. 'x', 'x1', 'x2', 'x3', etc.) + + Returns + ------- + str + """ + return self["xaxis"] + + @xaxis.setter + def xaxis(self, val): + self["xaxis"] = val + + @property + def xcalendar(self): + """ + Sets the calendar system to use with `x` date data. + + The 'xcalendar' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['chinese', 'coptic', 'discworld', 'ethiopian', + 'gregorian', 'hebrew', 'islamic', 'jalali', 'julian', + 'mayan', 'nanakshahi', 'nepali', 'persian', 'taiwan', + 'thai', 'ummalqura'] + + Returns + ------- + Any + """ + return self["xcalendar"] + + @xcalendar.setter + def xcalendar(self, val): + self["xcalendar"] = val + + @property + def xhoverformat(self): + """ + Sets the hover text formatting rulefor `x` using d3 formatting + mini-languages which are very similar to those in Python. For + numbers, see: + https://github.com/d3/d3-format/tree/v1.4.5#d3-format. And for + dates see: https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format. We add two items to d3's date + formatter: "%h" for half of the year as a decimal number as + well as "%{n}f" for fractional seconds with n digits. For + example, *2016-10-13 09:15:23.456* with tickformat + "%H~%M~%S.%2f" would display *09~15~23.46*By default the values + are formatted using `xaxis.hoverformat`. + + The 'xhoverformat' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["xhoverformat"] + + @xhoverformat.setter + def xhoverformat(self, val): + self["xhoverformat"] = val + + @property + def xperiod(self): + """ + Only relevant when the axis `type` is "date". Sets the period + positioning in milliseconds or "M" on the x axis. Special + values in the form of "M" could be used to declare the + number of months. In this case `n` must be a positive integer. + + The 'xperiod' property accepts values of any type + + Returns + ------- + Any + """ + return self["xperiod"] + + @xperiod.setter + def xperiod(self, val): + self["xperiod"] = val + + @property + def xperiod0(self): + """ + Only relevant when the axis `type` is "date". Sets the base for + period positioning in milliseconds or date string on the x0 + axis. When `x0period` is round number of weeks, the `x0period0` + by default would be on a Sunday i.e. 2000-01-02, otherwise it + would be at 2000-01-01. + + The 'xperiod0' property accepts values of any type + + Returns + ------- + Any + """ + return self["xperiod0"] + + @xperiod0.setter + def xperiod0(self, val): + self["xperiod0"] = val + + @property + def xperiodalignment(self): + """ + Only relevant when the axis `type` is "date". Sets the + alignment of data points on the x axis. + + The 'xperiodalignment' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['start', 'middle', 'end'] + + Returns + ------- + Any + """ + return self["xperiodalignment"] + + @xperiodalignment.setter + def xperiodalignment(self, val): + self["xperiodalignment"] = val + + @property + def xsrc(self): + """ + Sets the source reference on Chart Studio Cloud for `x`. + + The 'xsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["xsrc"] + + @xsrc.setter + def xsrc(self, val): + self["xsrc"] = val + + @property + def y(self): + """ + Sets the y sample data or coordinates. See overview for more + info. + + The 'y' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["y"] + + @y.setter + def y(self, val): + self["y"] = val + + @property + def y0(self): + """ + Sets the y coordinate for single-box traces or the starting + coordinate for multi-box traces set using q1/median/q3. See + overview for more info. + + The 'y0' property accepts values of any type + + Returns + ------- + Any + """ + return self["y0"] + + @y0.setter + def y0(self, val): + self["y0"] = val + + @property + def yaxis(self): + """ + Sets a reference between this trace's y coordinates and a 2D + cartesian y axis. If "y" (the default value), the y coordinates + refer to `layout.yaxis`. If "y2", the y coordinates refer to + `layout.yaxis2`, and so on. + + The 'yaxis' property is an identifier of a particular + subplot, of type 'y', that may be specified as: + - the string 'y' optionally followed by an integer >= 1 + (e.g. 'y', 'y1', 'y2', 'y3', etc.) + + Returns + ------- + str + """ + return self["yaxis"] + + @yaxis.setter + def yaxis(self, val): + self["yaxis"] = val + + @property + def ycalendar(self): + """ + Sets the calendar system to use with `y` date data. + + The 'ycalendar' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['chinese', 'coptic', 'discworld', 'ethiopian', + 'gregorian', 'hebrew', 'islamic', 'jalali', 'julian', + 'mayan', 'nanakshahi', 'nepali', 'persian', 'taiwan', + 'thai', 'ummalqura'] + + Returns + ------- + Any + """ + return self["ycalendar"] + + @ycalendar.setter + def ycalendar(self, val): + self["ycalendar"] = val + + @property + def yhoverformat(self): + """ + Sets the hover text formatting rulefor `y` using d3 formatting + mini-languages which are very similar to those in Python. For + numbers, see: + https://github.com/d3/d3-format/tree/v1.4.5#d3-format. And for + dates see: https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format. We add two items to d3's date + formatter: "%h" for half of the year as a decimal number as + well as "%{n}f" for fractional seconds with n digits. For + example, *2016-10-13 09:15:23.456* with tickformat + "%H~%M~%S.%2f" would display *09~15~23.46*By default the values + are formatted using `yaxis.hoverformat`. + + The 'yhoverformat' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["yhoverformat"] + + @yhoverformat.setter + def yhoverformat(self, val): + self["yhoverformat"] = val + + @property + def yperiod(self): + """ + Only relevant when the axis `type` is "date". Sets the period + positioning in milliseconds or "M" on the y axis. Special + values in the form of "M" could be used to declare the + number of months. In this case `n` must be a positive integer. + + The 'yperiod' property accepts values of any type + + Returns + ------- + Any + """ + return self["yperiod"] + + @yperiod.setter + def yperiod(self, val): + self["yperiod"] = val + + @property + def yperiod0(self): + """ + Only relevant when the axis `type` is "date". Sets the base for + period positioning in milliseconds or date string on the y0 + axis. When `y0period` is round number of weeks, the `y0period0` + by default would be on a Sunday i.e. 2000-01-02, otherwise it + would be at 2000-01-01. + + The 'yperiod0' property accepts values of any type + + Returns + ------- + Any + """ + return self["yperiod0"] + + @yperiod0.setter + def yperiod0(self, val): + self["yperiod0"] = val + + @property + def yperiodalignment(self): + """ + Only relevant when the axis `type` is "date". Sets the + alignment of data points on the y axis. + + The 'yperiodalignment' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['start', 'middle', 'end'] + + Returns + ------- + Any + """ + return self["yperiodalignment"] + + @yperiodalignment.setter + def yperiodalignment(self, val): + self["yperiodalignment"] = val + + @property + def ysrc(self): + """ + Sets the source reference on Chart Studio Cloud for `y`. + + The 'ysrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["ysrc"] + + @ysrc.setter + def ysrc(self, val): + self["ysrc"] = val + + @property + def zorder(self): + """ + Sets the layer on which this trace is displayed, relative to + other SVG traces on the same subplot. SVG traces with higher + `zorder` appear in front of those with lower `zorder`. + + The 'zorder' property is a integer and may be specified as: + - An int (or float that will be cast to an int) + + Returns + ------- + int + """ + return self["zorder"] + + @zorder.setter + def zorder(self, val): + self["zorder"] = val + + @property + def type(self): + return self._props["type"] + + @property + def _prop_descriptions(self): + return """\ + alignmentgroup + Set several traces linked to the same position axis or + matching axes to the same alignmentgroup. This controls + whether bars compute their positional range dependently + or independently. + boxmean + If True, the mean of the box(es)' underlying + distribution is drawn as a dashed line inside the + box(es). If "sd" the standard deviation is also drawn. + Defaults to True when `mean` is set. Defaults to "sd" + when `sd` is set Otherwise defaults to False. + boxpoints + If "outliers", only the sample points lying outside the + whiskers are shown If "suspectedoutliers", the outlier + points are shown and points either less than 4*Q1-3*Q3 + or greater than 4*Q3-3*Q1 are highlighted (see + `outliercolor`) If "all", all sample points are shown + If False, only the box(es) are shown with no sample + points Defaults to "suspectedoutliers" when + `marker.outliercolor` or `marker.line.outliercolor` is + set. Defaults to "all" under the q1/median/q3 + signature. Otherwise defaults to "outliers". + customdata + Assigns extra data each datum. This may be useful when + listening to hover, click and selection events. Note + that, "scatter" traces also appends customdata items in + the markers DOM elements + customdatasrc + Sets the source reference on Chart Studio Cloud for + `customdata`. + dx + Sets the x coordinate step for multi-box traces set + using q1/median/q3. + dy + Sets the y coordinate step for multi-box traces set + using q1/median/q3. + fillcolor + Sets the fill color. Defaults to a half-transparent + variant of the line color, marker color, or marker line + color, whichever is available. + hoverinfo + Determines which trace information appear on hover. If + `none` or `skip` are set, no information is displayed + upon hovering. But, if `none` is set, click and hover + events are still fired. + hoverinfosrc + Sets the source reference on Chart Studio Cloud for + `hoverinfo`. + hoverlabel + :class:`plotly.graph_objects.box.Hoverlabel` instance + or dict with compatible properties + hoveron + Do the hover effects highlight individual boxes or + sample points or both? + hovertemplate + Template string used for rendering the information that + appear on hover box. Note that this will override + `hoverinfo`. Variables are inserted using %{variable}, + for example "y: %{y}" as well as %{xother}, {%_xother}, + {%_xother_}, {%xother_}. When showing info for several + points, "xother" will be added to those with different + x positions from the first point. An underscore before + or after "(x|y)other" will add a space on that side, + only when this field is shown. Numbers are formatted + using d3-format's syntax %{variable:d3-format}, for + example "Price: %{y:$.2f}". + https://github.com/d3/d3-format/tree/v1.4.5#d3-format + for details on the formatting syntax. Dates are + formatted using d3-time-format's syntax + %{variable|d3-time-format}, for example "Day: + %{2019-01-01|%A}". https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format for details on the + date formatting syntax. Variables that can't be found + will be replaced with the specifier. For example, a + template of "data: %{x}, %{y}" will result in a value + of "data: 1, %{y}" if x is 1 and y is missing. + Variables with an undefined value will be replaced with + the fallback value. The variables available in + `hovertemplate` are the ones emitted as event data + described at this link + https://plotly.com/javascript/plotlyjs-events/#event- + data. Additionally, all attributes that can be + specified per-point (the ones that are `arrayOk: true`) + are available. Anything contained in tag `` is + displayed in the secondary box, for example + `%{fullData.name}`. To hide the + secondary box completely, use an empty tag + ``. + hovertemplatefallback + Fallback string that's displayed when a variable + referenced in a template is missing. If the boolean + value 'false' is passed in, the specifier with the + missing variable will be displayed. + hovertemplatesrc + Sets the source reference on Chart Studio Cloud for + `hovertemplate`. + hovertext + Same as `text`. + hovertextsrc + Sets the source reference on Chart Studio Cloud for + `hovertext`. + ids + Assigns id labels to each datum. These ids for object + constancy of data points during animation. Should be an + array of strings, not numbers or any other type. + idssrc + Sets the source reference on Chart Studio Cloud for + `ids`. + jitter + Sets the amount of jitter in the sample points drawn. + If 0, the sample points align along the distribution + axis. If 1, the sample points are drawn in a random + jitter of width equal to the width of the box(es). + legend + Sets the reference to a legend to show this trace in. + References to these legends are "legend", "legend2", + "legend3", etc. Settings for these legends are set in + the layout, under `layout.legend`, `layout.legend2`, + etc. + legendgroup + Sets the legend group for this trace. Traces and shapes + part of the same legend group hide/show at the same + time when toggling legend items. + legendgrouptitle + :class:`plotly.graph_objects.box.Legendgrouptitle` + instance or dict with compatible properties + legendrank + Sets the legend rank for this trace. Items and groups + with smaller ranks are presented on top/left side while + with "reversed" `legend.traceorder` they are on + bottom/right side. The default legendrank is 1000, so + that you can use ranks less than 1000 to place certain + items before all unranked items, and ranks greater than + 1000 to go after all unranked items. When having + unranked or equal rank items shapes would be displayed + after traces i.e. according to their order in data and + layout. + legendwidth + Sets the width (in px or fraction) of the legend for + this trace. + line + :class:`plotly.graph_objects.box.Line` instance or dict + with compatible properties + lowerfence + Sets the lower fence values. There should be as many + items as the number of boxes desired. This attribute + has effect only under the q1/median/q3 signature. If + `lowerfence` is not provided but a sample (in `y` or + `x`) is set, we compute the lower as the last sample + point below 1.5 times the IQR. + lowerfencesrc + Sets the source reference on Chart Studio Cloud for + `lowerfence`. + marker + :class:`plotly.graph_objects.box.Marker` instance or + dict with compatible properties + mean + Sets the mean values. There should be as many items as + the number of boxes desired. This attribute has effect + only under the q1/median/q3 signature. If `mean` is not + provided but a sample (in `y` or `x`) is set, we + compute the mean for each box using the sample values. + meansrc + Sets the source reference on Chart Studio Cloud for + `mean`. + median + Sets the median values. There should be as many items + as the number of boxes desired. + mediansrc + Sets the source reference on Chart Studio Cloud for + `median`. + meta + Assigns extra meta information associated with this + trace that can be used in various text attributes. + Attributes such as trace `name`, graph, axis and + colorbar `title.text`, annotation `text` + `rangeselector`, `updatemenues` and `sliders` `label` + text all support `meta`. To access the trace `meta` + values in an attribute in the same trace, simply use + `%{meta[i]}` where `i` is the index or key of the + `meta` item in question. To access trace `meta` in + layout attributes, use `%{data[n[.meta[i]}` where `i` + is the index or key of the `meta` and `n` is the trace + index. + metasrc + Sets the source reference on Chart Studio Cloud for + `meta`. + name + Sets the trace name. The trace name appears as the + legend item and on hover. For box traces, the name will + also be used for the position coordinate, if `x` and + `x0` (`y` and `y0` if horizontal) are missing and the + position axis is categorical + notched + Determines whether or not notches are drawn. Notches + displays a confidence interval around the median. We + compute the confidence interval as median +/- 1.57 * + IQR / sqrt(N), where IQR is the interquartile range and + N is the sample size. If two boxes' notches do not + overlap there is 95% confidence their medians differ. + See https://sites.google.com/site/davidsstatistics/home + /notched-box-plots for more info. Defaults to False + unless `notchwidth` or `notchspan` is set. + notchspan + Sets the notch span from the boxes' `median` values. + There should be as many items as the number of boxes + desired. This attribute has effect only under the + q1/median/q3 signature. If `notchspan` is not provided + but a sample (in `y` or `x`) is set, we compute it as + 1.57 * IQR / sqrt(N), where N is the sample size. + notchspansrc + Sets the source reference on Chart Studio Cloud for + `notchspan`. + notchwidth + Sets the width of the notches relative to the box + width. For example, with 0, the notches are as wide as + the box(es). + offsetgroup + Set several traces linked to the same position axis or + matching axes to the same offsetgroup where bars of the + same position coordinate will line up. + opacity + Sets the opacity of the trace. + orientation + Sets the orientation of the box(es). If "v" ("h"), the + distribution is visualized along the vertical + (horizontal). + pointpos + Sets the position of the sample points in relation to + the box(es). If 0, the sample points are places over + the center of the box(es). Positive (negative) values + correspond to positions to the right (left) for + vertical boxes and above (below) for horizontal boxes + q1 + Sets the Quartile 1 values. There should be as many + items as the number of boxes desired. + q1src + Sets the source reference on Chart Studio Cloud for + `q1`. + q3 + Sets the Quartile 3 values. There should be as many + items as the number of boxes desired. + q3src + Sets the source reference on Chart Studio Cloud for + `q3`. + quartilemethod + Sets the method used to compute the sample's Q1 and Q3 + quartiles. The "linear" method uses the 25th percentile + for Q1 and 75th percentile for Q3 as computed using + method #10 (listed on + http://jse.amstat.org/v14n3/langford.html). The + "exclusive" method uses the median to divide the + ordered dataset into two halves if the sample is odd, + it does not include the median in either half - Q1 is + then the median of the lower half and Q3 the median of + the upper half. The "inclusive" method also uses the + median to divide the ordered dataset into two halves + but if the sample is odd, it includes the median in + both halves - Q1 is then the median of the lower half + and Q3 the median of the upper half. + sd + Sets the standard deviation values. There should be as + many items as the number of boxes desired. This + attribute has effect only under the q1/median/q3 + signature. If `sd` is not provided but a sample (in `y` + or `x`) is set, we compute the standard deviation for + each box using the sample values. + sdmultiple + Scales the box size when sizemode=sd Allowing boxes to + be drawn across any stddev range For example 1-stddev, + 3-stddev, 5-stddev + sdsrc + Sets the source reference on Chart Studio Cloud for + `sd`. + selected + :class:`plotly.graph_objects.box.Selected` instance or + dict with compatible properties + selectedpoints + Array containing integer indices of selected points. + Has an effect only for traces that support selections. + Note that an empty array means an empty selection where + the `unselected` are turned on for all points, whereas, + any other non-array values means no selection all where + the `selected` and `unselected` styles have no effect. + showlegend + Determines whether or not an item corresponding to this + trace is shown in the legend. + showwhiskers + Determines whether or not whiskers are visible. + Defaults to true for `sizemode` "quartiles", false for + "sd". + sizemode + Sets the upper and lower bound for the boxes quartiles + means box is drawn between Q1 and Q3 SD means the box + is drawn between Mean +- Standard Deviation Argument + sdmultiple (default 1) to scale the box size So it + could be drawn 1-stddev, 3-stddev etc + stream + :class:`plotly.graph_objects.box.Stream` instance or + dict with compatible properties + text + Sets the text elements associated with each sample + value. If a single string, the same string appears over + all the data points. If an array of string, the items + are mapped in order to the this trace's (x,y) + coordinates. To be seen, trace `hoverinfo` must contain + a "text" flag. + textsrc + Sets the source reference on Chart Studio Cloud for + `text`. + uid + Assign an id to this trace, Use this to provide object + constancy between traces during animations and + transitions. + uirevision + Controls persistence of some user-driven changes to the + trace: `constraintrange` in `parcoords` traces, as well + as some `editable: true` modifications such as `name` + and `colorbar.title`. Defaults to `layout.uirevision`. + Note that other user-driven trace attribute changes are + controlled by `layout` attributes: `trace.visible` is + controlled by `layout.legend.uirevision`, + `selectedpoints` is controlled by + `layout.selectionrevision`, and `colorbar.(x|y)` + (accessible with `config: {editable: true}`) is + controlled by `layout.editrevision`. Trace changes are + tracked by `uid`, which only falls back on trace index + if no `uid` is provided. So if your app can add/remove + traces before the end of the `data` array, such that + the same trace has a different index, you can still + preserve user-driven changes if you give each trace a + `uid` that stays with it as it moves. + unselected + :class:`plotly.graph_objects.box.Unselected` instance + or dict with compatible properties + upperfence + Sets the upper fence values. There should be as many + items as the number of boxes desired. This attribute + has effect only under the q1/median/q3 signature. If + `upperfence` is not provided but a sample (in `y` or + `x`) is set, we compute the upper as the last sample + point above 1.5 times the IQR. + upperfencesrc + Sets the source reference on Chart Studio Cloud for + `upperfence`. + visible + Determines whether or not this trace is visible. If + "legendonly", the trace is not drawn, but can appear as + a legend item (provided that the legend itself is + visible). + whiskerwidth + Sets the width of the whiskers relative to the box + width. For example, with 1, the whiskers are as wide as + the box(es). + width + Sets the width of the box in data coordinate If 0 + (default value) the width is automatically selected + based on the positions of other box traces in the same + subplot. + x + Sets the x sample data or coordinates. See overview for + more info. + x0 + Sets the x coordinate for single-box traces or the + starting coordinate for multi-box traces set using + q1/median/q3. See overview for more info. + xaxis + Sets a reference between this trace's x coordinates and + a 2D cartesian x axis. If "x" (the default value), the + x coordinates refer to `layout.xaxis`. If "x2", the x + coordinates refer to `layout.xaxis2`, and so on. + xcalendar + Sets the calendar system to use with `x` date data. + xhoverformat + Sets the hover text formatting rulefor `x` using d3 + formatting mini-languages which are very similar to + those in Python. For numbers, see: + https://github.com/d3/d3-format/tree/v1.4.5#d3-format. + And for dates see: https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format. We add two items to + d3's date formatter: "%h" for half of the year as a + decimal number as well as "%{n}f" for fractional + seconds with n digits. For example, *2016-10-13 + 09:15:23.456* with tickformat "%H~%M~%S.%2f" would + display *09~15~23.46*By default the values are + formatted using `xaxis.hoverformat`. + xperiod + Only relevant when the axis `type` is "date". Sets the + period positioning in milliseconds or "M" on the x + axis. Special values in the form of "M" could be + used to declare the number of months. In this case `n` + must be a positive integer. + xperiod0 + Only relevant when the axis `type` is "date". Sets the + base for period positioning in milliseconds or date + string on the x0 axis. When `x0period` is round number + of weeks, the `x0period0` by default would be on a + Sunday i.e. 2000-01-02, otherwise it would be at + 2000-01-01. + xperiodalignment + Only relevant when the axis `type` is "date". Sets the + alignment of data points on the x axis. + xsrc + Sets the source reference on Chart Studio Cloud for + `x`. + y + Sets the y sample data or coordinates. See overview for + more info. + y0 + Sets the y coordinate for single-box traces or the + starting coordinate for multi-box traces set using + q1/median/q3. See overview for more info. + yaxis + Sets a reference between this trace's y coordinates and + a 2D cartesian y axis. If "y" (the default value), the + y coordinates refer to `layout.yaxis`. If "y2", the y + coordinates refer to `layout.yaxis2`, and so on. + ycalendar + Sets the calendar system to use with `y` date data. + yhoverformat + Sets the hover text formatting rulefor `y` using d3 + formatting mini-languages which are very similar to + those in Python. For numbers, see: + https://github.com/d3/d3-format/tree/v1.4.5#d3-format. + And for dates see: https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format. We add two items to + d3's date formatter: "%h" for half of the year as a + decimal number as well as "%{n}f" for fractional + seconds with n digits. For example, *2016-10-13 + 09:15:23.456* with tickformat "%H~%M~%S.%2f" would + display *09~15~23.46*By default the values are + formatted using `yaxis.hoverformat`. + yperiod + Only relevant when the axis `type` is "date". Sets the + period positioning in milliseconds or "M" on the y + axis. Special values in the form of "M" could be + used to declare the number of months. In this case `n` + must be a positive integer. + yperiod0 + Only relevant when the axis `type` is "date". Sets the + base for period positioning in milliseconds or date + string on the y0 axis. When `y0period` is round number + of weeks, the `y0period0` by default would be on a + Sunday i.e. 2000-01-02, otherwise it would be at + 2000-01-01. + yperiodalignment + Only relevant when the axis `type` is "date". Sets the + alignment of data points on the y axis. + ysrc + Sets the source reference on Chart Studio Cloud for + `y`. + zorder + Sets the layer on which this trace is displayed, + relative to other SVG traces on the same subplot. SVG + traces with higher `zorder` appear in front of those + with lower `zorder`. + """ + + def __init__( + self, + arg=None, + alignmentgroup=None, + boxmean=None, + boxpoints=None, + customdata=None, + customdatasrc=None, + dx=None, + dy=None, + fillcolor=None, + hoverinfo=None, + hoverinfosrc=None, + hoverlabel=None, + hoveron=None, + hovertemplate=None, + hovertemplatefallback=None, + hovertemplatesrc=None, + hovertext=None, + hovertextsrc=None, + ids=None, + idssrc=None, + jitter=None, + legend=None, + legendgroup=None, + legendgrouptitle=None, + legendrank=None, + legendwidth=None, + line=None, + lowerfence=None, + lowerfencesrc=None, + marker=None, + mean=None, + meansrc=None, + median=None, + mediansrc=None, + meta=None, + metasrc=None, + name=None, + notched=None, + notchspan=None, + notchspansrc=None, + notchwidth=None, + offsetgroup=None, + opacity=None, + orientation=None, + pointpos=None, + q1=None, + q1src=None, + q3=None, + q3src=None, + quartilemethod=None, + sd=None, + sdmultiple=None, + sdsrc=None, + selected=None, + selectedpoints=None, + showlegend=None, + showwhiskers=None, + sizemode=None, + stream=None, + text=None, + textsrc=None, + uid=None, + uirevision=None, + unselected=None, + upperfence=None, + upperfencesrc=None, + visible=None, + whiskerwidth=None, + width=None, + x=None, + x0=None, + xaxis=None, + xcalendar=None, + xhoverformat=None, + xperiod=None, + xperiod0=None, + xperiodalignment=None, + xsrc=None, + y=None, + y0=None, + yaxis=None, + ycalendar=None, + yhoverformat=None, + yperiod=None, + yperiod0=None, + yperiodalignment=None, + ysrc=None, + zorder=None, + **kwargs, + ): + """ + Construct a new Box object + + Each box spans from quartile 1 (Q1) to quartile 3 (Q3). The + second quartile (Q2, i.e. the median) is marked by a line + inside the box. The fences grow outward from the boxes' edges, + by default they span +/- 1.5 times the interquartile range + (IQR: Q3-Q1), The sample mean and standard deviation as well as + notches and the sample, outlier and suspected outliers points + can be optionally added to the box plot. The values and + positions corresponding to each boxes can be input using two + signatures. The first signature expects users to supply the + sample values in the `y` data array for vertical boxes (`x` for + horizontal boxes). By supplying an `x` (`y`) array, one box per + distinct `x` (`y`) value is drawn If no `x` (`y`) list is + provided, a single box is drawn. In this case, the box is + positioned with the trace `name` or with `x0` (`y0`) if + provided. The second signature expects users to supply the + boxes corresponding Q1, median and Q3 statistics in the `q1`, + `median` and `q3` data arrays respectively. Other box features + relying on statistics namely `lowerfence`, `upperfence`, + `notchspan` can be set directly by the users. To have plotly + compute them or to show sample points besides the boxes, users + can set the `y` data array for vertical boxes (`x` for + horizontal boxes) to a 2D array with the outer length + corresponding to the number of boxes in the traces and the + inner length corresponding the sample size. + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of :class:`plotly.graph_objs.Box` + alignmentgroup + Set several traces linked to the same position axis or + matching axes to the same alignmentgroup. This controls + whether bars compute their positional range dependently + or independently. + boxmean + If True, the mean of the box(es)' underlying + distribution is drawn as a dashed line inside the + box(es). If "sd" the standard deviation is also drawn. + Defaults to True when `mean` is set. Defaults to "sd" + when `sd` is set Otherwise defaults to False. + boxpoints + If "outliers", only the sample points lying outside the + whiskers are shown If "suspectedoutliers", the outlier + points are shown and points either less than 4*Q1-3*Q3 + or greater than 4*Q3-3*Q1 are highlighted (see + `outliercolor`) If "all", all sample points are shown + If False, only the box(es) are shown with no sample + points Defaults to "suspectedoutliers" when + `marker.outliercolor` or `marker.line.outliercolor` is + set. Defaults to "all" under the q1/median/q3 + signature. Otherwise defaults to "outliers". + customdata + Assigns extra data each datum. This may be useful when + listening to hover, click and selection events. Note + that, "scatter" traces also appends customdata items in + the markers DOM elements + customdatasrc + Sets the source reference on Chart Studio Cloud for + `customdata`. + dx + Sets the x coordinate step for multi-box traces set + using q1/median/q3. + dy + Sets the y coordinate step for multi-box traces set + using q1/median/q3. + fillcolor + Sets the fill color. Defaults to a half-transparent + variant of the line color, marker color, or marker line + color, whichever is available. + hoverinfo + Determines which trace information appear on hover. If + `none` or `skip` are set, no information is displayed + upon hovering. But, if `none` is set, click and hover + events are still fired. + hoverinfosrc + Sets the source reference on Chart Studio Cloud for + `hoverinfo`. + hoverlabel + :class:`plotly.graph_objects.box.Hoverlabel` instance + or dict with compatible properties + hoveron + Do the hover effects highlight individual boxes or + sample points or both? + hovertemplate + Template string used for rendering the information that + appear on hover box. Note that this will override + `hoverinfo`. Variables are inserted using %{variable}, + for example "y: %{y}" as well as %{xother}, {%_xother}, + {%_xother_}, {%xother_}. When showing info for several + points, "xother" will be added to those with different + x positions from the first point. An underscore before + or after "(x|y)other" will add a space on that side, + only when this field is shown. Numbers are formatted + using d3-format's syntax %{variable:d3-format}, for + example "Price: %{y:$.2f}". + https://github.com/d3/d3-format/tree/v1.4.5#d3-format + for details on the formatting syntax. Dates are + formatted using d3-time-format's syntax + %{variable|d3-time-format}, for example "Day: + %{2019-01-01|%A}". https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format for details on the + date formatting syntax. Variables that can't be found + will be replaced with the specifier. For example, a + template of "data: %{x}, %{y}" will result in a value + of "data: 1, %{y}" if x is 1 and y is missing. + Variables with an undefined value will be replaced with + the fallback value. The variables available in + `hovertemplate` are the ones emitted as event data + described at this link + https://plotly.com/javascript/plotlyjs-events/#event- + data. Additionally, all attributes that can be + specified per-point (the ones that are `arrayOk: true`) + are available. Anything contained in tag `` is + displayed in the secondary box, for example + `%{fullData.name}`. To hide the + secondary box completely, use an empty tag + ``. + hovertemplatefallback + Fallback string that's displayed when a variable + referenced in a template is missing. If the boolean + value 'false' is passed in, the specifier with the + missing variable will be displayed. + hovertemplatesrc + Sets the source reference on Chart Studio Cloud for + `hovertemplate`. + hovertext + Same as `text`. + hovertextsrc + Sets the source reference on Chart Studio Cloud for + `hovertext`. + ids + Assigns id labels to each datum. These ids for object + constancy of data points during animation. Should be an + array of strings, not numbers or any other type. + idssrc + Sets the source reference on Chart Studio Cloud for + `ids`. + jitter + Sets the amount of jitter in the sample points drawn. + If 0, the sample points align along the distribution + axis. If 1, the sample points are drawn in a random + jitter of width equal to the width of the box(es). + legend + Sets the reference to a legend to show this trace in. + References to these legends are "legend", "legend2", + "legend3", etc. Settings for these legends are set in + the layout, under `layout.legend`, `layout.legend2`, + etc. + legendgroup + Sets the legend group for this trace. Traces and shapes + part of the same legend group hide/show at the same + time when toggling legend items. + legendgrouptitle + :class:`plotly.graph_objects.box.Legendgrouptitle` + instance or dict with compatible properties + legendrank + Sets the legend rank for this trace. Items and groups + with smaller ranks are presented on top/left side while + with "reversed" `legend.traceorder` they are on + bottom/right side. The default legendrank is 1000, so + that you can use ranks less than 1000 to place certain + items before all unranked items, and ranks greater than + 1000 to go after all unranked items. When having + unranked or equal rank items shapes would be displayed + after traces i.e. according to their order in data and + layout. + legendwidth + Sets the width (in px or fraction) of the legend for + this trace. + line + :class:`plotly.graph_objects.box.Line` instance or dict + with compatible properties + lowerfence + Sets the lower fence values. There should be as many + items as the number of boxes desired. This attribute + has effect only under the q1/median/q3 signature. If + `lowerfence` is not provided but a sample (in `y` or + `x`) is set, we compute the lower as the last sample + point below 1.5 times the IQR. + lowerfencesrc + Sets the source reference on Chart Studio Cloud for + `lowerfence`. + marker + :class:`plotly.graph_objects.box.Marker` instance or + dict with compatible properties + mean + Sets the mean values. There should be as many items as + the number of boxes desired. This attribute has effect + only under the q1/median/q3 signature. If `mean` is not + provided but a sample (in `y` or `x`) is set, we + compute the mean for each box using the sample values. + meansrc + Sets the source reference on Chart Studio Cloud for + `mean`. + median + Sets the median values. There should be as many items + as the number of boxes desired. + mediansrc + Sets the source reference on Chart Studio Cloud for + `median`. + meta + Assigns extra meta information associated with this + trace that can be used in various text attributes. + Attributes such as trace `name`, graph, axis and + colorbar `title.text`, annotation `text` + `rangeselector`, `updatemenues` and `sliders` `label` + text all support `meta`. To access the trace `meta` + values in an attribute in the same trace, simply use + `%{meta[i]}` where `i` is the index or key of the + `meta` item in question. To access trace `meta` in + layout attributes, use `%{data[n[.meta[i]}` where `i` + is the index or key of the `meta` and `n` is the trace + index. + metasrc + Sets the source reference on Chart Studio Cloud for + `meta`. + name + Sets the trace name. The trace name appears as the + legend item and on hover. For box traces, the name will + also be used for the position coordinate, if `x` and + `x0` (`y` and `y0` if horizontal) are missing and the + position axis is categorical + notched + Determines whether or not notches are drawn. Notches + displays a confidence interval around the median. We + compute the confidence interval as median +/- 1.57 * + IQR / sqrt(N), where IQR is the interquartile range and + N is the sample size. If two boxes' notches do not + overlap there is 95% confidence their medians differ. + See https://sites.google.com/site/davidsstatistics/home + /notched-box-plots for more info. Defaults to False + unless `notchwidth` or `notchspan` is set. + notchspan + Sets the notch span from the boxes' `median` values. + There should be as many items as the number of boxes + desired. This attribute has effect only under the + q1/median/q3 signature. If `notchspan` is not provided + but a sample (in `y` or `x`) is set, we compute it as + 1.57 * IQR / sqrt(N), where N is the sample size. + notchspansrc + Sets the source reference on Chart Studio Cloud for + `notchspan`. + notchwidth + Sets the width of the notches relative to the box + width. For example, with 0, the notches are as wide as + the box(es). + offsetgroup + Set several traces linked to the same position axis or + matching axes to the same offsetgroup where bars of the + same position coordinate will line up. + opacity + Sets the opacity of the trace. + orientation + Sets the orientation of the box(es). If "v" ("h"), the + distribution is visualized along the vertical + (horizontal). + pointpos + Sets the position of the sample points in relation to + the box(es). If 0, the sample points are places over + the center of the box(es). Positive (negative) values + correspond to positions to the right (left) for + vertical boxes and above (below) for horizontal boxes + q1 + Sets the Quartile 1 values. There should be as many + items as the number of boxes desired. + q1src + Sets the source reference on Chart Studio Cloud for + `q1`. + q3 + Sets the Quartile 3 values. There should be as many + items as the number of boxes desired. + q3src + Sets the source reference on Chart Studio Cloud for + `q3`. + quartilemethod + Sets the method used to compute the sample's Q1 and Q3 + quartiles. The "linear" method uses the 25th percentile + for Q1 and 75th percentile for Q3 as computed using + method #10 (listed on + http://jse.amstat.org/v14n3/langford.html). The + "exclusive" method uses the median to divide the + ordered dataset into two halves if the sample is odd, + it does not include the median in either half - Q1 is + then the median of the lower half and Q3 the median of + the upper half. The "inclusive" method also uses the + median to divide the ordered dataset into two halves + but if the sample is odd, it includes the median in + both halves - Q1 is then the median of the lower half + and Q3 the median of the upper half. + sd + Sets the standard deviation values. There should be as + many items as the number of boxes desired. This + attribute has effect only under the q1/median/q3 + signature. If `sd` is not provided but a sample (in `y` + or `x`) is set, we compute the standard deviation for + each box using the sample values. + sdmultiple + Scales the box size when sizemode=sd Allowing boxes to + be drawn across any stddev range For example 1-stddev, + 3-stddev, 5-stddev + sdsrc + Sets the source reference on Chart Studio Cloud for + `sd`. + selected + :class:`plotly.graph_objects.box.Selected` instance or + dict with compatible properties + selectedpoints + Array containing integer indices of selected points. + Has an effect only for traces that support selections. + Note that an empty array means an empty selection where + the `unselected` are turned on for all points, whereas, + any other non-array values means no selection all where + the `selected` and `unselected` styles have no effect. + showlegend + Determines whether or not an item corresponding to this + trace is shown in the legend. + showwhiskers + Determines whether or not whiskers are visible. + Defaults to true for `sizemode` "quartiles", false for + "sd". + sizemode + Sets the upper and lower bound for the boxes quartiles + means box is drawn between Q1 and Q3 SD means the box + is drawn between Mean +- Standard Deviation Argument + sdmultiple (default 1) to scale the box size So it + could be drawn 1-stddev, 3-stddev etc + stream + :class:`plotly.graph_objects.box.Stream` instance or + dict with compatible properties + text + Sets the text elements associated with each sample + value. If a single string, the same string appears over + all the data points. If an array of string, the items + are mapped in order to the this trace's (x,y) + coordinates. To be seen, trace `hoverinfo` must contain + a "text" flag. + textsrc + Sets the source reference on Chart Studio Cloud for + `text`. + uid + Assign an id to this trace, Use this to provide object + constancy between traces during animations and + transitions. + uirevision + Controls persistence of some user-driven changes to the + trace: `constraintrange` in `parcoords` traces, as well + as some `editable: true` modifications such as `name` + and `colorbar.title`. Defaults to `layout.uirevision`. + Note that other user-driven trace attribute changes are + controlled by `layout` attributes: `trace.visible` is + controlled by `layout.legend.uirevision`, + `selectedpoints` is controlled by + `layout.selectionrevision`, and `colorbar.(x|y)` + (accessible with `config: {editable: true}`) is + controlled by `layout.editrevision`. Trace changes are + tracked by `uid`, which only falls back on trace index + if no `uid` is provided. So if your app can add/remove + traces before the end of the `data` array, such that + the same trace has a different index, you can still + preserve user-driven changes if you give each trace a + `uid` that stays with it as it moves. + unselected + :class:`plotly.graph_objects.box.Unselected` instance + or dict with compatible properties + upperfence + Sets the upper fence values. There should be as many + items as the number of boxes desired. This attribute + has effect only under the q1/median/q3 signature. If + `upperfence` is not provided but a sample (in `y` or + `x`) is set, we compute the upper as the last sample + point above 1.5 times the IQR. + upperfencesrc + Sets the source reference on Chart Studio Cloud for + `upperfence`. + visible + Determines whether or not this trace is visible. If + "legendonly", the trace is not drawn, but can appear as + a legend item (provided that the legend itself is + visible). + whiskerwidth + Sets the width of the whiskers relative to the box + width. For example, with 1, the whiskers are as wide as + the box(es). + width + Sets the width of the box in data coordinate If 0 + (default value) the width is automatically selected + based on the positions of other box traces in the same + subplot. + x + Sets the x sample data or coordinates. See overview for + more info. + x0 + Sets the x coordinate for single-box traces or the + starting coordinate for multi-box traces set using + q1/median/q3. See overview for more info. + xaxis + Sets a reference between this trace's x coordinates and + a 2D cartesian x axis. If "x" (the default value), the + x coordinates refer to `layout.xaxis`. If "x2", the x + coordinates refer to `layout.xaxis2`, and so on. + xcalendar + Sets the calendar system to use with `x` date data. + xhoverformat + Sets the hover text formatting rulefor `x` using d3 + formatting mini-languages which are very similar to + those in Python. For numbers, see: + https://github.com/d3/d3-format/tree/v1.4.5#d3-format. + And for dates see: https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format. We add two items to + d3's date formatter: "%h" for half of the year as a + decimal number as well as "%{n}f" for fractional + seconds with n digits. For example, *2016-10-13 + 09:15:23.456* with tickformat "%H~%M~%S.%2f" would + display *09~15~23.46*By default the values are + formatted using `xaxis.hoverformat`. + xperiod + Only relevant when the axis `type` is "date". Sets the + period positioning in milliseconds or "M" on the x + axis. Special values in the form of "M" could be + used to declare the number of months. In this case `n` + must be a positive integer. + xperiod0 + Only relevant when the axis `type` is "date". Sets the + base for period positioning in milliseconds or date + string on the x0 axis. When `x0period` is round number + of weeks, the `x0period0` by default would be on a + Sunday i.e. 2000-01-02, otherwise it would be at + 2000-01-01. + xperiodalignment + Only relevant when the axis `type` is "date". Sets the + alignment of data points on the x axis. + xsrc + Sets the source reference on Chart Studio Cloud for + `x`. + y + Sets the y sample data or coordinates. See overview for + more info. + y0 + Sets the y coordinate for single-box traces or the + starting coordinate for multi-box traces set using + q1/median/q3. See overview for more info. + yaxis + Sets a reference between this trace's y coordinates and + a 2D cartesian y axis. If "y" (the default value), the + y coordinates refer to `layout.yaxis`. If "y2", the y + coordinates refer to `layout.yaxis2`, and so on. + ycalendar + Sets the calendar system to use with `y` date data. + yhoverformat + Sets the hover text formatting rulefor `y` using d3 + formatting mini-languages which are very similar to + those in Python. For numbers, see: + https://github.com/d3/d3-format/tree/v1.4.5#d3-format. + And for dates see: https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format. We add two items to + d3's date formatter: "%h" for half of the year as a + decimal number as well as "%{n}f" for fractional + seconds with n digits. For example, *2016-10-13 + 09:15:23.456* with tickformat "%H~%M~%S.%2f" would + display *09~15~23.46*By default the values are + formatted using `yaxis.hoverformat`. + yperiod + Only relevant when the axis `type` is "date". Sets the + period positioning in milliseconds or "M" on the y + axis. Special values in the form of "M" could be + used to declare the number of months. In this case `n` + must be a positive integer. + yperiod0 + Only relevant when the axis `type` is "date". Sets the + base for period positioning in milliseconds or date + string on the y0 axis. When `y0period` is round number + of weeks, the `y0period0` by default would be on a + Sunday i.e. 2000-01-02, otherwise it would be at + 2000-01-01. + yperiodalignment + Only relevant when the axis `type` is "date". Sets the + alignment of data points on the y axis. + ysrc + Sets the source reference on Chart Studio Cloud for + `y`. + zorder + Sets the layer on which this trace is displayed, + relative to other SVG traces on the same subplot. SVG + traces with higher `zorder` appear in front of those + with lower `zorder`. + + Returns + ------- + Box + """ + super().__init__("box") + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + if arg is None: + arg = {} + elif isinstance(arg, self.__class__): + arg = arg.to_plotly_json() + elif isinstance(arg, dict): + arg = _copy.copy(arg) + else: + raise ValueError("""\ +The first argument to the plotly.graph_objs.Box +constructor must be a dict or +an instance of :class:`plotly.graph_objs.Box`""") + + self._skip_invalid = kwargs.pop("skip_invalid", False) + self._validate = kwargs.pop("_validate", True) + + self._set_property("alignmentgroup", arg, alignmentgroup) + self._set_property("boxmean", arg, boxmean) + self._set_property("boxpoints", arg, boxpoints) + self._set_property("customdata", arg, customdata) + self._set_property("customdatasrc", arg, customdatasrc) + self._set_property("dx", arg, dx) + self._set_property("dy", arg, dy) + self._set_property("fillcolor", arg, fillcolor) + self._set_property("hoverinfo", arg, hoverinfo) + self._set_property("hoverinfosrc", arg, hoverinfosrc) + self._set_property("hoverlabel", arg, hoverlabel) + self._set_property("hoveron", arg, hoveron) + self._set_property("hovertemplate", arg, hovertemplate) + self._set_property("hovertemplatefallback", arg, hovertemplatefallback) + self._set_property("hovertemplatesrc", arg, hovertemplatesrc) + self._set_property("hovertext", arg, hovertext) + self._set_property("hovertextsrc", arg, hovertextsrc) + self._set_property("ids", arg, ids) + self._set_property("idssrc", arg, idssrc) + self._set_property("jitter", arg, jitter) + self._set_property("legend", arg, legend) + self._set_property("legendgroup", arg, legendgroup) + self._set_property("legendgrouptitle", arg, legendgrouptitle) + self._set_property("legendrank", arg, legendrank) + self._set_property("legendwidth", arg, legendwidth) + self._set_property("line", arg, line) + self._set_property("lowerfence", arg, lowerfence) + self._set_property("lowerfencesrc", arg, lowerfencesrc) + self._set_property("marker", arg, marker) + self._set_property("mean", arg, mean) + self._set_property("meansrc", arg, meansrc) + self._set_property("median", arg, median) + self._set_property("mediansrc", arg, mediansrc) + self._set_property("meta", arg, meta) + self._set_property("metasrc", arg, metasrc) + self._set_property("name", arg, name) + self._set_property("notched", arg, notched) + self._set_property("notchspan", arg, notchspan) + self._set_property("notchspansrc", arg, notchspansrc) + self._set_property("notchwidth", arg, notchwidth) + self._set_property("offsetgroup", arg, offsetgroup) + self._set_property("opacity", arg, opacity) + self._set_property("orientation", arg, orientation) + self._set_property("pointpos", arg, pointpos) + self._set_property("q1", arg, q1) + self._set_property("q1src", arg, q1src) + self._set_property("q3", arg, q3) + self._set_property("q3src", arg, q3src) + self._set_property("quartilemethod", arg, quartilemethod) + self._set_property("sd", arg, sd) + self._set_property("sdmultiple", arg, sdmultiple) + self._set_property("sdsrc", arg, sdsrc) + self._set_property("selected", arg, selected) + self._set_property("selectedpoints", arg, selectedpoints) + self._set_property("showlegend", arg, showlegend) + self._set_property("showwhiskers", arg, showwhiskers) + self._set_property("sizemode", arg, sizemode) + self._set_property("stream", arg, stream) + self._set_property("text", arg, text) + self._set_property("textsrc", arg, textsrc) + self._set_property("uid", arg, uid) + self._set_property("uirevision", arg, uirevision) + self._set_property("unselected", arg, unselected) + self._set_property("upperfence", arg, upperfence) + self._set_property("upperfencesrc", arg, upperfencesrc) + self._set_property("visible", arg, visible) + self._set_property("whiskerwidth", arg, whiskerwidth) + self._set_property("width", arg, width) + self._set_property("x", arg, x) + self._set_property("x0", arg, x0) + self._set_property("xaxis", arg, xaxis) + self._set_property("xcalendar", arg, xcalendar) + self._set_property("xhoverformat", arg, xhoverformat) + self._set_property("xperiod", arg, xperiod) + self._set_property("xperiod0", arg, xperiod0) + self._set_property("xperiodalignment", arg, xperiodalignment) + self._set_property("xsrc", arg, xsrc) + self._set_property("y", arg, y) + self._set_property("y0", arg, y0) + self._set_property("yaxis", arg, yaxis) + self._set_property("ycalendar", arg, ycalendar) + self._set_property("yhoverformat", arg, yhoverformat) + self._set_property("yperiod", arg, yperiod) + self._set_property("yperiod0", arg, yperiod0) + self._set_property("yperiodalignment", arg, yperiodalignment) + self._set_property("ysrc", arg, ysrc) + self._set_property("zorder", arg, zorder) + + self._props["type"] = "box" + arg.pop("type", None) + self._process_kwargs(**dict(arg, **kwargs)) + self._skip_invalid = False diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/_candlestick.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/_candlestick.py new file mode 100644 index 0000000000000000000000000000000000000000..67131d8fa0b707b4ccad6f7e5a6bee76b842747d --- /dev/null +++ b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/_candlestick.py @@ -0,0 +1,1860 @@ +# --- THIS FILE IS AUTO-GENERATED --- +# Modifications will be overwitten the next time code generation run. + +from plotly.basedatatypes import BaseTraceType as _BaseTraceType +import copy as _copy + + +class Candlestick(_BaseTraceType): + _parent_path_str = "" + _path_str = "candlestick" + _valid_props = { + "close", + "closesrc", + "customdata", + "customdatasrc", + "decreasing", + "high", + "highsrc", + "hoverinfo", + "hoverinfosrc", + "hoverlabel", + "hovertemplate", + "hovertemplatefallback", + "hovertemplatesrc", + "hovertext", + "hovertextsrc", + "ids", + "idssrc", + "increasing", + "legend", + "legendgroup", + "legendgrouptitle", + "legendrank", + "legendwidth", + "line", + "low", + "lowsrc", + "meta", + "metasrc", + "name", + "opacity", + "open", + "opensrc", + "selectedpoints", + "showlegend", + "stream", + "text", + "textsrc", + "type", + "uid", + "uirevision", + "visible", + "whiskerwidth", + "x", + "xaxis", + "xcalendar", + "xhoverformat", + "xperiod", + "xperiod0", + "xperiodalignment", + "xsrc", + "yaxis", + "yhoverformat", + "zorder", + } + + @property + def close(self): + """ + Sets the close values. + + The 'close' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["close"] + + @close.setter + def close(self, val): + self["close"] = val + + @property + def closesrc(self): + """ + Sets the source reference on Chart Studio Cloud for `close`. + + The 'closesrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["closesrc"] + + @closesrc.setter + def closesrc(self, val): + self["closesrc"] = val + + @property + def customdata(self): + """ + Assigns extra data each datum. This may be useful when + listening to hover, click and selection events. Note that, + "scatter" traces also appends customdata items in the markers + DOM elements + + The 'customdata' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["customdata"] + + @customdata.setter + def customdata(self, val): + self["customdata"] = val + + @property + def customdatasrc(self): + """ + Sets the source reference on Chart Studio Cloud for + `customdata`. + + The 'customdatasrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["customdatasrc"] + + @customdatasrc.setter + def customdatasrc(self, val): + self["customdatasrc"] = val + + @property + def decreasing(self): + """ + The 'decreasing' property is an instance of Decreasing + that may be specified as: + - An instance of :class:`plotly.graph_objs.candlestick.Decreasing` + - A dict of string/value properties that will be passed + to the Decreasing constructor + + Returns + ------- + plotly.graph_objs.candlestick.Decreasing + """ + return self["decreasing"] + + @decreasing.setter + def decreasing(self, val): + self["decreasing"] = val + + @property + def high(self): + """ + Sets the high values. + + The 'high' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["high"] + + @high.setter + def high(self, val): + self["high"] = val + + @property + def highsrc(self): + """ + Sets the source reference on Chart Studio Cloud for `high`. + + The 'highsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["highsrc"] + + @highsrc.setter + def highsrc(self, val): + self["highsrc"] = val + + @property + def hoverinfo(self): + """ + Determines which trace information appear on hover. If `none` + or `skip` are set, no information is displayed upon hovering. + But, if `none` is set, click and hover events are still fired. + + The 'hoverinfo' property is a flaglist and may be specified + as a string containing: + - Any combination of ['x', 'y', 'z', 'text', 'name'] joined with '+' characters + (e.g. 'x+y') + OR exactly one of ['all', 'none', 'skip'] (e.g. 'skip') + - A list or array of the above + + Returns + ------- + Any|numpy.ndarray + """ + return self["hoverinfo"] + + @hoverinfo.setter + def hoverinfo(self, val): + self["hoverinfo"] = val + + @property + def hoverinfosrc(self): + """ + Sets the source reference on Chart Studio Cloud for + `hoverinfo`. + + The 'hoverinfosrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["hoverinfosrc"] + + @hoverinfosrc.setter + def hoverinfosrc(self, val): + self["hoverinfosrc"] = val + + @property + def hoverlabel(self): + """ + The 'hoverlabel' property is an instance of Hoverlabel + that may be specified as: + - An instance of :class:`plotly.graph_objs.candlestick.Hoverlabel` + - A dict of string/value properties that will be passed + to the Hoverlabel constructor + + Returns + ------- + plotly.graph_objs.candlestick.Hoverlabel + """ + return self["hoverlabel"] + + @hoverlabel.setter + def hoverlabel(self, val): + self["hoverlabel"] = val + + @property + def hovertemplate(self): + """ + Template string used for rendering the information that appear + on hover box. Note that this will override `hoverinfo`. + Variables are inserted using %{variable}, for example "y: %{y}" + as well as %{xother}, {%_xother}, {%_xother_}, {%xother_}. When + showing info for several points, "xother" will be added to + those with different x positions from the first point. An + underscore before or after "(x|y)other" will add a space on + that side, only when this field is shown. Numbers are formatted + using d3-format's syntax %{variable:d3-format}, for example + "Price: %{y:$.2f}". + https://github.com/d3/d3-format/tree/v1.4.5#d3-format for + details on the formatting syntax. Dates are formatted using + d3-time-format's syntax %{variable|d3-time-format}, for example + "Day: %{2019-01-01|%A}". https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format for details on the date + formatting syntax. Variables that can't be found will be + replaced with the specifier. For example, a template of "data: + %{x}, %{y}" will result in a value of "data: 1, %{y}" if x is 1 + and y is missing. Variables with an undefined value will be + replaced with the fallback value. The variables available in + `hovertemplate` are the ones emitted as event data described at + this link https://plotly.com/javascript/plotlyjs-events/#event- + data. Additionally, all attributes that can be specified per- + point (the ones that are `arrayOk: true`) are available. + Finally, the template string has access to variables `open`, + `high`, `low` and `close`. Anything contained in tag `` + is displayed in the secondary box, for example + `%{fullData.name}`. To hide the secondary box + completely, use an empty tag ``. + + The 'hovertemplate' property is a string and must be specified as: + - A string + - A number that will be converted to a string + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["hovertemplate"] + + @hovertemplate.setter + def hovertemplate(self, val): + self["hovertemplate"] = val + + @property + def hovertemplatefallback(self): + """ + Fallback string that's displayed when a variable referenced in + a template is missing. If the boolean value 'false' is passed + in, the specifier with the missing variable will be displayed. + + The 'hovertemplatefallback' property accepts values of any type + + Returns + ------- + Any + """ + return self["hovertemplatefallback"] + + @hovertemplatefallback.setter + def hovertemplatefallback(self, val): + self["hovertemplatefallback"] = val + + @property + def hovertemplatesrc(self): + """ + Sets the source reference on Chart Studio Cloud for + `hovertemplate`. + + The 'hovertemplatesrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["hovertemplatesrc"] + + @hovertemplatesrc.setter + def hovertemplatesrc(self, val): + self["hovertemplatesrc"] = val + + @property + def hovertext(self): + """ + Same as `text`. + + The 'hovertext' property is a string and must be specified as: + - A string + - A number that will be converted to a string + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["hovertext"] + + @hovertext.setter + def hovertext(self, val): + self["hovertext"] = val + + @property + def hovertextsrc(self): + """ + Sets the source reference on Chart Studio Cloud for + `hovertext`. + + The 'hovertextsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["hovertextsrc"] + + @hovertextsrc.setter + def hovertextsrc(self, val): + self["hovertextsrc"] = val + + @property + def ids(self): + """ + Assigns id labels to each datum. These ids for object constancy + of data points during animation. Should be an array of strings, + not numbers or any other type. + + The 'ids' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["ids"] + + @ids.setter + def ids(self, val): + self["ids"] = val + + @property + def idssrc(self): + """ + Sets the source reference on Chart Studio Cloud for `ids`. + + The 'idssrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["idssrc"] + + @idssrc.setter + def idssrc(self, val): + self["idssrc"] = val + + @property + def increasing(self): + """ + The 'increasing' property is an instance of Increasing + that may be specified as: + - An instance of :class:`plotly.graph_objs.candlestick.Increasing` + - A dict of string/value properties that will be passed + to the Increasing constructor + + Returns + ------- + plotly.graph_objs.candlestick.Increasing + """ + return self["increasing"] + + @increasing.setter + def increasing(self, val): + self["increasing"] = val + + @property + def legend(self): + """ + Sets the reference to a legend to show this trace in. + References to these legends are "legend", "legend2", "legend3", + etc. Settings for these legends are set in the layout, under + `layout.legend`, `layout.legend2`, etc. + + The 'legend' property is an identifier of a particular + subplot, of type 'legend', that may be specified as: + - the string 'legend' optionally followed by an integer >= 1 + (e.g. 'legend', 'legend1', 'legend2', 'legend3', etc.) + + Returns + ------- + str + """ + return self["legend"] + + @legend.setter + def legend(self, val): + self["legend"] = val + + @property + def legendgroup(self): + """ + Sets the legend group for this trace. Traces and shapes part of + the same legend group hide/show at the same time when toggling + legend items. + + The 'legendgroup' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["legendgroup"] + + @legendgroup.setter + def legendgroup(self, val): + self["legendgroup"] = val + + @property + def legendgrouptitle(self): + """ + The 'legendgrouptitle' property is an instance of Legendgrouptitle + that may be specified as: + - An instance of :class:`plotly.graph_objs.candlestick.Legendgrouptitle` + - A dict of string/value properties that will be passed + to the Legendgrouptitle constructor + + Returns + ------- + plotly.graph_objs.candlestick.Legendgrouptitle + """ + return self["legendgrouptitle"] + + @legendgrouptitle.setter + def legendgrouptitle(self, val): + self["legendgrouptitle"] = val + + @property + def legendrank(self): + """ + Sets the legend rank for this trace. Items and groups with + smaller ranks are presented on top/left side while with + "reversed" `legend.traceorder` they are on bottom/right side. + The default legendrank is 1000, so that you can use ranks less + than 1000 to place certain items before all unranked items, and + ranks greater than 1000 to go after all unranked items. When + having unranked or equal rank items shapes would be displayed + after traces i.e. according to their order in data and layout. + + The 'legendrank' property is a number and may be specified as: + - An int or float + + Returns + ------- + int|float + """ + return self["legendrank"] + + @legendrank.setter + def legendrank(self, val): + self["legendrank"] = val + + @property + def legendwidth(self): + """ + Sets the width (in px or fraction) of the legend for this + trace. + + The 'legendwidth' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["legendwidth"] + + @legendwidth.setter + def legendwidth(self, val): + self["legendwidth"] = val + + @property + def line(self): + """ + The 'line' property is an instance of Line + that may be specified as: + - An instance of :class:`plotly.graph_objs.candlestick.Line` + - A dict of string/value properties that will be passed + to the Line constructor + + Returns + ------- + plotly.graph_objs.candlestick.Line + """ + return self["line"] + + @line.setter + def line(self, val): + self["line"] = val + + @property + def low(self): + """ + Sets the low values. + + The 'low' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["low"] + + @low.setter + def low(self, val): + self["low"] = val + + @property + def lowsrc(self): + """ + Sets the source reference on Chart Studio Cloud for `low`. + + The 'lowsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["lowsrc"] + + @lowsrc.setter + def lowsrc(self, val): + self["lowsrc"] = val + + @property + def meta(self): + """ + Assigns extra meta information associated with this trace that + can be used in various text attributes. Attributes such as + trace `name`, graph, axis and colorbar `title.text`, annotation + `text` `rangeselector`, `updatemenues` and `sliders` `label` + text all support `meta`. To access the trace `meta` values in + an attribute in the same trace, simply use `%{meta[i]}` where + `i` is the index or key of the `meta` item in question. To + access trace `meta` in layout attributes, use + `%{data[n[.meta[i]}` where `i` is the index or key of the + `meta` and `n` is the trace index. + + The 'meta' property accepts values of any type + + Returns + ------- + Any|numpy.ndarray + """ + return self["meta"] + + @meta.setter + def meta(self, val): + self["meta"] = val + + @property + def metasrc(self): + """ + Sets the source reference on Chart Studio Cloud for `meta`. + + The 'metasrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["metasrc"] + + @metasrc.setter + def metasrc(self, val): + self["metasrc"] = val + + @property + def name(self): + """ + Sets the trace name. The trace name appears as the legend item + and on hover. + + The 'name' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["name"] + + @name.setter + def name(self, val): + self["name"] = val + + @property + def opacity(self): + """ + Sets the opacity of the trace. + + The 'opacity' property is a number and may be specified as: + - An int or float in the interval [0, 1] + + Returns + ------- + int|float + """ + return self["opacity"] + + @opacity.setter + def opacity(self, val): + self["opacity"] = val + + @property + def open(self): + """ + Sets the open values. + + The 'open' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["open"] + + @open.setter + def open(self, val): + self["open"] = val + + @property + def opensrc(self): + """ + Sets the source reference on Chart Studio Cloud for `open`. + + The 'opensrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["opensrc"] + + @opensrc.setter + def opensrc(self, val): + self["opensrc"] = val + + @property + def selectedpoints(self): + """ + Array containing integer indices of selected points. Has an + effect only for traces that support selections. Note that an + empty array means an empty selection where the `unselected` are + turned on for all points, whereas, any other non-array values + means no selection all where the `selected` and `unselected` + styles have no effect. + + The 'selectedpoints' property accepts values of any type + + Returns + ------- + Any + """ + return self["selectedpoints"] + + @selectedpoints.setter + def selectedpoints(self, val): + self["selectedpoints"] = val + + @property + def showlegend(self): + """ + Determines whether or not an item corresponding to this trace + is shown in the legend. + + The 'showlegend' property is a boolean and must be specified as: + - A boolean value: True or False + + Returns + ------- + bool + """ + return self["showlegend"] + + @showlegend.setter + def showlegend(self, val): + self["showlegend"] = val + + @property + def stream(self): + """ + The 'stream' property is an instance of Stream + that may be specified as: + - An instance of :class:`plotly.graph_objs.candlestick.Stream` + - A dict of string/value properties that will be passed + to the Stream constructor + + Returns + ------- + plotly.graph_objs.candlestick.Stream + """ + return self["stream"] + + @stream.setter + def stream(self, val): + self["stream"] = val + + @property + def text(self): + """ + Sets hover text elements associated with each sample point. If + a single string, the same string appears over all the data + points. If an array of string, the items are mapped in order to + this trace's sample points. + + The 'text' property is a string and must be specified as: + - A string + - A number that will be converted to a string + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["text"] + + @text.setter + def text(self, val): + self["text"] = val + + @property + def textsrc(self): + """ + Sets the source reference on Chart Studio Cloud for `text`. + + The 'textsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["textsrc"] + + @textsrc.setter + def textsrc(self, val): + self["textsrc"] = val + + @property + def uid(self): + """ + Assign an id to this trace, Use this to provide object + constancy between traces during animations and transitions. + + The 'uid' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["uid"] + + @uid.setter + def uid(self, val): + self["uid"] = val + + @property + def uirevision(self): + """ + Controls persistence of some user-driven changes to the trace: + `constraintrange` in `parcoords` traces, as well as some + `editable: true` modifications such as `name` and + `colorbar.title`. Defaults to `layout.uirevision`. Note that + other user-driven trace attribute changes are controlled by + `layout` attributes: `trace.visible` is controlled by + `layout.legend.uirevision`, `selectedpoints` is controlled by + `layout.selectionrevision`, and `colorbar.(x|y)` (accessible + with `config: {editable: true}`) is controlled by + `layout.editrevision`. Trace changes are tracked by `uid`, + which only falls back on trace index if no `uid` is provided. + So if your app can add/remove traces before the end of the + `data` array, such that the same trace has a different index, + you can still preserve user-driven changes if you give each + trace a `uid` that stays with it as it moves. + + The 'uirevision' property accepts values of any type + + Returns + ------- + Any + """ + return self["uirevision"] + + @uirevision.setter + def uirevision(self, val): + self["uirevision"] = val + + @property + def visible(self): + """ + Determines whether or not this trace is visible. If + "legendonly", the trace is not drawn, but can appear as a + legend item (provided that the legend itself is visible). + + The 'visible' property is an enumeration that may be specified as: + - One of the following enumeration values: + [True, False, 'legendonly'] + + Returns + ------- + Any + """ + return self["visible"] + + @visible.setter + def visible(self, val): + self["visible"] = val + + @property + def whiskerwidth(self): + """ + Sets the width of the whiskers relative to the box width. For + example, with 1, the whiskers are as wide as the box(es). + + The 'whiskerwidth' property is a number and may be specified as: + - An int or float in the interval [0, 1] + + Returns + ------- + int|float + """ + return self["whiskerwidth"] + + @whiskerwidth.setter + def whiskerwidth(self, val): + self["whiskerwidth"] = val + + @property + def x(self): + """ + Sets the x coordinates. If absent, linear coordinate will be + generated. + + The 'x' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["x"] + + @x.setter + def x(self, val): + self["x"] = val + + @property + def xaxis(self): + """ + Sets a reference between this trace's x coordinates and a 2D + cartesian x axis. If "x" (the default value), the x coordinates + refer to `layout.xaxis`. If "x2", the x coordinates refer to + `layout.xaxis2`, and so on. + + The 'xaxis' property is an identifier of a particular + subplot, of type 'x', that may be specified as: + - the string 'x' optionally followed by an integer >= 1 + (e.g. 'x', 'x1', 'x2', 'x3', etc.) + + Returns + ------- + str + """ + return self["xaxis"] + + @xaxis.setter + def xaxis(self, val): + self["xaxis"] = val + + @property + def xcalendar(self): + """ + Sets the calendar system to use with `x` date data. + + The 'xcalendar' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['chinese', 'coptic', 'discworld', 'ethiopian', + 'gregorian', 'hebrew', 'islamic', 'jalali', 'julian', + 'mayan', 'nanakshahi', 'nepali', 'persian', 'taiwan', + 'thai', 'ummalqura'] + + Returns + ------- + Any + """ + return self["xcalendar"] + + @xcalendar.setter + def xcalendar(self, val): + self["xcalendar"] = val + + @property + def xhoverformat(self): + """ + Sets the hover text formatting rulefor `x` using d3 formatting + mini-languages which are very similar to those in Python. For + numbers, see: + https://github.com/d3/d3-format/tree/v1.4.5#d3-format. And for + dates see: https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format. We add two items to d3's date + formatter: "%h" for half of the year as a decimal number as + well as "%{n}f" for fractional seconds with n digits. For + example, *2016-10-13 09:15:23.456* with tickformat + "%H~%M~%S.%2f" would display *09~15~23.46*By default the values + are formatted using `xaxis.hoverformat`. + + The 'xhoverformat' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["xhoverformat"] + + @xhoverformat.setter + def xhoverformat(self, val): + self["xhoverformat"] = val + + @property + def xperiod(self): + """ + Only relevant when the axis `type` is "date". Sets the period + positioning in milliseconds or "M" on the x axis. Special + values in the form of "M" could be used to declare the + number of months. In this case `n` must be a positive integer. + + The 'xperiod' property accepts values of any type + + Returns + ------- + Any + """ + return self["xperiod"] + + @xperiod.setter + def xperiod(self, val): + self["xperiod"] = val + + @property + def xperiod0(self): + """ + Only relevant when the axis `type` is "date". Sets the base for + period positioning in milliseconds or date string on the x0 + axis. When `x0period` is round number of weeks, the `x0period0` + by default would be on a Sunday i.e. 2000-01-02, otherwise it + would be at 2000-01-01. + + The 'xperiod0' property accepts values of any type + + Returns + ------- + Any + """ + return self["xperiod0"] + + @xperiod0.setter + def xperiod0(self, val): + self["xperiod0"] = val + + @property + def xperiodalignment(self): + """ + Only relevant when the axis `type` is "date". Sets the + alignment of data points on the x axis. + + The 'xperiodalignment' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['start', 'middle', 'end'] + + Returns + ------- + Any + """ + return self["xperiodalignment"] + + @xperiodalignment.setter + def xperiodalignment(self, val): + self["xperiodalignment"] = val + + @property + def xsrc(self): + """ + Sets the source reference on Chart Studio Cloud for `x`. + + The 'xsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["xsrc"] + + @xsrc.setter + def xsrc(self, val): + self["xsrc"] = val + + @property + def yaxis(self): + """ + Sets a reference between this trace's y coordinates and a 2D + cartesian y axis. If "y" (the default value), the y coordinates + refer to `layout.yaxis`. If "y2", the y coordinates refer to + `layout.yaxis2`, and so on. + + The 'yaxis' property is an identifier of a particular + subplot, of type 'y', that may be specified as: + - the string 'y' optionally followed by an integer >= 1 + (e.g. 'y', 'y1', 'y2', 'y3', etc.) + + Returns + ------- + str + """ + return self["yaxis"] + + @yaxis.setter + def yaxis(self, val): + self["yaxis"] = val + + @property + def yhoverformat(self): + """ + Sets the hover text formatting rulefor `y` using d3 formatting + mini-languages which are very similar to those in Python. For + numbers, see: + https://github.com/d3/d3-format/tree/v1.4.5#d3-format. And for + dates see: https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format. We add two items to d3's date + formatter: "%h" for half of the year as a decimal number as + well as "%{n}f" for fractional seconds with n digits. For + example, *2016-10-13 09:15:23.456* with tickformat + "%H~%M~%S.%2f" would display *09~15~23.46*By default the values + are formatted using `yaxis.hoverformat`. + + The 'yhoverformat' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["yhoverformat"] + + @yhoverformat.setter + def yhoverformat(self, val): + self["yhoverformat"] = val + + @property + def zorder(self): + """ + Sets the layer on which this trace is displayed, relative to + other SVG traces on the same subplot. SVG traces with higher + `zorder` appear in front of those with lower `zorder`. + + The 'zorder' property is a integer and may be specified as: + - An int (or float that will be cast to an int) + + Returns + ------- + int + """ + return self["zorder"] + + @zorder.setter + def zorder(self, val): + self["zorder"] = val + + @property + def type(self): + return self._props["type"] + + @property + def _prop_descriptions(self): + return """\ + close + Sets the close values. + closesrc + Sets the source reference on Chart Studio Cloud for + `close`. + customdata + Assigns extra data each datum. This may be useful when + listening to hover, click and selection events. Note + that, "scatter" traces also appends customdata items in + the markers DOM elements + customdatasrc + Sets the source reference on Chart Studio Cloud for + `customdata`. + decreasing + :class:`plotly.graph_objects.candlestick.Decreasing` + instance or dict with compatible properties + high + Sets the high values. + highsrc + Sets the source reference on Chart Studio Cloud for + `high`. + hoverinfo + Determines which trace information appear on hover. If + `none` or `skip` are set, no information is displayed + upon hovering. But, if `none` is set, click and hover + events are still fired. + hoverinfosrc + Sets the source reference on Chart Studio Cloud for + `hoverinfo`. + hoverlabel + :class:`plotly.graph_objects.candlestick.Hoverlabel` + instance or dict with compatible properties + hovertemplate + Template string used for rendering the information that + appear on hover box. Note that this will override + `hoverinfo`. Variables are inserted using %{variable}, + for example "y: %{y}" as well as %{xother}, {%_xother}, + {%_xother_}, {%xother_}. When showing info for several + points, "xother" will be added to those with different + x positions from the first point. An underscore before + or after "(x|y)other" will add a space on that side, + only when this field is shown. Numbers are formatted + using d3-format's syntax %{variable:d3-format}, for + example "Price: %{y:$.2f}". + https://github.com/d3/d3-format/tree/v1.4.5#d3-format + for details on the formatting syntax. Dates are + formatted using d3-time-format's syntax + %{variable|d3-time-format}, for example "Day: + %{2019-01-01|%A}". https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format for details on the + date formatting syntax. Variables that can't be found + will be replaced with the specifier. For example, a + template of "data: %{x}, %{y}" will result in a value + of "data: 1, %{y}" if x is 1 and y is missing. + Variables with an undefined value will be replaced with + the fallback value. The variables available in + `hovertemplate` are the ones emitted as event data + described at this link + https://plotly.com/javascript/plotlyjs-events/#event- + data. Additionally, all attributes that can be + specified per-point (the ones that are `arrayOk: true`) + are available. Finally, the template string has access + to variables `open`, `high`, `low` and `close`. + Anything contained in tag `` is displayed in the + secondary box, for example + `%{fullData.name}`. To hide the + secondary box completely, use an empty tag + ``. + hovertemplatefallback + Fallback string that's displayed when a variable + referenced in a template is missing. If the boolean + value 'false' is passed in, the specifier with the + missing variable will be displayed. + hovertemplatesrc + Sets the source reference on Chart Studio Cloud for + `hovertemplate`. + hovertext + Same as `text`. + hovertextsrc + Sets the source reference on Chart Studio Cloud for + `hovertext`. + ids + Assigns id labels to each datum. These ids for object + constancy of data points during animation. Should be an + array of strings, not numbers or any other type. + idssrc + Sets the source reference on Chart Studio Cloud for + `ids`. + increasing + :class:`plotly.graph_objects.candlestick.Increasing` + instance or dict with compatible properties + legend + Sets the reference to a legend to show this trace in. + References to these legends are "legend", "legend2", + "legend3", etc. Settings for these legends are set in + the layout, under `layout.legend`, `layout.legend2`, + etc. + legendgroup + Sets the legend group for this trace. Traces and shapes + part of the same legend group hide/show at the same + time when toggling legend items. + legendgrouptitle + :class:`plotly.graph_objects.candlestick.Legendgrouptit + le` instance or dict with compatible properties + legendrank + Sets the legend rank for this trace. Items and groups + with smaller ranks are presented on top/left side while + with "reversed" `legend.traceorder` they are on + bottom/right side. The default legendrank is 1000, so + that you can use ranks less than 1000 to place certain + items before all unranked items, and ranks greater than + 1000 to go after all unranked items. When having + unranked or equal rank items shapes would be displayed + after traces i.e. according to their order in data and + layout. + legendwidth + Sets the width (in px or fraction) of the legend for + this trace. + line + :class:`plotly.graph_objects.candlestick.Line` instance + or dict with compatible properties + low + Sets the low values. + lowsrc + Sets the source reference on Chart Studio Cloud for + `low`. + meta + Assigns extra meta information associated with this + trace that can be used in various text attributes. + Attributes such as trace `name`, graph, axis and + colorbar `title.text`, annotation `text` + `rangeselector`, `updatemenues` and `sliders` `label` + text all support `meta`. To access the trace `meta` + values in an attribute in the same trace, simply use + `%{meta[i]}` where `i` is the index or key of the + `meta` item in question. To access trace `meta` in + layout attributes, use `%{data[n[.meta[i]}` where `i` + is the index or key of the `meta` and `n` is the trace + index. + metasrc + Sets the source reference on Chart Studio Cloud for + `meta`. + name + Sets the trace name. The trace name appears as the + legend item and on hover. + opacity + Sets the opacity of the trace. + open + Sets the open values. + opensrc + Sets the source reference on Chart Studio Cloud for + `open`. + selectedpoints + Array containing integer indices of selected points. + Has an effect only for traces that support selections. + Note that an empty array means an empty selection where + the `unselected` are turned on for all points, whereas, + any other non-array values means no selection all where + the `selected` and `unselected` styles have no effect. + showlegend + Determines whether or not an item corresponding to this + trace is shown in the legend. + stream + :class:`plotly.graph_objects.candlestick.Stream` + instance or dict with compatible properties + text + Sets hover text elements associated with each sample + point. If a single string, the same string appears over + all the data points. If an array of string, the items + are mapped in order to this trace's sample points. + textsrc + Sets the source reference on Chart Studio Cloud for + `text`. + uid + Assign an id to this trace, Use this to provide object + constancy between traces during animations and + transitions. + uirevision + Controls persistence of some user-driven changes to the + trace: `constraintrange` in `parcoords` traces, as well + as some `editable: true` modifications such as `name` + and `colorbar.title`. Defaults to `layout.uirevision`. + Note that other user-driven trace attribute changes are + controlled by `layout` attributes: `trace.visible` is + controlled by `layout.legend.uirevision`, + `selectedpoints` is controlled by + `layout.selectionrevision`, and `colorbar.(x|y)` + (accessible with `config: {editable: true}`) is + controlled by `layout.editrevision`. Trace changes are + tracked by `uid`, which only falls back on trace index + if no `uid` is provided. So if your app can add/remove + traces before the end of the `data` array, such that + the same trace has a different index, you can still + preserve user-driven changes if you give each trace a + `uid` that stays with it as it moves. + visible + Determines whether or not this trace is visible. If + "legendonly", the trace is not drawn, but can appear as + a legend item (provided that the legend itself is + visible). + whiskerwidth + Sets the width of the whiskers relative to the box + width. For example, with 1, the whiskers are as wide as + the box(es). + x + Sets the x coordinates. If absent, linear coordinate + will be generated. + xaxis + Sets a reference between this trace's x coordinates and + a 2D cartesian x axis. If "x" (the default value), the + x coordinates refer to `layout.xaxis`. If "x2", the x + coordinates refer to `layout.xaxis2`, and so on. + xcalendar + Sets the calendar system to use with `x` date data. + xhoverformat + Sets the hover text formatting rulefor `x` using d3 + formatting mini-languages which are very similar to + those in Python. For numbers, see: + https://github.com/d3/d3-format/tree/v1.4.5#d3-format. + And for dates see: https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format. We add two items to + d3's date formatter: "%h" for half of the year as a + decimal number as well as "%{n}f" for fractional + seconds with n digits. For example, *2016-10-13 + 09:15:23.456* with tickformat "%H~%M~%S.%2f" would + display *09~15~23.46*By default the values are + formatted using `xaxis.hoverformat`. + xperiod + Only relevant when the axis `type` is "date". Sets the + period positioning in milliseconds or "M" on the x + axis. Special values in the form of "M" could be + used to declare the number of months. In this case `n` + must be a positive integer. + xperiod0 + Only relevant when the axis `type` is "date". Sets the + base for period positioning in milliseconds or date + string on the x0 axis. When `x0period` is round number + of weeks, the `x0period0` by default would be on a + Sunday i.e. 2000-01-02, otherwise it would be at + 2000-01-01. + xperiodalignment + Only relevant when the axis `type` is "date". Sets the + alignment of data points on the x axis. + xsrc + Sets the source reference on Chart Studio Cloud for + `x`. + yaxis + Sets a reference between this trace's y coordinates and + a 2D cartesian y axis. If "y" (the default value), the + y coordinates refer to `layout.yaxis`. If "y2", the y + coordinates refer to `layout.yaxis2`, and so on. + yhoverformat + Sets the hover text formatting rulefor `y` using d3 + formatting mini-languages which are very similar to + those in Python. For numbers, see: + https://github.com/d3/d3-format/tree/v1.4.5#d3-format. + And for dates see: https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format. We add two items to + d3's date formatter: "%h" for half of the year as a + decimal number as well as "%{n}f" for fractional + seconds with n digits. For example, *2016-10-13 + 09:15:23.456* with tickformat "%H~%M~%S.%2f" would + display *09~15~23.46*By default the values are + formatted using `yaxis.hoverformat`. + zorder + Sets the layer on which this trace is displayed, + relative to other SVG traces on the same subplot. SVG + traces with higher `zorder` appear in front of those + with lower `zorder`. + """ + + def __init__( + self, + arg=None, + close=None, + closesrc=None, + customdata=None, + customdatasrc=None, + decreasing=None, + high=None, + highsrc=None, + hoverinfo=None, + hoverinfosrc=None, + hoverlabel=None, + hovertemplate=None, + hovertemplatefallback=None, + hovertemplatesrc=None, + hovertext=None, + hovertextsrc=None, + ids=None, + idssrc=None, + increasing=None, + legend=None, + legendgroup=None, + legendgrouptitle=None, + legendrank=None, + legendwidth=None, + line=None, + low=None, + lowsrc=None, + meta=None, + metasrc=None, + name=None, + opacity=None, + open=None, + opensrc=None, + selectedpoints=None, + showlegend=None, + stream=None, + text=None, + textsrc=None, + uid=None, + uirevision=None, + visible=None, + whiskerwidth=None, + x=None, + xaxis=None, + xcalendar=None, + xhoverformat=None, + xperiod=None, + xperiod0=None, + xperiodalignment=None, + xsrc=None, + yaxis=None, + yhoverformat=None, + zorder=None, + **kwargs, + ): + """ + Construct a new Candlestick object + + The candlestick is a style of financial chart describing open, + high, low and close for a given `x` coordinate (most likely + time). The boxes represent the spread between the `open` and + `close` values and the lines represent the spread between the + `low` and `high` values Sample points where the close value is + higher (lower) then the open value are called increasing + (decreasing). By default, increasing candles are drawn in green + whereas decreasing are drawn in red. + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of :class:`plotly.graph_objs.Candlestick` + close + Sets the close values. + closesrc + Sets the source reference on Chart Studio Cloud for + `close`. + customdata + Assigns extra data each datum. This may be useful when + listening to hover, click and selection events. Note + that, "scatter" traces also appends customdata items in + the markers DOM elements + customdatasrc + Sets the source reference on Chart Studio Cloud for + `customdata`. + decreasing + :class:`plotly.graph_objects.candlestick.Decreasing` + instance or dict with compatible properties + high + Sets the high values. + highsrc + Sets the source reference on Chart Studio Cloud for + `high`. + hoverinfo + Determines which trace information appear on hover. If + `none` or `skip` are set, no information is displayed + upon hovering. But, if `none` is set, click and hover + events are still fired. + hoverinfosrc + Sets the source reference on Chart Studio Cloud for + `hoverinfo`. + hoverlabel + :class:`plotly.graph_objects.candlestick.Hoverlabel` + instance or dict with compatible properties + hovertemplate + Template string used for rendering the information that + appear on hover box. Note that this will override + `hoverinfo`. Variables are inserted using %{variable}, + for example "y: %{y}" as well as %{xother}, {%_xother}, + {%_xother_}, {%xother_}. When showing info for several + points, "xother" will be added to those with different + x positions from the first point. An underscore before + or after "(x|y)other" will add a space on that side, + only when this field is shown. Numbers are formatted + using d3-format's syntax %{variable:d3-format}, for + example "Price: %{y:$.2f}". + https://github.com/d3/d3-format/tree/v1.4.5#d3-format + for details on the formatting syntax. Dates are + formatted using d3-time-format's syntax + %{variable|d3-time-format}, for example "Day: + %{2019-01-01|%A}". https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format for details on the + date formatting syntax. Variables that can't be found + will be replaced with the specifier. For example, a + template of "data: %{x}, %{y}" will result in a value + of "data: 1, %{y}" if x is 1 and y is missing. + Variables with an undefined value will be replaced with + the fallback value. The variables available in + `hovertemplate` are the ones emitted as event data + described at this link + https://plotly.com/javascript/plotlyjs-events/#event- + data. Additionally, all attributes that can be + specified per-point (the ones that are `arrayOk: true`) + are available. Finally, the template string has access + to variables `open`, `high`, `low` and `close`. + Anything contained in tag `` is displayed in the + secondary box, for example + `%{fullData.name}`. To hide the + secondary box completely, use an empty tag + ``. + hovertemplatefallback + Fallback string that's displayed when a variable + referenced in a template is missing. If the boolean + value 'false' is passed in, the specifier with the + missing variable will be displayed. + hovertemplatesrc + Sets the source reference on Chart Studio Cloud for + `hovertemplate`. + hovertext + Same as `text`. + hovertextsrc + Sets the source reference on Chart Studio Cloud for + `hovertext`. + ids + Assigns id labels to each datum. These ids for object + constancy of data points during animation. Should be an + array of strings, not numbers or any other type. + idssrc + Sets the source reference on Chart Studio Cloud for + `ids`. + increasing + :class:`plotly.graph_objects.candlestick.Increasing` + instance or dict with compatible properties + legend + Sets the reference to a legend to show this trace in. + References to these legends are "legend", "legend2", + "legend3", etc. Settings for these legends are set in + the layout, under `layout.legend`, `layout.legend2`, + etc. + legendgroup + Sets the legend group for this trace. Traces and shapes + part of the same legend group hide/show at the same + time when toggling legend items. + legendgrouptitle + :class:`plotly.graph_objects.candlestick.Legendgrouptit + le` instance or dict with compatible properties + legendrank + Sets the legend rank for this trace. Items and groups + with smaller ranks are presented on top/left side while + with "reversed" `legend.traceorder` they are on + bottom/right side. The default legendrank is 1000, so + that you can use ranks less than 1000 to place certain + items before all unranked items, and ranks greater than + 1000 to go after all unranked items. When having + unranked or equal rank items shapes would be displayed + after traces i.e. according to their order in data and + layout. + legendwidth + Sets the width (in px or fraction) of the legend for + this trace. + line + :class:`plotly.graph_objects.candlestick.Line` instance + or dict with compatible properties + low + Sets the low values. + lowsrc + Sets the source reference on Chart Studio Cloud for + `low`. + meta + Assigns extra meta information associated with this + trace that can be used in various text attributes. + Attributes such as trace `name`, graph, axis and + colorbar `title.text`, annotation `text` + `rangeselector`, `updatemenues` and `sliders` `label` + text all support `meta`. To access the trace `meta` + values in an attribute in the same trace, simply use + `%{meta[i]}` where `i` is the index or key of the + `meta` item in question. To access trace `meta` in + layout attributes, use `%{data[n[.meta[i]}` where `i` + is the index or key of the `meta` and `n` is the trace + index. + metasrc + Sets the source reference on Chart Studio Cloud for + `meta`. + name + Sets the trace name. The trace name appears as the + legend item and on hover. + opacity + Sets the opacity of the trace. + open + Sets the open values. + opensrc + Sets the source reference on Chart Studio Cloud for + `open`. + selectedpoints + Array containing integer indices of selected points. + Has an effect only for traces that support selections. + Note that an empty array means an empty selection where + the `unselected` are turned on for all points, whereas, + any other non-array values means no selection all where + the `selected` and `unselected` styles have no effect. + showlegend + Determines whether or not an item corresponding to this + trace is shown in the legend. + stream + :class:`plotly.graph_objects.candlestick.Stream` + instance or dict with compatible properties + text + Sets hover text elements associated with each sample + point. If a single string, the same string appears over + all the data points. If an array of string, the items + are mapped in order to this trace's sample points. + textsrc + Sets the source reference on Chart Studio Cloud for + `text`. + uid + Assign an id to this trace, Use this to provide object + constancy between traces during animations and + transitions. + uirevision + Controls persistence of some user-driven changes to the + trace: `constraintrange` in `parcoords` traces, as well + as some `editable: true` modifications such as `name` + and `colorbar.title`. Defaults to `layout.uirevision`. + Note that other user-driven trace attribute changes are + controlled by `layout` attributes: `trace.visible` is + controlled by `layout.legend.uirevision`, + `selectedpoints` is controlled by + `layout.selectionrevision`, and `colorbar.(x|y)` + (accessible with `config: {editable: true}`) is + controlled by `layout.editrevision`. Trace changes are + tracked by `uid`, which only falls back on trace index + if no `uid` is provided. So if your app can add/remove + traces before the end of the `data` array, such that + the same trace has a different index, you can still + preserve user-driven changes if you give each trace a + `uid` that stays with it as it moves. + visible + Determines whether or not this trace is visible. If + "legendonly", the trace is not drawn, but can appear as + a legend item (provided that the legend itself is + visible). + whiskerwidth + Sets the width of the whiskers relative to the box + width. For example, with 1, the whiskers are as wide as + the box(es). + x + Sets the x coordinates. If absent, linear coordinate + will be generated. + xaxis + Sets a reference between this trace's x coordinates and + a 2D cartesian x axis. If "x" (the default value), the + x coordinates refer to `layout.xaxis`. If "x2", the x + coordinates refer to `layout.xaxis2`, and so on. + xcalendar + Sets the calendar system to use with `x` date data. + xhoverformat + Sets the hover text formatting rulefor `x` using d3 + formatting mini-languages which are very similar to + those in Python. For numbers, see: + https://github.com/d3/d3-format/tree/v1.4.5#d3-format. + And for dates see: https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format. We add two items to + d3's date formatter: "%h" for half of the year as a + decimal number as well as "%{n}f" for fractional + seconds with n digits. For example, *2016-10-13 + 09:15:23.456* with tickformat "%H~%M~%S.%2f" would + display *09~15~23.46*By default the values are + formatted using `xaxis.hoverformat`. + xperiod + Only relevant when the axis `type` is "date". Sets the + period positioning in milliseconds or "M" on the x + axis. Special values in the form of "M" could be + used to declare the number of months. In this case `n` + must be a positive integer. + xperiod0 + Only relevant when the axis `type` is "date". Sets the + base for period positioning in milliseconds or date + string on the x0 axis. When `x0period` is round number + of weeks, the `x0period0` by default would be on a + Sunday i.e. 2000-01-02, otherwise it would be at + 2000-01-01. + xperiodalignment + Only relevant when the axis `type` is "date". Sets the + alignment of data points on the x axis. + xsrc + Sets the source reference on Chart Studio Cloud for + `x`. + yaxis + Sets a reference between this trace's y coordinates and + a 2D cartesian y axis. If "y" (the default value), the + y coordinates refer to `layout.yaxis`. If "y2", the y + coordinates refer to `layout.yaxis2`, and so on. + yhoverformat + Sets the hover text formatting rulefor `y` using d3 + formatting mini-languages which are very similar to + those in Python. For numbers, see: + https://github.com/d3/d3-format/tree/v1.4.5#d3-format. + And for dates see: https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format. We add two items to + d3's date formatter: "%h" for half of the year as a + decimal number as well as "%{n}f" for fractional + seconds with n digits. For example, *2016-10-13 + 09:15:23.456* with tickformat "%H~%M~%S.%2f" would + display *09~15~23.46*By default the values are + formatted using `yaxis.hoverformat`. + zorder + Sets the layer on which this trace is displayed, + relative to other SVG traces on the same subplot. SVG + traces with higher `zorder` appear in front of those + with lower `zorder`. + + Returns + ------- + Candlestick + """ + super().__init__("candlestick") + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + if arg is None: + arg = {} + elif isinstance(arg, self.__class__): + arg = arg.to_plotly_json() + elif isinstance(arg, dict): + arg = _copy.copy(arg) + else: + raise ValueError("""\ +The first argument to the plotly.graph_objs.Candlestick +constructor must be a dict or +an instance of :class:`plotly.graph_objs.Candlestick`""") + + self._skip_invalid = kwargs.pop("skip_invalid", False) + self._validate = kwargs.pop("_validate", True) + + self._set_property("close", arg, close) + self._set_property("closesrc", arg, closesrc) + self._set_property("customdata", arg, customdata) + self._set_property("customdatasrc", arg, customdatasrc) + self._set_property("decreasing", arg, decreasing) + self._set_property("high", arg, high) + self._set_property("highsrc", arg, highsrc) + self._set_property("hoverinfo", arg, hoverinfo) + self._set_property("hoverinfosrc", arg, hoverinfosrc) + self._set_property("hoverlabel", arg, hoverlabel) + self._set_property("hovertemplate", arg, hovertemplate) + self._set_property("hovertemplatefallback", arg, hovertemplatefallback) + self._set_property("hovertemplatesrc", arg, hovertemplatesrc) + self._set_property("hovertext", arg, hovertext) + self._set_property("hovertextsrc", arg, hovertextsrc) + self._set_property("ids", arg, ids) + self._set_property("idssrc", arg, idssrc) + self._set_property("increasing", arg, increasing) + self._set_property("legend", arg, legend) + self._set_property("legendgroup", arg, legendgroup) + self._set_property("legendgrouptitle", arg, legendgrouptitle) + self._set_property("legendrank", arg, legendrank) + self._set_property("legendwidth", arg, legendwidth) + self._set_property("line", arg, line) + self._set_property("low", arg, low) + self._set_property("lowsrc", arg, lowsrc) + self._set_property("meta", arg, meta) + self._set_property("metasrc", arg, metasrc) + self._set_property("name", arg, name) + self._set_property("opacity", arg, opacity) + self._set_property("open", arg, open) + self._set_property("opensrc", arg, opensrc) + self._set_property("selectedpoints", arg, selectedpoints) + self._set_property("showlegend", arg, showlegend) + self._set_property("stream", arg, stream) + self._set_property("text", arg, text) + self._set_property("textsrc", arg, textsrc) + self._set_property("uid", arg, uid) + self._set_property("uirevision", arg, uirevision) + self._set_property("visible", arg, visible) + self._set_property("whiskerwidth", arg, whiskerwidth) + self._set_property("x", arg, x) + self._set_property("xaxis", arg, xaxis) + self._set_property("xcalendar", arg, xcalendar) + self._set_property("xhoverformat", arg, xhoverformat) + self._set_property("xperiod", arg, xperiod) + self._set_property("xperiod0", arg, xperiod0) + self._set_property("xperiodalignment", arg, xperiodalignment) + self._set_property("xsrc", arg, xsrc) + self._set_property("yaxis", arg, yaxis) + self._set_property("yhoverformat", arg, yhoverformat) + self._set_property("zorder", arg, zorder) + + self._props["type"] = "candlestick" + arg.pop("type", None) + self._process_kwargs(**dict(arg, **kwargs)) + self._skip_invalid = False diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/_carpet.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/_carpet.py new file mode 100644 index 0000000000000000000000000000000000000000..26e6a7a75f4f392b5f031bad0cb1d5702e806ac2 --- /dev/null +++ b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/_carpet.py @@ -0,0 +1,1257 @@ +# --- THIS FILE IS AUTO-GENERATED --- +# Modifications will be overwitten the next time code generation run. + +from plotly.basedatatypes import BaseTraceType as _BaseTraceType +import copy as _copy + + +class Carpet(_BaseTraceType): + _parent_path_str = "" + _path_str = "carpet" + _valid_props = { + "a", + "a0", + "aaxis", + "asrc", + "b", + "b0", + "baxis", + "bsrc", + "carpet", + "cheaterslope", + "color", + "customdata", + "customdatasrc", + "da", + "db", + "font", + "ids", + "idssrc", + "legend", + "legendgrouptitle", + "legendrank", + "legendwidth", + "meta", + "metasrc", + "name", + "opacity", + "stream", + "type", + "uid", + "uirevision", + "visible", + "x", + "xaxis", + "xsrc", + "y", + "yaxis", + "ysrc", + "zorder", + } + + @property + def a(self): + """ + An array containing values of the first parameter value + + The 'a' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["a"] + + @a.setter + def a(self, val): + self["a"] = val + + @property + def a0(self): + """ + Alternate to `a`. Builds a linear space of a coordinates. Use + with `da` where `a0` is the starting coordinate and `da` the + step. + + The 'a0' property is a number and may be specified as: + - An int or float + + Returns + ------- + int|float + """ + return self["a0"] + + @a0.setter + def a0(self, val): + self["a0"] = val + + @property + def aaxis(self): + """ + The 'aaxis' property is an instance of Aaxis + that may be specified as: + - An instance of :class:`plotly.graph_objs.carpet.Aaxis` + - A dict of string/value properties that will be passed + to the Aaxis constructor + + Returns + ------- + plotly.graph_objs.carpet.Aaxis + """ + return self["aaxis"] + + @aaxis.setter + def aaxis(self, val): + self["aaxis"] = val + + @property + def asrc(self): + """ + Sets the source reference on Chart Studio Cloud for `a`. + + The 'asrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["asrc"] + + @asrc.setter + def asrc(self, val): + self["asrc"] = val + + @property + def b(self): + """ + A two dimensional array of y coordinates at each carpet point. + + The 'b' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["b"] + + @b.setter + def b(self, val): + self["b"] = val + + @property + def b0(self): + """ + Alternate to `b`. Builds a linear space of a coordinates. Use + with `db` where `b0` is the starting coordinate and `db` the + step. + + The 'b0' property is a number and may be specified as: + - An int or float + + Returns + ------- + int|float + """ + return self["b0"] + + @b0.setter + def b0(self, val): + self["b0"] = val + + @property + def baxis(self): + """ + The 'baxis' property is an instance of Baxis + that may be specified as: + - An instance of :class:`plotly.graph_objs.carpet.Baxis` + - A dict of string/value properties that will be passed + to the Baxis constructor + + Returns + ------- + plotly.graph_objs.carpet.Baxis + """ + return self["baxis"] + + @baxis.setter + def baxis(self, val): + self["baxis"] = val + + @property + def bsrc(self): + """ + Sets the source reference on Chart Studio Cloud for `b`. + + The 'bsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["bsrc"] + + @bsrc.setter + def bsrc(self, val): + self["bsrc"] = val + + @property + def carpet(self): + """ + An identifier for this carpet, so that `scattercarpet` and + `contourcarpet` traces can specify a carpet plot on which they + lie + + The 'carpet' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["carpet"] + + @carpet.setter + def carpet(self, val): + self["carpet"] = val + + @property + def cheaterslope(self): + """ + The shift applied to each successive row of data in creating a + cheater plot. Only used if `x` is been omitted. + + The 'cheaterslope' property is a number and may be specified as: + - An int or float + + Returns + ------- + int|float + """ + return self["cheaterslope"] + + @cheaterslope.setter + def cheaterslope(self, val): + self["cheaterslope"] = val + + @property + def color(self): + """ + Sets default for all colors associated with this axis all at + once: line, font, tick, and grid colors. Grid color is + lightened by blending this with the plot background Individual + pieces can override this. + + The 'color' property is a color and may be specified as: + - A hex string (e.g. '#ff0000') + - An rgb/rgba string (e.g. 'rgb(255,0,0)') + - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') + - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') + - A named CSS color: see https://plotly.com/python/css-colors/ for a list + + Returns + ------- + str + """ + return self["color"] + + @color.setter + def color(self, val): + self["color"] = val + + @property + def customdata(self): + """ + Assigns extra data each datum. This may be useful when + listening to hover, click and selection events. Note that, + "scatter" traces also appends customdata items in the markers + DOM elements + + The 'customdata' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["customdata"] + + @customdata.setter + def customdata(self, val): + self["customdata"] = val + + @property + def customdatasrc(self): + """ + Sets the source reference on Chart Studio Cloud for + `customdata`. + + The 'customdatasrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["customdatasrc"] + + @customdatasrc.setter + def customdatasrc(self, val): + self["customdatasrc"] = val + + @property + def da(self): + """ + Sets the a coordinate step. See `a0` for more info. + + The 'da' property is a number and may be specified as: + - An int or float + + Returns + ------- + int|float + """ + return self["da"] + + @da.setter + def da(self, val): + self["da"] = val + + @property + def db(self): + """ + Sets the b coordinate step. See `b0` for more info. + + The 'db' property is a number and may be specified as: + - An int or float + + Returns + ------- + int|float + """ + return self["db"] + + @db.setter + def db(self, val): + self["db"] = val + + @property + def font(self): + """ + The default font used for axis & tick labels on this carpet + + The 'font' property is an instance of Font + that may be specified as: + - An instance of :class:`plotly.graph_objs.carpet.Font` + - A dict of string/value properties that will be passed + to the Font constructor + + Returns + ------- + plotly.graph_objs.carpet.Font + """ + return self["font"] + + @font.setter + def font(self, val): + self["font"] = val + + @property + def ids(self): + """ + Assigns id labels to each datum. These ids for object constancy + of data points during animation. Should be an array of strings, + not numbers or any other type. + + The 'ids' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["ids"] + + @ids.setter + def ids(self, val): + self["ids"] = val + + @property + def idssrc(self): + """ + Sets the source reference on Chart Studio Cloud for `ids`. + + The 'idssrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["idssrc"] + + @idssrc.setter + def idssrc(self, val): + self["idssrc"] = val + + @property + def legend(self): + """ + Sets the reference to a legend to show this trace in. + References to these legends are "legend", "legend2", "legend3", + etc. Settings for these legends are set in the layout, under + `layout.legend`, `layout.legend2`, etc. + + The 'legend' property is an identifier of a particular + subplot, of type 'legend', that may be specified as: + - the string 'legend' optionally followed by an integer >= 1 + (e.g. 'legend', 'legend1', 'legend2', 'legend3', etc.) + + Returns + ------- + str + """ + return self["legend"] + + @legend.setter + def legend(self, val): + self["legend"] = val + + @property + def legendgrouptitle(self): + """ + The 'legendgrouptitle' property is an instance of Legendgrouptitle + that may be specified as: + - An instance of :class:`plotly.graph_objs.carpet.Legendgrouptitle` + - A dict of string/value properties that will be passed + to the Legendgrouptitle constructor + + Returns + ------- + plotly.graph_objs.carpet.Legendgrouptitle + """ + return self["legendgrouptitle"] + + @legendgrouptitle.setter + def legendgrouptitle(self, val): + self["legendgrouptitle"] = val + + @property + def legendrank(self): + """ + Sets the legend rank for this trace. Items and groups with + smaller ranks are presented on top/left side while with + "reversed" `legend.traceorder` they are on bottom/right side. + The default legendrank is 1000, so that you can use ranks less + than 1000 to place certain items before all unranked items, and + ranks greater than 1000 to go after all unranked items. When + having unranked or equal rank items shapes would be displayed + after traces i.e. according to their order in data and layout. + + The 'legendrank' property is a number and may be specified as: + - An int or float + + Returns + ------- + int|float + """ + return self["legendrank"] + + @legendrank.setter + def legendrank(self, val): + self["legendrank"] = val + + @property + def legendwidth(self): + """ + Sets the width (in px or fraction) of the legend for this + trace. + + The 'legendwidth' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["legendwidth"] + + @legendwidth.setter + def legendwidth(self, val): + self["legendwidth"] = val + + @property + def meta(self): + """ + Assigns extra meta information associated with this trace that + can be used in various text attributes. Attributes such as + trace `name`, graph, axis and colorbar `title.text`, annotation + `text` `rangeselector`, `updatemenues` and `sliders` `label` + text all support `meta`. To access the trace `meta` values in + an attribute in the same trace, simply use `%{meta[i]}` where + `i` is the index or key of the `meta` item in question. To + access trace `meta` in layout attributes, use + `%{data[n[.meta[i]}` where `i` is the index or key of the + `meta` and `n` is the trace index. + + The 'meta' property accepts values of any type + + Returns + ------- + Any|numpy.ndarray + """ + return self["meta"] + + @meta.setter + def meta(self, val): + self["meta"] = val + + @property + def metasrc(self): + """ + Sets the source reference on Chart Studio Cloud for `meta`. + + The 'metasrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["metasrc"] + + @metasrc.setter + def metasrc(self, val): + self["metasrc"] = val + + @property + def name(self): + """ + Sets the trace name. The trace name appears as the legend item + and on hover. + + The 'name' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["name"] + + @name.setter + def name(self, val): + self["name"] = val + + @property + def opacity(self): + """ + Sets the opacity of the trace. + + The 'opacity' property is a number and may be specified as: + - An int or float in the interval [0, 1] + + Returns + ------- + int|float + """ + return self["opacity"] + + @opacity.setter + def opacity(self, val): + self["opacity"] = val + + @property + def stream(self): + """ + The 'stream' property is an instance of Stream + that may be specified as: + - An instance of :class:`plotly.graph_objs.carpet.Stream` + - A dict of string/value properties that will be passed + to the Stream constructor + + Returns + ------- + plotly.graph_objs.carpet.Stream + """ + return self["stream"] + + @stream.setter + def stream(self, val): + self["stream"] = val + + @property + def uid(self): + """ + Assign an id to this trace, Use this to provide object + constancy between traces during animations and transitions. + + The 'uid' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["uid"] + + @uid.setter + def uid(self, val): + self["uid"] = val + + @property + def uirevision(self): + """ + Controls persistence of some user-driven changes to the trace: + `constraintrange` in `parcoords` traces, as well as some + `editable: true` modifications such as `name` and + `colorbar.title`. Defaults to `layout.uirevision`. Note that + other user-driven trace attribute changes are controlled by + `layout` attributes: `trace.visible` is controlled by + `layout.legend.uirevision`, `selectedpoints` is controlled by + `layout.selectionrevision`, and `colorbar.(x|y)` (accessible + with `config: {editable: true}`) is controlled by + `layout.editrevision`. Trace changes are tracked by `uid`, + which only falls back on trace index if no `uid` is provided. + So if your app can add/remove traces before the end of the + `data` array, such that the same trace has a different index, + you can still preserve user-driven changes if you give each + trace a `uid` that stays with it as it moves. + + The 'uirevision' property accepts values of any type + + Returns + ------- + Any + """ + return self["uirevision"] + + @uirevision.setter + def uirevision(self, val): + self["uirevision"] = val + + @property + def visible(self): + """ + Determines whether or not this trace is visible. If + "legendonly", the trace is not drawn, but can appear as a + legend item (provided that the legend itself is visible). + + The 'visible' property is an enumeration that may be specified as: + - One of the following enumeration values: + [True, False, 'legendonly'] + + Returns + ------- + Any + """ + return self["visible"] + + @visible.setter + def visible(self, val): + self["visible"] = val + + @property + def x(self): + """ + A two dimensional array of x coordinates at each carpet point. + If omitted, the plot is a cheater plot and the xaxis is hidden + by default. + + The 'x' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["x"] + + @x.setter + def x(self, val): + self["x"] = val + + @property + def xaxis(self): + """ + Sets a reference between this trace's x coordinates and a 2D + cartesian x axis. If "x" (the default value), the x coordinates + refer to `layout.xaxis`. If "x2", the x coordinates refer to + `layout.xaxis2`, and so on. + + The 'xaxis' property is an identifier of a particular + subplot, of type 'x', that may be specified as: + - the string 'x' optionally followed by an integer >= 1 + (e.g. 'x', 'x1', 'x2', 'x3', etc.) + + Returns + ------- + str + """ + return self["xaxis"] + + @xaxis.setter + def xaxis(self, val): + self["xaxis"] = val + + @property + def xsrc(self): + """ + Sets the source reference on Chart Studio Cloud for `x`. + + The 'xsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["xsrc"] + + @xsrc.setter + def xsrc(self, val): + self["xsrc"] = val + + @property + def y(self): + """ + A two dimensional array of y coordinates at each carpet point. + + The 'y' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["y"] + + @y.setter + def y(self, val): + self["y"] = val + + @property + def yaxis(self): + """ + Sets a reference between this trace's y coordinates and a 2D + cartesian y axis. If "y" (the default value), the y coordinates + refer to `layout.yaxis`. If "y2", the y coordinates refer to + `layout.yaxis2`, and so on. + + The 'yaxis' property is an identifier of a particular + subplot, of type 'y', that may be specified as: + - the string 'y' optionally followed by an integer >= 1 + (e.g. 'y', 'y1', 'y2', 'y3', etc.) + + Returns + ------- + str + """ + return self["yaxis"] + + @yaxis.setter + def yaxis(self, val): + self["yaxis"] = val + + @property + def ysrc(self): + """ + Sets the source reference on Chart Studio Cloud for `y`. + + The 'ysrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["ysrc"] + + @ysrc.setter + def ysrc(self, val): + self["ysrc"] = val + + @property + def zorder(self): + """ + Sets the layer on which this trace is displayed, relative to + other SVG traces on the same subplot. SVG traces with higher + `zorder` appear in front of those with lower `zorder`. + + The 'zorder' property is a integer and may be specified as: + - An int (or float that will be cast to an int) + + Returns + ------- + int + """ + return self["zorder"] + + @zorder.setter + def zorder(self, val): + self["zorder"] = val + + @property + def type(self): + return self._props["type"] + + @property + def _prop_descriptions(self): + return """\ + a + An array containing values of the first parameter value + a0 + Alternate to `a`. Builds a linear space of a + coordinates. Use with `da` where `a0` is the starting + coordinate and `da` the step. + aaxis + :class:`plotly.graph_objects.carpet.Aaxis` instance or + dict with compatible properties + asrc + Sets the source reference on Chart Studio Cloud for + `a`. + b + A two dimensional array of y coordinates at each carpet + point. + b0 + Alternate to `b`. Builds a linear space of a + coordinates. Use with `db` where `b0` is the starting + coordinate and `db` the step. + baxis + :class:`plotly.graph_objects.carpet.Baxis` instance or + dict with compatible properties + bsrc + Sets the source reference on Chart Studio Cloud for + `b`. + carpet + An identifier for this carpet, so that `scattercarpet` + and `contourcarpet` traces can specify a carpet plot on + which they lie + cheaterslope + The shift applied to each successive row of data in + creating a cheater plot. Only used if `x` is been + omitted. + color + Sets default for all colors associated with this axis + all at once: line, font, tick, and grid colors. Grid + color is lightened by blending this with the plot + background Individual pieces can override this. + customdata + Assigns extra data each datum. This may be useful when + listening to hover, click and selection events. Note + that, "scatter" traces also appends customdata items in + the markers DOM elements + customdatasrc + Sets the source reference on Chart Studio Cloud for + `customdata`. + da + Sets the a coordinate step. See `a0` for more info. + db + Sets the b coordinate step. See `b0` for more info. + font + The default font used for axis & tick labels on this + carpet + ids + Assigns id labels to each datum. These ids for object + constancy of data points during animation. Should be an + array of strings, not numbers or any other type. + idssrc + Sets the source reference on Chart Studio Cloud for + `ids`. + legend + Sets the reference to a legend to show this trace in. + References to these legends are "legend", "legend2", + "legend3", etc. Settings for these legends are set in + the layout, under `layout.legend`, `layout.legend2`, + etc. + legendgrouptitle + :class:`plotly.graph_objects.carpet.Legendgrouptitle` + instance or dict with compatible properties + legendrank + Sets the legend rank for this trace. Items and groups + with smaller ranks are presented on top/left side while + with "reversed" `legend.traceorder` they are on + bottom/right side. The default legendrank is 1000, so + that you can use ranks less than 1000 to place certain + items before all unranked items, and ranks greater than + 1000 to go after all unranked items. When having + unranked or equal rank items shapes would be displayed + after traces i.e. according to their order in data and + layout. + legendwidth + Sets the width (in px or fraction) of the legend for + this trace. + meta + Assigns extra meta information associated with this + trace that can be used in various text attributes. + Attributes such as trace `name`, graph, axis and + colorbar `title.text`, annotation `text` + `rangeselector`, `updatemenues` and `sliders` `label` + text all support `meta`. To access the trace `meta` + values in an attribute in the same trace, simply use + `%{meta[i]}` where `i` is the index or key of the + `meta` item in question. To access trace `meta` in + layout attributes, use `%{data[n[.meta[i]}` where `i` + is the index or key of the `meta` and `n` is the trace + index. + metasrc + Sets the source reference on Chart Studio Cloud for + `meta`. + name + Sets the trace name. The trace name appears as the + legend item and on hover. + opacity + Sets the opacity of the trace. + stream + :class:`plotly.graph_objects.carpet.Stream` instance or + dict with compatible properties + uid + Assign an id to this trace, Use this to provide object + constancy between traces during animations and + transitions. + uirevision + Controls persistence of some user-driven changes to the + trace: `constraintrange` in `parcoords` traces, as well + as some `editable: true` modifications such as `name` + and `colorbar.title`. Defaults to `layout.uirevision`. + Note that other user-driven trace attribute changes are + controlled by `layout` attributes: `trace.visible` is + controlled by `layout.legend.uirevision`, + `selectedpoints` is controlled by + `layout.selectionrevision`, and `colorbar.(x|y)` + (accessible with `config: {editable: true}`) is + controlled by `layout.editrevision`. Trace changes are + tracked by `uid`, which only falls back on trace index + if no `uid` is provided. So if your app can add/remove + traces before the end of the `data` array, such that + the same trace has a different index, you can still + preserve user-driven changes if you give each trace a + `uid` that stays with it as it moves. + visible + Determines whether or not this trace is visible. If + "legendonly", the trace is not drawn, but can appear as + a legend item (provided that the legend itself is + visible). + x + A two dimensional array of x coordinates at each carpet + point. If omitted, the plot is a cheater plot and the + xaxis is hidden by default. + xaxis + Sets a reference between this trace's x coordinates and + a 2D cartesian x axis. If "x" (the default value), the + x coordinates refer to `layout.xaxis`. If "x2", the x + coordinates refer to `layout.xaxis2`, and so on. + xsrc + Sets the source reference on Chart Studio Cloud for + `x`. + y + A two dimensional array of y coordinates at each carpet + point. + yaxis + Sets a reference between this trace's y coordinates and + a 2D cartesian y axis. If "y" (the default value), the + y coordinates refer to `layout.yaxis`. If "y2", the y + coordinates refer to `layout.yaxis2`, and so on. + ysrc + Sets the source reference on Chart Studio Cloud for + `y`. + zorder + Sets the layer on which this trace is displayed, + relative to other SVG traces on the same subplot. SVG + traces with higher `zorder` appear in front of those + with lower `zorder`. + """ + + def __init__( + self, + arg=None, + a=None, + a0=None, + aaxis=None, + asrc=None, + b=None, + b0=None, + baxis=None, + bsrc=None, + carpet=None, + cheaterslope=None, + color=None, + customdata=None, + customdatasrc=None, + da=None, + db=None, + font=None, + ids=None, + idssrc=None, + legend=None, + legendgrouptitle=None, + legendrank=None, + legendwidth=None, + meta=None, + metasrc=None, + name=None, + opacity=None, + stream=None, + uid=None, + uirevision=None, + visible=None, + x=None, + xaxis=None, + xsrc=None, + y=None, + yaxis=None, + ysrc=None, + zorder=None, + **kwargs, + ): + """ + Construct a new Carpet object + + The data describing carpet axis layout is set in `y` and + (optionally) also `x`. If only `y` is present, `x` the plot is + interpreted as a cheater plot and is filled in using the `y` + values. `x` and `y` may either be 2D arrays matching with each + dimension matching that of `a` and `b`, or they may be 1D + arrays with total length equal to that of `a` and `b`. + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of :class:`plotly.graph_objs.Carpet` + a + An array containing values of the first parameter value + a0 + Alternate to `a`. Builds a linear space of a + coordinates. Use with `da` where `a0` is the starting + coordinate and `da` the step. + aaxis + :class:`plotly.graph_objects.carpet.Aaxis` instance or + dict with compatible properties + asrc + Sets the source reference on Chart Studio Cloud for + `a`. + b + A two dimensional array of y coordinates at each carpet + point. + b0 + Alternate to `b`. Builds a linear space of a + coordinates. Use with `db` where `b0` is the starting + coordinate and `db` the step. + baxis + :class:`plotly.graph_objects.carpet.Baxis` instance or + dict with compatible properties + bsrc + Sets the source reference on Chart Studio Cloud for + `b`. + carpet + An identifier for this carpet, so that `scattercarpet` + and `contourcarpet` traces can specify a carpet plot on + which they lie + cheaterslope + The shift applied to each successive row of data in + creating a cheater plot. Only used if `x` is been + omitted. + color + Sets default for all colors associated with this axis + all at once: line, font, tick, and grid colors. Grid + color is lightened by blending this with the plot + background Individual pieces can override this. + customdata + Assigns extra data each datum. This may be useful when + listening to hover, click and selection events. Note + that, "scatter" traces also appends customdata items in + the markers DOM elements + customdatasrc + Sets the source reference on Chart Studio Cloud for + `customdata`. + da + Sets the a coordinate step. See `a0` for more info. + db + Sets the b coordinate step. See `b0` for more info. + font + The default font used for axis & tick labels on this + carpet + ids + Assigns id labels to each datum. These ids for object + constancy of data points during animation. Should be an + array of strings, not numbers or any other type. + idssrc + Sets the source reference on Chart Studio Cloud for + `ids`. + legend + Sets the reference to a legend to show this trace in. + References to these legends are "legend", "legend2", + "legend3", etc. Settings for these legends are set in + the layout, under `layout.legend`, `layout.legend2`, + etc. + legendgrouptitle + :class:`plotly.graph_objects.carpet.Legendgrouptitle` + instance or dict with compatible properties + legendrank + Sets the legend rank for this trace. Items and groups + with smaller ranks are presented on top/left side while + with "reversed" `legend.traceorder` they are on + bottom/right side. The default legendrank is 1000, so + that you can use ranks less than 1000 to place certain + items before all unranked items, and ranks greater than + 1000 to go after all unranked items. When having + unranked or equal rank items shapes would be displayed + after traces i.e. according to their order in data and + layout. + legendwidth + Sets the width (in px or fraction) of the legend for + this trace. + meta + Assigns extra meta information associated with this + trace that can be used in various text attributes. + Attributes such as trace `name`, graph, axis and + colorbar `title.text`, annotation `text` + `rangeselector`, `updatemenues` and `sliders` `label` + text all support `meta`. To access the trace `meta` + values in an attribute in the same trace, simply use + `%{meta[i]}` where `i` is the index or key of the + `meta` item in question. To access trace `meta` in + layout attributes, use `%{data[n[.meta[i]}` where `i` + is the index or key of the `meta` and `n` is the trace + index. + metasrc + Sets the source reference on Chart Studio Cloud for + `meta`. + name + Sets the trace name. The trace name appears as the + legend item and on hover. + opacity + Sets the opacity of the trace. + stream + :class:`plotly.graph_objects.carpet.Stream` instance or + dict with compatible properties + uid + Assign an id to this trace, Use this to provide object + constancy between traces during animations and + transitions. + uirevision + Controls persistence of some user-driven changes to the + trace: `constraintrange` in `parcoords` traces, as well + as some `editable: true` modifications such as `name` + and `colorbar.title`. Defaults to `layout.uirevision`. + Note that other user-driven trace attribute changes are + controlled by `layout` attributes: `trace.visible` is + controlled by `layout.legend.uirevision`, + `selectedpoints` is controlled by + `layout.selectionrevision`, and `colorbar.(x|y)` + (accessible with `config: {editable: true}`) is + controlled by `layout.editrevision`. Trace changes are + tracked by `uid`, which only falls back on trace index + if no `uid` is provided. So if your app can add/remove + traces before the end of the `data` array, such that + the same trace has a different index, you can still + preserve user-driven changes if you give each trace a + `uid` that stays with it as it moves. + visible + Determines whether or not this trace is visible. If + "legendonly", the trace is not drawn, but can appear as + a legend item (provided that the legend itself is + visible). + x + A two dimensional array of x coordinates at each carpet + point. If omitted, the plot is a cheater plot and the + xaxis is hidden by default. + xaxis + Sets a reference between this trace's x coordinates and + a 2D cartesian x axis. If "x" (the default value), the + x coordinates refer to `layout.xaxis`. If "x2", the x + coordinates refer to `layout.xaxis2`, and so on. + xsrc + Sets the source reference on Chart Studio Cloud for + `x`. + y + A two dimensional array of y coordinates at each carpet + point. + yaxis + Sets a reference between this trace's y coordinates and + a 2D cartesian y axis. If "y" (the default value), the + y coordinates refer to `layout.yaxis`. If "y2", the y + coordinates refer to `layout.yaxis2`, and so on. + ysrc + Sets the source reference on Chart Studio Cloud for + `y`. + zorder + Sets the layer on which this trace is displayed, + relative to other SVG traces on the same subplot. SVG + traces with higher `zorder` appear in front of those + with lower `zorder`. + + Returns + ------- + Carpet + """ + super().__init__("carpet") + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + if arg is None: + arg = {} + elif isinstance(arg, self.__class__): + arg = arg.to_plotly_json() + elif isinstance(arg, dict): + arg = _copy.copy(arg) + else: + raise ValueError("""\ +The first argument to the plotly.graph_objs.Carpet +constructor must be a dict or +an instance of :class:`plotly.graph_objs.Carpet`""") + + self._skip_invalid = kwargs.pop("skip_invalid", False) + self._validate = kwargs.pop("_validate", True) + + self._set_property("a", arg, a) + self._set_property("a0", arg, a0) + self._set_property("aaxis", arg, aaxis) + self._set_property("asrc", arg, asrc) + self._set_property("b", arg, b) + self._set_property("b0", arg, b0) + self._set_property("baxis", arg, baxis) + self._set_property("bsrc", arg, bsrc) + self._set_property("carpet", arg, carpet) + self._set_property("cheaterslope", arg, cheaterslope) + self._set_property("color", arg, color) + self._set_property("customdata", arg, customdata) + self._set_property("customdatasrc", arg, customdatasrc) + self._set_property("da", arg, da) + self._set_property("db", arg, db) + self._set_property("font", arg, font) + self._set_property("ids", arg, ids) + self._set_property("idssrc", arg, idssrc) + self._set_property("legend", arg, legend) + self._set_property("legendgrouptitle", arg, legendgrouptitle) + self._set_property("legendrank", arg, legendrank) + self._set_property("legendwidth", arg, legendwidth) + self._set_property("meta", arg, meta) + self._set_property("metasrc", arg, metasrc) + self._set_property("name", arg, name) + self._set_property("opacity", arg, opacity) + self._set_property("stream", arg, stream) + self._set_property("uid", arg, uid) + self._set_property("uirevision", arg, uirevision) + self._set_property("visible", arg, visible) + self._set_property("x", arg, x) + self._set_property("xaxis", arg, xaxis) + self._set_property("xsrc", arg, xsrc) + self._set_property("y", arg, y) + self._set_property("yaxis", arg, yaxis) + self._set_property("ysrc", arg, ysrc) + self._set_property("zorder", arg, zorder) + + self._props["type"] = "carpet" + arg.pop("type", None) + self._process_kwargs(**dict(arg, **kwargs)) + self._skip_invalid = False diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/_choropleth.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/_choropleth.py new file mode 100644 index 0000000000000000000000000000000000000000..d4be517e4d36329b21879e8f9f7b551119afa5ea --- /dev/null +++ b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/_choropleth.py @@ -0,0 +1,1823 @@ +# --- THIS FILE IS AUTO-GENERATED --- +# Modifications will be overwitten the next time code generation run. + +from plotly.basedatatypes import BaseTraceType as _BaseTraceType +import copy as _copy +import warnings + + +class Choropleth(_BaseTraceType): + _parent_path_str = "" + _path_str = "choropleth" + _valid_props = { + "autocolorscale", + "coloraxis", + "colorbar", + "colorscale", + "customdata", + "customdatasrc", + "featureidkey", + "geo", + "geojson", + "hoverinfo", + "hoverinfosrc", + "hoverlabel", + "hovertemplate", + "hovertemplatefallback", + "hovertemplatesrc", + "hovertext", + "hovertextsrc", + "ids", + "idssrc", + "legend", + "legendgroup", + "legendgrouptitle", + "legendrank", + "legendwidth", + "locationmode", + "locations", + "locationssrc", + "marker", + "meta", + "metasrc", + "name", + "reversescale", + "selected", + "selectedpoints", + "showlegend", + "showscale", + "stream", + "text", + "textsrc", + "type", + "uid", + "uirevision", + "unselected", + "visible", + "z", + "zauto", + "zmax", + "zmid", + "zmin", + "zsrc", + } + + @property + def autocolorscale(self): + """ + Determines whether the colorscale is a default palette + (`autocolorscale: true`) or the palette determined by + `colorscale`. In case `colorscale` is unspecified or + `autocolorscale` is true, the default palette will be chosen + according to whether numbers in the `color` array are all + positive, all negative or mixed. + + The 'autocolorscale' property is a boolean and must be specified as: + - A boolean value: True or False + + Returns + ------- + bool + """ + return self["autocolorscale"] + + @autocolorscale.setter + def autocolorscale(self, val): + self["autocolorscale"] = val + + @property + def coloraxis(self): + """ + Sets a reference to a shared color axis. References to these + shared color axes are "coloraxis", "coloraxis2", "coloraxis3", + etc. Settings for these shared color axes are set in the + layout, under `layout.coloraxis`, `layout.coloraxis2`, etc. + Note that multiple color scales can be linked to the same color + axis. + + The 'coloraxis' property is an identifier of a particular + subplot, of type 'coloraxis', that may be specified as: + - the string 'coloraxis' optionally followed by an integer >= 1 + (e.g. 'coloraxis', 'coloraxis1', 'coloraxis2', 'coloraxis3', etc.) + + Returns + ------- + str + """ + return self["coloraxis"] + + @coloraxis.setter + def coloraxis(self, val): + self["coloraxis"] = val + + @property + def colorbar(self): + """ + The 'colorbar' property is an instance of ColorBar + that may be specified as: + - An instance of :class:`plotly.graph_objs.choropleth.ColorBar` + - A dict of string/value properties that will be passed + to the ColorBar constructor + + Returns + ------- + plotly.graph_objs.choropleth.ColorBar + """ + return self["colorbar"] + + @colorbar.setter + def colorbar(self, val): + self["colorbar"] = val + + @property + def colorscale(self): + """ + Sets the colorscale. The colorscale must be an array containing + arrays mapping a normalized value to an rgb, rgba, hex, hsl, + hsv, or named color string. At minimum, a mapping for the + lowest (0) and highest (1) values are required. For example, + `[[0, 'rgb(0,0,255)'], [1, 'rgb(255,0,0)']]`. To control the + bounds of the colorscale in color space, use `zmin` and `zmax`. + Alternatively, `colorscale` may be a palette name string of the + following list: Blackbody,Bluered,Blues,Cividis,Earth,Electric, + Greens,Greys,Hot,Jet,Picnic,Portland,Rainbow,RdBu,Reds,Viridis, + YlGnBu,YlOrRd. + + The 'colorscale' property is a colorscale and may be + specified as: + - A list of colors that will be spaced evenly to create the colorscale. + Many predefined colorscale lists are included in the sequential, diverging, + and cyclical modules in the plotly.colors package. + - A list of 2-element lists where the first element is the + normalized color level value (starting at 0 and ending at 1), + and the second item is a valid color string. + (e.g. [[0, 'green'], [0.5, 'red'], [1.0, 'rgb(0, 0, 255)']]) + - One of the following named colorscales: + ['aggrnyl', 'agsunset', 'algae', 'amp', 'armyrose', 'balance', + 'blackbody', 'bluered', 'blues', 'blugrn', 'bluyl', 'brbg', + 'brwnyl', 'bugn', 'bupu', 'burg', 'burgyl', 'cividis', 'curl', + 'darkmint', 'deep', 'delta', 'dense', 'earth', 'edge', 'electric', + 'emrld', 'fall', 'geyser', 'gnbu', 'gray', 'greens', 'greys', + 'haline', 'hot', 'hsv', 'ice', 'icefire', 'inferno', 'jet', + 'magenta', 'magma', 'matter', 'mint', 'mrybm', 'mygbm', 'oranges', + 'orrd', 'oryel', 'oxy', 'peach', 'phase', 'picnic', 'pinkyl', + 'piyg', 'plasma', 'plotly3', 'portland', 'prgn', 'pubu', 'pubugn', + 'puor', 'purd', 'purp', 'purples', 'purpor', 'rainbow', 'rdbu', + 'rdgy', 'rdpu', 'rdylbu', 'rdylgn', 'redor', 'reds', 'solar', + 'spectral', 'speed', 'sunset', 'sunsetdark', 'teal', 'tealgrn', + 'tealrose', 'tempo', 'temps', 'thermal', 'tropic', 'turbid', + 'turbo', 'twilight', 'viridis', 'ylgn', 'ylgnbu', 'ylorbr', + 'ylorrd']. + Appending '_r' to a named colorscale reverses it. + + Returns + ------- + str + """ + return self["colorscale"] + + @colorscale.setter + def colorscale(self, val): + self["colorscale"] = val + + @property + def customdata(self): + """ + Assigns extra data each datum. This may be useful when + listening to hover, click and selection events. Note that, + "scatter" traces also appends customdata items in the markers + DOM elements + + The 'customdata' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["customdata"] + + @customdata.setter + def customdata(self, val): + self["customdata"] = val + + @property + def customdatasrc(self): + """ + Sets the source reference on Chart Studio Cloud for + `customdata`. + + The 'customdatasrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["customdatasrc"] + + @customdatasrc.setter + def customdatasrc(self, val): + self["customdatasrc"] = val + + @property + def featureidkey(self): + """ + Sets the key in GeoJSON features which is used as id to match + the items included in the `locations` array. Only has an effect + when `geojson` is set. Support nested property, for example + "properties.name". + + The 'featureidkey' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["featureidkey"] + + @featureidkey.setter + def featureidkey(self, val): + self["featureidkey"] = val + + @property + def geo(self): + """ + Sets a reference between this trace's geospatial coordinates + and a geographic map. If "geo" (the default value), the + geospatial coordinates refer to `layout.geo`. If "geo2", the + geospatial coordinates refer to `layout.geo2`, and so on. + + The 'geo' property is an identifier of a particular + subplot, of type 'geo', that may be specified as: + - the string 'geo' optionally followed by an integer >= 1 + (e.g. 'geo', 'geo1', 'geo2', 'geo3', etc.) + + Returns + ------- + str + """ + return self["geo"] + + @geo.setter + def geo(self, val): + self["geo"] = val + + @property + def geojson(self): + """ + Sets optional GeoJSON data associated with this trace. If not + given, the features on the base map are used. It can be set as + a valid GeoJSON object or as a URL string. Note that we only + accept GeoJSONs of type "FeatureCollection" or "Feature" with + geometries of type "Polygon" or "MultiPolygon". + + The 'geojson' property accepts values of any type + + Returns + ------- + Any + """ + return self["geojson"] + + @geojson.setter + def geojson(self, val): + self["geojson"] = val + + @property + def hoverinfo(self): + """ + Determines which trace information appear on hover. If `none` + or `skip` are set, no information is displayed upon hovering. + But, if `none` is set, click and hover events are still fired. + + The 'hoverinfo' property is a flaglist and may be specified + as a string containing: + - Any combination of ['location', 'z', 'text', 'name'] joined with '+' characters + (e.g. 'location+z') + OR exactly one of ['all', 'none', 'skip'] (e.g. 'skip') + - A list or array of the above + + Returns + ------- + Any|numpy.ndarray + """ + return self["hoverinfo"] + + @hoverinfo.setter + def hoverinfo(self, val): + self["hoverinfo"] = val + + @property + def hoverinfosrc(self): + """ + Sets the source reference on Chart Studio Cloud for + `hoverinfo`. + + The 'hoverinfosrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["hoverinfosrc"] + + @hoverinfosrc.setter + def hoverinfosrc(self, val): + self["hoverinfosrc"] = val + + @property + def hoverlabel(self): + """ + The 'hoverlabel' property is an instance of Hoverlabel + that may be specified as: + - An instance of :class:`plotly.graph_objs.choropleth.Hoverlabel` + - A dict of string/value properties that will be passed + to the Hoverlabel constructor + + Returns + ------- + plotly.graph_objs.choropleth.Hoverlabel + """ + return self["hoverlabel"] + + @hoverlabel.setter + def hoverlabel(self, val): + self["hoverlabel"] = val + + @property + def hovertemplate(self): + """ + Template string used for rendering the information that appear + on hover box. Note that this will override `hoverinfo`. + Variables are inserted using %{variable}, for example "y: %{y}" + as well as %{xother}, {%_xother}, {%_xother_}, {%xother_}. When + showing info for several points, "xother" will be added to + those with different x positions from the first point. An + underscore before or after "(x|y)other" will add a space on + that side, only when this field is shown. Numbers are formatted + using d3-format's syntax %{variable:d3-format}, for example + "Price: %{y:$.2f}". + https://github.com/d3/d3-format/tree/v1.4.5#d3-format for + details on the formatting syntax. Dates are formatted using + d3-time-format's syntax %{variable|d3-time-format}, for example + "Day: %{2019-01-01|%A}". https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format for details on the date + formatting syntax. Variables that can't be found will be + replaced with the specifier. For example, a template of "data: + %{x}, %{y}" will result in a value of "data: 1, %{y}" if x is 1 + and y is missing. Variables with an undefined value will be + replaced with the fallback value. The variables available in + `hovertemplate` are the ones emitted as event data described at + this link https://plotly.com/javascript/plotlyjs-events/#event- + data. Additionally, all attributes that can be specified per- + point (the ones that are `arrayOk: true`) are available. + Anything contained in tag `` is displayed in the + secondary box, for example `%{fullData.name}`. + To hide the secondary box completely, use an empty tag + ``. + + The 'hovertemplate' property is a string and must be specified as: + - A string + - A number that will be converted to a string + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["hovertemplate"] + + @hovertemplate.setter + def hovertemplate(self, val): + self["hovertemplate"] = val + + @property + def hovertemplatefallback(self): + """ + Fallback string that's displayed when a variable referenced in + a template is missing. If the boolean value 'false' is passed + in, the specifier with the missing variable will be displayed. + + The 'hovertemplatefallback' property accepts values of any type + + Returns + ------- + Any + """ + return self["hovertemplatefallback"] + + @hovertemplatefallback.setter + def hovertemplatefallback(self, val): + self["hovertemplatefallback"] = val + + @property + def hovertemplatesrc(self): + """ + Sets the source reference on Chart Studio Cloud for + `hovertemplate`. + + The 'hovertemplatesrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["hovertemplatesrc"] + + @hovertemplatesrc.setter + def hovertemplatesrc(self, val): + self["hovertemplatesrc"] = val + + @property + def hovertext(self): + """ + Same as `text`. + + The 'hovertext' property is a string and must be specified as: + - A string + - A number that will be converted to a string + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["hovertext"] + + @hovertext.setter + def hovertext(self, val): + self["hovertext"] = val + + @property + def hovertextsrc(self): + """ + Sets the source reference on Chart Studio Cloud for + `hovertext`. + + The 'hovertextsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["hovertextsrc"] + + @hovertextsrc.setter + def hovertextsrc(self, val): + self["hovertextsrc"] = val + + @property + def ids(self): + """ + Assigns id labels to each datum. These ids for object constancy + of data points during animation. Should be an array of strings, + not numbers or any other type. + + The 'ids' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["ids"] + + @ids.setter + def ids(self, val): + self["ids"] = val + + @property + def idssrc(self): + """ + Sets the source reference on Chart Studio Cloud for `ids`. + + The 'idssrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["idssrc"] + + @idssrc.setter + def idssrc(self, val): + self["idssrc"] = val + + @property + def legend(self): + """ + Sets the reference to a legend to show this trace in. + References to these legends are "legend", "legend2", "legend3", + etc. Settings for these legends are set in the layout, under + `layout.legend`, `layout.legend2`, etc. + + The 'legend' property is an identifier of a particular + subplot, of type 'legend', that may be specified as: + - the string 'legend' optionally followed by an integer >= 1 + (e.g. 'legend', 'legend1', 'legend2', 'legend3', etc.) + + Returns + ------- + str + """ + return self["legend"] + + @legend.setter + def legend(self, val): + self["legend"] = val + + @property + def legendgroup(self): + """ + Sets the legend group for this trace. Traces and shapes part of + the same legend group hide/show at the same time when toggling + legend items. + + The 'legendgroup' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["legendgroup"] + + @legendgroup.setter + def legendgroup(self, val): + self["legendgroup"] = val + + @property + def legendgrouptitle(self): + """ + The 'legendgrouptitle' property is an instance of Legendgrouptitle + that may be specified as: + - An instance of :class:`plotly.graph_objs.choropleth.Legendgrouptitle` + - A dict of string/value properties that will be passed + to the Legendgrouptitle constructor + + Returns + ------- + plotly.graph_objs.choropleth.Legendgrouptitle + """ + return self["legendgrouptitle"] + + @legendgrouptitle.setter + def legendgrouptitle(self, val): + self["legendgrouptitle"] = val + + @property + def legendrank(self): + """ + Sets the legend rank for this trace. Items and groups with + smaller ranks are presented on top/left side while with + "reversed" `legend.traceorder` they are on bottom/right side. + The default legendrank is 1000, so that you can use ranks less + than 1000 to place certain items before all unranked items, and + ranks greater than 1000 to go after all unranked items. When + having unranked or equal rank items shapes would be displayed + after traces i.e. according to their order in data and layout. + + The 'legendrank' property is a number and may be specified as: + - An int or float + + Returns + ------- + int|float + """ + return self["legendrank"] + + @legendrank.setter + def legendrank(self, val): + self["legendrank"] = val + + @property + def legendwidth(self): + """ + Sets the width (in px or fraction) of the legend for this + trace. + + The 'legendwidth' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["legendwidth"] + + @legendwidth.setter + def legendwidth(self, val): + self["legendwidth"] = val + + @property + def locationmode(self): + """ + The library used by the *country names* `locationmode` option + is changing in an upcoming version. Country names in existing + plots may not work in the new version. Determines the set of + locations used to match entries in `locations` to regions on + the map. Values "ISO-3", "USA-states", *country names* + correspond to features on the base map and value "geojson-id" + corresponds to features from a custom GeoJSON linked to the + `geojson` attribute. + + The 'locationmode' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['ISO-3', 'USA-states', 'country names', 'geojson-id'] + + Returns + ------- + Any + """ + return self["locationmode"] + + @locationmode.setter + def locationmode(self, val): + self["locationmode"] = val + + @property + def locations(self): + """ + Sets the coordinates via location IDs or names. See + `locationmode` for more info. + + The 'locations' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["locations"] + + @locations.setter + def locations(self, val): + self["locations"] = val + + @property + def locationssrc(self): + """ + Sets the source reference on Chart Studio Cloud for + `locations`. + + The 'locationssrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["locationssrc"] + + @locationssrc.setter + def locationssrc(self, val): + self["locationssrc"] = val + + @property + def marker(self): + """ + The 'marker' property is an instance of Marker + that may be specified as: + - An instance of :class:`plotly.graph_objs.choropleth.Marker` + - A dict of string/value properties that will be passed + to the Marker constructor + + Returns + ------- + plotly.graph_objs.choropleth.Marker + """ + return self["marker"] + + @marker.setter + def marker(self, val): + self["marker"] = val + + @property + def meta(self): + """ + Assigns extra meta information associated with this trace that + can be used in various text attributes. Attributes such as + trace `name`, graph, axis and colorbar `title.text`, annotation + `text` `rangeselector`, `updatemenues` and `sliders` `label` + text all support `meta`. To access the trace `meta` values in + an attribute in the same trace, simply use `%{meta[i]}` where + `i` is the index or key of the `meta` item in question. To + access trace `meta` in layout attributes, use + `%{data[n[.meta[i]}` where `i` is the index or key of the + `meta` and `n` is the trace index. + + The 'meta' property accepts values of any type + + Returns + ------- + Any|numpy.ndarray + """ + return self["meta"] + + @meta.setter + def meta(self, val): + self["meta"] = val + + @property + def metasrc(self): + """ + Sets the source reference on Chart Studio Cloud for `meta`. + + The 'metasrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["metasrc"] + + @metasrc.setter + def metasrc(self, val): + self["metasrc"] = val + + @property + def name(self): + """ + Sets the trace name. The trace name appears as the legend item + and on hover. + + The 'name' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["name"] + + @name.setter + def name(self, val): + self["name"] = val + + @property + def reversescale(self): + """ + Reverses the color mapping if true. If true, `zmin` will + correspond to the last color in the array and `zmax` will + correspond to the first color. + + The 'reversescale' property is a boolean and must be specified as: + - A boolean value: True or False + + Returns + ------- + bool + """ + return self["reversescale"] + + @reversescale.setter + def reversescale(self, val): + self["reversescale"] = val + + @property + def selected(self): + """ + The 'selected' property is an instance of Selected + that may be specified as: + - An instance of :class:`plotly.graph_objs.choropleth.Selected` + - A dict of string/value properties that will be passed + to the Selected constructor + + Returns + ------- + plotly.graph_objs.choropleth.Selected + """ + return self["selected"] + + @selected.setter + def selected(self, val): + self["selected"] = val + + @property + def selectedpoints(self): + """ + Array containing integer indices of selected points. Has an + effect only for traces that support selections. Note that an + empty array means an empty selection where the `unselected` are + turned on for all points, whereas, any other non-array values + means no selection all where the `selected` and `unselected` + styles have no effect. + + The 'selectedpoints' property accepts values of any type + + Returns + ------- + Any + """ + return self["selectedpoints"] + + @selectedpoints.setter + def selectedpoints(self, val): + self["selectedpoints"] = val + + @property + def showlegend(self): + """ + Determines whether or not an item corresponding to this trace + is shown in the legend. + + The 'showlegend' property is a boolean and must be specified as: + - A boolean value: True or False + + Returns + ------- + bool + """ + return self["showlegend"] + + @showlegend.setter + def showlegend(self, val): + self["showlegend"] = val + + @property + def showscale(self): + """ + Determines whether or not a colorbar is displayed for this + trace. + + The 'showscale' property is a boolean and must be specified as: + - A boolean value: True or False + + Returns + ------- + bool + """ + return self["showscale"] + + @showscale.setter + def showscale(self, val): + self["showscale"] = val + + @property + def stream(self): + """ + The 'stream' property is an instance of Stream + that may be specified as: + - An instance of :class:`plotly.graph_objs.choropleth.Stream` + - A dict of string/value properties that will be passed + to the Stream constructor + + Returns + ------- + plotly.graph_objs.choropleth.Stream + """ + return self["stream"] + + @stream.setter + def stream(self, val): + self["stream"] = val + + @property + def text(self): + """ + Sets the text elements associated with each location. + + The 'text' property is a string and must be specified as: + - A string + - A number that will be converted to a string + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["text"] + + @text.setter + def text(self, val): + self["text"] = val + + @property + def textsrc(self): + """ + Sets the source reference on Chart Studio Cloud for `text`. + + The 'textsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["textsrc"] + + @textsrc.setter + def textsrc(self, val): + self["textsrc"] = val + + @property + def uid(self): + """ + Assign an id to this trace, Use this to provide object + constancy between traces during animations and transitions. + + The 'uid' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["uid"] + + @uid.setter + def uid(self, val): + self["uid"] = val + + @property + def uirevision(self): + """ + Controls persistence of some user-driven changes to the trace: + `constraintrange` in `parcoords` traces, as well as some + `editable: true` modifications such as `name` and + `colorbar.title`. Defaults to `layout.uirevision`. Note that + other user-driven trace attribute changes are controlled by + `layout` attributes: `trace.visible` is controlled by + `layout.legend.uirevision`, `selectedpoints` is controlled by + `layout.selectionrevision`, and `colorbar.(x|y)` (accessible + with `config: {editable: true}`) is controlled by + `layout.editrevision`. Trace changes are tracked by `uid`, + which only falls back on trace index if no `uid` is provided. + So if your app can add/remove traces before the end of the + `data` array, such that the same trace has a different index, + you can still preserve user-driven changes if you give each + trace a `uid` that stays with it as it moves. + + The 'uirevision' property accepts values of any type + + Returns + ------- + Any + """ + return self["uirevision"] + + @uirevision.setter + def uirevision(self, val): + self["uirevision"] = val + + @property + def unselected(self): + """ + The 'unselected' property is an instance of Unselected + that may be specified as: + - An instance of :class:`plotly.graph_objs.choropleth.Unselected` + - A dict of string/value properties that will be passed + to the Unselected constructor + + Returns + ------- + plotly.graph_objs.choropleth.Unselected + """ + return self["unselected"] + + @unselected.setter + def unselected(self, val): + self["unselected"] = val + + @property + def visible(self): + """ + Determines whether or not this trace is visible. If + "legendonly", the trace is not drawn, but can appear as a + legend item (provided that the legend itself is visible). + + The 'visible' property is an enumeration that may be specified as: + - One of the following enumeration values: + [True, False, 'legendonly'] + + Returns + ------- + Any + """ + return self["visible"] + + @visible.setter + def visible(self, val): + self["visible"] = val + + @property + def z(self): + """ + Sets the color values. + + The 'z' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["z"] + + @z.setter + def z(self, val): + self["z"] = val + + @property + def zauto(self): + """ + Determines whether or not the color domain is computed with + respect to the input data (here in `z`) or the bounds set in + `zmin` and `zmax` Defaults to `false` when `zmin` and `zmax` + are set by the user. + + The 'zauto' property is a boolean and must be specified as: + - A boolean value: True or False + + Returns + ------- + bool + """ + return self["zauto"] + + @zauto.setter + def zauto(self, val): + self["zauto"] = val + + @property + def zmax(self): + """ + Sets the upper bound of the color domain. Value should have the + same units as in `z` and if set, `zmin` must be set as well. + + The 'zmax' property is a number and may be specified as: + - An int or float + + Returns + ------- + int|float + """ + return self["zmax"] + + @zmax.setter + def zmax(self, val): + self["zmax"] = val + + @property + def zmid(self): + """ + Sets the mid-point of the color domain by scaling `zmin` and/or + `zmax` to be equidistant to this point. Value should have the + same units as in `z`. Has no effect when `zauto` is `false`. + + The 'zmid' property is a number and may be specified as: + - An int or float + + Returns + ------- + int|float + """ + return self["zmid"] + + @zmid.setter + def zmid(self, val): + self["zmid"] = val + + @property + def zmin(self): + """ + Sets the lower bound of the color domain. Value should have the + same units as in `z` and if set, `zmax` must be set as well. + + The 'zmin' property is a number and may be specified as: + - An int or float + + Returns + ------- + int|float + """ + return self["zmin"] + + @zmin.setter + def zmin(self, val): + self["zmin"] = val + + @property + def zsrc(self): + """ + Sets the source reference on Chart Studio Cloud for `z`. + + The 'zsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["zsrc"] + + @zsrc.setter + def zsrc(self, val): + self["zsrc"] = val + + @property + def type(self): + return self._props["type"] + + @property + def _prop_descriptions(self): + return """\ + autocolorscale + Determines whether the colorscale is a default palette + (`autocolorscale: true`) or the palette determined by + `colorscale`. In case `colorscale` is unspecified or + `autocolorscale` is true, the default palette will be + chosen according to whether numbers in the `color` + array are all positive, all negative or mixed. + coloraxis + Sets a reference to a shared color axis. References to + these shared color axes are "coloraxis", "coloraxis2", + "coloraxis3", etc. Settings for these shared color axes + are set in the layout, under `layout.coloraxis`, + `layout.coloraxis2`, etc. Note that multiple color + scales can be linked to the same color axis. + colorbar + :class:`plotly.graph_objects.choropleth.ColorBar` + instance or dict with compatible properties + colorscale + Sets the colorscale. The colorscale must be an array + containing arrays mapping a normalized value to an rgb, + rgba, hex, hsl, hsv, or named color string. At minimum, + a mapping for the lowest (0) and highest (1) values are + required. For example, `[[0, 'rgb(0,0,255)'], [1, + 'rgb(255,0,0)']]`. To control the bounds of the + colorscale in color space, use `zmin` and `zmax`. + Alternatively, `colorscale` may be a palette name + string of the following list: Blackbody,Bluered,Blues,C + ividis,Earth,Electric,Greens,Greys,Hot,Jet,Picnic,Portl + and,Rainbow,RdBu,Reds,Viridis,YlGnBu,YlOrRd. + customdata + Assigns extra data each datum. This may be useful when + listening to hover, click and selection events. Note + that, "scatter" traces also appends customdata items in + the markers DOM elements + customdatasrc + Sets the source reference on Chart Studio Cloud for + `customdata`. + featureidkey + Sets the key in GeoJSON features which is used as id to + match the items included in the `locations` array. Only + has an effect when `geojson` is set. Support nested + property, for example "properties.name". + geo + Sets a reference between this trace's geospatial + coordinates and a geographic map. If "geo" (the default + value), the geospatial coordinates refer to + `layout.geo`. If "geo2", the geospatial coordinates + refer to `layout.geo2`, and so on. + geojson + Sets optional GeoJSON data associated with this trace. + If not given, the features on the base map are used. It + can be set as a valid GeoJSON object or as a URL + string. Note that we only accept GeoJSONs of type + "FeatureCollection" or "Feature" with geometries of + type "Polygon" or "MultiPolygon". + hoverinfo + Determines which trace information appear on hover. If + `none` or `skip` are set, no information is displayed + upon hovering. But, if `none` is set, click and hover + events are still fired. + hoverinfosrc + Sets the source reference on Chart Studio Cloud for + `hoverinfo`. + hoverlabel + :class:`plotly.graph_objects.choropleth.Hoverlabel` + instance or dict with compatible properties + hovertemplate + Template string used for rendering the information that + appear on hover box. Note that this will override + `hoverinfo`. Variables are inserted using %{variable}, + for example "y: %{y}" as well as %{xother}, {%_xother}, + {%_xother_}, {%xother_}. When showing info for several + points, "xother" will be added to those with different + x positions from the first point. An underscore before + or after "(x|y)other" will add a space on that side, + only when this field is shown. Numbers are formatted + using d3-format's syntax %{variable:d3-format}, for + example "Price: %{y:$.2f}". + https://github.com/d3/d3-format/tree/v1.4.5#d3-format + for details on the formatting syntax. Dates are + formatted using d3-time-format's syntax + %{variable|d3-time-format}, for example "Day: + %{2019-01-01|%A}". https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format for details on the + date formatting syntax. Variables that can't be found + will be replaced with the specifier. For example, a + template of "data: %{x}, %{y}" will result in a value + of "data: 1, %{y}" if x is 1 and y is missing. + Variables with an undefined value will be replaced with + the fallback value. The variables available in + `hovertemplate` are the ones emitted as event data + described at this link + https://plotly.com/javascript/plotlyjs-events/#event- + data. Additionally, all attributes that can be + specified per-point (the ones that are `arrayOk: true`) + are available. Anything contained in tag `` is + displayed in the secondary box, for example + `%{fullData.name}`. To hide the + secondary box completely, use an empty tag + ``. + hovertemplatefallback + Fallback string that's displayed when a variable + referenced in a template is missing. If the boolean + value 'false' is passed in, the specifier with the + missing variable will be displayed. + hovertemplatesrc + Sets the source reference on Chart Studio Cloud for + `hovertemplate`. + hovertext + Same as `text`. + hovertextsrc + Sets the source reference on Chart Studio Cloud for + `hovertext`. + ids + Assigns id labels to each datum. These ids for object + constancy of data points during animation. Should be an + array of strings, not numbers or any other type. + idssrc + Sets the source reference on Chart Studio Cloud for + `ids`. + legend + Sets the reference to a legend to show this trace in. + References to these legends are "legend", "legend2", + "legend3", etc. Settings for these legends are set in + the layout, under `layout.legend`, `layout.legend2`, + etc. + legendgroup + Sets the legend group for this trace. Traces and shapes + part of the same legend group hide/show at the same + time when toggling legend items. + legendgrouptitle + :class:`plotly.graph_objects.choropleth.Legendgrouptitl + e` instance or dict with compatible properties + legendrank + Sets the legend rank for this trace. Items and groups + with smaller ranks are presented on top/left side while + with "reversed" `legend.traceorder` they are on + bottom/right side. The default legendrank is 1000, so + that you can use ranks less than 1000 to place certain + items before all unranked items, and ranks greater than + 1000 to go after all unranked items. When having + unranked or equal rank items shapes would be displayed + after traces i.e. according to their order in data and + layout. + legendwidth + Sets the width (in px or fraction) of the legend for + this trace. + locationmode + The library used by the *country names* `locationmode` + option is changing in an upcoming version. Country + names in existing plots may not work in the new + version. Determines the set of locations used to match + entries in `locations` to regions on the map. Values + "ISO-3", "USA-states", *country names* correspond to + features on the base map and value "geojson-id" + corresponds to features from a custom GeoJSON linked to + the `geojson` attribute. + locations + Sets the coordinates via location IDs or names. See + `locationmode` for more info. + locationssrc + Sets the source reference on Chart Studio Cloud for + `locations`. + marker + :class:`plotly.graph_objects.choropleth.Marker` + instance or dict with compatible properties + meta + Assigns extra meta information associated with this + trace that can be used in various text attributes. + Attributes such as trace `name`, graph, axis and + colorbar `title.text`, annotation `text` + `rangeselector`, `updatemenues` and `sliders` `label` + text all support `meta`. To access the trace `meta` + values in an attribute in the same trace, simply use + `%{meta[i]}` where `i` is the index or key of the + `meta` item in question. To access trace `meta` in + layout attributes, use `%{data[n[.meta[i]}` where `i` + is the index or key of the `meta` and `n` is the trace + index. + metasrc + Sets the source reference on Chart Studio Cloud for + `meta`. + name + Sets the trace name. The trace name appears as the + legend item and on hover. + reversescale + Reverses the color mapping if true. If true, `zmin` + will correspond to the last color in the array and + `zmax` will correspond to the first color. + selected + :class:`plotly.graph_objects.choropleth.Selected` + instance or dict with compatible properties + selectedpoints + Array containing integer indices of selected points. + Has an effect only for traces that support selections. + Note that an empty array means an empty selection where + the `unselected` are turned on for all points, whereas, + any other non-array values means no selection all where + the `selected` and `unselected` styles have no effect. + showlegend + Determines whether or not an item corresponding to this + trace is shown in the legend. + showscale + Determines whether or not a colorbar is displayed for + this trace. + stream + :class:`plotly.graph_objects.choropleth.Stream` + instance or dict with compatible properties + text + Sets the text elements associated with each location. + textsrc + Sets the source reference on Chart Studio Cloud for + `text`. + uid + Assign an id to this trace, Use this to provide object + constancy between traces during animations and + transitions. + uirevision + Controls persistence of some user-driven changes to the + trace: `constraintrange` in `parcoords` traces, as well + as some `editable: true` modifications such as `name` + and `colorbar.title`. Defaults to `layout.uirevision`. + Note that other user-driven trace attribute changes are + controlled by `layout` attributes: `trace.visible` is + controlled by `layout.legend.uirevision`, + `selectedpoints` is controlled by + `layout.selectionrevision`, and `colorbar.(x|y)` + (accessible with `config: {editable: true}`) is + controlled by `layout.editrevision`. Trace changes are + tracked by `uid`, which only falls back on trace index + if no `uid` is provided. So if your app can add/remove + traces before the end of the `data` array, such that + the same trace has a different index, you can still + preserve user-driven changes if you give each trace a + `uid` that stays with it as it moves. + unselected + :class:`plotly.graph_objects.choropleth.Unselected` + instance or dict with compatible properties + visible + Determines whether or not this trace is visible. If + "legendonly", the trace is not drawn, but can appear as + a legend item (provided that the legend itself is + visible). + z + Sets the color values. + zauto + Determines whether or not the color domain is computed + with respect to the input data (here in `z`) or the + bounds set in `zmin` and `zmax` Defaults to `false` + when `zmin` and `zmax` are set by the user. + zmax + Sets the upper bound of the color domain. Value should + have the same units as in `z` and if set, `zmin` must + be set as well. + zmid + Sets the mid-point of the color domain by scaling + `zmin` and/or `zmax` to be equidistant to this point. + Value should have the same units as in `z`. Has no + effect when `zauto` is `false`. + zmin + Sets the lower bound of the color domain. Value should + have the same units as in `z` and if set, `zmax` must + be set as well. + zsrc + Sets the source reference on Chart Studio Cloud for + `z`. + """ + + def __init__( + self, + arg=None, + autocolorscale=None, + coloraxis=None, + colorbar=None, + colorscale=None, + customdata=None, + customdatasrc=None, + featureidkey=None, + geo=None, + geojson=None, + hoverinfo=None, + hoverinfosrc=None, + hoverlabel=None, + hovertemplate=None, + hovertemplatefallback=None, + hovertemplatesrc=None, + hovertext=None, + hovertextsrc=None, + ids=None, + idssrc=None, + legend=None, + legendgroup=None, + legendgrouptitle=None, + legendrank=None, + legendwidth=None, + locationmode=None, + locations=None, + locationssrc=None, + marker=None, + meta=None, + metasrc=None, + name=None, + reversescale=None, + selected=None, + selectedpoints=None, + showlegend=None, + showscale=None, + stream=None, + text=None, + textsrc=None, + uid=None, + uirevision=None, + unselected=None, + visible=None, + z=None, + zauto=None, + zmax=None, + zmid=None, + zmin=None, + zsrc=None, + **kwargs, + ): + """ + Construct a new Choropleth object + + The data that describes the choropleth value-to-color mapping + is set in `z`. The geographic locations corresponding to each + value in `z` are set in `locations`. + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of :class:`plotly.graph_objs.Choropleth` + autocolorscale + Determines whether the colorscale is a default palette + (`autocolorscale: true`) or the palette determined by + `colorscale`. In case `colorscale` is unspecified or + `autocolorscale` is true, the default palette will be + chosen according to whether numbers in the `color` + array are all positive, all negative or mixed. + coloraxis + Sets a reference to a shared color axis. References to + these shared color axes are "coloraxis", "coloraxis2", + "coloraxis3", etc. Settings for these shared color axes + are set in the layout, under `layout.coloraxis`, + `layout.coloraxis2`, etc. Note that multiple color + scales can be linked to the same color axis. + colorbar + :class:`plotly.graph_objects.choropleth.ColorBar` + instance or dict with compatible properties + colorscale + Sets the colorscale. The colorscale must be an array + containing arrays mapping a normalized value to an rgb, + rgba, hex, hsl, hsv, or named color string. At minimum, + a mapping for the lowest (0) and highest (1) values are + required. For example, `[[0, 'rgb(0,0,255)'], [1, + 'rgb(255,0,0)']]`. To control the bounds of the + colorscale in color space, use `zmin` and `zmax`. + Alternatively, `colorscale` may be a palette name + string of the following list: Blackbody,Bluered,Blues,C + ividis,Earth,Electric,Greens,Greys,Hot,Jet,Picnic,Portl + and,Rainbow,RdBu,Reds,Viridis,YlGnBu,YlOrRd. + customdata + Assigns extra data each datum. This may be useful when + listening to hover, click and selection events. Note + that, "scatter" traces also appends customdata items in + the markers DOM elements + customdatasrc + Sets the source reference on Chart Studio Cloud for + `customdata`. + featureidkey + Sets the key in GeoJSON features which is used as id to + match the items included in the `locations` array. Only + has an effect when `geojson` is set. Support nested + property, for example "properties.name". + geo + Sets a reference between this trace's geospatial + coordinates and a geographic map. If "geo" (the default + value), the geospatial coordinates refer to + `layout.geo`. If "geo2", the geospatial coordinates + refer to `layout.geo2`, and so on. + geojson + Sets optional GeoJSON data associated with this trace. + If not given, the features on the base map are used. It + can be set as a valid GeoJSON object or as a URL + string. Note that we only accept GeoJSONs of type + "FeatureCollection" or "Feature" with geometries of + type "Polygon" or "MultiPolygon". + hoverinfo + Determines which trace information appear on hover. If + `none` or `skip` are set, no information is displayed + upon hovering. But, if `none` is set, click and hover + events are still fired. + hoverinfosrc + Sets the source reference on Chart Studio Cloud for + `hoverinfo`. + hoverlabel + :class:`plotly.graph_objects.choropleth.Hoverlabel` + instance or dict with compatible properties + hovertemplate + Template string used for rendering the information that + appear on hover box. Note that this will override + `hoverinfo`. Variables are inserted using %{variable}, + for example "y: %{y}" as well as %{xother}, {%_xother}, + {%_xother_}, {%xother_}. When showing info for several + points, "xother" will be added to those with different + x positions from the first point. An underscore before + or after "(x|y)other" will add a space on that side, + only when this field is shown. Numbers are formatted + using d3-format's syntax %{variable:d3-format}, for + example "Price: %{y:$.2f}". + https://github.com/d3/d3-format/tree/v1.4.5#d3-format + for details on the formatting syntax. Dates are + formatted using d3-time-format's syntax + %{variable|d3-time-format}, for example "Day: + %{2019-01-01|%A}". https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format for details on the + date formatting syntax. Variables that can't be found + will be replaced with the specifier. For example, a + template of "data: %{x}, %{y}" will result in a value + of "data: 1, %{y}" if x is 1 and y is missing. + Variables with an undefined value will be replaced with + the fallback value. The variables available in + `hovertemplate` are the ones emitted as event data + described at this link + https://plotly.com/javascript/plotlyjs-events/#event- + data. Additionally, all attributes that can be + specified per-point (the ones that are `arrayOk: true`) + are available. Anything contained in tag `` is + displayed in the secondary box, for example + `%{fullData.name}`. To hide the + secondary box completely, use an empty tag + ``. + hovertemplatefallback + Fallback string that's displayed when a variable + referenced in a template is missing. If the boolean + value 'false' is passed in, the specifier with the + missing variable will be displayed. + hovertemplatesrc + Sets the source reference on Chart Studio Cloud for + `hovertemplate`. + hovertext + Same as `text`. + hovertextsrc + Sets the source reference on Chart Studio Cloud for + `hovertext`. + ids + Assigns id labels to each datum. These ids for object + constancy of data points during animation. Should be an + array of strings, not numbers or any other type. + idssrc + Sets the source reference on Chart Studio Cloud for + `ids`. + legend + Sets the reference to a legend to show this trace in. + References to these legends are "legend", "legend2", + "legend3", etc. Settings for these legends are set in + the layout, under `layout.legend`, `layout.legend2`, + etc. + legendgroup + Sets the legend group for this trace. Traces and shapes + part of the same legend group hide/show at the same + time when toggling legend items. + legendgrouptitle + :class:`plotly.graph_objects.choropleth.Legendgrouptitl + e` instance or dict with compatible properties + legendrank + Sets the legend rank for this trace. Items and groups + with smaller ranks are presented on top/left side while + with "reversed" `legend.traceorder` they are on + bottom/right side. The default legendrank is 1000, so + that you can use ranks less than 1000 to place certain + items before all unranked items, and ranks greater than + 1000 to go after all unranked items. When having + unranked or equal rank items shapes would be displayed + after traces i.e. according to their order in data and + layout. + legendwidth + Sets the width (in px or fraction) of the legend for + this trace. + locationmode + The library used by the *country names* `locationmode` + option is changing in an upcoming version. Country + names in existing plots may not work in the new + version. Determines the set of locations used to match + entries in `locations` to regions on the map. Values + "ISO-3", "USA-states", *country names* correspond to + features on the base map and value "geojson-id" + corresponds to features from a custom GeoJSON linked to + the `geojson` attribute. + locations + Sets the coordinates via location IDs or names. See + `locationmode` for more info. + locationssrc + Sets the source reference on Chart Studio Cloud for + `locations`. + marker + :class:`plotly.graph_objects.choropleth.Marker` + instance or dict with compatible properties + meta + Assigns extra meta information associated with this + trace that can be used in various text attributes. + Attributes such as trace `name`, graph, axis and + colorbar `title.text`, annotation `text` + `rangeselector`, `updatemenues` and `sliders` `label` + text all support `meta`. To access the trace `meta` + values in an attribute in the same trace, simply use + `%{meta[i]}` where `i` is the index or key of the + `meta` item in question. To access trace `meta` in + layout attributes, use `%{data[n[.meta[i]}` where `i` + is the index or key of the `meta` and `n` is the trace + index. + metasrc + Sets the source reference on Chart Studio Cloud for + `meta`. + name + Sets the trace name. The trace name appears as the + legend item and on hover. + reversescale + Reverses the color mapping if true. If true, `zmin` + will correspond to the last color in the array and + `zmax` will correspond to the first color. + selected + :class:`plotly.graph_objects.choropleth.Selected` + instance or dict with compatible properties + selectedpoints + Array containing integer indices of selected points. + Has an effect only for traces that support selections. + Note that an empty array means an empty selection where + the `unselected` are turned on for all points, whereas, + any other non-array values means no selection all where + the `selected` and `unselected` styles have no effect. + showlegend + Determines whether or not an item corresponding to this + trace is shown in the legend. + showscale + Determines whether or not a colorbar is displayed for + this trace. + stream + :class:`plotly.graph_objects.choropleth.Stream` + instance or dict with compatible properties + text + Sets the text elements associated with each location. + textsrc + Sets the source reference on Chart Studio Cloud for + `text`. + uid + Assign an id to this trace, Use this to provide object + constancy between traces during animations and + transitions. + uirevision + Controls persistence of some user-driven changes to the + trace: `constraintrange` in `parcoords` traces, as well + as some `editable: true` modifications such as `name` + and `colorbar.title`. Defaults to `layout.uirevision`. + Note that other user-driven trace attribute changes are + controlled by `layout` attributes: `trace.visible` is + controlled by `layout.legend.uirevision`, + `selectedpoints` is controlled by + `layout.selectionrevision`, and `colorbar.(x|y)` + (accessible with `config: {editable: true}`) is + controlled by `layout.editrevision`. Trace changes are + tracked by `uid`, which only falls back on trace index + if no `uid` is provided. So if your app can add/remove + traces before the end of the `data` array, such that + the same trace has a different index, you can still + preserve user-driven changes if you give each trace a + `uid` that stays with it as it moves. + unselected + :class:`plotly.graph_objects.choropleth.Unselected` + instance or dict with compatible properties + visible + Determines whether or not this trace is visible. If + "legendonly", the trace is not drawn, but can appear as + a legend item (provided that the legend itself is + visible). + z + Sets the color values. + zauto + Determines whether or not the color domain is computed + with respect to the input data (here in `z`) or the + bounds set in `zmin` and `zmax` Defaults to `false` + when `zmin` and `zmax` are set by the user. + zmax + Sets the upper bound of the color domain. Value should + have the same units as in `z` and if set, `zmin` must + be set as well. + zmid + Sets the mid-point of the color domain by scaling + `zmin` and/or `zmax` to be equidistant to this point. + Value should have the same units as in `z`. Has no + effect when `zauto` is `false`. + zmin + Sets the lower bound of the color domain. Value should + have the same units as in `z` and if set, `zmax` must + be set as well. + zsrc + Sets the source reference on Chart Studio Cloud for + `z`. + + Returns + ------- + Choropleth + """ + super().__init__("choropleth") + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + if arg is None: + arg = {} + elif isinstance(arg, self.__class__): + arg = arg.to_plotly_json() + elif isinstance(arg, dict): + arg = _copy.copy(arg) + else: + raise ValueError("""\ +The first argument to the plotly.graph_objs.Choropleth +constructor must be a dict or +an instance of :class:`plotly.graph_objs.Choropleth`""") + + if locationmode == "country names" and kwargs.get("_validate"): + warnings.warn( + "The library used by the *country names* `locationmode` option is changing in an upcoming version. " + "Country names in existing plots may not work in the new version. " + "To ensure consistent behavior, consider setting `locationmode` to *ISO-3*.", + DeprecationWarning, + stacklevel=5, + ) + + self._skip_invalid = kwargs.pop("skip_invalid", False) + self._validate = kwargs.pop("_validate", True) + + self._set_property("autocolorscale", arg, autocolorscale) + self._set_property("coloraxis", arg, coloraxis) + self._set_property("colorbar", arg, colorbar) + self._set_property("colorscale", arg, colorscale) + self._set_property("customdata", arg, customdata) + self._set_property("customdatasrc", arg, customdatasrc) + self._set_property("featureidkey", arg, featureidkey) + self._set_property("geo", arg, geo) + self._set_property("geojson", arg, geojson) + self._set_property("hoverinfo", arg, hoverinfo) + self._set_property("hoverinfosrc", arg, hoverinfosrc) + self._set_property("hoverlabel", arg, hoverlabel) + self._set_property("hovertemplate", arg, hovertemplate) + self._set_property("hovertemplatefallback", arg, hovertemplatefallback) + self._set_property("hovertemplatesrc", arg, hovertemplatesrc) + self._set_property("hovertext", arg, hovertext) + self._set_property("hovertextsrc", arg, hovertextsrc) + self._set_property("ids", arg, ids) + self._set_property("idssrc", arg, idssrc) + self._set_property("legend", arg, legend) + self._set_property("legendgroup", arg, legendgroup) + self._set_property("legendgrouptitle", arg, legendgrouptitle) + self._set_property("legendrank", arg, legendrank) + self._set_property("legendwidth", arg, legendwidth) + self._set_property("locationmode", arg, locationmode) + self._set_property("locations", arg, locations) + self._set_property("locationssrc", arg, locationssrc) + self._set_property("marker", arg, marker) + self._set_property("meta", arg, meta) + self._set_property("metasrc", arg, metasrc) + self._set_property("name", arg, name) + self._set_property("reversescale", arg, reversescale) + self._set_property("selected", arg, selected) + self._set_property("selectedpoints", arg, selectedpoints) + self._set_property("showlegend", arg, showlegend) + self._set_property("showscale", arg, showscale) + self._set_property("stream", arg, stream) + self._set_property("text", arg, text) + self._set_property("textsrc", arg, textsrc) + self._set_property("uid", arg, uid) + self._set_property("uirevision", arg, uirevision) + self._set_property("unselected", arg, unselected) + self._set_property("visible", arg, visible) + self._set_property("z", arg, z) + self._set_property("zauto", arg, zauto) + self._set_property("zmax", arg, zmax) + self._set_property("zmid", arg, zmid) + self._set_property("zmin", arg, zmin) + self._set_property("zsrc", arg, zsrc) + + self._props["type"] = "choropleth" + arg.pop("type", None) + self._process_kwargs(**dict(arg, **kwargs)) + self._skip_invalid = False diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/_choroplethmap.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/_choroplethmap.py new file mode 100644 index 0000000000000000000000000000000000000000..eb548811ab49a719b7adf33e28302e3f9a22ee75 --- /dev/null +++ b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/_choroplethmap.py @@ -0,0 +1,1796 @@ +# --- THIS FILE IS AUTO-GENERATED --- +# Modifications will be overwitten the next time code generation run. + +from plotly.basedatatypes import BaseTraceType as _BaseTraceType +import copy as _copy + + +class Choroplethmap(_BaseTraceType): + _parent_path_str = "" + _path_str = "choroplethmap" + _valid_props = { + "autocolorscale", + "below", + "coloraxis", + "colorbar", + "colorscale", + "customdata", + "customdatasrc", + "featureidkey", + "geojson", + "hoverinfo", + "hoverinfosrc", + "hoverlabel", + "hovertemplate", + "hovertemplatefallback", + "hovertemplatesrc", + "hovertext", + "hovertextsrc", + "ids", + "idssrc", + "legend", + "legendgroup", + "legendgrouptitle", + "legendrank", + "legendwidth", + "locations", + "locationssrc", + "marker", + "meta", + "metasrc", + "name", + "reversescale", + "selected", + "selectedpoints", + "showlegend", + "showscale", + "stream", + "subplot", + "text", + "textsrc", + "type", + "uid", + "uirevision", + "unselected", + "visible", + "z", + "zauto", + "zmax", + "zmid", + "zmin", + "zsrc", + } + + @property + def autocolorscale(self): + """ + Determines whether the colorscale is a default palette + (`autocolorscale: true`) or the palette determined by + `colorscale`. In case `colorscale` is unspecified or + `autocolorscale` is true, the default palette will be chosen + according to whether numbers in the `color` array are all + positive, all negative or mixed. + + The 'autocolorscale' property is a boolean and must be specified as: + - A boolean value: True or False + + Returns + ------- + bool + """ + return self["autocolorscale"] + + @autocolorscale.setter + def autocolorscale(self, val): + self["autocolorscale"] = val + + @property + def below(self): + """ + Determines if the choropleth polygons will be inserted before + the layer with the specified ID. By default, choroplethmap + traces are placed above the water layers. If set to '', the + layer will be inserted above every existing layer. + + The 'below' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["below"] + + @below.setter + def below(self, val): + self["below"] = val + + @property + def coloraxis(self): + """ + Sets a reference to a shared color axis. References to these + shared color axes are "coloraxis", "coloraxis2", "coloraxis3", + etc. Settings for these shared color axes are set in the + layout, under `layout.coloraxis`, `layout.coloraxis2`, etc. + Note that multiple color scales can be linked to the same color + axis. + + The 'coloraxis' property is an identifier of a particular + subplot, of type 'coloraxis', that may be specified as: + - the string 'coloraxis' optionally followed by an integer >= 1 + (e.g. 'coloraxis', 'coloraxis1', 'coloraxis2', 'coloraxis3', etc.) + + Returns + ------- + str + """ + return self["coloraxis"] + + @coloraxis.setter + def coloraxis(self, val): + self["coloraxis"] = val + + @property + def colorbar(self): + """ + The 'colorbar' property is an instance of ColorBar + that may be specified as: + - An instance of :class:`plotly.graph_objs.choroplethmap.ColorBar` + - A dict of string/value properties that will be passed + to the ColorBar constructor + + Returns + ------- + plotly.graph_objs.choroplethmap.ColorBar + """ + return self["colorbar"] + + @colorbar.setter + def colorbar(self, val): + self["colorbar"] = val + + @property + def colorscale(self): + """ + Sets the colorscale. The colorscale must be an array containing + arrays mapping a normalized value to an rgb, rgba, hex, hsl, + hsv, or named color string. At minimum, a mapping for the + lowest (0) and highest (1) values are required. For example, + `[[0, 'rgb(0,0,255)'], [1, 'rgb(255,0,0)']]`. To control the + bounds of the colorscale in color space, use `zmin` and `zmax`. + Alternatively, `colorscale` may be a palette name string of the + following list: Blackbody,Bluered,Blues,Cividis,Earth,Electric, + Greens,Greys,Hot,Jet,Picnic,Portland,Rainbow,RdBu,Reds,Viridis, + YlGnBu,YlOrRd. + + The 'colorscale' property is a colorscale and may be + specified as: + - A list of colors that will be spaced evenly to create the colorscale. + Many predefined colorscale lists are included in the sequential, diverging, + and cyclical modules in the plotly.colors package. + - A list of 2-element lists where the first element is the + normalized color level value (starting at 0 and ending at 1), + and the second item is a valid color string. + (e.g. [[0, 'green'], [0.5, 'red'], [1.0, 'rgb(0, 0, 255)']]) + - One of the following named colorscales: + ['aggrnyl', 'agsunset', 'algae', 'amp', 'armyrose', 'balance', + 'blackbody', 'bluered', 'blues', 'blugrn', 'bluyl', 'brbg', + 'brwnyl', 'bugn', 'bupu', 'burg', 'burgyl', 'cividis', 'curl', + 'darkmint', 'deep', 'delta', 'dense', 'earth', 'edge', 'electric', + 'emrld', 'fall', 'geyser', 'gnbu', 'gray', 'greens', 'greys', + 'haline', 'hot', 'hsv', 'ice', 'icefire', 'inferno', 'jet', + 'magenta', 'magma', 'matter', 'mint', 'mrybm', 'mygbm', 'oranges', + 'orrd', 'oryel', 'oxy', 'peach', 'phase', 'picnic', 'pinkyl', + 'piyg', 'plasma', 'plotly3', 'portland', 'prgn', 'pubu', 'pubugn', + 'puor', 'purd', 'purp', 'purples', 'purpor', 'rainbow', 'rdbu', + 'rdgy', 'rdpu', 'rdylbu', 'rdylgn', 'redor', 'reds', 'solar', + 'spectral', 'speed', 'sunset', 'sunsetdark', 'teal', 'tealgrn', + 'tealrose', 'tempo', 'temps', 'thermal', 'tropic', 'turbid', + 'turbo', 'twilight', 'viridis', 'ylgn', 'ylgnbu', 'ylorbr', + 'ylorrd']. + Appending '_r' to a named colorscale reverses it. + + Returns + ------- + str + """ + return self["colorscale"] + + @colorscale.setter + def colorscale(self, val): + self["colorscale"] = val + + @property + def customdata(self): + """ + Assigns extra data each datum. This may be useful when + listening to hover, click and selection events. Note that, + "scatter" traces also appends customdata items in the markers + DOM elements + + The 'customdata' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["customdata"] + + @customdata.setter + def customdata(self, val): + self["customdata"] = val + + @property + def customdatasrc(self): + """ + Sets the source reference on Chart Studio Cloud for + `customdata`. + + The 'customdatasrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["customdatasrc"] + + @customdatasrc.setter + def customdatasrc(self, val): + self["customdatasrc"] = val + + @property + def featureidkey(self): + """ + Sets the key in GeoJSON features which is used as id to match + the items included in the `locations` array. Support nested + property, for example "properties.name". + + The 'featureidkey' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["featureidkey"] + + @featureidkey.setter + def featureidkey(self, val): + self["featureidkey"] = val + + @property + def geojson(self): + """ + Sets the GeoJSON data associated with this trace. It can be set + as a valid GeoJSON object or as a URL string. Note that we only + accept GeoJSONs of type "FeatureCollection" or "Feature" with + geometries of type "Polygon" or "MultiPolygon". + + The 'geojson' property accepts values of any type + + Returns + ------- + Any + """ + return self["geojson"] + + @geojson.setter + def geojson(self, val): + self["geojson"] = val + + @property + def hoverinfo(self): + """ + Determines which trace information appear on hover. If `none` + or `skip` are set, no information is displayed upon hovering. + But, if `none` is set, click and hover events are still fired. + + The 'hoverinfo' property is a flaglist and may be specified + as a string containing: + - Any combination of ['location', 'z', 'text', 'name'] joined with '+' characters + (e.g. 'location+z') + OR exactly one of ['all', 'none', 'skip'] (e.g. 'skip') + - A list or array of the above + + Returns + ------- + Any|numpy.ndarray + """ + return self["hoverinfo"] + + @hoverinfo.setter + def hoverinfo(self, val): + self["hoverinfo"] = val + + @property + def hoverinfosrc(self): + """ + Sets the source reference on Chart Studio Cloud for + `hoverinfo`. + + The 'hoverinfosrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["hoverinfosrc"] + + @hoverinfosrc.setter + def hoverinfosrc(self, val): + self["hoverinfosrc"] = val + + @property + def hoverlabel(self): + """ + The 'hoverlabel' property is an instance of Hoverlabel + that may be specified as: + - An instance of :class:`plotly.graph_objs.choroplethmap.Hoverlabel` + - A dict of string/value properties that will be passed + to the Hoverlabel constructor + + Returns + ------- + plotly.graph_objs.choroplethmap.Hoverlabel + """ + return self["hoverlabel"] + + @hoverlabel.setter + def hoverlabel(self, val): + self["hoverlabel"] = val + + @property + def hovertemplate(self): + """ + Template string used for rendering the information that appear + on hover box. Note that this will override `hoverinfo`. + Variables are inserted using %{variable}, for example "y: %{y}" + as well as %{xother}, {%_xother}, {%_xother_}, {%xother_}. When + showing info for several points, "xother" will be added to + those with different x positions from the first point. An + underscore before or after "(x|y)other" will add a space on + that side, only when this field is shown. Numbers are formatted + using d3-format's syntax %{variable:d3-format}, for example + "Price: %{y:$.2f}". + https://github.com/d3/d3-format/tree/v1.4.5#d3-format for + details on the formatting syntax. Dates are formatted using + d3-time-format's syntax %{variable|d3-time-format}, for example + "Day: %{2019-01-01|%A}". https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format for details on the date + formatting syntax. Variables that can't be found will be + replaced with the specifier. For example, a template of "data: + %{x}, %{y}" will result in a value of "data: 1, %{y}" if x is 1 + and y is missing. Variables with an undefined value will be + replaced with the fallback value. The variables available in + `hovertemplate` are the ones emitted as event data described at + this link https://plotly.com/javascript/plotlyjs-events/#event- + data. Additionally, all attributes that can be specified per- + point (the ones that are `arrayOk: true`) are available. + Finally, the template string has access to variable + `properties` Anything contained in tag `` is displayed + in the secondary box, for example + `%{fullData.name}`. To hide the secondary box + completely, use an empty tag ``. + + The 'hovertemplate' property is a string and must be specified as: + - A string + - A number that will be converted to a string + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["hovertemplate"] + + @hovertemplate.setter + def hovertemplate(self, val): + self["hovertemplate"] = val + + @property + def hovertemplatefallback(self): + """ + Fallback string that's displayed when a variable referenced in + a template is missing. If the boolean value 'false' is passed + in, the specifier with the missing variable will be displayed. + + The 'hovertemplatefallback' property accepts values of any type + + Returns + ------- + Any + """ + return self["hovertemplatefallback"] + + @hovertemplatefallback.setter + def hovertemplatefallback(self, val): + self["hovertemplatefallback"] = val + + @property + def hovertemplatesrc(self): + """ + Sets the source reference on Chart Studio Cloud for + `hovertemplate`. + + The 'hovertemplatesrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["hovertemplatesrc"] + + @hovertemplatesrc.setter + def hovertemplatesrc(self, val): + self["hovertemplatesrc"] = val + + @property + def hovertext(self): + """ + Same as `text`. + + The 'hovertext' property is a string and must be specified as: + - A string + - A number that will be converted to a string + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["hovertext"] + + @hovertext.setter + def hovertext(self, val): + self["hovertext"] = val + + @property + def hovertextsrc(self): + """ + Sets the source reference on Chart Studio Cloud for + `hovertext`. + + The 'hovertextsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["hovertextsrc"] + + @hovertextsrc.setter + def hovertextsrc(self, val): + self["hovertextsrc"] = val + + @property + def ids(self): + """ + Assigns id labels to each datum. These ids for object constancy + of data points during animation. Should be an array of strings, + not numbers or any other type. + + The 'ids' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["ids"] + + @ids.setter + def ids(self, val): + self["ids"] = val + + @property + def idssrc(self): + """ + Sets the source reference on Chart Studio Cloud for `ids`. + + The 'idssrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["idssrc"] + + @idssrc.setter + def idssrc(self, val): + self["idssrc"] = val + + @property + def legend(self): + """ + Sets the reference to a legend to show this trace in. + References to these legends are "legend", "legend2", "legend3", + etc. Settings for these legends are set in the layout, under + `layout.legend`, `layout.legend2`, etc. + + The 'legend' property is an identifier of a particular + subplot, of type 'legend', that may be specified as: + - the string 'legend' optionally followed by an integer >= 1 + (e.g. 'legend', 'legend1', 'legend2', 'legend3', etc.) + + Returns + ------- + str + """ + return self["legend"] + + @legend.setter + def legend(self, val): + self["legend"] = val + + @property + def legendgroup(self): + """ + Sets the legend group for this trace. Traces and shapes part of + the same legend group hide/show at the same time when toggling + legend items. + + The 'legendgroup' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["legendgroup"] + + @legendgroup.setter + def legendgroup(self, val): + self["legendgroup"] = val + + @property + def legendgrouptitle(self): + """ + The 'legendgrouptitle' property is an instance of Legendgrouptitle + that may be specified as: + - An instance of :class:`plotly.graph_objs.choroplethmap.Legendgrouptitle` + - A dict of string/value properties that will be passed + to the Legendgrouptitle constructor + + Returns + ------- + plotly.graph_objs.choroplethmap.Legendgrouptitle + """ + return self["legendgrouptitle"] + + @legendgrouptitle.setter + def legendgrouptitle(self, val): + self["legendgrouptitle"] = val + + @property + def legendrank(self): + """ + Sets the legend rank for this trace. Items and groups with + smaller ranks are presented on top/left side while with + "reversed" `legend.traceorder` they are on bottom/right side. + The default legendrank is 1000, so that you can use ranks less + than 1000 to place certain items before all unranked items, and + ranks greater than 1000 to go after all unranked items. When + having unranked or equal rank items shapes would be displayed + after traces i.e. according to their order in data and layout. + + The 'legendrank' property is a number and may be specified as: + - An int or float + + Returns + ------- + int|float + """ + return self["legendrank"] + + @legendrank.setter + def legendrank(self, val): + self["legendrank"] = val + + @property + def legendwidth(self): + """ + Sets the width (in px or fraction) of the legend for this + trace. + + The 'legendwidth' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["legendwidth"] + + @legendwidth.setter + def legendwidth(self, val): + self["legendwidth"] = val + + @property + def locations(self): + """ + Sets which features found in "geojson" to plot using their + feature `id` field. + + The 'locations' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["locations"] + + @locations.setter + def locations(self, val): + self["locations"] = val + + @property + def locationssrc(self): + """ + Sets the source reference on Chart Studio Cloud for + `locations`. + + The 'locationssrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["locationssrc"] + + @locationssrc.setter + def locationssrc(self, val): + self["locationssrc"] = val + + @property + def marker(self): + """ + The 'marker' property is an instance of Marker + that may be specified as: + - An instance of :class:`plotly.graph_objs.choroplethmap.Marker` + - A dict of string/value properties that will be passed + to the Marker constructor + + Returns + ------- + plotly.graph_objs.choroplethmap.Marker + """ + return self["marker"] + + @marker.setter + def marker(self, val): + self["marker"] = val + + @property + def meta(self): + """ + Assigns extra meta information associated with this trace that + can be used in various text attributes. Attributes such as + trace `name`, graph, axis and colorbar `title.text`, annotation + `text` `rangeselector`, `updatemenues` and `sliders` `label` + text all support `meta`. To access the trace `meta` values in + an attribute in the same trace, simply use `%{meta[i]}` where + `i` is the index or key of the `meta` item in question. To + access trace `meta` in layout attributes, use + `%{data[n[.meta[i]}` where `i` is the index or key of the + `meta` and `n` is the trace index. + + The 'meta' property accepts values of any type + + Returns + ------- + Any|numpy.ndarray + """ + return self["meta"] + + @meta.setter + def meta(self, val): + self["meta"] = val + + @property + def metasrc(self): + """ + Sets the source reference on Chart Studio Cloud for `meta`. + + The 'metasrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["metasrc"] + + @metasrc.setter + def metasrc(self, val): + self["metasrc"] = val + + @property + def name(self): + """ + Sets the trace name. The trace name appears as the legend item + and on hover. + + The 'name' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["name"] + + @name.setter + def name(self, val): + self["name"] = val + + @property + def reversescale(self): + """ + Reverses the color mapping if true. If true, `zmin` will + correspond to the last color in the array and `zmax` will + correspond to the first color. + + The 'reversescale' property is a boolean and must be specified as: + - A boolean value: True or False + + Returns + ------- + bool + """ + return self["reversescale"] + + @reversescale.setter + def reversescale(self, val): + self["reversescale"] = val + + @property + def selected(self): + """ + The 'selected' property is an instance of Selected + that may be specified as: + - An instance of :class:`plotly.graph_objs.choroplethmap.Selected` + - A dict of string/value properties that will be passed + to the Selected constructor + + Returns + ------- + plotly.graph_objs.choroplethmap.Selected + """ + return self["selected"] + + @selected.setter + def selected(self, val): + self["selected"] = val + + @property + def selectedpoints(self): + """ + Array containing integer indices of selected points. Has an + effect only for traces that support selections. Note that an + empty array means an empty selection where the `unselected` are + turned on for all points, whereas, any other non-array values + means no selection all where the `selected` and `unselected` + styles have no effect. + + The 'selectedpoints' property accepts values of any type + + Returns + ------- + Any + """ + return self["selectedpoints"] + + @selectedpoints.setter + def selectedpoints(self, val): + self["selectedpoints"] = val + + @property + def showlegend(self): + """ + Determines whether or not an item corresponding to this trace + is shown in the legend. + + The 'showlegend' property is a boolean and must be specified as: + - A boolean value: True or False + + Returns + ------- + bool + """ + return self["showlegend"] + + @showlegend.setter + def showlegend(self, val): + self["showlegend"] = val + + @property + def showscale(self): + """ + Determines whether or not a colorbar is displayed for this + trace. + + The 'showscale' property is a boolean and must be specified as: + - A boolean value: True or False + + Returns + ------- + bool + """ + return self["showscale"] + + @showscale.setter + def showscale(self, val): + self["showscale"] = val + + @property + def stream(self): + """ + The 'stream' property is an instance of Stream + that may be specified as: + - An instance of :class:`plotly.graph_objs.choroplethmap.Stream` + - A dict of string/value properties that will be passed + to the Stream constructor + + Returns + ------- + plotly.graph_objs.choroplethmap.Stream + """ + return self["stream"] + + @stream.setter + def stream(self, val): + self["stream"] = val + + @property + def subplot(self): + """ + Sets a reference between this trace's data coordinates and a + map subplot. If "map" (the default value), the data refer to + `layout.map`. If "map2", the data refer to `layout.map2`, and + so on. + + The 'subplot' property is an identifier of a particular + subplot, of type 'map', that may be specified as: + - the string 'map' optionally followed by an integer >= 1 + (e.g. 'map', 'map1', 'map2', 'map3', etc.) + + Returns + ------- + str + """ + return self["subplot"] + + @subplot.setter + def subplot(self, val): + self["subplot"] = val + + @property + def text(self): + """ + Sets the text elements associated with each location. + + The 'text' property is a string and must be specified as: + - A string + - A number that will be converted to a string + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["text"] + + @text.setter + def text(self, val): + self["text"] = val + + @property + def textsrc(self): + """ + Sets the source reference on Chart Studio Cloud for `text`. + + The 'textsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["textsrc"] + + @textsrc.setter + def textsrc(self, val): + self["textsrc"] = val + + @property + def uid(self): + """ + Assign an id to this trace, Use this to provide object + constancy between traces during animations and transitions. + + The 'uid' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["uid"] + + @uid.setter + def uid(self, val): + self["uid"] = val + + @property + def uirevision(self): + """ + Controls persistence of some user-driven changes to the trace: + `constraintrange` in `parcoords` traces, as well as some + `editable: true` modifications such as `name` and + `colorbar.title`. Defaults to `layout.uirevision`. Note that + other user-driven trace attribute changes are controlled by + `layout` attributes: `trace.visible` is controlled by + `layout.legend.uirevision`, `selectedpoints` is controlled by + `layout.selectionrevision`, and `colorbar.(x|y)` (accessible + with `config: {editable: true}`) is controlled by + `layout.editrevision`. Trace changes are tracked by `uid`, + which only falls back on trace index if no `uid` is provided. + So if your app can add/remove traces before the end of the + `data` array, such that the same trace has a different index, + you can still preserve user-driven changes if you give each + trace a `uid` that stays with it as it moves. + + The 'uirevision' property accepts values of any type + + Returns + ------- + Any + """ + return self["uirevision"] + + @uirevision.setter + def uirevision(self, val): + self["uirevision"] = val + + @property + def unselected(self): + """ + The 'unselected' property is an instance of Unselected + that may be specified as: + - An instance of :class:`plotly.graph_objs.choroplethmap.Unselected` + - A dict of string/value properties that will be passed + to the Unselected constructor + + Returns + ------- + plotly.graph_objs.choroplethmap.Unselected + """ + return self["unselected"] + + @unselected.setter + def unselected(self, val): + self["unselected"] = val + + @property + def visible(self): + """ + Determines whether or not this trace is visible. If + "legendonly", the trace is not drawn, but can appear as a + legend item (provided that the legend itself is visible). + + The 'visible' property is an enumeration that may be specified as: + - One of the following enumeration values: + [True, False, 'legendonly'] + + Returns + ------- + Any + """ + return self["visible"] + + @visible.setter + def visible(self, val): + self["visible"] = val + + @property + def z(self): + """ + Sets the color values. + + The 'z' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["z"] + + @z.setter + def z(self, val): + self["z"] = val + + @property + def zauto(self): + """ + Determines whether or not the color domain is computed with + respect to the input data (here in `z`) or the bounds set in + `zmin` and `zmax` Defaults to `false` when `zmin` and `zmax` + are set by the user. + + The 'zauto' property is a boolean and must be specified as: + - A boolean value: True or False + + Returns + ------- + bool + """ + return self["zauto"] + + @zauto.setter + def zauto(self, val): + self["zauto"] = val + + @property + def zmax(self): + """ + Sets the upper bound of the color domain. Value should have the + same units as in `z` and if set, `zmin` must be set as well. + + The 'zmax' property is a number and may be specified as: + - An int or float + + Returns + ------- + int|float + """ + return self["zmax"] + + @zmax.setter + def zmax(self, val): + self["zmax"] = val + + @property + def zmid(self): + """ + Sets the mid-point of the color domain by scaling `zmin` and/or + `zmax` to be equidistant to this point. Value should have the + same units as in `z`. Has no effect when `zauto` is `false`. + + The 'zmid' property is a number and may be specified as: + - An int or float + + Returns + ------- + int|float + """ + return self["zmid"] + + @zmid.setter + def zmid(self, val): + self["zmid"] = val + + @property + def zmin(self): + """ + Sets the lower bound of the color domain. Value should have the + same units as in `z` and if set, `zmax` must be set as well. + + The 'zmin' property is a number and may be specified as: + - An int or float + + Returns + ------- + int|float + """ + return self["zmin"] + + @zmin.setter + def zmin(self, val): + self["zmin"] = val + + @property + def zsrc(self): + """ + Sets the source reference on Chart Studio Cloud for `z`. + + The 'zsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["zsrc"] + + @zsrc.setter + def zsrc(self, val): + self["zsrc"] = val + + @property + def type(self): + return self._props["type"] + + @property + def _prop_descriptions(self): + return """\ + autocolorscale + Determines whether the colorscale is a default palette + (`autocolorscale: true`) or the palette determined by + `colorscale`. In case `colorscale` is unspecified or + `autocolorscale` is true, the default palette will be + chosen according to whether numbers in the `color` + array are all positive, all negative or mixed. + below + Determines if the choropleth polygons will be inserted + before the layer with the specified ID. By default, + choroplethmap traces are placed above the water layers. + If set to '', the layer will be inserted above every + existing layer. + coloraxis + Sets a reference to a shared color axis. References to + these shared color axes are "coloraxis", "coloraxis2", + "coloraxis3", etc. Settings for these shared color axes + are set in the layout, under `layout.coloraxis`, + `layout.coloraxis2`, etc. Note that multiple color + scales can be linked to the same color axis. + colorbar + :class:`plotly.graph_objects.choroplethmap.ColorBar` + instance or dict with compatible properties + colorscale + Sets the colorscale. The colorscale must be an array + containing arrays mapping a normalized value to an rgb, + rgba, hex, hsl, hsv, or named color string. At minimum, + a mapping for the lowest (0) and highest (1) values are + required. For example, `[[0, 'rgb(0,0,255)'], [1, + 'rgb(255,0,0)']]`. To control the bounds of the + colorscale in color space, use `zmin` and `zmax`. + Alternatively, `colorscale` may be a palette name + string of the following list: Blackbody,Bluered,Blues,C + ividis,Earth,Electric,Greens,Greys,Hot,Jet,Picnic,Portl + and,Rainbow,RdBu,Reds,Viridis,YlGnBu,YlOrRd. + customdata + Assigns extra data each datum. This may be useful when + listening to hover, click and selection events. Note + that, "scatter" traces also appends customdata items in + the markers DOM elements + customdatasrc + Sets the source reference on Chart Studio Cloud for + `customdata`. + featureidkey + Sets the key in GeoJSON features which is used as id to + match the items included in the `locations` array. + Support nested property, for example "properties.name". + geojson + Sets the GeoJSON data associated with this trace. It + can be set as a valid GeoJSON object or as a URL + string. Note that we only accept GeoJSONs of type + "FeatureCollection" or "Feature" with geometries of + type "Polygon" or "MultiPolygon". + hoverinfo + Determines which trace information appear on hover. If + `none` or `skip` are set, no information is displayed + upon hovering. But, if `none` is set, click and hover + events are still fired. + hoverinfosrc + Sets the source reference on Chart Studio Cloud for + `hoverinfo`. + hoverlabel + :class:`plotly.graph_objects.choroplethmap.Hoverlabel` + instance or dict with compatible properties + hovertemplate + Template string used for rendering the information that + appear on hover box. Note that this will override + `hoverinfo`. Variables are inserted using %{variable}, + for example "y: %{y}" as well as %{xother}, {%_xother}, + {%_xother_}, {%xother_}. When showing info for several + points, "xother" will be added to those with different + x positions from the first point. An underscore before + or after "(x|y)other" will add a space on that side, + only when this field is shown. Numbers are formatted + using d3-format's syntax %{variable:d3-format}, for + example "Price: %{y:$.2f}". + https://github.com/d3/d3-format/tree/v1.4.5#d3-format + for details on the formatting syntax. Dates are + formatted using d3-time-format's syntax + %{variable|d3-time-format}, for example "Day: + %{2019-01-01|%A}". https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format for details on the + date formatting syntax. Variables that can't be found + will be replaced with the specifier. For example, a + template of "data: %{x}, %{y}" will result in a value + of "data: 1, %{y}" if x is 1 and y is missing. + Variables with an undefined value will be replaced with + the fallback value. The variables available in + `hovertemplate` are the ones emitted as event data + described at this link + https://plotly.com/javascript/plotlyjs-events/#event- + data. Additionally, all attributes that can be + specified per-point (the ones that are `arrayOk: true`) + are available. Finally, the template string has access + to variable `properties` Anything contained in tag + `` is displayed in the secondary box, for + example `%{fullData.name}`. To hide the + secondary box completely, use an empty tag + ``. + hovertemplatefallback + Fallback string that's displayed when a variable + referenced in a template is missing. If the boolean + value 'false' is passed in, the specifier with the + missing variable will be displayed. + hovertemplatesrc + Sets the source reference on Chart Studio Cloud for + `hovertemplate`. + hovertext + Same as `text`. + hovertextsrc + Sets the source reference on Chart Studio Cloud for + `hovertext`. + ids + Assigns id labels to each datum. These ids for object + constancy of data points during animation. Should be an + array of strings, not numbers or any other type. + idssrc + Sets the source reference on Chart Studio Cloud for + `ids`. + legend + Sets the reference to a legend to show this trace in. + References to these legends are "legend", "legend2", + "legend3", etc. Settings for these legends are set in + the layout, under `layout.legend`, `layout.legend2`, + etc. + legendgroup + Sets the legend group for this trace. Traces and shapes + part of the same legend group hide/show at the same + time when toggling legend items. + legendgrouptitle + :class:`plotly.graph_objects.choroplethmap.Legendgroupt + itle` instance or dict with compatible properties + legendrank + Sets the legend rank for this trace. Items and groups + with smaller ranks are presented on top/left side while + with "reversed" `legend.traceorder` they are on + bottom/right side. The default legendrank is 1000, so + that you can use ranks less than 1000 to place certain + items before all unranked items, and ranks greater than + 1000 to go after all unranked items. When having + unranked or equal rank items shapes would be displayed + after traces i.e. according to their order in data and + layout. + legendwidth + Sets the width (in px or fraction) of the legend for + this trace. + locations + Sets which features found in "geojson" to plot using + their feature `id` field. + locationssrc + Sets the source reference on Chart Studio Cloud for + `locations`. + marker + :class:`plotly.graph_objects.choroplethmap.Marker` + instance or dict with compatible properties + meta + Assigns extra meta information associated with this + trace that can be used in various text attributes. + Attributes such as trace `name`, graph, axis and + colorbar `title.text`, annotation `text` + `rangeselector`, `updatemenues` and `sliders` `label` + text all support `meta`. To access the trace `meta` + values in an attribute in the same trace, simply use + `%{meta[i]}` where `i` is the index or key of the + `meta` item in question. To access trace `meta` in + layout attributes, use `%{data[n[.meta[i]}` where `i` + is the index or key of the `meta` and `n` is the trace + index. + metasrc + Sets the source reference on Chart Studio Cloud for + `meta`. + name + Sets the trace name. The trace name appears as the + legend item and on hover. + reversescale + Reverses the color mapping if true. If true, `zmin` + will correspond to the last color in the array and + `zmax` will correspond to the first color. + selected + :class:`plotly.graph_objects.choroplethmap.Selected` + instance or dict with compatible properties + selectedpoints + Array containing integer indices of selected points. + Has an effect only for traces that support selections. + Note that an empty array means an empty selection where + the `unselected` are turned on for all points, whereas, + any other non-array values means no selection all where + the `selected` and `unselected` styles have no effect. + showlegend + Determines whether or not an item corresponding to this + trace is shown in the legend. + showscale + Determines whether or not a colorbar is displayed for + this trace. + stream + :class:`plotly.graph_objects.choroplethmap.Stream` + instance or dict with compatible properties + subplot + Sets a reference between this trace's data coordinates + and a map subplot. If "map" (the default value), the + data refer to `layout.map`. If "map2", the data refer + to `layout.map2`, and so on. + text + Sets the text elements associated with each location. + textsrc + Sets the source reference on Chart Studio Cloud for + `text`. + uid + Assign an id to this trace, Use this to provide object + constancy between traces during animations and + transitions. + uirevision + Controls persistence of some user-driven changes to the + trace: `constraintrange` in `parcoords` traces, as well + as some `editable: true` modifications such as `name` + and `colorbar.title`. Defaults to `layout.uirevision`. + Note that other user-driven trace attribute changes are + controlled by `layout` attributes: `trace.visible` is + controlled by `layout.legend.uirevision`, + `selectedpoints` is controlled by + `layout.selectionrevision`, and `colorbar.(x|y)` + (accessible with `config: {editable: true}`) is + controlled by `layout.editrevision`. Trace changes are + tracked by `uid`, which only falls back on trace index + if no `uid` is provided. So if your app can add/remove + traces before the end of the `data` array, such that + the same trace has a different index, you can still + preserve user-driven changes if you give each trace a + `uid` that stays with it as it moves. + unselected + :class:`plotly.graph_objects.choroplethmap.Unselected` + instance or dict with compatible properties + visible + Determines whether or not this trace is visible. If + "legendonly", the trace is not drawn, but can appear as + a legend item (provided that the legend itself is + visible). + z + Sets the color values. + zauto + Determines whether or not the color domain is computed + with respect to the input data (here in `z`) or the + bounds set in `zmin` and `zmax` Defaults to `false` + when `zmin` and `zmax` are set by the user. + zmax + Sets the upper bound of the color domain. Value should + have the same units as in `z` and if set, `zmin` must + be set as well. + zmid + Sets the mid-point of the color domain by scaling + `zmin` and/or `zmax` to be equidistant to this point. + Value should have the same units as in `z`. Has no + effect when `zauto` is `false`. + zmin + Sets the lower bound of the color domain. Value should + have the same units as in `z` and if set, `zmax` must + be set as well. + zsrc + Sets the source reference on Chart Studio Cloud for + `z`. + """ + + def __init__( + self, + arg=None, + autocolorscale=None, + below=None, + coloraxis=None, + colorbar=None, + colorscale=None, + customdata=None, + customdatasrc=None, + featureidkey=None, + geojson=None, + hoverinfo=None, + hoverinfosrc=None, + hoverlabel=None, + hovertemplate=None, + hovertemplatefallback=None, + hovertemplatesrc=None, + hovertext=None, + hovertextsrc=None, + ids=None, + idssrc=None, + legend=None, + legendgroup=None, + legendgrouptitle=None, + legendrank=None, + legendwidth=None, + locations=None, + locationssrc=None, + marker=None, + meta=None, + metasrc=None, + name=None, + reversescale=None, + selected=None, + selectedpoints=None, + showlegend=None, + showscale=None, + stream=None, + subplot=None, + text=None, + textsrc=None, + uid=None, + uirevision=None, + unselected=None, + visible=None, + z=None, + zauto=None, + zmax=None, + zmid=None, + zmin=None, + zsrc=None, + **kwargs, + ): + """ + Construct a new Choroplethmap object + + GeoJSON features to be filled are set in `geojson` The data + that describes the choropleth value-to-color mapping is set in + `locations` and `z`. + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of :class:`plotly.graph_objs.Choroplethmap` + autocolorscale + Determines whether the colorscale is a default palette + (`autocolorscale: true`) or the palette determined by + `colorscale`. In case `colorscale` is unspecified or + `autocolorscale` is true, the default palette will be + chosen according to whether numbers in the `color` + array are all positive, all negative or mixed. + below + Determines if the choropleth polygons will be inserted + before the layer with the specified ID. By default, + choroplethmap traces are placed above the water layers. + If set to '', the layer will be inserted above every + existing layer. + coloraxis + Sets a reference to a shared color axis. References to + these shared color axes are "coloraxis", "coloraxis2", + "coloraxis3", etc. Settings for these shared color axes + are set in the layout, under `layout.coloraxis`, + `layout.coloraxis2`, etc. Note that multiple color + scales can be linked to the same color axis. + colorbar + :class:`plotly.graph_objects.choroplethmap.ColorBar` + instance or dict with compatible properties + colorscale + Sets the colorscale. The colorscale must be an array + containing arrays mapping a normalized value to an rgb, + rgba, hex, hsl, hsv, or named color string. At minimum, + a mapping for the lowest (0) and highest (1) values are + required. For example, `[[0, 'rgb(0,0,255)'], [1, + 'rgb(255,0,0)']]`. To control the bounds of the + colorscale in color space, use `zmin` and `zmax`. + Alternatively, `colorscale` may be a palette name + string of the following list: Blackbody,Bluered,Blues,C + ividis,Earth,Electric,Greens,Greys,Hot,Jet,Picnic,Portl + and,Rainbow,RdBu,Reds,Viridis,YlGnBu,YlOrRd. + customdata + Assigns extra data each datum. This may be useful when + listening to hover, click and selection events. Note + that, "scatter" traces also appends customdata items in + the markers DOM elements + customdatasrc + Sets the source reference on Chart Studio Cloud for + `customdata`. + featureidkey + Sets the key in GeoJSON features which is used as id to + match the items included in the `locations` array. + Support nested property, for example "properties.name". + geojson + Sets the GeoJSON data associated with this trace. It + can be set as a valid GeoJSON object or as a URL + string. Note that we only accept GeoJSONs of type + "FeatureCollection" or "Feature" with geometries of + type "Polygon" or "MultiPolygon". + hoverinfo + Determines which trace information appear on hover. If + `none` or `skip` are set, no information is displayed + upon hovering. But, if `none` is set, click and hover + events are still fired. + hoverinfosrc + Sets the source reference on Chart Studio Cloud for + `hoverinfo`. + hoverlabel + :class:`plotly.graph_objects.choroplethmap.Hoverlabel` + instance or dict with compatible properties + hovertemplate + Template string used for rendering the information that + appear on hover box. Note that this will override + `hoverinfo`. Variables are inserted using %{variable}, + for example "y: %{y}" as well as %{xother}, {%_xother}, + {%_xother_}, {%xother_}. When showing info for several + points, "xother" will be added to those with different + x positions from the first point. An underscore before + or after "(x|y)other" will add a space on that side, + only when this field is shown. Numbers are formatted + using d3-format's syntax %{variable:d3-format}, for + example "Price: %{y:$.2f}". + https://github.com/d3/d3-format/tree/v1.4.5#d3-format + for details on the formatting syntax. Dates are + formatted using d3-time-format's syntax + %{variable|d3-time-format}, for example "Day: + %{2019-01-01|%A}". https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format for details on the + date formatting syntax. Variables that can't be found + will be replaced with the specifier. For example, a + template of "data: %{x}, %{y}" will result in a value + of "data: 1, %{y}" if x is 1 and y is missing. + Variables with an undefined value will be replaced with + the fallback value. The variables available in + `hovertemplate` are the ones emitted as event data + described at this link + https://plotly.com/javascript/plotlyjs-events/#event- + data. Additionally, all attributes that can be + specified per-point (the ones that are `arrayOk: true`) + are available. Finally, the template string has access + to variable `properties` Anything contained in tag + `` is displayed in the secondary box, for + example `%{fullData.name}`. To hide the + secondary box completely, use an empty tag + ``. + hovertemplatefallback + Fallback string that's displayed when a variable + referenced in a template is missing. If the boolean + value 'false' is passed in, the specifier with the + missing variable will be displayed. + hovertemplatesrc + Sets the source reference on Chart Studio Cloud for + `hovertemplate`. + hovertext + Same as `text`. + hovertextsrc + Sets the source reference on Chart Studio Cloud for + `hovertext`. + ids + Assigns id labels to each datum. These ids for object + constancy of data points during animation. Should be an + array of strings, not numbers or any other type. + idssrc + Sets the source reference on Chart Studio Cloud for + `ids`. + legend + Sets the reference to a legend to show this trace in. + References to these legends are "legend", "legend2", + "legend3", etc. Settings for these legends are set in + the layout, under `layout.legend`, `layout.legend2`, + etc. + legendgroup + Sets the legend group for this trace. Traces and shapes + part of the same legend group hide/show at the same + time when toggling legend items. + legendgrouptitle + :class:`plotly.graph_objects.choroplethmap.Legendgroupt + itle` instance or dict with compatible properties + legendrank + Sets the legend rank for this trace. Items and groups + with smaller ranks are presented on top/left side while + with "reversed" `legend.traceorder` they are on + bottom/right side. The default legendrank is 1000, so + that you can use ranks less than 1000 to place certain + items before all unranked items, and ranks greater than + 1000 to go after all unranked items. When having + unranked or equal rank items shapes would be displayed + after traces i.e. according to their order in data and + layout. + legendwidth + Sets the width (in px or fraction) of the legend for + this trace. + locations + Sets which features found in "geojson" to plot using + their feature `id` field. + locationssrc + Sets the source reference on Chart Studio Cloud for + `locations`. + marker + :class:`plotly.graph_objects.choroplethmap.Marker` + instance or dict with compatible properties + meta + Assigns extra meta information associated with this + trace that can be used in various text attributes. + Attributes such as trace `name`, graph, axis and + colorbar `title.text`, annotation `text` + `rangeselector`, `updatemenues` and `sliders` `label` + text all support `meta`. To access the trace `meta` + values in an attribute in the same trace, simply use + `%{meta[i]}` where `i` is the index or key of the + `meta` item in question. To access trace `meta` in + layout attributes, use `%{data[n[.meta[i]}` where `i` + is the index or key of the `meta` and `n` is the trace + index. + metasrc + Sets the source reference on Chart Studio Cloud for + `meta`. + name + Sets the trace name. The trace name appears as the + legend item and on hover. + reversescale + Reverses the color mapping if true. If true, `zmin` + will correspond to the last color in the array and + `zmax` will correspond to the first color. + selected + :class:`plotly.graph_objects.choroplethmap.Selected` + instance or dict with compatible properties + selectedpoints + Array containing integer indices of selected points. + Has an effect only for traces that support selections. + Note that an empty array means an empty selection where + the `unselected` are turned on for all points, whereas, + any other non-array values means no selection all where + the `selected` and `unselected` styles have no effect. + showlegend + Determines whether or not an item corresponding to this + trace is shown in the legend. + showscale + Determines whether or not a colorbar is displayed for + this trace. + stream + :class:`plotly.graph_objects.choroplethmap.Stream` + instance or dict with compatible properties + subplot + Sets a reference between this trace's data coordinates + and a map subplot. If "map" (the default value), the + data refer to `layout.map`. If "map2", the data refer + to `layout.map2`, and so on. + text + Sets the text elements associated with each location. + textsrc + Sets the source reference on Chart Studio Cloud for + `text`. + uid + Assign an id to this trace, Use this to provide object + constancy between traces during animations and + transitions. + uirevision + Controls persistence of some user-driven changes to the + trace: `constraintrange` in `parcoords` traces, as well + as some `editable: true` modifications such as `name` + and `colorbar.title`. Defaults to `layout.uirevision`. + Note that other user-driven trace attribute changes are + controlled by `layout` attributes: `trace.visible` is + controlled by `layout.legend.uirevision`, + `selectedpoints` is controlled by + `layout.selectionrevision`, and `colorbar.(x|y)` + (accessible with `config: {editable: true}`) is + controlled by `layout.editrevision`. Trace changes are + tracked by `uid`, which only falls back on trace index + if no `uid` is provided. So if your app can add/remove + traces before the end of the `data` array, such that + the same trace has a different index, you can still + preserve user-driven changes if you give each trace a + `uid` that stays with it as it moves. + unselected + :class:`plotly.graph_objects.choroplethmap.Unselected` + instance or dict with compatible properties + visible + Determines whether or not this trace is visible. If + "legendonly", the trace is not drawn, but can appear as + a legend item (provided that the legend itself is + visible). + z + Sets the color values. + zauto + Determines whether or not the color domain is computed + with respect to the input data (here in `z`) or the + bounds set in `zmin` and `zmax` Defaults to `false` + when `zmin` and `zmax` are set by the user. + zmax + Sets the upper bound of the color domain. Value should + have the same units as in `z` and if set, `zmin` must + be set as well. + zmid + Sets the mid-point of the color domain by scaling + `zmin` and/or `zmax` to be equidistant to this point. + Value should have the same units as in `z`. Has no + effect when `zauto` is `false`. + zmin + Sets the lower bound of the color domain. Value should + have the same units as in `z` and if set, `zmax` must + be set as well. + zsrc + Sets the source reference on Chart Studio Cloud for + `z`. + + Returns + ------- + Choroplethmap + """ + super().__init__("choroplethmap") + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + if arg is None: + arg = {} + elif isinstance(arg, self.__class__): + arg = arg.to_plotly_json() + elif isinstance(arg, dict): + arg = _copy.copy(arg) + else: + raise ValueError("""\ +The first argument to the plotly.graph_objs.Choroplethmap +constructor must be a dict or +an instance of :class:`plotly.graph_objs.Choroplethmap`""") + + self._skip_invalid = kwargs.pop("skip_invalid", False) + self._validate = kwargs.pop("_validate", True) + + self._set_property("autocolorscale", arg, autocolorscale) + self._set_property("below", arg, below) + self._set_property("coloraxis", arg, coloraxis) + self._set_property("colorbar", arg, colorbar) + self._set_property("colorscale", arg, colorscale) + self._set_property("customdata", arg, customdata) + self._set_property("customdatasrc", arg, customdatasrc) + self._set_property("featureidkey", arg, featureidkey) + self._set_property("geojson", arg, geojson) + self._set_property("hoverinfo", arg, hoverinfo) + self._set_property("hoverinfosrc", arg, hoverinfosrc) + self._set_property("hoverlabel", arg, hoverlabel) + self._set_property("hovertemplate", arg, hovertemplate) + self._set_property("hovertemplatefallback", arg, hovertemplatefallback) + self._set_property("hovertemplatesrc", arg, hovertemplatesrc) + self._set_property("hovertext", arg, hovertext) + self._set_property("hovertextsrc", arg, hovertextsrc) + self._set_property("ids", arg, ids) + self._set_property("idssrc", arg, idssrc) + self._set_property("legend", arg, legend) + self._set_property("legendgroup", arg, legendgroup) + self._set_property("legendgrouptitle", arg, legendgrouptitle) + self._set_property("legendrank", arg, legendrank) + self._set_property("legendwidth", arg, legendwidth) + self._set_property("locations", arg, locations) + self._set_property("locationssrc", arg, locationssrc) + self._set_property("marker", arg, marker) + self._set_property("meta", arg, meta) + self._set_property("metasrc", arg, metasrc) + self._set_property("name", arg, name) + self._set_property("reversescale", arg, reversescale) + self._set_property("selected", arg, selected) + self._set_property("selectedpoints", arg, selectedpoints) + self._set_property("showlegend", arg, showlegend) + self._set_property("showscale", arg, showscale) + self._set_property("stream", arg, stream) + self._set_property("subplot", arg, subplot) + self._set_property("text", arg, text) + self._set_property("textsrc", arg, textsrc) + self._set_property("uid", arg, uid) + self._set_property("uirevision", arg, uirevision) + self._set_property("unselected", arg, unselected) + self._set_property("visible", arg, visible) + self._set_property("z", arg, z) + self._set_property("zauto", arg, zauto) + self._set_property("zmax", arg, zmax) + self._set_property("zmid", arg, zmid) + self._set_property("zmin", arg, zmin) + self._set_property("zsrc", arg, zsrc) + + self._props["type"] = "choroplethmap" + arg.pop("type", None) + self._process_kwargs(**dict(arg, **kwargs)) + self._skip_invalid = False diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/_choroplethmapbox.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/_choroplethmapbox.py new file mode 100644 index 0000000000000000000000000000000000000000..b89f6f022cd4bbbfabbe2cc0078d305934eba54e --- /dev/null +++ b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/_choroplethmapbox.py @@ -0,0 +1,1824 @@ +# --- THIS FILE IS AUTO-GENERATED --- +# Modifications will be overwitten the next time code generation run. + +from plotly.basedatatypes import BaseTraceType as _BaseTraceType +import copy as _copy +import warnings + + +class Choroplethmapbox(_BaseTraceType): + _parent_path_str = "" + _path_str = "choroplethmapbox" + _valid_props = { + "autocolorscale", + "below", + "coloraxis", + "colorbar", + "colorscale", + "customdata", + "customdatasrc", + "featureidkey", + "geojson", + "hoverinfo", + "hoverinfosrc", + "hoverlabel", + "hovertemplate", + "hovertemplatefallback", + "hovertemplatesrc", + "hovertext", + "hovertextsrc", + "ids", + "idssrc", + "legend", + "legendgroup", + "legendgrouptitle", + "legendrank", + "legendwidth", + "locations", + "locationssrc", + "marker", + "meta", + "metasrc", + "name", + "reversescale", + "selected", + "selectedpoints", + "showlegend", + "showscale", + "stream", + "subplot", + "text", + "textsrc", + "type", + "uid", + "uirevision", + "unselected", + "visible", + "z", + "zauto", + "zmax", + "zmid", + "zmin", + "zsrc", + } + + @property + def autocolorscale(self): + """ + Determines whether the colorscale is a default palette + (`autocolorscale: true`) or the palette determined by + `colorscale`. In case `colorscale` is unspecified or + `autocolorscale` is true, the default palette will be chosen + according to whether numbers in the `color` array are all + positive, all negative or mixed. + + The 'autocolorscale' property is a boolean and must be specified as: + - A boolean value: True or False + + Returns + ------- + bool + """ + return self["autocolorscale"] + + @autocolorscale.setter + def autocolorscale(self, val): + self["autocolorscale"] = val + + @property + def below(self): + """ + Determines if the choropleth polygons will be inserted before + the layer with the specified ID. By default, choroplethmapbox + traces are placed above the water layers. If set to '', the + layer will be inserted above every existing layer. + + The 'below' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["below"] + + @below.setter + def below(self, val): + self["below"] = val + + @property + def coloraxis(self): + """ + Sets a reference to a shared color axis. References to these + shared color axes are "coloraxis", "coloraxis2", "coloraxis3", + etc. Settings for these shared color axes are set in the + layout, under `layout.coloraxis`, `layout.coloraxis2`, etc. + Note that multiple color scales can be linked to the same color + axis. + + The 'coloraxis' property is an identifier of a particular + subplot, of type 'coloraxis', that may be specified as: + - the string 'coloraxis' optionally followed by an integer >= 1 + (e.g. 'coloraxis', 'coloraxis1', 'coloraxis2', 'coloraxis3', etc.) + + Returns + ------- + str + """ + return self["coloraxis"] + + @coloraxis.setter + def coloraxis(self, val): + self["coloraxis"] = val + + @property + def colorbar(self): + """ + The 'colorbar' property is an instance of ColorBar + that may be specified as: + - An instance of :class:`plotly.graph_objs.choroplethmapbox.ColorBar` + - A dict of string/value properties that will be passed + to the ColorBar constructor + + Returns + ------- + plotly.graph_objs.choroplethmapbox.ColorBar + """ + return self["colorbar"] + + @colorbar.setter + def colorbar(self, val): + self["colorbar"] = val + + @property + def colorscale(self): + """ + Sets the colorscale. The colorscale must be an array containing + arrays mapping a normalized value to an rgb, rgba, hex, hsl, + hsv, or named color string. At minimum, a mapping for the + lowest (0) and highest (1) values are required. For example, + `[[0, 'rgb(0,0,255)'], [1, 'rgb(255,0,0)']]`. To control the + bounds of the colorscale in color space, use `zmin` and `zmax`. + Alternatively, `colorscale` may be a palette name string of the + following list: Blackbody,Bluered,Blues,Cividis,Earth,Electric, + Greens,Greys,Hot,Jet,Picnic,Portland,Rainbow,RdBu,Reds,Viridis, + YlGnBu,YlOrRd. + + The 'colorscale' property is a colorscale and may be + specified as: + - A list of colors that will be spaced evenly to create the colorscale. + Many predefined colorscale lists are included in the sequential, diverging, + and cyclical modules in the plotly.colors package. + - A list of 2-element lists where the first element is the + normalized color level value (starting at 0 and ending at 1), + and the second item is a valid color string. + (e.g. [[0, 'green'], [0.5, 'red'], [1.0, 'rgb(0, 0, 255)']]) + - One of the following named colorscales: + ['aggrnyl', 'agsunset', 'algae', 'amp', 'armyrose', 'balance', + 'blackbody', 'bluered', 'blues', 'blugrn', 'bluyl', 'brbg', + 'brwnyl', 'bugn', 'bupu', 'burg', 'burgyl', 'cividis', 'curl', + 'darkmint', 'deep', 'delta', 'dense', 'earth', 'edge', 'electric', + 'emrld', 'fall', 'geyser', 'gnbu', 'gray', 'greens', 'greys', + 'haline', 'hot', 'hsv', 'ice', 'icefire', 'inferno', 'jet', + 'magenta', 'magma', 'matter', 'mint', 'mrybm', 'mygbm', 'oranges', + 'orrd', 'oryel', 'oxy', 'peach', 'phase', 'picnic', 'pinkyl', + 'piyg', 'plasma', 'plotly3', 'portland', 'prgn', 'pubu', 'pubugn', + 'puor', 'purd', 'purp', 'purples', 'purpor', 'rainbow', 'rdbu', + 'rdgy', 'rdpu', 'rdylbu', 'rdylgn', 'redor', 'reds', 'solar', + 'spectral', 'speed', 'sunset', 'sunsetdark', 'teal', 'tealgrn', + 'tealrose', 'tempo', 'temps', 'thermal', 'tropic', 'turbid', + 'turbo', 'twilight', 'viridis', 'ylgn', 'ylgnbu', 'ylorbr', + 'ylorrd']. + Appending '_r' to a named colorscale reverses it. + + Returns + ------- + str + """ + return self["colorscale"] + + @colorscale.setter + def colorscale(self, val): + self["colorscale"] = val + + @property + def customdata(self): + """ + Assigns extra data each datum. This may be useful when + listening to hover, click and selection events. Note that, + "scatter" traces also appends customdata items in the markers + DOM elements + + The 'customdata' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["customdata"] + + @customdata.setter + def customdata(self, val): + self["customdata"] = val + + @property + def customdatasrc(self): + """ + Sets the source reference on Chart Studio Cloud for + `customdata`. + + The 'customdatasrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["customdatasrc"] + + @customdatasrc.setter + def customdatasrc(self, val): + self["customdatasrc"] = val + + @property + def featureidkey(self): + """ + Sets the key in GeoJSON features which is used as id to match + the items included in the `locations` array. Support nested + property, for example "properties.name". + + The 'featureidkey' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["featureidkey"] + + @featureidkey.setter + def featureidkey(self, val): + self["featureidkey"] = val + + @property + def geojson(self): + """ + Sets the GeoJSON data associated with this trace. It can be set + as a valid GeoJSON object or as a URL string. Note that we only + accept GeoJSONs of type "FeatureCollection" or "Feature" with + geometries of type "Polygon" or "MultiPolygon". + + The 'geojson' property accepts values of any type + + Returns + ------- + Any + """ + return self["geojson"] + + @geojson.setter + def geojson(self, val): + self["geojson"] = val + + @property + def hoverinfo(self): + """ + Determines which trace information appear on hover. If `none` + or `skip` are set, no information is displayed upon hovering. + But, if `none` is set, click and hover events are still fired. + + The 'hoverinfo' property is a flaglist and may be specified + as a string containing: + - Any combination of ['location', 'z', 'text', 'name'] joined with '+' characters + (e.g. 'location+z') + OR exactly one of ['all', 'none', 'skip'] (e.g. 'skip') + - A list or array of the above + + Returns + ------- + Any|numpy.ndarray + """ + return self["hoverinfo"] + + @hoverinfo.setter + def hoverinfo(self, val): + self["hoverinfo"] = val + + @property + def hoverinfosrc(self): + """ + Sets the source reference on Chart Studio Cloud for + `hoverinfo`. + + The 'hoverinfosrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["hoverinfosrc"] + + @hoverinfosrc.setter + def hoverinfosrc(self, val): + self["hoverinfosrc"] = val + + @property + def hoverlabel(self): + """ + The 'hoverlabel' property is an instance of Hoverlabel + that may be specified as: + - An instance of :class:`plotly.graph_objs.choroplethmapbox.Hoverlabel` + - A dict of string/value properties that will be passed + to the Hoverlabel constructor + + Returns + ------- + plotly.graph_objs.choroplethmapbox.Hoverlabel + """ + return self["hoverlabel"] + + @hoverlabel.setter + def hoverlabel(self, val): + self["hoverlabel"] = val + + @property + def hovertemplate(self): + """ + Template string used for rendering the information that appear + on hover box. Note that this will override `hoverinfo`. + Variables are inserted using %{variable}, for example "y: %{y}" + as well as %{xother}, {%_xother}, {%_xother_}, {%xother_}. When + showing info for several points, "xother" will be added to + those with different x positions from the first point. An + underscore before or after "(x|y)other" will add a space on + that side, only when this field is shown. Numbers are formatted + using d3-format's syntax %{variable:d3-format}, for example + "Price: %{y:$.2f}". + https://github.com/d3/d3-format/tree/v1.4.5#d3-format for + details on the formatting syntax. Dates are formatted using + d3-time-format's syntax %{variable|d3-time-format}, for example + "Day: %{2019-01-01|%A}". https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format for details on the date + formatting syntax. Variables that can't be found will be + replaced with the specifier. For example, a template of "data: + %{x}, %{y}" will result in a value of "data: 1, %{y}" if x is 1 + and y is missing. Variables with an undefined value will be + replaced with the fallback value. The variables available in + `hovertemplate` are the ones emitted as event data described at + this link https://plotly.com/javascript/plotlyjs-events/#event- + data. Additionally, all attributes that can be specified per- + point (the ones that are `arrayOk: true`) are available. + Finally, the template string has access to variable + `properties` Anything contained in tag `` is displayed + in the secondary box, for example + `%{fullData.name}`. To hide the secondary box + completely, use an empty tag ``. + + The 'hovertemplate' property is a string and must be specified as: + - A string + - A number that will be converted to a string + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["hovertemplate"] + + @hovertemplate.setter + def hovertemplate(self, val): + self["hovertemplate"] = val + + @property + def hovertemplatefallback(self): + """ + Fallback string that's displayed when a variable referenced in + a template is missing. If the boolean value 'false' is passed + in, the specifier with the missing variable will be displayed. + + The 'hovertemplatefallback' property accepts values of any type + + Returns + ------- + Any + """ + return self["hovertemplatefallback"] + + @hovertemplatefallback.setter + def hovertemplatefallback(self, val): + self["hovertemplatefallback"] = val + + @property + def hovertemplatesrc(self): + """ + Sets the source reference on Chart Studio Cloud for + `hovertemplate`. + + The 'hovertemplatesrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["hovertemplatesrc"] + + @hovertemplatesrc.setter + def hovertemplatesrc(self, val): + self["hovertemplatesrc"] = val + + @property + def hovertext(self): + """ + Same as `text`. + + The 'hovertext' property is a string and must be specified as: + - A string + - A number that will be converted to a string + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["hovertext"] + + @hovertext.setter + def hovertext(self, val): + self["hovertext"] = val + + @property + def hovertextsrc(self): + """ + Sets the source reference on Chart Studio Cloud for + `hovertext`. + + The 'hovertextsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["hovertextsrc"] + + @hovertextsrc.setter + def hovertextsrc(self, val): + self["hovertextsrc"] = val + + @property + def ids(self): + """ + Assigns id labels to each datum. These ids for object constancy + of data points during animation. Should be an array of strings, + not numbers or any other type. + + The 'ids' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["ids"] + + @ids.setter + def ids(self, val): + self["ids"] = val + + @property + def idssrc(self): + """ + Sets the source reference on Chart Studio Cloud for `ids`. + + The 'idssrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["idssrc"] + + @idssrc.setter + def idssrc(self, val): + self["idssrc"] = val + + @property + def legend(self): + """ + Sets the reference to a legend to show this trace in. + References to these legends are "legend", "legend2", "legend3", + etc. Settings for these legends are set in the layout, under + `layout.legend`, `layout.legend2`, etc. + + The 'legend' property is an identifier of a particular + subplot, of type 'legend', that may be specified as: + - the string 'legend' optionally followed by an integer >= 1 + (e.g. 'legend', 'legend1', 'legend2', 'legend3', etc.) + + Returns + ------- + str + """ + return self["legend"] + + @legend.setter + def legend(self, val): + self["legend"] = val + + @property + def legendgroup(self): + """ + Sets the legend group for this trace. Traces and shapes part of + the same legend group hide/show at the same time when toggling + legend items. + + The 'legendgroup' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["legendgroup"] + + @legendgroup.setter + def legendgroup(self, val): + self["legendgroup"] = val + + @property + def legendgrouptitle(self): + """ + The 'legendgrouptitle' property is an instance of Legendgrouptitle + that may be specified as: + - An instance of :class:`plotly.graph_objs.choroplethmapbox.Legendgrouptitle` + - A dict of string/value properties that will be passed + to the Legendgrouptitle constructor + + Returns + ------- + plotly.graph_objs.choroplethmapbox.Legendgrouptitle + """ + return self["legendgrouptitle"] + + @legendgrouptitle.setter + def legendgrouptitle(self, val): + self["legendgrouptitle"] = val + + @property + def legendrank(self): + """ + Sets the legend rank for this trace. Items and groups with + smaller ranks are presented on top/left side while with + "reversed" `legend.traceorder` they are on bottom/right side. + The default legendrank is 1000, so that you can use ranks less + than 1000 to place certain items before all unranked items, and + ranks greater than 1000 to go after all unranked items. When + having unranked or equal rank items shapes would be displayed + after traces i.e. according to their order in data and layout. + + The 'legendrank' property is a number and may be specified as: + - An int or float + + Returns + ------- + int|float + """ + return self["legendrank"] + + @legendrank.setter + def legendrank(self, val): + self["legendrank"] = val + + @property + def legendwidth(self): + """ + Sets the width (in px or fraction) of the legend for this + trace. + + The 'legendwidth' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["legendwidth"] + + @legendwidth.setter + def legendwidth(self, val): + self["legendwidth"] = val + + @property + def locations(self): + """ + Sets which features found in "geojson" to plot using their + feature `id` field. + + The 'locations' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["locations"] + + @locations.setter + def locations(self, val): + self["locations"] = val + + @property + def locationssrc(self): + """ + Sets the source reference on Chart Studio Cloud for + `locations`. + + The 'locationssrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["locationssrc"] + + @locationssrc.setter + def locationssrc(self, val): + self["locationssrc"] = val + + @property + def marker(self): + """ + The 'marker' property is an instance of Marker + that may be specified as: + - An instance of :class:`plotly.graph_objs.choroplethmapbox.Marker` + - A dict of string/value properties that will be passed + to the Marker constructor + + Returns + ------- + plotly.graph_objs.choroplethmapbox.Marker + """ + return self["marker"] + + @marker.setter + def marker(self, val): + self["marker"] = val + + @property + def meta(self): + """ + Assigns extra meta information associated with this trace that + can be used in various text attributes. Attributes such as + trace `name`, graph, axis and colorbar `title.text`, annotation + `text` `rangeselector`, `updatemenues` and `sliders` `label` + text all support `meta`. To access the trace `meta` values in + an attribute in the same trace, simply use `%{meta[i]}` where + `i` is the index or key of the `meta` item in question. To + access trace `meta` in layout attributes, use + `%{data[n[.meta[i]}` where `i` is the index or key of the + `meta` and `n` is the trace index. + + The 'meta' property accepts values of any type + + Returns + ------- + Any|numpy.ndarray + """ + return self["meta"] + + @meta.setter + def meta(self, val): + self["meta"] = val + + @property + def metasrc(self): + """ + Sets the source reference on Chart Studio Cloud for `meta`. + + The 'metasrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["metasrc"] + + @metasrc.setter + def metasrc(self, val): + self["metasrc"] = val + + @property + def name(self): + """ + Sets the trace name. The trace name appears as the legend item + and on hover. + + The 'name' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["name"] + + @name.setter + def name(self, val): + self["name"] = val + + @property + def reversescale(self): + """ + Reverses the color mapping if true. If true, `zmin` will + correspond to the last color in the array and `zmax` will + correspond to the first color. + + The 'reversescale' property is a boolean and must be specified as: + - A boolean value: True or False + + Returns + ------- + bool + """ + return self["reversescale"] + + @reversescale.setter + def reversescale(self, val): + self["reversescale"] = val + + @property + def selected(self): + """ + The 'selected' property is an instance of Selected + that may be specified as: + - An instance of :class:`plotly.graph_objs.choroplethmapbox.Selected` + - A dict of string/value properties that will be passed + to the Selected constructor + + Returns + ------- + plotly.graph_objs.choroplethmapbox.Selected + """ + return self["selected"] + + @selected.setter + def selected(self, val): + self["selected"] = val + + @property + def selectedpoints(self): + """ + Array containing integer indices of selected points. Has an + effect only for traces that support selections. Note that an + empty array means an empty selection where the `unselected` are + turned on for all points, whereas, any other non-array values + means no selection all where the `selected` and `unselected` + styles have no effect. + + The 'selectedpoints' property accepts values of any type + + Returns + ------- + Any + """ + return self["selectedpoints"] + + @selectedpoints.setter + def selectedpoints(self, val): + self["selectedpoints"] = val + + @property + def showlegend(self): + """ + Determines whether or not an item corresponding to this trace + is shown in the legend. + + The 'showlegend' property is a boolean and must be specified as: + - A boolean value: True or False + + Returns + ------- + bool + """ + return self["showlegend"] + + @showlegend.setter + def showlegend(self, val): + self["showlegend"] = val + + @property + def showscale(self): + """ + Determines whether or not a colorbar is displayed for this + trace. + + The 'showscale' property is a boolean and must be specified as: + - A boolean value: True or False + + Returns + ------- + bool + """ + return self["showscale"] + + @showscale.setter + def showscale(self, val): + self["showscale"] = val + + @property + def stream(self): + """ + The 'stream' property is an instance of Stream + that may be specified as: + - An instance of :class:`plotly.graph_objs.choroplethmapbox.Stream` + - A dict of string/value properties that will be passed + to the Stream constructor + + Returns + ------- + plotly.graph_objs.choroplethmapbox.Stream + """ + return self["stream"] + + @stream.setter + def stream(self, val): + self["stream"] = val + + @property + def subplot(self): + """ + mapbox subplots and traces are deprecated! Please consider + switching to `map` subplots and traces. Learn more at: + https://plotly.com/python/maplibre-migration/ as well as + https://plotly.com/javascript/maplibre-migration/ Sets a + reference between this trace's data coordinates and a mapbox + subplot. If "mapbox" (the default value), the data refer to + `layout.mapbox`. If "mapbox2", the data refer to + `layout.mapbox2`, and so on. + + The 'subplot' property is an identifier of a particular + subplot, of type 'mapbox', that may be specified as: + - the string 'mapbox' optionally followed by an integer >= 1 + (e.g. 'mapbox', 'mapbox1', 'mapbox2', 'mapbox3', etc.) + + Returns + ------- + str + """ + return self["subplot"] + + @subplot.setter + def subplot(self, val): + self["subplot"] = val + + @property + def text(self): + """ + Sets the text elements associated with each location. + + The 'text' property is a string and must be specified as: + - A string + - A number that will be converted to a string + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["text"] + + @text.setter + def text(self, val): + self["text"] = val + + @property + def textsrc(self): + """ + Sets the source reference on Chart Studio Cloud for `text`. + + The 'textsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["textsrc"] + + @textsrc.setter + def textsrc(self, val): + self["textsrc"] = val + + @property + def uid(self): + """ + Assign an id to this trace, Use this to provide object + constancy between traces during animations and transitions. + + The 'uid' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["uid"] + + @uid.setter + def uid(self, val): + self["uid"] = val + + @property + def uirevision(self): + """ + Controls persistence of some user-driven changes to the trace: + `constraintrange` in `parcoords` traces, as well as some + `editable: true` modifications such as `name` and + `colorbar.title`. Defaults to `layout.uirevision`. Note that + other user-driven trace attribute changes are controlled by + `layout` attributes: `trace.visible` is controlled by + `layout.legend.uirevision`, `selectedpoints` is controlled by + `layout.selectionrevision`, and `colorbar.(x|y)` (accessible + with `config: {editable: true}`) is controlled by + `layout.editrevision`. Trace changes are tracked by `uid`, + which only falls back on trace index if no `uid` is provided. + So if your app can add/remove traces before the end of the + `data` array, such that the same trace has a different index, + you can still preserve user-driven changes if you give each + trace a `uid` that stays with it as it moves. + + The 'uirevision' property accepts values of any type + + Returns + ------- + Any + """ + return self["uirevision"] + + @uirevision.setter + def uirevision(self, val): + self["uirevision"] = val + + @property + def unselected(self): + """ + The 'unselected' property is an instance of Unselected + that may be specified as: + - An instance of :class:`plotly.graph_objs.choroplethmapbox.Unselected` + - A dict of string/value properties that will be passed + to the Unselected constructor + + Returns + ------- + plotly.graph_objs.choroplethmapbox.Unselected + """ + return self["unselected"] + + @unselected.setter + def unselected(self, val): + self["unselected"] = val + + @property + def visible(self): + """ + Determines whether or not this trace is visible. If + "legendonly", the trace is not drawn, but can appear as a + legend item (provided that the legend itself is visible). + + The 'visible' property is an enumeration that may be specified as: + - One of the following enumeration values: + [True, False, 'legendonly'] + + Returns + ------- + Any + """ + return self["visible"] + + @visible.setter + def visible(self, val): + self["visible"] = val + + @property + def z(self): + """ + Sets the color values. + + The 'z' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["z"] + + @z.setter + def z(self, val): + self["z"] = val + + @property + def zauto(self): + """ + Determines whether or not the color domain is computed with + respect to the input data (here in `z`) or the bounds set in + `zmin` and `zmax` Defaults to `false` when `zmin` and `zmax` + are set by the user. + + The 'zauto' property is a boolean and must be specified as: + - A boolean value: True or False + + Returns + ------- + bool + """ + return self["zauto"] + + @zauto.setter + def zauto(self, val): + self["zauto"] = val + + @property + def zmax(self): + """ + Sets the upper bound of the color domain. Value should have the + same units as in `z` and if set, `zmin` must be set as well. + + The 'zmax' property is a number and may be specified as: + - An int or float + + Returns + ------- + int|float + """ + return self["zmax"] + + @zmax.setter + def zmax(self, val): + self["zmax"] = val + + @property + def zmid(self): + """ + Sets the mid-point of the color domain by scaling `zmin` and/or + `zmax` to be equidistant to this point. Value should have the + same units as in `z`. Has no effect when `zauto` is `false`. + + The 'zmid' property is a number and may be specified as: + - An int or float + + Returns + ------- + int|float + """ + return self["zmid"] + + @zmid.setter + def zmid(self, val): + self["zmid"] = val + + @property + def zmin(self): + """ + Sets the lower bound of the color domain. Value should have the + same units as in `z` and if set, `zmax` must be set as well. + + The 'zmin' property is a number and may be specified as: + - An int or float + + Returns + ------- + int|float + """ + return self["zmin"] + + @zmin.setter + def zmin(self, val): + self["zmin"] = val + + @property + def zsrc(self): + """ + Sets the source reference on Chart Studio Cloud for `z`. + + The 'zsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["zsrc"] + + @zsrc.setter + def zsrc(self, val): + self["zsrc"] = val + + @property + def type(self): + return self._props["type"] + + @property + def _prop_descriptions(self): + return """\ + autocolorscale + Determines whether the colorscale is a default palette + (`autocolorscale: true`) or the palette determined by + `colorscale`. In case `colorscale` is unspecified or + `autocolorscale` is true, the default palette will be + chosen according to whether numbers in the `color` + array are all positive, all negative or mixed. + below + Determines if the choropleth polygons will be inserted + before the layer with the specified ID. By default, + choroplethmapbox traces are placed above the water + layers. If set to '', the layer will be inserted above + every existing layer. + coloraxis + Sets a reference to a shared color axis. References to + these shared color axes are "coloraxis", "coloraxis2", + "coloraxis3", etc. Settings for these shared color axes + are set in the layout, under `layout.coloraxis`, + `layout.coloraxis2`, etc. Note that multiple color + scales can be linked to the same color axis. + colorbar + :class:`plotly.graph_objects.choroplethmapbox.ColorBar` + instance or dict with compatible properties + colorscale + Sets the colorscale. The colorscale must be an array + containing arrays mapping a normalized value to an rgb, + rgba, hex, hsl, hsv, or named color string. At minimum, + a mapping for the lowest (0) and highest (1) values are + required. For example, `[[0, 'rgb(0,0,255)'], [1, + 'rgb(255,0,0)']]`. To control the bounds of the + colorscale in color space, use `zmin` and `zmax`. + Alternatively, `colorscale` may be a palette name + string of the following list: Blackbody,Bluered,Blues,C + ividis,Earth,Electric,Greens,Greys,Hot,Jet,Picnic,Portl + and,Rainbow,RdBu,Reds,Viridis,YlGnBu,YlOrRd. + customdata + Assigns extra data each datum. This may be useful when + listening to hover, click and selection events. Note + that, "scatter" traces also appends customdata items in + the markers DOM elements + customdatasrc + Sets the source reference on Chart Studio Cloud for + `customdata`. + featureidkey + Sets the key in GeoJSON features which is used as id to + match the items included in the `locations` array. + Support nested property, for example "properties.name". + geojson + Sets the GeoJSON data associated with this trace. It + can be set as a valid GeoJSON object or as a URL + string. Note that we only accept GeoJSONs of type + "FeatureCollection" or "Feature" with geometries of + type "Polygon" or "MultiPolygon". + hoverinfo + Determines which trace information appear on hover. If + `none` or `skip` are set, no information is displayed + upon hovering. But, if `none` is set, click and hover + events are still fired. + hoverinfosrc + Sets the source reference on Chart Studio Cloud for + `hoverinfo`. + hoverlabel + :class:`plotly.graph_objects.choroplethmapbox.Hoverlabe + l` instance or dict with compatible properties + hovertemplate + Template string used for rendering the information that + appear on hover box. Note that this will override + `hoverinfo`. Variables are inserted using %{variable}, + for example "y: %{y}" as well as %{xother}, {%_xother}, + {%_xother_}, {%xother_}. When showing info for several + points, "xother" will be added to those with different + x positions from the first point. An underscore before + or after "(x|y)other" will add a space on that side, + only when this field is shown. Numbers are formatted + using d3-format's syntax %{variable:d3-format}, for + example "Price: %{y:$.2f}". + https://github.com/d3/d3-format/tree/v1.4.5#d3-format + for details on the formatting syntax. Dates are + formatted using d3-time-format's syntax + %{variable|d3-time-format}, for example "Day: + %{2019-01-01|%A}". https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format for details on the + date formatting syntax. Variables that can't be found + will be replaced with the specifier. For example, a + template of "data: %{x}, %{y}" will result in a value + of "data: 1, %{y}" if x is 1 and y is missing. + Variables with an undefined value will be replaced with + the fallback value. The variables available in + `hovertemplate` are the ones emitted as event data + described at this link + https://plotly.com/javascript/plotlyjs-events/#event- + data. Additionally, all attributes that can be + specified per-point (the ones that are `arrayOk: true`) + are available. Finally, the template string has access + to variable `properties` Anything contained in tag + `` is displayed in the secondary box, for + example `%{fullData.name}`. To hide the + secondary box completely, use an empty tag + ``. + hovertemplatefallback + Fallback string that's displayed when a variable + referenced in a template is missing. If the boolean + value 'false' is passed in, the specifier with the + missing variable will be displayed. + hovertemplatesrc + Sets the source reference on Chart Studio Cloud for + `hovertemplate`. + hovertext + Same as `text`. + hovertextsrc + Sets the source reference on Chart Studio Cloud for + `hovertext`. + ids + Assigns id labels to each datum. These ids for object + constancy of data points during animation. Should be an + array of strings, not numbers or any other type. + idssrc + Sets the source reference on Chart Studio Cloud for + `ids`. + legend + Sets the reference to a legend to show this trace in. + References to these legends are "legend", "legend2", + "legend3", etc. Settings for these legends are set in + the layout, under `layout.legend`, `layout.legend2`, + etc. + legendgroup + Sets the legend group for this trace. Traces and shapes + part of the same legend group hide/show at the same + time when toggling legend items. + legendgrouptitle + :class:`plotly.graph_objects.choroplethmapbox.Legendgro + uptitle` instance or dict with compatible properties + legendrank + Sets the legend rank for this trace. Items and groups + with smaller ranks are presented on top/left side while + with "reversed" `legend.traceorder` they are on + bottom/right side. The default legendrank is 1000, so + that you can use ranks less than 1000 to place certain + items before all unranked items, and ranks greater than + 1000 to go after all unranked items. When having + unranked or equal rank items shapes would be displayed + after traces i.e. according to their order in data and + layout. + legendwidth + Sets the width (in px or fraction) of the legend for + this trace. + locations + Sets which features found in "geojson" to plot using + their feature `id` field. + locationssrc + Sets the source reference on Chart Studio Cloud for + `locations`. + marker + :class:`plotly.graph_objects.choroplethmapbox.Marker` + instance or dict with compatible properties + meta + Assigns extra meta information associated with this + trace that can be used in various text attributes. + Attributes such as trace `name`, graph, axis and + colorbar `title.text`, annotation `text` + `rangeselector`, `updatemenues` and `sliders` `label` + text all support `meta`. To access the trace `meta` + values in an attribute in the same trace, simply use + `%{meta[i]}` where `i` is the index or key of the + `meta` item in question. To access trace `meta` in + layout attributes, use `%{data[n[.meta[i]}` where `i` + is the index or key of the `meta` and `n` is the trace + index. + metasrc + Sets the source reference on Chart Studio Cloud for + `meta`. + name + Sets the trace name. The trace name appears as the + legend item and on hover. + reversescale + Reverses the color mapping if true. If true, `zmin` + will correspond to the last color in the array and + `zmax` will correspond to the first color. + selected + :class:`plotly.graph_objects.choroplethmapbox.Selected` + instance or dict with compatible properties + selectedpoints + Array containing integer indices of selected points. + Has an effect only for traces that support selections. + Note that an empty array means an empty selection where + the `unselected` are turned on for all points, whereas, + any other non-array values means no selection all where + the `selected` and `unselected` styles have no effect. + showlegend + Determines whether or not an item corresponding to this + trace is shown in the legend. + showscale + Determines whether or not a colorbar is displayed for + this trace. + stream + :class:`plotly.graph_objects.choroplethmapbox.Stream` + instance or dict with compatible properties + subplot + mapbox subplots and traces are deprecated! Please + consider switching to `map` subplots and traces. Learn + more at: https://plotly.com/python/maplibre-migration/ + as well as https://plotly.com/javascript/maplibre- + migration/ Sets a reference between this trace's data + coordinates and a mapbox subplot. If "mapbox" (the + default value), the data refer to `layout.mapbox`. If + "mapbox2", the data refer to `layout.mapbox2`, and so + on. + text + Sets the text elements associated with each location. + textsrc + Sets the source reference on Chart Studio Cloud for + `text`. + uid + Assign an id to this trace, Use this to provide object + constancy between traces during animations and + transitions. + uirevision + Controls persistence of some user-driven changes to the + trace: `constraintrange` in `parcoords` traces, as well + as some `editable: true` modifications such as `name` + and `colorbar.title`. Defaults to `layout.uirevision`. + Note that other user-driven trace attribute changes are + controlled by `layout` attributes: `trace.visible` is + controlled by `layout.legend.uirevision`, + `selectedpoints` is controlled by + `layout.selectionrevision`, and `colorbar.(x|y)` + (accessible with `config: {editable: true}`) is + controlled by `layout.editrevision`. Trace changes are + tracked by `uid`, which only falls back on trace index + if no `uid` is provided. So if your app can add/remove + traces before the end of the `data` array, such that + the same trace has a different index, you can still + preserve user-driven changes if you give each trace a + `uid` that stays with it as it moves. + unselected + :class:`plotly.graph_objects.choroplethmapbox.Unselecte + d` instance or dict with compatible properties + visible + Determines whether or not this trace is visible. If + "legendonly", the trace is not drawn, but can appear as + a legend item (provided that the legend itself is + visible). + z + Sets the color values. + zauto + Determines whether or not the color domain is computed + with respect to the input data (here in `z`) or the + bounds set in `zmin` and `zmax` Defaults to `false` + when `zmin` and `zmax` are set by the user. + zmax + Sets the upper bound of the color domain. Value should + have the same units as in `z` and if set, `zmin` must + be set as well. + zmid + Sets the mid-point of the color domain by scaling + `zmin` and/or `zmax` to be equidistant to this point. + Value should have the same units as in `z`. Has no + effect when `zauto` is `false`. + zmin + Sets the lower bound of the color domain. Value should + have the same units as in `z` and if set, `zmax` must + be set as well. + zsrc + Sets the source reference on Chart Studio Cloud for + `z`. + """ + + def __init__( + self, + arg=None, + autocolorscale=None, + below=None, + coloraxis=None, + colorbar=None, + colorscale=None, + customdata=None, + customdatasrc=None, + featureidkey=None, + geojson=None, + hoverinfo=None, + hoverinfosrc=None, + hoverlabel=None, + hovertemplate=None, + hovertemplatefallback=None, + hovertemplatesrc=None, + hovertext=None, + hovertextsrc=None, + ids=None, + idssrc=None, + legend=None, + legendgroup=None, + legendgrouptitle=None, + legendrank=None, + legendwidth=None, + locations=None, + locationssrc=None, + marker=None, + meta=None, + metasrc=None, + name=None, + reversescale=None, + selected=None, + selectedpoints=None, + showlegend=None, + showscale=None, + stream=None, + subplot=None, + text=None, + textsrc=None, + uid=None, + uirevision=None, + unselected=None, + visible=None, + z=None, + zauto=None, + zmax=None, + zmid=None, + zmin=None, + zsrc=None, + **kwargs, + ): + """ + Construct a new Choroplethmapbox object + + "choroplethmapbox" trace is deprecated! Please consider + switching to the "choroplethmap" trace type and `map` subplots. + Learn more at: https://plotly.com/python/maplibre-migration/ as + well as https://plotly.com/javascript/maplibre-migration/ + GeoJSON features to be filled are set in `geojson` The data + that describes the choropleth value-to-color mapping is set in + `locations` and `z`. + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.Choroplethmapbox` + autocolorscale + Determines whether the colorscale is a default palette + (`autocolorscale: true`) or the palette determined by + `colorscale`. In case `colorscale` is unspecified or + `autocolorscale` is true, the default palette will be + chosen according to whether numbers in the `color` + array are all positive, all negative or mixed. + below + Determines if the choropleth polygons will be inserted + before the layer with the specified ID. By default, + choroplethmapbox traces are placed above the water + layers. If set to '', the layer will be inserted above + every existing layer. + coloraxis + Sets a reference to a shared color axis. References to + these shared color axes are "coloraxis", "coloraxis2", + "coloraxis3", etc. Settings for these shared color axes + are set in the layout, under `layout.coloraxis`, + `layout.coloraxis2`, etc. Note that multiple color + scales can be linked to the same color axis. + colorbar + :class:`plotly.graph_objects.choroplethmapbox.ColorBar` + instance or dict with compatible properties + colorscale + Sets the colorscale. The colorscale must be an array + containing arrays mapping a normalized value to an rgb, + rgba, hex, hsl, hsv, or named color string. At minimum, + a mapping for the lowest (0) and highest (1) values are + required. For example, `[[0, 'rgb(0,0,255)'], [1, + 'rgb(255,0,0)']]`. To control the bounds of the + colorscale in color space, use `zmin` and `zmax`. + Alternatively, `colorscale` may be a palette name + string of the following list: Blackbody,Bluered,Blues,C + ividis,Earth,Electric,Greens,Greys,Hot,Jet,Picnic,Portl + and,Rainbow,RdBu,Reds,Viridis,YlGnBu,YlOrRd. + customdata + Assigns extra data each datum. This may be useful when + listening to hover, click and selection events. Note + that, "scatter" traces also appends customdata items in + the markers DOM elements + customdatasrc + Sets the source reference on Chart Studio Cloud for + `customdata`. + featureidkey + Sets the key in GeoJSON features which is used as id to + match the items included in the `locations` array. + Support nested property, for example "properties.name". + geojson + Sets the GeoJSON data associated with this trace. It + can be set as a valid GeoJSON object or as a URL + string. Note that we only accept GeoJSONs of type + "FeatureCollection" or "Feature" with geometries of + type "Polygon" or "MultiPolygon". + hoverinfo + Determines which trace information appear on hover. If + `none` or `skip` are set, no information is displayed + upon hovering. But, if `none` is set, click and hover + events are still fired. + hoverinfosrc + Sets the source reference on Chart Studio Cloud for + `hoverinfo`. + hoverlabel + :class:`plotly.graph_objects.choroplethmapbox.Hoverlabe + l` instance or dict with compatible properties + hovertemplate + Template string used for rendering the information that + appear on hover box. Note that this will override + `hoverinfo`. Variables are inserted using %{variable}, + for example "y: %{y}" as well as %{xother}, {%_xother}, + {%_xother_}, {%xother_}. When showing info for several + points, "xother" will be added to those with different + x positions from the first point. An underscore before + or after "(x|y)other" will add a space on that side, + only when this field is shown. Numbers are formatted + using d3-format's syntax %{variable:d3-format}, for + example "Price: %{y:$.2f}". + https://github.com/d3/d3-format/tree/v1.4.5#d3-format + for details on the formatting syntax. Dates are + formatted using d3-time-format's syntax + %{variable|d3-time-format}, for example "Day: + %{2019-01-01|%A}". https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format for details on the + date formatting syntax. Variables that can't be found + will be replaced with the specifier. For example, a + template of "data: %{x}, %{y}" will result in a value + of "data: 1, %{y}" if x is 1 and y is missing. + Variables with an undefined value will be replaced with + the fallback value. The variables available in + `hovertemplate` are the ones emitted as event data + described at this link + https://plotly.com/javascript/plotlyjs-events/#event- + data. Additionally, all attributes that can be + specified per-point (the ones that are `arrayOk: true`) + are available. Finally, the template string has access + to variable `properties` Anything contained in tag + `` is displayed in the secondary box, for + example `%{fullData.name}`. To hide the + secondary box completely, use an empty tag + ``. + hovertemplatefallback + Fallback string that's displayed when a variable + referenced in a template is missing. If the boolean + value 'false' is passed in, the specifier with the + missing variable will be displayed. + hovertemplatesrc + Sets the source reference on Chart Studio Cloud for + `hovertemplate`. + hovertext + Same as `text`. + hovertextsrc + Sets the source reference on Chart Studio Cloud for + `hovertext`. + ids + Assigns id labels to each datum. These ids for object + constancy of data points during animation. Should be an + array of strings, not numbers or any other type. + idssrc + Sets the source reference on Chart Studio Cloud for + `ids`. + legend + Sets the reference to a legend to show this trace in. + References to these legends are "legend", "legend2", + "legend3", etc. Settings for these legends are set in + the layout, under `layout.legend`, `layout.legend2`, + etc. + legendgroup + Sets the legend group for this trace. Traces and shapes + part of the same legend group hide/show at the same + time when toggling legend items. + legendgrouptitle + :class:`plotly.graph_objects.choroplethmapbox.Legendgro + uptitle` instance or dict with compatible properties + legendrank + Sets the legend rank for this trace. Items and groups + with smaller ranks are presented on top/left side while + with "reversed" `legend.traceorder` they are on + bottom/right side. The default legendrank is 1000, so + that you can use ranks less than 1000 to place certain + items before all unranked items, and ranks greater than + 1000 to go after all unranked items. When having + unranked or equal rank items shapes would be displayed + after traces i.e. according to their order in data and + layout. + legendwidth + Sets the width (in px or fraction) of the legend for + this trace. + locations + Sets which features found in "geojson" to plot using + their feature `id` field. + locationssrc + Sets the source reference on Chart Studio Cloud for + `locations`. + marker + :class:`plotly.graph_objects.choroplethmapbox.Marker` + instance or dict with compatible properties + meta + Assigns extra meta information associated with this + trace that can be used in various text attributes. + Attributes such as trace `name`, graph, axis and + colorbar `title.text`, annotation `text` + `rangeselector`, `updatemenues` and `sliders` `label` + text all support `meta`. To access the trace `meta` + values in an attribute in the same trace, simply use + `%{meta[i]}` where `i` is the index or key of the + `meta` item in question. To access trace `meta` in + layout attributes, use `%{data[n[.meta[i]}` where `i` + is the index or key of the `meta` and `n` is the trace + index. + metasrc + Sets the source reference on Chart Studio Cloud for + `meta`. + name + Sets the trace name. The trace name appears as the + legend item and on hover. + reversescale + Reverses the color mapping if true. If true, `zmin` + will correspond to the last color in the array and + `zmax` will correspond to the first color. + selected + :class:`plotly.graph_objects.choroplethmapbox.Selected` + instance or dict with compatible properties + selectedpoints + Array containing integer indices of selected points. + Has an effect only for traces that support selections. + Note that an empty array means an empty selection where + the `unselected` are turned on for all points, whereas, + any other non-array values means no selection all where + the `selected` and `unselected` styles have no effect. + showlegend + Determines whether or not an item corresponding to this + trace is shown in the legend. + showscale + Determines whether or not a colorbar is displayed for + this trace. + stream + :class:`plotly.graph_objects.choroplethmapbox.Stream` + instance or dict with compatible properties + subplot + mapbox subplots and traces are deprecated! Please + consider switching to `map` subplots and traces. Learn + more at: https://plotly.com/python/maplibre-migration/ + as well as https://plotly.com/javascript/maplibre- + migration/ Sets a reference between this trace's data + coordinates and a mapbox subplot. If "mapbox" (the + default value), the data refer to `layout.mapbox`. If + "mapbox2", the data refer to `layout.mapbox2`, and so + on. + text + Sets the text elements associated with each location. + textsrc + Sets the source reference on Chart Studio Cloud for + `text`. + uid + Assign an id to this trace, Use this to provide object + constancy between traces during animations and + transitions. + uirevision + Controls persistence of some user-driven changes to the + trace: `constraintrange` in `parcoords` traces, as well + as some `editable: true` modifications such as `name` + and `colorbar.title`. Defaults to `layout.uirevision`. + Note that other user-driven trace attribute changes are + controlled by `layout` attributes: `trace.visible` is + controlled by `layout.legend.uirevision`, + `selectedpoints` is controlled by + `layout.selectionrevision`, and `colorbar.(x|y)` + (accessible with `config: {editable: true}`) is + controlled by `layout.editrevision`. Trace changes are + tracked by `uid`, which only falls back on trace index + if no `uid` is provided. So if your app can add/remove + traces before the end of the `data` array, such that + the same trace has a different index, you can still + preserve user-driven changes if you give each trace a + `uid` that stays with it as it moves. + unselected + :class:`plotly.graph_objects.choroplethmapbox.Unselecte + d` instance or dict with compatible properties + visible + Determines whether or not this trace is visible. If + "legendonly", the trace is not drawn, but can appear as + a legend item (provided that the legend itself is + visible). + z + Sets the color values. + zauto + Determines whether or not the color domain is computed + with respect to the input data (here in `z`) or the + bounds set in `zmin` and `zmax` Defaults to `false` + when `zmin` and `zmax` are set by the user. + zmax + Sets the upper bound of the color domain. Value should + have the same units as in `z` and if set, `zmin` must + be set as well. + zmid + Sets the mid-point of the color domain by scaling + `zmin` and/or `zmax` to be equidistant to this point. + Value should have the same units as in `z`. Has no + effect when `zauto` is `false`. + zmin + Sets the lower bound of the color domain. Value should + have the same units as in `z` and if set, `zmax` must + be set as well. + zsrc + Sets the source reference on Chart Studio Cloud for + `z`. + + Returns + ------- + Choroplethmapbox + """ + super().__init__("choroplethmapbox") + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + if arg is None: + arg = {} + elif isinstance(arg, self.__class__): + arg = arg.to_plotly_json() + elif isinstance(arg, dict): + arg = _copy.copy(arg) + else: + raise ValueError("""\ +The first argument to the plotly.graph_objs.Choroplethmapbox +constructor must be a dict or +an instance of :class:`plotly.graph_objs.Choroplethmapbox`""") + + self._skip_invalid = kwargs.pop("skip_invalid", False) + self._validate = kwargs.pop("_validate", True) + + self._set_property("autocolorscale", arg, autocolorscale) + self._set_property("below", arg, below) + self._set_property("coloraxis", arg, coloraxis) + self._set_property("colorbar", arg, colorbar) + self._set_property("colorscale", arg, colorscale) + self._set_property("customdata", arg, customdata) + self._set_property("customdatasrc", arg, customdatasrc) + self._set_property("featureidkey", arg, featureidkey) + self._set_property("geojson", arg, geojson) + self._set_property("hoverinfo", arg, hoverinfo) + self._set_property("hoverinfosrc", arg, hoverinfosrc) + self._set_property("hoverlabel", arg, hoverlabel) + self._set_property("hovertemplate", arg, hovertemplate) + self._set_property("hovertemplatefallback", arg, hovertemplatefallback) + self._set_property("hovertemplatesrc", arg, hovertemplatesrc) + self._set_property("hovertext", arg, hovertext) + self._set_property("hovertextsrc", arg, hovertextsrc) + self._set_property("ids", arg, ids) + self._set_property("idssrc", arg, idssrc) + self._set_property("legend", arg, legend) + self._set_property("legendgroup", arg, legendgroup) + self._set_property("legendgrouptitle", arg, legendgrouptitle) + self._set_property("legendrank", arg, legendrank) + self._set_property("legendwidth", arg, legendwidth) + self._set_property("locations", arg, locations) + self._set_property("locationssrc", arg, locationssrc) + self._set_property("marker", arg, marker) + self._set_property("meta", arg, meta) + self._set_property("metasrc", arg, metasrc) + self._set_property("name", arg, name) + self._set_property("reversescale", arg, reversescale) + self._set_property("selected", arg, selected) + self._set_property("selectedpoints", arg, selectedpoints) + self._set_property("showlegend", arg, showlegend) + self._set_property("showscale", arg, showscale) + self._set_property("stream", arg, stream) + self._set_property("subplot", arg, subplot) + self._set_property("text", arg, text) + self._set_property("textsrc", arg, textsrc) + self._set_property("uid", arg, uid) + self._set_property("uirevision", arg, uirevision) + self._set_property("unselected", arg, unselected) + self._set_property("visible", arg, visible) + self._set_property("z", arg, z) + self._set_property("zauto", arg, zauto) + self._set_property("zmax", arg, zmax) + self._set_property("zmid", arg, zmid) + self._set_property("zmin", arg, zmin) + self._set_property("zsrc", arg, zsrc) + + self._props["type"] = "choroplethmapbox" + arg.pop("type", None) + self._process_kwargs(**dict(arg, **kwargs)) + self._skip_invalid = False + + warnings.warn( + "*choroplethmapbox* is deprecated!" + + " Use *choroplethmap* instead." + + " Learn more at: https://plotly.com/python/mapbox-to-maplibre/", + stacklevel=2, + category=DeprecationWarning, + ) diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/_cone.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/_cone.py new file mode 100644 index 0000000000000000000000000000000000000000..29de7ce02f997c8c8b81bad2626e3f1c34375a26 --- /dev/null +++ b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/_cone.py @@ -0,0 +1,2309 @@ +# --- THIS FILE IS AUTO-GENERATED --- +# Modifications will be overwitten the next time code generation run. + +from plotly.basedatatypes import BaseTraceType as _BaseTraceType +import copy as _copy + + +class Cone(_BaseTraceType): + _parent_path_str = "" + _path_str = "cone" + _valid_props = { + "anchor", + "autocolorscale", + "cauto", + "cmax", + "cmid", + "cmin", + "coloraxis", + "colorbar", + "colorscale", + "customdata", + "customdatasrc", + "hoverinfo", + "hoverinfosrc", + "hoverlabel", + "hovertemplate", + "hovertemplatefallback", + "hovertemplatesrc", + "hovertext", + "hovertextsrc", + "ids", + "idssrc", + "legend", + "legendgroup", + "legendgrouptitle", + "legendrank", + "legendwidth", + "lighting", + "lightposition", + "meta", + "metasrc", + "name", + "opacity", + "reversescale", + "scene", + "showlegend", + "showscale", + "sizemode", + "sizeref", + "stream", + "text", + "textsrc", + "type", + "u", + "uhoverformat", + "uid", + "uirevision", + "usrc", + "v", + "vhoverformat", + "visible", + "vsrc", + "w", + "whoverformat", + "wsrc", + "x", + "xhoverformat", + "xsrc", + "y", + "yhoverformat", + "ysrc", + "z", + "zhoverformat", + "zsrc", + } + + @property + def anchor(self): + """ + Sets the cones' anchor with respect to their x/y/z positions. + Note that "cm" denote the cone's center of mass which + corresponds to 1/4 from the tail to tip. + + The 'anchor' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['tip', 'tail', 'cm', 'center'] + + Returns + ------- + Any + """ + return self["anchor"] + + @anchor.setter + def anchor(self, val): + self["anchor"] = val + + @property + def autocolorscale(self): + """ + Determines whether the colorscale is a default palette + (`autocolorscale: true`) or the palette determined by + `colorscale`. In case `colorscale` is unspecified or + `autocolorscale` is true, the default palette will be chosen + according to whether numbers in the `color` array are all + positive, all negative or mixed. + + The 'autocolorscale' property is a boolean and must be specified as: + - A boolean value: True or False + + Returns + ------- + bool + """ + return self["autocolorscale"] + + @autocolorscale.setter + def autocolorscale(self, val): + self["autocolorscale"] = val + + @property + def cauto(self): + """ + Determines whether or not the color domain is computed with + respect to the input data (here u/v/w norm) or the bounds set + in `cmin` and `cmax` Defaults to `false` when `cmin` and `cmax` + are set by the user. + + The 'cauto' property is a boolean and must be specified as: + - A boolean value: True or False + + Returns + ------- + bool + """ + return self["cauto"] + + @cauto.setter + def cauto(self, val): + self["cauto"] = val + + @property + def cmax(self): + """ + Sets the upper bound of the color domain. Value should have the + same units as u/v/w norm and if set, `cmin` must be set as + well. + + The 'cmax' property is a number and may be specified as: + - An int or float + + Returns + ------- + int|float + """ + return self["cmax"] + + @cmax.setter + def cmax(self, val): + self["cmax"] = val + + @property + def cmid(self): + """ + Sets the mid-point of the color domain by scaling `cmin` and/or + `cmax` to be equidistant to this point. Value should have the + same units as u/v/w norm. Has no effect when `cauto` is + `false`. + + The 'cmid' property is a number and may be specified as: + - An int or float + + Returns + ------- + int|float + """ + return self["cmid"] + + @cmid.setter + def cmid(self, val): + self["cmid"] = val + + @property + def cmin(self): + """ + Sets the lower bound of the color domain. Value should have the + same units as u/v/w norm and if set, `cmax` must be set as + well. + + The 'cmin' property is a number and may be specified as: + - An int or float + + Returns + ------- + int|float + """ + return self["cmin"] + + @cmin.setter + def cmin(self, val): + self["cmin"] = val + + @property + def coloraxis(self): + """ + Sets a reference to a shared color axis. References to these + shared color axes are "coloraxis", "coloraxis2", "coloraxis3", + etc. Settings for these shared color axes are set in the + layout, under `layout.coloraxis`, `layout.coloraxis2`, etc. + Note that multiple color scales can be linked to the same color + axis. + + The 'coloraxis' property is an identifier of a particular + subplot, of type 'coloraxis', that may be specified as: + - the string 'coloraxis' optionally followed by an integer >= 1 + (e.g. 'coloraxis', 'coloraxis1', 'coloraxis2', 'coloraxis3', etc.) + + Returns + ------- + str + """ + return self["coloraxis"] + + @coloraxis.setter + def coloraxis(self, val): + self["coloraxis"] = val + + @property + def colorbar(self): + """ + The 'colorbar' property is an instance of ColorBar + that may be specified as: + - An instance of :class:`plotly.graph_objs.cone.ColorBar` + - A dict of string/value properties that will be passed + to the ColorBar constructor + + Returns + ------- + plotly.graph_objs.cone.ColorBar + """ + return self["colorbar"] + + @colorbar.setter + def colorbar(self, val): + self["colorbar"] = val + + @property + def colorscale(self): + """ + Sets the colorscale. The colorscale must be an array containing + arrays mapping a normalized value to an rgb, rgba, hex, hsl, + hsv, or named color string. At minimum, a mapping for the + lowest (0) and highest (1) values are required. For example, + `[[0, 'rgb(0,0,255)'], [1, 'rgb(255,0,0)']]`. To control the + bounds of the colorscale in color space, use `cmin` and `cmax`. + Alternatively, `colorscale` may be a palette name string of the + following list: Blackbody,Bluered,Blues,Cividis,Earth,Electric, + Greens,Greys,Hot,Jet,Picnic,Portland,Rainbow,RdBu,Reds,Viridis, + YlGnBu,YlOrRd. + + The 'colorscale' property is a colorscale and may be + specified as: + - A list of colors that will be spaced evenly to create the colorscale. + Many predefined colorscale lists are included in the sequential, diverging, + and cyclical modules in the plotly.colors package. + - A list of 2-element lists where the first element is the + normalized color level value (starting at 0 and ending at 1), + and the second item is a valid color string. + (e.g. [[0, 'green'], [0.5, 'red'], [1.0, 'rgb(0, 0, 255)']]) + - One of the following named colorscales: + ['aggrnyl', 'agsunset', 'algae', 'amp', 'armyrose', 'balance', + 'blackbody', 'bluered', 'blues', 'blugrn', 'bluyl', 'brbg', + 'brwnyl', 'bugn', 'bupu', 'burg', 'burgyl', 'cividis', 'curl', + 'darkmint', 'deep', 'delta', 'dense', 'earth', 'edge', 'electric', + 'emrld', 'fall', 'geyser', 'gnbu', 'gray', 'greens', 'greys', + 'haline', 'hot', 'hsv', 'ice', 'icefire', 'inferno', 'jet', + 'magenta', 'magma', 'matter', 'mint', 'mrybm', 'mygbm', 'oranges', + 'orrd', 'oryel', 'oxy', 'peach', 'phase', 'picnic', 'pinkyl', + 'piyg', 'plasma', 'plotly3', 'portland', 'prgn', 'pubu', 'pubugn', + 'puor', 'purd', 'purp', 'purples', 'purpor', 'rainbow', 'rdbu', + 'rdgy', 'rdpu', 'rdylbu', 'rdylgn', 'redor', 'reds', 'solar', + 'spectral', 'speed', 'sunset', 'sunsetdark', 'teal', 'tealgrn', + 'tealrose', 'tempo', 'temps', 'thermal', 'tropic', 'turbid', + 'turbo', 'twilight', 'viridis', 'ylgn', 'ylgnbu', 'ylorbr', + 'ylorrd']. + Appending '_r' to a named colorscale reverses it. + + Returns + ------- + str + """ + return self["colorscale"] + + @colorscale.setter + def colorscale(self, val): + self["colorscale"] = val + + @property + def customdata(self): + """ + Assigns extra data each datum. This may be useful when + listening to hover, click and selection events. Note that, + "scatter" traces also appends customdata items in the markers + DOM elements + + The 'customdata' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["customdata"] + + @customdata.setter + def customdata(self, val): + self["customdata"] = val + + @property + def customdatasrc(self): + """ + Sets the source reference on Chart Studio Cloud for + `customdata`. + + The 'customdatasrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["customdatasrc"] + + @customdatasrc.setter + def customdatasrc(self, val): + self["customdatasrc"] = val + + @property + def hoverinfo(self): + """ + Determines which trace information appear on hover. If `none` + or `skip` are set, no information is displayed upon hovering. + But, if `none` is set, click and hover events are still fired. + + The 'hoverinfo' property is a flaglist and may be specified + as a string containing: + - Any combination of ['x', 'y', 'z', 'u', 'v', 'w', 'norm', 'text', 'name'] joined with '+' characters + (e.g. 'x+y') + OR exactly one of ['all', 'none', 'skip'] (e.g. 'skip') + - A list or array of the above + + Returns + ------- + Any|numpy.ndarray + """ + return self["hoverinfo"] + + @hoverinfo.setter + def hoverinfo(self, val): + self["hoverinfo"] = val + + @property + def hoverinfosrc(self): + """ + Sets the source reference on Chart Studio Cloud for + `hoverinfo`. + + The 'hoverinfosrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["hoverinfosrc"] + + @hoverinfosrc.setter + def hoverinfosrc(self, val): + self["hoverinfosrc"] = val + + @property + def hoverlabel(self): + """ + The 'hoverlabel' property is an instance of Hoverlabel + that may be specified as: + - An instance of :class:`plotly.graph_objs.cone.Hoverlabel` + - A dict of string/value properties that will be passed + to the Hoverlabel constructor + + Returns + ------- + plotly.graph_objs.cone.Hoverlabel + """ + return self["hoverlabel"] + + @hoverlabel.setter + def hoverlabel(self, val): + self["hoverlabel"] = val + + @property + def hovertemplate(self): + """ + Template string used for rendering the information that appear + on hover box. Note that this will override `hoverinfo`. + Variables are inserted using %{variable}, for example "y: %{y}" + as well as %{xother}, {%_xother}, {%_xother_}, {%xother_}. When + showing info for several points, "xother" will be added to + those with different x positions from the first point. An + underscore before or after "(x|y)other" will add a space on + that side, only when this field is shown. Numbers are formatted + using d3-format's syntax %{variable:d3-format}, for example + "Price: %{y:$.2f}". + https://github.com/d3/d3-format/tree/v1.4.5#d3-format for + details on the formatting syntax. Dates are formatted using + d3-time-format's syntax %{variable|d3-time-format}, for example + "Day: %{2019-01-01|%A}". https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format for details on the date + formatting syntax. Variables that can't be found will be + replaced with the specifier. For example, a template of "data: + %{x}, %{y}" will result in a value of "data: 1, %{y}" if x is 1 + and y is missing. Variables with an undefined value will be + replaced with the fallback value. The variables available in + `hovertemplate` are the ones emitted as event data described at + this link https://plotly.com/javascript/plotlyjs-events/#event- + data. Additionally, all attributes that can be specified per- + point (the ones that are `arrayOk: true`) are available. + Finally, the template string has access to variable `norm` + Anything contained in tag `` is displayed in the + secondary box, for example `%{fullData.name}`. + To hide the secondary box completely, use an empty tag + ``. + + The 'hovertemplate' property is a string and must be specified as: + - A string + - A number that will be converted to a string + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["hovertemplate"] + + @hovertemplate.setter + def hovertemplate(self, val): + self["hovertemplate"] = val + + @property + def hovertemplatefallback(self): + """ + Fallback string that's displayed when a variable referenced in + a template is missing. If the boolean value 'false' is passed + in, the specifier with the missing variable will be displayed. + + The 'hovertemplatefallback' property accepts values of any type + + Returns + ------- + Any + """ + return self["hovertemplatefallback"] + + @hovertemplatefallback.setter + def hovertemplatefallback(self, val): + self["hovertemplatefallback"] = val + + @property + def hovertemplatesrc(self): + """ + Sets the source reference on Chart Studio Cloud for + `hovertemplate`. + + The 'hovertemplatesrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["hovertemplatesrc"] + + @hovertemplatesrc.setter + def hovertemplatesrc(self, val): + self["hovertemplatesrc"] = val + + @property + def hovertext(self): + """ + Same as `text`. + + The 'hovertext' property is a string and must be specified as: + - A string + - A number that will be converted to a string + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["hovertext"] + + @hovertext.setter + def hovertext(self, val): + self["hovertext"] = val + + @property + def hovertextsrc(self): + """ + Sets the source reference on Chart Studio Cloud for + `hovertext`. + + The 'hovertextsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["hovertextsrc"] + + @hovertextsrc.setter + def hovertextsrc(self, val): + self["hovertextsrc"] = val + + @property + def ids(self): + """ + Assigns id labels to each datum. These ids for object constancy + of data points during animation. Should be an array of strings, + not numbers or any other type. + + The 'ids' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["ids"] + + @ids.setter + def ids(self, val): + self["ids"] = val + + @property + def idssrc(self): + """ + Sets the source reference on Chart Studio Cloud for `ids`. + + The 'idssrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["idssrc"] + + @idssrc.setter + def idssrc(self, val): + self["idssrc"] = val + + @property + def legend(self): + """ + Sets the reference to a legend to show this trace in. + References to these legends are "legend", "legend2", "legend3", + etc. Settings for these legends are set in the layout, under + `layout.legend`, `layout.legend2`, etc. + + The 'legend' property is an identifier of a particular + subplot, of type 'legend', that may be specified as: + - the string 'legend' optionally followed by an integer >= 1 + (e.g. 'legend', 'legend1', 'legend2', 'legend3', etc.) + + Returns + ------- + str + """ + return self["legend"] + + @legend.setter + def legend(self, val): + self["legend"] = val + + @property + def legendgroup(self): + """ + Sets the legend group for this trace. Traces and shapes part of + the same legend group hide/show at the same time when toggling + legend items. + + The 'legendgroup' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["legendgroup"] + + @legendgroup.setter + def legendgroup(self, val): + self["legendgroup"] = val + + @property + def legendgrouptitle(self): + """ + The 'legendgrouptitle' property is an instance of Legendgrouptitle + that may be specified as: + - An instance of :class:`plotly.graph_objs.cone.Legendgrouptitle` + - A dict of string/value properties that will be passed + to the Legendgrouptitle constructor + + Returns + ------- + plotly.graph_objs.cone.Legendgrouptitle + """ + return self["legendgrouptitle"] + + @legendgrouptitle.setter + def legendgrouptitle(self, val): + self["legendgrouptitle"] = val + + @property + def legendrank(self): + """ + Sets the legend rank for this trace. Items and groups with + smaller ranks are presented on top/left side while with + "reversed" `legend.traceorder` they are on bottom/right side. + The default legendrank is 1000, so that you can use ranks less + than 1000 to place certain items before all unranked items, and + ranks greater than 1000 to go after all unranked items. When + having unranked or equal rank items shapes would be displayed + after traces i.e. according to their order in data and layout. + + The 'legendrank' property is a number and may be specified as: + - An int or float + + Returns + ------- + int|float + """ + return self["legendrank"] + + @legendrank.setter + def legendrank(self, val): + self["legendrank"] = val + + @property + def legendwidth(self): + """ + Sets the width (in px or fraction) of the legend for this + trace. + + The 'legendwidth' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["legendwidth"] + + @legendwidth.setter + def legendwidth(self, val): + self["legendwidth"] = val + + @property + def lighting(self): + """ + The 'lighting' property is an instance of Lighting + that may be specified as: + - An instance of :class:`plotly.graph_objs.cone.Lighting` + - A dict of string/value properties that will be passed + to the Lighting constructor + + Returns + ------- + plotly.graph_objs.cone.Lighting + """ + return self["lighting"] + + @lighting.setter + def lighting(self, val): + self["lighting"] = val + + @property + def lightposition(self): + """ + The 'lightposition' property is an instance of Lightposition + that may be specified as: + - An instance of :class:`plotly.graph_objs.cone.Lightposition` + - A dict of string/value properties that will be passed + to the Lightposition constructor + + Returns + ------- + plotly.graph_objs.cone.Lightposition + """ + return self["lightposition"] + + @lightposition.setter + def lightposition(self, val): + self["lightposition"] = val + + @property + def meta(self): + """ + Assigns extra meta information associated with this trace that + can be used in various text attributes. Attributes such as + trace `name`, graph, axis and colorbar `title.text`, annotation + `text` `rangeselector`, `updatemenues` and `sliders` `label` + text all support `meta`. To access the trace `meta` values in + an attribute in the same trace, simply use `%{meta[i]}` where + `i` is the index or key of the `meta` item in question. To + access trace `meta` in layout attributes, use + `%{data[n[.meta[i]}` where `i` is the index or key of the + `meta` and `n` is the trace index. + + The 'meta' property accepts values of any type + + Returns + ------- + Any|numpy.ndarray + """ + return self["meta"] + + @meta.setter + def meta(self, val): + self["meta"] = val + + @property + def metasrc(self): + """ + Sets the source reference on Chart Studio Cloud for `meta`. + + The 'metasrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["metasrc"] + + @metasrc.setter + def metasrc(self, val): + self["metasrc"] = val + + @property + def name(self): + """ + Sets the trace name. The trace name appears as the legend item + and on hover. + + The 'name' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["name"] + + @name.setter + def name(self, val): + self["name"] = val + + @property + def opacity(self): + """ + Sets the opacity of the surface. Please note that in the case + of using high `opacity` values for example a value greater than + or equal to 0.5 on two surfaces (and 0.25 with four surfaces), + an overlay of multiple transparent surfaces may not perfectly + be sorted in depth by the webgl API. This behavior may be + improved in the near future and is subject to change. + + The 'opacity' property is a number and may be specified as: + - An int or float in the interval [0, 1] + + Returns + ------- + int|float + """ + return self["opacity"] + + @opacity.setter + def opacity(self, val): + self["opacity"] = val + + @property + def reversescale(self): + """ + Reverses the color mapping if true. If true, `cmin` will + correspond to the last color in the array and `cmax` will + correspond to the first color. + + The 'reversescale' property is a boolean and must be specified as: + - A boolean value: True or False + + Returns + ------- + bool + """ + return self["reversescale"] + + @reversescale.setter + def reversescale(self, val): + self["reversescale"] = val + + @property + def scene(self): + """ + Sets a reference between this trace's 3D coordinate system and + a 3D scene. If "scene" (the default value), the (x,y,z) + coordinates refer to `layout.scene`. If "scene2", the (x,y,z) + coordinates refer to `layout.scene2`, and so on. + + The 'scene' property is an identifier of a particular + subplot, of type 'scene', that may be specified as: + - the string 'scene' optionally followed by an integer >= 1 + (e.g. 'scene', 'scene1', 'scene2', 'scene3', etc.) + + Returns + ------- + str + """ + return self["scene"] + + @scene.setter + def scene(self, val): + self["scene"] = val + + @property + def showlegend(self): + """ + Determines whether or not an item corresponding to this trace + is shown in the legend. + + The 'showlegend' property is a boolean and must be specified as: + - A boolean value: True or False + + Returns + ------- + bool + """ + return self["showlegend"] + + @showlegend.setter + def showlegend(self, val): + self["showlegend"] = val + + @property + def showscale(self): + """ + Determines whether or not a colorbar is displayed for this + trace. + + The 'showscale' property is a boolean and must be specified as: + - A boolean value: True or False + + Returns + ------- + bool + """ + return self["showscale"] + + @showscale.setter + def showscale(self, val): + self["showscale"] = val + + @property + def sizemode(self): + """ + Determines whether `sizeref` is set as a "scaled" (i.e + unitless) scalar (normalized by the max u/v/w norm in the + vector field) or as "absolute" value (in the same units as the + vector field). To display sizes in actual vector length use + "raw". + + The 'sizemode' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['scaled', 'absolute', 'raw'] + + Returns + ------- + Any + """ + return self["sizemode"] + + @sizemode.setter + def sizemode(self, val): + self["sizemode"] = val + + @property + def sizeref(self): + """ + Adjusts the cone size scaling. The size of the cones is + determined by their u/v/w norm multiplied a factor and + `sizeref`. This factor (computed internally) corresponds to the + minimum "time" to travel across two successive x/y/z positions + at the average velocity of those two successive positions. All + cones in a given trace use the same factor. With `sizemode` set + to "raw", its default value is 1. With `sizemode` set to + "scaled", `sizeref` is unitless, its default value is 0.5. With + `sizemode` set to "absolute", `sizeref` has the same units as + the u/v/w vector field, its the default value is half the + sample's maximum vector norm. + + The 'sizeref' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["sizeref"] + + @sizeref.setter + def sizeref(self, val): + self["sizeref"] = val + + @property + def stream(self): + """ + The 'stream' property is an instance of Stream + that may be specified as: + - An instance of :class:`plotly.graph_objs.cone.Stream` + - A dict of string/value properties that will be passed + to the Stream constructor + + Returns + ------- + plotly.graph_objs.cone.Stream + """ + return self["stream"] + + @stream.setter + def stream(self, val): + self["stream"] = val + + @property + def text(self): + """ + Sets the text elements associated with the cones. If trace + `hoverinfo` contains a "text" flag and "hovertext" is not set, + these elements will be seen in the hover labels. + + The 'text' property is a string and must be specified as: + - A string + - A number that will be converted to a string + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["text"] + + @text.setter + def text(self, val): + self["text"] = val + + @property + def textsrc(self): + """ + Sets the source reference on Chart Studio Cloud for `text`. + + The 'textsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["textsrc"] + + @textsrc.setter + def textsrc(self, val): + self["textsrc"] = val + + @property + def u(self): + """ + Sets the x components of the vector field. + + The 'u' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["u"] + + @u.setter + def u(self, val): + self["u"] = val + + @property + def uhoverformat(self): + """ + Sets the hover text formatting rulefor `u` using d3 formatting + mini-languages which are very similar to those in Python. For + numbers, see: + https://github.com/d3/d3-format/tree/v1.4.5#d3-format.By + default the values are formatted using generic number format. + + The 'uhoverformat' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["uhoverformat"] + + @uhoverformat.setter + def uhoverformat(self, val): + self["uhoverformat"] = val + + @property + def uid(self): + """ + Assign an id to this trace, Use this to provide object + constancy between traces during animations and transitions. + + The 'uid' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["uid"] + + @uid.setter + def uid(self, val): + self["uid"] = val + + @property + def uirevision(self): + """ + Controls persistence of some user-driven changes to the trace: + `constraintrange` in `parcoords` traces, as well as some + `editable: true` modifications such as `name` and + `colorbar.title`. Defaults to `layout.uirevision`. Note that + other user-driven trace attribute changes are controlled by + `layout` attributes: `trace.visible` is controlled by + `layout.legend.uirevision`, `selectedpoints` is controlled by + `layout.selectionrevision`, and `colorbar.(x|y)` (accessible + with `config: {editable: true}`) is controlled by + `layout.editrevision`. Trace changes are tracked by `uid`, + which only falls back on trace index if no `uid` is provided. + So if your app can add/remove traces before the end of the + `data` array, such that the same trace has a different index, + you can still preserve user-driven changes if you give each + trace a `uid` that stays with it as it moves. + + The 'uirevision' property accepts values of any type + + Returns + ------- + Any + """ + return self["uirevision"] + + @uirevision.setter + def uirevision(self, val): + self["uirevision"] = val + + @property + def usrc(self): + """ + Sets the source reference on Chart Studio Cloud for `u`. + + The 'usrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["usrc"] + + @usrc.setter + def usrc(self, val): + self["usrc"] = val + + @property + def v(self): + """ + Sets the y components of the vector field. + + The 'v' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["v"] + + @v.setter + def v(self, val): + self["v"] = val + + @property + def vhoverformat(self): + """ + Sets the hover text formatting rulefor `v` using d3 formatting + mini-languages which are very similar to those in Python. For + numbers, see: + https://github.com/d3/d3-format/tree/v1.4.5#d3-format.By + default the values are formatted using generic number format. + + The 'vhoverformat' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["vhoverformat"] + + @vhoverformat.setter + def vhoverformat(self, val): + self["vhoverformat"] = val + + @property + def visible(self): + """ + Determines whether or not this trace is visible. If + "legendonly", the trace is not drawn, but can appear as a + legend item (provided that the legend itself is visible). + + The 'visible' property is an enumeration that may be specified as: + - One of the following enumeration values: + [True, False, 'legendonly'] + + Returns + ------- + Any + """ + return self["visible"] + + @visible.setter + def visible(self, val): + self["visible"] = val + + @property + def vsrc(self): + """ + Sets the source reference on Chart Studio Cloud for `v`. + + The 'vsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["vsrc"] + + @vsrc.setter + def vsrc(self, val): + self["vsrc"] = val + + @property + def w(self): + """ + Sets the z components of the vector field. + + The 'w' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["w"] + + @w.setter + def w(self, val): + self["w"] = val + + @property + def whoverformat(self): + """ + Sets the hover text formatting rulefor `w` using d3 formatting + mini-languages which are very similar to those in Python. For + numbers, see: + https://github.com/d3/d3-format/tree/v1.4.5#d3-format.By + default the values are formatted using generic number format. + + The 'whoverformat' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["whoverformat"] + + @whoverformat.setter + def whoverformat(self, val): + self["whoverformat"] = val + + @property + def wsrc(self): + """ + Sets the source reference on Chart Studio Cloud for `w`. + + The 'wsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["wsrc"] + + @wsrc.setter + def wsrc(self, val): + self["wsrc"] = val + + @property + def x(self): + """ + Sets the x coordinates of the vector field and of the displayed + cones. + + The 'x' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["x"] + + @x.setter + def x(self, val): + self["x"] = val + + @property + def xhoverformat(self): + """ + Sets the hover text formatting rulefor `x` using d3 formatting + mini-languages which are very similar to those in Python. For + numbers, see: + https://github.com/d3/d3-format/tree/v1.4.5#d3-format. And for + dates see: https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format. We add two items to d3's date + formatter: "%h" for half of the year as a decimal number as + well as "%{n}f" for fractional seconds with n digits. For + example, *2016-10-13 09:15:23.456* with tickformat + "%H~%M~%S.%2f" would display *09~15~23.46*By default the values + are formatted using `xaxis.hoverformat`. + + The 'xhoverformat' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["xhoverformat"] + + @xhoverformat.setter + def xhoverformat(self, val): + self["xhoverformat"] = val + + @property + def xsrc(self): + """ + Sets the source reference on Chart Studio Cloud for `x`. + + The 'xsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["xsrc"] + + @xsrc.setter + def xsrc(self, val): + self["xsrc"] = val + + @property + def y(self): + """ + Sets the y coordinates of the vector field and of the displayed + cones. + + The 'y' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["y"] + + @y.setter + def y(self, val): + self["y"] = val + + @property + def yhoverformat(self): + """ + Sets the hover text formatting rulefor `y` using d3 formatting + mini-languages which are very similar to those in Python. For + numbers, see: + https://github.com/d3/d3-format/tree/v1.4.5#d3-format. And for + dates see: https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format. We add two items to d3's date + formatter: "%h" for half of the year as a decimal number as + well as "%{n}f" for fractional seconds with n digits. For + example, *2016-10-13 09:15:23.456* with tickformat + "%H~%M~%S.%2f" would display *09~15~23.46*By default the values + are formatted using `yaxis.hoverformat`. + + The 'yhoverformat' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["yhoverformat"] + + @yhoverformat.setter + def yhoverformat(self, val): + self["yhoverformat"] = val + + @property + def ysrc(self): + """ + Sets the source reference on Chart Studio Cloud for `y`. + + The 'ysrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["ysrc"] + + @ysrc.setter + def ysrc(self, val): + self["ysrc"] = val + + @property + def z(self): + """ + Sets the z coordinates of the vector field and of the displayed + cones. + + The 'z' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["z"] + + @z.setter + def z(self, val): + self["z"] = val + + @property + def zhoverformat(self): + """ + Sets the hover text formatting rulefor `z` using d3 formatting + mini-languages which are very similar to those in Python. For + numbers, see: + https://github.com/d3/d3-format/tree/v1.4.5#d3-format. And for + dates see: https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format. We add two items to d3's date + formatter: "%h" for half of the year as a decimal number as + well as "%{n}f" for fractional seconds with n digits. For + example, *2016-10-13 09:15:23.456* with tickformat + "%H~%M~%S.%2f" would display *09~15~23.46*By default the values + are formatted using `zaxis.hoverformat`. + + The 'zhoverformat' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["zhoverformat"] + + @zhoverformat.setter + def zhoverformat(self, val): + self["zhoverformat"] = val + + @property + def zsrc(self): + """ + Sets the source reference on Chart Studio Cloud for `z`. + + The 'zsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["zsrc"] + + @zsrc.setter + def zsrc(self, val): + self["zsrc"] = val + + @property + def type(self): + return self._props["type"] + + @property + def _prop_descriptions(self): + return """\ + anchor + Sets the cones' anchor with respect to their x/y/z + positions. Note that "cm" denote the cone's center of + mass which corresponds to 1/4 from the tail to tip. + autocolorscale + Determines whether the colorscale is a default palette + (`autocolorscale: true`) or the palette determined by + `colorscale`. In case `colorscale` is unspecified or + `autocolorscale` is true, the default palette will be + chosen according to whether numbers in the `color` + array are all positive, all negative or mixed. + cauto + Determines whether or not the color domain is computed + with respect to the input data (here u/v/w norm) or the + bounds set in `cmin` and `cmax` Defaults to `false` + when `cmin` and `cmax` are set by the user. + cmax + Sets the upper bound of the color domain. Value should + have the same units as u/v/w norm and if set, `cmin` + must be set as well. + cmid + Sets the mid-point of the color domain by scaling + `cmin` and/or `cmax` to be equidistant to this point. + Value should have the same units as u/v/w norm. Has no + effect when `cauto` is `false`. + cmin + Sets the lower bound of the color domain. Value should + have the same units as u/v/w norm and if set, `cmax` + must be set as well. + coloraxis + Sets a reference to a shared color axis. References to + these shared color axes are "coloraxis", "coloraxis2", + "coloraxis3", etc. Settings for these shared color axes + are set in the layout, under `layout.coloraxis`, + `layout.coloraxis2`, etc. Note that multiple color + scales can be linked to the same color axis. + colorbar + :class:`plotly.graph_objects.cone.ColorBar` instance or + dict with compatible properties + colorscale + Sets the colorscale. The colorscale must be an array + containing arrays mapping a normalized value to an rgb, + rgba, hex, hsl, hsv, or named color string. At minimum, + a mapping for the lowest (0) and highest (1) values are + required. For example, `[[0, 'rgb(0,0,255)'], [1, + 'rgb(255,0,0)']]`. To control the bounds of the + colorscale in color space, use `cmin` and `cmax`. + Alternatively, `colorscale` may be a palette name + string of the following list: Blackbody,Bluered,Blues,C + ividis,Earth,Electric,Greens,Greys,Hot,Jet,Picnic,Portl + and,Rainbow,RdBu,Reds,Viridis,YlGnBu,YlOrRd. + customdata + Assigns extra data each datum. This may be useful when + listening to hover, click and selection events. Note + that, "scatter" traces also appends customdata items in + the markers DOM elements + customdatasrc + Sets the source reference on Chart Studio Cloud for + `customdata`. + hoverinfo + Determines which trace information appear on hover. If + `none` or `skip` are set, no information is displayed + upon hovering. But, if `none` is set, click and hover + events are still fired. + hoverinfosrc + Sets the source reference on Chart Studio Cloud for + `hoverinfo`. + hoverlabel + :class:`plotly.graph_objects.cone.Hoverlabel` instance + or dict with compatible properties + hovertemplate + Template string used for rendering the information that + appear on hover box. Note that this will override + `hoverinfo`. Variables are inserted using %{variable}, + for example "y: %{y}" as well as %{xother}, {%_xother}, + {%_xother_}, {%xother_}. When showing info for several + points, "xother" will be added to those with different + x positions from the first point. An underscore before + or after "(x|y)other" will add a space on that side, + only when this field is shown. Numbers are formatted + using d3-format's syntax %{variable:d3-format}, for + example "Price: %{y:$.2f}". + https://github.com/d3/d3-format/tree/v1.4.5#d3-format + for details on the formatting syntax. Dates are + formatted using d3-time-format's syntax + %{variable|d3-time-format}, for example "Day: + %{2019-01-01|%A}". https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format for details on the + date formatting syntax. Variables that can't be found + will be replaced with the specifier. For example, a + template of "data: %{x}, %{y}" will result in a value + of "data: 1, %{y}" if x is 1 and y is missing. + Variables with an undefined value will be replaced with + the fallback value. The variables available in + `hovertemplate` are the ones emitted as event data + described at this link + https://plotly.com/javascript/plotlyjs-events/#event- + data. Additionally, all attributes that can be + specified per-point (the ones that are `arrayOk: true`) + are available. Finally, the template string has access + to variable `norm` Anything contained in tag `` + is displayed in the secondary box, for example + `%{fullData.name}`. To hide the + secondary box completely, use an empty tag + ``. + hovertemplatefallback + Fallback string that's displayed when a variable + referenced in a template is missing. If the boolean + value 'false' is passed in, the specifier with the + missing variable will be displayed. + hovertemplatesrc + Sets the source reference on Chart Studio Cloud for + `hovertemplate`. + hovertext + Same as `text`. + hovertextsrc + Sets the source reference on Chart Studio Cloud for + `hovertext`. + ids + Assigns id labels to each datum. These ids for object + constancy of data points during animation. Should be an + array of strings, not numbers or any other type. + idssrc + Sets the source reference on Chart Studio Cloud for + `ids`. + legend + Sets the reference to a legend to show this trace in. + References to these legends are "legend", "legend2", + "legend3", etc. Settings for these legends are set in + the layout, under `layout.legend`, `layout.legend2`, + etc. + legendgroup + Sets the legend group for this trace. Traces and shapes + part of the same legend group hide/show at the same + time when toggling legend items. + legendgrouptitle + :class:`plotly.graph_objects.cone.Legendgrouptitle` + instance or dict with compatible properties + legendrank + Sets the legend rank for this trace. Items and groups + with smaller ranks are presented on top/left side while + with "reversed" `legend.traceorder` they are on + bottom/right side. The default legendrank is 1000, so + that you can use ranks less than 1000 to place certain + items before all unranked items, and ranks greater than + 1000 to go after all unranked items. When having + unranked or equal rank items shapes would be displayed + after traces i.e. according to their order in data and + layout. + legendwidth + Sets the width (in px or fraction) of the legend for + this trace. + lighting + :class:`plotly.graph_objects.cone.Lighting` instance or + dict with compatible properties + lightposition + :class:`plotly.graph_objects.cone.Lightposition` + instance or dict with compatible properties + meta + Assigns extra meta information associated with this + trace that can be used in various text attributes. + Attributes such as trace `name`, graph, axis and + colorbar `title.text`, annotation `text` + `rangeselector`, `updatemenues` and `sliders` `label` + text all support `meta`. To access the trace `meta` + values in an attribute in the same trace, simply use + `%{meta[i]}` where `i` is the index or key of the + `meta` item in question. To access trace `meta` in + layout attributes, use `%{data[n[.meta[i]}` where `i` + is the index or key of the `meta` and `n` is the trace + index. + metasrc + Sets the source reference on Chart Studio Cloud for + `meta`. + name + Sets the trace name. The trace name appears as the + legend item and on hover. + opacity + Sets the opacity of the surface. Please note that in + the case of using high `opacity` values for example a + value greater than or equal to 0.5 on two surfaces (and + 0.25 with four surfaces), an overlay of multiple + transparent surfaces may not perfectly be sorted in + depth by the webgl API. This behavior may be improved + in the near future and is subject to change. + reversescale + Reverses the color mapping if true. If true, `cmin` + will correspond to the last color in the array and + `cmax` will correspond to the first color. + scene + Sets a reference between this trace's 3D coordinate + system and a 3D scene. If "scene" (the default value), + the (x,y,z) coordinates refer to `layout.scene`. If + "scene2", the (x,y,z) coordinates refer to + `layout.scene2`, and so on. + showlegend + Determines whether or not an item corresponding to this + trace is shown in the legend. + showscale + Determines whether or not a colorbar is displayed for + this trace. + sizemode + Determines whether `sizeref` is set as a "scaled" (i.e + unitless) scalar (normalized by the max u/v/w norm in + the vector field) or as "absolute" value (in the same + units as the vector field). To display sizes in actual + vector length use "raw". + sizeref + Adjusts the cone size scaling. The size of the cones is + determined by their u/v/w norm multiplied a factor and + `sizeref`. This factor (computed internally) + corresponds to the minimum "time" to travel across two + successive x/y/z positions at the average velocity of + those two successive positions. All cones in a given + trace use the same factor. With `sizemode` set to + "raw", its default value is 1. With `sizemode` set to + "scaled", `sizeref` is unitless, its default value is + 0.5. With `sizemode` set to "absolute", `sizeref` has + the same units as the u/v/w vector field, its the + default value is half the sample's maximum vector norm. + stream + :class:`plotly.graph_objects.cone.Stream` instance or + dict with compatible properties + text + Sets the text elements associated with the cones. If + trace `hoverinfo` contains a "text" flag and + "hovertext" is not set, these elements will be seen in + the hover labels. + textsrc + Sets the source reference on Chart Studio Cloud for + `text`. + u + Sets the x components of the vector field. + uhoverformat + Sets the hover text formatting rulefor `u` using d3 + formatting mini-languages which are very similar to + those in Python. For numbers, see: https://github.com/d + 3/d3-format/tree/v1.4.5#d3-format.By default the values + are formatted using generic number format. + uid + Assign an id to this trace, Use this to provide object + constancy between traces during animations and + transitions. + uirevision + Controls persistence of some user-driven changes to the + trace: `constraintrange` in `parcoords` traces, as well + as some `editable: true` modifications such as `name` + and `colorbar.title`. Defaults to `layout.uirevision`. + Note that other user-driven trace attribute changes are + controlled by `layout` attributes: `trace.visible` is + controlled by `layout.legend.uirevision`, + `selectedpoints` is controlled by + `layout.selectionrevision`, and `colorbar.(x|y)` + (accessible with `config: {editable: true}`) is + controlled by `layout.editrevision`. Trace changes are + tracked by `uid`, which only falls back on trace index + if no `uid` is provided. So if your app can add/remove + traces before the end of the `data` array, such that + the same trace has a different index, you can still + preserve user-driven changes if you give each trace a + `uid` that stays with it as it moves. + usrc + Sets the source reference on Chart Studio Cloud for + `u`. + v + Sets the y components of the vector field. + vhoverformat + Sets the hover text formatting rulefor `v` using d3 + formatting mini-languages which are very similar to + those in Python. For numbers, see: https://github.com/d + 3/d3-format/tree/v1.4.5#d3-format.By default the values + are formatted using generic number format. + visible + Determines whether or not this trace is visible. If + "legendonly", the trace is not drawn, but can appear as + a legend item (provided that the legend itself is + visible). + vsrc + Sets the source reference on Chart Studio Cloud for + `v`. + w + Sets the z components of the vector field. + whoverformat + Sets the hover text formatting rulefor `w` using d3 + formatting mini-languages which are very similar to + those in Python. For numbers, see: https://github.com/d + 3/d3-format/tree/v1.4.5#d3-format.By default the values + are formatted using generic number format. + wsrc + Sets the source reference on Chart Studio Cloud for + `w`. + x + Sets the x coordinates of the vector field and of the + displayed cones. + xhoverformat + Sets the hover text formatting rulefor `x` using d3 + formatting mini-languages which are very similar to + those in Python. For numbers, see: + https://github.com/d3/d3-format/tree/v1.4.5#d3-format. + And for dates see: https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format. We add two items to + d3's date formatter: "%h" for half of the year as a + decimal number as well as "%{n}f" for fractional + seconds with n digits. For example, *2016-10-13 + 09:15:23.456* with tickformat "%H~%M~%S.%2f" would + display *09~15~23.46*By default the values are + formatted using `xaxis.hoverformat`. + xsrc + Sets the source reference on Chart Studio Cloud for + `x`. + y + Sets the y coordinates of the vector field and of the + displayed cones. + yhoverformat + Sets the hover text formatting rulefor `y` using d3 + formatting mini-languages which are very similar to + those in Python. For numbers, see: + https://github.com/d3/d3-format/tree/v1.4.5#d3-format. + And for dates see: https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format. We add two items to + d3's date formatter: "%h" for half of the year as a + decimal number as well as "%{n}f" for fractional + seconds with n digits. For example, *2016-10-13 + 09:15:23.456* with tickformat "%H~%M~%S.%2f" would + display *09~15~23.46*By default the values are + formatted using `yaxis.hoverformat`. + ysrc + Sets the source reference on Chart Studio Cloud for + `y`. + z + Sets the z coordinates of the vector field and of the + displayed cones. + zhoverformat + Sets the hover text formatting rulefor `z` using d3 + formatting mini-languages which are very similar to + those in Python. For numbers, see: + https://github.com/d3/d3-format/tree/v1.4.5#d3-format. + And for dates see: https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format. We add two items to + d3's date formatter: "%h" for half of the year as a + decimal number as well as "%{n}f" for fractional + seconds with n digits. For example, *2016-10-13 + 09:15:23.456* with tickformat "%H~%M~%S.%2f" would + display *09~15~23.46*By default the values are + formatted using `zaxis.hoverformat`. + zsrc + Sets the source reference on Chart Studio Cloud for + `z`. + """ + + def __init__( + self, + arg=None, + anchor=None, + autocolorscale=None, + cauto=None, + cmax=None, + cmid=None, + cmin=None, + coloraxis=None, + colorbar=None, + colorscale=None, + customdata=None, + customdatasrc=None, + hoverinfo=None, + hoverinfosrc=None, + hoverlabel=None, + hovertemplate=None, + hovertemplatefallback=None, + hovertemplatesrc=None, + hovertext=None, + hovertextsrc=None, + ids=None, + idssrc=None, + legend=None, + legendgroup=None, + legendgrouptitle=None, + legendrank=None, + legendwidth=None, + lighting=None, + lightposition=None, + meta=None, + metasrc=None, + name=None, + opacity=None, + reversescale=None, + scene=None, + showlegend=None, + showscale=None, + sizemode=None, + sizeref=None, + stream=None, + text=None, + textsrc=None, + u=None, + uhoverformat=None, + uid=None, + uirevision=None, + usrc=None, + v=None, + vhoverformat=None, + visible=None, + vsrc=None, + w=None, + whoverformat=None, + wsrc=None, + x=None, + xhoverformat=None, + xsrc=None, + y=None, + yhoverformat=None, + ysrc=None, + z=None, + zhoverformat=None, + zsrc=None, + **kwargs, + ): + """ + Construct a new Cone object + + Use cone traces to visualize vector fields. Specify a vector + field using 6 1D arrays, 3 position arrays `x`, `y` and `z` and + 3 vector component arrays `u`, `v`, `w`. The cones are drawn + exactly at the positions given by `x`, `y` and `z`. + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of :class:`plotly.graph_objs.Cone` + anchor + Sets the cones' anchor with respect to their x/y/z + positions. Note that "cm" denote the cone's center of + mass which corresponds to 1/4 from the tail to tip. + autocolorscale + Determines whether the colorscale is a default palette + (`autocolorscale: true`) or the palette determined by + `colorscale`. In case `colorscale` is unspecified or + `autocolorscale` is true, the default palette will be + chosen according to whether numbers in the `color` + array are all positive, all negative or mixed. + cauto + Determines whether or not the color domain is computed + with respect to the input data (here u/v/w norm) or the + bounds set in `cmin` and `cmax` Defaults to `false` + when `cmin` and `cmax` are set by the user. + cmax + Sets the upper bound of the color domain. Value should + have the same units as u/v/w norm and if set, `cmin` + must be set as well. + cmid + Sets the mid-point of the color domain by scaling + `cmin` and/or `cmax` to be equidistant to this point. + Value should have the same units as u/v/w norm. Has no + effect when `cauto` is `false`. + cmin + Sets the lower bound of the color domain. Value should + have the same units as u/v/w norm and if set, `cmax` + must be set as well. + coloraxis + Sets a reference to a shared color axis. References to + these shared color axes are "coloraxis", "coloraxis2", + "coloraxis3", etc. Settings for these shared color axes + are set in the layout, under `layout.coloraxis`, + `layout.coloraxis2`, etc. Note that multiple color + scales can be linked to the same color axis. + colorbar + :class:`plotly.graph_objects.cone.ColorBar` instance or + dict with compatible properties + colorscale + Sets the colorscale. The colorscale must be an array + containing arrays mapping a normalized value to an rgb, + rgba, hex, hsl, hsv, or named color string. At minimum, + a mapping for the lowest (0) and highest (1) values are + required. For example, `[[0, 'rgb(0,0,255)'], [1, + 'rgb(255,0,0)']]`. To control the bounds of the + colorscale in color space, use `cmin` and `cmax`. + Alternatively, `colorscale` may be a palette name + string of the following list: Blackbody,Bluered,Blues,C + ividis,Earth,Electric,Greens,Greys,Hot,Jet,Picnic,Portl + and,Rainbow,RdBu,Reds,Viridis,YlGnBu,YlOrRd. + customdata + Assigns extra data each datum. This may be useful when + listening to hover, click and selection events. Note + that, "scatter" traces also appends customdata items in + the markers DOM elements + customdatasrc + Sets the source reference on Chart Studio Cloud for + `customdata`. + hoverinfo + Determines which trace information appear on hover. If + `none` or `skip` are set, no information is displayed + upon hovering. But, if `none` is set, click and hover + events are still fired. + hoverinfosrc + Sets the source reference on Chart Studio Cloud for + `hoverinfo`. + hoverlabel + :class:`plotly.graph_objects.cone.Hoverlabel` instance + or dict with compatible properties + hovertemplate + Template string used for rendering the information that + appear on hover box. Note that this will override + `hoverinfo`. Variables are inserted using %{variable}, + for example "y: %{y}" as well as %{xother}, {%_xother}, + {%_xother_}, {%xother_}. When showing info for several + points, "xother" will be added to those with different + x positions from the first point. An underscore before + or after "(x|y)other" will add a space on that side, + only when this field is shown. Numbers are formatted + using d3-format's syntax %{variable:d3-format}, for + example "Price: %{y:$.2f}". + https://github.com/d3/d3-format/tree/v1.4.5#d3-format + for details on the formatting syntax. Dates are + formatted using d3-time-format's syntax + %{variable|d3-time-format}, for example "Day: + %{2019-01-01|%A}". https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format for details on the + date formatting syntax. Variables that can't be found + will be replaced with the specifier. For example, a + template of "data: %{x}, %{y}" will result in a value + of "data: 1, %{y}" if x is 1 and y is missing. + Variables with an undefined value will be replaced with + the fallback value. The variables available in + `hovertemplate` are the ones emitted as event data + described at this link + https://plotly.com/javascript/plotlyjs-events/#event- + data. Additionally, all attributes that can be + specified per-point (the ones that are `arrayOk: true`) + are available. Finally, the template string has access + to variable `norm` Anything contained in tag `` + is displayed in the secondary box, for example + `%{fullData.name}`. To hide the + secondary box completely, use an empty tag + ``. + hovertemplatefallback + Fallback string that's displayed when a variable + referenced in a template is missing. If the boolean + value 'false' is passed in, the specifier with the + missing variable will be displayed. + hovertemplatesrc + Sets the source reference on Chart Studio Cloud for + `hovertemplate`. + hovertext + Same as `text`. + hovertextsrc + Sets the source reference on Chart Studio Cloud for + `hovertext`. + ids + Assigns id labels to each datum. These ids for object + constancy of data points during animation. Should be an + array of strings, not numbers or any other type. + idssrc + Sets the source reference on Chart Studio Cloud for + `ids`. + legend + Sets the reference to a legend to show this trace in. + References to these legends are "legend", "legend2", + "legend3", etc. Settings for these legends are set in + the layout, under `layout.legend`, `layout.legend2`, + etc. + legendgroup + Sets the legend group for this trace. Traces and shapes + part of the same legend group hide/show at the same + time when toggling legend items. + legendgrouptitle + :class:`plotly.graph_objects.cone.Legendgrouptitle` + instance or dict with compatible properties + legendrank + Sets the legend rank for this trace. Items and groups + with smaller ranks are presented on top/left side while + with "reversed" `legend.traceorder` they are on + bottom/right side. The default legendrank is 1000, so + that you can use ranks less than 1000 to place certain + items before all unranked items, and ranks greater than + 1000 to go after all unranked items. When having + unranked or equal rank items shapes would be displayed + after traces i.e. according to their order in data and + layout. + legendwidth + Sets the width (in px or fraction) of the legend for + this trace. + lighting + :class:`plotly.graph_objects.cone.Lighting` instance or + dict with compatible properties + lightposition + :class:`plotly.graph_objects.cone.Lightposition` + instance or dict with compatible properties + meta + Assigns extra meta information associated with this + trace that can be used in various text attributes. + Attributes such as trace `name`, graph, axis and + colorbar `title.text`, annotation `text` + `rangeselector`, `updatemenues` and `sliders` `label` + text all support `meta`. To access the trace `meta` + values in an attribute in the same trace, simply use + `%{meta[i]}` where `i` is the index or key of the + `meta` item in question. To access trace `meta` in + layout attributes, use `%{data[n[.meta[i]}` where `i` + is the index or key of the `meta` and `n` is the trace + index. + metasrc + Sets the source reference on Chart Studio Cloud for + `meta`. + name + Sets the trace name. The trace name appears as the + legend item and on hover. + opacity + Sets the opacity of the surface. Please note that in + the case of using high `opacity` values for example a + value greater than or equal to 0.5 on two surfaces (and + 0.25 with four surfaces), an overlay of multiple + transparent surfaces may not perfectly be sorted in + depth by the webgl API. This behavior may be improved + in the near future and is subject to change. + reversescale + Reverses the color mapping if true. If true, `cmin` + will correspond to the last color in the array and + `cmax` will correspond to the first color. + scene + Sets a reference between this trace's 3D coordinate + system and a 3D scene. If "scene" (the default value), + the (x,y,z) coordinates refer to `layout.scene`. If + "scene2", the (x,y,z) coordinates refer to + `layout.scene2`, and so on. + showlegend + Determines whether or not an item corresponding to this + trace is shown in the legend. + showscale + Determines whether or not a colorbar is displayed for + this trace. + sizemode + Determines whether `sizeref` is set as a "scaled" (i.e + unitless) scalar (normalized by the max u/v/w norm in + the vector field) or as "absolute" value (in the same + units as the vector field). To display sizes in actual + vector length use "raw". + sizeref + Adjusts the cone size scaling. The size of the cones is + determined by their u/v/w norm multiplied a factor and + `sizeref`. This factor (computed internally) + corresponds to the minimum "time" to travel across two + successive x/y/z positions at the average velocity of + those two successive positions. All cones in a given + trace use the same factor. With `sizemode` set to + "raw", its default value is 1. With `sizemode` set to + "scaled", `sizeref` is unitless, its default value is + 0.5. With `sizemode` set to "absolute", `sizeref` has + the same units as the u/v/w vector field, its the + default value is half the sample's maximum vector norm. + stream + :class:`plotly.graph_objects.cone.Stream` instance or + dict with compatible properties + text + Sets the text elements associated with the cones. If + trace `hoverinfo` contains a "text" flag and + "hovertext" is not set, these elements will be seen in + the hover labels. + textsrc + Sets the source reference on Chart Studio Cloud for + `text`. + u + Sets the x components of the vector field. + uhoverformat + Sets the hover text formatting rulefor `u` using d3 + formatting mini-languages which are very similar to + those in Python. For numbers, see: https://github.com/d + 3/d3-format/tree/v1.4.5#d3-format.By default the values + are formatted using generic number format. + uid + Assign an id to this trace, Use this to provide object + constancy between traces during animations and + transitions. + uirevision + Controls persistence of some user-driven changes to the + trace: `constraintrange` in `parcoords` traces, as well + as some `editable: true` modifications such as `name` + and `colorbar.title`. Defaults to `layout.uirevision`. + Note that other user-driven trace attribute changes are + controlled by `layout` attributes: `trace.visible` is + controlled by `layout.legend.uirevision`, + `selectedpoints` is controlled by + `layout.selectionrevision`, and `colorbar.(x|y)` + (accessible with `config: {editable: true}`) is + controlled by `layout.editrevision`. Trace changes are + tracked by `uid`, which only falls back on trace index + if no `uid` is provided. So if your app can add/remove + traces before the end of the `data` array, such that + the same trace has a different index, you can still + preserve user-driven changes if you give each trace a + `uid` that stays with it as it moves. + usrc + Sets the source reference on Chart Studio Cloud for + `u`. + v + Sets the y components of the vector field. + vhoverformat + Sets the hover text formatting rulefor `v` using d3 + formatting mini-languages which are very similar to + those in Python. For numbers, see: https://github.com/d + 3/d3-format/tree/v1.4.5#d3-format.By default the values + are formatted using generic number format. + visible + Determines whether or not this trace is visible. If + "legendonly", the trace is not drawn, but can appear as + a legend item (provided that the legend itself is + visible). + vsrc + Sets the source reference on Chart Studio Cloud for + `v`. + w + Sets the z components of the vector field. + whoverformat + Sets the hover text formatting rulefor `w` using d3 + formatting mini-languages which are very similar to + those in Python. For numbers, see: https://github.com/d + 3/d3-format/tree/v1.4.5#d3-format.By default the values + are formatted using generic number format. + wsrc + Sets the source reference on Chart Studio Cloud for + `w`. + x + Sets the x coordinates of the vector field and of the + displayed cones. + xhoverformat + Sets the hover text formatting rulefor `x` using d3 + formatting mini-languages which are very similar to + those in Python. For numbers, see: + https://github.com/d3/d3-format/tree/v1.4.5#d3-format. + And for dates see: https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format. We add two items to + d3's date formatter: "%h" for half of the year as a + decimal number as well as "%{n}f" for fractional + seconds with n digits. For example, *2016-10-13 + 09:15:23.456* with tickformat "%H~%M~%S.%2f" would + display *09~15~23.46*By default the values are + formatted using `xaxis.hoverformat`. + xsrc + Sets the source reference on Chart Studio Cloud for + `x`. + y + Sets the y coordinates of the vector field and of the + displayed cones. + yhoverformat + Sets the hover text formatting rulefor `y` using d3 + formatting mini-languages which are very similar to + those in Python. For numbers, see: + https://github.com/d3/d3-format/tree/v1.4.5#d3-format. + And for dates see: https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format. We add two items to + d3's date formatter: "%h" for half of the year as a + decimal number as well as "%{n}f" for fractional + seconds with n digits. For example, *2016-10-13 + 09:15:23.456* with tickformat "%H~%M~%S.%2f" would + display *09~15~23.46*By default the values are + formatted using `yaxis.hoverformat`. + ysrc + Sets the source reference on Chart Studio Cloud for + `y`. + z + Sets the z coordinates of the vector field and of the + displayed cones. + zhoverformat + Sets the hover text formatting rulefor `z` using d3 + formatting mini-languages which are very similar to + those in Python. For numbers, see: + https://github.com/d3/d3-format/tree/v1.4.5#d3-format. + And for dates see: https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format. We add two items to + d3's date formatter: "%h" for half of the year as a + decimal number as well as "%{n}f" for fractional + seconds with n digits. For example, *2016-10-13 + 09:15:23.456* with tickformat "%H~%M~%S.%2f" would + display *09~15~23.46*By default the values are + formatted using `zaxis.hoverformat`. + zsrc + Sets the source reference on Chart Studio Cloud for + `z`. + + Returns + ------- + Cone + """ + super().__init__("cone") + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + if arg is None: + arg = {} + elif isinstance(arg, self.__class__): + arg = arg.to_plotly_json() + elif isinstance(arg, dict): + arg = _copy.copy(arg) + else: + raise ValueError("""\ +The first argument to the plotly.graph_objs.Cone +constructor must be a dict or +an instance of :class:`plotly.graph_objs.Cone`""") + + self._skip_invalid = kwargs.pop("skip_invalid", False) + self._validate = kwargs.pop("_validate", True) + + self._set_property("anchor", arg, anchor) + self._set_property("autocolorscale", arg, autocolorscale) + self._set_property("cauto", arg, cauto) + self._set_property("cmax", arg, cmax) + self._set_property("cmid", arg, cmid) + self._set_property("cmin", arg, cmin) + self._set_property("coloraxis", arg, coloraxis) + self._set_property("colorbar", arg, colorbar) + self._set_property("colorscale", arg, colorscale) + self._set_property("customdata", arg, customdata) + self._set_property("customdatasrc", arg, customdatasrc) + self._set_property("hoverinfo", arg, hoverinfo) + self._set_property("hoverinfosrc", arg, hoverinfosrc) + self._set_property("hoverlabel", arg, hoverlabel) + self._set_property("hovertemplate", arg, hovertemplate) + self._set_property("hovertemplatefallback", arg, hovertemplatefallback) + self._set_property("hovertemplatesrc", arg, hovertemplatesrc) + self._set_property("hovertext", arg, hovertext) + self._set_property("hovertextsrc", arg, hovertextsrc) + self._set_property("ids", arg, ids) + self._set_property("idssrc", arg, idssrc) + self._set_property("legend", arg, legend) + self._set_property("legendgroup", arg, legendgroup) + self._set_property("legendgrouptitle", arg, legendgrouptitle) + self._set_property("legendrank", arg, legendrank) + self._set_property("legendwidth", arg, legendwidth) + self._set_property("lighting", arg, lighting) + self._set_property("lightposition", arg, lightposition) + self._set_property("meta", arg, meta) + self._set_property("metasrc", arg, metasrc) + self._set_property("name", arg, name) + self._set_property("opacity", arg, opacity) + self._set_property("reversescale", arg, reversescale) + self._set_property("scene", arg, scene) + self._set_property("showlegend", arg, showlegend) + self._set_property("showscale", arg, showscale) + self._set_property("sizemode", arg, sizemode) + self._set_property("sizeref", arg, sizeref) + self._set_property("stream", arg, stream) + self._set_property("text", arg, text) + self._set_property("textsrc", arg, textsrc) + self._set_property("u", arg, u) + self._set_property("uhoverformat", arg, uhoverformat) + self._set_property("uid", arg, uid) + self._set_property("uirevision", arg, uirevision) + self._set_property("usrc", arg, usrc) + self._set_property("v", arg, v) + self._set_property("vhoverformat", arg, vhoverformat) + self._set_property("visible", arg, visible) + self._set_property("vsrc", arg, vsrc) + self._set_property("w", arg, w) + self._set_property("whoverformat", arg, whoverformat) + self._set_property("wsrc", arg, wsrc) + self._set_property("x", arg, x) + self._set_property("xhoverformat", arg, xhoverformat) + self._set_property("xsrc", arg, xsrc) + self._set_property("y", arg, y) + self._set_property("yhoverformat", arg, yhoverformat) + self._set_property("ysrc", arg, ysrc) + self._set_property("z", arg, z) + self._set_property("zhoverformat", arg, zhoverformat) + self._set_property("zsrc", arg, zsrc) + + self._props["type"] = "cone" + arg.pop("type", None) + self._process_kwargs(**dict(arg, **kwargs)) + self._skip_invalid = False diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/_contour.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/_contour.py new file mode 100644 index 0000000000000000000000000000000000000000..c2c9f0dcc00fa63a3c939ad87a327c00a342429c --- /dev/null +++ b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/_contour.py @@ -0,0 +1,2711 @@ +# --- THIS FILE IS AUTO-GENERATED --- +# Modifications will be overwitten the next time code generation run. + +from plotly.basedatatypes import BaseTraceType as _BaseTraceType +import copy as _copy + + +class Contour(_BaseTraceType): + _parent_path_str = "" + _path_str = "contour" + _valid_props = { + "autocolorscale", + "autocontour", + "coloraxis", + "colorbar", + "colorscale", + "connectgaps", + "contours", + "customdata", + "customdatasrc", + "dx", + "dy", + "fillcolor", + "hoverinfo", + "hoverinfosrc", + "hoverlabel", + "hoverongaps", + "hovertemplate", + "hovertemplatefallback", + "hovertemplatesrc", + "hovertext", + "hovertextsrc", + "ids", + "idssrc", + "legend", + "legendgroup", + "legendgrouptitle", + "legendrank", + "legendwidth", + "line", + "meta", + "metasrc", + "name", + "ncontours", + "opacity", + "reversescale", + "showlegend", + "showscale", + "stream", + "text", + "textfont", + "textsrc", + "texttemplate", + "texttemplatefallback", + "transpose", + "type", + "uid", + "uirevision", + "visible", + "x", + "x0", + "xaxis", + "xcalendar", + "xhoverformat", + "xperiod", + "xperiod0", + "xperiodalignment", + "xsrc", + "xtype", + "y", + "y0", + "yaxis", + "ycalendar", + "yhoverformat", + "yperiod", + "yperiod0", + "yperiodalignment", + "ysrc", + "ytype", + "z", + "zauto", + "zhoverformat", + "zmax", + "zmid", + "zmin", + "zorder", + "zsrc", + } + + @property + def autocolorscale(self): + """ + Determines whether the colorscale is a default palette + (`autocolorscale: true`) or the palette determined by + `colorscale`. In case `colorscale` is unspecified or + `autocolorscale` is true, the default palette will be chosen + according to whether numbers in the `color` array are all + positive, all negative or mixed. + + The 'autocolorscale' property is a boolean and must be specified as: + - A boolean value: True or False + + Returns + ------- + bool + """ + return self["autocolorscale"] + + @autocolorscale.setter + def autocolorscale(self, val): + self["autocolorscale"] = val + + @property + def autocontour(self): + """ + Determines whether or not the contour level attributes are + picked by an algorithm. If True, the number of contour levels + can be set in `ncontours`. If False, set the contour level + attributes in `contours`. + + The 'autocontour' property is a boolean and must be specified as: + - A boolean value: True or False + + Returns + ------- + bool + """ + return self["autocontour"] + + @autocontour.setter + def autocontour(self, val): + self["autocontour"] = val + + @property + def coloraxis(self): + """ + Sets a reference to a shared color axis. References to these + shared color axes are "coloraxis", "coloraxis2", "coloraxis3", + etc. Settings for these shared color axes are set in the + layout, under `layout.coloraxis`, `layout.coloraxis2`, etc. + Note that multiple color scales can be linked to the same color + axis. + + The 'coloraxis' property is an identifier of a particular + subplot, of type 'coloraxis', that may be specified as: + - the string 'coloraxis' optionally followed by an integer >= 1 + (e.g. 'coloraxis', 'coloraxis1', 'coloraxis2', 'coloraxis3', etc.) + + Returns + ------- + str + """ + return self["coloraxis"] + + @coloraxis.setter + def coloraxis(self, val): + self["coloraxis"] = val + + @property + def colorbar(self): + """ + The 'colorbar' property is an instance of ColorBar + that may be specified as: + - An instance of :class:`plotly.graph_objs.contour.ColorBar` + - A dict of string/value properties that will be passed + to the ColorBar constructor + + Returns + ------- + plotly.graph_objs.contour.ColorBar + """ + return self["colorbar"] + + @colorbar.setter + def colorbar(self, val): + self["colorbar"] = val + + @property + def colorscale(self): + """ + Sets the colorscale. The colorscale must be an array containing + arrays mapping a normalized value to an rgb, rgba, hex, hsl, + hsv, or named color string. At minimum, a mapping for the + lowest (0) and highest (1) values are required. For example, + `[[0, 'rgb(0,0,255)'], [1, 'rgb(255,0,0)']]`. To control the + bounds of the colorscale in color space, use `zmin` and `zmax`. + Alternatively, `colorscale` may be a palette name string of the + following list: Blackbody,Bluered,Blues,Cividis,Earth,Electric, + Greens,Greys,Hot,Jet,Picnic,Portland,Rainbow,RdBu,Reds,Viridis, + YlGnBu,YlOrRd. + + The 'colorscale' property is a colorscale and may be + specified as: + - A list of colors that will be spaced evenly to create the colorscale. + Many predefined colorscale lists are included in the sequential, diverging, + and cyclical modules in the plotly.colors package. + - A list of 2-element lists where the first element is the + normalized color level value (starting at 0 and ending at 1), + and the second item is a valid color string. + (e.g. [[0, 'green'], [0.5, 'red'], [1.0, 'rgb(0, 0, 255)']]) + - One of the following named colorscales: + ['aggrnyl', 'agsunset', 'algae', 'amp', 'armyrose', 'balance', + 'blackbody', 'bluered', 'blues', 'blugrn', 'bluyl', 'brbg', + 'brwnyl', 'bugn', 'bupu', 'burg', 'burgyl', 'cividis', 'curl', + 'darkmint', 'deep', 'delta', 'dense', 'earth', 'edge', 'electric', + 'emrld', 'fall', 'geyser', 'gnbu', 'gray', 'greens', 'greys', + 'haline', 'hot', 'hsv', 'ice', 'icefire', 'inferno', 'jet', + 'magenta', 'magma', 'matter', 'mint', 'mrybm', 'mygbm', 'oranges', + 'orrd', 'oryel', 'oxy', 'peach', 'phase', 'picnic', 'pinkyl', + 'piyg', 'plasma', 'plotly3', 'portland', 'prgn', 'pubu', 'pubugn', + 'puor', 'purd', 'purp', 'purples', 'purpor', 'rainbow', 'rdbu', + 'rdgy', 'rdpu', 'rdylbu', 'rdylgn', 'redor', 'reds', 'solar', + 'spectral', 'speed', 'sunset', 'sunsetdark', 'teal', 'tealgrn', + 'tealrose', 'tempo', 'temps', 'thermal', 'tropic', 'turbid', + 'turbo', 'twilight', 'viridis', 'ylgn', 'ylgnbu', 'ylorbr', + 'ylorrd']. + Appending '_r' to a named colorscale reverses it. + + Returns + ------- + str + """ + return self["colorscale"] + + @colorscale.setter + def colorscale(self, val): + self["colorscale"] = val + + @property + def connectgaps(self): + """ + Determines whether or not gaps (i.e. {nan} or missing values) + in the `z` data are filled in. It is defaulted to true if `z` + is a one dimensional array otherwise it is defaulted to false. + + The 'connectgaps' property is a boolean and must be specified as: + - A boolean value: True or False + + Returns + ------- + bool + """ + return self["connectgaps"] + + @connectgaps.setter + def connectgaps(self, val): + self["connectgaps"] = val + + @property + def contours(self): + """ + The 'contours' property is an instance of Contours + that may be specified as: + - An instance of :class:`plotly.graph_objs.contour.Contours` + - A dict of string/value properties that will be passed + to the Contours constructor + + Returns + ------- + plotly.graph_objs.contour.Contours + """ + return self["contours"] + + @contours.setter + def contours(self, val): + self["contours"] = val + + @property + def customdata(self): + """ + Assigns extra data each datum. This may be useful when + listening to hover, click and selection events. Note that, + "scatter" traces also appends customdata items in the markers + DOM elements + + The 'customdata' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["customdata"] + + @customdata.setter + def customdata(self, val): + self["customdata"] = val + + @property + def customdatasrc(self): + """ + Sets the source reference on Chart Studio Cloud for + `customdata`. + + The 'customdatasrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["customdatasrc"] + + @customdatasrc.setter + def customdatasrc(self, val): + self["customdatasrc"] = val + + @property + def dx(self): + """ + Sets the x coordinate step. See `x0` for more info. + + The 'dx' property is a number and may be specified as: + - An int or float + + Returns + ------- + int|float + """ + return self["dx"] + + @dx.setter + def dx(self, val): + self["dx"] = val + + @property + def dy(self): + """ + Sets the y coordinate step. See `y0` for more info. + + The 'dy' property is a number and may be specified as: + - An int or float + + Returns + ------- + int|float + """ + return self["dy"] + + @dy.setter + def dy(self, val): + self["dy"] = val + + @property + def fillcolor(self): + """ + Sets the fill color if `contours.type` is "constraint". + Defaults to a half-transparent variant of the line color, + marker color, or marker line color, whichever is available. + + The 'fillcolor' property is a color and may be specified as: + - A hex string (e.g. '#ff0000') + - An rgb/rgba string (e.g. 'rgb(255,0,0)') + - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') + - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') + - A named CSS color: see https://plotly.com/python/css-colors/ for a list + - A number that will be interpreted as a color + according to contour.colorscale + + Returns + ------- + str + """ + return self["fillcolor"] + + @fillcolor.setter + def fillcolor(self, val): + self["fillcolor"] = val + + @property + def hoverinfo(self): + """ + Determines which trace information appear on hover. If `none` + or `skip` are set, no information is displayed upon hovering. + But, if `none` is set, click and hover events are still fired. + + The 'hoverinfo' property is a flaglist and may be specified + as a string containing: + - Any combination of ['x', 'y', 'z', 'text', 'name'] joined with '+' characters + (e.g. 'x+y') + OR exactly one of ['all', 'none', 'skip'] (e.g. 'skip') + - A list or array of the above + + Returns + ------- + Any|numpy.ndarray + """ + return self["hoverinfo"] + + @hoverinfo.setter + def hoverinfo(self, val): + self["hoverinfo"] = val + + @property + def hoverinfosrc(self): + """ + Sets the source reference on Chart Studio Cloud for + `hoverinfo`. + + The 'hoverinfosrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["hoverinfosrc"] + + @hoverinfosrc.setter + def hoverinfosrc(self, val): + self["hoverinfosrc"] = val + + @property + def hoverlabel(self): + """ + The 'hoverlabel' property is an instance of Hoverlabel + that may be specified as: + - An instance of :class:`plotly.graph_objs.contour.Hoverlabel` + - A dict of string/value properties that will be passed + to the Hoverlabel constructor + + Returns + ------- + plotly.graph_objs.contour.Hoverlabel + """ + return self["hoverlabel"] + + @hoverlabel.setter + def hoverlabel(self, val): + self["hoverlabel"] = val + + @property + def hoverongaps(self): + """ + Determines whether or not gaps (i.e. {nan} or missing values) + in the `z` data have hover labels associated with them. + + The 'hoverongaps' property is a boolean and must be specified as: + - A boolean value: True or False + + Returns + ------- + bool + """ + return self["hoverongaps"] + + @hoverongaps.setter + def hoverongaps(self, val): + self["hoverongaps"] = val + + @property + def hovertemplate(self): + """ + Template string used for rendering the information that appear + on hover box. Note that this will override `hoverinfo`. + Variables are inserted using %{variable}, for example "y: %{y}" + as well as %{xother}, {%_xother}, {%_xother_}, {%xother_}. When + showing info for several points, "xother" will be added to + those with different x positions from the first point. An + underscore before or after "(x|y)other" will add a space on + that side, only when this field is shown. Numbers are formatted + using d3-format's syntax %{variable:d3-format}, for example + "Price: %{y:$.2f}". + https://github.com/d3/d3-format/tree/v1.4.5#d3-format for + details on the formatting syntax. Dates are formatted using + d3-time-format's syntax %{variable|d3-time-format}, for example + "Day: %{2019-01-01|%A}". https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format for details on the date + formatting syntax. Variables that can't be found will be + replaced with the specifier. For example, a template of "data: + %{x}, %{y}" will result in a value of "data: 1, %{y}" if x is 1 + and y is missing. Variables with an undefined value will be + replaced with the fallback value. The variables available in + `hovertemplate` are the ones emitted as event data described at + this link https://plotly.com/javascript/plotlyjs-events/#event- + data. Additionally, all attributes that can be specified per- + point (the ones that are `arrayOk: true`) are available. + Anything contained in tag `` is displayed in the + secondary box, for example `%{fullData.name}`. + To hide the secondary box completely, use an empty tag + ``. + + The 'hovertemplate' property is a string and must be specified as: + - A string + - A number that will be converted to a string + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["hovertemplate"] + + @hovertemplate.setter + def hovertemplate(self, val): + self["hovertemplate"] = val + + @property + def hovertemplatefallback(self): + """ + Fallback string that's displayed when a variable referenced in + a template is missing. If the boolean value 'false' is passed + in, the specifier with the missing variable will be displayed. + + The 'hovertemplatefallback' property accepts values of any type + + Returns + ------- + Any + """ + return self["hovertemplatefallback"] + + @hovertemplatefallback.setter + def hovertemplatefallback(self, val): + self["hovertemplatefallback"] = val + + @property + def hovertemplatesrc(self): + """ + Sets the source reference on Chart Studio Cloud for + `hovertemplate`. + + The 'hovertemplatesrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["hovertemplatesrc"] + + @hovertemplatesrc.setter + def hovertemplatesrc(self, val): + self["hovertemplatesrc"] = val + + @property + def hovertext(self): + """ + Same as `text`. + + The 'hovertext' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["hovertext"] + + @hovertext.setter + def hovertext(self, val): + self["hovertext"] = val + + @property + def hovertextsrc(self): + """ + Sets the source reference on Chart Studio Cloud for + `hovertext`. + + The 'hovertextsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["hovertextsrc"] + + @hovertextsrc.setter + def hovertextsrc(self, val): + self["hovertextsrc"] = val + + @property + def ids(self): + """ + Assigns id labels to each datum. These ids for object constancy + of data points during animation. Should be an array of strings, + not numbers or any other type. + + The 'ids' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["ids"] + + @ids.setter + def ids(self, val): + self["ids"] = val + + @property + def idssrc(self): + """ + Sets the source reference on Chart Studio Cloud for `ids`. + + The 'idssrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["idssrc"] + + @idssrc.setter + def idssrc(self, val): + self["idssrc"] = val + + @property + def legend(self): + """ + Sets the reference to a legend to show this trace in. + References to these legends are "legend", "legend2", "legend3", + etc. Settings for these legends are set in the layout, under + `layout.legend`, `layout.legend2`, etc. + + The 'legend' property is an identifier of a particular + subplot, of type 'legend', that may be specified as: + - the string 'legend' optionally followed by an integer >= 1 + (e.g. 'legend', 'legend1', 'legend2', 'legend3', etc.) + + Returns + ------- + str + """ + return self["legend"] + + @legend.setter + def legend(self, val): + self["legend"] = val + + @property + def legendgroup(self): + """ + Sets the legend group for this trace. Traces and shapes part of + the same legend group hide/show at the same time when toggling + legend items. + + The 'legendgroup' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["legendgroup"] + + @legendgroup.setter + def legendgroup(self, val): + self["legendgroup"] = val + + @property + def legendgrouptitle(self): + """ + The 'legendgrouptitle' property is an instance of Legendgrouptitle + that may be specified as: + - An instance of :class:`plotly.graph_objs.contour.Legendgrouptitle` + - A dict of string/value properties that will be passed + to the Legendgrouptitle constructor + + Returns + ------- + plotly.graph_objs.contour.Legendgrouptitle + """ + return self["legendgrouptitle"] + + @legendgrouptitle.setter + def legendgrouptitle(self, val): + self["legendgrouptitle"] = val + + @property + def legendrank(self): + """ + Sets the legend rank for this trace. Items and groups with + smaller ranks are presented on top/left side while with + "reversed" `legend.traceorder` they are on bottom/right side. + The default legendrank is 1000, so that you can use ranks less + than 1000 to place certain items before all unranked items, and + ranks greater than 1000 to go after all unranked items. When + having unranked or equal rank items shapes would be displayed + after traces i.e. according to their order in data and layout. + + The 'legendrank' property is a number and may be specified as: + - An int or float + + Returns + ------- + int|float + """ + return self["legendrank"] + + @legendrank.setter + def legendrank(self, val): + self["legendrank"] = val + + @property + def legendwidth(self): + """ + Sets the width (in px or fraction) of the legend for this + trace. + + The 'legendwidth' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["legendwidth"] + + @legendwidth.setter + def legendwidth(self, val): + self["legendwidth"] = val + + @property + def line(self): + """ + The 'line' property is an instance of Line + that may be specified as: + - An instance of :class:`plotly.graph_objs.contour.Line` + - A dict of string/value properties that will be passed + to the Line constructor + + Returns + ------- + plotly.graph_objs.contour.Line + """ + return self["line"] + + @line.setter + def line(self, val): + self["line"] = val + + @property + def meta(self): + """ + Assigns extra meta information associated with this trace that + can be used in various text attributes. Attributes such as + trace `name`, graph, axis and colorbar `title.text`, annotation + `text` `rangeselector`, `updatemenues` and `sliders` `label` + text all support `meta`. To access the trace `meta` values in + an attribute in the same trace, simply use `%{meta[i]}` where + `i` is the index or key of the `meta` item in question. To + access trace `meta` in layout attributes, use + `%{data[n[.meta[i]}` where `i` is the index or key of the + `meta` and `n` is the trace index. + + The 'meta' property accepts values of any type + + Returns + ------- + Any|numpy.ndarray + """ + return self["meta"] + + @meta.setter + def meta(self, val): + self["meta"] = val + + @property + def metasrc(self): + """ + Sets the source reference on Chart Studio Cloud for `meta`. + + The 'metasrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["metasrc"] + + @metasrc.setter + def metasrc(self, val): + self["metasrc"] = val + + @property + def name(self): + """ + Sets the trace name. The trace name appears as the legend item + and on hover. + + The 'name' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["name"] + + @name.setter + def name(self, val): + self["name"] = val + + @property + def ncontours(self): + """ + Sets the maximum number of contour levels. The actual number of + contours will be chosen automatically to be less than or equal + to the value of `ncontours`. Has an effect only if + `autocontour` is True or if `contours.size` is missing. + + The 'ncontours' property is a integer and may be specified as: + - An int (or float that will be cast to an int) + in the interval [1, 9223372036854775807] + + Returns + ------- + int + """ + return self["ncontours"] + + @ncontours.setter + def ncontours(self, val): + self["ncontours"] = val + + @property + def opacity(self): + """ + Sets the opacity of the trace. + + The 'opacity' property is a number and may be specified as: + - An int or float in the interval [0, 1] + + Returns + ------- + int|float + """ + return self["opacity"] + + @opacity.setter + def opacity(self, val): + self["opacity"] = val + + @property + def reversescale(self): + """ + Reverses the color mapping if true. If true, `zmin` will + correspond to the last color in the array and `zmax` will + correspond to the first color. + + The 'reversescale' property is a boolean and must be specified as: + - A boolean value: True or False + + Returns + ------- + bool + """ + return self["reversescale"] + + @reversescale.setter + def reversescale(self, val): + self["reversescale"] = val + + @property + def showlegend(self): + """ + Determines whether or not an item corresponding to this trace + is shown in the legend. + + The 'showlegend' property is a boolean and must be specified as: + - A boolean value: True or False + + Returns + ------- + bool + """ + return self["showlegend"] + + @showlegend.setter + def showlegend(self, val): + self["showlegend"] = val + + @property + def showscale(self): + """ + Determines whether or not a colorbar is displayed for this + trace. + + The 'showscale' property is a boolean and must be specified as: + - A boolean value: True or False + + Returns + ------- + bool + """ + return self["showscale"] + + @showscale.setter + def showscale(self, val): + self["showscale"] = val + + @property + def stream(self): + """ + The 'stream' property is an instance of Stream + that may be specified as: + - An instance of :class:`plotly.graph_objs.contour.Stream` + - A dict of string/value properties that will be passed + to the Stream constructor + + Returns + ------- + plotly.graph_objs.contour.Stream + """ + return self["stream"] + + @stream.setter + def stream(self, val): + self["stream"] = val + + @property + def text(self): + """ + Sets the text elements associated with each z value. + + The 'text' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["text"] + + @text.setter + def text(self, val): + self["text"] = val + + @property + def textfont(self): + """ + For this trace it only has an effect if `coloring` is set to + "heatmap". Sets the text font. + + The 'textfont' property is an instance of Textfont + that may be specified as: + - An instance of :class:`plotly.graph_objs.contour.Textfont` + - A dict of string/value properties that will be passed + to the Textfont constructor + + Returns + ------- + plotly.graph_objs.contour.Textfont + """ + return self["textfont"] + + @textfont.setter + def textfont(self, val): + self["textfont"] = val + + @property + def textsrc(self): + """ + Sets the source reference on Chart Studio Cloud for `text`. + + The 'textsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["textsrc"] + + @textsrc.setter + def textsrc(self, val): + self["textsrc"] = val + + @property + def texttemplate(self): + """ + For this trace it only has an effect if `coloring` is set to + "heatmap". Template string used for rendering the information + text that appears on points. Note that this will override + `textinfo`. Variables are inserted using %{variable}, for + example "y: %{y}". Numbers are formatted using d3-format's + syntax %{variable:d3-format}, for example "Price: %{y:$.2f}". + https://github.com/d3/d3-format/tree/v1.4.5#d3-format for + details on the formatting syntax. Dates are formatted using + d3-time-format's syntax %{variable|d3-time-format}, for example + "Day: %{2019-01-01|%A}". https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format for details on the date + formatting syntax. Variables that can't be found will be + replaced with the specifier. For example, a template of "data: + %{x}, %{y}" will result in a value of "data: 1, %{y}" if x is 1 + and y is missing. Variables with an undefined value will be + replaced with the fallback value. All attributes that can be + specified per-point (the ones that are `arrayOk: true`) are + available. Finally, the template string has access to variables + `x`, `y`, `z` and `text`. + + The 'texttemplate' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["texttemplate"] + + @texttemplate.setter + def texttemplate(self, val): + self["texttemplate"] = val + + @property + def texttemplatefallback(self): + """ + Fallback string that's displayed when a variable referenced in + a template is missing. If the boolean value 'false' is passed + in, the specifier with the missing variable will be displayed. + + The 'texttemplatefallback' property accepts values of any type + + Returns + ------- + Any + """ + return self["texttemplatefallback"] + + @texttemplatefallback.setter + def texttemplatefallback(self, val): + self["texttemplatefallback"] = val + + @property + def transpose(self): + """ + Transposes the z data. + + The 'transpose' property is a boolean and must be specified as: + - A boolean value: True or False + + Returns + ------- + bool + """ + return self["transpose"] + + @transpose.setter + def transpose(self, val): + self["transpose"] = val + + @property + def uid(self): + """ + Assign an id to this trace, Use this to provide object + constancy between traces during animations and transitions. + + The 'uid' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["uid"] + + @uid.setter + def uid(self, val): + self["uid"] = val + + @property + def uirevision(self): + """ + Controls persistence of some user-driven changes to the trace: + `constraintrange` in `parcoords` traces, as well as some + `editable: true` modifications such as `name` and + `colorbar.title`. Defaults to `layout.uirevision`. Note that + other user-driven trace attribute changes are controlled by + `layout` attributes: `trace.visible` is controlled by + `layout.legend.uirevision`, `selectedpoints` is controlled by + `layout.selectionrevision`, and `colorbar.(x|y)` (accessible + with `config: {editable: true}`) is controlled by + `layout.editrevision`. Trace changes are tracked by `uid`, + which only falls back on trace index if no `uid` is provided. + So if your app can add/remove traces before the end of the + `data` array, such that the same trace has a different index, + you can still preserve user-driven changes if you give each + trace a `uid` that stays with it as it moves. + + The 'uirevision' property accepts values of any type + + Returns + ------- + Any + """ + return self["uirevision"] + + @uirevision.setter + def uirevision(self, val): + self["uirevision"] = val + + @property + def visible(self): + """ + Determines whether or not this trace is visible. If + "legendonly", the trace is not drawn, but can appear as a + legend item (provided that the legend itself is visible). + + The 'visible' property is an enumeration that may be specified as: + - One of the following enumeration values: + [True, False, 'legendonly'] + + Returns + ------- + Any + """ + return self["visible"] + + @visible.setter + def visible(self, val): + self["visible"] = val + + @property + def x(self): + """ + Sets the x coordinates. + + The 'x' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["x"] + + @x.setter + def x(self, val): + self["x"] = val + + @property + def x0(self): + """ + Alternate to `x`. Builds a linear space of x coordinates. Use + with `dx` where `x0` is the starting coordinate and `dx` the + step. + + The 'x0' property accepts values of any type + + Returns + ------- + Any + """ + return self["x0"] + + @x0.setter + def x0(self, val): + self["x0"] = val + + @property + def xaxis(self): + """ + Sets a reference between this trace's x coordinates and a 2D + cartesian x axis. If "x" (the default value), the x coordinates + refer to `layout.xaxis`. If "x2", the x coordinates refer to + `layout.xaxis2`, and so on. + + The 'xaxis' property is an identifier of a particular + subplot, of type 'x', that may be specified as: + - the string 'x' optionally followed by an integer >= 1 + (e.g. 'x', 'x1', 'x2', 'x3', etc.) + + Returns + ------- + str + """ + return self["xaxis"] + + @xaxis.setter + def xaxis(self, val): + self["xaxis"] = val + + @property + def xcalendar(self): + """ + Sets the calendar system to use with `x` date data. + + The 'xcalendar' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['chinese', 'coptic', 'discworld', 'ethiopian', + 'gregorian', 'hebrew', 'islamic', 'jalali', 'julian', + 'mayan', 'nanakshahi', 'nepali', 'persian', 'taiwan', + 'thai', 'ummalqura'] + + Returns + ------- + Any + """ + return self["xcalendar"] + + @xcalendar.setter + def xcalendar(self, val): + self["xcalendar"] = val + + @property + def xhoverformat(self): + """ + Sets the hover text formatting rulefor `x` using d3 formatting + mini-languages which are very similar to those in Python. For + numbers, see: + https://github.com/d3/d3-format/tree/v1.4.5#d3-format. And for + dates see: https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format. We add two items to d3's date + formatter: "%h" for half of the year as a decimal number as + well as "%{n}f" for fractional seconds with n digits. For + example, *2016-10-13 09:15:23.456* with tickformat + "%H~%M~%S.%2f" would display *09~15~23.46*By default the values + are formatted using `xaxis.hoverformat`. + + The 'xhoverformat' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["xhoverformat"] + + @xhoverformat.setter + def xhoverformat(self, val): + self["xhoverformat"] = val + + @property + def xperiod(self): + """ + Only relevant when the axis `type` is "date". Sets the period + positioning in milliseconds or "M" on the x axis. Special + values in the form of "M" could be used to declare the + number of months. In this case `n` must be a positive integer. + + The 'xperiod' property accepts values of any type + + Returns + ------- + Any + """ + return self["xperiod"] + + @xperiod.setter + def xperiod(self, val): + self["xperiod"] = val + + @property + def xperiod0(self): + """ + Only relevant when the axis `type` is "date". Sets the base for + period positioning in milliseconds or date string on the x0 + axis. When `x0period` is round number of weeks, the `x0period0` + by default would be on a Sunday i.e. 2000-01-02, otherwise it + would be at 2000-01-01. + + The 'xperiod0' property accepts values of any type + + Returns + ------- + Any + """ + return self["xperiod0"] + + @xperiod0.setter + def xperiod0(self, val): + self["xperiod0"] = val + + @property + def xperiodalignment(self): + """ + Only relevant when the axis `type` is "date". Sets the + alignment of data points on the x axis. + + The 'xperiodalignment' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['start', 'middle', 'end'] + + Returns + ------- + Any + """ + return self["xperiodalignment"] + + @xperiodalignment.setter + def xperiodalignment(self, val): + self["xperiodalignment"] = val + + @property + def xsrc(self): + """ + Sets the source reference on Chart Studio Cloud for `x`. + + The 'xsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["xsrc"] + + @xsrc.setter + def xsrc(self, val): + self["xsrc"] = val + + @property + def xtype(self): + """ + If "array", the heatmap's x coordinates are given by "x" (the + default behavior when `x` is provided). If "scaled", the + heatmap's x coordinates are given by "x0" and "dx" (the default + behavior when `x` is not provided). + + The 'xtype' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['array', 'scaled'] + + Returns + ------- + Any + """ + return self["xtype"] + + @xtype.setter + def xtype(self, val): + self["xtype"] = val + + @property + def y(self): + """ + Sets the y coordinates. + + The 'y' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["y"] + + @y.setter + def y(self, val): + self["y"] = val + + @property + def y0(self): + """ + Alternate to `y`. Builds a linear space of y coordinates. Use + with `dy` where `y0` is the starting coordinate and `dy` the + step. + + The 'y0' property accepts values of any type + + Returns + ------- + Any + """ + return self["y0"] + + @y0.setter + def y0(self, val): + self["y0"] = val + + @property + def yaxis(self): + """ + Sets a reference between this trace's y coordinates and a 2D + cartesian y axis. If "y" (the default value), the y coordinates + refer to `layout.yaxis`. If "y2", the y coordinates refer to + `layout.yaxis2`, and so on. + + The 'yaxis' property is an identifier of a particular + subplot, of type 'y', that may be specified as: + - the string 'y' optionally followed by an integer >= 1 + (e.g. 'y', 'y1', 'y2', 'y3', etc.) + + Returns + ------- + str + """ + return self["yaxis"] + + @yaxis.setter + def yaxis(self, val): + self["yaxis"] = val + + @property + def ycalendar(self): + """ + Sets the calendar system to use with `y` date data. + + The 'ycalendar' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['chinese', 'coptic', 'discworld', 'ethiopian', + 'gregorian', 'hebrew', 'islamic', 'jalali', 'julian', + 'mayan', 'nanakshahi', 'nepali', 'persian', 'taiwan', + 'thai', 'ummalqura'] + + Returns + ------- + Any + """ + return self["ycalendar"] + + @ycalendar.setter + def ycalendar(self, val): + self["ycalendar"] = val + + @property + def yhoverformat(self): + """ + Sets the hover text formatting rulefor `y` using d3 formatting + mini-languages which are very similar to those in Python. For + numbers, see: + https://github.com/d3/d3-format/tree/v1.4.5#d3-format. And for + dates see: https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format. We add two items to d3's date + formatter: "%h" for half of the year as a decimal number as + well as "%{n}f" for fractional seconds with n digits. For + example, *2016-10-13 09:15:23.456* with tickformat + "%H~%M~%S.%2f" would display *09~15~23.46*By default the values + are formatted using `yaxis.hoverformat`. + + The 'yhoverformat' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["yhoverformat"] + + @yhoverformat.setter + def yhoverformat(self, val): + self["yhoverformat"] = val + + @property + def yperiod(self): + """ + Only relevant when the axis `type` is "date". Sets the period + positioning in milliseconds or "M" on the y axis. Special + values in the form of "M" could be used to declare the + number of months. In this case `n` must be a positive integer. + + The 'yperiod' property accepts values of any type + + Returns + ------- + Any + """ + return self["yperiod"] + + @yperiod.setter + def yperiod(self, val): + self["yperiod"] = val + + @property + def yperiod0(self): + """ + Only relevant when the axis `type` is "date". Sets the base for + period positioning in milliseconds or date string on the y0 + axis. When `y0period` is round number of weeks, the `y0period0` + by default would be on a Sunday i.e. 2000-01-02, otherwise it + would be at 2000-01-01. + + The 'yperiod0' property accepts values of any type + + Returns + ------- + Any + """ + return self["yperiod0"] + + @yperiod0.setter + def yperiod0(self, val): + self["yperiod0"] = val + + @property + def yperiodalignment(self): + """ + Only relevant when the axis `type` is "date". Sets the + alignment of data points on the y axis. + + The 'yperiodalignment' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['start', 'middle', 'end'] + + Returns + ------- + Any + """ + return self["yperiodalignment"] + + @yperiodalignment.setter + def yperiodalignment(self, val): + self["yperiodalignment"] = val + + @property + def ysrc(self): + """ + Sets the source reference on Chart Studio Cloud for `y`. + + The 'ysrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["ysrc"] + + @ysrc.setter + def ysrc(self, val): + self["ysrc"] = val + + @property + def ytype(self): + """ + If "array", the heatmap's y coordinates are given by "y" (the + default behavior when `y` is provided) If "scaled", the + heatmap's y coordinates are given by "y0" and "dy" (the default + behavior when `y` is not provided) + + The 'ytype' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['array', 'scaled'] + + Returns + ------- + Any + """ + return self["ytype"] + + @ytype.setter + def ytype(self, val): + self["ytype"] = val + + @property + def z(self): + """ + Sets the z data. + + The 'z' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["z"] + + @z.setter + def z(self, val): + self["z"] = val + + @property + def zauto(self): + """ + Determines whether or not the color domain is computed with + respect to the input data (here in `z`) or the bounds set in + `zmin` and `zmax` Defaults to `false` when `zmin` and `zmax` + are set by the user. + + The 'zauto' property is a boolean and must be specified as: + - A boolean value: True or False + + Returns + ------- + bool + """ + return self["zauto"] + + @zauto.setter + def zauto(self, val): + self["zauto"] = val + + @property + def zhoverformat(self): + """ + Sets the hover text formatting rulefor `z` using d3 formatting + mini-languages which are very similar to those in Python. For + numbers, see: + https://github.com/d3/d3-format/tree/v1.4.5#d3-format.By + default the values are formatted using generic number format. + + The 'zhoverformat' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["zhoverformat"] + + @zhoverformat.setter + def zhoverformat(self, val): + self["zhoverformat"] = val + + @property + def zmax(self): + """ + Sets the upper bound of the color domain. Value should have the + same units as in `z` and if set, `zmin` must be set as well. + + The 'zmax' property is a number and may be specified as: + - An int or float + + Returns + ------- + int|float + """ + return self["zmax"] + + @zmax.setter + def zmax(self, val): + self["zmax"] = val + + @property + def zmid(self): + """ + Sets the mid-point of the color domain by scaling `zmin` and/or + `zmax` to be equidistant to this point. Value should have the + same units as in `z`. Has no effect when `zauto` is `false`. + + The 'zmid' property is a number and may be specified as: + - An int or float + + Returns + ------- + int|float + """ + return self["zmid"] + + @zmid.setter + def zmid(self, val): + self["zmid"] = val + + @property + def zmin(self): + """ + Sets the lower bound of the color domain. Value should have the + same units as in `z` and if set, `zmax` must be set as well. + + The 'zmin' property is a number and may be specified as: + - An int or float + + Returns + ------- + int|float + """ + return self["zmin"] + + @zmin.setter + def zmin(self, val): + self["zmin"] = val + + @property + def zorder(self): + """ + Sets the layer on which this trace is displayed, relative to + other SVG traces on the same subplot. SVG traces with higher + `zorder` appear in front of those with lower `zorder`. + + The 'zorder' property is a integer and may be specified as: + - An int (or float that will be cast to an int) + + Returns + ------- + int + """ + return self["zorder"] + + @zorder.setter + def zorder(self, val): + self["zorder"] = val + + @property + def zsrc(self): + """ + Sets the source reference on Chart Studio Cloud for `z`. + + The 'zsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["zsrc"] + + @zsrc.setter + def zsrc(self, val): + self["zsrc"] = val + + @property + def type(self): + return self._props["type"] + + @property + def _prop_descriptions(self): + return """\ + autocolorscale + Determines whether the colorscale is a default palette + (`autocolorscale: true`) or the palette determined by + `colorscale`. In case `colorscale` is unspecified or + `autocolorscale` is true, the default palette will be + chosen according to whether numbers in the `color` + array are all positive, all negative or mixed. + autocontour + Determines whether or not the contour level attributes + are picked by an algorithm. If True, the number of + contour levels can be set in `ncontours`. If False, set + the contour level attributes in `contours`. + coloraxis + Sets a reference to a shared color axis. References to + these shared color axes are "coloraxis", "coloraxis2", + "coloraxis3", etc. Settings for these shared color axes + are set in the layout, under `layout.coloraxis`, + `layout.coloraxis2`, etc. Note that multiple color + scales can be linked to the same color axis. + colorbar + :class:`plotly.graph_objects.contour.ColorBar` instance + or dict with compatible properties + colorscale + Sets the colorscale. The colorscale must be an array + containing arrays mapping a normalized value to an rgb, + rgba, hex, hsl, hsv, or named color string. At minimum, + a mapping for the lowest (0) and highest (1) values are + required. For example, `[[0, 'rgb(0,0,255)'], [1, + 'rgb(255,0,0)']]`. To control the bounds of the + colorscale in color space, use `zmin` and `zmax`. + Alternatively, `colorscale` may be a palette name + string of the following list: Blackbody,Bluered,Blues,C + ividis,Earth,Electric,Greens,Greys,Hot,Jet,Picnic,Portl + and,Rainbow,RdBu,Reds,Viridis,YlGnBu,YlOrRd. + connectgaps + Determines whether or not gaps (i.e. {nan} or missing + values) in the `z` data are filled in. It is defaulted + to true if `z` is a one dimensional array otherwise it + is defaulted to false. + contours + :class:`plotly.graph_objects.contour.Contours` instance + or dict with compatible properties + customdata + Assigns extra data each datum. This may be useful when + listening to hover, click and selection events. Note + that, "scatter" traces also appends customdata items in + the markers DOM elements + customdatasrc + Sets the source reference on Chart Studio Cloud for + `customdata`. + dx + Sets the x coordinate step. See `x0` for more info. + dy + Sets the y coordinate step. See `y0` for more info. + fillcolor + Sets the fill color if `contours.type` is "constraint". + Defaults to a half-transparent variant of the line + color, marker color, or marker line color, whichever is + available. + hoverinfo + Determines which trace information appear on hover. If + `none` or `skip` are set, no information is displayed + upon hovering. But, if `none` is set, click and hover + events are still fired. + hoverinfosrc + Sets the source reference on Chart Studio Cloud for + `hoverinfo`. + hoverlabel + :class:`plotly.graph_objects.contour.Hoverlabel` + instance or dict with compatible properties + hoverongaps + Determines whether or not gaps (i.e. {nan} or missing + values) in the `z` data have hover labels associated + with them. + hovertemplate + Template string used for rendering the information that + appear on hover box. Note that this will override + `hoverinfo`. Variables are inserted using %{variable}, + for example "y: %{y}" as well as %{xother}, {%_xother}, + {%_xother_}, {%xother_}. When showing info for several + points, "xother" will be added to those with different + x positions from the first point. An underscore before + or after "(x|y)other" will add a space on that side, + only when this field is shown. Numbers are formatted + using d3-format's syntax %{variable:d3-format}, for + example "Price: %{y:$.2f}". + https://github.com/d3/d3-format/tree/v1.4.5#d3-format + for details on the formatting syntax. Dates are + formatted using d3-time-format's syntax + %{variable|d3-time-format}, for example "Day: + %{2019-01-01|%A}". https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format for details on the + date formatting syntax. Variables that can't be found + will be replaced with the specifier. For example, a + template of "data: %{x}, %{y}" will result in a value + of "data: 1, %{y}" if x is 1 and y is missing. + Variables with an undefined value will be replaced with + the fallback value. The variables available in + `hovertemplate` are the ones emitted as event data + described at this link + https://plotly.com/javascript/plotlyjs-events/#event- + data. Additionally, all attributes that can be + specified per-point (the ones that are `arrayOk: true`) + are available. Anything contained in tag `` is + displayed in the secondary box, for example + `%{fullData.name}`. To hide the + secondary box completely, use an empty tag + ``. + hovertemplatefallback + Fallback string that's displayed when a variable + referenced in a template is missing. If the boolean + value 'false' is passed in, the specifier with the + missing variable will be displayed. + hovertemplatesrc + Sets the source reference on Chart Studio Cloud for + `hovertemplate`. + hovertext + Same as `text`. + hovertextsrc + Sets the source reference on Chart Studio Cloud for + `hovertext`. + ids + Assigns id labels to each datum. These ids for object + constancy of data points during animation. Should be an + array of strings, not numbers or any other type. + idssrc + Sets the source reference on Chart Studio Cloud for + `ids`. + legend + Sets the reference to a legend to show this trace in. + References to these legends are "legend", "legend2", + "legend3", etc. Settings for these legends are set in + the layout, under `layout.legend`, `layout.legend2`, + etc. + legendgroup + Sets the legend group for this trace. Traces and shapes + part of the same legend group hide/show at the same + time when toggling legend items. + legendgrouptitle + :class:`plotly.graph_objects.contour.Legendgrouptitle` + instance or dict with compatible properties + legendrank + Sets the legend rank for this trace. Items and groups + with smaller ranks are presented on top/left side while + with "reversed" `legend.traceorder` they are on + bottom/right side. The default legendrank is 1000, so + that you can use ranks less than 1000 to place certain + items before all unranked items, and ranks greater than + 1000 to go after all unranked items. When having + unranked or equal rank items shapes would be displayed + after traces i.e. according to their order in data and + layout. + legendwidth + Sets the width (in px or fraction) of the legend for + this trace. + line + :class:`plotly.graph_objects.contour.Line` instance or + dict with compatible properties + meta + Assigns extra meta information associated with this + trace that can be used in various text attributes. + Attributes such as trace `name`, graph, axis and + colorbar `title.text`, annotation `text` + `rangeselector`, `updatemenues` and `sliders` `label` + text all support `meta`. To access the trace `meta` + values in an attribute in the same trace, simply use + `%{meta[i]}` where `i` is the index or key of the + `meta` item in question. To access trace `meta` in + layout attributes, use `%{data[n[.meta[i]}` where `i` + is the index or key of the `meta` and `n` is the trace + index. + metasrc + Sets the source reference on Chart Studio Cloud for + `meta`. + name + Sets the trace name. The trace name appears as the + legend item and on hover. + ncontours + Sets the maximum number of contour levels. The actual + number of contours will be chosen automatically to be + less than or equal to the value of `ncontours`. Has an + effect only if `autocontour` is True or if + `contours.size` is missing. + opacity + Sets the opacity of the trace. + reversescale + Reverses the color mapping if true. If true, `zmin` + will correspond to the last color in the array and + `zmax` will correspond to the first color. + showlegend + Determines whether or not an item corresponding to this + trace is shown in the legend. + showscale + Determines whether or not a colorbar is displayed for + this trace. + stream + :class:`plotly.graph_objects.contour.Stream` instance + or dict with compatible properties + text + Sets the text elements associated with each z value. + textfont + For this trace it only has an effect if `coloring` is + set to "heatmap". Sets the text font. + textsrc + Sets the source reference on Chart Studio Cloud for + `text`. + texttemplate + For this trace it only has an effect if `coloring` is + set to "heatmap". Template string used for rendering + the information text that appears on points. Note that + this will override `textinfo`. Variables are inserted + using %{variable}, for example "y: %{y}". Numbers are + formatted using d3-format's syntax + %{variable:d3-format}, for example "Price: %{y:$.2f}". + https://github.com/d3/d3-format/tree/v1.4.5#d3-format + for details on the formatting syntax. Dates are + formatted using d3-time-format's syntax + %{variable|d3-time-format}, for example "Day: + %{2019-01-01|%A}". https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format for details on the + date formatting syntax. Variables that can't be found + will be replaced with the specifier. For example, a + template of "data: %{x}, %{y}" will result in a value + of "data: 1, %{y}" if x is 1 and y is missing. + Variables with an undefined value will be replaced with + the fallback value. All attributes that can be + specified per-point (the ones that are `arrayOk: true`) + are available. Finally, the template string has access + to variables `x`, `y`, `z` and `text`. + texttemplatefallback + Fallback string that's displayed when a variable + referenced in a template is missing. If the boolean + value 'false' is passed in, the specifier with the + missing variable will be displayed. + transpose + Transposes the z data. + uid + Assign an id to this trace, Use this to provide object + constancy between traces during animations and + transitions. + uirevision + Controls persistence of some user-driven changes to the + trace: `constraintrange` in `parcoords` traces, as well + as some `editable: true` modifications such as `name` + and `colorbar.title`. Defaults to `layout.uirevision`. + Note that other user-driven trace attribute changes are + controlled by `layout` attributes: `trace.visible` is + controlled by `layout.legend.uirevision`, + `selectedpoints` is controlled by + `layout.selectionrevision`, and `colorbar.(x|y)` + (accessible with `config: {editable: true}`) is + controlled by `layout.editrevision`. Trace changes are + tracked by `uid`, which only falls back on trace index + if no `uid` is provided. So if your app can add/remove + traces before the end of the `data` array, such that + the same trace has a different index, you can still + preserve user-driven changes if you give each trace a + `uid` that stays with it as it moves. + visible + Determines whether or not this trace is visible. If + "legendonly", the trace is not drawn, but can appear as + a legend item (provided that the legend itself is + visible). + x + Sets the x coordinates. + x0 + Alternate to `x`. Builds a linear space of x + coordinates. Use with `dx` where `x0` is the starting + coordinate and `dx` the step. + xaxis + Sets a reference between this trace's x coordinates and + a 2D cartesian x axis. If "x" (the default value), the + x coordinates refer to `layout.xaxis`. If "x2", the x + coordinates refer to `layout.xaxis2`, and so on. + xcalendar + Sets the calendar system to use with `x` date data. + xhoverformat + Sets the hover text formatting rulefor `x` using d3 + formatting mini-languages which are very similar to + those in Python. For numbers, see: + https://github.com/d3/d3-format/tree/v1.4.5#d3-format. + And for dates see: https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format. We add two items to + d3's date formatter: "%h" for half of the year as a + decimal number as well as "%{n}f" for fractional + seconds with n digits. For example, *2016-10-13 + 09:15:23.456* with tickformat "%H~%M~%S.%2f" would + display *09~15~23.46*By default the values are + formatted using `xaxis.hoverformat`. + xperiod + Only relevant when the axis `type` is "date". Sets the + period positioning in milliseconds or "M" on the x + axis. Special values in the form of "M" could be + used to declare the number of months. In this case `n` + must be a positive integer. + xperiod0 + Only relevant when the axis `type` is "date". Sets the + base for period positioning in milliseconds or date + string on the x0 axis. When `x0period` is round number + of weeks, the `x0period0` by default would be on a + Sunday i.e. 2000-01-02, otherwise it would be at + 2000-01-01. + xperiodalignment + Only relevant when the axis `type` is "date". Sets the + alignment of data points on the x axis. + xsrc + Sets the source reference on Chart Studio Cloud for + `x`. + xtype + If "array", the heatmap's x coordinates are given by + "x" (the default behavior when `x` is provided). If + "scaled", the heatmap's x coordinates are given by "x0" + and "dx" (the default behavior when `x` is not + provided). + y + Sets the y coordinates. + y0 + Alternate to `y`. Builds a linear space of y + coordinates. Use with `dy` where `y0` is the starting + coordinate and `dy` the step. + yaxis + Sets a reference between this trace's y coordinates and + a 2D cartesian y axis. If "y" (the default value), the + y coordinates refer to `layout.yaxis`. If "y2", the y + coordinates refer to `layout.yaxis2`, and so on. + ycalendar + Sets the calendar system to use with `y` date data. + yhoverformat + Sets the hover text formatting rulefor `y` using d3 + formatting mini-languages which are very similar to + those in Python. For numbers, see: + https://github.com/d3/d3-format/tree/v1.4.5#d3-format. + And for dates see: https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format. We add two items to + d3's date formatter: "%h" for half of the year as a + decimal number as well as "%{n}f" for fractional + seconds with n digits. For example, *2016-10-13 + 09:15:23.456* with tickformat "%H~%M~%S.%2f" would + display *09~15~23.46*By default the values are + formatted using `yaxis.hoverformat`. + yperiod + Only relevant when the axis `type` is "date". Sets the + period positioning in milliseconds or "M" on the y + axis. Special values in the form of "M" could be + used to declare the number of months. In this case `n` + must be a positive integer. + yperiod0 + Only relevant when the axis `type` is "date". Sets the + base for period positioning in milliseconds or date + string on the y0 axis. When `y0period` is round number + of weeks, the `y0period0` by default would be on a + Sunday i.e. 2000-01-02, otherwise it would be at + 2000-01-01. + yperiodalignment + Only relevant when the axis `type` is "date". Sets the + alignment of data points on the y axis. + ysrc + Sets the source reference on Chart Studio Cloud for + `y`. + ytype + If "array", the heatmap's y coordinates are given by + "y" (the default behavior when `y` is provided) If + "scaled", the heatmap's y coordinates are given by "y0" + and "dy" (the default behavior when `y` is not + provided) + z + Sets the z data. + zauto + Determines whether or not the color domain is computed + with respect to the input data (here in `z`) or the + bounds set in `zmin` and `zmax` Defaults to `false` + when `zmin` and `zmax` are set by the user. + zhoverformat + Sets the hover text formatting rulefor `z` using d3 + formatting mini-languages which are very similar to + those in Python. For numbers, see: https://github.com/d + 3/d3-format/tree/v1.4.5#d3-format.By default the values + are formatted using generic number format. + zmax + Sets the upper bound of the color domain. Value should + have the same units as in `z` and if set, `zmin` must + be set as well. + zmid + Sets the mid-point of the color domain by scaling + `zmin` and/or `zmax` to be equidistant to this point. + Value should have the same units as in `z`. Has no + effect when `zauto` is `false`. + zmin + Sets the lower bound of the color domain. Value should + have the same units as in `z` and if set, `zmax` must + be set as well. + zorder + Sets the layer on which this trace is displayed, + relative to other SVG traces on the same subplot. SVG + traces with higher `zorder` appear in front of those + with lower `zorder`. + zsrc + Sets the source reference on Chart Studio Cloud for + `z`. + """ + + def __init__( + self, + arg=None, + autocolorscale=None, + autocontour=None, + coloraxis=None, + colorbar=None, + colorscale=None, + connectgaps=None, + contours=None, + customdata=None, + customdatasrc=None, + dx=None, + dy=None, + fillcolor=None, + hoverinfo=None, + hoverinfosrc=None, + hoverlabel=None, + hoverongaps=None, + hovertemplate=None, + hovertemplatefallback=None, + hovertemplatesrc=None, + hovertext=None, + hovertextsrc=None, + ids=None, + idssrc=None, + legend=None, + legendgroup=None, + legendgrouptitle=None, + legendrank=None, + legendwidth=None, + line=None, + meta=None, + metasrc=None, + name=None, + ncontours=None, + opacity=None, + reversescale=None, + showlegend=None, + showscale=None, + stream=None, + text=None, + textfont=None, + textsrc=None, + texttemplate=None, + texttemplatefallback=None, + transpose=None, + uid=None, + uirevision=None, + visible=None, + x=None, + x0=None, + xaxis=None, + xcalendar=None, + xhoverformat=None, + xperiod=None, + xperiod0=None, + xperiodalignment=None, + xsrc=None, + xtype=None, + y=None, + y0=None, + yaxis=None, + ycalendar=None, + yhoverformat=None, + yperiod=None, + yperiod0=None, + yperiodalignment=None, + ysrc=None, + ytype=None, + z=None, + zauto=None, + zhoverformat=None, + zmax=None, + zmid=None, + zmin=None, + zorder=None, + zsrc=None, + **kwargs, + ): + """ + Construct a new Contour object + + The data from which contour lines are computed is set in `z`. + Data in `z` must be a 2D list of numbers. Say that `z` has N + rows and M columns, then by default, these N rows correspond to + N y coordinates (set in `y` or auto-generated) and the M + columns correspond to M x coordinates (set in `x` or auto- + generated). By setting `transpose` to True, the above behavior + is flipped. + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of :class:`plotly.graph_objs.Contour` + autocolorscale + Determines whether the colorscale is a default palette + (`autocolorscale: true`) or the palette determined by + `colorscale`. In case `colorscale` is unspecified or + `autocolorscale` is true, the default palette will be + chosen according to whether numbers in the `color` + array are all positive, all negative or mixed. + autocontour + Determines whether or not the contour level attributes + are picked by an algorithm. If True, the number of + contour levels can be set in `ncontours`. If False, set + the contour level attributes in `contours`. + coloraxis + Sets a reference to a shared color axis. References to + these shared color axes are "coloraxis", "coloraxis2", + "coloraxis3", etc. Settings for these shared color axes + are set in the layout, under `layout.coloraxis`, + `layout.coloraxis2`, etc. Note that multiple color + scales can be linked to the same color axis. + colorbar + :class:`plotly.graph_objects.contour.ColorBar` instance + or dict with compatible properties + colorscale + Sets the colorscale. The colorscale must be an array + containing arrays mapping a normalized value to an rgb, + rgba, hex, hsl, hsv, or named color string. At minimum, + a mapping for the lowest (0) and highest (1) values are + required. For example, `[[0, 'rgb(0,0,255)'], [1, + 'rgb(255,0,0)']]`. To control the bounds of the + colorscale in color space, use `zmin` and `zmax`. + Alternatively, `colorscale` may be a palette name + string of the following list: Blackbody,Bluered,Blues,C + ividis,Earth,Electric,Greens,Greys,Hot,Jet,Picnic,Portl + and,Rainbow,RdBu,Reds,Viridis,YlGnBu,YlOrRd. + connectgaps + Determines whether or not gaps (i.e. {nan} or missing + values) in the `z` data are filled in. It is defaulted + to true if `z` is a one dimensional array otherwise it + is defaulted to false. + contours + :class:`plotly.graph_objects.contour.Contours` instance + or dict with compatible properties + customdata + Assigns extra data each datum. This may be useful when + listening to hover, click and selection events. Note + that, "scatter" traces also appends customdata items in + the markers DOM elements + customdatasrc + Sets the source reference on Chart Studio Cloud for + `customdata`. + dx + Sets the x coordinate step. See `x0` for more info. + dy + Sets the y coordinate step. See `y0` for more info. + fillcolor + Sets the fill color if `contours.type` is "constraint". + Defaults to a half-transparent variant of the line + color, marker color, or marker line color, whichever is + available. + hoverinfo + Determines which trace information appear on hover. If + `none` or `skip` are set, no information is displayed + upon hovering. But, if `none` is set, click and hover + events are still fired. + hoverinfosrc + Sets the source reference on Chart Studio Cloud for + `hoverinfo`. + hoverlabel + :class:`plotly.graph_objects.contour.Hoverlabel` + instance or dict with compatible properties + hoverongaps + Determines whether or not gaps (i.e. {nan} or missing + values) in the `z` data have hover labels associated + with them. + hovertemplate + Template string used for rendering the information that + appear on hover box. Note that this will override + `hoverinfo`. Variables are inserted using %{variable}, + for example "y: %{y}" as well as %{xother}, {%_xother}, + {%_xother_}, {%xother_}. When showing info for several + points, "xother" will be added to those with different + x positions from the first point. An underscore before + or after "(x|y)other" will add a space on that side, + only when this field is shown. Numbers are formatted + using d3-format's syntax %{variable:d3-format}, for + example "Price: %{y:$.2f}". + https://github.com/d3/d3-format/tree/v1.4.5#d3-format + for details on the formatting syntax. Dates are + formatted using d3-time-format's syntax + %{variable|d3-time-format}, for example "Day: + %{2019-01-01|%A}". https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format for details on the + date formatting syntax. Variables that can't be found + will be replaced with the specifier. For example, a + template of "data: %{x}, %{y}" will result in a value + of "data: 1, %{y}" if x is 1 and y is missing. + Variables with an undefined value will be replaced with + the fallback value. The variables available in + `hovertemplate` are the ones emitted as event data + described at this link + https://plotly.com/javascript/plotlyjs-events/#event- + data. Additionally, all attributes that can be + specified per-point (the ones that are `arrayOk: true`) + are available. Anything contained in tag `` is + displayed in the secondary box, for example + `%{fullData.name}`. To hide the + secondary box completely, use an empty tag + ``. + hovertemplatefallback + Fallback string that's displayed when a variable + referenced in a template is missing. If the boolean + value 'false' is passed in, the specifier with the + missing variable will be displayed. + hovertemplatesrc + Sets the source reference on Chart Studio Cloud for + `hovertemplate`. + hovertext + Same as `text`. + hovertextsrc + Sets the source reference on Chart Studio Cloud for + `hovertext`. + ids + Assigns id labels to each datum. These ids for object + constancy of data points during animation. Should be an + array of strings, not numbers or any other type. + idssrc + Sets the source reference on Chart Studio Cloud for + `ids`. + legend + Sets the reference to a legend to show this trace in. + References to these legends are "legend", "legend2", + "legend3", etc. Settings for these legends are set in + the layout, under `layout.legend`, `layout.legend2`, + etc. + legendgroup + Sets the legend group for this trace. Traces and shapes + part of the same legend group hide/show at the same + time when toggling legend items. + legendgrouptitle + :class:`plotly.graph_objects.contour.Legendgrouptitle` + instance or dict with compatible properties + legendrank + Sets the legend rank for this trace. Items and groups + with smaller ranks are presented on top/left side while + with "reversed" `legend.traceorder` they are on + bottom/right side. The default legendrank is 1000, so + that you can use ranks less than 1000 to place certain + items before all unranked items, and ranks greater than + 1000 to go after all unranked items. When having + unranked or equal rank items shapes would be displayed + after traces i.e. according to their order in data and + layout. + legendwidth + Sets the width (in px or fraction) of the legend for + this trace. + line + :class:`plotly.graph_objects.contour.Line` instance or + dict with compatible properties + meta + Assigns extra meta information associated with this + trace that can be used in various text attributes. + Attributes such as trace `name`, graph, axis and + colorbar `title.text`, annotation `text` + `rangeselector`, `updatemenues` and `sliders` `label` + text all support `meta`. To access the trace `meta` + values in an attribute in the same trace, simply use + `%{meta[i]}` where `i` is the index or key of the + `meta` item in question. To access trace `meta` in + layout attributes, use `%{data[n[.meta[i]}` where `i` + is the index or key of the `meta` and `n` is the trace + index. + metasrc + Sets the source reference on Chart Studio Cloud for + `meta`. + name + Sets the trace name. The trace name appears as the + legend item and on hover. + ncontours + Sets the maximum number of contour levels. The actual + number of contours will be chosen automatically to be + less than or equal to the value of `ncontours`. Has an + effect only if `autocontour` is True or if + `contours.size` is missing. + opacity + Sets the opacity of the trace. + reversescale + Reverses the color mapping if true. If true, `zmin` + will correspond to the last color in the array and + `zmax` will correspond to the first color. + showlegend + Determines whether or not an item corresponding to this + trace is shown in the legend. + showscale + Determines whether or not a colorbar is displayed for + this trace. + stream + :class:`plotly.graph_objects.contour.Stream` instance + or dict with compatible properties + text + Sets the text elements associated with each z value. + textfont + For this trace it only has an effect if `coloring` is + set to "heatmap". Sets the text font. + textsrc + Sets the source reference on Chart Studio Cloud for + `text`. + texttemplate + For this trace it only has an effect if `coloring` is + set to "heatmap". Template string used for rendering + the information text that appears on points. Note that + this will override `textinfo`. Variables are inserted + using %{variable}, for example "y: %{y}". Numbers are + formatted using d3-format's syntax + %{variable:d3-format}, for example "Price: %{y:$.2f}". + https://github.com/d3/d3-format/tree/v1.4.5#d3-format + for details on the formatting syntax. Dates are + formatted using d3-time-format's syntax + %{variable|d3-time-format}, for example "Day: + %{2019-01-01|%A}". https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format for details on the + date formatting syntax. Variables that can't be found + will be replaced with the specifier. For example, a + template of "data: %{x}, %{y}" will result in a value + of "data: 1, %{y}" if x is 1 and y is missing. + Variables with an undefined value will be replaced with + the fallback value. All attributes that can be + specified per-point (the ones that are `arrayOk: true`) + are available. Finally, the template string has access + to variables `x`, `y`, `z` and `text`. + texttemplatefallback + Fallback string that's displayed when a variable + referenced in a template is missing. If the boolean + value 'false' is passed in, the specifier with the + missing variable will be displayed. + transpose + Transposes the z data. + uid + Assign an id to this trace, Use this to provide object + constancy between traces during animations and + transitions. + uirevision + Controls persistence of some user-driven changes to the + trace: `constraintrange` in `parcoords` traces, as well + as some `editable: true` modifications such as `name` + and `colorbar.title`. Defaults to `layout.uirevision`. + Note that other user-driven trace attribute changes are + controlled by `layout` attributes: `trace.visible` is + controlled by `layout.legend.uirevision`, + `selectedpoints` is controlled by + `layout.selectionrevision`, and `colorbar.(x|y)` + (accessible with `config: {editable: true}`) is + controlled by `layout.editrevision`. Trace changes are + tracked by `uid`, which only falls back on trace index + if no `uid` is provided. So if your app can add/remove + traces before the end of the `data` array, such that + the same trace has a different index, you can still + preserve user-driven changes if you give each trace a + `uid` that stays with it as it moves. + visible + Determines whether or not this trace is visible. If + "legendonly", the trace is not drawn, but can appear as + a legend item (provided that the legend itself is + visible). + x + Sets the x coordinates. + x0 + Alternate to `x`. Builds a linear space of x + coordinates. Use with `dx` where `x0` is the starting + coordinate and `dx` the step. + xaxis + Sets a reference between this trace's x coordinates and + a 2D cartesian x axis. If "x" (the default value), the + x coordinates refer to `layout.xaxis`. If "x2", the x + coordinates refer to `layout.xaxis2`, and so on. + xcalendar + Sets the calendar system to use with `x` date data. + xhoverformat + Sets the hover text formatting rulefor `x` using d3 + formatting mini-languages which are very similar to + those in Python. For numbers, see: + https://github.com/d3/d3-format/tree/v1.4.5#d3-format. + And for dates see: https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format. We add two items to + d3's date formatter: "%h" for half of the year as a + decimal number as well as "%{n}f" for fractional + seconds with n digits. For example, *2016-10-13 + 09:15:23.456* with tickformat "%H~%M~%S.%2f" would + display *09~15~23.46*By default the values are + formatted using `xaxis.hoverformat`. + xperiod + Only relevant when the axis `type` is "date". Sets the + period positioning in milliseconds or "M" on the x + axis. Special values in the form of "M" could be + used to declare the number of months. In this case `n` + must be a positive integer. + xperiod0 + Only relevant when the axis `type` is "date". Sets the + base for period positioning in milliseconds or date + string on the x0 axis. When `x0period` is round number + of weeks, the `x0period0` by default would be on a + Sunday i.e. 2000-01-02, otherwise it would be at + 2000-01-01. + xperiodalignment + Only relevant when the axis `type` is "date". Sets the + alignment of data points on the x axis. + xsrc + Sets the source reference on Chart Studio Cloud for + `x`. + xtype + If "array", the heatmap's x coordinates are given by + "x" (the default behavior when `x` is provided). If + "scaled", the heatmap's x coordinates are given by "x0" + and "dx" (the default behavior when `x` is not + provided). + y + Sets the y coordinates. + y0 + Alternate to `y`. Builds a linear space of y + coordinates. Use with `dy` where `y0` is the starting + coordinate and `dy` the step. + yaxis + Sets a reference between this trace's y coordinates and + a 2D cartesian y axis. If "y" (the default value), the + y coordinates refer to `layout.yaxis`. If "y2", the y + coordinates refer to `layout.yaxis2`, and so on. + ycalendar + Sets the calendar system to use with `y` date data. + yhoverformat + Sets the hover text formatting rulefor `y` using d3 + formatting mini-languages which are very similar to + those in Python. For numbers, see: + https://github.com/d3/d3-format/tree/v1.4.5#d3-format. + And for dates see: https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format. We add two items to + d3's date formatter: "%h" for half of the year as a + decimal number as well as "%{n}f" for fractional + seconds with n digits. For example, *2016-10-13 + 09:15:23.456* with tickformat "%H~%M~%S.%2f" would + display *09~15~23.46*By default the values are + formatted using `yaxis.hoverformat`. + yperiod + Only relevant when the axis `type` is "date". Sets the + period positioning in milliseconds or "M" on the y + axis. Special values in the form of "M" could be + used to declare the number of months. In this case `n` + must be a positive integer. + yperiod0 + Only relevant when the axis `type` is "date". Sets the + base for period positioning in milliseconds or date + string on the y0 axis. When `y0period` is round number + of weeks, the `y0period0` by default would be on a + Sunday i.e. 2000-01-02, otherwise it would be at + 2000-01-01. + yperiodalignment + Only relevant when the axis `type` is "date". Sets the + alignment of data points on the y axis. + ysrc + Sets the source reference on Chart Studio Cloud for + `y`. + ytype + If "array", the heatmap's y coordinates are given by + "y" (the default behavior when `y` is provided) If + "scaled", the heatmap's y coordinates are given by "y0" + and "dy" (the default behavior when `y` is not + provided) + z + Sets the z data. + zauto + Determines whether or not the color domain is computed + with respect to the input data (here in `z`) or the + bounds set in `zmin` and `zmax` Defaults to `false` + when `zmin` and `zmax` are set by the user. + zhoverformat + Sets the hover text formatting rulefor `z` using d3 + formatting mini-languages which are very similar to + those in Python. For numbers, see: https://github.com/d + 3/d3-format/tree/v1.4.5#d3-format.By default the values + are formatted using generic number format. + zmax + Sets the upper bound of the color domain. Value should + have the same units as in `z` and if set, `zmin` must + be set as well. + zmid + Sets the mid-point of the color domain by scaling + `zmin` and/or `zmax` to be equidistant to this point. + Value should have the same units as in `z`. Has no + effect when `zauto` is `false`. + zmin + Sets the lower bound of the color domain. Value should + have the same units as in `z` and if set, `zmax` must + be set as well. + zorder + Sets the layer on which this trace is displayed, + relative to other SVG traces on the same subplot. SVG + traces with higher `zorder` appear in front of those + with lower `zorder`. + zsrc + Sets the source reference on Chart Studio Cloud for + `z`. + + Returns + ------- + Contour + """ + super().__init__("contour") + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + if arg is None: + arg = {} + elif isinstance(arg, self.__class__): + arg = arg.to_plotly_json() + elif isinstance(arg, dict): + arg = _copy.copy(arg) + else: + raise ValueError("""\ +The first argument to the plotly.graph_objs.Contour +constructor must be a dict or +an instance of :class:`plotly.graph_objs.Contour`""") + + self._skip_invalid = kwargs.pop("skip_invalid", False) + self._validate = kwargs.pop("_validate", True) + + self._set_property("autocolorscale", arg, autocolorscale) + self._set_property("autocontour", arg, autocontour) + self._set_property("coloraxis", arg, coloraxis) + self._set_property("colorbar", arg, colorbar) + self._set_property("colorscale", arg, colorscale) + self._set_property("connectgaps", arg, connectgaps) + self._set_property("contours", arg, contours) + self._set_property("customdata", arg, customdata) + self._set_property("customdatasrc", arg, customdatasrc) + self._set_property("dx", arg, dx) + self._set_property("dy", arg, dy) + self._set_property("fillcolor", arg, fillcolor) + self._set_property("hoverinfo", arg, hoverinfo) + self._set_property("hoverinfosrc", arg, hoverinfosrc) + self._set_property("hoverlabel", arg, hoverlabel) + self._set_property("hoverongaps", arg, hoverongaps) + self._set_property("hovertemplate", arg, hovertemplate) + self._set_property("hovertemplatefallback", arg, hovertemplatefallback) + self._set_property("hovertemplatesrc", arg, hovertemplatesrc) + self._set_property("hovertext", arg, hovertext) + self._set_property("hovertextsrc", arg, hovertextsrc) + self._set_property("ids", arg, ids) + self._set_property("idssrc", arg, idssrc) + self._set_property("legend", arg, legend) + self._set_property("legendgroup", arg, legendgroup) + self._set_property("legendgrouptitle", arg, legendgrouptitle) + self._set_property("legendrank", arg, legendrank) + self._set_property("legendwidth", arg, legendwidth) + self._set_property("line", arg, line) + self._set_property("meta", arg, meta) + self._set_property("metasrc", arg, metasrc) + self._set_property("name", arg, name) + self._set_property("ncontours", arg, ncontours) + self._set_property("opacity", arg, opacity) + self._set_property("reversescale", arg, reversescale) + self._set_property("showlegend", arg, showlegend) + self._set_property("showscale", arg, showscale) + self._set_property("stream", arg, stream) + self._set_property("text", arg, text) + self._set_property("textfont", arg, textfont) + self._set_property("textsrc", arg, textsrc) + self._set_property("texttemplate", arg, texttemplate) + self._set_property("texttemplatefallback", arg, texttemplatefallback) + self._set_property("transpose", arg, transpose) + self._set_property("uid", arg, uid) + self._set_property("uirevision", arg, uirevision) + self._set_property("visible", arg, visible) + self._set_property("x", arg, x) + self._set_property("x0", arg, x0) + self._set_property("xaxis", arg, xaxis) + self._set_property("xcalendar", arg, xcalendar) + self._set_property("xhoverformat", arg, xhoverformat) + self._set_property("xperiod", arg, xperiod) + self._set_property("xperiod0", arg, xperiod0) + self._set_property("xperiodalignment", arg, xperiodalignment) + self._set_property("xsrc", arg, xsrc) + self._set_property("xtype", arg, xtype) + self._set_property("y", arg, y) + self._set_property("y0", arg, y0) + self._set_property("yaxis", arg, yaxis) + self._set_property("ycalendar", arg, ycalendar) + self._set_property("yhoverformat", arg, yhoverformat) + self._set_property("yperiod", arg, yperiod) + self._set_property("yperiod0", arg, yperiod0) + self._set_property("yperiodalignment", arg, yperiodalignment) + self._set_property("ysrc", arg, ysrc) + self._set_property("ytype", arg, ytype) + self._set_property("z", arg, z) + self._set_property("zauto", arg, zauto) + self._set_property("zhoverformat", arg, zhoverformat) + self._set_property("zmax", arg, zmax) + self._set_property("zmid", arg, zmid) + self._set_property("zmin", arg, zmin) + self._set_property("zorder", arg, zorder) + self._set_property("zsrc", arg, zsrc) + + self._props["type"] = "contour" + arg.pop("type", None) + self._process_kwargs(**dict(arg, **kwargs)) + self._skip_invalid = False diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/_contourcarpet.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/_contourcarpet.py new file mode 100644 index 0000000000000000000000000000000000000000..837b6d9a72c9de05e6dba3699f56ed09c1b24294 --- /dev/null +++ b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/_contourcarpet.py @@ -0,0 +1,1837 @@ +# --- THIS FILE IS AUTO-GENERATED --- +# Modifications will be overwitten the next time code generation run. + +from plotly.basedatatypes import BaseTraceType as _BaseTraceType +import copy as _copy + + +class Contourcarpet(_BaseTraceType): + _parent_path_str = "" + _path_str = "contourcarpet" + _valid_props = { + "a", + "a0", + "asrc", + "atype", + "autocolorscale", + "autocontour", + "b", + "b0", + "bsrc", + "btype", + "carpet", + "coloraxis", + "colorbar", + "colorscale", + "contours", + "customdata", + "customdatasrc", + "da", + "db", + "fillcolor", + "hovertext", + "hovertextsrc", + "ids", + "idssrc", + "legend", + "legendgroup", + "legendgrouptitle", + "legendrank", + "legendwidth", + "line", + "meta", + "metasrc", + "name", + "ncontours", + "opacity", + "reversescale", + "showlegend", + "showscale", + "stream", + "text", + "textsrc", + "transpose", + "type", + "uid", + "uirevision", + "visible", + "xaxis", + "yaxis", + "z", + "zauto", + "zmax", + "zmid", + "zmin", + "zorder", + "zsrc", + } + + @property + def a(self): + """ + Sets the x coordinates. + + The 'a' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["a"] + + @a.setter + def a(self, val): + self["a"] = val + + @property + def a0(self): + """ + Alternate to `x`. Builds a linear space of x coordinates. Use + with `dx` where `x0` is the starting coordinate and `dx` the + step. + + The 'a0' property accepts values of any type + + Returns + ------- + Any + """ + return self["a0"] + + @a0.setter + def a0(self, val): + self["a0"] = val + + @property + def asrc(self): + """ + Sets the source reference on Chart Studio Cloud for `a`. + + The 'asrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["asrc"] + + @asrc.setter + def asrc(self, val): + self["asrc"] = val + + @property + def atype(self): + """ + If "array", the heatmap's x coordinates are given by "x" (the + default behavior when `x` is provided). If "scaled", the + heatmap's x coordinates are given by "x0" and "dx" (the default + behavior when `x` is not provided). + + The 'atype' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['array', 'scaled'] + + Returns + ------- + Any + """ + return self["atype"] + + @atype.setter + def atype(self, val): + self["atype"] = val + + @property + def autocolorscale(self): + """ + Determines whether the colorscale is a default palette + (`autocolorscale: true`) or the palette determined by + `colorscale`. In case `colorscale` is unspecified or + `autocolorscale` is true, the default palette will be chosen + according to whether numbers in the `color` array are all + positive, all negative or mixed. + + The 'autocolorscale' property is a boolean and must be specified as: + - A boolean value: True or False + + Returns + ------- + bool + """ + return self["autocolorscale"] + + @autocolorscale.setter + def autocolorscale(self, val): + self["autocolorscale"] = val + + @property + def autocontour(self): + """ + Determines whether or not the contour level attributes are + picked by an algorithm. If True, the number of contour levels + can be set in `ncontours`. If False, set the contour level + attributes in `contours`. + + The 'autocontour' property is a boolean and must be specified as: + - A boolean value: True or False + + Returns + ------- + bool + """ + return self["autocontour"] + + @autocontour.setter + def autocontour(self, val): + self["autocontour"] = val + + @property + def b(self): + """ + Sets the y coordinates. + + The 'b' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["b"] + + @b.setter + def b(self, val): + self["b"] = val + + @property + def b0(self): + """ + Alternate to `y`. Builds a linear space of y coordinates. Use + with `dy` where `y0` is the starting coordinate and `dy` the + step. + + The 'b0' property accepts values of any type + + Returns + ------- + Any + """ + return self["b0"] + + @b0.setter + def b0(self, val): + self["b0"] = val + + @property + def bsrc(self): + """ + Sets the source reference on Chart Studio Cloud for `b`. + + The 'bsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["bsrc"] + + @bsrc.setter + def bsrc(self, val): + self["bsrc"] = val + + @property + def btype(self): + """ + If "array", the heatmap's y coordinates are given by "y" (the + default behavior when `y` is provided) If "scaled", the + heatmap's y coordinates are given by "y0" and "dy" (the default + behavior when `y` is not provided) + + The 'btype' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['array', 'scaled'] + + Returns + ------- + Any + """ + return self["btype"] + + @btype.setter + def btype(self, val): + self["btype"] = val + + @property + def carpet(self): + """ + The `carpet` of the carpet axes on which this contour trace + lies + + The 'carpet' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["carpet"] + + @carpet.setter + def carpet(self, val): + self["carpet"] = val + + @property + def coloraxis(self): + """ + Sets a reference to a shared color axis. References to these + shared color axes are "coloraxis", "coloraxis2", "coloraxis3", + etc. Settings for these shared color axes are set in the + layout, under `layout.coloraxis`, `layout.coloraxis2`, etc. + Note that multiple color scales can be linked to the same color + axis. + + The 'coloraxis' property is an identifier of a particular + subplot, of type 'coloraxis', that may be specified as: + - the string 'coloraxis' optionally followed by an integer >= 1 + (e.g. 'coloraxis', 'coloraxis1', 'coloraxis2', 'coloraxis3', etc.) + + Returns + ------- + str + """ + return self["coloraxis"] + + @coloraxis.setter + def coloraxis(self, val): + self["coloraxis"] = val + + @property + def colorbar(self): + """ + The 'colorbar' property is an instance of ColorBar + that may be specified as: + - An instance of :class:`plotly.graph_objs.contourcarpet.ColorBar` + - A dict of string/value properties that will be passed + to the ColorBar constructor + + Returns + ------- + plotly.graph_objs.contourcarpet.ColorBar + """ + return self["colorbar"] + + @colorbar.setter + def colorbar(self, val): + self["colorbar"] = val + + @property + def colorscale(self): + """ + Sets the colorscale. The colorscale must be an array containing + arrays mapping a normalized value to an rgb, rgba, hex, hsl, + hsv, or named color string. At minimum, a mapping for the + lowest (0) and highest (1) values are required. For example, + `[[0, 'rgb(0,0,255)'], [1, 'rgb(255,0,0)']]`. To control the + bounds of the colorscale in color space, use `zmin` and `zmax`. + Alternatively, `colorscale` may be a palette name string of the + following list: Blackbody,Bluered,Blues,Cividis,Earth,Electric, + Greens,Greys,Hot,Jet,Picnic,Portland,Rainbow,RdBu,Reds,Viridis, + YlGnBu,YlOrRd. + + The 'colorscale' property is a colorscale and may be + specified as: + - A list of colors that will be spaced evenly to create the colorscale. + Many predefined colorscale lists are included in the sequential, diverging, + and cyclical modules in the plotly.colors package. + - A list of 2-element lists where the first element is the + normalized color level value (starting at 0 and ending at 1), + and the second item is a valid color string. + (e.g. [[0, 'green'], [0.5, 'red'], [1.0, 'rgb(0, 0, 255)']]) + - One of the following named colorscales: + ['aggrnyl', 'agsunset', 'algae', 'amp', 'armyrose', 'balance', + 'blackbody', 'bluered', 'blues', 'blugrn', 'bluyl', 'brbg', + 'brwnyl', 'bugn', 'bupu', 'burg', 'burgyl', 'cividis', 'curl', + 'darkmint', 'deep', 'delta', 'dense', 'earth', 'edge', 'electric', + 'emrld', 'fall', 'geyser', 'gnbu', 'gray', 'greens', 'greys', + 'haline', 'hot', 'hsv', 'ice', 'icefire', 'inferno', 'jet', + 'magenta', 'magma', 'matter', 'mint', 'mrybm', 'mygbm', 'oranges', + 'orrd', 'oryel', 'oxy', 'peach', 'phase', 'picnic', 'pinkyl', + 'piyg', 'plasma', 'plotly3', 'portland', 'prgn', 'pubu', 'pubugn', + 'puor', 'purd', 'purp', 'purples', 'purpor', 'rainbow', 'rdbu', + 'rdgy', 'rdpu', 'rdylbu', 'rdylgn', 'redor', 'reds', 'solar', + 'spectral', 'speed', 'sunset', 'sunsetdark', 'teal', 'tealgrn', + 'tealrose', 'tempo', 'temps', 'thermal', 'tropic', 'turbid', + 'turbo', 'twilight', 'viridis', 'ylgn', 'ylgnbu', 'ylorbr', + 'ylorrd']. + Appending '_r' to a named colorscale reverses it. + + Returns + ------- + str + """ + return self["colorscale"] + + @colorscale.setter + def colorscale(self, val): + self["colorscale"] = val + + @property + def contours(self): + """ + The 'contours' property is an instance of Contours + that may be specified as: + - An instance of :class:`plotly.graph_objs.contourcarpet.Contours` + - A dict of string/value properties that will be passed + to the Contours constructor + + Returns + ------- + plotly.graph_objs.contourcarpet.Contours + """ + return self["contours"] + + @contours.setter + def contours(self, val): + self["contours"] = val + + @property + def customdata(self): + """ + Assigns extra data each datum. This may be useful when + listening to hover, click and selection events. Note that, + "scatter" traces also appends customdata items in the markers + DOM elements + + The 'customdata' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["customdata"] + + @customdata.setter + def customdata(self, val): + self["customdata"] = val + + @property + def customdatasrc(self): + """ + Sets the source reference on Chart Studio Cloud for + `customdata`. + + The 'customdatasrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["customdatasrc"] + + @customdatasrc.setter + def customdatasrc(self, val): + self["customdatasrc"] = val + + @property + def da(self): + """ + Sets the x coordinate step. See `x0` for more info. + + The 'da' property is a number and may be specified as: + - An int or float + + Returns + ------- + int|float + """ + return self["da"] + + @da.setter + def da(self, val): + self["da"] = val + + @property + def db(self): + """ + Sets the y coordinate step. See `y0` for more info. + + The 'db' property is a number and may be specified as: + - An int or float + + Returns + ------- + int|float + """ + return self["db"] + + @db.setter + def db(self, val): + self["db"] = val + + @property + def fillcolor(self): + """ + Sets the fill color if `contours.type` is "constraint". + Defaults to a half-transparent variant of the line color, + marker color, or marker line color, whichever is available. + + The 'fillcolor' property is a color and may be specified as: + - A hex string (e.g. '#ff0000') + - An rgb/rgba string (e.g. 'rgb(255,0,0)') + - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') + - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') + - A named CSS color: see https://plotly.com/python/css-colors/ for a list + - A number that will be interpreted as a color + according to contourcarpet.colorscale + + Returns + ------- + str + """ + return self["fillcolor"] + + @fillcolor.setter + def fillcolor(self, val): + self["fillcolor"] = val + + @property + def hovertext(self): + """ + Same as `text`. + + The 'hovertext' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["hovertext"] + + @hovertext.setter + def hovertext(self, val): + self["hovertext"] = val + + @property + def hovertextsrc(self): + """ + Sets the source reference on Chart Studio Cloud for + `hovertext`. + + The 'hovertextsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["hovertextsrc"] + + @hovertextsrc.setter + def hovertextsrc(self, val): + self["hovertextsrc"] = val + + @property + def ids(self): + """ + Assigns id labels to each datum. These ids for object constancy + of data points during animation. Should be an array of strings, + not numbers or any other type. + + The 'ids' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["ids"] + + @ids.setter + def ids(self, val): + self["ids"] = val + + @property + def idssrc(self): + """ + Sets the source reference on Chart Studio Cloud for `ids`. + + The 'idssrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["idssrc"] + + @idssrc.setter + def idssrc(self, val): + self["idssrc"] = val + + @property + def legend(self): + """ + Sets the reference to a legend to show this trace in. + References to these legends are "legend", "legend2", "legend3", + etc. Settings for these legends are set in the layout, under + `layout.legend`, `layout.legend2`, etc. + + The 'legend' property is an identifier of a particular + subplot, of type 'legend', that may be specified as: + - the string 'legend' optionally followed by an integer >= 1 + (e.g. 'legend', 'legend1', 'legend2', 'legend3', etc.) + + Returns + ------- + str + """ + return self["legend"] + + @legend.setter + def legend(self, val): + self["legend"] = val + + @property + def legendgroup(self): + """ + Sets the legend group for this trace. Traces and shapes part of + the same legend group hide/show at the same time when toggling + legend items. + + The 'legendgroup' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["legendgroup"] + + @legendgroup.setter + def legendgroup(self, val): + self["legendgroup"] = val + + @property + def legendgrouptitle(self): + """ + The 'legendgrouptitle' property is an instance of Legendgrouptitle + that may be specified as: + - An instance of :class:`plotly.graph_objs.contourcarpet.Legendgrouptitle` + - A dict of string/value properties that will be passed + to the Legendgrouptitle constructor + + Returns + ------- + plotly.graph_objs.contourcarpet.Legendgrouptitle + """ + return self["legendgrouptitle"] + + @legendgrouptitle.setter + def legendgrouptitle(self, val): + self["legendgrouptitle"] = val + + @property + def legendrank(self): + """ + Sets the legend rank for this trace. Items and groups with + smaller ranks are presented on top/left side while with + "reversed" `legend.traceorder` they are on bottom/right side. + The default legendrank is 1000, so that you can use ranks less + than 1000 to place certain items before all unranked items, and + ranks greater than 1000 to go after all unranked items. When + having unranked or equal rank items shapes would be displayed + after traces i.e. according to their order in data and layout. + + The 'legendrank' property is a number and may be specified as: + - An int or float + + Returns + ------- + int|float + """ + return self["legendrank"] + + @legendrank.setter + def legendrank(self, val): + self["legendrank"] = val + + @property + def legendwidth(self): + """ + Sets the width (in px or fraction) of the legend for this + trace. + + The 'legendwidth' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["legendwidth"] + + @legendwidth.setter + def legendwidth(self, val): + self["legendwidth"] = val + + @property + def line(self): + """ + The 'line' property is an instance of Line + that may be specified as: + - An instance of :class:`plotly.graph_objs.contourcarpet.Line` + - A dict of string/value properties that will be passed + to the Line constructor + + Returns + ------- + plotly.graph_objs.contourcarpet.Line + """ + return self["line"] + + @line.setter + def line(self, val): + self["line"] = val + + @property + def meta(self): + """ + Assigns extra meta information associated with this trace that + can be used in various text attributes. Attributes such as + trace `name`, graph, axis and colorbar `title.text`, annotation + `text` `rangeselector`, `updatemenues` and `sliders` `label` + text all support `meta`. To access the trace `meta` values in + an attribute in the same trace, simply use `%{meta[i]}` where + `i` is the index or key of the `meta` item in question. To + access trace `meta` in layout attributes, use + `%{data[n[.meta[i]}` where `i` is the index or key of the + `meta` and `n` is the trace index. + + The 'meta' property accepts values of any type + + Returns + ------- + Any|numpy.ndarray + """ + return self["meta"] + + @meta.setter + def meta(self, val): + self["meta"] = val + + @property + def metasrc(self): + """ + Sets the source reference on Chart Studio Cloud for `meta`. + + The 'metasrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["metasrc"] + + @metasrc.setter + def metasrc(self, val): + self["metasrc"] = val + + @property + def name(self): + """ + Sets the trace name. The trace name appears as the legend item + and on hover. + + The 'name' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["name"] + + @name.setter + def name(self, val): + self["name"] = val + + @property + def ncontours(self): + """ + Sets the maximum number of contour levels. The actual number of + contours will be chosen automatically to be less than or equal + to the value of `ncontours`. Has an effect only if + `autocontour` is True or if `contours.size` is missing. + + The 'ncontours' property is a integer and may be specified as: + - An int (or float that will be cast to an int) + in the interval [1, 9223372036854775807] + + Returns + ------- + int + """ + return self["ncontours"] + + @ncontours.setter + def ncontours(self, val): + self["ncontours"] = val + + @property + def opacity(self): + """ + Sets the opacity of the trace. + + The 'opacity' property is a number and may be specified as: + - An int or float in the interval [0, 1] + + Returns + ------- + int|float + """ + return self["opacity"] + + @opacity.setter + def opacity(self, val): + self["opacity"] = val + + @property + def reversescale(self): + """ + Reverses the color mapping if true. If true, `zmin` will + correspond to the last color in the array and `zmax` will + correspond to the first color. + + The 'reversescale' property is a boolean and must be specified as: + - A boolean value: True or False + + Returns + ------- + bool + """ + return self["reversescale"] + + @reversescale.setter + def reversescale(self, val): + self["reversescale"] = val + + @property + def showlegend(self): + """ + Determines whether or not an item corresponding to this trace + is shown in the legend. + + The 'showlegend' property is a boolean and must be specified as: + - A boolean value: True or False + + Returns + ------- + bool + """ + return self["showlegend"] + + @showlegend.setter + def showlegend(self, val): + self["showlegend"] = val + + @property + def showscale(self): + """ + Determines whether or not a colorbar is displayed for this + trace. + + The 'showscale' property is a boolean and must be specified as: + - A boolean value: True or False + + Returns + ------- + bool + """ + return self["showscale"] + + @showscale.setter + def showscale(self, val): + self["showscale"] = val + + @property + def stream(self): + """ + The 'stream' property is an instance of Stream + that may be specified as: + - An instance of :class:`plotly.graph_objs.contourcarpet.Stream` + - A dict of string/value properties that will be passed + to the Stream constructor + + Returns + ------- + plotly.graph_objs.contourcarpet.Stream + """ + return self["stream"] + + @stream.setter + def stream(self, val): + self["stream"] = val + + @property + def text(self): + """ + Sets the text elements associated with each z value. + + The 'text' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["text"] + + @text.setter + def text(self, val): + self["text"] = val + + @property + def textsrc(self): + """ + Sets the source reference on Chart Studio Cloud for `text`. + + The 'textsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["textsrc"] + + @textsrc.setter + def textsrc(self, val): + self["textsrc"] = val + + @property + def transpose(self): + """ + Transposes the z data. + + The 'transpose' property is a boolean and must be specified as: + - A boolean value: True or False + + Returns + ------- + bool + """ + return self["transpose"] + + @transpose.setter + def transpose(self, val): + self["transpose"] = val + + @property + def uid(self): + """ + Assign an id to this trace, Use this to provide object + constancy between traces during animations and transitions. + + The 'uid' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["uid"] + + @uid.setter + def uid(self, val): + self["uid"] = val + + @property + def uirevision(self): + """ + Controls persistence of some user-driven changes to the trace: + `constraintrange` in `parcoords` traces, as well as some + `editable: true` modifications such as `name` and + `colorbar.title`. Defaults to `layout.uirevision`. Note that + other user-driven trace attribute changes are controlled by + `layout` attributes: `trace.visible` is controlled by + `layout.legend.uirevision`, `selectedpoints` is controlled by + `layout.selectionrevision`, and `colorbar.(x|y)` (accessible + with `config: {editable: true}`) is controlled by + `layout.editrevision`. Trace changes are tracked by `uid`, + which only falls back on trace index if no `uid` is provided. + So if your app can add/remove traces before the end of the + `data` array, such that the same trace has a different index, + you can still preserve user-driven changes if you give each + trace a `uid` that stays with it as it moves. + + The 'uirevision' property accepts values of any type + + Returns + ------- + Any + """ + return self["uirevision"] + + @uirevision.setter + def uirevision(self, val): + self["uirevision"] = val + + @property + def visible(self): + """ + Determines whether or not this trace is visible. If + "legendonly", the trace is not drawn, but can appear as a + legend item (provided that the legend itself is visible). + + The 'visible' property is an enumeration that may be specified as: + - One of the following enumeration values: + [True, False, 'legendonly'] + + Returns + ------- + Any + """ + return self["visible"] + + @visible.setter + def visible(self, val): + self["visible"] = val + + @property + def xaxis(self): + """ + Sets a reference between this trace's x coordinates and a 2D + cartesian x axis. If "x" (the default value), the x coordinates + refer to `layout.xaxis`. If "x2", the x coordinates refer to + `layout.xaxis2`, and so on. + + The 'xaxis' property is an identifier of a particular + subplot, of type 'x', that may be specified as: + - the string 'x' optionally followed by an integer >= 1 + (e.g. 'x', 'x1', 'x2', 'x3', etc.) + + Returns + ------- + str + """ + return self["xaxis"] + + @xaxis.setter + def xaxis(self, val): + self["xaxis"] = val + + @property + def yaxis(self): + """ + Sets a reference between this trace's y coordinates and a 2D + cartesian y axis. If "y" (the default value), the y coordinates + refer to `layout.yaxis`. If "y2", the y coordinates refer to + `layout.yaxis2`, and so on. + + The 'yaxis' property is an identifier of a particular + subplot, of type 'y', that may be specified as: + - the string 'y' optionally followed by an integer >= 1 + (e.g. 'y', 'y1', 'y2', 'y3', etc.) + + Returns + ------- + str + """ + return self["yaxis"] + + @yaxis.setter + def yaxis(self, val): + self["yaxis"] = val + + @property + def z(self): + """ + Sets the z data. + + The 'z' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["z"] + + @z.setter + def z(self, val): + self["z"] = val + + @property + def zauto(self): + """ + Determines whether or not the color domain is computed with + respect to the input data (here in `z`) or the bounds set in + `zmin` and `zmax` Defaults to `false` when `zmin` and `zmax` + are set by the user. + + The 'zauto' property is a boolean and must be specified as: + - A boolean value: True or False + + Returns + ------- + bool + """ + return self["zauto"] + + @zauto.setter + def zauto(self, val): + self["zauto"] = val + + @property + def zmax(self): + """ + Sets the upper bound of the color domain. Value should have the + same units as in `z` and if set, `zmin` must be set as well. + + The 'zmax' property is a number and may be specified as: + - An int or float + + Returns + ------- + int|float + """ + return self["zmax"] + + @zmax.setter + def zmax(self, val): + self["zmax"] = val + + @property + def zmid(self): + """ + Sets the mid-point of the color domain by scaling `zmin` and/or + `zmax` to be equidistant to this point. Value should have the + same units as in `z`. Has no effect when `zauto` is `false`. + + The 'zmid' property is a number and may be specified as: + - An int or float + + Returns + ------- + int|float + """ + return self["zmid"] + + @zmid.setter + def zmid(self, val): + self["zmid"] = val + + @property + def zmin(self): + """ + Sets the lower bound of the color domain. Value should have the + same units as in `z` and if set, `zmax` must be set as well. + + The 'zmin' property is a number and may be specified as: + - An int or float + + Returns + ------- + int|float + """ + return self["zmin"] + + @zmin.setter + def zmin(self, val): + self["zmin"] = val + + @property + def zorder(self): + """ + Sets the layer on which this trace is displayed, relative to + other SVG traces on the same subplot. SVG traces with higher + `zorder` appear in front of those with lower `zorder`. + + The 'zorder' property is a integer and may be specified as: + - An int (or float that will be cast to an int) + + Returns + ------- + int + """ + return self["zorder"] + + @zorder.setter + def zorder(self, val): + self["zorder"] = val + + @property + def zsrc(self): + """ + Sets the source reference on Chart Studio Cloud for `z`. + + The 'zsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["zsrc"] + + @zsrc.setter + def zsrc(self, val): + self["zsrc"] = val + + @property + def type(self): + return self._props["type"] + + @property + def _prop_descriptions(self): + return """\ + a + Sets the x coordinates. + a0 + Alternate to `x`. Builds a linear space of x + coordinates. Use with `dx` where `x0` is the starting + coordinate and `dx` the step. + asrc + Sets the source reference on Chart Studio Cloud for + `a`. + atype + If "array", the heatmap's x coordinates are given by + "x" (the default behavior when `x` is provided). If + "scaled", the heatmap's x coordinates are given by "x0" + and "dx" (the default behavior when `x` is not + provided). + autocolorscale + Determines whether the colorscale is a default palette + (`autocolorscale: true`) or the palette determined by + `colorscale`. In case `colorscale` is unspecified or + `autocolorscale` is true, the default palette will be + chosen according to whether numbers in the `color` + array are all positive, all negative or mixed. + autocontour + Determines whether or not the contour level attributes + are picked by an algorithm. If True, the number of + contour levels can be set in `ncontours`. If False, set + the contour level attributes in `contours`. + b + Sets the y coordinates. + b0 + Alternate to `y`. Builds a linear space of y + coordinates. Use with `dy` where `y0` is the starting + coordinate and `dy` the step. + bsrc + Sets the source reference on Chart Studio Cloud for + `b`. + btype + If "array", the heatmap's y coordinates are given by + "y" (the default behavior when `y` is provided) If + "scaled", the heatmap's y coordinates are given by "y0" + and "dy" (the default behavior when `y` is not + provided) + carpet + The `carpet` of the carpet axes on which this contour + trace lies + coloraxis + Sets a reference to a shared color axis. References to + these shared color axes are "coloraxis", "coloraxis2", + "coloraxis3", etc. Settings for these shared color axes + are set in the layout, under `layout.coloraxis`, + `layout.coloraxis2`, etc. Note that multiple color + scales can be linked to the same color axis. + colorbar + :class:`plotly.graph_objects.contourcarpet.ColorBar` + instance or dict with compatible properties + colorscale + Sets the colorscale. The colorscale must be an array + containing arrays mapping a normalized value to an rgb, + rgba, hex, hsl, hsv, or named color string. At minimum, + a mapping for the lowest (0) and highest (1) values are + required. For example, `[[0, 'rgb(0,0,255)'], [1, + 'rgb(255,0,0)']]`. To control the bounds of the + colorscale in color space, use `zmin` and `zmax`. + Alternatively, `colorscale` may be a palette name + string of the following list: Blackbody,Bluered,Blues,C + ividis,Earth,Electric,Greens,Greys,Hot,Jet,Picnic,Portl + and,Rainbow,RdBu,Reds,Viridis,YlGnBu,YlOrRd. + contours + :class:`plotly.graph_objects.contourcarpet.Contours` + instance or dict with compatible properties + customdata + Assigns extra data each datum. This may be useful when + listening to hover, click and selection events. Note + that, "scatter" traces also appends customdata items in + the markers DOM elements + customdatasrc + Sets the source reference on Chart Studio Cloud for + `customdata`. + da + Sets the x coordinate step. See `x0` for more info. + db + Sets the y coordinate step. See `y0` for more info. + fillcolor + Sets the fill color if `contours.type` is "constraint". + Defaults to a half-transparent variant of the line + color, marker color, or marker line color, whichever is + available. + hovertext + Same as `text`. + hovertextsrc + Sets the source reference on Chart Studio Cloud for + `hovertext`. + ids + Assigns id labels to each datum. These ids for object + constancy of data points during animation. Should be an + array of strings, not numbers or any other type. + idssrc + Sets the source reference on Chart Studio Cloud for + `ids`. + legend + Sets the reference to a legend to show this trace in. + References to these legends are "legend", "legend2", + "legend3", etc. Settings for these legends are set in + the layout, under `layout.legend`, `layout.legend2`, + etc. + legendgroup + Sets the legend group for this trace. Traces and shapes + part of the same legend group hide/show at the same + time when toggling legend items. + legendgrouptitle + :class:`plotly.graph_objects.contourcarpet.Legendgroupt + itle` instance or dict with compatible properties + legendrank + Sets the legend rank for this trace. Items and groups + with smaller ranks are presented on top/left side while + with "reversed" `legend.traceorder` they are on + bottom/right side. The default legendrank is 1000, so + that you can use ranks less than 1000 to place certain + items before all unranked items, and ranks greater than + 1000 to go after all unranked items. When having + unranked or equal rank items shapes would be displayed + after traces i.e. according to their order in data and + layout. + legendwidth + Sets the width (in px or fraction) of the legend for + this trace. + line + :class:`plotly.graph_objects.contourcarpet.Line` + instance or dict with compatible properties + meta + Assigns extra meta information associated with this + trace that can be used in various text attributes. + Attributes such as trace `name`, graph, axis and + colorbar `title.text`, annotation `text` + `rangeselector`, `updatemenues` and `sliders` `label` + text all support `meta`. To access the trace `meta` + values in an attribute in the same trace, simply use + `%{meta[i]}` where `i` is the index or key of the + `meta` item in question. To access trace `meta` in + layout attributes, use `%{data[n[.meta[i]}` where `i` + is the index or key of the `meta` and `n` is the trace + index. + metasrc + Sets the source reference on Chart Studio Cloud for + `meta`. + name + Sets the trace name. The trace name appears as the + legend item and on hover. + ncontours + Sets the maximum number of contour levels. The actual + number of contours will be chosen automatically to be + less than or equal to the value of `ncontours`. Has an + effect only if `autocontour` is True or if + `contours.size` is missing. + opacity + Sets the opacity of the trace. + reversescale + Reverses the color mapping if true. If true, `zmin` + will correspond to the last color in the array and + `zmax` will correspond to the first color. + showlegend + Determines whether or not an item corresponding to this + trace is shown in the legend. + showscale + Determines whether or not a colorbar is displayed for + this trace. + stream + :class:`plotly.graph_objects.contourcarpet.Stream` + instance or dict with compatible properties + text + Sets the text elements associated with each z value. + textsrc + Sets the source reference on Chart Studio Cloud for + `text`. + transpose + Transposes the z data. + uid + Assign an id to this trace, Use this to provide object + constancy between traces during animations and + transitions. + uirevision + Controls persistence of some user-driven changes to the + trace: `constraintrange` in `parcoords` traces, as well + as some `editable: true` modifications such as `name` + and `colorbar.title`. Defaults to `layout.uirevision`. + Note that other user-driven trace attribute changes are + controlled by `layout` attributes: `trace.visible` is + controlled by `layout.legend.uirevision`, + `selectedpoints` is controlled by + `layout.selectionrevision`, and `colorbar.(x|y)` + (accessible with `config: {editable: true}`) is + controlled by `layout.editrevision`. Trace changes are + tracked by `uid`, which only falls back on trace index + if no `uid` is provided. So if your app can add/remove + traces before the end of the `data` array, such that + the same trace has a different index, you can still + preserve user-driven changes if you give each trace a + `uid` that stays with it as it moves. + visible + Determines whether or not this trace is visible. If + "legendonly", the trace is not drawn, but can appear as + a legend item (provided that the legend itself is + visible). + xaxis + Sets a reference between this trace's x coordinates and + a 2D cartesian x axis. If "x" (the default value), the + x coordinates refer to `layout.xaxis`. If "x2", the x + coordinates refer to `layout.xaxis2`, and so on. + yaxis + Sets a reference between this trace's y coordinates and + a 2D cartesian y axis. If "y" (the default value), the + y coordinates refer to `layout.yaxis`. If "y2", the y + coordinates refer to `layout.yaxis2`, and so on. + z + Sets the z data. + zauto + Determines whether or not the color domain is computed + with respect to the input data (here in `z`) or the + bounds set in `zmin` and `zmax` Defaults to `false` + when `zmin` and `zmax` are set by the user. + zmax + Sets the upper bound of the color domain. Value should + have the same units as in `z` and if set, `zmin` must + be set as well. + zmid + Sets the mid-point of the color domain by scaling + `zmin` and/or `zmax` to be equidistant to this point. + Value should have the same units as in `z`. Has no + effect when `zauto` is `false`. + zmin + Sets the lower bound of the color domain. Value should + have the same units as in `z` and if set, `zmax` must + be set as well. + zorder + Sets the layer on which this trace is displayed, + relative to other SVG traces on the same subplot. SVG + traces with higher `zorder` appear in front of those + with lower `zorder`. + zsrc + Sets the source reference on Chart Studio Cloud for + `z`. + """ + + def __init__( + self, + arg=None, + a=None, + a0=None, + asrc=None, + atype=None, + autocolorscale=None, + autocontour=None, + b=None, + b0=None, + bsrc=None, + btype=None, + carpet=None, + coloraxis=None, + colorbar=None, + colorscale=None, + contours=None, + customdata=None, + customdatasrc=None, + da=None, + db=None, + fillcolor=None, + hovertext=None, + hovertextsrc=None, + ids=None, + idssrc=None, + legend=None, + legendgroup=None, + legendgrouptitle=None, + legendrank=None, + legendwidth=None, + line=None, + meta=None, + metasrc=None, + name=None, + ncontours=None, + opacity=None, + reversescale=None, + showlegend=None, + showscale=None, + stream=None, + text=None, + textsrc=None, + transpose=None, + uid=None, + uirevision=None, + visible=None, + xaxis=None, + yaxis=None, + z=None, + zauto=None, + zmax=None, + zmid=None, + zmin=None, + zorder=None, + zsrc=None, + **kwargs, + ): + """ + Construct a new Contourcarpet object + + Plots contours on either the first carpet axis or the carpet + axis with a matching `carpet` attribute. Data `z` is + interpreted as matching that of the corresponding carpet axis. + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of :class:`plotly.graph_objs.Contourcarpet` + a + Sets the x coordinates. + a0 + Alternate to `x`. Builds a linear space of x + coordinates. Use with `dx` where `x0` is the starting + coordinate and `dx` the step. + asrc + Sets the source reference on Chart Studio Cloud for + `a`. + atype + If "array", the heatmap's x coordinates are given by + "x" (the default behavior when `x` is provided). If + "scaled", the heatmap's x coordinates are given by "x0" + and "dx" (the default behavior when `x` is not + provided). + autocolorscale + Determines whether the colorscale is a default palette + (`autocolorscale: true`) or the palette determined by + `colorscale`. In case `colorscale` is unspecified or + `autocolorscale` is true, the default palette will be + chosen according to whether numbers in the `color` + array are all positive, all negative or mixed. + autocontour + Determines whether or not the contour level attributes + are picked by an algorithm. If True, the number of + contour levels can be set in `ncontours`. If False, set + the contour level attributes in `contours`. + b + Sets the y coordinates. + b0 + Alternate to `y`. Builds a linear space of y + coordinates. Use with `dy` where `y0` is the starting + coordinate and `dy` the step. + bsrc + Sets the source reference on Chart Studio Cloud for + `b`. + btype + If "array", the heatmap's y coordinates are given by + "y" (the default behavior when `y` is provided) If + "scaled", the heatmap's y coordinates are given by "y0" + and "dy" (the default behavior when `y` is not + provided) + carpet + The `carpet` of the carpet axes on which this contour + trace lies + coloraxis + Sets a reference to a shared color axis. References to + these shared color axes are "coloraxis", "coloraxis2", + "coloraxis3", etc. Settings for these shared color axes + are set in the layout, under `layout.coloraxis`, + `layout.coloraxis2`, etc. Note that multiple color + scales can be linked to the same color axis. + colorbar + :class:`plotly.graph_objects.contourcarpet.ColorBar` + instance or dict with compatible properties + colorscale + Sets the colorscale. The colorscale must be an array + containing arrays mapping a normalized value to an rgb, + rgba, hex, hsl, hsv, or named color string. At minimum, + a mapping for the lowest (0) and highest (1) values are + required. For example, `[[0, 'rgb(0,0,255)'], [1, + 'rgb(255,0,0)']]`. To control the bounds of the + colorscale in color space, use `zmin` and `zmax`. + Alternatively, `colorscale` may be a palette name + string of the following list: Blackbody,Bluered,Blues,C + ividis,Earth,Electric,Greens,Greys,Hot,Jet,Picnic,Portl + and,Rainbow,RdBu,Reds,Viridis,YlGnBu,YlOrRd. + contours + :class:`plotly.graph_objects.contourcarpet.Contours` + instance or dict with compatible properties + customdata + Assigns extra data each datum. This may be useful when + listening to hover, click and selection events. Note + that, "scatter" traces also appends customdata items in + the markers DOM elements + customdatasrc + Sets the source reference on Chart Studio Cloud for + `customdata`. + da + Sets the x coordinate step. See `x0` for more info. + db + Sets the y coordinate step. See `y0` for more info. + fillcolor + Sets the fill color if `contours.type` is "constraint". + Defaults to a half-transparent variant of the line + color, marker color, or marker line color, whichever is + available. + hovertext + Same as `text`. + hovertextsrc + Sets the source reference on Chart Studio Cloud for + `hovertext`. + ids + Assigns id labels to each datum. These ids for object + constancy of data points during animation. Should be an + array of strings, not numbers or any other type. + idssrc + Sets the source reference on Chart Studio Cloud for + `ids`. + legend + Sets the reference to a legend to show this trace in. + References to these legends are "legend", "legend2", + "legend3", etc. Settings for these legends are set in + the layout, under `layout.legend`, `layout.legend2`, + etc. + legendgroup + Sets the legend group for this trace. Traces and shapes + part of the same legend group hide/show at the same + time when toggling legend items. + legendgrouptitle + :class:`plotly.graph_objects.contourcarpet.Legendgroupt + itle` instance or dict with compatible properties + legendrank + Sets the legend rank for this trace. Items and groups + with smaller ranks are presented on top/left side while + with "reversed" `legend.traceorder` they are on + bottom/right side. The default legendrank is 1000, so + that you can use ranks less than 1000 to place certain + items before all unranked items, and ranks greater than + 1000 to go after all unranked items. When having + unranked or equal rank items shapes would be displayed + after traces i.e. according to their order in data and + layout. + legendwidth + Sets the width (in px or fraction) of the legend for + this trace. + line + :class:`plotly.graph_objects.contourcarpet.Line` + instance or dict with compatible properties + meta + Assigns extra meta information associated with this + trace that can be used in various text attributes. + Attributes such as trace `name`, graph, axis and + colorbar `title.text`, annotation `text` + `rangeselector`, `updatemenues` and `sliders` `label` + text all support `meta`. To access the trace `meta` + values in an attribute in the same trace, simply use + `%{meta[i]}` where `i` is the index or key of the + `meta` item in question. To access trace `meta` in + layout attributes, use `%{data[n[.meta[i]}` where `i` + is the index or key of the `meta` and `n` is the trace + index. + metasrc + Sets the source reference on Chart Studio Cloud for + `meta`. + name + Sets the trace name. The trace name appears as the + legend item and on hover. + ncontours + Sets the maximum number of contour levels. The actual + number of contours will be chosen automatically to be + less than or equal to the value of `ncontours`. Has an + effect only if `autocontour` is True or if + `contours.size` is missing. + opacity + Sets the opacity of the trace. + reversescale + Reverses the color mapping if true. If true, `zmin` + will correspond to the last color in the array and + `zmax` will correspond to the first color. + showlegend + Determines whether or not an item corresponding to this + trace is shown in the legend. + showscale + Determines whether or not a colorbar is displayed for + this trace. + stream + :class:`plotly.graph_objects.contourcarpet.Stream` + instance or dict with compatible properties + text + Sets the text elements associated with each z value. + textsrc + Sets the source reference on Chart Studio Cloud for + `text`. + transpose + Transposes the z data. + uid + Assign an id to this trace, Use this to provide object + constancy between traces during animations and + transitions. + uirevision + Controls persistence of some user-driven changes to the + trace: `constraintrange` in `parcoords` traces, as well + as some `editable: true` modifications such as `name` + and `colorbar.title`. Defaults to `layout.uirevision`. + Note that other user-driven trace attribute changes are + controlled by `layout` attributes: `trace.visible` is + controlled by `layout.legend.uirevision`, + `selectedpoints` is controlled by + `layout.selectionrevision`, and `colorbar.(x|y)` + (accessible with `config: {editable: true}`) is + controlled by `layout.editrevision`. Trace changes are + tracked by `uid`, which only falls back on trace index + if no `uid` is provided. So if your app can add/remove + traces before the end of the `data` array, such that + the same trace has a different index, you can still + preserve user-driven changes if you give each trace a + `uid` that stays with it as it moves. + visible + Determines whether or not this trace is visible. If + "legendonly", the trace is not drawn, but can appear as + a legend item (provided that the legend itself is + visible). + xaxis + Sets a reference between this trace's x coordinates and + a 2D cartesian x axis. If "x" (the default value), the + x coordinates refer to `layout.xaxis`. If "x2", the x + coordinates refer to `layout.xaxis2`, and so on. + yaxis + Sets a reference between this trace's y coordinates and + a 2D cartesian y axis. If "y" (the default value), the + y coordinates refer to `layout.yaxis`. If "y2", the y + coordinates refer to `layout.yaxis2`, and so on. + z + Sets the z data. + zauto + Determines whether or not the color domain is computed + with respect to the input data (here in `z`) or the + bounds set in `zmin` and `zmax` Defaults to `false` + when `zmin` and `zmax` are set by the user. + zmax + Sets the upper bound of the color domain. Value should + have the same units as in `z` and if set, `zmin` must + be set as well. + zmid + Sets the mid-point of the color domain by scaling + `zmin` and/or `zmax` to be equidistant to this point. + Value should have the same units as in `z`. Has no + effect when `zauto` is `false`. + zmin + Sets the lower bound of the color domain. Value should + have the same units as in `z` and if set, `zmax` must + be set as well. + zorder + Sets the layer on which this trace is displayed, + relative to other SVG traces on the same subplot. SVG + traces with higher `zorder` appear in front of those + with lower `zorder`. + zsrc + Sets the source reference on Chart Studio Cloud for + `z`. + + Returns + ------- + Contourcarpet + """ + super().__init__("contourcarpet") + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + if arg is None: + arg = {} + elif isinstance(arg, self.__class__): + arg = arg.to_plotly_json() + elif isinstance(arg, dict): + arg = _copy.copy(arg) + else: + raise ValueError("""\ +The first argument to the plotly.graph_objs.Contourcarpet +constructor must be a dict or +an instance of :class:`plotly.graph_objs.Contourcarpet`""") + + self._skip_invalid = kwargs.pop("skip_invalid", False) + self._validate = kwargs.pop("_validate", True) + + self._set_property("a", arg, a) + self._set_property("a0", arg, a0) + self._set_property("asrc", arg, asrc) + self._set_property("atype", arg, atype) + self._set_property("autocolorscale", arg, autocolorscale) + self._set_property("autocontour", arg, autocontour) + self._set_property("b", arg, b) + self._set_property("b0", arg, b0) + self._set_property("bsrc", arg, bsrc) + self._set_property("btype", arg, btype) + self._set_property("carpet", arg, carpet) + self._set_property("coloraxis", arg, coloraxis) + self._set_property("colorbar", arg, colorbar) + self._set_property("colorscale", arg, colorscale) + self._set_property("contours", arg, contours) + self._set_property("customdata", arg, customdata) + self._set_property("customdatasrc", arg, customdatasrc) + self._set_property("da", arg, da) + self._set_property("db", arg, db) + self._set_property("fillcolor", arg, fillcolor) + self._set_property("hovertext", arg, hovertext) + self._set_property("hovertextsrc", arg, hovertextsrc) + self._set_property("ids", arg, ids) + self._set_property("idssrc", arg, idssrc) + self._set_property("legend", arg, legend) + self._set_property("legendgroup", arg, legendgroup) + self._set_property("legendgrouptitle", arg, legendgrouptitle) + self._set_property("legendrank", arg, legendrank) + self._set_property("legendwidth", arg, legendwidth) + self._set_property("line", arg, line) + self._set_property("meta", arg, meta) + self._set_property("metasrc", arg, metasrc) + self._set_property("name", arg, name) + self._set_property("ncontours", arg, ncontours) + self._set_property("opacity", arg, opacity) + self._set_property("reversescale", arg, reversescale) + self._set_property("showlegend", arg, showlegend) + self._set_property("showscale", arg, showscale) + self._set_property("stream", arg, stream) + self._set_property("text", arg, text) + self._set_property("textsrc", arg, textsrc) + self._set_property("transpose", arg, transpose) + self._set_property("uid", arg, uid) + self._set_property("uirevision", arg, uirevision) + self._set_property("visible", arg, visible) + self._set_property("xaxis", arg, xaxis) + self._set_property("yaxis", arg, yaxis) + self._set_property("z", arg, z) + self._set_property("zauto", arg, zauto) + self._set_property("zmax", arg, zmax) + self._set_property("zmid", arg, zmid) + self._set_property("zmin", arg, zmin) + self._set_property("zorder", arg, zorder) + self._set_property("zsrc", arg, zsrc) + + self._props["type"] = "contourcarpet" + arg.pop("type", None) + self._process_kwargs(**dict(arg, **kwargs)) + self._skip_invalid = False diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/_densitymap.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/_densitymap.py new file mode 100644 index 0000000000000000000000000000000000000000..c659825168c63c95c0b121a6f006e6d66351510f --- /dev/null +++ b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/_densitymap.py @@ -0,0 +1,1771 @@ +# --- THIS FILE IS AUTO-GENERATED --- +# Modifications will be overwitten the next time code generation run. + +from plotly.basedatatypes import BaseTraceType as _BaseTraceType +import copy as _copy + + +class Densitymap(_BaseTraceType): + _parent_path_str = "" + _path_str = "densitymap" + _valid_props = { + "autocolorscale", + "below", + "coloraxis", + "colorbar", + "colorscale", + "customdata", + "customdatasrc", + "hoverinfo", + "hoverinfosrc", + "hoverlabel", + "hovertemplate", + "hovertemplatefallback", + "hovertemplatesrc", + "hovertext", + "hovertextsrc", + "ids", + "idssrc", + "lat", + "latsrc", + "legend", + "legendgroup", + "legendgrouptitle", + "legendrank", + "legendwidth", + "lon", + "lonsrc", + "meta", + "metasrc", + "name", + "opacity", + "radius", + "radiussrc", + "reversescale", + "showlegend", + "showscale", + "stream", + "subplot", + "text", + "textsrc", + "type", + "uid", + "uirevision", + "visible", + "z", + "zauto", + "zmax", + "zmid", + "zmin", + "zsrc", + } + + @property + def autocolorscale(self): + """ + Determines whether the colorscale is a default palette + (`autocolorscale: true`) or the palette determined by + `colorscale`. In case `colorscale` is unspecified or + `autocolorscale` is true, the default palette will be chosen + according to whether numbers in the `color` array are all + positive, all negative or mixed. + + The 'autocolorscale' property is a boolean and must be specified as: + - A boolean value: True or False + + Returns + ------- + bool + """ + return self["autocolorscale"] + + @autocolorscale.setter + def autocolorscale(self, val): + self["autocolorscale"] = val + + @property + def below(self): + """ + Determines if the densitymap trace will be inserted before the + layer with the specified ID. By default, densitymap traces are + placed below the first layer of type symbol If set to '', the + layer will be inserted above every existing layer. + + The 'below' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["below"] + + @below.setter + def below(self, val): + self["below"] = val + + @property + def coloraxis(self): + """ + Sets a reference to a shared color axis. References to these + shared color axes are "coloraxis", "coloraxis2", "coloraxis3", + etc. Settings for these shared color axes are set in the + layout, under `layout.coloraxis`, `layout.coloraxis2`, etc. + Note that multiple color scales can be linked to the same color + axis. + + The 'coloraxis' property is an identifier of a particular + subplot, of type 'coloraxis', that may be specified as: + - the string 'coloraxis' optionally followed by an integer >= 1 + (e.g. 'coloraxis', 'coloraxis1', 'coloraxis2', 'coloraxis3', etc.) + + Returns + ------- + str + """ + return self["coloraxis"] + + @coloraxis.setter + def coloraxis(self, val): + self["coloraxis"] = val + + @property + def colorbar(self): + """ + The 'colorbar' property is an instance of ColorBar + that may be specified as: + - An instance of :class:`plotly.graph_objs.densitymap.ColorBar` + - A dict of string/value properties that will be passed + to the ColorBar constructor + + Returns + ------- + plotly.graph_objs.densitymap.ColorBar + """ + return self["colorbar"] + + @colorbar.setter + def colorbar(self, val): + self["colorbar"] = val + + @property + def colorscale(self): + """ + Sets the colorscale. The colorscale must be an array containing + arrays mapping a normalized value to an rgb, rgba, hex, hsl, + hsv, or named color string. At minimum, a mapping for the + lowest (0) and highest (1) values are required. For example, + `[[0, 'rgb(0,0,255)'], [1, 'rgb(255,0,0)']]`. To control the + bounds of the colorscale in color space, use `zmin` and `zmax`. + Alternatively, `colorscale` may be a palette name string of the + following list: Blackbody,Bluered,Blues,Cividis,Earth,Electric, + Greens,Greys,Hot,Jet,Picnic,Portland,Rainbow,RdBu,Reds,Viridis, + YlGnBu,YlOrRd. + + The 'colorscale' property is a colorscale and may be + specified as: + - A list of colors that will be spaced evenly to create the colorscale. + Many predefined colorscale lists are included in the sequential, diverging, + and cyclical modules in the plotly.colors package. + - A list of 2-element lists where the first element is the + normalized color level value (starting at 0 and ending at 1), + and the second item is a valid color string. + (e.g. [[0, 'green'], [0.5, 'red'], [1.0, 'rgb(0, 0, 255)']]) + - One of the following named colorscales: + ['aggrnyl', 'agsunset', 'algae', 'amp', 'armyrose', 'balance', + 'blackbody', 'bluered', 'blues', 'blugrn', 'bluyl', 'brbg', + 'brwnyl', 'bugn', 'bupu', 'burg', 'burgyl', 'cividis', 'curl', + 'darkmint', 'deep', 'delta', 'dense', 'earth', 'edge', 'electric', + 'emrld', 'fall', 'geyser', 'gnbu', 'gray', 'greens', 'greys', + 'haline', 'hot', 'hsv', 'ice', 'icefire', 'inferno', 'jet', + 'magenta', 'magma', 'matter', 'mint', 'mrybm', 'mygbm', 'oranges', + 'orrd', 'oryel', 'oxy', 'peach', 'phase', 'picnic', 'pinkyl', + 'piyg', 'plasma', 'plotly3', 'portland', 'prgn', 'pubu', 'pubugn', + 'puor', 'purd', 'purp', 'purples', 'purpor', 'rainbow', 'rdbu', + 'rdgy', 'rdpu', 'rdylbu', 'rdylgn', 'redor', 'reds', 'solar', + 'spectral', 'speed', 'sunset', 'sunsetdark', 'teal', 'tealgrn', + 'tealrose', 'tempo', 'temps', 'thermal', 'tropic', 'turbid', + 'turbo', 'twilight', 'viridis', 'ylgn', 'ylgnbu', 'ylorbr', + 'ylorrd']. + Appending '_r' to a named colorscale reverses it. + + Returns + ------- + str + """ + return self["colorscale"] + + @colorscale.setter + def colorscale(self, val): + self["colorscale"] = val + + @property + def customdata(self): + """ + Assigns extra data each datum. This may be useful when + listening to hover, click and selection events. Note that, + "scatter" traces also appends customdata items in the markers + DOM elements + + The 'customdata' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["customdata"] + + @customdata.setter + def customdata(self, val): + self["customdata"] = val + + @property + def customdatasrc(self): + """ + Sets the source reference on Chart Studio Cloud for + `customdata`. + + The 'customdatasrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["customdatasrc"] + + @customdatasrc.setter + def customdatasrc(self, val): + self["customdatasrc"] = val + + @property + def hoverinfo(self): + """ + Determines which trace information appear on hover. If `none` + or `skip` are set, no information is displayed upon hovering. + But, if `none` is set, click and hover events are still fired. + + The 'hoverinfo' property is a flaglist and may be specified + as a string containing: + - Any combination of ['lon', 'lat', 'z', 'text', 'name'] joined with '+' characters + (e.g. 'lon+lat') + OR exactly one of ['all', 'none', 'skip'] (e.g. 'skip') + - A list or array of the above + + Returns + ------- + Any|numpy.ndarray + """ + return self["hoverinfo"] + + @hoverinfo.setter + def hoverinfo(self, val): + self["hoverinfo"] = val + + @property + def hoverinfosrc(self): + """ + Sets the source reference on Chart Studio Cloud for + `hoverinfo`. + + The 'hoverinfosrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["hoverinfosrc"] + + @hoverinfosrc.setter + def hoverinfosrc(self, val): + self["hoverinfosrc"] = val + + @property + def hoverlabel(self): + """ + The 'hoverlabel' property is an instance of Hoverlabel + that may be specified as: + - An instance of :class:`plotly.graph_objs.densitymap.Hoverlabel` + - A dict of string/value properties that will be passed + to the Hoverlabel constructor + + Returns + ------- + plotly.graph_objs.densitymap.Hoverlabel + """ + return self["hoverlabel"] + + @hoverlabel.setter + def hoverlabel(self, val): + self["hoverlabel"] = val + + @property + def hovertemplate(self): + """ + Template string used for rendering the information that appear + on hover box. Note that this will override `hoverinfo`. + Variables are inserted using %{variable}, for example "y: %{y}" + as well as %{xother}, {%_xother}, {%_xother_}, {%xother_}. When + showing info for several points, "xother" will be added to + those with different x positions from the first point. An + underscore before or after "(x|y)other" will add a space on + that side, only when this field is shown. Numbers are formatted + using d3-format's syntax %{variable:d3-format}, for example + "Price: %{y:$.2f}". + https://github.com/d3/d3-format/tree/v1.4.5#d3-format for + details on the formatting syntax. Dates are formatted using + d3-time-format's syntax %{variable|d3-time-format}, for example + "Day: %{2019-01-01|%A}". https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format for details on the date + formatting syntax. Variables that can't be found will be + replaced with the specifier. For example, a template of "data: + %{x}, %{y}" will result in a value of "data: 1, %{y}" if x is 1 + and y is missing. Variables with an undefined value will be + replaced with the fallback value. The variables available in + `hovertemplate` are the ones emitted as event data described at + this link https://plotly.com/javascript/plotlyjs-events/#event- + data. Additionally, all attributes that can be specified per- + point (the ones that are `arrayOk: true`) are available. + Anything contained in tag `` is displayed in the + secondary box, for example `%{fullData.name}`. + To hide the secondary box completely, use an empty tag + ``. + + The 'hovertemplate' property is a string and must be specified as: + - A string + - A number that will be converted to a string + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["hovertemplate"] + + @hovertemplate.setter + def hovertemplate(self, val): + self["hovertemplate"] = val + + @property + def hovertemplatefallback(self): + """ + Fallback string that's displayed when a variable referenced in + a template is missing. If the boolean value 'false' is passed + in, the specifier with the missing variable will be displayed. + + The 'hovertemplatefallback' property accepts values of any type + + Returns + ------- + Any + """ + return self["hovertemplatefallback"] + + @hovertemplatefallback.setter + def hovertemplatefallback(self, val): + self["hovertemplatefallback"] = val + + @property + def hovertemplatesrc(self): + """ + Sets the source reference on Chart Studio Cloud for + `hovertemplate`. + + The 'hovertemplatesrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["hovertemplatesrc"] + + @hovertemplatesrc.setter + def hovertemplatesrc(self, val): + self["hovertemplatesrc"] = val + + @property + def hovertext(self): + """ + Sets hover text elements associated with each (lon,lat) pair If + a single string, the same string appears over all the data + points. If an array of string, the items are mapped in order to + the this trace's (lon,lat) coordinates. To be seen, trace + `hoverinfo` must contain a "text" flag. + + The 'hovertext' property is a string and must be specified as: + - A string + - A number that will be converted to a string + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["hovertext"] + + @hovertext.setter + def hovertext(self, val): + self["hovertext"] = val + + @property + def hovertextsrc(self): + """ + Sets the source reference on Chart Studio Cloud for + `hovertext`. + + The 'hovertextsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["hovertextsrc"] + + @hovertextsrc.setter + def hovertextsrc(self, val): + self["hovertextsrc"] = val + + @property + def ids(self): + """ + Assigns id labels to each datum. These ids for object constancy + of data points during animation. Should be an array of strings, + not numbers or any other type. + + The 'ids' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["ids"] + + @ids.setter + def ids(self, val): + self["ids"] = val + + @property + def idssrc(self): + """ + Sets the source reference on Chart Studio Cloud for `ids`. + + The 'idssrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["idssrc"] + + @idssrc.setter + def idssrc(self, val): + self["idssrc"] = val + + @property + def lat(self): + """ + Sets the latitude coordinates (in degrees North). + + The 'lat' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["lat"] + + @lat.setter + def lat(self, val): + self["lat"] = val + + @property + def latsrc(self): + """ + Sets the source reference on Chart Studio Cloud for `lat`. + + The 'latsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["latsrc"] + + @latsrc.setter + def latsrc(self, val): + self["latsrc"] = val + + @property + def legend(self): + """ + Sets the reference to a legend to show this trace in. + References to these legends are "legend", "legend2", "legend3", + etc. Settings for these legends are set in the layout, under + `layout.legend`, `layout.legend2`, etc. + + The 'legend' property is an identifier of a particular + subplot, of type 'legend', that may be specified as: + - the string 'legend' optionally followed by an integer >= 1 + (e.g. 'legend', 'legend1', 'legend2', 'legend3', etc.) + + Returns + ------- + str + """ + return self["legend"] + + @legend.setter + def legend(self, val): + self["legend"] = val + + @property + def legendgroup(self): + """ + Sets the legend group for this trace. Traces and shapes part of + the same legend group hide/show at the same time when toggling + legend items. + + The 'legendgroup' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["legendgroup"] + + @legendgroup.setter + def legendgroup(self, val): + self["legendgroup"] = val + + @property + def legendgrouptitle(self): + """ + The 'legendgrouptitle' property is an instance of Legendgrouptitle + that may be specified as: + - An instance of :class:`plotly.graph_objs.densitymap.Legendgrouptitle` + - A dict of string/value properties that will be passed + to the Legendgrouptitle constructor + + Returns + ------- + plotly.graph_objs.densitymap.Legendgrouptitle + """ + return self["legendgrouptitle"] + + @legendgrouptitle.setter + def legendgrouptitle(self, val): + self["legendgrouptitle"] = val + + @property + def legendrank(self): + """ + Sets the legend rank for this trace. Items and groups with + smaller ranks are presented on top/left side while with + "reversed" `legend.traceorder` they are on bottom/right side. + The default legendrank is 1000, so that you can use ranks less + than 1000 to place certain items before all unranked items, and + ranks greater than 1000 to go after all unranked items. When + having unranked or equal rank items shapes would be displayed + after traces i.e. according to their order in data and layout. + + The 'legendrank' property is a number and may be specified as: + - An int or float + + Returns + ------- + int|float + """ + return self["legendrank"] + + @legendrank.setter + def legendrank(self, val): + self["legendrank"] = val + + @property + def legendwidth(self): + """ + Sets the width (in px or fraction) of the legend for this + trace. + + The 'legendwidth' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["legendwidth"] + + @legendwidth.setter + def legendwidth(self, val): + self["legendwidth"] = val + + @property + def lon(self): + """ + Sets the longitude coordinates (in degrees East). + + The 'lon' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["lon"] + + @lon.setter + def lon(self, val): + self["lon"] = val + + @property + def lonsrc(self): + """ + Sets the source reference on Chart Studio Cloud for `lon`. + + The 'lonsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["lonsrc"] + + @lonsrc.setter + def lonsrc(self, val): + self["lonsrc"] = val + + @property + def meta(self): + """ + Assigns extra meta information associated with this trace that + can be used in various text attributes. Attributes such as + trace `name`, graph, axis and colorbar `title.text`, annotation + `text` `rangeselector`, `updatemenues` and `sliders` `label` + text all support `meta`. To access the trace `meta` values in + an attribute in the same trace, simply use `%{meta[i]}` where + `i` is the index or key of the `meta` item in question. To + access trace `meta` in layout attributes, use + `%{data[n[.meta[i]}` where `i` is the index or key of the + `meta` and `n` is the trace index. + + The 'meta' property accepts values of any type + + Returns + ------- + Any|numpy.ndarray + """ + return self["meta"] + + @meta.setter + def meta(self, val): + self["meta"] = val + + @property + def metasrc(self): + """ + Sets the source reference on Chart Studio Cloud for `meta`. + + The 'metasrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["metasrc"] + + @metasrc.setter + def metasrc(self, val): + self["metasrc"] = val + + @property + def name(self): + """ + Sets the trace name. The trace name appears as the legend item + and on hover. + + The 'name' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["name"] + + @name.setter + def name(self, val): + self["name"] = val + + @property + def opacity(self): + """ + Sets the opacity of the trace. + + The 'opacity' property is a number and may be specified as: + - An int or float in the interval [0, 1] + + Returns + ------- + int|float + """ + return self["opacity"] + + @opacity.setter + def opacity(self, val): + self["opacity"] = val + + @property + def radius(self): + """ + Sets the radius of influence of one `lon` / `lat` point in + pixels. Increasing the value makes the densitymap trace + smoother, but less detailed. + + The 'radius' property is a number and may be specified as: + - An int or float in the interval [1, inf] + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + int|float|numpy.ndarray + """ + return self["radius"] + + @radius.setter + def radius(self, val): + self["radius"] = val + + @property + def radiussrc(self): + """ + Sets the source reference on Chart Studio Cloud for `radius`. + + The 'radiussrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["radiussrc"] + + @radiussrc.setter + def radiussrc(self, val): + self["radiussrc"] = val + + @property + def reversescale(self): + """ + Reverses the color mapping if true. If true, `zmin` will + correspond to the last color in the array and `zmax` will + correspond to the first color. + + The 'reversescale' property is a boolean and must be specified as: + - A boolean value: True or False + + Returns + ------- + bool + """ + return self["reversescale"] + + @reversescale.setter + def reversescale(self, val): + self["reversescale"] = val + + @property + def showlegend(self): + """ + Determines whether or not an item corresponding to this trace + is shown in the legend. + + The 'showlegend' property is a boolean and must be specified as: + - A boolean value: True or False + + Returns + ------- + bool + """ + return self["showlegend"] + + @showlegend.setter + def showlegend(self, val): + self["showlegend"] = val + + @property + def showscale(self): + """ + Determines whether or not a colorbar is displayed for this + trace. + + The 'showscale' property is a boolean and must be specified as: + - A boolean value: True or False + + Returns + ------- + bool + """ + return self["showscale"] + + @showscale.setter + def showscale(self, val): + self["showscale"] = val + + @property + def stream(self): + """ + The 'stream' property is an instance of Stream + that may be specified as: + - An instance of :class:`plotly.graph_objs.densitymap.Stream` + - A dict of string/value properties that will be passed + to the Stream constructor + + Returns + ------- + plotly.graph_objs.densitymap.Stream + """ + return self["stream"] + + @stream.setter + def stream(self, val): + self["stream"] = val + + @property + def subplot(self): + """ + Sets a reference between this trace's data coordinates and a + map subplot. If "map" (the default value), the data refer to + `layout.map`. If "map2", the data refer to `layout.map2`, and + so on. + + The 'subplot' property is an identifier of a particular + subplot, of type 'map', that may be specified as: + - the string 'map' optionally followed by an integer >= 1 + (e.g. 'map', 'map1', 'map2', 'map3', etc.) + + Returns + ------- + str + """ + return self["subplot"] + + @subplot.setter + def subplot(self, val): + self["subplot"] = val + + @property + def text(self): + """ + Sets text elements associated with each (lon,lat) pair If a + single string, the same string appears over all the data + points. If an array of string, the items are mapped in order to + the this trace's (lon,lat) coordinates. If trace `hoverinfo` + contains a "text" flag and "hovertext" is not set, these + elements will be seen in the hover labels. + + The 'text' property is a string and must be specified as: + - A string + - A number that will be converted to a string + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["text"] + + @text.setter + def text(self, val): + self["text"] = val + + @property + def textsrc(self): + """ + Sets the source reference on Chart Studio Cloud for `text`. + + The 'textsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["textsrc"] + + @textsrc.setter + def textsrc(self, val): + self["textsrc"] = val + + @property + def uid(self): + """ + Assign an id to this trace, Use this to provide object + constancy between traces during animations and transitions. + + The 'uid' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["uid"] + + @uid.setter + def uid(self, val): + self["uid"] = val + + @property + def uirevision(self): + """ + Controls persistence of some user-driven changes to the trace: + `constraintrange` in `parcoords` traces, as well as some + `editable: true` modifications such as `name` and + `colorbar.title`. Defaults to `layout.uirevision`. Note that + other user-driven trace attribute changes are controlled by + `layout` attributes: `trace.visible` is controlled by + `layout.legend.uirevision`, `selectedpoints` is controlled by + `layout.selectionrevision`, and `colorbar.(x|y)` (accessible + with `config: {editable: true}`) is controlled by + `layout.editrevision`. Trace changes are tracked by `uid`, + which only falls back on trace index if no `uid` is provided. + So if your app can add/remove traces before the end of the + `data` array, such that the same trace has a different index, + you can still preserve user-driven changes if you give each + trace a `uid` that stays with it as it moves. + + The 'uirevision' property accepts values of any type + + Returns + ------- + Any + """ + return self["uirevision"] + + @uirevision.setter + def uirevision(self, val): + self["uirevision"] = val + + @property + def visible(self): + """ + Determines whether or not this trace is visible. If + "legendonly", the trace is not drawn, but can appear as a + legend item (provided that the legend itself is visible). + + The 'visible' property is an enumeration that may be specified as: + - One of the following enumeration values: + [True, False, 'legendonly'] + + Returns + ------- + Any + """ + return self["visible"] + + @visible.setter + def visible(self, val): + self["visible"] = val + + @property + def z(self): + """ + Sets the points' weight. For example, a value of 10 would be + equivalent to having 10 points of weight 1 in the same spot + + The 'z' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["z"] + + @z.setter + def z(self, val): + self["z"] = val + + @property + def zauto(self): + """ + Determines whether or not the color domain is computed with + respect to the input data (here in `z`) or the bounds set in + `zmin` and `zmax` Defaults to `false` when `zmin` and `zmax` + are set by the user. + + The 'zauto' property is a boolean and must be specified as: + - A boolean value: True or False + + Returns + ------- + bool + """ + return self["zauto"] + + @zauto.setter + def zauto(self, val): + self["zauto"] = val + + @property + def zmax(self): + """ + Sets the upper bound of the color domain. Value should have the + same units as in `z` and if set, `zmin` must be set as well. + + The 'zmax' property is a number and may be specified as: + - An int or float + + Returns + ------- + int|float + """ + return self["zmax"] + + @zmax.setter + def zmax(self, val): + self["zmax"] = val + + @property + def zmid(self): + """ + Sets the mid-point of the color domain by scaling `zmin` and/or + `zmax` to be equidistant to this point. Value should have the + same units as in `z`. Has no effect when `zauto` is `false`. + + The 'zmid' property is a number and may be specified as: + - An int or float + + Returns + ------- + int|float + """ + return self["zmid"] + + @zmid.setter + def zmid(self, val): + self["zmid"] = val + + @property + def zmin(self): + """ + Sets the lower bound of the color domain. Value should have the + same units as in `z` and if set, `zmax` must be set as well. + + The 'zmin' property is a number and may be specified as: + - An int or float + + Returns + ------- + int|float + """ + return self["zmin"] + + @zmin.setter + def zmin(self, val): + self["zmin"] = val + + @property + def zsrc(self): + """ + Sets the source reference on Chart Studio Cloud for `z`. + + The 'zsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["zsrc"] + + @zsrc.setter + def zsrc(self, val): + self["zsrc"] = val + + @property + def type(self): + return self._props["type"] + + @property + def _prop_descriptions(self): + return """\ + autocolorscale + Determines whether the colorscale is a default palette + (`autocolorscale: true`) or the palette determined by + `colorscale`. In case `colorscale` is unspecified or + `autocolorscale` is true, the default palette will be + chosen according to whether numbers in the `color` + array are all positive, all negative or mixed. + below + Determines if the densitymap trace will be inserted + before the layer with the specified ID. By default, + densitymap traces are placed below the first layer of + type symbol If set to '', the layer will be inserted + above every existing layer. + coloraxis + Sets a reference to a shared color axis. References to + these shared color axes are "coloraxis", "coloraxis2", + "coloraxis3", etc. Settings for these shared color axes + are set in the layout, under `layout.coloraxis`, + `layout.coloraxis2`, etc. Note that multiple color + scales can be linked to the same color axis. + colorbar + :class:`plotly.graph_objects.densitymap.ColorBar` + instance or dict with compatible properties + colorscale + Sets the colorscale. The colorscale must be an array + containing arrays mapping a normalized value to an rgb, + rgba, hex, hsl, hsv, or named color string. At minimum, + a mapping for the lowest (0) and highest (1) values are + required. For example, `[[0, 'rgb(0,0,255)'], [1, + 'rgb(255,0,0)']]`. To control the bounds of the + colorscale in color space, use `zmin` and `zmax`. + Alternatively, `colorscale` may be a palette name + string of the following list: Blackbody,Bluered,Blues,C + ividis,Earth,Electric,Greens,Greys,Hot,Jet,Picnic,Portl + and,Rainbow,RdBu,Reds,Viridis,YlGnBu,YlOrRd. + customdata + Assigns extra data each datum. This may be useful when + listening to hover, click and selection events. Note + that, "scatter" traces also appends customdata items in + the markers DOM elements + customdatasrc + Sets the source reference on Chart Studio Cloud for + `customdata`. + hoverinfo + Determines which trace information appear on hover. If + `none` or `skip` are set, no information is displayed + upon hovering. But, if `none` is set, click and hover + events are still fired. + hoverinfosrc + Sets the source reference on Chart Studio Cloud for + `hoverinfo`. + hoverlabel + :class:`plotly.graph_objects.densitymap.Hoverlabel` + instance or dict with compatible properties + hovertemplate + Template string used for rendering the information that + appear on hover box. Note that this will override + `hoverinfo`. Variables are inserted using %{variable}, + for example "y: %{y}" as well as %{xother}, {%_xother}, + {%_xother_}, {%xother_}. When showing info for several + points, "xother" will be added to those with different + x positions from the first point. An underscore before + or after "(x|y)other" will add a space on that side, + only when this field is shown. Numbers are formatted + using d3-format's syntax %{variable:d3-format}, for + example "Price: %{y:$.2f}". + https://github.com/d3/d3-format/tree/v1.4.5#d3-format + for details on the formatting syntax. Dates are + formatted using d3-time-format's syntax + %{variable|d3-time-format}, for example "Day: + %{2019-01-01|%A}". https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format for details on the + date formatting syntax. Variables that can't be found + will be replaced with the specifier. For example, a + template of "data: %{x}, %{y}" will result in a value + of "data: 1, %{y}" if x is 1 and y is missing. + Variables with an undefined value will be replaced with + the fallback value. The variables available in + `hovertemplate` are the ones emitted as event data + described at this link + https://plotly.com/javascript/plotlyjs-events/#event- + data. Additionally, all attributes that can be + specified per-point (the ones that are `arrayOk: true`) + are available. Anything contained in tag `` is + displayed in the secondary box, for example + `%{fullData.name}`. To hide the + secondary box completely, use an empty tag + ``. + hovertemplatefallback + Fallback string that's displayed when a variable + referenced in a template is missing. If the boolean + value 'false' is passed in, the specifier with the + missing variable will be displayed. + hovertemplatesrc + Sets the source reference on Chart Studio Cloud for + `hovertemplate`. + hovertext + Sets hover text elements associated with each (lon,lat) + pair If a single string, the same string appears over + all the data points. If an array of string, the items + are mapped in order to the this trace's (lon,lat) + coordinates. To be seen, trace `hoverinfo` must contain + a "text" flag. + hovertextsrc + Sets the source reference on Chart Studio Cloud for + `hovertext`. + ids + Assigns id labels to each datum. These ids for object + constancy of data points during animation. Should be an + array of strings, not numbers or any other type. + idssrc + Sets the source reference on Chart Studio Cloud for + `ids`. + lat + Sets the latitude coordinates (in degrees North). + latsrc + Sets the source reference on Chart Studio Cloud for + `lat`. + legend + Sets the reference to a legend to show this trace in. + References to these legends are "legend", "legend2", + "legend3", etc. Settings for these legends are set in + the layout, under `layout.legend`, `layout.legend2`, + etc. + legendgroup + Sets the legend group for this trace. Traces and shapes + part of the same legend group hide/show at the same + time when toggling legend items. + legendgrouptitle + :class:`plotly.graph_objects.densitymap.Legendgrouptitl + e` instance or dict with compatible properties + legendrank + Sets the legend rank for this trace. Items and groups + with smaller ranks are presented on top/left side while + with "reversed" `legend.traceorder` they are on + bottom/right side. The default legendrank is 1000, so + that you can use ranks less than 1000 to place certain + items before all unranked items, and ranks greater than + 1000 to go after all unranked items. When having + unranked or equal rank items shapes would be displayed + after traces i.e. according to their order in data and + layout. + legendwidth + Sets the width (in px or fraction) of the legend for + this trace. + lon + Sets the longitude coordinates (in degrees East). + lonsrc + Sets the source reference on Chart Studio Cloud for + `lon`. + meta + Assigns extra meta information associated with this + trace that can be used in various text attributes. + Attributes such as trace `name`, graph, axis and + colorbar `title.text`, annotation `text` + `rangeselector`, `updatemenues` and `sliders` `label` + text all support `meta`. To access the trace `meta` + values in an attribute in the same trace, simply use + `%{meta[i]}` where `i` is the index or key of the + `meta` item in question. To access trace `meta` in + layout attributes, use `%{data[n[.meta[i]}` where `i` + is the index or key of the `meta` and `n` is the trace + index. + metasrc + Sets the source reference on Chart Studio Cloud for + `meta`. + name + Sets the trace name. The trace name appears as the + legend item and on hover. + opacity + Sets the opacity of the trace. + radius + Sets the radius of influence of one `lon` / `lat` point + in pixels. Increasing the value makes the densitymap + trace smoother, but less detailed. + radiussrc + Sets the source reference on Chart Studio Cloud for + `radius`. + reversescale + Reverses the color mapping if true. If true, `zmin` + will correspond to the last color in the array and + `zmax` will correspond to the first color. + showlegend + Determines whether or not an item corresponding to this + trace is shown in the legend. + showscale + Determines whether or not a colorbar is displayed for + this trace. + stream + :class:`plotly.graph_objects.densitymap.Stream` + instance or dict with compatible properties + subplot + Sets a reference between this trace's data coordinates + and a map subplot. If "map" (the default value), the + data refer to `layout.map`. If "map2", the data refer + to `layout.map2`, and so on. + text + Sets text elements associated with each (lon,lat) pair + If a single string, the same string appears over all + the data points. If an array of string, the items are + mapped in order to the this trace's (lon,lat) + coordinates. If trace `hoverinfo` contains a "text" + flag and "hovertext" is not set, these elements will be + seen in the hover labels. + textsrc + Sets the source reference on Chart Studio Cloud for + `text`. + uid + Assign an id to this trace, Use this to provide object + constancy between traces during animations and + transitions. + uirevision + Controls persistence of some user-driven changes to the + trace: `constraintrange` in `parcoords` traces, as well + as some `editable: true` modifications such as `name` + and `colorbar.title`. Defaults to `layout.uirevision`. + Note that other user-driven trace attribute changes are + controlled by `layout` attributes: `trace.visible` is + controlled by `layout.legend.uirevision`, + `selectedpoints` is controlled by + `layout.selectionrevision`, and `colorbar.(x|y)` + (accessible with `config: {editable: true}`) is + controlled by `layout.editrevision`. Trace changes are + tracked by `uid`, which only falls back on trace index + if no `uid` is provided. So if your app can add/remove + traces before the end of the `data` array, such that + the same trace has a different index, you can still + preserve user-driven changes if you give each trace a + `uid` that stays with it as it moves. + visible + Determines whether or not this trace is visible. If + "legendonly", the trace is not drawn, but can appear as + a legend item (provided that the legend itself is + visible). + z + Sets the points' weight. For example, a value of 10 + would be equivalent to having 10 points of weight 1 in + the same spot + zauto + Determines whether or not the color domain is computed + with respect to the input data (here in `z`) or the + bounds set in `zmin` and `zmax` Defaults to `false` + when `zmin` and `zmax` are set by the user. + zmax + Sets the upper bound of the color domain. Value should + have the same units as in `z` and if set, `zmin` must + be set as well. + zmid + Sets the mid-point of the color domain by scaling + `zmin` and/or `zmax` to be equidistant to this point. + Value should have the same units as in `z`. Has no + effect when `zauto` is `false`. + zmin + Sets the lower bound of the color domain. Value should + have the same units as in `z` and if set, `zmax` must + be set as well. + zsrc + Sets the source reference on Chart Studio Cloud for + `z`. + """ + + def __init__( + self, + arg=None, + autocolorscale=None, + below=None, + coloraxis=None, + colorbar=None, + colorscale=None, + customdata=None, + customdatasrc=None, + hoverinfo=None, + hoverinfosrc=None, + hoverlabel=None, + hovertemplate=None, + hovertemplatefallback=None, + hovertemplatesrc=None, + hovertext=None, + hovertextsrc=None, + ids=None, + idssrc=None, + lat=None, + latsrc=None, + legend=None, + legendgroup=None, + legendgrouptitle=None, + legendrank=None, + legendwidth=None, + lon=None, + lonsrc=None, + meta=None, + metasrc=None, + name=None, + opacity=None, + radius=None, + radiussrc=None, + reversescale=None, + showlegend=None, + showscale=None, + stream=None, + subplot=None, + text=None, + textsrc=None, + uid=None, + uirevision=None, + visible=None, + z=None, + zauto=None, + zmax=None, + zmid=None, + zmin=None, + zsrc=None, + **kwargs, + ): + """ + Construct a new Densitymap object + + Draws a bivariate kernel density estimation with a Gaussian + kernel from `lon` and `lat` coordinates and optional `z` values + using a colorscale. + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of :class:`plotly.graph_objs.Densitymap` + autocolorscale + Determines whether the colorscale is a default palette + (`autocolorscale: true`) or the palette determined by + `colorscale`. In case `colorscale` is unspecified or + `autocolorscale` is true, the default palette will be + chosen according to whether numbers in the `color` + array are all positive, all negative or mixed. + below + Determines if the densitymap trace will be inserted + before the layer with the specified ID. By default, + densitymap traces are placed below the first layer of + type symbol If set to '', the layer will be inserted + above every existing layer. + coloraxis + Sets a reference to a shared color axis. References to + these shared color axes are "coloraxis", "coloraxis2", + "coloraxis3", etc. Settings for these shared color axes + are set in the layout, under `layout.coloraxis`, + `layout.coloraxis2`, etc. Note that multiple color + scales can be linked to the same color axis. + colorbar + :class:`plotly.graph_objects.densitymap.ColorBar` + instance or dict with compatible properties + colorscale + Sets the colorscale. The colorscale must be an array + containing arrays mapping a normalized value to an rgb, + rgba, hex, hsl, hsv, or named color string. At minimum, + a mapping for the lowest (0) and highest (1) values are + required. For example, `[[0, 'rgb(0,0,255)'], [1, + 'rgb(255,0,0)']]`. To control the bounds of the + colorscale in color space, use `zmin` and `zmax`. + Alternatively, `colorscale` may be a palette name + string of the following list: Blackbody,Bluered,Blues,C + ividis,Earth,Electric,Greens,Greys,Hot,Jet,Picnic,Portl + and,Rainbow,RdBu,Reds,Viridis,YlGnBu,YlOrRd. + customdata + Assigns extra data each datum. This may be useful when + listening to hover, click and selection events. Note + that, "scatter" traces also appends customdata items in + the markers DOM elements + customdatasrc + Sets the source reference on Chart Studio Cloud for + `customdata`. + hoverinfo + Determines which trace information appear on hover. If + `none` or `skip` are set, no information is displayed + upon hovering. But, if `none` is set, click and hover + events are still fired. + hoverinfosrc + Sets the source reference on Chart Studio Cloud for + `hoverinfo`. + hoverlabel + :class:`plotly.graph_objects.densitymap.Hoverlabel` + instance or dict with compatible properties + hovertemplate + Template string used for rendering the information that + appear on hover box. Note that this will override + `hoverinfo`. Variables are inserted using %{variable}, + for example "y: %{y}" as well as %{xother}, {%_xother}, + {%_xother_}, {%xother_}. When showing info for several + points, "xother" will be added to those with different + x positions from the first point. An underscore before + or after "(x|y)other" will add a space on that side, + only when this field is shown. Numbers are formatted + using d3-format's syntax %{variable:d3-format}, for + example "Price: %{y:$.2f}". + https://github.com/d3/d3-format/tree/v1.4.5#d3-format + for details on the formatting syntax. Dates are + formatted using d3-time-format's syntax + %{variable|d3-time-format}, for example "Day: + %{2019-01-01|%A}". https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format for details on the + date formatting syntax. Variables that can't be found + will be replaced with the specifier. For example, a + template of "data: %{x}, %{y}" will result in a value + of "data: 1, %{y}" if x is 1 and y is missing. + Variables with an undefined value will be replaced with + the fallback value. The variables available in + `hovertemplate` are the ones emitted as event data + described at this link + https://plotly.com/javascript/plotlyjs-events/#event- + data. Additionally, all attributes that can be + specified per-point (the ones that are `arrayOk: true`) + are available. Anything contained in tag `` is + displayed in the secondary box, for example + `%{fullData.name}`. To hide the + secondary box completely, use an empty tag + ``. + hovertemplatefallback + Fallback string that's displayed when a variable + referenced in a template is missing. If the boolean + value 'false' is passed in, the specifier with the + missing variable will be displayed. + hovertemplatesrc + Sets the source reference on Chart Studio Cloud for + `hovertemplate`. + hovertext + Sets hover text elements associated with each (lon,lat) + pair If a single string, the same string appears over + all the data points. If an array of string, the items + are mapped in order to the this trace's (lon,lat) + coordinates. To be seen, trace `hoverinfo` must contain + a "text" flag. + hovertextsrc + Sets the source reference on Chart Studio Cloud for + `hovertext`. + ids + Assigns id labels to each datum. These ids for object + constancy of data points during animation. Should be an + array of strings, not numbers or any other type. + idssrc + Sets the source reference on Chart Studio Cloud for + `ids`. + lat + Sets the latitude coordinates (in degrees North). + latsrc + Sets the source reference on Chart Studio Cloud for + `lat`. + legend + Sets the reference to a legend to show this trace in. + References to these legends are "legend", "legend2", + "legend3", etc. Settings for these legends are set in + the layout, under `layout.legend`, `layout.legend2`, + etc. + legendgroup + Sets the legend group for this trace. Traces and shapes + part of the same legend group hide/show at the same + time when toggling legend items. + legendgrouptitle + :class:`plotly.graph_objects.densitymap.Legendgrouptitl + e` instance or dict with compatible properties + legendrank + Sets the legend rank for this trace. Items and groups + with smaller ranks are presented on top/left side while + with "reversed" `legend.traceorder` they are on + bottom/right side. The default legendrank is 1000, so + that you can use ranks less than 1000 to place certain + items before all unranked items, and ranks greater than + 1000 to go after all unranked items. When having + unranked or equal rank items shapes would be displayed + after traces i.e. according to their order in data and + layout. + legendwidth + Sets the width (in px or fraction) of the legend for + this trace. + lon + Sets the longitude coordinates (in degrees East). + lonsrc + Sets the source reference on Chart Studio Cloud for + `lon`. + meta + Assigns extra meta information associated with this + trace that can be used in various text attributes. + Attributes such as trace `name`, graph, axis and + colorbar `title.text`, annotation `text` + `rangeselector`, `updatemenues` and `sliders` `label` + text all support `meta`. To access the trace `meta` + values in an attribute in the same trace, simply use + `%{meta[i]}` where `i` is the index or key of the + `meta` item in question. To access trace `meta` in + layout attributes, use `%{data[n[.meta[i]}` where `i` + is the index or key of the `meta` and `n` is the trace + index. + metasrc + Sets the source reference on Chart Studio Cloud for + `meta`. + name + Sets the trace name. The trace name appears as the + legend item and on hover. + opacity + Sets the opacity of the trace. + radius + Sets the radius of influence of one `lon` / `lat` point + in pixels. Increasing the value makes the densitymap + trace smoother, but less detailed. + radiussrc + Sets the source reference on Chart Studio Cloud for + `radius`. + reversescale + Reverses the color mapping if true. If true, `zmin` + will correspond to the last color in the array and + `zmax` will correspond to the first color. + showlegend + Determines whether or not an item corresponding to this + trace is shown in the legend. + showscale + Determines whether or not a colorbar is displayed for + this trace. + stream + :class:`plotly.graph_objects.densitymap.Stream` + instance or dict with compatible properties + subplot + Sets a reference between this trace's data coordinates + and a map subplot. If "map" (the default value), the + data refer to `layout.map`. If "map2", the data refer + to `layout.map2`, and so on. + text + Sets text elements associated with each (lon,lat) pair + If a single string, the same string appears over all + the data points. If an array of string, the items are + mapped in order to the this trace's (lon,lat) + coordinates. If trace `hoverinfo` contains a "text" + flag and "hovertext" is not set, these elements will be + seen in the hover labels. + textsrc + Sets the source reference on Chart Studio Cloud for + `text`. + uid + Assign an id to this trace, Use this to provide object + constancy between traces during animations and + transitions. + uirevision + Controls persistence of some user-driven changes to the + trace: `constraintrange` in `parcoords` traces, as well + as some `editable: true` modifications such as `name` + and `colorbar.title`. Defaults to `layout.uirevision`. + Note that other user-driven trace attribute changes are + controlled by `layout` attributes: `trace.visible` is + controlled by `layout.legend.uirevision`, + `selectedpoints` is controlled by + `layout.selectionrevision`, and `colorbar.(x|y)` + (accessible with `config: {editable: true}`) is + controlled by `layout.editrevision`. Trace changes are + tracked by `uid`, which only falls back on trace index + if no `uid` is provided. So if your app can add/remove + traces before the end of the `data` array, such that + the same trace has a different index, you can still + preserve user-driven changes if you give each trace a + `uid` that stays with it as it moves. + visible + Determines whether or not this trace is visible. If + "legendonly", the trace is not drawn, but can appear as + a legend item (provided that the legend itself is + visible). + z + Sets the points' weight. For example, a value of 10 + would be equivalent to having 10 points of weight 1 in + the same spot + zauto + Determines whether or not the color domain is computed + with respect to the input data (here in `z`) or the + bounds set in `zmin` and `zmax` Defaults to `false` + when `zmin` and `zmax` are set by the user. + zmax + Sets the upper bound of the color domain. Value should + have the same units as in `z` and if set, `zmin` must + be set as well. + zmid + Sets the mid-point of the color domain by scaling + `zmin` and/or `zmax` to be equidistant to this point. + Value should have the same units as in `z`. Has no + effect when `zauto` is `false`. + zmin + Sets the lower bound of the color domain. Value should + have the same units as in `z` and if set, `zmax` must + be set as well. + zsrc + Sets the source reference on Chart Studio Cloud for + `z`. + + Returns + ------- + Densitymap + """ + super().__init__("densitymap") + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + if arg is None: + arg = {} + elif isinstance(arg, self.__class__): + arg = arg.to_plotly_json() + elif isinstance(arg, dict): + arg = _copy.copy(arg) + else: + raise ValueError("""\ +The first argument to the plotly.graph_objs.Densitymap +constructor must be a dict or +an instance of :class:`plotly.graph_objs.Densitymap`""") + + self._skip_invalid = kwargs.pop("skip_invalid", False) + self._validate = kwargs.pop("_validate", True) + + self._set_property("autocolorscale", arg, autocolorscale) + self._set_property("below", arg, below) + self._set_property("coloraxis", arg, coloraxis) + self._set_property("colorbar", arg, colorbar) + self._set_property("colorscale", arg, colorscale) + self._set_property("customdata", arg, customdata) + self._set_property("customdatasrc", arg, customdatasrc) + self._set_property("hoverinfo", arg, hoverinfo) + self._set_property("hoverinfosrc", arg, hoverinfosrc) + self._set_property("hoverlabel", arg, hoverlabel) + self._set_property("hovertemplate", arg, hovertemplate) + self._set_property("hovertemplatefallback", arg, hovertemplatefallback) + self._set_property("hovertemplatesrc", arg, hovertemplatesrc) + self._set_property("hovertext", arg, hovertext) + self._set_property("hovertextsrc", arg, hovertextsrc) + self._set_property("ids", arg, ids) + self._set_property("idssrc", arg, idssrc) + self._set_property("lat", arg, lat) + self._set_property("latsrc", arg, latsrc) + self._set_property("legend", arg, legend) + self._set_property("legendgroup", arg, legendgroup) + self._set_property("legendgrouptitle", arg, legendgrouptitle) + self._set_property("legendrank", arg, legendrank) + self._set_property("legendwidth", arg, legendwidth) + self._set_property("lon", arg, lon) + self._set_property("lonsrc", arg, lonsrc) + self._set_property("meta", arg, meta) + self._set_property("metasrc", arg, metasrc) + self._set_property("name", arg, name) + self._set_property("opacity", arg, opacity) + self._set_property("radius", arg, radius) + self._set_property("radiussrc", arg, radiussrc) + self._set_property("reversescale", arg, reversescale) + self._set_property("showlegend", arg, showlegend) + self._set_property("showscale", arg, showscale) + self._set_property("stream", arg, stream) + self._set_property("subplot", arg, subplot) + self._set_property("text", arg, text) + self._set_property("textsrc", arg, textsrc) + self._set_property("uid", arg, uid) + self._set_property("uirevision", arg, uirevision) + self._set_property("visible", arg, visible) + self._set_property("z", arg, z) + self._set_property("zauto", arg, zauto) + self._set_property("zmax", arg, zmax) + self._set_property("zmid", arg, zmid) + self._set_property("zmin", arg, zmin) + self._set_property("zsrc", arg, zsrc) + + self._props["type"] = "densitymap" + arg.pop("type", None) + self._process_kwargs(**dict(arg, **kwargs)) + self._skip_invalid = False diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/_densitymapbox.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/_densitymapbox.py new file mode 100644 index 0000000000000000000000000000000000000000..b3fb169b53a19ed465899cf9a6b06ca986e495a4 --- /dev/null +++ b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/_densitymapbox.py @@ -0,0 +1,1798 @@ +# --- THIS FILE IS AUTO-GENERATED --- +# Modifications will be overwitten the next time code generation run. + +from plotly.basedatatypes import BaseTraceType as _BaseTraceType +import copy as _copy +import warnings + + +class Densitymapbox(_BaseTraceType): + _parent_path_str = "" + _path_str = "densitymapbox" + _valid_props = { + "autocolorscale", + "below", + "coloraxis", + "colorbar", + "colorscale", + "customdata", + "customdatasrc", + "hoverinfo", + "hoverinfosrc", + "hoverlabel", + "hovertemplate", + "hovertemplatefallback", + "hovertemplatesrc", + "hovertext", + "hovertextsrc", + "ids", + "idssrc", + "lat", + "latsrc", + "legend", + "legendgroup", + "legendgrouptitle", + "legendrank", + "legendwidth", + "lon", + "lonsrc", + "meta", + "metasrc", + "name", + "opacity", + "radius", + "radiussrc", + "reversescale", + "showlegend", + "showscale", + "stream", + "subplot", + "text", + "textsrc", + "type", + "uid", + "uirevision", + "visible", + "z", + "zauto", + "zmax", + "zmid", + "zmin", + "zsrc", + } + + @property + def autocolorscale(self): + """ + Determines whether the colorscale is a default palette + (`autocolorscale: true`) or the palette determined by + `colorscale`. In case `colorscale` is unspecified or + `autocolorscale` is true, the default palette will be chosen + according to whether numbers in the `color` array are all + positive, all negative or mixed. + + The 'autocolorscale' property is a boolean and must be specified as: + - A boolean value: True or False + + Returns + ------- + bool + """ + return self["autocolorscale"] + + @autocolorscale.setter + def autocolorscale(self, val): + self["autocolorscale"] = val + + @property + def below(self): + """ + Determines if the densitymapbox trace will be inserted before + the layer with the specified ID. By default, densitymapbox + traces are placed below the first layer of type symbol If set + to '', the layer will be inserted above every existing layer. + + The 'below' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["below"] + + @below.setter + def below(self, val): + self["below"] = val + + @property + def coloraxis(self): + """ + Sets a reference to a shared color axis. References to these + shared color axes are "coloraxis", "coloraxis2", "coloraxis3", + etc. Settings for these shared color axes are set in the + layout, under `layout.coloraxis`, `layout.coloraxis2`, etc. + Note that multiple color scales can be linked to the same color + axis. + + The 'coloraxis' property is an identifier of a particular + subplot, of type 'coloraxis', that may be specified as: + - the string 'coloraxis' optionally followed by an integer >= 1 + (e.g. 'coloraxis', 'coloraxis1', 'coloraxis2', 'coloraxis3', etc.) + + Returns + ------- + str + """ + return self["coloraxis"] + + @coloraxis.setter + def coloraxis(self, val): + self["coloraxis"] = val + + @property + def colorbar(self): + """ + The 'colorbar' property is an instance of ColorBar + that may be specified as: + - An instance of :class:`plotly.graph_objs.densitymapbox.ColorBar` + - A dict of string/value properties that will be passed + to the ColorBar constructor + + Returns + ------- + plotly.graph_objs.densitymapbox.ColorBar + """ + return self["colorbar"] + + @colorbar.setter + def colorbar(self, val): + self["colorbar"] = val + + @property + def colorscale(self): + """ + Sets the colorscale. The colorscale must be an array containing + arrays mapping a normalized value to an rgb, rgba, hex, hsl, + hsv, or named color string. At minimum, a mapping for the + lowest (0) and highest (1) values are required. For example, + `[[0, 'rgb(0,0,255)'], [1, 'rgb(255,0,0)']]`. To control the + bounds of the colorscale in color space, use `zmin` and `zmax`. + Alternatively, `colorscale` may be a palette name string of the + following list: Blackbody,Bluered,Blues,Cividis,Earth,Electric, + Greens,Greys,Hot,Jet,Picnic,Portland,Rainbow,RdBu,Reds,Viridis, + YlGnBu,YlOrRd. + + The 'colorscale' property is a colorscale and may be + specified as: + - A list of colors that will be spaced evenly to create the colorscale. + Many predefined colorscale lists are included in the sequential, diverging, + and cyclical modules in the plotly.colors package. + - A list of 2-element lists where the first element is the + normalized color level value (starting at 0 and ending at 1), + and the second item is a valid color string. + (e.g. [[0, 'green'], [0.5, 'red'], [1.0, 'rgb(0, 0, 255)']]) + - One of the following named colorscales: + ['aggrnyl', 'agsunset', 'algae', 'amp', 'armyrose', 'balance', + 'blackbody', 'bluered', 'blues', 'blugrn', 'bluyl', 'brbg', + 'brwnyl', 'bugn', 'bupu', 'burg', 'burgyl', 'cividis', 'curl', + 'darkmint', 'deep', 'delta', 'dense', 'earth', 'edge', 'electric', + 'emrld', 'fall', 'geyser', 'gnbu', 'gray', 'greens', 'greys', + 'haline', 'hot', 'hsv', 'ice', 'icefire', 'inferno', 'jet', + 'magenta', 'magma', 'matter', 'mint', 'mrybm', 'mygbm', 'oranges', + 'orrd', 'oryel', 'oxy', 'peach', 'phase', 'picnic', 'pinkyl', + 'piyg', 'plasma', 'plotly3', 'portland', 'prgn', 'pubu', 'pubugn', + 'puor', 'purd', 'purp', 'purples', 'purpor', 'rainbow', 'rdbu', + 'rdgy', 'rdpu', 'rdylbu', 'rdylgn', 'redor', 'reds', 'solar', + 'spectral', 'speed', 'sunset', 'sunsetdark', 'teal', 'tealgrn', + 'tealrose', 'tempo', 'temps', 'thermal', 'tropic', 'turbid', + 'turbo', 'twilight', 'viridis', 'ylgn', 'ylgnbu', 'ylorbr', + 'ylorrd']. + Appending '_r' to a named colorscale reverses it. + + Returns + ------- + str + """ + return self["colorscale"] + + @colorscale.setter + def colorscale(self, val): + self["colorscale"] = val + + @property + def customdata(self): + """ + Assigns extra data each datum. This may be useful when + listening to hover, click and selection events. Note that, + "scatter" traces also appends customdata items in the markers + DOM elements + + The 'customdata' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["customdata"] + + @customdata.setter + def customdata(self, val): + self["customdata"] = val + + @property + def customdatasrc(self): + """ + Sets the source reference on Chart Studio Cloud for + `customdata`. + + The 'customdatasrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["customdatasrc"] + + @customdatasrc.setter + def customdatasrc(self, val): + self["customdatasrc"] = val + + @property + def hoverinfo(self): + """ + Determines which trace information appear on hover. If `none` + or `skip` are set, no information is displayed upon hovering. + But, if `none` is set, click and hover events are still fired. + + The 'hoverinfo' property is a flaglist and may be specified + as a string containing: + - Any combination of ['lon', 'lat', 'z', 'text', 'name'] joined with '+' characters + (e.g. 'lon+lat') + OR exactly one of ['all', 'none', 'skip'] (e.g. 'skip') + - A list or array of the above + + Returns + ------- + Any|numpy.ndarray + """ + return self["hoverinfo"] + + @hoverinfo.setter + def hoverinfo(self, val): + self["hoverinfo"] = val + + @property + def hoverinfosrc(self): + """ + Sets the source reference on Chart Studio Cloud for + `hoverinfo`. + + The 'hoverinfosrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["hoverinfosrc"] + + @hoverinfosrc.setter + def hoverinfosrc(self, val): + self["hoverinfosrc"] = val + + @property + def hoverlabel(self): + """ + The 'hoverlabel' property is an instance of Hoverlabel + that may be specified as: + - An instance of :class:`plotly.graph_objs.densitymapbox.Hoverlabel` + - A dict of string/value properties that will be passed + to the Hoverlabel constructor + + Returns + ------- + plotly.graph_objs.densitymapbox.Hoverlabel + """ + return self["hoverlabel"] + + @hoverlabel.setter + def hoverlabel(self, val): + self["hoverlabel"] = val + + @property + def hovertemplate(self): + """ + Template string used for rendering the information that appear + on hover box. Note that this will override `hoverinfo`. + Variables are inserted using %{variable}, for example "y: %{y}" + as well as %{xother}, {%_xother}, {%_xother_}, {%xother_}. When + showing info for several points, "xother" will be added to + those with different x positions from the first point. An + underscore before or after "(x|y)other" will add a space on + that side, only when this field is shown. Numbers are formatted + using d3-format's syntax %{variable:d3-format}, for example + "Price: %{y:$.2f}". + https://github.com/d3/d3-format/tree/v1.4.5#d3-format for + details on the formatting syntax. Dates are formatted using + d3-time-format's syntax %{variable|d3-time-format}, for example + "Day: %{2019-01-01|%A}". https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format for details on the date + formatting syntax. Variables that can't be found will be + replaced with the specifier. For example, a template of "data: + %{x}, %{y}" will result in a value of "data: 1, %{y}" if x is 1 + and y is missing. Variables with an undefined value will be + replaced with the fallback value. The variables available in + `hovertemplate` are the ones emitted as event data described at + this link https://plotly.com/javascript/plotlyjs-events/#event- + data. Additionally, all attributes that can be specified per- + point (the ones that are `arrayOk: true`) are available. + Anything contained in tag `` is displayed in the + secondary box, for example `%{fullData.name}`. + To hide the secondary box completely, use an empty tag + ``. + + The 'hovertemplate' property is a string and must be specified as: + - A string + - A number that will be converted to a string + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["hovertemplate"] + + @hovertemplate.setter + def hovertemplate(self, val): + self["hovertemplate"] = val + + @property + def hovertemplatefallback(self): + """ + Fallback string that's displayed when a variable referenced in + a template is missing. If the boolean value 'false' is passed + in, the specifier with the missing variable will be displayed. + + The 'hovertemplatefallback' property accepts values of any type + + Returns + ------- + Any + """ + return self["hovertemplatefallback"] + + @hovertemplatefallback.setter + def hovertemplatefallback(self, val): + self["hovertemplatefallback"] = val + + @property + def hovertemplatesrc(self): + """ + Sets the source reference on Chart Studio Cloud for + `hovertemplate`. + + The 'hovertemplatesrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["hovertemplatesrc"] + + @hovertemplatesrc.setter + def hovertemplatesrc(self, val): + self["hovertemplatesrc"] = val + + @property + def hovertext(self): + """ + Sets hover text elements associated with each (lon,lat) pair If + a single string, the same string appears over all the data + points. If an array of string, the items are mapped in order to + the this trace's (lon,lat) coordinates. To be seen, trace + `hoverinfo` must contain a "text" flag. + + The 'hovertext' property is a string and must be specified as: + - A string + - A number that will be converted to a string + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["hovertext"] + + @hovertext.setter + def hovertext(self, val): + self["hovertext"] = val + + @property + def hovertextsrc(self): + """ + Sets the source reference on Chart Studio Cloud for + `hovertext`. + + The 'hovertextsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["hovertextsrc"] + + @hovertextsrc.setter + def hovertextsrc(self, val): + self["hovertextsrc"] = val + + @property + def ids(self): + """ + Assigns id labels to each datum. These ids for object constancy + of data points during animation. Should be an array of strings, + not numbers or any other type. + + The 'ids' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["ids"] + + @ids.setter + def ids(self, val): + self["ids"] = val + + @property + def idssrc(self): + """ + Sets the source reference on Chart Studio Cloud for `ids`. + + The 'idssrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["idssrc"] + + @idssrc.setter + def idssrc(self, val): + self["idssrc"] = val + + @property + def lat(self): + """ + Sets the latitude coordinates (in degrees North). + + The 'lat' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["lat"] + + @lat.setter + def lat(self, val): + self["lat"] = val + + @property + def latsrc(self): + """ + Sets the source reference on Chart Studio Cloud for `lat`. + + The 'latsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["latsrc"] + + @latsrc.setter + def latsrc(self, val): + self["latsrc"] = val + + @property + def legend(self): + """ + Sets the reference to a legend to show this trace in. + References to these legends are "legend", "legend2", "legend3", + etc. Settings for these legends are set in the layout, under + `layout.legend`, `layout.legend2`, etc. + + The 'legend' property is an identifier of a particular + subplot, of type 'legend', that may be specified as: + - the string 'legend' optionally followed by an integer >= 1 + (e.g. 'legend', 'legend1', 'legend2', 'legend3', etc.) + + Returns + ------- + str + """ + return self["legend"] + + @legend.setter + def legend(self, val): + self["legend"] = val + + @property + def legendgroup(self): + """ + Sets the legend group for this trace. Traces and shapes part of + the same legend group hide/show at the same time when toggling + legend items. + + The 'legendgroup' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["legendgroup"] + + @legendgroup.setter + def legendgroup(self, val): + self["legendgroup"] = val + + @property + def legendgrouptitle(self): + """ + The 'legendgrouptitle' property is an instance of Legendgrouptitle + that may be specified as: + - An instance of :class:`plotly.graph_objs.densitymapbox.Legendgrouptitle` + - A dict of string/value properties that will be passed + to the Legendgrouptitle constructor + + Returns + ------- + plotly.graph_objs.densitymapbox.Legendgrouptitle + """ + return self["legendgrouptitle"] + + @legendgrouptitle.setter + def legendgrouptitle(self, val): + self["legendgrouptitle"] = val + + @property + def legendrank(self): + """ + Sets the legend rank for this trace. Items and groups with + smaller ranks are presented on top/left side while with + "reversed" `legend.traceorder` they are on bottom/right side. + The default legendrank is 1000, so that you can use ranks less + than 1000 to place certain items before all unranked items, and + ranks greater than 1000 to go after all unranked items. When + having unranked or equal rank items shapes would be displayed + after traces i.e. according to their order in data and layout. + + The 'legendrank' property is a number and may be specified as: + - An int or float + + Returns + ------- + int|float + """ + return self["legendrank"] + + @legendrank.setter + def legendrank(self, val): + self["legendrank"] = val + + @property + def legendwidth(self): + """ + Sets the width (in px or fraction) of the legend for this + trace. + + The 'legendwidth' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["legendwidth"] + + @legendwidth.setter + def legendwidth(self, val): + self["legendwidth"] = val + + @property + def lon(self): + """ + Sets the longitude coordinates (in degrees East). + + The 'lon' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["lon"] + + @lon.setter + def lon(self, val): + self["lon"] = val + + @property + def lonsrc(self): + """ + Sets the source reference on Chart Studio Cloud for `lon`. + + The 'lonsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["lonsrc"] + + @lonsrc.setter + def lonsrc(self, val): + self["lonsrc"] = val + + @property + def meta(self): + """ + Assigns extra meta information associated with this trace that + can be used in various text attributes. Attributes such as + trace `name`, graph, axis and colorbar `title.text`, annotation + `text` `rangeselector`, `updatemenues` and `sliders` `label` + text all support `meta`. To access the trace `meta` values in + an attribute in the same trace, simply use `%{meta[i]}` where + `i` is the index or key of the `meta` item in question. To + access trace `meta` in layout attributes, use + `%{data[n[.meta[i]}` where `i` is the index or key of the + `meta` and `n` is the trace index. + + The 'meta' property accepts values of any type + + Returns + ------- + Any|numpy.ndarray + """ + return self["meta"] + + @meta.setter + def meta(self, val): + self["meta"] = val + + @property + def metasrc(self): + """ + Sets the source reference on Chart Studio Cloud for `meta`. + + The 'metasrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["metasrc"] + + @metasrc.setter + def metasrc(self, val): + self["metasrc"] = val + + @property + def name(self): + """ + Sets the trace name. The trace name appears as the legend item + and on hover. + + The 'name' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["name"] + + @name.setter + def name(self, val): + self["name"] = val + + @property + def opacity(self): + """ + Sets the opacity of the trace. + + The 'opacity' property is a number and may be specified as: + - An int or float in the interval [0, 1] + + Returns + ------- + int|float + """ + return self["opacity"] + + @opacity.setter + def opacity(self, val): + self["opacity"] = val + + @property + def radius(self): + """ + Sets the radius of influence of one `lon` / `lat` point in + pixels. Increasing the value makes the densitymapbox trace + smoother, but less detailed. + + The 'radius' property is a number and may be specified as: + - An int or float in the interval [1, inf] + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + int|float|numpy.ndarray + """ + return self["radius"] + + @radius.setter + def radius(self, val): + self["radius"] = val + + @property + def radiussrc(self): + """ + Sets the source reference on Chart Studio Cloud for `radius`. + + The 'radiussrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["radiussrc"] + + @radiussrc.setter + def radiussrc(self, val): + self["radiussrc"] = val + + @property + def reversescale(self): + """ + Reverses the color mapping if true. If true, `zmin` will + correspond to the last color in the array and `zmax` will + correspond to the first color. + + The 'reversescale' property is a boolean and must be specified as: + - A boolean value: True or False + + Returns + ------- + bool + """ + return self["reversescale"] + + @reversescale.setter + def reversescale(self, val): + self["reversescale"] = val + + @property + def showlegend(self): + """ + Determines whether or not an item corresponding to this trace + is shown in the legend. + + The 'showlegend' property is a boolean and must be specified as: + - A boolean value: True or False + + Returns + ------- + bool + """ + return self["showlegend"] + + @showlegend.setter + def showlegend(self, val): + self["showlegend"] = val + + @property + def showscale(self): + """ + Determines whether or not a colorbar is displayed for this + trace. + + The 'showscale' property is a boolean and must be specified as: + - A boolean value: True or False + + Returns + ------- + bool + """ + return self["showscale"] + + @showscale.setter + def showscale(self, val): + self["showscale"] = val + + @property + def stream(self): + """ + The 'stream' property is an instance of Stream + that may be specified as: + - An instance of :class:`plotly.graph_objs.densitymapbox.Stream` + - A dict of string/value properties that will be passed + to the Stream constructor + + Returns + ------- + plotly.graph_objs.densitymapbox.Stream + """ + return self["stream"] + + @stream.setter + def stream(self, val): + self["stream"] = val + + @property + def subplot(self): + """ + mapbox subplots and traces are deprecated! Please consider + switching to `map` subplots and traces. Learn more at: + https://plotly.com/python/maplibre-migration/ as well as + https://plotly.com/javascript/maplibre-migration/ Sets a + reference between this trace's data coordinates and a mapbox + subplot. If "mapbox" (the default value), the data refer to + `layout.mapbox`. If "mapbox2", the data refer to + `layout.mapbox2`, and so on. + + The 'subplot' property is an identifier of a particular + subplot, of type 'mapbox', that may be specified as: + - the string 'mapbox' optionally followed by an integer >= 1 + (e.g. 'mapbox', 'mapbox1', 'mapbox2', 'mapbox3', etc.) + + Returns + ------- + str + """ + return self["subplot"] + + @subplot.setter + def subplot(self, val): + self["subplot"] = val + + @property + def text(self): + """ + Sets text elements associated with each (lon,lat) pair If a + single string, the same string appears over all the data + points. If an array of string, the items are mapped in order to + the this trace's (lon,lat) coordinates. If trace `hoverinfo` + contains a "text" flag and "hovertext" is not set, these + elements will be seen in the hover labels. + + The 'text' property is a string and must be specified as: + - A string + - A number that will be converted to a string + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["text"] + + @text.setter + def text(self, val): + self["text"] = val + + @property + def textsrc(self): + """ + Sets the source reference on Chart Studio Cloud for `text`. + + The 'textsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["textsrc"] + + @textsrc.setter + def textsrc(self, val): + self["textsrc"] = val + + @property + def uid(self): + """ + Assign an id to this trace, Use this to provide object + constancy between traces during animations and transitions. + + The 'uid' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["uid"] + + @uid.setter + def uid(self, val): + self["uid"] = val + + @property + def uirevision(self): + """ + Controls persistence of some user-driven changes to the trace: + `constraintrange` in `parcoords` traces, as well as some + `editable: true` modifications such as `name` and + `colorbar.title`. Defaults to `layout.uirevision`. Note that + other user-driven trace attribute changes are controlled by + `layout` attributes: `trace.visible` is controlled by + `layout.legend.uirevision`, `selectedpoints` is controlled by + `layout.selectionrevision`, and `colorbar.(x|y)` (accessible + with `config: {editable: true}`) is controlled by + `layout.editrevision`. Trace changes are tracked by `uid`, + which only falls back on trace index if no `uid` is provided. + So if your app can add/remove traces before the end of the + `data` array, such that the same trace has a different index, + you can still preserve user-driven changes if you give each + trace a `uid` that stays with it as it moves. + + The 'uirevision' property accepts values of any type + + Returns + ------- + Any + """ + return self["uirevision"] + + @uirevision.setter + def uirevision(self, val): + self["uirevision"] = val + + @property + def visible(self): + """ + Determines whether or not this trace is visible. If + "legendonly", the trace is not drawn, but can appear as a + legend item (provided that the legend itself is visible). + + The 'visible' property is an enumeration that may be specified as: + - One of the following enumeration values: + [True, False, 'legendonly'] + + Returns + ------- + Any + """ + return self["visible"] + + @visible.setter + def visible(self, val): + self["visible"] = val + + @property + def z(self): + """ + Sets the points' weight. For example, a value of 10 would be + equivalent to having 10 points of weight 1 in the same spot + + The 'z' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["z"] + + @z.setter + def z(self, val): + self["z"] = val + + @property + def zauto(self): + """ + Determines whether or not the color domain is computed with + respect to the input data (here in `z`) or the bounds set in + `zmin` and `zmax` Defaults to `false` when `zmin` and `zmax` + are set by the user. + + The 'zauto' property is a boolean and must be specified as: + - A boolean value: True or False + + Returns + ------- + bool + """ + return self["zauto"] + + @zauto.setter + def zauto(self, val): + self["zauto"] = val + + @property + def zmax(self): + """ + Sets the upper bound of the color domain. Value should have the + same units as in `z` and if set, `zmin` must be set as well. + + The 'zmax' property is a number and may be specified as: + - An int or float + + Returns + ------- + int|float + """ + return self["zmax"] + + @zmax.setter + def zmax(self, val): + self["zmax"] = val + + @property + def zmid(self): + """ + Sets the mid-point of the color domain by scaling `zmin` and/or + `zmax` to be equidistant to this point. Value should have the + same units as in `z`. Has no effect when `zauto` is `false`. + + The 'zmid' property is a number and may be specified as: + - An int or float + + Returns + ------- + int|float + """ + return self["zmid"] + + @zmid.setter + def zmid(self, val): + self["zmid"] = val + + @property + def zmin(self): + """ + Sets the lower bound of the color domain. Value should have the + same units as in `z` and if set, `zmax` must be set as well. + + The 'zmin' property is a number and may be specified as: + - An int or float + + Returns + ------- + int|float + """ + return self["zmin"] + + @zmin.setter + def zmin(self, val): + self["zmin"] = val + + @property + def zsrc(self): + """ + Sets the source reference on Chart Studio Cloud for `z`. + + The 'zsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["zsrc"] + + @zsrc.setter + def zsrc(self, val): + self["zsrc"] = val + + @property + def type(self): + return self._props["type"] + + @property + def _prop_descriptions(self): + return """\ + autocolorscale + Determines whether the colorscale is a default palette + (`autocolorscale: true`) or the palette determined by + `colorscale`. In case `colorscale` is unspecified or + `autocolorscale` is true, the default palette will be + chosen according to whether numbers in the `color` + array are all positive, all negative or mixed. + below + Determines if the densitymapbox trace will be inserted + before the layer with the specified ID. By default, + densitymapbox traces are placed below the first layer + of type symbol If set to '', the layer will be inserted + above every existing layer. + coloraxis + Sets a reference to a shared color axis. References to + these shared color axes are "coloraxis", "coloraxis2", + "coloraxis3", etc. Settings for these shared color axes + are set in the layout, under `layout.coloraxis`, + `layout.coloraxis2`, etc. Note that multiple color + scales can be linked to the same color axis. + colorbar + :class:`plotly.graph_objects.densitymapbox.ColorBar` + instance or dict with compatible properties + colorscale + Sets the colorscale. The colorscale must be an array + containing arrays mapping a normalized value to an rgb, + rgba, hex, hsl, hsv, or named color string. At minimum, + a mapping for the lowest (0) and highest (1) values are + required. For example, `[[0, 'rgb(0,0,255)'], [1, + 'rgb(255,0,0)']]`. To control the bounds of the + colorscale in color space, use `zmin` and `zmax`. + Alternatively, `colorscale` may be a palette name + string of the following list: Blackbody,Bluered,Blues,C + ividis,Earth,Electric,Greens,Greys,Hot,Jet,Picnic,Portl + and,Rainbow,RdBu,Reds,Viridis,YlGnBu,YlOrRd. + customdata + Assigns extra data each datum. This may be useful when + listening to hover, click and selection events. Note + that, "scatter" traces also appends customdata items in + the markers DOM elements + customdatasrc + Sets the source reference on Chart Studio Cloud for + `customdata`. + hoverinfo + Determines which trace information appear on hover. If + `none` or `skip` are set, no information is displayed + upon hovering. But, if `none` is set, click and hover + events are still fired. + hoverinfosrc + Sets the source reference on Chart Studio Cloud for + `hoverinfo`. + hoverlabel + :class:`plotly.graph_objects.densitymapbox.Hoverlabel` + instance or dict with compatible properties + hovertemplate + Template string used for rendering the information that + appear on hover box. Note that this will override + `hoverinfo`. Variables are inserted using %{variable}, + for example "y: %{y}" as well as %{xother}, {%_xother}, + {%_xother_}, {%xother_}. When showing info for several + points, "xother" will be added to those with different + x positions from the first point. An underscore before + or after "(x|y)other" will add a space on that side, + only when this field is shown. Numbers are formatted + using d3-format's syntax %{variable:d3-format}, for + example "Price: %{y:$.2f}". + https://github.com/d3/d3-format/tree/v1.4.5#d3-format + for details on the formatting syntax. Dates are + formatted using d3-time-format's syntax + %{variable|d3-time-format}, for example "Day: + %{2019-01-01|%A}". https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format for details on the + date formatting syntax. Variables that can't be found + will be replaced with the specifier. For example, a + template of "data: %{x}, %{y}" will result in a value + of "data: 1, %{y}" if x is 1 and y is missing. + Variables with an undefined value will be replaced with + the fallback value. The variables available in + `hovertemplate` are the ones emitted as event data + described at this link + https://plotly.com/javascript/plotlyjs-events/#event- + data. Additionally, all attributes that can be + specified per-point (the ones that are `arrayOk: true`) + are available. Anything contained in tag `` is + displayed in the secondary box, for example + `%{fullData.name}`. To hide the + secondary box completely, use an empty tag + ``. + hovertemplatefallback + Fallback string that's displayed when a variable + referenced in a template is missing. If the boolean + value 'false' is passed in, the specifier with the + missing variable will be displayed. + hovertemplatesrc + Sets the source reference on Chart Studio Cloud for + `hovertemplate`. + hovertext + Sets hover text elements associated with each (lon,lat) + pair If a single string, the same string appears over + all the data points. If an array of string, the items + are mapped in order to the this trace's (lon,lat) + coordinates. To be seen, trace `hoverinfo` must contain + a "text" flag. + hovertextsrc + Sets the source reference on Chart Studio Cloud for + `hovertext`. + ids + Assigns id labels to each datum. These ids for object + constancy of data points during animation. Should be an + array of strings, not numbers or any other type. + idssrc + Sets the source reference on Chart Studio Cloud for + `ids`. + lat + Sets the latitude coordinates (in degrees North). + latsrc + Sets the source reference on Chart Studio Cloud for + `lat`. + legend + Sets the reference to a legend to show this trace in. + References to these legends are "legend", "legend2", + "legend3", etc. Settings for these legends are set in + the layout, under `layout.legend`, `layout.legend2`, + etc. + legendgroup + Sets the legend group for this trace. Traces and shapes + part of the same legend group hide/show at the same + time when toggling legend items. + legendgrouptitle + :class:`plotly.graph_objects.densitymapbox.Legendgroupt + itle` instance or dict with compatible properties + legendrank + Sets the legend rank for this trace. Items and groups + with smaller ranks are presented on top/left side while + with "reversed" `legend.traceorder` they are on + bottom/right side. The default legendrank is 1000, so + that you can use ranks less than 1000 to place certain + items before all unranked items, and ranks greater than + 1000 to go after all unranked items. When having + unranked or equal rank items shapes would be displayed + after traces i.e. according to their order in data and + layout. + legendwidth + Sets the width (in px or fraction) of the legend for + this trace. + lon + Sets the longitude coordinates (in degrees East). + lonsrc + Sets the source reference on Chart Studio Cloud for + `lon`. + meta + Assigns extra meta information associated with this + trace that can be used in various text attributes. + Attributes such as trace `name`, graph, axis and + colorbar `title.text`, annotation `text` + `rangeselector`, `updatemenues` and `sliders` `label` + text all support `meta`. To access the trace `meta` + values in an attribute in the same trace, simply use + `%{meta[i]}` where `i` is the index or key of the + `meta` item in question. To access trace `meta` in + layout attributes, use `%{data[n[.meta[i]}` where `i` + is the index or key of the `meta` and `n` is the trace + index. + metasrc + Sets the source reference on Chart Studio Cloud for + `meta`. + name + Sets the trace name. The trace name appears as the + legend item and on hover. + opacity + Sets the opacity of the trace. + radius + Sets the radius of influence of one `lon` / `lat` point + in pixels. Increasing the value makes the densitymapbox + trace smoother, but less detailed. + radiussrc + Sets the source reference on Chart Studio Cloud for + `radius`. + reversescale + Reverses the color mapping if true. If true, `zmin` + will correspond to the last color in the array and + `zmax` will correspond to the first color. + showlegend + Determines whether or not an item corresponding to this + trace is shown in the legend. + showscale + Determines whether or not a colorbar is displayed for + this trace. + stream + :class:`plotly.graph_objects.densitymapbox.Stream` + instance or dict with compatible properties + subplot + mapbox subplots and traces are deprecated! Please + consider switching to `map` subplots and traces. Learn + more at: https://plotly.com/python/maplibre-migration/ + as well as https://plotly.com/javascript/maplibre- + migration/ Sets a reference between this trace's data + coordinates and a mapbox subplot. If "mapbox" (the + default value), the data refer to `layout.mapbox`. If + "mapbox2", the data refer to `layout.mapbox2`, and so + on. + text + Sets text elements associated with each (lon,lat) pair + If a single string, the same string appears over all + the data points. If an array of string, the items are + mapped in order to the this trace's (lon,lat) + coordinates. If trace `hoverinfo` contains a "text" + flag and "hovertext" is not set, these elements will be + seen in the hover labels. + textsrc + Sets the source reference on Chart Studio Cloud for + `text`. + uid + Assign an id to this trace, Use this to provide object + constancy between traces during animations and + transitions. + uirevision + Controls persistence of some user-driven changes to the + trace: `constraintrange` in `parcoords` traces, as well + as some `editable: true` modifications such as `name` + and `colorbar.title`. Defaults to `layout.uirevision`. + Note that other user-driven trace attribute changes are + controlled by `layout` attributes: `trace.visible` is + controlled by `layout.legend.uirevision`, + `selectedpoints` is controlled by + `layout.selectionrevision`, and `colorbar.(x|y)` + (accessible with `config: {editable: true}`) is + controlled by `layout.editrevision`. Trace changes are + tracked by `uid`, which only falls back on trace index + if no `uid` is provided. So if your app can add/remove + traces before the end of the `data` array, such that + the same trace has a different index, you can still + preserve user-driven changes if you give each trace a + `uid` that stays with it as it moves. + visible + Determines whether or not this trace is visible. If + "legendonly", the trace is not drawn, but can appear as + a legend item (provided that the legend itself is + visible). + z + Sets the points' weight. For example, a value of 10 + would be equivalent to having 10 points of weight 1 in + the same spot + zauto + Determines whether or not the color domain is computed + with respect to the input data (here in `z`) or the + bounds set in `zmin` and `zmax` Defaults to `false` + when `zmin` and `zmax` are set by the user. + zmax + Sets the upper bound of the color domain. Value should + have the same units as in `z` and if set, `zmin` must + be set as well. + zmid + Sets the mid-point of the color domain by scaling + `zmin` and/or `zmax` to be equidistant to this point. + Value should have the same units as in `z`. Has no + effect when `zauto` is `false`. + zmin + Sets the lower bound of the color domain. Value should + have the same units as in `z` and if set, `zmax` must + be set as well. + zsrc + Sets the source reference on Chart Studio Cloud for + `z`. + """ + + def __init__( + self, + arg=None, + autocolorscale=None, + below=None, + coloraxis=None, + colorbar=None, + colorscale=None, + customdata=None, + customdatasrc=None, + hoverinfo=None, + hoverinfosrc=None, + hoverlabel=None, + hovertemplate=None, + hovertemplatefallback=None, + hovertemplatesrc=None, + hovertext=None, + hovertextsrc=None, + ids=None, + idssrc=None, + lat=None, + latsrc=None, + legend=None, + legendgroup=None, + legendgrouptitle=None, + legendrank=None, + legendwidth=None, + lon=None, + lonsrc=None, + meta=None, + metasrc=None, + name=None, + opacity=None, + radius=None, + radiussrc=None, + reversescale=None, + showlegend=None, + showscale=None, + stream=None, + subplot=None, + text=None, + textsrc=None, + uid=None, + uirevision=None, + visible=None, + z=None, + zauto=None, + zmax=None, + zmid=None, + zmin=None, + zsrc=None, + **kwargs, + ): + """ + Construct a new Densitymapbox object + + "densitymapbox" trace is deprecated! Please consider switching + to the "densitymap" trace type and `map` subplots. Learn more + at: https://plotly.com/python/maplibre-migration/ as well as + https://plotly.com/javascript/maplibre-migration/ Draws a + bivariate kernel density estimation with a Gaussian kernel from + `lon` and `lat` coordinates and optional `z` values using a + colorscale. + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of :class:`plotly.graph_objs.Densitymapbox` + autocolorscale + Determines whether the colorscale is a default palette + (`autocolorscale: true`) or the palette determined by + `colorscale`. In case `colorscale` is unspecified or + `autocolorscale` is true, the default palette will be + chosen according to whether numbers in the `color` + array are all positive, all negative or mixed. + below + Determines if the densitymapbox trace will be inserted + before the layer with the specified ID. By default, + densitymapbox traces are placed below the first layer + of type symbol If set to '', the layer will be inserted + above every existing layer. + coloraxis + Sets a reference to a shared color axis. References to + these shared color axes are "coloraxis", "coloraxis2", + "coloraxis3", etc. Settings for these shared color axes + are set in the layout, under `layout.coloraxis`, + `layout.coloraxis2`, etc. Note that multiple color + scales can be linked to the same color axis. + colorbar + :class:`plotly.graph_objects.densitymapbox.ColorBar` + instance or dict with compatible properties + colorscale + Sets the colorscale. The colorscale must be an array + containing arrays mapping a normalized value to an rgb, + rgba, hex, hsl, hsv, or named color string. At minimum, + a mapping for the lowest (0) and highest (1) values are + required. For example, `[[0, 'rgb(0,0,255)'], [1, + 'rgb(255,0,0)']]`. To control the bounds of the + colorscale in color space, use `zmin` and `zmax`. + Alternatively, `colorscale` may be a palette name + string of the following list: Blackbody,Bluered,Blues,C + ividis,Earth,Electric,Greens,Greys,Hot,Jet,Picnic,Portl + and,Rainbow,RdBu,Reds,Viridis,YlGnBu,YlOrRd. + customdata + Assigns extra data each datum. This may be useful when + listening to hover, click and selection events. Note + that, "scatter" traces also appends customdata items in + the markers DOM elements + customdatasrc + Sets the source reference on Chart Studio Cloud for + `customdata`. + hoverinfo + Determines which trace information appear on hover. If + `none` or `skip` are set, no information is displayed + upon hovering. But, if `none` is set, click and hover + events are still fired. + hoverinfosrc + Sets the source reference on Chart Studio Cloud for + `hoverinfo`. + hoverlabel + :class:`plotly.graph_objects.densitymapbox.Hoverlabel` + instance or dict with compatible properties + hovertemplate + Template string used for rendering the information that + appear on hover box. Note that this will override + `hoverinfo`. Variables are inserted using %{variable}, + for example "y: %{y}" as well as %{xother}, {%_xother}, + {%_xother_}, {%xother_}. When showing info for several + points, "xother" will be added to those with different + x positions from the first point. An underscore before + or after "(x|y)other" will add a space on that side, + only when this field is shown. Numbers are formatted + using d3-format's syntax %{variable:d3-format}, for + example "Price: %{y:$.2f}". + https://github.com/d3/d3-format/tree/v1.4.5#d3-format + for details on the formatting syntax. Dates are + formatted using d3-time-format's syntax + %{variable|d3-time-format}, for example "Day: + %{2019-01-01|%A}". https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format for details on the + date formatting syntax. Variables that can't be found + will be replaced with the specifier. For example, a + template of "data: %{x}, %{y}" will result in a value + of "data: 1, %{y}" if x is 1 and y is missing. + Variables with an undefined value will be replaced with + the fallback value. The variables available in + `hovertemplate` are the ones emitted as event data + described at this link + https://plotly.com/javascript/plotlyjs-events/#event- + data. Additionally, all attributes that can be + specified per-point (the ones that are `arrayOk: true`) + are available. Anything contained in tag `` is + displayed in the secondary box, for example + `%{fullData.name}`. To hide the + secondary box completely, use an empty tag + ``. + hovertemplatefallback + Fallback string that's displayed when a variable + referenced in a template is missing. If the boolean + value 'false' is passed in, the specifier with the + missing variable will be displayed. + hovertemplatesrc + Sets the source reference on Chart Studio Cloud for + `hovertemplate`. + hovertext + Sets hover text elements associated with each (lon,lat) + pair If a single string, the same string appears over + all the data points. If an array of string, the items + are mapped in order to the this trace's (lon,lat) + coordinates. To be seen, trace `hoverinfo` must contain + a "text" flag. + hovertextsrc + Sets the source reference on Chart Studio Cloud for + `hovertext`. + ids + Assigns id labels to each datum. These ids for object + constancy of data points during animation. Should be an + array of strings, not numbers or any other type. + idssrc + Sets the source reference on Chart Studio Cloud for + `ids`. + lat + Sets the latitude coordinates (in degrees North). + latsrc + Sets the source reference on Chart Studio Cloud for + `lat`. + legend + Sets the reference to a legend to show this trace in. + References to these legends are "legend", "legend2", + "legend3", etc. Settings for these legends are set in + the layout, under `layout.legend`, `layout.legend2`, + etc. + legendgroup + Sets the legend group for this trace. Traces and shapes + part of the same legend group hide/show at the same + time when toggling legend items. + legendgrouptitle + :class:`plotly.graph_objects.densitymapbox.Legendgroupt + itle` instance or dict with compatible properties + legendrank + Sets the legend rank for this trace. Items and groups + with smaller ranks are presented on top/left side while + with "reversed" `legend.traceorder` they are on + bottom/right side. The default legendrank is 1000, so + that you can use ranks less than 1000 to place certain + items before all unranked items, and ranks greater than + 1000 to go after all unranked items. When having + unranked or equal rank items shapes would be displayed + after traces i.e. according to their order in data and + layout. + legendwidth + Sets the width (in px or fraction) of the legend for + this trace. + lon + Sets the longitude coordinates (in degrees East). + lonsrc + Sets the source reference on Chart Studio Cloud for + `lon`. + meta + Assigns extra meta information associated with this + trace that can be used in various text attributes. + Attributes such as trace `name`, graph, axis and + colorbar `title.text`, annotation `text` + `rangeselector`, `updatemenues` and `sliders` `label` + text all support `meta`. To access the trace `meta` + values in an attribute in the same trace, simply use + `%{meta[i]}` where `i` is the index or key of the + `meta` item in question. To access trace `meta` in + layout attributes, use `%{data[n[.meta[i]}` where `i` + is the index or key of the `meta` and `n` is the trace + index. + metasrc + Sets the source reference on Chart Studio Cloud for + `meta`. + name + Sets the trace name. The trace name appears as the + legend item and on hover. + opacity + Sets the opacity of the trace. + radius + Sets the radius of influence of one `lon` / `lat` point + in pixels. Increasing the value makes the densitymapbox + trace smoother, but less detailed. + radiussrc + Sets the source reference on Chart Studio Cloud for + `radius`. + reversescale + Reverses the color mapping if true. If true, `zmin` + will correspond to the last color in the array and + `zmax` will correspond to the first color. + showlegend + Determines whether or not an item corresponding to this + trace is shown in the legend. + showscale + Determines whether or not a colorbar is displayed for + this trace. + stream + :class:`plotly.graph_objects.densitymapbox.Stream` + instance or dict with compatible properties + subplot + mapbox subplots and traces are deprecated! Please + consider switching to `map` subplots and traces. Learn + more at: https://plotly.com/python/maplibre-migration/ + as well as https://plotly.com/javascript/maplibre- + migration/ Sets a reference between this trace's data + coordinates and a mapbox subplot. If "mapbox" (the + default value), the data refer to `layout.mapbox`. If + "mapbox2", the data refer to `layout.mapbox2`, and so + on. + text + Sets text elements associated with each (lon,lat) pair + If a single string, the same string appears over all + the data points. If an array of string, the items are + mapped in order to the this trace's (lon,lat) + coordinates. If trace `hoverinfo` contains a "text" + flag and "hovertext" is not set, these elements will be + seen in the hover labels. + textsrc + Sets the source reference on Chart Studio Cloud for + `text`. + uid + Assign an id to this trace, Use this to provide object + constancy between traces during animations and + transitions. + uirevision + Controls persistence of some user-driven changes to the + trace: `constraintrange` in `parcoords` traces, as well + as some `editable: true` modifications such as `name` + and `colorbar.title`. Defaults to `layout.uirevision`. + Note that other user-driven trace attribute changes are + controlled by `layout` attributes: `trace.visible` is + controlled by `layout.legend.uirevision`, + `selectedpoints` is controlled by + `layout.selectionrevision`, and `colorbar.(x|y)` + (accessible with `config: {editable: true}`) is + controlled by `layout.editrevision`. Trace changes are + tracked by `uid`, which only falls back on trace index + if no `uid` is provided. So if your app can add/remove + traces before the end of the `data` array, such that + the same trace has a different index, you can still + preserve user-driven changes if you give each trace a + `uid` that stays with it as it moves. + visible + Determines whether or not this trace is visible. If + "legendonly", the trace is not drawn, but can appear as + a legend item (provided that the legend itself is + visible). + z + Sets the points' weight. For example, a value of 10 + would be equivalent to having 10 points of weight 1 in + the same spot + zauto + Determines whether or not the color domain is computed + with respect to the input data (here in `z`) or the + bounds set in `zmin` and `zmax` Defaults to `false` + when `zmin` and `zmax` are set by the user. + zmax + Sets the upper bound of the color domain. Value should + have the same units as in `z` and if set, `zmin` must + be set as well. + zmid + Sets the mid-point of the color domain by scaling + `zmin` and/or `zmax` to be equidistant to this point. + Value should have the same units as in `z`. Has no + effect when `zauto` is `false`. + zmin + Sets the lower bound of the color domain. Value should + have the same units as in `z` and if set, `zmax` must + be set as well. + zsrc + Sets the source reference on Chart Studio Cloud for + `z`. + + Returns + ------- + Densitymapbox + """ + super().__init__("densitymapbox") + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + if arg is None: + arg = {} + elif isinstance(arg, self.__class__): + arg = arg.to_plotly_json() + elif isinstance(arg, dict): + arg = _copy.copy(arg) + else: + raise ValueError("""\ +The first argument to the plotly.graph_objs.Densitymapbox +constructor must be a dict or +an instance of :class:`plotly.graph_objs.Densitymapbox`""") + + self._skip_invalid = kwargs.pop("skip_invalid", False) + self._validate = kwargs.pop("_validate", True) + + self._set_property("autocolorscale", arg, autocolorscale) + self._set_property("below", arg, below) + self._set_property("coloraxis", arg, coloraxis) + self._set_property("colorbar", arg, colorbar) + self._set_property("colorscale", arg, colorscale) + self._set_property("customdata", arg, customdata) + self._set_property("customdatasrc", arg, customdatasrc) + self._set_property("hoverinfo", arg, hoverinfo) + self._set_property("hoverinfosrc", arg, hoverinfosrc) + self._set_property("hoverlabel", arg, hoverlabel) + self._set_property("hovertemplate", arg, hovertemplate) + self._set_property("hovertemplatefallback", arg, hovertemplatefallback) + self._set_property("hovertemplatesrc", arg, hovertemplatesrc) + self._set_property("hovertext", arg, hovertext) + self._set_property("hovertextsrc", arg, hovertextsrc) + self._set_property("ids", arg, ids) + self._set_property("idssrc", arg, idssrc) + self._set_property("lat", arg, lat) + self._set_property("latsrc", arg, latsrc) + self._set_property("legend", arg, legend) + self._set_property("legendgroup", arg, legendgroup) + self._set_property("legendgrouptitle", arg, legendgrouptitle) + self._set_property("legendrank", arg, legendrank) + self._set_property("legendwidth", arg, legendwidth) + self._set_property("lon", arg, lon) + self._set_property("lonsrc", arg, lonsrc) + self._set_property("meta", arg, meta) + self._set_property("metasrc", arg, metasrc) + self._set_property("name", arg, name) + self._set_property("opacity", arg, opacity) + self._set_property("radius", arg, radius) + self._set_property("radiussrc", arg, radiussrc) + self._set_property("reversescale", arg, reversescale) + self._set_property("showlegend", arg, showlegend) + self._set_property("showscale", arg, showscale) + self._set_property("stream", arg, stream) + self._set_property("subplot", arg, subplot) + self._set_property("text", arg, text) + self._set_property("textsrc", arg, textsrc) + self._set_property("uid", arg, uid) + self._set_property("uirevision", arg, uirevision) + self._set_property("visible", arg, visible) + self._set_property("z", arg, z) + self._set_property("zauto", arg, zauto) + self._set_property("zmax", arg, zmax) + self._set_property("zmid", arg, zmid) + self._set_property("zmin", arg, zmin) + self._set_property("zsrc", arg, zsrc) + + self._props["type"] = "densitymapbox" + arg.pop("type", None) + self._process_kwargs(**dict(arg, **kwargs)) + self._skip_invalid = False + + warnings.warn( + "*densitymapbox* is deprecated!" + + " Use *densitymap* instead." + + " Learn more at: https://plotly.com/python/mapbox-to-maplibre/", + stacklevel=2, + category=DeprecationWarning, + ) diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/_deprecations.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/_deprecations.py new file mode 100644 index 0000000000000000000000000000000000000000..aa08325deb37cde1aa49fe84978f43fb3ae3489a --- /dev/null +++ b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/_deprecations.py @@ -0,0 +1,723 @@ +import warnings + +warnings.filterwarnings( + "default", r"plotly\.graph_objs\.\w+ is deprecated", DeprecationWarning +) + + +class Data(list): + """ + plotly.graph_objs.Data is deprecated. + Please replace it with a list or tuple of instances of the following types + - plotly.graph_objs.Scatter + - plotly.graph_objs.Bar + - plotly.graph_objs.Area + - plotly.graph_objs.Histogram + - etc. + + """ + + def __init__(self, *args, **kwargs): + """ + plotly.graph_objs.Data is deprecated. + Please replace it with a list or tuple of instances of the following types + - plotly.graph_objs.Scatter + - plotly.graph_objs.Bar + - plotly.graph_objs.Area + - plotly.graph_objs.Histogram + - etc. + + """ + warnings.warn( + """plotly.graph_objs.Data is deprecated. +Please replace it with a list or tuple of instances of the following types + - plotly.graph_objs.Scatter + - plotly.graph_objs.Bar + - plotly.graph_objs.Area + - plotly.graph_objs.Histogram + - etc. +""", + DeprecationWarning, + ) + super().__init__(*args, **kwargs) + + +class Annotations(list): + """ + plotly.graph_objs.Annotations is deprecated. + Please replace it with a list or tuple of instances of the following types + - plotly.graph_objs.layout.Annotation + - plotly.graph_objs.layout.scene.Annotation + + """ + + def __init__(self, *args, **kwargs): + """ + plotly.graph_objs.Annotations is deprecated. + Please replace it with a list or tuple of instances of the following types + - plotly.graph_objs.layout.Annotation + - plotly.graph_objs.layout.scene.Annotation + + """ + warnings.warn( + """plotly.graph_objs.Annotations is deprecated. +Please replace it with a list or tuple of instances of the following types + - plotly.graph_objs.layout.Annotation + - plotly.graph_objs.layout.scene.Annotation +""", + DeprecationWarning, + ) + super().__init__(*args, **kwargs) + + +class Frames(list): + """ + plotly.graph_objs.Frames is deprecated. + Please replace it with a list or tuple of instances of the following types + - plotly.graph_objs.Frame + + """ + + def __init__(self, *args, **kwargs): + """ + plotly.graph_objs.Frames is deprecated. + Please replace it with a list or tuple of instances of the following types + - plotly.graph_objs.Frame + + """ + warnings.warn( + """plotly.graph_objs.Frames is deprecated. +Please replace it with a list or tuple of instances of the following types + - plotly.graph_objs.Frame +""", + DeprecationWarning, + ) + super().__init__(*args, **kwargs) + + +class AngularAxis(dict): + """ + plotly.graph_objs.AngularAxis is deprecated. + Please replace it with one of the following more specific types + - plotly.graph_objs.layout.AngularAxis + - plotly.graph_objs.layout.polar.AngularAxis + + """ + + def __init__(self, *args, **kwargs): + """ + plotly.graph_objs.AngularAxis is deprecated. + Please replace it with one of the following more specific types + - plotly.graph_objs.layout.AngularAxis + - plotly.graph_objs.layout.polar.AngularAxis + + """ + warnings.warn( + """plotly.graph_objs.AngularAxis is deprecated. +Please replace it with one of the following more specific types + - plotly.graph_objs.layout.AngularAxis + - plotly.graph_objs.layout.polar.AngularAxis +""", + DeprecationWarning, + ) + super().__init__(*args, **kwargs) + + +class Annotation(dict): + """ + plotly.graph_objs.Annotation is deprecated. + Please replace it with one of the following more specific types + - plotly.graph_objs.layout.Annotation + - plotly.graph_objs.layout.scene.Annotation + + """ + + def __init__(self, *args, **kwargs): + """ + plotly.graph_objs.Annotation is deprecated. + Please replace it with one of the following more specific types + - plotly.graph_objs.layout.Annotation + - plotly.graph_objs.layout.scene.Annotation + + """ + warnings.warn( + """plotly.graph_objs.Annotation is deprecated. +Please replace it with one of the following more specific types + - plotly.graph_objs.layout.Annotation + - plotly.graph_objs.layout.scene.Annotation +""", + DeprecationWarning, + ) + super().__init__(*args, **kwargs) + + +class ColorBar(dict): + """ + plotly.graph_objs.ColorBar is deprecated. + Please replace it with one of the following more specific types + - plotly.graph_objs.scatter.marker.ColorBar + - plotly.graph_objs.surface.ColorBar + - etc. + + """ + + def __init__(self, *args, **kwargs): + """ + plotly.graph_objs.ColorBar is deprecated. + Please replace it with one of the following more specific types + - plotly.graph_objs.scatter.marker.ColorBar + - plotly.graph_objs.surface.ColorBar + - etc. + + """ + warnings.warn( + """plotly.graph_objs.ColorBar is deprecated. +Please replace it with one of the following more specific types + - plotly.graph_objs.scatter.marker.ColorBar + - plotly.graph_objs.surface.ColorBar + - etc. +""", + DeprecationWarning, + ) + super().__init__(*args, **kwargs) + + +class Contours(dict): + """ + plotly.graph_objs.Contours is deprecated. + Please replace it with one of the following more specific types + - plotly.graph_objs.contour.Contours + - plotly.graph_objs.surface.Contours + - etc. + + """ + + def __init__(self, *args, **kwargs): + """ + plotly.graph_objs.Contours is deprecated. + Please replace it with one of the following more specific types + - plotly.graph_objs.contour.Contours + - plotly.graph_objs.surface.Contours + - etc. + + """ + warnings.warn( + """plotly.graph_objs.Contours is deprecated. +Please replace it with one of the following more specific types + - plotly.graph_objs.contour.Contours + - plotly.graph_objs.surface.Contours + - etc. +""", + DeprecationWarning, + ) + super().__init__(*args, **kwargs) + + +class ErrorX(dict): + """ + plotly.graph_objs.ErrorX is deprecated. + Please replace it with one of the following more specific types + - plotly.graph_objs.scatter.ErrorX + - plotly.graph_objs.histogram.ErrorX + - etc. + + """ + + def __init__(self, *args, **kwargs): + """ + plotly.graph_objs.ErrorX is deprecated. + Please replace it with one of the following more specific types + - plotly.graph_objs.scatter.ErrorX + - plotly.graph_objs.histogram.ErrorX + - etc. + + """ + warnings.warn( + """plotly.graph_objs.ErrorX is deprecated. +Please replace it with one of the following more specific types + - plotly.graph_objs.scatter.ErrorX + - plotly.graph_objs.histogram.ErrorX + - etc. +""", + DeprecationWarning, + ) + super().__init__(*args, **kwargs) + + +class ErrorY(dict): + """ + plotly.graph_objs.ErrorY is deprecated. + Please replace it with one of the following more specific types + - plotly.graph_objs.scatter.ErrorY + - plotly.graph_objs.histogram.ErrorY + - etc. + + """ + + def __init__(self, *args, **kwargs): + """ + plotly.graph_objs.ErrorY is deprecated. + Please replace it with one of the following more specific types + - plotly.graph_objs.scatter.ErrorY + - plotly.graph_objs.histogram.ErrorY + - etc. + + """ + warnings.warn( + """plotly.graph_objs.ErrorY is deprecated. +Please replace it with one of the following more specific types + - plotly.graph_objs.scatter.ErrorY + - plotly.graph_objs.histogram.ErrorY + - etc. +""", + DeprecationWarning, + ) + super().__init__(*args, **kwargs) + + +class ErrorZ(dict): + """ + plotly.graph_objs.ErrorZ is deprecated. + Please replace it with one of the following more specific types + - plotly.graph_objs.scatter3d.ErrorZ + + """ + + def __init__(self, *args, **kwargs): + """ + plotly.graph_objs.ErrorZ is deprecated. + Please replace it with one of the following more specific types + - plotly.graph_objs.scatter3d.ErrorZ + + """ + warnings.warn( + """plotly.graph_objs.ErrorZ is deprecated. +Please replace it with one of the following more specific types + - plotly.graph_objs.scatter3d.ErrorZ +""", + DeprecationWarning, + ) + super().__init__(*args, **kwargs) + + +class Font(dict): + """ + plotly.graph_objs.Font is deprecated. + Please replace it with one of the following more specific types + - plotly.graph_objs.layout.Font + - plotly.graph_objs.layout.hoverlabel.Font + - etc. + + """ + + def __init__(self, *args, **kwargs): + """ + plotly.graph_objs.Font is deprecated. + Please replace it with one of the following more specific types + - plotly.graph_objs.layout.Font + - plotly.graph_objs.layout.hoverlabel.Font + - etc. + + """ + warnings.warn( + """plotly.graph_objs.Font is deprecated. +Please replace it with one of the following more specific types + - plotly.graph_objs.layout.Font + - plotly.graph_objs.layout.hoverlabel.Font + - etc. +""", + DeprecationWarning, + ) + super().__init__(*args, **kwargs) + + +class Legend(dict): + """ + plotly.graph_objs.Legend is deprecated. + Please replace it with one of the following more specific types + - plotly.graph_objs.layout.Legend + + """ + + def __init__(self, *args, **kwargs): + """ + plotly.graph_objs.Legend is deprecated. + Please replace it with one of the following more specific types + - plotly.graph_objs.layout.Legend + + """ + warnings.warn( + """plotly.graph_objs.Legend is deprecated. +Please replace it with one of the following more specific types + - plotly.graph_objs.layout.Legend +""", + DeprecationWarning, + ) + super().__init__(*args, **kwargs) + + +class Line(dict): + """ + plotly.graph_objs.Line is deprecated. + Please replace it with one of the following more specific types + - plotly.graph_objs.scatter.Line + - plotly.graph_objs.layout.shape.Line + - etc. + + """ + + def __init__(self, *args, **kwargs): + """ + plotly.graph_objs.Line is deprecated. + Please replace it with one of the following more specific types + - plotly.graph_objs.scatter.Line + - plotly.graph_objs.layout.shape.Line + - etc. + + """ + warnings.warn( + """plotly.graph_objs.Line is deprecated. +Please replace it with one of the following more specific types + - plotly.graph_objs.scatter.Line + - plotly.graph_objs.layout.shape.Line + - etc. +""", + DeprecationWarning, + ) + super().__init__(*args, **kwargs) + + +class Margin(dict): + """ + plotly.graph_objs.Margin is deprecated. + Please replace it with one of the following more specific types + - plotly.graph_objs.layout.Margin + + """ + + def __init__(self, *args, **kwargs): + """ + plotly.graph_objs.Margin is deprecated. + Please replace it with one of the following more specific types + - plotly.graph_objs.layout.Margin + + """ + warnings.warn( + """plotly.graph_objs.Margin is deprecated. +Please replace it with one of the following more specific types + - plotly.graph_objs.layout.Margin +""", + DeprecationWarning, + ) + super().__init__(*args, **kwargs) + + +class Marker(dict): + """ + plotly.graph_objs.Marker is deprecated. + Please replace it with one of the following more specific types + - plotly.graph_objs.scatter.Marker + - plotly.graph_objs.histogram.selected.Marker + - etc. + + """ + + def __init__(self, *args, **kwargs): + """ + plotly.graph_objs.Marker is deprecated. + Please replace it with one of the following more specific types + - plotly.graph_objs.scatter.Marker + - plotly.graph_objs.histogram.selected.Marker + - etc. + + """ + warnings.warn( + """plotly.graph_objs.Marker is deprecated. +Please replace it with one of the following more specific types + - plotly.graph_objs.scatter.Marker + - plotly.graph_objs.histogram.selected.Marker + - etc. +""", + DeprecationWarning, + ) + super().__init__(*args, **kwargs) + + +class RadialAxis(dict): + """ + plotly.graph_objs.RadialAxis is deprecated. + Please replace it with one of the following more specific types + - plotly.graph_objs.layout.RadialAxis + - plotly.graph_objs.layout.polar.RadialAxis + + """ + + def __init__(self, *args, **kwargs): + """ + plotly.graph_objs.RadialAxis is deprecated. + Please replace it with one of the following more specific types + - plotly.graph_objs.layout.RadialAxis + - plotly.graph_objs.layout.polar.RadialAxis + + """ + warnings.warn( + """plotly.graph_objs.RadialAxis is deprecated. +Please replace it with one of the following more specific types + - plotly.graph_objs.layout.RadialAxis + - plotly.graph_objs.layout.polar.RadialAxis +""", + DeprecationWarning, + ) + super().__init__(*args, **kwargs) + + +class Scene(dict): + """ + plotly.graph_objs.Scene is deprecated. + Please replace it with one of the following more specific types + - plotly.graph_objs.layout.Scene + + """ + + def __init__(self, *args, **kwargs): + """ + plotly.graph_objs.Scene is deprecated. + Please replace it with one of the following more specific types + - plotly.graph_objs.layout.Scene + + """ + warnings.warn( + """plotly.graph_objs.Scene is deprecated. +Please replace it with one of the following more specific types + - plotly.graph_objs.layout.Scene +""", + DeprecationWarning, + ) + super().__init__(*args, **kwargs) + + +class Stream(dict): + """ + plotly.graph_objs.Stream is deprecated. + Please replace it with one of the following more specific types + - plotly.graph_objs.scatter.Stream + - plotly.graph_objs.area.Stream + + """ + + def __init__(self, *args, **kwargs): + """ + plotly.graph_objs.Stream is deprecated. + Please replace it with one of the following more specific types + - plotly.graph_objs.scatter.Stream + - plotly.graph_objs.area.Stream + + """ + warnings.warn( + """plotly.graph_objs.Stream is deprecated. +Please replace it with one of the following more specific types + - plotly.graph_objs.scatter.Stream + - plotly.graph_objs.area.Stream +""", + DeprecationWarning, + ) + super().__init__(*args, **kwargs) + + +class XAxis(dict): + """ + plotly.graph_objs.XAxis is deprecated. + Please replace it with one of the following more specific types + - plotly.graph_objs.layout.XAxis + - plotly.graph_objs.layout.scene.XAxis + + """ + + def __init__(self, *args, **kwargs): + """ + plotly.graph_objs.XAxis is deprecated. + Please replace it with one of the following more specific types + - plotly.graph_objs.layout.XAxis + - plotly.graph_objs.layout.scene.XAxis + + """ + warnings.warn( + """plotly.graph_objs.XAxis is deprecated. +Please replace it with one of the following more specific types + - plotly.graph_objs.layout.XAxis + - plotly.graph_objs.layout.scene.XAxis +""", + DeprecationWarning, + ) + super().__init__(*args, **kwargs) + + +class YAxis(dict): + """ + plotly.graph_objs.YAxis is deprecated. + Please replace it with one of the following more specific types + - plotly.graph_objs.layout.YAxis + - plotly.graph_objs.layout.scene.YAxis + + """ + + def __init__(self, *args, **kwargs): + """ + plotly.graph_objs.YAxis is deprecated. + Please replace it with one of the following more specific types + - plotly.graph_objs.layout.YAxis + - plotly.graph_objs.layout.scene.YAxis + + """ + warnings.warn( + """plotly.graph_objs.YAxis is deprecated. +Please replace it with one of the following more specific types + - plotly.graph_objs.layout.YAxis + - plotly.graph_objs.layout.scene.YAxis +""", + DeprecationWarning, + ) + super().__init__(*args, **kwargs) + + +class ZAxis(dict): + """ + plotly.graph_objs.ZAxis is deprecated. + Please replace it with one of the following more specific types + - plotly.graph_objs.layout.scene.ZAxis + + """ + + def __init__(self, *args, **kwargs): + """ + plotly.graph_objs.ZAxis is deprecated. + Please replace it with one of the following more specific types + - plotly.graph_objs.layout.scene.ZAxis + + """ + warnings.warn( + """plotly.graph_objs.ZAxis is deprecated. +Please replace it with one of the following more specific types + - plotly.graph_objs.layout.scene.ZAxis +""", + DeprecationWarning, + ) + super().__init__(*args, **kwargs) + + +class XBins(dict): + """ + plotly.graph_objs.XBins is deprecated. + Please replace it with one of the following more specific types + - plotly.graph_objs.histogram.XBins + - plotly.graph_objs.histogram2d.XBins + + """ + + def __init__(self, *args, **kwargs): + """ + plotly.graph_objs.XBins is deprecated. + Please replace it with one of the following more specific types + - plotly.graph_objs.histogram.XBins + - plotly.graph_objs.histogram2d.XBins + + """ + warnings.warn( + """plotly.graph_objs.XBins is deprecated. +Please replace it with one of the following more specific types + - plotly.graph_objs.histogram.XBins + - plotly.graph_objs.histogram2d.XBins +""", + DeprecationWarning, + ) + super().__init__(*args, **kwargs) + + +class YBins(dict): + """ + plotly.graph_objs.YBins is deprecated. + Please replace it with one of the following more specific types + - plotly.graph_objs.histogram.YBins + - plotly.graph_objs.histogram2d.YBins + + """ + + def __init__(self, *args, **kwargs): + """ + plotly.graph_objs.YBins is deprecated. + Please replace it with one of the following more specific types + - plotly.graph_objs.histogram.YBins + - plotly.graph_objs.histogram2d.YBins + + """ + warnings.warn( + """plotly.graph_objs.YBins is deprecated. +Please replace it with one of the following more specific types + - plotly.graph_objs.histogram.YBins + - plotly.graph_objs.histogram2d.YBins +""", + DeprecationWarning, + ) + super().__init__(*args, **kwargs) + + +class Trace(dict): + """ + plotly.graph_objs.Trace is deprecated. + Please replace it with one of the following more specific types + - plotly.graph_objs.Scatter + - plotly.graph_objs.Bar + - plotly.graph_objs.Area + - plotly.graph_objs.Histogram + - etc. + + """ + + def __init__(self, *args, **kwargs): + """ + plotly.graph_objs.Trace is deprecated. + Please replace it with one of the following more specific types + - plotly.graph_objs.Scatter + - plotly.graph_objs.Bar + - plotly.graph_objs.Area + - plotly.graph_objs.Histogram + - etc. + + """ + warnings.warn( + """plotly.graph_objs.Trace is deprecated. +Please replace it with one of the following more specific types + - plotly.graph_objs.Scatter + - plotly.graph_objs.Bar + - plotly.graph_objs.Area + - plotly.graph_objs.Histogram + - etc. +""", + DeprecationWarning, + ) + super().__init__(*args, **kwargs) + + +class Histogram2dcontour(dict): + """ + plotly.graph_objs.Histogram2dcontour is deprecated. + Please replace it with one of the following more specific types + - plotly.graph_objs.Histogram2dContour + + """ + + def __init__(self, *args, **kwargs): + """ + plotly.graph_objs.Histogram2dcontour is deprecated. + Please replace it with one of the following more specific types + - plotly.graph_objs.Histogram2dContour + + """ + warnings.warn( + """plotly.graph_objs.Histogram2dcontour is deprecated. +Please replace it with one of the following more specific types + - plotly.graph_objs.Histogram2dContour +""", + DeprecationWarning, + ) + super().__init__(*args, **kwargs) diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/_figure.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/_figure.py new file mode 100644 index 0000000000000000000000000000000000000000..c950ed8fc42ea61a98bc851f0ec4dd14b78717cc --- /dev/null +++ b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/_figure.py @@ -0,0 +1,25367 @@ +# --- THIS FILE IS AUTO-GENERATED --- +# Modifications will be overwitten the next time code generation run. + +from plotly.basedatatypes import BaseFigure + + +class Figure(BaseFigure): + def __init__( + self, data=None, layout=None, frames=None, skip_invalid=False, **kwargs + ): + """ + Create a new :class:Figure instance + + Parameters + ---------- + data + The 'data' property is a tuple of trace instances + that may be specified as: + - A list or tuple of trace instances + (e.g. [Scatter(...), Bar(...)]) + - A single trace instance + (e.g. Scatter(...), Bar(...), etc.) + - A list or tuple of dicts of string/value properties where: + - The 'type' property specifies the trace type + One of: ['bar', 'barpolar', 'box', 'candlestick', + 'carpet', 'choropleth', 'choroplethmap', + 'choroplethmapbox', 'cone', 'contour', + 'contourcarpet', 'densitymap', + 'densitymapbox', 'funnel', 'funnelarea', + 'heatmap', 'histogram', 'histogram2d', + 'histogram2dcontour', 'icicle', 'image', + 'indicator', 'isosurface', 'mesh3d', 'ohlc', + 'parcats', 'parcoords', 'pie', 'sankey', + 'scatter', 'scatter3d', 'scattercarpet', + 'scattergeo', 'scattergl', 'scattermap', + 'scattermapbox', 'scatterpolar', + 'scatterpolargl', 'scattersmith', + 'scatterternary', 'splom', 'streamtube', + 'sunburst', 'surface', 'table', 'treemap', + 'violin', 'volume', 'waterfall'] + + - All remaining properties are passed to the constructor of + the specified trace type + + (e.g. [{'type': 'scatter', ...}, {'type': 'bar, ...}]) + + layout + The 'layout' property is an instance of Layout + that may be specified as: + - An instance of :class:`plotly.graph_objs.Layout` + - A dict of string/value properties that will be passed + to the Layout constructor + + frames + The 'frames' property is a tuple of instances of + Frame that may be specified as: + - A list or tuple of instances of plotly.graph_objs.Frame + - A list or tuple of dicts of string/value properties that + will be passed to the Frame constructor + + skip_invalid: bool + If True, invalid properties in the figure specification will be + skipped silently. If False (default) invalid properties in the + figure specification will result in a ValueError + + Raises + ------ + ValueError + if a property in the specification of data, layout, or frames + is invalid AND skip_invalid is False + """ + super().__init__(data, layout, frames, skip_invalid, **kwargs) + + def update(self, dict1=None, overwrite=False, **kwargs) -> "Figure": + """ + + Update the properties of the figure with a dict and/or with + keyword arguments. + + This recursively updates the structure of the figure + object with the values in the input dict / keyword arguments. + + Parameters + ---------- + dict1 : dict + Dictionary of properties to be updated + overwrite: bool + If True, overwrite existing properties. If False, apply updates + to existing properties recursively, preserving existing + properties that are not specified in the update operation. + kwargs : + Keyword/value pair of properties to be updated + + Examples + -------- + >>> import plotly.graph_objs as go + >>> fig = go.Figure(data=[{'y': [1, 2, 3]}]) + >>> fig.update(data=[{'y': [4, 5, 6]}]) # doctest: +ELLIPSIS + Figure(...) + >>> fig.to_plotly_json() # doctest: +SKIP + {'data': [{'type': 'scatter', + 'uid': 'e86a7c7a-346a-11e8-8aa8-a0999b0c017b', + 'y': array([4, 5, 6], dtype=int32)}], + 'layout': {}} + + >>> fig = go.Figure(layout={'xaxis': + ... {'color': 'green', + ... 'range': [0, 1]}}) + >>> fig.update({'layout': {'xaxis': {'color': 'pink'}}}) # doctest: +ELLIPSIS + Figure(...) + >>> fig.to_plotly_json() # doctest: +SKIP + {'data': [], + 'layout': {'xaxis': + {'color': 'pink', + 'range': [0, 1]}}} + + Returns + ------- + BaseFigure + Updated figure + + """ + return super().update(dict1, overwrite, **kwargs) + + def update_traces( + self, + patch=None, + selector=None, + row=None, + col=None, + secondary_y=None, + overwrite=False, + **kwargs, + ) -> "Figure": + """ + + Perform a property update operation on all traces that satisfy the + specified selection criteria + + Parameters + ---------- + patch: dict or None (default None) + Dictionary of property updates to be applied to all traces that + satisfy the selection criteria. + selector: dict, function, int, str or None (default None) + Dict to use as selection criteria. + Traces will be selected if they contain properties corresponding + to all of the dictionary's keys, with values that exactly match + the supplied values. If None (the default), all traces are + selected. If a function, it must be a function accepting a single + argument and returning a boolean. The function will be called on + each trace and those for which the function returned True + will be in the selection. If an int N, the Nth trace matching row + and col will be selected (N can be negative). If a string S, the selector + is equivalent to dict(type=S). + row, col: int or None (default None) + Subplot row and column index of traces to select. + To select traces by row and column, the Figure must have been + created using plotly.subplots.make_subplots. If None + (the default), all traces are selected. + secondary_y: boolean or None (default None) + * If True, only select traces associated with the secondary + y-axis of the subplot. + * If False, only select traces associated with the primary + y-axis of the subplot. + * If None (the default), do not filter traces based on secondary + y-axis. + + To select traces by secondary y-axis, the Figure must have been + created using plotly.subplots.make_subplots. See the docstring + for the specs argument to make_subplots for more info on + creating subplots with secondary y-axes. + overwrite: bool + If True, overwrite existing properties. If False, apply updates + to existing properties recursively, preserving existing + properties that are not specified in the update operation. + **kwargs + Additional property updates to apply to each selected trace. If + a property is specified in both patch and in **kwargs then the + one in **kwargs takes precedence. + + Returns + ------- + self + Returns the Figure object that the method was called on + + """ + return super().update_traces( + patch, selector, row, col, secondary_y, overwrite, **kwargs + ) + + def update_layout(self, dict1=None, overwrite=False, **kwargs) -> "Figure": + """ + + Update the properties of the figure's layout with a dict and/or with + keyword arguments. + + This recursively updates the structure of the original + layout with the values in the input dict / keyword arguments. + + Parameters + ---------- + dict1 : dict + Dictionary of properties to be updated + overwrite: bool + If True, overwrite existing properties. If False, apply updates + to existing properties recursively, preserving existing + properties that are not specified in the update operation. + kwargs : + Keyword/value pair of properties to be updated + + Returns + ------- + BaseFigure + The Figure object that the update_layout method was called on + + """ + return super().update_layout(dict1, overwrite, **kwargs) + + def for_each_trace( + self, fn, selector=None, row=None, col=None, secondary_y=None + ) -> "Figure": + """ + + Apply a function to all traces that satisfy the specified selection + criteria + + Parameters + ---------- + fn: + Function that inputs a single trace object. + selector: dict, function, int, str or None (default None) + Dict to use as selection criteria. + Traces will be selected if they contain properties corresponding + to all of the dictionary's keys, with values that exactly match + the supplied values. If None (the default), all traces are + selected. If a function, it must be a function accepting a single + argument and returning a boolean. The function will be called on + each trace and those for which the function returned True + will be in the selection. If an int N, the Nth trace matching row + and col will be selected (N can be negative). If a string S, the selector + is equivalent to dict(type=S). + row, col: int or None (default None) + Subplot row and column index of traces to select. + To select traces by row and column, the Figure must have been + created using plotly.subplots.make_subplots. If None + (the default), all traces are selected. + secondary_y: boolean or None (default None) + * If True, only select traces associated with the secondary + y-axis of the subplot. + * If False, only select traces associated with the primary + y-axis of the subplot. + * If None (the default), do not filter traces based on secondary + y-axis. + + To select traces by secondary y-axis, the Figure must have been + created using plotly.subplots.make_subplots. See the docstring + for the specs argument to make_subplots for more info on + creating subplots with secondary y-axes. + Returns + ------- + self + Returns the Figure object that the method was called on + + """ + return super().for_each_trace(fn, selector, row, col, secondary_y) + + def add_trace( + self, trace, row=None, col=None, secondary_y=None, exclude_empty_subplots=False + ) -> "Figure": + """ + + Add a trace to the figure + + Parameters + ---------- + trace : BaseTraceType or dict + Either: + - An instances of a trace classe from the plotly.graph_objs + package (e.g plotly.graph_objs.Scatter, plotly.graph_objs.Bar) + - or a dicts where: + + - The 'type' property specifies the trace type (e.g. + 'scatter', 'bar', 'area', etc.). If the dict has no 'type' + property then 'scatter' is assumed. + - All remaining properties are passed to the constructor + of the specified trace type. + + row : 'all', int or None (default) + Subplot row index (starting from 1) for the trace to be + added. Only valid if figure was created using + `plotly.tools.make_subplots`. + If 'all', addresses all rows in the specified column(s). + col : 'all', int or None (default) + Subplot col index (starting from 1) for the trace to be + added. Only valid if figure was created using + `plotly.tools.make_subplots`. + If 'all', addresses all columns in the specified row(s). + secondary_y: boolean or None (default None) + If True, associate this trace with the secondary y-axis of the + subplot at the specified row and col. Only valid if all of the + following conditions are satisfied: + * The figure was created using `plotly.subplots.make_subplots`. + * The row and col arguments are not None + * The subplot at the specified row and col has type xy + (which is the default) and secondary_y True. These + properties are specified in the specs argument to + make_subplots. See the make_subplots docstring for more info. + * The trace argument is a 2D cartesian trace + (scatter, bar, etc.) + exclude_empty_subplots: boolean + If True, the trace will not be added to subplots that don't already + have traces. + Returns + ------- + BaseFigure + The Figure that add_trace was called on + + Examples + -------- + + >>> from plotly import subplots + >>> import plotly.graph_objs as go + + Add two Scatter traces to a figure + + >>> fig = go.Figure() + >>> fig.add_trace(go.Scatter(x=[1,2,3], y=[2,1,2])) # doctest: +ELLIPSIS + Figure(...) + >>> fig.add_trace(go.Scatter(x=[1,2,3], y=[2,1,2])) # doctest: +ELLIPSIS + Figure(...) + + + Add two Scatter traces to vertically stacked subplots + + >>> fig = subplots.make_subplots(rows=2) + >>> fig.add_trace(go.Scatter(x=[1,2,3], y=[2,1,2]), row=1, col=1) # doctest: +ELLIPSIS + Figure(...) + >>> fig.add_trace(go.Scatter(x=[1,2,3], y=[2,1,2]), row=2, col=1) # doctest: +ELLIPSIS + Figure(...) + + """ + return super().add_trace(trace, row, col, secondary_y, exclude_empty_subplots) + + def add_traces( + self, + data, + rows=None, + cols=None, + secondary_ys=None, + exclude_empty_subplots=False, + ) -> "Figure": + """ + + Add traces to the figure + + Parameters + ---------- + data : list[BaseTraceType or dict] + A list of trace specifications to be added. + Trace specifications may be either: + + - Instances of trace classes from the plotly.graph_objs + package (e.g plotly.graph_objs.Scatter, plotly.graph_objs.Bar) + - Dicts where: + + - The 'type' property specifies the trace type (e.g. + 'scatter', 'bar', 'area', etc.). If the dict has no 'type' + property then 'scatter' is assumed. + - All remaining properties are passed to the constructor + of the specified trace type. + + rows : None, list[int], or int (default None) + List of subplot row indexes (starting from 1) for the traces to be + added. Only valid if figure was created using + `plotly.tools.make_subplots` + If a single integer is passed, all traces will be added to row number + + cols : None or list[int] (default None) + List of subplot column indexes (starting from 1) for the traces + to be added. Only valid if figure was created using + `plotly.tools.make_subplots` + If a single integer is passed, all traces will be added to column number + + + secondary_ys: None or list[boolean] (default None) + List of secondary_y booleans for traces to be added. See the + docstring for `add_trace` for more info. + + exclude_empty_subplots: boolean + If True, the trace will not be added to subplots that don't already + have traces. + + Returns + ------- + BaseFigure + The Figure that add_traces was called on + + Examples + -------- + + >>> from plotly import subplots + >>> import plotly.graph_objs as go + + Add two Scatter traces to a figure + + >>> fig = go.Figure() + >>> fig.add_traces([go.Scatter(x=[1,2,3], y=[2,1,2]), + ... go.Scatter(x=[1,2,3], y=[2,1,2])]) # doctest: +ELLIPSIS + Figure(...) + + Add two Scatter traces to vertically stacked subplots + + >>> fig = subplots.make_subplots(rows=2) + >>> fig.add_traces([go.Scatter(x=[1,2,3], y=[2,1,2]), + ... go.Scatter(x=[1,2,3], y=[2,1,2])], + ... rows=[1, 2], cols=[1, 1]) # doctest: +ELLIPSIS + Figure(...) + + """ + return super().add_traces( + data, rows, cols, secondary_ys, exclude_empty_subplots + ) + + def add_vline( + self, + x, + row="all", + col="all", + exclude_empty_subplots=True, + annotation=None, + **kwargs, + ) -> "Figure": + """ + + Add a vertical line to a plot or subplot that extends infinitely in the + y-dimension. + + Parameters + ---------- + x: float or int + A number representing the x coordinate of the vertical line. + exclude_empty_subplots: Boolean + If True (default) do not place the shape on subplots that have no data + plotted on them. + row: None, int or 'all' + Subplot row for shape indexed starting at 1. If 'all', addresses all rows in + the specified column(s). If both row and col are None, addresses the + first subplot if subplots exist, or the only plot. By default is "all". + col: None, int or 'all' + Subplot column for shape indexed starting at 1. If 'all', addresses all rows in + the specified column(s). If both row and col are None, addresses the + first subplot if subplots exist, or the only plot. By default is "all". + annotation: dict or plotly.graph_objects.layout.Annotation. If dict(), + it is interpreted as describing an annotation. The annotation is + placed relative to the shape based on annotation_position (see + below) unless its x or y value has been specified for the annotation + passed here. xref and yref are always the same as for the added + shape and cannot be overridden. + annotation_position: a string containing optionally ["top", "bottom"] + and ["left", "right"] specifying where the text should be anchored + to on the line. Example positions are "bottom left", "right top", + "right", "bottom". If an annotation is added but annotation_position is + not specified, this defaults to "top right". + annotation_*: any parameters to go.layout.Annotation can be passed as + keywords by prefixing them with "annotation_". For example, to specify the + annotation text "example" you can pass annotation_text="example" as a + keyword argument. + **kwargs: + Any named function parameters that can be passed to 'add_shape', + except for x0, x1, y0, y1 or type. + """ + return super().add_vline( + x, row, col, exclude_empty_subplots, annotation, **kwargs + ) + + def add_hline( + self, + y, + row="all", + col="all", + exclude_empty_subplots=True, + annotation=None, + **kwargs, + ) -> "Figure": + """ + + Add a horizontal line to a plot or subplot that extends infinitely in the + x-dimension. + + Parameters + ---------- + y: float or int + A number representing the y coordinate of the horizontal line. + exclude_empty_subplots: Boolean + If True (default) do not place the shape on subplots that have no data + plotted on them. + row: None, int or 'all' + Subplot row for shape indexed starting at 1. If 'all', addresses all rows in + the specified column(s). If both row and col are None, addresses the + first subplot if subplots exist, or the only plot. By default is "all". + col: None, int or 'all' + Subplot column for shape indexed starting at 1. If 'all', addresses all rows in + the specified column(s). If both row and col are None, addresses the + first subplot if subplots exist, or the only plot. By default is "all". + annotation: dict or plotly.graph_objects.layout.Annotation. If dict(), + it is interpreted as describing an annotation. The annotation is + placed relative to the shape based on annotation_position (see + below) unless its x or y value has been specified for the annotation + passed here. xref and yref are always the same as for the added + shape and cannot be overridden. + annotation_position: a string containing optionally ["top", "bottom"] + and ["left", "right"] specifying where the text should be anchored + to on the line. Example positions are "bottom left", "right top", + "right", "bottom". If an annotation is added but annotation_position is + not specified, this defaults to "top right". + annotation_*: any parameters to go.layout.Annotation can be passed as + keywords by prefixing them with "annotation_". For example, to specify the + annotation text "example" you can pass annotation_text="example" as a + keyword argument. + **kwargs: + Any named function parameters that can be passed to 'add_shape', + except for x0, x1, y0, y1 or type. + """ + return super().add_hline( + y, row, col, exclude_empty_subplots, annotation, **kwargs + ) + + def add_vrect( + self, + x0, + x1, + row="all", + col="all", + exclude_empty_subplots=True, + annotation=None, + **kwargs, + ) -> "Figure": + """ + + Add a rectangle to a plot or subplot that extends infinitely in the + y-dimension. + + Parameters + ---------- + x0: float or int + A number representing the x coordinate of one side of the rectangle. + x1: float or int + A number representing the x coordinate of the other side of the rectangle. + exclude_empty_subplots: Boolean + If True (default) do not place the shape on subplots that have no data + plotted on them. + row: None, int or 'all' + Subplot row for shape indexed starting at 1. If 'all', addresses all rows in + the specified column(s). If both row and col are None, addresses the + first subplot if subplots exist, or the only plot. By default is "all". + col: None, int or 'all' + Subplot column for shape indexed starting at 1. If 'all', addresses all rows in + the specified column(s). If both row and col are None, addresses the + first subplot if subplots exist, or the only plot. By default is "all". + annotation: dict or plotly.graph_objects.layout.Annotation. If dict(), + it is interpreted as describing an annotation. The annotation is + placed relative to the shape based on annotation_position (see + below) unless its x or y value has been specified for the annotation + passed here. xref and yref are always the same as for the added + shape and cannot be overridden. + annotation_position: a string containing optionally ["inside", "outside"], ["top", "bottom"] + and ["left", "right"] specifying where the text should be anchored + to on the rectangle. Example positions are "outside top left", "inside + bottom", "right", "inside left", "inside" ("outside" is not supported). If + an annotation is added but annotation_position is not specified this + defaults to "inside top right". + annotation_*: any parameters to go.layout.Annotation can be passed as + keywords by prefixing them with "annotation_". For example, to specify the + annotation text "example" you can pass annotation_text="example" as a + keyword argument. + **kwargs: + Any named function parameters that can be passed to 'add_shape', + except for x0, x1, y0, y1 or type. + """ + return super().add_vrect( + x0, x1, row, col, exclude_empty_subplots, annotation, **kwargs + ) + + def add_hrect( + self, + y0, + y1, + row="all", + col="all", + exclude_empty_subplots=True, + annotation=None, + **kwargs, + ) -> "Figure": + """ + + Add a rectangle to a plot or subplot that extends infinitely in the + x-dimension. + + Parameters + ---------- + y0: float or int + A number representing the y coordinate of one side of the rectangle. + y1: float or int + A number representing the y coordinate of the other side of the rectangle. + exclude_empty_subplots: Boolean + If True (default) do not place the shape on subplots that have no data + plotted on them. + row: None, int or 'all' + Subplot row for shape indexed starting at 1. If 'all', addresses all rows in + the specified column(s). If both row and col are None, addresses the + first subplot if subplots exist, or the only plot. By default is "all". + col: None, int or 'all' + Subplot column for shape indexed starting at 1. If 'all', addresses all rows in + the specified column(s). If both row and col are None, addresses the + first subplot if subplots exist, or the only plot. By default is "all". + annotation: dict or plotly.graph_objects.layout.Annotation. If dict(), + it is interpreted as describing an annotation. The annotation is + placed relative to the shape based on annotation_position (see + below) unless its x or y value has been specified for the annotation + passed here. xref and yref are always the same as for the added + shape and cannot be overridden. + annotation_position: a string containing optionally ["inside", "outside"], ["top", "bottom"] + and ["left", "right"] specifying where the text should be anchored + to on the rectangle. Example positions are "outside top left", "inside + bottom", "right", "inside left", "inside" ("outside" is not supported). If + an annotation is added but annotation_position is not specified this + defaults to "inside top right". + annotation_*: any parameters to go.layout.Annotation can be passed as + keywords by prefixing them with "annotation_". For example, to specify the + annotation text "example" you can pass annotation_text="example" as a + keyword argument. + **kwargs: + Any named function parameters that can be passed to 'add_shape', + except for x0, x1, y0, y1 or type. + """ + return super().add_hrect( + y0, y1, row, col, exclude_empty_subplots, annotation, **kwargs + ) + + def set_subplots(self, rows=None, cols=None, **make_subplots_args) -> "Figure": + """ + + Add subplots to this figure. If the figure already contains subplots, + then this throws an error. Accepts any keyword arguments that + plotly.subplots.make_subplots accepts. + + """ + return super().set_subplots(rows, cols, **make_subplots_args) + + def add_bar( + self, + alignmentgroup=None, + base=None, + basesrc=None, + cliponaxis=None, + constraintext=None, + customdata=None, + customdatasrc=None, + dx=None, + dy=None, + error_x=None, + error_y=None, + hoverinfo=None, + hoverinfosrc=None, + hoverlabel=None, + hovertemplate=None, + hovertemplatefallback=None, + hovertemplatesrc=None, + hovertext=None, + hovertextsrc=None, + ids=None, + idssrc=None, + insidetextanchor=None, + insidetextfont=None, + legend=None, + legendgroup=None, + legendgrouptitle=None, + legendrank=None, + legendwidth=None, + marker=None, + meta=None, + metasrc=None, + name=None, + offset=None, + offsetgroup=None, + offsetsrc=None, + opacity=None, + orientation=None, + outsidetextfont=None, + selected=None, + selectedpoints=None, + showlegend=None, + stream=None, + text=None, + textangle=None, + textfont=None, + textposition=None, + textpositionsrc=None, + textsrc=None, + texttemplate=None, + texttemplatefallback=None, + texttemplatesrc=None, + uid=None, + uirevision=None, + unselected=None, + visible=None, + width=None, + widthsrc=None, + x=None, + x0=None, + xaxis=None, + xcalendar=None, + xhoverformat=None, + xperiod=None, + xperiod0=None, + xperiodalignment=None, + xsrc=None, + y=None, + y0=None, + yaxis=None, + ycalendar=None, + yhoverformat=None, + yperiod=None, + yperiod0=None, + yperiodalignment=None, + ysrc=None, + zorder=None, + row=None, + col=None, + secondary_y=None, + **kwargs, + ) -> "Figure": + """ + Add a new Bar trace + + The data visualized by the span of the bars is set in `y` if + `orientation` is set to "v" (the default) and the labels are + set in `x`. By setting `orientation` to "h", the roles are + interchanged. + + Parameters + ---------- + alignmentgroup + Set several traces linked to the same position axis or + matching axes to the same alignmentgroup. This controls + whether bars compute their positional range dependently + or independently. + base + Sets where the bar base is drawn (in position axis + units). In "stack" or "relative" barmode, traces that + set "base" will be excluded and drawn in "overlay" mode + instead. + basesrc + Sets the source reference on Chart Studio Cloud for + `base`. + cliponaxis + Determines whether the text nodes are clipped about the + subplot axes. To show the text nodes above axis lines + and tick labels, make sure to set `xaxis.layer` and + `yaxis.layer` to *below traces*. + constraintext + Constrain the size of text inside or outside a bar to + be no larger than the bar itself. + customdata + Assigns extra data each datum. This may be useful when + listening to hover, click and selection events. Note + that, "scatter" traces also appends customdata items in + the markers DOM elements + customdatasrc + Sets the source reference on Chart Studio Cloud for + `customdata`. + dx + Sets the x coordinate step. See `x0` for more info. + dy + Sets the y coordinate step. See `y0` for more info. + error_x + :class:`plotly.graph_objects.bar.ErrorX` instance or + dict with compatible properties + error_y + :class:`plotly.graph_objects.bar.ErrorY` instance or + dict with compatible properties + hoverinfo + Determines which trace information appear on hover. If + `none` or `skip` are set, no information is displayed + upon hovering. But, if `none` is set, click and hover + events are still fired. + hoverinfosrc + Sets the source reference on Chart Studio Cloud for + `hoverinfo`. + hoverlabel + :class:`plotly.graph_objects.bar.Hoverlabel` instance + or dict with compatible properties + hovertemplate + Template string used for rendering the information that + appear on hover box. Note that this will override + `hoverinfo`. Variables are inserted using %{variable}, + for example "y: %{y}" as well as %{xother}, {%_xother}, + {%_xother_}, {%xother_}. When showing info for several + points, "xother" will be added to those with different + x positions from the first point. An underscore before + or after "(x|y)other" will add a space on that side, + only when this field is shown. Numbers are formatted + using d3-format's syntax %{variable:d3-format}, for + example "Price: %{y:$.2f}". + https://github.com/d3/d3-format/tree/v1.4.5#d3-format + for details on the formatting syntax. Dates are + formatted using d3-time-format's syntax + %{variable|d3-time-format}, for example "Day: + %{2019-01-01|%A}". https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format for details on the + date formatting syntax. Variables that can't be found + will be replaced with the specifier. For example, a + template of "data: %{x}, %{y}" will result in a value + of "data: 1, %{y}" if x is 1 and y is missing. + Variables with an undefined value will be replaced with + the fallback value. The variables available in + `hovertemplate` are the ones emitted as event data + described at this link + https://plotly.com/javascript/plotlyjs-events/#event- + data. Additionally, all attributes that can be + specified per-point (the ones that are `arrayOk: true`) + are available. Finally, the template string has access + to variables `value` and `label`. Anything contained in + tag `` is displayed in the secondary box, for + example `%{fullData.name}`. To hide the + secondary box completely, use an empty tag + ``. + hovertemplatefallback + Fallback string that's displayed when a variable + referenced in a template is missing. If the boolean + value 'false' is passed in, the specifier with the + missing variable will be displayed. + hovertemplatesrc + Sets the source reference on Chart Studio Cloud for + `hovertemplate`. + hovertext + Sets hover text elements associated with each (x,y) + pair. If a single string, the same string appears over + all the data points. If an array of string, the items + are mapped in order to the this trace's (x,y) + coordinates. To be seen, trace `hoverinfo` must contain + a "text" flag. + hovertextsrc + Sets the source reference on Chart Studio Cloud for + `hovertext`. + ids + Assigns id labels to each datum. These ids for object + constancy of data points during animation. Should be an + array of strings, not numbers or any other type. + idssrc + Sets the source reference on Chart Studio Cloud for + `ids`. + insidetextanchor + Determines if texts are kept at center or start/end + points in `textposition` "inside" mode. + insidetextfont + Sets the font used for `text` lying inside the bar. + legend + Sets the reference to a legend to show this trace in. + References to these legends are "legend", "legend2", + "legend3", etc. Settings for these legends are set in + the layout, under `layout.legend`, `layout.legend2`, + etc. + legendgroup + Sets the legend group for this trace. Traces and shapes + part of the same legend group hide/show at the same + time when toggling legend items. + legendgrouptitle + :class:`plotly.graph_objects.bar.Legendgrouptitle` + instance or dict with compatible properties + legendrank + Sets the legend rank for this trace. Items and groups + with smaller ranks are presented on top/left side while + with "reversed" `legend.traceorder` they are on + bottom/right side. The default legendrank is 1000, so + that you can use ranks less than 1000 to place certain + items before all unranked items, and ranks greater than + 1000 to go after all unranked items. When having + unranked or equal rank items shapes would be displayed + after traces i.e. according to their order in data and + layout. + legendwidth + Sets the width (in px or fraction) of the legend for + this trace. + marker + :class:`plotly.graph_objects.bar.Marker` instance or + dict with compatible properties + meta + Assigns extra meta information associated with this + trace that can be used in various text attributes. + Attributes such as trace `name`, graph, axis and + colorbar `title.text`, annotation `text` + `rangeselector`, `updatemenues` and `sliders` `label` + text all support `meta`. To access the trace `meta` + values in an attribute in the same trace, simply use + `%{meta[i]}` where `i` is the index or key of the + `meta` item in question. To access trace `meta` in + layout attributes, use `%{data[n[.meta[i]}` where `i` + is the index or key of the `meta` and `n` is the trace + index. + metasrc + Sets the source reference on Chart Studio Cloud for + `meta`. + name + Sets the trace name. The trace name appears as the + legend item and on hover. + offset + Shifts the position where the bar is drawn (in position + axis units). In "group" barmode, traces that set + "offset" will be excluded and drawn in "overlay" mode + instead. + offsetgroup + Set several traces linked to the same position axis or + matching axes to the same offsetgroup where bars of the + same position coordinate will line up. + offsetsrc + Sets the source reference on Chart Studio Cloud for + `offset`. + opacity + Sets the opacity of the trace. + orientation + Sets the orientation of the bars. With "v" ("h"), the + value of the each bar spans along the vertical + (horizontal). + outsidetextfont + Sets the font used for `text` lying outside the bar. + selected + :class:`plotly.graph_objects.bar.Selected` instance or + dict with compatible properties + selectedpoints + Array containing integer indices of selected points. + Has an effect only for traces that support selections. + Note that an empty array means an empty selection where + the `unselected` are turned on for all points, whereas, + any other non-array values means no selection all where + the `selected` and `unselected` styles have no effect. + showlegend + Determines whether or not an item corresponding to this + trace is shown in the legend. + stream + :class:`plotly.graph_objects.bar.Stream` instance or + dict with compatible properties + text + Sets text elements associated with each (x,y) pair. If + a single string, the same string appears over all the + data points. If an array of string, the items are + mapped in order to the this trace's (x,y) coordinates. + If trace `hoverinfo` contains a "text" flag and + "hovertext" is not set, these elements will be seen in + the hover labels. + textangle + Sets the angle of the tick labels with respect to the + bar. For example, a `tickangle` of -90 draws the tick + labels vertically. With "auto" the texts may + automatically be rotated to fit with the maximum size + in bars. + textfont + Sets the font used for `text`. + textposition + Specifies the location of the `text`. "inside" + positions `text` inside, next to the bar end (rotated + and scaled if needed). "outside" positions `text` + outside, next to the bar end (scaled if needed), unless + there is another bar stacked on this one, then the text + gets pushed inside. "auto" tries to position `text` + inside the bar, but if the bar is too small and no bar + is stacked on this one the text is moved outside. If + "none", no text appears. + textpositionsrc + Sets the source reference on Chart Studio Cloud for + `textposition`. + textsrc + Sets the source reference on Chart Studio Cloud for + `text`. + texttemplate + Template string used for rendering the information text + that appears on points. Note that this will override + `textinfo`. Variables are inserted using %{variable}, + for example "y: %{y}". Numbers are formatted using + d3-format's syntax %{variable:d3-format}, for example + "Price: %{y:$.2f}". + https://github.com/d3/d3-format/tree/v1.4.5#d3-format + for details on the formatting syntax. Dates are + formatted using d3-time-format's syntax + %{variable|d3-time-format}, for example "Day: + %{2019-01-01|%A}". https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format for details on the + date formatting syntax. Variables that can't be found + will be replaced with the specifier. For example, a + template of "data: %{x}, %{y}" will result in a value + of "data: 1, %{y}" if x is 1 and y is missing. + Variables with an undefined value will be replaced with + the fallback value. All attributes that can be + specified per-point (the ones that are `arrayOk: true`) + are available. Finally, the template string has access + to variables `value` and `label`. + texttemplatefallback + Fallback string that's displayed when a variable + referenced in a template is missing. If the boolean + value 'false' is passed in, the specifier with the + missing variable will be displayed. + texttemplatesrc + Sets the source reference on Chart Studio Cloud for + `texttemplate`. + uid + Assign an id to this trace, Use this to provide object + constancy between traces during animations and + transitions. + uirevision + Controls persistence of some user-driven changes to the + trace: `constraintrange` in `parcoords` traces, as well + as some `editable: true` modifications such as `name` + and `colorbar.title`. Defaults to `layout.uirevision`. + Note that other user-driven trace attribute changes are + controlled by `layout` attributes: `trace.visible` is + controlled by `layout.legend.uirevision`, + `selectedpoints` is controlled by + `layout.selectionrevision`, and `colorbar.(x|y)` + (accessible with `config: {editable: true}`) is + controlled by `layout.editrevision`. Trace changes are + tracked by `uid`, which only falls back on trace index + if no `uid` is provided. So if your app can add/remove + traces before the end of the `data` array, such that + the same trace has a different index, you can still + preserve user-driven changes if you give each trace a + `uid` that stays with it as it moves. + unselected + :class:`plotly.graph_objects.bar.Unselected` instance + or dict with compatible properties + visible + Determines whether or not this trace is visible. If + "legendonly", the trace is not drawn, but can appear as + a legend item (provided that the legend itself is + visible). + width + Sets the bar width (in position axis units). + widthsrc + Sets the source reference on Chart Studio Cloud for + `width`. + x + Sets the x coordinates. + x0 + Alternate to `x`. Builds a linear space of x + coordinates. Use with `dx` where `x0` is the starting + coordinate and `dx` the step. + xaxis + Sets a reference between this trace's x coordinates and + a 2D cartesian x axis. If "x" (the default value), the + x coordinates refer to `layout.xaxis`. If "x2", the x + coordinates refer to `layout.xaxis2`, and so on. + xcalendar + Sets the calendar system to use with `x` date data. + xhoverformat + Sets the hover text formatting rulefor `x` using d3 + formatting mini-languages which are very similar to + those in Python. For numbers, see: + https://github.com/d3/d3-format/tree/v1.4.5#d3-format. + And for dates see: https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format. We add two items to + d3's date formatter: "%h" for half of the year as a + decimal number as well as "%{n}f" for fractional + seconds with n digits. For example, *2016-10-13 + 09:15:23.456* with tickformat "%H~%M~%S.%2f" would + display *09~15~23.46*By default the values are + formatted using `xaxis.hoverformat`. + xperiod + Only relevant when the axis `type` is "date". Sets the + period positioning in milliseconds or "M" on the x + axis. Special values in the form of "M" could be + used to declare the number of months. In this case `n` + must be a positive integer. + xperiod0 + Only relevant when the axis `type` is "date". Sets the + base for period positioning in milliseconds or date + string on the x0 axis. When `x0period` is round number + of weeks, the `x0period0` by default would be on a + Sunday i.e. 2000-01-02, otherwise it would be at + 2000-01-01. + xperiodalignment + Only relevant when the axis `type` is "date". Sets the + alignment of data points on the x axis. + xsrc + Sets the source reference on Chart Studio Cloud for + `x`. + y + Sets the y coordinates. + y0 + Alternate to `y`. Builds a linear space of y + coordinates. Use with `dy` where `y0` is the starting + coordinate and `dy` the step. + yaxis + Sets a reference between this trace's y coordinates and + a 2D cartesian y axis. If "y" (the default value), the + y coordinates refer to `layout.yaxis`. If "y2", the y + coordinates refer to `layout.yaxis2`, and so on. + ycalendar + Sets the calendar system to use with `y` date data. + yhoverformat + Sets the hover text formatting rulefor `y` using d3 + formatting mini-languages which are very similar to + those in Python. For numbers, see: + https://github.com/d3/d3-format/tree/v1.4.5#d3-format. + And for dates see: https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format. We add two items to + d3's date formatter: "%h" for half of the year as a + decimal number as well as "%{n}f" for fractional + seconds with n digits. For example, *2016-10-13 + 09:15:23.456* with tickformat "%H~%M~%S.%2f" would + display *09~15~23.46*By default the values are + formatted using `yaxis.hoverformat`. + yperiod + Only relevant when the axis `type` is "date". Sets the + period positioning in milliseconds or "M" on the y + axis. Special values in the form of "M" could be + used to declare the number of months. In this case `n` + must be a positive integer. + yperiod0 + Only relevant when the axis `type` is "date". Sets the + base for period positioning in milliseconds or date + string on the y0 axis. When `y0period` is round number + of weeks, the `y0period0` by default would be on a + Sunday i.e. 2000-01-02, otherwise it would be at + 2000-01-01. + yperiodalignment + Only relevant when the axis `type` is "date". Sets the + alignment of data points on the y axis. + ysrc + Sets the source reference on Chart Studio Cloud for + `y`. + zorder + Sets the layer on which this trace is displayed, + relative to other SVG traces on the same subplot. SVG + traces with higher `zorder` appear in front of those + with lower `zorder`. + row : 'all', int or None (default) + Subplot row index (starting from 1) for the trace to be + added. Only valid if figure was created using + `plotly.tools.make_subplots`.If 'all', addresses all + rows in the specified column(s). + col : 'all', int or None (default) + Subplot col index (starting from 1) for the trace to be + added. Only valid if figure was created using + `plotly.tools.make_subplots`.If 'all', addresses all + columns in the specified row(s). + secondary_y: boolean or None (default None) + If True, associate this trace with the secondary y-axis of the + subplot at the specified row and col. Only valid if all of the + following conditions are satisfied: + * The figure was created using `plotly.subplots.make_subplots`. + * The row and col arguments are not None + * The subplot at the specified row and col has type xy + (which is the default) and secondary_y True. These + properties are specified in the specs argument to + make_subplots. See the make_subplots docstring for more info. + + Returns + ------- + Figure + """ + from plotly.graph_objs import Bar + + new_trace = Bar( + alignmentgroup=alignmentgroup, + base=base, + basesrc=basesrc, + cliponaxis=cliponaxis, + constraintext=constraintext, + customdata=customdata, + customdatasrc=customdatasrc, + dx=dx, + dy=dy, + error_x=error_x, + error_y=error_y, + hoverinfo=hoverinfo, + hoverinfosrc=hoverinfosrc, + hoverlabel=hoverlabel, + hovertemplate=hovertemplate, + hovertemplatefallback=hovertemplatefallback, + hovertemplatesrc=hovertemplatesrc, + hovertext=hovertext, + hovertextsrc=hovertextsrc, + ids=ids, + idssrc=idssrc, + insidetextanchor=insidetextanchor, + insidetextfont=insidetextfont, + legend=legend, + legendgroup=legendgroup, + legendgrouptitle=legendgrouptitle, + legendrank=legendrank, + legendwidth=legendwidth, + marker=marker, + meta=meta, + metasrc=metasrc, + name=name, + offset=offset, + offsetgroup=offsetgroup, + offsetsrc=offsetsrc, + opacity=opacity, + orientation=orientation, + outsidetextfont=outsidetextfont, + selected=selected, + selectedpoints=selectedpoints, + showlegend=showlegend, + stream=stream, + text=text, + textangle=textangle, + textfont=textfont, + textposition=textposition, + textpositionsrc=textpositionsrc, + textsrc=textsrc, + texttemplate=texttemplate, + texttemplatefallback=texttemplatefallback, + texttemplatesrc=texttemplatesrc, + uid=uid, + uirevision=uirevision, + unselected=unselected, + visible=visible, + width=width, + widthsrc=widthsrc, + x=x, + x0=x0, + xaxis=xaxis, + xcalendar=xcalendar, + xhoverformat=xhoverformat, + xperiod=xperiod, + xperiod0=xperiod0, + xperiodalignment=xperiodalignment, + xsrc=xsrc, + y=y, + y0=y0, + yaxis=yaxis, + ycalendar=ycalendar, + yhoverformat=yhoverformat, + yperiod=yperiod, + yperiod0=yperiod0, + yperiodalignment=yperiodalignment, + ysrc=ysrc, + zorder=zorder, + **kwargs, + ) + return self.add_trace(new_trace, row=row, col=col, secondary_y=secondary_y) + + def add_barpolar( + self, + base=None, + basesrc=None, + customdata=None, + customdatasrc=None, + dr=None, + dtheta=None, + hoverinfo=None, + hoverinfosrc=None, + hoverlabel=None, + hovertemplate=None, + hovertemplatefallback=None, + hovertemplatesrc=None, + hovertext=None, + hovertextsrc=None, + ids=None, + idssrc=None, + legend=None, + legendgroup=None, + legendgrouptitle=None, + legendrank=None, + legendwidth=None, + marker=None, + meta=None, + metasrc=None, + name=None, + offset=None, + offsetsrc=None, + opacity=None, + r=None, + r0=None, + rsrc=None, + selected=None, + selectedpoints=None, + showlegend=None, + stream=None, + subplot=None, + text=None, + textsrc=None, + theta=None, + theta0=None, + thetasrc=None, + thetaunit=None, + uid=None, + uirevision=None, + unselected=None, + visible=None, + width=None, + widthsrc=None, + row=None, + col=None, + **kwargs, + ) -> "Figure": + """ + Add a new Barpolar trace + + The data visualized by the radial span of the bars is set in + `r` + + Parameters + ---------- + base + Sets where the bar base is drawn (in radial axis + units). In "stack" barmode, traces that set "base" will + be excluded and drawn in "overlay" mode instead. + basesrc + Sets the source reference on Chart Studio Cloud for + `base`. + customdata + Assigns extra data each datum. This may be useful when + listening to hover, click and selection events. Note + that, "scatter" traces also appends customdata items in + the markers DOM elements + customdatasrc + Sets the source reference on Chart Studio Cloud for + `customdata`. + dr + Sets the r coordinate step. + dtheta + Sets the theta coordinate step. By default, the + `dtheta` step equals the subplot's period divided by + the length of the `r` coordinates. + hoverinfo + Determines which trace information appear on hover. If + `none` or `skip` are set, no information is displayed + upon hovering. But, if `none` is set, click and hover + events are still fired. + hoverinfosrc + Sets the source reference on Chart Studio Cloud for + `hoverinfo`. + hoverlabel + :class:`plotly.graph_objects.barpolar.Hoverlabel` + instance or dict with compatible properties + hovertemplate + Template string used for rendering the information that + appear on hover box. Note that this will override + `hoverinfo`. Variables are inserted using %{variable}, + for example "y: %{y}" as well as %{xother}, {%_xother}, + {%_xother_}, {%xother_}. When showing info for several + points, "xother" will be added to those with different + x positions from the first point. An underscore before + or after "(x|y)other" will add a space on that side, + only when this field is shown. Numbers are formatted + using d3-format's syntax %{variable:d3-format}, for + example "Price: %{y:$.2f}". + https://github.com/d3/d3-format/tree/v1.4.5#d3-format + for details on the formatting syntax. Dates are + formatted using d3-time-format's syntax + %{variable|d3-time-format}, for example "Day: + %{2019-01-01|%A}". https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format for details on the + date formatting syntax. Variables that can't be found + will be replaced with the specifier. For example, a + template of "data: %{x}, %{y}" will result in a value + of "data: 1, %{y}" if x is 1 and y is missing. + Variables with an undefined value will be replaced with + the fallback value. The variables available in + `hovertemplate` are the ones emitted as event data + described at this link + https://plotly.com/javascript/plotlyjs-events/#event- + data. Additionally, all attributes that can be + specified per-point (the ones that are `arrayOk: true`) + are available. Anything contained in tag `` is + displayed in the secondary box, for example + `%{fullData.name}`. To hide the + secondary box completely, use an empty tag + ``. + hovertemplatefallback + Fallback string that's displayed when a variable + referenced in a template is missing. If the boolean + value 'false' is passed in, the specifier with the + missing variable will be displayed. + hovertemplatesrc + Sets the source reference on Chart Studio Cloud for + `hovertemplate`. + hovertext + Same as `text`. + hovertextsrc + Sets the source reference on Chart Studio Cloud for + `hovertext`. + ids + Assigns id labels to each datum. These ids for object + constancy of data points during animation. Should be an + array of strings, not numbers or any other type. + idssrc + Sets the source reference on Chart Studio Cloud for + `ids`. + legend + Sets the reference to a legend to show this trace in. + References to these legends are "legend", "legend2", + "legend3", etc. Settings for these legends are set in + the layout, under `layout.legend`, `layout.legend2`, + etc. + legendgroup + Sets the legend group for this trace. Traces and shapes + part of the same legend group hide/show at the same + time when toggling legend items. + legendgrouptitle + :class:`plotly.graph_objects.barpolar.Legendgrouptitle` + instance or dict with compatible properties + legendrank + Sets the legend rank for this trace. Items and groups + with smaller ranks are presented on top/left side while + with "reversed" `legend.traceorder` they are on + bottom/right side. The default legendrank is 1000, so + that you can use ranks less than 1000 to place certain + items before all unranked items, and ranks greater than + 1000 to go after all unranked items. When having + unranked or equal rank items shapes would be displayed + after traces i.e. according to their order in data and + layout. + legendwidth + Sets the width (in px or fraction) of the legend for + this trace. + marker + :class:`plotly.graph_objects.barpolar.Marker` instance + or dict with compatible properties + meta + Assigns extra meta information associated with this + trace that can be used in various text attributes. + Attributes such as trace `name`, graph, axis and + colorbar `title.text`, annotation `text` + `rangeselector`, `updatemenues` and `sliders` `label` + text all support `meta`. To access the trace `meta` + values in an attribute in the same trace, simply use + `%{meta[i]}` where `i` is the index or key of the + `meta` item in question. To access trace `meta` in + layout attributes, use `%{data[n[.meta[i]}` where `i` + is the index or key of the `meta` and `n` is the trace + index. + metasrc + Sets the source reference on Chart Studio Cloud for + `meta`. + name + Sets the trace name. The trace name appears as the + legend item and on hover. + offset + Shifts the angular position where the bar is drawn (in + "thetatunit" units). + offsetsrc + Sets the source reference on Chart Studio Cloud for + `offset`. + opacity + Sets the opacity of the trace. + r + Sets the radial coordinates + r0 + Alternate to `r`. Builds a linear space of r + coordinates. Use with `dr` where `r0` is the starting + coordinate and `dr` the step. + rsrc + Sets the source reference on Chart Studio Cloud for + `r`. + selected + :class:`plotly.graph_objects.barpolar.Selected` + instance or dict with compatible properties + selectedpoints + Array containing integer indices of selected points. + Has an effect only for traces that support selections. + Note that an empty array means an empty selection where + the `unselected` are turned on for all points, whereas, + any other non-array values means no selection all where + the `selected` and `unselected` styles have no effect. + showlegend + Determines whether or not an item corresponding to this + trace is shown in the legend. + stream + :class:`plotly.graph_objects.barpolar.Stream` instance + or dict with compatible properties + subplot + Sets a reference between this trace's data coordinates + and a polar subplot. If "polar" (the default value), + the data refer to `layout.polar`. If "polar2", the data + refer to `layout.polar2`, and so on. + text + Sets hover text elements associated with each bar. If a + single string, the same string appears over all bars. + If an array of string, the items are mapped in order to + the this trace's coordinates. + textsrc + Sets the source reference on Chart Studio Cloud for + `text`. + theta + Sets the angular coordinates + theta0 + Alternate to `theta`. Builds a linear space of theta + coordinates. Use with `dtheta` where `theta0` is the + starting coordinate and `dtheta` the step. + thetasrc + Sets the source reference on Chart Studio Cloud for + `theta`. + thetaunit + Sets the unit of input "theta" values. Has an effect + only when on "linear" angular axes. + uid + Assign an id to this trace, Use this to provide object + constancy between traces during animations and + transitions. + uirevision + Controls persistence of some user-driven changes to the + trace: `constraintrange` in `parcoords` traces, as well + as some `editable: true` modifications such as `name` + and `colorbar.title`. Defaults to `layout.uirevision`. + Note that other user-driven trace attribute changes are + controlled by `layout` attributes: `trace.visible` is + controlled by `layout.legend.uirevision`, + `selectedpoints` is controlled by + `layout.selectionrevision`, and `colorbar.(x|y)` + (accessible with `config: {editable: true}`) is + controlled by `layout.editrevision`. Trace changes are + tracked by `uid`, which only falls back on trace index + if no `uid` is provided. So if your app can add/remove + traces before the end of the `data` array, such that + the same trace has a different index, you can still + preserve user-driven changes if you give each trace a + `uid` that stays with it as it moves. + unselected + :class:`plotly.graph_objects.barpolar.Unselected` + instance or dict with compatible properties + visible + Determines whether or not this trace is visible. If + "legendonly", the trace is not drawn, but can appear as + a legend item (provided that the legend itself is + visible). + width + Sets the bar angular width (in "thetaunit" units). + widthsrc + Sets the source reference on Chart Studio Cloud for + `width`. + row : 'all', int or None (default) + Subplot row index (starting from 1) for the trace to be + added. Only valid if figure was created using + `plotly.tools.make_subplots`.If 'all', addresses all + rows in the specified column(s). + col : 'all', int or None (default) + Subplot col index (starting from 1) for the trace to be + added. Only valid if figure was created using + `plotly.tools.make_subplots`.If 'all', addresses all + columns in the specified row(s). + + Returns + ------- + Figure + """ + from plotly.graph_objs import Barpolar + + new_trace = Barpolar( + base=base, + basesrc=basesrc, + customdata=customdata, + customdatasrc=customdatasrc, + dr=dr, + dtheta=dtheta, + hoverinfo=hoverinfo, + hoverinfosrc=hoverinfosrc, + hoverlabel=hoverlabel, + hovertemplate=hovertemplate, + hovertemplatefallback=hovertemplatefallback, + hovertemplatesrc=hovertemplatesrc, + hovertext=hovertext, + hovertextsrc=hovertextsrc, + ids=ids, + idssrc=idssrc, + legend=legend, + legendgroup=legendgroup, + legendgrouptitle=legendgrouptitle, + legendrank=legendrank, + legendwidth=legendwidth, + marker=marker, + meta=meta, + metasrc=metasrc, + name=name, + offset=offset, + offsetsrc=offsetsrc, + opacity=opacity, + r=r, + r0=r0, + rsrc=rsrc, + selected=selected, + selectedpoints=selectedpoints, + showlegend=showlegend, + stream=stream, + subplot=subplot, + text=text, + textsrc=textsrc, + theta=theta, + theta0=theta0, + thetasrc=thetasrc, + thetaunit=thetaunit, + uid=uid, + uirevision=uirevision, + unselected=unselected, + visible=visible, + width=width, + widthsrc=widthsrc, + **kwargs, + ) + return self.add_trace(new_trace, row=row, col=col) + + def add_box( + self, + alignmentgroup=None, + boxmean=None, + boxpoints=None, + customdata=None, + customdatasrc=None, + dx=None, + dy=None, + fillcolor=None, + hoverinfo=None, + hoverinfosrc=None, + hoverlabel=None, + hoveron=None, + hovertemplate=None, + hovertemplatefallback=None, + hovertemplatesrc=None, + hovertext=None, + hovertextsrc=None, + ids=None, + idssrc=None, + jitter=None, + legend=None, + legendgroup=None, + legendgrouptitle=None, + legendrank=None, + legendwidth=None, + line=None, + lowerfence=None, + lowerfencesrc=None, + marker=None, + mean=None, + meansrc=None, + median=None, + mediansrc=None, + meta=None, + metasrc=None, + name=None, + notched=None, + notchspan=None, + notchspansrc=None, + notchwidth=None, + offsetgroup=None, + opacity=None, + orientation=None, + pointpos=None, + q1=None, + q1src=None, + q3=None, + q3src=None, + quartilemethod=None, + sd=None, + sdmultiple=None, + sdsrc=None, + selected=None, + selectedpoints=None, + showlegend=None, + showwhiskers=None, + sizemode=None, + stream=None, + text=None, + textsrc=None, + uid=None, + uirevision=None, + unselected=None, + upperfence=None, + upperfencesrc=None, + visible=None, + whiskerwidth=None, + width=None, + x=None, + x0=None, + xaxis=None, + xcalendar=None, + xhoverformat=None, + xperiod=None, + xperiod0=None, + xperiodalignment=None, + xsrc=None, + y=None, + y0=None, + yaxis=None, + ycalendar=None, + yhoverformat=None, + yperiod=None, + yperiod0=None, + yperiodalignment=None, + ysrc=None, + zorder=None, + row=None, + col=None, + secondary_y=None, + **kwargs, + ) -> "Figure": + """ + Add a new Box trace + + Each box spans from quartile 1 (Q1) to quartile 3 (Q3). The + second quartile (Q2, i.e. the median) is marked by a line + inside the box. The fences grow outward from the boxes' edges, + by default they span +/- 1.5 times the interquartile range + (IQR: Q3-Q1), The sample mean and standard deviation as well as + notches and the sample, outlier and suspected outliers points + can be optionally added to the box plot. The values and + positions corresponding to each boxes can be input using two + signatures. The first signature expects users to supply the + sample values in the `y` data array for vertical boxes (`x` for + horizontal boxes). By supplying an `x` (`y`) array, one box per + distinct `x` (`y`) value is drawn If no `x` (`y`) list is + provided, a single box is drawn. In this case, the box is + positioned with the trace `name` or with `x0` (`y0`) if + provided. The second signature expects users to supply the + boxes corresponding Q1, median and Q3 statistics in the `q1`, + `median` and `q3` data arrays respectively. Other box features + relying on statistics namely `lowerfence`, `upperfence`, + `notchspan` can be set directly by the users. To have plotly + compute them or to show sample points besides the boxes, users + can set the `y` data array for vertical boxes (`x` for + horizontal boxes) to a 2D array with the outer length + corresponding to the number of boxes in the traces and the + inner length corresponding the sample size. + + Parameters + ---------- + alignmentgroup + Set several traces linked to the same position axis or + matching axes to the same alignmentgroup. This controls + whether bars compute their positional range dependently + or independently. + boxmean + If True, the mean of the box(es)' underlying + distribution is drawn as a dashed line inside the + box(es). If "sd" the standard deviation is also drawn. + Defaults to True when `mean` is set. Defaults to "sd" + when `sd` is set Otherwise defaults to False. + boxpoints + If "outliers", only the sample points lying outside the + whiskers are shown If "suspectedoutliers", the outlier + points are shown and points either less than 4*Q1-3*Q3 + or greater than 4*Q3-3*Q1 are highlighted (see + `outliercolor`) If "all", all sample points are shown + If False, only the box(es) are shown with no sample + points Defaults to "suspectedoutliers" when + `marker.outliercolor` or `marker.line.outliercolor` is + set. Defaults to "all" under the q1/median/q3 + signature. Otherwise defaults to "outliers". + customdata + Assigns extra data each datum. This may be useful when + listening to hover, click and selection events. Note + that, "scatter" traces also appends customdata items in + the markers DOM elements + customdatasrc + Sets the source reference on Chart Studio Cloud for + `customdata`. + dx + Sets the x coordinate step for multi-box traces set + using q1/median/q3. + dy + Sets the y coordinate step for multi-box traces set + using q1/median/q3. + fillcolor + Sets the fill color. Defaults to a half-transparent + variant of the line color, marker color, or marker line + color, whichever is available. + hoverinfo + Determines which trace information appear on hover. If + `none` or `skip` are set, no information is displayed + upon hovering. But, if `none` is set, click and hover + events are still fired. + hoverinfosrc + Sets the source reference on Chart Studio Cloud for + `hoverinfo`. + hoverlabel + :class:`plotly.graph_objects.box.Hoverlabel` instance + or dict with compatible properties + hoveron + Do the hover effects highlight individual boxes or + sample points or both? + hovertemplate + Template string used for rendering the information that + appear on hover box. Note that this will override + `hoverinfo`. Variables are inserted using %{variable}, + for example "y: %{y}" as well as %{xother}, {%_xother}, + {%_xother_}, {%xother_}. When showing info for several + points, "xother" will be added to those with different + x positions from the first point. An underscore before + or after "(x|y)other" will add a space on that side, + only when this field is shown. Numbers are formatted + using d3-format's syntax %{variable:d3-format}, for + example "Price: %{y:$.2f}". + https://github.com/d3/d3-format/tree/v1.4.5#d3-format + for details on the formatting syntax. Dates are + formatted using d3-time-format's syntax + %{variable|d3-time-format}, for example "Day: + %{2019-01-01|%A}". https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format for details on the + date formatting syntax. Variables that can't be found + will be replaced with the specifier. For example, a + template of "data: %{x}, %{y}" will result in a value + of "data: 1, %{y}" if x is 1 and y is missing. + Variables with an undefined value will be replaced with + the fallback value. The variables available in + `hovertemplate` are the ones emitted as event data + described at this link + https://plotly.com/javascript/plotlyjs-events/#event- + data. Additionally, all attributes that can be + specified per-point (the ones that are `arrayOk: true`) + are available. Anything contained in tag `` is + displayed in the secondary box, for example + `%{fullData.name}`. To hide the + secondary box completely, use an empty tag + ``. + hovertemplatefallback + Fallback string that's displayed when a variable + referenced in a template is missing. If the boolean + value 'false' is passed in, the specifier with the + missing variable will be displayed. + hovertemplatesrc + Sets the source reference on Chart Studio Cloud for + `hovertemplate`. + hovertext + Same as `text`. + hovertextsrc + Sets the source reference on Chart Studio Cloud for + `hovertext`. + ids + Assigns id labels to each datum. These ids for object + constancy of data points during animation. Should be an + array of strings, not numbers or any other type. + idssrc + Sets the source reference on Chart Studio Cloud for + `ids`. + jitter + Sets the amount of jitter in the sample points drawn. + If 0, the sample points align along the distribution + axis. If 1, the sample points are drawn in a random + jitter of width equal to the width of the box(es). + legend + Sets the reference to a legend to show this trace in. + References to these legends are "legend", "legend2", + "legend3", etc. Settings for these legends are set in + the layout, under `layout.legend`, `layout.legend2`, + etc. + legendgroup + Sets the legend group for this trace. Traces and shapes + part of the same legend group hide/show at the same + time when toggling legend items. + legendgrouptitle + :class:`plotly.graph_objects.box.Legendgrouptitle` + instance or dict with compatible properties + legendrank + Sets the legend rank for this trace. Items and groups + with smaller ranks are presented on top/left side while + with "reversed" `legend.traceorder` they are on + bottom/right side. The default legendrank is 1000, so + that you can use ranks less than 1000 to place certain + items before all unranked items, and ranks greater than + 1000 to go after all unranked items. When having + unranked or equal rank items shapes would be displayed + after traces i.e. according to their order in data and + layout. + legendwidth + Sets the width (in px or fraction) of the legend for + this trace. + line + :class:`plotly.graph_objects.box.Line` instance or dict + with compatible properties + lowerfence + Sets the lower fence values. There should be as many + items as the number of boxes desired. This attribute + has effect only under the q1/median/q3 signature. If + `lowerfence` is not provided but a sample (in `y` or + `x`) is set, we compute the lower as the last sample + point below 1.5 times the IQR. + lowerfencesrc + Sets the source reference on Chart Studio Cloud for + `lowerfence`. + marker + :class:`plotly.graph_objects.box.Marker` instance or + dict with compatible properties + mean + Sets the mean values. There should be as many items as + the number of boxes desired. This attribute has effect + only under the q1/median/q3 signature. If `mean` is not + provided but a sample (in `y` or `x`) is set, we + compute the mean for each box using the sample values. + meansrc + Sets the source reference on Chart Studio Cloud for + `mean`. + median + Sets the median values. There should be as many items + as the number of boxes desired. + mediansrc + Sets the source reference on Chart Studio Cloud for + `median`. + meta + Assigns extra meta information associated with this + trace that can be used in various text attributes. + Attributes such as trace `name`, graph, axis and + colorbar `title.text`, annotation `text` + `rangeselector`, `updatemenues` and `sliders` `label` + text all support `meta`. To access the trace `meta` + values in an attribute in the same trace, simply use + `%{meta[i]}` where `i` is the index or key of the + `meta` item in question. To access trace `meta` in + layout attributes, use `%{data[n[.meta[i]}` where `i` + is the index or key of the `meta` and `n` is the trace + index. + metasrc + Sets the source reference on Chart Studio Cloud for + `meta`. + name + Sets the trace name. The trace name appears as the + legend item and on hover. For box traces, the name will + also be used for the position coordinate, if `x` and + `x0` (`y` and `y0` if horizontal) are missing and the + position axis is categorical + notched + Determines whether or not notches are drawn. Notches + displays a confidence interval around the median. We + compute the confidence interval as median +/- 1.57 * + IQR / sqrt(N), where IQR is the interquartile range and + N is the sample size. If two boxes' notches do not + overlap there is 95% confidence their medians differ. + See https://sites.google.com/site/davidsstatistics/home + /notched-box-plots for more info. Defaults to False + unless `notchwidth` or `notchspan` is set. + notchspan + Sets the notch span from the boxes' `median` values. + There should be as many items as the number of boxes + desired. This attribute has effect only under the + q1/median/q3 signature. If `notchspan` is not provided + but a sample (in `y` or `x`) is set, we compute it as + 1.57 * IQR / sqrt(N), where N is the sample size. + notchspansrc + Sets the source reference on Chart Studio Cloud for + `notchspan`. + notchwidth + Sets the width of the notches relative to the box + width. For example, with 0, the notches are as wide as + the box(es). + offsetgroup + Set several traces linked to the same position axis or + matching axes to the same offsetgroup where bars of the + same position coordinate will line up. + opacity + Sets the opacity of the trace. + orientation + Sets the orientation of the box(es). If "v" ("h"), the + distribution is visualized along the vertical + (horizontal). + pointpos + Sets the position of the sample points in relation to + the box(es). If 0, the sample points are places over + the center of the box(es). Positive (negative) values + correspond to positions to the right (left) for + vertical boxes and above (below) for horizontal boxes + q1 + Sets the Quartile 1 values. There should be as many + items as the number of boxes desired. + q1src + Sets the source reference on Chart Studio Cloud for + `q1`. + q3 + Sets the Quartile 3 values. There should be as many + items as the number of boxes desired. + q3src + Sets the source reference on Chart Studio Cloud for + `q3`. + quartilemethod + Sets the method used to compute the sample's Q1 and Q3 + quartiles. The "linear" method uses the 25th percentile + for Q1 and 75th percentile for Q3 as computed using + method #10 (listed on + http://jse.amstat.org/v14n3/langford.html). The + "exclusive" method uses the median to divide the + ordered dataset into two halves if the sample is odd, + it does not include the median in either half - Q1 is + then the median of the lower half and Q3 the median of + the upper half. The "inclusive" method also uses the + median to divide the ordered dataset into two halves + but if the sample is odd, it includes the median in + both halves - Q1 is then the median of the lower half + and Q3 the median of the upper half. + sd + Sets the standard deviation values. There should be as + many items as the number of boxes desired. This + attribute has effect only under the q1/median/q3 + signature. If `sd` is not provided but a sample (in `y` + or `x`) is set, we compute the standard deviation for + each box using the sample values. + sdmultiple + Scales the box size when sizemode=sd Allowing boxes to + be drawn across any stddev range For example 1-stddev, + 3-stddev, 5-stddev + sdsrc + Sets the source reference on Chart Studio Cloud for + `sd`. + selected + :class:`plotly.graph_objects.box.Selected` instance or + dict with compatible properties + selectedpoints + Array containing integer indices of selected points. + Has an effect only for traces that support selections. + Note that an empty array means an empty selection where + the `unselected` are turned on for all points, whereas, + any other non-array values means no selection all where + the `selected` and `unselected` styles have no effect. + showlegend + Determines whether or not an item corresponding to this + trace is shown in the legend. + showwhiskers + Determines whether or not whiskers are visible. + Defaults to true for `sizemode` "quartiles", false for + "sd". + sizemode + Sets the upper and lower bound for the boxes quartiles + means box is drawn between Q1 and Q3 SD means the box + is drawn between Mean +- Standard Deviation Argument + sdmultiple (default 1) to scale the box size So it + could be drawn 1-stddev, 3-stddev etc + stream + :class:`plotly.graph_objects.box.Stream` instance or + dict with compatible properties + text + Sets the text elements associated with each sample + value. If a single string, the same string appears over + all the data points. If an array of string, the items + are mapped in order to the this trace's (x,y) + coordinates. To be seen, trace `hoverinfo` must contain + a "text" flag. + textsrc + Sets the source reference on Chart Studio Cloud for + `text`. + uid + Assign an id to this trace, Use this to provide object + constancy between traces during animations and + transitions. + uirevision + Controls persistence of some user-driven changes to the + trace: `constraintrange` in `parcoords` traces, as well + as some `editable: true` modifications such as `name` + and `colorbar.title`. Defaults to `layout.uirevision`. + Note that other user-driven trace attribute changes are + controlled by `layout` attributes: `trace.visible` is + controlled by `layout.legend.uirevision`, + `selectedpoints` is controlled by + `layout.selectionrevision`, and `colorbar.(x|y)` + (accessible with `config: {editable: true}`) is + controlled by `layout.editrevision`. Trace changes are + tracked by `uid`, which only falls back on trace index + if no `uid` is provided. So if your app can add/remove + traces before the end of the `data` array, such that + the same trace has a different index, you can still + preserve user-driven changes if you give each trace a + `uid` that stays with it as it moves. + unselected + :class:`plotly.graph_objects.box.Unselected` instance + or dict with compatible properties + upperfence + Sets the upper fence values. There should be as many + items as the number of boxes desired. This attribute + has effect only under the q1/median/q3 signature. If + `upperfence` is not provided but a sample (in `y` or + `x`) is set, we compute the upper as the last sample + point above 1.5 times the IQR. + upperfencesrc + Sets the source reference on Chart Studio Cloud for + `upperfence`. + visible + Determines whether or not this trace is visible. If + "legendonly", the trace is not drawn, but can appear as + a legend item (provided that the legend itself is + visible). + whiskerwidth + Sets the width of the whiskers relative to the box + width. For example, with 1, the whiskers are as wide as + the box(es). + width + Sets the width of the box in data coordinate If 0 + (default value) the width is automatically selected + based on the positions of other box traces in the same + subplot. + x + Sets the x sample data or coordinates. See overview for + more info. + x0 + Sets the x coordinate for single-box traces or the + starting coordinate for multi-box traces set using + q1/median/q3. See overview for more info. + xaxis + Sets a reference between this trace's x coordinates and + a 2D cartesian x axis. If "x" (the default value), the + x coordinates refer to `layout.xaxis`. If "x2", the x + coordinates refer to `layout.xaxis2`, and so on. + xcalendar + Sets the calendar system to use with `x` date data. + xhoverformat + Sets the hover text formatting rulefor `x` using d3 + formatting mini-languages which are very similar to + those in Python. For numbers, see: + https://github.com/d3/d3-format/tree/v1.4.5#d3-format. + And for dates see: https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format. We add two items to + d3's date formatter: "%h" for half of the year as a + decimal number as well as "%{n}f" for fractional + seconds with n digits. For example, *2016-10-13 + 09:15:23.456* with tickformat "%H~%M~%S.%2f" would + display *09~15~23.46*By default the values are + formatted using `xaxis.hoverformat`. + xperiod + Only relevant when the axis `type` is "date". Sets the + period positioning in milliseconds or "M" on the x + axis. Special values in the form of "M" could be + used to declare the number of months. In this case `n` + must be a positive integer. + xperiod0 + Only relevant when the axis `type` is "date". Sets the + base for period positioning in milliseconds or date + string on the x0 axis. When `x0period` is round number + of weeks, the `x0period0` by default would be on a + Sunday i.e. 2000-01-02, otherwise it would be at + 2000-01-01. + xperiodalignment + Only relevant when the axis `type` is "date". Sets the + alignment of data points on the x axis. + xsrc + Sets the source reference on Chart Studio Cloud for + `x`. + y + Sets the y sample data or coordinates. See overview for + more info. + y0 + Sets the y coordinate for single-box traces or the + starting coordinate for multi-box traces set using + q1/median/q3. See overview for more info. + yaxis + Sets a reference between this trace's y coordinates and + a 2D cartesian y axis. If "y" (the default value), the + y coordinates refer to `layout.yaxis`. If "y2", the y + coordinates refer to `layout.yaxis2`, and so on. + ycalendar + Sets the calendar system to use with `y` date data. + yhoverformat + Sets the hover text formatting rulefor `y` using d3 + formatting mini-languages which are very similar to + those in Python. For numbers, see: + https://github.com/d3/d3-format/tree/v1.4.5#d3-format. + And for dates see: https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format. We add two items to + d3's date formatter: "%h" for half of the year as a + decimal number as well as "%{n}f" for fractional + seconds with n digits. For example, *2016-10-13 + 09:15:23.456* with tickformat "%H~%M~%S.%2f" would + display *09~15~23.46*By default the values are + formatted using `yaxis.hoverformat`. + yperiod + Only relevant when the axis `type` is "date". Sets the + period positioning in milliseconds or "M" on the y + axis. Special values in the form of "M" could be + used to declare the number of months. In this case `n` + must be a positive integer. + yperiod0 + Only relevant when the axis `type` is "date". Sets the + base for period positioning in milliseconds or date + string on the y0 axis. When `y0period` is round number + of weeks, the `y0period0` by default would be on a + Sunday i.e. 2000-01-02, otherwise it would be at + 2000-01-01. + yperiodalignment + Only relevant when the axis `type` is "date". Sets the + alignment of data points on the y axis. + ysrc + Sets the source reference on Chart Studio Cloud for + `y`. + zorder + Sets the layer on which this trace is displayed, + relative to other SVG traces on the same subplot. SVG + traces with higher `zorder` appear in front of those + with lower `zorder`. + row : 'all', int or None (default) + Subplot row index (starting from 1) for the trace to be + added. Only valid if figure was created using + `plotly.tools.make_subplots`.If 'all', addresses all + rows in the specified column(s). + col : 'all', int or None (default) + Subplot col index (starting from 1) for the trace to be + added. Only valid if figure was created using + `plotly.tools.make_subplots`.If 'all', addresses all + columns in the specified row(s). + secondary_y: boolean or None (default None) + If True, associate this trace with the secondary y-axis of the + subplot at the specified row and col. Only valid if all of the + following conditions are satisfied: + * The figure was created using `plotly.subplots.make_subplots`. + * The row and col arguments are not None + * The subplot at the specified row and col has type xy + (which is the default) and secondary_y True. These + properties are specified in the specs argument to + make_subplots. See the make_subplots docstring for more info. + + Returns + ------- + Figure + """ + from plotly.graph_objs import Box + + new_trace = Box( + alignmentgroup=alignmentgroup, + boxmean=boxmean, + boxpoints=boxpoints, + customdata=customdata, + customdatasrc=customdatasrc, + dx=dx, + dy=dy, + fillcolor=fillcolor, + hoverinfo=hoverinfo, + hoverinfosrc=hoverinfosrc, + hoverlabel=hoverlabel, + hoveron=hoveron, + hovertemplate=hovertemplate, + hovertemplatefallback=hovertemplatefallback, + hovertemplatesrc=hovertemplatesrc, + hovertext=hovertext, + hovertextsrc=hovertextsrc, + ids=ids, + idssrc=idssrc, + jitter=jitter, + legend=legend, + legendgroup=legendgroup, + legendgrouptitle=legendgrouptitle, + legendrank=legendrank, + legendwidth=legendwidth, + line=line, + lowerfence=lowerfence, + lowerfencesrc=lowerfencesrc, + marker=marker, + mean=mean, + meansrc=meansrc, + median=median, + mediansrc=mediansrc, + meta=meta, + metasrc=metasrc, + name=name, + notched=notched, + notchspan=notchspan, + notchspansrc=notchspansrc, + notchwidth=notchwidth, + offsetgroup=offsetgroup, + opacity=opacity, + orientation=orientation, + pointpos=pointpos, + q1=q1, + q1src=q1src, + q3=q3, + q3src=q3src, + quartilemethod=quartilemethod, + sd=sd, + sdmultiple=sdmultiple, + sdsrc=sdsrc, + selected=selected, + selectedpoints=selectedpoints, + showlegend=showlegend, + showwhiskers=showwhiskers, + sizemode=sizemode, + stream=stream, + text=text, + textsrc=textsrc, + uid=uid, + uirevision=uirevision, + unselected=unselected, + upperfence=upperfence, + upperfencesrc=upperfencesrc, + visible=visible, + whiskerwidth=whiskerwidth, + width=width, + x=x, + x0=x0, + xaxis=xaxis, + xcalendar=xcalendar, + xhoverformat=xhoverformat, + xperiod=xperiod, + xperiod0=xperiod0, + xperiodalignment=xperiodalignment, + xsrc=xsrc, + y=y, + y0=y0, + yaxis=yaxis, + ycalendar=ycalendar, + yhoverformat=yhoverformat, + yperiod=yperiod, + yperiod0=yperiod0, + yperiodalignment=yperiodalignment, + ysrc=ysrc, + zorder=zorder, + **kwargs, + ) + return self.add_trace(new_trace, row=row, col=col, secondary_y=secondary_y) + + def add_candlestick( + self, + close=None, + closesrc=None, + customdata=None, + customdatasrc=None, + decreasing=None, + high=None, + highsrc=None, + hoverinfo=None, + hoverinfosrc=None, + hoverlabel=None, + hovertemplate=None, + hovertemplatefallback=None, + hovertemplatesrc=None, + hovertext=None, + hovertextsrc=None, + ids=None, + idssrc=None, + increasing=None, + legend=None, + legendgroup=None, + legendgrouptitle=None, + legendrank=None, + legendwidth=None, + line=None, + low=None, + lowsrc=None, + meta=None, + metasrc=None, + name=None, + opacity=None, + open=None, + opensrc=None, + selectedpoints=None, + showlegend=None, + stream=None, + text=None, + textsrc=None, + uid=None, + uirevision=None, + visible=None, + whiskerwidth=None, + x=None, + xaxis=None, + xcalendar=None, + xhoverformat=None, + xperiod=None, + xperiod0=None, + xperiodalignment=None, + xsrc=None, + yaxis=None, + yhoverformat=None, + zorder=None, + row=None, + col=None, + secondary_y=None, + **kwargs, + ) -> "Figure": + """ + Add a new Candlestick trace + + The candlestick is a style of financial chart describing open, + high, low and close for a given `x` coordinate (most likely + time). The boxes represent the spread between the `open` and + `close` values and the lines represent the spread between the + `low` and `high` values Sample points where the close value is + higher (lower) then the open value are called increasing + (decreasing). By default, increasing candles are drawn in green + whereas decreasing are drawn in red. + + Parameters + ---------- + close + Sets the close values. + closesrc + Sets the source reference on Chart Studio Cloud for + `close`. + customdata + Assigns extra data each datum. This may be useful when + listening to hover, click and selection events. Note + that, "scatter" traces also appends customdata items in + the markers DOM elements + customdatasrc + Sets the source reference on Chart Studio Cloud for + `customdata`. + decreasing + :class:`plotly.graph_objects.candlestick.Decreasing` + instance or dict with compatible properties + high + Sets the high values. + highsrc + Sets the source reference on Chart Studio Cloud for + `high`. + hoverinfo + Determines which trace information appear on hover. If + `none` or `skip` are set, no information is displayed + upon hovering. But, if `none` is set, click and hover + events are still fired. + hoverinfosrc + Sets the source reference on Chart Studio Cloud for + `hoverinfo`. + hoverlabel + :class:`plotly.graph_objects.candlestick.Hoverlabel` + instance or dict with compatible properties + hovertemplate + Template string used for rendering the information that + appear on hover box. Note that this will override + `hoverinfo`. Variables are inserted using %{variable}, + for example "y: %{y}" as well as %{xother}, {%_xother}, + {%_xother_}, {%xother_}. When showing info for several + points, "xother" will be added to those with different + x positions from the first point. An underscore before + or after "(x|y)other" will add a space on that side, + only when this field is shown. Numbers are formatted + using d3-format's syntax %{variable:d3-format}, for + example "Price: %{y:$.2f}". + https://github.com/d3/d3-format/tree/v1.4.5#d3-format + for details on the formatting syntax. Dates are + formatted using d3-time-format's syntax + %{variable|d3-time-format}, for example "Day: + %{2019-01-01|%A}". https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format for details on the + date formatting syntax. Variables that can't be found + will be replaced with the specifier. For example, a + template of "data: %{x}, %{y}" will result in a value + of "data: 1, %{y}" if x is 1 and y is missing. + Variables with an undefined value will be replaced with + the fallback value. The variables available in + `hovertemplate` are the ones emitted as event data + described at this link + https://plotly.com/javascript/plotlyjs-events/#event- + data. Additionally, all attributes that can be + specified per-point (the ones that are `arrayOk: true`) + are available. Finally, the template string has access + to variables `open`, `high`, `low` and `close`. + Anything contained in tag `` is displayed in the + secondary box, for example + `%{fullData.name}`. To hide the + secondary box completely, use an empty tag + ``. + hovertemplatefallback + Fallback string that's displayed when a variable + referenced in a template is missing. If the boolean + value 'false' is passed in, the specifier with the + missing variable will be displayed. + hovertemplatesrc + Sets the source reference on Chart Studio Cloud for + `hovertemplate`. + hovertext + Same as `text`. + hovertextsrc + Sets the source reference on Chart Studio Cloud for + `hovertext`. + ids + Assigns id labels to each datum. These ids for object + constancy of data points during animation. Should be an + array of strings, not numbers or any other type. + idssrc + Sets the source reference on Chart Studio Cloud for + `ids`. + increasing + :class:`plotly.graph_objects.candlestick.Increasing` + instance or dict with compatible properties + legend + Sets the reference to a legend to show this trace in. + References to these legends are "legend", "legend2", + "legend3", etc. Settings for these legends are set in + the layout, under `layout.legend`, `layout.legend2`, + etc. + legendgroup + Sets the legend group for this trace. Traces and shapes + part of the same legend group hide/show at the same + time when toggling legend items. + legendgrouptitle + :class:`plotly.graph_objects.candlestick.Legendgrouptit + le` instance or dict with compatible properties + legendrank + Sets the legend rank for this trace. Items and groups + with smaller ranks are presented on top/left side while + with "reversed" `legend.traceorder` they are on + bottom/right side. The default legendrank is 1000, so + that you can use ranks less than 1000 to place certain + items before all unranked items, and ranks greater than + 1000 to go after all unranked items. When having + unranked or equal rank items shapes would be displayed + after traces i.e. according to their order in data and + layout. + legendwidth + Sets the width (in px or fraction) of the legend for + this trace. + line + :class:`plotly.graph_objects.candlestick.Line` instance + or dict with compatible properties + low + Sets the low values. + lowsrc + Sets the source reference on Chart Studio Cloud for + `low`. + meta + Assigns extra meta information associated with this + trace that can be used in various text attributes. + Attributes such as trace `name`, graph, axis and + colorbar `title.text`, annotation `text` + `rangeselector`, `updatemenues` and `sliders` `label` + text all support `meta`. To access the trace `meta` + values in an attribute in the same trace, simply use + `%{meta[i]}` where `i` is the index or key of the + `meta` item in question. To access trace `meta` in + layout attributes, use `%{data[n[.meta[i]}` where `i` + is the index or key of the `meta` and `n` is the trace + index. + metasrc + Sets the source reference on Chart Studio Cloud for + `meta`. + name + Sets the trace name. The trace name appears as the + legend item and on hover. + opacity + Sets the opacity of the trace. + open + Sets the open values. + opensrc + Sets the source reference on Chart Studio Cloud for + `open`. + selectedpoints + Array containing integer indices of selected points. + Has an effect only for traces that support selections. + Note that an empty array means an empty selection where + the `unselected` are turned on for all points, whereas, + any other non-array values means no selection all where + the `selected` and `unselected` styles have no effect. + showlegend + Determines whether or not an item corresponding to this + trace is shown in the legend. + stream + :class:`plotly.graph_objects.candlestick.Stream` + instance or dict with compatible properties + text + Sets hover text elements associated with each sample + point. If a single string, the same string appears over + all the data points. If an array of string, the items + are mapped in order to this trace's sample points. + textsrc + Sets the source reference on Chart Studio Cloud for + `text`. + uid + Assign an id to this trace, Use this to provide object + constancy between traces during animations and + transitions. + uirevision + Controls persistence of some user-driven changes to the + trace: `constraintrange` in `parcoords` traces, as well + as some `editable: true` modifications such as `name` + and `colorbar.title`. Defaults to `layout.uirevision`. + Note that other user-driven trace attribute changes are + controlled by `layout` attributes: `trace.visible` is + controlled by `layout.legend.uirevision`, + `selectedpoints` is controlled by + `layout.selectionrevision`, and `colorbar.(x|y)` + (accessible with `config: {editable: true}`) is + controlled by `layout.editrevision`. Trace changes are + tracked by `uid`, which only falls back on trace index + if no `uid` is provided. So if your app can add/remove + traces before the end of the `data` array, such that + the same trace has a different index, you can still + preserve user-driven changes if you give each trace a + `uid` that stays with it as it moves. + visible + Determines whether or not this trace is visible. If + "legendonly", the trace is not drawn, but can appear as + a legend item (provided that the legend itself is + visible). + whiskerwidth + Sets the width of the whiskers relative to the box + width. For example, with 1, the whiskers are as wide as + the box(es). + x + Sets the x coordinates. If absent, linear coordinate + will be generated. + xaxis + Sets a reference between this trace's x coordinates and + a 2D cartesian x axis. If "x" (the default value), the + x coordinates refer to `layout.xaxis`. If "x2", the x + coordinates refer to `layout.xaxis2`, and so on. + xcalendar + Sets the calendar system to use with `x` date data. + xhoverformat + Sets the hover text formatting rulefor `x` using d3 + formatting mini-languages which are very similar to + those in Python. For numbers, see: + https://github.com/d3/d3-format/tree/v1.4.5#d3-format. + And for dates see: https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format. We add two items to + d3's date formatter: "%h" for half of the year as a + decimal number as well as "%{n}f" for fractional + seconds with n digits. For example, *2016-10-13 + 09:15:23.456* with tickformat "%H~%M~%S.%2f" would + display *09~15~23.46*By default the values are + formatted using `xaxis.hoverformat`. + xperiod + Only relevant when the axis `type` is "date". Sets the + period positioning in milliseconds or "M" on the x + axis. Special values in the form of "M" could be + used to declare the number of months. In this case `n` + must be a positive integer. + xperiod0 + Only relevant when the axis `type` is "date". Sets the + base for period positioning in milliseconds or date + string on the x0 axis. When `x0period` is round number + of weeks, the `x0period0` by default would be on a + Sunday i.e. 2000-01-02, otherwise it would be at + 2000-01-01. + xperiodalignment + Only relevant when the axis `type` is "date". Sets the + alignment of data points on the x axis. + xsrc + Sets the source reference on Chart Studio Cloud for + `x`. + yaxis + Sets a reference between this trace's y coordinates and + a 2D cartesian y axis. If "y" (the default value), the + y coordinates refer to `layout.yaxis`. If "y2", the y + coordinates refer to `layout.yaxis2`, and so on. + yhoverformat + Sets the hover text formatting rulefor `y` using d3 + formatting mini-languages which are very similar to + those in Python. For numbers, see: + https://github.com/d3/d3-format/tree/v1.4.5#d3-format. + And for dates see: https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format. We add two items to + d3's date formatter: "%h" for half of the year as a + decimal number as well as "%{n}f" for fractional + seconds with n digits. For example, *2016-10-13 + 09:15:23.456* with tickformat "%H~%M~%S.%2f" would + display *09~15~23.46*By default the values are + formatted using `yaxis.hoverformat`. + zorder + Sets the layer on which this trace is displayed, + relative to other SVG traces on the same subplot. SVG + traces with higher `zorder` appear in front of those + with lower `zorder`. + row : 'all', int or None (default) + Subplot row index (starting from 1) for the trace to be + added. Only valid if figure was created using + `plotly.tools.make_subplots`.If 'all', addresses all + rows in the specified column(s). + col : 'all', int or None (default) + Subplot col index (starting from 1) for the trace to be + added. Only valid if figure was created using + `plotly.tools.make_subplots`.If 'all', addresses all + columns in the specified row(s). + secondary_y: boolean or None (default None) + If True, associate this trace with the secondary y-axis of the + subplot at the specified row and col. Only valid if all of the + following conditions are satisfied: + * The figure was created using `plotly.subplots.make_subplots`. + * The row and col arguments are not None + * The subplot at the specified row and col has type xy + (which is the default) and secondary_y True. These + properties are specified in the specs argument to + make_subplots. See the make_subplots docstring for more info. + + Returns + ------- + Figure + """ + from plotly.graph_objs import Candlestick + + new_trace = Candlestick( + close=close, + closesrc=closesrc, + customdata=customdata, + customdatasrc=customdatasrc, + decreasing=decreasing, + high=high, + highsrc=highsrc, + hoverinfo=hoverinfo, + hoverinfosrc=hoverinfosrc, + hoverlabel=hoverlabel, + hovertemplate=hovertemplate, + hovertemplatefallback=hovertemplatefallback, + hovertemplatesrc=hovertemplatesrc, + hovertext=hovertext, + hovertextsrc=hovertextsrc, + ids=ids, + idssrc=idssrc, + increasing=increasing, + legend=legend, + legendgroup=legendgroup, + legendgrouptitle=legendgrouptitle, + legendrank=legendrank, + legendwidth=legendwidth, + line=line, + low=low, + lowsrc=lowsrc, + meta=meta, + metasrc=metasrc, + name=name, + opacity=opacity, + open=open, + opensrc=opensrc, + selectedpoints=selectedpoints, + showlegend=showlegend, + stream=stream, + text=text, + textsrc=textsrc, + uid=uid, + uirevision=uirevision, + visible=visible, + whiskerwidth=whiskerwidth, + x=x, + xaxis=xaxis, + xcalendar=xcalendar, + xhoverformat=xhoverformat, + xperiod=xperiod, + xperiod0=xperiod0, + xperiodalignment=xperiodalignment, + xsrc=xsrc, + yaxis=yaxis, + yhoverformat=yhoverformat, + zorder=zorder, + **kwargs, + ) + return self.add_trace(new_trace, row=row, col=col, secondary_y=secondary_y) + + def add_carpet( + self, + a=None, + a0=None, + aaxis=None, + asrc=None, + b=None, + b0=None, + baxis=None, + bsrc=None, + carpet=None, + cheaterslope=None, + color=None, + customdata=None, + customdatasrc=None, + da=None, + db=None, + font=None, + ids=None, + idssrc=None, + legend=None, + legendgrouptitle=None, + legendrank=None, + legendwidth=None, + meta=None, + metasrc=None, + name=None, + opacity=None, + stream=None, + uid=None, + uirevision=None, + visible=None, + x=None, + xaxis=None, + xsrc=None, + y=None, + yaxis=None, + ysrc=None, + zorder=None, + row=None, + col=None, + secondary_y=None, + **kwargs, + ) -> "Figure": + """ + Add a new Carpet trace + + The data describing carpet axis layout is set in `y` and + (optionally) also `x`. If only `y` is present, `x` the plot is + interpreted as a cheater plot and is filled in using the `y` + values. `x` and `y` may either be 2D arrays matching with each + dimension matching that of `a` and `b`, or they may be 1D + arrays with total length equal to that of `a` and `b`. + + Parameters + ---------- + a + An array containing values of the first parameter value + a0 + Alternate to `a`. Builds a linear space of a + coordinates. Use with `da` where `a0` is the starting + coordinate and `da` the step. + aaxis + :class:`plotly.graph_objects.carpet.Aaxis` instance or + dict with compatible properties + asrc + Sets the source reference on Chart Studio Cloud for + `a`. + b + A two dimensional array of y coordinates at each carpet + point. + b0 + Alternate to `b`. Builds a linear space of a + coordinates. Use with `db` where `b0` is the starting + coordinate and `db` the step. + baxis + :class:`plotly.graph_objects.carpet.Baxis` instance or + dict with compatible properties + bsrc + Sets the source reference on Chart Studio Cloud for + `b`. + carpet + An identifier for this carpet, so that `scattercarpet` + and `contourcarpet` traces can specify a carpet plot on + which they lie + cheaterslope + The shift applied to each successive row of data in + creating a cheater plot. Only used if `x` is been + omitted. + color + Sets default for all colors associated with this axis + all at once: line, font, tick, and grid colors. Grid + color is lightened by blending this with the plot + background Individual pieces can override this. + customdata + Assigns extra data each datum. This may be useful when + listening to hover, click and selection events. Note + that, "scatter" traces also appends customdata items in + the markers DOM elements + customdatasrc + Sets the source reference on Chart Studio Cloud for + `customdata`. + da + Sets the a coordinate step. See `a0` for more info. + db + Sets the b coordinate step. See `b0` for more info. + font + The default font used for axis & tick labels on this + carpet + ids + Assigns id labels to each datum. These ids for object + constancy of data points during animation. Should be an + array of strings, not numbers or any other type. + idssrc + Sets the source reference on Chart Studio Cloud for + `ids`. + legend + Sets the reference to a legend to show this trace in. + References to these legends are "legend", "legend2", + "legend3", etc. Settings for these legends are set in + the layout, under `layout.legend`, `layout.legend2`, + etc. + legendgrouptitle + :class:`plotly.graph_objects.carpet.Legendgrouptitle` + instance or dict with compatible properties + legendrank + Sets the legend rank for this trace. Items and groups + with smaller ranks are presented on top/left side while + with "reversed" `legend.traceorder` they are on + bottom/right side. The default legendrank is 1000, so + that you can use ranks less than 1000 to place certain + items before all unranked items, and ranks greater than + 1000 to go after all unranked items. When having + unranked or equal rank items shapes would be displayed + after traces i.e. according to their order in data and + layout. + legendwidth + Sets the width (in px or fraction) of the legend for + this trace. + meta + Assigns extra meta information associated with this + trace that can be used in various text attributes. + Attributes such as trace `name`, graph, axis and + colorbar `title.text`, annotation `text` + `rangeselector`, `updatemenues` and `sliders` `label` + text all support `meta`. To access the trace `meta` + values in an attribute in the same trace, simply use + `%{meta[i]}` where `i` is the index or key of the + `meta` item in question. To access trace `meta` in + layout attributes, use `%{data[n[.meta[i]}` where `i` + is the index or key of the `meta` and `n` is the trace + index. + metasrc + Sets the source reference on Chart Studio Cloud for + `meta`. + name + Sets the trace name. The trace name appears as the + legend item and on hover. + opacity + Sets the opacity of the trace. + stream + :class:`plotly.graph_objects.carpet.Stream` instance or + dict with compatible properties + uid + Assign an id to this trace, Use this to provide object + constancy between traces during animations and + transitions. + uirevision + Controls persistence of some user-driven changes to the + trace: `constraintrange` in `parcoords` traces, as well + as some `editable: true` modifications such as `name` + and `colorbar.title`. Defaults to `layout.uirevision`. + Note that other user-driven trace attribute changes are + controlled by `layout` attributes: `trace.visible` is + controlled by `layout.legend.uirevision`, + `selectedpoints` is controlled by + `layout.selectionrevision`, and `colorbar.(x|y)` + (accessible with `config: {editable: true}`) is + controlled by `layout.editrevision`. Trace changes are + tracked by `uid`, which only falls back on trace index + if no `uid` is provided. So if your app can add/remove + traces before the end of the `data` array, such that + the same trace has a different index, you can still + preserve user-driven changes if you give each trace a + `uid` that stays with it as it moves. + visible + Determines whether or not this trace is visible. If + "legendonly", the trace is not drawn, but can appear as + a legend item (provided that the legend itself is + visible). + x + A two dimensional array of x coordinates at each carpet + point. If omitted, the plot is a cheater plot and the + xaxis is hidden by default. + xaxis + Sets a reference between this trace's x coordinates and + a 2D cartesian x axis. If "x" (the default value), the + x coordinates refer to `layout.xaxis`. If "x2", the x + coordinates refer to `layout.xaxis2`, and so on. + xsrc + Sets the source reference on Chart Studio Cloud for + `x`. + y + A two dimensional array of y coordinates at each carpet + point. + yaxis + Sets a reference between this trace's y coordinates and + a 2D cartesian y axis. If "y" (the default value), the + y coordinates refer to `layout.yaxis`. If "y2", the y + coordinates refer to `layout.yaxis2`, and so on. + ysrc + Sets the source reference on Chart Studio Cloud for + `y`. + zorder + Sets the layer on which this trace is displayed, + relative to other SVG traces on the same subplot. SVG + traces with higher `zorder` appear in front of those + with lower `zorder`. + row : 'all', int or None (default) + Subplot row index (starting from 1) for the trace to be + added. Only valid if figure was created using + `plotly.tools.make_subplots`.If 'all', addresses all + rows in the specified column(s). + col : 'all', int or None (default) + Subplot col index (starting from 1) for the trace to be + added. Only valid if figure was created using + `plotly.tools.make_subplots`.If 'all', addresses all + columns in the specified row(s). + secondary_y: boolean or None (default None) + If True, associate this trace with the secondary y-axis of the + subplot at the specified row and col. Only valid if all of the + following conditions are satisfied: + * The figure was created using `plotly.subplots.make_subplots`. + * The row and col arguments are not None + * The subplot at the specified row and col has type xy + (which is the default) and secondary_y True. These + properties are specified in the specs argument to + make_subplots. See the make_subplots docstring for more info. + + Returns + ------- + Figure + """ + from plotly.graph_objs import Carpet + + new_trace = Carpet( + a=a, + a0=a0, + aaxis=aaxis, + asrc=asrc, + b=b, + b0=b0, + baxis=baxis, + bsrc=bsrc, + carpet=carpet, + cheaterslope=cheaterslope, + color=color, + customdata=customdata, + customdatasrc=customdatasrc, + da=da, + db=db, + font=font, + ids=ids, + idssrc=idssrc, + legend=legend, + legendgrouptitle=legendgrouptitle, + legendrank=legendrank, + legendwidth=legendwidth, + meta=meta, + metasrc=metasrc, + name=name, + opacity=opacity, + stream=stream, + uid=uid, + uirevision=uirevision, + visible=visible, + x=x, + xaxis=xaxis, + xsrc=xsrc, + y=y, + yaxis=yaxis, + ysrc=ysrc, + zorder=zorder, + **kwargs, + ) + return self.add_trace(new_trace, row=row, col=col, secondary_y=secondary_y) + + def add_choropleth( + self, + autocolorscale=None, + coloraxis=None, + colorbar=None, + colorscale=None, + customdata=None, + customdatasrc=None, + featureidkey=None, + geo=None, + geojson=None, + hoverinfo=None, + hoverinfosrc=None, + hoverlabel=None, + hovertemplate=None, + hovertemplatefallback=None, + hovertemplatesrc=None, + hovertext=None, + hovertextsrc=None, + ids=None, + idssrc=None, + legend=None, + legendgroup=None, + legendgrouptitle=None, + legendrank=None, + legendwidth=None, + locationmode=None, + locations=None, + locationssrc=None, + marker=None, + meta=None, + metasrc=None, + name=None, + reversescale=None, + selected=None, + selectedpoints=None, + showlegend=None, + showscale=None, + stream=None, + text=None, + textsrc=None, + uid=None, + uirevision=None, + unselected=None, + visible=None, + z=None, + zauto=None, + zmax=None, + zmid=None, + zmin=None, + zsrc=None, + row=None, + col=None, + **kwargs, + ) -> "Figure": + """ + Add a new Choropleth trace + + The data that describes the choropleth value-to-color mapping + is set in `z`. The geographic locations corresponding to each + value in `z` are set in `locations`. + + Parameters + ---------- + autocolorscale + Determines whether the colorscale is a default palette + (`autocolorscale: true`) or the palette determined by + `colorscale`. In case `colorscale` is unspecified or + `autocolorscale` is true, the default palette will be + chosen according to whether numbers in the `color` + array are all positive, all negative or mixed. + coloraxis + Sets a reference to a shared color axis. References to + these shared color axes are "coloraxis", "coloraxis2", + "coloraxis3", etc. Settings for these shared color axes + are set in the layout, under `layout.coloraxis`, + `layout.coloraxis2`, etc. Note that multiple color + scales can be linked to the same color axis. + colorbar + :class:`plotly.graph_objects.choropleth.ColorBar` + instance or dict with compatible properties + colorscale + Sets the colorscale. The colorscale must be an array + containing arrays mapping a normalized value to an rgb, + rgba, hex, hsl, hsv, or named color string. At minimum, + a mapping for the lowest (0) and highest (1) values are + required. For example, `[[0, 'rgb(0,0,255)'], [1, + 'rgb(255,0,0)']]`. To control the bounds of the + colorscale in color space, use `zmin` and `zmax`. + Alternatively, `colorscale` may be a palette name + string of the following list: Blackbody,Bluered,Blues,C + ividis,Earth,Electric,Greens,Greys,Hot,Jet,Picnic,Portl + and,Rainbow,RdBu,Reds,Viridis,YlGnBu,YlOrRd. + customdata + Assigns extra data each datum. This may be useful when + listening to hover, click and selection events. Note + that, "scatter" traces also appends customdata items in + the markers DOM elements + customdatasrc + Sets the source reference on Chart Studio Cloud for + `customdata`. + featureidkey + Sets the key in GeoJSON features which is used as id to + match the items included in the `locations` array. Only + has an effect when `geojson` is set. Support nested + property, for example "properties.name". + geo + Sets a reference between this trace's geospatial + coordinates and a geographic map. If "geo" (the default + value), the geospatial coordinates refer to + `layout.geo`. If "geo2", the geospatial coordinates + refer to `layout.geo2`, and so on. + geojson + Sets optional GeoJSON data associated with this trace. + If not given, the features on the base map are used. It + can be set as a valid GeoJSON object or as a URL + string. Note that we only accept GeoJSONs of type + "FeatureCollection" or "Feature" with geometries of + type "Polygon" or "MultiPolygon". + hoverinfo + Determines which trace information appear on hover. If + `none` or `skip` are set, no information is displayed + upon hovering. But, if `none` is set, click and hover + events are still fired. + hoverinfosrc + Sets the source reference on Chart Studio Cloud for + `hoverinfo`. + hoverlabel + :class:`plotly.graph_objects.choropleth.Hoverlabel` + instance or dict with compatible properties + hovertemplate + Template string used for rendering the information that + appear on hover box. Note that this will override + `hoverinfo`. Variables are inserted using %{variable}, + for example "y: %{y}" as well as %{xother}, {%_xother}, + {%_xother_}, {%xother_}. When showing info for several + points, "xother" will be added to those with different + x positions from the first point. An underscore before + or after "(x|y)other" will add a space on that side, + only when this field is shown. Numbers are formatted + using d3-format's syntax %{variable:d3-format}, for + example "Price: %{y:$.2f}". + https://github.com/d3/d3-format/tree/v1.4.5#d3-format + for details on the formatting syntax. Dates are + formatted using d3-time-format's syntax + %{variable|d3-time-format}, for example "Day: + %{2019-01-01|%A}". https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format for details on the + date formatting syntax. Variables that can't be found + will be replaced with the specifier. For example, a + template of "data: %{x}, %{y}" will result in a value + of "data: 1, %{y}" if x is 1 and y is missing. + Variables with an undefined value will be replaced with + the fallback value. The variables available in + `hovertemplate` are the ones emitted as event data + described at this link + https://plotly.com/javascript/plotlyjs-events/#event- + data. Additionally, all attributes that can be + specified per-point (the ones that are `arrayOk: true`) + are available. Anything contained in tag `` is + displayed in the secondary box, for example + `%{fullData.name}`. To hide the + secondary box completely, use an empty tag + ``. + hovertemplatefallback + Fallback string that's displayed when a variable + referenced in a template is missing. If the boolean + value 'false' is passed in, the specifier with the + missing variable will be displayed. + hovertemplatesrc + Sets the source reference on Chart Studio Cloud for + `hovertemplate`. + hovertext + Same as `text`. + hovertextsrc + Sets the source reference on Chart Studio Cloud for + `hovertext`. + ids + Assigns id labels to each datum. These ids for object + constancy of data points during animation. Should be an + array of strings, not numbers or any other type. + idssrc + Sets the source reference on Chart Studio Cloud for + `ids`. + legend + Sets the reference to a legend to show this trace in. + References to these legends are "legend", "legend2", + "legend3", etc. Settings for these legends are set in + the layout, under `layout.legend`, `layout.legend2`, + etc. + legendgroup + Sets the legend group for this trace. Traces and shapes + part of the same legend group hide/show at the same + time when toggling legend items. + legendgrouptitle + :class:`plotly.graph_objects.choropleth.Legendgrouptitl + e` instance or dict with compatible properties + legendrank + Sets the legend rank for this trace. Items and groups + with smaller ranks are presented on top/left side while + with "reversed" `legend.traceorder` they are on + bottom/right side. The default legendrank is 1000, so + that you can use ranks less than 1000 to place certain + items before all unranked items, and ranks greater than + 1000 to go after all unranked items. When having + unranked or equal rank items shapes would be displayed + after traces i.e. according to their order in data and + layout. + legendwidth + Sets the width (in px or fraction) of the legend for + this trace. + locationmode + The library used by the *country names* `locationmode` + option is changing in an upcoming version. Country + names in existing plots may not work in the new + version. Determines the set of locations used to match + entries in `locations` to regions on the map. Values + "ISO-3", "USA-states", *country names* correspond to + features on the base map and value "geojson-id" + corresponds to features from a custom GeoJSON linked to + the `geojson` attribute. + locations + Sets the coordinates via location IDs or names. See + `locationmode` for more info. + locationssrc + Sets the source reference on Chart Studio Cloud for + `locations`. + marker + :class:`plotly.graph_objects.choropleth.Marker` + instance or dict with compatible properties + meta + Assigns extra meta information associated with this + trace that can be used in various text attributes. + Attributes such as trace `name`, graph, axis and + colorbar `title.text`, annotation `text` + `rangeselector`, `updatemenues` and `sliders` `label` + text all support `meta`. To access the trace `meta` + values in an attribute in the same trace, simply use + `%{meta[i]}` where `i` is the index or key of the + `meta` item in question. To access trace `meta` in + layout attributes, use `%{data[n[.meta[i]}` where `i` + is the index or key of the `meta` and `n` is the trace + index. + metasrc + Sets the source reference on Chart Studio Cloud for + `meta`. + name + Sets the trace name. The trace name appears as the + legend item and on hover. + reversescale + Reverses the color mapping if true. If true, `zmin` + will correspond to the last color in the array and + `zmax` will correspond to the first color. + selected + :class:`plotly.graph_objects.choropleth.Selected` + instance or dict with compatible properties + selectedpoints + Array containing integer indices of selected points. + Has an effect only for traces that support selections. + Note that an empty array means an empty selection where + the `unselected` are turned on for all points, whereas, + any other non-array values means no selection all where + the `selected` and `unselected` styles have no effect. + showlegend + Determines whether or not an item corresponding to this + trace is shown in the legend. + showscale + Determines whether or not a colorbar is displayed for + this trace. + stream + :class:`plotly.graph_objects.choropleth.Stream` + instance or dict with compatible properties + text + Sets the text elements associated with each location. + textsrc + Sets the source reference on Chart Studio Cloud for + `text`. + uid + Assign an id to this trace, Use this to provide object + constancy between traces during animations and + transitions. + uirevision + Controls persistence of some user-driven changes to the + trace: `constraintrange` in `parcoords` traces, as well + as some `editable: true` modifications such as `name` + and `colorbar.title`. Defaults to `layout.uirevision`. + Note that other user-driven trace attribute changes are + controlled by `layout` attributes: `trace.visible` is + controlled by `layout.legend.uirevision`, + `selectedpoints` is controlled by + `layout.selectionrevision`, and `colorbar.(x|y)` + (accessible with `config: {editable: true}`) is + controlled by `layout.editrevision`. Trace changes are + tracked by `uid`, which only falls back on trace index + if no `uid` is provided. So if your app can add/remove + traces before the end of the `data` array, such that + the same trace has a different index, you can still + preserve user-driven changes if you give each trace a + `uid` that stays with it as it moves. + unselected + :class:`plotly.graph_objects.choropleth.Unselected` + instance or dict with compatible properties + visible + Determines whether or not this trace is visible. If + "legendonly", the trace is not drawn, but can appear as + a legend item (provided that the legend itself is + visible). + z + Sets the color values. + zauto + Determines whether or not the color domain is computed + with respect to the input data (here in `z`) or the + bounds set in `zmin` and `zmax` Defaults to `false` + when `zmin` and `zmax` are set by the user. + zmax + Sets the upper bound of the color domain. Value should + have the same units as in `z` and if set, `zmin` must + be set as well. + zmid + Sets the mid-point of the color domain by scaling + `zmin` and/or `zmax` to be equidistant to this point. + Value should have the same units as in `z`. Has no + effect when `zauto` is `false`. + zmin + Sets the lower bound of the color domain. Value should + have the same units as in `z` and if set, `zmax` must + be set as well. + zsrc + Sets the source reference on Chart Studio Cloud for + `z`. + row : 'all', int or None (default) + Subplot row index (starting from 1) for the trace to be + added. Only valid if figure was created using + `plotly.tools.make_subplots`.If 'all', addresses all + rows in the specified column(s). + col : 'all', int or None (default) + Subplot col index (starting from 1) for the trace to be + added. Only valid if figure was created using + `plotly.tools.make_subplots`.If 'all', addresses all + columns in the specified row(s). + + Returns + ------- + Figure + """ + from plotly.graph_objs import Choropleth + + new_trace = Choropleth( + autocolorscale=autocolorscale, + coloraxis=coloraxis, + colorbar=colorbar, + colorscale=colorscale, + customdata=customdata, + customdatasrc=customdatasrc, + featureidkey=featureidkey, + geo=geo, + geojson=geojson, + hoverinfo=hoverinfo, + hoverinfosrc=hoverinfosrc, + hoverlabel=hoverlabel, + hovertemplate=hovertemplate, + hovertemplatefallback=hovertemplatefallback, + hovertemplatesrc=hovertemplatesrc, + hovertext=hovertext, + hovertextsrc=hovertextsrc, + ids=ids, + idssrc=idssrc, + legend=legend, + legendgroup=legendgroup, + legendgrouptitle=legendgrouptitle, + legendrank=legendrank, + legendwidth=legendwidth, + locationmode=locationmode, + locations=locations, + locationssrc=locationssrc, + marker=marker, + meta=meta, + metasrc=metasrc, + name=name, + reversescale=reversescale, + selected=selected, + selectedpoints=selectedpoints, + showlegend=showlegend, + showscale=showscale, + stream=stream, + text=text, + textsrc=textsrc, + uid=uid, + uirevision=uirevision, + unselected=unselected, + visible=visible, + z=z, + zauto=zauto, + zmax=zmax, + zmid=zmid, + zmin=zmin, + zsrc=zsrc, + **kwargs, + ) + return self.add_trace(new_trace, row=row, col=col) + + def add_choroplethmap( + self, + autocolorscale=None, + below=None, + coloraxis=None, + colorbar=None, + colorscale=None, + customdata=None, + customdatasrc=None, + featureidkey=None, + geojson=None, + hoverinfo=None, + hoverinfosrc=None, + hoverlabel=None, + hovertemplate=None, + hovertemplatefallback=None, + hovertemplatesrc=None, + hovertext=None, + hovertextsrc=None, + ids=None, + idssrc=None, + legend=None, + legendgroup=None, + legendgrouptitle=None, + legendrank=None, + legendwidth=None, + locations=None, + locationssrc=None, + marker=None, + meta=None, + metasrc=None, + name=None, + reversescale=None, + selected=None, + selectedpoints=None, + showlegend=None, + showscale=None, + stream=None, + subplot=None, + text=None, + textsrc=None, + uid=None, + uirevision=None, + unselected=None, + visible=None, + z=None, + zauto=None, + zmax=None, + zmid=None, + zmin=None, + zsrc=None, + row=None, + col=None, + **kwargs, + ) -> "Figure": + """ + Add a new Choroplethmap trace + + GeoJSON features to be filled are set in `geojson` The data + that describes the choropleth value-to-color mapping is set in + `locations` and `z`. + + Parameters + ---------- + autocolorscale + Determines whether the colorscale is a default palette + (`autocolorscale: true`) or the palette determined by + `colorscale`. In case `colorscale` is unspecified or + `autocolorscale` is true, the default palette will be + chosen according to whether numbers in the `color` + array are all positive, all negative or mixed. + below + Determines if the choropleth polygons will be inserted + before the layer with the specified ID. By default, + choroplethmap traces are placed above the water layers. + If set to '', the layer will be inserted above every + existing layer. + coloraxis + Sets a reference to a shared color axis. References to + these shared color axes are "coloraxis", "coloraxis2", + "coloraxis3", etc. Settings for these shared color axes + are set in the layout, under `layout.coloraxis`, + `layout.coloraxis2`, etc. Note that multiple color + scales can be linked to the same color axis. + colorbar + :class:`plotly.graph_objects.choroplethmap.ColorBar` + instance or dict with compatible properties + colorscale + Sets the colorscale. The colorscale must be an array + containing arrays mapping a normalized value to an rgb, + rgba, hex, hsl, hsv, or named color string. At minimum, + a mapping for the lowest (0) and highest (1) values are + required. For example, `[[0, 'rgb(0,0,255)'], [1, + 'rgb(255,0,0)']]`. To control the bounds of the + colorscale in color space, use `zmin` and `zmax`. + Alternatively, `colorscale` may be a palette name + string of the following list: Blackbody,Bluered,Blues,C + ividis,Earth,Electric,Greens,Greys,Hot,Jet,Picnic,Portl + and,Rainbow,RdBu,Reds,Viridis,YlGnBu,YlOrRd. + customdata + Assigns extra data each datum. This may be useful when + listening to hover, click and selection events. Note + that, "scatter" traces also appends customdata items in + the markers DOM elements + customdatasrc + Sets the source reference on Chart Studio Cloud for + `customdata`. + featureidkey + Sets the key in GeoJSON features which is used as id to + match the items included in the `locations` array. + Support nested property, for example "properties.name". + geojson + Sets the GeoJSON data associated with this trace. It + can be set as a valid GeoJSON object or as a URL + string. Note that we only accept GeoJSONs of type + "FeatureCollection" or "Feature" with geometries of + type "Polygon" or "MultiPolygon". + hoverinfo + Determines which trace information appear on hover. If + `none` or `skip` are set, no information is displayed + upon hovering. But, if `none` is set, click and hover + events are still fired. + hoverinfosrc + Sets the source reference on Chart Studio Cloud for + `hoverinfo`. + hoverlabel + :class:`plotly.graph_objects.choroplethmap.Hoverlabel` + instance or dict with compatible properties + hovertemplate + Template string used for rendering the information that + appear on hover box. Note that this will override + `hoverinfo`. Variables are inserted using %{variable}, + for example "y: %{y}" as well as %{xother}, {%_xother}, + {%_xother_}, {%xother_}. When showing info for several + points, "xother" will be added to those with different + x positions from the first point. An underscore before + or after "(x|y)other" will add a space on that side, + only when this field is shown. Numbers are formatted + using d3-format's syntax %{variable:d3-format}, for + example "Price: %{y:$.2f}". + https://github.com/d3/d3-format/tree/v1.4.5#d3-format + for details on the formatting syntax. Dates are + formatted using d3-time-format's syntax + %{variable|d3-time-format}, for example "Day: + %{2019-01-01|%A}". https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format for details on the + date formatting syntax. Variables that can't be found + will be replaced with the specifier. For example, a + template of "data: %{x}, %{y}" will result in a value + of "data: 1, %{y}" if x is 1 and y is missing. + Variables with an undefined value will be replaced with + the fallback value. The variables available in + `hovertemplate` are the ones emitted as event data + described at this link + https://plotly.com/javascript/plotlyjs-events/#event- + data. Additionally, all attributes that can be + specified per-point (the ones that are `arrayOk: true`) + are available. Finally, the template string has access + to variable `properties` Anything contained in tag + `` is displayed in the secondary box, for + example `%{fullData.name}`. To hide the + secondary box completely, use an empty tag + ``. + hovertemplatefallback + Fallback string that's displayed when a variable + referenced in a template is missing. If the boolean + value 'false' is passed in, the specifier with the + missing variable will be displayed. + hovertemplatesrc + Sets the source reference on Chart Studio Cloud for + `hovertemplate`. + hovertext + Same as `text`. + hovertextsrc + Sets the source reference on Chart Studio Cloud for + `hovertext`. + ids + Assigns id labels to each datum. These ids for object + constancy of data points during animation. Should be an + array of strings, not numbers or any other type. + idssrc + Sets the source reference on Chart Studio Cloud for + `ids`. + legend + Sets the reference to a legend to show this trace in. + References to these legends are "legend", "legend2", + "legend3", etc. Settings for these legends are set in + the layout, under `layout.legend`, `layout.legend2`, + etc. + legendgroup + Sets the legend group for this trace. Traces and shapes + part of the same legend group hide/show at the same + time when toggling legend items. + legendgrouptitle + :class:`plotly.graph_objects.choroplethmap.Legendgroupt + itle` instance or dict with compatible properties + legendrank + Sets the legend rank for this trace. Items and groups + with smaller ranks are presented on top/left side while + with "reversed" `legend.traceorder` they are on + bottom/right side. The default legendrank is 1000, so + that you can use ranks less than 1000 to place certain + items before all unranked items, and ranks greater than + 1000 to go after all unranked items. When having + unranked or equal rank items shapes would be displayed + after traces i.e. according to their order in data and + layout. + legendwidth + Sets the width (in px or fraction) of the legend for + this trace. + locations + Sets which features found in "geojson" to plot using + their feature `id` field. + locationssrc + Sets the source reference on Chart Studio Cloud for + `locations`. + marker + :class:`plotly.graph_objects.choroplethmap.Marker` + instance or dict with compatible properties + meta + Assigns extra meta information associated with this + trace that can be used in various text attributes. + Attributes such as trace `name`, graph, axis and + colorbar `title.text`, annotation `text` + `rangeselector`, `updatemenues` and `sliders` `label` + text all support `meta`. To access the trace `meta` + values in an attribute in the same trace, simply use + `%{meta[i]}` where `i` is the index or key of the + `meta` item in question. To access trace `meta` in + layout attributes, use `%{data[n[.meta[i]}` where `i` + is the index or key of the `meta` and `n` is the trace + index. + metasrc + Sets the source reference on Chart Studio Cloud for + `meta`. + name + Sets the trace name. The trace name appears as the + legend item and on hover. + reversescale + Reverses the color mapping if true. If true, `zmin` + will correspond to the last color in the array and + `zmax` will correspond to the first color. + selected + :class:`plotly.graph_objects.choroplethmap.Selected` + instance or dict with compatible properties + selectedpoints + Array containing integer indices of selected points. + Has an effect only for traces that support selections. + Note that an empty array means an empty selection where + the `unselected` are turned on for all points, whereas, + any other non-array values means no selection all where + the `selected` and `unselected` styles have no effect. + showlegend + Determines whether or not an item corresponding to this + trace is shown in the legend. + showscale + Determines whether or not a colorbar is displayed for + this trace. + stream + :class:`plotly.graph_objects.choroplethmap.Stream` + instance or dict with compatible properties + subplot + Sets a reference between this trace's data coordinates + and a map subplot. If "map" (the default value), the + data refer to `layout.map`. If "map2", the data refer + to `layout.map2`, and so on. + text + Sets the text elements associated with each location. + textsrc + Sets the source reference on Chart Studio Cloud for + `text`. + uid + Assign an id to this trace, Use this to provide object + constancy between traces during animations and + transitions. + uirevision + Controls persistence of some user-driven changes to the + trace: `constraintrange` in `parcoords` traces, as well + as some `editable: true` modifications such as `name` + and `colorbar.title`. Defaults to `layout.uirevision`. + Note that other user-driven trace attribute changes are + controlled by `layout` attributes: `trace.visible` is + controlled by `layout.legend.uirevision`, + `selectedpoints` is controlled by + `layout.selectionrevision`, and `colorbar.(x|y)` + (accessible with `config: {editable: true}`) is + controlled by `layout.editrevision`. Trace changes are + tracked by `uid`, which only falls back on trace index + if no `uid` is provided. So if your app can add/remove + traces before the end of the `data` array, such that + the same trace has a different index, you can still + preserve user-driven changes if you give each trace a + `uid` that stays with it as it moves. + unselected + :class:`plotly.graph_objects.choroplethmap.Unselected` + instance or dict with compatible properties + visible + Determines whether or not this trace is visible. If + "legendonly", the trace is not drawn, but can appear as + a legend item (provided that the legend itself is + visible). + z + Sets the color values. + zauto + Determines whether or not the color domain is computed + with respect to the input data (here in `z`) or the + bounds set in `zmin` and `zmax` Defaults to `false` + when `zmin` and `zmax` are set by the user. + zmax + Sets the upper bound of the color domain. Value should + have the same units as in `z` and if set, `zmin` must + be set as well. + zmid + Sets the mid-point of the color domain by scaling + `zmin` and/or `zmax` to be equidistant to this point. + Value should have the same units as in `z`. Has no + effect when `zauto` is `false`. + zmin + Sets the lower bound of the color domain. Value should + have the same units as in `z` and if set, `zmax` must + be set as well. + zsrc + Sets the source reference on Chart Studio Cloud for + `z`. + row : 'all', int or None (default) + Subplot row index (starting from 1) for the trace to be + added. Only valid if figure was created using + `plotly.tools.make_subplots`.If 'all', addresses all + rows in the specified column(s). + col : 'all', int or None (default) + Subplot col index (starting from 1) for the trace to be + added. Only valid if figure was created using + `plotly.tools.make_subplots`.If 'all', addresses all + columns in the specified row(s). + + Returns + ------- + Figure + """ + from plotly.graph_objs import Choroplethmap + + new_trace = Choroplethmap( + autocolorscale=autocolorscale, + below=below, + coloraxis=coloraxis, + colorbar=colorbar, + colorscale=colorscale, + customdata=customdata, + customdatasrc=customdatasrc, + featureidkey=featureidkey, + geojson=geojson, + hoverinfo=hoverinfo, + hoverinfosrc=hoverinfosrc, + hoverlabel=hoverlabel, + hovertemplate=hovertemplate, + hovertemplatefallback=hovertemplatefallback, + hovertemplatesrc=hovertemplatesrc, + hovertext=hovertext, + hovertextsrc=hovertextsrc, + ids=ids, + idssrc=idssrc, + legend=legend, + legendgroup=legendgroup, + legendgrouptitle=legendgrouptitle, + legendrank=legendrank, + legendwidth=legendwidth, + locations=locations, + locationssrc=locationssrc, + marker=marker, + meta=meta, + metasrc=metasrc, + name=name, + reversescale=reversescale, + selected=selected, + selectedpoints=selectedpoints, + showlegend=showlegend, + showscale=showscale, + stream=stream, + subplot=subplot, + text=text, + textsrc=textsrc, + uid=uid, + uirevision=uirevision, + unselected=unselected, + visible=visible, + z=z, + zauto=zauto, + zmax=zmax, + zmid=zmid, + zmin=zmin, + zsrc=zsrc, + **kwargs, + ) + return self.add_trace(new_trace, row=row, col=col) + + def add_choroplethmapbox( + self, + autocolorscale=None, + below=None, + coloraxis=None, + colorbar=None, + colorscale=None, + customdata=None, + customdatasrc=None, + featureidkey=None, + geojson=None, + hoverinfo=None, + hoverinfosrc=None, + hoverlabel=None, + hovertemplate=None, + hovertemplatefallback=None, + hovertemplatesrc=None, + hovertext=None, + hovertextsrc=None, + ids=None, + idssrc=None, + legend=None, + legendgroup=None, + legendgrouptitle=None, + legendrank=None, + legendwidth=None, + locations=None, + locationssrc=None, + marker=None, + meta=None, + metasrc=None, + name=None, + reversescale=None, + selected=None, + selectedpoints=None, + showlegend=None, + showscale=None, + stream=None, + subplot=None, + text=None, + textsrc=None, + uid=None, + uirevision=None, + unselected=None, + visible=None, + z=None, + zauto=None, + zmax=None, + zmid=None, + zmin=None, + zsrc=None, + row=None, + col=None, + **kwargs, + ) -> "Figure": + """ + Add a new Choroplethmapbox trace + + "choroplethmapbox" trace is deprecated! Please consider + switching to the "choroplethmap" trace type and `map` subplots. + Learn more at: https://plotly.com/python/maplibre-migration/ as + well as https://plotly.com/javascript/maplibre-migration/ + GeoJSON features to be filled are set in `geojson` The data + that describes the choropleth value-to-color mapping is set in + `locations` and `z`. + + Parameters + ---------- + autocolorscale + Determines whether the colorscale is a default palette + (`autocolorscale: true`) or the palette determined by + `colorscale`. In case `colorscale` is unspecified or + `autocolorscale` is true, the default palette will be + chosen according to whether numbers in the `color` + array are all positive, all negative or mixed. + below + Determines if the choropleth polygons will be inserted + before the layer with the specified ID. By default, + choroplethmapbox traces are placed above the water + layers. If set to '', the layer will be inserted above + every existing layer. + coloraxis + Sets a reference to a shared color axis. References to + these shared color axes are "coloraxis", "coloraxis2", + "coloraxis3", etc. Settings for these shared color axes + are set in the layout, under `layout.coloraxis`, + `layout.coloraxis2`, etc. Note that multiple color + scales can be linked to the same color axis. + colorbar + :class:`plotly.graph_objects.choroplethmapbox.ColorBar` + instance or dict with compatible properties + colorscale + Sets the colorscale. The colorscale must be an array + containing arrays mapping a normalized value to an rgb, + rgba, hex, hsl, hsv, or named color string. At minimum, + a mapping for the lowest (0) and highest (1) values are + required. For example, `[[0, 'rgb(0,0,255)'], [1, + 'rgb(255,0,0)']]`. To control the bounds of the + colorscale in color space, use `zmin` and `zmax`. + Alternatively, `colorscale` may be a palette name + string of the following list: Blackbody,Bluered,Blues,C + ividis,Earth,Electric,Greens,Greys,Hot,Jet,Picnic,Portl + and,Rainbow,RdBu,Reds,Viridis,YlGnBu,YlOrRd. + customdata + Assigns extra data each datum. This may be useful when + listening to hover, click and selection events. Note + that, "scatter" traces also appends customdata items in + the markers DOM elements + customdatasrc + Sets the source reference on Chart Studio Cloud for + `customdata`. + featureidkey + Sets the key in GeoJSON features which is used as id to + match the items included in the `locations` array. + Support nested property, for example "properties.name". + geojson + Sets the GeoJSON data associated with this trace. It + can be set as a valid GeoJSON object or as a URL + string. Note that we only accept GeoJSONs of type + "FeatureCollection" or "Feature" with geometries of + type "Polygon" or "MultiPolygon". + hoverinfo + Determines which trace information appear on hover. If + `none` or `skip` are set, no information is displayed + upon hovering. But, if `none` is set, click and hover + events are still fired. + hoverinfosrc + Sets the source reference on Chart Studio Cloud for + `hoverinfo`. + hoverlabel + :class:`plotly.graph_objects.choroplethmapbox.Hoverlabe + l` instance or dict with compatible properties + hovertemplate + Template string used for rendering the information that + appear on hover box. Note that this will override + `hoverinfo`. Variables are inserted using %{variable}, + for example "y: %{y}" as well as %{xother}, {%_xother}, + {%_xother_}, {%xother_}. When showing info for several + points, "xother" will be added to those with different + x positions from the first point. An underscore before + or after "(x|y)other" will add a space on that side, + only when this field is shown. Numbers are formatted + using d3-format's syntax %{variable:d3-format}, for + example "Price: %{y:$.2f}". + https://github.com/d3/d3-format/tree/v1.4.5#d3-format + for details on the formatting syntax. Dates are + formatted using d3-time-format's syntax + %{variable|d3-time-format}, for example "Day: + %{2019-01-01|%A}". https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format for details on the + date formatting syntax. Variables that can't be found + will be replaced with the specifier. For example, a + template of "data: %{x}, %{y}" will result in a value + of "data: 1, %{y}" if x is 1 and y is missing. + Variables with an undefined value will be replaced with + the fallback value. The variables available in + `hovertemplate` are the ones emitted as event data + described at this link + https://plotly.com/javascript/plotlyjs-events/#event- + data. Additionally, all attributes that can be + specified per-point (the ones that are `arrayOk: true`) + are available. Finally, the template string has access + to variable `properties` Anything contained in tag + `` is displayed in the secondary box, for + example `%{fullData.name}`. To hide the + secondary box completely, use an empty tag + ``. + hovertemplatefallback + Fallback string that's displayed when a variable + referenced in a template is missing. If the boolean + value 'false' is passed in, the specifier with the + missing variable will be displayed. + hovertemplatesrc + Sets the source reference on Chart Studio Cloud for + `hovertemplate`. + hovertext + Same as `text`. + hovertextsrc + Sets the source reference on Chart Studio Cloud for + `hovertext`. + ids + Assigns id labels to each datum. These ids for object + constancy of data points during animation. Should be an + array of strings, not numbers or any other type. + idssrc + Sets the source reference on Chart Studio Cloud for + `ids`. + legend + Sets the reference to a legend to show this trace in. + References to these legends are "legend", "legend2", + "legend3", etc. Settings for these legends are set in + the layout, under `layout.legend`, `layout.legend2`, + etc. + legendgroup + Sets the legend group for this trace. Traces and shapes + part of the same legend group hide/show at the same + time when toggling legend items. + legendgrouptitle + :class:`plotly.graph_objects.choroplethmapbox.Legendgro + uptitle` instance or dict with compatible properties + legendrank + Sets the legend rank for this trace. Items and groups + with smaller ranks are presented on top/left side while + with "reversed" `legend.traceorder` they are on + bottom/right side. The default legendrank is 1000, so + that you can use ranks less than 1000 to place certain + items before all unranked items, and ranks greater than + 1000 to go after all unranked items. When having + unranked or equal rank items shapes would be displayed + after traces i.e. according to their order in data and + layout. + legendwidth + Sets the width (in px or fraction) of the legend for + this trace. + locations + Sets which features found in "geojson" to plot using + their feature `id` field. + locationssrc + Sets the source reference on Chart Studio Cloud for + `locations`. + marker + :class:`plotly.graph_objects.choroplethmapbox.Marker` + instance or dict with compatible properties + meta + Assigns extra meta information associated with this + trace that can be used in various text attributes. + Attributes such as trace `name`, graph, axis and + colorbar `title.text`, annotation `text` + `rangeselector`, `updatemenues` and `sliders` `label` + text all support `meta`. To access the trace `meta` + values in an attribute in the same trace, simply use + `%{meta[i]}` where `i` is the index or key of the + `meta` item in question. To access trace `meta` in + layout attributes, use `%{data[n[.meta[i]}` where `i` + is the index or key of the `meta` and `n` is the trace + index. + metasrc + Sets the source reference on Chart Studio Cloud for + `meta`. + name + Sets the trace name. The trace name appears as the + legend item and on hover. + reversescale + Reverses the color mapping if true. If true, `zmin` + will correspond to the last color in the array and + `zmax` will correspond to the first color. + selected + :class:`plotly.graph_objects.choroplethmapbox.Selected` + instance or dict with compatible properties + selectedpoints + Array containing integer indices of selected points. + Has an effect only for traces that support selections. + Note that an empty array means an empty selection where + the `unselected` are turned on for all points, whereas, + any other non-array values means no selection all where + the `selected` and `unselected` styles have no effect. + showlegend + Determines whether or not an item corresponding to this + trace is shown in the legend. + showscale + Determines whether or not a colorbar is displayed for + this trace. + stream + :class:`plotly.graph_objects.choroplethmapbox.Stream` + instance or dict with compatible properties + subplot + mapbox subplots and traces are deprecated! Please + consider switching to `map` subplots and traces. Learn + more at: https://plotly.com/python/maplibre-migration/ + as well as https://plotly.com/javascript/maplibre- + migration/ Sets a reference between this trace's data + coordinates and a mapbox subplot. If "mapbox" (the + default value), the data refer to `layout.mapbox`. If + "mapbox2", the data refer to `layout.mapbox2`, and so + on. + text + Sets the text elements associated with each location. + textsrc + Sets the source reference on Chart Studio Cloud for + `text`. + uid + Assign an id to this trace, Use this to provide object + constancy between traces during animations and + transitions. + uirevision + Controls persistence of some user-driven changes to the + trace: `constraintrange` in `parcoords` traces, as well + as some `editable: true` modifications such as `name` + and `colorbar.title`. Defaults to `layout.uirevision`. + Note that other user-driven trace attribute changes are + controlled by `layout` attributes: `trace.visible` is + controlled by `layout.legend.uirevision`, + `selectedpoints` is controlled by + `layout.selectionrevision`, and `colorbar.(x|y)` + (accessible with `config: {editable: true}`) is + controlled by `layout.editrevision`. Trace changes are + tracked by `uid`, which only falls back on trace index + if no `uid` is provided. So if your app can add/remove + traces before the end of the `data` array, such that + the same trace has a different index, you can still + preserve user-driven changes if you give each trace a + `uid` that stays with it as it moves. + unselected + :class:`plotly.graph_objects.choroplethmapbox.Unselecte + d` instance or dict with compatible properties + visible + Determines whether or not this trace is visible. If + "legendonly", the trace is not drawn, but can appear as + a legend item (provided that the legend itself is + visible). + z + Sets the color values. + zauto + Determines whether or not the color domain is computed + with respect to the input data (here in `z`) or the + bounds set in `zmin` and `zmax` Defaults to `false` + when `zmin` and `zmax` are set by the user. + zmax + Sets the upper bound of the color domain. Value should + have the same units as in `z` and if set, `zmin` must + be set as well. + zmid + Sets the mid-point of the color domain by scaling + `zmin` and/or `zmax` to be equidistant to this point. + Value should have the same units as in `z`. Has no + effect when `zauto` is `false`. + zmin + Sets the lower bound of the color domain. Value should + have the same units as in `z` and if set, `zmax` must + be set as well. + zsrc + Sets the source reference on Chart Studio Cloud for + `z`. + row : 'all', int or None (default) + Subplot row index (starting from 1) for the trace to be + added. Only valid if figure was created using + `plotly.tools.make_subplots`.If 'all', addresses all + rows in the specified column(s). + col : 'all', int or None (default) + Subplot col index (starting from 1) for the trace to be + added. Only valid if figure was created using + `plotly.tools.make_subplots`.If 'all', addresses all + columns in the specified row(s). + + Returns + ------- + Figure + """ + from plotly.graph_objs import Choroplethmapbox + + new_trace = Choroplethmapbox( + autocolorscale=autocolorscale, + below=below, + coloraxis=coloraxis, + colorbar=colorbar, + colorscale=colorscale, + customdata=customdata, + customdatasrc=customdatasrc, + featureidkey=featureidkey, + geojson=geojson, + hoverinfo=hoverinfo, + hoverinfosrc=hoverinfosrc, + hoverlabel=hoverlabel, + hovertemplate=hovertemplate, + hovertemplatefallback=hovertemplatefallback, + hovertemplatesrc=hovertemplatesrc, + hovertext=hovertext, + hovertextsrc=hovertextsrc, + ids=ids, + idssrc=idssrc, + legend=legend, + legendgroup=legendgroup, + legendgrouptitle=legendgrouptitle, + legendrank=legendrank, + legendwidth=legendwidth, + locations=locations, + locationssrc=locationssrc, + marker=marker, + meta=meta, + metasrc=metasrc, + name=name, + reversescale=reversescale, + selected=selected, + selectedpoints=selectedpoints, + showlegend=showlegend, + showscale=showscale, + stream=stream, + subplot=subplot, + text=text, + textsrc=textsrc, + uid=uid, + uirevision=uirevision, + unselected=unselected, + visible=visible, + z=z, + zauto=zauto, + zmax=zmax, + zmid=zmid, + zmin=zmin, + zsrc=zsrc, + **kwargs, + ) + return self.add_trace(new_trace, row=row, col=col) + + def add_cone( + self, + anchor=None, + autocolorscale=None, + cauto=None, + cmax=None, + cmid=None, + cmin=None, + coloraxis=None, + colorbar=None, + colorscale=None, + customdata=None, + customdatasrc=None, + hoverinfo=None, + hoverinfosrc=None, + hoverlabel=None, + hovertemplate=None, + hovertemplatefallback=None, + hovertemplatesrc=None, + hovertext=None, + hovertextsrc=None, + ids=None, + idssrc=None, + legend=None, + legendgroup=None, + legendgrouptitle=None, + legendrank=None, + legendwidth=None, + lighting=None, + lightposition=None, + meta=None, + metasrc=None, + name=None, + opacity=None, + reversescale=None, + scene=None, + showlegend=None, + showscale=None, + sizemode=None, + sizeref=None, + stream=None, + text=None, + textsrc=None, + u=None, + uhoverformat=None, + uid=None, + uirevision=None, + usrc=None, + v=None, + vhoverformat=None, + visible=None, + vsrc=None, + w=None, + whoverformat=None, + wsrc=None, + x=None, + xhoverformat=None, + xsrc=None, + y=None, + yhoverformat=None, + ysrc=None, + z=None, + zhoverformat=None, + zsrc=None, + row=None, + col=None, + **kwargs, + ) -> "Figure": + """ + Add a new Cone trace + + Use cone traces to visualize vector fields. Specify a vector + field using 6 1D arrays, 3 position arrays `x`, `y` and `z` and + 3 vector component arrays `u`, `v`, `w`. The cones are drawn + exactly at the positions given by `x`, `y` and `z`. + + Parameters + ---------- + anchor + Sets the cones' anchor with respect to their x/y/z + positions. Note that "cm" denote the cone's center of + mass which corresponds to 1/4 from the tail to tip. + autocolorscale + Determines whether the colorscale is a default palette + (`autocolorscale: true`) or the palette determined by + `colorscale`. In case `colorscale` is unspecified or + `autocolorscale` is true, the default palette will be + chosen according to whether numbers in the `color` + array are all positive, all negative or mixed. + cauto + Determines whether or not the color domain is computed + with respect to the input data (here u/v/w norm) or the + bounds set in `cmin` and `cmax` Defaults to `false` + when `cmin` and `cmax` are set by the user. + cmax + Sets the upper bound of the color domain. Value should + have the same units as u/v/w norm and if set, `cmin` + must be set as well. + cmid + Sets the mid-point of the color domain by scaling + `cmin` and/or `cmax` to be equidistant to this point. + Value should have the same units as u/v/w norm. Has no + effect when `cauto` is `false`. + cmin + Sets the lower bound of the color domain. Value should + have the same units as u/v/w norm and if set, `cmax` + must be set as well. + coloraxis + Sets a reference to a shared color axis. References to + these shared color axes are "coloraxis", "coloraxis2", + "coloraxis3", etc. Settings for these shared color axes + are set in the layout, under `layout.coloraxis`, + `layout.coloraxis2`, etc. Note that multiple color + scales can be linked to the same color axis. + colorbar + :class:`plotly.graph_objects.cone.ColorBar` instance or + dict with compatible properties + colorscale + Sets the colorscale. The colorscale must be an array + containing arrays mapping a normalized value to an rgb, + rgba, hex, hsl, hsv, or named color string. At minimum, + a mapping for the lowest (0) and highest (1) values are + required. For example, `[[0, 'rgb(0,0,255)'], [1, + 'rgb(255,0,0)']]`. To control the bounds of the + colorscale in color space, use `cmin` and `cmax`. + Alternatively, `colorscale` may be a palette name + string of the following list: Blackbody,Bluered,Blues,C + ividis,Earth,Electric,Greens,Greys,Hot,Jet,Picnic,Portl + and,Rainbow,RdBu,Reds,Viridis,YlGnBu,YlOrRd. + customdata + Assigns extra data each datum. This may be useful when + listening to hover, click and selection events. Note + that, "scatter" traces also appends customdata items in + the markers DOM elements + customdatasrc + Sets the source reference on Chart Studio Cloud for + `customdata`. + hoverinfo + Determines which trace information appear on hover. If + `none` or `skip` are set, no information is displayed + upon hovering. But, if `none` is set, click and hover + events are still fired. + hoverinfosrc + Sets the source reference on Chart Studio Cloud for + `hoverinfo`. + hoverlabel + :class:`plotly.graph_objects.cone.Hoverlabel` instance + or dict with compatible properties + hovertemplate + Template string used for rendering the information that + appear on hover box. Note that this will override + `hoverinfo`. Variables are inserted using %{variable}, + for example "y: %{y}" as well as %{xother}, {%_xother}, + {%_xother_}, {%xother_}. When showing info for several + points, "xother" will be added to those with different + x positions from the first point. An underscore before + or after "(x|y)other" will add a space on that side, + only when this field is shown. Numbers are formatted + using d3-format's syntax %{variable:d3-format}, for + example "Price: %{y:$.2f}". + https://github.com/d3/d3-format/tree/v1.4.5#d3-format + for details on the formatting syntax. Dates are + formatted using d3-time-format's syntax + %{variable|d3-time-format}, for example "Day: + %{2019-01-01|%A}". https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format for details on the + date formatting syntax. Variables that can't be found + will be replaced with the specifier. For example, a + template of "data: %{x}, %{y}" will result in a value + of "data: 1, %{y}" if x is 1 and y is missing. + Variables with an undefined value will be replaced with + the fallback value. The variables available in + `hovertemplate` are the ones emitted as event data + described at this link + https://plotly.com/javascript/plotlyjs-events/#event- + data. Additionally, all attributes that can be + specified per-point (the ones that are `arrayOk: true`) + are available. Finally, the template string has access + to variable `norm` Anything contained in tag `` + is displayed in the secondary box, for example + `%{fullData.name}`. To hide the + secondary box completely, use an empty tag + ``. + hovertemplatefallback + Fallback string that's displayed when a variable + referenced in a template is missing. If the boolean + value 'false' is passed in, the specifier with the + missing variable will be displayed. + hovertemplatesrc + Sets the source reference on Chart Studio Cloud for + `hovertemplate`. + hovertext + Same as `text`. + hovertextsrc + Sets the source reference on Chart Studio Cloud for + `hovertext`. + ids + Assigns id labels to each datum. These ids for object + constancy of data points during animation. Should be an + array of strings, not numbers or any other type. + idssrc + Sets the source reference on Chart Studio Cloud for + `ids`. + legend + Sets the reference to a legend to show this trace in. + References to these legends are "legend", "legend2", + "legend3", etc. Settings for these legends are set in + the layout, under `layout.legend`, `layout.legend2`, + etc. + legendgroup + Sets the legend group for this trace. Traces and shapes + part of the same legend group hide/show at the same + time when toggling legend items. + legendgrouptitle + :class:`plotly.graph_objects.cone.Legendgrouptitle` + instance or dict with compatible properties + legendrank + Sets the legend rank for this trace. Items and groups + with smaller ranks are presented on top/left side while + with "reversed" `legend.traceorder` they are on + bottom/right side. The default legendrank is 1000, so + that you can use ranks less than 1000 to place certain + items before all unranked items, and ranks greater than + 1000 to go after all unranked items. When having + unranked or equal rank items shapes would be displayed + after traces i.e. according to their order in data and + layout. + legendwidth + Sets the width (in px or fraction) of the legend for + this trace. + lighting + :class:`plotly.graph_objects.cone.Lighting` instance or + dict with compatible properties + lightposition + :class:`plotly.graph_objects.cone.Lightposition` + instance or dict with compatible properties + meta + Assigns extra meta information associated with this + trace that can be used in various text attributes. + Attributes such as trace `name`, graph, axis and + colorbar `title.text`, annotation `text` + `rangeselector`, `updatemenues` and `sliders` `label` + text all support `meta`. To access the trace `meta` + values in an attribute in the same trace, simply use + `%{meta[i]}` where `i` is the index or key of the + `meta` item in question. To access trace `meta` in + layout attributes, use `%{data[n[.meta[i]}` where `i` + is the index or key of the `meta` and `n` is the trace + index. + metasrc + Sets the source reference on Chart Studio Cloud for + `meta`. + name + Sets the trace name. The trace name appears as the + legend item and on hover. + opacity + Sets the opacity of the surface. Please note that in + the case of using high `opacity` values for example a + value greater than or equal to 0.5 on two surfaces (and + 0.25 with four surfaces), an overlay of multiple + transparent surfaces may not perfectly be sorted in + depth by the webgl API. This behavior may be improved + in the near future and is subject to change. + reversescale + Reverses the color mapping if true. If true, `cmin` + will correspond to the last color in the array and + `cmax` will correspond to the first color. + scene + Sets a reference between this trace's 3D coordinate + system and a 3D scene. If "scene" (the default value), + the (x,y,z) coordinates refer to `layout.scene`. If + "scene2", the (x,y,z) coordinates refer to + `layout.scene2`, and so on. + showlegend + Determines whether or not an item corresponding to this + trace is shown in the legend. + showscale + Determines whether or not a colorbar is displayed for + this trace. + sizemode + Determines whether `sizeref` is set as a "scaled" (i.e + unitless) scalar (normalized by the max u/v/w norm in + the vector field) or as "absolute" value (in the same + units as the vector field). To display sizes in actual + vector length use "raw". + sizeref + Adjusts the cone size scaling. The size of the cones is + determined by their u/v/w norm multiplied a factor and + `sizeref`. This factor (computed internally) + corresponds to the minimum "time" to travel across two + successive x/y/z positions at the average velocity of + those two successive positions. All cones in a given + trace use the same factor. With `sizemode` set to + "raw", its default value is 1. With `sizemode` set to + "scaled", `sizeref` is unitless, its default value is + 0.5. With `sizemode` set to "absolute", `sizeref` has + the same units as the u/v/w vector field, its the + default value is half the sample's maximum vector norm. + stream + :class:`plotly.graph_objects.cone.Stream` instance or + dict with compatible properties + text + Sets the text elements associated with the cones. If + trace `hoverinfo` contains a "text" flag and + "hovertext" is not set, these elements will be seen in + the hover labels. + textsrc + Sets the source reference on Chart Studio Cloud for + `text`. + u + Sets the x components of the vector field. + uhoverformat + Sets the hover text formatting rulefor `u` using d3 + formatting mini-languages which are very similar to + those in Python. For numbers, see: https://github.com/d + 3/d3-format/tree/v1.4.5#d3-format.By default the values + are formatted using generic number format. + uid + Assign an id to this trace, Use this to provide object + constancy between traces during animations and + transitions. + uirevision + Controls persistence of some user-driven changes to the + trace: `constraintrange` in `parcoords` traces, as well + as some `editable: true` modifications such as `name` + and `colorbar.title`. Defaults to `layout.uirevision`. + Note that other user-driven trace attribute changes are + controlled by `layout` attributes: `trace.visible` is + controlled by `layout.legend.uirevision`, + `selectedpoints` is controlled by + `layout.selectionrevision`, and `colorbar.(x|y)` + (accessible with `config: {editable: true}`) is + controlled by `layout.editrevision`. Trace changes are + tracked by `uid`, which only falls back on trace index + if no `uid` is provided. So if your app can add/remove + traces before the end of the `data` array, such that + the same trace has a different index, you can still + preserve user-driven changes if you give each trace a + `uid` that stays with it as it moves. + usrc + Sets the source reference on Chart Studio Cloud for + `u`. + v + Sets the y components of the vector field. + vhoverformat + Sets the hover text formatting rulefor `v` using d3 + formatting mini-languages which are very similar to + those in Python. For numbers, see: https://github.com/d + 3/d3-format/tree/v1.4.5#d3-format.By default the values + are formatted using generic number format. + visible + Determines whether or not this trace is visible. If + "legendonly", the trace is not drawn, but can appear as + a legend item (provided that the legend itself is + visible). + vsrc + Sets the source reference on Chart Studio Cloud for + `v`. + w + Sets the z components of the vector field. + whoverformat + Sets the hover text formatting rulefor `w` using d3 + formatting mini-languages which are very similar to + those in Python. For numbers, see: https://github.com/d + 3/d3-format/tree/v1.4.5#d3-format.By default the values + are formatted using generic number format. + wsrc + Sets the source reference on Chart Studio Cloud for + `w`. + x + Sets the x coordinates of the vector field and of the + displayed cones. + xhoverformat + Sets the hover text formatting rulefor `x` using d3 + formatting mini-languages which are very similar to + those in Python. For numbers, see: + https://github.com/d3/d3-format/tree/v1.4.5#d3-format. + And for dates see: https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format. We add two items to + d3's date formatter: "%h" for half of the year as a + decimal number as well as "%{n}f" for fractional + seconds with n digits. For example, *2016-10-13 + 09:15:23.456* with tickformat "%H~%M~%S.%2f" would + display *09~15~23.46*By default the values are + formatted using `xaxis.hoverformat`. + xsrc + Sets the source reference on Chart Studio Cloud for + `x`. + y + Sets the y coordinates of the vector field and of the + displayed cones. + yhoverformat + Sets the hover text formatting rulefor `y` using d3 + formatting mini-languages which are very similar to + those in Python. For numbers, see: + https://github.com/d3/d3-format/tree/v1.4.5#d3-format. + And for dates see: https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format. We add two items to + d3's date formatter: "%h" for half of the year as a + decimal number as well as "%{n}f" for fractional + seconds with n digits. For example, *2016-10-13 + 09:15:23.456* with tickformat "%H~%M~%S.%2f" would + display *09~15~23.46*By default the values are + formatted using `yaxis.hoverformat`. + ysrc + Sets the source reference on Chart Studio Cloud for + `y`. + z + Sets the z coordinates of the vector field and of the + displayed cones. + zhoverformat + Sets the hover text formatting rulefor `z` using d3 + formatting mini-languages which are very similar to + those in Python. For numbers, see: + https://github.com/d3/d3-format/tree/v1.4.5#d3-format. + And for dates see: https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format. We add two items to + d3's date formatter: "%h" for half of the year as a + decimal number as well as "%{n}f" for fractional + seconds with n digits. For example, *2016-10-13 + 09:15:23.456* with tickformat "%H~%M~%S.%2f" would + display *09~15~23.46*By default the values are + formatted using `zaxis.hoverformat`. + zsrc + Sets the source reference on Chart Studio Cloud for + `z`. + row : 'all', int or None (default) + Subplot row index (starting from 1) for the trace to be + added. Only valid if figure was created using + `plotly.tools.make_subplots`.If 'all', addresses all + rows in the specified column(s). + col : 'all', int or None (default) + Subplot col index (starting from 1) for the trace to be + added. Only valid if figure was created using + `plotly.tools.make_subplots`.If 'all', addresses all + columns in the specified row(s). + + Returns + ------- + Figure + """ + from plotly.graph_objs import Cone + + new_trace = Cone( + anchor=anchor, + autocolorscale=autocolorscale, + cauto=cauto, + cmax=cmax, + cmid=cmid, + cmin=cmin, + coloraxis=coloraxis, + colorbar=colorbar, + colorscale=colorscale, + customdata=customdata, + customdatasrc=customdatasrc, + hoverinfo=hoverinfo, + hoverinfosrc=hoverinfosrc, + hoverlabel=hoverlabel, + hovertemplate=hovertemplate, + hovertemplatefallback=hovertemplatefallback, + hovertemplatesrc=hovertemplatesrc, + hovertext=hovertext, + hovertextsrc=hovertextsrc, + ids=ids, + idssrc=idssrc, + legend=legend, + legendgroup=legendgroup, + legendgrouptitle=legendgrouptitle, + legendrank=legendrank, + legendwidth=legendwidth, + lighting=lighting, + lightposition=lightposition, + meta=meta, + metasrc=metasrc, + name=name, + opacity=opacity, + reversescale=reversescale, + scene=scene, + showlegend=showlegend, + showscale=showscale, + sizemode=sizemode, + sizeref=sizeref, + stream=stream, + text=text, + textsrc=textsrc, + u=u, + uhoverformat=uhoverformat, + uid=uid, + uirevision=uirevision, + usrc=usrc, + v=v, + vhoverformat=vhoverformat, + visible=visible, + vsrc=vsrc, + w=w, + whoverformat=whoverformat, + wsrc=wsrc, + x=x, + xhoverformat=xhoverformat, + xsrc=xsrc, + y=y, + yhoverformat=yhoverformat, + ysrc=ysrc, + z=z, + zhoverformat=zhoverformat, + zsrc=zsrc, + **kwargs, + ) + return self.add_trace(new_trace, row=row, col=col) + + def add_contour( + self, + autocolorscale=None, + autocontour=None, + coloraxis=None, + colorbar=None, + colorscale=None, + connectgaps=None, + contours=None, + customdata=None, + customdatasrc=None, + dx=None, + dy=None, + fillcolor=None, + hoverinfo=None, + hoverinfosrc=None, + hoverlabel=None, + hoverongaps=None, + hovertemplate=None, + hovertemplatefallback=None, + hovertemplatesrc=None, + hovertext=None, + hovertextsrc=None, + ids=None, + idssrc=None, + legend=None, + legendgroup=None, + legendgrouptitle=None, + legendrank=None, + legendwidth=None, + line=None, + meta=None, + metasrc=None, + name=None, + ncontours=None, + opacity=None, + reversescale=None, + showlegend=None, + showscale=None, + stream=None, + text=None, + textfont=None, + textsrc=None, + texttemplate=None, + texttemplatefallback=None, + transpose=None, + uid=None, + uirevision=None, + visible=None, + x=None, + x0=None, + xaxis=None, + xcalendar=None, + xhoverformat=None, + xperiod=None, + xperiod0=None, + xperiodalignment=None, + xsrc=None, + xtype=None, + y=None, + y0=None, + yaxis=None, + ycalendar=None, + yhoverformat=None, + yperiod=None, + yperiod0=None, + yperiodalignment=None, + ysrc=None, + ytype=None, + z=None, + zauto=None, + zhoverformat=None, + zmax=None, + zmid=None, + zmin=None, + zorder=None, + zsrc=None, + row=None, + col=None, + secondary_y=None, + **kwargs, + ) -> "Figure": + """ + Add a new Contour trace + + The data from which contour lines are computed is set in `z`. + Data in `z` must be a 2D list of numbers. Say that `z` has N + rows and M columns, then by default, these N rows correspond to + N y coordinates (set in `y` or auto-generated) and the M + columns correspond to M x coordinates (set in `x` or auto- + generated). By setting `transpose` to True, the above behavior + is flipped. + + Parameters + ---------- + autocolorscale + Determines whether the colorscale is a default palette + (`autocolorscale: true`) or the palette determined by + `colorscale`. In case `colorscale` is unspecified or + `autocolorscale` is true, the default palette will be + chosen according to whether numbers in the `color` + array are all positive, all negative or mixed. + autocontour + Determines whether or not the contour level attributes + are picked by an algorithm. If True, the number of + contour levels can be set in `ncontours`. If False, set + the contour level attributes in `contours`. + coloraxis + Sets a reference to a shared color axis. References to + these shared color axes are "coloraxis", "coloraxis2", + "coloraxis3", etc. Settings for these shared color axes + are set in the layout, under `layout.coloraxis`, + `layout.coloraxis2`, etc. Note that multiple color + scales can be linked to the same color axis. + colorbar + :class:`plotly.graph_objects.contour.ColorBar` instance + or dict with compatible properties + colorscale + Sets the colorscale. The colorscale must be an array + containing arrays mapping a normalized value to an rgb, + rgba, hex, hsl, hsv, or named color string. At minimum, + a mapping for the lowest (0) and highest (1) values are + required. For example, `[[0, 'rgb(0,0,255)'], [1, + 'rgb(255,0,0)']]`. To control the bounds of the + colorscale in color space, use `zmin` and `zmax`. + Alternatively, `colorscale` may be a palette name + string of the following list: Blackbody,Bluered,Blues,C + ividis,Earth,Electric,Greens,Greys,Hot,Jet,Picnic,Portl + and,Rainbow,RdBu,Reds,Viridis,YlGnBu,YlOrRd. + connectgaps + Determines whether or not gaps (i.e. {nan} or missing + values) in the `z` data are filled in. It is defaulted + to true if `z` is a one dimensional array otherwise it + is defaulted to false. + contours + :class:`plotly.graph_objects.contour.Contours` instance + or dict with compatible properties + customdata + Assigns extra data each datum. This may be useful when + listening to hover, click and selection events. Note + that, "scatter" traces also appends customdata items in + the markers DOM elements + customdatasrc + Sets the source reference on Chart Studio Cloud for + `customdata`. + dx + Sets the x coordinate step. See `x0` for more info. + dy + Sets the y coordinate step. See `y0` for more info. + fillcolor + Sets the fill color if `contours.type` is "constraint". + Defaults to a half-transparent variant of the line + color, marker color, or marker line color, whichever is + available. + hoverinfo + Determines which trace information appear on hover. If + `none` or `skip` are set, no information is displayed + upon hovering. But, if `none` is set, click and hover + events are still fired. + hoverinfosrc + Sets the source reference on Chart Studio Cloud for + `hoverinfo`. + hoverlabel + :class:`plotly.graph_objects.contour.Hoverlabel` + instance or dict with compatible properties + hoverongaps + Determines whether or not gaps (i.e. {nan} or missing + values) in the `z` data have hover labels associated + with them. + hovertemplate + Template string used for rendering the information that + appear on hover box. Note that this will override + `hoverinfo`. Variables are inserted using %{variable}, + for example "y: %{y}" as well as %{xother}, {%_xother}, + {%_xother_}, {%xother_}. When showing info for several + points, "xother" will be added to those with different + x positions from the first point. An underscore before + or after "(x|y)other" will add a space on that side, + only when this field is shown. Numbers are formatted + using d3-format's syntax %{variable:d3-format}, for + example "Price: %{y:$.2f}". + https://github.com/d3/d3-format/tree/v1.4.5#d3-format + for details on the formatting syntax. Dates are + formatted using d3-time-format's syntax + %{variable|d3-time-format}, for example "Day: + %{2019-01-01|%A}". https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format for details on the + date formatting syntax. Variables that can't be found + will be replaced with the specifier. For example, a + template of "data: %{x}, %{y}" will result in a value + of "data: 1, %{y}" if x is 1 and y is missing. + Variables with an undefined value will be replaced with + the fallback value. The variables available in + `hovertemplate` are the ones emitted as event data + described at this link + https://plotly.com/javascript/plotlyjs-events/#event- + data. Additionally, all attributes that can be + specified per-point (the ones that are `arrayOk: true`) + are available. Anything contained in tag `` is + displayed in the secondary box, for example + `%{fullData.name}`. To hide the + secondary box completely, use an empty tag + ``. + hovertemplatefallback + Fallback string that's displayed when a variable + referenced in a template is missing. If the boolean + value 'false' is passed in, the specifier with the + missing variable will be displayed. + hovertemplatesrc + Sets the source reference on Chart Studio Cloud for + `hovertemplate`. + hovertext + Same as `text`. + hovertextsrc + Sets the source reference on Chart Studio Cloud for + `hovertext`. + ids + Assigns id labels to each datum. These ids for object + constancy of data points during animation. Should be an + array of strings, not numbers or any other type. + idssrc + Sets the source reference on Chart Studio Cloud for + `ids`. + legend + Sets the reference to a legend to show this trace in. + References to these legends are "legend", "legend2", + "legend3", etc. Settings for these legends are set in + the layout, under `layout.legend`, `layout.legend2`, + etc. + legendgroup + Sets the legend group for this trace. Traces and shapes + part of the same legend group hide/show at the same + time when toggling legend items. + legendgrouptitle + :class:`plotly.graph_objects.contour.Legendgrouptitle` + instance or dict with compatible properties + legendrank + Sets the legend rank for this trace. Items and groups + with smaller ranks are presented on top/left side while + with "reversed" `legend.traceorder` they are on + bottom/right side. The default legendrank is 1000, so + that you can use ranks less than 1000 to place certain + items before all unranked items, and ranks greater than + 1000 to go after all unranked items. When having + unranked or equal rank items shapes would be displayed + after traces i.e. according to their order in data and + layout. + legendwidth + Sets the width (in px or fraction) of the legend for + this trace. + line + :class:`plotly.graph_objects.contour.Line` instance or + dict with compatible properties + meta + Assigns extra meta information associated with this + trace that can be used in various text attributes. + Attributes such as trace `name`, graph, axis and + colorbar `title.text`, annotation `text` + `rangeselector`, `updatemenues` and `sliders` `label` + text all support `meta`. To access the trace `meta` + values in an attribute in the same trace, simply use + `%{meta[i]}` where `i` is the index or key of the + `meta` item in question. To access trace `meta` in + layout attributes, use `%{data[n[.meta[i]}` where `i` + is the index or key of the `meta` and `n` is the trace + index. + metasrc + Sets the source reference on Chart Studio Cloud for + `meta`. + name + Sets the trace name. The trace name appears as the + legend item and on hover. + ncontours + Sets the maximum number of contour levels. The actual + number of contours will be chosen automatically to be + less than or equal to the value of `ncontours`. Has an + effect only if `autocontour` is True or if + `contours.size` is missing. + opacity + Sets the opacity of the trace. + reversescale + Reverses the color mapping if true. If true, `zmin` + will correspond to the last color in the array and + `zmax` will correspond to the first color. + showlegend + Determines whether or not an item corresponding to this + trace is shown in the legend. + showscale + Determines whether or not a colorbar is displayed for + this trace. + stream + :class:`plotly.graph_objects.contour.Stream` instance + or dict with compatible properties + text + Sets the text elements associated with each z value. + textfont + For this trace it only has an effect if `coloring` is + set to "heatmap". Sets the text font. + textsrc + Sets the source reference on Chart Studio Cloud for + `text`. + texttemplate + For this trace it only has an effect if `coloring` is + set to "heatmap". Template string used for rendering + the information text that appears on points. Note that + this will override `textinfo`. Variables are inserted + using %{variable}, for example "y: %{y}". Numbers are + formatted using d3-format's syntax + %{variable:d3-format}, for example "Price: %{y:$.2f}". + https://github.com/d3/d3-format/tree/v1.4.5#d3-format + for details on the formatting syntax. Dates are + formatted using d3-time-format's syntax + %{variable|d3-time-format}, for example "Day: + %{2019-01-01|%A}". https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format for details on the + date formatting syntax. Variables that can't be found + will be replaced with the specifier. For example, a + template of "data: %{x}, %{y}" will result in a value + of "data: 1, %{y}" if x is 1 and y is missing. + Variables with an undefined value will be replaced with + the fallback value. All attributes that can be + specified per-point (the ones that are `arrayOk: true`) + are available. Finally, the template string has access + to variables `x`, `y`, `z` and `text`. + texttemplatefallback + Fallback string that's displayed when a variable + referenced in a template is missing. If the boolean + value 'false' is passed in, the specifier with the + missing variable will be displayed. + transpose + Transposes the z data. + uid + Assign an id to this trace, Use this to provide object + constancy between traces during animations and + transitions. + uirevision + Controls persistence of some user-driven changes to the + trace: `constraintrange` in `parcoords` traces, as well + as some `editable: true` modifications such as `name` + and `colorbar.title`. Defaults to `layout.uirevision`. + Note that other user-driven trace attribute changes are + controlled by `layout` attributes: `trace.visible` is + controlled by `layout.legend.uirevision`, + `selectedpoints` is controlled by + `layout.selectionrevision`, and `colorbar.(x|y)` + (accessible with `config: {editable: true}`) is + controlled by `layout.editrevision`. Trace changes are + tracked by `uid`, which only falls back on trace index + if no `uid` is provided. So if your app can add/remove + traces before the end of the `data` array, such that + the same trace has a different index, you can still + preserve user-driven changes if you give each trace a + `uid` that stays with it as it moves. + visible + Determines whether or not this trace is visible. If + "legendonly", the trace is not drawn, but can appear as + a legend item (provided that the legend itself is + visible). + x + Sets the x coordinates. + x0 + Alternate to `x`. Builds a linear space of x + coordinates. Use with `dx` where `x0` is the starting + coordinate and `dx` the step. + xaxis + Sets a reference between this trace's x coordinates and + a 2D cartesian x axis. If "x" (the default value), the + x coordinates refer to `layout.xaxis`. If "x2", the x + coordinates refer to `layout.xaxis2`, and so on. + xcalendar + Sets the calendar system to use with `x` date data. + xhoverformat + Sets the hover text formatting rulefor `x` using d3 + formatting mini-languages which are very similar to + those in Python. For numbers, see: + https://github.com/d3/d3-format/tree/v1.4.5#d3-format. + And for dates see: https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format. We add two items to + d3's date formatter: "%h" for half of the year as a + decimal number as well as "%{n}f" for fractional + seconds with n digits. For example, *2016-10-13 + 09:15:23.456* with tickformat "%H~%M~%S.%2f" would + display *09~15~23.46*By default the values are + formatted using `xaxis.hoverformat`. + xperiod + Only relevant when the axis `type` is "date". Sets the + period positioning in milliseconds or "M" on the x + axis. Special values in the form of "M" could be + used to declare the number of months. In this case `n` + must be a positive integer. + xperiod0 + Only relevant when the axis `type` is "date". Sets the + base for period positioning in milliseconds or date + string on the x0 axis. When `x0period` is round number + of weeks, the `x0period0` by default would be on a + Sunday i.e. 2000-01-02, otherwise it would be at + 2000-01-01. + xperiodalignment + Only relevant when the axis `type` is "date". Sets the + alignment of data points on the x axis. + xsrc + Sets the source reference on Chart Studio Cloud for + `x`. + xtype + If "array", the heatmap's x coordinates are given by + "x" (the default behavior when `x` is provided). If + "scaled", the heatmap's x coordinates are given by "x0" + and "dx" (the default behavior when `x` is not + provided). + y + Sets the y coordinates. + y0 + Alternate to `y`. Builds a linear space of y + coordinates. Use with `dy` where `y0` is the starting + coordinate and `dy` the step. + yaxis + Sets a reference between this trace's y coordinates and + a 2D cartesian y axis. If "y" (the default value), the + y coordinates refer to `layout.yaxis`. If "y2", the y + coordinates refer to `layout.yaxis2`, and so on. + ycalendar + Sets the calendar system to use with `y` date data. + yhoverformat + Sets the hover text formatting rulefor `y` using d3 + formatting mini-languages which are very similar to + those in Python. For numbers, see: + https://github.com/d3/d3-format/tree/v1.4.5#d3-format. + And for dates see: https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format. We add two items to + d3's date formatter: "%h" for half of the year as a + decimal number as well as "%{n}f" for fractional + seconds with n digits. For example, *2016-10-13 + 09:15:23.456* with tickformat "%H~%M~%S.%2f" would + display *09~15~23.46*By default the values are + formatted using `yaxis.hoverformat`. + yperiod + Only relevant when the axis `type` is "date". Sets the + period positioning in milliseconds or "M" on the y + axis. Special values in the form of "M" could be + used to declare the number of months. In this case `n` + must be a positive integer. + yperiod0 + Only relevant when the axis `type` is "date". Sets the + base for period positioning in milliseconds or date + string on the y0 axis. When `y0period` is round number + of weeks, the `y0period0` by default would be on a + Sunday i.e. 2000-01-02, otherwise it would be at + 2000-01-01. + yperiodalignment + Only relevant when the axis `type` is "date". Sets the + alignment of data points on the y axis. + ysrc + Sets the source reference on Chart Studio Cloud for + `y`. + ytype + If "array", the heatmap's y coordinates are given by + "y" (the default behavior when `y` is provided) If + "scaled", the heatmap's y coordinates are given by "y0" + and "dy" (the default behavior when `y` is not + provided) + z + Sets the z data. + zauto + Determines whether or not the color domain is computed + with respect to the input data (here in `z`) or the + bounds set in `zmin` and `zmax` Defaults to `false` + when `zmin` and `zmax` are set by the user. + zhoverformat + Sets the hover text formatting rulefor `z` using d3 + formatting mini-languages which are very similar to + those in Python. For numbers, see: https://github.com/d + 3/d3-format/tree/v1.4.5#d3-format.By default the values + are formatted using generic number format. + zmax + Sets the upper bound of the color domain. Value should + have the same units as in `z` and if set, `zmin` must + be set as well. + zmid + Sets the mid-point of the color domain by scaling + `zmin` and/or `zmax` to be equidistant to this point. + Value should have the same units as in `z`. Has no + effect when `zauto` is `false`. + zmin + Sets the lower bound of the color domain. Value should + have the same units as in `z` and if set, `zmax` must + be set as well. + zorder + Sets the layer on which this trace is displayed, + relative to other SVG traces on the same subplot. SVG + traces with higher `zorder` appear in front of those + with lower `zorder`. + zsrc + Sets the source reference on Chart Studio Cloud for + `z`. + row : 'all', int or None (default) + Subplot row index (starting from 1) for the trace to be + added. Only valid if figure was created using + `plotly.tools.make_subplots`.If 'all', addresses all + rows in the specified column(s). + col : 'all', int or None (default) + Subplot col index (starting from 1) for the trace to be + added. Only valid if figure was created using + `plotly.tools.make_subplots`.If 'all', addresses all + columns in the specified row(s). + secondary_y: boolean or None (default None) + If True, associate this trace with the secondary y-axis of the + subplot at the specified row and col. Only valid if all of the + following conditions are satisfied: + * The figure was created using `plotly.subplots.make_subplots`. + * The row and col arguments are not None + * The subplot at the specified row and col has type xy + (which is the default) and secondary_y True. These + properties are specified in the specs argument to + make_subplots. See the make_subplots docstring for more info. + + Returns + ------- + Figure + """ + from plotly.graph_objs import Contour + + new_trace = Contour( + autocolorscale=autocolorscale, + autocontour=autocontour, + coloraxis=coloraxis, + colorbar=colorbar, + colorscale=colorscale, + connectgaps=connectgaps, + contours=contours, + customdata=customdata, + customdatasrc=customdatasrc, + dx=dx, + dy=dy, + fillcolor=fillcolor, + hoverinfo=hoverinfo, + hoverinfosrc=hoverinfosrc, + hoverlabel=hoverlabel, + hoverongaps=hoverongaps, + hovertemplate=hovertemplate, + hovertemplatefallback=hovertemplatefallback, + hovertemplatesrc=hovertemplatesrc, + hovertext=hovertext, + hovertextsrc=hovertextsrc, + ids=ids, + idssrc=idssrc, + legend=legend, + legendgroup=legendgroup, + legendgrouptitle=legendgrouptitle, + legendrank=legendrank, + legendwidth=legendwidth, + line=line, + meta=meta, + metasrc=metasrc, + name=name, + ncontours=ncontours, + opacity=opacity, + reversescale=reversescale, + showlegend=showlegend, + showscale=showscale, + stream=stream, + text=text, + textfont=textfont, + textsrc=textsrc, + texttemplate=texttemplate, + texttemplatefallback=texttemplatefallback, + transpose=transpose, + uid=uid, + uirevision=uirevision, + visible=visible, + x=x, + x0=x0, + xaxis=xaxis, + xcalendar=xcalendar, + xhoverformat=xhoverformat, + xperiod=xperiod, + xperiod0=xperiod0, + xperiodalignment=xperiodalignment, + xsrc=xsrc, + xtype=xtype, + y=y, + y0=y0, + yaxis=yaxis, + ycalendar=ycalendar, + yhoverformat=yhoverformat, + yperiod=yperiod, + yperiod0=yperiod0, + yperiodalignment=yperiodalignment, + ysrc=ysrc, + ytype=ytype, + z=z, + zauto=zauto, + zhoverformat=zhoverformat, + zmax=zmax, + zmid=zmid, + zmin=zmin, + zorder=zorder, + zsrc=zsrc, + **kwargs, + ) + return self.add_trace(new_trace, row=row, col=col, secondary_y=secondary_y) + + def add_contourcarpet( + self, + a=None, + a0=None, + asrc=None, + atype=None, + autocolorscale=None, + autocontour=None, + b=None, + b0=None, + bsrc=None, + btype=None, + carpet=None, + coloraxis=None, + colorbar=None, + colorscale=None, + contours=None, + customdata=None, + customdatasrc=None, + da=None, + db=None, + fillcolor=None, + hovertext=None, + hovertextsrc=None, + ids=None, + idssrc=None, + legend=None, + legendgroup=None, + legendgrouptitle=None, + legendrank=None, + legendwidth=None, + line=None, + meta=None, + metasrc=None, + name=None, + ncontours=None, + opacity=None, + reversescale=None, + showlegend=None, + showscale=None, + stream=None, + text=None, + textsrc=None, + transpose=None, + uid=None, + uirevision=None, + visible=None, + xaxis=None, + yaxis=None, + z=None, + zauto=None, + zmax=None, + zmid=None, + zmin=None, + zorder=None, + zsrc=None, + row=None, + col=None, + secondary_y=None, + **kwargs, + ) -> "Figure": + """ + Add a new Contourcarpet trace + + Plots contours on either the first carpet axis or the carpet + axis with a matching `carpet` attribute. Data `z` is + interpreted as matching that of the corresponding carpet axis. + + Parameters + ---------- + a + Sets the x coordinates. + a0 + Alternate to `x`. Builds a linear space of x + coordinates. Use with `dx` where `x0` is the starting + coordinate and `dx` the step. + asrc + Sets the source reference on Chart Studio Cloud for + `a`. + atype + If "array", the heatmap's x coordinates are given by + "x" (the default behavior when `x` is provided). If + "scaled", the heatmap's x coordinates are given by "x0" + and "dx" (the default behavior when `x` is not + provided). + autocolorscale + Determines whether the colorscale is a default palette + (`autocolorscale: true`) or the palette determined by + `colorscale`. In case `colorscale` is unspecified or + `autocolorscale` is true, the default palette will be + chosen according to whether numbers in the `color` + array are all positive, all negative or mixed. + autocontour + Determines whether or not the contour level attributes + are picked by an algorithm. If True, the number of + contour levels can be set in `ncontours`. If False, set + the contour level attributes in `contours`. + b + Sets the y coordinates. + b0 + Alternate to `y`. Builds a linear space of y + coordinates. Use with `dy` where `y0` is the starting + coordinate and `dy` the step. + bsrc + Sets the source reference on Chart Studio Cloud for + `b`. + btype + If "array", the heatmap's y coordinates are given by + "y" (the default behavior when `y` is provided) If + "scaled", the heatmap's y coordinates are given by "y0" + and "dy" (the default behavior when `y` is not + provided) + carpet + The `carpet` of the carpet axes on which this contour + trace lies + coloraxis + Sets a reference to a shared color axis. References to + these shared color axes are "coloraxis", "coloraxis2", + "coloraxis3", etc. Settings for these shared color axes + are set in the layout, under `layout.coloraxis`, + `layout.coloraxis2`, etc. Note that multiple color + scales can be linked to the same color axis. + colorbar + :class:`plotly.graph_objects.contourcarpet.ColorBar` + instance or dict with compatible properties + colorscale + Sets the colorscale. The colorscale must be an array + containing arrays mapping a normalized value to an rgb, + rgba, hex, hsl, hsv, or named color string. At minimum, + a mapping for the lowest (0) and highest (1) values are + required. For example, `[[0, 'rgb(0,0,255)'], [1, + 'rgb(255,0,0)']]`. To control the bounds of the + colorscale in color space, use `zmin` and `zmax`. + Alternatively, `colorscale` may be a palette name + string of the following list: Blackbody,Bluered,Blues,C + ividis,Earth,Electric,Greens,Greys,Hot,Jet,Picnic,Portl + and,Rainbow,RdBu,Reds,Viridis,YlGnBu,YlOrRd. + contours + :class:`plotly.graph_objects.contourcarpet.Contours` + instance or dict with compatible properties + customdata + Assigns extra data each datum. This may be useful when + listening to hover, click and selection events. Note + that, "scatter" traces also appends customdata items in + the markers DOM elements + customdatasrc + Sets the source reference on Chart Studio Cloud for + `customdata`. + da + Sets the x coordinate step. See `x0` for more info. + db + Sets the y coordinate step. See `y0` for more info. + fillcolor + Sets the fill color if `contours.type` is "constraint". + Defaults to a half-transparent variant of the line + color, marker color, or marker line color, whichever is + available. + hovertext + Same as `text`. + hovertextsrc + Sets the source reference on Chart Studio Cloud for + `hovertext`. + ids + Assigns id labels to each datum. These ids for object + constancy of data points during animation. Should be an + array of strings, not numbers or any other type. + idssrc + Sets the source reference on Chart Studio Cloud for + `ids`. + legend + Sets the reference to a legend to show this trace in. + References to these legends are "legend", "legend2", + "legend3", etc. Settings for these legends are set in + the layout, under `layout.legend`, `layout.legend2`, + etc. + legendgroup + Sets the legend group for this trace. Traces and shapes + part of the same legend group hide/show at the same + time when toggling legend items. + legendgrouptitle + :class:`plotly.graph_objects.contourcarpet.Legendgroupt + itle` instance or dict with compatible properties + legendrank + Sets the legend rank for this trace. Items and groups + with smaller ranks are presented on top/left side while + with "reversed" `legend.traceorder` they are on + bottom/right side. The default legendrank is 1000, so + that you can use ranks less than 1000 to place certain + items before all unranked items, and ranks greater than + 1000 to go after all unranked items. When having + unranked or equal rank items shapes would be displayed + after traces i.e. according to their order in data and + layout. + legendwidth + Sets the width (in px or fraction) of the legend for + this trace. + line + :class:`plotly.graph_objects.contourcarpet.Line` + instance or dict with compatible properties + meta + Assigns extra meta information associated with this + trace that can be used in various text attributes. + Attributes such as trace `name`, graph, axis and + colorbar `title.text`, annotation `text` + `rangeselector`, `updatemenues` and `sliders` `label` + text all support `meta`. To access the trace `meta` + values in an attribute in the same trace, simply use + `%{meta[i]}` where `i` is the index or key of the + `meta` item in question. To access trace `meta` in + layout attributes, use `%{data[n[.meta[i]}` where `i` + is the index or key of the `meta` and `n` is the trace + index. + metasrc + Sets the source reference on Chart Studio Cloud for + `meta`. + name + Sets the trace name. The trace name appears as the + legend item and on hover. + ncontours + Sets the maximum number of contour levels. The actual + number of contours will be chosen automatically to be + less than or equal to the value of `ncontours`. Has an + effect only if `autocontour` is True or if + `contours.size` is missing. + opacity + Sets the opacity of the trace. + reversescale + Reverses the color mapping if true. If true, `zmin` + will correspond to the last color in the array and + `zmax` will correspond to the first color. + showlegend + Determines whether or not an item corresponding to this + trace is shown in the legend. + showscale + Determines whether or not a colorbar is displayed for + this trace. + stream + :class:`plotly.graph_objects.contourcarpet.Stream` + instance or dict with compatible properties + text + Sets the text elements associated with each z value. + textsrc + Sets the source reference on Chart Studio Cloud for + `text`. + transpose + Transposes the z data. + uid + Assign an id to this trace, Use this to provide object + constancy between traces during animations and + transitions. + uirevision + Controls persistence of some user-driven changes to the + trace: `constraintrange` in `parcoords` traces, as well + as some `editable: true` modifications such as `name` + and `colorbar.title`. Defaults to `layout.uirevision`. + Note that other user-driven trace attribute changes are + controlled by `layout` attributes: `trace.visible` is + controlled by `layout.legend.uirevision`, + `selectedpoints` is controlled by + `layout.selectionrevision`, and `colorbar.(x|y)` + (accessible with `config: {editable: true}`) is + controlled by `layout.editrevision`. Trace changes are + tracked by `uid`, which only falls back on trace index + if no `uid` is provided. So if your app can add/remove + traces before the end of the `data` array, such that + the same trace has a different index, you can still + preserve user-driven changes if you give each trace a + `uid` that stays with it as it moves. + visible + Determines whether or not this trace is visible. If + "legendonly", the trace is not drawn, but can appear as + a legend item (provided that the legend itself is + visible). + xaxis + Sets a reference between this trace's x coordinates and + a 2D cartesian x axis. If "x" (the default value), the + x coordinates refer to `layout.xaxis`. If "x2", the x + coordinates refer to `layout.xaxis2`, and so on. + yaxis + Sets a reference between this trace's y coordinates and + a 2D cartesian y axis. If "y" (the default value), the + y coordinates refer to `layout.yaxis`. If "y2", the y + coordinates refer to `layout.yaxis2`, and so on. + z + Sets the z data. + zauto + Determines whether or not the color domain is computed + with respect to the input data (here in `z`) or the + bounds set in `zmin` and `zmax` Defaults to `false` + when `zmin` and `zmax` are set by the user. + zmax + Sets the upper bound of the color domain. Value should + have the same units as in `z` and if set, `zmin` must + be set as well. + zmid + Sets the mid-point of the color domain by scaling + `zmin` and/or `zmax` to be equidistant to this point. + Value should have the same units as in `z`. Has no + effect when `zauto` is `false`. + zmin + Sets the lower bound of the color domain. Value should + have the same units as in `z` and if set, `zmax` must + be set as well. + zorder + Sets the layer on which this trace is displayed, + relative to other SVG traces on the same subplot. SVG + traces with higher `zorder` appear in front of those + with lower `zorder`. + zsrc + Sets the source reference on Chart Studio Cloud for + `z`. + row : 'all', int or None (default) + Subplot row index (starting from 1) for the trace to be + added. Only valid if figure was created using + `plotly.tools.make_subplots`.If 'all', addresses all + rows in the specified column(s). + col : 'all', int or None (default) + Subplot col index (starting from 1) for the trace to be + added. Only valid if figure was created using + `plotly.tools.make_subplots`.If 'all', addresses all + columns in the specified row(s). + secondary_y: boolean or None (default None) + If True, associate this trace with the secondary y-axis of the + subplot at the specified row and col. Only valid if all of the + following conditions are satisfied: + * The figure was created using `plotly.subplots.make_subplots`. + * The row and col arguments are not None + * The subplot at the specified row and col has type xy + (which is the default) and secondary_y True. These + properties are specified in the specs argument to + make_subplots. See the make_subplots docstring for more info. + + Returns + ------- + Figure + """ + from plotly.graph_objs import Contourcarpet + + new_trace = Contourcarpet( + a=a, + a0=a0, + asrc=asrc, + atype=atype, + autocolorscale=autocolorscale, + autocontour=autocontour, + b=b, + b0=b0, + bsrc=bsrc, + btype=btype, + carpet=carpet, + coloraxis=coloraxis, + colorbar=colorbar, + colorscale=colorscale, + contours=contours, + customdata=customdata, + customdatasrc=customdatasrc, + da=da, + db=db, + fillcolor=fillcolor, + hovertext=hovertext, + hovertextsrc=hovertextsrc, + ids=ids, + idssrc=idssrc, + legend=legend, + legendgroup=legendgroup, + legendgrouptitle=legendgrouptitle, + legendrank=legendrank, + legendwidth=legendwidth, + line=line, + meta=meta, + metasrc=metasrc, + name=name, + ncontours=ncontours, + opacity=opacity, + reversescale=reversescale, + showlegend=showlegend, + showscale=showscale, + stream=stream, + text=text, + textsrc=textsrc, + transpose=transpose, + uid=uid, + uirevision=uirevision, + visible=visible, + xaxis=xaxis, + yaxis=yaxis, + z=z, + zauto=zauto, + zmax=zmax, + zmid=zmid, + zmin=zmin, + zorder=zorder, + zsrc=zsrc, + **kwargs, + ) + return self.add_trace(new_trace, row=row, col=col, secondary_y=secondary_y) + + def add_densitymap( + self, + autocolorscale=None, + below=None, + coloraxis=None, + colorbar=None, + colorscale=None, + customdata=None, + customdatasrc=None, + hoverinfo=None, + hoverinfosrc=None, + hoverlabel=None, + hovertemplate=None, + hovertemplatefallback=None, + hovertemplatesrc=None, + hovertext=None, + hovertextsrc=None, + ids=None, + idssrc=None, + lat=None, + latsrc=None, + legend=None, + legendgroup=None, + legendgrouptitle=None, + legendrank=None, + legendwidth=None, + lon=None, + lonsrc=None, + meta=None, + metasrc=None, + name=None, + opacity=None, + radius=None, + radiussrc=None, + reversescale=None, + showlegend=None, + showscale=None, + stream=None, + subplot=None, + text=None, + textsrc=None, + uid=None, + uirevision=None, + visible=None, + z=None, + zauto=None, + zmax=None, + zmid=None, + zmin=None, + zsrc=None, + row=None, + col=None, + **kwargs, + ) -> "Figure": + """ + Add a new Densitymap trace + + Draws a bivariate kernel density estimation with a Gaussian + kernel from `lon` and `lat` coordinates and optional `z` values + using a colorscale. + + Parameters + ---------- + autocolorscale + Determines whether the colorscale is a default palette + (`autocolorscale: true`) or the palette determined by + `colorscale`. In case `colorscale` is unspecified or + `autocolorscale` is true, the default palette will be + chosen according to whether numbers in the `color` + array are all positive, all negative or mixed. + below + Determines if the densitymap trace will be inserted + before the layer with the specified ID. By default, + densitymap traces are placed below the first layer of + type symbol If set to '', the layer will be inserted + above every existing layer. + coloraxis + Sets a reference to a shared color axis. References to + these shared color axes are "coloraxis", "coloraxis2", + "coloraxis3", etc. Settings for these shared color axes + are set in the layout, under `layout.coloraxis`, + `layout.coloraxis2`, etc. Note that multiple color + scales can be linked to the same color axis. + colorbar + :class:`plotly.graph_objects.densitymap.ColorBar` + instance or dict with compatible properties + colorscale + Sets the colorscale. The colorscale must be an array + containing arrays mapping a normalized value to an rgb, + rgba, hex, hsl, hsv, or named color string. At minimum, + a mapping for the lowest (0) and highest (1) values are + required. For example, `[[0, 'rgb(0,0,255)'], [1, + 'rgb(255,0,0)']]`. To control the bounds of the + colorscale in color space, use `zmin` and `zmax`. + Alternatively, `colorscale` may be a palette name + string of the following list: Blackbody,Bluered,Blues,C + ividis,Earth,Electric,Greens,Greys,Hot,Jet,Picnic,Portl + and,Rainbow,RdBu,Reds,Viridis,YlGnBu,YlOrRd. + customdata + Assigns extra data each datum. This may be useful when + listening to hover, click and selection events. Note + that, "scatter" traces also appends customdata items in + the markers DOM elements + customdatasrc + Sets the source reference on Chart Studio Cloud for + `customdata`. + hoverinfo + Determines which trace information appear on hover. If + `none` or `skip` are set, no information is displayed + upon hovering. But, if `none` is set, click and hover + events are still fired. + hoverinfosrc + Sets the source reference on Chart Studio Cloud for + `hoverinfo`. + hoverlabel + :class:`plotly.graph_objects.densitymap.Hoverlabel` + instance or dict with compatible properties + hovertemplate + Template string used for rendering the information that + appear on hover box. Note that this will override + `hoverinfo`. Variables are inserted using %{variable}, + for example "y: %{y}" as well as %{xother}, {%_xother}, + {%_xother_}, {%xother_}. When showing info for several + points, "xother" will be added to those with different + x positions from the first point. An underscore before + or after "(x|y)other" will add a space on that side, + only when this field is shown. Numbers are formatted + using d3-format's syntax %{variable:d3-format}, for + example "Price: %{y:$.2f}". + https://github.com/d3/d3-format/tree/v1.4.5#d3-format + for details on the formatting syntax. Dates are + formatted using d3-time-format's syntax + %{variable|d3-time-format}, for example "Day: + %{2019-01-01|%A}". https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format for details on the + date formatting syntax. Variables that can't be found + will be replaced with the specifier. For example, a + template of "data: %{x}, %{y}" will result in a value + of "data: 1, %{y}" if x is 1 and y is missing. + Variables with an undefined value will be replaced with + the fallback value. The variables available in + `hovertemplate` are the ones emitted as event data + described at this link + https://plotly.com/javascript/plotlyjs-events/#event- + data. Additionally, all attributes that can be + specified per-point (the ones that are `arrayOk: true`) + are available. Anything contained in tag `` is + displayed in the secondary box, for example + `%{fullData.name}`. To hide the + secondary box completely, use an empty tag + ``. + hovertemplatefallback + Fallback string that's displayed when a variable + referenced in a template is missing. If the boolean + value 'false' is passed in, the specifier with the + missing variable will be displayed. + hovertemplatesrc + Sets the source reference on Chart Studio Cloud for + `hovertemplate`. + hovertext + Sets hover text elements associated with each (lon,lat) + pair If a single string, the same string appears over + all the data points. If an array of string, the items + are mapped in order to the this trace's (lon,lat) + coordinates. To be seen, trace `hoverinfo` must contain + a "text" flag. + hovertextsrc + Sets the source reference on Chart Studio Cloud for + `hovertext`. + ids + Assigns id labels to each datum. These ids for object + constancy of data points during animation. Should be an + array of strings, not numbers or any other type. + idssrc + Sets the source reference on Chart Studio Cloud for + `ids`. + lat + Sets the latitude coordinates (in degrees North). + latsrc + Sets the source reference on Chart Studio Cloud for + `lat`. + legend + Sets the reference to a legend to show this trace in. + References to these legends are "legend", "legend2", + "legend3", etc. Settings for these legends are set in + the layout, under `layout.legend`, `layout.legend2`, + etc. + legendgroup + Sets the legend group for this trace. Traces and shapes + part of the same legend group hide/show at the same + time when toggling legend items. + legendgrouptitle + :class:`plotly.graph_objects.densitymap.Legendgrouptitl + e` instance or dict with compatible properties + legendrank + Sets the legend rank for this trace. Items and groups + with smaller ranks are presented on top/left side while + with "reversed" `legend.traceorder` they are on + bottom/right side. The default legendrank is 1000, so + that you can use ranks less than 1000 to place certain + items before all unranked items, and ranks greater than + 1000 to go after all unranked items. When having + unranked or equal rank items shapes would be displayed + after traces i.e. according to their order in data and + layout. + legendwidth + Sets the width (in px or fraction) of the legend for + this trace. + lon + Sets the longitude coordinates (in degrees East). + lonsrc + Sets the source reference on Chart Studio Cloud for + `lon`. + meta + Assigns extra meta information associated with this + trace that can be used in various text attributes. + Attributes such as trace `name`, graph, axis and + colorbar `title.text`, annotation `text` + `rangeselector`, `updatemenues` and `sliders` `label` + text all support `meta`. To access the trace `meta` + values in an attribute in the same trace, simply use + `%{meta[i]}` where `i` is the index or key of the + `meta` item in question. To access trace `meta` in + layout attributes, use `%{data[n[.meta[i]}` where `i` + is the index or key of the `meta` and `n` is the trace + index. + metasrc + Sets the source reference on Chart Studio Cloud for + `meta`. + name + Sets the trace name. The trace name appears as the + legend item and on hover. + opacity + Sets the opacity of the trace. + radius + Sets the radius of influence of one `lon` / `lat` point + in pixels. Increasing the value makes the densitymap + trace smoother, but less detailed. + radiussrc + Sets the source reference on Chart Studio Cloud for + `radius`. + reversescale + Reverses the color mapping if true. If true, `zmin` + will correspond to the last color in the array and + `zmax` will correspond to the first color. + showlegend + Determines whether or not an item corresponding to this + trace is shown in the legend. + showscale + Determines whether or not a colorbar is displayed for + this trace. + stream + :class:`plotly.graph_objects.densitymap.Stream` + instance or dict with compatible properties + subplot + Sets a reference between this trace's data coordinates + and a map subplot. If "map" (the default value), the + data refer to `layout.map`. If "map2", the data refer + to `layout.map2`, and so on. + text + Sets text elements associated with each (lon,lat) pair + If a single string, the same string appears over all + the data points. If an array of string, the items are + mapped in order to the this trace's (lon,lat) + coordinates. If trace `hoverinfo` contains a "text" + flag and "hovertext" is not set, these elements will be + seen in the hover labels. + textsrc + Sets the source reference on Chart Studio Cloud for + `text`. + uid + Assign an id to this trace, Use this to provide object + constancy between traces during animations and + transitions. + uirevision + Controls persistence of some user-driven changes to the + trace: `constraintrange` in `parcoords` traces, as well + as some `editable: true` modifications such as `name` + and `colorbar.title`. Defaults to `layout.uirevision`. + Note that other user-driven trace attribute changes are + controlled by `layout` attributes: `trace.visible` is + controlled by `layout.legend.uirevision`, + `selectedpoints` is controlled by + `layout.selectionrevision`, and `colorbar.(x|y)` + (accessible with `config: {editable: true}`) is + controlled by `layout.editrevision`. Trace changes are + tracked by `uid`, which only falls back on trace index + if no `uid` is provided. So if your app can add/remove + traces before the end of the `data` array, such that + the same trace has a different index, you can still + preserve user-driven changes if you give each trace a + `uid` that stays with it as it moves. + visible + Determines whether or not this trace is visible. If + "legendonly", the trace is not drawn, but can appear as + a legend item (provided that the legend itself is + visible). + z + Sets the points' weight. For example, a value of 10 + would be equivalent to having 10 points of weight 1 in + the same spot + zauto + Determines whether or not the color domain is computed + with respect to the input data (here in `z`) or the + bounds set in `zmin` and `zmax` Defaults to `false` + when `zmin` and `zmax` are set by the user. + zmax + Sets the upper bound of the color domain. Value should + have the same units as in `z` and if set, `zmin` must + be set as well. + zmid + Sets the mid-point of the color domain by scaling + `zmin` and/or `zmax` to be equidistant to this point. + Value should have the same units as in `z`. Has no + effect when `zauto` is `false`. + zmin + Sets the lower bound of the color domain. Value should + have the same units as in `z` and if set, `zmax` must + be set as well. + zsrc + Sets the source reference on Chart Studio Cloud for + `z`. + row : 'all', int or None (default) + Subplot row index (starting from 1) for the trace to be + added. Only valid if figure was created using + `plotly.tools.make_subplots`.If 'all', addresses all + rows in the specified column(s). + col : 'all', int or None (default) + Subplot col index (starting from 1) for the trace to be + added. Only valid if figure was created using + `plotly.tools.make_subplots`.If 'all', addresses all + columns in the specified row(s). + + Returns + ------- + Figure + """ + from plotly.graph_objs import Densitymap + + new_trace = Densitymap( + autocolorscale=autocolorscale, + below=below, + coloraxis=coloraxis, + colorbar=colorbar, + colorscale=colorscale, + customdata=customdata, + customdatasrc=customdatasrc, + hoverinfo=hoverinfo, + hoverinfosrc=hoverinfosrc, + hoverlabel=hoverlabel, + hovertemplate=hovertemplate, + hovertemplatefallback=hovertemplatefallback, + hovertemplatesrc=hovertemplatesrc, + hovertext=hovertext, + hovertextsrc=hovertextsrc, + ids=ids, + idssrc=idssrc, + lat=lat, + latsrc=latsrc, + legend=legend, + legendgroup=legendgroup, + legendgrouptitle=legendgrouptitle, + legendrank=legendrank, + legendwidth=legendwidth, + lon=lon, + lonsrc=lonsrc, + meta=meta, + metasrc=metasrc, + name=name, + opacity=opacity, + radius=radius, + radiussrc=radiussrc, + reversescale=reversescale, + showlegend=showlegend, + showscale=showscale, + stream=stream, + subplot=subplot, + text=text, + textsrc=textsrc, + uid=uid, + uirevision=uirevision, + visible=visible, + z=z, + zauto=zauto, + zmax=zmax, + zmid=zmid, + zmin=zmin, + zsrc=zsrc, + **kwargs, + ) + return self.add_trace(new_trace, row=row, col=col) + + def add_densitymapbox( + self, + autocolorscale=None, + below=None, + coloraxis=None, + colorbar=None, + colorscale=None, + customdata=None, + customdatasrc=None, + hoverinfo=None, + hoverinfosrc=None, + hoverlabel=None, + hovertemplate=None, + hovertemplatefallback=None, + hovertemplatesrc=None, + hovertext=None, + hovertextsrc=None, + ids=None, + idssrc=None, + lat=None, + latsrc=None, + legend=None, + legendgroup=None, + legendgrouptitle=None, + legendrank=None, + legendwidth=None, + lon=None, + lonsrc=None, + meta=None, + metasrc=None, + name=None, + opacity=None, + radius=None, + radiussrc=None, + reversescale=None, + showlegend=None, + showscale=None, + stream=None, + subplot=None, + text=None, + textsrc=None, + uid=None, + uirevision=None, + visible=None, + z=None, + zauto=None, + zmax=None, + zmid=None, + zmin=None, + zsrc=None, + row=None, + col=None, + **kwargs, + ) -> "Figure": + """ + Add a new Densitymapbox trace + + "densitymapbox" trace is deprecated! Please consider switching + to the "densitymap" trace type and `map` subplots. Learn more + at: https://plotly.com/python/maplibre-migration/ as well as + https://plotly.com/javascript/maplibre-migration/ Draws a + bivariate kernel density estimation with a Gaussian kernel from + `lon` and `lat` coordinates and optional `z` values using a + colorscale. + + Parameters + ---------- + autocolorscale + Determines whether the colorscale is a default palette + (`autocolorscale: true`) or the palette determined by + `colorscale`. In case `colorscale` is unspecified or + `autocolorscale` is true, the default palette will be + chosen according to whether numbers in the `color` + array are all positive, all negative or mixed. + below + Determines if the densitymapbox trace will be inserted + before the layer with the specified ID. By default, + densitymapbox traces are placed below the first layer + of type symbol If set to '', the layer will be inserted + above every existing layer. + coloraxis + Sets a reference to a shared color axis. References to + these shared color axes are "coloraxis", "coloraxis2", + "coloraxis3", etc. Settings for these shared color axes + are set in the layout, under `layout.coloraxis`, + `layout.coloraxis2`, etc. Note that multiple color + scales can be linked to the same color axis. + colorbar + :class:`plotly.graph_objects.densitymapbox.ColorBar` + instance or dict with compatible properties + colorscale + Sets the colorscale. The colorscale must be an array + containing arrays mapping a normalized value to an rgb, + rgba, hex, hsl, hsv, or named color string. At minimum, + a mapping for the lowest (0) and highest (1) values are + required. For example, `[[0, 'rgb(0,0,255)'], [1, + 'rgb(255,0,0)']]`. To control the bounds of the + colorscale in color space, use `zmin` and `zmax`. + Alternatively, `colorscale` may be a palette name + string of the following list: Blackbody,Bluered,Blues,C + ividis,Earth,Electric,Greens,Greys,Hot,Jet,Picnic,Portl + and,Rainbow,RdBu,Reds,Viridis,YlGnBu,YlOrRd. + customdata + Assigns extra data each datum. This may be useful when + listening to hover, click and selection events. Note + that, "scatter" traces also appends customdata items in + the markers DOM elements + customdatasrc + Sets the source reference on Chart Studio Cloud for + `customdata`. + hoverinfo + Determines which trace information appear on hover. If + `none` or `skip` are set, no information is displayed + upon hovering. But, if `none` is set, click and hover + events are still fired. + hoverinfosrc + Sets the source reference on Chart Studio Cloud for + `hoverinfo`. + hoverlabel + :class:`plotly.graph_objects.densitymapbox.Hoverlabel` + instance or dict with compatible properties + hovertemplate + Template string used for rendering the information that + appear on hover box. Note that this will override + `hoverinfo`. Variables are inserted using %{variable}, + for example "y: %{y}" as well as %{xother}, {%_xother}, + {%_xother_}, {%xother_}. When showing info for several + points, "xother" will be added to those with different + x positions from the first point. An underscore before + or after "(x|y)other" will add a space on that side, + only when this field is shown. Numbers are formatted + using d3-format's syntax %{variable:d3-format}, for + example "Price: %{y:$.2f}". + https://github.com/d3/d3-format/tree/v1.4.5#d3-format + for details on the formatting syntax. Dates are + formatted using d3-time-format's syntax + %{variable|d3-time-format}, for example "Day: + %{2019-01-01|%A}". https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format for details on the + date formatting syntax. Variables that can't be found + will be replaced with the specifier. For example, a + template of "data: %{x}, %{y}" will result in a value + of "data: 1, %{y}" if x is 1 and y is missing. + Variables with an undefined value will be replaced with + the fallback value. The variables available in + `hovertemplate` are the ones emitted as event data + described at this link + https://plotly.com/javascript/plotlyjs-events/#event- + data. Additionally, all attributes that can be + specified per-point (the ones that are `arrayOk: true`) + are available. Anything contained in tag `` is + displayed in the secondary box, for example + `%{fullData.name}`. To hide the + secondary box completely, use an empty tag + ``. + hovertemplatefallback + Fallback string that's displayed when a variable + referenced in a template is missing. If the boolean + value 'false' is passed in, the specifier with the + missing variable will be displayed. + hovertemplatesrc + Sets the source reference on Chart Studio Cloud for + `hovertemplate`. + hovertext + Sets hover text elements associated with each (lon,lat) + pair If a single string, the same string appears over + all the data points. If an array of string, the items + are mapped in order to the this trace's (lon,lat) + coordinates. To be seen, trace `hoverinfo` must contain + a "text" flag. + hovertextsrc + Sets the source reference on Chart Studio Cloud for + `hovertext`. + ids + Assigns id labels to each datum. These ids for object + constancy of data points during animation. Should be an + array of strings, not numbers or any other type. + idssrc + Sets the source reference on Chart Studio Cloud for + `ids`. + lat + Sets the latitude coordinates (in degrees North). + latsrc + Sets the source reference on Chart Studio Cloud for + `lat`. + legend + Sets the reference to a legend to show this trace in. + References to these legends are "legend", "legend2", + "legend3", etc. Settings for these legends are set in + the layout, under `layout.legend`, `layout.legend2`, + etc. + legendgroup + Sets the legend group for this trace. Traces and shapes + part of the same legend group hide/show at the same + time when toggling legend items. + legendgrouptitle + :class:`plotly.graph_objects.densitymapbox.Legendgroupt + itle` instance or dict with compatible properties + legendrank + Sets the legend rank for this trace. Items and groups + with smaller ranks are presented on top/left side while + with "reversed" `legend.traceorder` they are on + bottom/right side. The default legendrank is 1000, so + that you can use ranks less than 1000 to place certain + items before all unranked items, and ranks greater than + 1000 to go after all unranked items. When having + unranked or equal rank items shapes would be displayed + after traces i.e. according to their order in data and + layout. + legendwidth + Sets the width (in px or fraction) of the legend for + this trace. + lon + Sets the longitude coordinates (in degrees East). + lonsrc + Sets the source reference on Chart Studio Cloud for + `lon`. + meta + Assigns extra meta information associated with this + trace that can be used in various text attributes. + Attributes such as trace `name`, graph, axis and + colorbar `title.text`, annotation `text` + `rangeselector`, `updatemenues` and `sliders` `label` + text all support `meta`. To access the trace `meta` + values in an attribute in the same trace, simply use + `%{meta[i]}` where `i` is the index or key of the + `meta` item in question. To access trace `meta` in + layout attributes, use `%{data[n[.meta[i]}` where `i` + is the index or key of the `meta` and `n` is the trace + index. + metasrc + Sets the source reference on Chart Studio Cloud for + `meta`. + name + Sets the trace name. The trace name appears as the + legend item and on hover. + opacity + Sets the opacity of the trace. + radius + Sets the radius of influence of one `lon` / `lat` point + in pixels. Increasing the value makes the densitymapbox + trace smoother, but less detailed. + radiussrc + Sets the source reference on Chart Studio Cloud for + `radius`. + reversescale + Reverses the color mapping if true. If true, `zmin` + will correspond to the last color in the array and + `zmax` will correspond to the first color. + showlegend + Determines whether or not an item corresponding to this + trace is shown in the legend. + showscale + Determines whether or not a colorbar is displayed for + this trace. + stream + :class:`plotly.graph_objects.densitymapbox.Stream` + instance or dict with compatible properties + subplot + mapbox subplots and traces are deprecated! Please + consider switching to `map` subplots and traces. Learn + more at: https://plotly.com/python/maplibre-migration/ + as well as https://plotly.com/javascript/maplibre- + migration/ Sets a reference between this trace's data + coordinates and a mapbox subplot. If "mapbox" (the + default value), the data refer to `layout.mapbox`. If + "mapbox2", the data refer to `layout.mapbox2`, and so + on. + text + Sets text elements associated with each (lon,lat) pair + If a single string, the same string appears over all + the data points. If an array of string, the items are + mapped in order to the this trace's (lon,lat) + coordinates. If trace `hoverinfo` contains a "text" + flag and "hovertext" is not set, these elements will be + seen in the hover labels. + textsrc + Sets the source reference on Chart Studio Cloud for + `text`. + uid + Assign an id to this trace, Use this to provide object + constancy between traces during animations and + transitions. + uirevision + Controls persistence of some user-driven changes to the + trace: `constraintrange` in `parcoords` traces, as well + as some `editable: true` modifications such as `name` + and `colorbar.title`. Defaults to `layout.uirevision`. + Note that other user-driven trace attribute changes are + controlled by `layout` attributes: `trace.visible` is + controlled by `layout.legend.uirevision`, + `selectedpoints` is controlled by + `layout.selectionrevision`, and `colorbar.(x|y)` + (accessible with `config: {editable: true}`) is + controlled by `layout.editrevision`. Trace changes are + tracked by `uid`, which only falls back on trace index + if no `uid` is provided. So if your app can add/remove + traces before the end of the `data` array, such that + the same trace has a different index, you can still + preserve user-driven changes if you give each trace a + `uid` that stays with it as it moves. + visible + Determines whether or not this trace is visible. If + "legendonly", the trace is not drawn, but can appear as + a legend item (provided that the legend itself is + visible). + z + Sets the points' weight. For example, a value of 10 + would be equivalent to having 10 points of weight 1 in + the same spot + zauto + Determines whether or not the color domain is computed + with respect to the input data (here in `z`) or the + bounds set in `zmin` and `zmax` Defaults to `false` + when `zmin` and `zmax` are set by the user. + zmax + Sets the upper bound of the color domain. Value should + have the same units as in `z` and if set, `zmin` must + be set as well. + zmid + Sets the mid-point of the color domain by scaling + `zmin` and/or `zmax` to be equidistant to this point. + Value should have the same units as in `z`. Has no + effect when `zauto` is `false`. + zmin + Sets the lower bound of the color domain. Value should + have the same units as in `z` and if set, `zmax` must + be set as well. + zsrc + Sets the source reference on Chart Studio Cloud for + `z`. + row : 'all', int or None (default) + Subplot row index (starting from 1) for the trace to be + added. Only valid if figure was created using + `plotly.tools.make_subplots`.If 'all', addresses all + rows in the specified column(s). + col : 'all', int or None (default) + Subplot col index (starting from 1) for the trace to be + added. Only valid if figure was created using + `plotly.tools.make_subplots`.If 'all', addresses all + columns in the specified row(s). + + Returns + ------- + Figure + """ + from plotly.graph_objs import Densitymapbox + + new_trace = Densitymapbox( + autocolorscale=autocolorscale, + below=below, + coloraxis=coloraxis, + colorbar=colorbar, + colorscale=colorscale, + customdata=customdata, + customdatasrc=customdatasrc, + hoverinfo=hoverinfo, + hoverinfosrc=hoverinfosrc, + hoverlabel=hoverlabel, + hovertemplate=hovertemplate, + hovertemplatefallback=hovertemplatefallback, + hovertemplatesrc=hovertemplatesrc, + hovertext=hovertext, + hovertextsrc=hovertextsrc, + ids=ids, + idssrc=idssrc, + lat=lat, + latsrc=latsrc, + legend=legend, + legendgroup=legendgroup, + legendgrouptitle=legendgrouptitle, + legendrank=legendrank, + legendwidth=legendwidth, + lon=lon, + lonsrc=lonsrc, + meta=meta, + metasrc=metasrc, + name=name, + opacity=opacity, + radius=radius, + radiussrc=radiussrc, + reversescale=reversescale, + showlegend=showlegend, + showscale=showscale, + stream=stream, + subplot=subplot, + text=text, + textsrc=textsrc, + uid=uid, + uirevision=uirevision, + visible=visible, + z=z, + zauto=zauto, + zmax=zmax, + zmid=zmid, + zmin=zmin, + zsrc=zsrc, + **kwargs, + ) + return self.add_trace(new_trace, row=row, col=col) + + def add_funnel( + self, + alignmentgroup=None, + cliponaxis=None, + connector=None, + constraintext=None, + customdata=None, + customdatasrc=None, + dx=None, + dy=None, + hoverinfo=None, + hoverinfosrc=None, + hoverlabel=None, + hovertemplate=None, + hovertemplatefallback=None, + hovertemplatesrc=None, + hovertext=None, + hovertextsrc=None, + ids=None, + idssrc=None, + insidetextanchor=None, + insidetextfont=None, + legend=None, + legendgroup=None, + legendgrouptitle=None, + legendrank=None, + legendwidth=None, + marker=None, + meta=None, + metasrc=None, + name=None, + offset=None, + offsetgroup=None, + opacity=None, + orientation=None, + outsidetextfont=None, + selectedpoints=None, + showlegend=None, + stream=None, + text=None, + textangle=None, + textfont=None, + textinfo=None, + textposition=None, + textpositionsrc=None, + textsrc=None, + texttemplate=None, + texttemplatefallback=None, + texttemplatesrc=None, + uid=None, + uirevision=None, + visible=None, + width=None, + x=None, + x0=None, + xaxis=None, + xhoverformat=None, + xperiod=None, + xperiod0=None, + xperiodalignment=None, + xsrc=None, + y=None, + y0=None, + yaxis=None, + yhoverformat=None, + yperiod=None, + yperiod0=None, + yperiodalignment=None, + ysrc=None, + zorder=None, + row=None, + col=None, + secondary_y=None, + **kwargs, + ) -> "Figure": + """ + Add a new Funnel trace + + Visualize stages in a process using length-encoded bars. This + trace can be used to show data in either a part-to-whole + representation wherein each item appears in a single stage, or + in a "drop-off" representation wherein each item appears in + each stage it traversed. See also the "funnelarea" trace type + for a different approach to visualizing funnel data. + + Parameters + ---------- + alignmentgroup + Set several traces linked to the same position axis or + matching axes to the same alignmentgroup. This controls + whether bars compute their positional range dependently + or independently. + cliponaxis + Determines whether the text nodes are clipped about the + subplot axes. To show the text nodes above axis lines + and tick labels, make sure to set `xaxis.layer` and + `yaxis.layer` to *below traces*. + connector + :class:`plotly.graph_objects.funnel.Connector` instance + or dict with compatible properties + constraintext + Constrain the size of text inside or outside a bar to + be no larger than the bar itself. + customdata + Assigns extra data each datum. This may be useful when + listening to hover, click and selection events. Note + that, "scatter" traces also appends customdata items in + the markers DOM elements + customdatasrc + Sets the source reference on Chart Studio Cloud for + `customdata`. + dx + Sets the x coordinate step. See `x0` for more info. + dy + Sets the y coordinate step. See `y0` for more info. + hoverinfo + Determines which trace information appear on hover. If + `none` or `skip` are set, no information is displayed + upon hovering. But, if `none` is set, click and hover + events are still fired. + hoverinfosrc + Sets the source reference on Chart Studio Cloud for + `hoverinfo`. + hoverlabel + :class:`plotly.graph_objects.funnel.Hoverlabel` + instance or dict with compatible properties + hovertemplate + Template string used for rendering the information that + appear on hover box. Note that this will override + `hoverinfo`. Variables are inserted using %{variable}, + for example "y: %{y}" as well as %{xother}, {%_xother}, + {%_xother_}, {%xother_}. When showing info for several + points, "xother" will be added to those with different + x positions from the first point. An underscore before + or after "(x|y)other" will add a space on that side, + only when this field is shown. Numbers are formatted + using d3-format's syntax %{variable:d3-format}, for + example "Price: %{y:$.2f}". + https://github.com/d3/d3-format/tree/v1.4.5#d3-format + for details on the formatting syntax. Dates are + formatted using d3-time-format's syntax + %{variable|d3-time-format}, for example "Day: + %{2019-01-01|%A}". https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format for details on the + date formatting syntax. Variables that can't be found + will be replaced with the specifier. For example, a + template of "data: %{x}, %{y}" will result in a value + of "data: 1, %{y}" if x is 1 and y is missing. + Variables with an undefined value will be replaced with + the fallback value. The variables available in + `hovertemplate` are the ones emitted as event data + described at this link + https://plotly.com/javascript/plotlyjs-events/#event- + data. Additionally, all attributes that can be + specified per-point (the ones that are `arrayOk: true`) + are available. Finally, the template string has access + to variables `percentInitial`, `percentPrevious` and + `percentTotal`. Anything contained in tag `` is + displayed in the secondary box, for example + `%{fullData.name}`. To hide the + secondary box completely, use an empty tag + ``. + hovertemplatefallback + Fallback string that's displayed when a variable + referenced in a template is missing. If the boolean + value 'false' is passed in, the specifier with the + missing variable will be displayed. + hovertemplatesrc + Sets the source reference on Chart Studio Cloud for + `hovertemplate`. + hovertext + Sets hover text elements associated with each (x,y) + pair. If a single string, the same string appears over + all the data points. If an array of string, the items + are mapped in order to the this trace's (x,y) + coordinates. To be seen, trace `hoverinfo` must contain + a "text" flag. + hovertextsrc + Sets the source reference on Chart Studio Cloud for + `hovertext`. + ids + Assigns id labels to each datum. These ids for object + constancy of data points during animation. Should be an + array of strings, not numbers or any other type. + idssrc + Sets the source reference on Chart Studio Cloud for + `ids`. + insidetextanchor + Determines if texts are kept at center or start/end + points in `textposition` "inside" mode. + insidetextfont + Sets the font used for `text` lying inside the bar. + legend + Sets the reference to a legend to show this trace in. + References to these legends are "legend", "legend2", + "legend3", etc. Settings for these legends are set in + the layout, under `layout.legend`, `layout.legend2`, + etc. + legendgroup + Sets the legend group for this trace. Traces and shapes + part of the same legend group hide/show at the same + time when toggling legend items. + legendgrouptitle + :class:`plotly.graph_objects.funnel.Legendgrouptitle` + instance or dict with compatible properties + legendrank + Sets the legend rank for this trace. Items and groups + with smaller ranks are presented on top/left side while + with "reversed" `legend.traceorder` they are on + bottom/right side. The default legendrank is 1000, so + that you can use ranks less than 1000 to place certain + items before all unranked items, and ranks greater than + 1000 to go after all unranked items. When having + unranked or equal rank items shapes would be displayed + after traces i.e. according to their order in data and + layout. + legendwidth + Sets the width (in px or fraction) of the legend for + this trace. + marker + :class:`plotly.graph_objects.funnel.Marker` instance or + dict with compatible properties + meta + Assigns extra meta information associated with this + trace that can be used in various text attributes. + Attributes such as trace `name`, graph, axis and + colorbar `title.text`, annotation `text` + `rangeselector`, `updatemenues` and `sliders` `label` + text all support `meta`. To access the trace `meta` + values in an attribute in the same trace, simply use + `%{meta[i]}` where `i` is the index or key of the + `meta` item in question. To access trace `meta` in + layout attributes, use `%{data[n[.meta[i]}` where `i` + is the index or key of the `meta` and `n` is the trace + index. + metasrc + Sets the source reference on Chart Studio Cloud for + `meta`. + name + Sets the trace name. The trace name appears as the + legend item and on hover. + offset + Shifts the position where the bar is drawn (in position + axis units). In "group" barmode, traces that set + "offset" will be excluded and drawn in "overlay" mode + instead. + offsetgroup + Set several traces linked to the same position axis or + matching axes to the same offsetgroup where bars of the + same position coordinate will line up. + opacity + Sets the opacity of the trace. + orientation + Sets the orientation of the funnels. With "v" ("h"), + the value of the each bar spans along the vertical + (horizontal). By default funnels are tend to be + oriented horizontally; unless only "y" array is + presented or orientation is set to "v". Also regarding + graphs including only 'horizontal' funnels, "autorange" + on the "y-axis" are set to "reversed". + outsidetextfont + Sets the font used for `text` lying outside the bar. + selectedpoints + Array containing integer indices of selected points. + Has an effect only for traces that support selections. + Note that an empty array means an empty selection where + the `unselected` are turned on for all points, whereas, + any other non-array values means no selection all where + the `selected` and `unselected` styles have no effect. + showlegend + Determines whether or not an item corresponding to this + trace is shown in the legend. + stream + :class:`plotly.graph_objects.funnel.Stream` instance or + dict with compatible properties + text + Sets text elements associated with each (x,y) pair. If + a single string, the same string appears over all the + data points. If an array of string, the items are + mapped in order to the this trace's (x,y) coordinates. + If trace `hoverinfo` contains a "text" flag and + "hovertext" is not set, these elements will be seen in + the hover labels. + textangle + Sets the angle of the tick labels with respect to the + bar. For example, a `tickangle` of -90 draws the tick + labels vertically. With "auto" the texts may + automatically be rotated to fit with the maximum size + in bars. + textfont + Sets the font used for `text`. + textinfo + Determines which trace information appear on the graph. + In the case of having multiple funnels, percentages & + totals are computed separately (per trace). + textposition + Specifies the location of the `text`. "inside" + positions `text` inside, next to the bar end (rotated + and scaled if needed). "outside" positions `text` + outside, next to the bar end (scaled if needed), unless + there is another bar stacked on this one, then the text + gets pushed inside. "auto" tries to position `text` + inside the bar, but if the bar is too small and no bar + is stacked on this one the text is moved outside. If + "none", no text appears. + textpositionsrc + Sets the source reference on Chart Studio Cloud for + `textposition`. + textsrc + Sets the source reference on Chart Studio Cloud for + `text`. + texttemplate + Template string used for rendering the information text + that appears on points. Note that this will override + `textinfo`. Variables are inserted using %{variable}, + for example "y: %{y}". Numbers are formatted using + d3-format's syntax %{variable:d3-format}, for example + "Price: %{y:$.2f}". + https://github.com/d3/d3-format/tree/v1.4.5#d3-format + for details on the formatting syntax. Dates are + formatted using d3-time-format's syntax + %{variable|d3-time-format}, for example "Day: + %{2019-01-01|%A}". https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format for details on the + date formatting syntax. Variables that can't be found + will be replaced with the specifier. For example, a + template of "data: %{x}, %{y}" will result in a value + of "data: 1, %{y}" if x is 1 and y is missing. + Variables with an undefined value will be replaced with + the fallback value. All attributes that can be + specified per-point (the ones that are `arrayOk: true`) + are available. Finally, the template string has access + to variables `percentInitial`, `percentPrevious`, + `percentTotal`, `label` and `value`. + texttemplatefallback + Fallback string that's displayed when a variable + referenced in a template is missing. If the boolean + value 'false' is passed in, the specifier with the + missing variable will be displayed. + texttemplatesrc + Sets the source reference on Chart Studio Cloud for + `texttemplate`. + uid + Assign an id to this trace, Use this to provide object + constancy between traces during animations and + transitions. + uirevision + Controls persistence of some user-driven changes to the + trace: `constraintrange` in `parcoords` traces, as well + as some `editable: true` modifications such as `name` + and `colorbar.title`. Defaults to `layout.uirevision`. + Note that other user-driven trace attribute changes are + controlled by `layout` attributes: `trace.visible` is + controlled by `layout.legend.uirevision`, + `selectedpoints` is controlled by + `layout.selectionrevision`, and `colorbar.(x|y)` + (accessible with `config: {editable: true}`) is + controlled by `layout.editrevision`. Trace changes are + tracked by `uid`, which only falls back on trace index + if no `uid` is provided. So if your app can add/remove + traces before the end of the `data` array, such that + the same trace has a different index, you can still + preserve user-driven changes if you give each trace a + `uid` that stays with it as it moves. + visible + Determines whether or not this trace is visible. If + "legendonly", the trace is not drawn, but can appear as + a legend item (provided that the legend itself is + visible). + width + Sets the bar width (in position axis units). + x + Sets the x coordinates. + x0 + Alternate to `x`. Builds a linear space of x + coordinates. Use with `dx` where `x0` is the starting + coordinate and `dx` the step. + xaxis + Sets a reference between this trace's x coordinates and + a 2D cartesian x axis. If "x" (the default value), the + x coordinates refer to `layout.xaxis`. If "x2", the x + coordinates refer to `layout.xaxis2`, and so on. + xhoverformat + Sets the hover text formatting rulefor `x` using d3 + formatting mini-languages which are very similar to + those in Python. For numbers, see: + https://github.com/d3/d3-format/tree/v1.4.5#d3-format. + And for dates see: https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format. We add two items to + d3's date formatter: "%h" for half of the year as a + decimal number as well as "%{n}f" for fractional + seconds with n digits. For example, *2016-10-13 + 09:15:23.456* with tickformat "%H~%M~%S.%2f" would + display *09~15~23.46*By default the values are + formatted using `xaxis.hoverformat`. + xperiod + Only relevant when the axis `type` is "date". Sets the + period positioning in milliseconds or "M" on the x + axis. Special values in the form of "M" could be + used to declare the number of months. In this case `n` + must be a positive integer. + xperiod0 + Only relevant when the axis `type` is "date". Sets the + base for period positioning in milliseconds or date + string on the x0 axis. When `x0period` is round number + of weeks, the `x0period0` by default would be on a + Sunday i.e. 2000-01-02, otherwise it would be at + 2000-01-01. + xperiodalignment + Only relevant when the axis `type` is "date". Sets the + alignment of data points on the x axis. + xsrc + Sets the source reference on Chart Studio Cloud for + `x`. + y + Sets the y coordinates. + y0 + Alternate to `y`. Builds a linear space of y + coordinates. Use with `dy` where `y0` is the starting + coordinate and `dy` the step. + yaxis + Sets a reference between this trace's y coordinates and + a 2D cartesian y axis. If "y" (the default value), the + y coordinates refer to `layout.yaxis`. If "y2", the y + coordinates refer to `layout.yaxis2`, and so on. + yhoverformat + Sets the hover text formatting rulefor `y` using d3 + formatting mini-languages which are very similar to + those in Python. For numbers, see: + https://github.com/d3/d3-format/tree/v1.4.5#d3-format. + And for dates see: https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format. We add two items to + d3's date formatter: "%h" for half of the year as a + decimal number as well as "%{n}f" for fractional + seconds with n digits. For example, *2016-10-13 + 09:15:23.456* with tickformat "%H~%M~%S.%2f" would + display *09~15~23.46*By default the values are + formatted using `yaxis.hoverformat`. + yperiod + Only relevant when the axis `type` is "date". Sets the + period positioning in milliseconds or "M" on the y + axis. Special values in the form of "M" could be + used to declare the number of months. In this case `n` + must be a positive integer. + yperiod0 + Only relevant when the axis `type` is "date". Sets the + base for period positioning in milliseconds or date + string on the y0 axis. When `y0period` is round number + of weeks, the `y0period0` by default would be on a + Sunday i.e. 2000-01-02, otherwise it would be at + 2000-01-01. + yperiodalignment + Only relevant when the axis `type` is "date". Sets the + alignment of data points on the y axis. + ysrc + Sets the source reference on Chart Studio Cloud for + `y`. + zorder + Sets the layer on which this trace is displayed, + relative to other SVG traces on the same subplot. SVG + traces with higher `zorder` appear in front of those + with lower `zorder`. + row : 'all', int or None (default) + Subplot row index (starting from 1) for the trace to be + added. Only valid if figure was created using + `plotly.tools.make_subplots`.If 'all', addresses all + rows in the specified column(s). + col : 'all', int or None (default) + Subplot col index (starting from 1) for the trace to be + added. Only valid if figure was created using + `plotly.tools.make_subplots`.If 'all', addresses all + columns in the specified row(s). + secondary_y: boolean or None (default None) + If True, associate this trace with the secondary y-axis of the + subplot at the specified row and col. Only valid if all of the + following conditions are satisfied: + * The figure was created using `plotly.subplots.make_subplots`. + * The row and col arguments are not None + * The subplot at the specified row and col has type xy + (which is the default) and secondary_y True. These + properties are specified in the specs argument to + make_subplots. See the make_subplots docstring for more info. + + Returns + ------- + Figure + """ + from plotly.graph_objs import Funnel + + new_trace = Funnel( + alignmentgroup=alignmentgroup, + cliponaxis=cliponaxis, + connector=connector, + constraintext=constraintext, + customdata=customdata, + customdatasrc=customdatasrc, + dx=dx, + dy=dy, + hoverinfo=hoverinfo, + hoverinfosrc=hoverinfosrc, + hoverlabel=hoverlabel, + hovertemplate=hovertemplate, + hovertemplatefallback=hovertemplatefallback, + hovertemplatesrc=hovertemplatesrc, + hovertext=hovertext, + hovertextsrc=hovertextsrc, + ids=ids, + idssrc=idssrc, + insidetextanchor=insidetextanchor, + insidetextfont=insidetextfont, + legend=legend, + legendgroup=legendgroup, + legendgrouptitle=legendgrouptitle, + legendrank=legendrank, + legendwidth=legendwidth, + marker=marker, + meta=meta, + metasrc=metasrc, + name=name, + offset=offset, + offsetgroup=offsetgroup, + opacity=opacity, + orientation=orientation, + outsidetextfont=outsidetextfont, + selectedpoints=selectedpoints, + showlegend=showlegend, + stream=stream, + text=text, + textangle=textangle, + textfont=textfont, + textinfo=textinfo, + textposition=textposition, + textpositionsrc=textpositionsrc, + textsrc=textsrc, + texttemplate=texttemplate, + texttemplatefallback=texttemplatefallback, + texttemplatesrc=texttemplatesrc, + uid=uid, + uirevision=uirevision, + visible=visible, + width=width, + x=x, + x0=x0, + xaxis=xaxis, + xhoverformat=xhoverformat, + xperiod=xperiod, + xperiod0=xperiod0, + xperiodalignment=xperiodalignment, + xsrc=xsrc, + y=y, + y0=y0, + yaxis=yaxis, + yhoverformat=yhoverformat, + yperiod=yperiod, + yperiod0=yperiod0, + yperiodalignment=yperiodalignment, + ysrc=ysrc, + zorder=zorder, + **kwargs, + ) + return self.add_trace(new_trace, row=row, col=col, secondary_y=secondary_y) + + def add_funnelarea( + self, + aspectratio=None, + baseratio=None, + customdata=None, + customdatasrc=None, + dlabel=None, + domain=None, + hoverinfo=None, + hoverinfosrc=None, + hoverlabel=None, + hovertemplate=None, + hovertemplatefallback=None, + hovertemplatesrc=None, + hovertext=None, + hovertextsrc=None, + ids=None, + idssrc=None, + insidetextfont=None, + label0=None, + labels=None, + labelssrc=None, + legend=None, + legendgroup=None, + legendgrouptitle=None, + legendrank=None, + legendwidth=None, + marker=None, + meta=None, + metasrc=None, + name=None, + opacity=None, + scalegroup=None, + showlegend=None, + stream=None, + text=None, + textfont=None, + textinfo=None, + textposition=None, + textpositionsrc=None, + textsrc=None, + texttemplate=None, + texttemplatefallback=None, + texttemplatesrc=None, + title=None, + uid=None, + uirevision=None, + values=None, + valuessrc=None, + visible=None, + row=None, + col=None, + **kwargs, + ) -> "Figure": + """ + Add a new Funnelarea trace + + Visualize stages in a process using area-encoded trapezoids. + This trace can be used to show data in a part-to-whole + representation similar to a "pie" trace, wherein each item + appears in a single stage. See also the "funnel" trace type for + a different approach to visualizing funnel data. + + Parameters + ---------- + aspectratio + Sets the ratio between height and width + baseratio + Sets the ratio between bottom length and maximum top + length. + customdata + Assigns extra data each datum. This may be useful when + listening to hover, click and selection events. Note + that, "scatter" traces also appends customdata items in + the markers DOM elements + customdatasrc + Sets the source reference on Chart Studio Cloud for + `customdata`. + dlabel + Sets the label step. See `label0` for more info. + domain + :class:`plotly.graph_objects.funnelarea.Domain` + instance or dict with compatible properties + hoverinfo + Determines which trace information appear on hover. If + `none` or `skip` are set, no information is displayed + upon hovering. But, if `none` is set, click and hover + events are still fired. + hoverinfosrc + Sets the source reference on Chart Studio Cloud for + `hoverinfo`. + hoverlabel + :class:`plotly.graph_objects.funnelarea.Hoverlabel` + instance or dict with compatible properties + hovertemplate + Template string used for rendering the information that + appear on hover box. Note that this will override + `hoverinfo`. Variables are inserted using %{variable}, + for example "y: %{y}" as well as %{xother}, {%_xother}, + {%_xother_}, {%xother_}. When showing info for several + points, "xother" will be added to those with different + x positions from the first point. An underscore before + or after "(x|y)other" will add a space on that side, + only when this field is shown. Numbers are formatted + using d3-format's syntax %{variable:d3-format}, for + example "Price: %{y:$.2f}". + https://github.com/d3/d3-format/tree/v1.4.5#d3-format + for details on the formatting syntax. Dates are + formatted using d3-time-format's syntax + %{variable|d3-time-format}, for example "Day: + %{2019-01-01|%A}". https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format for details on the + date formatting syntax. Variables that can't be found + will be replaced with the specifier. For example, a + template of "data: %{x}, %{y}" will result in a value + of "data: 1, %{y}" if x is 1 and y is missing. + Variables with an undefined value will be replaced with + the fallback value. The variables available in + `hovertemplate` are the ones emitted as event data + described at this link + https://plotly.com/javascript/plotlyjs-events/#event- + data. Additionally, all attributes that can be + specified per-point (the ones that are `arrayOk: true`) + are available. Finally, the template string has access + to variables `label`, `color`, `value`, `text` and + `percent`. Anything contained in tag `` is + displayed in the secondary box, for example + `%{fullData.name}`. To hide the + secondary box completely, use an empty tag + ``. + hovertemplatefallback + Fallback string that's displayed when a variable + referenced in a template is missing. If the boolean + value 'false' is passed in, the specifier with the + missing variable will be displayed. + hovertemplatesrc + Sets the source reference on Chart Studio Cloud for + `hovertemplate`. + hovertext + Sets hover text elements associated with each sector. + If a single string, the same string appears for all + data points. If an array of string, the items are + mapped in order of this trace's sectors. To be seen, + trace `hoverinfo` must contain a "text" flag. + hovertextsrc + Sets the source reference on Chart Studio Cloud for + `hovertext`. + ids + Assigns id labels to each datum. These ids for object + constancy of data points during animation. Should be an + array of strings, not numbers or any other type. + idssrc + Sets the source reference on Chart Studio Cloud for + `ids`. + insidetextfont + Sets the font used for `textinfo` lying inside the + sector. + label0 + Alternate to `labels`. Builds a numeric set of labels. + Use with `dlabel` where `label0` is the starting label + and `dlabel` the step. + labels + Sets the sector labels. If `labels` entries are + duplicated, we sum associated `values` or simply count + occurrences if `values` is not provided. For other + array attributes (including color) we use the first + non-empty entry among all occurrences of the label. + labelssrc + Sets the source reference on Chart Studio Cloud for + `labels`. + legend + Sets the reference to a legend to show this trace in. + References to these legends are "legend", "legend2", + "legend3", etc. Settings for these legends are set in + the layout, under `layout.legend`, `layout.legend2`, + etc. + legendgroup + Sets the legend group for this trace. Traces and shapes + part of the same legend group hide/show at the same + time when toggling legend items. + legendgrouptitle + :class:`plotly.graph_objects.funnelarea.Legendgrouptitl + e` instance or dict with compatible properties + legendrank + Sets the legend rank for this trace. Items and groups + with smaller ranks are presented on top/left side while + with "reversed" `legend.traceorder` they are on + bottom/right side. The default legendrank is 1000, so + that you can use ranks less than 1000 to place certain + items before all unranked items, and ranks greater than + 1000 to go after all unranked items. When having + unranked or equal rank items shapes would be displayed + after traces i.e. according to their order in data and + layout. + legendwidth + Sets the width (in px or fraction) of the legend for + this trace. + marker + :class:`plotly.graph_objects.funnelarea.Marker` + instance or dict with compatible properties + meta + Assigns extra meta information associated with this + trace that can be used in various text attributes. + Attributes such as trace `name`, graph, axis and + colorbar `title.text`, annotation `text` + `rangeselector`, `updatemenues` and `sliders` `label` + text all support `meta`. To access the trace `meta` + values in an attribute in the same trace, simply use + `%{meta[i]}` where `i` is the index or key of the + `meta` item in question. To access trace `meta` in + layout attributes, use `%{data[n[.meta[i]}` where `i` + is the index or key of the `meta` and `n` is the trace + index. + metasrc + Sets the source reference on Chart Studio Cloud for + `meta`. + name + Sets the trace name. The trace name appears as the + legend item and on hover. + opacity + Sets the opacity of the trace. + scalegroup + If there are multiple funnelareas that should be sized + according to their totals, link them by providing a + non-empty group id here shared by every trace in the + same group. + showlegend + Determines whether or not an item corresponding to this + trace is shown in the legend. + stream + :class:`plotly.graph_objects.funnelarea.Stream` + instance or dict with compatible properties + text + Sets text elements associated with each sector. If + trace `textinfo` contains a "text" flag, these elements + will be seen on the chart. If trace `hoverinfo` + contains a "text" flag and "hovertext" is not set, + these elements will be seen in the hover labels. + textfont + Sets the font used for `textinfo`. + textinfo + Determines which trace information appear on the graph. + textposition + Specifies the location of the `textinfo`. + textpositionsrc + Sets the source reference on Chart Studio Cloud for + `textposition`. + textsrc + Sets the source reference on Chart Studio Cloud for + `text`. + texttemplate + Template string used for rendering the information text + that appears on points. Note that this will override + `textinfo`. Variables are inserted using %{variable}, + for example "y: %{y}". Numbers are formatted using + d3-format's syntax %{variable:d3-format}, for example + "Price: %{y:$.2f}". + https://github.com/d3/d3-format/tree/v1.4.5#d3-format + for details on the formatting syntax. Dates are + formatted using d3-time-format's syntax + %{variable|d3-time-format}, for example "Day: + %{2019-01-01|%A}". https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format for details on the + date formatting syntax. Variables that can't be found + will be replaced with the specifier. For example, a + template of "data: %{x}, %{y}" will result in a value + of "data: 1, %{y}" if x is 1 and y is missing. + Variables with an undefined value will be replaced with + the fallback value. All attributes that can be + specified per-point (the ones that are `arrayOk: true`) + are available. Finally, the template string has access + to variables `label`, `color`, `value`, `text` and + `percent`. + texttemplatefallback + Fallback string that's displayed when a variable + referenced in a template is missing. If the boolean + value 'false' is passed in, the specifier with the + missing variable will be displayed. + texttemplatesrc + Sets the source reference on Chart Studio Cloud for + `texttemplate`. + title + :class:`plotly.graph_objects.funnelarea.Title` instance + or dict with compatible properties + uid + Assign an id to this trace, Use this to provide object + constancy between traces during animations and + transitions. + uirevision + Controls persistence of some user-driven changes to the + trace: `constraintrange` in `parcoords` traces, as well + as some `editable: true` modifications such as `name` + and `colorbar.title`. Defaults to `layout.uirevision`. + Note that other user-driven trace attribute changes are + controlled by `layout` attributes: `trace.visible` is + controlled by `layout.legend.uirevision`, + `selectedpoints` is controlled by + `layout.selectionrevision`, and `colorbar.(x|y)` + (accessible with `config: {editable: true}`) is + controlled by `layout.editrevision`. Trace changes are + tracked by `uid`, which only falls back on trace index + if no `uid` is provided. So if your app can add/remove + traces before the end of the `data` array, such that + the same trace has a different index, you can still + preserve user-driven changes if you give each trace a + `uid` that stays with it as it moves. + values + Sets the values of the sectors. If omitted, we count + occurrences of each label. + valuessrc + Sets the source reference on Chart Studio Cloud for + `values`. + visible + Determines whether or not this trace is visible. If + "legendonly", the trace is not drawn, but can appear as + a legend item (provided that the legend itself is + visible). + row : 'all', int or None (default) + Subplot row index (starting from 1) for the trace to be + added. Only valid if figure was created using + `plotly.tools.make_subplots`.If 'all', addresses all + rows in the specified column(s). + col : 'all', int or None (default) + Subplot col index (starting from 1) for the trace to be + added. Only valid if figure was created using + `plotly.tools.make_subplots`.If 'all', addresses all + columns in the specified row(s). + + Returns + ------- + Figure + """ + from plotly.graph_objs import Funnelarea + + new_trace = Funnelarea( + aspectratio=aspectratio, + baseratio=baseratio, + customdata=customdata, + customdatasrc=customdatasrc, + dlabel=dlabel, + domain=domain, + hoverinfo=hoverinfo, + hoverinfosrc=hoverinfosrc, + hoverlabel=hoverlabel, + hovertemplate=hovertemplate, + hovertemplatefallback=hovertemplatefallback, + hovertemplatesrc=hovertemplatesrc, + hovertext=hovertext, + hovertextsrc=hovertextsrc, + ids=ids, + idssrc=idssrc, + insidetextfont=insidetextfont, + label0=label0, + labels=labels, + labelssrc=labelssrc, + legend=legend, + legendgroup=legendgroup, + legendgrouptitle=legendgrouptitle, + legendrank=legendrank, + legendwidth=legendwidth, + marker=marker, + meta=meta, + metasrc=metasrc, + name=name, + opacity=opacity, + scalegroup=scalegroup, + showlegend=showlegend, + stream=stream, + text=text, + textfont=textfont, + textinfo=textinfo, + textposition=textposition, + textpositionsrc=textpositionsrc, + textsrc=textsrc, + texttemplate=texttemplate, + texttemplatefallback=texttemplatefallback, + texttemplatesrc=texttemplatesrc, + title=title, + uid=uid, + uirevision=uirevision, + values=values, + valuessrc=valuessrc, + visible=visible, + **kwargs, + ) + return self.add_trace(new_trace, row=row, col=col) + + def add_heatmap( + self, + autocolorscale=None, + coloraxis=None, + colorbar=None, + colorscale=None, + connectgaps=None, + customdata=None, + customdatasrc=None, + dx=None, + dy=None, + hoverinfo=None, + hoverinfosrc=None, + hoverlabel=None, + hoverongaps=None, + hovertemplate=None, + hovertemplatefallback=None, + hovertemplatesrc=None, + hovertext=None, + hovertextsrc=None, + ids=None, + idssrc=None, + legend=None, + legendgroup=None, + legendgrouptitle=None, + legendrank=None, + legendwidth=None, + meta=None, + metasrc=None, + name=None, + opacity=None, + reversescale=None, + showlegend=None, + showscale=None, + stream=None, + text=None, + textfont=None, + textsrc=None, + texttemplate=None, + texttemplatefallback=None, + transpose=None, + uid=None, + uirevision=None, + visible=None, + x=None, + x0=None, + xaxis=None, + xcalendar=None, + xgap=None, + xhoverformat=None, + xperiod=None, + xperiod0=None, + xperiodalignment=None, + xsrc=None, + xtype=None, + y=None, + y0=None, + yaxis=None, + ycalendar=None, + ygap=None, + yhoverformat=None, + yperiod=None, + yperiod0=None, + yperiodalignment=None, + ysrc=None, + ytype=None, + z=None, + zauto=None, + zhoverformat=None, + zmax=None, + zmid=None, + zmin=None, + zorder=None, + zsmooth=None, + zsrc=None, + row=None, + col=None, + secondary_y=None, + **kwargs, + ) -> "Figure": + """ + Add a new Heatmap trace + + The data that describes the heatmap value-to-color mapping is + set in `z`. Data in `z` can either be a 2D list of values + (ragged or not) or a 1D array of values. In the case where `z` + is a 2D list, say that `z` has N rows and M columns. Then, by + default, the resulting heatmap will have N partitions along the + y axis and M partitions along the x axis. In other words, the + i-th row/ j-th column cell in `z` is mapped to the i-th + partition of the y axis (starting from the bottom of the plot) + and the j-th partition of the x-axis (starting from the left of + the plot). This behavior can be flipped by using `transpose`. + Moreover, `x` (`y`) can be provided with M or M+1 (N or N+1) + elements. If M (N), then the coordinates correspond to the + center of the heatmap cells and the cells have equal width. If + M+1 (N+1), then the coordinates correspond to the edges of the + heatmap cells. In the case where `z` is a 1D list, the x and y + coordinates must be provided in `x` and `y` respectively to + form data triplets. + + Parameters + ---------- + autocolorscale + Determines whether the colorscale is a default palette + (`autocolorscale: true`) or the palette determined by + `colorscale`. In case `colorscale` is unspecified or + `autocolorscale` is true, the default palette will be + chosen according to whether numbers in the `color` + array are all positive, all negative or mixed. + coloraxis + Sets a reference to a shared color axis. References to + these shared color axes are "coloraxis", "coloraxis2", + "coloraxis3", etc. Settings for these shared color axes + are set in the layout, under `layout.coloraxis`, + `layout.coloraxis2`, etc. Note that multiple color + scales can be linked to the same color axis. + colorbar + :class:`plotly.graph_objects.heatmap.ColorBar` instance + or dict with compatible properties + colorscale + Sets the colorscale. The colorscale must be an array + containing arrays mapping a normalized value to an rgb, + rgba, hex, hsl, hsv, or named color string. At minimum, + a mapping for the lowest (0) and highest (1) values are + required. For example, `[[0, 'rgb(0,0,255)'], [1, + 'rgb(255,0,0)']]`. To control the bounds of the + colorscale in color space, use `zmin` and `zmax`. + Alternatively, `colorscale` may be a palette name + string of the following list: Blackbody,Bluered,Blues,C + ividis,Earth,Electric,Greens,Greys,Hot,Jet,Picnic,Portl + and,Rainbow,RdBu,Reds,Viridis,YlGnBu,YlOrRd. + connectgaps + Determines whether or not gaps (i.e. {nan} or missing + values) in the `z` data are filled in. It is defaulted + to true if `z` is a one dimensional array and `zsmooth` + is not false; otherwise it is defaulted to false. + customdata + Assigns extra data each datum. This may be useful when + listening to hover, click and selection events. Note + that, "scatter" traces also appends customdata items in + the markers DOM elements + customdatasrc + Sets the source reference on Chart Studio Cloud for + `customdata`. + dx + Sets the x coordinate step. See `x0` for more info. + dy + Sets the y coordinate step. See `y0` for more info. + hoverinfo + Determines which trace information appear on hover. If + `none` or `skip` are set, no information is displayed + upon hovering. But, if `none` is set, click and hover + events are still fired. + hoverinfosrc + Sets the source reference on Chart Studio Cloud for + `hoverinfo`. + hoverlabel + :class:`plotly.graph_objects.heatmap.Hoverlabel` + instance or dict with compatible properties + hoverongaps + Determines whether or not gaps (i.e. {nan} or missing + values) in the `z` data have hover labels associated + with them. + hovertemplate + Template string used for rendering the information that + appear on hover box. Note that this will override + `hoverinfo`. Variables are inserted using %{variable}, + for example "y: %{y}" as well as %{xother}, {%_xother}, + {%_xother_}, {%xother_}. When showing info for several + points, "xother" will be added to those with different + x positions from the first point. An underscore before + or after "(x|y)other" will add a space on that side, + only when this field is shown. Numbers are formatted + using d3-format's syntax %{variable:d3-format}, for + example "Price: %{y:$.2f}". + https://github.com/d3/d3-format/tree/v1.4.5#d3-format + for details on the formatting syntax. Dates are + formatted using d3-time-format's syntax + %{variable|d3-time-format}, for example "Day: + %{2019-01-01|%A}". https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format for details on the + date formatting syntax. Variables that can't be found + will be replaced with the specifier. For example, a + template of "data: %{x}, %{y}" will result in a value + of "data: 1, %{y}" if x is 1 and y is missing. + Variables with an undefined value will be replaced with + the fallback value. The variables available in + `hovertemplate` are the ones emitted as event data + described at this link + https://plotly.com/javascript/plotlyjs-events/#event- + data. Additionally, all attributes that can be + specified per-point (the ones that are `arrayOk: true`) + are available. Anything contained in tag `` is + displayed in the secondary box, for example + `%{fullData.name}`. To hide the + secondary box completely, use an empty tag + ``. + hovertemplatefallback + Fallback string that's displayed when a variable + referenced in a template is missing. If the boolean + value 'false' is passed in, the specifier with the + missing variable will be displayed. + hovertemplatesrc + Sets the source reference on Chart Studio Cloud for + `hovertemplate`. + hovertext + Same as `text`. + hovertextsrc + Sets the source reference on Chart Studio Cloud for + `hovertext`. + ids + Assigns id labels to each datum. These ids for object + constancy of data points during animation. Should be an + array of strings, not numbers or any other type. + idssrc + Sets the source reference on Chart Studio Cloud for + `ids`. + legend + Sets the reference to a legend to show this trace in. + References to these legends are "legend", "legend2", + "legend3", etc. Settings for these legends are set in + the layout, under `layout.legend`, `layout.legend2`, + etc. + legendgroup + Sets the legend group for this trace. Traces and shapes + part of the same legend group hide/show at the same + time when toggling legend items. + legendgrouptitle + :class:`plotly.graph_objects.heatmap.Legendgrouptitle` + instance or dict with compatible properties + legendrank + Sets the legend rank for this trace. Items and groups + with smaller ranks are presented on top/left side while + with "reversed" `legend.traceorder` they are on + bottom/right side. The default legendrank is 1000, so + that you can use ranks less than 1000 to place certain + items before all unranked items, and ranks greater than + 1000 to go after all unranked items. When having + unranked or equal rank items shapes would be displayed + after traces i.e. according to their order in data and + layout. + legendwidth + Sets the width (in px or fraction) of the legend for + this trace. + meta + Assigns extra meta information associated with this + trace that can be used in various text attributes. + Attributes such as trace `name`, graph, axis and + colorbar `title.text`, annotation `text` + `rangeselector`, `updatemenues` and `sliders` `label` + text all support `meta`. To access the trace `meta` + values in an attribute in the same trace, simply use + `%{meta[i]}` where `i` is the index or key of the + `meta` item in question. To access trace `meta` in + layout attributes, use `%{data[n[.meta[i]}` where `i` + is the index or key of the `meta` and `n` is the trace + index. + metasrc + Sets the source reference on Chart Studio Cloud for + `meta`. + name + Sets the trace name. The trace name appears as the + legend item and on hover. + opacity + Sets the opacity of the trace. + reversescale + Reverses the color mapping if true. If true, `zmin` + will correspond to the last color in the array and + `zmax` will correspond to the first color. + showlegend + Determines whether or not an item corresponding to this + trace is shown in the legend. + showscale + Determines whether or not a colorbar is displayed for + this trace. + stream + :class:`plotly.graph_objects.heatmap.Stream` instance + or dict with compatible properties + text + Sets the text elements associated with each z value. + textfont + Sets the text font. + textsrc + Sets the source reference on Chart Studio Cloud for + `text`. + texttemplate + Template string used for rendering the information text + that appears on points. Note that this will override + `textinfo`. Variables are inserted using %{variable}, + for example "y: %{y}". Numbers are formatted using + d3-format's syntax %{variable:d3-format}, for example + "Price: %{y:$.2f}". + https://github.com/d3/d3-format/tree/v1.4.5#d3-format + for details on the formatting syntax. Dates are + formatted using d3-time-format's syntax + %{variable|d3-time-format}, for example "Day: + %{2019-01-01|%A}". https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format for details on the + date formatting syntax. Variables that can't be found + will be replaced with the specifier. For example, a + template of "data: %{x}, %{y}" will result in a value + of "data: 1, %{y}" if x is 1 and y is missing. + Variables with an undefined value will be replaced with + the fallback value. All attributes that can be + specified per-point (the ones that are `arrayOk: true`) + are available. Finally, the template string has access + to variables `x`, `y`, `z` and `text`. + texttemplatefallback + Fallback string that's displayed when a variable + referenced in a template is missing. If the boolean + value 'false' is passed in, the specifier with the + missing variable will be displayed. + transpose + Transposes the z data. + uid + Assign an id to this trace, Use this to provide object + constancy between traces during animations and + transitions. + uirevision + Controls persistence of some user-driven changes to the + trace: `constraintrange` in `parcoords` traces, as well + as some `editable: true` modifications such as `name` + and `colorbar.title`. Defaults to `layout.uirevision`. + Note that other user-driven trace attribute changes are + controlled by `layout` attributes: `trace.visible` is + controlled by `layout.legend.uirevision`, + `selectedpoints` is controlled by + `layout.selectionrevision`, and `colorbar.(x|y)` + (accessible with `config: {editable: true}`) is + controlled by `layout.editrevision`. Trace changes are + tracked by `uid`, which only falls back on trace index + if no `uid` is provided. So if your app can add/remove + traces before the end of the `data` array, such that + the same trace has a different index, you can still + preserve user-driven changes if you give each trace a + `uid` that stays with it as it moves. + visible + Determines whether or not this trace is visible. If + "legendonly", the trace is not drawn, but can appear as + a legend item (provided that the legend itself is + visible). + x + Sets the x coordinates. + x0 + Alternate to `x`. Builds a linear space of x + coordinates. Use with `dx` where `x0` is the starting + coordinate and `dx` the step. + xaxis + Sets a reference between this trace's x coordinates and + a 2D cartesian x axis. If "x" (the default value), the + x coordinates refer to `layout.xaxis`. If "x2", the x + coordinates refer to `layout.xaxis2`, and so on. + xcalendar + Sets the calendar system to use with `x` date data. + xgap + Sets the horizontal gap (in pixels) between bricks. + xhoverformat + Sets the hover text formatting rulefor `x` using d3 + formatting mini-languages which are very similar to + those in Python. For numbers, see: + https://github.com/d3/d3-format/tree/v1.4.5#d3-format. + And for dates see: https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format. We add two items to + d3's date formatter: "%h" for half of the year as a + decimal number as well as "%{n}f" for fractional + seconds with n digits. For example, *2016-10-13 + 09:15:23.456* with tickformat "%H~%M~%S.%2f" would + display *09~15~23.46*By default the values are + formatted using `xaxis.hoverformat`. + xperiod + Only relevant when the axis `type` is "date". Sets the + period positioning in milliseconds or "M" on the x + axis. Special values in the form of "M" could be + used to declare the number of months. In this case `n` + must be a positive integer. + xperiod0 + Only relevant when the axis `type` is "date". Sets the + base for period positioning in milliseconds or date + string on the x0 axis. When `x0period` is round number + of weeks, the `x0period0` by default would be on a + Sunday i.e. 2000-01-02, otherwise it would be at + 2000-01-01. + xperiodalignment + Only relevant when the axis `type` is "date". Sets the + alignment of data points on the x axis. + xsrc + Sets the source reference on Chart Studio Cloud for + `x`. + xtype + If "array", the heatmap's x coordinates are given by + "x" (the default behavior when `x` is provided). If + "scaled", the heatmap's x coordinates are given by "x0" + and "dx" (the default behavior when `x` is not + provided). + y + Sets the y coordinates. + y0 + Alternate to `y`. Builds a linear space of y + coordinates. Use with `dy` where `y0` is the starting + coordinate and `dy` the step. + yaxis + Sets a reference between this trace's y coordinates and + a 2D cartesian y axis. If "y" (the default value), the + y coordinates refer to `layout.yaxis`. If "y2", the y + coordinates refer to `layout.yaxis2`, and so on. + ycalendar + Sets the calendar system to use with `y` date data. + ygap + Sets the vertical gap (in pixels) between bricks. + yhoverformat + Sets the hover text formatting rulefor `y` using d3 + formatting mini-languages which are very similar to + those in Python. For numbers, see: + https://github.com/d3/d3-format/tree/v1.4.5#d3-format. + And for dates see: https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format. We add two items to + d3's date formatter: "%h" for half of the year as a + decimal number as well as "%{n}f" for fractional + seconds with n digits. For example, *2016-10-13 + 09:15:23.456* with tickformat "%H~%M~%S.%2f" would + display *09~15~23.46*By default the values are + formatted using `yaxis.hoverformat`. + yperiod + Only relevant when the axis `type` is "date". Sets the + period positioning in milliseconds or "M" on the y + axis. Special values in the form of "M" could be + used to declare the number of months. In this case `n` + must be a positive integer. + yperiod0 + Only relevant when the axis `type` is "date". Sets the + base for period positioning in milliseconds or date + string on the y0 axis. When `y0period` is round number + of weeks, the `y0period0` by default would be on a + Sunday i.e. 2000-01-02, otherwise it would be at + 2000-01-01. + yperiodalignment + Only relevant when the axis `type` is "date". Sets the + alignment of data points on the y axis. + ysrc + Sets the source reference on Chart Studio Cloud for + `y`. + ytype + If "array", the heatmap's y coordinates are given by + "y" (the default behavior when `y` is provided) If + "scaled", the heatmap's y coordinates are given by "y0" + and "dy" (the default behavior when `y` is not + provided) + z + Sets the z data. + zauto + Determines whether or not the color domain is computed + with respect to the input data (here in `z`) or the + bounds set in `zmin` and `zmax` Defaults to `false` + when `zmin` and `zmax` are set by the user. + zhoverformat + Sets the hover text formatting rulefor `z` using d3 + formatting mini-languages which are very similar to + those in Python. For numbers, see: https://github.com/d + 3/d3-format/tree/v1.4.5#d3-format.By default the values + are formatted using generic number format. + zmax + Sets the upper bound of the color domain. Value should + have the same units as in `z` and if set, `zmin` must + be set as well. + zmid + Sets the mid-point of the color domain by scaling + `zmin` and/or `zmax` to be equidistant to this point. + Value should have the same units as in `z`. Has no + effect when `zauto` is `false`. + zmin + Sets the lower bound of the color domain. Value should + have the same units as in `z` and if set, `zmax` must + be set as well. + zorder + Sets the layer on which this trace is displayed, + relative to other SVG traces on the same subplot. SVG + traces with higher `zorder` appear in front of those + with lower `zorder`. + zsmooth + Picks a smoothing algorithm use to smooth `z` data. + zsrc + Sets the source reference on Chart Studio Cloud for + `z`. + row : 'all', int or None (default) + Subplot row index (starting from 1) for the trace to be + added. Only valid if figure was created using + `plotly.tools.make_subplots`.If 'all', addresses all + rows in the specified column(s). + col : 'all', int or None (default) + Subplot col index (starting from 1) for the trace to be + added. Only valid if figure was created using + `plotly.tools.make_subplots`.If 'all', addresses all + columns in the specified row(s). + secondary_y: boolean or None (default None) + If True, associate this trace with the secondary y-axis of the + subplot at the specified row and col. Only valid if all of the + following conditions are satisfied: + * The figure was created using `plotly.subplots.make_subplots`. + * The row and col arguments are not None + * The subplot at the specified row and col has type xy + (which is the default) and secondary_y True. These + properties are specified in the specs argument to + make_subplots. See the make_subplots docstring for more info. + + Returns + ------- + Figure + """ + from plotly.graph_objs import Heatmap + + new_trace = Heatmap( + autocolorscale=autocolorscale, + coloraxis=coloraxis, + colorbar=colorbar, + colorscale=colorscale, + connectgaps=connectgaps, + customdata=customdata, + customdatasrc=customdatasrc, + dx=dx, + dy=dy, + hoverinfo=hoverinfo, + hoverinfosrc=hoverinfosrc, + hoverlabel=hoverlabel, + hoverongaps=hoverongaps, + hovertemplate=hovertemplate, + hovertemplatefallback=hovertemplatefallback, + hovertemplatesrc=hovertemplatesrc, + hovertext=hovertext, + hovertextsrc=hovertextsrc, + ids=ids, + idssrc=idssrc, + legend=legend, + legendgroup=legendgroup, + legendgrouptitle=legendgrouptitle, + legendrank=legendrank, + legendwidth=legendwidth, + meta=meta, + metasrc=metasrc, + name=name, + opacity=opacity, + reversescale=reversescale, + showlegend=showlegend, + showscale=showscale, + stream=stream, + text=text, + textfont=textfont, + textsrc=textsrc, + texttemplate=texttemplate, + texttemplatefallback=texttemplatefallback, + transpose=transpose, + uid=uid, + uirevision=uirevision, + visible=visible, + x=x, + x0=x0, + xaxis=xaxis, + xcalendar=xcalendar, + xgap=xgap, + xhoverformat=xhoverformat, + xperiod=xperiod, + xperiod0=xperiod0, + xperiodalignment=xperiodalignment, + xsrc=xsrc, + xtype=xtype, + y=y, + y0=y0, + yaxis=yaxis, + ycalendar=ycalendar, + ygap=ygap, + yhoverformat=yhoverformat, + yperiod=yperiod, + yperiod0=yperiod0, + yperiodalignment=yperiodalignment, + ysrc=ysrc, + ytype=ytype, + z=z, + zauto=zauto, + zhoverformat=zhoverformat, + zmax=zmax, + zmid=zmid, + zmin=zmin, + zorder=zorder, + zsmooth=zsmooth, + zsrc=zsrc, + **kwargs, + ) + return self.add_trace(new_trace, row=row, col=col, secondary_y=secondary_y) + + def add_histogram( + self, + alignmentgroup=None, + autobinx=None, + autobiny=None, + bingroup=None, + cliponaxis=None, + constraintext=None, + cumulative=None, + customdata=None, + customdatasrc=None, + error_x=None, + error_y=None, + histfunc=None, + histnorm=None, + hoverinfo=None, + hoverinfosrc=None, + hoverlabel=None, + hovertemplate=None, + hovertemplatefallback=None, + hovertemplatesrc=None, + hovertext=None, + hovertextsrc=None, + ids=None, + idssrc=None, + insidetextanchor=None, + insidetextfont=None, + legend=None, + legendgroup=None, + legendgrouptitle=None, + legendrank=None, + legendwidth=None, + marker=None, + meta=None, + metasrc=None, + name=None, + nbinsx=None, + nbinsy=None, + offsetgroup=None, + opacity=None, + orientation=None, + outsidetextfont=None, + selected=None, + selectedpoints=None, + showlegend=None, + stream=None, + text=None, + textangle=None, + textfont=None, + textposition=None, + textsrc=None, + texttemplate=None, + texttemplatefallback=None, + uid=None, + uirevision=None, + unselected=None, + visible=None, + x=None, + xaxis=None, + xbins=None, + xcalendar=None, + xhoverformat=None, + xsrc=None, + y=None, + yaxis=None, + ybins=None, + ycalendar=None, + yhoverformat=None, + ysrc=None, + zorder=None, + row=None, + col=None, + secondary_y=None, + **kwargs, + ) -> "Figure": + """ + Add a new Histogram trace + + The sample data from which statistics are computed is set in + `x` for vertically spanning histograms and in `y` for + horizontally spanning histograms. Binning options are set + `xbins` and `ybins` respectively if no aggregation data is + provided. + + Parameters + ---------- + alignmentgroup + Set several traces linked to the same position axis or + matching axes to the same alignmentgroup. This controls + whether bars compute their positional range dependently + or independently. + autobinx + Obsolete: since v1.42 each bin attribute is auto- + determined separately and `autobinx` is not needed. + However, we accept `autobinx: true` or `false` and will + update `xbins` accordingly before deleting `autobinx` + from the trace. + autobiny + Obsolete: since v1.42 each bin attribute is auto- + determined separately and `autobiny` is not needed. + However, we accept `autobiny: true` or `false` and will + update `ybins` accordingly before deleting `autobiny` + from the trace. + bingroup + Set a group of histogram traces which will have + compatible bin settings. Note that traces on the same + subplot and with the same "orientation" under `barmode` + "stack", "relative" and "group" are forced into the + same bingroup, Using `bingroup`, traces under `barmode` + "overlay" and on different axes (of the same axis type) + can have compatible bin settings. Note that histogram + and histogram2d* trace can share the same `bingroup` + cliponaxis + Determines whether the text nodes are clipped about the + subplot axes. To show the text nodes above axis lines + and tick labels, make sure to set `xaxis.layer` and + `yaxis.layer` to *below traces*. + constraintext + Constrain the size of text inside or outside a bar to + be no larger than the bar itself. + cumulative + :class:`plotly.graph_objects.histogram.Cumulative` + instance or dict with compatible properties + customdata + Assigns extra data each datum. This may be useful when + listening to hover, click and selection events. Note + that, "scatter" traces also appends customdata items in + the markers DOM elements + customdatasrc + Sets the source reference on Chart Studio Cloud for + `customdata`. + error_x + :class:`plotly.graph_objects.histogram.ErrorX` instance + or dict with compatible properties + error_y + :class:`plotly.graph_objects.histogram.ErrorY` instance + or dict with compatible properties + histfunc + Specifies the binning function used for this histogram + trace. If "count", the histogram values are computed by + counting the number of values lying inside each bin. If + "sum", "avg", "min", "max", the histogram values are + computed using the sum, the average, the minimum or the + maximum of the values lying inside each bin + respectively. + histnorm + Specifies the type of normalization used for this + histogram trace. If "", the span of each bar + corresponds to the number of occurrences (i.e. the + number of data points lying inside the bins). If + "percent" / "probability", the span of each bar + corresponds to the percentage / fraction of occurrences + with respect to the total number of sample points + (here, the sum of all bin HEIGHTS equals 100% / 1). If + "density", the span of each bar corresponds to the + number of occurrences in a bin divided by the size of + the bin interval (here, the sum of all bin AREAS equals + the total number of sample points). If *probability + density*, the area of each bar corresponds to the + probability that an event will fall into the + corresponding bin (here, the sum of all bin AREAS + equals 1). + hoverinfo + Determines which trace information appear on hover. If + `none` or `skip` are set, no information is displayed + upon hovering. But, if `none` is set, click and hover + events are still fired. + hoverinfosrc + Sets the source reference on Chart Studio Cloud for + `hoverinfo`. + hoverlabel + :class:`plotly.graph_objects.histogram.Hoverlabel` + instance or dict with compatible properties + hovertemplate + Template string used for rendering the information that + appear on hover box. Note that this will override + `hoverinfo`. Variables are inserted using %{variable}, + for example "y: %{y}" as well as %{xother}, {%_xother}, + {%_xother_}, {%xother_}. When showing info for several + points, "xother" will be added to those with different + x positions from the first point. An underscore before + or after "(x|y)other" will add a space on that side, + only when this field is shown. Numbers are formatted + using d3-format's syntax %{variable:d3-format}, for + example "Price: %{y:$.2f}". + https://github.com/d3/d3-format/tree/v1.4.5#d3-format + for details on the formatting syntax. Dates are + formatted using d3-time-format's syntax + %{variable|d3-time-format}, for example "Day: + %{2019-01-01|%A}". https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format for details on the + date formatting syntax. Variables that can't be found + will be replaced with the specifier. For example, a + template of "data: %{x}, %{y}" will result in a value + of "data: 1, %{y}" if x is 1 and y is missing. + Variables with an undefined value will be replaced with + the fallback value. The variables available in + `hovertemplate` are the ones emitted as event data + described at this link + https://plotly.com/javascript/plotlyjs-events/#event- + data. Additionally, all attributes that can be + specified per-point (the ones that are `arrayOk: true`) + are available. Finally, the template string has access + to variable `binNumber` Anything contained in tag + `` is displayed in the secondary box, for + example `%{fullData.name}`. To hide the + secondary box completely, use an empty tag + ``. + hovertemplatefallback + Fallback string that's displayed when a variable + referenced in a template is missing. If the boolean + value 'false' is passed in, the specifier with the + missing variable will be displayed. + hovertemplatesrc + Sets the source reference on Chart Studio Cloud for + `hovertemplate`. + hovertext + Same as `text`. + hovertextsrc + Sets the source reference on Chart Studio Cloud for + `hovertext`. + ids + Assigns id labels to each datum. These ids for object + constancy of data points during animation. Should be an + array of strings, not numbers or any other type. + idssrc + Sets the source reference on Chart Studio Cloud for + `ids`. + insidetextanchor + Determines if texts are kept at center or start/end + points in `textposition` "inside" mode. + insidetextfont + Sets the font used for `text` lying inside the bar. + legend + Sets the reference to a legend to show this trace in. + References to these legends are "legend", "legend2", + "legend3", etc. Settings for these legends are set in + the layout, under `layout.legend`, `layout.legend2`, + etc. + legendgroup + Sets the legend group for this trace. Traces and shapes + part of the same legend group hide/show at the same + time when toggling legend items. + legendgrouptitle + :class:`plotly.graph_objects.histogram.Legendgrouptitle + ` instance or dict with compatible properties + legendrank + Sets the legend rank for this trace. Items and groups + with smaller ranks are presented on top/left side while + with "reversed" `legend.traceorder` they are on + bottom/right side. The default legendrank is 1000, so + that you can use ranks less than 1000 to place certain + items before all unranked items, and ranks greater than + 1000 to go after all unranked items. When having + unranked or equal rank items shapes would be displayed + after traces i.e. according to their order in data and + layout. + legendwidth + Sets the width (in px or fraction) of the legend for + this trace. + marker + :class:`plotly.graph_objects.histogram.Marker` instance + or dict with compatible properties + meta + Assigns extra meta information associated with this + trace that can be used in various text attributes. + Attributes such as trace `name`, graph, axis and + colorbar `title.text`, annotation `text` + `rangeselector`, `updatemenues` and `sliders` `label` + text all support `meta`. To access the trace `meta` + values in an attribute in the same trace, simply use + `%{meta[i]}` where `i` is the index or key of the + `meta` item in question. To access trace `meta` in + layout attributes, use `%{data[n[.meta[i]}` where `i` + is the index or key of the `meta` and `n` is the trace + index. + metasrc + Sets the source reference on Chart Studio Cloud for + `meta`. + name + Sets the trace name. The trace name appears as the + legend item and on hover. + nbinsx + Specifies the maximum number of desired bins. This + value will be used in an algorithm that will decide the + optimal bin size such that the histogram best + visualizes the distribution of the data. Ignored if + `xbins.size` is provided. + nbinsy + Specifies the maximum number of desired bins. This + value will be used in an algorithm that will decide the + optimal bin size such that the histogram best + visualizes the distribution of the data. Ignored if + `ybins.size` is provided. + offsetgroup + Set several traces linked to the same position axis or + matching axes to the same offsetgroup where bars of the + same position coordinate will line up. + opacity + Sets the opacity of the trace. + orientation + Sets the orientation of the bars. With "v" ("h"), the + value of the each bar spans along the vertical + (horizontal). + outsidetextfont + Sets the font used for `text` lying outside the bar. + selected + :class:`plotly.graph_objects.histogram.Selected` + instance or dict with compatible properties + selectedpoints + Array containing integer indices of selected points. + Has an effect only for traces that support selections. + Note that an empty array means an empty selection where + the `unselected` are turned on for all points, whereas, + any other non-array values means no selection all where + the `selected` and `unselected` styles have no effect. + showlegend + Determines whether or not an item corresponding to this + trace is shown in the legend. + stream + :class:`plotly.graph_objects.histogram.Stream` instance + or dict with compatible properties + text + Sets hover text elements associated with each bar. If a + single string, the same string appears over all bars. + If an array of string, the items are mapped in order to + the this trace's coordinates. + textangle + Sets the angle of the tick labels with respect to the + bar. For example, a `tickangle` of -90 draws the tick + labels vertically. With "auto" the texts may + automatically be rotated to fit with the maximum size + in bars. + textfont + Sets the text font. + textposition + Specifies the location of the `text`. "inside" + positions `text` inside, next to the bar end (rotated + and scaled if needed). "outside" positions `text` + outside, next to the bar end (scaled if needed), unless + there is another bar stacked on this one, then the text + gets pushed inside. "auto" tries to position `text` + inside the bar, but if the bar is too small and no bar + is stacked on this one the text is moved outside. If + "none", no text appears. + textsrc + Sets the source reference on Chart Studio Cloud for + `text`. + texttemplate + Template string used for rendering the information text + that appears on points. Note that this will override + `textinfo`. Variables are inserted using %{variable}, + for example "y: %{y}". Numbers are formatted using + d3-format's syntax %{variable:d3-format}, for example + "Price: %{y:$.2f}". + https://github.com/d3/d3-format/tree/v1.4.5#d3-format + for details on the formatting syntax. Dates are + formatted using d3-time-format's syntax + %{variable|d3-time-format}, for example "Day: + %{2019-01-01|%A}". https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format for details on the + date formatting syntax. Variables that can't be found + will be replaced with the specifier. For example, a + template of "data: %{x}, %{y}" will result in a value + of "data: 1, %{y}" if x is 1 and y is missing. + Variables with an undefined value will be replaced with + the fallback value. All attributes that can be + specified per-point (the ones that are `arrayOk: true`) + are available. Finally, the template string has access + to variables `label` and `value`. + texttemplatefallback + Fallback string that's displayed when a variable + referenced in a template is missing. If the boolean + value 'false' is passed in, the specifier with the + missing variable will be displayed. + uid + Assign an id to this trace, Use this to provide object + constancy between traces during animations and + transitions. + uirevision + Controls persistence of some user-driven changes to the + trace: `constraintrange` in `parcoords` traces, as well + as some `editable: true` modifications such as `name` + and `colorbar.title`. Defaults to `layout.uirevision`. + Note that other user-driven trace attribute changes are + controlled by `layout` attributes: `trace.visible` is + controlled by `layout.legend.uirevision`, + `selectedpoints` is controlled by + `layout.selectionrevision`, and `colorbar.(x|y)` + (accessible with `config: {editable: true}`) is + controlled by `layout.editrevision`. Trace changes are + tracked by `uid`, which only falls back on trace index + if no `uid` is provided. So if your app can add/remove + traces before the end of the `data` array, such that + the same trace has a different index, you can still + preserve user-driven changes if you give each trace a + `uid` that stays with it as it moves. + unselected + :class:`plotly.graph_objects.histogram.Unselected` + instance or dict with compatible properties + visible + Determines whether or not this trace is visible. If + "legendonly", the trace is not drawn, but can appear as + a legend item (provided that the legend itself is + visible). + x + Sets the sample data to be binned on the x axis. + xaxis + Sets a reference between this trace's x coordinates and + a 2D cartesian x axis. If "x" (the default value), the + x coordinates refer to `layout.xaxis`. If "x2", the x + coordinates refer to `layout.xaxis2`, and so on. + xbins + :class:`plotly.graph_objects.histogram.XBins` instance + or dict with compatible properties + xcalendar + Sets the calendar system to use with `x` date data. + xhoverformat + Sets the hover text formatting rulefor `x` using d3 + formatting mini-languages which are very similar to + those in Python. For numbers, see: + https://github.com/d3/d3-format/tree/v1.4.5#d3-format. + And for dates see: https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format. We add two items to + d3's date formatter: "%h" for half of the year as a + decimal number as well as "%{n}f" for fractional + seconds with n digits. For example, *2016-10-13 + 09:15:23.456* with tickformat "%H~%M~%S.%2f" would + display *09~15~23.46*By default the values are + formatted using `xaxis.hoverformat`. + xsrc + Sets the source reference on Chart Studio Cloud for + `x`. + y + Sets the sample data to be binned on the y axis. + yaxis + Sets a reference between this trace's y coordinates and + a 2D cartesian y axis. If "y" (the default value), the + y coordinates refer to `layout.yaxis`. If "y2", the y + coordinates refer to `layout.yaxis2`, and so on. + ybins + :class:`plotly.graph_objects.histogram.YBins` instance + or dict with compatible properties + ycalendar + Sets the calendar system to use with `y` date data. + yhoverformat + Sets the hover text formatting rulefor `y` using d3 + formatting mini-languages which are very similar to + those in Python. For numbers, see: + https://github.com/d3/d3-format/tree/v1.4.5#d3-format. + And for dates see: https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format. We add two items to + d3's date formatter: "%h" for half of the year as a + decimal number as well as "%{n}f" for fractional + seconds with n digits. For example, *2016-10-13 + 09:15:23.456* with tickformat "%H~%M~%S.%2f" would + display *09~15~23.46*By default the values are + formatted using `yaxis.hoverformat`. + ysrc + Sets the source reference on Chart Studio Cloud for + `y`. + zorder + Sets the layer on which this trace is displayed, + relative to other SVG traces on the same subplot. SVG + traces with higher `zorder` appear in front of those + with lower `zorder`. + row : 'all', int or None (default) + Subplot row index (starting from 1) for the trace to be + added. Only valid if figure was created using + `plotly.tools.make_subplots`.If 'all', addresses all + rows in the specified column(s). + col : 'all', int or None (default) + Subplot col index (starting from 1) for the trace to be + added. Only valid if figure was created using + `plotly.tools.make_subplots`.If 'all', addresses all + columns in the specified row(s). + secondary_y: boolean or None (default None) + If True, associate this trace with the secondary y-axis of the + subplot at the specified row and col. Only valid if all of the + following conditions are satisfied: + * The figure was created using `plotly.subplots.make_subplots`. + * The row and col arguments are not None + * The subplot at the specified row and col has type xy + (which is the default) and secondary_y True. These + properties are specified in the specs argument to + make_subplots. See the make_subplots docstring for more info. + + Returns + ------- + Figure + """ + from plotly.graph_objs import Histogram + + new_trace = Histogram( + alignmentgroup=alignmentgroup, + autobinx=autobinx, + autobiny=autobiny, + bingroup=bingroup, + cliponaxis=cliponaxis, + constraintext=constraintext, + cumulative=cumulative, + customdata=customdata, + customdatasrc=customdatasrc, + error_x=error_x, + error_y=error_y, + histfunc=histfunc, + histnorm=histnorm, + hoverinfo=hoverinfo, + hoverinfosrc=hoverinfosrc, + hoverlabel=hoverlabel, + hovertemplate=hovertemplate, + hovertemplatefallback=hovertemplatefallback, + hovertemplatesrc=hovertemplatesrc, + hovertext=hovertext, + hovertextsrc=hovertextsrc, + ids=ids, + idssrc=idssrc, + insidetextanchor=insidetextanchor, + insidetextfont=insidetextfont, + legend=legend, + legendgroup=legendgroup, + legendgrouptitle=legendgrouptitle, + legendrank=legendrank, + legendwidth=legendwidth, + marker=marker, + meta=meta, + metasrc=metasrc, + name=name, + nbinsx=nbinsx, + nbinsy=nbinsy, + offsetgroup=offsetgroup, + opacity=opacity, + orientation=orientation, + outsidetextfont=outsidetextfont, + selected=selected, + selectedpoints=selectedpoints, + showlegend=showlegend, + stream=stream, + text=text, + textangle=textangle, + textfont=textfont, + textposition=textposition, + textsrc=textsrc, + texttemplate=texttemplate, + texttemplatefallback=texttemplatefallback, + uid=uid, + uirevision=uirevision, + unselected=unselected, + visible=visible, + x=x, + xaxis=xaxis, + xbins=xbins, + xcalendar=xcalendar, + xhoverformat=xhoverformat, + xsrc=xsrc, + y=y, + yaxis=yaxis, + ybins=ybins, + ycalendar=ycalendar, + yhoverformat=yhoverformat, + ysrc=ysrc, + zorder=zorder, + **kwargs, + ) + return self.add_trace(new_trace, row=row, col=col, secondary_y=secondary_y) + + def add_histogram2d( + self, + autobinx=None, + autobiny=None, + autocolorscale=None, + bingroup=None, + coloraxis=None, + colorbar=None, + colorscale=None, + customdata=None, + customdatasrc=None, + histfunc=None, + histnorm=None, + hoverinfo=None, + hoverinfosrc=None, + hoverlabel=None, + hovertemplate=None, + hovertemplatefallback=None, + hovertemplatesrc=None, + ids=None, + idssrc=None, + legend=None, + legendgroup=None, + legendgrouptitle=None, + legendrank=None, + legendwidth=None, + marker=None, + meta=None, + metasrc=None, + name=None, + nbinsx=None, + nbinsy=None, + opacity=None, + reversescale=None, + showlegend=None, + showscale=None, + stream=None, + textfont=None, + texttemplate=None, + texttemplatefallback=None, + uid=None, + uirevision=None, + visible=None, + x=None, + xaxis=None, + xbingroup=None, + xbins=None, + xcalendar=None, + xgap=None, + xhoverformat=None, + xsrc=None, + y=None, + yaxis=None, + ybingroup=None, + ybins=None, + ycalendar=None, + ygap=None, + yhoverformat=None, + ysrc=None, + z=None, + zauto=None, + zhoverformat=None, + zmax=None, + zmid=None, + zmin=None, + zsmooth=None, + zsrc=None, + row=None, + col=None, + secondary_y=None, + **kwargs, + ) -> "Figure": + """ + Add a new Histogram2d trace + + The sample data from which statistics are computed is set in + `x` and `y` (where `x` and `y` represent marginal + distributions, binning is set in `xbins` and `ybins` in this + case) or `z` (where `z` represent the 2D distribution and + binning set, binning is set by `x` and `y` in this case). The + resulting distribution is visualized as a heatmap. + + Parameters + ---------- + autobinx + Obsolete: since v1.42 each bin attribute is auto- + determined separately and `autobinx` is not needed. + However, we accept `autobinx: true` or `false` and will + update `xbins` accordingly before deleting `autobinx` + from the trace. + autobiny + Obsolete: since v1.42 each bin attribute is auto- + determined separately and `autobiny` is not needed. + However, we accept `autobiny: true` or `false` and will + update `ybins` accordingly before deleting `autobiny` + from the trace. + autocolorscale + Determines whether the colorscale is a default palette + (`autocolorscale: true`) or the palette determined by + `colorscale`. In case `colorscale` is unspecified or + `autocolorscale` is true, the default palette will be + chosen according to whether numbers in the `color` + array are all positive, all negative or mixed. + bingroup + Set the `xbingroup` and `ybingroup` default prefix For + example, setting a `bingroup` of 1 on two histogram2d + traces will make them their x-bins and y-bins match + separately. + coloraxis + Sets a reference to a shared color axis. References to + these shared color axes are "coloraxis", "coloraxis2", + "coloraxis3", etc. Settings for these shared color axes + are set in the layout, under `layout.coloraxis`, + `layout.coloraxis2`, etc. Note that multiple color + scales can be linked to the same color axis. + colorbar + :class:`plotly.graph_objects.histogram2d.ColorBar` + instance or dict with compatible properties + colorscale + Sets the colorscale. The colorscale must be an array + containing arrays mapping a normalized value to an rgb, + rgba, hex, hsl, hsv, or named color string. At minimum, + a mapping for the lowest (0) and highest (1) values are + required. For example, `[[0, 'rgb(0,0,255)'], [1, + 'rgb(255,0,0)']]`. To control the bounds of the + colorscale in color space, use `zmin` and `zmax`. + Alternatively, `colorscale` may be a palette name + string of the following list: Blackbody,Bluered,Blues,C + ividis,Earth,Electric,Greens,Greys,Hot,Jet,Picnic,Portl + and,Rainbow,RdBu,Reds,Viridis,YlGnBu,YlOrRd. + customdata + Assigns extra data each datum. This may be useful when + listening to hover, click and selection events. Note + that, "scatter" traces also appends customdata items in + the markers DOM elements + customdatasrc + Sets the source reference on Chart Studio Cloud for + `customdata`. + histfunc + Specifies the binning function used for this histogram + trace. If "count", the histogram values are computed by + counting the number of values lying inside each bin. If + "sum", "avg", "min", "max", the histogram values are + computed using the sum, the average, the minimum or the + maximum of the values lying inside each bin + respectively. + histnorm + Specifies the type of normalization used for this + histogram trace. If "", the span of each bar + corresponds to the number of occurrences (i.e. the + number of data points lying inside the bins). If + "percent" / "probability", the span of each bar + corresponds to the percentage / fraction of occurrences + with respect to the total number of sample points + (here, the sum of all bin HEIGHTS equals 100% / 1). If + "density", the span of each bar corresponds to the + number of occurrences in a bin divided by the size of + the bin interval (here, the sum of all bin AREAS equals + the total number of sample points). If *probability + density*, the area of each bar corresponds to the + probability that an event will fall into the + corresponding bin (here, the sum of all bin AREAS + equals 1). + hoverinfo + Determines which trace information appear on hover. If + `none` or `skip` are set, no information is displayed + upon hovering. But, if `none` is set, click and hover + events are still fired. + hoverinfosrc + Sets the source reference on Chart Studio Cloud for + `hoverinfo`. + hoverlabel + :class:`plotly.graph_objects.histogram2d.Hoverlabel` + instance or dict with compatible properties + hovertemplate + Template string used for rendering the information that + appear on hover box. Note that this will override + `hoverinfo`. Variables are inserted using %{variable}, + for example "y: %{y}" as well as %{xother}, {%_xother}, + {%_xother_}, {%xother_}. When showing info for several + points, "xother" will be added to those with different + x positions from the first point. An underscore before + or after "(x|y)other" will add a space on that side, + only when this field is shown. Numbers are formatted + using d3-format's syntax %{variable:d3-format}, for + example "Price: %{y:$.2f}". + https://github.com/d3/d3-format/tree/v1.4.5#d3-format + for details on the formatting syntax. Dates are + formatted using d3-time-format's syntax + %{variable|d3-time-format}, for example "Day: + %{2019-01-01|%A}". https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format for details on the + date formatting syntax. Variables that can't be found + will be replaced with the specifier. For example, a + template of "data: %{x}, %{y}" will result in a value + of "data: 1, %{y}" if x is 1 and y is missing. + Variables with an undefined value will be replaced with + the fallback value. The variables available in + `hovertemplate` are the ones emitted as event data + described at this link + https://plotly.com/javascript/plotlyjs-events/#event- + data. Additionally, all attributes that can be + specified per-point (the ones that are `arrayOk: true`) + are available. Finally, the template string has access + to variable `z` Anything contained in tag `` is + displayed in the secondary box, for example + `%{fullData.name}`. To hide the + secondary box completely, use an empty tag + ``. + hovertemplatefallback + Fallback string that's displayed when a variable + referenced in a template is missing. If the boolean + value 'false' is passed in, the specifier with the + missing variable will be displayed. + hovertemplatesrc + Sets the source reference on Chart Studio Cloud for + `hovertemplate`. + ids + Assigns id labels to each datum. These ids for object + constancy of data points during animation. Should be an + array of strings, not numbers or any other type. + idssrc + Sets the source reference on Chart Studio Cloud for + `ids`. + legend + Sets the reference to a legend to show this trace in. + References to these legends are "legend", "legend2", + "legend3", etc. Settings for these legends are set in + the layout, under `layout.legend`, `layout.legend2`, + etc. + legendgroup + Sets the legend group for this trace. Traces and shapes + part of the same legend group hide/show at the same + time when toggling legend items. + legendgrouptitle + :class:`plotly.graph_objects.histogram2d.Legendgrouptit + le` instance or dict with compatible properties + legendrank + Sets the legend rank for this trace. Items and groups + with smaller ranks are presented on top/left side while + with "reversed" `legend.traceorder` they are on + bottom/right side. The default legendrank is 1000, so + that you can use ranks less than 1000 to place certain + items before all unranked items, and ranks greater than + 1000 to go after all unranked items. When having + unranked or equal rank items shapes would be displayed + after traces i.e. according to their order in data and + layout. + legendwidth + Sets the width (in px or fraction) of the legend for + this trace. + marker + :class:`plotly.graph_objects.histogram2d.Marker` + instance or dict with compatible properties + meta + Assigns extra meta information associated with this + trace that can be used in various text attributes. + Attributes such as trace `name`, graph, axis and + colorbar `title.text`, annotation `text` + `rangeselector`, `updatemenues` and `sliders` `label` + text all support `meta`. To access the trace `meta` + values in an attribute in the same trace, simply use + `%{meta[i]}` where `i` is the index or key of the + `meta` item in question. To access trace `meta` in + layout attributes, use `%{data[n[.meta[i]}` where `i` + is the index or key of the `meta` and `n` is the trace + index. + metasrc + Sets the source reference on Chart Studio Cloud for + `meta`. + name + Sets the trace name. The trace name appears as the + legend item and on hover. + nbinsx + Specifies the maximum number of desired bins. This + value will be used in an algorithm that will decide the + optimal bin size such that the histogram best + visualizes the distribution of the data. Ignored if + `xbins.size` is provided. + nbinsy + Specifies the maximum number of desired bins. This + value will be used in an algorithm that will decide the + optimal bin size such that the histogram best + visualizes the distribution of the data. Ignored if + `ybins.size` is provided. + opacity + Sets the opacity of the trace. + reversescale + Reverses the color mapping if true. If true, `zmin` + will correspond to the last color in the array and + `zmax` will correspond to the first color. + showlegend + Determines whether or not an item corresponding to this + trace is shown in the legend. + showscale + Determines whether or not a colorbar is displayed for + this trace. + stream + :class:`plotly.graph_objects.histogram2d.Stream` + instance or dict with compatible properties + textfont + Sets the text font. + texttemplate + Template string used for rendering the information text + that appears on points. Note that this will override + `textinfo`. Variables are inserted using %{variable}, + for example "y: %{y}". Numbers are formatted using + d3-format's syntax %{variable:d3-format}, for example + "Price: %{y:$.2f}". + https://github.com/d3/d3-format/tree/v1.4.5#d3-format + for details on the formatting syntax. Dates are + formatted using d3-time-format's syntax + %{variable|d3-time-format}, for example "Day: + %{2019-01-01|%A}". https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format for details on the + date formatting syntax. Variables that can't be found + will be replaced with the specifier. For example, a + template of "data: %{x}, %{y}" will result in a value + of "data: 1, %{y}" if x is 1 and y is missing. + Variables with an undefined value will be replaced with + the fallback value. All attributes that can be + specified per-point (the ones that are `arrayOk: true`) + are available. Finally, the template string has access + to variable `z` + texttemplatefallback + Fallback string that's displayed when a variable + referenced in a template is missing. If the boolean + value 'false' is passed in, the specifier with the + missing variable will be displayed. + uid + Assign an id to this trace, Use this to provide object + constancy between traces during animations and + transitions. + uirevision + Controls persistence of some user-driven changes to the + trace: `constraintrange` in `parcoords` traces, as well + as some `editable: true` modifications such as `name` + and `colorbar.title`. Defaults to `layout.uirevision`. + Note that other user-driven trace attribute changes are + controlled by `layout` attributes: `trace.visible` is + controlled by `layout.legend.uirevision`, + `selectedpoints` is controlled by + `layout.selectionrevision`, and `colorbar.(x|y)` + (accessible with `config: {editable: true}`) is + controlled by `layout.editrevision`. Trace changes are + tracked by `uid`, which only falls back on trace index + if no `uid` is provided. So if your app can add/remove + traces before the end of the `data` array, such that + the same trace has a different index, you can still + preserve user-driven changes if you give each trace a + `uid` that stays with it as it moves. + visible + Determines whether or not this trace is visible. If + "legendonly", the trace is not drawn, but can appear as + a legend item (provided that the legend itself is + visible). + x + Sets the sample data to be binned on the x axis. + xaxis + Sets a reference between this trace's x coordinates and + a 2D cartesian x axis. If "x" (the default value), the + x coordinates refer to `layout.xaxis`. If "x2", the x + coordinates refer to `layout.xaxis2`, and so on. + xbingroup + Set a group of histogram traces which will have + compatible x-bin settings. Using `xbingroup`, + histogram2d and histogram2dcontour traces (on axes of + the same axis type) can have compatible x-bin settings. + Note that the same `xbingroup` value can be used to set + (1D) histogram `bingroup` + xbins + :class:`plotly.graph_objects.histogram2d.XBins` + instance or dict with compatible properties + xcalendar + Sets the calendar system to use with `x` date data. + xgap + Sets the horizontal gap (in pixels) between bricks. + xhoverformat + Sets the hover text formatting rulefor `x` using d3 + formatting mini-languages which are very similar to + those in Python. For numbers, see: + https://github.com/d3/d3-format/tree/v1.4.5#d3-format. + And for dates see: https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format. We add two items to + d3's date formatter: "%h" for half of the year as a + decimal number as well as "%{n}f" for fractional + seconds with n digits. For example, *2016-10-13 + 09:15:23.456* with tickformat "%H~%M~%S.%2f" would + display *09~15~23.46*By default the values are + formatted using `xaxis.hoverformat`. + xsrc + Sets the source reference on Chart Studio Cloud for + `x`. + y + Sets the sample data to be binned on the y axis. + yaxis + Sets a reference between this trace's y coordinates and + a 2D cartesian y axis. If "y" (the default value), the + y coordinates refer to `layout.yaxis`. If "y2", the y + coordinates refer to `layout.yaxis2`, and so on. + ybingroup + Set a group of histogram traces which will have + compatible y-bin settings. Using `ybingroup`, + histogram2d and histogram2dcontour traces (on axes of + the same axis type) can have compatible y-bin settings. + Note that the same `ybingroup` value can be used to set + (1D) histogram `bingroup` + ybins + :class:`plotly.graph_objects.histogram2d.YBins` + instance or dict with compatible properties + ycalendar + Sets the calendar system to use with `y` date data. + ygap + Sets the vertical gap (in pixels) between bricks. + yhoverformat + Sets the hover text formatting rulefor `y` using d3 + formatting mini-languages which are very similar to + those in Python. For numbers, see: + https://github.com/d3/d3-format/tree/v1.4.5#d3-format. + And for dates see: https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format. We add two items to + d3's date formatter: "%h" for half of the year as a + decimal number as well as "%{n}f" for fractional + seconds with n digits. For example, *2016-10-13 + 09:15:23.456* with tickformat "%H~%M~%S.%2f" would + display *09~15~23.46*By default the values are + formatted using `yaxis.hoverformat`. + ysrc + Sets the source reference on Chart Studio Cloud for + `y`. + z + Sets the aggregation data. + zauto + Determines whether or not the color domain is computed + with respect to the input data (here in `z`) or the + bounds set in `zmin` and `zmax` Defaults to `false` + when `zmin` and `zmax` are set by the user. + zhoverformat + Sets the hover text formatting rulefor `z` using d3 + formatting mini-languages which are very similar to + those in Python. For numbers, see: https://github.com/d + 3/d3-format/tree/v1.4.5#d3-format.By default the values + are formatted using generic number format. + zmax + Sets the upper bound of the color domain. Value should + have the same units as in `z` and if set, `zmin` must + be set as well. + zmid + Sets the mid-point of the color domain by scaling + `zmin` and/or `zmax` to be equidistant to this point. + Value should have the same units as in `z`. Has no + effect when `zauto` is `false`. + zmin + Sets the lower bound of the color domain. Value should + have the same units as in `z` and if set, `zmax` must + be set as well. + zsmooth + Picks a smoothing algorithm use to smooth `z` data. + zsrc + Sets the source reference on Chart Studio Cloud for + `z`. + row : 'all', int or None (default) + Subplot row index (starting from 1) for the trace to be + added. Only valid if figure was created using + `plotly.tools.make_subplots`.If 'all', addresses all + rows in the specified column(s). + col : 'all', int or None (default) + Subplot col index (starting from 1) for the trace to be + added. Only valid if figure was created using + `plotly.tools.make_subplots`.If 'all', addresses all + columns in the specified row(s). + secondary_y: boolean or None (default None) + If True, associate this trace with the secondary y-axis of the + subplot at the specified row and col. Only valid if all of the + following conditions are satisfied: + * The figure was created using `plotly.subplots.make_subplots`. + * The row and col arguments are not None + * The subplot at the specified row and col has type xy + (which is the default) and secondary_y True. These + properties are specified in the specs argument to + make_subplots. See the make_subplots docstring for more info. + + Returns + ------- + Figure + """ + from plotly.graph_objs import Histogram2d + + new_trace = Histogram2d( + autobinx=autobinx, + autobiny=autobiny, + autocolorscale=autocolorscale, + bingroup=bingroup, + coloraxis=coloraxis, + colorbar=colorbar, + colorscale=colorscale, + customdata=customdata, + customdatasrc=customdatasrc, + histfunc=histfunc, + histnorm=histnorm, + hoverinfo=hoverinfo, + hoverinfosrc=hoverinfosrc, + hoverlabel=hoverlabel, + hovertemplate=hovertemplate, + hovertemplatefallback=hovertemplatefallback, + hovertemplatesrc=hovertemplatesrc, + ids=ids, + idssrc=idssrc, + legend=legend, + legendgroup=legendgroup, + legendgrouptitle=legendgrouptitle, + legendrank=legendrank, + legendwidth=legendwidth, + marker=marker, + meta=meta, + metasrc=metasrc, + name=name, + nbinsx=nbinsx, + nbinsy=nbinsy, + opacity=opacity, + reversescale=reversescale, + showlegend=showlegend, + showscale=showscale, + stream=stream, + textfont=textfont, + texttemplate=texttemplate, + texttemplatefallback=texttemplatefallback, + uid=uid, + uirevision=uirevision, + visible=visible, + x=x, + xaxis=xaxis, + xbingroup=xbingroup, + xbins=xbins, + xcalendar=xcalendar, + xgap=xgap, + xhoverformat=xhoverformat, + xsrc=xsrc, + y=y, + yaxis=yaxis, + ybingroup=ybingroup, + ybins=ybins, + ycalendar=ycalendar, + ygap=ygap, + yhoverformat=yhoverformat, + ysrc=ysrc, + z=z, + zauto=zauto, + zhoverformat=zhoverformat, + zmax=zmax, + zmid=zmid, + zmin=zmin, + zsmooth=zsmooth, + zsrc=zsrc, + **kwargs, + ) + return self.add_trace(new_trace, row=row, col=col, secondary_y=secondary_y) + + def add_histogram2dcontour( + self, + autobinx=None, + autobiny=None, + autocolorscale=None, + autocontour=None, + bingroup=None, + coloraxis=None, + colorbar=None, + colorscale=None, + contours=None, + customdata=None, + customdatasrc=None, + histfunc=None, + histnorm=None, + hoverinfo=None, + hoverinfosrc=None, + hoverlabel=None, + hovertemplate=None, + hovertemplatefallback=None, + hovertemplatesrc=None, + ids=None, + idssrc=None, + legend=None, + legendgroup=None, + legendgrouptitle=None, + legendrank=None, + legendwidth=None, + line=None, + marker=None, + meta=None, + metasrc=None, + name=None, + nbinsx=None, + nbinsy=None, + ncontours=None, + opacity=None, + reversescale=None, + showlegend=None, + showscale=None, + stream=None, + textfont=None, + texttemplate=None, + texttemplatefallback=None, + uid=None, + uirevision=None, + visible=None, + x=None, + xaxis=None, + xbingroup=None, + xbins=None, + xcalendar=None, + xhoverformat=None, + xsrc=None, + y=None, + yaxis=None, + ybingroup=None, + ybins=None, + ycalendar=None, + yhoverformat=None, + ysrc=None, + z=None, + zauto=None, + zhoverformat=None, + zmax=None, + zmid=None, + zmin=None, + zsrc=None, + row=None, + col=None, + secondary_y=None, + **kwargs, + ) -> "Figure": + """ + Add a new Histogram2dContour trace + + The sample data from which statistics are computed is set in + `x` and `y` (where `x` and `y` represent marginal + distributions, binning is set in `xbins` and `ybins` in this + case) or `z` (where `z` represent the 2D distribution and + binning set, binning is set by `x` and `y` in this case). The + resulting distribution is visualized as a contour plot. + + Parameters + ---------- + autobinx + Obsolete: since v1.42 each bin attribute is auto- + determined separately and `autobinx` is not needed. + However, we accept `autobinx: true` or `false` and will + update `xbins` accordingly before deleting `autobinx` + from the trace. + autobiny + Obsolete: since v1.42 each bin attribute is auto- + determined separately and `autobiny` is not needed. + However, we accept `autobiny: true` or `false` and will + update `ybins` accordingly before deleting `autobiny` + from the trace. + autocolorscale + Determines whether the colorscale is a default palette + (`autocolorscale: true`) or the palette determined by + `colorscale`. In case `colorscale` is unspecified or + `autocolorscale` is true, the default palette will be + chosen according to whether numbers in the `color` + array are all positive, all negative or mixed. + autocontour + Determines whether or not the contour level attributes + are picked by an algorithm. If True, the number of + contour levels can be set in `ncontours`. If False, set + the contour level attributes in `contours`. + bingroup + Set the `xbingroup` and `ybingroup` default prefix For + example, setting a `bingroup` of 1 on two histogram2d + traces will make them their x-bins and y-bins match + separately. + coloraxis + Sets a reference to a shared color axis. References to + these shared color axes are "coloraxis", "coloraxis2", + "coloraxis3", etc. Settings for these shared color axes + are set in the layout, under `layout.coloraxis`, + `layout.coloraxis2`, etc. Note that multiple color + scales can be linked to the same color axis. + colorbar + :class:`plotly.graph_objects.histogram2dcontour.ColorBa + r` instance or dict with compatible properties + colorscale + Sets the colorscale. The colorscale must be an array + containing arrays mapping a normalized value to an rgb, + rgba, hex, hsl, hsv, or named color string. At minimum, + a mapping for the lowest (0) and highest (1) values are + required. For example, `[[0, 'rgb(0,0,255)'], [1, + 'rgb(255,0,0)']]`. To control the bounds of the + colorscale in color space, use `zmin` and `zmax`. + Alternatively, `colorscale` may be a palette name + string of the following list: Blackbody,Bluered,Blues,C + ividis,Earth,Electric,Greens,Greys,Hot,Jet,Picnic,Portl + and,Rainbow,RdBu,Reds,Viridis,YlGnBu,YlOrRd. + contours + :class:`plotly.graph_objects.histogram2dcontour.Contour + s` instance or dict with compatible properties + customdata + Assigns extra data each datum. This may be useful when + listening to hover, click and selection events. Note + that, "scatter" traces also appends customdata items in + the markers DOM elements + customdatasrc + Sets the source reference on Chart Studio Cloud for + `customdata`. + histfunc + Specifies the binning function used for this histogram + trace. If "count", the histogram values are computed by + counting the number of values lying inside each bin. If + "sum", "avg", "min", "max", the histogram values are + computed using the sum, the average, the minimum or the + maximum of the values lying inside each bin + respectively. + histnorm + Specifies the type of normalization used for this + histogram trace. If "", the span of each bar + corresponds to the number of occurrences (i.e. the + number of data points lying inside the bins). If + "percent" / "probability", the span of each bar + corresponds to the percentage / fraction of occurrences + with respect to the total number of sample points + (here, the sum of all bin HEIGHTS equals 100% / 1). If + "density", the span of each bar corresponds to the + number of occurrences in a bin divided by the size of + the bin interval (here, the sum of all bin AREAS equals + the total number of sample points). If *probability + density*, the area of each bar corresponds to the + probability that an event will fall into the + corresponding bin (here, the sum of all bin AREAS + equals 1). + hoverinfo + Determines which trace information appear on hover. If + `none` or `skip` are set, no information is displayed + upon hovering. But, if `none` is set, click and hover + events are still fired. + hoverinfosrc + Sets the source reference on Chart Studio Cloud for + `hoverinfo`. + hoverlabel + :class:`plotly.graph_objects.histogram2dcontour.Hoverla + bel` instance or dict with compatible properties + hovertemplate + Template string used for rendering the information that + appear on hover box. Note that this will override + `hoverinfo`. Variables are inserted using %{variable}, + for example "y: %{y}" as well as %{xother}, {%_xother}, + {%_xother_}, {%xother_}. When showing info for several + points, "xother" will be added to those with different + x positions from the first point. An underscore before + or after "(x|y)other" will add a space on that side, + only when this field is shown. Numbers are formatted + using d3-format's syntax %{variable:d3-format}, for + example "Price: %{y:$.2f}". + https://github.com/d3/d3-format/tree/v1.4.5#d3-format + for details on the formatting syntax. Dates are + formatted using d3-time-format's syntax + %{variable|d3-time-format}, for example "Day: + %{2019-01-01|%A}". https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format for details on the + date formatting syntax. Variables that can't be found + will be replaced with the specifier. For example, a + template of "data: %{x}, %{y}" will result in a value + of "data: 1, %{y}" if x is 1 and y is missing. + Variables with an undefined value will be replaced with + the fallback value. The variables available in + `hovertemplate` are the ones emitted as event data + described at this link + https://plotly.com/javascript/plotlyjs-events/#event- + data. Additionally, all attributes that can be + specified per-point (the ones that are `arrayOk: true`) + are available. Finally, the template string has access + to variable `z` Anything contained in tag `` is + displayed in the secondary box, for example + `%{fullData.name}`. To hide the + secondary box completely, use an empty tag + ``. + hovertemplatefallback + Fallback string that's displayed when a variable + referenced in a template is missing. If the boolean + value 'false' is passed in, the specifier with the + missing variable will be displayed. + hovertemplatesrc + Sets the source reference on Chart Studio Cloud for + `hovertemplate`. + ids + Assigns id labels to each datum. These ids for object + constancy of data points during animation. Should be an + array of strings, not numbers or any other type. + idssrc + Sets the source reference on Chart Studio Cloud for + `ids`. + legend + Sets the reference to a legend to show this trace in. + References to these legends are "legend", "legend2", + "legend3", etc. Settings for these legends are set in + the layout, under `layout.legend`, `layout.legend2`, + etc. + legendgroup + Sets the legend group for this trace. Traces and shapes + part of the same legend group hide/show at the same + time when toggling legend items. + legendgrouptitle + :class:`plotly.graph_objects.histogram2dcontour.Legendg + rouptitle` instance or dict with compatible properties + legendrank + Sets the legend rank for this trace. Items and groups + with smaller ranks are presented on top/left side while + with "reversed" `legend.traceorder` they are on + bottom/right side. The default legendrank is 1000, so + that you can use ranks less than 1000 to place certain + items before all unranked items, and ranks greater than + 1000 to go after all unranked items. When having + unranked or equal rank items shapes would be displayed + after traces i.e. according to their order in data and + layout. + legendwidth + Sets the width (in px or fraction) of the legend for + this trace. + line + :class:`plotly.graph_objects.histogram2dcontour.Line` + instance or dict with compatible properties + marker + :class:`plotly.graph_objects.histogram2dcontour.Marker` + instance or dict with compatible properties + meta + Assigns extra meta information associated with this + trace that can be used in various text attributes. + Attributes such as trace `name`, graph, axis and + colorbar `title.text`, annotation `text` + `rangeselector`, `updatemenues` and `sliders` `label` + text all support `meta`. To access the trace `meta` + values in an attribute in the same trace, simply use + `%{meta[i]}` where `i` is the index or key of the + `meta` item in question. To access trace `meta` in + layout attributes, use `%{data[n[.meta[i]}` where `i` + is the index or key of the `meta` and `n` is the trace + index. + metasrc + Sets the source reference on Chart Studio Cloud for + `meta`. + name + Sets the trace name. The trace name appears as the + legend item and on hover. + nbinsx + Specifies the maximum number of desired bins. This + value will be used in an algorithm that will decide the + optimal bin size such that the histogram best + visualizes the distribution of the data. Ignored if + `xbins.size` is provided. + nbinsy + Specifies the maximum number of desired bins. This + value will be used in an algorithm that will decide the + optimal bin size such that the histogram best + visualizes the distribution of the data. Ignored if + `ybins.size` is provided. + ncontours + Sets the maximum number of contour levels. The actual + number of contours will be chosen automatically to be + less than or equal to the value of `ncontours`. Has an + effect only if `autocontour` is True or if + `contours.size` is missing. + opacity + Sets the opacity of the trace. + reversescale + Reverses the color mapping if true. If true, `zmin` + will correspond to the last color in the array and + `zmax` will correspond to the first color. + showlegend + Determines whether or not an item corresponding to this + trace is shown in the legend. + showscale + Determines whether or not a colorbar is displayed for + this trace. + stream + :class:`plotly.graph_objects.histogram2dcontour.Stream` + instance or dict with compatible properties + textfont + For this trace it only has an effect if `coloring` is + set to "heatmap". Sets the text font. + texttemplate + For this trace it only has an effect if `coloring` is + set to "heatmap". Template string used for rendering + the information text that appears on points. Note that + this will override `textinfo`. Variables are inserted + using %{variable}, for example "y: %{y}". Numbers are + formatted using d3-format's syntax + %{variable:d3-format}, for example "Price: %{y:$.2f}". + https://github.com/d3/d3-format/tree/v1.4.5#d3-format + for details on the formatting syntax. Dates are + formatted using d3-time-format's syntax + %{variable|d3-time-format}, for example "Day: + %{2019-01-01|%A}". https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format for details on the + date formatting syntax. Variables that can't be found + will be replaced with the specifier. For example, a + template of "data: %{x}, %{y}" will result in a value + of "data: 1, %{y}" if x is 1 and y is missing. + Variables with an undefined value will be replaced with + the fallback value. All attributes that can be + specified per-point (the ones that are `arrayOk: true`) + are available. Finally, the template string has access + to variables `x`, `y`, `z` and `text`. + texttemplatefallback + Fallback string that's displayed when a variable + referenced in a template is missing. If the boolean + value 'false' is passed in, the specifier with the + missing variable will be displayed. + uid + Assign an id to this trace, Use this to provide object + constancy between traces during animations and + transitions. + uirevision + Controls persistence of some user-driven changes to the + trace: `constraintrange` in `parcoords` traces, as well + as some `editable: true` modifications such as `name` + and `colorbar.title`. Defaults to `layout.uirevision`. + Note that other user-driven trace attribute changes are + controlled by `layout` attributes: `trace.visible` is + controlled by `layout.legend.uirevision`, + `selectedpoints` is controlled by + `layout.selectionrevision`, and `colorbar.(x|y)` + (accessible with `config: {editable: true}`) is + controlled by `layout.editrevision`. Trace changes are + tracked by `uid`, which only falls back on trace index + if no `uid` is provided. So if your app can add/remove + traces before the end of the `data` array, such that + the same trace has a different index, you can still + preserve user-driven changes if you give each trace a + `uid` that stays with it as it moves. + visible + Determines whether or not this trace is visible. If + "legendonly", the trace is not drawn, but can appear as + a legend item (provided that the legend itself is + visible). + x + Sets the sample data to be binned on the x axis. + xaxis + Sets a reference between this trace's x coordinates and + a 2D cartesian x axis. If "x" (the default value), the + x coordinates refer to `layout.xaxis`. If "x2", the x + coordinates refer to `layout.xaxis2`, and so on. + xbingroup + Set a group of histogram traces which will have + compatible x-bin settings. Using `xbingroup`, + histogram2d and histogram2dcontour traces (on axes of + the same axis type) can have compatible x-bin settings. + Note that the same `xbingroup` value can be used to set + (1D) histogram `bingroup` + xbins + :class:`plotly.graph_objects.histogram2dcontour.XBins` + instance or dict with compatible properties + xcalendar + Sets the calendar system to use with `x` date data. + xhoverformat + Sets the hover text formatting rulefor `x` using d3 + formatting mini-languages which are very similar to + those in Python. For numbers, see: + https://github.com/d3/d3-format/tree/v1.4.5#d3-format. + And for dates see: https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format. We add two items to + d3's date formatter: "%h" for half of the year as a + decimal number as well as "%{n}f" for fractional + seconds with n digits. For example, *2016-10-13 + 09:15:23.456* with tickformat "%H~%M~%S.%2f" would + display *09~15~23.46*By default the values are + formatted using `xaxis.hoverformat`. + xsrc + Sets the source reference on Chart Studio Cloud for + `x`. + y + Sets the sample data to be binned on the y axis. + yaxis + Sets a reference between this trace's y coordinates and + a 2D cartesian y axis. If "y" (the default value), the + y coordinates refer to `layout.yaxis`. If "y2", the y + coordinates refer to `layout.yaxis2`, and so on. + ybingroup + Set a group of histogram traces which will have + compatible y-bin settings. Using `ybingroup`, + histogram2d and histogram2dcontour traces (on axes of + the same axis type) can have compatible y-bin settings. + Note that the same `ybingroup` value can be used to set + (1D) histogram `bingroup` + ybins + :class:`plotly.graph_objects.histogram2dcontour.YBins` + instance or dict with compatible properties + ycalendar + Sets the calendar system to use with `y` date data. + yhoverformat + Sets the hover text formatting rulefor `y` using d3 + formatting mini-languages which are very similar to + those in Python. For numbers, see: + https://github.com/d3/d3-format/tree/v1.4.5#d3-format. + And for dates see: https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format. We add two items to + d3's date formatter: "%h" for half of the year as a + decimal number as well as "%{n}f" for fractional + seconds with n digits. For example, *2016-10-13 + 09:15:23.456* with tickformat "%H~%M~%S.%2f" would + display *09~15~23.46*By default the values are + formatted using `yaxis.hoverformat`. + ysrc + Sets the source reference on Chart Studio Cloud for + `y`. + z + Sets the aggregation data. + zauto + Determines whether or not the color domain is computed + with respect to the input data (here in `z`) or the + bounds set in `zmin` and `zmax` Defaults to `false` + when `zmin` and `zmax` are set by the user. + zhoverformat + Sets the hover text formatting rulefor `z` using d3 + formatting mini-languages which are very similar to + those in Python. For numbers, see: https://github.com/d + 3/d3-format/tree/v1.4.5#d3-format.By default the values + are formatted using generic number format. + zmax + Sets the upper bound of the color domain. Value should + have the same units as in `z` and if set, `zmin` must + be set as well. + zmid + Sets the mid-point of the color domain by scaling + `zmin` and/or `zmax` to be equidistant to this point. + Value should have the same units as in `z`. Has no + effect when `zauto` is `false`. + zmin + Sets the lower bound of the color domain. Value should + have the same units as in `z` and if set, `zmax` must + be set as well. + zsrc + Sets the source reference on Chart Studio Cloud for + `z`. + row : 'all', int or None (default) + Subplot row index (starting from 1) for the trace to be + added. Only valid if figure was created using + `plotly.tools.make_subplots`.If 'all', addresses all + rows in the specified column(s). + col : 'all', int or None (default) + Subplot col index (starting from 1) for the trace to be + added. Only valid if figure was created using + `plotly.tools.make_subplots`.If 'all', addresses all + columns in the specified row(s). + secondary_y: boolean or None (default None) + If True, associate this trace with the secondary y-axis of the + subplot at the specified row and col. Only valid if all of the + following conditions are satisfied: + * The figure was created using `plotly.subplots.make_subplots`. + * The row and col arguments are not None + * The subplot at the specified row and col has type xy + (which is the default) and secondary_y True. These + properties are specified in the specs argument to + make_subplots. See the make_subplots docstring for more info. + + Returns + ------- + Figure + """ + from plotly.graph_objs import Histogram2dContour + + new_trace = Histogram2dContour( + autobinx=autobinx, + autobiny=autobiny, + autocolorscale=autocolorscale, + autocontour=autocontour, + bingroup=bingroup, + coloraxis=coloraxis, + colorbar=colorbar, + colorscale=colorscale, + contours=contours, + customdata=customdata, + customdatasrc=customdatasrc, + histfunc=histfunc, + histnorm=histnorm, + hoverinfo=hoverinfo, + hoverinfosrc=hoverinfosrc, + hoverlabel=hoverlabel, + hovertemplate=hovertemplate, + hovertemplatefallback=hovertemplatefallback, + hovertemplatesrc=hovertemplatesrc, + ids=ids, + idssrc=idssrc, + legend=legend, + legendgroup=legendgroup, + legendgrouptitle=legendgrouptitle, + legendrank=legendrank, + legendwidth=legendwidth, + line=line, + marker=marker, + meta=meta, + metasrc=metasrc, + name=name, + nbinsx=nbinsx, + nbinsy=nbinsy, + ncontours=ncontours, + opacity=opacity, + reversescale=reversescale, + showlegend=showlegend, + showscale=showscale, + stream=stream, + textfont=textfont, + texttemplate=texttemplate, + texttemplatefallback=texttemplatefallback, + uid=uid, + uirevision=uirevision, + visible=visible, + x=x, + xaxis=xaxis, + xbingroup=xbingroup, + xbins=xbins, + xcalendar=xcalendar, + xhoverformat=xhoverformat, + xsrc=xsrc, + y=y, + yaxis=yaxis, + ybingroup=ybingroup, + ybins=ybins, + ycalendar=ycalendar, + yhoverformat=yhoverformat, + ysrc=ysrc, + z=z, + zauto=zauto, + zhoverformat=zhoverformat, + zmax=zmax, + zmid=zmid, + zmin=zmin, + zsrc=zsrc, + **kwargs, + ) + return self.add_trace(new_trace, row=row, col=col, secondary_y=secondary_y) + + def add_icicle( + self, + branchvalues=None, + count=None, + customdata=None, + customdatasrc=None, + domain=None, + hoverinfo=None, + hoverinfosrc=None, + hoverlabel=None, + hovertemplate=None, + hovertemplatefallback=None, + hovertemplatesrc=None, + hovertext=None, + hovertextsrc=None, + ids=None, + idssrc=None, + insidetextfont=None, + labels=None, + labelssrc=None, + leaf=None, + legend=None, + legendgrouptitle=None, + legendrank=None, + legendwidth=None, + level=None, + marker=None, + maxdepth=None, + meta=None, + metasrc=None, + name=None, + opacity=None, + outsidetextfont=None, + parents=None, + parentssrc=None, + pathbar=None, + root=None, + sort=None, + stream=None, + text=None, + textfont=None, + textinfo=None, + textposition=None, + textsrc=None, + texttemplate=None, + texttemplatefallback=None, + texttemplatesrc=None, + tiling=None, + uid=None, + uirevision=None, + values=None, + valuessrc=None, + visible=None, + row=None, + col=None, + **kwargs, + ) -> "Figure": + """ + Add a new Icicle trace + + Visualize hierarchal data from leaves (and/or outer branches) + towards root with rectangles. The icicle sectors are determined + by the entries in "labels" or "ids" and in "parents". + + Parameters + ---------- + branchvalues + Determines how the items in `values` are summed. When + set to "total", items in `values` are taken to be value + of all its descendants. When set to "remainder", items + in `values` corresponding to the root and the branches + sectors are taken to be the extra part not part of the + sum of the values at their leaves. + count + Determines default for `values` when it is not + provided, by inferring a 1 for each of the "leaves" + and/or "branches", otherwise 0. + customdata + Assigns extra data each datum. This may be useful when + listening to hover, click and selection events. Note + that, "scatter" traces also appends customdata items in + the markers DOM elements + customdatasrc + Sets the source reference on Chart Studio Cloud for + `customdata`. + domain + :class:`plotly.graph_objects.icicle.Domain` instance or + dict with compatible properties + hoverinfo + Determines which trace information appear on hover. If + `none` or `skip` are set, no information is displayed + upon hovering. But, if `none` is set, click and hover + events are still fired. + hoverinfosrc + Sets the source reference on Chart Studio Cloud for + `hoverinfo`. + hoverlabel + :class:`plotly.graph_objects.icicle.Hoverlabel` + instance or dict with compatible properties + hovertemplate + Template string used for rendering the information that + appear on hover box. Note that this will override + `hoverinfo`. Variables are inserted using %{variable}, + for example "y: %{y}" as well as %{xother}, {%_xother}, + {%_xother_}, {%xother_}. When showing info for several + points, "xother" will be added to those with different + x positions from the first point. An underscore before + or after "(x|y)other" will add a space on that side, + only when this field is shown. Numbers are formatted + using d3-format's syntax %{variable:d3-format}, for + example "Price: %{y:$.2f}". + https://github.com/d3/d3-format/tree/v1.4.5#d3-format + for details on the formatting syntax. Dates are + formatted using d3-time-format's syntax + %{variable|d3-time-format}, for example "Day: + %{2019-01-01|%A}". https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format for details on the + date formatting syntax. Variables that can't be found + will be replaced with the specifier. For example, a + template of "data: %{x}, %{y}" will result in a value + of "data: 1, %{y}" if x is 1 and y is missing. + Variables with an undefined value will be replaced with + the fallback value. The variables available in + `hovertemplate` are the ones emitted as event data + described at this link + https://plotly.com/javascript/plotlyjs-events/#event- + data. Additionally, all attributes that can be + specified per-point (the ones that are `arrayOk: true`) + are available. Finally, the template string has access + to variables `currentPath`, `root`, `entry`, + `percentRoot`, `percentEntry` and `percentParent`. + Anything contained in tag `` is displayed in the + secondary box, for example + `%{fullData.name}`. To hide the + secondary box completely, use an empty tag + ``. + hovertemplatefallback + Fallback string that's displayed when a variable + referenced in a template is missing. If the boolean + value 'false' is passed in, the specifier with the + missing variable will be displayed. + hovertemplatesrc + Sets the source reference on Chart Studio Cloud for + `hovertemplate`. + hovertext + Sets hover text elements associated with each sector. + If a single string, the same string appears for all + data points. If an array of string, the items are + mapped in order of this trace's sectors. To be seen, + trace `hoverinfo` must contain a "text" flag. + hovertextsrc + Sets the source reference on Chart Studio Cloud for + `hovertext`. + ids + Assigns id labels to each datum. These ids for object + constancy of data points during animation. Should be an + array of strings, not numbers or any other type. + idssrc + Sets the source reference on Chart Studio Cloud for + `ids`. + insidetextfont + Sets the font used for `textinfo` lying inside the + sector. + labels + Sets the labels of each of the sectors. + labelssrc + Sets the source reference on Chart Studio Cloud for + `labels`. + leaf + :class:`plotly.graph_objects.icicle.Leaf` instance or + dict with compatible properties + legend + Sets the reference to a legend to show this trace in. + References to these legends are "legend", "legend2", + "legend3", etc. Settings for these legends are set in + the layout, under `layout.legend`, `layout.legend2`, + etc. + legendgrouptitle + :class:`plotly.graph_objects.icicle.Legendgrouptitle` + instance or dict with compatible properties + legendrank + Sets the legend rank for this trace. Items and groups + with smaller ranks are presented on top/left side while + with "reversed" `legend.traceorder` they are on + bottom/right side. The default legendrank is 1000, so + that you can use ranks less than 1000 to place certain + items before all unranked items, and ranks greater than + 1000 to go after all unranked items. When having + unranked or equal rank items shapes would be displayed + after traces i.e. according to their order in data and + layout. + legendwidth + Sets the width (in px or fraction) of the legend for + this trace. + level + Sets the level from which this trace hierarchy is + rendered. Set `level` to `''` to start from the root + node in the hierarchy. Must be an "id" if `ids` is + filled in, otherwise plotly attempts to find a matching + item in `labels`. + marker + :class:`plotly.graph_objects.icicle.Marker` instance or + dict with compatible properties + maxdepth + Sets the number of rendered sectors from any given + `level`. Set `maxdepth` to "-1" to render all the + levels in the hierarchy. + meta + Assigns extra meta information associated with this + trace that can be used in various text attributes. + Attributes such as trace `name`, graph, axis and + colorbar `title.text`, annotation `text` + `rangeselector`, `updatemenues` and `sliders` `label` + text all support `meta`. To access the trace `meta` + values in an attribute in the same trace, simply use + `%{meta[i]}` where `i` is the index or key of the + `meta` item in question. To access trace `meta` in + layout attributes, use `%{data[n[.meta[i]}` where `i` + is the index or key of the `meta` and `n` is the trace + index. + metasrc + Sets the source reference on Chart Studio Cloud for + `meta`. + name + Sets the trace name. The trace name appears as the + legend item and on hover. + opacity + Sets the opacity of the trace. + outsidetextfont + Sets the font used for `textinfo` lying outside the + sector. This option refers to the root of the hierarchy + presented on top left corner of a treemap graph. Please + note that if a hierarchy has multiple root nodes, this + option won't have any effect and `insidetextfont` would + be used. + parents + Sets the parent sectors for each of the sectors. Empty + string items '' are understood to reference the root + node in the hierarchy. If `ids` is filled, `parents` + items are understood to be "ids" themselves. When `ids` + is not set, plotly attempts to find matching items in + `labels`, but beware they must be unique. + parentssrc + Sets the source reference on Chart Studio Cloud for + `parents`. + pathbar + :class:`plotly.graph_objects.icicle.Pathbar` instance + or dict with compatible properties + root + :class:`plotly.graph_objects.icicle.Root` instance or + dict with compatible properties + sort + Determines whether or not the sectors are reordered + from largest to smallest. + stream + :class:`plotly.graph_objects.icicle.Stream` instance or + dict with compatible properties + text + Sets text elements associated with each sector. If + trace `textinfo` contains a "text" flag, these elements + will be seen on the chart. If trace `hoverinfo` + contains a "text" flag and "hovertext" is not set, + these elements will be seen in the hover labels. + textfont + Sets the font used for `textinfo`. + textinfo + Determines which trace information appear on the graph. + textposition + Sets the positions of the `text` elements. + textsrc + Sets the source reference on Chart Studio Cloud for + `text`. + texttemplate + Template string used for rendering the information text + that appears on points. Note that this will override + `textinfo`. Variables are inserted using %{variable}, + for example "y: %{y}". Numbers are formatted using + d3-format's syntax %{variable:d3-format}, for example + "Price: %{y:$.2f}". + https://github.com/d3/d3-format/tree/v1.4.5#d3-format + for details on the formatting syntax. Dates are + formatted using d3-time-format's syntax + %{variable|d3-time-format}, for example "Day: + %{2019-01-01|%A}". https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format for details on the + date formatting syntax. Variables that can't be found + will be replaced with the specifier. For example, a + template of "data: %{x}, %{y}" will result in a value + of "data: 1, %{y}" if x is 1 and y is missing. + Variables with an undefined value will be replaced with + the fallback value. All attributes that can be + specified per-point (the ones that are `arrayOk: true`) + are available. Finally, the template string has access + to variables `currentPath`, `root`, `entry`, + `percentRoot`, `percentEntry`, `percentParent`, `label` + and `value`. + texttemplatefallback + Fallback string that's displayed when a variable + referenced in a template is missing. If the boolean + value 'false' is passed in, the specifier with the + missing variable will be displayed. + texttemplatesrc + Sets the source reference on Chart Studio Cloud for + `texttemplate`. + tiling + :class:`plotly.graph_objects.icicle.Tiling` instance or + dict with compatible properties + uid + Assign an id to this trace, Use this to provide object + constancy between traces during animations and + transitions. + uirevision + Controls persistence of some user-driven changes to the + trace: `constraintrange` in `parcoords` traces, as well + as some `editable: true` modifications such as `name` + and `colorbar.title`. Defaults to `layout.uirevision`. + Note that other user-driven trace attribute changes are + controlled by `layout` attributes: `trace.visible` is + controlled by `layout.legend.uirevision`, + `selectedpoints` is controlled by + `layout.selectionrevision`, and `colorbar.(x|y)` + (accessible with `config: {editable: true}`) is + controlled by `layout.editrevision`. Trace changes are + tracked by `uid`, which only falls back on trace index + if no `uid` is provided. So if your app can add/remove + traces before the end of the `data` array, such that + the same trace has a different index, you can still + preserve user-driven changes if you give each trace a + `uid` that stays with it as it moves. + values + Sets the values associated with each of the sectors. + Use with `branchvalues` to determine how the values are + summed. + valuessrc + Sets the source reference on Chart Studio Cloud for + `values`. + visible + Determines whether or not this trace is visible. If + "legendonly", the trace is not drawn, but can appear as + a legend item (provided that the legend itself is + visible). + row : 'all', int or None (default) + Subplot row index (starting from 1) for the trace to be + added. Only valid if figure was created using + `plotly.tools.make_subplots`.If 'all', addresses all + rows in the specified column(s). + col : 'all', int or None (default) + Subplot col index (starting from 1) for the trace to be + added. Only valid if figure was created using + `plotly.tools.make_subplots`.If 'all', addresses all + columns in the specified row(s). + + Returns + ------- + Figure + """ + from plotly.graph_objs import Icicle + + new_trace = Icicle( + branchvalues=branchvalues, + count=count, + customdata=customdata, + customdatasrc=customdatasrc, + domain=domain, + hoverinfo=hoverinfo, + hoverinfosrc=hoverinfosrc, + hoverlabel=hoverlabel, + hovertemplate=hovertemplate, + hovertemplatefallback=hovertemplatefallback, + hovertemplatesrc=hovertemplatesrc, + hovertext=hovertext, + hovertextsrc=hovertextsrc, + ids=ids, + idssrc=idssrc, + insidetextfont=insidetextfont, + labels=labels, + labelssrc=labelssrc, + leaf=leaf, + legend=legend, + legendgrouptitle=legendgrouptitle, + legendrank=legendrank, + legendwidth=legendwidth, + level=level, + marker=marker, + maxdepth=maxdepth, + meta=meta, + metasrc=metasrc, + name=name, + opacity=opacity, + outsidetextfont=outsidetextfont, + parents=parents, + parentssrc=parentssrc, + pathbar=pathbar, + root=root, + sort=sort, + stream=stream, + text=text, + textfont=textfont, + textinfo=textinfo, + textposition=textposition, + textsrc=textsrc, + texttemplate=texttemplate, + texttemplatefallback=texttemplatefallback, + texttemplatesrc=texttemplatesrc, + tiling=tiling, + uid=uid, + uirevision=uirevision, + values=values, + valuessrc=valuessrc, + visible=visible, + **kwargs, + ) + return self.add_trace(new_trace, row=row, col=col) + + def add_image( + self, + colormodel=None, + customdata=None, + customdatasrc=None, + dx=None, + dy=None, + hoverinfo=None, + hoverinfosrc=None, + hoverlabel=None, + hovertemplate=None, + hovertemplatefallback=None, + hovertemplatesrc=None, + hovertext=None, + hovertextsrc=None, + ids=None, + idssrc=None, + legend=None, + legendgrouptitle=None, + legendrank=None, + legendwidth=None, + meta=None, + metasrc=None, + name=None, + opacity=None, + source=None, + stream=None, + text=None, + textsrc=None, + uid=None, + uirevision=None, + visible=None, + x0=None, + xaxis=None, + y0=None, + yaxis=None, + z=None, + zmax=None, + zmin=None, + zorder=None, + zsmooth=None, + zsrc=None, + row=None, + col=None, + secondary_y=None, + **kwargs, + ) -> "Figure": + """ + Add a new Image trace + + Display an image, i.e. data on a 2D regular raster. By default, + when an image is displayed in a subplot, its y axis will be + reversed (ie. `autorange: 'reversed'`), constrained to the + domain (ie. `constrain: 'domain'`) and it will have the same + scale as its x axis (ie. `scaleanchor: 'x,`) in order for + pixels to be rendered as squares. + + Parameters + ---------- + colormodel + Color model used to map the numerical color components + described in `z` into colors. If `source` is specified, + this attribute will be set to `rgba256` otherwise it + defaults to `rgb`. + customdata + Assigns extra data each datum. This may be useful when + listening to hover, click and selection events. Note + that, "scatter" traces also appends customdata items in + the markers DOM elements + customdatasrc + Sets the source reference on Chart Studio Cloud for + `customdata`. + dx + Set the pixel's horizontal size. + dy + Set the pixel's vertical size + hoverinfo + Determines which trace information appear on hover. If + `none` or `skip` are set, no information is displayed + upon hovering. But, if `none` is set, click and hover + events are still fired. + hoverinfosrc + Sets the source reference on Chart Studio Cloud for + `hoverinfo`. + hoverlabel + :class:`plotly.graph_objects.image.Hoverlabel` instance + or dict with compatible properties + hovertemplate + Template string used for rendering the information that + appear on hover box. Note that this will override + `hoverinfo`. Variables are inserted using %{variable}, + for example "y: %{y}" as well as %{xother}, {%_xother}, + {%_xother_}, {%xother_}. When showing info for several + points, "xother" will be added to those with different + x positions from the first point. An underscore before + or after "(x|y)other" will add a space on that side, + only when this field is shown. Numbers are formatted + using d3-format's syntax %{variable:d3-format}, for + example "Price: %{y:$.2f}". + https://github.com/d3/d3-format/tree/v1.4.5#d3-format + for details on the formatting syntax. Dates are + formatted using d3-time-format's syntax + %{variable|d3-time-format}, for example "Day: + %{2019-01-01|%A}". https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format for details on the + date formatting syntax. Variables that can't be found + will be replaced with the specifier. For example, a + template of "data: %{x}, %{y}" will result in a value + of "data: 1, %{y}" if x is 1 and y is missing. + Variables with an undefined value will be replaced with + the fallback value. The variables available in + `hovertemplate` are the ones emitted as event data + described at this link + https://plotly.com/javascript/plotlyjs-events/#event- + data. Additionally, all attributes that can be + specified per-point (the ones that are `arrayOk: true`) + are available. Finally, the template string has access + to variables `z`, `color` and `colormodel`. Anything + contained in tag `` is displayed in the + secondary box, for example + `%{fullData.name}`. To hide the + secondary box completely, use an empty tag + ``. + hovertemplatefallback + Fallback string that's displayed when a variable + referenced in a template is missing. If the boolean + value 'false' is passed in, the specifier with the + missing variable will be displayed. + hovertemplatesrc + Sets the source reference on Chart Studio Cloud for + `hovertemplate`. + hovertext + Same as `text`. + hovertextsrc + Sets the source reference on Chart Studio Cloud for + `hovertext`. + ids + Assigns id labels to each datum. These ids for object + constancy of data points during animation. Should be an + array of strings, not numbers or any other type. + idssrc + Sets the source reference on Chart Studio Cloud for + `ids`. + legend + Sets the reference to a legend to show this trace in. + References to these legends are "legend", "legend2", + "legend3", etc. Settings for these legends are set in + the layout, under `layout.legend`, `layout.legend2`, + etc. + legendgrouptitle + :class:`plotly.graph_objects.image.Legendgrouptitle` + instance or dict with compatible properties + legendrank + Sets the legend rank for this trace. Items and groups + with smaller ranks are presented on top/left side while + with "reversed" `legend.traceorder` they are on + bottom/right side. The default legendrank is 1000, so + that you can use ranks less than 1000 to place certain + items before all unranked items, and ranks greater than + 1000 to go after all unranked items. When having + unranked or equal rank items shapes would be displayed + after traces i.e. according to their order in data and + layout. + legendwidth + Sets the width (in px or fraction) of the legend for + this trace. + meta + Assigns extra meta information associated with this + trace that can be used in various text attributes. + Attributes such as trace `name`, graph, axis and + colorbar `title.text`, annotation `text` + `rangeselector`, `updatemenues` and `sliders` `label` + text all support `meta`. To access the trace `meta` + values in an attribute in the same trace, simply use + `%{meta[i]}` where `i` is the index or key of the + `meta` item in question. To access trace `meta` in + layout attributes, use `%{data[n[.meta[i]}` where `i` + is the index or key of the `meta` and `n` is the trace + index. + metasrc + Sets the source reference on Chart Studio Cloud for + `meta`. + name + Sets the trace name. The trace name appears as the + legend item and on hover. + opacity + Sets the opacity of the trace. + source + Specifies the data URI of the image to be visualized. + The URI consists of "data:image/[][;base64\\]," + stream + :class:`plotly.graph_objects.image.Stream` instance or + dict with compatible properties + text + Sets the text elements associated with each z value. + textsrc + Sets the source reference on Chart Studio Cloud for + `text`. + uid + Assign an id to this trace, Use this to provide object + constancy between traces during animations and + transitions. + uirevision + Controls persistence of some user-driven changes to the + trace: `constraintrange` in `parcoords` traces, as well + as some `editable: true` modifications such as `name` + and `colorbar.title`. Defaults to `layout.uirevision`. + Note that other user-driven trace attribute changes are + controlled by `layout` attributes: `trace.visible` is + controlled by `layout.legend.uirevision`, + `selectedpoints` is controlled by + `layout.selectionrevision`, and `colorbar.(x|y)` + (accessible with `config: {editable: true}`) is + controlled by `layout.editrevision`. Trace changes are + tracked by `uid`, which only falls back on trace index + if no `uid` is provided. So if your app can add/remove + traces before the end of the `data` array, such that + the same trace has a different index, you can still + preserve user-driven changes if you give each trace a + `uid` that stays with it as it moves. + visible + Determines whether or not this trace is visible. If + "legendonly", the trace is not drawn, but can appear as + a legend item (provided that the legend itself is + visible). + x0 + Set the image's x position. The left edge of the image + (or the right edge if the x axis is reversed or dx is + negative) will be found at xmin=x0-dx/2 + xaxis + Sets a reference between this trace's x coordinates and + a 2D cartesian x axis. If "x" (the default value), the + x coordinates refer to `layout.xaxis`. If "x2", the x + coordinates refer to `layout.xaxis2`, and so on. + y0 + Set the image's y position. The top edge of the image + (or the bottom edge if the y axis is NOT reversed or if + dy is negative) will be found at ymin=y0-dy/2. By + default when an image trace is included, the y axis + will be reversed so that the image is right-side-up, + but you can disable this by setting + yaxis.autorange=true or by providing an explicit y axis + range. + yaxis + Sets a reference between this trace's y coordinates and + a 2D cartesian y axis. If "y" (the default value), the + y coordinates refer to `layout.yaxis`. If "y2", the y + coordinates refer to `layout.yaxis2`, and so on. + z + A 2-dimensional array in which each element is an array + of 3 or 4 numbers representing a color. + zmax + Array defining the higher bound for each color + component. Note that the default value will depend on + the colormodel. For the `rgb` colormodel, it is [255, + 255, 255]. For the `rgba` colormodel, it is [255, 255, + 255, 1]. For the `rgba256` colormodel, it is [255, 255, + 255, 255]. For the `hsl` colormodel, it is [360, 100, + 100]. For the `hsla` colormodel, it is [360, 100, 100, + 1]. + zmin + Array defining the lower bound for each color + component. Note that the default value will depend on + the colormodel. For the `rgb` colormodel, it is [0, 0, + 0]. For the `rgba` colormodel, it is [0, 0, 0, 0]. For + the `rgba256` colormodel, it is [0, 0, 0, 0]. For the + `hsl` colormodel, it is [0, 0, 0]. For the `hsla` + colormodel, it is [0, 0, 0, 0]. + zorder + Sets the layer on which this trace is displayed, + relative to other SVG traces on the same subplot. SVG + traces with higher `zorder` appear in front of those + with lower `zorder`. + zsmooth + Picks a smoothing algorithm used to smooth `z` data. + This only applies for image traces that use the + `source` attribute. + zsrc + Sets the source reference on Chart Studio Cloud for + `z`. + row : 'all', int or None (default) + Subplot row index (starting from 1) for the trace to be + added. Only valid if figure was created using + `plotly.tools.make_subplots`.If 'all', addresses all + rows in the specified column(s). + col : 'all', int or None (default) + Subplot col index (starting from 1) for the trace to be + added. Only valid if figure was created using + `plotly.tools.make_subplots`.If 'all', addresses all + columns in the specified row(s). + secondary_y: boolean or None (default None) + If True, associate this trace with the secondary y-axis of the + subplot at the specified row and col. Only valid if all of the + following conditions are satisfied: + * The figure was created using `plotly.subplots.make_subplots`. + * The row and col arguments are not None + * The subplot at the specified row and col has type xy + (which is the default) and secondary_y True. These + properties are specified in the specs argument to + make_subplots. See the make_subplots docstring for more info. + + Returns + ------- + Figure + """ + from plotly.graph_objs import Image + + new_trace = Image( + colormodel=colormodel, + customdata=customdata, + customdatasrc=customdatasrc, + dx=dx, + dy=dy, + hoverinfo=hoverinfo, + hoverinfosrc=hoverinfosrc, + hoverlabel=hoverlabel, + hovertemplate=hovertemplate, + hovertemplatefallback=hovertemplatefallback, + hovertemplatesrc=hovertemplatesrc, + hovertext=hovertext, + hovertextsrc=hovertextsrc, + ids=ids, + idssrc=idssrc, + legend=legend, + legendgrouptitle=legendgrouptitle, + legendrank=legendrank, + legendwidth=legendwidth, + meta=meta, + metasrc=metasrc, + name=name, + opacity=opacity, + source=source, + stream=stream, + text=text, + textsrc=textsrc, + uid=uid, + uirevision=uirevision, + visible=visible, + x0=x0, + xaxis=xaxis, + y0=y0, + yaxis=yaxis, + z=z, + zmax=zmax, + zmin=zmin, + zorder=zorder, + zsmooth=zsmooth, + zsrc=zsrc, + **kwargs, + ) + return self.add_trace(new_trace, row=row, col=col, secondary_y=secondary_y) + + def add_indicator( + self, + align=None, + customdata=None, + customdatasrc=None, + delta=None, + domain=None, + gauge=None, + ids=None, + idssrc=None, + legend=None, + legendgrouptitle=None, + legendrank=None, + legendwidth=None, + meta=None, + metasrc=None, + mode=None, + name=None, + number=None, + stream=None, + title=None, + uid=None, + uirevision=None, + value=None, + visible=None, + row=None, + col=None, + **kwargs, + ) -> "Figure": + """ + Add a new Indicator trace + + An indicator is used to visualize a single `value` along with + some contextual information such as `steps` or a `threshold`, + using a combination of three visual elements: a number, a + delta, and/or a gauge. Deltas are taken with respect to a + `reference`. Gauges can be either angular or bullet (aka + linear) gauges. + + Parameters + ---------- + align + Sets the horizontal alignment of the `text` within the + box. Note that this attribute has no effect if an + angular gauge is displayed: in this case, it is always + centered + customdata + Assigns extra data each datum. This may be useful when + listening to hover, click and selection events. Note + that, "scatter" traces also appends customdata items in + the markers DOM elements + customdatasrc + Sets the source reference on Chart Studio Cloud for + `customdata`. + delta + :class:`plotly.graph_objects.indicator.Delta` instance + or dict with compatible properties + domain + :class:`plotly.graph_objects.indicator.Domain` instance + or dict with compatible properties + gauge + The gauge of the Indicator plot. + ids + Assigns id labels to each datum. These ids for object + constancy of data points during animation. Should be an + array of strings, not numbers or any other type. + idssrc + Sets the source reference on Chart Studio Cloud for + `ids`. + legend + Sets the reference to a legend to show this trace in. + References to these legends are "legend", "legend2", + "legend3", etc. Settings for these legends are set in + the layout, under `layout.legend`, `layout.legend2`, + etc. + legendgrouptitle + :class:`plotly.graph_objects.indicator.Legendgrouptitle + ` instance or dict with compatible properties + legendrank + Sets the legend rank for this trace. Items and groups + with smaller ranks are presented on top/left side while + with "reversed" `legend.traceorder` they are on + bottom/right side. The default legendrank is 1000, so + that you can use ranks less than 1000 to place certain + items before all unranked items, and ranks greater than + 1000 to go after all unranked items. When having + unranked or equal rank items shapes would be displayed + after traces i.e. according to their order in data and + layout. + legendwidth + Sets the width (in px or fraction) of the legend for + this trace. + meta + Assigns extra meta information associated with this + trace that can be used in various text attributes. + Attributes such as trace `name`, graph, axis and + colorbar `title.text`, annotation `text` + `rangeselector`, `updatemenues` and `sliders` `label` + text all support `meta`. To access the trace `meta` + values in an attribute in the same trace, simply use + `%{meta[i]}` where `i` is the index or key of the + `meta` item in question. To access trace `meta` in + layout attributes, use `%{data[n[.meta[i]}` where `i` + is the index or key of the `meta` and `n` is the trace + index. + metasrc + Sets the source reference on Chart Studio Cloud for + `meta`. + mode + Determines how the value is displayed on the graph. + `number` displays the value numerically in text. + `delta` displays the difference to a reference value in + text. Finally, `gauge` displays the value graphically + on an axis. + name + Sets the trace name. The trace name appears as the + legend item and on hover. + number + :class:`plotly.graph_objects.indicator.Number` instance + or dict with compatible properties + stream + :class:`plotly.graph_objects.indicator.Stream` instance + or dict with compatible properties + title + :class:`plotly.graph_objects.indicator.Title` instance + or dict with compatible properties + uid + Assign an id to this trace, Use this to provide object + constancy between traces during animations and + transitions. + uirevision + Controls persistence of some user-driven changes to the + trace: `constraintrange` in `parcoords` traces, as well + as some `editable: true` modifications such as `name` + and `colorbar.title`. Defaults to `layout.uirevision`. + Note that other user-driven trace attribute changes are + controlled by `layout` attributes: `trace.visible` is + controlled by `layout.legend.uirevision`, + `selectedpoints` is controlled by + `layout.selectionrevision`, and `colorbar.(x|y)` + (accessible with `config: {editable: true}`) is + controlled by `layout.editrevision`. Trace changes are + tracked by `uid`, which only falls back on trace index + if no `uid` is provided. So if your app can add/remove + traces before the end of the `data` array, such that + the same trace has a different index, you can still + preserve user-driven changes if you give each trace a + `uid` that stays with it as it moves. + value + Sets the number to be displayed. + visible + Determines whether or not this trace is visible. If + "legendonly", the trace is not drawn, but can appear as + a legend item (provided that the legend itself is + visible). + row : 'all', int or None (default) + Subplot row index (starting from 1) for the trace to be + added. Only valid if figure was created using + `plotly.tools.make_subplots`.If 'all', addresses all + rows in the specified column(s). + col : 'all', int or None (default) + Subplot col index (starting from 1) for the trace to be + added. Only valid if figure was created using + `plotly.tools.make_subplots`.If 'all', addresses all + columns in the specified row(s). + + Returns + ------- + Figure + """ + from plotly.graph_objs import Indicator + + new_trace = Indicator( + align=align, + customdata=customdata, + customdatasrc=customdatasrc, + delta=delta, + domain=domain, + gauge=gauge, + ids=ids, + idssrc=idssrc, + legend=legend, + legendgrouptitle=legendgrouptitle, + legendrank=legendrank, + legendwidth=legendwidth, + meta=meta, + metasrc=metasrc, + mode=mode, + name=name, + number=number, + stream=stream, + title=title, + uid=uid, + uirevision=uirevision, + value=value, + visible=visible, + **kwargs, + ) + return self.add_trace(new_trace, row=row, col=col) + + def add_isosurface( + self, + autocolorscale=None, + caps=None, + cauto=None, + cmax=None, + cmid=None, + cmin=None, + coloraxis=None, + colorbar=None, + colorscale=None, + contour=None, + customdata=None, + customdatasrc=None, + flatshading=None, + hoverinfo=None, + hoverinfosrc=None, + hoverlabel=None, + hovertemplate=None, + hovertemplatefallback=None, + hovertemplatesrc=None, + hovertext=None, + hovertextsrc=None, + ids=None, + idssrc=None, + isomax=None, + isomin=None, + legend=None, + legendgroup=None, + legendgrouptitle=None, + legendrank=None, + legendwidth=None, + lighting=None, + lightposition=None, + meta=None, + metasrc=None, + name=None, + opacity=None, + reversescale=None, + scene=None, + showlegend=None, + showscale=None, + slices=None, + spaceframe=None, + stream=None, + surface=None, + text=None, + textsrc=None, + uid=None, + uirevision=None, + value=None, + valuehoverformat=None, + valuesrc=None, + visible=None, + x=None, + xhoverformat=None, + xsrc=None, + y=None, + yhoverformat=None, + ysrc=None, + z=None, + zhoverformat=None, + zsrc=None, + row=None, + col=None, + **kwargs, + ) -> "Figure": + """ + Add a new Isosurface trace + + Draws isosurfaces between iso-min and iso-max values with + coordinates given by four 1-dimensional arrays containing the + `value`, `x`, `y` and `z` of every vertex of a uniform or non- + uniform 3-D grid. Horizontal or vertical slices, caps as well + as spaceframe between iso-min and iso-max values could also be + drawn using this trace. + + Parameters + ---------- + autocolorscale + Determines whether the colorscale is a default palette + (`autocolorscale: true`) or the palette determined by + `colorscale`. In case `colorscale` is unspecified or + `autocolorscale` is true, the default palette will be + chosen according to whether numbers in the `color` + array are all positive, all negative or mixed. + caps + :class:`plotly.graph_objects.isosurface.Caps` instance + or dict with compatible properties + cauto + Determines whether or not the color domain is computed + with respect to the input data (here `value`) or the + bounds set in `cmin` and `cmax` Defaults to `false` + when `cmin` and `cmax` are set by the user. + cmax + Sets the upper bound of the color domain. Value should + have the same units as `value` and if set, `cmin` must + be set as well. + cmid + Sets the mid-point of the color domain by scaling + `cmin` and/or `cmax` to be equidistant to this point. + Value should have the same units as `value`. Has no + effect when `cauto` is `false`. + cmin + Sets the lower bound of the color domain. Value should + have the same units as `value` and if set, `cmax` must + be set as well. + coloraxis + Sets a reference to a shared color axis. References to + these shared color axes are "coloraxis", "coloraxis2", + "coloraxis3", etc. Settings for these shared color axes + are set in the layout, under `layout.coloraxis`, + `layout.coloraxis2`, etc. Note that multiple color + scales can be linked to the same color axis. + colorbar + :class:`plotly.graph_objects.isosurface.ColorBar` + instance or dict with compatible properties + colorscale + Sets the colorscale. The colorscale must be an array + containing arrays mapping a normalized value to an rgb, + rgba, hex, hsl, hsv, or named color string. At minimum, + a mapping for the lowest (0) and highest (1) values are + required. For example, `[[0, 'rgb(0,0,255)'], [1, + 'rgb(255,0,0)']]`. To control the bounds of the + colorscale in color space, use `cmin` and `cmax`. + Alternatively, `colorscale` may be a palette name + string of the following list: Blackbody,Bluered,Blues,C + ividis,Earth,Electric,Greens,Greys,Hot,Jet,Picnic,Portl + and,Rainbow,RdBu,Reds,Viridis,YlGnBu,YlOrRd. + contour + :class:`plotly.graph_objects.isosurface.Contour` + instance or dict with compatible properties + customdata + Assigns extra data each datum. This may be useful when + listening to hover, click and selection events. Note + that, "scatter" traces also appends customdata items in + the markers DOM elements + customdatasrc + Sets the source reference on Chart Studio Cloud for + `customdata`. + flatshading + Determines whether or not normal smoothing is applied + to the meshes, creating meshes with an angular, low- + poly look via flat reflections. + hoverinfo + Determines which trace information appear on hover. If + `none` or `skip` are set, no information is displayed + upon hovering. But, if `none` is set, click and hover + events are still fired. + hoverinfosrc + Sets the source reference on Chart Studio Cloud for + `hoverinfo`. + hoverlabel + :class:`plotly.graph_objects.isosurface.Hoverlabel` + instance or dict with compatible properties + hovertemplate + Template string used for rendering the information that + appear on hover box. Note that this will override + `hoverinfo`. Variables are inserted using %{variable}, + for example "y: %{y}" as well as %{xother}, {%_xother}, + {%_xother_}, {%xother_}. When showing info for several + points, "xother" will be added to those with different + x positions from the first point. An underscore before + or after "(x|y)other" will add a space on that side, + only when this field is shown. Numbers are formatted + using d3-format's syntax %{variable:d3-format}, for + example "Price: %{y:$.2f}". + https://github.com/d3/d3-format/tree/v1.4.5#d3-format + for details on the formatting syntax. Dates are + formatted using d3-time-format's syntax + %{variable|d3-time-format}, for example "Day: + %{2019-01-01|%A}". https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format for details on the + date formatting syntax. Variables that can't be found + will be replaced with the specifier. For example, a + template of "data: %{x}, %{y}" will result in a value + of "data: 1, %{y}" if x is 1 and y is missing. + Variables with an undefined value will be replaced with + the fallback value. The variables available in + `hovertemplate` are the ones emitted as event data + described at this link + https://plotly.com/javascript/plotlyjs-events/#event- + data. Additionally, all attributes that can be + specified per-point (the ones that are `arrayOk: true`) + are available. Anything contained in tag `` is + displayed in the secondary box, for example + `%{fullData.name}`. To hide the + secondary box completely, use an empty tag + ``. + hovertemplatefallback + Fallback string that's displayed when a variable + referenced in a template is missing. If the boolean + value 'false' is passed in, the specifier with the + missing variable will be displayed. + hovertemplatesrc + Sets the source reference on Chart Studio Cloud for + `hovertemplate`. + hovertext + Same as `text`. + hovertextsrc + Sets the source reference on Chart Studio Cloud for + `hovertext`. + ids + Assigns id labels to each datum. These ids for object + constancy of data points during animation. Should be an + array of strings, not numbers or any other type. + idssrc + Sets the source reference on Chart Studio Cloud for + `ids`. + isomax + Sets the maximum boundary for iso-surface plot. + isomin + Sets the minimum boundary for iso-surface plot. + legend + Sets the reference to a legend to show this trace in. + References to these legends are "legend", "legend2", + "legend3", etc. Settings for these legends are set in + the layout, under `layout.legend`, `layout.legend2`, + etc. + legendgroup + Sets the legend group for this trace. Traces and shapes + part of the same legend group hide/show at the same + time when toggling legend items. + legendgrouptitle + :class:`plotly.graph_objects.isosurface.Legendgrouptitl + e` instance or dict with compatible properties + legendrank + Sets the legend rank for this trace. Items and groups + with smaller ranks are presented on top/left side while + with "reversed" `legend.traceorder` they are on + bottom/right side. The default legendrank is 1000, so + that you can use ranks less than 1000 to place certain + items before all unranked items, and ranks greater than + 1000 to go after all unranked items. When having + unranked or equal rank items shapes would be displayed + after traces i.e. according to their order in data and + layout. + legendwidth + Sets the width (in px or fraction) of the legend for + this trace. + lighting + :class:`plotly.graph_objects.isosurface.Lighting` + instance or dict with compatible properties + lightposition + :class:`plotly.graph_objects.isosurface.Lightposition` + instance or dict with compatible properties + meta + Assigns extra meta information associated with this + trace that can be used in various text attributes. + Attributes such as trace `name`, graph, axis and + colorbar `title.text`, annotation `text` + `rangeselector`, `updatemenues` and `sliders` `label` + text all support `meta`. To access the trace `meta` + values in an attribute in the same trace, simply use + `%{meta[i]}` where `i` is the index or key of the + `meta` item in question. To access trace `meta` in + layout attributes, use `%{data[n[.meta[i]}` where `i` + is the index or key of the `meta` and `n` is the trace + index. + metasrc + Sets the source reference on Chart Studio Cloud for + `meta`. + name + Sets the trace name. The trace name appears as the + legend item and on hover. + opacity + Sets the opacity of the surface. Please note that in + the case of using high `opacity` values for example a + value greater than or equal to 0.5 on two surfaces (and + 0.25 with four surfaces), an overlay of multiple + transparent surfaces may not perfectly be sorted in + depth by the webgl API. This behavior may be improved + in the near future and is subject to change. + reversescale + Reverses the color mapping if true. If true, `cmin` + will correspond to the last color in the array and + `cmax` will correspond to the first color. + scene + Sets a reference between this trace's 3D coordinate + system and a 3D scene. If "scene" (the default value), + the (x,y,z) coordinates refer to `layout.scene`. If + "scene2", the (x,y,z) coordinates refer to + `layout.scene2`, and so on. + showlegend + Determines whether or not an item corresponding to this + trace is shown in the legend. + showscale + Determines whether or not a colorbar is displayed for + this trace. + slices + :class:`plotly.graph_objects.isosurface.Slices` + instance or dict with compatible properties + spaceframe + :class:`plotly.graph_objects.isosurface.Spaceframe` + instance or dict with compatible properties + stream + :class:`plotly.graph_objects.isosurface.Stream` + instance or dict with compatible properties + surface + :class:`plotly.graph_objects.isosurface.Surface` + instance or dict with compatible properties + text + Sets the text elements associated with the vertices. If + trace `hoverinfo` contains a "text" flag and + "hovertext" is not set, these elements will be seen in + the hover labels. + textsrc + Sets the source reference on Chart Studio Cloud for + `text`. + uid + Assign an id to this trace, Use this to provide object + constancy between traces during animations and + transitions. + uirevision + Controls persistence of some user-driven changes to the + trace: `constraintrange` in `parcoords` traces, as well + as some `editable: true` modifications such as `name` + and `colorbar.title`. Defaults to `layout.uirevision`. + Note that other user-driven trace attribute changes are + controlled by `layout` attributes: `trace.visible` is + controlled by `layout.legend.uirevision`, + `selectedpoints` is controlled by + `layout.selectionrevision`, and `colorbar.(x|y)` + (accessible with `config: {editable: true}`) is + controlled by `layout.editrevision`. Trace changes are + tracked by `uid`, which only falls back on trace index + if no `uid` is provided. So if your app can add/remove + traces before the end of the `data` array, such that + the same trace has a different index, you can still + preserve user-driven changes if you give each trace a + `uid` that stays with it as it moves. + value + Sets the 4th dimension (value) of the vertices. + valuehoverformat + Sets the hover text formatting rulefor `value` using + d3 formatting mini-languages which are very similar to + those in Python. For numbers, see: https://github.com/d + 3/d3-format/tree/v1.4.5#d3-format.By default the values + are formatted using generic number format. + valuesrc + Sets the source reference on Chart Studio Cloud for + `value`. + visible + Determines whether or not this trace is visible. If + "legendonly", the trace is not drawn, but can appear as + a legend item (provided that the legend itself is + visible). + x + Sets the X coordinates of the vertices on X axis. + xhoverformat + Sets the hover text formatting rulefor `x` using d3 + formatting mini-languages which are very similar to + those in Python. For numbers, see: + https://github.com/d3/d3-format/tree/v1.4.5#d3-format. + And for dates see: https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format. We add two items to + d3's date formatter: "%h" for half of the year as a + decimal number as well as "%{n}f" for fractional + seconds with n digits. For example, *2016-10-13 + 09:15:23.456* with tickformat "%H~%M~%S.%2f" would + display *09~15~23.46*By default the values are + formatted using `xaxis.hoverformat`. + xsrc + Sets the source reference on Chart Studio Cloud for + `x`. + y + Sets the Y coordinates of the vertices on Y axis. + yhoverformat + Sets the hover text formatting rulefor `y` using d3 + formatting mini-languages which are very similar to + those in Python. For numbers, see: + https://github.com/d3/d3-format/tree/v1.4.5#d3-format. + And for dates see: https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format. We add two items to + d3's date formatter: "%h" for half of the year as a + decimal number as well as "%{n}f" for fractional + seconds with n digits. For example, *2016-10-13 + 09:15:23.456* with tickformat "%H~%M~%S.%2f" would + display *09~15~23.46*By default the values are + formatted using `yaxis.hoverformat`. + ysrc + Sets the source reference on Chart Studio Cloud for + `y`. + z + Sets the Z coordinates of the vertices on Z axis. + zhoverformat + Sets the hover text formatting rulefor `z` using d3 + formatting mini-languages which are very similar to + those in Python. For numbers, see: + https://github.com/d3/d3-format/tree/v1.4.5#d3-format. + And for dates see: https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format. We add two items to + d3's date formatter: "%h" for half of the year as a + decimal number as well as "%{n}f" for fractional + seconds with n digits. For example, *2016-10-13 + 09:15:23.456* with tickformat "%H~%M~%S.%2f" would + display *09~15~23.46*By default the values are + formatted using `zaxis.hoverformat`. + zsrc + Sets the source reference on Chart Studio Cloud for + `z`. + row : 'all', int or None (default) + Subplot row index (starting from 1) for the trace to be + added. Only valid if figure was created using + `plotly.tools.make_subplots`.If 'all', addresses all + rows in the specified column(s). + col : 'all', int or None (default) + Subplot col index (starting from 1) for the trace to be + added. Only valid if figure was created using + `plotly.tools.make_subplots`.If 'all', addresses all + columns in the specified row(s). + + Returns + ------- + Figure + """ + from plotly.graph_objs import Isosurface + + new_trace = Isosurface( + autocolorscale=autocolorscale, + caps=caps, + cauto=cauto, + cmax=cmax, + cmid=cmid, + cmin=cmin, + coloraxis=coloraxis, + colorbar=colorbar, + colorscale=colorscale, + contour=contour, + customdata=customdata, + customdatasrc=customdatasrc, + flatshading=flatshading, + hoverinfo=hoverinfo, + hoverinfosrc=hoverinfosrc, + hoverlabel=hoverlabel, + hovertemplate=hovertemplate, + hovertemplatefallback=hovertemplatefallback, + hovertemplatesrc=hovertemplatesrc, + hovertext=hovertext, + hovertextsrc=hovertextsrc, + ids=ids, + idssrc=idssrc, + isomax=isomax, + isomin=isomin, + legend=legend, + legendgroup=legendgroup, + legendgrouptitle=legendgrouptitle, + legendrank=legendrank, + legendwidth=legendwidth, + lighting=lighting, + lightposition=lightposition, + meta=meta, + metasrc=metasrc, + name=name, + opacity=opacity, + reversescale=reversescale, + scene=scene, + showlegend=showlegend, + showscale=showscale, + slices=slices, + spaceframe=spaceframe, + stream=stream, + surface=surface, + text=text, + textsrc=textsrc, + uid=uid, + uirevision=uirevision, + value=value, + valuehoverformat=valuehoverformat, + valuesrc=valuesrc, + visible=visible, + x=x, + xhoverformat=xhoverformat, + xsrc=xsrc, + y=y, + yhoverformat=yhoverformat, + ysrc=ysrc, + z=z, + zhoverformat=zhoverformat, + zsrc=zsrc, + **kwargs, + ) + return self.add_trace(new_trace, row=row, col=col) + + def add_mesh3d( + self, + alphahull=None, + autocolorscale=None, + cauto=None, + cmax=None, + cmid=None, + cmin=None, + color=None, + coloraxis=None, + colorbar=None, + colorscale=None, + contour=None, + customdata=None, + customdatasrc=None, + delaunayaxis=None, + facecolor=None, + facecolorsrc=None, + flatshading=None, + hoverinfo=None, + hoverinfosrc=None, + hoverlabel=None, + hovertemplate=None, + hovertemplatefallback=None, + hovertemplatesrc=None, + hovertext=None, + hovertextsrc=None, + i=None, + ids=None, + idssrc=None, + intensity=None, + intensitymode=None, + intensitysrc=None, + isrc=None, + j=None, + jsrc=None, + k=None, + ksrc=None, + legend=None, + legendgroup=None, + legendgrouptitle=None, + legendrank=None, + legendwidth=None, + lighting=None, + lightposition=None, + meta=None, + metasrc=None, + name=None, + opacity=None, + reversescale=None, + scene=None, + showlegend=None, + showscale=None, + stream=None, + text=None, + textsrc=None, + uid=None, + uirevision=None, + vertexcolor=None, + vertexcolorsrc=None, + visible=None, + x=None, + xcalendar=None, + xhoverformat=None, + xsrc=None, + y=None, + ycalendar=None, + yhoverformat=None, + ysrc=None, + z=None, + zcalendar=None, + zhoverformat=None, + zsrc=None, + row=None, + col=None, + **kwargs, + ) -> "Figure": + """ + Add a new Mesh3d trace + + Draws sets of triangles with coordinates given by three + 1-dimensional arrays in `x`, `y`, `z` and (1) a sets of `i`, + `j`, `k` indices (2) Delaunay triangulation or (3) the Alpha- + shape algorithm or (4) the Convex-hull algorithm + + Parameters + ---------- + alphahull + Determines how the mesh surface triangles are derived + from the set of vertices (points) represented by the + `x`, `y` and `z` arrays, if the `i`, `j`, `k` arrays + are not supplied. For general use of `mesh3d` it is + preferred that `i`, `j`, `k` are supplied. If "-1", + Delaunay triangulation is used, which is mainly + suitable if the mesh is a single, more or less layer + surface that is perpendicular to `delaunayaxis`. In + case the `delaunayaxis` intersects the mesh surface at + more than one point it will result triangles that are + very long in the dimension of `delaunayaxis`. If ">0", + the alpha-shape algorithm is used. In this case, the + positive `alphahull` value signals the use of the + alpha-shape algorithm, _and_ its value acts as the + parameter for the mesh fitting. If 0, the convex-hull + algorithm is used. It is suitable for convex bodies or + if the intention is to enclose the `x`, `y` and `z` + point set into a convex hull. + autocolorscale + Determines whether the colorscale is a default palette + (`autocolorscale: true`) or the palette determined by + `colorscale`. In case `colorscale` is unspecified or + `autocolorscale` is true, the default palette will be + chosen according to whether numbers in the `color` + array are all positive, all negative or mixed. + cauto + Determines whether or not the color domain is computed + with respect to the input data (here `intensity`) or + the bounds set in `cmin` and `cmax` Defaults to `false` + when `cmin` and `cmax` are set by the user. + cmax + Sets the upper bound of the color domain. Value should + have the same units as `intensity` and if set, `cmin` + must be set as well. + cmid + Sets the mid-point of the color domain by scaling + `cmin` and/or `cmax` to be equidistant to this point. + Value should have the same units as `intensity`. Has no + effect when `cauto` is `false`. + cmin + Sets the lower bound of the color domain. Value should + have the same units as `intensity` and if set, `cmax` + must be set as well. + color + Sets the color of the whole mesh + coloraxis + Sets a reference to a shared color axis. References to + these shared color axes are "coloraxis", "coloraxis2", + "coloraxis3", etc. Settings for these shared color axes + are set in the layout, under `layout.coloraxis`, + `layout.coloraxis2`, etc. Note that multiple color + scales can be linked to the same color axis. + colorbar + :class:`plotly.graph_objects.mesh3d.ColorBar` instance + or dict with compatible properties + colorscale + Sets the colorscale. The colorscale must be an array + containing arrays mapping a normalized value to an rgb, + rgba, hex, hsl, hsv, or named color string. At minimum, + a mapping for the lowest (0) and highest (1) values are + required. For example, `[[0, 'rgb(0,0,255)'], [1, + 'rgb(255,0,0)']]`. To control the bounds of the + colorscale in color space, use `cmin` and `cmax`. + Alternatively, `colorscale` may be a palette name + string of the following list: Blackbody,Bluered,Blues,C + ividis,Earth,Electric,Greens,Greys,Hot,Jet,Picnic,Portl + and,Rainbow,RdBu,Reds,Viridis,YlGnBu,YlOrRd. + contour + :class:`plotly.graph_objects.mesh3d.Contour` instance + or dict with compatible properties + customdata + Assigns extra data each datum. This may be useful when + listening to hover, click and selection events. Note + that, "scatter" traces also appends customdata items in + the markers DOM elements + customdatasrc + Sets the source reference on Chart Studio Cloud for + `customdata`. + delaunayaxis + Sets the Delaunay axis, which is the axis that is + perpendicular to the surface of the Delaunay + triangulation. It has an effect if `i`, `j`, `k` are + not provided and `alphahull` is set to indicate + Delaunay triangulation. + facecolor + Sets the color of each face Overrides "color" and + "vertexcolor". + facecolorsrc + Sets the source reference on Chart Studio Cloud for + `facecolor`. + flatshading + Determines whether or not normal smoothing is applied + to the meshes, creating meshes with an angular, low- + poly look via flat reflections. + hoverinfo + Determines which trace information appear on hover. If + `none` or `skip` are set, no information is displayed + upon hovering. But, if `none` is set, click and hover + events are still fired. + hoverinfosrc + Sets the source reference on Chart Studio Cloud for + `hoverinfo`. + hoverlabel + :class:`plotly.graph_objects.mesh3d.Hoverlabel` + instance or dict with compatible properties + hovertemplate + Template string used for rendering the information that + appear on hover box. Note that this will override + `hoverinfo`. Variables are inserted using %{variable}, + for example "y: %{y}" as well as %{xother}, {%_xother}, + {%_xother_}, {%xother_}. When showing info for several + points, "xother" will be added to those with different + x positions from the first point. An underscore before + or after "(x|y)other" will add a space on that side, + only when this field is shown. Numbers are formatted + using d3-format's syntax %{variable:d3-format}, for + example "Price: %{y:$.2f}". + https://github.com/d3/d3-format/tree/v1.4.5#d3-format + for details on the formatting syntax. Dates are + formatted using d3-time-format's syntax + %{variable|d3-time-format}, for example "Day: + %{2019-01-01|%A}". https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format for details on the + date formatting syntax. Variables that can't be found + will be replaced with the specifier. For example, a + template of "data: %{x}, %{y}" will result in a value + of "data: 1, %{y}" if x is 1 and y is missing. + Variables with an undefined value will be replaced with + the fallback value. The variables available in + `hovertemplate` are the ones emitted as event data + described at this link + https://plotly.com/javascript/plotlyjs-events/#event- + data. Additionally, all attributes that can be + specified per-point (the ones that are `arrayOk: true`) + are available. Anything contained in tag `` is + displayed in the secondary box, for example + `%{fullData.name}`. To hide the + secondary box completely, use an empty tag + ``. + hovertemplatefallback + Fallback string that's displayed when a variable + referenced in a template is missing. If the boolean + value 'false' is passed in, the specifier with the + missing variable will be displayed. + hovertemplatesrc + Sets the source reference on Chart Studio Cloud for + `hovertemplate`. + hovertext + Same as `text`. + hovertextsrc + Sets the source reference on Chart Studio Cloud for + `hovertext`. + i + A vector of vertex indices, i.e. integer values between + 0 and the length of the vertex vectors, representing + the "first" vertex of a triangle. For example, `{i[m], + j[m], k[m]}` together represent face m (triangle m) in + the mesh, where `i[m] = n` points to the triplet + `{x[n], y[n], z[n]}` in the vertex arrays. Therefore, + each element in `i` represents a point in space, which + is the first vertex of a triangle. + ids + Assigns id labels to each datum. These ids for object + constancy of data points during animation. Should be an + array of strings, not numbers or any other type. + idssrc + Sets the source reference on Chart Studio Cloud for + `ids`. + intensity + Sets the intensity values for vertices or cells as + defined by `intensitymode`. It can be used for plotting + fields on meshes. + intensitymode + Determines the source of `intensity` values. + intensitysrc + Sets the source reference on Chart Studio Cloud for + `intensity`. + isrc + Sets the source reference on Chart Studio Cloud for + `i`. + j + A vector of vertex indices, i.e. integer values between + 0 and the length of the vertex vectors, representing + the "second" vertex of a triangle. For example, `{i[m], + j[m], k[m]}` together represent face m (triangle m) in + the mesh, where `j[m] = n` points to the triplet + `{x[n], y[n], z[n]}` in the vertex arrays. Therefore, + each element in `j` represents a point in space, which + is the second vertex of a triangle. + jsrc + Sets the source reference on Chart Studio Cloud for + `j`. + k + A vector of vertex indices, i.e. integer values between + 0 and the length of the vertex vectors, representing + the "third" vertex of a triangle. For example, `{i[m], + j[m], k[m]}` together represent face m (triangle m) in + the mesh, where `k[m] = n` points to the triplet + `{x[n], y[n], z[n]}` in the vertex arrays. Therefore, + each element in `k` represents a point in space, which + is the third vertex of a triangle. + ksrc + Sets the source reference on Chart Studio Cloud for + `k`. + legend + Sets the reference to a legend to show this trace in. + References to these legends are "legend", "legend2", + "legend3", etc. Settings for these legends are set in + the layout, under `layout.legend`, `layout.legend2`, + etc. + legendgroup + Sets the legend group for this trace. Traces and shapes + part of the same legend group hide/show at the same + time when toggling legend items. + legendgrouptitle + :class:`plotly.graph_objects.mesh3d.Legendgrouptitle` + instance or dict with compatible properties + legendrank + Sets the legend rank for this trace. Items and groups + with smaller ranks are presented on top/left side while + with "reversed" `legend.traceorder` they are on + bottom/right side. The default legendrank is 1000, so + that you can use ranks less than 1000 to place certain + items before all unranked items, and ranks greater than + 1000 to go after all unranked items. When having + unranked or equal rank items shapes would be displayed + after traces i.e. according to their order in data and + layout. + legendwidth + Sets the width (in px or fraction) of the legend for + this trace. + lighting + :class:`plotly.graph_objects.mesh3d.Lighting` instance + or dict with compatible properties + lightposition + :class:`plotly.graph_objects.mesh3d.Lightposition` + instance or dict with compatible properties + meta + Assigns extra meta information associated with this + trace that can be used in various text attributes. + Attributes such as trace `name`, graph, axis and + colorbar `title.text`, annotation `text` + `rangeselector`, `updatemenues` and `sliders` `label` + text all support `meta`. To access the trace `meta` + values in an attribute in the same trace, simply use + `%{meta[i]}` where `i` is the index or key of the + `meta` item in question. To access trace `meta` in + layout attributes, use `%{data[n[.meta[i]}` where `i` + is the index or key of the `meta` and `n` is the trace + index. + metasrc + Sets the source reference on Chart Studio Cloud for + `meta`. + name + Sets the trace name. The trace name appears as the + legend item and on hover. + opacity + Sets the opacity of the surface. Please note that in + the case of using high `opacity` values for example a + value greater than or equal to 0.5 on two surfaces (and + 0.25 with four surfaces), an overlay of multiple + transparent surfaces may not perfectly be sorted in + depth by the webgl API. This behavior may be improved + in the near future and is subject to change. + reversescale + Reverses the color mapping if true. If true, `cmin` + will correspond to the last color in the array and + `cmax` will correspond to the first color. + scene + Sets a reference between this trace's 3D coordinate + system and a 3D scene. If "scene" (the default value), + the (x,y,z) coordinates refer to `layout.scene`. If + "scene2", the (x,y,z) coordinates refer to + `layout.scene2`, and so on. + showlegend + Determines whether or not an item corresponding to this + trace is shown in the legend. + showscale + Determines whether or not a colorbar is displayed for + this trace. + stream + :class:`plotly.graph_objects.mesh3d.Stream` instance or + dict with compatible properties + text + Sets the text elements associated with the vertices. If + trace `hoverinfo` contains a "text" flag and + "hovertext" is not set, these elements will be seen in + the hover labels. + textsrc + Sets the source reference on Chart Studio Cloud for + `text`. + uid + Assign an id to this trace, Use this to provide object + constancy between traces during animations and + transitions. + uirevision + Controls persistence of some user-driven changes to the + trace: `constraintrange` in `parcoords` traces, as well + as some `editable: true` modifications such as `name` + and `colorbar.title`. Defaults to `layout.uirevision`. + Note that other user-driven trace attribute changes are + controlled by `layout` attributes: `trace.visible` is + controlled by `layout.legend.uirevision`, + `selectedpoints` is controlled by + `layout.selectionrevision`, and `colorbar.(x|y)` + (accessible with `config: {editable: true}`) is + controlled by `layout.editrevision`. Trace changes are + tracked by `uid`, which only falls back on trace index + if no `uid` is provided. So if your app can add/remove + traces before the end of the `data` array, such that + the same trace has a different index, you can still + preserve user-driven changes if you give each trace a + `uid` that stays with it as it moves. + vertexcolor + Sets the color of each vertex Overrides "color". While + Red, green and blue colors are in the range of 0 and + 255; in the case of having vertex color data in RGBA + format, the alpha color should be normalized to be + between 0 and 1. + vertexcolorsrc + Sets the source reference on Chart Studio Cloud for + `vertexcolor`. + visible + Determines whether or not this trace is visible. If + "legendonly", the trace is not drawn, but can appear as + a legend item (provided that the legend itself is + visible). + x + Sets the X coordinates of the vertices. The nth element + of vectors `x`, `y` and `z` jointly represent the X, Y + and Z coordinates of the nth vertex. + xcalendar + Sets the calendar system to use with `x` date data. + xhoverformat + Sets the hover text formatting rulefor `x` using d3 + formatting mini-languages which are very similar to + those in Python. For numbers, see: + https://github.com/d3/d3-format/tree/v1.4.5#d3-format. + And for dates see: https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format. We add two items to + d3's date formatter: "%h" for half of the year as a + decimal number as well as "%{n}f" for fractional + seconds with n digits. For example, *2016-10-13 + 09:15:23.456* with tickformat "%H~%M~%S.%2f" would + display *09~15~23.46*By default the values are + formatted using `xaxis.hoverformat`. + xsrc + Sets the source reference on Chart Studio Cloud for + `x`. + y + Sets the Y coordinates of the vertices. The nth element + of vectors `x`, `y` and `z` jointly represent the X, Y + and Z coordinates of the nth vertex. + ycalendar + Sets the calendar system to use with `y` date data. + yhoverformat + Sets the hover text formatting rulefor `y` using d3 + formatting mini-languages which are very similar to + those in Python. For numbers, see: + https://github.com/d3/d3-format/tree/v1.4.5#d3-format. + And for dates see: https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format. We add two items to + d3's date formatter: "%h" for half of the year as a + decimal number as well as "%{n}f" for fractional + seconds with n digits. For example, *2016-10-13 + 09:15:23.456* with tickformat "%H~%M~%S.%2f" would + display *09~15~23.46*By default the values are + formatted using `yaxis.hoverformat`. + ysrc + Sets the source reference on Chart Studio Cloud for + `y`. + z + Sets the Z coordinates of the vertices. The nth element + of vectors `x`, `y` and `z` jointly represent the X, Y + and Z coordinates of the nth vertex. + zcalendar + Sets the calendar system to use with `z` date data. + zhoverformat + Sets the hover text formatting rulefor `z` using d3 + formatting mini-languages which are very similar to + those in Python. For numbers, see: + https://github.com/d3/d3-format/tree/v1.4.5#d3-format. + And for dates see: https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format. We add two items to + d3's date formatter: "%h" for half of the year as a + decimal number as well as "%{n}f" for fractional + seconds with n digits. For example, *2016-10-13 + 09:15:23.456* with tickformat "%H~%M~%S.%2f" would + display *09~15~23.46*By default the values are + formatted using `zaxis.hoverformat`. + zsrc + Sets the source reference on Chart Studio Cloud for + `z`. + row : 'all', int or None (default) + Subplot row index (starting from 1) for the trace to be + added. Only valid if figure was created using + `plotly.tools.make_subplots`.If 'all', addresses all + rows in the specified column(s). + col : 'all', int or None (default) + Subplot col index (starting from 1) for the trace to be + added. Only valid if figure was created using + `plotly.tools.make_subplots`.If 'all', addresses all + columns in the specified row(s). + + Returns + ------- + Figure + """ + from plotly.graph_objs import Mesh3d + + new_trace = Mesh3d( + alphahull=alphahull, + autocolorscale=autocolorscale, + cauto=cauto, + cmax=cmax, + cmid=cmid, + cmin=cmin, + color=color, + coloraxis=coloraxis, + colorbar=colorbar, + colorscale=colorscale, + contour=contour, + customdata=customdata, + customdatasrc=customdatasrc, + delaunayaxis=delaunayaxis, + facecolor=facecolor, + facecolorsrc=facecolorsrc, + flatshading=flatshading, + hoverinfo=hoverinfo, + hoverinfosrc=hoverinfosrc, + hoverlabel=hoverlabel, + hovertemplate=hovertemplate, + hovertemplatefallback=hovertemplatefallback, + hovertemplatesrc=hovertemplatesrc, + hovertext=hovertext, + hovertextsrc=hovertextsrc, + i=i, + ids=ids, + idssrc=idssrc, + intensity=intensity, + intensitymode=intensitymode, + intensitysrc=intensitysrc, + isrc=isrc, + j=j, + jsrc=jsrc, + k=k, + ksrc=ksrc, + legend=legend, + legendgroup=legendgroup, + legendgrouptitle=legendgrouptitle, + legendrank=legendrank, + legendwidth=legendwidth, + lighting=lighting, + lightposition=lightposition, + meta=meta, + metasrc=metasrc, + name=name, + opacity=opacity, + reversescale=reversescale, + scene=scene, + showlegend=showlegend, + showscale=showscale, + stream=stream, + text=text, + textsrc=textsrc, + uid=uid, + uirevision=uirevision, + vertexcolor=vertexcolor, + vertexcolorsrc=vertexcolorsrc, + visible=visible, + x=x, + xcalendar=xcalendar, + xhoverformat=xhoverformat, + xsrc=xsrc, + y=y, + ycalendar=ycalendar, + yhoverformat=yhoverformat, + ysrc=ysrc, + z=z, + zcalendar=zcalendar, + zhoverformat=zhoverformat, + zsrc=zsrc, + **kwargs, + ) + return self.add_trace(new_trace, row=row, col=col) + + def add_ohlc( + self, + close=None, + closesrc=None, + customdata=None, + customdatasrc=None, + decreasing=None, + high=None, + highsrc=None, + hoverinfo=None, + hoverinfosrc=None, + hoverlabel=None, + hovertemplate=None, + hovertemplatefallback=None, + hovertemplatesrc=None, + hovertext=None, + hovertextsrc=None, + ids=None, + idssrc=None, + increasing=None, + legend=None, + legendgroup=None, + legendgrouptitle=None, + legendrank=None, + legendwidth=None, + line=None, + low=None, + lowsrc=None, + meta=None, + metasrc=None, + name=None, + opacity=None, + open=None, + opensrc=None, + selectedpoints=None, + showlegend=None, + stream=None, + text=None, + textsrc=None, + tickwidth=None, + uid=None, + uirevision=None, + visible=None, + x=None, + xaxis=None, + xcalendar=None, + xhoverformat=None, + xperiod=None, + xperiod0=None, + xperiodalignment=None, + xsrc=None, + yaxis=None, + yhoverformat=None, + zorder=None, + row=None, + col=None, + secondary_y=None, + **kwargs, + ) -> "Figure": + """ + Add a new Ohlc trace + + The ohlc (short for Open-High-Low-Close) is a style of + financial chart describing open, high, low and close for a + given `x` coordinate (most likely time). The tip of the lines + represent the `low` and `high` values and the horizontal + segments represent the `open` and `close` values. Sample points + where the close value is higher (lower) then the open value are + called increasing (decreasing). By default, increasing items + are drawn in green whereas decreasing are drawn in red. + + Parameters + ---------- + close + Sets the close values. + closesrc + Sets the source reference on Chart Studio Cloud for + `close`. + customdata + Assigns extra data each datum. This may be useful when + listening to hover, click and selection events. Note + that, "scatter" traces also appends customdata items in + the markers DOM elements + customdatasrc + Sets the source reference on Chart Studio Cloud for + `customdata`. + decreasing + :class:`plotly.graph_objects.ohlc.Decreasing` instance + or dict with compatible properties + high + Sets the high values. + highsrc + Sets the source reference on Chart Studio Cloud for + `high`. + hoverinfo + Determines which trace information appear on hover. If + `none` or `skip` are set, no information is displayed + upon hovering. But, if `none` is set, click and hover + events are still fired. + hoverinfosrc + Sets the source reference on Chart Studio Cloud for + `hoverinfo`. + hoverlabel + :class:`plotly.graph_objects.ohlc.Hoverlabel` instance + or dict with compatible properties + hovertemplate + Template string used for rendering the information that + appear on hover box. Note that this will override + `hoverinfo`. Variables are inserted using %{variable}, + for example "y: %{y}" as well as %{xother}, {%_xother}, + {%_xother_}, {%xother_}. When showing info for several + points, "xother" will be added to those with different + x positions from the first point. An underscore before + or after "(x|y)other" will add a space on that side, + only when this field is shown. Numbers are formatted + using d3-format's syntax %{variable:d3-format}, for + example "Price: %{y:$.2f}". + https://github.com/d3/d3-format/tree/v1.4.5#d3-format + for details on the formatting syntax. Dates are + formatted using d3-time-format's syntax + %{variable|d3-time-format}, for example "Day: + %{2019-01-01|%A}". https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format for details on the + date formatting syntax. Variables that can't be found + will be replaced with the specifier. For example, a + template of "data: %{x}, %{y}" will result in a value + of "data: 1, %{y}" if x is 1 and y is missing. + Variables with an undefined value will be replaced with + the fallback value. The variables available in + `hovertemplate` are the ones emitted as event data + described at this link + https://plotly.com/javascript/plotlyjs-events/#event- + data. Additionally, all attributes that can be + specified per-point (the ones that are `arrayOk: true`) + are available. Finally, the template string has access + to variables `open`, `high`, `low` and `close`. + Anything contained in tag `` is displayed in the + secondary box, for example + `%{fullData.name}`. To hide the + secondary box completely, use an empty tag + ``. + hovertemplatefallback + Fallback string that's displayed when a variable + referenced in a template is missing. If the boolean + value 'false' is passed in, the specifier with the + missing variable will be displayed. + hovertemplatesrc + Sets the source reference on Chart Studio Cloud for + `hovertemplate`. + hovertext + Same as `text`. + hovertextsrc + Sets the source reference on Chart Studio Cloud for + `hovertext`. + ids + Assigns id labels to each datum. These ids for object + constancy of data points during animation. Should be an + array of strings, not numbers or any other type. + idssrc + Sets the source reference on Chart Studio Cloud for + `ids`. + increasing + :class:`plotly.graph_objects.ohlc.Increasing` instance + or dict with compatible properties + legend + Sets the reference to a legend to show this trace in. + References to these legends are "legend", "legend2", + "legend3", etc. Settings for these legends are set in + the layout, under `layout.legend`, `layout.legend2`, + etc. + legendgroup + Sets the legend group for this trace. Traces and shapes + part of the same legend group hide/show at the same + time when toggling legend items. + legendgrouptitle + :class:`plotly.graph_objects.ohlc.Legendgrouptitle` + instance or dict with compatible properties + legendrank + Sets the legend rank for this trace. Items and groups + with smaller ranks are presented on top/left side while + with "reversed" `legend.traceorder` they are on + bottom/right side. The default legendrank is 1000, so + that you can use ranks less than 1000 to place certain + items before all unranked items, and ranks greater than + 1000 to go after all unranked items. When having + unranked or equal rank items shapes would be displayed + after traces i.e. according to their order in data and + layout. + legendwidth + Sets the width (in px or fraction) of the legend for + this trace. + line + :class:`plotly.graph_objects.ohlc.Line` instance or + dict with compatible properties + low + Sets the low values. + lowsrc + Sets the source reference on Chart Studio Cloud for + `low`. + meta + Assigns extra meta information associated with this + trace that can be used in various text attributes. + Attributes such as trace `name`, graph, axis and + colorbar `title.text`, annotation `text` + `rangeselector`, `updatemenues` and `sliders` `label` + text all support `meta`. To access the trace `meta` + values in an attribute in the same trace, simply use + `%{meta[i]}` where `i` is the index or key of the + `meta` item in question. To access trace `meta` in + layout attributes, use `%{data[n[.meta[i]}` where `i` + is the index or key of the `meta` and `n` is the trace + index. + metasrc + Sets the source reference on Chart Studio Cloud for + `meta`. + name + Sets the trace name. The trace name appears as the + legend item and on hover. + opacity + Sets the opacity of the trace. + open + Sets the open values. + opensrc + Sets the source reference on Chart Studio Cloud for + `open`. + selectedpoints + Array containing integer indices of selected points. + Has an effect only for traces that support selections. + Note that an empty array means an empty selection where + the `unselected` are turned on for all points, whereas, + any other non-array values means no selection all where + the `selected` and `unselected` styles have no effect. + showlegend + Determines whether or not an item corresponding to this + trace is shown in the legend. + stream + :class:`plotly.graph_objects.ohlc.Stream` instance or + dict with compatible properties + text + Sets hover text elements associated with each sample + point. If a single string, the same string appears over + all the data points. If an array of string, the items + are mapped in order to this trace's sample points. + textsrc + Sets the source reference on Chart Studio Cloud for + `text`. + tickwidth + Sets the width of the open/close tick marks relative to + the "x" minimal interval. + uid + Assign an id to this trace, Use this to provide object + constancy between traces during animations and + transitions. + uirevision + Controls persistence of some user-driven changes to the + trace: `constraintrange` in `parcoords` traces, as well + as some `editable: true` modifications such as `name` + and `colorbar.title`. Defaults to `layout.uirevision`. + Note that other user-driven trace attribute changes are + controlled by `layout` attributes: `trace.visible` is + controlled by `layout.legend.uirevision`, + `selectedpoints` is controlled by + `layout.selectionrevision`, and `colorbar.(x|y)` + (accessible with `config: {editable: true}`) is + controlled by `layout.editrevision`. Trace changes are + tracked by `uid`, which only falls back on trace index + if no `uid` is provided. So if your app can add/remove + traces before the end of the `data` array, such that + the same trace has a different index, you can still + preserve user-driven changes if you give each trace a + `uid` that stays with it as it moves. + visible + Determines whether or not this trace is visible. If + "legendonly", the trace is not drawn, but can appear as + a legend item (provided that the legend itself is + visible). + x + Sets the x coordinates. If absent, linear coordinate + will be generated. + xaxis + Sets a reference between this trace's x coordinates and + a 2D cartesian x axis. If "x" (the default value), the + x coordinates refer to `layout.xaxis`. If "x2", the x + coordinates refer to `layout.xaxis2`, and so on. + xcalendar + Sets the calendar system to use with `x` date data. + xhoverformat + Sets the hover text formatting rulefor `x` using d3 + formatting mini-languages which are very similar to + those in Python. For numbers, see: + https://github.com/d3/d3-format/tree/v1.4.5#d3-format. + And for dates see: https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format. We add two items to + d3's date formatter: "%h" for half of the year as a + decimal number as well as "%{n}f" for fractional + seconds with n digits. For example, *2016-10-13 + 09:15:23.456* with tickformat "%H~%M~%S.%2f" would + display *09~15~23.46*By default the values are + formatted using `xaxis.hoverformat`. + xperiod + Only relevant when the axis `type` is "date". Sets the + period positioning in milliseconds or "M" on the x + axis. Special values in the form of "M" could be + used to declare the number of months. In this case `n` + must be a positive integer. + xperiod0 + Only relevant when the axis `type` is "date". Sets the + base for period positioning in milliseconds or date + string on the x0 axis. When `x0period` is round number + of weeks, the `x0period0` by default would be on a + Sunday i.e. 2000-01-02, otherwise it would be at + 2000-01-01. + xperiodalignment + Only relevant when the axis `type` is "date". Sets the + alignment of data points on the x axis. + xsrc + Sets the source reference on Chart Studio Cloud for + `x`. + yaxis + Sets a reference between this trace's y coordinates and + a 2D cartesian y axis. If "y" (the default value), the + y coordinates refer to `layout.yaxis`. If "y2", the y + coordinates refer to `layout.yaxis2`, and so on. + yhoverformat + Sets the hover text formatting rulefor `y` using d3 + formatting mini-languages which are very similar to + those in Python. For numbers, see: + https://github.com/d3/d3-format/tree/v1.4.5#d3-format. + And for dates see: https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format. We add two items to + d3's date formatter: "%h" for half of the year as a + decimal number as well as "%{n}f" for fractional + seconds with n digits. For example, *2016-10-13 + 09:15:23.456* with tickformat "%H~%M~%S.%2f" would + display *09~15~23.46*By default the values are + formatted using `yaxis.hoverformat`. + zorder + Sets the layer on which this trace is displayed, + relative to other SVG traces on the same subplot. SVG + traces with higher `zorder` appear in front of those + with lower `zorder`. + row : 'all', int or None (default) + Subplot row index (starting from 1) for the trace to be + added. Only valid if figure was created using + `plotly.tools.make_subplots`.If 'all', addresses all + rows in the specified column(s). + col : 'all', int or None (default) + Subplot col index (starting from 1) for the trace to be + added. Only valid if figure was created using + `plotly.tools.make_subplots`.If 'all', addresses all + columns in the specified row(s). + secondary_y: boolean or None (default None) + If True, associate this trace with the secondary y-axis of the + subplot at the specified row and col. Only valid if all of the + following conditions are satisfied: + * The figure was created using `plotly.subplots.make_subplots`. + * The row and col arguments are not None + * The subplot at the specified row and col has type xy + (which is the default) and secondary_y True. These + properties are specified in the specs argument to + make_subplots. See the make_subplots docstring for more info. + + Returns + ------- + Figure + """ + from plotly.graph_objs import Ohlc + + new_trace = Ohlc( + close=close, + closesrc=closesrc, + customdata=customdata, + customdatasrc=customdatasrc, + decreasing=decreasing, + high=high, + highsrc=highsrc, + hoverinfo=hoverinfo, + hoverinfosrc=hoverinfosrc, + hoverlabel=hoverlabel, + hovertemplate=hovertemplate, + hovertemplatefallback=hovertemplatefallback, + hovertemplatesrc=hovertemplatesrc, + hovertext=hovertext, + hovertextsrc=hovertextsrc, + ids=ids, + idssrc=idssrc, + increasing=increasing, + legend=legend, + legendgroup=legendgroup, + legendgrouptitle=legendgrouptitle, + legendrank=legendrank, + legendwidth=legendwidth, + line=line, + low=low, + lowsrc=lowsrc, + meta=meta, + metasrc=metasrc, + name=name, + opacity=opacity, + open=open, + opensrc=opensrc, + selectedpoints=selectedpoints, + showlegend=showlegend, + stream=stream, + text=text, + textsrc=textsrc, + tickwidth=tickwidth, + uid=uid, + uirevision=uirevision, + visible=visible, + x=x, + xaxis=xaxis, + xcalendar=xcalendar, + xhoverformat=xhoverformat, + xperiod=xperiod, + xperiod0=xperiod0, + xperiodalignment=xperiodalignment, + xsrc=xsrc, + yaxis=yaxis, + yhoverformat=yhoverformat, + zorder=zorder, + **kwargs, + ) + return self.add_trace(new_trace, row=row, col=col, secondary_y=secondary_y) + + def add_parcats( + self, + arrangement=None, + bundlecolors=None, + counts=None, + countssrc=None, + dimensions=None, + dimensiondefaults=None, + domain=None, + hoverinfo=None, + hoveron=None, + hovertemplate=None, + hovertemplatefallback=None, + labelfont=None, + legendgrouptitle=None, + legendwidth=None, + line=None, + meta=None, + metasrc=None, + name=None, + sortpaths=None, + stream=None, + tickfont=None, + uid=None, + uirevision=None, + visible=None, + row=None, + col=None, + **kwargs, + ) -> "Figure": + """ + Add a new Parcats trace + + Parallel categories diagram for multidimensional categorical + data. + + Parameters + ---------- + arrangement + Sets the drag interaction mode for categories and + dimensions. If `perpendicular`, the categories can only + move along a line perpendicular to the paths. If + `freeform`, the categories can freely move on the + plane. If `fixed`, the categories and dimensions are + stationary. + bundlecolors + Sort paths so that like colors are bundled together + within each category. + counts + The number of observations represented by each state. + Defaults to 1 so that each state represents one + observation + countssrc + Sets the source reference on Chart Studio Cloud for + `counts`. + dimensions + The dimensions (variables) of the parallel categories + diagram. + dimensiondefaults + When used in a template (as + layout.template.data.parcats.dimensiondefaults), sets + the default property values to use for elements of + parcats.dimensions + domain + :class:`plotly.graph_objects.parcats.Domain` instance + or dict with compatible properties + hoverinfo + Determines which trace information appear on hover. If + `none` or `skip` are set, no information is displayed + upon hovering. But, if `none` is set, click and hover + events are still fired. + hoveron + Sets the hover interaction mode for the parcats + diagram. If `category`, hover interaction take place + per category. If `color`, hover interactions take place + per color per category. If `dimension`, hover + interactions take place across all categories per + dimension. + hovertemplate + Template string used for rendering the information that + appear on hover box. Note that this will override + `hoverinfo`. Variables are inserted using %{variable}, + for example "y: %{y}" as well as %{xother}, {%_xother}, + {%_xother_}, {%xother_}. When showing info for several + points, "xother" will be added to those with different + x positions from the first point. An underscore before + or after "(x|y)other" will add a space on that side, + only when this field is shown. Numbers are formatted + using d3-format's syntax %{variable:d3-format}, for + example "Price: %{y:$.2f}". + https://github.com/d3/d3-format/tree/v1.4.5#d3-format + for details on the formatting syntax. Dates are + formatted using d3-time-format's syntax + %{variable|d3-time-format}, for example "Day: + %{2019-01-01|%A}". https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format for details on the + date formatting syntax. Variables that can't be found + will be replaced with the specifier. For example, a + template of "data: %{x}, %{y}" will result in a value + of "data: 1, %{y}" if x is 1 and y is missing. + Variables with an undefined value will be replaced with + the fallback value. The variables available in + `hovertemplate` are the ones emitted as event data + described at this link + https://plotly.com/javascript/plotlyjs-events/#event- + data. Additionally, all attributes that can be + specified per-point (the ones that are `arrayOk: true`) + are available. Finally, the template string has access + to variables `count`, `probability`, `category`, + `categorycount`, `colorcount` and `bandcolorcount`. + Anything contained in tag `` is displayed in the + secondary box, for example + `%{fullData.name}`. To hide the + secondary box completely, use an empty tag + ``. + hovertemplatefallback + Fallback string that's displayed when a variable + referenced in a template is missing. If the boolean + value 'false' is passed in, the specifier with the + missing variable will be displayed. + labelfont + Sets the font for the `dimension` labels. + legendgrouptitle + :class:`plotly.graph_objects.parcats.Legendgrouptitle` + instance or dict with compatible properties + legendwidth + Sets the width (in px or fraction) of the legend for + this trace. + line + :class:`plotly.graph_objects.parcats.Line` instance or + dict with compatible properties + meta + Assigns extra meta information associated with this + trace that can be used in various text attributes. + Attributes such as trace `name`, graph, axis and + colorbar `title.text`, annotation `text` + `rangeselector`, `updatemenues` and `sliders` `label` + text all support `meta`. To access the trace `meta` + values in an attribute in the same trace, simply use + `%{meta[i]}` where `i` is the index or key of the + `meta` item in question. To access trace `meta` in + layout attributes, use `%{data[n[.meta[i]}` where `i` + is the index or key of the `meta` and `n` is the trace + index. + metasrc + Sets the source reference on Chart Studio Cloud for + `meta`. + name + Sets the trace name. The trace name appears as the + legend item and on hover. + sortpaths + Sets the path sorting algorithm. If `forward`, sort + paths based on dimension categories from left to right. + If `backward`, sort paths based on dimensions + categories from right to left. + stream + :class:`plotly.graph_objects.parcats.Stream` instance + or dict with compatible properties + tickfont + Sets the font for the `category` labels. + uid + Assign an id to this trace, Use this to provide object + constancy between traces during animations and + transitions. + uirevision + Controls persistence of some user-driven changes to the + trace: `constraintrange` in `parcoords` traces, as well + as some `editable: true` modifications such as `name` + and `colorbar.title`. Defaults to `layout.uirevision`. + Note that other user-driven trace attribute changes are + controlled by `layout` attributes: `trace.visible` is + controlled by `layout.legend.uirevision`, + `selectedpoints` is controlled by + `layout.selectionrevision`, and `colorbar.(x|y)` + (accessible with `config: {editable: true}`) is + controlled by `layout.editrevision`. Trace changes are + tracked by `uid`, which only falls back on trace index + if no `uid` is provided. So if your app can add/remove + traces before the end of the `data` array, such that + the same trace has a different index, you can still + preserve user-driven changes if you give each trace a + `uid` that stays with it as it moves. + visible + Determines whether or not this trace is visible. If + "legendonly", the trace is not drawn, but can appear as + a legend item (provided that the legend itself is + visible). + row : 'all', int or None (default) + Subplot row index (starting from 1) for the trace to be + added. Only valid if figure was created using + `plotly.tools.make_subplots`.If 'all', addresses all + rows in the specified column(s). + col : 'all', int or None (default) + Subplot col index (starting from 1) for the trace to be + added. Only valid if figure was created using + `plotly.tools.make_subplots`.If 'all', addresses all + columns in the specified row(s). + + Returns + ------- + Figure + """ + from plotly.graph_objs import Parcats + + new_trace = Parcats( + arrangement=arrangement, + bundlecolors=bundlecolors, + counts=counts, + countssrc=countssrc, + dimensions=dimensions, + dimensiondefaults=dimensiondefaults, + domain=domain, + hoverinfo=hoverinfo, + hoveron=hoveron, + hovertemplate=hovertemplate, + hovertemplatefallback=hovertemplatefallback, + labelfont=labelfont, + legendgrouptitle=legendgrouptitle, + legendwidth=legendwidth, + line=line, + meta=meta, + metasrc=metasrc, + name=name, + sortpaths=sortpaths, + stream=stream, + tickfont=tickfont, + uid=uid, + uirevision=uirevision, + visible=visible, + **kwargs, + ) + return self.add_trace(new_trace, row=row, col=col) + + def add_parcoords( + self, + customdata=None, + customdatasrc=None, + dimensions=None, + dimensiondefaults=None, + domain=None, + ids=None, + idssrc=None, + labelangle=None, + labelfont=None, + labelside=None, + legend=None, + legendgrouptitle=None, + legendrank=None, + legendwidth=None, + line=None, + meta=None, + metasrc=None, + name=None, + rangefont=None, + stream=None, + tickfont=None, + uid=None, + uirevision=None, + unselected=None, + visible=None, + row=None, + col=None, + **kwargs, + ) -> "Figure": + """ + Add a new Parcoords trace + + Parallel coordinates for multidimensional exploratory data + analysis. The samples are specified in `dimensions`. The colors + are set in `line.color`. + + Parameters + ---------- + customdata + Assigns extra data each datum. This may be useful when + listening to hover, click and selection events. Note + that, "scatter" traces also appends customdata items in + the markers DOM elements + customdatasrc + Sets the source reference on Chart Studio Cloud for + `customdata`. + dimensions + The dimensions (variables) of the parallel coordinates + chart. 2..60 dimensions are supported. + dimensiondefaults + When used in a template (as + layout.template.data.parcoords.dimensiondefaults), sets + the default property values to use for elements of + parcoords.dimensions + domain + :class:`plotly.graph_objects.parcoords.Domain` instance + or dict with compatible properties + ids + Assigns id labels to each datum. These ids for object + constancy of data points during animation. Should be an + array of strings, not numbers or any other type. + idssrc + Sets the source reference on Chart Studio Cloud for + `ids`. + labelangle + Sets the angle of the labels with respect to the + horizontal. For example, a `tickangle` of -90 draws the + labels vertically. Tilted labels with "labelangle" may + be positioned better inside margins when + `labelposition` is set to "bottom". + labelfont + Sets the font for the `dimension` labels. + labelside + Specifies the location of the `label`. "top" positions + labels above, next to the title "bottom" positions + labels below the graph Tilted labels with "labelangle" + may be positioned better inside margins when + `labelposition` is set to "bottom". + legend + Sets the reference to a legend to show this trace in. + References to these legends are "legend", "legend2", + "legend3", etc. Settings for these legends are set in + the layout, under `layout.legend`, `layout.legend2`, + etc. + legendgrouptitle + :class:`plotly.graph_objects.parcoords.Legendgrouptitle + ` instance or dict with compatible properties + legendrank + Sets the legend rank for this trace. Items and groups + with smaller ranks are presented on top/left side while + with "reversed" `legend.traceorder` they are on + bottom/right side. The default legendrank is 1000, so + that you can use ranks less than 1000 to place certain + items before all unranked items, and ranks greater than + 1000 to go after all unranked items. When having + unranked or equal rank items shapes would be displayed + after traces i.e. according to their order in data and + layout. + legendwidth + Sets the width (in px or fraction) of the legend for + this trace. + line + :class:`plotly.graph_objects.parcoords.Line` instance + or dict with compatible properties + meta + Assigns extra meta information associated with this + trace that can be used in various text attributes. + Attributes such as trace `name`, graph, axis and + colorbar `title.text`, annotation `text` + `rangeselector`, `updatemenues` and `sliders` `label` + text all support `meta`. To access the trace `meta` + values in an attribute in the same trace, simply use + `%{meta[i]}` where `i` is the index or key of the + `meta` item in question. To access trace `meta` in + layout attributes, use `%{data[n[.meta[i]}` where `i` + is the index or key of the `meta` and `n` is the trace + index. + metasrc + Sets the source reference on Chart Studio Cloud for + `meta`. + name + Sets the trace name. The trace name appears as the + legend item and on hover. + rangefont + Sets the font for the `dimension` range values. + stream + :class:`plotly.graph_objects.parcoords.Stream` instance + or dict with compatible properties + tickfont + Sets the font for the `dimension` tick values. + uid + Assign an id to this trace, Use this to provide object + constancy between traces during animations and + transitions. + uirevision + Controls persistence of some user-driven changes to the + trace: `constraintrange` in `parcoords` traces, as well + as some `editable: true` modifications such as `name` + and `colorbar.title`. Defaults to `layout.uirevision`. + Note that other user-driven trace attribute changes are + controlled by `layout` attributes: `trace.visible` is + controlled by `layout.legend.uirevision`, + `selectedpoints` is controlled by + `layout.selectionrevision`, and `colorbar.(x|y)` + (accessible with `config: {editable: true}`) is + controlled by `layout.editrevision`. Trace changes are + tracked by `uid`, which only falls back on trace index + if no `uid` is provided. So if your app can add/remove + traces before the end of the `data` array, such that + the same trace has a different index, you can still + preserve user-driven changes if you give each trace a + `uid` that stays with it as it moves. + unselected + :class:`plotly.graph_objects.parcoords.Unselected` + instance or dict with compatible properties + visible + Determines whether or not this trace is visible. If + "legendonly", the trace is not drawn, but can appear as + a legend item (provided that the legend itself is + visible). + row : 'all', int or None (default) + Subplot row index (starting from 1) for the trace to be + added. Only valid if figure was created using + `plotly.tools.make_subplots`.If 'all', addresses all + rows in the specified column(s). + col : 'all', int or None (default) + Subplot col index (starting from 1) for the trace to be + added. Only valid if figure was created using + `plotly.tools.make_subplots`.If 'all', addresses all + columns in the specified row(s). + + Returns + ------- + Figure + """ + from plotly.graph_objs import Parcoords + + new_trace = Parcoords( + customdata=customdata, + customdatasrc=customdatasrc, + dimensions=dimensions, + dimensiondefaults=dimensiondefaults, + domain=domain, + ids=ids, + idssrc=idssrc, + labelangle=labelangle, + labelfont=labelfont, + labelside=labelside, + legend=legend, + legendgrouptitle=legendgrouptitle, + legendrank=legendrank, + legendwidth=legendwidth, + line=line, + meta=meta, + metasrc=metasrc, + name=name, + rangefont=rangefont, + stream=stream, + tickfont=tickfont, + uid=uid, + uirevision=uirevision, + unselected=unselected, + visible=visible, + **kwargs, + ) + return self.add_trace(new_trace, row=row, col=col) + + def add_pie( + self, + automargin=None, + customdata=None, + customdatasrc=None, + direction=None, + dlabel=None, + domain=None, + hole=None, + hoverinfo=None, + hoverinfosrc=None, + hoverlabel=None, + hovertemplate=None, + hovertemplatefallback=None, + hovertemplatesrc=None, + hovertext=None, + hovertextsrc=None, + ids=None, + idssrc=None, + insidetextfont=None, + insidetextorientation=None, + label0=None, + labels=None, + labelssrc=None, + legend=None, + legendgroup=None, + legendgrouptitle=None, + legendrank=None, + legendsrc=None, + legendwidth=None, + marker=None, + meta=None, + metasrc=None, + name=None, + opacity=None, + outsidetextfont=None, + pull=None, + pullsrc=None, + rotation=None, + scalegroup=None, + showlegend=None, + showlegendsrc=None, + sort=None, + stream=None, + text=None, + textfont=None, + textinfo=None, + textposition=None, + textpositionsrc=None, + textsrc=None, + texttemplate=None, + texttemplatefallback=None, + texttemplatesrc=None, + title=None, + uid=None, + uirevision=None, + values=None, + valuessrc=None, + visible=None, + row=None, + col=None, + **kwargs, + ) -> "Figure": + """ + Add a new Pie trace + + A data visualized by the sectors of the pie is set in `values`. + The sector labels are set in `labels`. The sector colors are + set in `marker.colors` + + Parameters + ---------- + automargin + Determines whether outside text labels can push the + margins. + customdata + Assigns extra data each datum. This may be useful when + listening to hover, click and selection events. Note + that, "scatter" traces also appends customdata items in + the markers DOM elements + customdatasrc + Sets the source reference on Chart Studio Cloud for + `customdata`. + direction + Specifies the direction at which succeeding sectors + follow one another. + dlabel + Sets the label step. See `label0` for more info. + domain + :class:`plotly.graph_objects.pie.Domain` instance or + dict with compatible properties + hole + Sets the fraction of the radius to cut out of the pie. + Use this to make a donut chart. + hoverinfo + Determines which trace information appear on hover. If + `none` or `skip` are set, no information is displayed + upon hovering. But, if `none` is set, click and hover + events are still fired. + hoverinfosrc + Sets the source reference on Chart Studio Cloud for + `hoverinfo`. + hoverlabel + :class:`plotly.graph_objects.pie.Hoverlabel` instance + or dict with compatible properties + hovertemplate + Template string used for rendering the information that + appear on hover box. Note that this will override + `hoverinfo`. Variables are inserted using %{variable}, + for example "y: %{y}" as well as %{xother}, {%_xother}, + {%_xother_}, {%xother_}. When showing info for several + points, "xother" will be added to those with different + x positions from the first point. An underscore before + or after "(x|y)other" will add a space on that side, + only when this field is shown. Numbers are formatted + using d3-format's syntax %{variable:d3-format}, for + example "Price: %{y:$.2f}". + https://github.com/d3/d3-format/tree/v1.4.5#d3-format + for details on the formatting syntax. Dates are + formatted using d3-time-format's syntax + %{variable|d3-time-format}, for example "Day: + %{2019-01-01|%A}". https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format for details on the + date formatting syntax. Variables that can't be found + will be replaced with the specifier. For example, a + template of "data: %{x}, %{y}" will result in a value + of "data: 1, %{y}" if x is 1 and y is missing. + Variables with an undefined value will be replaced with + the fallback value. The variables available in + `hovertemplate` are the ones emitted as event data + described at this link + https://plotly.com/javascript/plotlyjs-events/#event- + data. Additionally, all attributes that can be + specified per-point (the ones that are `arrayOk: true`) + are available. Finally, the template string has access + to variables `label`, `color`, `value`, `percent` and + `text`. Anything contained in tag `` is + displayed in the secondary box, for example + `%{fullData.name}`. To hide the + secondary box completely, use an empty tag + ``. + hovertemplatefallback + Fallback string that's displayed when a variable + referenced in a template is missing. If the boolean + value 'false' is passed in, the specifier with the + missing variable will be displayed. + hovertemplatesrc + Sets the source reference on Chart Studio Cloud for + `hovertemplate`. + hovertext + Sets hover text elements associated with each sector. + If a single string, the same string appears for all + data points. If an array of string, the items are + mapped in order of this trace's sectors. To be seen, + trace `hoverinfo` must contain a "text" flag. + hovertextsrc + Sets the source reference on Chart Studio Cloud for + `hovertext`. + ids + Assigns id labels to each datum. These ids for object + constancy of data points during animation. Should be an + array of strings, not numbers or any other type. + idssrc + Sets the source reference on Chart Studio Cloud for + `ids`. + insidetextfont + Sets the font used for `textinfo` lying inside the + sector. + insidetextorientation + Controls the orientation of the text inside chart + sectors. When set to "auto", text may be oriented in + any direction in order to be as big as possible in the + middle of a sector. The "horizontal" option orients + text to be parallel with the bottom of the chart, and + may make text smaller in order to achieve that goal. + The "radial" option orients text along the radius of + the sector. The "tangential" option orients text + perpendicular to the radius of the sector. + label0 + Alternate to `labels`. Builds a numeric set of labels. + Use with `dlabel` where `label0` is the starting label + and `dlabel` the step. + labels + Sets the sector labels. If `labels` entries are + duplicated, we sum associated `values` or simply count + occurrences if `values` is not provided. For other + array attributes (including color) we use the first + non-empty entry among all occurrences of the label. + labelssrc + Sets the source reference on Chart Studio Cloud for + `labels`. + legend + Sets the reference to a legend to show the pie slices + in. Can be an array if `values` is set. In that case, + each entry specifies the legend reference for one + slice. References to these legends are "legend", + "legend2", "legend3", etc. Settings for these legends + are set in the layout, under `layout.legend`, + `layout.legend2`, etc. + legendgroup + Sets the legend group for this trace. Traces and shapes + part of the same legend group hide/show at the same + time when toggling legend items. + legendgrouptitle + :class:`plotly.graph_objects.pie.Legendgrouptitle` + instance or dict with compatible properties + legendrank + Sets the legend rank for this trace. Items and groups + with smaller ranks are presented on top/left side while + with "reversed" `legend.traceorder` they are on + bottom/right side. The default legendrank is 1000, so + that you can use ranks less than 1000 to place certain + items before all unranked items, and ranks greater than + 1000 to go after all unranked items. When having + unranked or equal rank items shapes would be displayed + after traces i.e. according to their order in data and + layout. + legendsrc + Sets the source reference on Chart Studio Cloud for + `legend`. + legendwidth + Sets the width (in px or fraction) of the legend for + this trace. + marker + :class:`plotly.graph_objects.pie.Marker` instance or + dict with compatible properties + meta + Assigns extra meta information associated with this + trace that can be used in various text attributes. + Attributes such as trace `name`, graph, axis and + colorbar `title.text`, annotation `text` + `rangeselector`, `updatemenues` and `sliders` `label` + text all support `meta`. To access the trace `meta` + values in an attribute in the same trace, simply use + `%{meta[i]}` where `i` is the index or key of the + `meta` item in question. To access trace `meta` in + layout attributes, use `%{data[n[.meta[i]}` where `i` + is the index or key of the `meta` and `n` is the trace + index. + metasrc + Sets the source reference on Chart Studio Cloud for + `meta`. + name + Sets the trace name. The trace name appears as the + legend item and on hover. + opacity + Sets the opacity of the trace. + outsidetextfont + Sets the font used for `textinfo` lying outside the + sector. + pull + Sets the fraction of larger radius to pull the sectors + out from the center. This can be a constant to pull all + slices apart from each other equally or an array to + highlight one or more slices. + pullsrc + Sets the source reference on Chart Studio Cloud for + `pull`. + rotation + Instead of the first slice starting at 12 o'clock, + rotate to some other angle. + scalegroup + If there are multiple pie charts that should be sized + according to their totals, link them by providing a + non-empty group id here shared by every trace in the + same group. + showlegend + Determines whether or not items corresponding to the + pie slices are shown in the legend. Can be an array if + `values` is set. In that case, each entry specifies + appearance in the legend for one slice. + showlegendsrc + Sets the source reference on Chart Studio Cloud for + `showlegend`. + sort + Determines whether or not the sectors are reordered + from largest to smallest. + stream + :class:`plotly.graph_objects.pie.Stream` instance or + dict with compatible properties + text + Sets text elements associated with each sector. If + trace `textinfo` contains a "text" flag, these elements + will be seen on the chart. If trace `hoverinfo` + contains a "text" flag and "hovertext" is not set, + these elements will be seen in the hover labels. + textfont + Sets the font used for `textinfo`. + textinfo + Determines which trace information appear on the graph. + textposition + Specifies the location of the `textinfo`. + textpositionsrc + Sets the source reference on Chart Studio Cloud for + `textposition`. + textsrc + Sets the source reference on Chart Studio Cloud for + `text`. + texttemplate + Template string used for rendering the information text + that appears on points. Note that this will override + `textinfo`. Variables are inserted using %{variable}, + for example "y: %{y}". Numbers are formatted using + d3-format's syntax %{variable:d3-format}, for example + "Price: %{y:$.2f}". + https://github.com/d3/d3-format/tree/v1.4.5#d3-format + for details on the formatting syntax. Dates are + formatted using d3-time-format's syntax + %{variable|d3-time-format}, for example "Day: + %{2019-01-01|%A}". https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format for details on the + date formatting syntax. Variables that can't be found + will be replaced with the specifier. For example, a + template of "data: %{x}, %{y}" will result in a value + of "data: 1, %{y}" if x is 1 and y is missing. + Variables with an undefined value will be replaced with + the fallback value. All attributes that can be + specified per-point (the ones that are `arrayOk: true`) + are available. Finally, the template string has access + to variables `label`, `color`, `value`, `percent` and + `text`. + texttemplatefallback + Fallback string that's displayed when a variable + referenced in a template is missing. If the boolean + value 'false' is passed in, the specifier with the + missing variable will be displayed. + texttemplatesrc + Sets the source reference on Chart Studio Cloud for + `texttemplate`. + title + :class:`plotly.graph_objects.pie.Title` instance or + dict with compatible properties + uid + Assign an id to this trace, Use this to provide object + constancy between traces during animations and + transitions. + uirevision + Controls persistence of some user-driven changes to the + trace: `constraintrange` in `parcoords` traces, as well + as some `editable: true` modifications such as `name` + and `colorbar.title`. Defaults to `layout.uirevision`. + Note that other user-driven trace attribute changes are + controlled by `layout` attributes: `trace.visible` is + controlled by `layout.legend.uirevision`, + `selectedpoints` is controlled by + `layout.selectionrevision`, and `colorbar.(x|y)` + (accessible with `config: {editable: true}`) is + controlled by `layout.editrevision`. Trace changes are + tracked by `uid`, which only falls back on trace index + if no `uid` is provided. So if your app can add/remove + traces before the end of the `data` array, such that + the same trace has a different index, you can still + preserve user-driven changes if you give each trace a + `uid` that stays with it as it moves. + values + Sets the values of the sectors. If omitted, we count + occurrences of each label. + valuessrc + Sets the source reference on Chart Studio Cloud for + `values`. + visible + Determines whether or not this trace is visible. If + "legendonly", the trace is not drawn, but can appear as + a legend item (provided that the legend itself is + visible). + row : 'all', int or None (default) + Subplot row index (starting from 1) for the trace to be + added. Only valid if figure was created using + `plotly.tools.make_subplots`.If 'all', addresses all + rows in the specified column(s). + col : 'all', int or None (default) + Subplot col index (starting from 1) for the trace to be + added. Only valid if figure was created using + `plotly.tools.make_subplots`.If 'all', addresses all + columns in the specified row(s). + + Returns + ------- + Figure + """ + from plotly.graph_objs import Pie + + new_trace = Pie( + automargin=automargin, + customdata=customdata, + customdatasrc=customdatasrc, + direction=direction, + dlabel=dlabel, + domain=domain, + hole=hole, + hoverinfo=hoverinfo, + hoverinfosrc=hoverinfosrc, + hoverlabel=hoverlabel, + hovertemplate=hovertemplate, + hovertemplatefallback=hovertemplatefallback, + hovertemplatesrc=hovertemplatesrc, + hovertext=hovertext, + hovertextsrc=hovertextsrc, + ids=ids, + idssrc=idssrc, + insidetextfont=insidetextfont, + insidetextorientation=insidetextorientation, + label0=label0, + labels=labels, + labelssrc=labelssrc, + legend=legend, + legendgroup=legendgroup, + legendgrouptitle=legendgrouptitle, + legendrank=legendrank, + legendsrc=legendsrc, + legendwidth=legendwidth, + marker=marker, + meta=meta, + metasrc=metasrc, + name=name, + opacity=opacity, + outsidetextfont=outsidetextfont, + pull=pull, + pullsrc=pullsrc, + rotation=rotation, + scalegroup=scalegroup, + showlegend=showlegend, + showlegendsrc=showlegendsrc, + sort=sort, + stream=stream, + text=text, + textfont=textfont, + textinfo=textinfo, + textposition=textposition, + textpositionsrc=textpositionsrc, + textsrc=textsrc, + texttemplate=texttemplate, + texttemplatefallback=texttemplatefallback, + texttemplatesrc=texttemplatesrc, + title=title, + uid=uid, + uirevision=uirevision, + values=values, + valuessrc=valuessrc, + visible=visible, + **kwargs, + ) + return self.add_trace(new_trace, row=row, col=col) + + def add_sankey( + self, + arrangement=None, + customdata=None, + customdatasrc=None, + domain=None, + hoverinfo=None, + hoverlabel=None, + ids=None, + idssrc=None, + legend=None, + legendgrouptitle=None, + legendrank=None, + legendwidth=None, + link=None, + meta=None, + metasrc=None, + name=None, + node=None, + orientation=None, + selectedpoints=None, + stream=None, + textfont=None, + uid=None, + uirevision=None, + valueformat=None, + valuesuffix=None, + visible=None, + row=None, + col=None, + **kwargs, + ) -> "Figure": + """ + Add a new Sankey trace + + Sankey plots for network flow data analysis. The nodes are + specified in `nodes` and the links between sources and targets + in `links`. The colors are set in `nodes[i].color` and + `links[i].color`, otherwise defaults are used. + + Parameters + ---------- + arrangement + If value is `snap` (the default), the node arrangement + is assisted by automatic snapping of elements to + preserve space between nodes specified via `nodepad`. + If value is `perpendicular`, the nodes can only move + along a line perpendicular to the flow. If value is + `freeform`, the nodes can freely move on the plane. If + value is `fixed`, the nodes are stationary. + customdata + Assigns extra data each datum. This may be useful when + listening to hover, click and selection events. Note + that, "scatter" traces also appends customdata items in + the markers DOM elements + customdatasrc + Sets the source reference on Chart Studio Cloud for + `customdata`. + domain + :class:`plotly.graph_objects.sankey.Domain` instance or + dict with compatible properties + hoverinfo + Determines which trace information appear on hover. If + `none` or `skip` are set, no information is displayed + upon hovering. But, if `none` is set, click and hover + events are still fired. Note that this attribute is + superseded by `node.hoverinfo` and `node.hoverinfo` for + nodes and links respectively. + hoverlabel + :class:`plotly.graph_objects.sankey.Hoverlabel` + instance or dict with compatible properties + ids + Assigns id labels to each datum. These ids for object + constancy of data points during animation. Should be an + array of strings, not numbers or any other type. + idssrc + Sets the source reference on Chart Studio Cloud for + `ids`. + legend + Sets the reference to a legend to show this trace in. + References to these legends are "legend", "legend2", + "legend3", etc. Settings for these legends are set in + the layout, under `layout.legend`, `layout.legend2`, + etc. + legendgrouptitle + :class:`plotly.graph_objects.sankey.Legendgrouptitle` + instance or dict with compatible properties + legendrank + Sets the legend rank for this trace. Items and groups + with smaller ranks are presented on top/left side while + with "reversed" `legend.traceorder` they are on + bottom/right side. The default legendrank is 1000, so + that you can use ranks less than 1000 to place certain + items before all unranked items, and ranks greater than + 1000 to go after all unranked items. When having + unranked or equal rank items shapes would be displayed + after traces i.e. according to their order in data and + layout. + legendwidth + Sets the width (in px or fraction) of the legend for + this trace. + link + The links of the Sankey plot. + meta + Assigns extra meta information associated with this + trace that can be used in various text attributes. + Attributes such as trace `name`, graph, axis and + colorbar `title.text`, annotation `text` + `rangeselector`, `updatemenues` and `sliders` `label` + text all support `meta`. To access the trace `meta` + values in an attribute in the same trace, simply use + `%{meta[i]}` where `i` is the index or key of the + `meta` item in question. To access trace `meta` in + layout attributes, use `%{data[n[.meta[i]}` where `i` + is the index or key of the `meta` and `n` is the trace + index. + metasrc + Sets the source reference on Chart Studio Cloud for + `meta`. + name + Sets the trace name. The trace name appears as the + legend item and on hover. + node + The nodes of the Sankey plot. + orientation + Sets the orientation of the Sankey diagram. + selectedpoints + Array containing integer indices of selected points. + Has an effect only for traces that support selections. + Note that an empty array means an empty selection where + the `unselected` are turned on for all points, whereas, + any other non-array values means no selection all where + the `selected` and `unselected` styles have no effect. + stream + :class:`plotly.graph_objects.sankey.Stream` instance or + dict with compatible properties + textfont + Sets the font for node labels + uid + Assign an id to this trace, Use this to provide object + constancy between traces during animations and + transitions. + uirevision + Controls persistence of some user-driven changes to the + trace: `constraintrange` in `parcoords` traces, as well + as some `editable: true` modifications such as `name` + and `colorbar.title`. Defaults to `layout.uirevision`. + Note that other user-driven trace attribute changes are + controlled by `layout` attributes: `trace.visible` is + controlled by `layout.legend.uirevision`, + `selectedpoints` is controlled by + `layout.selectionrevision`, and `colorbar.(x|y)` + (accessible with `config: {editable: true}`) is + controlled by `layout.editrevision`. Trace changes are + tracked by `uid`, which only falls back on trace index + if no `uid` is provided. So if your app can add/remove + traces before the end of the `data` array, such that + the same trace has a different index, you can still + preserve user-driven changes if you give each trace a + `uid` that stays with it as it moves. + valueformat + Sets the value formatting rule using d3 formatting + mini-languages which are very similar to those in + Python. For numbers, see: + https://github.com/d3/d3-format/tree/v1.4.5#d3-format. + valuesuffix + Adds a unit to follow the value in the hover tooltip. + Add a space if a separation is necessary from the + value. + visible + Determines whether or not this trace is visible. If + "legendonly", the trace is not drawn, but can appear as + a legend item (provided that the legend itself is + visible). + row : 'all', int or None (default) + Subplot row index (starting from 1) for the trace to be + added. Only valid if figure was created using + `plotly.tools.make_subplots`.If 'all', addresses all + rows in the specified column(s). + col : 'all', int or None (default) + Subplot col index (starting from 1) for the trace to be + added. Only valid if figure was created using + `plotly.tools.make_subplots`.If 'all', addresses all + columns in the specified row(s). + + Returns + ------- + Figure + """ + from plotly.graph_objs import Sankey + + new_trace = Sankey( + arrangement=arrangement, + customdata=customdata, + customdatasrc=customdatasrc, + domain=domain, + hoverinfo=hoverinfo, + hoverlabel=hoverlabel, + ids=ids, + idssrc=idssrc, + legend=legend, + legendgrouptitle=legendgrouptitle, + legendrank=legendrank, + legendwidth=legendwidth, + link=link, + meta=meta, + metasrc=metasrc, + name=name, + node=node, + orientation=orientation, + selectedpoints=selectedpoints, + stream=stream, + textfont=textfont, + uid=uid, + uirevision=uirevision, + valueformat=valueformat, + valuesuffix=valuesuffix, + visible=visible, + **kwargs, + ) + return self.add_trace(new_trace, row=row, col=col) + + def add_scatter( + self, + alignmentgroup=None, + cliponaxis=None, + connectgaps=None, + customdata=None, + customdatasrc=None, + dx=None, + dy=None, + error_x=None, + error_y=None, + fill=None, + fillcolor=None, + fillgradient=None, + fillpattern=None, + groupnorm=None, + hoverinfo=None, + hoverinfosrc=None, + hoverlabel=None, + hoveron=None, + hovertemplate=None, + hovertemplatefallback=None, + hovertemplatesrc=None, + hovertext=None, + hovertextsrc=None, + ids=None, + idssrc=None, + legend=None, + legendgroup=None, + legendgrouptitle=None, + legendrank=None, + legendwidth=None, + line=None, + marker=None, + meta=None, + metasrc=None, + mode=None, + name=None, + offsetgroup=None, + opacity=None, + orientation=None, + selected=None, + selectedpoints=None, + showlegend=None, + stackgaps=None, + stackgroup=None, + stream=None, + text=None, + textfont=None, + textposition=None, + textpositionsrc=None, + textsrc=None, + texttemplate=None, + texttemplatefallback=None, + texttemplatesrc=None, + uid=None, + uirevision=None, + unselected=None, + visible=None, + x=None, + x0=None, + xaxis=None, + xcalendar=None, + xhoverformat=None, + xperiod=None, + xperiod0=None, + xperiodalignment=None, + xsrc=None, + y=None, + y0=None, + yaxis=None, + ycalendar=None, + yhoverformat=None, + yperiod=None, + yperiod0=None, + yperiodalignment=None, + ysrc=None, + zorder=None, + row=None, + col=None, + secondary_y=None, + **kwargs, + ) -> "Figure": + """ + Add a new Scatter trace + + The scatter trace type encompasses line charts, scatter charts, + text charts, and bubble charts. The data visualized as scatter + point or lines is set in `x` and `y`. Text (appearing either on + the chart or on hover only) is via `text`. Bubble charts are + achieved by setting `marker.size` and/or `marker.color` to + numerical arrays. + + Parameters + ---------- + alignmentgroup + Set several traces linked to the same position axis or + matching axes to the same alignmentgroup. This controls + whether bars compute their positional range dependently + or independently. + cliponaxis + Determines whether or not markers and text nodes are + clipped about the subplot axes. To show markers and + text nodes above axis lines and tick labels, make sure + to set `xaxis.layer` and `yaxis.layer` to *below + traces*. + connectgaps + Determines whether or not gaps (i.e. {nan} or missing + values) in the provided data arrays are connected. + customdata + Assigns extra data each datum. This may be useful when + listening to hover, click and selection events. Note + that, "scatter" traces also appends customdata items in + the markers DOM elements + customdatasrc + Sets the source reference on Chart Studio Cloud for + `customdata`. + dx + Sets the x coordinate step. See `x0` for more info. + dy + Sets the y coordinate step. See `y0` for more info. + error_x + :class:`plotly.graph_objects.scatter.ErrorX` instance + or dict with compatible properties + error_y + :class:`plotly.graph_objects.scatter.ErrorY` instance + or dict with compatible properties + fill + Sets the area to fill with a solid color. Defaults to + "none" unless this trace is stacked, then it gets + "tonexty" ("tonextx") if `orientation` is "v" ("h") Use + with `fillcolor` if not "none". "tozerox" and "tozeroy" + fill to x=0 and y=0 respectively. "tonextx" and + "tonexty" fill between the endpoints of this trace and + the endpoints of the trace before it, connecting those + endpoints with straight lines (to make a stacked area + graph); if there is no trace before it, they behave + like "tozerox" and "tozeroy". "toself" connects the + endpoints of the trace (or each segment of the trace if + it has gaps) into a closed shape. "tonext" fills the + space between two traces if one completely encloses the + other (eg consecutive contour lines), and behaves like + "toself" if there is no trace before it. "tonext" + should not be used if one trace does not enclose the + other. Traces in a `stackgroup` will only fill to (or + be filled to) other traces in the same group. With + multiple `stackgroup`s or some traces stacked and some + not, if fill-linked traces are not already consecutive, + the later ones will be pushed down in the drawing + order. + fillcolor + Sets the fill color. Defaults to a half-transparent + variant of the line color, marker color, or marker line + color, whichever is available. If fillgradient is + specified, fillcolor is ignored except for setting the + background color of the hover label, if any. + fillgradient + Sets a fill gradient. If not specified, the fillcolor + is used instead. + fillpattern + Sets the pattern within the marker. + groupnorm + Only relevant when `stackgroup` is used, and only the + first `groupnorm` found in the `stackgroup` will be + used - including if `visible` is "legendonly" but not + if it is `false`. Sets the normalization for the sum of + this `stackgroup`. With "fraction", the value of each + trace at each location is divided by the sum of all + trace values at that location. "percent" is the same + but multiplied by 100 to show percentages. If there are + multiple subplots, or multiple `stackgroup`s on one + subplot, each will be normalized within its own set. + hoverinfo + Determines which trace information appear on hover. If + `none` or `skip` are set, no information is displayed + upon hovering. But, if `none` is set, click and hover + events are still fired. + hoverinfosrc + Sets the source reference on Chart Studio Cloud for + `hoverinfo`. + hoverlabel + :class:`plotly.graph_objects.scatter.Hoverlabel` + instance or dict with compatible properties + hoveron + Do the hover effects highlight individual points + (markers or line points) or do they highlight filled + regions? If the fill is "toself" or "tonext" and there + are no markers or text, then the default is "fills", + otherwise it is "points". + hovertemplate + Template string used for rendering the information that + appear on hover box. Note that this will override + `hoverinfo`. Variables are inserted using %{variable}, + for example "y: %{y}" as well as %{xother}, {%_xother}, + {%_xother_}, {%xother_}. When showing info for several + points, "xother" will be added to those with different + x positions from the first point. An underscore before + or after "(x|y)other" will add a space on that side, + only when this field is shown. Numbers are formatted + using d3-format's syntax %{variable:d3-format}, for + example "Price: %{y:$.2f}". + https://github.com/d3/d3-format/tree/v1.4.5#d3-format + for details on the formatting syntax. Dates are + formatted using d3-time-format's syntax + %{variable|d3-time-format}, for example "Day: + %{2019-01-01|%A}". https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format for details on the + date formatting syntax. Variables that can't be found + will be replaced with the specifier. For example, a + template of "data: %{x}, %{y}" will result in a value + of "data: 1, %{y}" if x is 1 and y is missing. + Variables with an undefined value will be replaced with + the fallback value. The variables available in + `hovertemplate` are the ones emitted as event data + described at this link + https://plotly.com/javascript/plotlyjs-events/#event- + data. Additionally, all attributes that can be + specified per-point (the ones that are `arrayOk: true`) + are available. Anything contained in tag `` is + displayed in the secondary box, for example + `%{fullData.name}`. To hide the + secondary box completely, use an empty tag + ``. + hovertemplatefallback + Fallback string that's displayed when a variable + referenced in a template is missing. If the boolean + value 'false' is passed in, the specifier with the + missing variable will be displayed. + hovertemplatesrc + Sets the source reference on Chart Studio Cloud for + `hovertemplate`. + hovertext + Sets hover text elements associated with each (x,y) + pair. If a single string, the same string appears over + all the data points. If an array of string, the items + are mapped in order to the this trace's (x,y) + coordinates. To be seen, trace `hoverinfo` must contain + a "text" flag. + hovertextsrc + Sets the source reference on Chart Studio Cloud for + `hovertext`. + ids + Assigns id labels to each datum. These ids for object + constancy of data points during animation. Should be an + array of strings, not numbers or any other type. + idssrc + Sets the source reference on Chart Studio Cloud for + `ids`. + legend + Sets the reference to a legend to show this trace in. + References to these legends are "legend", "legend2", + "legend3", etc. Settings for these legends are set in + the layout, under `layout.legend`, `layout.legend2`, + etc. + legendgroup + Sets the legend group for this trace. Traces and shapes + part of the same legend group hide/show at the same + time when toggling legend items. + legendgrouptitle + :class:`plotly.graph_objects.scatter.Legendgrouptitle` + instance or dict with compatible properties + legendrank + Sets the legend rank for this trace. Items and groups + with smaller ranks are presented on top/left side while + with "reversed" `legend.traceorder` they are on + bottom/right side. The default legendrank is 1000, so + that you can use ranks less than 1000 to place certain + items before all unranked items, and ranks greater than + 1000 to go after all unranked items. When having + unranked or equal rank items shapes would be displayed + after traces i.e. according to their order in data and + layout. + legendwidth + Sets the width (in px or fraction) of the legend for + this trace. + line + :class:`plotly.graph_objects.scatter.Line` instance or + dict with compatible properties + marker + :class:`plotly.graph_objects.scatter.Marker` instance + or dict with compatible properties + meta + Assigns extra meta information associated with this + trace that can be used in various text attributes. + Attributes such as trace `name`, graph, axis and + colorbar `title.text`, annotation `text` + `rangeselector`, `updatemenues` and `sliders` `label` + text all support `meta`. To access the trace `meta` + values in an attribute in the same trace, simply use + `%{meta[i]}` where `i` is the index or key of the + `meta` item in question. To access trace `meta` in + layout attributes, use `%{data[n[.meta[i]}` where `i` + is the index or key of the `meta` and `n` is the trace + index. + metasrc + Sets the source reference on Chart Studio Cloud for + `meta`. + mode + Determines the drawing mode for this scatter trace. If + the provided `mode` includes "text" then the `text` + elements appear at the coordinates. Otherwise, the + `text` elements appear on hover. If there are less than + 20 points and the trace is not stacked then the default + is "lines+markers". Otherwise, "lines". + name + Sets the trace name. The trace name appears as the + legend item and on hover. + offsetgroup + Set several traces linked to the same position axis or + matching axes to the same offsetgroup where bars of the + same position coordinate will line up. + opacity + Sets the opacity of the trace. + orientation + Only relevant in the following cases: 1. when + `scattermode` is set to "group". 2. when `stackgroup` + is used, and only the first `orientation` found in the + `stackgroup` will be used - including if `visible` is + "legendonly" but not if it is `false`. Sets the + stacking direction. With "v" ("h"), the y (x) values of + subsequent traces are added. Also affects the default + value of `fill`. + selected + :class:`plotly.graph_objects.scatter.Selected` instance + or dict with compatible properties + selectedpoints + Array containing integer indices of selected points. + Has an effect only for traces that support selections. + Note that an empty array means an empty selection where + the `unselected` are turned on for all points, whereas, + any other non-array values means no selection all where + the `selected` and `unselected` styles have no effect. + showlegend + Determines whether or not an item corresponding to this + trace is shown in the legend. + stackgaps + Only relevant when `stackgroup` is used, and only the + first `stackgaps` found in the `stackgroup` will be + used - including if `visible` is "legendonly" but not + if it is `false`. Determines how we handle locations at + which other traces in this group have data but this one + does not. With *infer zero* we insert a zero at these + locations. With "interpolate" we linearly interpolate + between existing values, and extrapolate a constant + beyond the existing values. + stackgroup + Set several scatter traces (on the same subplot) to the + same stackgroup in order to add their y values (or + their x values if `orientation` is "h"). If blank or + omitted this trace will not be stacked. Stacking also + turns `fill` on by default, using "tonexty" ("tonextx") + if `orientation` is "h" ("v") and sets the default + `mode` to "lines" irrespective of point count. You can + only stack on a numeric (linear or log) axis. Traces in + a `stackgroup` will only fill to (or be filled to) + other traces in the same group. With multiple + `stackgroup`s or some traces stacked and some not, if + fill-linked traces are not already consecutive, the + later ones will be pushed down in the drawing order. + stream + :class:`plotly.graph_objects.scatter.Stream` instance + or dict with compatible properties + text + Sets text elements associated with each (x,y) pair. If + a single string, the same string appears over all the + data points. If an array of string, the items are + mapped in order to the this trace's (x,y) coordinates. + If trace `hoverinfo` contains a "text" flag and + "hovertext" is not set, these elements will be seen in + the hover labels. + textfont + Sets the text font. + textposition + Sets the positions of the `text` elements with respects + to the (x,y) coordinates. + textpositionsrc + Sets the source reference on Chart Studio Cloud for + `textposition`. + textsrc + Sets the source reference on Chart Studio Cloud for + `text`. + texttemplate + Template string used for rendering the information text + that appears on points. Note that this will override + `textinfo`. Variables are inserted using %{variable}, + for example "y: %{y}". Numbers are formatted using + d3-format's syntax %{variable:d3-format}, for example + "Price: %{y:$.2f}". + https://github.com/d3/d3-format/tree/v1.4.5#d3-format + for details on the formatting syntax. Dates are + formatted using d3-time-format's syntax + %{variable|d3-time-format}, for example "Day: + %{2019-01-01|%A}". https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format for details on the + date formatting syntax. Variables that can't be found + will be replaced with the specifier. For example, a + template of "data: %{x}, %{y}" will result in a value + of "data: 1, %{y}" if x is 1 and y is missing. + Variables with an undefined value will be replaced with + the fallback value. All attributes that can be + specified per-point (the ones that are `arrayOk: true`) + are available. + texttemplatefallback + Fallback string that's displayed when a variable + referenced in a template is missing. If the boolean + value 'false' is passed in, the specifier with the + missing variable will be displayed. + texttemplatesrc + Sets the source reference on Chart Studio Cloud for + `texttemplate`. + uid + Assign an id to this trace, Use this to provide object + constancy between traces during animations and + transitions. + uirevision + Controls persistence of some user-driven changes to the + trace: `constraintrange` in `parcoords` traces, as well + as some `editable: true` modifications such as `name` + and `colorbar.title`. Defaults to `layout.uirevision`. + Note that other user-driven trace attribute changes are + controlled by `layout` attributes: `trace.visible` is + controlled by `layout.legend.uirevision`, + `selectedpoints` is controlled by + `layout.selectionrevision`, and `colorbar.(x|y)` + (accessible with `config: {editable: true}`) is + controlled by `layout.editrevision`. Trace changes are + tracked by `uid`, which only falls back on trace index + if no `uid` is provided. So if your app can add/remove + traces before the end of the `data` array, such that + the same trace has a different index, you can still + preserve user-driven changes if you give each trace a + `uid` that stays with it as it moves. + unselected + :class:`plotly.graph_objects.scatter.Unselected` + instance or dict with compatible properties + visible + Determines whether or not this trace is visible. If + "legendonly", the trace is not drawn, but can appear as + a legend item (provided that the legend itself is + visible). + x + Sets the x coordinates. + x0 + Alternate to `x`. Builds a linear space of x + coordinates. Use with `dx` where `x0` is the starting + coordinate and `dx` the step. + xaxis + Sets a reference between this trace's x coordinates and + a 2D cartesian x axis. If "x" (the default value), the + x coordinates refer to `layout.xaxis`. If "x2", the x + coordinates refer to `layout.xaxis2`, and so on. + xcalendar + Sets the calendar system to use with `x` date data. + xhoverformat + Sets the hover text formatting rulefor `x` using d3 + formatting mini-languages which are very similar to + those in Python. For numbers, see: + https://github.com/d3/d3-format/tree/v1.4.5#d3-format. + And for dates see: https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format. We add two items to + d3's date formatter: "%h" for half of the year as a + decimal number as well as "%{n}f" for fractional + seconds with n digits. For example, *2016-10-13 + 09:15:23.456* with tickformat "%H~%M~%S.%2f" would + display *09~15~23.46*By default the values are + formatted using `xaxis.hoverformat`. + xperiod + Only relevant when the axis `type` is "date". Sets the + period positioning in milliseconds or "M" on the x + axis. Special values in the form of "M" could be + used to declare the number of months. In this case `n` + must be a positive integer. + xperiod0 + Only relevant when the axis `type` is "date". Sets the + base for period positioning in milliseconds or date + string on the x0 axis. When `x0period` is round number + of weeks, the `x0period0` by default would be on a + Sunday i.e. 2000-01-02, otherwise it would be at + 2000-01-01. + xperiodalignment + Only relevant when the axis `type` is "date". Sets the + alignment of data points on the x axis. + xsrc + Sets the source reference on Chart Studio Cloud for + `x`. + y + Sets the y coordinates. + y0 + Alternate to `y`. Builds a linear space of y + coordinates. Use with `dy` where `y0` is the starting + coordinate and `dy` the step. + yaxis + Sets a reference between this trace's y coordinates and + a 2D cartesian y axis. If "y" (the default value), the + y coordinates refer to `layout.yaxis`. If "y2", the y + coordinates refer to `layout.yaxis2`, and so on. + ycalendar + Sets the calendar system to use with `y` date data. + yhoverformat + Sets the hover text formatting rulefor `y` using d3 + formatting mini-languages which are very similar to + those in Python. For numbers, see: + https://github.com/d3/d3-format/tree/v1.4.5#d3-format. + And for dates see: https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format. We add two items to + d3's date formatter: "%h" for half of the year as a + decimal number as well as "%{n}f" for fractional + seconds with n digits. For example, *2016-10-13 + 09:15:23.456* with tickformat "%H~%M~%S.%2f" would + display *09~15~23.46*By default the values are + formatted using `yaxis.hoverformat`. + yperiod + Only relevant when the axis `type` is "date". Sets the + period positioning in milliseconds or "M" on the y + axis. Special values in the form of "M" could be + used to declare the number of months. In this case `n` + must be a positive integer. + yperiod0 + Only relevant when the axis `type` is "date". Sets the + base for period positioning in milliseconds or date + string on the y0 axis. When `y0period` is round number + of weeks, the `y0period0` by default would be on a + Sunday i.e. 2000-01-02, otherwise it would be at + 2000-01-01. + yperiodalignment + Only relevant when the axis `type` is "date". Sets the + alignment of data points on the y axis. + ysrc + Sets the source reference on Chart Studio Cloud for + `y`. + zorder + Sets the layer on which this trace is displayed, + relative to other SVG traces on the same subplot. SVG + traces with higher `zorder` appear in front of those + with lower `zorder`. + row : 'all', int or None (default) + Subplot row index (starting from 1) for the trace to be + added. Only valid if figure was created using + `plotly.tools.make_subplots`.If 'all', addresses all + rows in the specified column(s). + col : 'all', int or None (default) + Subplot col index (starting from 1) for the trace to be + added. Only valid if figure was created using + `plotly.tools.make_subplots`.If 'all', addresses all + columns in the specified row(s). + secondary_y: boolean or None (default None) + If True, associate this trace with the secondary y-axis of the + subplot at the specified row and col. Only valid if all of the + following conditions are satisfied: + * The figure was created using `plotly.subplots.make_subplots`. + * The row and col arguments are not None + * The subplot at the specified row and col has type xy + (which is the default) and secondary_y True. These + properties are specified in the specs argument to + make_subplots. See the make_subplots docstring for more info. + + Returns + ------- + Figure + """ + from plotly.graph_objs import Scatter + + new_trace = Scatter( + alignmentgroup=alignmentgroup, + cliponaxis=cliponaxis, + connectgaps=connectgaps, + customdata=customdata, + customdatasrc=customdatasrc, + dx=dx, + dy=dy, + error_x=error_x, + error_y=error_y, + fill=fill, + fillcolor=fillcolor, + fillgradient=fillgradient, + fillpattern=fillpattern, + groupnorm=groupnorm, + hoverinfo=hoverinfo, + hoverinfosrc=hoverinfosrc, + hoverlabel=hoverlabel, + hoveron=hoveron, + hovertemplate=hovertemplate, + hovertemplatefallback=hovertemplatefallback, + hovertemplatesrc=hovertemplatesrc, + hovertext=hovertext, + hovertextsrc=hovertextsrc, + ids=ids, + idssrc=idssrc, + legend=legend, + legendgroup=legendgroup, + legendgrouptitle=legendgrouptitle, + legendrank=legendrank, + legendwidth=legendwidth, + line=line, + marker=marker, + meta=meta, + metasrc=metasrc, + mode=mode, + name=name, + offsetgroup=offsetgroup, + opacity=opacity, + orientation=orientation, + selected=selected, + selectedpoints=selectedpoints, + showlegend=showlegend, + stackgaps=stackgaps, + stackgroup=stackgroup, + stream=stream, + text=text, + textfont=textfont, + textposition=textposition, + textpositionsrc=textpositionsrc, + textsrc=textsrc, + texttemplate=texttemplate, + texttemplatefallback=texttemplatefallback, + texttemplatesrc=texttemplatesrc, + uid=uid, + uirevision=uirevision, + unselected=unselected, + visible=visible, + x=x, + x0=x0, + xaxis=xaxis, + xcalendar=xcalendar, + xhoverformat=xhoverformat, + xperiod=xperiod, + xperiod0=xperiod0, + xperiodalignment=xperiodalignment, + xsrc=xsrc, + y=y, + y0=y0, + yaxis=yaxis, + ycalendar=ycalendar, + yhoverformat=yhoverformat, + yperiod=yperiod, + yperiod0=yperiod0, + yperiodalignment=yperiodalignment, + ysrc=ysrc, + zorder=zorder, + **kwargs, + ) + return self.add_trace(new_trace, row=row, col=col, secondary_y=secondary_y) + + def add_scatter3d( + self, + connectgaps=None, + customdata=None, + customdatasrc=None, + error_x=None, + error_y=None, + error_z=None, + hoverinfo=None, + hoverinfosrc=None, + hoverlabel=None, + hovertemplate=None, + hovertemplatefallback=None, + hovertemplatesrc=None, + hovertext=None, + hovertextsrc=None, + ids=None, + idssrc=None, + legend=None, + legendgroup=None, + legendgrouptitle=None, + legendrank=None, + legendwidth=None, + line=None, + marker=None, + meta=None, + metasrc=None, + mode=None, + name=None, + opacity=None, + projection=None, + scene=None, + showlegend=None, + stream=None, + surfaceaxis=None, + surfacecolor=None, + text=None, + textfont=None, + textposition=None, + textpositionsrc=None, + textsrc=None, + texttemplate=None, + texttemplatefallback=None, + texttemplatesrc=None, + uid=None, + uirevision=None, + visible=None, + x=None, + xcalendar=None, + xhoverformat=None, + xsrc=None, + y=None, + ycalendar=None, + yhoverformat=None, + ysrc=None, + z=None, + zcalendar=None, + zhoverformat=None, + zsrc=None, + row=None, + col=None, + **kwargs, + ) -> "Figure": + """ + Add a new Scatter3d trace + + The data visualized as scatter point or lines in 3D dimension + is set in `x`, `y`, `z`. Text (appearing either on the chart or + on hover only) is via `text`. Bubble charts are achieved by + setting `marker.size` and/or `marker.color` Projections are + achieved via `projection`. Surface fills are achieved via + `surfaceaxis`. + + Parameters + ---------- + connectgaps + Determines whether or not gaps (i.e. {nan} or missing + values) in the provided data arrays are connected. + customdata + Assigns extra data each datum. This may be useful when + listening to hover, click and selection events. Note + that, "scatter" traces also appends customdata items in + the markers DOM elements + customdatasrc + Sets the source reference on Chart Studio Cloud for + `customdata`. + error_x + :class:`plotly.graph_objects.scatter3d.ErrorX` instance + or dict with compatible properties + error_y + :class:`plotly.graph_objects.scatter3d.ErrorY` instance + or dict with compatible properties + error_z + :class:`plotly.graph_objects.scatter3d.ErrorZ` instance + or dict with compatible properties + hoverinfo + Determines which trace information appear on hover. If + `none` or `skip` are set, no information is displayed + upon hovering. But, if `none` is set, click and hover + events are still fired. + hoverinfosrc + Sets the source reference on Chart Studio Cloud for + `hoverinfo`. + hoverlabel + :class:`plotly.graph_objects.scatter3d.Hoverlabel` + instance or dict with compatible properties + hovertemplate + Template string used for rendering the information that + appear on hover box. Note that this will override + `hoverinfo`. Variables are inserted using %{variable}, + for example "y: %{y}" as well as %{xother}, {%_xother}, + {%_xother_}, {%xother_}. When showing info for several + points, "xother" will be added to those with different + x positions from the first point. An underscore before + or after "(x|y)other" will add a space on that side, + only when this field is shown. Numbers are formatted + using d3-format's syntax %{variable:d3-format}, for + example "Price: %{y:$.2f}". + https://github.com/d3/d3-format/tree/v1.4.5#d3-format + for details on the formatting syntax. Dates are + formatted using d3-time-format's syntax + %{variable|d3-time-format}, for example "Day: + %{2019-01-01|%A}". https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format for details on the + date formatting syntax. Variables that can't be found + will be replaced with the specifier. For example, a + template of "data: %{x}, %{y}" will result in a value + of "data: 1, %{y}" if x is 1 and y is missing. + Variables with an undefined value will be replaced with + the fallback value. The variables available in + `hovertemplate` are the ones emitted as event data + described at this link + https://plotly.com/javascript/plotlyjs-events/#event- + data. Additionally, all attributes that can be + specified per-point (the ones that are `arrayOk: true`) + are available. Anything contained in tag `` is + displayed in the secondary box, for example + `%{fullData.name}`. To hide the + secondary box completely, use an empty tag + ``. + hovertemplatefallback + Fallback string that's displayed when a variable + referenced in a template is missing. If the boolean + value 'false' is passed in, the specifier with the + missing variable will be displayed. + hovertemplatesrc + Sets the source reference on Chart Studio Cloud for + `hovertemplate`. + hovertext + Sets text elements associated with each (x,y,z) + triplet. If a single string, the same string appears + over all the data points. If an array of string, the + items are mapped in order to the this trace's (x,y,z) + coordinates. To be seen, trace `hoverinfo` must contain + a "text" flag. + hovertextsrc + Sets the source reference on Chart Studio Cloud for + `hovertext`. + ids + Assigns id labels to each datum. These ids for object + constancy of data points during animation. Should be an + array of strings, not numbers or any other type. + idssrc + Sets the source reference on Chart Studio Cloud for + `ids`. + legend + Sets the reference to a legend to show this trace in. + References to these legends are "legend", "legend2", + "legend3", etc. Settings for these legends are set in + the layout, under `layout.legend`, `layout.legend2`, + etc. + legendgroup + Sets the legend group for this trace. Traces and shapes + part of the same legend group hide/show at the same + time when toggling legend items. + legendgrouptitle + :class:`plotly.graph_objects.scatter3d.Legendgrouptitle + ` instance or dict with compatible properties + legendrank + Sets the legend rank for this trace. Items and groups + with smaller ranks are presented on top/left side while + with "reversed" `legend.traceorder` they are on + bottom/right side. The default legendrank is 1000, so + that you can use ranks less than 1000 to place certain + items before all unranked items, and ranks greater than + 1000 to go after all unranked items. When having + unranked or equal rank items shapes would be displayed + after traces i.e. according to their order in data and + layout. + legendwidth + Sets the width (in px or fraction) of the legend for + this trace. + line + :class:`plotly.graph_objects.scatter3d.Line` instance + or dict with compatible properties + marker + :class:`plotly.graph_objects.scatter3d.Marker` instance + or dict with compatible properties + meta + Assigns extra meta information associated with this + trace that can be used in various text attributes. + Attributes such as trace `name`, graph, axis and + colorbar `title.text`, annotation `text` + `rangeselector`, `updatemenues` and `sliders` `label` + text all support `meta`. To access the trace `meta` + values in an attribute in the same trace, simply use + `%{meta[i]}` where `i` is the index or key of the + `meta` item in question. To access trace `meta` in + layout attributes, use `%{data[n[.meta[i]}` where `i` + is the index or key of the `meta` and `n` is the trace + index. + metasrc + Sets the source reference on Chart Studio Cloud for + `meta`. + mode + Determines the drawing mode for this scatter trace. If + the provided `mode` includes "text" then the `text` + elements appear at the coordinates. Otherwise, the + `text` elements appear on hover. If there are less than + 20 points and the trace is not stacked then the default + is "lines+markers". Otherwise, "lines". + name + Sets the trace name. The trace name appears as the + legend item and on hover. + opacity + Sets the opacity of the trace. + projection + :class:`plotly.graph_objects.scatter3d.Projection` + instance or dict with compatible properties + scene + Sets a reference between this trace's 3D coordinate + system and a 3D scene. If "scene" (the default value), + the (x,y,z) coordinates refer to `layout.scene`. If + "scene2", the (x,y,z) coordinates refer to + `layout.scene2`, and so on. + showlegend + Determines whether or not an item corresponding to this + trace is shown in the legend. + stream + :class:`plotly.graph_objects.scatter3d.Stream` instance + or dict with compatible properties + surfaceaxis + If "-1", the scatter points are not fill with a surface + If 0, 1, 2, the scatter points are filled with a + Delaunay surface about the x, y, z respectively. + surfacecolor + Sets the surface fill color. + text + Sets text elements associated with each (x,y,z) + triplet. If a single string, the same string appears + over all the data points. If an array of string, the + items are mapped in order to the this trace's (x,y,z) + coordinates. If trace `hoverinfo` contains a "text" + flag and "hovertext" is not set, these elements will be + seen in the hover labels. + textfont + Sets the text font. + textposition + Sets the positions of the `text` elements with respects + to the (x,y) coordinates. + textpositionsrc + Sets the source reference on Chart Studio Cloud for + `textposition`. + textsrc + Sets the source reference on Chart Studio Cloud for + `text`. + texttemplate + Template string used for rendering the information text + that appears on points. Note that this will override + `textinfo`. Variables are inserted using %{variable}, + for example "y: %{y}". Numbers are formatted using + d3-format's syntax %{variable:d3-format}, for example + "Price: %{y:$.2f}". + https://github.com/d3/d3-format/tree/v1.4.5#d3-format + for details on the formatting syntax. Dates are + formatted using d3-time-format's syntax + %{variable|d3-time-format}, for example "Day: + %{2019-01-01|%A}". https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format for details on the + date formatting syntax. Variables that can't be found + will be replaced with the specifier. For example, a + template of "data: %{x}, %{y}" will result in a value + of "data: 1, %{y}" if x is 1 and y is missing. + Variables with an undefined value will be replaced with + the fallback value. All attributes that can be + specified per-point (the ones that are `arrayOk: true`) + are available. + texttemplatefallback + Fallback string that's displayed when a variable + referenced in a template is missing. If the boolean + value 'false' is passed in, the specifier with the + missing variable will be displayed. + texttemplatesrc + Sets the source reference on Chart Studio Cloud for + `texttemplate`. + uid + Assign an id to this trace, Use this to provide object + constancy between traces during animations and + transitions. + uirevision + Controls persistence of some user-driven changes to the + trace: `constraintrange` in `parcoords` traces, as well + as some `editable: true` modifications such as `name` + and `colorbar.title`. Defaults to `layout.uirevision`. + Note that other user-driven trace attribute changes are + controlled by `layout` attributes: `trace.visible` is + controlled by `layout.legend.uirevision`, + `selectedpoints` is controlled by + `layout.selectionrevision`, and `colorbar.(x|y)` + (accessible with `config: {editable: true}`) is + controlled by `layout.editrevision`. Trace changes are + tracked by `uid`, which only falls back on trace index + if no `uid` is provided. So if your app can add/remove + traces before the end of the `data` array, such that + the same trace has a different index, you can still + preserve user-driven changes if you give each trace a + `uid` that stays with it as it moves. + visible + Determines whether or not this trace is visible. If + "legendonly", the trace is not drawn, but can appear as + a legend item (provided that the legend itself is + visible). + x + Sets the x coordinates. + xcalendar + Sets the calendar system to use with `x` date data. + xhoverformat + Sets the hover text formatting rulefor `x` using d3 + formatting mini-languages which are very similar to + those in Python. For numbers, see: + https://github.com/d3/d3-format/tree/v1.4.5#d3-format. + And for dates see: https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format. We add two items to + d3's date formatter: "%h" for half of the year as a + decimal number as well as "%{n}f" for fractional + seconds with n digits. For example, *2016-10-13 + 09:15:23.456* with tickformat "%H~%M~%S.%2f" would + display *09~15~23.46*By default the values are + formatted using `xaxis.hoverformat`. + xsrc + Sets the source reference on Chart Studio Cloud for + `x`. + y + Sets the y coordinates. + ycalendar + Sets the calendar system to use with `y` date data. + yhoverformat + Sets the hover text formatting rulefor `y` using d3 + formatting mini-languages which are very similar to + those in Python. For numbers, see: + https://github.com/d3/d3-format/tree/v1.4.5#d3-format. + And for dates see: https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format. We add two items to + d3's date formatter: "%h" for half of the year as a + decimal number as well as "%{n}f" for fractional + seconds with n digits. For example, *2016-10-13 + 09:15:23.456* with tickformat "%H~%M~%S.%2f" would + display *09~15~23.46*By default the values are + formatted using `yaxis.hoverformat`. + ysrc + Sets the source reference on Chart Studio Cloud for + `y`. + z + Sets the z coordinates. + zcalendar + Sets the calendar system to use with `z` date data. + zhoverformat + Sets the hover text formatting rulefor `z` using d3 + formatting mini-languages which are very similar to + those in Python. For numbers, see: + https://github.com/d3/d3-format/tree/v1.4.5#d3-format. + And for dates see: https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format. We add two items to + d3's date formatter: "%h" for half of the year as a + decimal number as well as "%{n}f" for fractional + seconds with n digits. For example, *2016-10-13 + 09:15:23.456* with tickformat "%H~%M~%S.%2f" would + display *09~15~23.46*By default the values are + formatted using `zaxis.hoverformat`. + zsrc + Sets the source reference on Chart Studio Cloud for + `z`. + row : 'all', int or None (default) + Subplot row index (starting from 1) for the trace to be + added. Only valid if figure was created using + `plotly.tools.make_subplots`.If 'all', addresses all + rows in the specified column(s). + col : 'all', int or None (default) + Subplot col index (starting from 1) for the trace to be + added. Only valid if figure was created using + `plotly.tools.make_subplots`.If 'all', addresses all + columns in the specified row(s). + + Returns + ------- + Figure + """ + from plotly.graph_objs import Scatter3d + + new_trace = Scatter3d( + connectgaps=connectgaps, + customdata=customdata, + customdatasrc=customdatasrc, + error_x=error_x, + error_y=error_y, + error_z=error_z, + hoverinfo=hoverinfo, + hoverinfosrc=hoverinfosrc, + hoverlabel=hoverlabel, + hovertemplate=hovertemplate, + hovertemplatefallback=hovertemplatefallback, + hovertemplatesrc=hovertemplatesrc, + hovertext=hovertext, + hovertextsrc=hovertextsrc, + ids=ids, + idssrc=idssrc, + legend=legend, + legendgroup=legendgroup, + legendgrouptitle=legendgrouptitle, + legendrank=legendrank, + legendwidth=legendwidth, + line=line, + marker=marker, + meta=meta, + metasrc=metasrc, + mode=mode, + name=name, + opacity=opacity, + projection=projection, + scene=scene, + showlegend=showlegend, + stream=stream, + surfaceaxis=surfaceaxis, + surfacecolor=surfacecolor, + text=text, + textfont=textfont, + textposition=textposition, + textpositionsrc=textpositionsrc, + textsrc=textsrc, + texttemplate=texttemplate, + texttemplatefallback=texttemplatefallback, + texttemplatesrc=texttemplatesrc, + uid=uid, + uirevision=uirevision, + visible=visible, + x=x, + xcalendar=xcalendar, + xhoverformat=xhoverformat, + xsrc=xsrc, + y=y, + ycalendar=ycalendar, + yhoverformat=yhoverformat, + ysrc=ysrc, + z=z, + zcalendar=zcalendar, + zhoverformat=zhoverformat, + zsrc=zsrc, + **kwargs, + ) + return self.add_trace(new_trace, row=row, col=col) + + def add_scattercarpet( + self, + a=None, + asrc=None, + b=None, + bsrc=None, + carpet=None, + connectgaps=None, + customdata=None, + customdatasrc=None, + fill=None, + fillcolor=None, + hoverinfo=None, + hoverinfosrc=None, + hoverlabel=None, + hoveron=None, + hovertemplate=None, + hovertemplatefallback=None, + hovertemplatesrc=None, + hovertext=None, + hovertextsrc=None, + ids=None, + idssrc=None, + legend=None, + legendgroup=None, + legendgrouptitle=None, + legendrank=None, + legendwidth=None, + line=None, + marker=None, + meta=None, + metasrc=None, + mode=None, + name=None, + opacity=None, + selected=None, + selectedpoints=None, + showlegend=None, + stream=None, + text=None, + textfont=None, + textposition=None, + textpositionsrc=None, + textsrc=None, + texttemplate=None, + texttemplatefallback=None, + texttemplatesrc=None, + uid=None, + uirevision=None, + unselected=None, + visible=None, + xaxis=None, + yaxis=None, + zorder=None, + row=None, + col=None, + secondary_y=None, + **kwargs, + ) -> "Figure": + """ + Add a new Scattercarpet trace + + Plots a scatter trace on either the first carpet axis or the + carpet axis with a matching `carpet` attribute. + + Parameters + ---------- + a + Sets the a-axis coordinates. + asrc + Sets the source reference on Chart Studio Cloud for + `a`. + b + Sets the b-axis coordinates. + bsrc + Sets the source reference on Chart Studio Cloud for + `b`. + carpet + An identifier for this carpet, so that `scattercarpet` + and `contourcarpet` traces can specify a carpet plot on + which they lie + connectgaps + Determines whether or not gaps (i.e. {nan} or missing + values) in the provided data arrays are connected. + customdata + Assigns extra data each datum. This may be useful when + listening to hover, click and selection events. Note + that, "scatter" traces also appends customdata items in + the markers DOM elements + customdatasrc + Sets the source reference on Chart Studio Cloud for + `customdata`. + fill + Sets the area to fill with a solid color. Use with + `fillcolor` if not "none". scatterternary has a subset + of the options available to scatter. "toself" connects + the endpoints of the trace (or each segment of the + trace if it has gaps) into a closed shape. "tonext" + fills the space between two traces if one completely + encloses the other (eg consecutive contour lines), and + behaves like "toself" if there is no trace before it. + "tonext" should not be used if one trace does not + enclose the other. + fillcolor + Sets the fill color. Defaults to a half-transparent + variant of the line color, marker color, or marker line + color, whichever is available. + hoverinfo + Determines which trace information appear on hover. If + `none` or `skip` are set, no information is displayed + upon hovering. But, if `none` is set, click and hover + events are still fired. + hoverinfosrc + Sets the source reference on Chart Studio Cloud for + `hoverinfo`. + hoverlabel + :class:`plotly.graph_objects.scattercarpet.Hoverlabel` + instance or dict with compatible properties + hoveron + Do the hover effects highlight individual points + (markers or line points) or do they highlight filled + regions? If the fill is "toself" or "tonext" and there + are no markers or text, then the default is "fills", + otherwise it is "points". + hovertemplate + Template string used for rendering the information that + appear on hover box. Note that this will override + `hoverinfo`. Variables are inserted using %{variable}, + for example "y: %{y}" as well as %{xother}, {%_xother}, + {%_xother_}, {%xother_}. When showing info for several + points, "xother" will be added to those with different + x positions from the first point. An underscore before + or after "(x|y)other" will add a space on that side, + only when this field is shown. Numbers are formatted + using d3-format's syntax %{variable:d3-format}, for + example "Price: %{y:$.2f}". + https://github.com/d3/d3-format/tree/v1.4.5#d3-format + for details on the formatting syntax. Dates are + formatted using d3-time-format's syntax + %{variable|d3-time-format}, for example "Day: + %{2019-01-01|%A}". https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format for details on the + date formatting syntax. Variables that can't be found + will be replaced with the specifier. For example, a + template of "data: %{x}, %{y}" will result in a value + of "data: 1, %{y}" if x is 1 and y is missing. + Variables with an undefined value will be replaced with + the fallback value. The variables available in + `hovertemplate` are the ones emitted as event data + described at this link + https://plotly.com/javascript/plotlyjs-events/#event- + data. Additionally, all attributes that can be + specified per-point (the ones that are `arrayOk: true`) + are available. Anything contained in tag `` is + displayed in the secondary box, for example + `%{fullData.name}`. To hide the + secondary box completely, use an empty tag + ``. + hovertemplatefallback + Fallback string that's displayed when a variable + referenced in a template is missing. If the boolean + value 'false' is passed in, the specifier with the + missing variable will be displayed. + hovertemplatesrc + Sets the source reference on Chart Studio Cloud for + `hovertemplate`. + hovertext + Sets hover text elements associated with each (a,b) + point. If a single string, the same string appears over + all the data points. If an array of strings, the items + are mapped in order to the the data points in (a,b). To + be seen, trace `hoverinfo` must contain a "text" flag. + hovertextsrc + Sets the source reference on Chart Studio Cloud for + `hovertext`. + ids + Assigns id labels to each datum. These ids for object + constancy of data points during animation. Should be an + array of strings, not numbers or any other type. + idssrc + Sets the source reference on Chart Studio Cloud for + `ids`. + legend + Sets the reference to a legend to show this trace in. + References to these legends are "legend", "legend2", + "legend3", etc. Settings for these legends are set in + the layout, under `layout.legend`, `layout.legend2`, + etc. + legendgroup + Sets the legend group for this trace. Traces and shapes + part of the same legend group hide/show at the same + time when toggling legend items. + legendgrouptitle + :class:`plotly.graph_objects.scattercarpet.Legendgroupt + itle` instance or dict with compatible properties + legendrank + Sets the legend rank for this trace. Items and groups + with smaller ranks are presented on top/left side while + with "reversed" `legend.traceorder` they are on + bottom/right side. The default legendrank is 1000, so + that you can use ranks less than 1000 to place certain + items before all unranked items, and ranks greater than + 1000 to go after all unranked items. When having + unranked or equal rank items shapes would be displayed + after traces i.e. according to their order in data and + layout. + legendwidth + Sets the width (in px or fraction) of the legend for + this trace. + line + :class:`plotly.graph_objects.scattercarpet.Line` + instance or dict with compatible properties + marker + :class:`plotly.graph_objects.scattercarpet.Marker` + instance or dict with compatible properties + meta + Assigns extra meta information associated with this + trace that can be used in various text attributes. + Attributes such as trace `name`, graph, axis and + colorbar `title.text`, annotation `text` + `rangeselector`, `updatemenues` and `sliders` `label` + text all support `meta`. To access the trace `meta` + values in an attribute in the same trace, simply use + `%{meta[i]}` where `i` is the index or key of the + `meta` item in question. To access trace `meta` in + layout attributes, use `%{data[n[.meta[i]}` where `i` + is the index or key of the `meta` and `n` is the trace + index. + metasrc + Sets the source reference on Chart Studio Cloud for + `meta`. + mode + Determines the drawing mode for this scatter trace. If + the provided `mode` includes "text" then the `text` + elements appear at the coordinates. Otherwise, the + `text` elements appear on hover. If there are less than + 20 points and the trace is not stacked then the default + is "lines+markers". Otherwise, "lines". + name + Sets the trace name. The trace name appears as the + legend item and on hover. + opacity + Sets the opacity of the trace. + selected + :class:`plotly.graph_objects.scattercarpet.Selected` + instance or dict with compatible properties + selectedpoints + Array containing integer indices of selected points. + Has an effect only for traces that support selections. + Note that an empty array means an empty selection where + the `unselected` are turned on for all points, whereas, + any other non-array values means no selection all where + the `selected` and `unselected` styles have no effect. + showlegend + Determines whether or not an item corresponding to this + trace is shown in the legend. + stream + :class:`plotly.graph_objects.scattercarpet.Stream` + instance or dict with compatible properties + text + Sets text elements associated with each (a,b) point. If + a single string, the same string appears over all the + data points. If an array of strings, the items are + mapped in order to the the data points in (a,b). If + trace `hoverinfo` contains a "text" flag and + "hovertext" is not set, these elements will be seen in + the hover labels. + textfont + Sets the text font. + textposition + Sets the positions of the `text` elements with respects + to the (x,y) coordinates. + textpositionsrc + Sets the source reference on Chart Studio Cloud for + `textposition`. + textsrc + Sets the source reference on Chart Studio Cloud for + `text`. + texttemplate + Template string used for rendering the information text + that appears on points. Note that this will override + `textinfo`. Variables are inserted using %{variable}, + for example "y: %{y}". Numbers are formatted using + d3-format's syntax %{variable:d3-format}, for example + "Price: %{y:$.2f}". + https://github.com/d3/d3-format/tree/v1.4.5#d3-format + for details on the formatting syntax. Dates are + formatted using d3-time-format's syntax + %{variable|d3-time-format}, for example "Day: + %{2019-01-01|%A}". https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format for details on the + date formatting syntax. Variables that can't be found + will be replaced with the specifier. For example, a + template of "data: %{x}, %{y}" will result in a value + of "data: 1, %{y}" if x is 1 and y is missing. + Variables with an undefined value will be replaced with + the fallback value. All attributes that can be + specified per-point (the ones that are `arrayOk: true`) + are available. Finally, the template string has access + to variables `a`, `b` and `text`. + texttemplatefallback + Fallback string that's displayed when a variable + referenced in a template is missing. If the boolean + value 'false' is passed in, the specifier with the + missing variable will be displayed. + texttemplatesrc + Sets the source reference on Chart Studio Cloud for + `texttemplate`. + uid + Assign an id to this trace, Use this to provide object + constancy between traces during animations and + transitions. + uirevision + Controls persistence of some user-driven changes to the + trace: `constraintrange` in `parcoords` traces, as well + as some `editable: true` modifications such as `name` + and `colorbar.title`. Defaults to `layout.uirevision`. + Note that other user-driven trace attribute changes are + controlled by `layout` attributes: `trace.visible` is + controlled by `layout.legend.uirevision`, + `selectedpoints` is controlled by + `layout.selectionrevision`, and `colorbar.(x|y)` + (accessible with `config: {editable: true}`) is + controlled by `layout.editrevision`. Trace changes are + tracked by `uid`, which only falls back on trace index + if no `uid` is provided. So if your app can add/remove + traces before the end of the `data` array, such that + the same trace has a different index, you can still + preserve user-driven changes if you give each trace a + `uid` that stays with it as it moves. + unselected + :class:`plotly.graph_objects.scattercarpet.Unselected` + instance or dict with compatible properties + visible + Determines whether or not this trace is visible. If + "legendonly", the trace is not drawn, but can appear as + a legend item (provided that the legend itself is + visible). + xaxis + Sets a reference between this trace's x coordinates and + a 2D cartesian x axis. If "x" (the default value), the + x coordinates refer to `layout.xaxis`. If "x2", the x + coordinates refer to `layout.xaxis2`, and so on. + yaxis + Sets a reference between this trace's y coordinates and + a 2D cartesian y axis. If "y" (the default value), the + y coordinates refer to `layout.yaxis`. If "y2", the y + coordinates refer to `layout.yaxis2`, and so on. + zorder + Sets the layer on which this trace is displayed, + relative to other SVG traces on the same subplot. SVG + traces with higher `zorder` appear in front of those + with lower `zorder`. + row : 'all', int or None (default) + Subplot row index (starting from 1) for the trace to be + added. Only valid if figure was created using + `plotly.tools.make_subplots`.If 'all', addresses all + rows in the specified column(s). + col : 'all', int or None (default) + Subplot col index (starting from 1) for the trace to be + added. Only valid if figure was created using + `plotly.tools.make_subplots`.If 'all', addresses all + columns in the specified row(s). + secondary_y: boolean or None (default None) + If True, associate this trace with the secondary y-axis of the + subplot at the specified row and col. Only valid if all of the + following conditions are satisfied: + * The figure was created using `plotly.subplots.make_subplots`. + * The row and col arguments are not None + * The subplot at the specified row and col has type xy + (which is the default) and secondary_y True. These + properties are specified in the specs argument to + make_subplots. See the make_subplots docstring for more info. + + Returns + ------- + Figure + """ + from plotly.graph_objs import Scattercarpet + + new_trace = Scattercarpet( + a=a, + asrc=asrc, + b=b, + bsrc=bsrc, + carpet=carpet, + connectgaps=connectgaps, + customdata=customdata, + customdatasrc=customdatasrc, + fill=fill, + fillcolor=fillcolor, + hoverinfo=hoverinfo, + hoverinfosrc=hoverinfosrc, + hoverlabel=hoverlabel, + hoveron=hoveron, + hovertemplate=hovertemplate, + hovertemplatefallback=hovertemplatefallback, + hovertemplatesrc=hovertemplatesrc, + hovertext=hovertext, + hovertextsrc=hovertextsrc, + ids=ids, + idssrc=idssrc, + legend=legend, + legendgroup=legendgroup, + legendgrouptitle=legendgrouptitle, + legendrank=legendrank, + legendwidth=legendwidth, + line=line, + marker=marker, + meta=meta, + metasrc=metasrc, + mode=mode, + name=name, + opacity=opacity, + selected=selected, + selectedpoints=selectedpoints, + showlegend=showlegend, + stream=stream, + text=text, + textfont=textfont, + textposition=textposition, + textpositionsrc=textpositionsrc, + textsrc=textsrc, + texttemplate=texttemplate, + texttemplatefallback=texttemplatefallback, + texttemplatesrc=texttemplatesrc, + uid=uid, + uirevision=uirevision, + unselected=unselected, + visible=visible, + xaxis=xaxis, + yaxis=yaxis, + zorder=zorder, + **kwargs, + ) + return self.add_trace(new_trace, row=row, col=col, secondary_y=secondary_y) + + def add_scattergeo( + self, + connectgaps=None, + customdata=None, + customdatasrc=None, + featureidkey=None, + fill=None, + fillcolor=None, + geo=None, + geojson=None, + hoverinfo=None, + hoverinfosrc=None, + hoverlabel=None, + hovertemplate=None, + hovertemplatefallback=None, + hovertemplatesrc=None, + hovertext=None, + hovertextsrc=None, + ids=None, + idssrc=None, + lat=None, + latsrc=None, + legend=None, + legendgroup=None, + legendgrouptitle=None, + legendrank=None, + legendwidth=None, + line=None, + locationmode=None, + locations=None, + locationssrc=None, + lon=None, + lonsrc=None, + marker=None, + meta=None, + metasrc=None, + mode=None, + name=None, + opacity=None, + selected=None, + selectedpoints=None, + showlegend=None, + stream=None, + text=None, + textfont=None, + textposition=None, + textpositionsrc=None, + textsrc=None, + texttemplate=None, + texttemplatefallback=None, + texttemplatesrc=None, + uid=None, + uirevision=None, + unselected=None, + visible=None, + row=None, + col=None, + **kwargs, + ) -> "Figure": + """ + Add a new Scattergeo trace + + The data visualized as scatter point or lines on a geographic + map is provided either by longitude/latitude pairs in `lon` and + `lat` respectively or by geographic location IDs or names in + `locations`. + + Parameters + ---------- + connectgaps + Determines whether or not gaps (i.e. {nan} or missing + values) in the provided data arrays are connected. + customdata + Assigns extra data each datum. This may be useful when + listening to hover, click and selection events. Note + that, "scatter" traces also appends customdata items in + the markers DOM elements + customdatasrc + Sets the source reference on Chart Studio Cloud for + `customdata`. + featureidkey + Sets the key in GeoJSON features which is used as id to + match the items included in the `locations` array. Only + has an effect when `geojson` is set. Support nested + property, for example "properties.name". + fill + Sets the area to fill with a solid color. Use with + `fillcolor` if not "none". "toself" connects the + endpoints of the trace (or each segment of the trace if + it has gaps) into a closed shape. + fillcolor + Sets the fill color. Defaults to a half-transparent + variant of the line color, marker color, or marker line + color, whichever is available. + geo + Sets a reference between this trace's geospatial + coordinates and a geographic map. If "geo" (the default + value), the geospatial coordinates refer to + `layout.geo`. If "geo2", the geospatial coordinates + refer to `layout.geo2`, and so on. + geojson + Sets optional GeoJSON data associated with this trace. + If not given, the features on the base map are used + when `locations` is set. It can be set as a valid + GeoJSON object or as a URL string. Note that we only + accept GeoJSONs of type "FeatureCollection" or + "Feature" with geometries of type "Polygon" or + "MultiPolygon". + hoverinfo + Determines which trace information appear on hover. If + `none` or `skip` are set, no information is displayed + upon hovering. But, if `none` is set, click and hover + events are still fired. + hoverinfosrc + Sets the source reference on Chart Studio Cloud for + `hoverinfo`. + hoverlabel + :class:`plotly.graph_objects.scattergeo.Hoverlabel` + instance or dict with compatible properties + hovertemplate + Template string used for rendering the information that + appear on hover box. Note that this will override + `hoverinfo`. Variables are inserted using %{variable}, + for example "y: %{y}" as well as %{xother}, {%_xother}, + {%_xother_}, {%xother_}. When showing info for several + points, "xother" will be added to those with different + x positions from the first point. An underscore before + or after "(x|y)other" will add a space on that side, + only when this field is shown. Numbers are formatted + using d3-format's syntax %{variable:d3-format}, for + example "Price: %{y:$.2f}". + https://github.com/d3/d3-format/tree/v1.4.5#d3-format + for details on the formatting syntax. Dates are + formatted using d3-time-format's syntax + %{variable|d3-time-format}, for example "Day: + %{2019-01-01|%A}". https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format for details on the + date formatting syntax. Variables that can't be found + will be replaced with the specifier. For example, a + template of "data: %{x}, %{y}" will result in a value + of "data: 1, %{y}" if x is 1 and y is missing. + Variables with an undefined value will be replaced with + the fallback value. The variables available in + `hovertemplate` are the ones emitted as event data + described at this link + https://plotly.com/javascript/plotlyjs-events/#event- + data. Additionally, all attributes that can be + specified per-point (the ones that are `arrayOk: true`) + are available. Anything contained in tag `` is + displayed in the secondary box, for example + `%{fullData.name}`. To hide the + secondary box completely, use an empty tag + ``. + hovertemplatefallback + Fallback string that's displayed when a variable + referenced in a template is missing. If the boolean + value 'false' is passed in, the specifier with the + missing variable will be displayed. + hovertemplatesrc + Sets the source reference on Chart Studio Cloud for + `hovertemplate`. + hovertext + Sets hover text elements associated with each (lon,lat) + pair or item in `locations`. If a single string, the + same string appears over all the data points. If an + array of string, the items are mapped in order to the + this trace's (lon,lat) or `locations` coordinates. To + be seen, trace `hoverinfo` must contain a "text" flag. + hovertextsrc + Sets the source reference on Chart Studio Cloud for + `hovertext`. + ids + Assigns id labels to each datum. These ids for object + constancy of data points during animation. Should be an + array of strings, not numbers or any other type. + idssrc + Sets the source reference on Chart Studio Cloud for + `ids`. + lat + Sets the latitude coordinates (in degrees North). + latsrc + Sets the source reference on Chart Studio Cloud for + `lat`. + legend + Sets the reference to a legend to show this trace in. + References to these legends are "legend", "legend2", + "legend3", etc. Settings for these legends are set in + the layout, under `layout.legend`, `layout.legend2`, + etc. + legendgroup + Sets the legend group for this trace. Traces and shapes + part of the same legend group hide/show at the same + time when toggling legend items. + legendgrouptitle + :class:`plotly.graph_objects.scattergeo.Legendgrouptitl + e` instance or dict with compatible properties + legendrank + Sets the legend rank for this trace. Items and groups + with smaller ranks are presented on top/left side while + with "reversed" `legend.traceorder` they are on + bottom/right side. The default legendrank is 1000, so + that you can use ranks less than 1000 to place certain + items before all unranked items, and ranks greater than + 1000 to go after all unranked items. When having + unranked or equal rank items shapes would be displayed + after traces i.e. according to their order in data and + layout. + legendwidth + Sets the width (in px or fraction) of the legend for + this trace. + line + :class:`plotly.graph_objects.scattergeo.Line` instance + or dict with compatible properties + locationmode + The library used by the *country names* `locationmode` + option is changing in an upcoming version. Country + names in existing plots may not work in the new + version. Determines the set of locations used to match + entries in `locations` to regions on the map. Values + "ISO-3", "USA-states", *country names* correspond to + features on the base map and value "geojson-id" + corresponds to features from a custom GeoJSON linked to + the `geojson` attribute. + locations + Sets the coordinates via location IDs or names. + Coordinates correspond to the centroid of each location + given. See `locationmode` for more info. + locationssrc + Sets the source reference on Chart Studio Cloud for + `locations`. + lon + Sets the longitude coordinates (in degrees East). + lonsrc + Sets the source reference on Chart Studio Cloud for + `lon`. + marker + :class:`plotly.graph_objects.scattergeo.Marker` + instance or dict with compatible properties + meta + Assigns extra meta information associated with this + trace that can be used in various text attributes. + Attributes such as trace `name`, graph, axis and + colorbar `title.text`, annotation `text` + `rangeselector`, `updatemenues` and `sliders` `label` + text all support `meta`. To access the trace `meta` + values in an attribute in the same trace, simply use + `%{meta[i]}` where `i` is the index or key of the + `meta` item in question. To access trace `meta` in + layout attributes, use `%{data[n[.meta[i]}` where `i` + is the index or key of the `meta` and `n` is the trace + index. + metasrc + Sets the source reference on Chart Studio Cloud for + `meta`. + mode + Determines the drawing mode for this scatter trace. If + the provided `mode` includes "text" then the `text` + elements appear at the coordinates. Otherwise, the + `text` elements appear on hover. If there are less than + 20 points and the trace is not stacked then the default + is "lines+markers". Otherwise, "lines". + name + Sets the trace name. The trace name appears as the + legend item and on hover. + opacity + Sets the opacity of the trace. + selected + :class:`plotly.graph_objects.scattergeo.Selected` + instance or dict with compatible properties + selectedpoints + Array containing integer indices of selected points. + Has an effect only for traces that support selections. + Note that an empty array means an empty selection where + the `unselected` are turned on for all points, whereas, + any other non-array values means no selection all where + the `selected` and `unselected` styles have no effect. + showlegend + Determines whether or not an item corresponding to this + trace is shown in the legend. + stream + :class:`plotly.graph_objects.scattergeo.Stream` + instance or dict with compatible properties + text + Sets text elements associated with each (lon,lat) pair + or item in `locations`. If a single string, the same + string appears over all the data points. If an array of + string, the items are mapped in order to the this + trace's (lon,lat) or `locations` coordinates. If trace + `hoverinfo` contains a "text" flag and "hovertext" is + not set, these elements will be seen in the hover + labels. + textfont + Sets the text font. + textposition + Sets the positions of the `text` elements with respects + to the (x,y) coordinates. + textpositionsrc + Sets the source reference on Chart Studio Cloud for + `textposition`. + textsrc + Sets the source reference on Chart Studio Cloud for + `text`. + texttemplate + Template string used for rendering the information text + that appears on points. Note that this will override + `textinfo`. Variables are inserted using %{variable}, + for example "y: %{y}". Numbers are formatted using + d3-format's syntax %{variable:d3-format}, for example + "Price: %{y:$.2f}". + https://github.com/d3/d3-format/tree/v1.4.5#d3-format + for details on the formatting syntax. Dates are + formatted using d3-time-format's syntax + %{variable|d3-time-format}, for example "Day: + %{2019-01-01|%A}". https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format for details on the + date formatting syntax. Variables that can't be found + will be replaced with the specifier. For example, a + template of "data: %{x}, %{y}" will result in a value + of "data: 1, %{y}" if x is 1 and y is missing. + Variables with an undefined value will be replaced with + the fallback value. All attributes that can be + specified per-point (the ones that are `arrayOk: true`) + are available. Finally, the template string has access + to variables `lat`, `lon`, `location` and `text`. + texttemplatefallback + Fallback string that's displayed when a variable + referenced in a template is missing. If the boolean + value 'false' is passed in, the specifier with the + missing variable will be displayed. + texttemplatesrc + Sets the source reference on Chart Studio Cloud for + `texttemplate`. + uid + Assign an id to this trace, Use this to provide object + constancy between traces during animations and + transitions. + uirevision + Controls persistence of some user-driven changes to the + trace: `constraintrange` in `parcoords` traces, as well + as some `editable: true` modifications such as `name` + and `colorbar.title`. Defaults to `layout.uirevision`. + Note that other user-driven trace attribute changes are + controlled by `layout` attributes: `trace.visible` is + controlled by `layout.legend.uirevision`, + `selectedpoints` is controlled by + `layout.selectionrevision`, and `colorbar.(x|y)` + (accessible with `config: {editable: true}`) is + controlled by `layout.editrevision`. Trace changes are + tracked by `uid`, which only falls back on trace index + if no `uid` is provided. So if your app can add/remove + traces before the end of the `data` array, such that + the same trace has a different index, you can still + preserve user-driven changes if you give each trace a + `uid` that stays with it as it moves. + unselected + :class:`plotly.graph_objects.scattergeo.Unselected` + instance or dict with compatible properties + visible + Determines whether or not this trace is visible. If + "legendonly", the trace is not drawn, but can appear as + a legend item (provided that the legend itself is + visible). + row : 'all', int or None (default) + Subplot row index (starting from 1) for the trace to be + added. Only valid if figure was created using + `plotly.tools.make_subplots`.If 'all', addresses all + rows in the specified column(s). + col : 'all', int or None (default) + Subplot col index (starting from 1) for the trace to be + added. Only valid if figure was created using + `plotly.tools.make_subplots`.If 'all', addresses all + columns in the specified row(s). + + Returns + ------- + Figure + """ + from plotly.graph_objs import Scattergeo + + new_trace = Scattergeo( + connectgaps=connectgaps, + customdata=customdata, + customdatasrc=customdatasrc, + featureidkey=featureidkey, + fill=fill, + fillcolor=fillcolor, + geo=geo, + geojson=geojson, + hoverinfo=hoverinfo, + hoverinfosrc=hoverinfosrc, + hoverlabel=hoverlabel, + hovertemplate=hovertemplate, + hovertemplatefallback=hovertemplatefallback, + hovertemplatesrc=hovertemplatesrc, + hovertext=hovertext, + hovertextsrc=hovertextsrc, + ids=ids, + idssrc=idssrc, + lat=lat, + latsrc=latsrc, + legend=legend, + legendgroup=legendgroup, + legendgrouptitle=legendgrouptitle, + legendrank=legendrank, + legendwidth=legendwidth, + line=line, + locationmode=locationmode, + locations=locations, + locationssrc=locationssrc, + lon=lon, + lonsrc=lonsrc, + marker=marker, + meta=meta, + metasrc=metasrc, + mode=mode, + name=name, + opacity=opacity, + selected=selected, + selectedpoints=selectedpoints, + showlegend=showlegend, + stream=stream, + text=text, + textfont=textfont, + textposition=textposition, + textpositionsrc=textpositionsrc, + textsrc=textsrc, + texttemplate=texttemplate, + texttemplatefallback=texttemplatefallback, + texttemplatesrc=texttemplatesrc, + uid=uid, + uirevision=uirevision, + unselected=unselected, + visible=visible, + **kwargs, + ) + return self.add_trace(new_trace, row=row, col=col) + + def add_scattergl( + self, + connectgaps=None, + customdata=None, + customdatasrc=None, + dx=None, + dy=None, + error_x=None, + error_y=None, + fill=None, + fillcolor=None, + hoverinfo=None, + hoverinfosrc=None, + hoverlabel=None, + hovertemplate=None, + hovertemplatefallback=None, + hovertemplatesrc=None, + hovertext=None, + hovertextsrc=None, + ids=None, + idssrc=None, + legend=None, + legendgroup=None, + legendgrouptitle=None, + legendrank=None, + legendwidth=None, + line=None, + marker=None, + meta=None, + metasrc=None, + mode=None, + name=None, + opacity=None, + selected=None, + selectedpoints=None, + showlegend=None, + stream=None, + text=None, + textfont=None, + textposition=None, + textpositionsrc=None, + textsrc=None, + texttemplate=None, + texttemplatefallback=None, + texttemplatesrc=None, + uid=None, + uirevision=None, + unselected=None, + visible=None, + x=None, + x0=None, + xaxis=None, + xcalendar=None, + xhoverformat=None, + xperiod=None, + xperiod0=None, + xperiodalignment=None, + xsrc=None, + y=None, + y0=None, + yaxis=None, + ycalendar=None, + yhoverformat=None, + yperiod=None, + yperiod0=None, + yperiodalignment=None, + ysrc=None, + row=None, + col=None, + secondary_y=None, + **kwargs, + ) -> "Figure": + """ + Add a new Scattergl trace + + The data visualized as scatter point or lines is set in `x` and + `y` using the WebGL plotting engine. Bubble charts are achieved + by setting `marker.size` and/or `marker.color` to a numerical + arrays. + + Parameters + ---------- + connectgaps + Determines whether or not gaps (i.e. {nan} or missing + values) in the provided data arrays are connected. + customdata + Assigns extra data each datum. This may be useful when + listening to hover, click and selection events. Note + that, "scatter" traces also appends customdata items in + the markers DOM elements + customdatasrc + Sets the source reference on Chart Studio Cloud for + `customdata`. + dx + Sets the x coordinate step. See `x0` for more info. + dy + Sets the y coordinate step. See `y0` for more info. + error_x + :class:`plotly.graph_objects.scattergl.ErrorX` instance + or dict with compatible properties + error_y + :class:`plotly.graph_objects.scattergl.ErrorY` instance + or dict with compatible properties + fill + Sets the area to fill with a solid color. Defaults to + "none" unless this trace is stacked, then it gets + "tonexty" ("tonextx") if `orientation` is "v" ("h") Use + with `fillcolor` if not "none". "tozerox" and "tozeroy" + fill to x=0 and y=0 respectively. "tonextx" and + "tonexty" fill between the endpoints of this trace and + the endpoints of the trace before it, connecting those + endpoints with straight lines (to make a stacked area + graph); if there is no trace before it, they behave + like "tozerox" and "tozeroy". "toself" connects the + endpoints of the trace (or each segment of the trace if + it has gaps) into a closed shape. "tonext" fills the + space between two traces if one completely encloses the + other (eg consecutive contour lines), and behaves like + "toself" if there is no trace before it. "tonext" + should not be used if one trace does not enclose the + other. Traces in a `stackgroup` will only fill to (or + be filled to) other traces in the same group. With + multiple `stackgroup`s or some traces stacked and some + not, if fill-linked traces are not already consecutive, + the later ones will be pushed down in the drawing + order. + fillcolor + Sets the fill color. Defaults to a half-transparent + variant of the line color, marker color, or marker line + color, whichever is available. + hoverinfo + Determines which trace information appear on hover. If + `none` or `skip` are set, no information is displayed + upon hovering. But, if `none` is set, click and hover + events are still fired. + hoverinfosrc + Sets the source reference on Chart Studio Cloud for + `hoverinfo`. + hoverlabel + :class:`plotly.graph_objects.scattergl.Hoverlabel` + instance or dict with compatible properties + hovertemplate + Template string used for rendering the information that + appear on hover box. Note that this will override + `hoverinfo`. Variables are inserted using %{variable}, + for example "y: %{y}" as well as %{xother}, {%_xother}, + {%_xother_}, {%xother_}. When showing info for several + points, "xother" will be added to those with different + x positions from the first point. An underscore before + or after "(x|y)other" will add a space on that side, + only when this field is shown. Numbers are formatted + using d3-format's syntax %{variable:d3-format}, for + example "Price: %{y:$.2f}". + https://github.com/d3/d3-format/tree/v1.4.5#d3-format + for details on the formatting syntax. Dates are + formatted using d3-time-format's syntax + %{variable|d3-time-format}, for example "Day: + %{2019-01-01|%A}". https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format for details on the + date formatting syntax. Variables that can't be found + will be replaced with the specifier. For example, a + template of "data: %{x}, %{y}" will result in a value + of "data: 1, %{y}" if x is 1 and y is missing. + Variables with an undefined value will be replaced with + the fallback value. The variables available in + `hovertemplate` are the ones emitted as event data + described at this link + https://plotly.com/javascript/plotlyjs-events/#event- + data. Additionally, all attributes that can be + specified per-point (the ones that are `arrayOk: true`) + are available. Anything contained in tag `` is + displayed in the secondary box, for example + `%{fullData.name}`. To hide the + secondary box completely, use an empty tag + ``. + hovertemplatefallback + Fallback string that's displayed when a variable + referenced in a template is missing. If the boolean + value 'false' is passed in, the specifier with the + missing variable will be displayed. + hovertemplatesrc + Sets the source reference on Chart Studio Cloud for + `hovertemplate`. + hovertext + Sets hover text elements associated with each (x,y) + pair. If a single string, the same string appears over + all the data points. If an array of string, the items + are mapped in order to the this trace's (x,y) + coordinates. To be seen, trace `hoverinfo` must contain + a "text" flag. + hovertextsrc + Sets the source reference on Chart Studio Cloud for + `hovertext`. + ids + Assigns id labels to each datum. These ids for object + constancy of data points during animation. Should be an + array of strings, not numbers or any other type. + idssrc + Sets the source reference on Chart Studio Cloud for + `ids`. + legend + Sets the reference to a legend to show this trace in. + References to these legends are "legend", "legend2", + "legend3", etc. Settings for these legends are set in + the layout, under `layout.legend`, `layout.legend2`, + etc. + legendgroup + Sets the legend group for this trace. Traces and shapes + part of the same legend group hide/show at the same + time when toggling legend items. + legendgrouptitle + :class:`plotly.graph_objects.scattergl.Legendgrouptitle + ` instance or dict with compatible properties + legendrank + Sets the legend rank for this trace. Items and groups + with smaller ranks are presented on top/left side while + with "reversed" `legend.traceorder` they are on + bottom/right side. The default legendrank is 1000, so + that you can use ranks less than 1000 to place certain + items before all unranked items, and ranks greater than + 1000 to go after all unranked items. When having + unranked or equal rank items shapes would be displayed + after traces i.e. according to their order in data and + layout. + legendwidth + Sets the width (in px or fraction) of the legend for + this trace. + line + :class:`plotly.graph_objects.scattergl.Line` instance + or dict with compatible properties + marker + :class:`plotly.graph_objects.scattergl.Marker` instance + or dict with compatible properties + meta + Assigns extra meta information associated with this + trace that can be used in various text attributes. + Attributes such as trace `name`, graph, axis and + colorbar `title.text`, annotation `text` + `rangeselector`, `updatemenues` and `sliders` `label` + text all support `meta`. To access the trace `meta` + values in an attribute in the same trace, simply use + `%{meta[i]}` where `i` is the index or key of the + `meta` item in question. To access trace `meta` in + layout attributes, use `%{data[n[.meta[i]}` where `i` + is the index or key of the `meta` and `n` is the trace + index. + metasrc + Sets the source reference on Chart Studio Cloud for + `meta`. + mode + Determines the drawing mode for this scatter trace. + name + Sets the trace name. The trace name appears as the + legend item and on hover. + opacity + Sets the opacity of the trace. + selected + :class:`plotly.graph_objects.scattergl.Selected` + instance or dict with compatible properties + selectedpoints + Array containing integer indices of selected points. + Has an effect only for traces that support selections. + Note that an empty array means an empty selection where + the `unselected` are turned on for all points, whereas, + any other non-array values means no selection all where + the `selected` and `unselected` styles have no effect. + showlegend + Determines whether or not an item corresponding to this + trace is shown in the legend. + stream + :class:`plotly.graph_objects.scattergl.Stream` instance + or dict with compatible properties + text + Sets text elements associated with each (x,y) pair. If + a single string, the same string appears over all the + data points. If an array of string, the items are + mapped in order to the this trace's (x,y) coordinates. + If trace `hoverinfo` contains a "text" flag and + "hovertext" is not set, these elements will be seen in + the hover labels. + textfont + Sets the text font. + textposition + Sets the positions of the `text` elements with respects + to the (x,y) coordinates. + textpositionsrc + Sets the source reference on Chart Studio Cloud for + `textposition`. + textsrc + Sets the source reference on Chart Studio Cloud for + `text`. + texttemplate + Template string used for rendering the information text + that appears on points. Note that this will override + `textinfo`. Variables are inserted using %{variable}, + for example "y: %{y}". Numbers are formatted using + d3-format's syntax %{variable:d3-format}, for example + "Price: %{y:$.2f}". + https://github.com/d3/d3-format/tree/v1.4.5#d3-format + for details on the formatting syntax. Dates are + formatted using d3-time-format's syntax + %{variable|d3-time-format}, for example "Day: + %{2019-01-01|%A}". https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format for details on the + date formatting syntax. Variables that can't be found + will be replaced with the specifier. For example, a + template of "data: %{x}, %{y}" will result in a value + of "data: 1, %{y}" if x is 1 and y is missing. + Variables with an undefined value will be replaced with + the fallback value. All attributes that can be + specified per-point (the ones that are `arrayOk: true`) + are available. + texttemplatefallback + Fallback string that's displayed when a variable + referenced in a template is missing. If the boolean + value 'false' is passed in, the specifier with the + missing variable will be displayed. + texttemplatesrc + Sets the source reference on Chart Studio Cloud for + `texttemplate`. + uid + Assign an id to this trace, Use this to provide object + constancy between traces during animations and + transitions. + uirevision + Controls persistence of some user-driven changes to the + trace: `constraintrange` in `parcoords` traces, as well + as some `editable: true` modifications such as `name` + and `colorbar.title`. Defaults to `layout.uirevision`. + Note that other user-driven trace attribute changes are + controlled by `layout` attributes: `trace.visible` is + controlled by `layout.legend.uirevision`, + `selectedpoints` is controlled by + `layout.selectionrevision`, and `colorbar.(x|y)` + (accessible with `config: {editable: true}`) is + controlled by `layout.editrevision`. Trace changes are + tracked by `uid`, which only falls back on trace index + if no `uid` is provided. So if your app can add/remove + traces before the end of the `data` array, such that + the same trace has a different index, you can still + preserve user-driven changes if you give each trace a + `uid` that stays with it as it moves. + unselected + :class:`plotly.graph_objects.scattergl.Unselected` + instance or dict with compatible properties + visible + Determines whether or not this trace is visible. If + "legendonly", the trace is not drawn, but can appear as + a legend item (provided that the legend itself is + visible). + x + Sets the x coordinates. + x0 + Alternate to `x`. Builds a linear space of x + coordinates. Use with `dx` where `x0` is the starting + coordinate and `dx` the step. + xaxis + Sets a reference between this trace's x coordinates and + a 2D cartesian x axis. If "x" (the default value), the + x coordinates refer to `layout.xaxis`. If "x2", the x + coordinates refer to `layout.xaxis2`, and so on. + xcalendar + Sets the calendar system to use with `x` date data. + xhoverformat + Sets the hover text formatting rulefor `x` using d3 + formatting mini-languages which are very similar to + those in Python. For numbers, see: + https://github.com/d3/d3-format/tree/v1.4.5#d3-format. + And for dates see: https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format. We add two items to + d3's date formatter: "%h" for half of the year as a + decimal number as well as "%{n}f" for fractional + seconds with n digits. For example, *2016-10-13 + 09:15:23.456* with tickformat "%H~%M~%S.%2f" would + display *09~15~23.46*By default the values are + formatted using `xaxis.hoverformat`. + xperiod + Only relevant when the axis `type` is "date". Sets the + period positioning in milliseconds or "M" on the x + axis. Special values in the form of "M" could be + used to declare the number of months. In this case `n` + must be a positive integer. + xperiod0 + Only relevant when the axis `type` is "date". Sets the + base for period positioning in milliseconds or date + string on the x0 axis. When `x0period` is round number + of weeks, the `x0period0` by default would be on a + Sunday i.e. 2000-01-02, otherwise it would be at + 2000-01-01. + xperiodalignment + Only relevant when the axis `type` is "date". Sets the + alignment of data points on the x axis. + xsrc + Sets the source reference on Chart Studio Cloud for + `x`. + y + Sets the y coordinates. + y0 + Alternate to `y`. Builds a linear space of y + coordinates. Use with `dy` where `y0` is the starting + coordinate and `dy` the step. + yaxis + Sets a reference between this trace's y coordinates and + a 2D cartesian y axis. If "y" (the default value), the + y coordinates refer to `layout.yaxis`. If "y2", the y + coordinates refer to `layout.yaxis2`, and so on. + ycalendar + Sets the calendar system to use with `y` date data. + yhoverformat + Sets the hover text formatting rulefor `y` using d3 + formatting mini-languages which are very similar to + those in Python. For numbers, see: + https://github.com/d3/d3-format/tree/v1.4.5#d3-format. + And for dates see: https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format. We add two items to + d3's date formatter: "%h" for half of the year as a + decimal number as well as "%{n}f" for fractional + seconds with n digits. For example, *2016-10-13 + 09:15:23.456* with tickformat "%H~%M~%S.%2f" would + display *09~15~23.46*By default the values are + formatted using `yaxis.hoverformat`. + yperiod + Only relevant when the axis `type` is "date". Sets the + period positioning in milliseconds or "M" on the y + axis. Special values in the form of "M" could be + used to declare the number of months. In this case `n` + must be a positive integer. + yperiod0 + Only relevant when the axis `type` is "date". Sets the + base for period positioning in milliseconds or date + string on the y0 axis. When `y0period` is round number + of weeks, the `y0period0` by default would be on a + Sunday i.e. 2000-01-02, otherwise it would be at + 2000-01-01. + yperiodalignment + Only relevant when the axis `type` is "date". Sets the + alignment of data points on the y axis. + ysrc + Sets the source reference on Chart Studio Cloud for + `y`. + row : 'all', int or None (default) + Subplot row index (starting from 1) for the trace to be + added. Only valid if figure was created using + `plotly.tools.make_subplots`.If 'all', addresses all + rows in the specified column(s). + col : 'all', int or None (default) + Subplot col index (starting from 1) for the trace to be + added. Only valid if figure was created using + `plotly.tools.make_subplots`.If 'all', addresses all + columns in the specified row(s). + secondary_y: boolean or None (default None) + If True, associate this trace with the secondary y-axis of the + subplot at the specified row and col. Only valid if all of the + following conditions are satisfied: + * The figure was created using `plotly.subplots.make_subplots`. + * The row and col arguments are not None + * The subplot at the specified row and col has type xy + (which is the default) and secondary_y True. These + properties are specified in the specs argument to + make_subplots. See the make_subplots docstring for more info. + + Returns + ------- + Figure + """ + from plotly.graph_objs import Scattergl + + new_trace = Scattergl( + connectgaps=connectgaps, + customdata=customdata, + customdatasrc=customdatasrc, + dx=dx, + dy=dy, + error_x=error_x, + error_y=error_y, + fill=fill, + fillcolor=fillcolor, + hoverinfo=hoverinfo, + hoverinfosrc=hoverinfosrc, + hoverlabel=hoverlabel, + hovertemplate=hovertemplate, + hovertemplatefallback=hovertemplatefallback, + hovertemplatesrc=hovertemplatesrc, + hovertext=hovertext, + hovertextsrc=hovertextsrc, + ids=ids, + idssrc=idssrc, + legend=legend, + legendgroup=legendgroup, + legendgrouptitle=legendgrouptitle, + legendrank=legendrank, + legendwidth=legendwidth, + line=line, + marker=marker, + meta=meta, + metasrc=metasrc, + mode=mode, + name=name, + opacity=opacity, + selected=selected, + selectedpoints=selectedpoints, + showlegend=showlegend, + stream=stream, + text=text, + textfont=textfont, + textposition=textposition, + textpositionsrc=textpositionsrc, + textsrc=textsrc, + texttemplate=texttemplate, + texttemplatefallback=texttemplatefallback, + texttemplatesrc=texttemplatesrc, + uid=uid, + uirevision=uirevision, + unselected=unselected, + visible=visible, + x=x, + x0=x0, + xaxis=xaxis, + xcalendar=xcalendar, + xhoverformat=xhoverformat, + xperiod=xperiod, + xperiod0=xperiod0, + xperiodalignment=xperiodalignment, + xsrc=xsrc, + y=y, + y0=y0, + yaxis=yaxis, + ycalendar=ycalendar, + yhoverformat=yhoverformat, + yperiod=yperiod, + yperiod0=yperiod0, + yperiodalignment=yperiodalignment, + ysrc=ysrc, + **kwargs, + ) + return self.add_trace(new_trace, row=row, col=col, secondary_y=secondary_y) + + def add_scattermap( + self, + below=None, + cluster=None, + connectgaps=None, + customdata=None, + customdatasrc=None, + fill=None, + fillcolor=None, + hoverinfo=None, + hoverinfosrc=None, + hoverlabel=None, + hovertemplate=None, + hovertemplatefallback=None, + hovertemplatesrc=None, + hovertext=None, + hovertextsrc=None, + ids=None, + idssrc=None, + lat=None, + latsrc=None, + legend=None, + legendgroup=None, + legendgrouptitle=None, + legendrank=None, + legendwidth=None, + line=None, + lon=None, + lonsrc=None, + marker=None, + meta=None, + metasrc=None, + mode=None, + name=None, + opacity=None, + selected=None, + selectedpoints=None, + showlegend=None, + stream=None, + subplot=None, + text=None, + textfont=None, + textposition=None, + textsrc=None, + texttemplate=None, + texttemplatefallback=None, + texttemplatesrc=None, + uid=None, + uirevision=None, + unselected=None, + visible=None, + row=None, + col=None, + **kwargs, + ) -> "Figure": + """ + Add a new Scattermap trace + + The data visualized as scatter point, lines or marker symbols + on a MapLibre GL geographic map is provided by + longitude/latitude pairs in `lon` and `lat`. + + Parameters + ---------- + below + Determines if this scattermap trace's layers are to be + inserted before the layer with the specified ID. By + default, scattermap layers are inserted above all the + base layers. To place the scattermap layers above every + other layer, set `below` to "''". + cluster + :class:`plotly.graph_objects.scattermap.Cluster` + instance or dict with compatible properties + connectgaps + Determines whether or not gaps (i.e. {nan} or missing + values) in the provided data arrays are connected. + customdata + Assigns extra data each datum. This may be useful when + listening to hover, click and selection events. Note + that, "scatter" traces also appends customdata items in + the markers DOM elements + customdatasrc + Sets the source reference on Chart Studio Cloud for + `customdata`. + fill + Sets the area to fill with a solid color. Use with + `fillcolor` if not "none". "toself" connects the + endpoints of the trace (or each segment of the trace if + it has gaps) into a closed shape. + fillcolor + Sets the fill color. Defaults to a half-transparent + variant of the line color, marker color, or marker line + color, whichever is available. + hoverinfo + Determines which trace information appear on hover. If + `none` or `skip` are set, no information is displayed + upon hovering. But, if `none` is set, click and hover + events are still fired. + hoverinfosrc + Sets the source reference on Chart Studio Cloud for + `hoverinfo`. + hoverlabel + :class:`plotly.graph_objects.scattermap.Hoverlabel` + instance or dict with compatible properties + hovertemplate + Template string used for rendering the information that + appear on hover box. Note that this will override + `hoverinfo`. Variables are inserted using %{variable}, + for example "y: %{y}" as well as %{xother}, {%_xother}, + {%_xother_}, {%xother_}. When showing info for several + points, "xother" will be added to those with different + x positions from the first point. An underscore before + or after "(x|y)other" will add a space on that side, + only when this field is shown. Numbers are formatted + using d3-format's syntax %{variable:d3-format}, for + example "Price: %{y:$.2f}". + https://github.com/d3/d3-format/tree/v1.4.5#d3-format + for details on the formatting syntax. Dates are + formatted using d3-time-format's syntax + %{variable|d3-time-format}, for example "Day: + %{2019-01-01|%A}". https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format for details on the + date formatting syntax. Variables that can't be found + will be replaced with the specifier. For example, a + template of "data: %{x}, %{y}" will result in a value + of "data: 1, %{y}" if x is 1 and y is missing. + Variables with an undefined value will be replaced with + the fallback value. The variables available in + `hovertemplate` are the ones emitted as event data + described at this link + https://plotly.com/javascript/plotlyjs-events/#event- + data. Additionally, all attributes that can be + specified per-point (the ones that are `arrayOk: true`) + are available. Anything contained in tag `` is + displayed in the secondary box, for example + `%{fullData.name}`. To hide the + secondary box completely, use an empty tag + ``. + hovertemplatefallback + Fallback string that's displayed when a variable + referenced in a template is missing. If the boolean + value 'false' is passed in, the specifier with the + missing variable will be displayed. + hovertemplatesrc + Sets the source reference on Chart Studio Cloud for + `hovertemplate`. + hovertext + Sets hover text elements associated with each (lon,lat) + pair If a single string, the same string appears over + all the data points. If an array of string, the items + are mapped in order to the this trace's (lon,lat) + coordinates. To be seen, trace `hoverinfo` must contain + a "text" flag. + hovertextsrc + Sets the source reference on Chart Studio Cloud for + `hovertext`. + ids + Assigns id labels to each datum. These ids for object + constancy of data points during animation. Should be an + array of strings, not numbers or any other type. + idssrc + Sets the source reference on Chart Studio Cloud for + `ids`. + lat + Sets the latitude coordinates (in degrees North). + latsrc + Sets the source reference on Chart Studio Cloud for + `lat`. + legend + Sets the reference to a legend to show this trace in. + References to these legends are "legend", "legend2", + "legend3", etc. Settings for these legends are set in + the layout, under `layout.legend`, `layout.legend2`, + etc. + legendgroup + Sets the legend group for this trace. Traces and shapes + part of the same legend group hide/show at the same + time when toggling legend items. + legendgrouptitle + :class:`plotly.graph_objects.scattermap.Legendgrouptitl + e` instance or dict with compatible properties + legendrank + Sets the legend rank for this trace. Items and groups + with smaller ranks are presented on top/left side while + with "reversed" `legend.traceorder` they are on + bottom/right side. The default legendrank is 1000, so + that you can use ranks less than 1000 to place certain + items before all unranked items, and ranks greater than + 1000 to go after all unranked items. When having + unranked or equal rank items shapes would be displayed + after traces i.e. according to their order in data and + layout. + legendwidth + Sets the width (in px or fraction) of the legend for + this trace. + line + :class:`plotly.graph_objects.scattermap.Line` instance + or dict with compatible properties + lon + Sets the longitude coordinates (in degrees East). + lonsrc + Sets the source reference on Chart Studio Cloud for + `lon`. + marker + :class:`plotly.graph_objects.scattermap.Marker` + instance or dict with compatible properties + meta + Assigns extra meta information associated with this + trace that can be used in various text attributes. + Attributes such as trace `name`, graph, axis and + colorbar `title.text`, annotation `text` + `rangeselector`, `updatemenues` and `sliders` `label` + text all support `meta`. To access the trace `meta` + values in an attribute in the same trace, simply use + `%{meta[i]}` where `i` is the index or key of the + `meta` item in question. To access trace `meta` in + layout attributes, use `%{data[n[.meta[i]}` where `i` + is the index or key of the `meta` and `n` is the trace + index. + metasrc + Sets the source reference on Chart Studio Cloud for + `meta`. + mode + Determines the drawing mode for this scatter trace. If + the provided `mode` includes "text" then the `text` + elements appear at the coordinates. Otherwise, the + `text` elements appear on hover. + name + Sets the trace name. The trace name appears as the + legend item and on hover. + opacity + Sets the opacity of the trace. + selected + :class:`plotly.graph_objects.scattermap.Selected` + instance or dict with compatible properties + selectedpoints + Array containing integer indices of selected points. + Has an effect only for traces that support selections. + Note that an empty array means an empty selection where + the `unselected` are turned on for all points, whereas, + any other non-array values means no selection all where + the `selected` and `unselected` styles have no effect. + showlegend + Determines whether or not an item corresponding to this + trace is shown in the legend. + stream + :class:`plotly.graph_objects.scattermap.Stream` + instance or dict with compatible properties + subplot + Sets a reference between this trace's data coordinates + and a map subplot. If "map" (the default value), the + data refer to `layout.map`. If "map2", the data refer + to `layout.map2`, and so on. + text + Sets text elements associated with each (lon,lat) pair + If a single string, the same string appears over all + the data points. If an array of string, the items are + mapped in order to the this trace's (lon,lat) + coordinates. If trace `hoverinfo` contains a "text" + flag and "hovertext" is not set, these elements will be + seen in the hover labels. + textfont + Sets the icon text font (color=map.layer.paint.text- + color, size=map.layer.layout.text-size). Has an effect + only when `type` is set to "symbol". + textposition + Sets the positions of the `text` elements with respects + to the (x,y) coordinates. + textsrc + Sets the source reference on Chart Studio Cloud for + `text`. + texttemplate + Template string used for rendering the information text + that appears on points. Note that this will override + `textinfo`. Variables are inserted using %{variable}, + for example "y: %{y}". Numbers are formatted using + d3-format's syntax %{variable:d3-format}, for example + "Price: %{y:$.2f}". + https://github.com/d3/d3-format/tree/v1.4.5#d3-format + for details on the formatting syntax. Dates are + formatted using d3-time-format's syntax + %{variable|d3-time-format}, for example "Day: + %{2019-01-01|%A}". https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format for details on the + date formatting syntax. Variables that can't be found + will be replaced with the specifier. For example, a + template of "data: %{x}, %{y}" will result in a value + of "data: 1, %{y}" if x is 1 and y is missing. + Variables with an undefined value will be replaced with + the fallback value. All attributes that can be + specified per-point (the ones that are `arrayOk: true`) + are available. Finally, the template string has access + to variables `lat`, `lon` and `text`. + texttemplatefallback + Fallback string that's displayed when a variable + referenced in a template is missing. If the boolean + value 'false' is passed in, the specifier with the + missing variable will be displayed. + texttemplatesrc + Sets the source reference on Chart Studio Cloud for + `texttemplate`. + uid + Assign an id to this trace, Use this to provide object + constancy between traces during animations and + transitions. + uirevision + Controls persistence of some user-driven changes to the + trace: `constraintrange` in `parcoords` traces, as well + as some `editable: true` modifications such as `name` + and `colorbar.title`. Defaults to `layout.uirevision`. + Note that other user-driven trace attribute changes are + controlled by `layout` attributes: `trace.visible` is + controlled by `layout.legend.uirevision`, + `selectedpoints` is controlled by + `layout.selectionrevision`, and `colorbar.(x|y)` + (accessible with `config: {editable: true}`) is + controlled by `layout.editrevision`. Trace changes are + tracked by `uid`, which only falls back on trace index + if no `uid` is provided. So if your app can add/remove + traces before the end of the `data` array, such that + the same trace has a different index, you can still + preserve user-driven changes if you give each trace a + `uid` that stays with it as it moves. + unselected + :class:`plotly.graph_objects.scattermap.Unselected` + instance or dict with compatible properties + visible + Determines whether or not this trace is visible. If + "legendonly", the trace is not drawn, but can appear as + a legend item (provided that the legend itself is + visible). + row : 'all', int or None (default) + Subplot row index (starting from 1) for the trace to be + added. Only valid if figure was created using + `plotly.tools.make_subplots`.If 'all', addresses all + rows in the specified column(s). + col : 'all', int or None (default) + Subplot col index (starting from 1) for the trace to be + added. Only valid if figure was created using + `plotly.tools.make_subplots`.If 'all', addresses all + columns in the specified row(s). + + Returns + ------- + Figure + """ + from plotly.graph_objs import Scattermap + + new_trace = Scattermap( + below=below, + cluster=cluster, + connectgaps=connectgaps, + customdata=customdata, + customdatasrc=customdatasrc, + fill=fill, + fillcolor=fillcolor, + hoverinfo=hoverinfo, + hoverinfosrc=hoverinfosrc, + hoverlabel=hoverlabel, + hovertemplate=hovertemplate, + hovertemplatefallback=hovertemplatefallback, + hovertemplatesrc=hovertemplatesrc, + hovertext=hovertext, + hovertextsrc=hovertextsrc, + ids=ids, + idssrc=idssrc, + lat=lat, + latsrc=latsrc, + legend=legend, + legendgroup=legendgroup, + legendgrouptitle=legendgrouptitle, + legendrank=legendrank, + legendwidth=legendwidth, + line=line, + lon=lon, + lonsrc=lonsrc, + marker=marker, + meta=meta, + metasrc=metasrc, + mode=mode, + name=name, + opacity=opacity, + selected=selected, + selectedpoints=selectedpoints, + showlegend=showlegend, + stream=stream, + subplot=subplot, + text=text, + textfont=textfont, + textposition=textposition, + textsrc=textsrc, + texttemplate=texttemplate, + texttemplatefallback=texttemplatefallback, + texttemplatesrc=texttemplatesrc, + uid=uid, + uirevision=uirevision, + unselected=unselected, + visible=visible, + **kwargs, + ) + return self.add_trace(new_trace, row=row, col=col) + + def add_scattermapbox( + self, + below=None, + cluster=None, + connectgaps=None, + customdata=None, + customdatasrc=None, + fill=None, + fillcolor=None, + hoverinfo=None, + hoverinfosrc=None, + hoverlabel=None, + hovertemplate=None, + hovertemplatefallback=None, + hovertemplatesrc=None, + hovertext=None, + hovertextsrc=None, + ids=None, + idssrc=None, + lat=None, + latsrc=None, + legend=None, + legendgroup=None, + legendgrouptitle=None, + legendrank=None, + legendwidth=None, + line=None, + lon=None, + lonsrc=None, + marker=None, + meta=None, + metasrc=None, + mode=None, + name=None, + opacity=None, + selected=None, + selectedpoints=None, + showlegend=None, + stream=None, + subplot=None, + text=None, + textfont=None, + textposition=None, + textsrc=None, + texttemplate=None, + texttemplatefallback=None, + texttemplatesrc=None, + uid=None, + uirevision=None, + unselected=None, + visible=None, + row=None, + col=None, + **kwargs, + ) -> "Figure": + """ + Add a new Scattermapbox trace + + "scattermapbox" trace is deprecated! Please consider switching + to the "scattermap" trace type and `map` subplots. Learn more + at: https://plotly.com/python/maplibre-migration/ as well as + https://plotly.com/javascript/maplibre-migration/ The data + visualized as scatter point, lines or marker symbols on a + Mapbox GL geographic map is provided by longitude/latitude + pairs in `lon` and `lat`. + + Parameters + ---------- + below + Determines if this scattermapbox trace's layers are to + be inserted before the layer with the specified ID. By + default, scattermapbox layers are inserted above all + the base layers. To place the scattermapbox layers + above every other layer, set `below` to "''". + cluster + :class:`plotly.graph_objects.scattermapbox.Cluster` + instance or dict with compatible properties + connectgaps + Determines whether or not gaps (i.e. {nan} or missing + values) in the provided data arrays are connected. + customdata + Assigns extra data each datum. This may be useful when + listening to hover, click and selection events. Note + that, "scatter" traces also appends customdata items in + the markers DOM elements + customdatasrc + Sets the source reference on Chart Studio Cloud for + `customdata`. + fill + Sets the area to fill with a solid color. Use with + `fillcolor` if not "none". "toself" connects the + endpoints of the trace (or each segment of the trace if + it has gaps) into a closed shape. + fillcolor + Sets the fill color. Defaults to a half-transparent + variant of the line color, marker color, or marker line + color, whichever is available. + hoverinfo + Determines which trace information appear on hover. If + `none` or `skip` are set, no information is displayed + upon hovering. But, if `none` is set, click and hover + events are still fired. + hoverinfosrc + Sets the source reference on Chart Studio Cloud for + `hoverinfo`. + hoverlabel + :class:`plotly.graph_objects.scattermapbox.Hoverlabel` + instance or dict with compatible properties + hovertemplate + Template string used for rendering the information that + appear on hover box. Note that this will override + `hoverinfo`. Variables are inserted using %{variable}, + for example "y: %{y}" as well as %{xother}, {%_xother}, + {%_xother_}, {%xother_}. When showing info for several + points, "xother" will be added to those with different + x positions from the first point. An underscore before + or after "(x|y)other" will add a space on that side, + only when this field is shown. Numbers are formatted + using d3-format's syntax %{variable:d3-format}, for + example "Price: %{y:$.2f}". + https://github.com/d3/d3-format/tree/v1.4.5#d3-format + for details on the formatting syntax. Dates are + formatted using d3-time-format's syntax + %{variable|d3-time-format}, for example "Day: + %{2019-01-01|%A}". https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format for details on the + date formatting syntax. Variables that can't be found + will be replaced with the specifier. For example, a + template of "data: %{x}, %{y}" will result in a value + of "data: 1, %{y}" if x is 1 and y is missing. + Variables with an undefined value will be replaced with + the fallback value. The variables available in + `hovertemplate` are the ones emitted as event data + described at this link + https://plotly.com/javascript/plotlyjs-events/#event- + data. Additionally, all attributes that can be + specified per-point (the ones that are `arrayOk: true`) + are available. Anything contained in tag `` is + displayed in the secondary box, for example + `%{fullData.name}`. To hide the + secondary box completely, use an empty tag + ``. + hovertemplatefallback + Fallback string that's displayed when a variable + referenced in a template is missing. If the boolean + value 'false' is passed in, the specifier with the + missing variable will be displayed. + hovertemplatesrc + Sets the source reference on Chart Studio Cloud for + `hovertemplate`. + hovertext + Sets hover text elements associated with each (lon,lat) + pair If a single string, the same string appears over + all the data points. If an array of string, the items + are mapped in order to the this trace's (lon,lat) + coordinates. To be seen, trace `hoverinfo` must contain + a "text" flag. + hovertextsrc + Sets the source reference on Chart Studio Cloud for + `hovertext`. + ids + Assigns id labels to each datum. These ids for object + constancy of data points during animation. Should be an + array of strings, not numbers or any other type. + idssrc + Sets the source reference on Chart Studio Cloud for + `ids`. + lat + Sets the latitude coordinates (in degrees North). + latsrc + Sets the source reference on Chart Studio Cloud for + `lat`. + legend + Sets the reference to a legend to show this trace in. + References to these legends are "legend", "legend2", + "legend3", etc. Settings for these legends are set in + the layout, under `layout.legend`, `layout.legend2`, + etc. + legendgroup + Sets the legend group for this trace. Traces and shapes + part of the same legend group hide/show at the same + time when toggling legend items. + legendgrouptitle + :class:`plotly.graph_objects.scattermapbox.Legendgroupt + itle` instance or dict with compatible properties + legendrank + Sets the legend rank for this trace. Items and groups + with smaller ranks are presented on top/left side while + with "reversed" `legend.traceorder` they are on + bottom/right side. The default legendrank is 1000, so + that you can use ranks less than 1000 to place certain + items before all unranked items, and ranks greater than + 1000 to go after all unranked items. When having + unranked or equal rank items shapes would be displayed + after traces i.e. according to their order in data and + layout. + legendwidth + Sets the width (in px or fraction) of the legend for + this trace. + line + :class:`plotly.graph_objects.scattermapbox.Line` + instance or dict with compatible properties + lon + Sets the longitude coordinates (in degrees East). + lonsrc + Sets the source reference on Chart Studio Cloud for + `lon`. + marker + :class:`plotly.graph_objects.scattermapbox.Marker` + instance or dict with compatible properties + meta + Assigns extra meta information associated with this + trace that can be used in various text attributes. + Attributes such as trace `name`, graph, axis and + colorbar `title.text`, annotation `text` + `rangeselector`, `updatemenues` and `sliders` `label` + text all support `meta`. To access the trace `meta` + values in an attribute in the same trace, simply use + `%{meta[i]}` where `i` is the index or key of the + `meta` item in question. To access trace `meta` in + layout attributes, use `%{data[n[.meta[i]}` where `i` + is the index or key of the `meta` and `n` is the trace + index. + metasrc + Sets the source reference on Chart Studio Cloud for + `meta`. + mode + Determines the drawing mode for this scatter trace. If + the provided `mode` includes "text" then the `text` + elements appear at the coordinates. Otherwise, the + `text` elements appear on hover. + name + Sets the trace name. The trace name appears as the + legend item and on hover. + opacity + Sets the opacity of the trace. + selected + :class:`plotly.graph_objects.scattermapbox.Selected` + instance or dict with compatible properties + selectedpoints + Array containing integer indices of selected points. + Has an effect only for traces that support selections. + Note that an empty array means an empty selection where + the `unselected` are turned on for all points, whereas, + any other non-array values means no selection all where + the `selected` and `unselected` styles have no effect. + showlegend + Determines whether or not an item corresponding to this + trace is shown in the legend. + stream + :class:`plotly.graph_objects.scattermapbox.Stream` + instance or dict with compatible properties + subplot + mapbox subplots and traces are deprecated! Please + consider switching to `map` subplots and traces. Learn + more at: https://plotly.com/python/maplibre-migration/ + as well as https://plotly.com/javascript/maplibre- + migration/ Sets a reference between this trace's data + coordinates and a mapbox subplot. If "mapbox" (the + default value), the data refer to `layout.mapbox`. If + "mapbox2", the data refer to `layout.mapbox2`, and so + on. + text + Sets text elements associated with each (lon,lat) pair + If a single string, the same string appears over all + the data points. If an array of string, the items are + mapped in order to the this trace's (lon,lat) + coordinates. If trace `hoverinfo` contains a "text" + flag and "hovertext" is not set, these elements will be + seen in the hover labels. + textfont + Sets the icon text font (color=mapbox.layer.paint.text- + color, size=mapbox.layer.layout.text-size). Has an + effect only when `type` is set to "symbol". + textposition + Sets the positions of the `text` elements with respects + to the (x,y) coordinates. + textsrc + Sets the source reference on Chart Studio Cloud for + `text`. + texttemplate + Template string used for rendering the information text + that appears on points. Note that this will override + `textinfo`. Variables are inserted using %{variable}, + for example "y: %{y}". Numbers are formatted using + d3-format's syntax %{variable:d3-format}, for example + "Price: %{y:$.2f}". + https://github.com/d3/d3-format/tree/v1.4.5#d3-format + for details on the formatting syntax. Dates are + formatted using d3-time-format's syntax + %{variable|d3-time-format}, for example "Day: + %{2019-01-01|%A}". https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format for details on the + date formatting syntax. Variables that can't be found + will be replaced with the specifier. For example, a + template of "data: %{x}, %{y}" will result in a value + of "data: 1, %{y}" if x is 1 and y is missing. + Variables with an undefined value will be replaced with + the fallback value. All attributes that can be + specified per-point (the ones that are `arrayOk: true`) + are available. Finally, the template string has access + to variables `lat`, `lon` and `text`. + texttemplatefallback + Fallback string that's displayed when a variable + referenced in a template is missing. If the boolean + value 'false' is passed in, the specifier with the + missing variable will be displayed. + texttemplatesrc + Sets the source reference on Chart Studio Cloud for + `texttemplate`. + uid + Assign an id to this trace, Use this to provide object + constancy between traces during animations and + transitions. + uirevision + Controls persistence of some user-driven changes to the + trace: `constraintrange` in `parcoords` traces, as well + as some `editable: true` modifications such as `name` + and `colorbar.title`. Defaults to `layout.uirevision`. + Note that other user-driven trace attribute changes are + controlled by `layout` attributes: `trace.visible` is + controlled by `layout.legend.uirevision`, + `selectedpoints` is controlled by + `layout.selectionrevision`, and `colorbar.(x|y)` + (accessible with `config: {editable: true}`) is + controlled by `layout.editrevision`. Trace changes are + tracked by `uid`, which only falls back on trace index + if no `uid` is provided. So if your app can add/remove + traces before the end of the `data` array, such that + the same trace has a different index, you can still + preserve user-driven changes if you give each trace a + `uid` that stays with it as it moves. + unselected + :class:`plotly.graph_objects.scattermapbox.Unselected` + instance or dict with compatible properties + visible + Determines whether or not this trace is visible. If + "legendonly", the trace is not drawn, but can appear as + a legend item (provided that the legend itself is + visible). + row : 'all', int or None (default) + Subplot row index (starting from 1) for the trace to be + added. Only valid if figure was created using + `plotly.tools.make_subplots`.If 'all', addresses all + rows in the specified column(s). + col : 'all', int or None (default) + Subplot col index (starting from 1) for the trace to be + added. Only valid if figure was created using + `plotly.tools.make_subplots`.If 'all', addresses all + columns in the specified row(s). + + Returns + ------- + Figure + """ + from plotly.graph_objs import Scattermapbox + + new_trace = Scattermapbox( + below=below, + cluster=cluster, + connectgaps=connectgaps, + customdata=customdata, + customdatasrc=customdatasrc, + fill=fill, + fillcolor=fillcolor, + hoverinfo=hoverinfo, + hoverinfosrc=hoverinfosrc, + hoverlabel=hoverlabel, + hovertemplate=hovertemplate, + hovertemplatefallback=hovertemplatefallback, + hovertemplatesrc=hovertemplatesrc, + hovertext=hovertext, + hovertextsrc=hovertextsrc, + ids=ids, + idssrc=idssrc, + lat=lat, + latsrc=latsrc, + legend=legend, + legendgroup=legendgroup, + legendgrouptitle=legendgrouptitle, + legendrank=legendrank, + legendwidth=legendwidth, + line=line, + lon=lon, + lonsrc=lonsrc, + marker=marker, + meta=meta, + metasrc=metasrc, + mode=mode, + name=name, + opacity=opacity, + selected=selected, + selectedpoints=selectedpoints, + showlegend=showlegend, + stream=stream, + subplot=subplot, + text=text, + textfont=textfont, + textposition=textposition, + textsrc=textsrc, + texttemplate=texttemplate, + texttemplatefallback=texttemplatefallback, + texttemplatesrc=texttemplatesrc, + uid=uid, + uirevision=uirevision, + unselected=unselected, + visible=visible, + **kwargs, + ) + return self.add_trace(new_trace, row=row, col=col) + + def add_scatterpolar( + self, + cliponaxis=None, + connectgaps=None, + customdata=None, + customdatasrc=None, + dr=None, + dtheta=None, + fill=None, + fillcolor=None, + hoverinfo=None, + hoverinfosrc=None, + hoverlabel=None, + hoveron=None, + hovertemplate=None, + hovertemplatefallback=None, + hovertemplatesrc=None, + hovertext=None, + hovertextsrc=None, + ids=None, + idssrc=None, + legend=None, + legendgroup=None, + legendgrouptitle=None, + legendrank=None, + legendwidth=None, + line=None, + marker=None, + meta=None, + metasrc=None, + mode=None, + name=None, + opacity=None, + r=None, + r0=None, + rsrc=None, + selected=None, + selectedpoints=None, + showlegend=None, + stream=None, + subplot=None, + text=None, + textfont=None, + textposition=None, + textpositionsrc=None, + textsrc=None, + texttemplate=None, + texttemplatefallback=None, + texttemplatesrc=None, + theta=None, + theta0=None, + thetasrc=None, + thetaunit=None, + uid=None, + uirevision=None, + unselected=None, + visible=None, + row=None, + col=None, + **kwargs, + ) -> "Figure": + """ + Add a new Scatterpolar trace + + The scatterpolar trace type encompasses line charts, scatter + charts, text charts, and bubble charts in polar coordinates. + The data visualized as scatter point or lines is set in `r` + (radial) and `theta` (angular) coordinates Text (appearing + either on the chart or on hover only) is via `text`. Bubble + charts are achieved by setting `marker.size` and/or + `marker.color` to numerical arrays. + + Parameters + ---------- + cliponaxis + Determines whether or not markers and text nodes are + clipped about the subplot axes. To show markers and + text nodes above axis lines and tick labels, make sure + to set `xaxis.layer` and `yaxis.layer` to *below + traces*. + connectgaps + Determines whether or not gaps (i.e. {nan} or missing + values) in the provided data arrays are connected. + customdata + Assigns extra data each datum. This may be useful when + listening to hover, click and selection events. Note + that, "scatter" traces also appends customdata items in + the markers DOM elements + customdatasrc + Sets the source reference on Chart Studio Cloud for + `customdata`. + dr + Sets the r coordinate step. + dtheta + Sets the theta coordinate step. By default, the + `dtheta` step equals the subplot's period divided by + the length of the `r` coordinates. + fill + Sets the area to fill with a solid color. Use with + `fillcolor` if not "none". scatterpolar has a subset of + the options available to scatter. "toself" connects the + endpoints of the trace (or each segment of the trace if + it has gaps) into a closed shape. "tonext" fills the + space between two traces if one completely encloses the + other (eg consecutive contour lines), and behaves like + "toself" if there is no trace before it. "tonext" + should not be used if one trace does not enclose the + other. + fillcolor + Sets the fill color. Defaults to a half-transparent + variant of the line color, marker color, or marker line + color, whichever is available. + hoverinfo + Determines which trace information appear on hover. If + `none` or `skip` are set, no information is displayed + upon hovering. But, if `none` is set, click and hover + events are still fired. + hoverinfosrc + Sets the source reference on Chart Studio Cloud for + `hoverinfo`. + hoverlabel + :class:`plotly.graph_objects.scatterpolar.Hoverlabel` + instance or dict with compatible properties + hoveron + Do the hover effects highlight individual points + (markers or line points) or do they highlight filled + regions? If the fill is "toself" or "tonext" and there + are no markers or text, then the default is "fills", + otherwise it is "points". + hovertemplate + Template string used for rendering the information that + appear on hover box. Note that this will override + `hoverinfo`. Variables are inserted using %{variable}, + for example "y: %{y}" as well as %{xother}, {%_xother}, + {%_xother_}, {%xother_}. When showing info for several + points, "xother" will be added to those with different + x positions from the first point. An underscore before + or after "(x|y)other" will add a space on that side, + only when this field is shown. Numbers are formatted + using d3-format's syntax %{variable:d3-format}, for + example "Price: %{y:$.2f}". + https://github.com/d3/d3-format/tree/v1.4.5#d3-format + for details on the formatting syntax. Dates are + formatted using d3-time-format's syntax + %{variable|d3-time-format}, for example "Day: + %{2019-01-01|%A}". https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format for details on the + date formatting syntax. Variables that can't be found + will be replaced with the specifier. For example, a + template of "data: %{x}, %{y}" will result in a value + of "data: 1, %{y}" if x is 1 and y is missing. + Variables with an undefined value will be replaced with + the fallback value. The variables available in + `hovertemplate` are the ones emitted as event data + described at this link + https://plotly.com/javascript/plotlyjs-events/#event- + data. Additionally, all attributes that can be + specified per-point (the ones that are `arrayOk: true`) + are available. Anything contained in tag `` is + displayed in the secondary box, for example + `%{fullData.name}`. To hide the + secondary box completely, use an empty tag + ``. + hovertemplatefallback + Fallback string that's displayed when a variable + referenced in a template is missing. If the boolean + value 'false' is passed in, the specifier with the + missing variable will be displayed. + hovertemplatesrc + Sets the source reference on Chart Studio Cloud for + `hovertemplate`. + hovertext + Sets hover text elements associated with each (x,y) + pair. If a single string, the same string appears over + all the data points. If an array of string, the items + are mapped in order to the this trace's (x,y) + coordinates. To be seen, trace `hoverinfo` must contain + a "text" flag. + hovertextsrc + Sets the source reference on Chart Studio Cloud for + `hovertext`. + ids + Assigns id labels to each datum. These ids for object + constancy of data points during animation. Should be an + array of strings, not numbers or any other type. + idssrc + Sets the source reference on Chart Studio Cloud for + `ids`. + legend + Sets the reference to a legend to show this trace in. + References to these legends are "legend", "legend2", + "legend3", etc. Settings for these legends are set in + the layout, under `layout.legend`, `layout.legend2`, + etc. + legendgroup + Sets the legend group for this trace. Traces and shapes + part of the same legend group hide/show at the same + time when toggling legend items. + legendgrouptitle + :class:`plotly.graph_objects.scatterpolar.Legendgroupti + tle` instance or dict with compatible properties + legendrank + Sets the legend rank for this trace. Items and groups + with smaller ranks are presented on top/left side while + with "reversed" `legend.traceorder` they are on + bottom/right side. The default legendrank is 1000, so + that you can use ranks less than 1000 to place certain + items before all unranked items, and ranks greater than + 1000 to go after all unranked items. When having + unranked or equal rank items shapes would be displayed + after traces i.e. according to their order in data and + layout. + legendwidth + Sets the width (in px or fraction) of the legend for + this trace. + line + :class:`plotly.graph_objects.scatterpolar.Line` + instance or dict with compatible properties + marker + :class:`plotly.graph_objects.scatterpolar.Marker` + instance or dict with compatible properties + meta + Assigns extra meta information associated with this + trace that can be used in various text attributes. + Attributes such as trace `name`, graph, axis and + colorbar `title.text`, annotation `text` + `rangeselector`, `updatemenues` and `sliders` `label` + text all support `meta`. To access the trace `meta` + values in an attribute in the same trace, simply use + `%{meta[i]}` where `i` is the index or key of the + `meta` item in question. To access trace `meta` in + layout attributes, use `%{data[n[.meta[i]}` where `i` + is the index or key of the `meta` and `n` is the trace + index. + metasrc + Sets the source reference on Chart Studio Cloud for + `meta`. + mode + Determines the drawing mode for this scatter trace. If + the provided `mode` includes "text" then the `text` + elements appear at the coordinates. Otherwise, the + `text` elements appear on hover. If there are less than + 20 points and the trace is not stacked then the default + is "lines+markers". Otherwise, "lines". + name + Sets the trace name. The trace name appears as the + legend item and on hover. + opacity + Sets the opacity of the trace. + r + Sets the radial coordinates + r0 + Alternate to `r`. Builds a linear space of r + coordinates. Use with `dr` where `r0` is the starting + coordinate and `dr` the step. + rsrc + Sets the source reference on Chart Studio Cloud for + `r`. + selected + :class:`plotly.graph_objects.scatterpolar.Selected` + instance or dict with compatible properties + selectedpoints + Array containing integer indices of selected points. + Has an effect only for traces that support selections. + Note that an empty array means an empty selection where + the `unselected` are turned on for all points, whereas, + any other non-array values means no selection all where + the `selected` and `unselected` styles have no effect. + showlegend + Determines whether or not an item corresponding to this + trace is shown in the legend. + stream + :class:`plotly.graph_objects.scatterpolar.Stream` + instance or dict with compatible properties + subplot + Sets a reference between this trace's data coordinates + and a polar subplot. If "polar" (the default value), + the data refer to `layout.polar`. If "polar2", the data + refer to `layout.polar2`, and so on. + text + Sets text elements associated with each (x,y) pair. If + a single string, the same string appears over all the + data points. If an array of string, the items are + mapped in order to the this trace's (x,y) coordinates. + If trace `hoverinfo` contains a "text" flag and + "hovertext" is not set, these elements will be seen in + the hover labels. + textfont + Sets the text font. + textposition + Sets the positions of the `text` elements with respects + to the (x,y) coordinates. + textpositionsrc + Sets the source reference on Chart Studio Cloud for + `textposition`. + textsrc + Sets the source reference on Chart Studio Cloud for + `text`. + texttemplate + Template string used for rendering the information text + that appears on points. Note that this will override + `textinfo`. Variables are inserted using %{variable}, + for example "y: %{y}". Numbers are formatted using + d3-format's syntax %{variable:d3-format}, for example + "Price: %{y:$.2f}". + https://github.com/d3/d3-format/tree/v1.4.5#d3-format + for details on the formatting syntax. Dates are + formatted using d3-time-format's syntax + %{variable|d3-time-format}, for example "Day: + %{2019-01-01|%A}". https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format for details on the + date formatting syntax. Variables that can't be found + will be replaced with the specifier. For example, a + template of "data: %{x}, %{y}" will result in a value + of "data: 1, %{y}" if x is 1 and y is missing. + Variables with an undefined value will be replaced with + the fallback value. All attributes that can be + specified per-point (the ones that are `arrayOk: true`) + are available. Finally, the template string has access + to variables `r`, `theta` and `text`. + texttemplatefallback + Fallback string that's displayed when a variable + referenced in a template is missing. If the boolean + value 'false' is passed in, the specifier with the + missing variable will be displayed. + texttemplatesrc + Sets the source reference on Chart Studio Cloud for + `texttemplate`. + theta + Sets the angular coordinates + theta0 + Alternate to `theta`. Builds a linear space of theta + coordinates. Use with `dtheta` where `theta0` is the + starting coordinate and `dtheta` the step. + thetasrc + Sets the source reference on Chart Studio Cloud for + `theta`. + thetaunit + Sets the unit of input "theta" values. Has an effect + only when on "linear" angular axes. + uid + Assign an id to this trace, Use this to provide object + constancy between traces during animations and + transitions. + uirevision + Controls persistence of some user-driven changes to the + trace: `constraintrange` in `parcoords` traces, as well + as some `editable: true` modifications such as `name` + and `colorbar.title`. Defaults to `layout.uirevision`. + Note that other user-driven trace attribute changes are + controlled by `layout` attributes: `trace.visible` is + controlled by `layout.legend.uirevision`, + `selectedpoints` is controlled by + `layout.selectionrevision`, and `colorbar.(x|y)` + (accessible with `config: {editable: true}`) is + controlled by `layout.editrevision`. Trace changes are + tracked by `uid`, which only falls back on trace index + if no `uid` is provided. So if your app can add/remove + traces before the end of the `data` array, such that + the same trace has a different index, you can still + preserve user-driven changes if you give each trace a + `uid` that stays with it as it moves. + unselected + :class:`plotly.graph_objects.scatterpolar.Unselected` + instance or dict with compatible properties + visible + Determines whether or not this trace is visible. If + "legendonly", the trace is not drawn, but can appear as + a legend item (provided that the legend itself is + visible). + row : 'all', int or None (default) + Subplot row index (starting from 1) for the trace to be + added. Only valid if figure was created using + `plotly.tools.make_subplots`.If 'all', addresses all + rows in the specified column(s). + col : 'all', int or None (default) + Subplot col index (starting from 1) for the trace to be + added. Only valid if figure was created using + `plotly.tools.make_subplots`.If 'all', addresses all + columns in the specified row(s). + + Returns + ------- + Figure + """ + from plotly.graph_objs import Scatterpolar + + new_trace = Scatterpolar( + cliponaxis=cliponaxis, + connectgaps=connectgaps, + customdata=customdata, + customdatasrc=customdatasrc, + dr=dr, + dtheta=dtheta, + fill=fill, + fillcolor=fillcolor, + hoverinfo=hoverinfo, + hoverinfosrc=hoverinfosrc, + hoverlabel=hoverlabel, + hoveron=hoveron, + hovertemplate=hovertemplate, + hovertemplatefallback=hovertemplatefallback, + hovertemplatesrc=hovertemplatesrc, + hovertext=hovertext, + hovertextsrc=hovertextsrc, + ids=ids, + idssrc=idssrc, + legend=legend, + legendgroup=legendgroup, + legendgrouptitle=legendgrouptitle, + legendrank=legendrank, + legendwidth=legendwidth, + line=line, + marker=marker, + meta=meta, + metasrc=metasrc, + mode=mode, + name=name, + opacity=opacity, + r=r, + r0=r0, + rsrc=rsrc, + selected=selected, + selectedpoints=selectedpoints, + showlegend=showlegend, + stream=stream, + subplot=subplot, + text=text, + textfont=textfont, + textposition=textposition, + textpositionsrc=textpositionsrc, + textsrc=textsrc, + texttemplate=texttemplate, + texttemplatefallback=texttemplatefallback, + texttemplatesrc=texttemplatesrc, + theta=theta, + theta0=theta0, + thetasrc=thetasrc, + thetaunit=thetaunit, + uid=uid, + uirevision=uirevision, + unselected=unselected, + visible=visible, + **kwargs, + ) + return self.add_trace(new_trace, row=row, col=col) + + def add_scatterpolargl( + self, + connectgaps=None, + customdata=None, + customdatasrc=None, + dr=None, + dtheta=None, + fill=None, + fillcolor=None, + hoverinfo=None, + hoverinfosrc=None, + hoverlabel=None, + hovertemplate=None, + hovertemplatefallback=None, + hovertemplatesrc=None, + hovertext=None, + hovertextsrc=None, + ids=None, + idssrc=None, + legend=None, + legendgroup=None, + legendgrouptitle=None, + legendrank=None, + legendwidth=None, + line=None, + marker=None, + meta=None, + metasrc=None, + mode=None, + name=None, + opacity=None, + r=None, + r0=None, + rsrc=None, + selected=None, + selectedpoints=None, + showlegend=None, + stream=None, + subplot=None, + text=None, + textfont=None, + textposition=None, + textpositionsrc=None, + textsrc=None, + texttemplate=None, + texttemplatefallback=None, + texttemplatesrc=None, + theta=None, + theta0=None, + thetasrc=None, + thetaunit=None, + uid=None, + uirevision=None, + unselected=None, + visible=None, + row=None, + col=None, + **kwargs, + ) -> "Figure": + """ + Add a new Scatterpolargl trace + + The scatterpolargl trace type encompasses line charts, scatter + charts, and bubble charts in polar coordinates using the WebGL + plotting engine. The data visualized as scatter point or lines + is set in `r` (radial) and `theta` (angular) coordinates Bubble + charts are achieved by setting `marker.size` and/or + `marker.color` to numerical arrays. + + Parameters + ---------- + connectgaps + Determines whether or not gaps (i.e. {nan} or missing + values) in the provided data arrays are connected. + customdata + Assigns extra data each datum. This may be useful when + listening to hover, click and selection events. Note + that, "scatter" traces also appends customdata items in + the markers DOM elements + customdatasrc + Sets the source reference on Chart Studio Cloud for + `customdata`. + dr + Sets the r coordinate step. + dtheta + Sets the theta coordinate step. By default, the + `dtheta` step equals the subplot's period divided by + the length of the `r` coordinates. + fill + Sets the area to fill with a solid color. Defaults to + "none" unless this trace is stacked, then it gets + "tonexty" ("tonextx") if `orientation` is "v" ("h") Use + with `fillcolor` if not "none". "tozerox" and "tozeroy" + fill to x=0 and y=0 respectively. "tonextx" and + "tonexty" fill between the endpoints of this trace and + the endpoints of the trace before it, connecting those + endpoints with straight lines (to make a stacked area + graph); if there is no trace before it, they behave + like "tozerox" and "tozeroy". "toself" connects the + endpoints of the trace (or each segment of the trace if + it has gaps) into a closed shape. "tonext" fills the + space between two traces if one completely encloses the + other (eg consecutive contour lines), and behaves like + "toself" if there is no trace before it. "tonext" + should not be used if one trace does not enclose the + other. Traces in a `stackgroup` will only fill to (or + be filled to) other traces in the same group. With + multiple `stackgroup`s or some traces stacked and some + not, if fill-linked traces are not already consecutive, + the later ones will be pushed down in the drawing + order. + fillcolor + Sets the fill color. Defaults to a half-transparent + variant of the line color, marker color, or marker line + color, whichever is available. + hoverinfo + Determines which trace information appear on hover. If + `none` or `skip` are set, no information is displayed + upon hovering. But, if `none` is set, click and hover + events are still fired. + hoverinfosrc + Sets the source reference on Chart Studio Cloud for + `hoverinfo`. + hoverlabel + :class:`plotly.graph_objects.scatterpolargl.Hoverlabel` + instance or dict with compatible properties + hovertemplate + Template string used for rendering the information that + appear on hover box. Note that this will override + `hoverinfo`. Variables are inserted using %{variable}, + for example "y: %{y}" as well as %{xother}, {%_xother}, + {%_xother_}, {%xother_}. When showing info for several + points, "xother" will be added to those with different + x positions from the first point. An underscore before + or after "(x|y)other" will add a space on that side, + only when this field is shown. Numbers are formatted + using d3-format's syntax %{variable:d3-format}, for + example "Price: %{y:$.2f}". + https://github.com/d3/d3-format/tree/v1.4.5#d3-format + for details on the formatting syntax. Dates are + formatted using d3-time-format's syntax + %{variable|d3-time-format}, for example "Day: + %{2019-01-01|%A}". https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format for details on the + date formatting syntax. Variables that can't be found + will be replaced with the specifier. For example, a + template of "data: %{x}, %{y}" will result in a value + of "data: 1, %{y}" if x is 1 and y is missing. + Variables with an undefined value will be replaced with + the fallback value. The variables available in + `hovertemplate` are the ones emitted as event data + described at this link + https://plotly.com/javascript/plotlyjs-events/#event- + data. Additionally, all attributes that can be + specified per-point (the ones that are `arrayOk: true`) + are available. Anything contained in tag `` is + displayed in the secondary box, for example + `%{fullData.name}`. To hide the + secondary box completely, use an empty tag + ``. + hovertemplatefallback + Fallback string that's displayed when a variable + referenced in a template is missing. If the boolean + value 'false' is passed in, the specifier with the + missing variable will be displayed. + hovertemplatesrc + Sets the source reference on Chart Studio Cloud for + `hovertemplate`. + hovertext + Sets hover text elements associated with each (x,y) + pair. If a single string, the same string appears over + all the data points. If an array of string, the items + are mapped in order to the this trace's (x,y) + coordinates. To be seen, trace `hoverinfo` must contain + a "text" flag. + hovertextsrc + Sets the source reference on Chart Studio Cloud for + `hovertext`. + ids + Assigns id labels to each datum. These ids for object + constancy of data points during animation. Should be an + array of strings, not numbers or any other type. + idssrc + Sets the source reference on Chart Studio Cloud for + `ids`. + legend + Sets the reference to a legend to show this trace in. + References to these legends are "legend", "legend2", + "legend3", etc. Settings for these legends are set in + the layout, under `layout.legend`, `layout.legend2`, + etc. + legendgroup + Sets the legend group for this trace. Traces and shapes + part of the same legend group hide/show at the same + time when toggling legend items. + legendgrouptitle + :class:`plotly.graph_objects.scatterpolargl.Legendgroup + title` instance or dict with compatible properties + legendrank + Sets the legend rank for this trace. Items and groups + with smaller ranks are presented on top/left side while + with "reversed" `legend.traceorder` they are on + bottom/right side. The default legendrank is 1000, so + that you can use ranks less than 1000 to place certain + items before all unranked items, and ranks greater than + 1000 to go after all unranked items. When having + unranked or equal rank items shapes would be displayed + after traces i.e. according to their order in data and + layout. + legendwidth + Sets the width (in px or fraction) of the legend for + this trace. + line + :class:`plotly.graph_objects.scatterpolargl.Line` + instance or dict with compatible properties + marker + :class:`plotly.graph_objects.scatterpolargl.Marker` + instance or dict with compatible properties + meta + Assigns extra meta information associated with this + trace that can be used in various text attributes. + Attributes such as trace `name`, graph, axis and + colorbar `title.text`, annotation `text` + `rangeselector`, `updatemenues` and `sliders` `label` + text all support `meta`. To access the trace `meta` + values in an attribute in the same trace, simply use + `%{meta[i]}` where `i` is the index or key of the + `meta` item in question. To access trace `meta` in + layout attributes, use `%{data[n[.meta[i]}` where `i` + is the index or key of the `meta` and `n` is the trace + index. + metasrc + Sets the source reference on Chart Studio Cloud for + `meta`. + mode + Determines the drawing mode for this scatter trace. If + the provided `mode` includes "text" then the `text` + elements appear at the coordinates. Otherwise, the + `text` elements appear on hover. If there are less than + 20 points and the trace is not stacked then the default + is "lines+markers". Otherwise, "lines". + name + Sets the trace name. The trace name appears as the + legend item and on hover. + opacity + Sets the opacity of the trace. + r + Sets the radial coordinates + r0 + Alternate to `r`. Builds a linear space of r + coordinates. Use with `dr` where `r0` is the starting + coordinate and `dr` the step. + rsrc + Sets the source reference on Chart Studio Cloud for + `r`. + selected + :class:`plotly.graph_objects.scatterpolargl.Selected` + instance or dict with compatible properties + selectedpoints + Array containing integer indices of selected points. + Has an effect only for traces that support selections. + Note that an empty array means an empty selection where + the `unselected` are turned on for all points, whereas, + any other non-array values means no selection all where + the `selected` and `unselected` styles have no effect. + showlegend + Determines whether or not an item corresponding to this + trace is shown in the legend. + stream + :class:`plotly.graph_objects.scatterpolargl.Stream` + instance or dict with compatible properties + subplot + Sets a reference between this trace's data coordinates + and a polar subplot. If "polar" (the default value), + the data refer to `layout.polar`. If "polar2", the data + refer to `layout.polar2`, and so on. + text + Sets text elements associated with each (x,y) pair. If + a single string, the same string appears over all the + data points. If an array of string, the items are + mapped in order to the this trace's (x,y) coordinates. + If trace `hoverinfo` contains a "text" flag and + "hovertext" is not set, these elements will be seen in + the hover labels. + textfont + Sets the text font. + textposition + Sets the positions of the `text` elements with respects + to the (x,y) coordinates. + textpositionsrc + Sets the source reference on Chart Studio Cloud for + `textposition`. + textsrc + Sets the source reference on Chart Studio Cloud for + `text`. + texttemplate + Template string used for rendering the information text + that appears on points. Note that this will override + `textinfo`. Variables are inserted using %{variable}, + for example "y: %{y}". Numbers are formatted using + d3-format's syntax %{variable:d3-format}, for example + "Price: %{y:$.2f}". + https://github.com/d3/d3-format/tree/v1.4.5#d3-format + for details on the formatting syntax. Dates are + formatted using d3-time-format's syntax + %{variable|d3-time-format}, for example "Day: + %{2019-01-01|%A}". https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format for details on the + date formatting syntax. Variables that can't be found + will be replaced with the specifier. For example, a + template of "data: %{x}, %{y}" will result in a value + of "data: 1, %{y}" if x is 1 and y is missing. + Variables with an undefined value will be replaced with + the fallback value. All attributes that can be + specified per-point (the ones that are `arrayOk: true`) + are available. Finally, the template string has access + to variables `r`, `theta` and `text`. + texttemplatefallback + Fallback string that's displayed when a variable + referenced in a template is missing. If the boolean + value 'false' is passed in, the specifier with the + missing variable will be displayed. + texttemplatesrc + Sets the source reference on Chart Studio Cloud for + `texttemplate`. + theta + Sets the angular coordinates + theta0 + Alternate to `theta`. Builds a linear space of theta + coordinates. Use with `dtheta` where `theta0` is the + starting coordinate and `dtheta` the step. + thetasrc + Sets the source reference on Chart Studio Cloud for + `theta`. + thetaunit + Sets the unit of input "theta" values. Has an effect + only when on "linear" angular axes. + uid + Assign an id to this trace, Use this to provide object + constancy between traces during animations and + transitions. + uirevision + Controls persistence of some user-driven changes to the + trace: `constraintrange` in `parcoords` traces, as well + as some `editable: true` modifications such as `name` + and `colorbar.title`. Defaults to `layout.uirevision`. + Note that other user-driven trace attribute changes are + controlled by `layout` attributes: `trace.visible` is + controlled by `layout.legend.uirevision`, + `selectedpoints` is controlled by + `layout.selectionrevision`, and `colorbar.(x|y)` + (accessible with `config: {editable: true}`) is + controlled by `layout.editrevision`. Trace changes are + tracked by `uid`, which only falls back on trace index + if no `uid` is provided. So if your app can add/remove + traces before the end of the `data` array, such that + the same trace has a different index, you can still + preserve user-driven changes if you give each trace a + `uid` that stays with it as it moves. + unselected + :class:`plotly.graph_objects.scatterpolargl.Unselected` + instance or dict with compatible properties + visible + Determines whether or not this trace is visible. If + "legendonly", the trace is not drawn, but can appear as + a legend item (provided that the legend itself is + visible). + row : 'all', int or None (default) + Subplot row index (starting from 1) for the trace to be + added. Only valid if figure was created using + `plotly.tools.make_subplots`.If 'all', addresses all + rows in the specified column(s). + col : 'all', int or None (default) + Subplot col index (starting from 1) for the trace to be + added. Only valid if figure was created using + `plotly.tools.make_subplots`.If 'all', addresses all + columns in the specified row(s). + + Returns + ------- + Figure + """ + from plotly.graph_objs import Scatterpolargl + + new_trace = Scatterpolargl( + connectgaps=connectgaps, + customdata=customdata, + customdatasrc=customdatasrc, + dr=dr, + dtheta=dtheta, + fill=fill, + fillcolor=fillcolor, + hoverinfo=hoverinfo, + hoverinfosrc=hoverinfosrc, + hoverlabel=hoverlabel, + hovertemplate=hovertemplate, + hovertemplatefallback=hovertemplatefallback, + hovertemplatesrc=hovertemplatesrc, + hovertext=hovertext, + hovertextsrc=hovertextsrc, + ids=ids, + idssrc=idssrc, + legend=legend, + legendgroup=legendgroup, + legendgrouptitle=legendgrouptitle, + legendrank=legendrank, + legendwidth=legendwidth, + line=line, + marker=marker, + meta=meta, + metasrc=metasrc, + mode=mode, + name=name, + opacity=opacity, + r=r, + r0=r0, + rsrc=rsrc, + selected=selected, + selectedpoints=selectedpoints, + showlegend=showlegend, + stream=stream, + subplot=subplot, + text=text, + textfont=textfont, + textposition=textposition, + textpositionsrc=textpositionsrc, + textsrc=textsrc, + texttemplate=texttemplate, + texttemplatefallback=texttemplatefallback, + texttemplatesrc=texttemplatesrc, + theta=theta, + theta0=theta0, + thetasrc=thetasrc, + thetaunit=thetaunit, + uid=uid, + uirevision=uirevision, + unselected=unselected, + visible=visible, + **kwargs, + ) + return self.add_trace(new_trace, row=row, col=col) + + def add_scattersmith( + self, + cliponaxis=None, + connectgaps=None, + customdata=None, + customdatasrc=None, + fill=None, + fillcolor=None, + hoverinfo=None, + hoverinfosrc=None, + hoverlabel=None, + hoveron=None, + hovertemplate=None, + hovertemplatefallback=None, + hovertemplatesrc=None, + hovertext=None, + hovertextsrc=None, + ids=None, + idssrc=None, + imag=None, + imagsrc=None, + legend=None, + legendgroup=None, + legendgrouptitle=None, + legendrank=None, + legendwidth=None, + line=None, + marker=None, + meta=None, + metasrc=None, + mode=None, + name=None, + opacity=None, + real=None, + realsrc=None, + selected=None, + selectedpoints=None, + showlegend=None, + stream=None, + subplot=None, + text=None, + textfont=None, + textposition=None, + textpositionsrc=None, + textsrc=None, + texttemplate=None, + texttemplatefallback=None, + texttemplatesrc=None, + uid=None, + uirevision=None, + unselected=None, + visible=None, + row=None, + col=None, + **kwargs, + ) -> "Figure": + """ + Add a new Scattersmith trace + + The scattersmith trace type encompasses line charts, scatter + charts, text charts, and bubble charts in smith coordinates. + The data visualized as scatter point or lines is set in `real` + and `imag` (imaginary) coordinates Text (appearing either on + the chart or on hover only) is via `text`. Bubble charts are + achieved by setting `marker.size` and/or `marker.color` to + numerical arrays. + + Parameters + ---------- + cliponaxis + Determines whether or not markers and text nodes are + clipped about the subplot axes. To show markers and + text nodes above axis lines and tick labels, make sure + to set `xaxis.layer` and `yaxis.layer` to *below + traces*. + connectgaps + Determines whether or not gaps (i.e. {nan} or missing + values) in the provided data arrays are connected. + customdata + Assigns extra data each datum. This may be useful when + listening to hover, click and selection events. Note + that, "scatter" traces also appends customdata items in + the markers DOM elements + customdatasrc + Sets the source reference on Chart Studio Cloud for + `customdata`. + fill + Sets the area to fill with a solid color. Use with + `fillcolor` if not "none". scattersmith has a subset of + the options available to scatter. "toself" connects the + endpoints of the trace (or each segment of the trace if + it has gaps) into a closed shape. "tonext" fills the + space between two traces if one completely encloses the + other (eg consecutive contour lines), and behaves like + "toself" if there is no trace before it. "tonext" + should not be used if one trace does not enclose the + other. + fillcolor + Sets the fill color. Defaults to a half-transparent + variant of the line color, marker color, or marker line + color, whichever is available. + hoverinfo + Determines which trace information appear on hover. If + `none` or `skip` are set, no information is displayed + upon hovering. But, if `none` is set, click and hover + events are still fired. + hoverinfosrc + Sets the source reference on Chart Studio Cloud for + `hoverinfo`. + hoverlabel + :class:`plotly.graph_objects.scattersmith.Hoverlabel` + instance or dict with compatible properties + hoveron + Do the hover effects highlight individual points + (markers or line points) or do they highlight filled + regions? If the fill is "toself" or "tonext" and there + are no markers or text, then the default is "fills", + otherwise it is "points". + hovertemplate + Template string used for rendering the information that + appear on hover box. Note that this will override + `hoverinfo`. Variables are inserted using %{variable}, + for example "y: %{y}" as well as %{xother}, {%_xother}, + {%_xother_}, {%xother_}. When showing info for several + points, "xother" will be added to those with different + x positions from the first point. An underscore before + or after "(x|y)other" will add a space on that side, + only when this field is shown. Numbers are formatted + using d3-format's syntax %{variable:d3-format}, for + example "Price: %{y:$.2f}". + https://github.com/d3/d3-format/tree/v1.4.5#d3-format + for details on the formatting syntax. Dates are + formatted using d3-time-format's syntax + %{variable|d3-time-format}, for example "Day: + %{2019-01-01|%A}". https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format for details on the + date formatting syntax. Variables that can't be found + will be replaced with the specifier. For example, a + template of "data: %{x}, %{y}" will result in a value + of "data: 1, %{y}" if x is 1 and y is missing. + Variables with an undefined value will be replaced with + the fallback value. The variables available in + `hovertemplate` are the ones emitted as event data + described at this link + https://plotly.com/javascript/plotlyjs-events/#event- + data. Additionally, all attributes that can be + specified per-point (the ones that are `arrayOk: true`) + are available. Anything contained in tag `` is + displayed in the secondary box, for example + `%{fullData.name}`. To hide the + secondary box completely, use an empty tag + ``. + hovertemplatefallback + Fallback string that's displayed when a variable + referenced in a template is missing. If the boolean + value 'false' is passed in, the specifier with the + missing variable will be displayed. + hovertemplatesrc + Sets the source reference on Chart Studio Cloud for + `hovertemplate`. + hovertext + Sets hover text elements associated with each (x,y) + pair. If a single string, the same string appears over + all the data points. If an array of string, the items + are mapped in order to the this trace's (x,y) + coordinates. To be seen, trace `hoverinfo` must contain + a "text" flag. + hovertextsrc + Sets the source reference on Chart Studio Cloud for + `hovertext`. + ids + Assigns id labels to each datum. These ids for object + constancy of data points during animation. Should be an + array of strings, not numbers or any other type. + idssrc + Sets the source reference on Chart Studio Cloud for + `ids`. + imag + Sets the imaginary component of the data, in units of + normalized impedance such that real=1, imag=0 is the + center of the chart. + imagsrc + Sets the source reference on Chart Studio Cloud for + `imag`. + legend + Sets the reference to a legend to show this trace in. + References to these legends are "legend", "legend2", + "legend3", etc. Settings for these legends are set in + the layout, under `layout.legend`, `layout.legend2`, + etc. + legendgroup + Sets the legend group for this trace. Traces and shapes + part of the same legend group hide/show at the same + time when toggling legend items. + legendgrouptitle + :class:`plotly.graph_objects.scattersmith.Legendgroupti + tle` instance or dict with compatible properties + legendrank + Sets the legend rank for this trace. Items and groups + with smaller ranks are presented on top/left side while + with "reversed" `legend.traceorder` they are on + bottom/right side. The default legendrank is 1000, so + that you can use ranks less than 1000 to place certain + items before all unranked items, and ranks greater than + 1000 to go after all unranked items. When having + unranked or equal rank items shapes would be displayed + after traces i.e. according to their order in data and + layout. + legendwidth + Sets the width (in px or fraction) of the legend for + this trace. + line + :class:`plotly.graph_objects.scattersmith.Line` + instance or dict with compatible properties + marker + :class:`plotly.graph_objects.scattersmith.Marker` + instance or dict with compatible properties + meta + Assigns extra meta information associated with this + trace that can be used in various text attributes. + Attributes such as trace `name`, graph, axis and + colorbar `title.text`, annotation `text` + `rangeselector`, `updatemenues` and `sliders` `label` + text all support `meta`. To access the trace `meta` + values in an attribute in the same trace, simply use + `%{meta[i]}` where `i` is the index or key of the + `meta` item in question. To access trace `meta` in + layout attributes, use `%{data[n[.meta[i]}` where `i` + is the index or key of the `meta` and `n` is the trace + index. + metasrc + Sets the source reference on Chart Studio Cloud for + `meta`. + mode + Determines the drawing mode for this scatter trace. If + the provided `mode` includes "text" then the `text` + elements appear at the coordinates. Otherwise, the + `text` elements appear on hover. If there are less than + 20 points and the trace is not stacked then the default + is "lines+markers". Otherwise, "lines". + name + Sets the trace name. The trace name appears as the + legend item and on hover. + opacity + Sets the opacity of the trace. + real + Sets the real component of the data, in units of + normalized impedance such that real=1, imag=0 is the + center of the chart. + realsrc + Sets the source reference on Chart Studio Cloud for + `real`. + selected + :class:`plotly.graph_objects.scattersmith.Selected` + instance or dict with compatible properties + selectedpoints + Array containing integer indices of selected points. + Has an effect only for traces that support selections. + Note that an empty array means an empty selection where + the `unselected` are turned on for all points, whereas, + any other non-array values means no selection all where + the `selected` and `unselected` styles have no effect. + showlegend + Determines whether or not an item corresponding to this + trace is shown in the legend. + stream + :class:`plotly.graph_objects.scattersmith.Stream` + instance or dict with compatible properties + subplot + Sets a reference between this trace's data coordinates + and a smith subplot. If "smith" (the default value), + the data refer to `layout.smith`. If "smith2", the data + refer to `layout.smith2`, and so on. + text + Sets text elements associated with each (x,y) pair. If + a single string, the same string appears over all the + data points. If an array of string, the items are + mapped in order to the this trace's (x,y) coordinates. + If trace `hoverinfo` contains a "text" flag and + "hovertext" is not set, these elements will be seen in + the hover labels. + textfont + Sets the text font. + textposition + Sets the positions of the `text` elements with respects + to the (x,y) coordinates. + textpositionsrc + Sets the source reference on Chart Studio Cloud for + `textposition`. + textsrc + Sets the source reference on Chart Studio Cloud for + `text`. + texttemplate + Template string used for rendering the information text + that appears on points. Note that this will override + `textinfo`. Variables are inserted using %{variable}, + for example "y: %{y}". Numbers are formatted using + d3-format's syntax %{variable:d3-format}, for example + "Price: %{y:$.2f}". + https://github.com/d3/d3-format/tree/v1.4.5#d3-format + for details on the formatting syntax. Dates are + formatted using d3-time-format's syntax + %{variable|d3-time-format}, for example "Day: + %{2019-01-01|%A}". https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format for details on the + date formatting syntax. Variables that can't be found + will be replaced with the specifier. For example, a + template of "data: %{x}, %{y}" will result in a value + of "data: 1, %{y}" if x is 1 and y is missing. + Variables with an undefined value will be replaced with + the fallback value. All attributes that can be + specified per-point (the ones that are `arrayOk: true`) + are available. Finally, the template string has access + to variables `real`, `imag` and `text`. + texttemplatefallback + Fallback string that's displayed when a variable + referenced in a template is missing. If the boolean + value 'false' is passed in, the specifier with the + missing variable will be displayed. + texttemplatesrc + Sets the source reference on Chart Studio Cloud for + `texttemplate`. + uid + Assign an id to this trace, Use this to provide object + constancy between traces during animations and + transitions. + uirevision + Controls persistence of some user-driven changes to the + trace: `constraintrange` in `parcoords` traces, as well + as some `editable: true` modifications such as `name` + and `colorbar.title`. Defaults to `layout.uirevision`. + Note that other user-driven trace attribute changes are + controlled by `layout` attributes: `trace.visible` is + controlled by `layout.legend.uirevision`, + `selectedpoints` is controlled by + `layout.selectionrevision`, and `colorbar.(x|y)` + (accessible with `config: {editable: true}`) is + controlled by `layout.editrevision`. Trace changes are + tracked by `uid`, which only falls back on trace index + if no `uid` is provided. So if your app can add/remove + traces before the end of the `data` array, such that + the same trace has a different index, you can still + preserve user-driven changes if you give each trace a + `uid` that stays with it as it moves. + unselected + :class:`plotly.graph_objects.scattersmith.Unselected` + instance or dict with compatible properties + visible + Determines whether or not this trace is visible. If + "legendonly", the trace is not drawn, but can appear as + a legend item (provided that the legend itself is + visible). + row : 'all', int or None (default) + Subplot row index (starting from 1) for the trace to be + added. Only valid if figure was created using + `plotly.tools.make_subplots`.If 'all', addresses all + rows in the specified column(s). + col : 'all', int or None (default) + Subplot col index (starting from 1) for the trace to be + added. Only valid if figure was created using + `plotly.tools.make_subplots`.If 'all', addresses all + columns in the specified row(s). + + Returns + ------- + Figure + """ + from plotly.graph_objs import Scattersmith + + new_trace = Scattersmith( + cliponaxis=cliponaxis, + connectgaps=connectgaps, + customdata=customdata, + customdatasrc=customdatasrc, + fill=fill, + fillcolor=fillcolor, + hoverinfo=hoverinfo, + hoverinfosrc=hoverinfosrc, + hoverlabel=hoverlabel, + hoveron=hoveron, + hovertemplate=hovertemplate, + hovertemplatefallback=hovertemplatefallback, + hovertemplatesrc=hovertemplatesrc, + hovertext=hovertext, + hovertextsrc=hovertextsrc, + ids=ids, + idssrc=idssrc, + imag=imag, + imagsrc=imagsrc, + legend=legend, + legendgroup=legendgroup, + legendgrouptitle=legendgrouptitle, + legendrank=legendrank, + legendwidth=legendwidth, + line=line, + marker=marker, + meta=meta, + metasrc=metasrc, + mode=mode, + name=name, + opacity=opacity, + real=real, + realsrc=realsrc, + selected=selected, + selectedpoints=selectedpoints, + showlegend=showlegend, + stream=stream, + subplot=subplot, + text=text, + textfont=textfont, + textposition=textposition, + textpositionsrc=textpositionsrc, + textsrc=textsrc, + texttemplate=texttemplate, + texttemplatefallback=texttemplatefallback, + texttemplatesrc=texttemplatesrc, + uid=uid, + uirevision=uirevision, + unselected=unselected, + visible=visible, + **kwargs, + ) + return self.add_trace(new_trace, row=row, col=col) + + def add_scatterternary( + self, + a=None, + asrc=None, + b=None, + bsrc=None, + c=None, + cliponaxis=None, + connectgaps=None, + csrc=None, + customdata=None, + customdatasrc=None, + fill=None, + fillcolor=None, + hoverinfo=None, + hoverinfosrc=None, + hoverlabel=None, + hoveron=None, + hovertemplate=None, + hovertemplatefallback=None, + hovertemplatesrc=None, + hovertext=None, + hovertextsrc=None, + ids=None, + idssrc=None, + legend=None, + legendgroup=None, + legendgrouptitle=None, + legendrank=None, + legendwidth=None, + line=None, + marker=None, + meta=None, + metasrc=None, + mode=None, + name=None, + opacity=None, + selected=None, + selectedpoints=None, + showlegend=None, + stream=None, + subplot=None, + sum=None, + text=None, + textfont=None, + textposition=None, + textpositionsrc=None, + textsrc=None, + texttemplate=None, + texttemplatefallback=None, + texttemplatesrc=None, + uid=None, + uirevision=None, + unselected=None, + visible=None, + row=None, + col=None, + **kwargs, + ) -> "Figure": + """ + Add a new Scatterternary trace + + Provides similar functionality to the "scatter" type but on a + ternary phase diagram. The data is provided by at least two + arrays out of `a`, `b`, `c` triplets. + + Parameters + ---------- + a + Sets the quantity of component `a` in each data point. + If `a`, `b`, and `c` are all provided, they need not be + normalized, only the relative values matter. If only + two arrays are provided they must be normalized to + match `ternary.sum`. + asrc + Sets the source reference on Chart Studio Cloud for + `a`. + b + Sets the quantity of component `a` in each data point. + If `a`, `b`, and `c` are all provided, they need not be + normalized, only the relative values matter. If only + two arrays are provided they must be normalized to + match `ternary.sum`. + bsrc + Sets the source reference on Chart Studio Cloud for + `b`. + c + Sets the quantity of component `a` in each data point. + If `a`, `b`, and `c` are all provided, they need not be + normalized, only the relative values matter. If only + two arrays are provided they must be normalized to + match `ternary.sum`. + cliponaxis + Determines whether or not markers and text nodes are + clipped about the subplot axes. To show markers and + text nodes above axis lines and tick labels, make sure + to set `xaxis.layer` and `yaxis.layer` to *below + traces*. + connectgaps + Determines whether or not gaps (i.e. {nan} or missing + values) in the provided data arrays are connected. + csrc + Sets the source reference on Chart Studio Cloud for + `c`. + customdata + Assigns extra data each datum. This may be useful when + listening to hover, click and selection events. Note + that, "scatter" traces also appends customdata items in + the markers DOM elements + customdatasrc + Sets the source reference on Chart Studio Cloud for + `customdata`. + fill + Sets the area to fill with a solid color. Use with + `fillcolor` if not "none". scatterternary has a subset + of the options available to scatter. "toself" connects + the endpoints of the trace (or each segment of the + trace if it has gaps) into a closed shape. "tonext" + fills the space between two traces if one completely + encloses the other (eg consecutive contour lines), and + behaves like "toself" if there is no trace before it. + "tonext" should not be used if one trace does not + enclose the other. + fillcolor + Sets the fill color. Defaults to a half-transparent + variant of the line color, marker color, or marker line + color, whichever is available. + hoverinfo + Determines which trace information appear on hover. If + `none` or `skip` are set, no information is displayed + upon hovering. But, if `none` is set, click and hover + events are still fired. + hoverinfosrc + Sets the source reference on Chart Studio Cloud for + `hoverinfo`. + hoverlabel + :class:`plotly.graph_objects.scatterternary.Hoverlabel` + instance or dict with compatible properties + hoveron + Do the hover effects highlight individual points + (markers or line points) or do they highlight filled + regions? If the fill is "toself" or "tonext" and there + are no markers or text, then the default is "fills", + otherwise it is "points". + hovertemplate + Template string used for rendering the information that + appear on hover box. Note that this will override + `hoverinfo`. Variables are inserted using %{variable}, + for example "y: %{y}" as well as %{xother}, {%_xother}, + {%_xother_}, {%xother_}. When showing info for several + points, "xother" will be added to those with different + x positions from the first point. An underscore before + or after "(x|y)other" will add a space on that side, + only when this field is shown. Numbers are formatted + using d3-format's syntax %{variable:d3-format}, for + example "Price: %{y:$.2f}". + https://github.com/d3/d3-format/tree/v1.4.5#d3-format + for details on the formatting syntax. Dates are + formatted using d3-time-format's syntax + %{variable|d3-time-format}, for example "Day: + %{2019-01-01|%A}". https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format for details on the + date formatting syntax. Variables that can't be found + will be replaced with the specifier. For example, a + template of "data: %{x}, %{y}" will result in a value + of "data: 1, %{y}" if x is 1 and y is missing. + Variables with an undefined value will be replaced with + the fallback value. The variables available in + `hovertemplate` are the ones emitted as event data + described at this link + https://plotly.com/javascript/plotlyjs-events/#event- + data. Additionally, all attributes that can be + specified per-point (the ones that are `arrayOk: true`) + are available. Anything contained in tag `` is + displayed in the secondary box, for example + `%{fullData.name}`. To hide the + secondary box completely, use an empty tag + ``. + hovertemplatefallback + Fallback string that's displayed when a variable + referenced in a template is missing. If the boolean + value 'false' is passed in, the specifier with the + missing variable will be displayed. + hovertemplatesrc + Sets the source reference on Chart Studio Cloud for + `hovertemplate`. + hovertext + Sets hover text elements associated with each (a,b,c) + point. If a single string, the same string appears over + all the data points. If an array of strings, the items + are mapped in order to the the data points in (a,b,c). + To be seen, trace `hoverinfo` must contain a "text" + flag. + hovertextsrc + Sets the source reference on Chart Studio Cloud for + `hovertext`. + ids + Assigns id labels to each datum. These ids for object + constancy of data points during animation. Should be an + array of strings, not numbers or any other type. + idssrc + Sets the source reference on Chart Studio Cloud for + `ids`. + legend + Sets the reference to a legend to show this trace in. + References to these legends are "legend", "legend2", + "legend3", etc. Settings for these legends are set in + the layout, under `layout.legend`, `layout.legend2`, + etc. + legendgroup + Sets the legend group for this trace. Traces and shapes + part of the same legend group hide/show at the same + time when toggling legend items. + legendgrouptitle + :class:`plotly.graph_objects.scatterternary.Legendgroup + title` instance or dict with compatible properties + legendrank + Sets the legend rank for this trace. Items and groups + with smaller ranks are presented on top/left side while + with "reversed" `legend.traceorder` they are on + bottom/right side. The default legendrank is 1000, so + that you can use ranks less than 1000 to place certain + items before all unranked items, and ranks greater than + 1000 to go after all unranked items. When having + unranked or equal rank items shapes would be displayed + after traces i.e. according to their order in data and + layout. + legendwidth + Sets the width (in px or fraction) of the legend for + this trace. + line + :class:`plotly.graph_objects.scatterternary.Line` + instance or dict with compatible properties + marker + :class:`plotly.graph_objects.scatterternary.Marker` + instance or dict with compatible properties + meta + Assigns extra meta information associated with this + trace that can be used in various text attributes. + Attributes such as trace `name`, graph, axis and + colorbar `title.text`, annotation `text` + `rangeselector`, `updatemenues` and `sliders` `label` + text all support `meta`. To access the trace `meta` + values in an attribute in the same trace, simply use + `%{meta[i]}` where `i` is the index or key of the + `meta` item in question. To access trace `meta` in + layout attributes, use `%{data[n[.meta[i]}` where `i` + is the index or key of the `meta` and `n` is the trace + index. + metasrc + Sets the source reference on Chart Studio Cloud for + `meta`. + mode + Determines the drawing mode for this scatter trace. If + the provided `mode` includes "text" then the `text` + elements appear at the coordinates. Otherwise, the + `text` elements appear on hover. If there are less than + 20 points and the trace is not stacked then the default + is "lines+markers". Otherwise, "lines". + name + Sets the trace name. The trace name appears as the + legend item and on hover. + opacity + Sets the opacity of the trace. + selected + :class:`plotly.graph_objects.scatterternary.Selected` + instance or dict with compatible properties + selectedpoints + Array containing integer indices of selected points. + Has an effect only for traces that support selections. + Note that an empty array means an empty selection where + the `unselected` are turned on for all points, whereas, + any other non-array values means no selection all where + the `selected` and `unselected` styles have no effect. + showlegend + Determines whether or not an item corresponding to this + trace is shown in the legend. + stream + :class:`plotly.graph_objects.scatterternary.Stream` + instance or dict with compatible properties + subplot + Sets a reference between this trace's data coordinates + and a ternary subplot. If "ternary" (the default + value), the data refer to `layout.ternary`. If + "ternary2", the data refer to `layout.ternary2`, and so + on. + sum + The number each triplet should sum to, if only two of + `a`, `b`, and `c` are provided. This overrides + `ternary.sum` to normalize this specific trace, but + does not affect the values displayed on the axes. 0 (or + missing) means to use ternary.sum + text + Sets text elements associated with each (a,b,c) point. + If a single string, the same string appears over all + the data points. If an array of strings, the items are + mapped in order to the the data points in (a,b,c). If + trace `hoverinfo` contains a "text" flag and + "hovertext" is not set, these elements will be seen in + the hover labels. + textfont + Sets the text font. + textposition + Sets the positions of the `text` elements with respects + to the (x,y) coordinates. + textpositionsrc + Sets the source reference on Chart Studio Cloud for + `textposition`. + textsrc + Sets the source reference on Chart Studio Cloud for + `text`. + texttemplate + Template string used for rendering the information text + that appears on points. Note that this will override + `textinfo`. Variables are inserted using %{variable}, + for example "y: %{y}". Numbers are formatted using + d3-format's syntax %{variable:d3-format}, for example + "Price: %{y:$.2f}". + https://github.com/d3/d3-format/tree/v1.4.5#d3-format + for details on the formatting syntax. Dates are + formatted using d3-time-format's syntax + %{variable|d3-time-format}, for example "Day: + %{2019-01-01|%A}". https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format for details on the + date formatting syntax. Variables that can't be found + will be replaced with the specifier. For example, a + template of "data: %{x}, %{y}" will result in a value + of "data: 1, %{y}" if x is 1 and y is missing. + Variables with an undefined value will be replaced with + the fallback value. All attributes that can be + specified per-point (the ones that are `arrayOk: true`) + are available. Finally, the template string has access + to variables `a`, `b`, `c` and `text`. + texttemplatefallback + Fallback string that's displayed when a variable + referenced in a template is missing. If the boolean + value 'false' is passed in, the specifier with the + missing variable will be displayed. + texttemplatesrc + Sets the source reference on Chart Studio Cloud for + `texttemplate`. + uid + Assign an id to this trace, Use this to provide object + constancy between traces during animations and + transitions. + uirevision + Controls persistence of some user-driven changes to the + trace: `constraintrange` in `parcoords` traces, as well + as some `editable: true` modifications such as `name` + and `colorbar.title`. Defaults to `layout.uirevision`. + Note that other user-driven trace attribute changes are + controlled by `layout` attributes: `trace.visible` is + controlled by `layout.legend.uirevision`, + `selectedpoints` is controlled by + `layout.selectionrevision`, and `colorbar.(x|y)` + (accessible with `config: {editable: true}`) is + controlled by `layout.editrevision`. Trace changes are + tracked by `uid`, which only falls back on trace index + if no `uid` is provided. So if your app can add/remove + traces before the end of the `data` array, such that + the same trace has a different index, you can still + preserve user-driven changes if you give each trace a + `uid` that stays with it as it moves. + unselected + :class:`plotly.graph_objects.scatterternary.Unselected` + instance or dict with compatible properties + visible + Determines whether or not this trace is visible. If + "legendonly", the trace is not drawn, but can appear as + a legend item (provided that the legend itself is + visible). + row : 'all', int or None (default) + Subplot row index (starting from 1) for the trace to be + added. Only valid if figure was created using + `plotly.tools.make_subplots`.If 'all', addresses all + rows in the specified column(s). + col : 'all', int or None (default) + Subplot col index (starting from 1) for the trace to be + added. Only valid if figure was created using + `plotly.tools.make_subplots`.If 'all', addresses all + columns in the specified row(s). + + Returns + ------- + Figure + """ + from plotly.graph_objs import Scatterternary + + new_trace = Scatterternary( + a=a, + asrc=asrc, + b=b, + bsrc=bsrc, + c=c, + cliponaxis=cliponaxis, + connectgaps=connectgaps, + csrc=csrc, + customdata=customdata, + customdatasrc=customdatasrc, + fill=fill, + fillcolor=fillcolor, + hoverinfo=hoverinfo, + hoverinfosrc=hoverinfosrc, + hoverlabel=hoverlabel, + hoveron=hoveron, + hovertemplate=hovertemplate, + hovertemplatefallback=hovertemplatefallback, + hovertemplatesrc=hovertemplatesrc, + hovertext=hovertext, + hovertextsrc=hovertextsrc, + ids=ids, + idssrc=idssrc, + legend=legend, + legendgroup=legendgroup, + legendgrouptitle=legendgrouptitle, + legendrank=legendrank, + legendwidth=legendwidth, + line=line, + marker=marker, + meta=meta, + metasrc=metasrc, + mode=mode, + name=name, + opacity=opacity, + selected=selected, + selectedpoints=selectedpoints, + showlegend=showlegend, + stream=stream, + subplot=subplot, + sum=sum, + text=text, + textfont=textfont, + textposition=textposition, + textpositionsrc=textpositionsrc, + textsrc=textsrc, + texttemplate=texttemplate, + texttemplatefallback=texttemplatefallback, + texttemplatesrc=texttemplatesrc, + uid=uid, + uirevision=uirevision, + unselected=unselected, + visible=visible, + **kwargs, + ) + return self.add_trace(new_trace, row=row, col=col) + + def add_splom( + self, + customdata=None, + customdatasrc=None, + diagonal=None, + dimensions=None, + dimensiondefaults=None, + hoverinfo=None, + hoverinfosrc=None, + hoverlabel=None, + hovertemplate=None, + hovertemplatefallback=None, + hovertemplatesrc=None, + hovertext=None, + hovertextsrc=None, + ids=None, + idssrc=None, + legend=None, + legendgroup=None, + legendgrouptitle=None, + legendrank=None, + legendwidth=None, + marker=None, + meta=None, + metasrc=None, + name=None, + opacity=None, + selected=None, + selectedpoints=None, + showlegend=None, + showlowerhalf=None, + showupperhalf=None, + stream=None, + text=None, + textsrc=None, + uid=None, + uirevision=None, + unselected=None, + visible=None, + xaxes=None, + xhoverformat=None, + yaxes=None, + yhoverformat=None, + row=None, + col=None, + **kwargs, + ) -> "Figure": + """ + Add a new Splom trace + + Splom traces generate scatter plot matrix visualizations. Each + splom `dimensions` items correspond to a generated axis. Values + for each of those dimensions are set in `dimensions[i].values`. + Splom traces support all `scattergl` marker style attributes. + Specify `layout.grid` attributes and/or layout x-axis and + y-axis attributes for more control over the axis positioning + and style. + + Parameters + ---------- + customdata + Assigns extra data each datum. This may be useful when + listening to hover, click and selection events. Note + that, "scatter" traces also appends customdata items in + the markers DOM elements + customdatasrc + Sets the source reference on Chart Studio Cloud for + `customdata`. + diagonal + :class:`plotly.graph_objects.splom.Diagonal` instance + or dict with compatible properties + dimensions + A tuple of + :class:`plotly.graph_objects.splom.Dimension` instances + or dicts with compatible properties + dimensiondefaults + When used in a template (as + layout.template.data.splom.dimensiondefaults), sets the + default property values to use for elements of + splom.dimensions + hoverinfo + Determines which trace information appear on hover. If + `none` or `skip` are set, no information is displayed + upon hovering. But, if `none` is set, click and hover + events are still fired. + hoverinfosrc + Sets the source reference on Chart Studio Cloud for + `hoverinfo`. + hoverlabel + :class:`plotly.graph_objects.splom.Hoverlabel` instance + or dict with compatible properties + hovertemplate + Template string used for rendering the information that + appear on hover box. Note that this will override + `hoverinfo`. Variables are inserted using %{variable}, + for example "y: %{y}" as well as %{xother}, {%_xother}, + {%_xother_}, {%xother_}. When showing info for several + points, "xother" will be added to those with different + x positions from the first point. An underscore before + or after "(x|y)other" will add a space on that side, + only when this field is shown. Numbers are formatted + using d3-format's syntax %{variable:d3-format}, for + example "Price: %{y:$.2f}". + https://github.com/d3/d3-format/tree/v1.4.5#d3-format + for details on the formatting syntax. Dates are + formatted using d3-time-format's syntax + %{variable|d3-time-format}, for example "Day: + %{2019-01-01|%A}". https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format for details on the + date formatting syntax. Variables that can't be found + will be replaced with the specifier. For example, a + template of "data: %{x}, %{y}" will result in a value + of "data: 1, %{y}" if x is 1 and y is missing. + Variables with an undefined value will be replaced with + the fallback value. The variables available in + `hovertemplate` are the ones emitted as event data + described at this link + https://plotly.com/javascript/plotlyjs-events/#event- + data. Additionally, all attributes that can be + specified per-point (the ones that are `arrayOk: true`) + are available. Anything contained in tag `` is + displayed in the secondary box, for example + `%{fullData.name}`. To hide the + secondary box completely, use an empty tag + ``. + hovertemplatefallback + Fallback string that's displayed when a variable + referenced in a template is missing. If the boolean + value 'false' is passed in, the specifier with the + missing variable will be displayed. + hovertemplatesrc + Sets the source reference on Chart Studio Cloud for + `hovertemplate`. + hovertext + Same as `text`. + hovertextsrc + Sets the source reference on Chart Studio Cloud for + `hovertext`. + ids + Assigns id labels to each datum. These ids for object + constancy of data points during animation. Should be an + array of strings, not numbers or any other type. + idssrc + Sets the source reference on Chart Studio Cloud for + `ids`. + legend + Sets the reference to a legend to show this trace in. + References to these legends are "legend", "legend2", + "legend3", etc. Settings for these legends are set in + the layout, under `layout.legend`, `layout.legend2`, + etc. + legendgroup + Sets the legend group for this trace. Traces and shapes + part of the same legend group hide/show at the same + time when toggling legend items. + legendgrouptitle + :class:`plotly.graph_objects.splom.Legendgrouptitle` + instance or dict with compatible properties + legendrank + Sets the legend rank for this trace. Items and groups + with smaller ranks are presented on top/left side while + with "reversed" `legend.traceorder` they are on + bottom/right side. The default legendrank is 1000, so + that you can use ranks less than 1000 to place certain + items before all unranked items, and ranks greater than + 1000 to go after all unranked items. When having + unranked or equal rank items shapes would be displayed + after traces i.e. according to their order in data and + layout. + legendwidth + Sets the width (in px or fraction) of the legend for + this trace. + marker + :class:`plotly.graph_objects.splom.Marker` instance or + dict with compatible properties + meta + Assigns extra meta information associated with this + trace that can be used in various text attributes. + Attributes such as trace `name`, graph, axis and + colorbar `title.text`, annotation `text` + `rangeselector`, `updatemenues` and `sliders` `label` + text all support `meta`. To access the trace `meta` + values in an attribute in the same trace, simply use + `%{meta[i]}` where `i` is the index or key of the + `meta` item in question. To access trace `meta` in + layout attributes, use `%{data[n[.meta[i]}` where `i` + is the index or key of the `meta` and `n` is the trace + index. + metasrc + Sets the source reference on Chart Studio Cloud for + `meta`. + name + Sets the trace name. The trace name appears as the + legend item and on hover. + opacity + Sets the opacity of the trace. + selected + :class:`plotly.graph_objects.splom.Selected` instance + or dict with compatible properties + selectedpoints + Array containing integer indices of selected points. + Has an effect only for traces that support selections. + Note that an empty array means an empty selection where + the `unselected` are turned on for all points, whereas, + any other non-array values means no selection all where + the `selected` and `unselected` styles have no effect. + showlegend + Determines whether or not an item corresponding to this + trace is shown in the legend. + showlowerhalf + Determines whether or not subplots on the lower half + from the diagonal are displayed. + showupperhalf + Determines whether or not subplots on the upper half + from the diagonal are displayed. + stream + :class:`plotly.graph_objects.splom.Stream` instance or + dict with compatible properties + text + Sets text elements associated with each (x,y) pair to + appear on hover. If a single string, the same string + appears over all the data points. If an array of + string, the items are mapped in order to the this + trace's (x,y) coordinates. + textsrc + Sets the source reference on Chart Studio Cloud for + `text`. + uid + Assign an id to this trace, Use this to provide object + constancy between traces during animations and + transitions. + uirevision + Controls persistence of some user-driven changes to the + trace: `constraintrange` in `parcoords` traces, as well + as some `editable: true` modifications such as `name` + and `colorbar.title`. Defaults to `layout.uirevision`. + Note that other user-driven trace attribute changes are + controlled by `layout` attributes: `trace.visible` is + controlled by `layout.legend.uirevision`, + `selectedpoints` is controlled by + `layout.selectionrevision`, and `colorbar.(x|y)` + (accessible with `config: {editable: true}`) is + controlled by `layout.editrevision`. Trace changes are + tracked by `uid`, which only falls back on trace index + if no `uid` is provided. So if your app can add/remove + traces before the end of the `data` array, such that + the same trace has a different index, you can still + preserve user-driven changes if you give each trace a + `uid` that stays with it as it moves. + unselected + :class:`plotly.graph_objects.splom.Unselected` instance + or dict with compatible properties + visible + Determines whether or not this trace is visible. If + "legendonly", the trace is not drawn, but can appear as + a legend item (provided that the legend itself is + visible). + xaxes + Sets the list of x axes corresponding to dimensions of + this splom trace. By default, a splom will match the + first N xaxes where N is the number of input + dimensions. Note that, in case where `diagonal.visible` + is false and `showupperhalf` or `showlowerhalf` is + false, this splom trace will generate one less x-axis + and one less y-axis. + xhoverformat + Sets the hover text formatting rulefor `x` using d3 + formatting mini-languages which are very similar to + those in Python. For numbers, see: + https://github.com/d3/d3-format/tree/v1.4.5#d3-format. + And for dates see: https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format. We add two items to + d3's date formatter: "%h" for half of the year as a + decimal number as well as "%{n}f" for fractional + seconds with n digits. For example, *2016-10-13 + 09:15:23.456* with tickformat "%H~%M~%S.%2f" would + display *09~15~23.46*By default the values are + formatted using `xaxis.hoverformat`. + yaxes + Sets the list of y axes corresponding to dimensions of + this splom trace. By default, a splom will match the + first N yaxes where N is the number of input + dimensions. Note that, in case where `diagonal.visible` + is false and `showupperhalf` or `showlowerhalf` is + false, this splom trace will generate one less x-axis + and one less y-axis. + yhoverformat + Sets the hover text formatting rulefor `y` using d3 + formatting mini-languages which are very similar to + those in Python. For numbers, see: + https://github.com/d3/d3-format/tree/v1.4.5#d3-format. + And for dates see: https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format. We add two items to + d3's date formatter: "%h" for half of the year as a + decimal number as well as "%{n}f" for fractional + seconds with n digits. For example, *2016-10-13 + 09:15:23.456* with tickformat "%H~%M~%S.%2f" would + display *09~15~23.46*By default the values are + formatted using `yaxis.hoverformat`. + row : 'all', int or None (default) + Subplot row index (starting from 1) for the trace to be + added. Only valid if figure was created using + `plotly.tools.make_subplots`.If 'all', addresses all + rows in the specified column(s). + col : 'all', int or None (default) + Subplot col index (starting from 1) for the trace to be + added. Only valid if figure was created using + `plotly.tools.make_subplots`.If 'all', addresses all + columns in the specified row(s). + + Returns + ------- + Figure + """ + from plotly.graph_objs import Splom + + new_trace = Splom( + customdata=customdata, + customdatasrc=customdatasrc, + diagonal=diagonal, + dimensions=dimensions, + dimensiondefaults=dimensiondefaults, + hoverinfo=hoverinfo, + hoverinfosrc=hoverinfosrc, + hoverlabel=hoverlabel, + hovertemplate=hovertemplate, + hovertemplatefallback=hovertemplatefallback, + hovertemplatesrc=hovertemplatesrc, + hovertext=hovertext, + hovertextsrc=hovertextsrc, + ids=ids, + idssrc=idssrc, + legend=legend, + legendgroup=legendgroup, + legendgrouptitle=legendgrouptitle, + legendrank=legendrank, + legendwidth=legendwidth, + marker=marker, + meta=meta, + metasrc=metasrc, + name=name, + opacity=opacity, + selected=selected, + selectedpoints=selectedpoints, + showlegend=showlegend, + showlowerhalf=showlowerhalf, + showupperhalf=showupperhalf, + stream=stream, + text=text, + textsrc=textsrc, + uid=uid, + uirevision=uirevision, + unselected=unselected, + visible=visible, + xaxes=xaxes, + xhoverformat=xhoverformat, + yaxes=yaxes, + yhoverformat=yhoverformat, + **kwargs, + ) + return self.add_trace(new_trace, row=row, col=col) + + def add_streamtube( + self, + autocolorscale=None, + cauto=None, + cmax=None, + cmid=None, + cmin=None, + coloraxis=None, + colorbar=None, + colorscale=None, + customdata=None, + customdatasrc=None, + hoverinfo=None, + hoverinfosrc=None, + hoverlabel=None, + hovertemplate=None, + hovertemplatefallback=None, + hovertemplatesrc=None, + hovertext=None, + ids=None, + idssrc=None, + legend=None, + legendgroup=None, + legendgrouptitle=None, + legendrank=None, + legendwidth=None, + lighting=None, + lightposition=None, + maxdisplayed=None, + meta=None, + metasrc=None, + name=None, + opacity=None, + reversescale=None, + scene=None, + showlegend=None, + showscale=None, + sizeref=None, + starts=None, + stream=None, + text=None, + u=None, + uhoverformat=None, + uid=None, + uirevision=None, + usrc=None, + v=None, + vhoverformat=None, + visible=None, + vsrc=None, + w=None, + whoverformat=None, + wsrc=None, + x=None, + xhoverformat=None, + xsrc=None, + y=None, + yhoverformat=None, + ysrc=None, + z=None, + zhoverformat=None, + zsrc=None, + row=None, + col=None, + **kwargs, + ) -> "Figure": + """ + Add a new Streamtube trace + + Use a streamtube trace to visualize flow in a vector field. + Specify a vector field using 6 1D arrays of equal length, 3 + position arrays `x`, `y` and `z` and 3 vector component arrays + `u`, `v`, and `w`. By default, the tubes' starting positions + will be cut from the vector field's x-z plane at its minimum y + value. To specify your own starting position, use attributes + `starts.x`, `starts.y` and `starts.z`. The color is encoded by + the norm of (u, v, w), and the local radius by the divergence + of (u, v, w). + + Parameters + ---------- + autocolorscale + Determines whether the colorscale is a default palette + (`autocolorscale: true`) or the palette determined by + `colorscale`. In case `colorscale` is unspecified or + `autocolorscale` is true, the default palette will be + chosen according to whether numbers in the `color` + array are all positive, all negative or mixed. + cauto + Determines whether or not the color domain is computed + with respect to the input data (here u/v/w norm) or the + bounds set in `cmin` and `cmax` Defaults to `false` + when `cmin` and `cmax` are set by the user. + cmax + Sets the upper bound of the color domain. Value should + have the same units as u/v/w norm and if set, `cmin` + must be set as well. + cmid + Sets the mid-point of the color domain by scaling + `cmin` and/or `cmax` to be equidistant to this point. + Value should have the same units as u/v/w norm. Has no + effect when `cauto` is `false`. + cmin + Sets the lower bound of the color domain. Value should + have the same units as u/v/w norm and if set, `cmax` + must be set as well. + coloraxis + Sets a reference to a shared color axis. References to + these shared color axes are "coloraxis", "coloraxis2", + "coloraxis3", etc. Settings for these shared color axes + are set in the layout, under `layout.coloraxis`, + `layout.coloraxis2`, etc. Note that multiple color + scales can be linked to the same color axis. + colorbar + :class:`plotly.graph_objects.streamtube.ColorBar` + instance or dict with compatible properties + colorscale + Sets the colorscale. The colorscale must be an array + containing arrays mapping a normalized value to an rgb, + rgba, hex, hsl, hsv, or named color string. At minimum, + a mapping for the lowest (0) and highest (1) values are + required. For example, `[[0, 'rgb(0,0,255)'], [1, + 'rgb(255,0,0)']]`. To control the bounds of the + colorscale in color space, use `cmin` and `cmax`. + Alternatively, `colorscale` may be a palette name + string of the following list: Blackbody,Bluered,Blues,C + ividis,Earth,Electric,Greens,Greys,Hot,Jet,Picnic,Portl + and,Rainbow,RdBu,Reds,Viridis,YlGnBu,YlOrRd. + customdata + Assigns extra data each datum. This may be useful when + listening to hover, click and selection events. Note + that, "scatter" traces also appends customdata items in + the markers DOM elements + customdatasrc + Sets the source reference on Chart Studio Cloud for + `customdata`. + hoverinfo + Determines which trace information appear on hover. If + `none` or `skip` are set, no information is displayed + upon hovering. But, if `none` is set, click and hover + events are still fired. + hoverinfosrc + Sets the source reference on Chart Studio Cloud for + `hoverinfo`. + hoverlabel + :class:`plotly.graph_objects.streamtube.Hoverlabel` + instance or dict with compatible properties + hovertemplate + Template string used for rendering the information that + appear on hover box. Note that this will override + `hoverinfo`. Variables are inserted using %{variable}, + for example "y: %{y}" as well as %{xother}, {%_xother}, + {%_xother_}, {%xother_}. When showing info for several + points, "xother" will be added to those with different + x positions from the first point. An underscore before + or after "(x|y)other" will add a space on that side, + only when this field is shown. Numbers are formatted + using d3-format's syntax %{variable:d3-format}, for + example "Price: %{y:$.2f}". + https://github.com/d3/d3-format/tree/v1.4.5#d3-format + for details on the formatting syntax. Dates are + formatted using d3-time-format's syntax + %{variable|d3-time-format}, for example "Day: + %{2019-01-01|%A}". https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format for details on the + date formatting syntax. Variables that can't be found + will be replaced with the specifier. For example, a + template of "data: %{x}, %{y}" will result in a value + of "data: 1, %{y}" if x is 1 and y is missing. + Variables with an undefined value will be replaced with + the fallback value. The variables available in + `hovertemplate` are the ones emitted as event data + described at this link + https://plotly.com/javascript/plotlyjs-events/#event- + data. Additionally, all attributes that can be + specified per-point (the ones that are `arrayOk: true`) + are available. Finally, the template string has access + to variables `tubex`, `tubey`, `tubez`, `tubeu`, + `tubev`, `tubew`, `norm` and `divergence`. Anything + contained in tag `` is displayed in the + secondary box, for example + `%{fullData.name}`. To hide the + secondary box completely, use an empty tag + ``. + hovertemplatefallback + Fallback string that's displayed when a variable + referenced in a template is missing. If the boolean + value 'false' is passed in, the specifier with the + missing variable will be displayed. + hovertemplatesrc + Sets the source reference on Chart Studio Cloud for + `hovertemplate`. + hovertext + Same as `text`. + ids + Assigns id labels to each datum. These ids for object + constancy of data points during animation. Should be an + array of strings, not numbers or any other type. + idssrc + Sets the source reference on Chart Studio Cloud for + `ids`. + legend + Sets the reference to a legend to show this trace in. + References to these legends are "legend", "legend2", + "legend3", etc. Settings for these legends are set in + the layout, under `layout.legend`, `layout.legend2`, + etc. + legendgroup + Sets the legend group for this trace. Traces and shapes + part of the same legend group hide/show at the same + time when toggling legend items. + legendgrouptitle + :class:`plotly.graph_objects.streamtube.Legendgrouptitl + e` instance or dict with compatible properties + legendrank + Sets the legend rank for this trace. Items and groups + with smaller ranks are presented on top/left side while + with "reversed" `legend.traceorder` they are on + bottom/right side. The default legendrank is 1000, so + that you can use ranks less than 1000 to place certain + items before all unranked items, and ranks greater than + 1000 to go after all unranked items. When having + unranked or equal rank items shapes would be displayed + after traces i.e. according to their order in data and + layout. + legendwidth + Sets the width (in px or fraction) of the legend for + this trace. + lighting + :class:`plotly.graph_objects.streamtube.Lighting` + instance or dict with compatible properties + lightposition + :class:`plotly.graph_objects.streamtube.Lightposition` + instance or dict with compatible properties + maxdisplayed + The maximum number of displayed segments in a + streamtube. + meta + Assigns extra meta information associated with this + trace that can be used in various text attributes. + Attributes such as trace `name`, graph, axis and + colorbar `title.text`, annotation `text` + `rangeselector`, `updatemenues` and `sliders` `label` + text all support `meta`. To access the trace `meta` + values in an attribute in the same trace, simply use + `%{meta[i]}` where `i` is the index or key of the + `meta` item in question. To access trace `meta` in + layout attributes, use `%{data[n[.meta[i]}` where `i` + is the index or key of the `meta` and `n` is the trace + index. + metasrc + Sets the source reference on Chart Studio Cloud for + `meta`. + name + Sets the trace name. The trace name appears as the + legend item and on hover. + opacity + Sets the opacity of the surface. Please note that in + the case of using high `opacity` values for example a + value greater than or equal to 0.5 on two surfaces (and + 0.25 with four surfaces), an overlay of multiple + transparent surfaces may not perfectly be sorted in + depth by the webgl API. This behavior may be improved + in the near future and is subject to change. + reversescale + Reverses the color mapping if true. If true, `cmin` + will correspond to the last color in the array and + `cmax` will correspond to the first color. + scene + Sets a reference between this trace's 3D coordinate + system and a 3D scene. If "scene" (the default value), + the (x,y,z) coordinates refer to `layout.scene`. If + "scene2", the (x,y,z) coordinates refer to + `layout.scene2`, and so on. + showlegend + Determines whether or not an item corresponding to this + trace is shown in the legend. + showscale + Determines whether or not a colorbar is displayed for + this trace. + sizeref + The scaling factor for the streamtubes. The default is + 1, which avoids two max divergence tubes from touching + at adjacent starting positions. + starts + :class:`plotly.graph_objects.streamtube.Starts` + instance or dict with compatible properties + stream + :class:`plotly.graph_objects.streamtube.Stream` + instance or dict with compatible properties + text + Sets a text element associated with this trace. If + trace `hoverinfo` contains a "text" flag, this text + element will be seen in all hover labels. Note that + streamtube traces do not support array `text` values. + u + Sets the x components of the vector field. + uhoverformat + Sets the hover text formatting rulefor `u` using d3 + formatting mini-languages which are very similar to + those in Python. For numbers, see: https://github.com/d + 3/d3-format/tree/v1.4.5#d3-format.By default the values + are formatted using generic number format. + uid + Assign an id to this trace, Use this to provide object + constancy between traces during animations and + transitions. + uirevision + Controls persistence of some user-driven changes to the + trace: `constraintrange` in `parcoords` traces, as well + as some `editable: true` modifications such as `name` + and `colorbar.title`. Defaults to `layout.uirevision`. + Note that other user-driven trace attribute changes are + controlled by `layout` attributes: `trace.visible` is + controlled by `layout.legend.uirevision`, + `selectedpoints` is controlled by + `layout.selectionrevision`, and `colorbar.(x|y)` + (accessible with `config: {editable: true}`) is + controlled by `layout.editrevision`. Trace changes are + tracked by `uid`, which only falls back on trace index + if no `uid` is provided. So if your app can add/remove + traces before the end of the `data` array, such that + the same trace has a different index, you can still + preserve user-driven changes if you give each trace a + `uid` that stays with it as it moves. + usrc + Sets the source reference on Chart Studio Cloud for + `u`. + v + Sets the y components of the vector field. + vhoverformat + Sets the hover text formatting rulefor `v` using d3 + formatting mini-languages which are very similar to + those in Python. For numbers, see: https://github.com/d + 3/d3-format/tree/v1.4.5#d3-format.By default the values + are formatted using generic number format. + visible + Determines whether or not this trace is visible. If + "legendonly", the trace is not drawn, but can appear as + a legend item (provided that the legend itself is + visible). + vsrc + Sets the source reference on Chart Studio Cloud for + `v`. + w + Sets the z components of the vector field. + whoverformat + Sets the hover text formatting rulefor `w` using d3 + formatting mini-languages which are very similar to + those in Python. For numbers, see: https://github.com/d + 3/d3-format/tree/v1.4.5#d3-format.By default the values + are formatted using generic number format. + wsrc + Sets the source reference on Chart Studio Cloud for + `w`. + x + Sets the x coordinates of the vector field. + xhoverformat + Sets the hover text formatting rulefor `x` using d3 + formatting mini-languages which are very similar to + those in Python. For numbers, see: + https://github.com/d3/d3-format/tree/v1.4.5#d3-format. + And for dates see: https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format. We add two items to + d3's date formatter: "%h" for half of the year as a + decimal number as well as "%{n}f" for fractional + seconds with n digits. For example, *2016-10-13 + 09:15:23.456* with tickformat "%H~%M~%S.%2f" would + display *09~15~23.46*By default the values are + formatted using `xaxis.hoverformat`. + xsrc + Sets the source reference on Chart Studio Cloud for + `x`. + y + Sets the y coordinates of the vector field. + yhoverformat + Sets the hover text formatting rulefor `y` using d3 + formatting mini-languages which are very similar to + those in Python. For numbers, see: + https://github.com/d3/d3-format/tree/v1.4.5#d3-format. + And for dates see: https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format. We add two items to + d3's date formatter: "%h" for half of the year as a + decimal number as well as "%{n}f" for fractional + seconds with n digits. For example, *2016-10-13 + 09:15:23.456* with tickformat "%H~%M~%S.%2f" would + display *09~15~23.46*By default the values are + formatted using `yaxis.hoverformat`. + ysrc + Sets the source reference on Chart Studio Cloud for + `y`. + z + Sets the z coordinates of the vector field. + zhoverformat + Sets the hover text formatting rulefor `z` using d3 + formatting mini-languages which are very similar to + those in Python. For numbers, see: + https://github.com/d3/d3-format/tree/v1.4.5#d3-format. + And for dates see: https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format. We add two items to + d3's date formatter: "%h" for half of the year as a + decimal number as well as "%{n}f" for fractional + seconds with n digits. For example, *2016-10-13 + 09:15:23.456* with tickformat "%H~%M~%S.%2f" would + display *09~15~23.46*By default the values are + formatted using `zaxis.hoverformat`. + zsrc + Sets the source reference on Chart Studio Cloud for + `z`. + row : 'all', int or None (default) + Subplot row index (starting from 1) for the trace to be + added. Only valid if figure was created using + `plotly.tools.make_subplots`.If 'all', addresses all + rows in the specified column(s). + col : 'all', int or None (default) + Subplot col index (starting from 1) for the trace to be + added. Only valid if figure was created using + `plotly.tools.make_subplots`.If 'all', addresses all + columns in the specified row(s). + + Returns + ------- + Figure + """ + from plotly.graph_objs import Streamtube + + new_trace = Streamtube( + autocolorscale=autocolorscale, + cauto=cauto, + cmax=cmax, + cmid=cmid, + cmin=cmin, + coloraxis=coloraxis, + colorbar=colorbar, + colorscale=colorscale, + customdata=customdata, + customdatasrc=customdatasrc, + hoverinfo=hoverinfo, + hoverinfosrc=hoverinfosrc, + hoverlabel=hoverlabel, + hovertemplate=hovertemplate, + hovertemplatefallback=hovertemplatefallback, + hovertemplatesrc=hovertemplatesrc, + hovertext=hovertext, + ids=ids, + idssrc=idssrc, + legend=legend, + legendgroup=legendgroup, + legendgrouptitle=legendgrouptitle, + legendrank=legendrank, + legendwidth=legendwidth, + lighting=lighting, + lightposition=lightposition, + maxdisplayed=maxdisplayed, + meta=meta, + metasrc=metasrc, + name=name, + opacity=opacity, + reversescale=reversescale, + scene=scene, + showlegend=showlegend, + showscale=showscale, + sizeref=sizeref, + starts=starts, + stream=stream, + text=text, + u=u, + uhoverformat=uhoverformat, + uid=uid, + uirevision=uirevision, + usrc=usrc, + v=v, + vhoverformat=vhoverformat, + visible=visible, + vsrc=vsrc, + w=w, + whoverformat=whoverformat, + wsrc=wsrc, + x=x, + xhoverformat=xhoverformat, + xsrc=xsrc, + y=y, + yhoverformat=yhoverformat, + ysrc=ysrc, + z=z, + zhoverformat=zhoverformat, + zsrc=zsrc, + **kwargs, + ) + return self.add_trace(new_trace, row=row, col=col) + + def add_sunburst( + self, + branchvalues=None, + count=None, + customdata=None, + customdatasrc=None, + domain=None, + hoverinfo=None, + hoverinfosrc=None, + hoverlabel=None, + hovertemplate=None, + hovertemplatefallback=None, + hovertemplatesrc=None, + hovertext=None, + hovertextsrc=None, + ids=None, + idssrc=None, + insidetextfont=None, + insidetextorientation=None, + labels=None, + labelssrc=None, + leaf=None, + legend=None, + legendgrouptitle=None, + legendrank=None, + legendwidth=None, + level=None, + marker=None, + maxdepth=None, + meta=None, + metasrc=None, + name=None, + opacity=None, + outsidetextfont=None, + parents=None, + parentssrc=None, + root=None, + rotation=None, + sort=None, + stream=None, + text=None, + textfont=None, + textinfo=None, + textsrc=None, + texttemplate=None, + texttemplatefallback=None, + texttemplatesrc=None, + uid=None, + uirevision=None, + values=None, + valuessrc=None, + visible=None, + row=None, + col=None, + **kwargs, + ) -> "Figure": + """ + Add a new Sunburst trace + + Visualize hierarchal data spanning outward radially from root + to leaves. The sunburst sectors are determined by the entries + in "labels" or "ids" and in "parents". + + Parameters + ---------- + branchvalues + Determines how the items in `values` are summed. When + set to "total", items in `values` are taken to be value + of all its descendants. When set to "remainder", items + in `values` corresponding to the root and the branches + sectors are taken to be the extra part not part of the + sum of the values at their leaves. + count + Determines default for `values` when it is not + provided, by inferring a 1 for each of the "leaves" + and/or "branches", otherwise 0. + customdata + Assigns extra data each datum. This may be useful when + listening to hover, click and selection events. Note + that, "scatter" traces also appends customdata items in + the markers DOM elements + customdatasrc + Sets the source reference on Chart Studio Cloud for + `customdata`. + domain + :class:`plotly.graph_objects.sunburst.Domain` instance + or dict with compatible properties + hoverinfo + Determines which trace information appear on hover. If + `none` or `skip` are set, no information is displayed + upon hovering. But, if `none` is set, click and hover + events are still fired. + hoverinfosrc + Sets the source reference on Chart Studio Cloud for + `hoverinfo`. + hoverlabel + :class:`plotly.graph_objects.sunburst.Hoverlabel` + instance or dict with compatible properties + hovertemplate + Template string used for rendering the information that + appear on hover box. Note that this will override + `hoverinfo`. Variables are inserted using %{variable}, + for example "y: %{y}" as well as %{xother}, {%_xother}, + {%_xother_}, {%xother_}. When showing info for several + points, "xother" will be added to those with different + x positions from the first point. An underscore before + or after "(x|y)other" will add a space on that side, + only when this field is shown. Numbers are formatted + using d3-format's syntax %{variable:d3-format}, for + example "Price: %{y:$.2f}". + https://github.com/d3/d3-format/tree/v1.4.5#d3-format + for details on the formatting syntax. Dates are + formatted using d3-time-format's syntax + %{variable|d3-time-format}, for example "Day: + %{2019-01-01|%A}". https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format for details on the + date formatting syntax. Variables that can't be found + will be replaced with the specifier. For example, a + template of "data: %{x}, %{y}" will result in a value + of "data: 1, %{y}" if x is 1 and y is missing. + Variables with an undefined value will be replaced with + the fallback value. The variables available in + `hovertemplate` are the ones emitted as event data + described at this link + https://plotly.com/javascript/plotlyjs-events/#event- + data. Additionally, all attributes that can be + specified per-point (the ones that are `arrayOk: true`) + are available. Finally, the template string has access + to variables `currentPath`, `root`, `entry`, + `percentRoot`, `percentEntry` and `percentParent`. + Anything contained in tag `` is displayed in the + secondary box, for example + `%{fullData.name}`. To hide the + secondary box completely, use an empty tag + ``. + hovertemplatefallback + Fallback string that's displayed when a variable + referenced in a template is missing. If the boolean + value 'false' is passed in, the specifier with the + missing variable will be displayed. + hovertemplatesrc + Sets the source reference on Chart Studio Cloud for + `hovertemplate`. + hovertext + Sets hover text elements associated with each sector. + If a single string, the same string appears for all + data points. If an array of string, the items are + mapped in order of this trace's sectors. To be seen, + trace `hoverinfo` must contain a "text" flag. + hovertextsrc + Sets the source reference on Chart Studio Cloud for + `hovertext`. + ids + Assigns id labels to each datum. These ids for object + constancy of data points during animation. Should be an + array of strings, not numbers or any other type. + idssrc + Sets the source reference on Chart Studio Cloud for + `ids`. + insidetextfont + Sets the font used for `textinfo` lying inside the + sector. + insidetextorientation + Controls the orientation of the text inside chart + sectors. When set to "auto", text may be oriented in + any direction in order to be as big as possible in the + middle of a sector. The "horizontal" option orients + text to be parallel with the bottom of the chart, and + may make text smaller in order to achieve that goal. + The "radial" option orients text along the radius of + the sector. The "tangential" option orients text + perpendicular to the radius of the sector. + labels + Sets the labels of each of the sectors. + labelssrc + Sets the source reference on Chart Studio Cloud for + `labels`. + leaf + :class:`plotly.graph_objects.sunburst.Leaf` instance or + dict with compatible properties + legend + Sets the reference to a legend to show this trace in. + References to these legends are "legend", "legend2", + "legend3", etc. Settings for these legends are set in + the layout, under `layout.legend`, `layout.legend2`, + etc. + legendgrouptitle + :class:`plotly.graph_objects.sunburst.Legendgrouptitle` + instance or dict with compatible properties + legendrank + Sets the legend rank for this trace. Items and groups + with smaller ranks are presented on top/left side while + with "reversed" `legend.traceorder` they are on + bottom/right side. The default legendrank is 1000, so + that you can use ranks less than 1000 to place certain + items before all unranked items, and ranks greater than + 1000 to go after all unranked items. When having + unranked or equal rank items shapes would be displayed + after traces i.e. according to their order in data and + layout. + legendwidth + Sets the width (in px or fraction) of the legend for + this trace. + level + Sets the level from which this trace hierarchy is + rendered. Set `level` to `''` to start from the root + node in the hierarchy. Must be an "id" if `ids` is + filled in, otherwise plotly attempts to find a matching + item in `labels`. + marker + :class:`plotly.graph_objects.sunburst.Marker` instance + or dict with compatible properties + maxdepth + Sets the number of rendered sectors from any given + `level`. Set `maxdepth` to "-1" to render all the + levels in the hierarchy. + meta + Assigns extra meta information associated with this + trace that can be used in various text attributes. + Attributes such as trace `name`, graph, axis and + colorbar `title.text`, annotation `text` + `rangeselector`, `updatemenues` and `sliders` `label` + text all support `meta`. To access the trace `meta` + values in an attribute in the same trace, simply use + `%{meta[i]}` where `i` is the index or key of the + `meta` item in question. To access trace `meta` in + layout attributes, use `%{data[n[.meta[i]}` where `i` + is the index or key of the `meta` and `n` is the trace + index. + metasrc + Sets the source reference on Chart Studio Cloud for + `meta`. + name + Sets the trace name. The trace name appears as the + legend item and on hover. + opacity + Sets the opacity of the trace. + outsidetextfont + Sets the font used for `textinfo` lying outside the + sector. This option refers to the root of the hierarchy + presented at the center of a sunburst graph. Please + note that if a hierarchy has multiple root nodes, this + option won't have any effect and `insidetextfont` would + be used. + parents + Sets the parent sectors for each of the sectors. Empty + string items '' are understood to reference the root + node in the hierarchy. If `ids` is filled, `parents` + items are understood to be "ids" themselves. When `ids` + is not set, plotly attempts to find matching items in + `labels`, but beware they must be unique. + parentssrc + Sets the source reference on Chart Studio Cloud for + `parents`. + root + :class:`plotly.graph_objects.sunburst.Root` instance or + dict with compatible properties + rotation + Rotates the whole diagram counterclockwise by some + angle. By default the first slice starts at 3 o'clock. + sort + Determines whether or not the sectors are reordered + from largest to smallest. + stream + :class:`plotly.graph_objects.sunburst.Stream` instance + or dict with compatible properties + text + Sets text elements associated with each sector. If + trace `textinfo` contains a "text" flag, these elements + will be seen on the chart. If trace `hoverinfo` + contains a "text" flag and "hovertext" is not set, + these elements will be seen in the hover labels. + textfont + Sets the font used for `textinfo`. + textinfo + Determines which trace information appear on the graph. + textsrc + Sets the source reference on Chart Studio Cloud for + `text`. + texttemplate + Template string used for rendering the information text + that appears on points. Note that this will override + `textinfo`. Variables are inserted using %{variable}, + for example "y: %{y}". Numbers are formatted using + d3-format's syntax %{variable:d3-format}, for example + "Price: %{y:$.2f}". + https://github.com/d3/d3-format/tree/v1.4.5#d3-format + for details on the formatting syntax. Dates are + formatted using d3-time-format's syntax + %{variable|d3-time-format}, for example "Day: + %{2019-01-01|%A}". https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format for details on the + date formatting syntax. Variables that can't be found + will be replaced with the specifier. For example, a + template of "data: %{x}, %{y}" will result in a value + of "data: 1, %{y}" if x is 1 and y is missing. + Variables with an undefined value will be replaced with + the fallback value. All attributes that can be + specified per-point (the ones that are `arrayOk: true`) + are available. Finally, the template string has access + to variables `currentPath`, `root`, `entry`, + `percentRoot`, `percentEntry`, `percentParent`, `label` + and `value`. + texttemplatefallback + Fallback string that's displayed when a variable + referenced in a template is missing. If the boolean + value 'false' is passed in, the specifier with the + missing variable will be displayed. + texttemplatesrc + Sets the source reference on Chart Studio Cloud for + `texttemplate`. + uid + Assign an id to this trace, Use this to provide object + constancy between traces during animations and + transitions. + uirevision + Controls persistence of some user-driven changes to the + trace: `constraintrange` in `parcoords` traces, as well + as some `editable: true` modifications such as `name` + and `colorbar.title`. Defaults to `layout.uirevision`. + Note that other user-driven trace attribute changes are + controlled by `layout` attributes: `trace.visible` is + controlled by `layout.legend.uirevision`, + `selectedpoints` is controlled by + `layout.selectionrevision`, and `colorbar.(x|y)` + (accessible with `config: {editable: true}`) is + controlled by `layout.editrevision`. Trace changes are + tracked by `uid`, which only falls back on trace index + if no `uid` is provided. So if your app can add/remove + traces before the end of the `data` array, such that + the same trace has a different index, you can still + preserve user-driven changes if you give each trace a + `uid` that stays with it as it moves. + values + Sets the values associated with each of the sectors. + Use with `branchvalues` to determine how the values are + summed. + valuessrc + Sets the source reference on Chart Studio Cloud for + `values`. + visible + Determines whether or not this trace is visible. If + "legendonly", the trace is not drawn, but can appear as + a legend item (provided that the legend itself is + visible). + row : 'all', int or None (default) + Subplot row index (starting from 1) for the trace to be + added. Only valid if figure was created using + `plotly.tools.make_subplots`.If 'all', addresses all + rows in the specified column(s). + col : 'all', int or None (default) + Subplot col index (starting from 1) for the trace to be + added. Only valid if figure was created using + `plotly.tools.make_subplots`.If 'all', addresses all + columns in the specified row(s). + + Returns + ------- + Figure + """ + from plotly.graph_objs import Sunburst + + new_trace = Sunburst( + branchvalues=branchvalues, + count=count, + customdata=customdata, + customdatasrc=customdatasrc, + domain=domain, + hoverinfo=hoverinfo, + hoverinfosrc=hoverinfosrc, + hoverlabel=hoverlabel, + hovertemplate=hovertemplate, + hovertemplatefallback=hovertemplatefallback, + hovertemplatesrc=hovertemplatesrc, + hovertext=hovertext, + hovertextsrc=hovertextsrc, + ids=ids, + idssrc=idssrc, + insidetextfont=insidetextfont, + insidetextorientation=insidetextorientation, + labels=labels, + labelssrc=labelssrc, + leaf=leaf, + legend=legend, + legendgrouptitle=legendgrouptitle, + legendrank=legendrank, + legendwidth=legendwidth, + level=level, + marker=marker, + maxdepth=maxdepth, + meta=meta, + metasrc=metasrc, + name=name, + opacity=opacity, + outsidetextfont=outsidetextfont, + parents=parents, + parentssrc=parentssrc, + root=root, + rotation=rotation, + sort=sort, + stream=stream, + text=text, + textfont=textfont, + textinfo=textinfo, + textsrc=textsrc, + texttemplate=texttemplate, + texttemplatefallback=texttemplatefallback, + texttemplatesrc=texttemplatesrc, + uid=uid, + uirevision=uirevision, + values=values, + valuessrc=valuessrc, + visible=visible, + **kwargs, + ) + return self.add_trace(new_trace, row=row, col=col) + + def add_surface( + self, + autocolorscale=None, + cauto=None, + cmax=None, + cmid=None, + cmin=None, + coloraxis=None, + colorbar=None, + colorscale=None, + connectgaps=None, + contours=None, + customdata=None, + customdatasrc=None, + hidesurface=None, + hoverinfo=None, + hoverinfosrc=None, + hoverlabel=None, + hovertemplate=None, + hovertemplatefallback=None, + hovertemplatesrc=None, + hovertext=None, + hovertextsrc=None, + ids=None, + idssrc=None, + legend=None, + legendgroup=None, + legendgrouptitle=None, + legendrank=None, + legendwidth=None, + lighting=None, + lightposition=None, + meta=None, + metasrc=None, + name=None, + opacity=None, + opacityscale=None, + reversescale=None, + scene=None, + showlegend=None, + showscale=None, + stream=None, + surfacecolor=None, + surfacecolorsrc=None, + text=None, + textsrc=None, + uid=None, + uirevision=None, + visible=None, + x=None, + xcalendar=None, + xhoverformat=None, + xsrc=None, + y=None, + ycalendar=None, + yhoverformat=None, + ysrc=None, + z=None, + zcalendar=None, + zhoverformat=None, + zsrc=None, + row=None, + col=None, + **kwargs, + ) -> "Figure": + """ + Add a new Surface trace + + The data the describes the coordinates of the surface is set in + `z`. Data in `z` should be a 2D list. Coordinates in `x` and + `y` can either be 1D lists or 2D lists (e.g. to graph + parametric surfaces). If not provided in `x` and `y`, the x and + y coordinates are assumed to be linear starting at 0 with a + unit step. The color scale corresponds to the `z` values by + default. For custom color scales, use `surfacecolor` which + should be a 2D list, where its bounds can be controlled using + `cmin` and `cmax`. + + Parameters + ---------- + autocolorscale + Determines whether the colorscale is a default palette + (`autocolorscale: true`) or the palette determined by + `colorscale`. In case `colorscale` is unspecified or + `autocolorscale` is true, the default palette will be + chosen according to whether numbers in the `color` + array are all positive, all negative or mixed. + cauto + Determines whether or not the color domain is computed + with respect to the input data (here z or surfacecolor) + or the bounds set in `cmin` and `cmax` Defaults to + `false` when `cmin` and `cmax` are set by the user. + cmax + Sets the upper bound of the color domain. Value should + have the same units as z or surfacecolor and if set, + `cmin` must be set as well. + cmid + Sets the mid-point of the color domain by scaling + `cmin` and/or `cmax` to be equidistant to this point. + Value should have the same units as z or surfacecolor. + Has no effect when `cauto` is `false`. + cmin + Sets the lower bound of the color domain. Value should + have the same units as z or surfacecolor and if set, + `cmax` must be set as well. + coloraxis + Sets a reference to a shared color axis. References to + these shared color axes are "coloraxis", "coloraxis2", + "coloraxis3", etc. Settings for these shared color axes + are set in the layout, under `layout.coloraxis`, + `layout.coloraxis2`, etc. Note that multiple color + scales can be linked to the same color axis. + colorbar + :class:`plotly.graph_objects.surface.ColorBar` instance + or dict with compatible properties + colorscale + Sets the colorscale. The colorscale must be an array + containing arrays mapping a normalized value to an rgb, + rgba, hex, hsl, hsv, or named color string. At minimum, + a mapping for the lowest (0) and highest (1) values are + required. For example, `[[0, 'rgb(0,0,255)'], [1, + 'rgb(255,0,0)']]`. To control the bounds of the + colorscale in color space, use `cmin` and `cmax`. + Alternatively, `colorscale` may be a palette name + string of the following list: Blackbody,Bluered,Blues,C + ividis,Earth,Electric,Greens,Greys,Hot,Jet,Picnic,Portl + and,Rainbow,RdBu,Reds,Viridis,YlGnBu,YlOrRd. + connectgaps + Determines whether or not gaps (i.e. {nan} or missing + values) in the `z` data are filled in. + contours + :class:`plotly.graph_objects.surface.Contours` instance + or dict with compatible properties + customdata + Assigns extra data each datum. This may be useful when + listening to hover, click and selection events. Note + that, "scatter" traces also appends customdata items in + the markers DOM elements + customdatasrc + Sets the source reference on Chart Studio Cloud for + `customdata`. + hidesurface + Determines whether or not a surface is drawn. For + example, set `hidesurface` to False `contours.x.show` + to True and `contours.y.show` to True to draw a wire + frame plot. + hoverinfo + Determines which trace information appear on hover. If + `none` or `skip` are set, no information is displayed + upon hovering. But, if `none` is set, click and hover + events are still fired. + hoverinfosrc + Sets the source reference on Chart Studio Cloud for + `hoverinfo`. + hoverlabel + :class:`plotly.graph_objects.surface.Hoverlabel` + instance or dict with compatible properties + hovertemplate + Template string used for rendering the information that + appear on hover box. Note that this will override + `hoverinfo`. Variables are inserted using %{variable}, + for example "y: %{y}" as well as %{xother}, {%_xother}, + {%_xother_}, {%xother_}. When showing info for several + points, "xother" will be added to those with different + x positions from the first point. An underscore before + or after "(x|y)other" will add a space on that side, + only when this field is shown. Numbers are formatted + using d3-format's syntax %{variable:d3-format}, for + example "Price: %{y:$.2f}". + https://github.com/d3/d3-format/tree/v1.4.5#d3-format + for details on the formatting syntax. Dates are + formatted using d3-time-format's syntax + %{variable|d3-time-format}, for example "Day: + %{2019-01-01|%A}". https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format for details on the + date formatting syntax. Variables that can't be found + will be replaced with the specifier. For example, a + template of "data: %{x}, %{y}" will result in a value + of "data: 1, %{y}" if x is 1 and y is missing. + Variables with an undefined value will be replaced with + the fallback value. The variables available in + `hovertemplate` are the ones emitted as event data + described at this link + https://plotly.com/javascript/plotlyjs-events/#event- + data. Additionally, all attributes that can be + specified per-point (the ones that are `arrayOk: true`) + are available. Anything contained in tag `` is + displayed in the secondary box, for example + `%{fullData.name}`. To hide the + secondary box completely, use an empty tag + ``. + hovertemplatefallback + Fallback string that's displayed when a variable + referenced in a template is missing. If the boolean + value 'false' is passed in, the specifier with the + missing variable will be displayed. + hovertemplatesrc + Sets the source reference on Chart Studio Cloud for + `hovertemplate`. + hovertext + Same as `text`. + hovertextsrc + Sets the source reference on Chart Studio Cloud for + `hovertext`. + ids + Assigns id labels to each datum. These ids for object + constancy of data points during animation. Should be an + array of strings, not numbers or any other type. + idssrc + Sets the source reference on Chart Studio Cloud for + `ids`. + legend + Sets the reference to a legend to show this trace in. + References to these legends are "legend", "legend2", + "legend3", etc. Settings for these legends are set in + the layout, under `layout.legend`, `layout.legend2`, + etc. + legendgroup + Sets the legend group for this trace. Traces and shapes + part of the same legend group hide/show at the same + time when toggling legend items. + legendgrouptitle + :class:`plotly.graph_objects.surface.Legendgrouptitle` + instance or dict with compatible properties + legendrank + Sets the legend rank for this trace. Items and groups + with smaller ranks are presented on top/left side while + with "reversed" `legend.traceorder` they are on + bottom/right side. The default legendrank is 1000, so + that you can use ranks less than 1000 to place certain + items before all unranked items, and ranks greater than + 1000 to go after all unranked items. When having + unranked or equal rank items shapes would be displayed + after traces i.e. according to their order in data and + layout. + legendwidth + Sets the width (in px or fraction) of the legend for + this trace. + lighting + :class:`plotly.graph_objects.surface.Lighting` instance + or dict with compatible properties + lightposition + :class:`plotly.graph_objects.surface.Lightposition` + instance or dict with compatible properties + meta + Assigns extra meta information associated with this + trace that can be used in various text attributes. + Attributes such as trace `name`, graph, axis and + colorbar `title.text`, annotation `text` + `rangeselector`, `updatemenues` and `sliders` `label` + text all support `meta`. To access the trace `meta` + values in an attribute in the same trace, simply use + `%{meta[i]}` where `i` is the index or key of the + `meta` item in question. To access trace `meta` in + layout attributes, use `%{data[n[.meta[i]}` where `i` + is the index or key of the `meta` and `n` is the trace + index. + metasrc + Sets the source reference on Chart Studio Cloud for + `meta`. + name + Sets the trace name. The trace name appears as the + legend item and on hover. + opacity + Sets the opacity of the surface. Please note that in + the case of using high `opacity` values for example a + value greater than or equal to 0.5 on two surfaces (and + 0.25 with four surfaces), an overlay of multiple + transparent surfaces may not perfectly be sorted in + depth by the webgl API. This behavior may be improved + in the near future and is subject to change. + opacityscale + Sets the opacityscale. The opacityscale must be an + array containing arrays mapping a normalized value to + an opacity value. At minimum, a mapping for the lowest + (0) and highest (1) values are required. For example, + `[[0, 1], [0.5, 0.2], [1, 1]]` means that higher/lower + values would have higher opacity values and those in + the middle would be more transparent Alternatively, + `opacityscale` may be a palette name string of the + following list: 'min', 'max', 'extremes' and 'uniform'. + The default is 'uniform'. + reversescale + Reverses the color mapping if true. If true, `cmin` + will correspond to the last color in the array and + `cmax` will correspond to the first color. + scene + Sets a reference between this trace's 3D coordinate + system and a 3D scene. If "scene" (the default value), + the (x,y,z) coordinates refer to `layout.scene`. If + "scene2", the (x,y,z) coordinates refer to + `layout.scene2`, and so on. + showlegend + Determines whether or not an item corresponding to this + trace is shown in the legend. + showscale + Determines whether or not a colorbar is displayed for + this trace. + stream + :class:`plotly.graph_objects.surface.Stream` instance + or dict with compatible properties + surfacecolor + Sets the surface color values, used for setting a color + scale independent of `z`. + surfacecolorsrc + Sets the source reference on Chart Studio Cloud for + `surfacecolor`. + text + Sets the text elements associated with each z value. If + trace `hoverinfo` contains a "text" flag and + "hovertext" is not set, these elements will be seen in + the hover labels. + textsrc + Sets the source reference on Chart Studio Cloud for + `text`. + uid + Assign an id to this trace, Use this to provide object + constancy between traces during animations and + transitions. + uirevision + Controls persistence of some user-driven changes to the + trace: `constraintrange` in `parcoords` traces, as well + as some `editable: true` modifications such as `name` + and `colorbar.title`. Defaults to `layout.uirevision`. + Note that other user-driven trace attribute changes are + controlled by `layout` attributes: `trace.visible` is + controlled by `layout.legend.uirevision`, + `selectedpoints` is controlled by + `layout.selectionrevision`, and `colorbar.(x|y)` + (accessible with `config: {editable: true}`) is + controlled by `layout.editrevision`. Trace changes are + tracked by `uid`, which only falls back on trace index + if no `uid` is provided. So if your app can add/remove + traces before the end of the `data` array, such that + the same trace has a different index, you can still + preserve user-driven changes if you give each trace a + `uid` that stays with it as it moves. + visible + Determines whether or not this trace is visible. If + "legendonly", the trace is not drawn, but can appear as + a legend item (provided that the legend itself is + visible). + x + Sets the x coordinates. + xcalendar + Sets the calendar system to use with `x` date data. + xhoverformat + Sets the hover text formatting rulefor `x` using d3 + formatting mini-languages which are very similar to + those in Python. For numbers, see: + https://github.com/d3/d3-format/tree/v1.4.5#d3-format. + And for dates see: https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format. We add two items to + d3's date formatter: "%h" for half of the year as a + decimal number as well as "%{n}f" for fractional + seconds with n digits. For example, *2016-10-13 + 09:15:23.456* with tickformat "%H~%M~%S.%2f" would + display *09~15~23.46*By default the values are + formatted using `xaxis.hoverformat`. + xsrc + Sets the source reference on Chart Studio Cloud for + `x`. + y + Sets the y coordinates. + ycalendar + Sets the calendar system to use with `y` date data. + yhoverformat + Sets the hover text formatting rulefor `y` using d3 + formatting mini-languages which are very similar to + those in Python. For numbers, see: + https://github.com/d3/d3-format/tree/v1.4.5#d3-format. + And for dates see: https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format. We add two items to + d3's date formatter: "%h" for half of the year as a + decimal number as well as "%{n}f" for fractional + seconds with n digits. For example, *2016-10-13 + 09:15:23.456* with tickformat "%H~%M~%S.%2f" would + display *09~15~23.46*By default the values are + formatted using `yaxis.hoverformat`. + ysrc + Sets the source reference on Chart Studio Cloud for + `y`. + z + Sets the z coordinates. + zcalendar + Sets the calendar system to use with `z` date data. + zhoverformat + Sets the hover text formatting rulefor `z` using d3 + formatting mini-languages which are very similar to + those in Python. For numbers, see: + https://github.com/d3/d3-format/tree/v1.4.5#d3-format. + And for dates see: https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format. We add two items to + d3's date formatter: "%h" for half of the year as a + decimal number as well as "%{n}f" for fractional + seconds with n digits. For example, *2016-10-13 + 09:15:23.456* with tickformat "%H~%M~%S.%2f" would + display *09~15~23.46*By default the values are + formatted using `zaxis.hoverformat`. + zsrc + Sets the source reference on Chart Studio Cloud for + `z`. + row : 'all', int or None (default) + Subplot row index (starting from 1) for the trace to be + added. Only valid if figure was created using + `plotly.tools.make_subplots`.If 'all', addresses all + rows in the specified column(s). + col : 'all', int or None (default) + Subplot col index (starting from 1) for the trace to be + added. Only valid if figure was created using + `plotly.tools.make_subplots`.If 'all', addresses all + columns in the specified row(s). + + Returns + ------- + Figure + """ + from plotly.graph_objs import Surface + + new_trace = Surface( + autocolorscale=autocolorscale, + cauto=cauto, + cmax=cmax, + cmid=cmid, + cmin=cmin, + coloraxis=coloraxis, + colorbar=colorbar, + colorscale=colorscale, + connectgaps=connectgaps, + contours=contours, + customdata=customdata, + customdatasrc=customdatasrc, + hidesurface=hidesurface, + hoverinfo=hoverinfo, + hoverinfosrc=hoverinfosrc, + hoverlabel=hoverlabel, + hovertemplate=hovertemplate, + hovertemplatefallback=hovertemplatefallback, + hovertemplatesrc=hovertemplatesrc, + hovertext=hovertext, + hovertextsrc=hovertextsrc, + ids=ids, + idssrc=idssrc, + legend=legend, + legendgroup=legendgroup, + legendgrouptitle=legendgrouptitle, + legendrank=legendrank, + legendwidth=legendwidth, + lighting=lighting, + lightposition=lightposition, + meta=meta, + metasrc=metasrc, + name=name, + opacity=opacity, + opacityscale=opacityscale, + reversescale=reversescale, + scene=scene, + showlegend=showlegend, + showscale=showscale, + stream=stream, + surfacecolor=surfacecolor, + surfacecolorsrc=surfacecolorsrc, + text=text, + textsrc=textsrc, + uid=uid, + uirevision=uirevision, + visible=visible, + x=x, + xcalendar=xcalendar, + xhoverformat=xhoverformat, + xsrc=xsrc, + y=y, + ycalendar=ycalendar, + yhoverformat=yhoverformat, + ysrc=ysrc, + z=z, + zcalendar=zcalendar, + zhoverformat=zhoverformat, + zsrc=zsrc, + **kwargs, + ) + return self.add_trace(new_trace, row=row, col=col) + + def add_table( + self, + cells=None, + columnorder=None, + columnordersrc=None, + columnwidth=None, + columnwidthsrc=None, + customdata=None, + customdatasrc=None, + domain=None, + header=None, + hoverinfo=None, + hoverinfosrc=None, + hoverlabel=None, + ids=None, + idssrc=None, + legend=None, + legendgrouptitle=None, + legendrank=None, + legendwidth=None, + meta=None, + metasrc=None, + name=None, + stream=None, + uid=None, + uirevision=None, + visible=None, + row=None, + col=None, + **kwargs, + ) -> "Figure": + """ + Add a new Table trace + + Table view for detailed data viewing. The data are arranged in + a grid of rows and columns. Most styling can be specified for + columns, rows or individual cells. Table is using a column- + major order, ie. the grid is represented as a vector of column + vectors. + + Parameters + ---------- + cells + :class:`plotly.graph_objects.table.Cells` instance or + dict with compatible properties + columnorder + Specifies the rendered order of the data columns; for + example, a value `2` at position `0` means that column + index `0` in the data will be rendered as the third + column, as columns have an index base of zero. + columnordersrc + Sets the source reference on Chart Studio Cloud for + `columnorder`. + columnwidth + The width of columns expressed as a ratio. Columns fill + the available width in proportion of their specified + column widths. + columnwidthsrc + Sets the source reference on Chart Studio Cloud for + `columnwidth`. + customdata + Assigns extra data each datum. This may be useful when + listening to hover, click and selection events. Note + that, "scatter" traces also appends customdata items in + the markers DOM elements + customdatasrc + Sets the source reference on Chart Studio Cloud for + `customdata`. + domain + :class:`plotly.graph_objects.table.Domain` instance or + dict with compatible properties + header + :class:`plotly.graph_objects.table.Header` instance or + dict with compatible properties + hoverinfo + Determines which trace information appear on hover. If + `none` or `skip` are set, no information is displayed + upon hovering. But, if `none` is set, click and hover + events are still fired. + hoverinfosrc + Sets the source reference on Chart Studio Cloud for + `hoverinfo`. + hoverlabel + :class:`plotly.graph_objects.table.Hoverlabel` instance + or dict with compatible properties + ids + Assigns id labels to each datum. These ids for object + constancy of data points during animation. Should be an + array of strings, not numbers or any other type. + idssrc + Sets the source reference on Chart Studio Cloud for + `ids`. + legend + Sets the reference to a legend to show this trace in. + References to these legends are "legend", "legend2", + "legend3", etc. Settings for these legends are set in + the layout, under `layout.legend`, `layout.legend2`, + etc. + legendgrouptitle + :class:`plotly.graph_objects.table.Legendgrouptitle` + instance or dict with compatible properties + legendrank + Sets the legend rank for this trace. Items and groups + with smaller ranks are presented on top/left side while + with "reversed" `legend.traceorder` they are on + bottom/right side. The default legendrank is 1000, so + that you can use ranks less than 1000 to place certain + items before all unranked items, and ranks greater than + 1000 to go after all unranked items. When having + unranked or equal rank items shapes would be displayed + after traces i.e. according to their order in data and + layout. + legendwidth + Sets the width (in px or fraction) of the legend for + this trace. + meta + Assigns extra meta information associated with this + trace that can be used in various text attributes. + Attributes such as trace `name`, graph, axis and + colorbar `title.text`, annotation `text` + `rangeselector`, `updatemenues` and `sliders` `label` + text all support `meta`. To access the trace `meta` + values in an attribute in the same trace, simply use + `%{meta[i]}` where `i` is the index or key of the + `meta` item in question. To access trace `meta` in + layout attributes, use `%{data[n[.meta[i]}` where `i` + is the index or key of the `meta` and `n` is the trace + index. + metasrc + Sets the source reference on Chart Studio Cloud for + `meta`. + name + Sets the trace name. The trace name appears as the + legend item and on hover. + stream + :class:`plotly.graph_objects.table.Stream` instance or + dict with compatible properties + uid + Assign an id to this trace, Use this to provide object + constancy between traces during animations and + transitions. + uirevision + Controls persistence of some user-driven changes to the + trace: `constraintrange` in `parcoords` traces, as well + as some `editable: true` modifications such as `name` + and `colorbar.title`. Defaults to `layout.uirevision`. + Note that other user-driven trace attribute changes are + controlled by `layout` attributes: `trace.visible` is + controlled by `layout.legend.uirevision`, + `selectedpoints` is controlled by + `layout.selectionrevision`, and `colorbar.(x|y)` + (accessible with `config: {editable: true}`) is + controlled by `layout.editrevision`. Trace changes are + tracked by `uid`, which only falls back on trace index + if no `uid` is provided. So if your app can add/remove + traces before the end of the `data` array, such that + the same trace has a different index, you can still + preserve user-driven changes if you give each trace a + `uid` that stays with it as it moves. + visible + Determines whether or not this trace is visible. If + "legendonly", the trace is not drawn, but can appear as + a legend item (provided that the legend itself is + visible). + row : 'all', int or None (default) + Subplot row index (starting from 1) for the trace to be + added. Only valid if figure was created using + `plotly.tools.make_subplots`.If 'all', addresses all + rows in the specified column(s). + col : 'all', int or None (default) + Subplot col index (starting from 1) for the trace to be + added. Only valid if figure was created using + `plotly.tools.make_subplots`.If 'all', addresses all + columns in the specified row(s). + + Returns + ------- + Figure + """ + from plotly.graph_objs import Table + + new_trace = Table( + cells=cells, + columnorder=columnorder, + columnordersrc=columnordersrc, + columnwidth=columnwidth, + columnwidthsrc=columnwidthsrc, + customdata=customdata, + customdatasrc=customdatasrc, + domain=domain, + header=header, + hoverinfo=hoverinfo, + hoverinfosrc=hoverinfosrc, + hoverlabel=hoverlabel, + ids=ids, + idssrc=idssrc, + legend=legend, + legendgrouptitle=legendgrouptitle, + legendrank=legendrank, + legendwidth=legendwidth, + meta=meta, + metasrc=metasrc, + name=name, + stream=stream, + uid=uid, + uirevision=uirevision, + visible=visible, + **kwargs, + ) + return self.add_trace(new_trace, row=row, col=col) + + def add_treemap( + self, + branchvalues=None, + count=None, + customdata=None, + customdatasrc=None, + domain=None, + hoverinfo=None, + hoverinfosrc=None, + hoverlabel=None, + hovertemplate=None, + hovertemplatefallback=None, + hovertemplatesrc=None, + hovertext=None, + hovertextsrc=None, + ids=None, + idssrc=None, + insidetextfont=None, + labels=None, + labelssrc=None, + legend=None, + legendgrouptitle=None, + legendrank=None, + legendwidth=None, + level=None, + marker=None, + maxdepth=None, + meta=None, + metasrc=None, + name=None, + opacity=None, + outsidetextfont=None, + parents=None, + parentssrc=None, + pathbar=None, + root=None, + sort=None, + stream=None, + text=None, + textfont=None, + textinfo=None, + textposition=None, + textsrc=None, + texttemplate=None, + texttemplatefallback=None, + texttemplatesrc=None, + tiling=None, + uid=None, + uirevision=None, + values=None, + valuessrc=None, + visible=None, + row=None, + col=None, + **kwargs, + ) -> "Figure": + """ + Add a new Treemap trace + + Visualize hierarchal data from leaves (and/or outer branches) + towards root with rectangles. The treemap sectors are + determined by the entries in "labels" or "ids" and in + "parents". + + Parameters + ---------- + branchvalues + Determines how the items in `values` are summed. When + set to "total", items in `values` are taken to be value + of all its descendants. When set to "remainder", items + in `values` corresponding to the root and the branches + sectors are taken to be the extra part not part of the + sum of the values at their leaves. + count + Determines default for `values` when it is not + provided, by inferring a 1 for each of the "leaves" + and/or "branches", otherwise 0. + customdata + Assigns extra data each datum. This may be useful when + listening to hover, click and selection events. Note + that, "scatter" traces also appends customdata items in + the markers DOM elements + customdatasrc + Sets the source reference on Chart Studio Cloud for + `customdata`. + domain + :class:`plotly.graph_objects.treemap.Domain` instance + or dict with compatible properties + hoverinfo + Determines which trace information appear on hover. If + `none` or `skip` are set, no information is displayed + upon hovering. But, if `none` is set, click and hover + events are still fired. + hoverinfosrc + Sets the source reference on Chart Studio Cloud for + `hoverinfo`. + hoverlabel + :class:`plotly.graph_objects.treemap.Hoverlabel` + instance or dict with compatible properties + hovertemplate + Template string used for rendering the information that + appear on hover box. Note that this will override + `hoverinfo`. Variables are inserted using %{variable}, + for example "y: %{y}" as well as %{xother}, {%_xother}, + {%_xother_}, {%xother_}. When showing info for several + points, "xother" will be added to those with different + x positions from the first point. An underscore before + or after "(x|y)other" will add a space on that side, + only when this field is shown. Numbers are formatted + using d3-format's syntax %{variable:d3-format}, for + example "Price: %{y:$.2f}". + https://github.com/d3/d3-format/tree/v1.4.5#d3-format + for details on the formatting syntax. Dates are + formatted using d3-time-format's syntax + %{variable|d3-time-format}, for example "Day: + %{2019-01-01|%A}". https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format for details on the + date formatting syntax. Variables that can't be found + will be replaced with the specifier. For example, a + template of "data: %{x}, %{y}" will result in a value + of "data: 1, %{y}" if x is 1 and y is missing. + Variables with an undefined value will be replaced with + the fallback value. The variables available in + `hovertemplate` are the ones emitted as event data + described at this link + https://plotly.com/javascript/plotlyjs-events/#event- + data. Additionally, all attributes that can be + specified per-point (the ones that are `arrayOk: true`) + are available. Finally, the template string has access + to variables `currentPath`, `root`, `entry`, + `percentRoot`, `percentEntry` and `percentParent`. + Anything contained in tag `` is displayed in the + secondary box, for example + `%{fullData.name}`. To hide the + secondary box completely, use an empty tag + ``. + hovertemplatefallback + Fallback string that's displayed when a variable + referenced in a template is missing. If the boolean + value 'false' is passed in, the specifier with the + missing variable will be displayed. + hovertemplatesrc + Sets the source reference on Chart Studio Cloud for + `hovertemplate`. + hovertext + Sets hover text elements associated with each sector. + If a single string, the same string appears for all + data points. If an array of string, the items are + mapped in order of this trace's sectors. To be seen, + trace `hoverinfo` must contain a "text" flag. + hovertextsrc + Sets the source reference on Chart Studio Cloud for + `hovertext`. + ids + Assigns id labels to each datum. These ids for object + constancy of data points during animation. Should be an + array of strings, not numbers or any other type. + idssrc + Sets the source reference on Chart Studio Cloud for + `ids`. + insidetextfont + Sets the font used for `textinfo` lying inside the + sector. + labels + Sets the labels of each of the sectors. + labelssrc + Sets the source reference on Chart Studio Cloud for + `labels`. + legend + Sets the reference to a legend to show this trace in. + References to these legends are "legend", "legend2", + "legend3", etc. Settings for these legends are set in + the layout, under `layout.legend`, `layout.legend2`, + etc. + legendgrouptitle + :class:`plotly.graph_objects.treemap.Legendgrouptitle` + instance or dict with compatible properties + legendrank + Sets the legend rank for this trace. Items and groups + with smaller ranks are presented on top/left side while + with "reversed" `legend.traceorder` they are on + bottom/right side. The default legendrank is 1000, so + that you can use ranks less than 1000 to place certain + items before all unranked items, and ranks greater than + 1000 to go after all unranked items. When having + unranked or equal rank items shapes would be displayed + after traces i.e. according to their order in data and + layout. + legendwidth + Sets the width (in px or fraction) of the legend for + this trace. + level + Sets the level from which this trace hierarchy is + rendered. Set `level` to `''` to start from the root + node in the hierarchy. Must be an "id" if `ids` is + filled in, otherwise plotly attempts to find a matching + item in `labels`. + marker + :class:`plotly.graph_objects.treemap.Marker` instance + or dict with compatible properties + maxdepth + Sets the number of rendered sectors from any given + `level`. Set `maxdepth` to "-1" to render all the + levels in the hierarchy. + meta + Assigns extra meta information associated with this + trace that can be used in various text attributes. + Attributes such as trace `name`, graph, axis and + colorbar `title.text`, annotation `text` + `rangeselector`, `updatemenues` and `sliders` `label` + text all support `meta`. To access the trace `meta` + values in an attribute in the same trace, simply use + `%{meta[i]}` where `i` is the index or key of the + `meta` item in question. To access trace `meta` in + layout attributes, use `%{data[n[.meta[i]}` where `i` + is the index or key of the `meta` and `n` is the trace + index. + metasrc + Sets the source reference on Chart Studio Cloud for + `meta`. + name + Sets the trace name. The trace name appears as the + legend item and on hover. + opacity + Sets the opacity of the trace. + outsidetextfont + Sets the font used for `textinfo` lying outside the + sector. This option refers to the root of the hierarchy + presented on top left corner of a treemap graph. Please + note that if a hierarchy has multiple root nodes, this + option won't have any effect and `insidetextfont` would + be used. + parents + Sets the parent sectors for each of the sectors. Empty + string items '' are understood to reference the root + node in the hierarchy. If `ids` is filled, `parents` + items are understood to be "ids" themselves. When `ids` + is not set, plotly attempts to find matching items in + `labels`, but beware they must be unique. + parentssrc + Sets the source reference on Chart Studio Cloud for + `parents`. + pathbar + :class:`plotly.graph_objects.treemap.Pathbar` instance + or dict with compatible properties + root + :class:`plotly.graph_objects.treemap.Root` instance or + dict with compatible properties + sort + Determines whether or not the sectors are reordered + from largest to smallest. + stream + :class:`plotly.graph_objects.treemap.Stream` instance + or dict with compatible properties + text + Sets text elements associated with each sector. If + trace `textinfo` contains a "text" flag, these elements + will be seen on the chart. If trace `hoverinfo` + contains a "text" flag and "hovertext" is not set, + these elements will be seen in the hover labels. + textfont + Sets the font used for `textinfo`. + textinfo + Determines which trace information appear on the graph. + textposition + Sets the positions of the `text` elements. + textsrc + Sets the source reference on Chart Studio Cloud for + `text`. + texttemplate + Template string used for rendering the information text + that appears on points. Note that this will override + `textinfo`. Variables are inserted using %{variable}, + for example "y: %{y}". Numbers are formatted using + d3-format's syntax %{variable:d3-format}, for example + "Price: %{y:$.2f}". + https://github.com/d3/d3-format/tree/v1.4.5#d3-format + for details on the formatting syntax. Dates are + formatted using d3-time-format's syntax + %{variable|d3-time-format}, for example "Day: + %{2019-01-01|%A}". https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format for details on the + date formatting syntax. Variables that can't be found + will be replaced with the specifier. For example, a + template of "data: %{x}, %{y}" will result in a value + of "data: 1, %{y}" if x is 1 and y is missing. + Variables with an undefined value will be replaced with + the fallback value. All attributes that can be + specified per-point (the ones that are `arrayOk: true`) + are available. Finally, the template string has access + to variables `currentPath`, `root`, `entry`, + `percentRoot`, `percentEntry`, `percentParent`, `label` + and `value`. + texttemplatefallback + Fallback string that's displayed when a variable + referenced in a template is missing. If the boolean + value 'false' is passed in, the specifier with the + missing variable will be displayed. + texttemplatesrc + Sets the source reference on Chart Studio Cloud for + `texttemplate`. + tiling + :class:`plotly.graph_objects.treemap.Tiling` instance + or dict with compatible properties + uid + Assign an id to this trace, Use this to provide object + constancy between traces during animations and + transitions. + uirevision + Controls persistence of some user-driven changes to the + trace: `constraintrange` in `parcoords` traces, as well + as some `editable: true` modifications such as `name` + and `colorbar.title`. Defaults to `layout.uirevision`. + Note that other user-driven trace attribute changes are + controlled by `layout` attributes: `trace.visible` is + controlled by `layout.legend.uirevision`, + `selectedpoints` is controlled by + `layout.selectionrevision`, and `colorbar.(x|y)` + (accessible with `config: {editable: true}`) is + controlled by `layout.editrevision`. Trace changes are + tracked by `uid`, which only falls back on trace index + if no `uid` is provided. So if your app can add/remove + traces before the end of the `data` array, such that + the same trace has a different index, you can still + preserve user-driven changes if you give each trace a + `uid` that stays with it as it moves. + values + Sets the values associated with each of the sectors. + Use with `branchvalues` to determine how the values are + summed. + valuessrc + Sets the source reference on Chart Studio Cloud for + `values`. + visible + Determines whether or not this trace is visible. If + "legendonly", the trace is not drawn, but can appear as + a legend item (provided that the legend itself is + visible). + row : 'all', int or None (default) + Subplot row index (starting from 1) for the trace to be + added. Only valid if figure was created using + `plotly.tools.make_subplots`.If 'all', addresses all + rows in the specified column(s). + col : 'all', int or None (default) + Subplot col index (starting from 1) for the trace to be + added. Only valid if figure was created using + `plotly.tools.make_subplots`.If 'all', addresses all + columns in the specified row(s). + + Returns + ------- + Figure + """ + from plotly.graph_objs import Treemap + + new_trace = Treemap( + branchvalues=branchvalues, + count=count, + customdata=customdata, + customdatasrc=customdatasrc, + domain=domain, + hoverinfo=hoverinfo, + hoverinfosrc=hoverinfosrc, + hoverlabel=hoverlabel, + hovertemplate=hovertemplate, + hovertemplatefallback=hovertemplatefallback, + hovertemplatesrc=hovertemplatesrc, + hovertext=hovertext, + hovertextsrc=hovertextsrc, + ids=ids, + idssrc=idssrc, + insidetextfont=insidetextfont, + labels=labels, + labelssrc=labelssrc, + legend=legend, + legendgrouptitle=legendgrouptitle, + legendrank=legendrank, + legendwidth=legendwidth, + level=level, + marker=marker, + maxdepth=maxdepth, + meta=meta, + metasrc=metasrc, + name=name, + opacity=opacity, + outsidetextfont=outsidetextfont, + parents=parents, + parentssrc=parentssrc, + pathbar=pathbar, + root=root, + sort=sort, + stream=stream, + text=text, + textfont=textfont, + textinfo=textinfo, + textposition=textposition, + textsrc=textsrc, + texttemplate=texttemplate, + texttemplatefallback=texttemplatefallback, + texttemplatesrc=texttemplatesrc, + tiling=tiling, + uid=uid, + uirevision=uirevision, + values=values, + valuessrc=valuessrc, + visible=visible, + **kwargs, + ) + return self.add_trace(new_trace, row=row, col=col) + + def add_violin( + self, + alignmentgroup=None, + bandwidth=None, + box=None, + customdata=None, + customdatasrc=None, + fillcolor=None, + hoverinfo=None, + hoverinfosrc=None, + hoverlabel=None, + hoveron=None, + hovertemplate=None, + hovertemplatefallback=None, + hovertemplatesrc=None, + hovertext=None, + hovertextsrc=None, + ids=None, + idssrc=None, + jitter=None, + legend=None, + legendgroup=None, + legendgrouptitle=None, + legendrank=None, + legendwidth=None, + line=None, + marker=None, + meanline=None, + meta=None, + metasrc=None, + name=None, + offsetgroup=None, + opacity=None, + orientation=None, + pointpos=None, + points=None, + quartilemethod=None, + scalegroup=None, + scalemode=None, + selected=None, + selectedpoints=None, + showlegend=None, + side=None, + span=None, + spanmode=None, + stream=None, + text=None, + textsrc=None, + uid=None, + uirevision=None, + unselected=None, + visible=None, + width=None, + x=None, + x0=None, + xaxis=None, + xhoverformat=None, + xsrc=None, + y=None, + y0=None, + yaxis=None, + yhoverformat=None, + ysrc=None, + zorder=None, + row=None, + col=None, + secondary_y=None, + **kwargs, + ) -> "Figure": + """ + Add a new Violin trace + + In vertical (horizontal) violin plots, statistics are computed + using `y` (`x`) values. By supplying an `x` (`y`) array, one + violin per distinct x (y) value is drawn If no `x` (`y`) list + is provided, a single violin is drawn. That violin position is + then positioned with with `name` or with `x0` (`y0`) if + provided. + + Parameters + ---------- + alignmentgroup + Set several traces linked to the same position axis or + matching axes to the same alignmentgroup. This controls + whether bars compute their positional range dependently + or independently. + bandwidth + Sets the bandwidth used to compute the kernel density + estimate. By default, the bandwidth is determined by + Silverman's rule of thumb. + box + :class:`plotly.graph_objects.violin.Box` instance or + dict with compatible properties + customdata + Assigns extra data each datum. This may be useful when + listening to hover, click and selection events. Note + that, "scatter" traces also appends customdata items in + the markers DOM elements + customdatasrc + Sets the source reference on Chart Studio Cloud for + `customdata`. + fillcolor + Sets the fill color. Defaults to a half-transparent + variant of the line color, marker color, or marker line + color, whichever is available. + hoverinfo + Determines which trace information appear on hover. If + `none` or `skip` are set, no information is displayed + upon hovering. But, if `none` is set, click and hover + events are still fired. + hoverinfosrc + Sets the source reference on Chart Studio Cloud for + `hoverinfo`. + hoverlabel + :class:`plotly.graph_objects.violin.Hoverlabel` + instance or dict with compatible properties + hoveron + Do the hover effects highlight individual violins or + sample points or the kernel density estimate or any + combination of them? + hovertemplate + Template string used for rendering the information that + appear on hover box. Note that this will override + `hoverinfo`. Variables are inserted using %{variable}, + for example "y: %{y}" as well as %{xother}, {%_xother}, + {%_xother_}, {%xother_}. When showing info for several + points, "xother" will be added to those with different + x positions from the first point. An underscore before + or after "(x|y)other" will add a space on that side, + only when this field is shown. Numbers are formatted + using d3-format's syntax %{variable:d3-format}, for + example "Price: %{y:$.2f}". + https://github.com/d3/d3-format/tree/v1.4.5#d3-format + for details on the formatting syntax. Dates are + formatted using d3-time-format's syntax + %{variable|d3-time-format}, for example "Day: + %{2019-01-01|%A}". https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format for details on the + date formatting syntax. Variables that can't be found + will be replaced with the specifier. For example, a + template of "data: %{x}, %{y}" will result in a value + of "data: 1, %{y}" if x is 1 and y is missing. + Variables with an undefined value will be replaced with + the fallback value. The variables available in + `hovertemplate` are the ones emitted as event data + described at this link + https://plotly.com/javascript/plotlyjs-events/#event- + data. Additionally, all attributes that can be + specified per-point (the ones that are `arrayOk: true`) + are available. Anything contained in tag `` is + displayed in the secondary box, for example + `%{fullData.name}`. To hide the + secondary box completely, use an empty tag + ``. + hovertemplatefallback + Fallback string that's displayed when a variable + referenced in a template is missing. If the boolean + value 'false' is passed in, the specifier with the + missing variable will be displayed. + hovertemplatesrc + Sets the source reference on Chart Studio Cloud for + `hovertemplate`. + hovertext + Same as `text`. + hovertextsrc + Sets the source reference on Chart Studio Cloud for + `hovertext`. + ids + Assigns id labels to each datum. These ids for object + constancy of data points during animation. Should be an + array of strings, not numbers or any other type. + idssrc + Sets the source reference on Chart Studio Cloud for + `ids`. + jitter + Sets the amount of jitter in the sample points drawn. + If 0, the sample points align along the distribution + axis. If 1, the sample points are drawn in a random + jitter of width equal to the width of the violins. + legend + Sets the reference to a legend to show this trace in. + References to these legends are "legend", "legend2", + "legend3", etc. Settings for these legends are set in + the layout, under `layout.legend`, `layout.legend2`, + etc. + legendgroup + Sets the legend group for this trace. Traces and shapes + part of the same legend group hide/show at the same + time when toggling legend items. + legendgrouptitle + :class:`plotly.graph_objects.violin.Legendgrouptitle` + instance or dict with compatible properties + legendrank + Sets the legend rank for this trace. Items and groups + with smaller ranks are presented on top/left side while + with "reversed" `legend.traceorder` they are on + bottom/right side. The default legendrank is 1000, so + that you can use ranks less than 1000 to place certain + items before all unranked items, and ranks greater than + 1000 to go after all unranked items. When having + unranked or equal rank items shapes would be displayed + after traces i.e. according to their order in data and + layout. + legendwidth + Sets the width (in px or fraction) of the legend for + this trace. + line + :class:`plotly.graph_objects.violin.Line` instance or + dict with compatible properties + marker + :class:`plotly.graph_objects.violin.Marker` instance or + dict with compatible properties + meanline + :class:`plotly.graph_objects.violin.Meanline` instance + or dict with compatible properties + meta + Assigns extra meta information associated with this + trace that can be used in various text attributes. + Attributes such as trace `name`, graph, axis and + colorbar `title.text`, annotation `text` + `rangeselector`, `updatemenues` and `sliders` `label` + text all support `meta`. To access the trace `meta` + values in an attribute in the same trace, simply use + `%{meta[i]}` where `i` is the index or key of the + `meta` item in question. To access trace `meta` in + layout attributes, use `%{data[n[.meta[i]}` where `i` + is the index or key of the `meta` and `n` is the trace + index. + metasrc + Sets the source reference on Chart Studio Cloud for + `meta`. + name + Sets the trace name. The trace name appears as the + legend item and on hover. For violin traces, the name + will also be used for the position coordinate, if `x` + and `x0` (`y` and `y0` if horizontal) are missing and + the position axis is categorical. Note that the trace + name is also used as a default value for attribute + `scalegroup` (please see its description for details). + offsetgroup + Set several traces linked to the same position axis or + matching axes to the same offsetgroup where bars of the + same position coordinate will line up. + opacity + Sets the opacity of the trace. + orientation + Sets the orientation of the violin(s). If "v" ("h"), + the distribution is visualized along the vertical + (horizontal). + pointpos + Sets the position of the sample points in relation to + the violins. If 0, the sample points are places over + the center of the violins. Positive (negative) values + correspond to positions to the right (left) for + vertical violins and above (below) for horizontal + violins. + points + If "outliers", only the sample points lying outside the + whiskers are shown If "suspectedoutliers", the outlier + points are shown and points either less than 4*Q1-3*Q3 + or greater than 4*Q3-3*Q1 are highlighted (see + `outliercolor`) If "all", all sample points are shown + If False, only the violins are shown with no sample + points. Defaults to "suspectedoutliers" when + `marker.outliercolor` or `marker.line.outliercolor` is + set, otherwise defaults to "outliers". + quartilemethod + Sets the method used to compute the sample's Q1 and Q3 + quartiles. The "linear" method uses the 25th percentile + for Q1 and 75th percentile for Q3 as computed using + method #10 (listed on + http://jse.amstat.org/v14n3/langford.html). The + "exclusive" method uses the median to divide the + ordered dataset into two halves if the sample is odd, + it does not include the median in either half - Q1 is + then the median of the lower half and Q3 the median of + the upper half. The "inclusive" method also uses the + median to divide the ordered dataset into two halves + but if the sample is odd, it includes the median in + both halves - Q1 is then the median of the lower half + and Q3 the median of the upper half. + scalegroup + If there are multiple violins that should be sized + according to to some metric (see `scalemode`), link + them by providing a non-empty group id here shared by + every trace in the same group. If a violin's `width` is + undefined, `scalegroup` will default to the trace's + name. In this case, violins with the same names will be + linked together + scalemode + Sets the metric by which the width of each violin is + determined. "width" means each violin has the same + (max) width "count" means the violins are scaled by the + number of sample points making up each violin. + selected + :class:`plotly.graph_objects.violin.Selected` instance + or dict with compatible properties + selectedpoints + Array containing integer indices of selected points. + Has an effect only for traces that support selections. + Note that an empty array means an empty selection where + the `unselected` are turned on for all points, whereas, + any other non-array values means no selection all where + the `selected` and `unselected` styles have no effect. + showlegend + Determines whether or not an item corresponding to this + trace is shown in the legend. + side + Determines on which side of the position value the + density function making up one half of a violin is + plotted. Useful when comparing two violin traces under + "overlay" mode, where one trace has `side` set to + "positive" and the other to "negative". + span + Sets the span in data space for which the density + function will be computed. Has an effect only when + `spanmode` is set to "manual". + spanmode + Sets the method by which the span in data space where + the density function will be computed. "soft" means the + span goes from the sample's minimum value minus two + bandwidths to the sample's maximum value plus two + bandwidths. "hard" means the span goes from the + sample's minimum to its maximum value. For custom span + settings, use mode "manual" and fill in the `span` + attribute. + stream + :class:`plotly.graph_objects.violin.Stream` instance or + dict with compatible properties + text + Sets the text elements associated with each sample + value. If a single string, the same string appears over + all the data points. If an array of string, the items + are mapped in order to the this trace's (x,y) + coordinates. To be seen, trace `hoverinfo` must contain + a "text" flag. + textsrc + Sets the source reference on Chart Studio Cloud for + `text`. + uid + Assign an id to this trace, Use this to provide object + constancy between traces during animations and + transitions. + uirevision + Controls persistence of some user-driven changes to the + trace: `constraintrange` in `parcoords` traces, as well + as some `editable: true` modifications such as `name` + and `colorbar.title`. Defaults to `layout.uirevision`. + Note that other user-driven trace attribute changes are + controlled by `layout` attributes: `trace.visible` is + controlled by `layout.legend.uirevision`, + `selectedpoints` is controlled by + `layout.selectionrevision`, and `colorbar.(x|y)` + (accessible with `config: {editable: true}`) is + controlled by `layout.editrevision`. Trace changes are + tracked by `uid`, which only falls back on trace index + if no `uid` is provided. So if your app can add/remove + traces before the end of the `data` array, such that + the same trace has a different index, you can still + preserve user-driven changes if you give each trace a + `uid` that stays with it as it moves. + unselected + :class:`plotly.graph_objects.violin.Unselected` + instance or dict with compatible properties + visible + Determines whether or not this trace is visible. If + "legendonly", the trace is not drawn, but can appear as + a legend item (provided that the legend itself is + visible). + width + Sets the width of the violin in data coordinates. If 0 + (default value) the width is automatically selected + based on the positions of other violin traces in the + same subplot. + x + Sets the x sample data or coordinates. See overview for + more info. + x0 + Sets the x coordinate for single-box traces or the + starting coordinate for multi-box traces set using + q1/median/q3. See overview for more info. + xaxis + Sets a reference between this trace's x coordinates and + a 2D cartesian x axis. If "x" (the default value), the + x coordinates refer to `layout.xaxis`. If "x2", the x + coordinates refer to `layout.xaxis2`, and so on. + xhoverformat + Sets the hover text formatting rulefor `x` using d3 + formatting mini-languages which are very similar to + those in Python. For numbers, see: + https://github.com/d3/d3-format/tree/v1.4.5#d3-format. + And for dates see: https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format. We add two items to + d3's date formatter: "%h" for half of the year as a + decimal number as well as "%{n}f" for fractional + seconds with n digits. For example, *2016-10-13 + 09:15:23.456* with tickformat "%H~%M~%S.%2f" would + display *09~15~23.46*By default the values are + formatted using `xaxis.hoverformat`. + xsrc + Sets the source reference on Chart Studio Cloud for + `x`. + y + Sets the y sample data or coordinates. See overview for + more info. + y0 + Sets the y coordinate for single-box traces or the + starting coordinate for multi-box traces set using + q1/median/q3. See overview for more info. + yaxis + Sets a reference between this trace's y coordinates and + a 2D cartesian y axis. If "y" (the default value), the + y coordinates refer to `layout.yaxis`. If "y2", the y + coordinates refer to `layout.yaxis2`, and so on. + yhoverformat + Sets the hover text formatting rulefor `y` using d3 + formatting mini-languages which are very similar to + those in Python. For numbers, see: + https://github.com/d3/d3-format/tree/v1.4.5#d3-format. + And for dates see: https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format. We add two items to + d3's date formatter: "%h" for half of the year as a + decimal number as well as "%{n}f" for fractional + seconds with n digits. For example, *2016-10-13 + 09:15:23.456* with tickformat "%H~%M~%S.%2f" would + display *09~15~23.46*By default the values are + formatted using `yaxis.hoverformat`. + ysrc + Sets the source reference on Chart Studio Cloud for + `y`. + zorder + Sets the layer on which this trace is displayed, + relative to other SVG traces on the same subplot. SVG + traces with higher `zorder` appear in front of those + with lower `zorder`. + row : 'all', int or None (default) + Subplot row index (starting from 1) for the trace to be + added. Only valid if figure was created using + `plotly.tools.make_subplots`.If 'all', addresses all + rows in the specified column(s). + col : 'all', int or None (default) + Subplot col index (starting from 1) for the trace to be + added. Only valid if figure was created using + `plotly.tools.make_subplots`.If 'all', addresses all + columns in the specified row(s). + secondary_y: boolean or None (default None) + If True, associate this trace with the secondary y-axis of the + subplot at the specified row and col. Only valid if all of the + following conditions are satisfied: + * The figure was created using `plotly.subplots.make_subplots`. + * The row and col arguments are not None + * The subplot at the specified row and col has type xy + (which is the default) and secondary_y True. These + properties are specified in the specs argument to + make_subplots. See the make_subplots docstring for more info. + + Returns + ------- + Figure + """ + from plotly.graph_objs import Violin + + new_trace = Violin( + alignmentgroup=alignmentgroup, + bandwidth=bandwidth, + box=box, + customdata=customdata, + customdatasrc=customdatasrc, + fillcolor=fillcolor, + hoverinfo=hoverinfo, + hoverinfosrc=hoverinfosrc, + hoverlabel=hoverlabel, + hoveron=hoveron, + hovertemplate=hovertemplate, + hovertemplatefallback=hovertemplatefallback, + hovertemplatesrc=hovertemplatesrc, + hovertext=hovertext, + hovertextsrc=hovertextsrc, + ids=ids, + idssrc=idssrc, + jitter=jitter, + legend=legend, + legendgroup=legendgroup, + legendgrouptitle=legendgrouptitle, + legendrank=legendrank, + legendwidth=legendwidth, + line=line, + marker=marker, + meanline=meanline, + meta=meta, + metasrc=metasrc, + name=name, + offsetgroup=offsetgroup, + opacity=opacity, + orientation=orientation, + pointpos=pointpos, + points=points, + quartilemethod=quartilemethod, + scalegroup=scalegroup, + scalemode=scalemode, + selected=selected, + selectedpoints=selectedpoints, + showlegend=showlegend, + side=side, + span=span, + spanmode=spanmode, + stream=stream, + text=text, + textsrc=textsrc, + uid=uid, + uirevision=uirevision, + unselected=unselected, + visible=visible, + width=width, + x=x, + x0=x0, + xaxis=xaxis, + xhoverformat=xhoverformat, + xsrc=xsrc, + y=y, + y0=y0, + yaxis=yaxis, + yhoverformat=yhoverformat, + ysrc=ysrc, + zorder=zorder, + **kwargs, + ) + return self.add_trace(new_trace, row=row, col=col, secondary_y=secondary_y) + + def add_volume( + self, + autocolorscale=None, + caps=None, + cauto=None, + cmax=None, + cmid=None, + cmin=None, + coloraxis=None, + colorbar=None, + colorscale=None, + contour=None, + customdata=None, + customdatasrc=None, + flatshading=None, + hoverinfo=None, + hoverinfosrc=None, + hoverlabel=None, + hovertemplate=None, + hovertemplatefallback=None, + hovertemplatesrc=None, + hovertext=None, + hovertextsrc=None, + ids=None, + idssrc=None, + isomax=None, + isomin=None, + legend=None, + legendgroup=None, + legendgrouptitle=None, + legendrank=None, + legendwidth=None, + lighting=None, + lightposition=None, + meta=None, + metasrc=None, + name=None, + opacity=None, + opacityscale=None, + reversescale=None, + scene=None, + showlegend=None, + showscale=None, + slices=None, + spaceframe=None, + stream=None, + surface=None, + text=None, + textsrc=None, + uid=None, + uirevision=None, + value=None, + valuehoverformat=None, + valuesrc=None, + visible=None, + x=None, + xhoverformat=None, + xsrc=None, + y=None, + yhoverformat=None, + ysrc=None, + z=None, + zhoverformat=None, + zsrc=None, + row=None, + col=None, + **kwargs, + ) -> "Figure": + """ + Add a new Volume trace + + Draws volume trace between iso-min and iso-max values with + coordinates given by four 1-dimensional arrays containing the + `value`, `x`, `y` and `z` of every vertex of a uniform or non- + uniform 3-D grid. Horizontal or vertical slices, caps as well + as spaceframe between iso-min and iso-max values could also be + drawn using this trace. + + Parameters + ---------- + autocolorscale + Determines whether the colorscale is a default palette + (`autocolorscale: true`) or the palette determined by + `colorscale`. In case `colorscale` is unspecified or + `autocolorscale` is true, the default palette will be + chosen according to whether numbers in the `color` + array are all positive, all negative or mixed. + caps + :class:`plotly.graph_objects.volume.Caps` instance or + dict with compatible properties + cauto + Determines whether or not the color domain is computed + with respect to the input data (here `value`) or the + bounds set in `cmin` and `cmax` Defaults to `false` + when `cmin` and `cmax` are set by the user. + cmax + Sets the upper bound of the color domain. Value should + have the same units as `value` and if set, `cmin` must + be set as well. + cmid + Sets the mid-point of the color domain by scaling + `cmin` and/or `cmax` to be equidistant to this point. + Value should have the same units as `value`. Has no + effect when `cauto` is `false`. + cmin + Sets the lower bound of the color domain. Value should + have the same units as `value` and if set, `cmax` must + be set as well. + coloraxis + Sets a reference to a shared color axis. References to + these shared color axes are "coloraxis", "coloraxis2", + "coloraxis3", etc. Settings for these shared color axes + are set in the layout, under `layout.coloraxis`, + `layout.coloraxis2`, etc. Note that multiple color + scales can be linked to the same color axis. + colorbar + :class:`plotly.graph_objects.volume.ColorBar` instance + or dict with compatible properties + colorscale + Sets the colorscale. The colorscale must be an array + containing arrays mapping a normalized value to an rgb, + rgba, hex, hsl, hsv, or named color string. At minimum, + a mapping for the lowest (0) and highest (1) values are + required. For example, `[[0, 'rgb(0,0,255)'], [1, + 'rgb(255,0,0)']]`. To control the bounds of the + colorscale in color space, use `cmin` and `cmax`. + Alternatively, `colorscale` may be a palette name + string of the following list: Blackbody,Bluered,Blues,C + ividis,Earth,Electric,Greens,Greys,Hot,Jet,Picnic,Portl + and,Rainbow,RdBu,Reds,Viridis,YlGnBu,YlOrRd. + contour + :class:`plotly.graph_objects.volume.Contour` instance + or dict with compatible properties + customdata + Assigns extra data each datum. This may be useful when + listening to hover, click and selection events. Note + that, "scatter" traces also appends customdata items in + the markers DOM elements + customdatasrc + Sets the source reference on Chart Studio Cloud for + `customdata`. + flatshading + Determines whether or not normal smoothing is applied + to the meshes, creating meshes with an angular, low- + poly look via flat reflections. + hoverinfo + Determines which trace information appear on hover. If + `none` or `skip` are set, no information is displayed + upon hovering. But, if `none` is set, click and hover + events are still fired. + hoverinfosrc + Sets the source reference on Chart Studio Cloud for + `hoverinfo`. + hoverlabel + :class:`plotly.graph_objects.volume.Hoverlabel` + instance or dict with compatible properties + hovertemplate + Template string used for rendering the information that + appear on hover box. Note that this will override + `hoverinfo`. Variables are inserted using %{variable}, + for example "y: %{y}" as well as %{xother}, {%_xother}, + {%_xother_}, {%xother_}. When showing info for several + points, "xother" will be added to those with different + x positions from the first point. An underscore before + or after "(x|y)other" will add a space on that side, + only when this field is shown. Numbers are formatted + using d3-format's syntax %{variable:d3-format}, for + example "Price: %{y:$.2f}". + https://github.com/d3/d3-format/tree/v1.4.5#d3-format + for details on the formatting syntax. Dates are + formatted using d3-time-format's syntax + %{variable|d3-time-format}, for example "Day: + %{2019-01-01|%A}". https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format for details on the + date formatting syntax. Variables that can't be found + will be replaced with the specifier. For example, a + template of "data: %{x}, %{y}" will result in a value + of "data: 1, %{y}" if x is 1 and y is missing. + Variables with an undefined value will be replaced with + the fallback value. The variables available in + `hovertemplate` are the ones emitted as event data + described at this link + https://plotly.com/javascript/plotlyjs-events/#event- + data. Additionally, all attributes that can be + specified per-point (the ones that are `arrayOk: true`) + are available. Anything contained in tag `` is + displayed in the secondary box, for example + `%{fullData.name}`. To hide the + secondary box completely, use an empty tag + ``. + hovertemplatefallback + Fallback string that's displayed when a variable + referenced in a template is missing. If the boolean + value 'false' is passed in, the specifier with the + missing variable will be displayed. + hovertemplatesrc + Sets the source reference on Chart Studio Cloud for + `hovertemplate`. + hovertext + Same as `text`. + hovertextsrc + Sets the source reference on Chart Studio Cloud for + `hovertext`. + ids + Assigns id labels to each datum. These ids for object + constancy of data points during animation. Should be an + array of strings, not numbers or any other type. + idssrc + Sets the source reference on Chart Studio Cloud for + `ids`. + isomax + Sets the maximum boundary for iso-surface plot. + isomin + Sets the minimum boundary for iso-surface plot. + legend + Sets the reference to a legend to show this trace in. + References to these legends are "legend", "legend2", + "legend3", etc. Settings for these legends are set in + the layout, under `layout.legend`, `layout.legend2`, + etc. + legendgroup + Sets the legend group for this trace. Traces and shapes + part of the same legend group hide/show at the same + time when toggling legend items. + legendgrouptitle + :class:`plotly.graph_objects.volume.Legendgrouptitle` + instance or dict with compatible properties + legendrank + Sets the legend rank for this trace. Items and groups + with smaller ranks are presented on top/left side while + with "reversed" `legend.traceorder` they are on + bottom/right side. The default legendrank is 1000, so + that you can use ranks less than 1000 to place certain + items before all unranked items, and ranks greater than + 1000 to go after all unranked items. When having + unranked or equal rank items shapes would be displayed + after traces i.e. according to their order in data and + layout. + legendwidth + Sets the width (in px or fraction) of the legend for + this trace. + lighting + :class:`plotly.graph_objects.volume.Lighting` instance + or dict with compatible properties + lightposition + :class:`plotly.graph_objects.volume.Lightposition` + instance or dict with compatible properties + meta + Assigns extra meta information associated with this + trace that can be used in various text attributes. + Attributes such as trace `name`, graph, axis and + colorbar `title.text`, annotation `text` + `rangeselector`, `updatemenues` and `sliders` `label` + text all support `meta`. To access the trace `meta` + values in an attribute in the same trace, simply use + `%{meta[i]}` where `i` is the index or key of the + `meta` item in question. To access trace `meta` in + layout attributes, use `%{data[n[.meta[i]}` where `i` + is the index or key of the `meta` and `n` is the trace + index. + metasrc + Sets the source reference on Chart Studio Cloud for + `meta`. + name + Sets the trace name. The trace name appears as the + legend item and on hover. + opacity + Sets the opacity of the surface. Please note that in + the case of using high `opacity` values for example a + value greater than or equal to 0.5 on two surfaces (and + 0.25 with four surfaces), an overlay of multiple + transparent surfaces may not perfectly be sorted in + depth by the webgl API. This behavior may be improved + in the near future and is subject to change. + opacityscale + Sets the opacityscale. The opacityscale must be an + array containing arrays mapping a normalized value to + an opacity value. At minimum, a mapping for the lowest + (0) and highest (1) values are required. For example, + `[[0, 1], [0.5, 0.2], [1, 1]]` means that higher/lower + values would have higher opacity values and those in + the middle would be more transparent Alternatively, + `opacityscale` may be a palette name string of the + following list: 'min', 'max', 'extremes' and 'uniform'. + The default is 'uniform'. + reversescale + Reverses the color mapping if true. If true, `cmin` + will correspond to the last color in the array and + `cmax` will correspond to the first color. + scene + Sets a reference between this trace's 3D coordinate + system and a 3D scene. If "scene" (the default value), + the (x,y,z) coordinates refer to `layout.scene`. If + "scene2", the (x,y,z) coordinates refer to + `layout.scene2`, and so on. + showlegend + Determines whether or not an item corresponding to this + trace is shown in the legend. + showscale + Determines whether or not a colorbar is displayed for + this trace. + slices + :class:`plotly.graph_objects.volume.Slices` instance or + dict with compatible properties + spaceframe + :class:`plotly.graph_objects.volume.Spaceframe` + instance or dict with compatible properties + stream + :class:`plotly.graph_objects.volume.Stream` instance or + dict with compatible properties + surface + :class:`plotly.graph_objects.volume.Surface` instance + or dict with compatible properties + text + Sets the text elements associated with the vertices. If + trace `hoverinfo` contains a "text" flag and + "hovertext" is not set, these elements will be seen in + the hover labels. + textsrc + Sets the source reference on Chart Studio Cloud for + `text`. + uid + Assign an id to this trace, Use this to provide object + constancy between traces during animations and + transitions. + uirevision + Controls persistence of some user-driven changes to the + trace: `constraintrange` in `parcoords` traces, as well + as some `editable: true` modifications such as `name` + and `colorbar.title`. Defaults to `layout.uirevision`. + Note that other user-driven trace attribute changes are + controlled by `layout` attributes: `trace.visible` is + controlled by `layout.legend.uirevision`, + `selectedpoints` is controlled by + `layout.selectionrevision`, and `colorbar.(x|y)` + (accessible with `config: {editable: true}`) is + controlled by `layout.editrevision`. Trace changes are + tracked by `uid`, which only falls back on trace index + if no `uid` is provided. So if your app can add/remove + traces before the end of the `data` array, such that + the same trace has a different index, you can still + preserve user-driven changes if you give each trace a + `uid` that stays with it as it moves. + value + Sets the 4th dimension (value) of the vertices. + valuehoverformat + Sets the hover text formatting rulefor `value` using + d3 formatting mini-languages which are very similar to + those in Python. For numbers, see: https://github.com/d + 3/d3-format/tree/v1.4.5#d3-format.By default the values + are formatted using generic number format. + valuesrc + Sets the source reference on Chart Studio Cloud for + `value`. + visible + Determines whether or not this trace is visible. If + "legendonly", the trace is not drawn, but can appear as + a legend item (provided that the legend itself is + visible). + x + Sets the X coordinates of the vertices on X axis. + xhoverformat + Sets the hover text formatting rulefor `x` using d3 + formatting mini-languages which are very similar to + those in Python. For numbers, see: + https://github.com/d3/d3-format/tree/v1.4.5#d3-format. + And for dates see: https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format. We add two items to + d3's date formatter: "%h" for half of the year as a + decimal number as well as "%{n}f" for fractional + seconds with n digits. For example, *2016-10-13 + 09:15:23.456* with tickformat "%H~%M~%S.%2f" would + display *09~15~23.46*By default the values are + formatted using `xaxis.hoverformat`. + xsrc + Sets the source reference on Chart Studio Cloud for + `x`. + y + Sets the Y coordinates of the vertices on Y axis. + yhoverformat + Sets the hover text formatting rulefor `y` using d3 + formatting mini-languages which are very similar to + those in Python. For numbers, see: + https://github.com/d3/d3-format/tree/v1.4.5#d3-format. + And for dates see: https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format. We add two items to + d3's date formatter: "%h" for half of the year as a + decimal number as well as "%{n}f" for fractional + seconds with n digits. For example, *2016-10-13 + 09:15:23.456* with tickformat "%H~%M~%S.%2f" would + display *09~15~23.46*By default the values are + formatted using `yaxis.hoverformat`. + ysrc + Sets the source reference on Chart Studio Cloud for + `y`. + z + Sets the Z coordinates of the vertices on Z axis. + zhoverformat + Sets the hover text formatting rulefor `z` using d3 + formatting mini-languages which are very similar to + those in Python. For numbers, see: + https://github.com/d3/d3-format/tree/v1.4.5#d3-format. + And for dates see: https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format. We add two items to + d3's date formatter: "%h" for half of the year as a + decimal number as well as "%{n}f" for fractional + seconds with n digits. For example, *2016-10-13 + 09:15:23.456* with tickformat "%H~%M~%S.%2f" would + display *09~15~23.46*By default the values are + formatted using `zaxis.hoverformat`. + zsrc + Sets the source reference on Chart Studio Cloud for + `z`. + row : 'all', int or None (default) + Subplot row index (starting from 1) for the trace to be + added. Only valid if figure was created using + `plotly.tools.make_subplots`.If 'all', addresses all + rows in the specified column(s). + col : 'all', int or None (default) + Subplot col index (starting from 1) for the trace to be + added. Only valid if figure was created using + `plotly.tools.make_subplots`.If 'all', addresses all + columns in the specified row(s). + + Returns + ------- + Figure + """ + from plotly.graph_objs import Volume + + new_trace = Volume( + autocolorscale=autocolorscale, + caps=caps, + cauto=cauto, + cmax=cmax, + cmid=cmid, + cmin=cmin, + coloraxis=coloraxis, + colorbar=colorbar, + colorscale=colorscale, + contour=contour, + customdata=customdata, + customdatasrc=customdatasrc, + flatshading=flatshading, + hoverinfo=hoverinfo, + hoverinfosrc=hoverinfosrc, + hoverlabel=hoverlabel, + hovertemplate=hovertemplate, + hovertemplatefallback=hovertemplatefallback, + hovertemplatesrc=hovertemplatesrc, + hovertext=hovertext, + hovertextsrc=hovertextsrc, + ids=ids, + idssrc=idssrc, + isomax=isomax, + isomin=isomin, + legend=legend, + legendgroup=legendgroup, + legendgrouptitle=legendgrouptitle, + legendrank=legendrank, + legendwidth=legendwidth, + lighting=lighting, + lightposition=lightposition, + meta=meta, + metasrc=metasrc, + name=name, + opacity=opacity, + opacityscale=opacityscale, + reversescale=reversescale, + scene=scene, + showlegend=showlegend, + showscale=showscale, + slices=slices, + spaceframe=spaceframe, + stream=stream, + surface=surface, + text=text, + textsrc=textsrc, + uid=uid, + uirevision=uirevision, + value=value, + valuehoverformat=valuehoverformat, + valuesrc=valuesrc, + visible=visible, + x=x, + xhoverformat=xhoverformat, + xsrc=xsrc, + y=y, + yhoverformat=yhoverformat, + ysrc=ysrc, + z=z, + zhoverformat=zhoverformat, + zsrc=zsrc, + **kwargs, + ) + return self.add_trace(new_trace, row=row, col=col) + + def add_waterfall( + self, + alignmentgroup=None, + base=None, + cliponaxis=None, + connector=None, + constraintext=None, + customdata=None, + customdatasrc=None, + decreasing=None, + dx=None, + dy=None, + hoverinfo=None, + hoverinfosrc=None, + hoverlabel=None, + hovertemplate=None, + hovertemplatefallback=None, + hovertemplatesrc=None, + hovertext=None, + hovertextsrc=None, + ids=None, + idssrc=None, + increasing=None, + insidetextanchor=None, + insidetextfont=None, + legend=None, + legendgroup=None, + legendgrouptitle=None, + legendrank=None, + legendwidth=None, + measure=None, + measuresrc=None, + meta=None, + metasrc=None, + name=None, + offset=None, + offsetgroup=None, + offsetsrc=None, + opacity=None, + orientation=None, + outsidetextfont=None, + selectedpoints=None, + showlegend=None, + stream=None, + text=None, + textangle=None, + textfont=None, + textinfo=None, + textposition=None, + textpositionsrc=None, + textsrc=None, + texttemplate=None, + texttemplatefallback=None, + texttemplatesrc=None, + totals=None, + uid=None, + uirevision=None, + visible=None, + width=None, + widthsrc=None, + x=None, + x0=None, + xaxis=None, + xhoverformat=None, + xperiod=None, + xperiod0=None, + xperiodalignment=None, + xsrc=None, + y=None, + y0=None, + yaxis=None, + yhoverformat=None, + yperiod=None, + yperiod0=None, + yperiodalignment=None, + ysrc=None, + zorder=None, + row=None, + col=None, + secondary_y=None, + **kwargs, + ) -> "Figure": + """ + Add a new Waterfall trace + + Draws waterfall trace which is useful graph to displays the + contribution of various elements (either positive or negative) + in a bar chart. The data visualized by the span of the bars is + set in `y` if `orientation` is set to "v" (the default) and the + labels are set in `x`. By setting `orientation` to "h", the + roles are interchanged. + + Parameters + ---------- + alignmentgroup + Set several traces linked to the same position axis or + matching axes to the same alignmentgroup. This controls + whether bars compute their positional range dependently + or independently. + base + Sets where the bar base is drawn (in position axis + units). + cliponaxis + Determines whether the text nodes are clipped about the + subplot axes. To show the text nodes above axis lines + and tick labels, make sure to set `xaxis.layer` and + `yaxis.layer` to *below traces*. + connector + :class:`plotly.graph_objects.waterfall.Connector` + instance or dict with compatible properties + constraintext + Constrain the size of text inside or outside a bar to + be no larger than the bar itself. + customdata + Assigns extra data each datum. This may be useful when + listening to hover, click and selection events. Note + that, "scatter" traces also appends customdata items in + the markers DOM elements + customdatasrc + Sets the source reference on Chart Studio Cloud for + `customdata`. + decreasing + :class:`plotly.graph_objects.waterfall.Decreasing` + instance or dict with compatible properties + dx + Sets the x coordinate step. See `x0` for more info. + dy + Sets the y coordinate step. See `y0` for more info. + hoverinfo + Determines which trace information appear on hover. If + `none` or `skip` are set, no information is displayed + upon hovering. But, if `none` is set, click and hover + events are still fired. + hoverinfosrc + Sets the source reference on Chart Studio Cloud for + `hoverinfo`. + hoverlabel + :class:`plotly.graph_objects.waterfall.Hoverlabel` + instance or dict with compatible properties + hovertemplate + Template string used for rendering the information that + appear on hover box. Note that this will override + `hoverinfo`. Variables are inserted using %{variable}, + for example "y: %{y}" as well as %{xother}, {%_xother}, + {%_xother_}, {%xother_}. When showing info for several + points, "xother" will be added to those with different + x positions from the first point. An underscore before + or after "(x|y)other" will add a space on that side, + only when this field is shown. Numbers are formatted + using d3-format's syntax %{variable:d3-format}, for + example "Price: %{y:$.2f}". + https://github.com/d3/d3-format/tree/v1.4.5#d3-format + for details on the formatting syntax. Dates are + formatted using d3-time-format's syntax + %{variable|d3-time-format}, for example "Day: + %{2019-01-01|%A}". https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format for details on the + date formatting syntax. Variables that can't be found + will be replaced with the specifier. For example, a + template of "data: %{x}, %{y}" will result in a value + of "data: 1, %{y}" if x is 1 and y is missing. + Variables with an undefined value will be replaced with + the fallback value. The variables available in + `hovertemplate` are the ones emitted as event data + described at this link + https://plotly.com/javascript/plotlyjs-events/#event- + data. Additionally, all attributes that can be + specified per-point (the ones that are `arrayOk: true`) + are available. Finally, the template string has access + to variables `initial`, `delta` and `final`. Anything + contained in tag `` is displayed in the + secondary box, for example + `%{fullData.name}`. To hide the + secondary box completely, use an empty tag + ``. + hovertemplatefallback + Fallback string that's displayed when a variable + referenced in a template is missing. If the boolean + value 'false' is passed in, the specifier with the + missing variable will be displayed. + hovertemplatesrc + Sets the source reference on Chart Studio Cloud for + `hovertemplate`. + hovertext + Sets hover text elements associated with each (x,y) + pair. If a single string, the same string appears over + all the data points. If an array of string, the items + are mapped in order to the this trace's (x,y) + coordinates. To be seen, trace `hoverinfo` must contain + a "text" flag. + hovertextsrc + Sets the source reference on Chart Studio Cloud for + `hovertext`. + ids + Assigns id labels to each datum. These ids for object + constancy of data points during animation. Should be an + array of strings, not numbers or any other type. + idssrc + Sets the source reference on Chart Studio Cloud for + `ids`. + increasing + :class:`plotly.graph_objects.waterfall.Increasing` + instance or dict with compatible properties + insidetextanchor + Determines if texts are kept at center or start/end + points in `textposition` "inside" mode. + insidetextfont + Sets the font used for `text` lying inside the bar. + legend + Sets the reference to a legend to show this trace in. + References to these legends are "legend", "legend2", + "legend3", etc. Settings for these legends are set in + the layout, under `layout.legend`, `layout.legend2`, + etc. + legendgroup + Sets the legend group for this trace. Traces and shapes + part of the same legend group hide/show at the same + time when toggling legend items. + legendgrouptitle + :class:`plotly.graph_objects.waterfall.Legendgrouptitle + ` instance or dict with compatible properties + legendrank + Sets the legend rank for this trace. Items and groups + with smaller ranks are presented on top/left side while + with "reversed" `legend.traceorder` they are on + bottom/right side. The default legendrank is 1000, so + that you can use ranks less than 1000 to place certain + items before all unranked items, and ranks greater than + 1000 to go after all unranked items. When having + unranked or equal rank items shapes would be displayed + after traces i.e. according to their order in data and + layout. + legendwidth + Sets the width (in px or fraction) of the legend for + this trace. + measure + An array containing types of values. By default the + values are considered as 'relative'. However; it is + possible to use 'total' to compute the sums. Also + 'absolute' could be applied to reset the computed total + or to declare an initial value where needed. + measuresrc + Sets the source reference on Chart Studio Cloud for + `measure`. + meta + Assigns extra meta information associated with this + trace that can be used in various text attributes. + Attributes such as trace `name`, graph, axis and + colorbar `title.text`, annotation `text` + `rangeselector`, `updatemenues` and `sliders` `label` + text all support `meta`. To access the trace `meta` + values in an attribute in the same trace, simply use + `%{meta[i]}` where `i` is the index or key of the + `meta` item in question. To access trace `meta` in + layout attributes, use `%{data[n[.meta[i]}` where `i` + is the index or key of the `meta` and `n` is the trace + index. + metasrc + Sets the source reference on Chart Studio Cloud for + `meta`. + name + Sets the trace name. The trace name appears as the + legend item and on hover. + offset + Shifts the position where the bar is drawn (in position + axis units). In "group" barmode, traces that set + "offset" will be excluded and drawn in "overlay" mode + instead. + offsetgroup + Set several traces linked to the same position axis or + matching axes to the same offsetgroup where bars of the + same position coordinate will line up. + offsetsrc + Sets the source reference on Chart Studio Cloud for + `offset`. + opacity + Sets the opacity of the trace. + orientation + Sets the orientation of the bars. With "v" ("h"), the + value of the each bar spans along the vertical + (horizontal). + outsidetextfont + Sets the font used for `text` lying outside the bar. + selectedpoints + Array containing integer indices of selected points. + Has an effect only for traces that support selections. + Note that an empty array means an empty selection where + the `unselected` are turned on for all points, whereas, + any other non-array values means no selection all where + the `selected` and `unselected` styles have no effect. + showlegend + Determines whether or not an item corresponding to this + trace is shown in the legend. + stream + :class:`plotly.graph_objects.waterfall.Stream` instance + or dict with compatible properties + text + Sets text elements associated with each (x,y) pair. If + a single string, the same string appears over all the + data points. If an array of string, the items are + mapped in order to the this trace's (x,y) coordinates. + If trace `hoverinfo` contains a "text" flag and + "hovertext" is not set, these elements will be seen in + the hover labels. + textangle + Sets the angle of the tick labels with respect to the + bar. For example, a `tickangle` of -90 draws the tick + labels vertically. With "auto" the texts may + automatically be rotated to fit with the maximum size + in bars. + textfont + Sets the font used for `text`. + textinfo + Determines which trace information appear on the graph. + In the case of having multiple waterfalls, totals are + computed separately (per trace). + textposition + Specifies the location of the `text`. "inside" + positions `text` inside, next to the bar end (rotated + and scaled if needed). "outside" positions `text` + outside, next to the bar end (scaled if needed), unless + there is another bar stacked on this one, then the text + gets pushed inside. "auto" tries to position `text` + inside the bar, but if the bar is too small and no bar + is stacked on this one the text is moved outside. If + "none", no text appears. + textpositionsrc + Sets the source reference on Chart Studio Cloud for + `textposition`. + textsrc + Sets the source reference on Chart Studio Cloud for + `text`. + texttemplate + Template string used for rendering the information text + that appears on points. Note that this will override + `textinfo`. Variables are inserted using %{variable}, + for example "y: %{y}". Numbers are formatted using + d3-format's syntax %{variable:d3-format}, for example + "Price: %{y:$.2f}". + https://github.com/d3/d3-format/tree/v1.4.5#d3-format + for details on the formatting syntax. Dates are + formatted using d3-time-format's syntax + %{variable|d3-time-format}, for example "Day: + %{2019-01-01|%A}". https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format for details on the + date formatting syntax. Variables that can't be found + will be replaced with the specifier. For example, a + template of "data: %{x}, %{y}" will result in a value + of "data: 1, %{y}" if x is 1 and y is missing. + Variables with an undefined value will be replaced with + the fallback value. All attributes that can be + specified per-point (the ones that are `arrayOk: true`) + are available. Finally, the template string has access + to variables `initial`, `delta`, `final` and `label`. + texttemplatefallback + Fallback string that's displayed when a variable + referenced in a template is missing. If the boolean + value 'false' is passed in, the specifier with the + missing variable will be displayed. + texttemplatesrc + Sets the source reference on Chart Studio Cloud for + `texttemplate`. + totals + :class:`plotly.graph_objects.waterfall.Totals` instance + or dict with compatible properties + uid + Assign an id to this trace, Use this to provide object + constancy between traces during animations and + transitions. + uirevision + Controls persistence of some user-driven changes to the + trace: `constraintrange` in `parcoords` traces, as well + as some `editable: true` modifications such as `name` + and `colorbar.title`. Defaults to `layout.uirevision`. + Note that other user-driven trace attribute changes are + controlled by `layout` attributes: `trace.visible` is + controlled by `layout.legend.uirevision`, + `selectedpoints` is controlled by + `layout.selectionrevision`, and `colorbar.(x|y)` + (accessible with `config: {editable: true}`) is + controlled by `layout.editrevision`. Trace changes are + tracked by `uid`, which only falls back on trace index + if no `uid` is provided. So if your app can add/remove + traces before the end of the `data` array, such that + the same trace has a different index, you can still + preserve user-driven changes if you give each trace a + `uid` that stays with it as it moves. + visible + Determines whether or not this trace is visible. If + "legendonly", the trace is not drawn, but can appear as + a legend item (provided that the legend itself is + visible). + width + Sets the bar width (in position axis units). + widthsrc + Sets the source reference on Chart Studio Cloud for + `width`. + x + Sets the x coordinates. + x0 + Alternate to `x`. Builds a linear space of x + coordinates. Use with `dx` where `x0` is the starting + coordinate and `dx` the step. + xaxis + Sets a reference between this trace's x coordinates and + a 2D cartesian x axis. If "x" (the default value), the + x coordinates refer to `layout.xaxis`. If "x2", the x + coordinates refer to `layout.xaxis2`, and so on. + xhoverformat + Sets the hover text formatting rulefor `x` using d3 + formatting mini-languages which are very similar to + those in Python. For numbers, see: + https://github.com/d3/d3-format/tree/v1.4.5#d3-format. + And for dates see: https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format. We add two items to + d3's date formatter: "%h" for half of the year as a + decimal number as well as "%{n}f" for fractional + seconds with n digits. For example, *2016-10-13 + 09:15:23.456* with tickformat "%H~%M~%S.%2f" would + display *09~15~23.46*By default the values are + formatted using `xaxis.hoverformat`. + xperiod + Only relevant when the axis `type` is "date". Sets the + period positioning in milliseconds or "M" on the x + axis. Special values in the form of "M" could be + used to declare the number of months. In this case `n` + must be a positive integer. + xperiod0 + Only relevant when the axis `type` is "date". Sets the + base for period positioning in milliseconds or date + string on the x0 axis. When `x0period` is round number + of weeks, the `x0period0` by default would be on a + Sunday i.e. 2000-01-02, otherwise it would be at + 2000-01-01. + xperiodalignment + Only relevant when the axis `type` is "date". Sets the + alignment of data points on the x axis. + xsrc + Sets the source reference on Chart Studio Cloud for + `x`. + y + Sets the y coordinates. + y0 + Alternate to `y`. Builds a linear space of y + coordinates. Use with `dy` where `y0` is the starting + coordinate and `dy` the step. + yaxis + Sets a reference between this trace's y coordinates and + a 2D cartesian y axis. If "y" (the default value), the + y coordinates refer to `layout.yaxis`. If "y2", the y + coordinates refer to `layout.yaxis2`, and so on. + yhoverformat + Sets the hover text formatting rulefor `y` using d3 + formatting mini-languages which are very similar to + those in Python. For numbers, see: + https://github.com/d3/d3-format/tree/v1.4.5#d3-format. + And for dates see: https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format. We add two items to + d3's date formatter: "%h" for half of the year as a + decimal number as well as "%{n}f" for fractional + seconds with n digits. For example, *2016-10-13 + 09:15:23.456* with tickformat "%H~%M~%S.%2f" would + display *09~15~23.46*By default the values are + formatted using `yaxis.hoverformat`. + yperiod + Only relevant when the axis `type` is "date". Sets the + period positioning in milliseconds or "M" on the y + axis. Special values in the form of "M" could be + used to declare the number of months. In this case `n` + must be a positive integer. + yperiod0 + Only relevant when the axis `type` is "date". Sets the + base for period positioning in milliseconds or date + string on the y0 axis. When `y0period` is round number + of weeks, the `y0period0` by default would be on a + Sunday i.e. 2000-01-02, otherwise it would be at + 2000-01-01. + yperiodalignment + Only relevant when the axis `type` is "date". Sets the + alignment of data points on the y axis. + ysrc + Sets the source reference on Chart Studio Cloud for + `y`. + zorder + Sets the layer on which this trace is displayed, + relative to other SVG traces on the same subplot. SVG + traces with higher `zorder` appear in front of those + with lower `zorder`. + row : 'all', int or None (default) + Subplot row index (starting from 1) for the trace to be + added. Only valid if figure was created using + `plotly.tools.make_subplots`.If 'all', addresses all + rows in the specified column(s). + col : 'all', int or None (default) + Subplot col index (starting from 1) for the trace to be + added. Only valid if figure was created using + `plotly.tools.make_subplots`.If 'all', addresses all + columns in the specified row(s). + secondary_y: boolean or None (default None) + If True, associate this trace with the secondary y-axis of the + subplot at the specified row and col. Only valid if all of the + following conditions are satisfied: + * The figure was created using `plotly.subplots.make_subplots`. + * The row and col arguments are not None + * The subplot at the specified row and col has type xy + (which is the default) and secondary_y True. These + properties are specified in the specs argument to + make_subplots. See the make_subplots docstring for more info. + + Returns + ------- + Figure + """ + from plotly.graph_objs import Waterfall + + new_trace = Waterfall( + alignmentgroup=alignmentgroup, + base=base, + cliponaxis=cliponaxis, + connector=connector, + constraintext=constraintext, + customdata=customdata, + customdatasrc=customdatasrc, + decreasing=decreasing, + dx=dx, + dy=dy, + hoverinfo=hoverinfo, + hoverinfosrc=hoverinfosrc, + hoverlabel=hoverlabel, + hovertemplate=hovertemplate, + hovertemplatefallback=hovertemplatefallback, + hovertemplatesrc=hovertemplatesrc, + hovertext=hovertext, + hovertextsrc=hovertextsrc, + ids=ids, + idssrc=idssrc, + increasing=increasing, + insidetextanchor=insidetextanchor, + insidetextfont=insidetextfont, + legend=legend, + legendgroup=legendgroup, + legendgrouptitle=legendgrouptitle, + legendrank=legendrank, + legendwidth=legendwidth, + measure=measure, + measuresrc=measuresrc, + meta=meta, + metasrc=metasrc, + name=name, + offset=offset, + offsetgroup=offsetgroup, + offsetsrc=offsetsrc, + opacity=opacity, + orientation=orientation, + outsidetextfont=outsidetextfont, + selectedpoints=selectedpoints, + showlegend=showlegend, + stream=stream, + text=text, + textangle=textangle, + textfont=textfont, + textinfo=textinfo, + textposition=textposition, + textpositionsrc=textpositionsrc, + textsrc=textsrc, + texttemplate=texttemplate, + texttemplatefallback=texttemplatefallback, + texttemplatesrc=texttemplatesrc, + totals=totals, + uid=uid, + uirevision=uirevision, + visible=visible, + width=width, + widthsrc=widthsrc, + x=x, + x0=x0, + xaxis=xaxis, + xhoverformat=xhoverformat, + xperiod=xperiod, + xperiod0=xperiod0, + xperiodalignment=xperiodalignment, + xsrc=xsrc, + y=y, + y0=y0, + yaxis=yaxis, + yhoverformat=yhoverformat, + yperiod=yperiod, + yperiod0=yperiod0, + yperiodalignment=yperiodalignment, + ysrc=ysrc, + zorder=zorder, + **kwargs, + ) + return self.add_trace(new_trace, row=row, col=col, secondary_y=secondary_y) + + def select_coloraxes(self, selector=None, row=None, col=None): + """ + Select coloraxis subplot objects from a particular subplot cell + and/or coloraxis subplot objects that satisfy custom selection + criteria. + + Parameters + ---------- + selector: dict, function, or None (default None) + Dict to use as selection criteria. + coloraxis objects will be selected if they contain + properties corresponding to all of the dictionary's keys, with + values that exactly match the supplied values. If None + (the default), all coloraxis objects are selected. If a + function, it must be a function accepting a single argument and + returning a boolean. The function will be called on each + coloraxis and those for which the function returned True will + be in the selection. + row, col: int or None (default None) + Subplot row and column index of coloraxis objects to select. + To select coloraxis objects by row and column, the Figure + must have been created using plotly.subplots.make_subplots. + If None (the default), all coloraxis objects are selected. + Returns + ------- + generator + Generator that iterates through all of the coloraxis + objects that satisfy all of the specified selection criteria + """ + + return self._select_layout_subplots_by_prefix("coloraxis", selector, row, col) + + def for_each_coloraxis(self, fn, selector=None, row=None, col=None) -> "Figure": + """ + Apply a function to all coloraxis objects that satisfy the + specified selection criteria + + Parameters + ---------- + fn: + Function that inputs a single coloraxis object. + selector: dict, function, or None (default None) + Dict to use as selection criteria. + coloraxis objects will be selected if they contain + properties corresponding to all of the dictionary's keys, with + values that exactly match the supplied values. If None + (the default), all coloraxis objects are selected. If a + function, it must be a function accepting a single argument and + returning a boolean. The function will be called on each + coloraxis and those for which the function returned True will + be in the selection. + row, col: int or None (default None) + Subplot row and column index of coloraxis objects to select. + To select coloraxis objects by row and column, the Figure + must have been created using plotly.subplots.make_subplots. + If None (the default), all coloraxis objects are selected. + Returns + ------- + self + Returns the Figure object that the method was called on + """ + for obj in self.select_coloraxes(selector=selector, row=row, col=col): + fn(obj) + + return self + + def update_coloraxes( + self, patch=None, selector=None, overwrite=False, row=None, col=None, **kwargs + ) -> "Figure": + """ + Perform a property update operation on all coloraxis objects + that satisfy the specified selection criteria + + Parameters + ---------- + patch: dict + Dictionary of property updates to be applied to all + coloraxis objects that satisfy the selection criteria. + selector: dict, function, or None (default None) + Dict to use as selection criteria. + coloraxis objects will be selected if they contain + properties corresponding to all of the dictionary's keys, with + values that exactly match the supplied values. If None + (the default), all coloraxis objects are selected. If a + function, it must be a function accepting a single argument and + returning a boolean. The function will be called on each + coloraxis and those for which the function returned True will + be in the selection. + overwrite: bool + If True, overwrite existing properties. If False, apply updates + to existing properties recursively, preserving existing + properties that are not specified in the update operation. + row, col: int or None (default None) + Subplot row and column index of coloraxis objects to select. + To select coloraxis objects by row and column, the Figure + must have been created using plotly.subplots.make_subplots. + If None (the default), all coloraxis objects are selected. + **kwargs + Additional property updates to apply to each selected + coloraxis object. If a property is specified in + both patch and in **kwargs then the one in **kwargs + takes precedence. + Returns + ------- + self + Returns the Figure object that the method was called on + """ + for obj in self.select_coloraxes(selector=selector, row=row, col=col): + obj.update(patch, overwrite=overwrite, **kwargs) + + return self + + def select_geos(self, selector=None, row=None, col=None): + """ + Select geo subplot objects from a particular subplot cell + and/or geo subplot objects that satisfy custom selection + criteria. + + Parameters + ---------- + selector: dict, function, or None (default None) + Dict to use as selection criteria. + geo objects will be selected if they contain + properties corresponding to all of the dictionary's keys, with + values that exactly match the supplied values. If None + (the default), all geo objects are selected. If a + function, it must be a function accepting a single argument and + returning a boolean. The function will be called on each + geo and those for which the function returned True will + be in the selection. + row, col: int or None (default None) + Subplot row and column index of geo objects to select. + To select geo objects by row and column, the Figure + must have been created using plotly.subplots.make_subplots. + If None (the default), all geo objects are selected. + Returns + ------- + generator + Generator that iterates through all of the geo + objects that satisfy all of the specified selection criteria + """ + + return self._select_layout_subplots_by_prefix("geo", selector, row, col) + + def for_each_geo(self, fn, selector=None, row=None, col=None) -> "Figure": + """ + Apply a function to all geo objects that satisfy the + specified selection criteria + + Parameters + ---------- + fn: + Function that inputs a single geo object. + selector: dict, function, or None (default None) + Dict to use as selection criteria. + geo objects will be selected if they contain + properties corresponding to all of the dictionary's keys, with + values that exactly match the supplied values. If None + (the default), all geo objects are selected. If a + function, it must be a function accepting a single argument and + returning a boolean. The function will be called on each + geo and those for which the function returned True will + be in the selection. + row, col: int or None (default None) + Subplot row and column index of geo objects to select. + To select geo objects by row and column, the Figure + must have been created using plotly.subplots.make_subplots. + If None (the default), all geo objects are selected. + Returns + ------- + self + Returns the Figure object that the method was called on + """ + for obj in self.select_geos(selector=selector, row=row, col=col): + fn(obj) + + return self + + def update_geos( + self, patch=None, selector=None, overwrite=False, row=None, col=None, **kwargs + ) -> "Figure": + """ + Perform a property update operation on all geo objects + that satisfy the specified selection criteria + + Parameters + ---------- + patch: dict + Dictionary of property updates to be applied to all + geo objects that satisfy the selection criteria. + selector: dict, function, or None (default None) + Dict to use as selection criteria. + geo objects will be selected if they contain + properties corresponding to all of the dictionary's keys, with + values that exactly match the supplied values. If None + (the default), all geo objects are selected. If a + function, it must be a function accepting a single argument and + returning a boolean. The function will be called on each + geo and those for which the function returned True will + be in the selection. + overwrite: bool + If True, overwrite existing properties. If False, apply updates + to existing properties recursively, preserving existing + properties that are not specified in the update operation. + row, col: int or None (default None) + Subplot row and column index of geo objects to select. + To select geo objects by row and column, the Figure + must have been created using plotly.subplots.make_subplots. + If None (the default), all geo objects are selected. + **kwargs + Additional property updates to apply to each selected + geo object. If a property is specified in + both patch and in **kwargs then the one in **kwargs + takes precedence. + Returns + ------- + self + Returns the Figure object that the method was called on + """ + for obj in self.select_geos(selector=selector, row=row, col=col): + obj.update(patch, overwrite=overwrite, **kwargs) + + return self + + def select_legends(self, selector=None, row=None, col=None): + """ + Select legend subplot objects from a particular subplot cell + and/or legend subplot objects that satisfy custom selection + criteria. + + Parameters + ---------- + selector: dict, function, or None (default None) + Dict to use as selection criteria. + legend objects will be selected if they contain + properties corresponding to all of the dictionary's keys, with + values that exactly match the supplied values. If None + (the default), all legend objects are selected. If a + function, it must be a function accepting a single argument and + returning a boolean. The function will be called on each + legend and those for which the function returned True will + be in the selection. + row, col: int or None (default None) + Subplot row and column index of legend objects to select. + To select legend objects by row and column, the Figure + must have been created using plotly.subplots.make_subplots. + If None (the default), all legend objects are selected. + Returns + ------- + generator + Generator that iterates through all of the legend + objects that satisfy all of the specified selection criteria + """ + + return self._select_layout_subplots_by_prefix("legend", selector, row, col) + + def for_each_legend(self, fn, selector=None, row=None, col=None) -> "Figure": + """ + Apply a function to all legend objects that satisfy the + specified selection criteria + + Parameters + ---------- + fn: + Function that inputs a single legend object. + selector: dict, function, or None (default None) + Dict to use as selection criteria. + legend objects will be selected if they contain + properties corresponding to all of the dictionary's keys, with + values that exactly match the supplied values. If None + (the default), all legend objects are selected. If a + function, it must be a function accepting a single argument and + returning a boolean. The function will be called on each + legend and those for which the function returned True will + be in the selection. + row, col: int or None (default None) + Subplot row and column index of legend objects to select. + To select legend objects by row and column, the Figure + must have been created using plotly.subplots.make_subplots. + If None (the default), all legend objects are selected. + Returns + ------- + self + Returns the Figure object that the method was called on + """ + for obj in self.select_legends(selector=selector, row=row, col=col): + fn(obj) + + return self + + def update_legends( + self, patch=None, selector=None, overwrite=False, row=None, col=None, **kwargs + ) -> "Figure": + """ + Perform a property update operation on all legend objects + that satisfy the specified selection criteria + + Parameters + ---------- + patch: dict + Dictionary of property updates to be applied to all + legend objects that satisfy the selection criteria. + selector: dict, function, or None (default None) + Dict to use as selection criteria. + legend objects will be selected if they contain + properties corresponding to all of the dictionary's keys, with + values that exactly match the supplied values. If None + (the default), all legend objects are selected. If a + function, it must be a function accepting a single argument and + returning a boolean. The function will be called on each + legend and those for which the function returned True will + be in the selection. + overwrite: bool + If True, overwrite existing properties. If False, apply updates + to existing properties recursively, preserving existing + properties that are not specified in the update operation. + row, col: int or None (default None) + Subplot row and column index of legend objects to select. + To select legend objects by row and column, the Figure + must have been created using plotly.subplots.make_subplots. + If None (the default), all legend objects are selected. + **kwargs + Additional property updates to apply to each selected + legend object. If a property is specified in + both patch and in **kwargs then the one in **kwargs + takes precedence. + Returns + ------- + self + Returns the Figure object that the method was called on + """ + for obj in self.select_legends(selector=selector, row=row, col=col): + obj.update(patch, overwrite=overwrite, **kwargs) + + return self + + def select_maps(self, selector=None, row=None, col=None): + """ + Select map subplot objects from a particular subplot cell + and/or map subplot objects that satisfy custom selection + criteria. + + Parameters + ---------- + selector: dict, function, or None (default None) + Dict to use as selection criteria. + map objects will be selected if they contain + properties corresponding to all of the dictionary's keys, with + values that exactly match the supplied values. If None + (the default), all map objects are selected. If a + function, it must be a function accepting a single argument and + returning a boolean. The function will be called on each + map and those for which the function returned True will + be in the selection. + row, col: int or None (default None) + Subplot row and column index of map objects to select. + To select map objects by row and column, the Figure + must have been created using plotly.subplots.make_subplots. + If None (the default), all map objects are selected. + Returns + ------- + generator + Generator that iterates through all of the map + objects that satisfy all of the specified selection criteria + """ + + return self._select_layout_subplots_by_prefix("map", selector, row, col) + + def for_each_map(self, fn, selector=None, row=None, col=None) -> "Figure": + """ + Apply a function to all map objects that satisfy the + specified selection criteria + + Parameters + ---------- + fn: + Function that inputs a single map object. + selector: dict, function, or None (default None) + Dict to use as selection criteria. + map objects will be selected if they contain + properties corresponding to all of the dictionary's keys, with + values that exactly match the supplied values. If None + (the default), all map objects are selected. If a + function, it must be a function accepting a single argument and + returning a boolean. The function will be called on each + map and those for which the function returned True will + be in the selection. + row, col: int or None (default None) + Subplot row and column index of map objects to select. + To select map objects by row and column, the Figure + must have been created using plotly.subplots.make_subplots. + If None (the default), all map objects are selected. + Returns + ------- + self + Returns the Figure object that the method was called on + """ + for obj in self.select_maps(selector=selector, row=row, col=col): + fn(obj) + + return self + + def update_maps( + self, patch=None, selector=None, overwrite=False, row=None, col=None, **kwargs + ) -> "Figure": + """ + Perform a property update operation on all map objects + that satisfy the specified selection criteria + + Parameters + ---------- + patch: dict + Dictionary of property updates to be applied to all + map objects that satisfy the selection criteria. + selector: dict, function, or None (default None) + Dict to use as selection criteria. + map objects will be selected if they contain + properties corresponding to all of the dictionary's keys, with + values that exactly match the supplied values. If None + (the default), all map objects are selected. If a + function, it must be a function accepting a single argument and + returning a boolean. The function will be called on each + map and those for which the function returned True will + be in the selection. + overwrite: bool + If True, overwrite existing properties. If False, apply updates + to existing properties recursively, preserving existing + properties that are not specified in the update operation. + row, col: int or None (default None) + Subplot row and column index of map objects to select. + To select map objects by row and column, the Figure + must have been created using plotly.subplots.make_subplots. + If None (the default), all map objects are selected. + **kwargs + Additional property updates to apply to each selected + map object. If a property is specified in + both patch and in **kwargs then the one in **kwargs + takes precedence. + Returns + ------- + self + Returns the Figure object that the method was called on + """ + for obj in self.select_maps(selector=selector, row=row, col=col): + obj.update(patch, overwrite=overwrite, **kwargs) + + return self + + def select_mapboxes(self, selector=None, row=None, col=None): + """ + Select mapbox subplot objects from a particular subplot cell + and/or mapbox subplot objects that satisfy custom selection + criteria. + + Parameters + ---------- + selector: dict, function, or None (default None) + Dict to use as selection criteria. + mapbox objects will be selected if they contain + properties corresponding to all of the dictionary's keys, with + values that exactly match the supplied values. If None + (the default), all mapbox objects are selected. If a + function, it must be a function accepting a single argument and + returning a boolean. The function will be called on each + mapbox and those for which the function returned True will + be in the selection. + row, col: int or None (default None) + Subplot row and column index of mapbox objects to select. + To select mapbox objects by row and column, the Figure + must have been created using plotly.subplots.make_subplots. + If None (the default), all mapbox objects are selected. + Returns + ------- + generator + Generator that iterates through all of the mapbox + objects that satisfy all of the specified selection criteria + """ + + return self._select_layout_subplots_by_prefix("mapbox", selector, row, col) + + def for_each_mapbox(self, fn, selector=None, row=None, col=None) -> "Figure": + """ + Apply a function to all mapbox objects that satisfy the + specified selection criteria + + Parameters + ---------- + fn: + Function that inputs a single mapbox object. + selector: dict, function, or None (default None) + Dict to use as selection criteria. + mapbox objects will be selected if they contain + properties corresponding to all of the dictionary's keys, with + values that exactly match the supplied values. If None + (the default), all mapbox objects are selected. If a + function, it must be a function accepting a single argument and + returning a boolean. The function will be called on each + mapbox and those for which the function returned True will + be in the selection. + row, col: int or None (default None) + Subplot row and column index of mapbox objects to select. + To select mapbox objects by row and column, the Figure + must have been created using plotly.subplots.make_subplots. + If None (the default), all mapbox objects are selected. + Returns + ------- + self + Returns the Figure object that the method was called on + """ + for obj in self.select_mapboxes(selector=selector, row=row, col=col): + fn(obj) + + return self + + def update_mapboxes( + self, patch=None, selector=None, overwrite=False, row=None, col=None, **kwargs + ) -> "Figure": + """ + Perform a property update operation on all mapbox objects + that satisfy the specified selection criteria + + Parameters + ---------- + patch: dict + Dictionary of property updates to be applied to all + mapbox objects that satisfy the selection criteria. + selector: dict, function, or None (default None) + Dict to use as selection criteria. + mapbox objects will be selected if they contain + properties corresponding to all of the dictionary's keys, with + values that exactly match the supplied values. If None + (the default), all mapbox objects are selected. If a + function, it must be a function accepting a single argument and + returning a boolean. The function will be called on each + mapbox and those for which the function returned True will + be in the selection. + overwrite: bool + If True, overwrite existing properties. If False, apply updates + to existing properties recursively, preserving existing + properties that are not specified in the update operation. + row, col: int or None (default None) + Subplot row and column index of mapbox objects to select. + To select mapbox objects by row and column, the Figure + must have been created using plotly.subplots.make_subplots. + If None (the default), all mapbox objects are selected. + **kwargs + Additional property updates to apply to each selected + mapbox object. If a property is specified in + both patch and in **kwargs then the one in **kwargs + takes precedence. + Returns + ------- + self + Returns the Figure object that the method was called on + """ + for obj in self.select_mapboxes(selector=selector, row=row, col=col): + obj.update(patch, overwrite=overwrite, **kwargs) + + return self + + def select_polars(self, selector=None, row=None, col=None): + """ + Select polar subplot objects from a particular subplot cell + and/or polar subplot objects that satisfy custom selection + criteria. + + Parameters + ---------- + selector: dict, function, or None (default None) + Dict to use as selection criteria. + polar objects will be selected if they contain + properties corresponding to all of the dictionary's keys, with + values that exactly match the supplied values. If None + (the default), all polar objects are selected. If a + function, it must be a function accepting a single argument and + returning a boolean. The function will be called on each + polar and those for which the function returned True will + be in the selection. + row, col: int or None (default None) + Subplot row and column index of polar objects to select. + To select polar objects by row and column, the Figure + must have been created using plotly.subplots.make_subplots. + If None (the default), all polar objects are selected. + Returns + ------- + generator + Generator that iterates through all of the polar + objects that satisfy all of the specified selection criteria + """ + + return self._select_layout_subplots_by_prefix("polar", selector, row, col) + + def for_each_polar(self, fn, selector=None, row=None, col=None) -> "Figure": + """ + Apply a function to all polar objects that satisfy the + specified selection criteria + + Parameters + ---------- + fn: + Function that inputs a single polar object. + selector: dict, function, or None (default None) + Dict to use as selection criteria. + polar objects will be selected if they contain + properties corresponding to all of the dictionary's keys, with + values that exactly match the supplied values. If None + (the default), all polar objects are selected. If a + function, it must be a function accepting a single argument and + returning a boolean. The function will be called on each + polar and those for which the function returned True will + be in the selection. + row, col: int or None (default None) + Subplot row and column index of polar objects to select. + To select polar objects by row and column, the Figure + must have been created using plotly.subplots.make_subplots. + If None (the default), all polar objects are selected. + Returns + ------- + self + Returns the Figure object that the method was called on + """ + for obj in self.select_polars(selector=selector, row=row, col=col): + fn(obj) + + return self + + def update_polars( + self, patch=None, selector=None, overwrite=False, row=None, col=None, **kwargs + ) -> "Figure": + """ + Perform a property update operation on all polar objects + that satisfy the specified selection criteria + + Parameters + ---------- + patch: dict + Dictionary of property updates to be applied to all + polar objects that satisfy the selection criteria. + selector: dict, function, or None (default None) + Dict to use as selection criteria. + polar objects will be selected if they contain + properties corresponding to all of the dictionary's keys, with + values that exactly match the supplied values. If None + (the default), all polar objects are selected. If a + function, it must be a function accepting a single argument and + returning a boolean. The function will be called on each + polar and those for which the function returned True will + be in the selection. + overwrite: bool + If True, overwrite existing properties. If False, apply updates + to existing properties recursively, preserving existing + properties that are not specified in the update operation. + row, col: int or None (default None) + Subplot row and column index of polar objects to select. + To select polar objects by row and column, the Figure + must have been created using plotly.subplots.make_subplots. + If None (the default), all polar objects are selected. + **kwargs + Additional property updates to apply to each selected + polar object. If a property is specified in + both patch and in **kwargs then the one in **kwargs + takes precedence. + Returns + ------- + self + Returns the Figure object that the method was called on + """ + for obj in self.select_polars(selector=selector, row=row, col=col): + obj.update(patch, overwrite=overwrite, **kwargs) + + return self + + def select_scenes(self, selector=None, row=None, col=None): + """ + Select scene subplot objects from a particular subplot cell + and/or scene subplot objects that satisfy custom selection + criteria. + + Parameters + ---------- + selector: dict, function, or None (default None) + Dict to use as selection criteria. + scene objects will be selected if they contain + properties corresponding to all of the dictionary's keys, with + values that exactly match the supplied values. If None + (the default), all scene objects are selected. If a + function, it must be a function accepting a single argument and + returning a boolean. The function will be called on each + scene and those for which the function returned True will + be in the selection. + row, col: int or None (default None) + Subplot row and column index of scene objects to select. + To select scene objects by row and column, the Figure + must have been created using plotly.subplots.make_subplots. + If None (the default), all scene objects are selected. + Returns + ------- + generator + Generator that iterates through all of the scene + objects that satisfy all of the specified selection criteria + """ + + return self._select_layout_subplots_by_prefix("scene", selector, row, col) + + def for_each_scene(self, fn, selector=None, row=None, col=None) -> "Figure": + """ + Apply a function to all scene objects that satisfy the + specified selection criteria + + Parameters + ---------- + fn: + Function that inputs a single scene object. + selector: dict, function, or None (default None) + Dict to use as selection criteria. + scene objects will be selected if they contain + properties corresponding to all of the dictionary's keys, with + values that exactly match the supplied values. If None + (the default), all scene objects are selected. If a + function, it must be a function accepting a single argument and + returning a boolean. The function will be called on each + scene and those for which the function returned True will + be in the selection. + row, col: int or None (default None) + Subplot row and column index of scene objects to select. + To select scene objects by row and column, the Figure + must have been created using plotly.subplots.make_subplots. + If None (the default), all scene objects are selected. + Returns + ------- + self + Returns the Figure object that the method was called on + """ + for obj in self.select_scenes(selector=selector, row=row, col=col): + fn(obj) + + return self + + def update_scenes( + self, patch=None, selector=None, overwrite=False, row=None, col=None, **kwargs + ) -> "Figure": + """ + Perform a property update operation on all scene objects + that satisfy the specified selection criteria + + Parameters + ---------- + patch: dict + Dictionary of property updates to be applied to all + scene objects that satisfy the selection criteria. + selector: dict, function, or None (default None) + Dict to use as selection criteria. + scene objects will be selected if they contain + properties corresponding to all of the dictionary's keys, with + values that exactly match the supplied values. If None + (the default), all scene objects are selected. If a + function, it must be a function accepting a single argument and + returning a boolean. The function will be called on each + scene and those for which the function returned True will + be in the selection. + overwrite: bool + If True, overwrite existing properties. If False, apply updates + to existing properties recursively, preserving existing + properties that are not specified in the update operation. + row, col: int or None (default None) + Subplot row and column index of scene objects to select. + To select scene objects by row and column, the Figure + must have been created using plotly.subplots.make_subplots. + If None (the default), all scene objects are selected. + **kwargs + Additional property updates to apply to each selected + scene object. If a property is specified in + both patch and in **kwargs then the one in **kwargs + takes precedence. + Returns + ------- + self + Returns the Figure object that the method was called on + """ + for obj in self.select_scenes(selector=selector, row=row, col=col): + obj.update(patch, overwrite=overwrite, **kwargs) + + return self + + def select_smiths(self, selector=None, row=None, col=None): + """ + Select smith subplot objects from a particular subplot cell + and/or smith subplot objects that satisfy custom selection + criteria. + + Parameters + ---------- + selector: dict, function, or None (default None) + Dict to use as selection criteria. + smith objects will be selected if they contain + properties corresponding to all of the dictionary's keys, with + values that exactly match the supplied values. If None + (the default), all smith objects are selected. If a + function, it must be a function accepting a single argument and + returning a boolean. The function will be called on each + smith and those for which the function returned True will + be in the selection. + row, col: int or None (default None) + Subplot row and column index of smith objects to select. + To select smith objects by row and column, the Figure + must have been created using plotly.subplots.make_subplots. + If None (the default), all smith objects are selected. + Returns + ------- + generator + Generator that iterates through all of the smith + objects that satisfy all of the specified selection criteria + """ + + return self._select_layout_subplots_by_prefix("smith", selector, row, col) + + def for_each_smith(self, fn, selector=None, row=None, col=None) -> "Figure": + """ + Apply a function to all smith objects that satisfy the + specified selection criteria + + Parameters + ---------- + fn: + Function that inputs a single smith object. + selector: dict, function, or None (default None) + Dict to use as selection criteria. + smith objects will be selected if they contain + properties corresponding to all of the dictionary's keys, with + values that exactly match the supplied values. If None + (the default), all smith objects are selected. If a + function, it must be a function accepting a single argument and + returning a boolean. The function will be called on each + smith and those for which the function returned True will + be in the selection. + row, col: int or None (default None) + Subplot row and column index of smith objects to select. + To select smith objects by row and column, the Figure + must have been created using plotly.subplots.make_subplots. + If None (the default), all smith objects are selected. + Returns + ------- + self + Returns the Figure object that the method was called on + """ + for obj in self.select_smiths(selector=selector, row=row, col=col): + fn(obj) + + return self + + def update_smiths( + self, patch=None, selector=None, overwrite=False, row=None, col=None, **kwargs + ) -> "Figure": + """ + Perform a property update operation on all smith objects + that satisfy the specified selection criteria + + Parameters + ---------- + patch: dict + Dictionary of property updates to be applied to all + smith objects that satisfy the selection criteria. + selector: dict, function, or None (default None) + Dict to use as selection criteria. + smith objects will be selected if they contain + properties corresponding to all of the dictionary's keys, with + values that exactly match the supplied values. If None + (the default), all smith objects are selected. If a + function, it must be a function accepting a single argument and + returning a boolean. The function will be called on each + smith and those for which the function returned True will + be in the selection. + overwrite: bool + If True, overwrite existing properties. If False, apply updates + to existing properties recursively, preserving existing + properties that are not specified in the update operation. + row, col: int or None (default None) + Subplot row and column index of smith objects to select. + To select smith objects by row and column, the Figure + must have been created using plotly.subplots.make_subplots. + If None (the default), all smith objects are selected. + **kwargs + Additional property updates to apply to each selected + smith object. If a property is specified in + both patch and in **kwargs then the one in **kwargs + takes precedence. + Returns + ------- + self + Returns the Figure object that the method was called on + """ + for obj in self.select_smiths(selector=selector, row=row, col=col): + obj.update(patch, overwrite=overwrite, **kwargs) + + return self + + def select_ternaries(self, selector=None, row=None, col=None): + """ + Select ternary subplot objects from a particular subplot cell + and/or ternary subplot objects that satisfy custom selection + criteria. + + Parameters + ---------- + selector: dict, function, or None (default None) + Dict to use as selection criteria. + ternary objects will be selected if they contain + properties corresponding to all of the dictionary's keys, with + values that exactly match the supplied values. If None + (the default), all ternary objects are selected. If a + function, it must be a function accepting a single argument and + returning a boolean. The function will be called on each + ternary and those for which the function returned True will + be in the selection. + row, col: int or None (default None) + Subplot row and column index of ternary objects to select. + To select ternary objects by row and column, the Figure + must have been created using plotly.subplots.make_subplots. + If None (the default), all ternary objects are selected. + Returns + ------- + generator + Generator that iterates through all of the ternary + objects that satisfy all of the specified selection criteria + """ + + return self._select_layout_subplots_by_prefix("ternary", selector, row, col) + + def for_each_ternary(self, fn, selector=None, row=None, col=None) -> "Figure": + """ + Apply a function to all ternary objects that satisfy the + specified selection criteria + + Parameters + ---------- + fn: + Function that inputs a single ternary object. + selector: dict, function, or None (default None) + Dict to use as selection criteria. + ternary objects will be selected if they contain + properties corresponding to all of the dictionary's keys, with + values that exactly match the supplied values. If None + (the default), all ternary objects are selected. If a + function, it must be a function accepting a single argument and + returning a boolean. The function will be called on each + ternary and those for which the function returned True will + be in the selection. + row, col: int or None (default None) + Subplot row and column index of ternary objects to select. + To select ternary objects by row and column, the Figure + must have been created using plotly.subplots.make_subplots. + If None (the default), all ternary objects are selected. + Returns + ------- + self + Returns the Figure object that the method was called on + """ + for obj in self.select_ternaries(selector=selector, row=row, col=col): + fn(obj) + + return self + + def update_ternaries( + self, patch=None, selector=None, overwrite=False, row=None, col=None, **kwargs + ) -> "Figure": + """ + Perform a property update operation on all ternary objects + that satisfy the specified selection criteria + + Parameters + ---------- + patch: dict + Dictionary of property updates to be applied to all + ternary objects that satisfy the selection criteria. + selector: dict, function, or None (default None) + Dict to use as selection criteria. + ternary objects will be selected if they contain + properties corresponding to all of the dictionary's keys, with + values that exactly match the supplied values. If None + (the default), all ternary objects are selected. If a + function, it must be a function accepting a single argument and + returning a boolean. The function will be called on each + ternary and those for which the function returned True will + be in the selection. + overwrite: bool + If True, overwrite existing properties. If False, apply updates + to existing properties recursively, preserving existing + properties that are not specified in the update operation. + row, col: int or None (default None) + Subplot row and column index of ternary objects to select. + To select ternary objects by row and column, the Figure + must have been created using plotly.subplots.make_subplots. + If None (the default), all ternary objects are selected. + **kwargs + Additional property updates to apply to each selected + ternary object. If a property is specified in + both patch and in **kwargs then the one in **kwargs + takes precedence. + Returns + ------- + self + Returns the Figure object that the method was called on + """ + for obj in self.select_ternaries(selector=selector, row=row, col=col): + obj.update(patch, overwrite=overwrite, **kwargs) + + return self + + def select_xaxes(self, selector=None, row=None, col=None): + """ + Select xaxis subplot objects from a particular subplot cell + and/or xaxis subplot objects that satisfy custom selection + criteria. + + Parameters + ---------- + selector: dict, function, or None (default None) + Dict to use as selection criteria. + xaxis objects will be selected if they contain + properties corresponding to all of the dictionary's keys, with + values that exactly match the supplied values. If None + (the default), all xaxis objects are selected. If a + function, it must be a function accepting a single argument and + returning a boolean. The function will be called on each + xaxis and those for which the function returned True will + be in the selection. + row, col: int or None (default None) + Subplot row and column index of xaxis objects to select. + To select xaxis objects by row and column, the Figure + must have been created using plotly.subplots.make_subplots. + If None (the default), all xaxis objects are selected. + Returns + ------- + generator + Generator that iterates through all of the xaxis + objects that satisfy all of the specified selection criteria + """ + + return self._select_layout_subplots_by_prefix("xaxis", selector, row, col) + + def for_each_xaxis(self, fn, selector=None, row=None, col=None) -> "Figure": + """ + Apply a function to all xaxis objects that satisfy the + specified selection criteria + + Parameters + ---------- + fn: + Function that inputs a single xaxis object. + selector: dict, function, or None (default None) + Dict to use as selection criteria. + xaxis objects will be selected if they contain + properties corresponding to all of the dictionary's keys, with + values that exactly match the supplied values. If None + (the default), all xaxis objects are selected. If a + function, it must be a function accepting a single argument and + returning a boolean. The function will be called on each + xaxis and those for which the function returned True will + be in the selection. + row, col: int or None (default None) + Subplot row and column index of xaxis objects to select. + To select xaxis objects by row and column, the Figure + must have been created using plotly.subplots.make_subplots. + If None (the default), all xaxis objects are selected. + Returns + ------- + self + Returns the Figure object that the method was called on + """ + for obj in self.select_xaxes(selector=selector, row=row, col=col): + fn(obj) + + return self + + def update_xaxes( + self, patch=None, selector=None, overwrite=False, row=None, col=None, **kwargs + ) -> "Figure": + """ + Perform a property update operation on all xaxis objects + that satisfy the specified selection criteria + + Parameters + ---------- + patch: dict + Dictionary of property updates to be applied to all + xaxis objects that satisfy the selection criteria. + selector: dict, function, or None (default None) + Dict to use as selection criteria. + xaxis objects will be selected if they contain + properties corresponding to all of the dictionary's keys, with + values that exactly match the supplied values. If None + (the default), all xaxis objects are selected. If a + function, it must be a function accepting a single argument and + returning a boolean. The function will be called on each + xaxis and those for which the function returned True will + be in the selection. + overwrite: bool + If True, overwrite existing properties. If False, apply updates + to existing properties recursively, preserving existing + properties that are not specified in the update operation. + row, col: int or None (default None) + Subplot row and column index of xaxis objects to select. + To select xaxis objects by row and column, the Figure + must have been created using plotly.subplots.make_subplots. + If None (the default), all xaxis objects are selected. + **kwargs + Additional property updates to apply to each selected + xaxis object. If a property is specified in + both patch and in **kwargs then the one in **kwargs + takes precedence. + Returns + ------- + self + Returns the Figure object that the method was called on + """ + for obj in self.select_xaxes(selector=selector, row=row, col=col): + obj.update(patch, overwrite=overwrite, **kwargs) + + return self + + def select_yaxes(self, selector=None, row=None, col=None, secondary_y=None): + """ + Select yaxis subplot objects from a particular subplot cell + and/or yaxis subplot objects that satisfy custom selection + criteria. + + Parameters + ---------- + selector: dict, function, or None (default None) + Dict to use as selection criteria. + yaxis objects will be selected if they contain + properties corresponding to all of the dictionary's keys, with + values that exactly match the supplied values. If None + (the default), all yaxis objects are selected. If a + function, it must be a function accepting a single argument and + returning a boolean. The function will be called on each + yaxis and those for which the function returned True will + be in the selection. + row, col: int or None (default None) + Subplot row and column index of yaxis objects to select. + To select yaxis objects by row and column, the Figure + must have been created using plotly.subplots.make_subplots. + If None (the default), all yaxis objects are selected. + secondary_y: boolean or None (default None) + * If True, only select yaxis objects associated with the secondary + y-axis of the subplot. + * If False, only select yaxis objects associated with the primary + y-axis of the subplot. + * If None (the default), do not filter yaxis objects based on + a secondary y-axis condition. + + To select yaxis objects by secondary y-axis, the Figure must + have been created using plotly.subplots.make_subplots. See + the docstring for the specs argument to make_subplots for more + info on creating subplots with secondary y-axes. + Returns + ------- + generator + Generator that iterates through all of the yaxis + objects that satisfy all of the specified selection criteria + """ + + return self._select_layout_subplots_by_prefix( + "yaxis", selector, row, col, secondary_y=secondary_y + ) + + def for_each_yaxis( + self, fn, selector=None, row=None, col=None, secondary_y=None + ) -> "Figure": + """ + Apply a function to all yaxis objects that satisfy the + specified selection criteria + + Parameters + ---------- + fn: + Function that inputs a single yaxis object. + selector: dict, function, or None (default None) + Dict to use as selection criteria. + yaxis objects will be selected if they contain + properties corresponding to all of the dictionary's keys, with + values that exactly match the supplied values. If None + (the default), all yaxis objects are selected. If a + function, it must be a function accepting a single argument and + returning a boolean. The function will be called on each + yaxis and those for which the function returned True will + be in the selection. + row, col: int or None (default None) + Subplot row and column index of yaxis objects to select. + To select yaxis objects by row and column, the Figure + must have been created using plotly.subplots.make_subplots. + If None (the default), all yaxis objects are selected. + secondary_y: boolean or None (default None) + * If True, only select yaxis objects associated with the secondary + y-axis of the subplot. + * If False, only select yaxis objects associated with the primary + y-axis of the subplot. + * If None (the default), do not filter yaxis objects based on + a secondary y-axis condition. + + To select yaxis objects by secondary y-axis, the Figure must + have been created using plotly.subplots.make_subplots. See + the docstring for the specs argument to make_subplots for more + info on creating subplots with secondary y-axes. + Returns + ------- + self + Returns the Figure object that the method was called on + """ + for obj in self.select_yaxes( + selector=selector, row=row, col=col, secondary_y=secondary_y + ): + fn(obj) + + return self + + def update_yaxes( + self, + patch=None, + selector=None, + overwrite=False, + row=None, + col=None, + secondary_y=None, + **kwargs, + ) -> "Figure": + """ + Perform a property update operation on all yaxis objects + that satisfy the specified selection criteria + + Parameters + ---------- + patch: dict + Dictionary of property updates to be applied to all + yaxis objects that satisfy the selection criteria. + selector: dict, function, or None (default None) + Dict to use as selection criteria. + yaxis objects will be selected if they contain + properties corresponding to all of the dictionary's keys, with + values that exactly match the supplied values. If None + (the default), all yaxis objects are selected. If a + function, it must be a function accepting a single argument and + returning a boolean. The function will be called on each + yaxis and those for which the function returned True will + be in the selection. + overwrite: bool + If True, overwrite existing properties. If False, apply updates + to existing properties recursively, preserving existing + properties that are not specified in the update operation. + row, col: int or None (default None) + Subplot row and column index of yaxis objects to select. + To select yaxis objects by row and column, the Figure + must have been created using plotly.subplots.make_subplots. + If None (the default), all yaxis objects are selected. + secondary_y: boolean or None (default None) + * If True, only select yaxis objects associated with the secondary + y-axis of the subplot. + * If False, only select yaxis objects associated with the primary + y-axis of the subplot. + * If None (the default), do not filter yaxis objects based on + a secondary y-axis condition. + + To select yaxis objects by secondary y-axis, the Figure must + have been created using plotly.subplots.make_subplots. See + the docstring for the specs argument to make_subplots for more + info on creating subplots with secondary y-axes. + **kwargs + Additional property updates to apply to each selected + yaxis object. If a property is specified in + both patch and in **kwargs then the one in **kwargs + takes precedence. + Returns + ------- + self + Returns the Figure object that the method was called on + """ + for obj in self.select_yaxes( + selector=selector, row=row, col=col, secondary_y=secondary_y + ): + obj.update(patch, overwrite=overwrite, **kwargs) + + return self + + def select_annotations(self, selector=None, row=None, col=None, secondary_y=None): + """ + Select annotations from a particular subplot cell and/or annotations + that satisfy custom selection criteria. + + Parameters + ---------- + selector: dict, function, int, str, or None (default None) + Dict to use as selection criteria. + Annotations will be selected if they contain properties corresponding + to all of the dictionary's keys, with values that exactly match + the supplied values. If None (the default), all annotations are + selected. If a function, it must be a function accepting a single + argument and returning a boolean. The function will be called on + each annotation and those for which the function returned True + will be in the selection. If an int N, the Nth annotation matching row + and col will be selected (N can be negative). If a string S, the selector + is equivalent to dict(type=S). + row, col: int or None (default None) + Subplot row and column index of annotations to select. + To select annotations by row and column, the Figure must have been + created using plotly.subplots.make_subplots. To select only those + annotation that are in paper coordinates, set row and col to the + string 'paper'. If None (the default), all annotations are selected. + secondary_y: boolean or None (default None) + * If True, only select annotations associated with the secondary + y-axis of the subplot. + * If False, only select annotations associated with the primary + y-axis of the subplot. + * If None (the default), do not filter annotations based on secondary + y-axis. + + To select annotations by secondary y-axis, the Figure must have been + created using plotly.subplots.make_subplots. See the docstring + for the specs argument to make_subplots for more info on + creating subplots with secondary y-axes. + Returns + ------- + generator + Generator that iterates through all of the annotations that satisfy + all of the specified selection criteria + """ + return self._select_annotations_like( + "annotations", selector=selector, row=row, col=col, secondary_y=secondary_y + ) + + def for_each_annotation( + self, fn, selector=None, row=None, col=None, secondary_y=None + ): + """ + Apply a function to all annotations that satisfy the specified selection + criteria + + Parameters + ---------- + fn: + Function that inputs a single annotation object. + selector: dict, function, int, str or None (default None) + Dict to use as selection criteria. + Traces will be selected if they contain properties corresponding + to all of the dictionary's keys, with values that exactly match + the supplied values. If None (the default), all annotations are + selected. If a function, it must be a function accepting a single + argument and returning a boolean. The function will be called on + each annotation and those for which the function returned True + will be in the selection. If an int N, the Nth annotation matching row + and col will be selected (N can be negative). If a string S, the selector + is equivalent to dict(type=S). + row, col: int or None (default None) + Subplot row and column index of annotations to select. + To select annotations by row and column, the Figure must have been + created using plotly.subplots.make_subplots. To select only those + annotations that are in paper coordinates, set row and col to the + string 'paper'. If None (the default), all annotations are selected. + secondary_y: boolean or None (default None) + * If True, only select annotations associated with the secondary + y-axis of the subplot. + * If False, only select annotations associated with the primary + y-axis of the subplot. + * If None (the default), do not filter annotations based on secondary + y-axis. + + To select annotations by secondary y-axis, the Figure must have been + created using plotly.subplots.make_subplots. See the docstring + for the specs argument to make_subplots for more info on + creating subplots with secondary y-axes. + Returns + ------- + self + Returns the Figure object that the method was called on + """ + for obj in self._select_annotations_like( + prop="annotations", + selector=selector, + row=row, + col=col, + secondary_y=secondary_y, + ): + fn(obj) + + return self + + def update_annotations( + self, patch=None, selector=None, row=None, col=None, secondary_y=None, **kwargs + ) -> "Figure": + """ + Perform a property update operation on all annotations that satisfy the + specified selection criteria + + Parameters + ---------- + patch: dict or None (default None) + Dictionary of property updates to be applied to all annotations that + satisfy the selection criteria. + selector: dict, function, int, str or None (default None) + Dict to use as selection criteria. + Traces will be selected if they contain properties corresponding + to all of the dictionary's keys, with values that exactly match + the supplied values. If None (the default), all annotations are + selected. If a function, it must be a function accepting a single + argument and returning a boolean. The function will be called on + each annotation and those for which the function returned True + will be in the selection. If an int N, the Nth annotation matching row + and col will be selected (N can be negative). If a string S, the selector + is equivalent to dict(type=S). + row, col: int or None (default None) + Subplot row and column index of annotations to select. + To select annotations by row and column, the Figure must have been + created using plotly.subplots.make_subplots. To select only those + annotation that are in paper coordinates, set row and col to the + string 'paper'. If None (the default), all annotations are selected. + secondary_y: boolean or None (default None) + * If True, only select annotations associated with the secondary + y-axis of the subplot. + * If False, only select annotations associated with the primary + y-axis of the subplot. + * If None (the default), do not filter annotations based on secondary + y-axis. + + To select annotations by secondary y-axis, the Figure must have been + created using plotly.subplots.make_subplots. See the docstring + for the specs argument to make_subplots for more info on + creating subplots with secondary y-axes. + **kwargs + Additional property updates to apply to each selected annotation. If + a property is specified in both patch and in **kwargs then the + one in **kwargs takes precedence. + + Returns + ------- + self + Returns the Figure object that the method was called on + """ + for obj in self._select_annotations_like( + prop="annotations", + selector=selector, + row=row, + col=col, + secondary_y=secondary_y, + ): + obj.update(patch, **kwargs) + + return self + + def add_annotation( + self, + arg=None, + align=None, + arrowcolor=None, + arrowhead=None, + arrowside=None, + arrowsize=None, + arrowwidth=None, + ax=None, + axref=None, + ay=None, + ayref=None, + bgcolor=None, + bordercolor=None, + borderpad=None, + borderwidth=None, + captureevents=None, + clicktoshow=None, + font=None, + height=None, + hoverlabel=None, + hovertext=None, + name=None, + opacity=None, + showarrow=None, + standoff=None, + startarrowhead=None, + startarrowsize=None, + startstandoff=None, + templateitemname=None, + text=None, + textangle=None, + valign=None, + visible=None, + width=None, + x=None, + xanchor=None, + xclick=None, + xref=None, + xshift=None, + y=None, + yanchor=None, + yclick=None, + yref=None, + yshift=None, + row=None, + col=None, + secondary_y=None, + exclude_empty_subplots=None, + **kwargs, + ) -> "Figure": + """ + Create and add a new annotation to the figure's layout + + Parameters + ---------- + arg + instance of Annotation or dict with compatible + properties + align + Sets the horizontal alignment of the `text` within the + box. Has an effect only if `text` spans two or more + lines (i.e. `text` contains one or more
HTML tags) + or if an explicit width is set to override the text + width. + arrowcolor + Sets the color of the annotation arrow. + arrowhead + Sets the end annotation arrow head style. + arrowside + Sets the annotation arrow head position. + arrowsize + Sets the size of the end annotation arrow head, + relative to `arrowwidth`. A value of 1 (default) gives + a head about 3x as wide as the line. + arrowwidth + Sets the width (in px) of annotation arrow line. + ax + Sets the x component of the arrow tail about the arrow + head. If `axref` is `pixel`, a positive (negative) + component corresponds to an arrow pointing from right + to left (left to right). If `axref` is not `pixel` and + is exactly the same as `xref`, this is an absolute + value on that axis, like `x`, specified in the same + coordinates as `xref`. + axref + Indicates in what coordinates the tail of the + annotation (ax,ay) is specified. If set to a x axis id + (e.g. "x" or "x2"), the `x` position refers to a x + coordinate. If set to "paper", the `x` position refers + to the distance from the left of the plotting area in + normalized coordinates where 0 (1) corresponds to the + left (right). If set to a x axis ID followed by + "domain" (separated by a space), the position behaves + like for "paper", but refers to the distance in + fractions of the domain length from the left of the + domain of that axis: e.g., *x2 domain* refers to the + domain of the second x axis and a x position of 0.5 + refers to the point between the left and the right of + the domain of the second x axis. In order for absolute + positioning of the arrow to work, "axref" must be + exactly the same as "xref", otherwise "axref" will + revert to "pixel" (explained next). For relative + positioning, "axref" can be set to "pixel", in which + case the "ax" value is specified in pixels relative to + "x". Absolute positioning is useful for trendline + annotations which should continue to indicate the + correct trend when zoomed. Relative positioning is + useful for specifying the text offset for an annotated + point. + ay + Sets the y component of the arrow tail about the arrow + head. If `ayref` is `pixel`, a positive (negative) + component corresponds to an arrow pointing from bottom + to top (top to bottom). If `ayref` is not `pixel` and + is exactly the same as `yref`, this is an absolute + value on that axis, like `y`, specified in the same + coordinates as `yref`. + ayref + Indicates in what coordinates the tail of the + annotation (ax,ay) is specified. If set to a y axis id + (e.g. "y" or "y2"), the `y` position refers to a y + coordinate. If set to "paper", the `y` position refers + to the distance from the bottom of the plotting area in + normalized coordinates where 0 (1) corresponds to the + bottom (top). If set to a y axis ID followed by + "domain" (separated by a space), the position behaves + like for "paper", but refers to the distance in + fractions of the domain length from the bottom of the + domain of that axis: e.g., *y2 domain* refers to the + domain of the second y axis and a y position of 0.5 + refers to the point between the bottom and the top of + the domain of the second y axis. In order for absolute + positioning of the arrow to work, "ayref" must be + exactly the same as "yref", otherwise "ayref" will + revert to "pixel" (explained next). For relative + positioning, "ayref" can be set to "pixel", in which + case the "ay" value is specified in pixels relative to + "y". Absolute positioning is useful for trendline + annotations which should continue to indicate the + correct trend when zoomed. Relative positioning is + useful for specifying the text offset for an annotated + point. + bgcolor + Sets the background color of the annotation. + bordercolor + Sets the color of the border enclosing the annotation + `text`. + borderpad + Sets the padding (in px) between the `text` and the + enclosing border. + borderwidth + Sets the width (in px) of the border enclosing the + annotation `text`. + captureevents + Determines whether the annotation text box captures + mouse move and click events, or allows those events to + pass through to data points in the plot that may be + behind the annotation. By default `captureevents` is + False unless `hovertext` is provided. If you use the + event `plotly_clickannotation` without `hovertext` you + must explicitly enable `captureevents`. + clicktoshow + Makes this annotation respond to clicks on the plot. If + you click a data point that exactly matches the `x` and + `y` values of this annotation, and it is hidden + (visible: false), it will appear. In "onoff" mode, you + must click the same point again to make it disappear, + so if you click multiple points, you can show multiple + annotations. In "onout" mode, a click anywhere else in + the plot (on another data point or not) will hide this + annotation. If you need to show/hide this annotation in + response to different `x` or `y` values, you can set + `xclick` and/or `yclick`. This is useful for example to + label the side of a bar. To label markers though, + `standoff` is preferred over `xclick` and `yclick`. + font + Sets the annotation text font. + height + Sets an explicit height for the text box. null + (default) lets the text set the box height. Taller text + will be clipped. + hoverlabel + :class:`plotly.graph_objects.layout.annotation.Hoverlab + el` instance or dict with compatible properties + hovertext + Sets text to appear when hovering over this annotation. + If omitted or blank, no hover label will appear. + name + When used in a template, named items are created in the + output figure in addition to any items the figure + already has in this array. You can modify these items + in the output figure by making your own item with + `templateitemname` matching this `name` alongside your + modifications (including `visible: false` or `enabled: + false` to hide it). Has no effect outside of a + template. + opacity + Sets the opacity of the annotation (text + arrow). + showarrow + Determines whether or not the annotation is drawn with + an arrow. If True, `text` is placed near the arrow's + tail. If False, `text` lines up with the `x` and `y` + provided. + standoff + Sets a distance, in pixels, to move the end arrowhead + away from the position it is pointing at, for example + to point at the edge of a marker independent of zoom. + Note that this shortens the arrow from the `ax` / `ay` + vector, in contrast to `xshift` / `yshift` which moves + everything by this amount. + startarrowhead + Sets the start annotation arrow head style. + startarrowsize + Sets the size of the start annotation arrow head, + relative to `arrowwidth`. A value of 1 (default) gives + a head about 3x as wide as the line. + startstandoff + Sets a distance, in pixels, to move the start arrowhead + away from the position it is pointing at, for example + to point at the edge of a marker independent of zoom. + Note that this shortens the arrow from the `ax` / `ay` + vector, in contrast to `xshift` / `yshift` which moves + everything by this amount. + templateitemname + Used to refer to a named item in this array in the + template. Named items from the template will be created + even without a matching item in the input figure, but + you can modify one by making an item with + `templateitemname` matching its `name`, alongside your + modifications (including `visible: false` or `enabled: + false` to hide it). If there is no template or no + matching item, this item will be hidden unless you + explicitly show it with `visible: true`. + text + Sets the text associated with this annotation. Plotly + uses a subset of HTML tags to do things like newline + (`
`), bold (``), italics (``), + hyperlinks (``). Tags ``, + ``, ``, ``, ``, and `` are also + supported. + textangle + Sets the angle at which the `text` is drawn with + respect to the horizontal. + valign + Sets the vertical alignment of the `text` within the + box. Has an effect only if an explicit height is set to + override the text height. + visible + Determines whether or not this annotation is visible. + width + Sets an explicit width for the text box. null (default) + lets the text set the box width. Wider text will be + clipped. There is no automatic wrapping; use
to + start a new line. + x + Sets the annotation's x position. If the axis `type` is + "log", then you must take the log of your desired + range. If the axis `type` is "date", it should be date + strings, like date data, though Date objects and unix + milliseconds will be accepted and converted to strings. + If the axis `type` is "category", it should be numbers, + using the scale where each category is assigned a + serial number from zero in the order it appears. + xanchor + Sets the text box's horizontal position anchor This + anchor binds the `x` position to the "left", "center" + or "right" of the annotation. For example, if `x` is + set to 1, `xref` to "paper" and `xanchor` to "right" + then the right-most portion of the annotation lines up + with the right-most edge of the plotting area. If + "auto", the anchor is equivalent to "center" for data- + referenced annotations or if there is an arrow, whereas + for paper-referenced with no arrow, the anchor picked + corresponds to the closest side. + xclick + Toggle this annotation when clicking a data point whose + `x` value is `xclick` rather than the annotation's `x` + value. + xref + Sets the annotation's x coordinate axis. If set to a x + axis id (e.g. "x" or "x2"), the `x` position refers to + a x coordinate. If set to "paper", the `x` position + refers to the distance from the left of the plotting + area in normalized coordinates where 0 (1) corresponds + to the left (right). If set to a x axis ID followed by + "domain" (separated by a space), the position behaves + like for "paper", but refers to the distance in + fractions of the domain length from the left of the + domain of that axis: e.g., *x2 domain* refers to the + domain of the second x axis and a x position of 0.5 + refers to the point between the left and the right of + the domain of the second x axis. + xshift + Shifts the position of the whole annotation and arrow + to the right (positive) or left (negative) by this many + pixels. + y + Sets the annotation's y position. If the axis `type` is + "log", then you must take the log of your desired + range. If the axis `type` is "date", it should be date + strings, like date data, though Date objects and unix + milliseconds will be accepted and converted to strings. + If the axis `type` is "category", it should be numbers, + using the scale where each category is assigned a + serial number from zero in the order it appears. + yanchor + Sets the text box's vertical position anchor This + anchor binds the `y` position to the "top", "middle" or + "bottom" of the annotation. For example, if `y` is set + to 1, `yref` to "paper" and `yanchor` to "top" then the + top-most portion of the annotation lines up with the + top-most edge of the plotting area. If "auto", the + anchor is equivalent to "middle" for data-referenced + annotations or if there is an arrow, whereas for paper- + referenced with no arrow, the anchor picked corresponds + to the closest side. + yclick + Toggle this annotation when clicking a data point whose + `y` value is `yclick` rather than the annotation's `y` + value. + yref + Sets the annotation's y coordinate axis. If set to a y + axis id (e.g. "y" or "y2"), the `y` position refers to + a y coordinate. If set to "paper", the `y` position + refers to the distance from the bottom of the plotting + area in normalized coordinates where 0 (1) corresponds + to the bottom (top). If set to a y axis ID followed by + "domain" (separated by a space), the position behaves + like for "paper", but refers to the distance in + fractions of the domain length from the bottom of the + domain of that axis: e.g., *y2 domain* refers to the + domain of the second y axis and a y position of 0.5 + refers to the point between the bottom and the top of + the domain of the second y axis. + yshift + Shifts the position of the whole annotation and arrow + up (positive) or down (negative) by this many pixels. + row + Subplot row for annotation. If 'all', addresses all + rows in the specified column(s). + col + Subplot column for annotation. If 'all', addresses all + columns in the specified row(s). + secondary_y + Whether to add annotation to secondary y-axis + exclude_empty_subplots + If True, annotation will not be added to subplots + without traces. + + Returns + ------- + Figure + """ + from plotly.graph_objs import layout as _layout + + new_obj = _layout.Annotation( + arg, + align=align, + arrowcolor=arrowcolor, + arrowhead=arrowhead, + arrowside=arrowside, + arrowsize=arrowsize, + arrowwidth=arrowwidth, + ax=ax, + axref=axref, + ay=ay, + ayref=ayref, + bgcolor=bgcolor, + bordercolor=bordercolor, + borderpad=borderpad, + borderwidth=borderwidth, + captureevents=captureevents, + clicktoshow=clicktoshow, + font=font, + height=height, + hoverlabel=hoverlabel, + hovertext=hovertext, + name=name, + opacity=opacity, + showarrow=showarrow, + standoff=standoff, + startarrowhead=startarrowhead, + startarrowsize=startarrowsize, + startstandoff=startstandoff, + templateitemname=templateitemname, + text=text, + textangle=textangle, + valign=valign, + visible=visible, + width=width, + x=x, + xanchor=xanchor, + xclick=xclick, + xref=xref, + xshift=xshift, + y=y, + yanchor=yanchor, + yclick=yclick, + yref=yref, + yshift=yshift, + **kwargs, + ) + return self._add_annotation_like( + "annotation", + "annotations", + new_obj, + row=row, + col=col, + secondary_y=secondary_y, + exclude_empty_subplots=exclude_empty_subplots, + ) + + def select_layout_images(self, selector=None, row=None, col=None, secondary_y=None): + """ + Select images from a particular subplot cell and/or images + that satisfy custom selection criteria. + + Parameters + ---------- + selector: dict, function, int, str, or None (default None) + Dict to use as selection criteria. + Annotations will be selected if they contain properties corresponding + to all of the dictionary's keys, with values that exactly match + the supplied values. If None (the default), all images are + selected. If a function, it must be a function accepting a single + argument and returning a boolean. The function will be called on + each image and those for which the function returned True + will be in the selection. If an int N, the Nth image matching row + and col will be selected (N can be negative). If a string S, the selector + is equivalent to dict(type=S). + row, col: int or None (default None) + Subplot row and column index of images to select. + To select images by row and column, the Figure must have been + created using plotly.subplots.make_subplots. To select only those + image that are in paper coordinates, set row and col to the + string 'paper'. If None (the default), all images are selected. + secondary_y: boolean or None (default None) + * If True, only select images associated with the secondary + y-axis of the subplot. + * If False, only select images associated with the primary + y-axis of the subplot. + * If None (the default), do not filter images based on secondary + y-axis. + + To select images by secondary y-axis, the Figure must have been + created using plotly.subplots.make_subplots. See the docstring + for the specs argument to make_subplots for more info on + creating subplots with secondary y-axes. + Returns + ------- + generator + Generator that iterates through all of the images that satisfy + all of the specified selection criteria + """ + return self._select_annotations_like( + "images", selector=selector, row=row, col=col, secondary_y=secondary_y + ) + + def for_each_layout_image( + self, fn, selector=None, row=None, col=None, secondary_y=None + ): + """ + Apply a function to all images that satisfy the specified selection + criteria + + Parameters + ---------- + fn: + Function that inputs a single image object. + selector: dict, function, int, str or None (default None) + Dict to use as selection criteria. + Traces will be selected if they contain properties corresponding + to all of the dictionary's keys, with values that exactly match + the supplied values. If None (the default), all images are + selected. If a function, it must be a function accepting a single + argument and returning a boolean. The function will be called on + each image and those for which the function returned True + will be in the selection. If an int N, the Nth image matching row + and col will be selected (N can be negative). If a string S, the selector + is equivalent to dict(type=S). + row, col: int or None (default None) + Subplot row and column index of images to select. + To select images by row and column, the Figure must have been + created using plotly.subplots.make_subplots. To select only those + images that are in paper coordinates, set row and col to the + string 'paper'. If None (the default), all images are selected. + secondary_y: boolean or None (default None) + * If True, only select images associated with the secondary + y-axis of the subplot. + * If False, only select images associated with the primary + y-axis of the subplot. + * If None (the default), do not filter images based on secondary + y-axis. + + To select images by secondary y-axis, the Figure must have been + created using plotly.subplots.make_subplots. See the docstring + for the specs argument to make_subplots for more info on + creating subplots with secondary y-axes. + Returns + ------- + self + Returns the Figure object that the method was called on + """ + for obj in self._select_annotations_like( + prop="images", + selector=selector, + row=row, + col=col, + secondary_y=secondary_y, + ): + fn(obj) + + return self + + def update_layout_images( + self, patch=None, selector=None, row=None, col=None, secondary_y=None, **kwargs + ) -> "Figure": + """ + Perform a property update operation on all images that satisfy the + specified selection criteria + + Parameters + ---------- + patch: dict or None (default None) + Dictionary of property updates to be applied to all images that + satisfy the selection criteria. + selector: dict, function, int, str or None (default None) + Dict to use as selection criteria. + Traces will be selected if they contain properties corresponding + to all of the dictionary's keys, with values that exactly match + the supplied values. If None (the default), all images are + selected. If a function, it must be a function accepting a single + argument and returning a boolean. The function will be called on + each image and those for which the function returned True + will be in the selection. If an int N, the Nth image matching row + and col will be selected (N can be negative). If a string S, the selector + is equivalent to dict(type=S). + row, col: int or None (default None) + Subplot row and column index of images to select. + To select images by row and column, the Figure must have been + created using plotly.subplots.make_subplots. To select only those + image that are in paper coordinates, set row and col to the + string 'paper'. If None (the default), all images are selected. + secondary_y: boolean or None (default None) + * If True, only select images associated with the secondary + y-axis of the subplot. + * If False, only select images associated with the primary + y-axis of the subplot. + * If None (the default), do not filter images based on secondary + y-axis. + + To select images by secondary y-axis, the Figure must have been + created using plotly.subplots.make_subplots. See the docstring + for the specs argument to make_subplots for more info on + creating subplots with secondary y-axes. + **kwargs + Additional property updates to apply to each selected image. If + a property is specified in both patch and in **kwargs then the + one in **kwargs takes precedence. + + Returns + ------- + self + Returns the Figure object that the method was called on + """ + for obj in self._select_annotations_like( + prop="images", + selector=selector, + row=row, + col=col, + secondary_y=secondary_y, + ): + obj.update(patch, **kwargs) + + return self + + def add_layout_image( + self, + arg=None, + layer=None, + name=None, + opacity=None, + sizex=None, + sizey=None, + sizing=None, + source=None, + templateitemname=None, + visible=None, + x=None, + xanchor=None, + xref=None, + y=None, + yanchor=None, + yref=None, + row=None, + col=None, + secondary_y=None, + exclude_empty_subplots=None, + **kwargs, + ) -> "Figure": + """ + Create and add a new image to the figure's layout + + Parameters + ---------- + arg + instance of Image or dict with compatible properties + layer + Specifies whether images are drawn below or above + traces. When `xref` and `yref` are both set to `paper`, + image is drawn below the entire plot area. + name + When used in a template, named items are created in the + output figure in addition to any items the figure + already has in this array. You can modify these items + in the output figure by making your own item with + `templateitemname` matching this `name` alongside your + modifications (including `visible: false` or `enabled: + false` to hide it). Has no effect outside of a + template. + opacity + Sets the opacity of the image. + sizex + Sets the image container size horizontally. The image + will be sized based on the `position` value. When + `xref` is set to `paper`, units are sized relative to + the plot width. When `xref` ends with ` domain`, units + are sized relative to the axis width. + sizey + Sets the image container size vertically. The image + will be sized based on the `position` value. When + `yref` is set to `paper`, units are sized relative to + the plot height. When `yref` ends with ` domain`, units + are sized relative to the axis height. + sizing + Specifies which dimension of the image to constrain. + source + Specifies the URL of the image to be used. The URL must + be accessible from the domain where the plot code is + run, and can be either relative or absolute. + templateitemname + Used to refer to a named item in this array in the + template. Named items from the template will be created + even without a matching item in the input figure, but + you can modify one by making an item with + `templateitemname` matching its `name`, alongside your + modifications (including `visible: false` or `enabled: + false` to hide it). If there is no template or no + matching item, this item will be hidden unless you + explicitly show it with `visible: true`. + visible + Determines whether or not this image is visible. + x + Sets the image's x position. When `xref` is set to + `paper`, units are sized relative to the plot height. + See `xref` for more info + xanchor + Sets the anchor for the x position + xref + Sets the images's x coordinate axis. If set to a x axis + id (e.g. "x" or "x2"), the `x` position refers to a x + coordinate. If set to "paper", the `x` position refers + to the distance from the left of the plotting area in + normalized coordinates where 0 (1) corresponds to the + left (right). If set to a x axis ID followed by + "domain" (separated by a space), the position behaves + like for "paper", but refers to the distance in + fractions of the domain length from the left of the + domain of that axis: e.g., *x2 domain* refers to the + domain of the second x axis and a x position of 0.5 + refers to the point between the left and the right of + the domain of the second x axis. + y + Sets the image's y position. When `yref` is set to + `paper`, units are sized relative to the plot height. + See `yref` for more info + yanchor + Sets the anchor for the y position. + yref + Sets the images's y coordinate axis. If set to a y axis + id (e.g. "y" or "y2"), the `y` position refers to a y + coordinate. If set to "paper", the `y` position refers + to the distance from the bottom of the plotting area in + normalized coordinates where 0 (1) corresponds to the + bottom (top). If set to a y axis ID followed by + "domain" (separated by a space), the position behaves + like for "paper", but refers to the distance in + fractions of the domain length from the bottom of the + domain of that axis: e.g., *y2 domain* refers to the + domain of the second y axis and a y position of 0.5 + refers to the point between the bottom and the top of + the domain of the second y axis. + row + Subplot row for image. If 'all', addresses all rows in + the specified column(s). + col + Subplot column for image. If 'all', addresses all + columns in the specified row(s). + secondary_y + Whether to add image to secondary y-axis + exclude_empty_subplots + If True, image will not be added to subplots without + traces. + + Returns + ------- + Figure + """ + from plotly.graph_objs import layout as _layout + + new_obj = _layout.Image( + arg, + layer=layer, + name=name, + opacity=opacity, + sizex=sizex, + sizey=sizey, + sizing=sizing, + source=source, + templateitemname=templateitemname, + visible=visible, + x=x, + xanchor=xanchor, + xref=xref, + y=y, + yanchor=yanchor, + yref=yref, + **kwargs, + ) + return self._add_annotation_like( + "image", + "images", + new_obj, + row=row, + col=col, + secondary_y=secondary_y, + exclude_empty_subplots=exclude_empty_subplots, + ) + + def select_selections(self, selector=None, row=None, col=None, secondary_y=None): + """ + Select selections from a particular subplot cell and/or selections + that satisfy custom selection criteria. + + Parameters + ---------- + selector: dict, function, int, str, or None (default None) + Dict to use as selection criteria. + Annotations will be selected if they contain properties corresponding + to all of the dictionary's keys, with values that exactly match + the supplied values. If None (the default), all selections are + selected. If a function, it must be a function accepting a single + argument and returning a boolean. The function will be called on + each selection and those for which the function returned True + will be in the selection. If an int N, the Nth selection matching row + and col will be selected (N can be negative). If a string S, the selector + is equivalent to dict(type=S). + row, col: int or None (default None) + Subplot row and column index of selections to select. + To select selections by row and column, the Figure must have been + created using plotly.subplots.make_subplots. To select only those + selection that are in paper coordinates, set row and col to the + string 'paper'. If None (the default), all selections are selected. + secondary_y: boolean or None (default None) + * If True, only select selections associated with the secondary + y-axis of the subplot. + * If False, only select selections associated with the primary + y-axis of the subplot. + * If None (the default), do not filter selections based on secondary + y-axis. + + To select selections by secondary y-axis, the Figure must have been + created using plotly.subplots.make_subplots. See the docstring + for the specs argument to make_subplots for more info on + creating subplots with secondary y-axes. + Returns + ------- + generator + Generator that iterates through all of the selections that satisfy + all of the specified selection criteria + """ + return self._select_annotations_like( + "selections", selector=selector, row=row, col=col, secondary_y=secondary_y + ) + + def for_each_selection( + self, fn, selector=None, row=None, col=None, secondary_y=None + ): + """ + Apply a function to all selections that satisfy the specified selection + criteria + + Parameters + ---------- + fn: + Function that inputs a single selection object. + selector: dict, function, int, str or None (default None) + Dict to use as selection criteria. + Traces will be selected if they contain properties corresponding + to all of the dictionary's keys, with values that exactly match + the supplied values. If None (the default), all selections are + selected. If a function, it must be a function accepting a single + argument and returning a boolean. The function will be called on + each selection and those for which the function returned True + will be in the selection. If an int N, the Nth selection matching row + and col will be selected (N can be negative). If a string S, the selector + is equivalent to dict(type=S). + row, col: int or None (default None) + Subplot row and column index of selections to select. + To select selections by row and column, the Figure must have been + created using plotly.subplots.make_subplots. To select only those + selections that are in paper coordinates, set row and col to the + string 'paper'. If None (the default), all selections are selected. + secondary_y: boolean or None (default None) + * If True, only select selections associated with the secondary + y-axis of the subplot. + * If False, only select selections associated with the primary + y-axis of the subplot. + * If None (the default), do not filter selections based on secondary + y-axis. + + To select selections by secondary y-axis, the Figure must have been + created using plotly.subplots.make_subplots. See the docstring + for the specs argument to make_subplots for more info on + creating subplots with secondary y-axes. + Returns + ------- + self + Returns the Figure object that the method was called on + """ + for obj in self._select_annotations_like( + prop="selections", + selector=selector, + row=row, + col=col, + secondary_y=secondary_y, + ): + fn(obj) + + return self + + def update_selections( + self, patch=None, selector=None, row=None, col=None, secondary_y=None, **kwargs + ) -> "Figure": + """ + Perform a property update operation on all selections that satisfy the + specified selection criteria + + Parameters + ---------- + patch: dict or None (default None) + Dictionary of property updates to be applied to all selections that + satisfy the selection criteria. + selector: dict, function, int, str or None (default None) + Dict to use as selection criteria. + Traces will be selected if they contain properties corresponding + to all of the dictionary's keys, with values that exactly match + the supplied values. If None (the default), all selections are + selected. If a function, it must be a function accepting a single + argument and returning a boolean. The function will be called on + each selection and those for which the function returned True + will be in the selection. If an int N, the Nth selection matching row + and col will be selected (N can be negative). If a string S, the selector + is equivalent to dict(type=S). + row, col: int or None (default None) + Subplot row and column index of selections to select. + To select selections by row and column, the Figure must have been + created using plotly.subplots.make_subplots. To select only those + selection that are in paper coordinates, set row and col to the + string 'paper'. If None (the default), all selections are selected. + secondary_y: boolean or None (default None) + * If True, only select selections associated with the secondary + y-axis of the subplot. + * If False, only select selections associated with the primary + y-axis of the subplot. + * If None (the default), do not filter selections based on secondary + y-axis. + + To select selections by secondary y-axis, the Figure must have been + created using plotly.subplots.make_subplots. See the docstring + for the specs argument to make_subplots for more info on + creating subplots with secondary y-axes. + **kwargs + Additional property updates to apply to each selected selection. If + a property is specified in both patch and in **kwargs then the + one in **kwargs takes precedence. + + Returns + ------- + self + Returns the Figure object that the method was called on + """ + for obj in self._select_annotations_like( + prop="selections", + selector=selector, + row=row, + col=col, + secondary_y=secondary_y, + ): + obj.update(patch, **kwargs) + + return self + + def add_selection( + self, + arg=None, + line=None, + name=None, + opacity=None, + path=None, + templateitemname=None, + type=None, + x0=None, + x1=None, + xref=None, + y0=None, + y1=None, + yref=None, + row=None, + col=None, + secondary_y=None, + exclude_empty_subplots=None, + **kwargs, + ) -> "Figure": + """ + Create and add a new selection to the figure's layout + + Parameters + ---------- + arg + instance of Selection or dict with compatible + properties + line + :class:`plotly.graph_objects.layout.selection.Line` + instance or dict with compatible properties + name + When used in a template, named items are created in the + output figure in addition to any items the figure + already has in this array. You can modify these items + in the output figure by making your own item with + `templateitemname` matching this `name` alongside your + modifications (including `visible: false` or `enabled: + false` to hide it). Has no effect outside of a + template. + opacity + Sets the opacity of the selection. + path + For `type` "path" - a valid SVG path similar to + `shapes.path` in data coordinates. Allowed segments + are: M, L and Z. + templateitemname + Used to refer to a named item in this array in the + template. Named items from the template will be created + even without a matching item in the input figure, but + you can modify one by making an item with + `templateitemname` matching its `name`, alongside your + modifications (including `visible: false` or `enabled: + false` to hide it). If there is no template or no + matching item, this item will be hidden unless you + explicitly show it with `visible: true`. + type + Specifies the selection type to be drawn. If "rect", a + rectangle is drawn linking (`x0`,`y0`), (`x1`,`y0`), + (`x1`,`y1`) and (`x0`,`y1`). If "path", draw a custom + SVG path using `path`. + x0 + Sets the selection's starting x position. + x1 + Sets the selection's end x position. + xref + Sets the selection's x coordinate axis. If set to a x + axis id (e.g. "x" or "x2"), the `x` position refers to + a x coordinate. If set to "paper", the `x` position + refers to the distance from the left of the plotting + area in normalized coordinates where 0 (1) corresponds + to the left (right). If set to a x axis ID followed by + "domain" (separated by a space), the position behaves + like for "paper", but refers to the distance in + fractions of the domain length from the left of the + domain of that axis: e.g., *x2 domain* refers to the + domain of the second x axis and a x position of 0.5 + refers to the point between the left and the right of + the domain of the second x axis. + y0 + Sets the selection's starting y position. + y1 + Sets the selection's end y position. + yref + Sets the selection's x coordinate axis. If set to a y + axis id (e.g. "y" or "y2"), the `y` position refers to + a y coordinate. If set to "paper", the `y` position + refers to the distance from the bottom of the plotting + area in normalized coordinates where 0 (1) corresponds + to the bottom (top). If set to a y axis ID followed by + "domain" (separated by a space), the position behaves + like for "paper", but refers to the distance in + fractions of the domain length from the bottom of the + domain of that axis: e.g., *y2 domain* refers to the + domain of the second y axis and a y position of 0.5 + refers to the point between the bottom and the top of + the domain of the second y axis. + row + Subplot row for selection. If 'all', addresses all rows + in the specified column(s). + col + Subplot column for selection. If 'all', addresses all + columns in the specified row(s). + secondary_y + Whether to add selection to secondary y-axis + exclude_empty_subplots + If True, selection will not be added to subplots + without traces. + + Returns + ------- + Figure + """ + from plotly.graph_objs import layout as _layout + + new_obj = _layout.Selection( + arg, + line=line, + name=name, + opacity=opacity, + path=path, + templateitemname=templateitemname, + type=type, + x0=x0, + x1=x1, + xref=xref, + y0=y0, + y1=y1, + yref=yref, + **kwargs, + ) + return self._add_annotation_like( + "selection", + "selections", + new_obj, + row=row, + col=col, + secondary_y=secondary_y, + exclude_empty_subplots=exclude_empty_subplots, + ) + + def select_shapes(self, selector=None, row=None, col=None, secondary_y=None): + """ + Select shapes from a particular subplot cell and/or shapes + that satisfy custom selection criteria. + + Parameters + ---------- + selector: dict, function, int, str, or None (default None) + Dict to use as selection criteria. + Annotations will be selected if they contain properties corresponding + to all of the dictionary's keys, with values that exactly match + the supplied values. If None (the default), all shapes are + selected. If a function, it must be a function accepting a single + argument and returning a boolean. The function will be called on + each shape and those for which the function returned True + will be in the selection. If an int N, the Nth shape matching row + and col will be selected (N can be negative). If a string S, the selector + is equivalent to dict(type=S). + row, col: int or None (default None) + Subplot row and column index of shapes to select. + To select shapes by row and column, the Figure must have been + created using plotly.subplots.make_subplots. To select only those + shape that are in paper coordinates, set row and col to the + string 'paper'. If None (the default), all shapes are selected. + secondary_y: boolean or None (default None) + * If True, only select shapes associated with the secondary + y-axis of the subplot. + * If False, only select shapes associated with the primary + y-axis of the subplot. + * If None (the default), do not filter shapes based on secondary + y-axis. + + To select shapes by secondary y-axis, the Figure must have been + created using plotly.subplots.make_subplots. See the docstring + for the specs argument to make_subplots for more info on + creating subplots with secondary y-axes. + Returns + ------- + generator + Generator that iterates through all of the shapes that satisfy + all of the specified selection criteria + """ + return self._select_annotations_like( + "shapes", selector=selector, row=row, col=col, secondary_y=secondary_y + ) + + def for_each_shape(self, fn, selector=None, row=None, col=None, secondary_y=None): + """ + Apply a function to all shapes that satisfy the specified selection + criteria + + Parameters + ---------- + fn: + Function that inputs a single shape object. + selector: dict, function, int, str or None (default None) + Dict to use as selection criteria. + Traces will be selected if they contain properties corresponding + to all of the dictionary's keys, with values that exactly match + the supplied values. If None (the default), all shapes are + selected. If a function, it must be a function accepting a single + argument and returning a boolean. The function will be called on + each shape and those for which the function returned True + will be in the selection. If an int N, the Nth shape matching row + and col will be selected (N can be negative). If a string S, the selector + is equivalent to dict(type=S). + row, col: int or None (default None) + Subplot row and column index of shapes to select. + To select shapes by row and column, the Figure must have been + created using plotly.subplots.make_subplots. To select only those + shapes that are in paper coordinates, set row and col to the + string 'paper'. If None (the default), all shapes are selected. + secondary_y: boolean or None (default None) + * If True, only select shapes associated with the secondary + y-axis of the subplot. + * If False, only select shapes associated with the primary + y-axis of the subplot. + * If None (the default), do not filter shapes based on secondary + y-axis. + + To select shapes by secondary y-axis, the Figure must have been + created using plotly.subplots.make_subplots. See the docstring + for the specs argument to make_subplots for more info on + creating subplots with secondary y-axes. + Returns + ------- + self + Returns the Figure object that the method was called on + """ + for obj in self._select_annotations_like( + prop="shapes", + selector=selector, + row=row, + col=col, + secondary_y=secondary_y, + ): + fn(obj) + + return self + + def update_shapes( + self, patch=None, selector=None, row=None, col=None, secondary_y=None, **kwargs + ) -> "Figure": + """ + Perform a property update operation on all shapes that satisfy the + specified selection criteria + + Parameters + ---------- + patch: dict or None (default None) + Dictionary of property updates to be applied to all shapes that + satisfy the selection criteria. + selector: dict, function, int, str or None (default None) + Dict to use as selection criteria. + Traces will be selected if they contain properties corresponding + to all of the dictionary's keys, with values that exactly match + the supplied values. If None (the default), all shapes are + selected. If a function, it must be a function accepting a single + argument and returning a boolean. The function will be called on + each shape and those for which the function returned True + will be in the selection. If an int N, the Nth shape matching row + and col will be selected (N can be negative). If a string S, the selector + is equivalent to dict(type=S). + row, col: int or None (default None) + Subplot row and column index of shapes to select. + To select shapes by row and column, the Figure must have been + created using plotly.subplots.make_subplots. To select only those + shape that are in paper coordinates, set row and col to the + string 'paper'. If None (the default), all shapes are selected. + secondary_y: boolean or None (default None) + * If True, only select shapes associated with the secondary + y-axis of the subplot. + * If False, only select shapes associated with the primary + y-axis of the subplot. + * If None (the default), do not filter shapes based on secondary + y-axis. + + To select shapes by secondary y-axis, the Figure must have been + created using plotly.subplots.make_subplots. See the docstring + for the specs argument to make_subplots for more info on + creating subplots with secondary y-axes. + **kwargs + Additional property updates to apply to each selected shape. If + a property is specified in both patch and in **kwargs then the + one in **kwargs takes precedence. + + Returns + ------- + self + Returns the Figure object that the method was called on + """ + for obj in self._select_annotations_like( + prop="shapes", + selector=selector, + row=row, + col=col, + secondary_y=secondary_y, + ): + obj.update(patch, **kwargs) + + return self + + def add_shape( + self, + arg=None, + editable=None, + fillcolor=None, + fillrule=None, + label=None, + layer=None, + legend=None, + legendgroup=None, + legendgrouptitle=None, + legendrank=None, + legendwidth=None, + line=None, + name=None, + opacity=None, + path=None, + showlegend=None, + templateitemname=None, + type=None, + visible=None, + x0=None, + x0shift=None, + x1=None, + x1shift=None, + xanchor=None, + xref=None, + xsizemode=None, + y0=None, + y0shift=None, + y1=None, + y1shift=None, + yanchor=None, + yref=None, + ysizemode=None, + row=None, + col=None, + secondary_y=None, + exclude_empty_subplots=None, + **kwargs, + ) -> "Figure": + """ + Create and add a new shape to the figure's layout + + Parameters + ---------- + arg + instance of Shape or dict with compatible properties + editable + Determines whether the shape could be activated for + edit or not. Has no effect when the older editable + shapes mode is enabled via `config.editable` or + `config.edits.shapePosition`. + fillcolor + Sets the color filling the shape's interior. Only + applies to closed shapes. + fillrule + Determines which regions of complex paths constitute + the interior. For more info please visit + https://developer.mozilla.org/en- + US/docs/Web/SVG/Attribute/fill-rule + label + :class:`plotly.graph_objects.layout.shape.Label` + instance or dict with compatible properties + layer + Specifies whether shapes are drawn below gridlines + ("below"), between gridlines and traces ("between") or + above traces ("above"). + legend + Sets the reference to a legend to show this shape in. + References to these legends are "legend", "legend2", + "legend3", etc. Settings for these legends are set in + the layout, under `layout.legend`, `layout.legend2`, + etc. + legendgroup + Sets the legend group for this shape. Traces and shapes + part of the same legend group hide/show at the same + time when toggling legend items. + legendgrouptitle + :class:`plotly.graph_objects.layout.shape.Legendgroupti + tle` instance or dict with compatible properties + legendrank + Sets the legend rank for this shape. Items and groups + with smaller ranks are presented on top/left side while + with "reversed" `legend.traceorder` they are on + bottom/right side. The default legendrank is 1000, so + that you can use ranks less than 1000 to place certain + items before all unranked items, and ranks greater than + 1000 to go after all unranked items. When having + unranked or equal rank items shapes would be displayed + after traces i.e. according to their order in data and + layout. + legendwidth + Sets the width (in px or fraction) of the legend for + this shape. + line + :class:`plotly.graph_objects.layout.shape.Line` + instance or dict with compatible properties + name + When used in a template, named items are created in the + output figure in addition to any items the figure + already has in this array. You can modify these items + in the output figure by making your own item with + `templateitemname` matching this `name` alongside your + modifications (including `visible: false` or `enabled: + false` to hide it). Has no effect outside of a + template. + opacity + Sets the opacity of the shape. + path + For `type` "path" - a valid SVG path with the pixel + values replaced by data values in + `xsizemode`/`ysizemode` being "scaled" and taken + unmodified as pixels relative to `xanchor` and + `yanchor` in case of "pixel" size mode. There are a few + restrictions / quirks only absolute instructions, not + relative. So the allowed segments are: M, L, H, V, Q, + C, T, S, and Z arcs (A) are not allowed because radius + rx and ry are relative. In the future we could consider + supporting relative commands, but we would have to + decide on how to handle date and log axes. Note that + even as is, Q and C Bezier paths that are smooth on + linear axes may not be smooth on log, and vice versa. + no chained "polybezier" commands - specify the segment + type for each one. On category axes, values are numbers + scaled to the serial numbers of categories because + using the categories themselves there would be no way + to describe fractional positions On data axes: because + space and T are both normal components of path strings, + we can't use either to separate date from time parts. + Therefore we'll use underscore for this purpose: + 2015-02-21_13:45:56.789 + showlegend + Determines whether or not this shape is shown in the + legend. + templateitemname + Used to refer to a named item in this array in the + template. Named items from the template will be created + even without a matching item in the input figure, but + you can modify one by making an item with + `templateitemname` matching its `name`, alongside your + modifications (including `visible: false` or `enabled: + false` to hide it). If there is no template or no + matching item, this item will be hidden unless you + explicitly show it with `visible: true`. + type + Specifies the shape type to be drawn. If "line", a line + is drawn from (`x0`,`y0`) to (`x1`,`y1`) with respect + to the axes' sizing mode. If "circle", a circle is + drawn from ((`x0`+`x1`)/2, (`y0`+`y1`)/2)) with radius + (|(`x0`+`x1`)/2 - `x0`|, |(`y0`+`y1`)/2 -`y0`)|) with + respect to the axes' sizing mode. If "rect", a + rectangle is drawn linking (`x0`,`y0`), (`x1`,`y0`), + (`x1`,`y1`), (`x0`,`y1`), (`x0`,`y0`) with respect to + the axes' sizing mode. If "path", draw a custom SVG + path using `path`. with respect to the axes' sizing + mode. + visible + Determines whether or not this shape is visible. If + "legendonly", the shape is not drawn, but can appear as + a legend item (provided that the legend itself is + visible). + x0 + Sets the shape's starting x position. See `type` and + `xsizemode` for more info. + x0shift + Shifts `x0` away from the center of the category when + `xref` is a "category" or "multicategory" axis. -0.5 + corresponds to the start of the category and 0.5 + corresponds to the end of the category. + x1 + Sets the shape's end x position. See `type` and + `xsizemode` for more info. + x1shift + Shifts `x1` away from the center of the category when + `xref` is a "category" or "multicategory" axis. -0.5 + corresponds to the start of the category and 0.5 + corresponds to the end of the category. + xanchor + Only relevant in conjunction with `xsizemode` set to + "pixel". Specifies the anchor point on the x axis to + which `x0`, `x1` and x coordinates within `path` are + relative to. E.g. useful to attach a pixel sized shape + to a certain data value. No effect when `xsizemode` not + set to "pixel". + xref + Sets the shape's x coordinate axis. If set to a x axis + id (e.g. "x" or "x2"), the `x` position refers to a x + coordinate. If set to "paper", the `x` position refers + to the distance from the left of the plotting area in + normalized coordinates where 0 (1) corresponds to the + left (right). If set to a x axis ID followed by + "domain" (separated by a space), the position behaves + like for "paper", but refers to the distance in + fractions of the domain length from the left of the + domain of that axis: e.g., *x2 domain* refers to the + domain of the second x axis and a x position of 0.5 + refers to the point between the left and the right of + the domain of the second x axis. + xsizemode + Sets the shapes's sizing mode along the x axis. If set + to "scaled", `x0`, `x1` and x coordinates within `path` + refer to data values on the x axis or a fraction of the + plot area's width (`xref` set to "paper"). If set to + "pixel", `xanchor` specifies the x position in terms of + data or plot fraction but `x0`, `x1` and x coordinates + within `path` are pixels relative to `xanchor`. This + way, the shape can have a fixed width while maintaining + a position relative to data or plot fraction. + y0 + Sets the shape's starting y position. See `type` and + `ysizemode` for more info. + y0shift + Shifts `y0` away from the center of the category when + `yref` is a "category" or "multicategory" axis. -0.5 + corresponds to the start of the category and 0.5 + corresponds to the end of the category. + y1 + Sets the shape's end y position. See `type` and + `ysizemode` for more info. + y1shift + Shifts `y1` away from the center of the category when + `yref` is a "category" or "multicategory" axis. -0.5 + corresponds to the start of the category and 0.5 + corresponds to the end of the category. + yanchor + Only relevant in conjunction with `ysizemode` set to + "pixel". Specifies the anchor point on the y axis to + which `y0`, `y1` and y coordinates within `path` are + relative to. E.g. useful to attach a pixel sized shape + to a certain data value. No effect when `ysizemode` not + set to "pixel". + yref + Sets the shape's y coordinate axis. If set to a y axis + id (e.g. "y" or "y2"), the `y` position refers to a y + coordinate. If set to "paper", the `y` position refers + to the distance from the bottom of the plotting area in + normalized coordinates where 0 (1) corresponds to the + bottom (top). If set to a y axis ID followed by + "domain" (separated by a space), the position behaves + like for "paper", but refers to the distance in + fractions of the domain length from the bottom of the + domain of that axis: e.g., *y2 domain* refers to the + domain of the second y axis and a y position of 0.5 + refers to the point between the bottom and the top of + the domain of the second y axis. + ysizemode + Sets the shapes's sizing mode along the y axis. If set + to "scaled", `y0`, `y1` and y coordinates within `path` + refer to data values on the y axis or a fraction of the + plot area's height (`yref` set to "paper"). If set to + "pixel", `yanchor` specifies the y position in terms of + data or plot fraction but `y0`, `y1` and y coordinates + within `path` are pixels relative to `yanchor`. This + way, the shape can have a fixed height while + maintaining a position relative to data or plot + fraction. + row + Subplot row for shape. If 'all', addresses all rows in + the specified column(s). + col + Subplot column for shape. If 'all', addresses all + columns in the specified row(s). + secondary_y + Whether to add shape to secondary y-axis + exclude_empty_subplots + If True, shape will not be added to subplots without + traces. + + Returns + ------- + Figure + """ + from plotly.graph_objs import layout as _layout + + new_obj = _layout.Shape( + arg, + editable=editable, + fillcolor=fillcolor, + fillrule=fillrule, + label=label, + layer=layer, + legend=legend, + legendgroup=legendgroup, + legendgrouptitle=legendgrouptitle, + legendrank=legendrank, + legendwidth=legendwidth, + line=line, + name=name, + opacity=opacity, + path=path, + showlegend=showlegend, + templateitemname=templateitemname, + type=type, + visible=visible, + x0=x0, + x0shift=x0shift, + x1=x1, + x1shift=x1shift, + xanchor=xanchor, + xref=xref, + xsizemode=xsizemode, + y0=y0, + y0shift=y0shift, + y1=y1, + y1shift=y1shift, + yanchor=yanchor, + yref=yref, + ysizemode=ysizemode, + **kwargs, + ) + return self._add_annotation_like( + "shape", + "shapes", + new_obj, + row=row, + col=col, + secondary_y=secondary_y, + exclude_empty_subplots=exclude_empty_subplots, + ) diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/_figurewidget.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/_figurewidget.py new file mode 100644 index 0000000000000000000000000000000000000000..758a4dfc6845075a52d81480b577d0bdbb41b973 --- /dev/null +++ b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/_figurewidget.py @@ -0,0 +1,25371 @@ +# --- THIS FILE IS AUTO-GENERATED --- +# Modifications will be overwitten the next time code generation run. + +from plotly.basewidget import BaseFigureWidget + + +class FigureWidget(BaseFigureWidget): + def __init__( + self, data=None, layout=None, frames=None, skip_invalid=False, **kwargs + ): + """ + Create a new :class:FigureWidget instance + + Parameters + ---------- + data + The 'data' property is a tuple of trace instances + that may be specified as: + - A list or tuple of trace instances + (e.g. [Scatter(...), Bar(...)]) + - A single trace instance + (e.g. Scatter(...), Bar(...), etc.) + - A list or tuple of dicts of string/value properties where: + - The 'type' property specifies the trace type + One of: ['bar', 'barpolar', 'box', 'candlestick', + 'carpet', 'choropleth', 'choroplethmap', + 'choroplethmapbox', 'cone', 'contour', + 'contourcarpet', 'densitymap', + 'densitymapbox', 'funnel', 'funnelarea', + 'heatmap', 'histogram', 'histogram2d', + 'histogram2dcontour', 'icicle', 'image', + 'indicator', 'isosurface', 'mesh3d', 'ohlc', + 'parcats', 'parcoords', 'pie', 'sankey', + 'scatter', 'scatter3d', 'scattercarpet', + 'scattergeo', 'scattergl', 'scattermap', + 'scattermapbox', 'scatterpolar', + 'scatterpolargl', 'scattersmith', + 'scatterternary', 'splom', 'streamtube', + 'sunburst', 'surface', 'table', 'treemap', + 'violin', 'volume', 'waterfall'] + + - All remaining properties are passed to the constructor of + the specified trace type + + (e.g. [{'type': 'scatter', ...}, {'type': 'bar, ...}]) + + layout + The 'layout' property is an instance of Layout + that may be specified as: + - An instance of :class:`plotly.graph_objs.Layout` + - A dict of string/value properties that will be passed + to the Layout constructor + + frames + The 'frames' property is a tuple of instances of + Frame that may be specified as: + - A list or tuple of instances of plotly.graph_objs.Frame + - A list or tuple of dicts of string/value properties that + will be passed to the Frame constructor + + skip_invalid: bool + If True, invalid properties in the figure specification will be + skipped silently. If False (default) invalid properties in the + figure specification will result in a ValueError + + Raises + ------ + ValueError + if a property in the specification of data, layout, or frames + is invalid AND skip_invalid is False + """ + super().__init__(data, layout, frames, skip_invalid, **kwargs) + + def update(self, dict1=None, overwrite=False, **kwargs) -> "FigureWidget": + """ + + Update the properties of the figure with a dict and/or with + keyword arguments. + + This recursively updates the structure of the figure + object with the values in the input dict / keyword arguments. + + Parameters + ---------- + dict1 : dict + Dictionary of properties to be updated + overwrite: bool + If True, overwrite existing properties. If False, apply updates + to existing properties recursively, preserving existing + properties that are not specified in the update operation. + kwargs : + Keyword/value pair of properties to be updated + + Examples + -------- + >>> import plotly.graph_objs as go + >>> fig = go.Figure(data=[{'y': [1, 2, 3]}]) + >>> fig.update(data=[{'y': [4, 5, 6]}]) # doctest: +ELLIPSIS + Figure(...) + >>> fig.to_plotly_json() # doctest: +SKIP + {'data': [{'type': 'scatter', + 'uid': 'e86a7c7a-346a-11e8-8aa8-a0999b0c017b', + 'y': array([4, 5, 6], dtype=int32)}], + 'layout': {}} + + >>> fig = go.Figure(layout={'xaxis': + ... {'color': 'green', + ... 'range': [0, 1]}}) + >>> fig.update({'layout': {'xaxis': {'color': 'pink'}}}) # doctest: +ELLIPSIS + Figure(...) + >>> fig.to_plotly_json() # doctest: +SKIP + {'data': [], + 'layout': {'xaxis': + {'color': 'pink', + 'range': [0, 1]}}} + + Returns + ------- + BaseFigure + Updated figure + + """ + return super().update(dict1, overwrite, **kwargs) + + def update_traces( + self, + patch=None, + selector=None, + row=None, + col=None, + secondary_y=None, + overwrite=False, + **kwargs, + ) -> "FigureWidget": + """ + + Perform a property update operation on all traces that satisfy the + specified selection criteria + + Parameters + ---------- + patch: dict or None (default None) + Dictionary of property updates to be applied to all traces that + satisfy the selection criteria. + selector: dict, function, int, str or None (default None) + Dict to use as selection criteria. + Traces will be selected if they contain properties corresponding + to all of the dictionary's keys, with values that exactly match + the supplied values. If None (the default), all traces are + selected. If a function, it must be a function accepting a single + argument and returning a boolean. The function will be called on + each trace and those for which the function returned True + will be in the selection. If an int N, the Nth trace matching row + and col will be selected (N can be negative). If a string S, the selector + is equivalent to dict(type=S). + row, col: int or None (default None) + Subplot row and column index of traces to select. + To select traces by row and column, the Figure must have been + created using plotly.subplots.make_subplots. If None + (the default), all traces are selected. + secondary_y: boolean or None (default None) + * If True, only select traces associated with the secondary + y-axis of the subplot. + * If False, only select traces associated with the primary + y-axis of the subplot. + * If None (the default), do not filter traces based on secondary + y-axis. + + To select traces by secondary y-axis, the Figure must have been + created using plotly.subplots.make_subplots. See the docstring + for the specs argument to make_subplots for more info on + creating subplots with secondary y-axes. + overwrite: bool + If True, overwrite existing properties. If False, apply updates + to existing properties recursively, preserving existing + properties that are not specified in the update operation. + **kwargs + Additional property updates to apply to each selected trace. If + a property is specified in both patch and in **kwargs then the + one in **kwargs takes precedence. + + Returns + ------- + self + Returns the Figure object that the method was called on + + """ + return super().update_traces( + patch, selector, row, col, secondary_y, overwrite, **kwargs + ) + + def update_layout(self, dict1=None, overwrite=False, **kwargs) -> "FigureWidget": + """ + + Update the properties of the figure's layout with a dict and/or with + keyword arguments. + + This recursively updates the structure of the original + layout with the values in the input dict / keyword arguments. + + Parameters + ---------- + dict1 : dict + Dictionary of properties to be updated + overwrite: bool + If True, overwrite existing properties. If False, apply updates + to existing properties recursively, preserving existing + properties that are not specified in the update operation. + kwargs : + Keyword/value pair of properties to be updated + + Returns + ------- + BaseFigure + The Figure object that the update_layout method was called on + + """ + return super().update_layout(dict1, overwrite, **kwargs) + + def for_each_trace( + self, fn, selector=None, row=None, col=None, secondary_y=None + ) -> "FigureWidget": + """ + + Apply a function to all traces that satisfy the specified selection + criteria + + Parameters + ---------- + fn: + Function that inputs a single trace object. + selector: dict, function, int, str or None (default None) + Dict to use as selection criteria. + Traces will be selected if they contain properties corresponding + to all of the dictionary's keys, with values that exactly match + the supplied values. If None (the default), all traces are + selected. If a function, it must be a function accepting a single + argument and returning a boolean. The function will be called on + each trace and those for which the function returned True + will be in the selection. If an int N, the Nth trace matching row + and col will be selected (N can be negative). If a string S, the selector + is equivalent to dict(type=S). + row, col: int or None (default None) + Subplot row and column index of traces to select. + To select traces by row and column, the Figure must have been + created using plotly.subplots.make_subplots. If None + (the default), all traces are selected. + secondary_y: boolean or None (default None) + * If True, only select traces associated with the secondary + y-axis of the subplot. + * If False, only select traces associated with the primary + y-axis of the subplot. + * If None (the default), do not filter traces based on secondary + y-axis. + + To select traces by secondary y-axis, the Figure must have been + created using plotly.subplots.make_subplots. See the docstring + for the specs argument to make_subplots for more info on + creating subplots with secondary y-axes. + Returns + ------- + self + Returns the Figure object that the method was called on + + """ + return super().for_each_trace(fn, selector, row, col, secondary_y) + + def add_trace( + self, trace, row=None, col=None, secondary_y=None, exclude_empty_subplots=False + ) -> "FigureWidget": + """ + + Add a trace to the figure + + Parameters + ---------- + trace : BaseTraceType or dict + Either: + - An instances of a trace classe from the plotly.graph_objs + package (e.g plotly.graph_objs.Scatter, plotly.graph_objs.Bar) + - or a dicts where: + + - The 'type' property specifies the trace type (e.g. + 'scatter', 'bar', 'area', etc.). If the dict has no 'type' + property then 'scatter' is assumed. + - All remaining properties are passed to the constructor + of the specified trace type. + + row : 'all', int or None (default) + Subplot row index (starting from 1) for the trace to be + added. Only valid if figure was created using + `plotly.tools.make_subplots`. + If 'all', addresses all rows in the specified column(s). + col : 'all', int or None (default) + Subplot col index (starting from 1) for the trace to be + added. Only valid if figure was created using + `plotly.tools.make_subplots`. + If 'all', addresses all columns in the specified row(s). + secondary_y: boolean or None (default None) + If True, associate this trace with the secondary y-axis of the + subplot at the specified row and col. Only valid if all of the + following conditions are satisfied: + * The figure was created using `plotly.subplots.make_subplots`. + * The row and col arguments are not None + * The subplot at the specified row and col has type xy + (which is the default) and secondary_y True. These + properties are specified in the specs argument to + make_subplots. See the make_subplots docstring for more info. + * The trace argument is a 2D cartesian trace + (scatter, bar, etc.) + exclude_empty_subplots: boolean + If True, the trace will not be added to subplots that don't already + have traces. + Returns + ------- + BaseFigure + The Figure that add_trace was called on + + Examples + -------- + + >>> from plotly import subplots + >>> import plotly.graph_objs as go + + Add two Scatter traces to a figure + + >>> fig = go.Figure() + >>> fig.add_trace(go.Scatter(x=[1,2,3], y=[2,1,2])) # doctest: +ELLIPSIS + Figure(...) + >>> fig.add_trace(go.Scatter(x=[1,2,3], y=[2,1,2])) # doctest: +ELLIPSIS + Figure(...) + + + Add two Scatter traces to vertically stacked subplots + + >>> fig = subplots.make_subplots(rows=2) + >>> fig.add_trace(go.Scatter(x=[1,2,3], y=[2,1,2]), row=1, col=1) # doctest: +ELLIPSIS + Figure(...) + >>> fig.add_trace(go.Scatter(x=[1,2,3], y=[2,1,2]), row=2, col=1) # doctest: +ELLIPSIS + Figure(...) + + """ + return super().add_trace(trace, row, col, secondary_y, exclude_empty_subplots) + + def add_traces( + self, + data, + rows=None, + cols=None, + secondary_ys=None, + exclude_empty_subplots=False, + ) -> "FigureWidget": + """ + + Add traces to the figure + + Parameters + ---------- + data : list[BaseTraceType or dict] + A list of trace specifications to be added. + Trace specifications may be either: + + - Instances of trace classes from the plotly.graph_objs + package (e.g plotly.graph_objs.Scatter, plotly.graph_objs.Bar) + - Dicts where: + + - The 'type' property specifies the trace type (e.g. + 'scatter', 'bar', 'area', etc.). If the dict has no 'type' + property then 'scatter' is assumed. + - All remaining properties are passed to the constructor + of the specified trace type. + + rows : None, list[int], or int (default None) + List of subplot row indexes (starting from 1) for the traces to be + added. Only valid if figure was created using + `plotly.tools.make_subplots` + If a single integer is passed, all traces will be added to row number + + cols : None or list[int] (default None) + List of subplot column indexes (starting from 1) for the traces + to be added. Only valid if figure was created using + `plotly.tools.make_subplots` + If a single integer is passed, all traces will be added to column number + + + secondary_ys: None or list[boolean] (default None) + List of secondary_y booleans for traces to be added. See the + docstring for `add_trace` for more info. + + exclude_empty_subplots: boolean + If True, the trace will not be added to subplots that don't already + have traces. + + Returns + ------- + BaseFigure + The Figure that add_traces was called on + + Examples + -------- + + >>> from plotly import subplots + >>> import plotly.graph_objs as go + + Add two Scatter traces to a figure + + >>> fig = go.Figure() + >>> fig.add_traces([go.Scatter(x=[1,2,3], y=[2,1,2]), + ... go.Scatter(x=[1,2,3], y=[2,1,2])]) # doctest: +ELLIPSIS + Figure(...) + + Add two Scatter traces to vertically stacked subplots + + >>> fig = subplots.make_subplots(rows=2) + >>> fig.add_traces([go.Scatter(x=[1,2,3], y=[2,1,2]), + ... go.Scatter(x=[1,2,3], y=[2,1,2])], + ... rows=[1, 2], cols=[1, 1]) # doctest: +ELLIPSIS + Figure(...) + + """ + return super().add_traces( + data, rows, cols, secondary_ys, exclude_empty_subplots + ) + + def add_vline( + self, + x, + row="all", + col="all", + exclude_empty_subplots=True, + annotation=None, + **kwargs, + ) -> "FigureWidget": + """ + + Add a vertical line to a plot or subplot that extends infinitely in the + y-dimension. + + Parameters + ---------- + x: float or int + A number representing the x coordinate of the vertical line. + exclude_empty_subplots: Boolean + If True (default) do not place the shape on subplots that have no data + plotted on them. + row: None, int or 'all' + Subplot row for shape indexed starting at 1. If 'all', addresses all rows in + the specified column(s). If both row and col are None, addresses the + first subplot if subplots exist, or the only plot. By default is "all". + col: None, int or 'all' + Subplot column for shape indexed starting at 1. If 'all', addresses all rows in + the specified column(s). If both row and col are None, addresses the + first subplot if subplots exist, or the only plot. By default is "all". + annotation: dict or plotly.graph_objects.layout.Annotation. If dict(), + it is interpreted as describing an annotation. The annotation is + placed relative to the shape based on annotation_position (see + below) unless its x or y value has been specified for the annotation + passed here. xref and yref are always the same as for the added + shape and cannot be overridden. + annotation_position: a string containing optionally ["top", "bottom"] + and ["left", "right"] specifying where the text should be anchored + to on the line. Example positions are "bottom left", "right top", + "right", "bottom". If an annotation is added but annotation_position is + not specified, this defaults to "top right". + annotation_*: any parameters to go.layout.Annotation can be passed as + keywords by prefixing them with "annotation_". For example, to specify the + annotation text "example" you can pass annotation_text="example" as a + keyword argument. + **kwargs: + Any named function parameters that can be passed to 'add_shape', + except for x0, x1, y0, y1 or type. + """ + return super().add_vline( + x, row, col, exclude_empty_subplots, annotation, **kwargs + ) + + def add_hline( + self, + y, + row="all", + col="all", + exclude_empty_subplots=True, + annotation=None, + **kwargs, + ) -> "FigureWidget": + """ + + Add a horizontal line to a plot or subplot that extends infinitely in the + x-dimension. + + Parameters + ---------- + y: float or int + A number representing the y coordinate of the horizontal line. + exclude_empty_subplots: Boolean + If True (default) do not place the shape on subplots that have no data + plotted on them. + row: None, int or 'all' + Subplot row for shape indexed starting at 1. If 'all', addresses all rows in + the specified column(s). If both row and col are None, addresses the + first subplot if subplots exist, or the only plot. By default is "all". + col: None, int or 'all' + Subplot column for shape indexed starting at 1. If 'all', addresses all rows in + the specified column(s). If both row and col are None, addresses the + first subplot if subplots exist, or the only plot. By default is "all". + annotation: dict or plotly.graph_objects.layout.Annotation. If dict(), + it is interpreted as describing an annotation. The annotation is + placed relative to the shape based on annotation_position (see + below) unless its x or y value has been specified for the annotation + passed here. xref and yref are always the same as for the added + shape and cannot be overridden. + annotation_position: a string containing optionally ["top", "bottom"] + and ["left", "right"] specifying where the text should be anchored + to on the line. Example positions are "bottom left", "right top", + "right", "bottom". If an annotation is added but annotation_position is + not specified, this defaults to "top right". + annotation_*: any parameters to go.layout.Annotation can be passed as + keywords by prefixing them with "annotation_". For example, to specify the + annotation text "example" you can pass annotation_text="example" as a + keyword argument. + **kwargs: + Any named function parameters that can be passed to 'add_shape', + except for x0, x1, y0, y1 or type. + """ + return super().add_hline( + y, row, col, exclude_empty_subplots, annotation, **kwargs + ) + + def add_vrect( + self, + x0, + x1, + row="all", + col="all", + exclude_empty_subplots=True, + annotation=None, + **kwargs, + ) -> "FigureWidget": + """ + + Add a rectangle to a plot or subplot that extends infinitely in the + y-dimension. + + Parameters + ---------- + x0: float or int + A number representing the x coordinate of one side of the rectangle. + x1: float or int + A number representing the x coordinate of the other side of the rectangle. + exclude_empty_subplots: Boolean + If True (default) do not place the shape on subplots that have no data + plotted on them. + row: None, int or 'all' + Subplot row for shape indexed starting at 1. If 'all', addresses all rows in + the specified column(s). If both row and col are None, addresses the + first subplot if subplots exist, or the only plot. By default is "all". + col: None, int or 'all' + Subplot column for shape indexed starting at 1. If 'all', addresses all rows in + the specified column(s). If both row and col are None, addresses the + first subplot if subplots exist, or the only plot. By default is "all". + annotation: dict or plotly.graph_objects.layout.Annotation. If dict(), + it is interpreted as describing an annotation. The annotation is + placed relative to the shape based on annotation_position (see + below) unless its x or y value has been specified for the annotation + passed here. xref and yref are always the same as for the added + shape and cannot be overridden. + annotation_position: a string containing optionally ["inside", "outside"], ["top", "bottom"] + and ["left", "right"] specifying where the text should be anchored + to on the rectangle. Example positions are "outside top left", "inside + bottom", "right", "inside left", "inside" ("outside" is not supported). If + an annotation is added but annotation_position is not specified this + defaults to "inside top right". + annotation_*: any parameters to go.layout.Annotation can be passed as + keywords by prefixing them with "annotation_". For example, to specify the + annotation text "example" you can pass annotation_text="example" as a + keyword argument. + **kwargs: + Any named function parameters that can be passed to 'add_shape', + except for x0, x1, y0, y1 or type. + """ + return super().add_vrect( + x0, x1, row, col, exclude_empty_subplots, annotation, **kwargs + ) + + def add_hrect( + self, + y0, + y1, + row="all", + col="all", + exclude_empty_subplots=True, + annotation=None, + **kwargs, + ) -> "FigureWidget": + """ + + Add a rectangle to a plot or subplot that extends infinitely in the + x-dimension. + + Parameters + ---------- + y0: float or int + A number representing the y coordinate of one side of the rectangle. + y1: float or int + A number representing the y coordinate of the other side of the rectangle. + exclude_empty_subplots: Boolean + If True (default) do not place the shape on subplots that have no data + plotted on them. + row: None, int or 'all' + Subplot row for shape indexed starting at 1. If 'all', addresses all rows in + the specified column(s). If both row and col are None, addresses the + first subplot if subplots exist, or the only plot. By default is "all". + col: None, int or 'all' + Subplot column for shape indexed starting at 1. If 'all', addresses all rows in + the specified column(s). If both row and col are None, addresses the + first subplot if subplots exist, or the only plot. By default is "all". + annotation: dict or plotly.graph_objects.layout.Annotation. If dict(), + it is interpreted as describing an annotation. The annotation is + placed relative to the shape based on annotation_position (see + below) unless its x or y value has been specified for the annotation + passed here. xref and yref are always the same as for the added + shape and cannot be overridden. + annotation_position: a string containing optionally ["inside", "outside"], ["top", "bottom"] + and ["left", "right"] specifying where the text should be anchored + to on the rectangle. Example positions are "outside top left", "inside + bottom", "right", "inside left", "inside" ("outside" is not supported). If + an annotation is added but annotation_position is not specified this + defaults to "inside top right". + annotation_*: any parameters to go.layout.Annotation can be passed as + keywords by prefixing them with "annotation_". For example, to specify the + annotation text "example" you can pass annotation_text="example" as a + keyword argument. + **kwargs: + Any named function parameters that can be passed to 'add_shape', + except for x0, x1, y0, y1 or type. + """ + return super().add_hrect( + y0, y1, row, col, exclude_empty_subplots, annotation, **kwargs + ) + + def set_subplots( + self, rows=None, cols=None, **make_subplots_args + ) -> "FigureWidget": + """ + + Add subplots to this figure. If the figure already contains subplots, + then this throws an error. Accepts any keyword arguments that + plotly.subplots.make_subplots accepts. + + """ + return super().set_subplots(rows, cols, **make_subplots_args) + + def add_bar( + self, + alignmentgroup=None, + base=None, + basesrc=None, + cliponaxis=None, + constraintext=None, + customdata=None, + customdatasrc=None, + dx=None, + dy=None, + error_x=None, + error_y=None, + hoverinfo=None, + hoverinfosrc=None, + hoverlabel=None, + hovertemplate=None, + hovertemplatefallback=None, + hovertemplatesrc=None, + hovertext=None, + hovertextsrc=None, + ids=None, + idssrc=None, + insidetextanchor=None, + insidetextfont=None, + legend=None, + legendgroup=None, + legendgrouptitle=None, + legendrank=None, + legendwidth=None, + marker=None, + meta=None, + metasrc=None, + name=None, + offset=None, + offsetgroup=None, + offsetsrc=None, + opacity=None, + orientation=None, + outsidetextfont=None, + selected=None, + selectedpoints=None, + showlegend=None, + stream=None, + text=None, + textangle=None, + textfont=None, + textposition=None, + textpositionsrc=None, + textsrc=None, + texttemplate=None, + texttemplatefallback=None, + texttemplatesrc=None, + uid=None, + uirevision=None, + unselected=None, + visible=None, + width=None, + widthsrc=None, + x=None, + x0=None, + xaxis=None, + xcalendar=None, + xhoverformat=None, + xperiod=None, + xperiod0=None, + xperiodalignment=None, + xsrc=None, + y=None, + y0=None, + yaxis=None, + ycalendar=None, + yhoverformat=None, + yperiod=None, + yperiod0=None, + yperiodalignment=None, + ysrc=None, + zorder=None, + row=None, + col=None, + secondary_y=None, + **kwargs, + ) -> "FigureWidget": + """ + Add a new Bar trace + + The data visualized by the span of the bars is set in `y` if + `orientation` is set to "v" (the default) and the labels are + set in `x`. By setting `orientation` to "h", the roles are + interchanged. + + Parameters + ---------- + alignmentgroup + Set several traces linked to the same position axis or + matching axes to the same alignmentgroup. This controls + whether bars compute their positional range dependently + or independently. + base + Sets where the bar base is drawn (in position axis + units). In "stack" or "relative" barmode, traces that + set "base" will be excluded and drawn in "overlay" mode + instead. + basesrc + Sets the source reference on Chart Studio Cloud for + `base`. + cliponaxis + Determines whether the text nodes are clipped about the + subplot axes. To show the text nodes above axis lines + and tick labels, make sure to set `xaxis.layer` and + `yaxis.layer` to *below traces*. + constraintext + Constrain the size of text inside or outside a bar to + be no larger than the bar itself. + customdata + Assigns extra data each datum. This may be useful when + listening to hover, click and selection events. Note + that, "scatter" traces also appends customdata items in + the markers DOM elements + customdatasrc + Sets the source reference on Chart Studio Cloud for + `customdata`. + dx + Sets the x coordinate step. See `x0` for more info. + dy + Sets the y coordinate step. See `y0` for more info. + error_x + :class:`plotly.graph_objects.bar.ErrorX` instance or + dict with compatible properties + error_y + :class:`plotly.graph_objects.bar.ErrorY` instance or + dict with compatible properties + hoverinfo + Determines which trace information appear on hover. If + `none` or `skip` are set, no information is displayed + upon hovering. But, if `none` is set, click and hover + events are still fired. + hoverinfosrc + Sets the source reference on Chart Studio Cloud for + `hoverinfo`. + hoverlabel + :class:`plotly.graph_objects.bar.Hoverlabel` instance + or dict with compatible properties + hovertemplate + Template string used for rendering the information that + appear on hover box. Note that this will override + `hoverinfo`. Variables are inserted using %{variable}, + for example "y: %{y}" as well as %{xother}, {%_xother}, + {%_xother_}, {%xother_}. When showing info for several + points, "xother" will be added to those with different + x positions from the first point. An underscore before + or after "(x|y)other" will add a space on that side, + only when this field is shown. Numbers are formatted + using d3-format's syntax %{variable:d3-format}, for + example "Price: %{y:$.2f}". + https://github.com/d3/d3-format/tree/v1.4.5#d3-format + for details on the formatting syntax. Dates are + formatted using d3-time-format's syntax + %{variable|d3-time-format}, for example "Day: + %{2019-01-01|%A}". https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format for details on the + date formatting syntax. Variables that can't be found + will be replaced with the specifier. For example, a + template of "data: %{x}, %{y}" will result in a value + of "data: 1, %{y}" if x is 1 and y is missing. + Variables with an undefined value will be replaced with + the fallback value. The variables available in + `hovertemplate` are the ones emitted as event data + described at this link + https://plotly.com/javascript/plotlyjs-events/#event- + data. Additionally, all attributes that can be + specified per-point (the ones that are `arrayOk: true`) + are available. Finally, the template string has access + to variables `value` and `label`. Anything contained in + tag `` is displayed in the secondary box, for + example `%{fullData.name}`. To hide the + secondary box completely, use an empty tag + ``. + hovertemplatefallback + Fallback string that's displayed when a variable + referenced in a template is missing. If the boolean + value 'false' is passed in, the specifier with the + missing variable will be displayed. + hovertemplatesrc + Sets the source reference on Chart Studio Cloud for + `hovertemplate`. + hovertext + Sets hover text elements associated with each (x,y) + pair. If a single string, the same string appears over + all the data points. If an array of string, the items + are mapped in order to the this trace's (x,y) + coordinates. To be seen, trace `hoverinfo` must contain + a "text" flag. + hovertextsrc + Sets the source reference on Chart Studio Cloud for + `hovertext`. + ids + Assigns id labels to each datum. These ids for object + constancy of data points during animation. Should be an + array of strings, not numbers or any other type. + idssrc + Sets the source reference on Chart Studio Cloud for + `ids`. + insidetextanchor + Determines if texts are kept at center or start/end + points in `textposition` "inside" mode. + insidetextfont + Sets the font used for `text` lying inside the bar. + legend + Sets the reference to a legend to show this trace in. + References to these legends are "legend", "legend2", + "legend3", etc. Settings for these legends are set in + the layout, under `layout.legend`, `layout.legend2`, + etc. + legendgroup + Sets the legend group for this trace. Traces and shapes + part of the same legend group hide/show at the same + time when toggling legend items. + legendgrouptitle + :class:`plotly.graph_objects.bar.Legendgrouptitle` + instance or dict with compatible properties + legendrank + Sets the legend rank for this trace. Items and groups + with smaller ranks are presented on top/left side while + with "reversed" `legend.traceorder` they are on + bottom/right side. The default legendrank is 1000, so + that you can use ranks less than 1000 to place certain + items before all unranked items, and ranks greater than + 1000 to go after all unranked items. When having + unranked or equal rank items shapes would be displayed + after traces i.e. according to their order in data and + layout. + legendwidth + Sets the width (in px or fraction) of the legend for + this trace. + marker + :class:`plotly.graph_objects.bar.Marker` instance or + dict with compatible properties + meta + Assigns extra meta information associated with this + trace that can be used in various text attributes. + Attributes such as trace `name`, graph, axis and + colorbar `title.text`, annotation `text` + `rangeselector`, `updatemenues` and `sliders` `label` + text all support `meta`. To access the trace `meta` + values in an attribute in the same trace, simply use + `%{meta[i]}` where `i` is the index or key of the + `meta` item in question. To access trace `meta` in + layout attributes, use `%{data[n[.meta[i]}` where `i` + is the index or key of the `meta` and `n` is the trace + index. + metasrc + Sets the source reference on Chart Studio Cloud for + `meta`. + name + Sets the trace name. The trace name appears as the + legend item and on hover. + offset + Shifts the position where the bar is drawn (in position + axis units). In "group" barmode, traces that set + "offset" will be excluded and drawn in "overlay" mode + instead. + offsetgroup + Set several traces linked to the same position axis or + matching axes to the same offsetgroup where bars of the + same position coordinate will line up. + offsetsrc + Sets the source reference on Chart Studio Cloud for + `offset`. + opacity + Sets the opacity of the trace. + orientation + Sets the orientation of the bars. With "v" ("h"), the + value of the each bar spans along the vertical + (horizontal). + outsidetextfont + Sets the font used for `text` lying outside the bar. + selected + :class:`plotly.graph_objects.bar.Selected` instance or + dict with compatible properties + selectedpoints + Array containing integer indices of selected points. + Has an effect only for traces that support selections. + Note that an empty array means an empty selection where + the `unselected` are turned on for all points, whereas, + any other non-array values means no selection all where + the `selected` and `unselected` styles have no effect. + showlegend + Determines whether or not an item corresponding to this + trace is shown in the legend. + stream + :class:`plotly.graph_objects.bar.Stream` instance or + dict with compatible properties + text + Sets text elements associated with each (x,y) pair. If + a single string, the same string appears over all the + data points. If an array of string, the items are + mapped in order to the this trace's (x,y) coordinates. + If trace `hoverinfo` contains a "text" flag and + "hovertext" is not set, these elements will be seen in + the hover labels. + textangle + Sets the angle of the tick labels with respect to the + bar. For example, a `tickangle` of -90 draws the tick + labels vertically. With "auto" the texts may + automatically be rotated to fit with the maximum size + in bars. + textfont + Sets the font used for `text`. + textposition + Specifies the location of the `text`. "inside" + positions `text` inside, next to the bar end (rotated + and scaled if needed). "outside" positions `text` + outside, next to the bar end (scaled if needed), unless + there is another bar stacked on this one, then the text + gets pushed inside. "auto" tries to position `text` + inside the bar, but if the bar is too small and no bar + is stacked on this one the text is moved outside. If + "none", no text appears. + textpositionsrc + Sets the source reference on Chart Studio Cloud for + `textposition`. + textsrc + Sets the source reference on Chart Studio Cloud for + `text`. + texttemplate + Template string used for rendering the information text + that appears on points. Note that this will override + `textinfo`. Variables are inserted using %{variable}, + for example "y: %{y}". Numbers are formatted using + d3-format's syntax %{variable:d3-format}, for example + "Price: %{y:$.2f}". + https://github.com/d3/d3-format/tree/v1.4.5#d3-format + for details on the formatting syntax. Dates are + formatted using d3-time-format's syntax + %{variable|d3-time-format}, for example "Day: + %{2019-01-01|%A}". https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format for details on the + date formatting syntax. Variables that can't be found + will be replaced with the specifier. For example, a + template of "data: %{x}, %{y}" will result in a value + of "data: 1, %{y}" if x is 1 and y is missing. + Variables with an undefined value will be replaced with + the fallback value. All attributes that can be + specified per-point (the ones that are `arrayOk: true`) + are available. Finally, the template string has access + to variables `value` and `label`. + texttemplatefallback + Fallback string that's displayed when a variable + referenced in a template is missing. If the boolean + value 'false' is passed in, the specifier with the + missing variable will be displayed. + texttemplatesrc + Sets the source reference on Chart Studio Cloud for + `texttemplate`. + uid + Assign an id to this trace, Use this to provide object + constancy between traces during animations and + transitions. + uirevision + Controls persistence of some user-driven changes to the + trace: `constraintrange` in `parcoords` traces, as well + as some `editable: true` modifications such as `name` + and `colorbar.title`. Defaults to `layout.uirevision`. + Note that other user-driven trace attribute changes are + controlled by `layout` attributes: `trace.visible` is + controlled by `layout.legend.uirevision`, + `selectedpoints` is controlled by + `layout.selectionrevision`, and `colorbar.(x|y)` + (accessible with `config: {editable: true}`) is + controlled by `layout.editrevision`. Trace changes are + tracked by `uid`, which only falls back on trace index + if no `uid` is provided. So if your app can add/remove + traces before the end of the `data` array, such that + the same trace has a different index, you can still + preserve user-driven changes if you give each trace a + `uid` that stays with it as it moves. + unselected + :class:`plotly.graph_objects.bar.Unselected` instance + or dict with compatible properties + visible + Determines whether or not this trace is visible. If + "legendonly", the trace is not drawn, but can appear as + a legend item (provided that the legend itself is + visible). + width + Sets the bar width (in position axis units). + widthsrc + Sets the source reference on Chart Studio Cloud for + `width`. + x + Sets the x coordinates. + x0 + Alternate to `x`. Builds a linear space of x + coordinates. Use with `dx` where `x0` is the starting + coordinate and `dx` the step. + xaxis + Sets a reference between this trace's x coordinates and + a 2D cartesian x axis. If "x" (the default value), the + x coordinates refer to `layout.xaxis`. If "x2", the x + coordinates refer to `layout.xaxis2`, and so on. + xcalendar + Sets the calendar system to use with `x` date data. + xhoverformat + Sets the hover text formatting rulefor `x` using d3 + formatting mini-languages which are very similar to + those in Python. For numbers, see: + https://github.com/d3/d3-format/tree/v1.4.5#d3-format. + And for dates see: https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format. We add two items to + d3's date formatter: "%h" for half of the year as a + decimal number as well as "%{n}f" for fractional + seconds with n digits. For example, *2016-10-13 + 09:15:23.456* with tickformat "%H~%M~%S.%2f" would + display *09~15~23.46*By default the values are + formatted using `xaxis.hoverformat`. + xperiod + Only relevant when the axis `type` is "date". Sets the + period positioning in milliseconds or "M" on the x + axis. Special values in the form of "M" could be + used to declare the number of months. In this case `n` + must be a positive integer. + xperiod0 + Only relevant when the axis `type` is "date". Sets the + base for period positioning in milliseconds or date + string on the x0 axis. When `x0period` is round number + of weeks, the `x0period0` by default would be on a + Sunday i.e. 2000-01-02, otherwise it would be at + 2000-01-01. + xperiodalignment + Only relevant when the axis `type` is "date". Sets the + alignment of data points on the x axis. + xsrc + Sets the source reference on Chart Studio Cloud for + `x`. + y + Sets the y coordinates. + y0 + Alternate to `y`. Builds a linear space of y + coordinates. Use with `dy` where `y0` is the starting + coordinate and `dy` the step. + yaxis + Sets a reference between this trace's y coordinates and + a 2D cartesian y axis. If "y" (the default value), the + y coordinates refer to `layout.yaxis`. If "y2", the y + coordinates refer to `layout.yaxis2`, and so on. + ycalendar + Sets the calendar system to use with `y` date data. + yhoverformat + Sets the hover text formatting rulefor `y` using d3 + formatting mini-languages which are very similar to + those in Python. For numbers, see: + https://github.com/d3/d3-format/tree/v1.4.5#d3-format. + And for dates see: https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format. We add two items to + d3's date formatter: "%h" for half of the year as a + decimal number as well as "%{n}f" for fractional + seconds with n digits. For example, *2016-10-13 + 09:15:23.456* with tickformat "%H~%M~%S.%2f" would + display *09~15~23.46*By default the values are + formatted using `yaxis.hoverformat`. + yperiod + Only relevant when the axis `type` is "date". Sets the + period positioning in milliseconds or "M" on the y + axis. Special values in the form of "M" could be + used to declare the number of months. In this case `n` + must be a positive integer. + yperiod0 + Only relevant when the axis `type` is "date". Sets the + base for period positioning in milliseconds or date + string on the y0 axis. When `y0period` is round number + of weeks, the `y0period0` by default would be on a + Sunday i.e. 2000-01-02, otherwise it would be at + 2000-01-01. + yperiodalignment + Only relevant when the axis `type` is "date". Sets the + alignment of data points on the y axis. + ysrc + Sets the source reference on Chart Studio Cloud for + `y`. + zorder + Sets the layer on which this trace is displayed, + relative to other SVG traces on the same subplot. SVG + traces with higher `zorder` appear in front of those + with lower `zorder`. + row : 'all', int or None (default) + Subplot row index (starting from 1) for the trace to be + added. Only valid if figure was created using + `plotly.tools.make_subplots`.If 'all', addresses all + rows in the specified column(s). + col : 'all', int or None (default) + Subplot col index (starting from 1) for the trace to be + added. Only valid if figure was created using + `plotly.tools.make_subplots`.If 'all', addresses all + columns in the specified row(s). + secondary_y: boolean or None (default None) + If True, associate this trace with the secondary y-axis of the + subplot at the specified row and col. Only valid if all of the + following conditions are satisfied: + * The figure was created using `plotly.subplots.make_subplots`. + * The row and col arguments are not None + * The subplot at the specified row and col has type xy + (which is the default) and secondary_y True. These + properties are specified in the specs argument to + make_subplots. See the make_subplots docstring for more info. + + Returns + ------- + FigureWidget + """ + from plotly.graph_objs import Bar + + new_trace = Bar( + alignmentgroup=alignmentgroup, + base=base, + basesrc=basesrc, + cliponaxis=cliponaxis, + constraintext=constraintext, + customdata=customdata, + customdatasrc=customdatasrc, + dx=dx, + dy=dy, + error_x=error_x, + error_y=error_y, + hoverinfo=hoverinfo, + hoverinfosrc=hoverinfosrc, + hoverlabel=hoverlabel, + hovertemplate=hovertemplate, + hovertemplatefallback=hovertemplatefallback, + hovertemplatesrc=hovertemplatesrc, + hovertext=hovertext, + hovertextsrc=hovertextsrc, + ids=ids, + idssrc=idssrc, + insidetextanchor=insidetextanchor, + insidetextfont=insidetextfont, + legend=legend, + legendgroup=legendgroup, + legendgrouptitle=legendgrouptitle, + legendrank=legendrank, + legendwidth=legendwidth, + marker=marker, + meta=meta, + metasrc=metasrc, + name=name, + offset=offset, + offsetgroup=offsetgroup, + offsetsrc=offsetsrc, + opacity=opacity, + orientation=orientation, + outsidetextfont=outsidetextfont, + selected=selected, + selectedpoints=selectedpoints, + showlegend=showlegend, + stream=stream, + text=text, + textangle=textangle, + textfont=textfont, + textposition=textposition, + textpositionsrc=textpositionsrc, + textsrc=textsrc, + texttemplate=texttemplate, + texttemplatefallback=texttemplatefallback, + texttemplatesrc=texttemplatesrc, + uid=uid, + uirevision=uirevision, + unselected=unselected, + visible=visible, + width=width, + widthsrc=widthsrc, + x=x, + x0=x0, + xaxis=xaxis, + xcalendar=xcalendar, + xhoverformat=xhoverformat, + xperiod=xperiod, + xperiod0=xperiod0, + xperiodalignment=xperiodalignment, + xsrc=xsrc, + y=y, + y0=y0, + yaxis=yaxis, + ycalendar=ycalendar, + yhoverformat=yhoverformat, + yperiod=yperiod, + yperiod0=yperiod0, + yperiodalignment=yperiodalignment, + ysrc=ysrc, + zorder=zorder, + **kwargs, + ) + return self.add_trace(new_trace, row=row, col=col, secondary_y=secondary_y) + + def add_barpolar( + self, + base=None, + basesrc=None, + customdata=None, + customdatasrc=None, + dr=None, + dtheta=None, + hoverinfo=None, + hoverinfosrc=None, + hoverlabel=None, + hovertemplate=None, + hovertemplatefallback=None, + hovertemplatesrc=None, + hovertext=None, + hovertextsrc=None, + ids=None, + idssrc=None, + legend=None, + legendgroup=None, + legendgrouptitle=None, + legendrank=None, + legendwidth=None, + marker=None, + meta=None, + metasrc=None, + name=None, + offset=None, + offsetsrc=None, + opacity=None, + r=None, + r0=None, + rsrc=None, + selected=None, + selectedpoints=None, + showlegend=None, + stream=None, + subplot=None, + text=None, + textsrc=None, + theta=None, + theta0=None, + thetasrc=None, + thetaunit=None, + uid=None, + uirevision=None, + unselected=None, + visible=None, + width=None, + widthsrc=None, + row=None, + col=None, + **kwargs, + ) -> "FigureWidget": + """ + Add a new Barpolar trace + + The data visualized by the radial span of the bars is set in + `r` + + Parameters + ---------- + base + Sets where the bar base is drawn (in radial axis + units). In "stack" barmode, traces that set "base" will + be excluded and drawn in "overlay" mode instead. + basesrc + Sets the source reference on Chart Studio Cloud for + `base`. + customdata + Assigns extra data each datum. This may be useful when + listening to hover, click and selection events. Note + that, "scatter" traces also appends customdata items in + the markers DOM elements + customdatasrc + Sets the source reference on Chart Studio Cloud for + `customdata`. + dr + Sets the r coordinate step. + dtheta + Sets the theta coordinate step. By default, the + `dtheta` step equals the subplot's period divided by + the length of the `r` coordinates. + hoverinfo + Determines which trace information appear on hover. If + `none` or `skip` are set, no information is displayed + upon hovering. But, if `none` is set, click and hover + events are still fired. + hoverinfosrc + Sets the source reference on Chart Studio Cloud for + `hoverinfo`. + hoverlabel + :class:`plotly.graph_objects.barpolar.Hoverlabel` + instance or dict with compatible properties + hovertemplate + Template string used for rendering the information that + appear on hover box. Note that this will override + `hoverinfo`. Variables are inserted using %{variable}, + for example "y: %{y}" as well as %{xother}, {%_xother}, + {%_xother_}, {%xother_}. When showing info for several + points, "xother" will be added to those with different + x positions from the first point. An underscore before + or after "(x|y)other" will add a space on that side, + only when this field is shown. Numbers are formatted + using d3-format's syntax %{variable:d3-format}, for + example "Price: %{y:$.2f}". + https://github.com/d3/d3-format/tree/v1.4.5#d3-format + for details on the formatting syntax. Dates are + formatted using d3-time-format's syntax + %{variable|d3-time-format}, for example "Day: + %{2019-01-01|%A}". https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format for details on the + date formatting syntax. Variables that can't be found + will be replaced with the specifier. For example, a + template of "data: %{x}, %{y}" will result in a value + of "data: 1, %{y}" if x is 1 and y is missing. + Variables with an undefined value will be replaced with + the fallback value. The variables available in + `hovertemplate` are the ones emitted as event data + described at this link + https://plotly.com/javascript/plotlyjs-events/#event- + data. Additionally, all attributes that can be + specified per-point (the ones that are `arrayOk: true`) + are available. Anything contained in tag `` is + displayed in the secondary box, for example + `%{fullData.name}`. To hide the + secondary box completely, use an empty tag + ``. + hovertemplatefallback + Fallback string that's displayed when a variable + referenced in a template is missing. If the boolean + value 'false' is passed in, the specifier with the + missing variable will be displayed. + hovertemplatesrc + Sets the source reference on Chart Studio Cloud for + `hovertemplate`. + hovertext + Same as `text`. + hovertextsrc + Sets the source reference on Chart Studio Cloud for + `hovertext`. + ids + Assigns id labels to each datum. These ids for object + constancy of data points during animation. Should be an + array of strings, not numbers or any other type. + idssrc + Sets the source reference on Chart Studio Cloud for + `ids`. + legend + Sets the reference to a legend to show this trace in. + References to these legends are "legend", "legend2", + "legend3", etc. Settings for these legends are set in + the layout, under `layout.legend`, `layout.legend2`, + etc. + legendgroup + Sets the legend group for this trace. Traces and shapes + part of the same legend group hide/show at the same + time when toggling legend items. + legendgrouptitle + :class:`plotly.graph_objects.barpolar.Legendgrouptitle` + instance or dict with compatible properties + legendrank + Sets the legend rank for this trace. Items and groups + with smaller ranks are presented on top/left side while + with "reversed" `legend.traceorder` they are on + bottom/right side. The default legendrank is 1000, so + that you can use ranks less than 1000 to place certain + items before all unranked items, and ranks greater than + 1000 to go after all unranked items. When having + unranked or equal rank items shapes would be displayed + after traces i.e. according to their order in data and + layout. + legendwidth + Sets the width (in px or fraction) of the legend for + this trace. + marker + :class:`plotly.graph_objects.barpolar.Marker` instance + or dict with compatible properties + meta + Assigns extra meta information associated with this + trace that can be used in various text attributes. + Attributes such as trace `name`, graph, axis and + colorbar `title.text`, annotation `text` + `rangeselector`, `updatemenues` and `sliders` `label` + text all support `meta`. To access the trace `meta` + values in an attribute in the same trace, simply use + `%{meta[i]}` where `i` is the index or key of the + `meta` item in question. To access trace `meta` in + layout attributes, use `%{data[n[.meta[i]}` where `i` + is the index or key of the `meta` and `n` is the trace + index. + metasrc + Sets the source reference on Chart Studio Cloud for + `meta`. + name + Sets the trace name. The trace name appears as the + legend item and on hover. + offset + Shifts the angular position where the bar is drawn (in + "thetatunit" units). + offsetsrc + Sets the source reference on Chart Studio Cloud for + `offset`. + opacity + Sets the opacity of the trace. + r + Sets the radial coordinates + r0 + Alternate to `r`. Builds a linear space of r + coordinates. Use with `dr` where `r0` is the starting + coordinate and `dr` the step. + rsrc + Sets the source reference on Chart Studio Cloud for + `r`. + selected + :class:`plotly.graph_objects.barpolar.Selected` + instance or dict with compatible properties + selectedpoints + Array containing integer indices of selected points. + Has an effect only for traces that support selections. + Note that an empty array means an empty selection where + the `unselected` are turned on for all points, whereas, + any other non-array values means no selection all where + the `selected` and `unselected` styles have no effect. + showlegend + Determines whether or not an item corresponding to this + trace is shown in the legend. + stream + :class:`plotly.graph_objects.barpolar.Stream` instance + or dict with compatible properties + subplot + Sets a reference between this trace's data coordinates + and a polar subplot. If "polar" (the default value), + the data refer to `layout.polar`. If "polar2", the data + refer to `layout.polar2`, and so on. + text + Sets hover text elements associated with each bar. If a + single string, the same string appears over all bars. + If an array of string, the items are mapped in order to + the this trace's coordinates. + textsrc + Sets the source reference on Chart Studio Cloud for + `text`. + theta + Sets the angular coordinates + theta0 + Alternate to `theta`. Builds a linear space of theta + coordinates. Use with `dtheta` where `theta0` is the + starting coordinate and `dtheta` the step. + thetasrc + Sets the source reference on Chart Studio Cloud for + `theta`. + thetaunit + Sets the unit of input "theta" values. Has an effect + only when on "linear" angular axes. + uid + Assign an id to this trace, Use this to provide object + constancy between traces during animations and + transitions. + uirevision + Controls persistence of some user-driven changes to the + trace: `constraintrange` in `parcoords` traces, as well + as some `editable: true` modifications such as `name` + and `colorbar.title`. Defaults to `layout.uirevision`. + Note that other user-driven trace attribute changes are + controlled by `layout` attributes: `trace.visible` is + controlled by `layout.legend.uirevision`, + `selectedpoints` is controlled by + `layout.selectionrevision`, and `colorbar.(x|y)` + (accessible with `config: {editable: true}`) is + controlled by `layout.editrevision`. Trace changes are + tracked by `uid`, which only falls back on trace index + if no `uid` is provided. So if your app can add/remove + traces before the end of the `data` array, such that + the same trace has a different index, you can still + preserve user-driven changes if you give each trace a + `uid` that stays with it as it moves. + unselected + :class:`plotly.graph_objects.barpolar.Unselected` + instance or dict with compatible properties + visible + Determines whether or not this trace is visible. If + "legendonly", the trace is not drawn, but can appear as + a legend item (provided that the legend itself is + visible). + width + Sets the bar angular width (in "thetaunit" units). + widthsrc + Sets the source reference on Chart Studio Cloud for + `width`. + row : 'all', int or None (default) + Subplot row index (starting from 1) for the trace to be + added. Only valid if figure was created using + `plotly.tools.make_subplots`.If 'all', addresses all + rows in the specified column(s). + col : 'all', int or None (default) + Subplot col index (starting from 1) for the trace to be + added. Only valid if figure was created using + `plotly.tools.make_subplots`.If 'all', addresses all + columns in the specified row(s). + + Returns + ------- + FigureWidget + """ + from plotly.graph_objs import Barpolar + + new_trace = Barpolar( + base=base, + basesrc=basesrc, + customdata=customdata, + customdatasrc=customdatasrc, + dr=dr, + dtheta=dtheta, + hoverinfo=hoverinfo, + hoverinfosrc=hoverinfosrc, + hoverlabel=hoverlabel, + hovertemplate=hovertemplate, + hovertemplatefallback=hovertemplatefallback, + hovertemplatesrc=hovertemplatesrc, + hovertext=hovertext, + hovertextsrc=hovertextsrc, + ids=ids, + idssrc=idssrc, + legend=legend, + legendgroup=legendgroup, + legendgrouptitle=legendgrouptitle, + legendrank=legendrank, + legendwidth=legendwidth, + marker=marker, + meta=meta, + metasrc=metasrc, + name=name, + offset=offset, + offsetsrc=offsetsrc, + opacity=opacity, + r=r, + r0=r0, + rsrc=rsrc, + selected=selected, + selectedpoints=selectedpoints, + showlegend=showlegend, + stream=stream, + subplot=subplot, + text=text, + textsrc=textsrc, + theta=theta, + theta0=theta0, + thetasrc=thetasrc, + thetaunit=thetaunit, + uid=uid, + uirevision=uirevision, + unselected=unselected, + visible=visible, + width=width, + widthsrc=widthsrc, + **kwargs, + ) + return self.add_trace(new_trace, row=row, col=col) + + def add_box( + self, + alignmentgroup=None, + boxmean=None, + boxpoints=None, + customdata=None, + customdatasrc=None, + dx=None, + dy=None, + fillcolor=None, + hoverinfo=None, + hoverinfosrc=None, + hoverlabel=None, + hoveron=None, + hovertemplate=None, + hovertemplatefallback=None, + hovertemplatesrc=None, + hovertext=None, + hovertextsrc=None, + ids=None, + idssrc=None, + jitter=None, + legend=None, + legendgroup=None, + legendgrouptitle=None, + legendrank=None, + legendwidth=None, + line=None, + lowerfence=None, + lowerfencesrc=None, + marker=None, + mean=None, + meansrc=None, + median=None, + mediansrc=None, + meta=None, + metasrc=None, + name=None, + notched=None, + notchspan=None, + notchspansrc=None, + notchwidth=None, + offsetgroup=None, + opacity=None, + orientation=None, + pointpos=None, + q1=None, + q1src=None, + q3=None, + q3src=None, + quartilemethod=None, + sd=None, + sdmultiple=None, + sdsrc=None, + selected=None, + selectedpoints=None, + showlegend=None, + showwhiskers=None, + sizemode=None, + stream=None, + text=None, + textsrc=None, + uid=None, + uirevision=None, + unselected=None, + upperfence=None, + upperfencesrc=None, + visible=None, + whiskerwidth=None, + width=None, + x=None, + x0=None, + xaxis=None, + xcalendar=None, + xhoverformat=None, + xperiod=None, + xperiod0=None, + xperiodalignment=None, + xsrc=None, + y=None, + y0=None, + yaxis=None, + ycalendar=None, + yhoverformat=None, + yperiod=None, + yperiod0=None, + yperiodalignment=None, + ysrc=None, + zorder=None, + row=None, + col=None, + secondary_y=None, + **kwargs, + ) -> "FigureWidget": + """ + Add a new Box trace + + Each box spans from quartile 1 (Q1) to quartile 3 (Q3). The + second quartile (Q2, i.e. the median) is marked by a line + inside the box. The fences grow outward from the boxes' edges, + by default they span +/- 1.5 times the interquartile range + (IQR: Q3-Q1), The sample mean and standard deviation as well as + notches and the sample, outlier and suspected outliers points + can be optionally added to the box plot. The values and + positions corresponding to each boxes can be input using two + signatures. The first signature expects users to supply the + sample values in the `y` data array for vertical boxes (`x` for + horizontal boxes). By supplying an `x` (`y`) array, one box per + distinct `x` (`y`) value is drawn If no `x` (`y`) list is + provided, a single box is drawn. In this case, the box is + positioned with the trace `name` or with `x0` (`y0`) if + provided. The second signature expects users to supply the + boxes corresponding Q1, median and Q3 statistics in the `q1`, + `median` and `q3` data arrays respectively. Other box features + relying on statistics namely `lowerfence`, `upperfence`, + `notchspan` can be set directly by the users. To have plotly + compute them or to show sample points besides the boxes, users + can set the `y` data array for vertical boxes (`x` for + horizontal boxes) to a 2D array with the outer length + corresponding to the number of boxes in the traces and the + inner length corresponding the sample size. + + Parameters + ---------- + alignmentgroup + Set several traces linked to the same position axis or + matching axes to the same alignmentgroup. This controls + whether bars compute their positional range dependently + or independently. + boxmean + If True, the mean of the box(es)' underlying + distribution is drawn as a dashed line inside the + box(es). If "sd" the standard deviation is also drawn. + Defaults to True when `mean` is set. Defaults to "sd" + when `sd` is set Otherwise defaults to False. + boxpoints + If "outliers", only the sample points lying outside the + whiskers are shown If "suspectedoutliers", the outlier + points are shown and points either less than 4*Q1-3*Q3 + or greater than 4*Q3-3*Q1 are highlighted (see + `outliercolor`) If "all", all sample points are shown + If False, only the box(es) are shown with no sample + points Defaults to "suspectedoutliers" when + `marker.outliercolor` or `marker.line.outliercolor` is + set. Defaults to "all" under the q1/median/q3 + signature. Otherwise defaults to "outliers". + customdata + Assigns extra data each datum. This may be useful when + listening to hover, click and selection events. Note + that, "scatter" traces also appends customdata items in + the markers DOM elements + customdatasrc + Sets the source reference on Chart Studio Cloud for + `customdata`. + dx + Sets the x coordinate step for multi-box traces set + using q1/median/q3. + dy + Sets the y coordinate step for multi-box traces set + using q1/median/q3. + fillcolor + Sets the fill color. Defaults to a half-transparent + variant of the line color, marker color, or marker line + color, whichever is available. + hoverinfo + Determines which trace information appear on hover. If + `none` or `skip` are set, no information is displayed + upon hovering. But, if `none` is set, click and hover + events are still fired. + hoverinfosrc + Sets the source reference on Chart Studio Cloud for + `hoverinfo`. + hoverlabel + :class:`plotly.graph_objects.box.Hoverlabel` instance + or dict with compatible properties + hoveron + Do the hover effects highlight individual boxes or + sample points or both? + hovertemplate + Template string used for rendering the information that + appear on hover box. Note that this will override + `hoverinfo`. Variables are inserted using %{variable}, + for example "y: %{y}" as well as %{xother}, {%_xother}, + {%_xother_}, {%xother_}. When showing info for several + points, "xother" will be added to those with different + x positions from the first point. An underscore before + or after "(x|y)other" will add a space on that side, + only when this field is shown. Numbers are formatted + using d3-format's syntax %{variable:d3-format}, for + example "Price: %{y:$.2f}". + https://github.com/d3/d3-format/tree/v1.4.5#d3-format + for details on the formatting syntax. Dates are + formatted using d3-time-format's syntax + %{variable|d3-time-format}, for example "Day: + %{2019-01-01|%A}". https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format for details on the + date formatting syntax. Variables that can't be found + will be replaced with the specifier. For example, a + template of "data: %{x}, %{y}" will result in a value + of "data: 1, %{y}" if x is 1 and y is missing. + Variables with an undefined value will be replaced with + the fallback value. The variables available in + `hovertemplate` are the ones emitted as event data + described at this link + https://plotly.com/javascript/plotlyjs-events/#event- + data. Additionally, all attributes that can be + specified per-point (the ones that are `arrayOk: true`) + are available. Anything contained in tag `` is + displayed in the secondary box, for example + `%{fullData.name}`. To hide the + secondary box completely, use an empty tag + ``. + hovertemplatefallback + Fallback string that's displayed when a variable + referenced in a template is missing. If the boolean + value 'false' is passed in, the specifier with the + missing variable will be displayed. + hovertemplatesrc + Sets the source reference on Chart Studio Cloud for + `hovertemplate`. + hovertext + Same as `text`. + hovertextsrc + Sets the source reference on Chart Studio Cloud for + `hovertext`. + ids + Assigns id labels to each datum. These ids for object + constancy of data points during animation. Should be an + array of strings, not numbers or any other type. + idssrc + Sets the source reference on Chart Studio Cloud for + `ids`. + jitter + Sets the amount of jitter in the sample points drawn. + If 0, the sample points align along the distribution + axis. If 1, the sample points are drawn in a random + jitter of width equal to the width of the box(es). + legend + Sets the reference to a legend to show this trace in. + References to these legends are "legend", "legend2", + "legend3", etc. Settings for these legends are set in + the layout, under `layout.legend`, `layout.legend2`, + etc. + legendgroup + Sets the legend group for this trace. Traces and shapes + part of the same legend group hide/show at the same + time when toggling legend items. + legendgrouptitle + :class:`plotly.graph_objects.box.Legendgrouptitle` + instance or dict with compatible properties + legendrank + Sets the legend rank for this trace. Items and groups + with smaller ranks are presented on top/left side while + with "reversed" `legend.traceorder` they are on + bottom/right side. The default legendrank is 1000, so + that you can use ranks less than 1000 to place certain + items before all unranked items, and ranks greater than + 1000 to go after all unranked items. When having + unranked or equal rank items shapes would be displayed + after traces i.e. according to their order in data and + layout. + legendwidth + Sets the width (in px or fraction) of the legend for + this trace. + line + :class:`plotly.graph_objects.box.Line` instance or dict + with compatible properties + lowerfence + Sets the lower fence values. There should be as many + items as the number of boxes desired. This attribute + has effect only under the q1/median/q3 signature. If + `lowerfence` is not provided but a sample (in `y` or + `x`) is set, we compute the lower as the last sample + point below 1.5 times the IQR. + lowerfencesrc + Sets the source reference on Chart Studio Cloud for + `lowerfence`. + marker + :class:`plotly.graph_objects.box.Marker` instance or + dict with compatible properties + mean + Sets the mean values. There should be as many items as + the number of boxes desired. This attribute has effect + only under the q1/median/q3 signature. If `mean` is not + provided but a sample (in `y` or `x`) is set, we + compute the mean for each box using the sample values. + meansrc + Sets the source reference on Chart Studio Cloud for + `mean`. + median + Sets the median values. There should be as many items + as the number of boxes desired. + mediansrc + Sets the source reference on Chart Studio Cloud for + `median`. + meta + Assigns extra meta information associated with this + trace that can be used in various text attributes. + Attributes such as trace `name`, graph, axis and + colorbar `title.text`, annotation `text` + `rangeselector`, `updatemenues` and `sliders` `label` + text all support `meta`. To access the trace `meta` + values in an attribute in the same trace, simply use + `%{meta[i]}` where `i` is the index or key of the + `meta` item in question. To access trace `meta` in + layout attributes, use `%{data[n[.meta[i]}` where `i` + is the index or key of the `meta` and `n` is the trace + index. + metasrc + Sets the source reference on Chart Studio Cloud for + `meta`. + name + Sets the trace name. The trace name appears as the + legend item and on hover. For box traces, the name will + also be used for the position coordinate, if `x` and + `x0` (`y` and `y0` if horizontal) are missing and the + position axis is categorical + notched + Determines whether or not notches are drawn. Notches + displays a confidence interval around the median. We + compute the confidence interval as median +/- 1.57 * + IQR / sqrt(N), where IQR is the interquartile range and + N is the sample size. If two boxes' notches do not + overlap there is 95% confidence their medians differ. + See https://sites.google.com/site/davidsstatistics/home + /notched-box-plots for more info. Defaults to False + unless `notchwidth` or `notchspan` is set. + notchspan + Sets the notch span from the boxes' `median` values. + There should be as many items as the number of boxes + desired. This attribute has effect only under the + q1/median/q3 signature. If `notchspan` is not provided + but a sample (in `y` or `x`) is set, we compute it as + 1.57 * IQR / sqrt(N), where N is the sample size. + notchspansrc + Sets the source reference on Chart Studio Cloud for + `notchspan`. + notchwidth + Sets the width of the notches relative to the box + width. For example, with 0, the notches are as wide as + the box(es). + offsetgroup + Set several traces linked to the same position axis or + matching axes to the same offsetgroup where bars of the + same position coordinate will line up. + opacity + Sets the opacity of the trace. + orientation + Sets the orientation of the box(es). If "v" ("h"), the + distribution is visualized along the vertical + (horizontal). + pointpos + Sets the position of the sample points in relation to + the box(es). If 0, the sample points are places over + the center of the box(es). Positive (negative) values + correspond to positions to the right (left) for + vertical boxes and above (below) for horizontal boxes + q1 + Sets the Quartile 1 values. There should be as many + items as the number of boxes desired. + q1src + Sets the source reference on Chart Studio Cloud for + `q1`. + q3 + Sets the Quartile 3 values. There should be as many + items as the number of boxes desired. + q3src + Sets the source reference on Chart Studio Cloud for + `q3`. + quartilemethod + Sets the method used to compute the sample's Q1 and Q3 + quartiles. The "linear" method uses the 25th percentile + for Q1 and 75th percentile for Q3 as computed using + method #10 (listed on + http://jse.amstat.org/v14n3/langford.html). The + "exclusive" method uses the median to divide the + ordered dataset into two halves if the sample is odd, + it does not include the median in either half - Q1 is + then the median of the lower half and Q3 the median of + the upper half. The "inclusive" method also uses the + median to divide the ordered dataset into two halves + but if the sample is odd, it includes the median in + both halves - Q1 is then the median of the lower half + and Q3 the median of the upper half. + sd + Sets the standard deviation values. There should be as + many items as the number of boxes desired. This + attribute has effect only under the q1/median/q3 + signature. If `sd` is not provided but a sample (in `y` + or `x`) is set, we compute the standard deviation for + each box using the sample values. + sdmultiple + Scales the box size when sizemode=sd Allowing boxes to + be drawn across any stddev range For example 1-stddev, + 3-stddev, 5-stddev + sdsrc + Sets the source reference on Chart Studio Cloud for + `sd`. + selected + :class:`plotly.graph_objects.box.Selected` instance or + dict with compatible properties + selectedpoints + Array containing integer indices of selected points. + Has an effect only for traces that support selections. + Note that an empty array means an empty selection where + the `unselected` are turned on for all points, whereas, + any other non-array values means no selection all where + the `selected` and `unselected` styles have no effect. + showlegend + Determines whether or not an item corresponding to this + trace is shown in the legend. + showwhiskers + Determines whether or not whiskers are visible. + Defaults to true for `sizemode` "quartiles", false for + "sd". + sizemode + Sets the upper and lower bound for the boxes quartiles + means box is drawn between Q1 and Q3 SD means the box + is drawn between Mean +- Standard Deviation Argument + sdmultiple (default 1) to scale the box size So it + could be drawn 1-stddev, 3-stddev etc + stream + :class:`plotly.graph_objects.box.Stream` instance or + dict with compatible properties + text + Sets the text elements associated with each sample + value. If a single string, the same string appears over + all the data points. If an array of string, the items + are mapped in order to the this trace's (x,y) + coordinates. To be seen, trace `hoverinfo` must contain + a "text" flag. + textsrc + Sets the source reference on Chart Studio Cloud for + `text`. + uid + Assign an id to this trace, Use this to provide object + constancy between traces during animations and + transitions. + uirevision + Controls persistence of some user-driven changes to the + trace: `constraintrange` in `parcoords` traces, as well + as some `editable: true` modifications such as `name` + and `colorbar.title`. Defaults to `layout.uirevision`. + Note that other user-driven trace attribute changes are + controlled by `layout` attributes: `trace.visible` is + controlled by `layout.legend.uirevision`, + `selectedpoints` is controlled by + `layout.selectionrevision`, and `colorbar.(x|y)` + (accessible with `config: {editable: true}`) is + controlled by `layout.editrevision`. Trace changes are + tracked by `uid`, which only falls back on trace index + if no `uid` is provided. So if your app can add/remove + traces before the end of the `data` array, such that + the same trace has a different index, you can still + preserve user-driven changes if you give each trace a + `uid` that stays with it as it moves. + unselected + :class:`plotly.graph_objects.box.Unselected` instance + or dict with compatible properties + upperfence + Sets the upper fence values. There should be as many + items as the number of boxes desired. This attribute + has effect only under the q1/median/q3 signature. If + `upperfence` is not provided but a sample (in `y` or + `x`) is set, we compute the upper as the last sample + point above 1.5 times the IQR. + upperfencesrc + Sets the source reference on Chart Studio Cloud for + `upperfence`. + visible + Determines whether or not this trace is visible. If + "legendonly", the trace is not drawn, but can appear as + a legend item (provided that the legend itself is + visible). + whiskerwidth + Sets the width of the whiskers relative to the box + width. For example, with 1, the whiskers are as wide as + the box(es). + width + Sets the width of the box in data coordinate If 0 + (default value) the width is automatically selected + based on the positions of other box traces in the same + subplot. + x + Sets the x sample data or coordinates. See overview for + more info. + x0 + Sets the x coordinate for single-box traces or the + starting coordinate for multi-box traces set using + q1/median/q3. See overview for more info. + xaxis + Sets a reference between this trace's x coordinates and + a 2D cartesian x axis. If "x" (the default value), the + x coordinates refer to `layout.xaxis`. If "x2", the x + coordinates refer to `layout.xaxis2`, and so on. + xcalendar + Sets the calendar system to use with `x` date data. + xhoverformat + Sets the hover text formatting rulefor `x` using d3 + formatting mini-languages which are very similar to + those in Python. For numbers, see: + https://github.com/d3/d3-format/tree/v1.4.5#d3-format. + And for dates see: https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format. We add two items to + d3's date formatter: "%h" for half of the year as a + decimal number as well as "%{n}f" for fractional + seconds with n digits. For example, *2016-10-13 + 09:15:23.456* with tickformat "%H~%M~%S.%2f" would + display *09~15~23.46*By default the values are + formatted using `xaxis.hoverformat`. + xperiod + Only relevant when the axis `type` is "date". Sets the + period positioning in milliseconds or "M" on the x + axis. Special values in the form of "M" could be + used to declare the number of months. In this case `n` + must be a positive integer. + xperiod0 + Only relevant when the axis `type` is "date". Sets the + base for period positioning in milliseconds or date + string on the x0 axis. When `x0period` is round number + of weeks, the `x0period0` by default would be on a + Sunday i.e. 2000-01-02, otherwise it would be at + 2000-01-01. + xperiodalignment + Only relevant when the axis `type` is "date". Sets the + alignment of data points on the x axis. + xsrc + Sets the source reference on Chart Studio Cloud for + `x`. + y + Sets the y sample data or coordinates. See overview for + more info. + y0 + Sets the y coordinate for single-box traces or the + starting coordinate for multi-box traces set using + q1/median/q3. See overview for more info. + yaxis + Sets a reference between this trace's y coordinates and + a 2D cartesian y axis. If "y" (the default value), the + y coordinates refer to `layout.yaxis`. If "y2", the y + coordinates refer to `layout.yaxis2`, and so on. + ycalendar + Sets the calendar system to use with `y` date data. + yhoverformat + Sets the hover text formatting rulefor `y` using d3 + formatting mini-languages which are very similar to + those in Python. For numbers, see: + https://github.com/d3/d3-format/tree/v1.4.5#d3-format. + And for dates see: https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format. We add two items to + d3's date formatter: "%h" for half of the year as a + decimal number as well as "%{n}f" for fractional + seconds with n digits. For example, *2016-10-13 + 09:15:23.456* with tickformat "%H~%M~%S.%2f" would + display *09~15~23.46*By default the values are + formatted using `yaxis.hoverformat`. + yperiod + Only relevant when the axis `type` is "date". Sets the + period positioning in milliseconds or "M" on the y + axis. Special values in the form of "M" could be + used to declare the number of months. In this case `n` + must be a positive integer. + yperiod0 + Only relevant when the axis `type` is "date". Sets the + base for period positioning in milliseconds or date + string on the y0 axis. When `y0period` is round number + of weeks, the `y0period0` by default would be on a + Sunday i.e. 2000-01-02, otherwise it would be at + 2000-01-01. + yperiodalignment + Only relevant when the axis `type` is "date". Sets the + alignment of data points on the y axis. + ysrc + Sets the source reference on Chart Studio Cloud for + `y`. + zorder + Sets the layer on which this trace is displayed, + relative to other SVG traces on the same subplot. SVG + traces with higher `zorder` appear in front of those + with lower `zorder`. + row : 'all', int or None (default) + Subplot row index (starting from 1) for the trace to be + added. Only valid if figure was created using + `plotly.tools.make_subplots`.If 'all', addresses all + rows in the specified column(s). + col : 'all', int or None (default) + Subplot col index (starting from 1) for the trace to be + added. Only valid if figure was created using + `plotly.tools.make_subplots`.If 'all', addresses all + columns in the specified row(s). + secondary_y: boolean or None (default None) + If True, associate this trace with the secondary y-axis of the + subplot at the specified row and col. Only valid if all of the + following conditions are satisfied: + * The figure was created using `plotly.subplots.make_subplots`. + * The row and col arguments are not None + * The subplot at the specified row and col has type xy + (which is the default) and secondary_y True. These + properties are specified in the specs argument to + make_subplots. See the make_subplots docstring for more info. + + Returns + ------- + FigureWidget + """ + from plotly.graph_objs import Box + + new_trace = Box( + alignmentgroup=alignmentgroup, + boxmean=boxmean, + boxpoints=boxpoints, + customdata=customdata, + customdatasrc=customdatasrc, + dx=dx, + dy=dy, + fillcolor=fillcolor, + hoverinfo=hoverinfo, + hoverinfosrc=hoverinfosrc, + hoverlabel=hoverlabel, + hoveron=hoveron, + hovertemplate=hovertemplate, + hovertemplatefallback=hovertemplatefallback, + hovertemplatesrc=hovertemplatesrc, + hovertext=hovertext, + hovertextsrc=hovertextsrc, + ids=ids, + idssrc=idssrc, + jitter=jitter, + legend=legend, + legendgroup=legendgroup, + legendgrouptitle=legendgrouptitle, + legendrank=legendrank, + legendwidth=legendwidth, + line=line, + lowerfence=lowerfence, + lowerfencesrc=lowerfencesrc, + marker=marker, + mean=mean, + meansrc=meansrc, + median=median, + mediansrc=mediansrc, + meta=meta, + metasrc=metasrc, + name=name, + notched=notched, + notchspan=notchspan, + notchspansrc=notchspansrc, + notchwidth=notchwidth, + offsetgroup=offsetgroup, + opacity=opacity, + orientation=orientation, + pointpos=pointpos, + q1=q1, + q1src=q1src, + q3=q3, + q3src=q3src, + quartilemethod=quartilemethod, + sd=sd, + sdmultiple=sdmultiple, + sdsrc=sdsrc, + selected=selected, + selectedpoints=selectedpoints, + showlegend=showlegend, + showwhiskers=showwhiskers, + sizemode=sizemode, + stream=stream, + text=text, + textsrc=textsrc, + uid=uid, + uirevision=uirevision, + unselected=unselected, + upperfence=upperfence, + upperfencesrc=upperfencesrc, + visible=visible, + whiskerwidth=whiskerwidth, + width=width, + x=x, + x0=x0, + xaxis=xaxis, + xcalendar=xcalendar, + xhoverformat=xhoverformat, + xperiod=xperiod, + xperiod0=xperiod0, + xperiodalignment=xperiodalignment, + xsrc=xsrc, + y=y, + y0=y0, + yaxis=yaxis, + ycalendar=ycalendar, + yhoverformat=yhoverformat, + yperiod=yperiod, + yperiod0=yperiod0, + yperiodalignment=yperiodalignment, + ysrc=ysrc, + zorder=zorder, + **kwargs, + ) + return self.add_trace(new_trace, row=row, col=col, secondary_y=secondary_y) + + def add_candlestick( + self, + close=None, + closesrc=None, + customdata=None, + customdatasrc=None, + decreasing=None, + high=None, + highsrc=None, + hoverinfo=None, + hoverinfosrc=None, + hoverlabel=None, + hovertemplate=None, + hovertemplatefallback=None, + hovertemplatesrc=None, + hovertext=None, + hovertextsrc=None, + ids=None, + idssrc=None, + increasing=None, + legend=None, + legendgroup=None, + legendgrouptitle=None, + legendrank=None, + legendwidth=None, + line=None, + low=None, + lowsrc=None, + meta=None, + metasrc=None, + name=None, + opacity=None, + open=None, + opensrc=None, + selectedpoints=None, + showlegend=None, + stream=None, + text=None, + textsrc=None, + uid=None, + uirevision=None, + visible=None, + whiskerwidth=None, + x=None, + xaxis=None, + xcalendar=None, + xhoverformat=None, + xperiod=None, + xperiod0=None, + xperiodalignment=None, + xsrc=None, + yaxis=None, + yhoverformat=None, + zorder=None, + row=None, + col=None, + secondary_y=None, + **kwargs, + ) -> "FigureWidget": + """ + Add a new Candlestick trace + + The candlestick is a style of financial chart describing open, + high, low and close for a given `x` coordinate (most likely + time). The boxes represent the spread between the `open` and + `close` values and the lines represent the spread between the + `low` and `high` values Sample points where the close value is + higher (lower) then the open value are called increasing + (decreasing). By default, increasing candles are drawn in green + whereas decreasing are drawn in red. + + Parameters + ---------- + close + Sets the close values. + closesrc + Sets the source reference on Chart Studio Cloud for + `close`. + customdata + Assigns extra data each datum. This may be useful when + listening to hover, click and selection events. Note + that, "scatter" traces also appends customdata items in + the markers DOM elements + customdatasrc + Sets the source reference on Chart Studio Cloud for + `customdata`. + decreasing + :class:`plotly.graph_objects.candlestick.Decreasing` + instance or dict with compatible properties + high + Sets the high values. + highsrc + Sets the source reference on Chart Studio Cloud for + `high`. + hoverinfo + Determines which trace information appear on hover. If + `none` or `skip` are set, no information is displayed + upon hovering. But, if `none` is set, click and hover + events are still fired. + hoverinfosrc + Sets the source reference on Chart Studio Cloud for + `hoverinfo`. + hoverlabel + :class:`plotly.graph_objects.candlestick.Hoverlabel` + instance or dict with compatible properties + hovertemplate + Template string used for rendering the information that + appear on hover box. Note that this will override + `hoverinfo`. Variables are inserted using %{variable}, + for example "y: %{y}" as well as %{xother}, {%_xother}, + {%_xother_}, {%xother_}. When showing info for several + points, "xother" will be added to those with different + x positions from the first point. An underscore before + or after "(x|y)other" will add a space on that side, + only when this field is shown. Numbers are formatted + using d3-format's syntax %{variable:d3-format}, for + example "Price: %{y:$.2f}". + https://github.com/d3/d3-format/tree/v1.4.5#d3-format + for details on the formatting syntax. Dates are + formatted using d3-time-format's syntax + %{variable|d3-time-format}, for example "Day: + %{2019-01-01|%A}". https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format for details on the + date formatting syntax. Variables that can't be found + will be replaced with the specifier. For example, a + template of "data: %{x}, %{y}" will result in a value + of "data: 1, %{y}" if x is 1 and y is missing. + Variables with an undefined value will be replaced with + the fallback value. The variables available in + `hovertemplate` are the ones emitted as event data + described at this link + https://plotly.com/javascript/plotlyjs-events/#event- + data. Additionally, all attributes that can be + specified per-point (the ones that are `arrayOk: true`) + are available. Finally, the template string has access + to variables `open`, `high`, `low` and `close`. + Anything contained in tag `` is displayed in the + secondary box, for example + `%{fullData.name}`. To hide the + secondary box completely, use an empty tag + ``. + hovertemplatefallback + Fallback string that's displayed when a variable + referenced in a template is missing. If the boolean + value 'false' is passed in, the specifier with the + missing variable will be displayed. + hovertemplatesrc + Sets the source reference on Chart Studio Cloud for + `hovertemplate`. + hovertext + Same as `text`. + hovertextsrc + Sets the source reference on Chart Studio Cloud for + `hovertext`. + ids + Assigns id labels to each datum. These ids for object + constancy of data points during animation. Should be an + array of strings, not numbers or any other type. + idssrc + Sets the source reference on Chart Studio Cloud for + `ids`. + increasing + :class:`plotly.graph_objects.candlestick.Increasing` + instance or dict with compatible properties + legend + Sets the reference to a legend to show this trace in. + References to these legends are "legend", "legend2", + "legend3", etc. Settings for these legends are set in + the layout, under `layout.legend`, `layout.legend2`, + etc. + legendgroup + Sets the legend group for this trace. Traces and shapes + part of the same legend group hide/show at the same + time when toggling legend items. + legendgrouptitle + :class:`plotly.graph_objects.candlestick.Legendgrouptit + le` instance or dict with compatible properties + legendrank + Sets the legend rank for this trace. Items and groups + with smaller ranks are presented on top/left side while + with "reversed" `legend.traceorder` they are on + bottom/right side. The default legendrank is 1000, so + that you can use ranks less than 1000 to place certain + items before all unranked items, and ranks greater than + 1000 to go after all unranked items. When having + unranked or equal rank items shapes would be displayed + after traces i.e. according to their order in data and + layout. + legendwidth + Sets the width (in px or fraction) of the legend for + this trace. + line + :class:`plotly.graph_objects.candlestick.Line` instance + or dict with compatible properties + low + Sets the low values. + lowsrc + Sets the source reference on Chart Studio Cloud for + `low`. + meta + Assigns extra meta information associated with this + trace that can be used in various text attributes. + Attributes such as trace `name`, graph, axis and + colorbar `title.text`, annotation `text` + `rangeselector`, `updatemenues` and `sliders` `label` + text all support `meta`. To access the trace `meta` + values in an attribute in the same trace, simply use + `%{meta[i]}` where `i` is the index or key of the + `meta` item in question. To access trace `meta` in + layout attributes, use `%{data[n[.meta[i]}` where `i` + is the index or key of the `meta` and `n` is the trace + index. + metasrc + Sets the source reference on Chart Studio Cloud for + `meta`. + name + Sets the trace name. The trace name appears as the + legend item and on hover. + opacity + Sets the opacity of the trace. + open + Sets the open values. + opensrc + Sets the source reference on Chart Studio Cloud for + `open`. + selectedpoints + Array containing integer indices of selected points. + Has an effect only for traces that support selections. + Note that an empty array means an empty selection where + the `unselected` are turned on for all points, whereas, + any other non-array values means no selection all where + the `selected` and `unselected` styles have no effect. + showlegend + Determines whether or not an item corresponding to this + trace is shown in the legend. + stream + :class:`plotly.graph_objects.candlestick.Stream` + instance or dict with compatible properties + text + Sets hover text elements associated with each sample + point. If a single string, the same string appears over + all the data points. If an array of string, the items + are mapped in order to this trace's sample points. + textsrc + Sets the source reference on Chart Studio Cloud for + `text`. + uid + Assign an id to this trace, Use this to provide object + constancy between traces during animations and + transitions. + uirevision + Controls persistence of some user-driven changes to the + trace: `constraintrange` in `parcoords` traces, as well + as some `editable: true` modifications such as `name` + and `colorbar.title`. Defaults to `layout.uirevision`. + Note that other user-driven trace attribute changes are + controlled by `layout` attributes: `trace.visible` is + controlled by `layout.legend.uirevision`, + `selectedpoints` is controlled by + `layout.selectionrevision`, and `colorbar.(x|y)` + (accessible with `config: {editable: true}`) is + controlled by `layout.editrevision`. Trace changes are + tracked by `uid`, which only falls back on trace index + if no `uid` is provided. So if your app can add/remove + traces before the end of the `data` array, such that + the same trace has a different index, you can still + preserve user-driven changes if you give each trace a + `uid` that stays with it as it moves. + visible + Determines whether or not this trace is visible. If + "legendonly", the trace is not drawn, but can appear as + a legend item (provided that the legend itself is + visible). + whiskerwidth + Sets the width of the whiskers relative to the box + width. For example, with 1, the whiskers are as wide as + the box(es). + x + Sets the x coordinates. If absent, linear coordinate + will be generated. + xaxis + Sets a reference between this trace's x coordinates and + a 2D cartesian x axis. If "x" (the default value), the + x coordinates refer to `layout.xaxis`. If "x2", the x + coordinates refer to `layout.xaxis2`, and so on. + xcalendar + Sets the calendar system to use with `x` date data. + xhoverformat + Sets the hover text formatting rulefor `x` using d3 + formatting mini-languages which are very similar to + those in Python. For numbers, see: + https://github.com/d3/d3-format/tree/v1.4.5#d3-format. + And for dates see: https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format. We add two items to + d3's date formatter: "%h" for half of the year as a + decimal number as well as "%{n}f" for fractional + seconds with n digits. For example, *2016-10-13 + 09:15:23.456* with tickformat "%H~%M~%S.%2f" would + display *09~15~23.46*By default the values are + formatted using `xaxis.hoverformat`. + xperiod + Only relevant when the axis `type` is "date". Sets the + period positioning in milliseconds or "M" on the x + axis. Special values in the form of "M" could be + used to declare the number of months. In this case `n` + must be a positive integer. + xperiod0 + Only relevant when the axis `type` is "date". Sets the + base for period positioning in milliseconds or date + string on the x0 axis. When `x0period` is round number + of weeks, the `x0period0` by default would be on a + Sunday i.e. 2000-01-02, otherwise it would be at + 2000-01-01. + xperiodalignment + Only relevant when the axis `type` is "date". Sets the + alignment of data points on the x axis. + xsrc + Sets the source reference on Chart Studio Cloud for + `x`. + yaxis + Sets a reference between this trace's y coordinates and + a 2D cartesian y axis. If "y" (the default value), the + y coordinates refer to `layout.yaxis`. If "y2", the y + coordinates refer to `layout.yaxis2`, and so on. + yhoverformat + Sets the hover text formatting rulefor `y` using d3 + formatting mini-languages which are very similar to + those in Python. For numbers, see: + https://github.com/d3/d3-format/tree/v1.4.5#d3-format. + And for dates see: https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format. We add two items to + d3's date formatter: "%h" for half of the year as a + decimal number as well as "%{n}f" for fractional + seconds with n digits. For example, *2016-10-13 + 09:15:23.456* with tickformat "%H~%M~%S.%2f" would + display *09~15~23.46*By default the values are + formatted using `yaxis.hoverformat`. + zorder + Sets the layer on which this trace is displayed, + relative to other SVG traces on the same subplot. SVG + traces with higher `zorder` appear in front of those + with lower `zorder`. + row : 'all', int or None (default) + Subplot row index (starting from 1) for the trace to be + added. Only valid if figure was created using + `plotly.tools.make_subplots`.If 'all', addresses all + rows in the specified column(s). + col : 'all', int or None (default) + Subplot col index (starting from 1) for the trace to be + added. Only valid if figure was created using + `plotly.tools.make_subplots`.If 'all', addresses all + columns in the specified row(s). + secondary_y: boolean or None (default None) + If True, associate this trace with the secondary y-axis of the + subplot at the specified row and col. Only valid if all of the + following conditions are satisfied: + * The figure was created using `plotly.subplots.make_subplots`. + * The row and col arguments are not None + * The subplot at the specified row and col has type xy + (which is the default) and secondary_y True. These + properties are specified in the specs argument to + make_subplots. See the make_subplots docstring for more info. + + Returns + ------- + FigureWidget + """ + from plotly.graph_objs import Candlestick + + new_trace = Candlestick( + close=close, + closesrc=closesrc, + customdata=customdata, + customdatasrc=customdatasrc, + decreasing=decreasing, + high=high, + highsrc=highsrc, + hoverinfo=hoverinfo, + hoverinfosrc=hoverinfosrc, + hoverlabel=hoverlabel, + hovertemplate=hovertemplate, + hovertemplatefallback=hovertemplatefallback, + hovertemplatesrc=hovertemplatesrc, + hovertext=hovertext, + hovertextsrc=hovertextsrc, + ids=ids, + idssrc=idssrc, + increasing=increasing, + legend=legend, + legendgroup=legendgroup, + legendgrouptitle=legendgrouptitle, + legendrank=legendrank, + legendwidth=legendwidth, + line=line, + low=low, + lowsrc=lowsrc, + meta=meta, + metasrc=metasrc, + name=name, + opacity=opacity, + open=open, + opensrc=opensrc, + selectedpoints=selectedpoints, + showlegend=showlegend, + stream=stream, + text=text, + textsrc=textsrc, + uid=uid, + uirevision=uirevision, + visible=visible, + whiskerwidth=whiskerwidth, + x=x, + xaxis=xaxis, + xcalendar=xcalendar, + xhoverformat=xhoverformat, + xperiod=xperiod, + xperiod0=xperiod0, + xperiodalignment=xperiodalignment, + xsrc=xsrc, + yaxis=yaxis, + yhoverformat=yhoverformat, + zorder=zorder, + **kwargs, + ) + return self.add_trace(new_trace, row=row, col=col, secondary_y=secondary_y) + + def add_carpet( + self, + a=None, + a0=None, + aaxis=None, + asrc=None, + b=None, + b0=None, + baxis=None, + bsrc=None, + carpet=None, + cheaterslope=None, + color=None, + customdata=None, + customdatasrc=None, + da=None, + db=None, + font=None, + ids=None, + idssrc=None, + legend=None, + legendgrouptitle=None, + legendrank=None, + legendwidth=None, + meta=None, + metasrc=None, + name=None, + opacity=None, + stream=None, + uid=None, + uirevision=None, + visible=None, + x=None, + xaxis=None, + xsrc=None, + y=None, + yaxis=None, + ysrc=None, + zorder=None, + row=None, + col=None, + secondary_y=None, + **kwargs, + ) -> "FigureWidget": + """ + Add a new Carpet trace + + The data describing carpet axis layout is set in `y` and + (optionally) also `x`. If only `y` is present, `x` the plot is + interpreted as a cheater plot and is filled in using the `y` + values. `x` and `y` may either be 2D arrays matching with each + dimension matching that of `a` and `b`, or they may be 1D + arrays with total length equal to that of `a` and `b`. + + Parameters + ---------- + a + An array containing values of the first parameter value + a0 + Alternate to `a`. Builds a linear space of a + coordinates. Use with `da` where `a0` is the starting + coordinate and `da` the step. + aaxis + :class:`plotly.graph_objects.carpet.Aaxis` instance or + dict with compatible properties + asrc + Sets the source reference on Chart Studio Cloud for + `a`. + b + A two dimensional array of y coordinates at each carpet + point. + b0 + Alternate to `b`. Builds a linear space of a + coordinates. Use with `db` where `b0` is the starting + coordinate and `db` the step. + baxis + :class:`plotly.graph_objects.carpet.Baxis` instance or + dict with compatible properties + bsrc + Sets the source reference on Chart Studio Cloud for + `b`. + carpet + An identifier for this carpet, so that `scattercarpet` + and `contourcarpet` traces can specify a carpet plot on + which they lie + cheaterslope + The shift applied to each successive row of data in + creating a cheater plot. Only used if `x` is been + omitted. + color + Sets default for all colors associated with this axis + all at once: line, font, tick, and grid colors. Grid + color is lightened by blending this with the plot + background Individual pieces can override this. + customdata + Assigns extra data each datum. This may be useful when + listening to hover, click and selection events. Note + that, "scatter" traces also appends customdata items in + the markers DOM elements + customdatasrc + Sets the source reference on Chart Studio Cloud for + `customdata`. + da + Sets the a coordinate step. See `a0` for more info. + db + Sets the b coordinate step. See `b0` for more info. + font + The default font used for axis & tick labels on this + carpet + ids + Assigns id labels to each datum. These ids for object + constancy of data points during animation. Should be an + array of strings, not numbers or any other type. + idssrc + Sets the source reference on Chart Studio Cloud for + `ids`. + legend + Sets the reference to a legend to show this trace in. + References to these legends are "legend", "legend2", + "legend3", etc. Settings for these legends are set in + the layout, under `layout.legend`, `layout.legend2`, + etc. + legendgrouptitle + :class:`plotly.graph_objects.carpet.Legendgrouptitle` + instance or dict with compatible properties + legendrank + Sets the legend rank for this trace. Items and groups + with smaller ranks are presented on top/left side while + with "reversed" `legend.traceorder` they are on + bottom/right side. The default legendrank is 1000, so + that you can use ranks less than 1000 to place certain + items before all unranked items, and ranks greater than + 1000 to go after all unranked items. When having + unranked or equal rank items shapes would be displayed + after traces i.e. according to their order in data and + layout. + legendwidth + Sets the width (in px or fraction) of the legend for + this trace. + meta + Assigns extra meta information associated with this + trace that can be used in various text attributes. + Attributes such as trace `name`, graph, axis and + colorbar `title.text`, annotation `text` + `rangeselector`, `updatemenues` and `sliders` `label` + text all support `meta`. To access the trace `meta` + values in an attribute in the same trace, simply use + `%{meta[i]}` where `i` is the index or key of the + `meta` item in question. To access trace `meta` in + layout attributes, use `%{data[n[.meta[i]}` where `i` + is the index or key of the `meta` and `n` is the trace + index. + metasrc + Sets the source reference on Chart Studio Cloud for + `meta`. + name + Sets the trace name. The trace name appears as the + legend item and on hover. + opacity + Sets the opacity of the trace. + stream + :class:`plotly.graph_objects.carpet.Stream` instance or + dict with compatible properties + uid + Assign an id to this trace, Use this to provide object + constancy between traces during animations and + transitions. + uirevision + Controls persistence of some user-driven changes to the + trace: `constraintrange` in `parcoords` traces, as well + as some `editable: true` modifications such as `name` + and `colorbar.title`. Defaults to `layout.uirevision`. + Note that other user-driven trace attribute changes are + controlled by `layout` attributes: `trace.visible` is + controlled by `layout.legend.uirevision`, + `selectedpoints` is controlled by + `layout.selectionrevision`, and `colorbar.(x|y)` + (accessible with `config: {editable: true}`) is + controlled by `layout.editrevision`. Trace changes are + tracked by `uid`, which only falls back on trace index + if no `uid` is provided. So if your app can add/remove + traces before the end of the `data` array, such that + the same trace has a different index, you can still + preserve user-driven changes if you give each trace a + `uid` that stays with it as it moves. + visible + Determines whether or not this trace is visible. If + "legendonly", the trace is not drawn, but can appear as + a legend item (provided that the legend itself is + visible). + x + A two dimensional array of x coordinates at each carpet + point. If omitted, the plot is a cheater plot and the + xaxis is hidden by default. + xaxis + Sets a reference between this trace's x coordinates and + a 2D cartesian x axis. If "x" (the default value), the + x coordinates refer to `layout.xaxis`. If "x2", the x + coordinates refer to `layout.xaxis2`, and so on. + xsrc + Sets the source reference on Chart Studio Cloud for + `x`. + y + A two dimensional array of y coordinates at each carpet + point. + yaxis + Sets a reference between this trace's y coordinates and + a 2D cartesian y axis. If "y" (the default value), the + y coordinates refer to `layout.yaxis`. If "y2", the y + coordinates refer to `layout.yaxis2`, and so on. + ysrc + Sets the source reference on Chart Studio Cloud for + `y`. + zorder + Sets the layer on which this trace is displayed, + relative to other SVG traces on the same subplot. SVG + traces with higher `zorder` appear in front of those + with lower `zorder`. + row : 'all', int or None (default) + Subplot row index (starting from 1) for the trace to be + added. Only valid if figure was created using + `plotly.tools.make_subplots`.If 'all', addresses all + rows in the specified column(s). + col : 'all', int or None (default) + Subplot col index (starting from 1) for the trace to be + added. Only valid if figure was created using + `plotly.tools.make_subplots`.If 'all', addresses all + columns in the specified row(s). + secondary_y: boolean or None (default None) + If True, associate this trace with the secondary y-axis of the + subplot at the specified row and col. Only valid if all of the + following conditions are satisfied: + * The figure was created using `plotly.subplots.make_subplots`. + * The row and col arguments are not None + * The subplot at the specified row and col has type xy + (which is the default) and secondary_y True. These + properties are specified in the specs argument to + make_subplots. See the make_subplots docstring for more info. + + Returns + ------- + FigureWidget + """ + from plotly.graph_objs import Carpet + + new_trace = Carpet( + a=a, + a0=a0, + aaxis=aaxis, + asrc=asrc, + b=b, + b0=b0, + baxis=baxis, + bsrc=bsrc, + carpet=carpet, + cheaterslope=cheaterslope, + color=color, + customdata=customdata, + customdatasrc=customdatasrc, + da=da, + db=db, + font=font, + ids=ids, + idssrc=idssrc, + legend=legend, + legendgrouptitle=legendgrouptitle, + legendrank=legendrank, + legendwidth=legendwidth, + meta=meta, + metasrc=metasrc, + name=name, + opacity=opacity, + stream=stream, + uid=uid, + uirevision=uirevision, + visible=visible, + x=x, + xaxis=xaxis, + xsrc=xsrc, + y=y, + yaxis=yaxis, + ysrc=ysrc, + zorder=zorder, + **kwargs, + ) + return self.add_trace(new_trace, row=row, col=col, secondary_y=secondary_y) + + def add_choropleth( + self, + autocolorscale=None, + coloraxis=None, + colorbar=None, + colorscale=None, + customdata=None, + customdatasrc=None, + featureidkey=None, + geo=None, + geojson=None, + hoverinfo=None, + hoverinfosrc=None, + hoverlabel=None, + hovertemplate=None, + hovertemplatefallback=None, + hovertemplatesrc=None, + hovertext=None, + hovertextsrc=None, + ids=None, + idssrc=None, + legend=None, + legendgroup=None, + legendgrouptitle=None, + legendrank=None, + legendwidth=None, + locationmode=None, + locations=None, + locationssrc=None, + marker=None, + meta=None, + metasrc=None, + name=None, + reversescale=None, + selected=None, + selectedpoints=None, + showlegend=None, + showscale=None, + stream=None, + text=None, + textsrc=None, + uid=None, + uirevision=None, + unselected=None, + visible=None, + z=None, + zauto=None, + zmax=None, + zmid=None, + zmin=None, + zsrc=None, + row=None, + col=None, + **kwargs, + ) -> "FigureWidget": + """ + Add a new Choropleth trace + + The data that describes the choropleth value-to-color mapping + is set in `z`. The geographic locations corresponding to each + value in `z` are set in `locations`. + + Parameters + ---------- + autocolorscale + Determines whether the colorscale is a default palette + (`autocolorscale: true`) or the palette determined by + `colorscale`. In case `colorscale` is unspecified or + `autocolorscale` is true, the default palette will be + chosen according to whether numbers in the `color` + array are all positive, all negative or mixed. + coloraxis + Sets a reference to a shared color axis. References to + these shared color axes are "coloraxis", "coloraxis2", + "coloraxis3", etc. Settings for these shared color axes + are set in the layout, under `layout.coloraxis`, + `layout.coloraxis2`, etc. Note that multiple color + scales can be linked to the same color axis. + colorbar + :class:`plotly.graph_objects.choropleth.ColorBar` + instance or dict with compatible properties + colorscale + Sets the colorscale. The colorscale must be an array + containing arrays mapping a normalized value to an rgb, + rgba, hex, hsl, hsv, or named color string. At minimum, + a mapping for the lowest (0) and highest (1) values are + required. For example, `[[0, 'rgb(0,0,255)'], [1, + 'rgb(255,0,0)']]`. To control the bounds of the + colorscale in color space, use `zmin` and `zmax`. + Alternatively, `colorscale` may be a palette name + string of the following list: Blackbody,Bluered,Blues,C + ividis,Earth,Electric,Greens,Greys,Hot,Jet,Picnic,Portl + and,Rainbow,RdBu,Reds,Viridis,YlGnBu,YlOrRd. + customdata + Assigns extra data each datum. This may be useful when + listening to hover, click and selection events. Note + that, "scatter" traces also appends customdata items in + the markers DOM elements + customdatasrc + Sets the source reference on Chart Studio Cloud for + `customdata`. + featureidkey + Sets the key in GeoJSON features which is used as id to + match the items included in the `locations` array. Only + has an effect when `geojson` is set. Support nested + property, for example "properties.name". + geo + Sets a reference between this trace's geospatial + coordinates and a geographic map. If "geo" (the default + value), the geospatial coordinates refer to + `layout.geo`. If "geo2", the geospatial coordinates + refer to `layout.geo2`, and so on. + geojson + Sets optional GeoJSON data associated with this trace. + If not given, the features on the base map are used. It + can be set as a valid GeoJSON object or as a URL + string. Note that we only accept GeoJSONs of type + "FeatureCollection" or "Feature" with geometries of + type "Polygon" or "MultiPolygon". + hoverinfo + Determines which trace information appear on hover. If + `none` or `skip` are set, no information is displayed + upon hovering. But, if `none` is set, click and hover + events are still fired. + hoverinfosrc + Sets the source reference on Chart Studio Cloud for + `hoverinfo`. + hoverlabel + :class:`plotly.graph_objects.choropleth.Hoverlabel` + instance or dict with compatible properties + hovertemplate + Template string used for rendering the information that + appear on hover box. Note that this will override + `hoverinfo`. Variables are inserted using %{variable}, + for example "y: %{y}" as well as %{xother}, {%_xother}, + {%_xother_}, {%xother_}. When showing info for several + points, "xother" will be added to those with different + x positions from the first point. An underscore before + or after "(x|y)other" will add a space on that side, + only when this field is shown. Numbers are formatted + using d3-format's syntax %{variable:d3-format}, for + example "Price: %{y:$.2f}". + https://github.com/d3/d3-format/tree/v1.4.5#d3-format + for details on the formatting syntax. Dates are + formatted using d3-time-format's syntax + %{variable|d3-time-format}, for example "Day: + %{2019-01-01|%A}". https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format for details on the + date formatting syntax. Variables that can't be found + will be replaced with the specifier. For example, a + template of "data: %{x}, %{y}" will result in a value + of "data: 1, %{y}" if x is 1 and y is missing. + Variables with an undefined value will be replaced with + the fallback value. The variables available in + `hovertemplate` are the ones emitted as event data + described at this link + https://plotly.com/javascript/plotlyjs-events/#event- + data. Additionally, all attributes that can be + specified per-point (the ones that are `arrayOk: true`) + are available. Anything contained in tag `` is + displayed in the secondary box, for example + `%{fullData.name}`. To hide the + secondary box completely, use an empty tag + ``. + hovertemplatefallback + Fallback string that's displayed when a variable + referenced in a template is missing. If the boolean + value 'false' is passed in, the specifier with the + missing variable will be displayed. + hovertemplatesrc + Sets the source reference on Chart Studio Cloud for + `hovertemplate`. + hovertext + Same as `text`. + hovertextsrc + Sets the source reference on Chart Studio Cloud for + `hovertext`. + ids + Assigns id labels to each datum. These ids for object + constancy of data points during animation. Should be an + array of strings, not numbers or any other type. + idssrc + Sets the source reference on Chart Studio Cloud for + `ids`. + legend + Sets the reference to a legend to show this trace in. + References to these legends are "legend", "legend2", + "legend3", etc. Settings for these legends are set in + the layout, under `layout.legend`, `layout.legend2`, + etc. + legendgroup + Sets the legend group for this trace. Traces and shapes + part of the same legend group hide/show at the same + time when toggling legend items. + legendgrouptitle + :class:`plotly.graph_objects.choropleth.Legendgrouptitl + e` instance or dict with compatible properties + legendrank + Sets the legend rank for this trace. Items and groups + with smaller ranks are presented on top/left side while + with "reversed" `legend.traceorder` they are on + bottom/right side. The default legendrank is 1000, so + that you can use ranks less than 1000 to place certain + items before all unranked items, and ranks greater than + 1000 to go after all unranked items. When having + unranked or equal rank items shapes would be displayed + after traces i.e. according to their order in data and + layout. + legendwidth + Sets the width (in px or fraction) of the legend for + this trace. + locationmode + The library used by the *country names* `locationmode` + option is changing in an upcoming version. Country + names in existing plots may not work in the new + version. Determines the set of locations used to match + entries in `locations` to regions on the map. Values + "ISO-3", "USA-states", *country names* correspond to + features on the base map and value "geojson-id" + corresponds to features from a custom GeoJSON linked to + the `geojson` attribute. + locations + Sets the coordinates via location IDs or names. See + `locationmode` for more info. + locationssrc + Sets the source reference on Chart Studio Cloud for + `locations`. + marker + :class:`plotly.graph_objects.choropleth.Marker` + instance or dict with compatible properties + meta + Assigns extra meta information associated with this + trace that can be used in various text attributes. + Attributes such as trace `name`, graph, axis and + colorbar `title.text`, annotation `text` + `rangeselector`, `updatemenues` and `sliders` `label` + text all support `meta`. To access the trace `meta` + values in an attribute in the same trace, simply use + `%{meta[i]}` where `i` is the index or key of the + `meta` item in question. To access trace `meta` in + layout attributes, use `%{data[n[.meta[i]}` where `i` + is the index or key of the `meta` and `n` is the trace + index. + metasrc + Sets the source reference on Chart Studio Cloud for + `meta`. + name + Sets the trace name. The trace name appears as the + legend item and on hover. + reversescale + Reverses the color mapping if true. If true, `zmin` + will correspond to the last color in the array and + `zmax` will correspond to the first color. + selected + :class:`plotly.graph_objects.choropleth.Selected` + instance or dict with compatible properties + selectedpoints + Array containing integer indices of selected points. + Has an effect only for traces that support selections. + Note that an empty array means an empty selection where + the `unselected` are turned on for all points, whereas, + any other non-array values means no selection all where + the `selected` and `unselected` styles have no effect. + showlegend + Determines whether or not an item corresponding to this + trace is shown in the legend. + showscale + Determines whether or not a colorbar is displayed for + this trace. + stream + :class:`plotly.graph_objects.choropleth.Stream` + instance or dict with compatible properties + text + Sets the text elements associated with each location. + textsrc + Sets the source reference on Chart Studio Cloud for + `text`. + uid + Assign an id to this trace, Use this to provide object + constancy between traces during animations and + transitions. + uirevision + Controls persistence of some user-driven changes to the + trace: `constraintrange` in `parcoords` traces, as well + as some `editable: true` modifications such as `name` + and `colorbar.title`. Defaults to `layout.uirevision`. + Note that other user-driven trace attribute changes are + controlled by `layout` attributes: `trace.visible` is + controlled by `layout.legend.uirevision`, + `selectedpoints` is controlled by + `layout.selectionrevision`, and `colorbar.(x|y)` + (accessible with `config: {editable: true}`) is + controlled by `layout.editrevision`. Trace changes are + tracked by `uid`, which only falls back on trace index + if no `uid` is provided. So if your app can add/remove + traces before the end of the `data` array, such that + the same trace has a different index, you can still + preserve user-driven changes if you give each trace a + `uid` that stays with it as it moves. + unselected + :class:`plotly.graph_objects.choropleth.Unselected` + instance or dict with compatible properties + visible + Determines whether or not this trace is visible. If + "legendonly", the trace is not drawn, but can appear as + a legend item (provided that the legend itself is + visible). + z + Sets the color values. + zauto + Determines whether or not the color domain is computed + with respect to the input data (here in `z`) or the + bounds set in `zmin` and `zmax` Defaults to `false` + when `zmin` and `zmax` are set by the user. + zmax + Sets the upper bound of the color domain. Value should + have the same units as in `z` and if set, `zmin` must + be set as well. + zmid + Sets the mid-point of the color domain by scaling + `zmin` and/or `zmax` to be equidistant to this point. + Value should have the same units as in `z`. Has no + effect when `zauto` is `false`. + zmin + Sets the lower bound of the color domain. Value should + have the same units as in `z` and if set, `zmax` must + be set as well. + zsrc + Sets the source reference on Chart Studio Cloud for + `z`. + row : 'all', int or None (default) + Subplot row index (starting from 1) for the trace to be + added. Only valid if figure was created using + `plotly.tools.make_subplots`.If 'all', addresses all + rows in the specified column(s). + col : 'all', int or None (default) + Subplot col index (starting from 1) for the trace to be + added. Only valid if figure was created using + `plotly.tools.make_subplots`.If 'all', addresses all + columns in the specified row(s). + + Returns + ------- + FigureWidget + """ + from plotly.graph_objs import Choropleth + + new_trace = Choropleth( + autocolorscale=autocolorscale, + coloraxis=coloraxis, + colorbar=colorbar, + colorscale=colorscale, + customdata=customdata, + customdatasrc=customdatasrc, + featureidkey=featureidkey, + geo=geo, + geojson=geojson, + hoverinfo=hoverinfo, + hoverinfosrc=hoverinfosrc, + hoverlabel=hoverlabel, + hovertemplate=hovertemplate, + hovertemplatefallback=hovertemplatefallback, + hovertemplatesrc=hovertemplatesrc, + hovertext=hovertext, + hovertextsrc=hovertextsrc, + ids=ids, + idssrc=idssrc, + legend=legend, + legendgroup=legendgroup, + legendgrouptitle=legendgrouptitle, + legendrank=legendrank, + legendwidth=legendwidth, + locationmode=locationmode, + locations=locations, + locationssrc=locationssrc, + marker=marker, + meta=meta, + metasrc=metasrc, + name=name, + reversescale=reversescale, + selected=selected, + selectedpoints=selectedpoints, + showlegend=showlegend, + showscale=showscale, + stream=stream, + text=text, + textsrc=textsrc, + uid=uid, + uirevision=uirevision, + unselected=unselected, + visible=visible, + z=z, + zauto=zauto, + zmax=zmax, + zmid=zmid, + zmin=zmin, + zsrc=zsrc, + **kwargs, + ) + return self.add_trace(new_trace, row=row, col=col) + + def add_choroplethmap( + self, + autocolorscale=None, + below=None, + coloraxis=None, + colorbar=None, + colorscale=None, + customdata=None, + customdatasrc=None, + featureidkey=None, + geojson=None, + hoverinfo=None, + hoverinfosrc=None, + hoverlabel=None, + hovertemplate=None, + hovertemplatefallback=None, + hovertemplatesrc=None, + hovertext=None, + hovertextsrc=None, + ids=None, + idssrc=None, + legend=None, + legendgroup=None, + legendgrouptitle=None, + legendrank=None, + legendwidth=None, + locations=None, + locationssrc=None, + marker=None, + meta=None, + metasrc=None, + name=None, + reversescale=None, + selected=None, + selectedpoints=None, + showlegend=None, + showscale=None, + stream=None, + subplot=None, + text=None, + textsrc=None, + uid=None, + uirevision=None, + unselected=None, + visible=None, + z=None, + zauto=None, + zmax=None, + zmid=None, + zmin=None, + zsrc=None, + row=None, + col=None, + **kwargs, + ) -> "FigureWidget": + """ + Add a new Choroplethmap trace + + GeoJSON features to be filled are set in `geojson` The data + that describes the choropleth value-to-color mapping is set in + `locations` and `z`. + + Parameters + ---------- + autocolorscale + Determines whether the colorscale is a default palette + (`autocolorscale: true`) or the palette determined by + `colorscale`. In case `colorscale` is unspecified or + `autocolorscale` is true, the default palette will be + chosen according to whether numbers in the `color` + array are all positive, all negative or mixed. + below + Determines if the choropleth polygons will be inserted + before the layer with the specified ID. By default, + choroplethmap traces are placed above the water layers. + If set to '', the layer will be inserted above every + existing layer. + coloraxis + Sets a reference to a shared color axis. References to + these shared color axes are "coloraxis", "coloraxis2", + "coloraxis3", etc. Settings for these shared color axes + are set in the layout, under `layout.coloraxis`, + `layout.coloraxis2`, etc. Note that multiple color + scales can be linked to the same color axis. + colorbar + :class:`plotly.graph_objects.choroplethmap.ColorBar` + instance or dict with compatible properties + colorscale + Sets the colorscale. The colorscale must be an array + containing arrays mapping a normalized value to an rgb, + rgba, hex, hsl, hsv, or named color string. At minimum, + a mapping for the lowest (0) and highest (1) values are + required. For example, `[[0, 'rgb(0,0,255)'], [1, + 'rgb(255,0,0)']]`. To control the bounds of the + colorscale in color space, use `zmin` and `zmax`. + Alternatively, `colorscale` may be a palette name + string of the following list: Blackbody,Bluered,Blues,C + ividis,Earth,Electric,Greens,Greys,Hot,Jet,Picnic,Portl + and,Rainbow,RdBu,Reds,Viridis,YlGnBu,YlOrRd. + customdata + Assigns extra data each datum. This may be useful when + listening to hover, click and selection events. Note + that, "scatter" traces also appends customdata items in + the markers DOM elements + customdatasrc + Sets the source reference on Chart Studio Cloud for + `customdata`. + featureidkey + Sets the key in GeoJSON features which is used as id to + match the items included in the `locations` array. + Support nested property, for example "properties.name". + geojson + Sets the GeoJSON data associated with this trace. It + can be set as a valid GeoJSON object or as a URL + string. Note that we only accept GeoJSONs of type + "FeatureCollection" or "Feature" with geometries of + type "Polygon" or "MultiPolygon". + hoverinfo + Determines which trace information appear on hover. If + `none` or `skip` are set, no information is displayed + upon hovering. But, if `none` is set, click and hover + events are still fired. + hoverinfosrc + Sets the source reference on Chart Studio Cloud for + `hoverinfo`. + hoverlabel + :class:`plotly.graph_objects.choroplethmap.Hoverlabel` + instance or dict with compatible properties + hovertemplate + Template string used for rendering the information that + appear on hover box. Note that this will override + `hoverinfo`. Variables are inserted using %{variable}, + for example "y: %{y}" as well as %{xother}, {%_xother}, + {%_xother_}, {%xother_}. When showing info for several + points, "xother" will be added to those with different + x positions from the first point. An underscore before + or after "(x|y)other" will add a space on that side, + only when this field is shown. Numbers are formatted + using d3-format's syntax %{variable:d3-format}, for + example "Price: %{y:$.2f}". + https://github.com/d3/d3-format/tree/v1.4.5#d3-format + for details on the formatting syntax. Dates are + formatted using d3-time-format's syntax + %{variable|d3-time-format}, for example "Day: + %{2019-01-01|%A}". https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format for details on the + date formatting syntax. Variables that can't be found + will be replaced with the specifier. For example, a + template of "data: %{x}, %{y}" will result in a value + of "data: 1, %{y}" if x is 1 and y is missing. + Variables with an undefined value will be replaced with + the fallback value. The variables available in + `hovertemplate` are the ones emitted as event data + described at this link + https://plotly.com/javascript/plotlyjs-events/#event- + data. Additionally, all attributes that can be + specified per-point (the ones that are `arrayOk: true`) + are available. Finally, the template string has access + to variable `properties` Anything contained in tag + `` is displayed in the secondary box, for + example `%{fullData.name}`. To hide the + secondary box completely, use an empty tag + ``. + hovertemplatefallback + Fallback string that's displayed when a variable + referenced in a template is missing. If the boolean + value 'false' is passed in, the specifier with the + missing variable will be displayed. + hovertemplatesrc + Sets the source reference on Chart Studio Cloud for + `hovertemplate`. + hovertext + Same as `text`. + hovertextsrc + Sets the source reference on Chart Studio Cloud for + `hovertext`. + ids + Assigns id labels to each datum. These ids for object + constancy of data points during animation. Should be an + array of strings, not numbers or any other type. + idssrc + Sets the source reference on Chart Studio Cloud for + `ids`. + legend + Sets the reference to a legend to show this trace in. + References to these legends are "legend", "legend2", + "legend3", etc. Settings for these legends are set in + the layout, under `layout.legend`, `layout.legend2`, + etc. + legendgroup + Sets the legend group for this trace. Traces and shapes + part of the same legend group hide/show at the same + time when toggling legend items. + legendgrouptitle + :class:`plotly.graph_objects.choroplethmap.Legendgroupt + itle` instance or dict with compatible properties + legendrank + Sets the legend rank for this trace. Items and groups + with smaller ranks are presented on top/left side while + with "reversed" `legend.traceorder` they are on + bottom/right side. The default legendrank is 1000, so + that you can use ranks less than 1000 to place certain + items before all unranked items, and ranks greater than + 1000 to go after all unranked items. When having + unranked or equal rank items shapes would be displayed + after traces i.e. according to their order in data and + layout. + legendwidth + Sets the width (in px or fraction) of the legend for + this trace. + locations + Sets which features found in "geojson" to plot using + their feature `id` field. + locationssrc + Sets the source reference on Chart Studio Cloud for + `locations`. + marker + :class:`plotly.graph_objects.choroplethmap.Marker` + instance or dict with compatible properties + meta + Assigns extra meta information associated with this + trace that can be used in various text attributes. + Attributes such as trace `name`, graph, axis and + colorbar `title.text`, annotation `text` + `rangeselector`, `updatemenues` and `sliders` `label` + text all support `meta`. To access the trace `meta` + values in an attribute in the same trace, simply use + `%{meta[i]}` where `i` is the index or key of the + `meta` item in question. To access trace `meta` in + layout attributes, use `%{data[n[.meta[i]}` where `i` + is the index or key of the `meta` and `n` is the trace + index. + metasrc + Sets the source reference on Chart Studio Cloud for + `meta`. + name + Sets the trace name. The trace name appears as the + legend item and on hover. + reversescale + Reverses the color mapping if true. If true, `zmin` + will correspond to the last color in the array and + `zmax` will correspond to the first color. + selected + :class:`plotly.graph_objects.choroplethmap.Selected` + instance or dict with compatible properties + selectedpoints + Array containing integer indices of selected points. + Has an effect only for traces that support selections. + Note that an empty array means an empty selection where + the `unselected` are turned on for all points, whereas, + any other non-array values means no selection all where + the `selected` and `unselected` styles have no effect. + showlegend + Determines whether or not an item corresponding to this + trace is shown in the legend. + showscale + Determines whether or not a colorbar is displayed for + this trace. + stream + :class:`plotly.graph_objects.choroplethmap.Stream` + instance or dict with compatible properties + subplot + Sets a reference between this trace's data coordinates + and a map subplot. If "map" (the default value), the + data refer to `layout.map`. If "map2", the data refer + to `layout.map2`, and so on. + text + Sets the text elements associated with each location. + textsrc + Sets the source reference on Chart Studio Cloud for + `text`. + uid + Assign an id to this trace, Use this to provide object + constancy between traces during animations and + transitions. + uirevision + Controls persistence of some user-driven changes to the + trace: `constraintrange` in `parcoords` traces, as well + as some `editable: true` modifications such as `name` + and `colorbar.title`. Defaults to `layout.uirevision`. + Note that other user-driven trace attribute changes are + controlled by `layout` attributes: `trace.visible` is + controlled by `layout.legend.uirevision`, + `selectedpoints` is controlled by + `layout.selectionrevision`, and `colorbar.(x|y)` + (accessible with `config: {editable: true}`) is + controlled by `layout.editrevision`. Trace changes are + tracked by `uid`, which only falls back on trace index + if no `uid` is provided. So if your app can add/remove + traces before the end of the `data` array, such that + the same trace has a different index, you can still + preserve user-driven changes if you give each trace a + `uid` that stays with it as it moves. + unselected + :class:`plotly.graph_objects.choroplethmap.Unselected` + instance or dict with compatible properties + visible + Determines whether or not this trace is visible. If + "legendonly", the trace is not drawn, but can appear as + a legend item (provided that the legend itself is + visible). + z + Sets the color values. + zauto + Determines whether or not the color domain is computed + with respect to the input data (here in `z`) or the + bounds set in `zmin` and `zmax` Defaults to `false` + when `zmin` and `zmax` are set by the user. + zmax + Sets the upper bound of the color domain. Value should + have the same units as in `z` and if set, `zmin` must + be set as well. + zmid + Sets the mid-point of the color domain by scaling + `zmin` and/or `zmax` to be equidistant to this point. + Value should have the same units as in `z`. Has no + effect when `zauto` is `false`. + zmin + Sets the lower bound of the color domain. Value should + have the same units as in `z` and if set, `zmax` must + be set as well. + zsrc + Sets the source reference on Chart Studio Cloud for + `z`. + row : 'all', int or None (default) + Subplot row index (starting from 1) for the trace to be + added. Only valid if figure was created using + `plotly.tools.make_subplots`.If 'all', addresses all + rows in the specified column(s). + col : 'all', int or None (default) + Subplot col index (starting from 1) for the trace to be + added. Only valid if figure was created using + `plotly.tools.make_subplots`.If 'all', addresses all + columns in the specified row(s). + + Returns + ------- + FigureWidget + """ + from plotly.graph_objs import Choroplethmap + + new_trace = Choroplethmap( + autocolorscale=autocolorscale, + below=below, + coloraxis=coloraxis, + colorbar=colorbar, + colorscale=colorscale, + customdata=customdata, + customdatasrc=customdatasrc, + featureidkey=featureidkey, + geojson=geojson, + hoverinfo=hoverinfo, + hoverinfosrc=hoverinfosrc, + hoverlabel=hoverlabel, + hovertemplate=hovertemplate, + hovertemplatefallback=hovertemplatefallback, + hovertemplatesrc=hovertemplatesrc, + hovertext=hovertext, + hovertextsrc=hovertextsrc, + ids=ids, + idssrc=idssrc, + legend=legend, + legendgroup=legendgroup, + legendgrouptitle=legendgrouptitle, + legendrank=legendrank, + legendwidth=legendwidth, + locations=locations, + locationssrc=locationssrc, + marker=marker, + meta=meta, + metasrc=metasrc, + name=name, + reversescale=reversescale, + selected=selected, + selectedpoints=selectedpoints, + showlegend=showlegend, + showscale=showscale, + stream=stream, + subplot=subplot, + text=text, + textsrc=textsrc, + uid=uid, + uirevision=uirevision, + unselected=unselected, + visible=visible, + z=z, + zauto=zauto, + zmax=zmax, + zmid=zmid, + zmin=zmin, + zsrc=zsrc, + **kwargs, + ) + return self.add_trace(new_trace, row=row, col=col) + + def add_choroplethmapbox( + self, + autocolorscale=None, + below=None, + coloraxis=None, + colorbar=None, + colorscale=None, + customdata=None, + customdatasrc=None, + featureidkey=None, + geojson=None, + hoverinfo=None, + hoverinfosrc=None, + hoverlabel=None, + hovertemplate=None, + hovertemplatefallback=None, + hovertemplatesrc=None, + hovertext=None, + hovertextsrc=None, + ids=None, + idssrc=None, + legend=None, + legendgroup=None, + legendgrouptitle=None, + legendrank=None, + legendwidth=None, + locations=None, + locationssrc=None, + marker=None, + meta=None, + metasrc=None, + name=None, + reversescale=None, + selected=None, + selectedpoints=None, + showlegend=None, + showscale=None, + stream=None, + subplot=None, + text=None, + textsrc=None, + uid=None, + uirevision=None, + unselected=None, + visible=None, + z=None, + zauto=None, + zmax=None, + zmid=None, + zmin=None, + zsrc=None, + row=None, + col=None, + **kwargs, + ) -> "FigureWidget": + """ + Add a new Choroplethmapbox trace + + "choroplethmapbox" trace is deprecated! Please consider + switching to the "choroplethmap" trace type and `map` subplots. + Learn more at: https://plotly.com/python/maplibre-migration/ as + well as https://plotly.com/javascript/maplibre-migration/ + GeoJSON features to be filled are set in `geojson` The data + that describes the choropleth value-to-color mapping is set in + `locations` and `z`. + + Parameters + ---------- + autocolorscale + Determines whether the colorscale is a default palette + (`autocolorscale: true`) or the palette determined by + `colorscale`. In case `colorscale` is unspecified or + `autocolorscale` is true, the default palette will be + chosen according to whether numbers in the `color` + array are all positive, all negative or mixed. + below + Determines if the choropleth polygons will be inserted + before the layer with the specified ID. By default, + choroplethmapbox traces are placed above the water + layers. If set to '', the layer will be inserted above + every existing layer. + coloraxis + Sets a reference to a shared color axis. References to + these shared color axes are "coloraxis", "coloraxis2", + "coloraxis3", etc. Settings for these shared color axes + are set in the layout, under `layout.coloraxis`, + `layout.coloraxis2`, etc. Note that multiple color + scales can be linked to the same color axis. + colorbar + :class:`plotly.graph_objects.choroplethmapbox.ColorBar` + instance or dict with compatible properties + colorscale + Sets the colorscale. The colorscale must be an array + containing arrays mapping a normalized value to an rgb, + rgba, hex, hsl, hsv, or named color string. At minimum, + a mapping for the lowest (0) and highest (1) values are + required. For example, `[[0, 'rgb(0,0,255)'], [1, + 'rgb(255,0,0)']]`. To control the bounds of the + colorscale in color space, use `zmin` and `zmax`. + Alternatively, `colorscale` may be a palette name + string of the following list: Blackbody,Bluered,Blues,C + ividis,Earth,Electric,Greens,Greys,Hot,Jet,Picnic,Portl + and,Rainbow,RdBu,Reds,Viridis,YlGnBu,YlOrRd. + customdata + Assigns extra data each datum. This may be useful when + listening to hover, click and selection events. Note + that, "scatter" traces also appends customdata items in + the markers DOM elements + customdatasrc + Sets the source reference on Chart Studio Cloud for + `customdata`. + featureidkey + Sets the key in GeoJSON features which is used as id to + match the items included in the `locations` array. + Support nested property, for example "properties.name". + geojson + Sets the GeoJSON data associated with this trace. It + can be set as a valid GeoJSON object or as a URL + string. Note that we only accept GeoJSONs of type + "FeatureCollection" or "Feature" with geometries of + type "Polygon" or "MultiPolygon". + hoverinfo + Determines which trace information appear on hover. If + `none` or `skip` are set, no information is displayed + upon hovering. But, if `none` is set, click and hover + events are still fired. + hoverinfosrc + Sets the source reference on Chart Studio Cloud for + `hoverinfo`. + hoverlabel + :class:`plotly.graph_objects.choroplethmapbox.Hoverlabe + l` instance or dict with compatible properties + hovertemplate + Template string used for rendering the information that + appear on hover box. Note that this will override + `hoverinfo`. Variables are inserted using %{variable}, + for example "y: %{y}" as well as %{xother}, {%_xother}, + {%_xother_}, {%xother_}. When showing info for several + points, "xother" will be added to those with different + x positions from the first point. An underscore before + or after "(x|y)other" will add a space on that side, + only when this field is shown. Numbers are formatted + using d3-format's syntax %{variable:d3-format}, for + example "Price: %{y:$.2f}". + https://github.com/d3/d3-format/tree/v1.4.5#d3-format + for details on the formatting syntax. Dates are + formatted using d3-time-format's syntax + %{variable|d3-time-format}, for example "Day: + %{2019-01-01|%A}". https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format for details on the + date formatting syntax. Variables that can't be found + will be replaced with the specifier. For example, a + template of "data: %{x}, %{y}" will result in a value + of "data: 1, %{y}" if x is 1 and y is missing. + Variables with an undefined value will be replaced with + the fallback value. The variables available in + `hovertemplate` are the ones emitted as event data + described at this link + https://plotly.com/javascript/plotlyjs-events/#event- + data. Additionally, all attributes that can be + specified per-point (the ones that are `arrayOk: true`) + are available. Finally, the template string has access + to variable `properties` Anything contained in tag + `` is displayed in the secondary box, for + example `%{fullData.name}`. To hide the + secondary box completely, use an empty tag + ``. + hovertemplatefallback + Fallback string that's displayed when a variable + referenced in a template is missing. If the boolean + value 'false' is passed in, the specifier with the + missing variable will be displayed. + hovertemplatesrc + Sets the source reference on Chart Studio Cloud for + `hovertemplate`. + hovertext + Same as `text`. + hovertextsrc + Sets the source reference on Chart Studio Cloud for + `hovertext`. + ids + Assigns id labels to each datum. These ids for object + constancy of data points during animation. Should be an + array of strings, not numbers or any other type. + idssrc + Sets the source reference on Chart Studio Cloud for + `ids`. + legend + Sets the reference to a legend to show this trace in. + References to these legends are "legend", "legend2", + "legend3", etc. Settings for these legends are set in + the layout, under `layout.legend`, `layout.legend2`, + etc. + legendgroup + Sets the legend group for this trace. Traces and shapes + part of the same legend group hide/show at the same + time when toggling legend items. + legendgrouptitle + :class:`plotly.graph_objects.choroplethmapbox.Legendgro + uptitle` instance or dict with compatible properties + legendrank + Sets the legend rank for this trace. Items and groups + with smaller ranks are presented on top/left side while + with "reversed" `legend.traceorder` they are on + bottom/right side. The default legendrank is 1000, so + that you can use ranks less than 1000 to place certain + items before all unranked items, and ranks greater than + 1000 to go after all unranked items. When having + unranked or equal rank items shapes would be displayed + after traces i.e. according to their order in data and + layout. + legendwidth + Sets the width (in px or fraction) of the legend for + this trace. + locations + Sets which features found in "geojson" to plot using + their feature `id` field. + locationssrc + Sets the source reference on Chart Studio Cloud for + `locations`. + marker + :class:`plotly.graph_objects.choroplethmapbox.Marker` + instance or dict with compatible properties + meta + Assigns extra meta information associated with this + trace that can be used in various text attributes. + Attributes such as trace `name`, graph, axis and + colorbar `title.text`, annotation `text` + `rangeselector`, `updatemenues` and `sliders` `label` + text all support `meta`. To access the trace `meta` + values in an attribute in the same trace, simply use + `%{meta[i]}` where `i` is the index or key of the + `meta` item in question. To access trace `meta` in + layout attributes, use `%{data[n[.meta[i]}` where `i` + is the index or key of the `meta` and `n` is the trace + index. + metasrc + Sets the source reference on Chart Studio Cloud for + `meta`. + name + Sets the trace name. The trace name appears as the + legend item and on hover. + reversescale + Reverses the color mapping if true. If true, `zmin` + will correspond to the last color in the array and + `zmax` will correspond to the first color. + selected + :class:`plotly.graph_objects.choroplethmapbox.Selected` + instance or dict with compatible properties + selectedpoints + Array containing integer indices of selected points. + Has an effect only for traces that support selections. + Note that an empty array means an empty selection where + the `unselected` are turned on for all points, whereas, + any other non-array values means no selection all where + the `selected` and `unselected` styles have no effect. + showlegend + Determines whether or not an item corresponding to this + trace is shown in the legend. + showscale + Determines whether or not a colorbar is displayed for + this trace. + stream + :class:`plotly.graph_objects.choroplethmapbox.Stream` + instance or dict with compatible properties + subplot + mapbox subplots and traces are deprecated! Please + consider switching to `map` subplots and traces. Learn + more at: https://plotly.com/python/maplibre-migration/ + as well as https://plotly.com/javascript/maplibre- + migration/ Sets a reference between this trace's data + coordinates and a mapbox subplot. If "mapbox" (the + default value), the data refer to `layout.mapbox`. If + "mapbox2", the data refer to `layout.mapbox2`, and so + on. + text + Sets the text elements associated with each location. + textsrc + Sets the source reference on Chart Studio Cloud for + `text`. + uid + Assign an id to this trace, Use this to provide object + constancy between traces during animations and + transitions. + uirevision + Controls persistence of some user-driven changes to the + trace: `constraintrange` in `parcoords` traces, as well + as some `editable: true` modifications such as `name` + and `colorbar.title`. Defaults to `layout.uirevision`. + Note that other user-driven trace attribute changes are + controlled by `layout` attributes: `trace.visible` is + controlled by `layout.legend.uirevision`, + `selectedpoints` is controlled by + `layout.selectionrevision`, and `colorbar.(x|y)` + (accessible with `config: {editable: true}`) is + controlled by `layout.editrevision`. Trace changes are + tracked by `uid`, which only falls back on trace index + if no `uid` is provided. So if your app can add/remove + traces before the end of the `data` array, such that + the same trace has a different index, you can still + preserve user-driven changes if you give each trace a + `uid` that stays with it as it moves. + unselected + :class:`plotly.graph_objects.choroplethmapbox.Unselecte + d` instance or dict with compatible properties + visible + Determines whether or not this trace is visible. If + "legendonly", the trace is not drawn, but can appear as + a legend item (provided that the legend itself is + visible). + z + Sets the color values. + zauto + Determines whether or not the color domain is computed + with respect to the input data (here in `z`) or the + bounds set in `zmin` and `zmax` Defaults to `false` + when `zmin` and `zmax` are set by the user. + zmax + Sets the upper bound of the color domain. Value should + have the same units as in `z` and if set, `zmin` must + be set as well. + zmid + Sets the mid-point of the color domain by scaling + `zmin` and/or `zmax` to be equidistant to this point. + Value should have the same units as in `z`. Has no + effect when `zauto` is `false`. + zmin + Sets the lower bound of the color domain. Value should + have the same units as in `z` and if set, `zmax` must + be set as well. + zsrc + Sets the source reference on Chart Studio Cloud for + `z`. + row : 'all', int or None (default) + Subplot row index (starting from 1) for the trace to be + added. Only valid if figure was created using + `plotly.tools.make_subplots`.If 'all', addresses all + rows in the specified column(s). + col : 'all', int or None (default) + Subplot col index (starting from 1) for the trace to be + added. Only valid if figure was created using + `plotly.tools.make_subplots`.If 'all', addresses all + columns in the specified row(s). + + Returns + ------- + FigureWidget + """ + from plotly.graph_objs import Choroplethmapbox + + new_trace = Choroplethmapbox( + autocolorscale=autocolorscale, + below=below, + coloraxis=coloraxis, + colorbar=colorbar, + colorscale=colorscale, + customdata=customdata, + customdatasrc=customdatasrc, + featureidkey=featureidkey, + geojson=geojson, + hoverinfo=hoverinfo, + hoverinfosrc=hoverinfosrc, + hoverlabel=hoverlabel, + hovertemplate=hovertemplate, + hovertemplatefallback=hovertemplatefallback, + hovertemplatesrc=hovertemplatesrc, + hovertext=hovertext, + hovertextsrc=hovertextsrc, + ids=ids, + idssrc=idssrc, + legend=legend, + legendgroup=legendgroup, + legendgrouptitle=legendgrouptitle, + legendrank=legendrank, + legendwidth=legendwidth, + locations=locations, + locationssrc=locationssrc, + marker=marker, + meta=meta, + metasrc=metasrc, + name=name, + reversescale=reversescale, + selected=selected, + selectedpoints=selectedpoints, + showlegend=showlegend, + showscale=showscale, + stream=stream, + subplot=subplot, + text=text, + textsrc=textsrc, + uid=uid, + uirevision=uirevision, + unselected=unselected, + visible=visible, + z=z, + zauto=zauto, + zmax=zmax, + zmid=zmid, + zmin=zmin, + zsrc=zsrc, + **kwargs, + ) + return self.add_trace(new_trace, row=row, col=col) + + def add_cone( + self, + anchor=None, + autocolorscale=None, + cauto=None, + cmax=None, + cmid=None, + cmin=None, + coloraxis=None, + colorbar=None, + colorscale=None, + customdata=None, + customdatasrc=None, + hoverinfo=None, + hoverinfosrc=None, + hoverlabel=None, + hovertemplate=None, + hovertemplatefallback=None, + hovertemplatesrc=None, + hovertext=None, + hovertextsrc=None, + ids=None, + idssrc=None, + legend=None, + legendgroup=None, + legendgrouptitle=None, + legendrank=None, + legendwidth=None, + lighting=None, + lightposition=None, + meta=None, + metasrc=None, + name=None, + opacity=None, + reversescale=None, + scene=None, + showlegend=None, + showscale=None, + sizemode=None, + sizeref=None, + stream=None, + text=None, + textsrc=None, + u=None, + uhoverformat=None, + uid=None, + uirevision=None, + usrc=None, + v=None, + vhoverformat=None, + visible=None, + vsrc=None, + w=None, + whoverformat=None, + wsrc=None, + x=None, + xhoverformat=None, + xsrc=None, + y=None, + yhoverformat=None, + ysrc=None, + z=None, + zhoverformat=None, + zsrc=None, + row=None, + col=None, + **kwargs, + ) -> "FigureWidget": + """ + Add a new Cone trace + + Use cone traces to visualize vector fields. Specify a vector + field using 6 1D arrays, 3 position arrays `x`, `y` and `z` and + 3 vector component arrays `u`, `v`, `w`. The cones are drawn + exactly at the positions given by `x`, `y` and `z`. + + Parameters + ---------- + anchor + Sets the cones' anchor with respect to their x/y/z + positions. Note that "cm" denote the cone's center of + mass which corresponds to 1/4 from the tail to tip. + autocolorscale + Determines whether the colorscale is a default palette + (`autocolorscale: true`) or the palette determined by + `colorscale`. In case `colorscale` is unspecified or + `autocolorscale` is true, the default palette will be + chosen according to whether numbers in the `color` + array are all positive, all negative or mixed. + cauto + Determines whether or not the color domain is computed + with respect to the input data (here u/v/w norm) or the + bounds set in `cmin` and `cmax` Defaults to `false` + when `cmin` and `cmax` are set by the user. + cmax + Sets the upper bound of the color domain. Value should + have the same units as u/v/w norm and if set, `cmin` + must be set as well. + cmid + Sets the mid-point of the color domain by scaling + `cmin` and/or `cmax` to be equidistant to this point. + Value should have the same units as u/v/w norm. Has no + effect when `cauto` is `false`. + cmin + Sets the lower bound of the color domain. Value should + have the same units as u/v/w norm and if set, `cmax` + must be set as well. + coloraxis + Sets a reference to a shared color axis. References to + these shared color axes are "coloraxis", "coloraxis2", + "coloraxis3", etc. Settings for these shared color axes + are set in the layout, under `layout.coloraxis`, + `layout.coloraxis2`, etc. Note that multiple color + scales can be linked to the same color axis. + colorbar + :class:`plotly.graph_objects.cone.ColorBar` instance or + dict with compatible properties + colorscale + Sets the colorscale. The colorscale must be an array + containing arrays mapping a normalized value to an rgb, + rgba, hex, hsl, hsv, or named color string. At minimum, + a mapping for the lowest (0) and highest (1) values are + required. For example, `[[0, 'rgb(0,0,255)'], [1, + 'rgb(255,0,0)']]`. To control the bounds of the + colorscale in color space, use `cmin` and `cmax`. + Alternatively, `colorscale` may be a palette name + string of the following list: Blackbody,Bluered,Blues,C + ividis,Earth,Electric,Greens,Greys,Hot,Jet,Picnic,Portl + and,Rainbow,RdBu,Reds,Viridis,YlGnBu,YlOrRd. + customdata + Assigns extra data each datum. This may be useful when + listening to hover, click and selection events. Note + that, "scatter" traces also appends customdata items in + the markers DOM elements + customdatasrc + Sets the source reference on Chart Studio Cloud for + `customdata`. + hoverinfo + Determines which trace information appear on hover. If + `none` or `skip` are set, no information is displayed + upon hovering. But, if `none` is set, click and hover + events are still fired. + hoverinfosrc + Sets the source reference on Chart Studio Cloud for + `hoverinfo`. + hoverlabel + :class:`plotly.graph_objects.cone.Hoverlabel` instance + or dict with compatible properties + hovertemplate + Template string used for rendering the information that + appear on hover box. Note that this will override + `hoverinfo`. Variables are inserted using %{variable}, + for example "y: %{y}" as well as %{xother}, {%_xother}, + {%_xother_}, {%xother_}. When showing info for several + points, "xother" will be added to those with different + x positions from the first point. An underscore before + or after "(x|y)other" will add a space on that side, + only when this field is shown. Numbers are formatted + using d3-format's syntax %{variable:d3-format}, for + example "Price: %{y:$.2f}". + https://github.com/d3/d3-format/tree/v1.4.5#d3-format + for details on the formatting syntax. Dates are + formatted using d3-time-format's syntax + %{variable|d3-time-format}, for example "Day: + %{2019-01-01|%A}". https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format for details on the + date formatting syntax. Variables that can't be found + will be replaced with the specifier. For example, a + template of "data: %{x}, %{y}" will result in a value + of "data: 1, %{y}" if x is 1 and y is missing. + Variables with an undefined value will be replaced with + the fallback value. The variables available in + `hovertemplate` are the ones emitted as event data + described at this link + https://plotly.com/javascript/plotlyjs-events/#event- + data. Additionally, all attributes that can be + specified per-point (the ones that are `arrayOk: true`) + are available. Finally, the template string has access + to variable `norm` Anything contained in tag `` + is displayed in the secondary box, for example + `%{fullData.name}`. To hide the + secondary box completely, use an empty tag + ``. + hovertemplatefallback + Fallback string that's displayed when a variable + referenced in a template is missing. If the boolean + value 'false' is passed in, the specifier with the + missing variable will be displayed. + hovertemplatesrc + Sets the source reference on Chart Studio Cloud for + `hovertemplate`. + hovertext + Same as `text`. + hovertextsrc + Sets the source reference on Chart Studio Cloud for + `hovertext`. + ids + Assigns id labels to each datum. These ids for object + constancy of data points during animation. Should be an + array of strings, not numbers or any other type. + idssrc + Sets the source reference on Chart Studio Cloud for + `ids`. + legend + Sets the reference to a legend to show this trace in. + References to these legends are "legend", "legend2", + "legend3", etc. Settings for these legends are set in + the layout, under `layout.legend`, `layout.legend2`, + etc. + legendgroup + Sets the legend group for this trace. Traces and shapes + part of the same legend group hide/show at the same + time when toggling legend items. + legendgrouptitle + :class:`plotly.graph_objects.cone.Legendgrouptitle` + instance or dict with compatible properties + legendrank + Sets the legend rank for this trace. Items and groups + with smaller ranks are presented on top/left side while + with "reversed" `legend.traceorder` they are on + bottom/right side. The default legendrank is 1000, so + that you can use ranks less than 1000 to place certain + items before all unranked items, and ranks greater than + 1000 to go after all unranked items. When having + unranked or equal rank items shapes would be displayed + after traces i.e. according to their order in data and + layout. + legendwidth + Sets the width (in px or fraction) of the legend for + this trace. + lighting + :class:`plotly.graph_objects.cone.Lighting` instance or + dict with compatible properties + lightposition + :class:`plotly.graph_objects.cone.Lightposition` + instance or dict with compatible properties + meta + Assigns extra meta information associated with this + trace that can be used in various text attributes. + Attributes such as trace `name`, graph, axis and + colorbar `title.text`, annotation `text` + `rangeselector`, `updatemenues` and `sliders` `label` + text all support `meta`. To access the trace `meta` + values in an attribute in the same trace, simply use + `%{meta[i]}` where `i` is the index or key of the + `meta` item in question. To access trace `meta` in + layout attributes, use `%{data[n[.meta[i]}` where `i` + is the index or key of the `meta` and `n` is the trace + index. + metasrc + Sets the source reference on Chart Studio Cloud for + `meta`. + name + Sets the trace name. The trace name appears as the + legend item and on hover. + opacity + Sets the opacity of the surface. Please note that in + the case of using high `opacity` values for example a + value greater than or equal to 0.5 on two surfaces (and + 0.25 with four surfaces), an overlay of multiple + transparent surfaces may not perfectly be sorted in + depth by the webgl API. This behavior may be improved + in the near future and is subject to change. + reversescale + Reverses the color mapping if true. If true, `cmin` + will correspond to the last color in the array and + `cmax` will correspond to the first color. + scene + Sets a reference between this trace's 3D coordinate + system and a 3D scene. If "scene" (the default value), + the (x,y,z) coordinates refer to `layout.scene`. If + "scene2", the (x,y,z) coordinates refer to + `layout.scene2`, and so on. + showlegend + Determines whether or not an item corresponding to this + trace is shown in the legend. + showscale + Determines whether or not a colorbar is displayed for + this trace. + sizemode + Determines whether `sizeref` is set as a "scaled" (i.e + unitless) scalar (normalized by the max u/v/w norm in + the vector field) or as "absolute" value (in the same + units as the vector field). To display sizes in actual + vector length use "raw". + sizeref + Adjusts the cone size scaling. The size of the cones is + determined by their u/v/w norm multiplied a factor and + `sizeref`. This factor (computed internally) + corresponds to the minimum "time" to travel across two + successive x/y/z positions at the average velocity of + those two successive positions. All cones in a given + trace use the same factor. With `sizemode` set to + "raw", its default value is 1. With `sizemode` set to + "scaled", `sizeref` is unitless, its default value is + 0.5. With `sizemode` set to "absolute", `sizeref` has + the same units as the u/v/w vector field, its the + default value is half the sample's maximum vector norm. + stream + :class:`plotly.graph_objects.cone.Stream` instance or + dict with compatible properties + text + Sets the text elements associated with the cones. If + trace `hoverinfo` contains a "text" flag and + "hovertext" is not set, these elements will be seen in + the hover labels. + textsrc + Sets the source reference on Chart Studio Cloud for + `text`. + u + Sets the x components of the vector field. + uhoverformat + Sets the hover text formatting rulefor `u` using d3 + formatting mini-languages which are very similar to + those in Python. For numbers, see: https://github.com/d + 3/d3-format/tree/v1.4.5#d3-format.By default the values + are formatted using generic number format. + uid + Assign an id to this trace, Use this to provide object + constancy between traces during animations and + transitions. + uirevision + Controls persistence of some user-driven changes to the + trace: `constraintrange` in `parcoords` traces, as well + as some `editable: true` modifications such as `name` + and `colorbar.title`. Defaults to `layout.uirevision`. + Note that other user-driven trace attribute changes are + controlled by `layout` attributes: `trace.visible` is + controlled by `layout.legend.uirevision`, + `selectedpoints` is controlled by + `layout.selectionrevision`, and `colorbar.(x|y)` + (accessible with `config: {editable: true}`) is + controlled by `layout.editrevision`. Trace changes are + tracked by `uid`, which only falls back on trace index + if no `uid` is provided. So if your app can add/remove + traces before the end of the `data` array, such that + the same trace has a different index, you can still + preserve user-driven changes if you give each trace a + `uid` that stays with it as it moves. + usrc + Sets the source reference on Chart Studio Cloud for + `u`. + v + Sets the y components of the vector field. + vhoverformat + Sets the hover text formatting rulefor `v` using d3 + formatting mini-languages which are very similar to + those in Python. For numbers, see: https://github.com/d + 3/d3-format/tree/v1.4.5#d3-format.By default the values + are formatted using generic number format. + visible + Determines whether or not this trace is visible. If + "legendonly", the trace is not drawn, but can appear as + a legend item (provided that the legend itself is + visible). + vsrc + Sets the source reference on Chart Studio Cloud for + `v`. + w + Sets the z components of the vector field. + whoverformat + Sets the hover text formatting rulefor `w` using d3 + formatting mini-languages which are very similar to + those in Python. For numbers, see: https://github.com/d + 3/d3-format/tree/v1.4.5#d3-format.By default the values + are formatted using generic number format. + wsrc + Sets the source reference on Chart Studio Cloud for + `w`. + x + Sets the x coordinates of the vector field and of the + displayed cones. + xhoverformat + Sets the hover text formatting rulefor `x` using d3 + formatting mini-languages which are very similar to + those in Python. For numbers, see: + https://github.com/d3/d3-format/tree/v1.4.5#d3-format. + And for dates see: https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format. We add two items to + d3's date formatter: "%h" for half of the year as a + decimal number as well as "%{n}f" for fractional + seconds with n digits. For example, *2016-10-13 + 09:15:23.456* with tickformat "%H~%M~%S.%2f" would + display *09~15~23.46*By default the values are + formatted using `xaxis.hoverformat`. + xsrc + Sets the source reference on Chart Studio Cloud for + `x`. + y + Sets the y coordinates of the vector field and of the + displayed cones. + yhoverformat + Sets the hover text formatting rulefor `y` using d3 + formatting mini-languages which are very similar to + those in Python. For numbers, see: + https://github.com/d3/d3-format/tree/v1.4.5#d3-format. + And for dates see: https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format. We add two items to + d3's date formatter: "%h" for half of the year as a + decimal number as well as "%{n}f" for fractional + seconds with n digits. For example, *2016-10-13 + 09:15:23.456* with tickformat "%H~%M~%S.%2f" would + display *09~15~23.46*By default the values are + formatted using `yaxis.hoverformat`. + ysrc + Sets the source reference on Chart Studio Cloud for + `y`. + z + Sets the z coordinates of the vector field and of the + displayed cones. + zhoverformat + Sets the hover text formatting rulefor `z` using d3 + formatting mini-languages which are very similar to + those in Python. For numbers, see: + https://github.com/d3/d3-format/tree/v1.4.5#d3-format. + And for dates see: https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format. We add two items to + d3's date formatter: "%h" for half of the year as a + decimal number as well as "%{n}f" for fractional + seconds with n digits. For example, *2016-10-13 + 09:15:23.456* with tickformat "%H~%M~%S.%2f" would + display *09~15~23.46*By default the values are + formatted using `zaxis.hoverformat`. + zsrc + Sets the source reference on Chart Studio Cloud for + `z`. + row : 'all', int or None (default) + Subplot row index (starting from 1) for the trace to be + added. Only valid if figure was created using + `plotly.tools.make_subplots`.If 'all', addresses all + rows in the specified column(s). + col : 'all', int or None (default) + Subplot col index (starting from 1) for the trace to be + added. Only valid if figure was created using + `plotly.tools.make_subplots`.If 'all', addresses all + columns in the specified row(s). + + Returns + ------- + FigureWidget + """ + from plotly.graph_objs import Cone + + new_trace = Cone( + anchor=anchor, + autocolorscale=autocolorscale, + cauto=cauto, + cmax=cmax, + cmid=cmid, + cmin=cmin, + coloraxis=coloraxis, + colorbar=colorbar, + colorscale=colorscale, + customdata=customdata, + customdatasrc=customdatasrc, + hoverinfo=hoverinfo, + hoverinfosrc=hoverinfosrc, + hoverlabel=hoverlabel, + hovertemplate=hovertemplate, + hovertemplatefallback=hovertemplatefallback, + hovertemplatesrc=hovertemplatesrc, + hovertext=hovertext, + hovertextsrc=hovertextsrc, + ids=ids, + idssrc=idssrc, + legend=legend, + legendgroup=legendgroup, + legendgrouptitle=legendgrouptitle, + legendrank=legendrank, + legendwidth=legendwidth, + lighting=lighting, + lightposition=lightposition, + meta=meta, + metasrc=metasrc, + name=name, + opacity=opacity, + reversescale=reversescale, + scene=scene, + showlegend=showlegend, + showscale=showscale, + sizemode=sizemode, + sizeref=sizeref, + stream=stream, + text=text, + textsrc=textsrc, + u=u, + uhoverformat=uhoverformat, + uid=uid, + uirevision=uirevision, + usrc=usrc, + v=v, + vhoverformat=vhoverformat, + visible=visible, + vsrc=vsrc, + w=w, + whoverformat=whoverformat, + wsrc=wsrc, + x=x, + xhoverformat=xhoverformat, + xsrc=xsrc, + y=y, + yhoverformat=yhoverformat, + ysrc=ysrc, + z=z, + zhoverformat=zhoverformat, + zsrc=zsrc, + **kwargs, + ) + return self.add_trace(new_trace, row=row, col=col) + + def add_contour( + self, + autocolorscale=None, + autocontour=None, + coloraxis=None, + colorbar=None, + colorscale=None, + connectgaps=None, + contours=None, + customdata=None, + customdatasrc=None, + dx=None, + dy=None, + fillcolor=None, + hoverinfo=None, + hoverinfosrc=None, + hoverlabel=None, + hoverongaps=None, + hovertemplate=None, + hovertemplatefallback=None, + hovertemplatesrc=None, + hovertext=None, + hovertextsrc=None, + ids=None, + idssrc=None, + legend=None, + legendgroup=None, + legendgrouptitle=None, + legendrank=None, + legendwidth=None, + line=None, + meta=None, + metasrc=None, + name=None, + ncontours=None, + opacity=None, + reversescale=None, + showlegend=None, + showscale=None, + stream=None, + text=None, + textfont=None, + textsrc=None, + texttemplate=None, + texttemplatefallback=None, + transpose=None, + uid=None, + uirevision=None, + visible=None, + x=None, + x0=None, + xaxis=None, + xcalendar=None, + xhoverformat=None, + xperiod=None, + xperiod0=None, + xperiodalignment=None, + xsrc=None, + xtype=None, + y=None, + y0=None, + yaxis=None, + ycalendar=None, + yhoverformat=None, + yperiod=None, + yperiod0=None, + yperiodalignment=None, + ysrc=None, + ytype=None, + z=None, + zauto=None, + zhoverformat=None, + zmax=None, + zmid=None, + zmin=None, + zorder=None, + zsrc=None, + row=None, + col=None, + secondary_y=None, + **kwargs, + ) -> "FigureWidget": + """ + Add a new Contour trace + + The data from which contour lines are computed is set in `z`. + Data in `z` must be a 2D list of numbers. Say that `z` has N + rows and M columns, then by default, these N rows correspond to + N y coordinates (set in `y` or auto-generated) and the M + columns correspond to M x coordinates (set in `x` or auto- + generated). By setting `transpose` to True, the above behavior + is flipped. + + Parameters + ---------- + autocolorscale + Determines whether the colorscale is a default palette + (`autocolorscale: true`) or the palette determined by + `colorscale`. In case `colorscale` is unspecified or + `autocolorscale` is true, the default palette will be + chosen according to whether numbers in the `color` + array are all positive, all negative or mixed. + autocontour + Determines whether or not the contour level attributes + are picked by an algorithm. If True, the number of + contour levels can be set in `ncontours`. If False, set + the contour level attributes in `contours`. + coloraxis + Sets a reference to a shared color axis. References to + these shared color axes are "coloraxis", "coloraxis2", + "coloraxis3", etc. Settings for these shared color axes + are set in the layout, under `layout.coloraxis`, + `layout.coloraxis2`, etc. Note that multiple color + scales can be linked to the same color axis. + colorbar + :class:`plotly.graph_objects.contour.ColorBar` instance + or dict with compatible properties + colorscale + Sets the colorscale. The colorscale must be an array + containing arrays mapping a normalized value to an rgb, + rgba, hex, hsl, hsv, or named color string. At minimum, + a mapping for the lowest (0) and highest (1) values are + required. For example, `[[0, 'rgb(0,0,255)'], [1, + 'rgb(255,0,0)']]`. To control the bounds of the + colorscale in color space, use `zmin` and `zmax`. + Alternatively, `colorscale` may be a palette name + string of the following list: Blackbody,Bluered,Blues,C + ividis,Earth,Electric,Greens,Greys,Hot,Jet,Picnic,Portl + and,Rainbow,RdBu,Reds,Viridis,YlGnBu,YlOrRd. + connectgaps + Determines whether or not gaps (i.e. {nan} or missing + values) in the `z` data are filled in. It is defaulted + to true if `z` is a one dimensional array otherwise it + is defaulted to false. + contours + :class:`plotly.graph_objects.contour.Contours` instance + or dict with compatible properties + customdata + Assigns extra data each datum. This may be useful when + listening to hover, click and selection events. Note + that, "scatter" traces also appends customdata items in + the markers DOM elements + customdatasrc + Sets the source reference on Chart Studio Cloud for + `customdata`. + dx + Sets the x coordinate step. See `x0` for more info. + dy + Sets the y coordinate step. See `y0` for more info. + fillcolor + Sets the fill color if `contours.type` is "constraint". + Defaults to a half-transparent variant of the line + color, marker color, or marker line color, whichever is + available. + hoverinfo + Determines which trace information appear on hover. If + `none` or `skip` are set, no information is displayed + upon hovering. But, if `none` is set, click and hover + events are still fired. + hoverinfosrc + Sets the source reference on Chart Studio Cloud for + `hoverinfo`. + hoverlabel + :class:`plotly.graph_objects.contour.Hoverlabel` + instance or dict with compatible properties + hoverongaps + Determines whether or not gaps (i.e. {nan} or missing + values) in the `z` data have hover labels associated + with them. + hovertemplate + Template string used for rendering the information that + appear on hover box. Note that this will override + `hoverinfo`. Variables are inserted using %{variable}, + for example "y: %{y}" as well as %{xother}, {%_xother}, + {%_xother_}, {%xother_}. When showing info for several + points, "xother" will be added to those with different + x positions from the first point. An underscore before + or after "(x|y)other" will add a space on that side, + only when this field is shown. Numbers are formatted + using d3-format's syntax %{variable:d3-format}, for + example "Price: %{y:$.2f}". + https://github.com/d3/d3-format/tree/v1.4.5#d3-format + for details on the formatting syntax. Dates are + formatted using d3-time-format's syntax + %{variable|d3-time-format}, for example "Day: + %{2019-01-01|%A}". https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format for details on the + date formatting syntax. Variables that can't be found + will be replaced with the specifier. For example, a + template of "data: %{x}, %{y}" will result in a value + of "data: 1, %{y}" if x is 1 and y is missing. + Variables with an undefined value will be replaced with + the fallback value. The variables available in + `hovertemplate` are the ones emitted as event data + described at this link + https://plotly.com/javascript/plotlyjs-events/#event- + data. Additionally, all attributes that can be + specified per-point (the ones that are `arrayOk: true`) + are available. Anything contained in tag `` is + displayed in the secondary box, for example + `%{fullData.name}`. To hide the + secondary box completely, use an empty tag + ``. + hovertemplatefallback + Fallback string that's displayed when a variable + referenced in a template is missing. If the boolean + value 'false' is passed in, the specifier with the + missing variable will be displayed. + hovertemplatesrc + Sets the source reference on Chart Studio Cloud for + `hovertemplate`. + hovertext + Same as `text`. + hovertextsrc + Sets the source reference on Chart Studio Cloud for + `hovertext`. + ids + Assigns id labels to each datum. These ids for object + constancy of data points during animation. Should be an + array of strings, not numbers or any other type. + idssrc + Sets the source reference on Chart Studio Cloud for + `ids`. + legend + Sets the reference to a legend to show this trace in. + References to these legends are "legend", "legend2", + "legend3", etc. Settings for these legends are set in + the layout, under `layout.legend`, `layout.legend2`, + etc. + legendgroup + Sets the legend group for this trace. Traces and shapes + part of the same legend group hide/show at the same + time when toggling legend items. + legendgrouptitle + :class:`plotly.graph_objects.contour.Legendgrouptitle` + instance or dict with compatible properties + legendrank + Sets the legend rank for this trace. Items and groups + with smaller ranks are presented on top/left side while + with "reversed" `legend.traceorder` they are on + bottom/right side. The default legendrank is 1000, so + that you can use ranks less than 1000 to place certain + items before all unranked items, and ranks greater than + 1000 to go after all unranked items. When having + unranked or equal rank items shapes would be displayed + after traces i.e. according to their order in data and + layout. + legendwidth + Sets the width (in px or fraction) of the legend for + this trace. + line + :class:`plotly.graph_objects.contour.Line` instance or + dict with compatible properties + meta + Assigns extra meta information associated with this + trace that can be used in various text attributes. + Attributes such as trace `name`, graph, axis and + colorbar `title.text`, annotation `text` + `rangeselector`, `updatemenues` and `sliders` `label` + text all support `meta`. To access the trace `meta` + values in an attribute in the same trace, simply use + `%{meta[i]}` where `i` is the index or key of the + `meta` item in question. To access trace `meta` in + layout attributes, use `%{data[n[.meta[i]}` where `i` + is the index or key of the `meta` and `n` is the trace + index. + metasrc + Sets the source reference on Chart Studio Cloud for + `meta`. + name + Sets the trace name. The trace name appears as the + legend item and on hover. + ncontours + Sets the maximum number of contour levels. The actual + number of contours will be chosen automatically to be + less than or equal to the value of `ncontours`. Has an + effect only if `autocontour` is True or if + `contours.size` is missing. + opacity + Sets the opacity of the trace. + reversescale + Reverses the color mapping if true. If true, `zmin` + will correspond to the last color in the array and + `zmax` will correspond to the first color. + showlegend + Determines whether or not an item corresponding to this + trace is shown in the legend. + showscale + Determines whether or not a colorbar is displayed for + this trace. + stream + :class:`plotly.graph_objects.contour.Stream` instance + or dict with compatible properties + text + Sets the text elements associated with each z value. + textfont + For this trace it only has an effect if `coloring` is + set to "heatmap". Sets the text font. + textsrc + Sets the source reference on Chart Studio Cloud for + `text`. + texttemplate + For this trace it only has an effect if `coloring` is + set to "heatmap". Template string used for rendering + the information text that appears on points. Note that + this will override `textinfo`. Variables are inserted + using %{variable}, for example "y: %{y}". Numbers are + formatted using d3-format's syntax + %{variable:d3-format}, for example "Price: %{y:$.2f}". + https://github.com/d3/d3-format/tree/v1.4.5#d3-format + for details on the formatting syntax. Dates are + formatted using d3-time-format's syntax + %{variable|d3-time-format}, for example "Day: + %{2019-01-01|%A}". https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format for details on the + date formatting syntax. Variables that can't be found + will be replaced with the specifier. For example, a + template of "data: %{x}, %{y}" will result in a value + of "data: 1, %{y}" if x is 1 and y is missing. + Variables with an undefined value will be replaced with + the fallback value. All attributes that can be + specified per-point (the ones that are `arrayOk: true`) + are available. Finally, the template string has access + to variables `x`, `y`, `z` and `text`. + texttemplatefallback + Fallback string that's displayed when a variable + referenced in a template is missing. If the boolean + value 'false' is passed in, the specifier with the + missing variable will be displayed. + transpose + Transposes the z data. + uid + Assign an id to this trace, Use this to provide object + constancy between traces during animations and + transitions. + uirevision + Controls persistence of some user-driven changes to the + trace: `constraintrange` in `parcoords` traces, as well + as some `editable: true` modifications such as `name` + and `colorbar.title`. Defaults to `layout.uirevision`. + Note that other user-driven trace attribute changes are + controlled by `layout` attributes: `trace.visible` is + controlled by `layout.legend.uirevision`, + `selectedpoints` is controlled by + `layout.selectionrevision`, and `colorbar.(x|y)` + (accessible with `config: {editable: true}`) is + controlled by `layout.editrevision`. Trace changes are + tracked by `uid`, which only falls back on trace index + if no `uid` is provided. So if your app can add/remove + traces before the end of the `data` array, such that + the same trace has a different index, you can still + preserve user-driven changes if you give each trace a + `uid` that stays with it as it moves. + visible + Determines whether or not this trace is visible. If + "legendonly", the trace is not drawn, but can appear as + a legend item (provided that the legend itself is + visible). + x + Sets the x coordinates. + x0 + Alternate to `x`. Builds a linear space of x + coordinates. Use with `dx` where `x0` is the starting + coordinate and `dx` the step. + xaxis + Sets a reference between this trace's x coordinates and + a 2D cartesian x axis. If "x" (the default value), the + x coordinates refer to `layout.xaxis`. If "x2", the x + coordinates refer to `layout.xaxis2`, and so on. + xcalendar + Sets the calendar system to use with `x` date data. + xhoverformat + Sets the hover text formatting rulefor `x` using d3 + formatting mini-languages which are very similar to + those in Python. For numbers, see: + https://github.com/d3/d3-format/tree/v1.4.5#d3-format. + And for dates see: https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format. We add two items to + d3's date formatter: "%h" for half of the year as a + decimal number as well as "%{n}f" for fractional + seconds with n digits. For example, *2016-10-13 + 09:15:23.456* with tickformat "%H~%M~%S.%2f" would + display *09~15~23.46*By default the values are + formatted using `xaxis.hoverformat`. + xperiod + Only relevant when the axis `type` is "date". Sets the + period positioning in milliseconds or "M" on the x + axis. Special values in the form of "M" could be + used to declare the number of months. In this case `n` + must be a positive integer. + xperiod0 + Only relevant when the axis `type` is "date". Sets the + base for period positioning in milliseconds or date + string on the x0 axis. When `x0period` is round number + of weeks, the `x0period0` by default would be on a + Sunday i.e. 2000-01-02, otherwise it would be at + 2000-01-01. + xperiodalignment + Only relevant when the axis `type` is "date". Sets the + alignment of data points on the x axis. + xsrc + Sets the source reference on Chart Studio Cloud for + `x`. + xtype + If "array", the heatmap's x coordinates are given by + "x" (the default behavior when `x` is provided). If + "scaled", the heatmap's x coordinates are given by "x0" + and "dx" (the default behavior when `x` is not + provided). + y + Sets the y coordinates. + y0 + Alternate to `y`. Builds a linear space of y + coordinates. Use with `dy` where `y0` is the starting + coordinate and `dy` the step. + yaxis + Sets a reference between this trace's y coordinates and + a 2D cartesian y axis. If "y" (the default value), the + y coordinates refer to `layout.yaxis`. If "y2", the y + coordinates refer to `layout.yaxis2`, and so on. + ycalendar + Sets the calendar system to use with `y` date data. + yhoverformat + Sets the hover text formatting rulefor `y` using d3 + formatting mini-languages which are very similar to + those in Python. For numbers, see: + https://github.com/d3/d3-format/tree/v1.4.5#d3-format. + And for dates see: https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format. We add two items to + d3's date formatter: "%h" for half of the year as a + decimal number as well as "%{n}f" for fractional + seconds with n digits. For example, *2016-10-13 + 09:15:23.456* with tickformat "%H~%M~%S.%2f" would + display *09~15~23.46*By default the values are + formatted using `yaxis.hoverformat`. + yperiod + Only relevant when the axis `type` is "date". Sets the + period positioning in milliseconds or "M" on the y + axis. Special values in the form of "M" could be + used to declare the number of months. In this case `n` + must be a positive integer. + yperiod0 + Only relevant when the axis `type` is "date". Sets the + base for period positioning in milliseconds or date + string on the y0 axis. When `y0period` is round number + of weeks, the `y0period0` by default would be on a + Sunday i.e. 2000-01-02, otherwise it would be at + 2000-01-01. + yperiodalignment + Only relevant when the axis `type` is "date". Sets the + alignment of data points on the y axis. + ysrc + Sets the source reference on Chart Studio Cloud for + `y`. + ytype + If "array", the heatmap's y coordinates are given by + "y" (the default behavior when `y` is provided) If + "scaled", the heatmap's y coordinates are given by "y0" + and "dy" (the default behavior when `y` is not + provided) + z + Sets the z data. + zauto + Determines whether or not the color domain is computed + with respect to the input data (here in `z`) or the + bounds set in `zmin` and `zmax` Defaults to `false` + when `zmin` and `zmax` are set by the user. + zhoverformat + Sets the hover text formatting rulefor `z` using d3 + formatting mini-languages which are very similar to + those in Python. For numbers, see: https://github.com/d + 3/d3-format/tree/v1.4.5#d3-format.By default the values + are formatted using generic number format. + zmax + Sets the upper bound of the color domain. Value should + have the same units as in `z` and if set, `zmin` must + be set as well. + zmid + Sets the mid-point of the color domain by scaling + `zmin` and/or `zmax` to be equidistant to this point. + Value should have the same units as in `z`. Has no + effect when `zauto` is `false`. + zmin + Sets the lower bound of the color domain. Value should + have the same units as in `z` and if set, `zmax` must + be set as well. + zorder + Sets the layer on which this trace is displayed, + relative to other SVG traces on the same subplot. SVG + traces with higher `zorder` appear in front of those + with lower `zorder`. + zsrc + Sets the source reference on Chart Studio Cloud for + `z`. + row : 'all', int or None (default) + Subplot row index (starting from 1) for the trace to be + added. Only valid if figure was created using + `plotly.tools.make_subplots`.If 'all', addresses all + rows in the specified column(s). + col : 'all', int or None (default) + Subplot col index (starting from 1) for the trace to be + added. Only valid if figure was created using + `plotly.tools.make_subplots`.If 'all', addresses all + columns in the specified row(s). + secondary_y: boolean or None (default None) + If True, associate this trace with the secondary y-axis of the + subplot at the specified row and col. Only valid if all of the + following conditions are satisfied: + * The figure was created using `plotly.subplots.make_subplots`. + * The row and col arguments are not None + * The subplot at the specified row and col has type xy + (which is the default) and secondary_y True. These + properties are specified in the specs argument to + make_subplots. See the make_subplots docstring for more info. + + Returns + ------- + FigureWidget + """ + from plotly.graph_objs import Contour + + new_trace = Contour( + autocolorscale=autocolorscale, + autocontour=autocontour, + coloraxis=coloraxis, + colorbar=colorbar, + colorscale=colorscale, + connectgaps=connectgaps, + contours=contours, + customdata=customdata, + customdatasrc=customdatasrc, + dx=dx, + dy=dy, + fillcolor=fillcolor, + hoverinfo=hoverinfo, + hoverinfosrc=hoverinfosrc, + hoverlabel=hoverlabel, + hoverongaps=hoverongaps, + hovertemplate=hovertemplate, + hovertemplatefallback=hovertemplatefallback, + hovertemplatesrc=hovertemplatesrc, + hovertext=hovertext, + hovertextsrc=hovertextsrc, + ids=ids, + idssrc=idssrc, + legend=legend, + legendgroup=legendgroup, + legendgrouptitle=legendgrouptitle, + legendrank=legendrank, + legendwidth=legendwidth, + line=line, + meta=meta, + metasrc=metasrc, + name=name, + ncontours=ncontours, + opacity=opacity, + reversescale=reversescale, + showlegend=showlegend, + showscale=showscale, + stream=stream, + text=text, + textfont=textfont, + textsrc=textsrc, + texttemplate=texttemplate, + texttemplatefallback=texttemplatefallback, + transpose=transpose, + uid=uid, + uirevision=uirevision, + visible=visible, + x=x, + x0=x0, + xaxis=xaxis, + xcalendar=xcalendar, + xhoverformat=xhoverformat, + xperiod=xperiod, + xperiod0=xperiod0, + xperiodalignment=xperiodalignment, + xsrc=xsrc, + xtype=xtype, + y=y, + y0=y0, + yaxis=yaxis, + ycalendar=ycalendar, + yhoverformat=yhoverformat, + yperiod=yperiod, + yperiod0=yperiod0, + yperiodalignment=yperiodalignment, + ysrc=ysrc, + ytype=ytype, + z=z, + zauto=zauto, + zhoverformat=zhoverformat, + zmax=zmax, + zmid=zmid, + zmin=zmin, + zorder=zorder, + zsrc=zsrc, + **kwargs, + ) + return self.add_trace(new_trace, row=row, col=col, secondary_y=secondary_y) + + def add_contourcarpet( + self, + a=None, + a0=None, + asrc=None, + atype=None, + autocolorscale=None, + autocontour=None, + b=None, + b0=None, + bsrc=None, + btype=None, + carpet=None, + coloraxis=None, + colorbar=None, + colorscale=None, + contours=None, + customdata=None, + customdatasrc=None, + da=None, + db=None, + fillcolor=None, + hovertext=None, + hovertextsrc=None, + ids=None, + idssrc=None, + legend=None, + legendgroup=None, + legendgrouptitle=None, + legendrank=None, + legendwidth=None, + line=None, + meta=None, + metasrc=None, + name=None, + ncontours=None, + opacity=None, + reversescale=None, + showlegend=None, + showscale=None, + stream=None, + text=None, + textsrc=None, + transpose=None, + uid=None, + uirevision=None, + visible=None, + xaxis=None, + yaxis=None, + z=None, + zauto=None, + zmax=None, + zmid=None, + zmin=None, + zorder=None, + zsrc=None, + row=None, + col=None, + secondary_y=None, + **kwargs, + ) -> "FigureWidget": + """ + Add a new Contourcarpet trace + + Plots contours on either the first carpet axis or the carpet + axis with a matching `carpet` attribute. Data `z` is + interpreted as matching that of the corresponding carpet axis. + + Parameters + ---------- + a + Sets the x coordinates. + a0 + Alternate to `x`. Builds a linear space of x + coordinates. Use with `dx` where `x0` is the starting + coordinate and `dx` the step. + asrc + Sets the source reference on Chart Studio Cloud for + `a`. + atype + If "array", the heatmap's x coordinates are given by + "x" (the default behavior when `x` is provided). If + "scaled", the heatmap's x coordinates are given by "x0" + and "dx" (the default behavior when `x` is not + provided). + autocolorscale + Determines whether the colorscale is a default palette + (`autocolorscale: true`) or the palette determined by + `colorscale`. In case `colorscale` is unspecified or + `autocolorscale` is true, the default palette will be + chosen according to whether numbers in the `color` + array are all positive, all negative or mixed. + autocontour + Determines whether or not the contour level attributes + are picked by an algorithm. If True, the number of + contour levels can be set in `ncontours`. If False, set + the contour level attributes in `contours`. + b + Sets the y coordinates. + b0 + Alternate to `y`. Builds a linear space of y + coordinates. Use with `dy` where `y0` is the starting + coordinate and `dy` the step. + bsrc + Sets the source reference on Chart Studio Cloud for + `b`. + btype + If "array", the heatmap's y coordinates are given by + "y" (the default behavior when `y` is provided) If + "scaled", the heatmap's y coordinates are given by "y0" + and "dy" (the default behavior when `y` is not + provided) + carpet + The `carpet` of the carpet axes on which this contour + trace lies + coloraxis + Sets a reference to a shared color axis. References to + these shared color axes are "coloraxis", "coloraxis2", + "coloraxis3", etc. Settings for these shared color axes + are set in the layout, under `layout.coloraxis`, + `layout.coloraxis2`, etc. Note that multiple color + scales can be linked to the same color axis. + colorbar + :class:`plotly.graph_objects.contourcarpet.ColorBar` + instance or dict with compatible properties + colorscale + Sets the colorscale. The colorscale must be an array + containing arrays mapping a normalized value to an rgb, + rgba, hex, hsl, hsv, or named color string. At minimum, + a mapping for the lowest (0) and highest (1) values are + required. For example, `[[0, 'rgb(0,0,255)'], [1, + 'rgb(255,0,0)']]`. To control the bounds of the + colorscale in color space, use `zmin` and `zmax`. + Alternatively, `colorscale` may be a palette name + string of the following list: Blackbody,Bluered,Blues,C + ividis,Earth,Electric,Greens,Greys,Hot,Jet,Picnic,Portl + and,Rainbow,RdBu,Reds,Viridis,YlGnBu,YlOrRd. + contours + :class:`plotly.graph_objects.contourcarpet.Contours` + instance or dict with compatible properties + customdata + Assigns extra data each datum. This may be useful when + listening to hover, click and selection events. Note + that, "scatter" traces also appends customdata items in + the markers DOM elements + customdatasrc + Sets the source reference on Chart Studio Cloud for + `customdata`. + da + Sets the x coordinate step. See `x0` for more info. + db + Sets the y coordinate step. See `y0` for more info. + fillcolor + Sets the fill color if `contours.type` is "constraint". + Defaults to a half-transparent variant of the line + color, marker color, or marker line color, whichever is + available. + hovertext + Same as `text`. + hovertextsrc + Sets the source reference on Chart Studio Cloud for + `hovertext`. + ids + Assigns id labels to each datum. These ids for object + constancy of data points during animation. Should be an + array of strings, not numbers or any other type. + idssrc + Sets the source reference on Chart Studio Cloud for + `ids`. + legend + Sets the reference to a legend to show this trace in. + References to these legends are "legend", "legend2", + "legend3", etc. Settings for these legends are set in + the layout, under `layout.legend`, `layout.legend2`, + etc. + legendgroup + Sets the legend group for this trace. Traces and shapes + part of the same legend group hide/show at the same + time when toggling legend items. + legendgrouptitle + :class:`plotly.graph_objects.contourcarpet.Legendgroupt + itle` instance or dict with compatible properties + legendrank + Sets the legend rank for this trace. Items and groups + with smaller ranks are presented on top/left side while + with "reversed" `legend.traceorder` they are on + bottom/right side. The default legendrank is 1000, so + that you can use ranks less than 1000 to place certain + items before all unranked items, and ranks greater than + 1000 to go after all unranked items. When having + unranked or equal rank items shapes would be displayed + after traces i.e. according to their order in data and + layout. + legendwidth + Sets the width (in px or fraction) of the legend for + this trace. + line + :class:`plotly.graph_objects.contourcarpet.Line` + instance or dict with compatible properties + meta + Assigns extra meta information associated with this + trace that can be used in various text attributes. + Attributes such as trace `name`, graph, axis and + colorbar `title.text`, annotation `text` + `rangeselector`, `updatemenues` and `sliders` `label` + text all support `meta`. To access the trace `meta` + values in an attribute in the same trace, simply use + `%{meta[i]}` where `i` is the index or key of the + `meta` item in question. To access trace `meta` in + layout attributes, use `%{data[n[.meta[i]}` where `i` + is the index or key of the `meta` and `n` is the trace + index. + metasrc + Sets the source reference on Chart Studio Cloud for + `meta`. + name + Sets the trace name. The trace name appears as the + legend item and on hover. + ncontours + Sets the maximum number of contour levels. The actual + number of contours will be chosen automatically to be + less than or equal to the value of `ncontours`. Has an + effect only if `autocontour` is True or if + `contours.size` is missing. + opacity + Sets the opacity of the trace. + reversescale + Reverses the color mapping if true. If true, `zmin` + will correspond to the last color in the array and + `zmax` will correspond to the first color. + showlegend + Determines whether or not an item corresponding to this + trace is shown in the legend. + showscale + Determines whether or not a colorbar is displayed for + this trace. + stream + :class:`plotly.graph_objects.contourcarpet.Stream` + instance or dict with compatible properties + text + Sets the text elements associated with each z value. + textsrc + Sets the source reference on Chart Studio Cloud for + `text`. + transpose + Transposes the z data. + uid + Assign an id to this trace, Use this to provide object + constancy between traces during animations and + transitions. + uirevision + Controls persistence of some user-driven changes to the + trace: `constraintrange` in `parcoords` traces, as well + as some `editable: true` modifications such as `name` + and `colorbar.title`. Defaults to `layout.uirevision`. + Note that other user-driven trace attribute changes are + controlled by `layout` attributes: `trace.visible` is + controlled by `layout.legend.uirevision`, + `selectedpoints` is controlled by + `layout.selectionrevision`, and `colorbar.(x|y)` + (accessible with `config: {editable: true}`) is + controlled by `layout.editrevision`. Trace changes are + tracked by `uid`, which only falls back on trace index + if no `uid` is provided. So if your app can add/remove + traces before the end of the `data` array, such that + the same trace has a different index, you can still + preserve user-driven changes if you give each trace a + `uid` that stays with it as it moves. + visible + Determines whether or not this trace is visible. If + "legendonly", the trace is not drawn, but can appear as + a legend item (provided that the legend itself is + visible). + xaxis + Sets a reference between this trace's x coordinates and + a 2D cartesian x axis. If "x" (the default value), the + x coordinates refer to `layout.xaxis`. If "x2", the x + coordinates refer to `layout.xaxis2`, and so on. + yaxis + Sets a reference between this trace's y coordinates and + a 2D cartesian y axis. If "y" (the default value), the + y coordinates refer to `layout.yaxis`. If "y2", the y + coordinates refer to `layout.yaxis2`, and so on. + z + Sets the z data. + zauto + Determines whether or not the color domain is computed + with respect to the input data (here in `z`) or the + bounds set in `zmin` and `zmax` Defaults to `false` + when `zmin` and `zmax` are set by the user. + zmax + Sets the upper bound of the color domain. Value should + have the same units as in `z` and if set, `zmin` must + be set as well. + zmid + Sets the mid-point of the color domain by scaling + `zmin` and/or `zmax` to be equidistant to this point. + Value should have the same units as in `z`. Has no + effect when `zauto` is `false`. + zmin + Sets the lower bound of the color domain. Value should + have the same units as in `z` and if set, `zmax` must + be set as well. + zorder + Sets the layer on which this trace is displayed, + relative to other SVG traces on the same subplot. SVG + traces with higher `zorder` appear in front of those + with lower `zorder`. + zsrc + Sets the source reference on Chart Studio Cloud for + `z`. + row : 'all', int or None (default) + Subplot row index (starting from 1) for the trace to be + added. Only valid if figure was created using + `plotly.tools.make_subplots`.If 'all', addresses all + rows in the specified column(s). + col : 'all', int or None (default) + Subplot col index (starting from 1) for the trace to be + added. Only valid if figure was created using + `plotly.tools.make_subplots`.If 'all', addresses all + columns in the specified row(s). + secondary_y: boolean or None (default None) + If True, associate this trace with the secondary y-axis of the + subplot at the specified row and col. Only valid if all of the + following conditions are satisfied: + * The figure was created using `plotly.subplots.make_subplots`. + * The row and col arguments are not None + * The subplot at the specified row and col has type xy + (which is the default) and secondary_y True. These + properties are specified in the specs argument to + make_subplots. See the make_subplots docstring for more info. + + Returns + ------- + FigureWidget + """ + from plotly.graph_objs import Contourcarpet + + new_trace = Contourcarpet( + a=a, + a0=a0, + asrc=asrc, + atype=atype, + autocolorscale=autocolorscale, + autocontour=autocontour, + b=b, + b0=b0, + bsrc=bsrc, + btype=btype, + carpet=carpet, + coloraxis=coloraxis, + colorbar=colorbar, + colorscale=colorscale, + contours=contours, + customdata=customdata, + customdatasrc=customdatasrc, + da=da, + db=db, + fillcolor=fillcolor, + hovertext=hovertext, + hovertextsrc=hovertextsrc, + ids=ids, + idssrc=idssrc, + legend=legend, + legendgroup=legendgroup, + legendgrouptitle=legendgrouptitle, + legendrank=legendrank, + legendwidth=legendwidth, + line=line, + meta=meta, + metasrc=metasrc, + name=name, + ncontours=ncontours, + opacity=opacity, + reversescale=reversescale, + showlegend=showlegend, + showscale=showscale, + stream=stream, + text=text, + textsrc=textsrc, + transpose=transpose, + uid=uid, + uirevision=uirevision, + visible=visible, + xaxis=xaxis, + yaxis=yaxis, + z=z, + zauto=zauto, + zmax=zmax, + zmid=zmid, + zmin=zmin, + zorder=zorder, + zsrc=zsrc, + **kwargs, + ) + return self.add_trace(new_trace, row=row, col=col, secondary_y=secondary_y) + + def add_densitymap( + self, + autocolorscale=None, + below=None, + coloraxis=None, + colorbar=None, + colorscale=None, + customdata=None, + customdatasrc=None, + hoverinfo=None, + hoverinfosrc=None, + hoverlabel=None, + hovertemplate=None, + hovertemplatefallback=None, + hovertemplatesrc=None, + hovertext=None, + hovertextsrc=None, + ids=None, + idssrc=None, + lat=None, + latsrc=None, + legend=None, + legendgroup=None, + legendgrouptitle=None, + legendrank=None, + legendwidth=None, + lon=None, + lonsrc=None, + meta=None, + metasrc=None, + name=None, + opacity=None, + radius=None, + radiussrc=None, + reversescale=None, + showlegend=None, + showscale=None, + stream=None, + subplot=None, + text=None, + textsrc=None, + uid=None, + uirevision=None, + visible=None, + z=None, + zauto=None, + zmax=None, + zmid=None, + zmin=None, + zsrc=None, + row=None, + col=None, + **kwargs, + ) -> "FigureWidget": + """ + Add a new Densitymap trace + + Draws a bivariate kernel density estimation with a Gaussian + kernel from `lon` and `lat` coordinates and optional `z` values + using a colorscale. + + Parameters + ---------- + autocolorscale + Determines whether the colorscale is a default palette + (`autocolorscale: true`) or the palette determined by + `colorscale`. In case `colorscale` is unspecified or + `autocolorscale` is true, the default palette will be + chosen according to whether numbers in the `color` + array are all positive, all negative or mixed. + below + Determines if the densitymap trace will be inserted + before the layer with the specified ID. By default, + densitymap traces are placed below the first layer of + type symbol If set to '', the layer will be inserted + above every existing layer. + coloraxis + Sets a reference to a shared color axis. References to + these shared color axes are "coloraxis", "coloraxis2", + "coloraxis3", etc. Settings for these shared color axes + are set in the layout, under `layout.coloraxis`, + `layout.coloraxis2`, etc. Note that multiple color + scales can be linked to the same color axis. + colorbar + :class:`plotly.graph_objects.densitymap.ColorBar` + instance or dict with compatible properties + colorscale + Sets the colorscale. The colorscale must be an array + containing arrays mapping a normalized value to an rgb, + rgba, hex, hsl, hsv, or named color string. At minimum, + a mapping for the lowest (0) and highest (1) values are + required. For example, `[[0, 'rgb(0,0,255)'], [1, + 'rgb(255,0,0)']]`. To control the bounds of the + colorscale in color space, use `zmin` and `zmax`. + Alternatively, `colorscale` may be a palette name + string of the following list: Blackbody,Bluered,Blues,C + ividis,Earth,Electric,Greens,Greys,Hot,Jet,Picnic,Portl + and,Rainbow,RdBu,Reds,Viridis,YlGnBu,YlOrRd. + customdata + Assigns extra data each datum. This may be useful when + listening to hover, click and selection events. Note + that, "scatter" traces also appends customdata items in + the markers DOM elements + customdatasrc + Sets the source reference on Chart Studio Cloud for + `customdata`. + hoverinfo + Determines which trace information appear on hover. If + `none` or `skip` are set, no information is displayed + upon hovering. But, if `none` is set, click and hover + events are still fired. + hoverinfosrc + Sets the source reference on Chart Studio Cloud for + `hoverinfo`. + hoverlabel + :class:`plotly.graph_objects.densitymap.Hoverlabel` + instance or dict with compatible properties + hovertemplate + Template string used for rendering the information that + appear on hover box. Note that this will override + `hoverinfo`. Variables are inserted using %{variable}, + for example "y: %{y}" as well as %{xother}, {%_xother}, + {%_xother_}, {%xother_}. When showing info for several + points, "xother" will be added to those with different + x positions from the first point. An underscore before + or after "(x|y)other" will add a space on that side, + only when this field is shown. Numbers are formatted + using d3-format's syntax %{variable:d3-format}, for + example "Price: %{y:$.2f}". + https://github.com/d3/d3-format/tree/v1.4.5#d3-format + for details on the formatting syntax. Dates are + formatted using d3-time-format's syntax + %{variable|d3-time-format}, for example "Day: + %{2019-01-01|%A}". https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format for details on the + date formatting syntax. Variables that can't be found + will be replaced with the specifier. For example, a + template of "data: %{x}, %{y}" will result in a value + of "data: 1, %{y}" if x is 1 and y is missing. + Variables with an undefined value will be replaced with + the fallback value. The variables available in + `hovertemplate` are the ones emitted as event data + described at this link + https://plotly.com/javascript/plotlyjs-events/#event- + data. Additionally, all attributes that can be + specified per-point (the ones that are `arrayOk: true`) + are available. Anything contained in tag `` is + displayed in the secondary box, for example + `%{fullData.name}`. To hide the + secondary box completely, use an empty tag + ``. + hovertemplatefallback + Fallback string that's displayed when a variable + referenced in a template is missing. If the boolean + value 'false' is passed in, the specifier with the + missing variable will be displayed. + hovertemplatesrc + Sets the source reference on Chart Studio Cloud for + `hovertemplate`. + hovertext + Sets hover text elements associated with each (lon,lat) + pair If a single string, the same string appears over + all the data points. If an array of string, the items + are mapped in order to the this trace's (lon,lat) + coordinates. To be seen, trace `hoverinfo` must contain + a "text" flag. + hovertextsrc + Sets the source reference on Chart Studio Cloud for + `hovertext`. + ids + Assigns id labels to each datum. These ids for object + constancy of data points during animation. Should be an + array of strings, not numbers or any other type. + idssrc + Sets the source reference on Chart Studio Cloud for + `ids`. + lat + Sets the latitude coordinates (in degrees North). + latsrc + Sets the source reference on Chart Studio Cloud for + `lat`. + legend + Sets the reference to a legend to show this trace in. + References to these legends are "legend", "legend2", + "legend3", etc. Settings for these legends are set in + the layout, under `layout.legend`, `layout.legend2`, + etc. + legendgroup + Sets the legend group for this trace. Traces and shapes + part of the same legend group hide/show at the same + time when toggling legend items. + legendgrouptitle + :class:`plotly.graph_objects.densitymap.Legendgrouptitl + e` instance or dict with compatible properties + legendrank + Sets the legend rank for this trace. Items and groups + with smaller ranks are presented on top/left side while + with "reversed" `legend.traceorder` they are on + bottom/right side. The default legendrank is 1000, so + that you can use ranks less than 1000 to place certain + items before all unranked items, and ranks greater than + 1000 to go after all unranked items. When having + unranked or equal rank items shapes would be displayed + after traces i.e. according to their order in data and + layout. + legendwidth + Sets the width (in px or fraction) of the legend for + this trace. + lon + Sets the longitude coordinates (in degrees East). + lonsrc + Sets the source reference on Chart Studio Cloud for + `lon`. + meta + Assigns extra meta information associated with this + trace that can be used in various text attributes. + Attributes such as trace `name`, graph, axis and + colorbar `title.text`, annotation `text` + `rangeselector`, `updatemenues` and `sliders` `label` + text all support `meta`. To access the trace `meta` + values in an attribute in the same trace, simply use + `%{meta[i]}` where `i` is the index or key of the + `meta` item in question. To access trace `meta` in + layout attributes, use `%{data[n[.meta[i]}` where `i` + is the index or key of the `meta` and `n` is the trace + index. + metasrc + Sets the source reference on Chart Studio Cloud for + `meta`. + name + Sets the trace name. The trace name appears as the + legend item and on hover. + opacity + Sets the opacity of the trace. + radius + Sets the radius of influence of one `lon` / `lat` point + in pixels. Increasing the value makes the densitymap + trace smoother, but less detailed. + radiussrc + Sets the source reference on Chart Studio Cloud for + `radius`. + reversescale + Reverses the color mapping if true. If true, `zmin` + will correspond to the last color in the array and + `zmax` will correspond to the first color. + showlegend + Determines whether or not an item corresponding to this + trace is shown in the legend. + showscale + Determines whether or not a colorbar is displayed for + this trace. + stream + :class:`plotly.graph_objects.densitymap.Stream` + instance or dict with compatible properties + subplot + Sets a reference between this trace's data coordinates + and a map subplot. If "map" (the default value), the + data refer to `layout.map`. If "map2", the data refer + to `layout.map2`, and so on. + text + Sets text elements associated with each (lon,lat) pair + If a single string, the same string appears over all + the data points. If an array of string, the items are + mapped in order to the this trace's (lon,lat) + coordinates. If trace `hoverinfo` contains a "text" + flag and "hovertext" is not set, these elements will be + seen in the hover labels. + textsrc + Sets the source reference on Chart Studio Cloud for + `text`. + uid + Assign an id to this trace, Use this to provide object + constancy between traces during animations and + transitions. + uirevision + Controls persistence of some user-driven changes to the + trace: `constraintrange` in `parcoords` traces, as well + as some `editable: true` modifications such as `name` + and `colorbar.title`. Defaults to `layout.uirevision`. + Note that other user-driven trace attribute changes are + controlled by `layout` attributes: `trace.visible` is + controlled by `layout.legend.uirevision`, + `selectedpoints` is controlled by + `layout.selectionrevision`, and `colorbar.(x|y)` + (accessible with `config: {editable: true}`) is + controlled by `layout.editrevision`. Trace changes are + tracked by `uid`, which only falls back on trace index + if no `uid` is provided. So if your app can add/remove + traces before the end of the `data` array, such that + the same trace has a different index, you can still + preserve user-driven changes if you give each trace a + `uid` that stays with it as it moves. + visible + Determines whether or not this trace is visible. If + "legendonly", the trace is not drawn, but can appear as + a legend item (provided that the legend itself is + visible). + z + Sets the points' weight. For example, a value of 10 + would be equivalent to having 10 points of weight 1 in + the same spot + zauto + Determines whether or not the color domain is computed + with respect to the input data (here in `z`) or the + bounds set in `zmin` and `zmax` Defaults to `false` + when `zmin` and `zmax` are set by the user. + zmax + Sets the upper bound of the color domain. Value should + have the same units as in `z` and if set, `zmin` must + be set as well. + zmid + Sets the mid-point of the color domain by scaling + `zmin` and/or `zmax` to be equidistant to this point. + Value should have the same units as in `z`. Has no + effect when `zauto` is `false`. + zmin + Sets the lower bound of the color domain. Value should + have the same units as in `z` and if set, `zmax` must + be set as well. + zsrc + Sets the source reference on Chart Studio Cloud for + `z`. + row : 'all', int or None (default) + Subplot row index (starting from 1) for the trace to be + added. Only valid if figure was created using + `plotly.tools.make_subplots`.If 'all', addresses all + rows in the specified column(s). + col : 'all', int or None (default) + Subplot col index (starting from 1) for the trace to be + added. Only valid if figure was created using + `plotly.tools.make_subplots`.If 'all', addresses all + columns in the specified row(s). + + Returns + ------- + FigureWidget + """ + from plotly.graph_objs import Densitymap + + new_trace = Densitymap( + autocolorscale=autocolorscale, + below=below, + coloraxis=coloraxis, + colorbar=colorbar, + colorscale=colorscale, + customdata=customdata, + customdatasrc=customdatasrc, + hoverinfo=hoverinfo, + hoverinfosrc=hoverinfosrc, + hoverlabel=hoverlabel, + hovertemplate=hovertemplate, + hovertemplatefallback=hovertemplatefallback, + hovertemplatesrc=hovertemplatesrc, + hovertext=hovertext, + hovertextsrc=hovertextsrc, + ids=ids, + idssrc=idssrc, + lat=lat, + latsrc=latsrc, + legend=legend, + legendgroup=legendgroup, + legendgrouptitle=legendgrouptitle, + legendrank=legendrank, + legendwidth=legendwidth, + lon=lon, + lonsrc=lonsrc, + meta=meta, + metasrc=metasrc, + name=name, + opacity=opacity, + radius=radius, + radiussrc=radiussrc, + reversescale=reversescale, + showlegend=showlegend, + showscale=showscale, + stream=stream, + subplot=subplot, + text=text, + textsrc=textsrc, + uid=uid, + uirevision=uirevision, + visible=visible, + z=z, + zauto=zauto, + zmax=zmax, + zmid=zmid, + zmin=zmin, + zsrc=zsrc, + **kwargs, + ) + return self.add_trace(new_trace, row=row, col=col) + + def add_densitymapbox( + self, + autocolorscale=None, + below=None, + coloraxis=None, + colorbar=None, + colorscale=None, + customdata=None, + customdatasrc=None, + hoverinfo=None, + hoverinfosrc=None, + hoverlabel=None, + hovertemplate=None, + hovertemplatefallback=None, + hovertemplatesrc=None, + hovertext=None, + hovertextsrc=None, + ids=None, + idssrc=None, + lat=None, + latsrc=None, + legend=None, + legendgroup=None, + legendgrouptitle=None, + legendrank=None, + legendwidth=None, + lon=None, + lonsrc=None, + meta=None, + metasrc=None, + name=None, + opacity=None, + radius=None, + radiussrc=None, + reversescale=None, + showlegend=None, + showscale=None, + stream=None, + subplot=None, + text=None, + textsrc=None, + uid=None, + uirevision=None, + visible=None, + z=None, + zauto=None, + zmax=None, + zmid=None, + zmin=None, + zsrc=None, + row=None, + col=None, + **kwargs, + ) -> "FigureWidget": + """ + Add a new Densitymapbox trace + + "densitymapbox" trace is deprecated! Please consider switching + to the "densitymap" trace type and `map` subplots. Learn more + at: https://plotly.com/python/maplibre-migration/ as well as + https://plotly.com/javascript/maplibre-migration/ Draws a + bivariate kernel density estimation with a Gaussian kernel from + `lon` and `lat` coordinates and optional `z` values using a + colorscale. + + Parameters + ---------- + autocolorscale + Determines whether the colorscale is a default palette + (`autocolorscale: true`) or the palette determined by + `colorscale`. In case `colorscale` is unspecified or + `autocolorscale` is true, the default palette will be + chosen according to whether numbers in the `color` + array are all positive, all negative or mixed. + below + Determines if the densitymapbox trace will be inserted + before the layer with the specified ID. By default, + densitymapbox traces are placed below the first layer + of type symbol If set to '', the layer will be inserted + above every existing layer. + coloraxis + Sets a reference to a shared color axis. References to + these shared color axes are "coloraxis", "coloraxis2", + "coloraxis3", etc. Settings for these shared color axes + are set in the layout, under `layout.coloraxis`, + `layout.coloraxis2`, etc. Note that multiple color + scales can be linked to the same color axis. + colorbar + :class:`plotly.graph_objects.densitymapbox.ColorBar` + instance or dict with compatible properties + colorscale + Sets the colorscale. The colorscale must be an array + containing arrays mapping a normalized value to an rgb, + rgba, hex, hsl, hsv, or named color string. At minimum, + a mapping for the lowest (0) and highest (1) values are + required. For example, `[[0, 'rgb(0,0,255)'], [1, + 'rgb(255,0,0)']]`. To control the bounds of the + colorscale in color space, use `zmin` and `zmax`. + Alternatively, `colorscale` may be a palette name + string of the following list: Blackbody,Bluered,Blues,C + ividis,Earth,Electric,Greens,Greys,Hot,Jet,Picnic,Portl + and,Rainbow,RdBu,Reds,Viridis,YlGnBu,YlOrRd. + customdata + Assigns extra data each datum. This may be useful when + listening to hover, click and selection events. Note + that, "scatter" traces also appends customdata items in + the markers DOM elements + customdatasrc + Sets the source reference on Chart Studio Cloud for + `customdata`. + hoverinfo + Determines which trace information appear on hover. If + `none` or `skip` are set, no information is displayed + upon hovering. But, if `none` is set, click and hover + events are still fired. + hoverinfosrc + Sets the source reference on Chart Studio Cloud for + `hoverinfo`. + hoverlabel + :class:`plotly.graph_objects.densitymapbox.Hoverlabel` + instance or dict with compatible properties + hovertemplate + Template string used for rendering the information that + appear on hover box. Note that this will override + `hoverinfo`. Variables are inserted using %{variable}, + for example "y: %{y}" as well as %{xother}, {%_xother}, + {%_xother_}, {%xother_}. When showing info for several + points, "xother" will be added to those with different + x positions from the first point. An underscore before + or after "(x|y)other" will add a space on that side, + only when this field is shown. Numbers are formatted + using d3-format's syntax %{variable:d3-format}, for + example "Price: %{y:$.2f}". + https://github.com/d3/d3-format/tree/v1.4.5#d3-format + for details on the formatting syntax. Dates are + formatted using d3-time-format's syntax + %{variable|d3-time-format}, for example "Day: + %{2019-01-01|%A}". https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format for details on the + date formatting syntax. Variables that can't be found + will be replaced with the specifier. For example, a + template of "data: %{x}, %{y}" will result in a value + of "data: 1, %{y}" if x is 1 and y is missing. + Variables with an undefined value will be replaced with + the fallback value. The variables available in + `hovertemplate` are the ones emitted as event data + described at this link + https://plotly.com/javascript/plotlyjs-events/#event- + data. Additionally, all attributes that can be + specified per-point (the ones that are `arrayOk: true`) + are available. Anything contained in tag `` is + displayed in the secondary box, for example + `%{fullData.name}`. To hide the + secondary box completely, use an empty tag + ``. + hovertemplatefallback + Fallback string that's displayed when a variable + referenced in a template is missing. If the boolean + value 'false' is passed in, the specifier with the + missing variable will be displayed. + hovertemplatesrc + Sets the source reference on Chart Studio Cloud for + `hovertemplate`. + hovertext + Sets hover text elements associated with each (lon,lat) + pair If a single string, the same string appears over + all the data points. If an array of string, the items + are mapped in order to the this trace's (lon,lat) + coordinates. To be seen, trace `hoverinfo` must contain + a "text" flag. + hovertextsrc + Sets the source reference on Chart Studio Cloud for + `hovertext`. + ids + Assigns id labels to each datum. These ids for object + constancy of data points during animation. Should be an + array of strings, not numbers or any other type. + idssrc + Sets the source reference on Chart Studio Cloud for + `ids`. + lat + Sets the latitude coordinates (in degrees North). + latsrc + Sets the source reference on Chart Studio Cloud for + `lat`. + legend + Sets the reference to a legend to show this trace in. + References to these legends are "legend", "legend2", + "legend3", etc. Settings for these legends are set in + the layout, under `layout.legend`, `layout.legend2`, + etc. + legendgroup + Sets the legend group for this trace. Traces and shapes + part of the same legend group hide/show at the same + time when toggling legend items. + legendgrouptitle + :class:`plotly.graph_objects.densitymapbox.Legendgroupt + itle` instance or dict with compatible properties + legendrank + Sets the legend rank for this trace. Items and groups + with smaller ranks are presented on top/left side while + with "reversed" `legend.traceorder` they are on + bottom/right side. The default legendrank is 1000, so + that you can use ranks less than 1000 to place certain + items before all unranked items, and ranks greater than + 1000 to go after all unranked items. When having + unranked or equal rank items shapes would be displayed + after traces i.e. according to their order in data and + layout. + legendwidth + Sets the width (in px or fraction) of the legend for + this trace. + lon + Sets the longitude coordinates (in degrees East). + lonsrc + Sets the source reference on Chart Studio Cloud for + `lon`. + meta + Assigns extra meta information associated with this + trace that can be used in various text attributes. + Attributes such as trace `name`, graph, axis and + colorbar `title.text`, annotation `text` + `rangeselector`, `updatemenues` and `sliders` `label` + text all support `meta`. To access the trace `meta` + values in an attribute in the same trace, simply use + `%{meta[i]}` where `i` is the index or key of the + `meta` item in question. To access trace `meta` in + layout attributes, use `%{data[n[.meta[i]}` where `i` + is the index or key of the `meta` and `n` is the trace + index. + metasrc + Sets the source reference on Chart Studio Cloud for + `meta`. + name + Sets the trace name. The trace name appears as the + legend item and on hover. + opacity + Sets the opacity of the trace. + radius + Sets the radius of influence of one `lon` / `lat` point + in pixels. Increasing the value makes the densitymapbox + trace smoother, but less detailed. + radiussrc + Sets the source reference on Chart Studio Cloud for + `radius`. + reversescale + Reverses the color mapping if true. If true, `zmin` + will correspond to the last color in the array and + `zmax` will correspond to the first color. + showlegend + Determines whether or not an item corresponding to this + trace is shown in the legend. + showscale + Determines whether or not a colorbar is displayed for + this trace. + stream + :class:`plotly.graph_objects.densitymapbox.Stream` + instance or dict with compatible properties + subplot + mapbox subplots and traces are deprecated! Please + consider switching to `map` subplots and traces. Learn + more at: https://plotly.com/python/maplibre-migration/ + as well as https://plotly.com/javascript/maplibre- + migration/ Sets a reference between this trace's data + coordinates and a mapbox subplot. If "mapbox" (the + default value), the data refer to `layout.mapbox`. If + "mapbox2", the data refer to `layout.mapbox2`, and so + on. + text + Sets text elements associated with each (lon,lat) pair + If a single string, the same string appears over all + the data points. If an array of string, the items are + mapped in order to the this trace's (lon,lat) + coordinates. If trace `hoverinfo` contains a "text" + flag and "hovertext" is not set, these elements will be + seen in the hover labels. + textsrc + Sets the source reference on Chart Studio Cloud for + `text`. + uid + Assign an id to this trace, Use this to provide object + constancy between traces during animations and + transitions. + uirevision + Controls persistence of some user-driven changes to the + trace: `constraintrange` in `parcoords` traces, as well + as some `editable: true` modifications such as `name` + and `colorbar.title`. Defaults to `layout.uirevision`. + Note that other user-driven trace attribute changes are + controlled by `layout` attributes: `trace.visible` is + controlled by `layout.legend.uirevision`, + `selectedpoints` is controlled by + `layout.selectionrevision`, and `colorbar.(x|y)` + (accessible with `config: {editable: true}`) is + controlled by `layout.editrevision`. Trace changes are + tracked by `uid`, which only falls back on trace index + if no `uid` is provided. So if your app can add/remove + traces before the end of the `data` array, such that + the same trace has a different index, you can still + preserve user-driven changes if you give each trace a + `uid` that stays with it as it moves. + visible + Determines whether or not this trace is visible. If + "legendonly", the trace is not drawn, but can appear as + a legend item (provided that the legend itself is + visible). + z + Sets the points' weight. For example, a value of 10 + would be equivalent to having 10 points of weight 1 in + the same spot + zauto + Determines whether or not the color domain is computed + with respect to the input data (here in `z`) or the + bounds set in `zmin` and `zmax` Defaults to `false` + when `zmin` and `zmax` are set by the user. + zmax + Sets the upper bound of the color domain. Value should + have the same units as in `z` and if set, `zmin` must + be set as well. + zmid + Sets the mid-point of the color domain by scaling + `zmin` and/or `zmax` to be equidistant to this point. + Value should have the same units as in `z`. Has no + effect when `zauto` is `false`. + zmin + Sets the lower bound of the color domain. Value should + have the same units as in `z` and if set, `zmax` must + be set as well. + zsrc + Sets the source reference on Chart Studio Cloud for + `z`. + row : 'all', int or None (default) + Subplot row index (starting from 1) for the trace to be + added. Only valid if figure was created using + `plotly.tools.make_subplots`.If 'all', addresses all + rows in the specified column(s). + col : 'all', int or None (default) + Subplot col index (starting from 1) for the trace to be + added. Only valid if figure was created using + `plotly.tools.make_subplots`.If 'all', addresses all + columns in the specified row(s). + + Returns + ------- + FigureWidget + """ + from plotly.graph_objs import Densitymapbox + + new_trace = Densitymapbox( + autocolorscale=autocolorscale, + below=below, + coloraxis=coloraxis, + colorbar=colorbar, + colorscale=colorscale, + customdata=customdata, + customdatasrc=customdatasrc, + hoverinfo=hoverinfo, + hoverinfosrc=hoverinfosrc, + hoverlabel=hoverlabel, + hovertemplate=hovertemplate, + hovertemplatefallback=hovertemplatefallback, + hovertemplatesrc=hovertemplatesrc, + hovertext=hovertext, + hovertextsrc=hovertextsrc, + ids=ids, + idssrc=idssrc, + lat=lat, + latsrc=latsrc, + legend=legend, + legendgroup=legendgroup, + legendgrouptitle=legendgrouptitle, + legendrank=legendrank, + legendwidth=legendwidth, + lon=lon, + lonsrc=lonsrc, + meta=meta, + metasrc=metasrc, + name=name, + opacity=opacity, + radius=radius, + radiussrc=radiussrc, + reversescale=reversescale, + showlegend=showlegend, + showscale=showscale, + stream=stream, + subplot=subplot, + text=text, + textsrc=textsrc, + uid=uid, + uirevision=uirevision, + visible=visible, + z=z, + zauto=zauto, + zmax=zmax, + zmid=zmid, + zmin=zmin, + zsrc=zsrc, + **kwargs, + ) + return self.add_trace(new_trace, row=row, col=col) + + def add_funnel( + self, + alignmentgroup=None, + cliponaxis=None, + connector=None, + constraintext=None, + customdata=None, + customdatasrc=None, + dx=None, + dy=None, + hoverinfo=None, + hoverinfosrc=None, + hoverlabel=None, + hovertemplate=None, + hovertemplatefallback=None, + hovertemplatesrc=None, + hovertext=None, + hovertextsrc=None, + ids=None, + idssrc=None, + insidetextanchor=None, + insidetextfont=None, + legend=None, + legendgroup=None, + legendgrouptitle=None, + legendrank=None, + legendwidth=None, + marker=None, + meta=None, + metasrc=None, + name=None, + offset=None, + offsetgroup=None, + opacity=None, + orientation=None, + outsidetextfont=None, + selectedpoints=None, + showlegend=None, + stream=None, + text=None, + textangle=None, + textfont=None, + textinfo=None, + textposition=None, + textpositionsrc=None, + textsrc=None, + texttemplate=None, + texttemplatefallback=None, + texttemplatesrc=None, + uid=None, + uirevision=None, + visible=None, + width=None, + x=None, + x0=None, + xaxis=None, + xhoverformat=None, + xperiod=None, + xperiod0=None, + xperiodalignment=None, + xsrc=None, + y=None, + y0=None, + yaxis=None, + yhoverformat=None, + yperiod=None, + yperiod0=None, + yperiodalignment=None, + ysrc=None, + zorder=None, + row=None, + col=None, + secondary_y=None, + **kwargs, + ) -> "FigureWidget": + """ + Add a new Funnel trace + + Visualize stages in a process using length-encoded bars. This + trace can be used to show data in either a part-to-whole + representation wherein each item appears in a single stage, or + in a "drop-off" representation wherein each item appears in + each stage it traversed. See also the "funnelarea" trace type + for a different approach to visualizing funnel data. + + Parameters + ---------- + alignmentgroup + Set several traces linked to the same position axis or + matching axes to the same alignmentgroup. This controls + whether bars compute their positional range dependently + or independently. + cliponaxis + Determines whether the text nodes are clipped about the + subplot axes. To show the text nodes above axis lines + and tick labels, make sure to set `xaxis.layer` and + `yaxis.layer` to *below traces*. + connector + :class:`plotly.graph_objects.funnel.Connector` instance + or dict with compatible properties + constraintext + Constrain the size of text inside or outside a bar to + be no larger than the bar itself. + customdata + Assigns extra data each datum. This may be useful when + listening to hover, click and selection events. Note + that, "scatter" traces also appends customdata items in + the markers DOM elements + customdatasrc + Sets the source reference on Chart Studio Cloud for + `customdata`. + dx + Sets the x coordinate step. See `x0` for more info. + dy + Sets the y coordinate step. See `y0` for more info. + hoverinfo + Determines which trace information appear on hover. If + `none` or `skip` are set, no information is displayed + upon hovering. But, if `none` is set, click and hover + events are still fired. + hoverinfosrc + Sets the source reference on Chart Studio Cloud for + `hoverinfo`. + hoverlabel + :class:`plotly.graph_objects.funnel.Hoverlabel` + instance or dict with compatible properties + hovertemplate + Template string used for rendering the information that + appear on hover box. Note that this will override + `hoverinfo`. Variables are inserted using %{variable}, + for example "y: %{y}" as well as %{xother}, {%_xother}, + {%_xother_}, {%xother_}. When showing info for several + points, "xother" will be added to those with different + x positions from the first point. An underscore before + or after "(x|y)other" will add a space on that side, + only when this field is shown. Numbers are formatted + using d3-format's syntax %{variable:d3-format}, for + example "Price: %{y:$.2f}". + https://github.com/d3/d3-format/tree/v1.4.5#d3-format + for details on the formatting syntax. Dates are + formatted using d3-time-format's syntax + %{variable|d3-time-format}, for example "Day: + %{2019-01-01|%A}". https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format for details on the + date formatting syntax. Variables that can't be found + will be replaced with the specifier. For example, a + template of "data: %{x}, %{y}" will result in a value + of "data: 1, %{y}" if x is 1 and y is missing. + Variables with an undefined value will be replaced with + the fallback value. The variables available in + `hovertemplate` are the ones emitted as event data + described at this link + https://plotly.com/javascript/plotlyjs-events/#event- + data. Additionally, all attributes that can be + specified per-point (the ones that are `arrayOk: true`) + are available. Finally, the template string has access + to variables `percentInitial`, `percentPrevious` and + `percentTotal`. Anything contained in tag `` is + displayed in the secondary box, for example + `%{fullData.name}`. To hide the + secondary box completely, use an empty tag + ``. + hovertemplatefallback + Fallback string that's displayed when a variable + referenced in a template is missing. If the boolean + value 'false' is passed in, the specifier with the + missing variable will be displayed. + hovertemplatesrc + Sets the source reference on Chart Studio Cloud for + `hovertemplate`. + hovertext + Sets hover text elements associated with each (x,y) + pair. If a single string, the same string appears over + all the data points. If an array of string, the items + are mapped in order to the this trace's (x,y) + coordinates. To be seen, trace `hoverinfo` must contain + a "text" flag. + hovertextsrc + Sets the source reference on Chart Studio Cloud for + `hovertext`. + ids + Assigns id labels to each datum. These ids for object + constancy of data points during animation. Should be an + array of strings, not numbers or any other type. + idssrc + Sets the source reference on Chart Studio Cloud for + `ids`. + insidetextanchor + Determines if texts are kept at center or start/end + points in `textposition` "inside" mode. + insidetextfont + Sets the font used for `text` lying inside the bar. + legend + Sets the reference to a legend to show this trace in. + References to these legends are "legend", "legend2", + "legend3", etc. Settings for these legends are set in + the layout, under `layout.legend`, `layout.legend2`, + etc. + legendgroup + Sets the legend group for this trace. Traces and shapes + part of the same legend group hide/show at the same + time when toggling legend items. + legendgrouptitle + :class:`plotly.graph_objects.funnel.Legendgrouptitle` + instance or dict with compatible properties + legendrank + Sets the legend rank for this trace. Items and groups + with smaller ranks are presented on top/left side while + with "reversed" `legend.traceorder` they are on + bottom/right side. The default legendrank is 1000, so + that you can use ranks less than 1000 to place certain + items before all unranked items, and ranks greater than + 1000 to go after all unranked items. When having + unranked or equal rank items shapes would be displayed + after traces i.e. according to their order in data and + layout. + legendwidth + Sets the width (in px or fraction) of the legend for + this trace. + marker + :class:`plotly.graph_objects.funnel.Marker` instance or + dict with compatible properties + meta + Assigns extra meta information associated with this + trace that can be used in various text attributes. + Attributes such as trace `name`, graph, axis and + colorbar `title.text`, annotation `text` + `rangeselector`, `updatemenues` and `sliders` `label` + text all support `meta`. To access the trace `meta` + values in an attribute in the same trace, simply use + `%{meta[i]}` where `i` is the index or key of the + `meta` item in question. To access trace `meta` in + layout attributes, use `%{data[n[.meta[i]}` where `i` + is the index or key of the `meta` and `n` is the trace + index. + metasrc + Sets the source reference on Chart Studio Cloud for + `meta`. + name + Sets the trace name. The trace name appears as the + legend item and on hover. + offset + Shifts the position where the bar is drawn (in position + axis units). In "group" barmode, traces that set + "offset" will be excluded and drawn in "overlay" mode + instead. + offsetgroup + Set several traces linked to the same position axis or + matching axes to the same offsetgroup where bars of the + same position coordinate will line up. + opacity + Sets the opacity of the trace. + orientation + Sets the orientation of the funnels. With "v" ("h"), + the value of the each bar spans along the vertical + (horizontal). By default funnels are tend to be + oriented horizontally; unless only "y" array is + presented or orientation is set to "v". Also regarding + graphs including only 'horizontal' funnels, "autorange" + on the "y-axis" are set to "reversed". + outsidetextfont + Sets the font used for `text` lying outside the bar. + selectedpoints + Array containing integer indices of selected points. + Has an effect only for traces that support selections. + Note that an empty array means an empty selection where + the `unselected` are turned on for all points, whereas, + any other non-array values means no selection all where + the `selected` and `unselected` styles have no effect. + showlegend + Determines whether or not an item corresponding to this + trace is shown in the legend. + stream + :class:`plotly.graph_objects.funnel.Stream` instance or + dict with compatible properties + text + Sets text elements associated with each (x,y) pair. If + a single string, the same string appears over all the + data points. If an array of string, the items are + mapped in order to the this trace's (x,y) coordinates. + If trace `hoverinfo` contains a "text" flag and + "hovertext" is not set, these elements will be seen in + the hover labels. + textangle + Sets the angle of the tick labels with respect to the + bar. For example, a `tickangle` of -90 draws the tick + labels vertically. With "auto" the texts may + automatically be rotated to fit with the maximum size + in bars. + textfont + Sets the font used for `text`. + textinfo + Determines which trace information appear on the graph. + In the case of having multiple funnels, percentages & + totals are computed separately (per trace). + textposition + Specifies the location of the `text`. "inside" + positions `text` inside, next to the bar end (rotated + and scaled if needed). "outside" positions `text` + outside, next to the bar end (scaled if needed), unless + there is another bar stacked on this one, then the text + gets pushed inside. "auto" tries to position `text` + inside the bar, but if the bar is too small and no bar + is stacked on this one the text is moved outside. If + "none", no text appears. + textpositionsrc + Sets the source reference on Chart Studio Cloud for + `textposition`. + textsrc + Sets the source reference on Chart Studio Cloud for + `text`. + texttemplate + Template string used for rendering the information text + that appears on points. Note that this will override + `textinfo`. Variables are inserted using %{variable}, + for example "y: %{y}". Numbers are formatted using + d3-format's syntax %{variable:d3-format}, for example + "Price: %{y:$.2f}". + https://github.com/d3/d3-format/tree/v1.4.5#d3-format + for details on the formatting syntax. Dates are + formatted using d3-time-format's syntax + %{variable|d3-time-format}, for example "Day: + %{2019-01-01|%A}". https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format for details on the + date formatting syntax. Variables that can't be found + will be replaced with the specifier. For example, a + template of "data: %{x}, %{y}" will result in a value + of "data: 1, %{y}" if x is 1 and y is missing. + Variables with an undefined value will be replaced with + the fallback value. All attributes that can be + specified per-point (the ones that are `arrayOk: true`) + are available. Finally, the template string has access + to variables `percentInitial`, `percentPrevious`, + `percentTotal`, `label` and `value`. + texttemplatefallback + Fallback string that's displayed when a variable + referenced in a template is missing. If the boolean + value 'false' is passed in, the specifier with the + missing variable will be displayed. + texttemplatesrc + Sets the source reference on Chart Studio Cloud for + `texttemplate`. + uid + Assign an id to this trace, Use this to provide object + constancy between traces during animations and + transitions. + uirevision + Controls persistence of some user-driven changes to the + trace: `constraintrange` in `parcoords` traces, as well + as some `editable: true` modifications such as `name` + and `colorbar.title`. Defaults to `layout.uirevision`. + Note that other user-driven trace attribute changes are + controlled by `layout` attributes: `trace.visible` is + controlled by `layout.legend.uirevision`, + `selectedpoints` is controlled by + `layout.selectionrevision`, and `colorbar.(x|y)` + (accessible with `config: {editable: true}`) is + controlled by `layout.editrevision`. Trace changes are + tracked by `uid`, which only falls back on trace index + if no `uid` is provided. So if your app can add/remove + traces before the end of the `data` array, such that + the same trace has a different index, you can still + preserve user-driven changes if you give each trace a + `uid` that stays with it as it moves. + visible + Determines whether or not this trace is visible. If + "legendonly", the trace is not drawn, but can appear as + a legend item (provided that the legend itself is + visible). + width + Sets the bar width (in position axis units). + x + Sets the x coordinates. + x0 + Alternate to `x`. Builds a linear space of x + coordinates. Use with `dx` where `x0` is the starting + coordinate and `dx` the step. + xaxis + Sets a reference between this trace's x coordinates and + a 2D cartesian x axis. If "x" (the default value), the + x coordinates refer to `layout.xaxis`. If "x2", the x + coordinates refer to `layout.xaxis2`, and so on. + xhoverformat + Sets the hover text formatting rulefor `x` using d3 + formatting mini-languages which are very similar to + those in Python. For numbers, see: + https://github.com/d3/d3-format/tree/v1.4.5#d3-format. + And for dates see: https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format. We add two items to + d3's date formatter: "%h" for half of the year as a + decimal number as well as "%{n}f" for fractional + seconds with n digits. For example, *2016-10-13 + 09:15:23.456* with tickformat "%H~%M~%S.%2f" would + display *09~15~23.46*By default the values are + formatted using `xaxis.hoverformat`. + xperiod + Only relevant when the axis `type` is "date". Sets the + period positioning in milliseconds or "M" on the x + axis. Special values in the form of "M" could be + used to declare the number of months. In this case `n` + must be a positive integer. + xperiod0 + Only relevant when the axis `type` is "date". Sets the + base for period positioning in milliseconds or date + string on the x0 axis. When `x0period` is round number + of weeks, the `x0period0` by default would be on a + Sunday i.e. 2000-01-02, otherwise it would be at + 2000-01-01. + xperiodalignment + Only relevant when the axis `type` is "date". Sets the + alignment of data points on the x axis. + xsrc + Sets the source reference on Chart Studio Cloud for + `x`. + y + Sets the y coordinates. + y0 + Alternate to `y`. Builds a linear space of y + coordinates. Use with `dy` where `y0` is the starting + coordinate and `dy` the step. + yaxis + Sets a reference between this trace's y coordinates and + a 2D cartesian y axis. If "y" (the default value), the + y coordinates refer to `layout.yaxis`. If "y2", the y + coordinates refer to `layout.yaxis2`, and so on. + yhoverformat + Sets the hover text formatting rulefor `y` using d3 + formatting mini-languages which are very similar to + those in Python. For numbers, see: + https://github.com/d3/d3-format/tree/v1.4.5#d3-format. + And for dates see: https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format. We add two items to + d3's date formatter: "%h" for half of the year as a + decimal number as well as "%{n}f" for fractional + seconds with n digits. For example, *2016-10-13 + 09:15:23.456* with tickformat "%H~%M~%S.%2f" would + display *09~15~23.46*By default the values are + formatted using `yaxis.hoverformat`. + yperiod + Only relevant when the axis `type` is "date". Sets the + period positioning in milliseconds or "M" on the y + axis. Special values in the form of "M" could be + used to declare the number of months. In this case `n` + must be a positive integer. + yperiod0 + Only relevant when the axis `type` is "date". Sets the + base for period positioning in milliseconds or date + string on the y0 axis. When `y0period` is round number + of weeks, the `y0period0` by default would be on a + Sunday i.e. 2000-01-02, otherwise it would be at + 2000-01-01. + yperiodalignment + Only relevant when the axis `type` is "date". Sets the + alignment of data points on the y axis. + ysrc + Sets the source reference on Chart Studio Cloud for + `y`. + zorder + Sets the layer on which this trace is displayed, + relative to other SVG traces on the same subplot. SVG + traces with higher `zorder` appear in front of those + with lower `zorder`. + row : 'all', int or None (default) + Subplot row index (starting from 1) for the trace to be + added. Only valid if figure was created using + `plotly.tools.make_subplots`.If 'all', addresses all + rows in the specified column(s). + col : 'all', int or None (default) + Subplot col index (starting from 1) for the trace to be + added. Only valid if figure was created using + `plotly.tools.make_subplots`.If 'all', addresses all + columns in the specified row(s). + secondary_y: boolean or None (default None) + If True, associate this trace with the secondary y-axis of the + subplot at the specified row and col. Only valid if all of the + following conditions are satisfied: + * The figure was created using `plotly.subplots.make_subplots`. + * The row and col arguments are not None + * The subplot at the specified row and col has type xy + (which is the default) and secondary_y True. These + properties are specified in the specs argument to + make_subplots. See the make_subplots docstring for more info. + + Returns + ------- + FigureWidget + """ + from plotly.graph_objs import Funnel + + new_trace = Funnel( + alignmentgroup=alignmentgroup, + cliponaxis=cliponaxis, + connector=connector, + constraintext=constraintext, + customdata=customdata, + customdatasrc=customdatasrc, + dx=dx, + dy=dy, + hoverinfo=hoverinfo, + hoverinfosrc=hoverinfosrc, + hoverlabel=hoverlabel, + hovertemplate=hovertemplate, + hovertemplatefallback=hovertemplatefallback, + hovertemplatesrc=hovertemplatesrc, + hovertext=hovertext, + hovertextsrc=hovertextsrc, + ids=ids, + idssrc=idssrc, + insidetextanchor=insidetextanchor, + insidetextfont=insidetextfont, + legend=legend, + legendgroup=legendgroup, + legendgrouptitle=legendgrouptitle, + legendrank=legendrank, + legendwidth=legendwidth, + marker=marker, + meta=meta, + metasrc=metasrc, + name=name, + offset=offset, + offsetgroup=offsetgroup, + opacity=opacity, + orientation=orientation, + outsidetextfont=outsidetextfont, + selectedpoints=selectedpoints, + showlegend=showlegend, + stream=stream, + text=text, + textangle=textangle, + textfont=textfont, + textinfo=textinfo, + textposition=textposition, + textpositionsrc=textpositionsrc, + textsrc=textsrc, + texttemplate=texttemplate, + texttemplatefallback=texttemplatefallback, + texttemplatesrc=texttemplatesrc, + uid=uid, + uirevision=uirevision, + visible=visible, + width=width, + x=x, + x0=x0, + xaxis=xaxis, + xhoverformat=xhoverformat, + xperiod=xperiod, + xperiod0=xperiod0, + xperiodalignment=xperiodalignment, + xsrc=xsrc, + y=y, + y0=y0, + yaxis=yaxis, + yhoverformat=yhoverformat, + yperiod=yperiod, + yperiod0=yperiod0, + yperiodalignment=yperiodalignment, + ysrc=ysrc, + zorder=zorder, + **kwargs, + ) + return self.add_trace(new_trace, row=row, col=col, secondary_y=secondary_y) + + def add_funnelarea( + self, + aspectratio=None, + baseratio=None, + customdata=None, + customdatasrc=None, + dlabel=None, + domain=None, + hoverinfo=None, + hoverinfosrc=None, + hoverlabel=None, + hovertemplate=None, + hovertemplatefallback=None, + hovertemplatesrc=None, + hovertext=None, + hovertextsrc=None, + ids=None, + idssrc=None, + insidetextfont=None, + label0=None, + labels=None, + labelssrc=None, + legend=None, + legendgroup=None, + legendgrouptitle=None, + legendrank=None, + legendwidth=None, + marker=None, + meta=None, + metasrc=None, + name=None, + opacity=None, + scalegroup=None, + showlegend=None, + stream=None, + text=None, + textfont=None, + textinfo=None, + textposition=None, + textpositionsrc=None, + textsrc=None, + texttemplate=None, + texttemplatefallback=None, + texttemplatesrc=None, + title=None, + uid=None, + uirevision=None, + values=None, + valuessrc=None, + visible=None, + row=None, + col=None, + **kwargs, + ) -> "FigureWidget": + """ + Add a new Funnelarea trace + + Visualize stages in a process using area-encoded trapezoids. + This trace can be used to show data in a part-to-whole + representation similar to a "pie" trace, wherein each item + appears in a single stage. See also the "funnel" trace type for + a different approach to visualizing funnel data. + + Parameters + ---------- + aspectratio + Sets the ratio between height and width + baseratio + Sets the ratio between bottom length and maximum top + length. + customdata + Assigns extra data each datum. This may be useful when + listening to hover, click and selection events. Note + that, "scatter" traces also appends customdata items in + the markers DOM elements + customdatasrc + Sets the source reference on Chart Studio Cloud for + `customdata`. + dlabel + Sets the label step. See `label0` for more info. + domain + :class:`plotly.graph_objects.funnelarea.Domain` + instance or dict with compatible properties + hoverinfo + Determines which trace information appear on hover. If + `none` or `skip` are set, no information is displayed + upon hovering. But, if `none` is set, click and hover + events are still fired. + hoverinfosrc + Sets the source reference on Chart Studio Cloud for + `hoverinfo`. + hoverlabel + :class:`plotly.graph_objects.funnelarea.Hoverlabel` + instance or dict with compatible properties + hovertemplate + Template string used for rendering the information that + appear on hover box. Note that this will override + `hoverinfo`. Variables are inserted using %{variable}, + for example "y: %{y}" as well as %{xother}, {%_xother}, + {%_xother_}, {%xother_}. When showing info for several + points, "xother" will be added to those with different + x positions from the first point. An underscore before + or after "(x|y)other" will add a space on that side, + only when this field is shown. Numbers are formatted + using d3-format's syntax %{variable:d3-format}, for + example "Price: %{y:$.2f}". + https://github.com/d3/d3-format/tree/v1.4.5#d3-format + for details on the formatting syntax. Dates are + formatted using d3-time-format's syntax + %{variable|d3-time-format}, for example "Day: + %{2019-01-01|%A}". https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format for details on the + date formatting syntax. Variables that can't be found + will be replaced with the specifier. For example, a + template of "data: %{x}, %{y}" will result in a value + of "data: 1, %{y}" if x is 1 and y is missing. + Variables with an undefined value will be replaced with + the fallback value. The variables available in + `hovertemplate` are the ones emitted as event data + described at this link + https://plotly.com/javascript/plotlyjs-events/#event- + data. Additionally, all attributes that can be + specified per-point (the ones that are `arrayOk: true`) + are available. Finally, the template string has access + to variables `label`, `color`, `value`, `text` and + `percent`. Anything contained in tag `` is + displayed in the secondary box, for example + `%{fullData.name}`. To hide the + secondary box completely, use an empty tag + ``. + hovertemplatefallback + Fallback string that's displayed when a variable + referenced in a template is missing. If the boolean + value 'false' is passed in, the specifier with the + missing variable will be displayed. + hovertemplatesrc + Sets the source reference on Chart Studio Cloud for + `hovertemplate`. + hovertext + Sets hover text elements associated with each sector. + If a single string, the same string appears for all + data points. If an array of string, the items are + mapped in order of this trace's sectors. To be seen, + trace `hoverinfo` must contain a "text" flag. + hovertextsrc + Sets the source reference on Chart Studio Cloud for + `hovertext`. + ids + Assigns id labels to each datum. These ids for object + constancy of data points during animation. Should be an + array of strings, not numbers or any other type. + idssrc + Sets the source reference on Chart Studio Cloud for + `ids`. + insidetextfont + Sets the font used for `textinfo` lying inside the + sector. + label0 + Alternate to `labels`. Builds a numeric set of labels. + Use with `dlabel` where `label0` is the starting label + and `dlabel` the step. + labels + Sets the sector labels. If `labels` entries are + duplicated, we sum associated `values` or simply count + occurrences if `values` is not provided. For other + array attributes (including color) we use the first + non-empty entry among all occurrences of the label. + labelssrc + Sets the source reference on Chart Studio Cloud for + `labels`. + legend + Sets the reference to a legend to show this trace in. + References to these legends are "legend", "legend2", + "legend3", etc. Settings for these legends are set in + the layout, under `layout.legend`, `layout.legend2`, + etc. + legendgroup + Sets the legend group for this trace. Traces and shapes + part of the same legend group hide/show at the same + time when toggling legend items. + legendgrouptitle + :class:`plotly.graph_objects.funnelarea.Legendgrouptitl + e` instance or dict with compatible properties + legendrank + Sets the legend rank for this trace. Items and groups + with smaller ranks are presented on top/left side while + with "reversed" `legend.traceorder` they are on + bottom/right side. The default legendrank is 1000, so + that you can use ranks less than 1000 to place certain + items before all unranked items, and ranks greater than + 1000 to go after all unranked items. When having + unranked or equal rank items shapes would be displayed + after traces i.e. according to their order in data and + layout. + legendwidth + Sets the width (in px or fraction) of the legend for + this trace. + marker + :class:`plotly.graph_objects.funnelarea.Marker` + instance or dict with compatible properties + meta + Assigns extra meta information associated with this + trace that can be used in various text attributes. + Attributes such as trace `name`, graph, axis and + colorbar `title.text`, annotation `text` + `rangeselector`, `updatemenues` and `sliders` `label` + text all support `meta`. To access the trace `meta` + values in an attribute in the same trace, simply use + `%{meta[i]}` where `i` is the index or key of the + `meta` item in question. To access trace `meta` in + layout attributes, use `%{data[n[.meta[i]}` where `i` + is the index or key of the `meta` and `n` is the trace + index. + metasrc + Sets the source reference on Chart Studio Cloud for + `meta`. + name + Sets the trace name. The trace name appears as the + legend item and on hover. + opacity + Sets the opacity of the trace. + scalegroup + If there are multiple funnelareas that should be sized + according to their totals, link them by providing a + non-empty group id here shared by every trace in the + same group. + showlegend + Determines whether or not an item corresponding to this + trace is shown in the legend. + stream + :class:`plotly.graph_objects.funnelarea.Stream` + instance or dict with compatible properties + text + Sets text elements associated with each sector. If + trace `textinfo` contains a "text" flag, these elements + will be seen on the chart. If trace `hoverinfo` + contains a "text" flag and "hovertext" is not set, + these elements will be seen in the hover labels. + textfont + Sets the font used for `textinfo`. + textinfo + Determines which trace information appear on the graph. + textposition + Specifies the location of the `textinfo`. + textpositionsrc + Sets the source reference on Chart Studio Cloud for + `textposition`. + textsrc + Sets the source reference on Chart Studio Cloud for + `text`. + texttemplate + Template string used for rendering the information text + that appears on points. Note that this will override + `textinfo`. Variables are inserted using %{variable}, + for example "y: %{y}". Numbers are formatted using + d3-format's syntax %{variable:d3-format}, for example + "Price: %{y:$.2f}". + https://github.com/d3/d3-format/tree/v1.4.5#d3-format + for details on the formatting syntax. Dates are + formatted using d3-time-format's syntax + %{variable|d3-time-format}, for example "Day: + %{2019-01-01|%A}". https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format for details on the + date formatting syntax. Variables that can't be found + will be replaced with the specifier. For example, a + template of "data: %{x}, %{y}" will result in a value + of "data: 1, %{y}" if x is 1 and y is missing. + Variables with an undefined value will be replaced with + the fallback value. All attributes that can be + specified per-point (the ones that are `arrayOk: true`) + are available. Finally, the template string has access + to variables `label`, `color`, `value`, `text` and + `percent`. + texttemplatefallback + Fallback string that's displayed when a variable + referenced in a template is missing. If the boolean + value 'false' is passed in, the specifier with the + missing variable will be displayed. + texttemplatesrc + Sets the source reference on Chart Studio Cloud for + `texttemplate`. + title + :class:`plotly.graph_objects.funnelarea.Title` instance + or dict with compatible properties + uid + Assign an id to this trace, Use this to provide object + constancy between traces during animations and + transitions. + uirevision + Controls persistence of some user-driven changes to the + trace: `constraintrange` in `parcoords` traces, as well + as some `editable: true` modifications such as `name` + and `colorbar.title`. Defaults to `layout.uirevision`. + Note that other user-driven trace attribute changes are + controlled by `layout` attributes: `trace.visible` is + controlled by `layout.legend.uirevision`, + `selectedpoints` is controlled by + `layout.selectionrevision`, and `colorbar.(x|y)` + (accessible with `config: {editable: true}`) is + controlled by `layout.editrevision`. Trace changes are + tracked by `uid`, which only falls back on trace index + if no `uid` is provided. So if your app can add/remove + traces before the end of the `data` array, such that + the same trace has a different index, you can still + preserve user-driven changes if you give each trace a + `uid` that stays with it as it moves. + values + Sets the values of the sectors. If omitted, we count + occurrences of each label. + valuessrc + Sets the source reference on Chart Studio Cloud for + `values`. + visible + Determines whether or not this trace is visible. If + "legendonly", the trace is not drawn, but can appear as + a legend item (provided that the legend itself is + visible). + row : 'all', int or None (default) + Subplot row index (starting from 1) for the trace to be + added. Only valid if figure was created using + `plotly.tools.make_subplots`.If 'all', addresses all + rows in the specified column(s). + col : 'all', int or None (default) + Subplot col index (starting from 1) for the trace to be + added. Only valid if figure was created using + `plotly.tools.make_subplots`.If 'all', addresses all + columns in the specified row(s). + + Returns + ------- + FigureWidget + """ + from plotly.graph_objs import Funnelarea + + new_trace = Funnelarea( + aspectratio=aspectratio, + baseratio=baseratio, + customdata=customdata, + customdatasrc=customdatasrc, + dlabel=dlabel, + domain=domain, + hoverinfo=hoverinfo, + hoverinfosrc=hoverinfosrc, + hoverlabel=hoverlabel, + hovertemplate=hovertemplate, + hovertemplatefallback=hovertemplatefallback, + hovertemplatesrc=hovertemplatesrc, + hovertext=hovertext, + hovertextsrc=hovertextsrc, + ids=ids, + idssrc=idssrc, + insidetextfont=insidetextfont, + label0=label0, + labels=labels, + labelssrc=labelssrc, + legend=legend, + legendgroup=legendgroup, + legendgrouptitle=legendgrouptitle, + legendrank=legendrank, + legendwidth=legendwidth, + marker=marker, + meta=meta, + metasrc=metasrc, + name=name, + opacity=opacity, + scalegroup=scalegroup, + showlegend=showlegend, + stream=stream, + text=text, + textfont=textfont, + textinfo=textinfo, + textposition=textposition, + textpositionsrc=textpositionsrc, + textsrc=textsrc, + texttemplate=texttemplate, + texttemplatefallback=texttemplatefallback, + texttemplatesrc=texttemplatesrc, + title=title, + uid=uid, + uirevision=uirevision, + values=values, + valuessrc=valuessrc, + visible=visible, + **kwargs, + ) + return self.add_trace(new_trace, row=row, col=col) + + def add_heatmap( + self, + autocolorscale=None, + coloraxis=None, + colorbar=None, + colorscale=None, + connectgaps=None, + customdata=None, + customdatasrc=None, + dx=None, + dy=None, + hoverinfo=None, + hoverinfosrc=None, + hoverlabel=None, + hoverongaps=None, + hovertemplate=None, + hovertemplatefallback=None, + hovertemplatesrc=None, + hovertext=None, + hovertextsrc=None, + ids=None, + idssrc=None, + legend=None, + legendgroup=None, + legendgrouptitle=None, + legendrank=None, + legendwidth=None, + meta=None, + metasrc=None, + name=None, + opacity=None, + reversescale=None, + showlegend=None, + showscale=None, + stream=None, + text=None, + textfont=None, + textsrc=None, + texttemplate=None, + texttemplatefallback=None, + transpose=None, + uid=None, + uirevision=None, + visible=None, + x=None, + x0=None, + xaxis=None, + xcalendar=None, + xgap=None, + xhoverformat=None, + xperiod=None, + xperiod0=None, + xperiodalignment=None, + xsrc=None, + xtype=None, + y=None, + y0=None, + yaxis=None, + ycalendar=None, + ygap=None, + yhoverformat=None, + yperiod=None, + yperiod0=None, + yperiodalignment=None, + ysrc=None, + ytype=None, + z=None, + zauto=None, + zhoverformat=None, + zmax=None, + zmid=None, + zmin=None, + zorder=None, + zsmooth=None, + zsrc=None, + row=None, + col=None, + secondary_y=None, + **kwargs, + ) -> "FigureWidget": + """ + Add a new Heatmap trace + + The data that describes the heatmap value-to-color mapping is + set in `z`. Data in `z` can either be a 2D list of values + (ragged or not) or a 1D array of values. In the case where `z` + is a 2D list, say that `z` has N rows and M columns. Then, by + default, the resulting heatmap will have N partitions along the + y axis and M partitions along the x axis. In other words, the + i-th row/ j-th column cell in `z` is mapped to the i-th + partition of the y axis (starting from the bottom of the plot) + and the j-th partition of the x-axis (starting from the left of + the plot). This behavior can be flipped by using `transpose`. + Moreover, `x` (`y`) can be provided with M or M+1 (N or N+1) + elements. If M (N), then the coordinates correspond to the + center of the heatmap cells and the cells have equal width. If + M+1 (N+1), then the coordinates correspond to the edges of the + heatmap cells. In the case where `z` is a 1D list, the x and y + coordinates must be provided in `x` and `y` respectively to + form data triplets. + + Parameters + ---------- + autocolorscale + Determines whether the colorscale is a default palette + (`autocolorscale: true`) or the palette determined by + `colorscale`. In case `colorscale` is unspecified or + `autocolorscale` is true, the default palette will be + chosen according to whether numbers in the `color` + array are all positive, all negative or mixed. + coloraxis + Sets a reference to a shared color axis. References to + these shared color axes are "coloraxis", "coloraxis2", + "coloraxis3", etc. Settings for these shared color axes + are set in the layout, under `layout.coloraxis`, + `layout.coloraxis2`, etc. Note that multiple color + scales can be linked to the same color axis. + colorbar + :class:`plotly.graph_objects.heatmap.ColorBar` instance + or dict with compatible properties + colorscale + Sets the colorscale. The colorscale must be an array + containing arrays mapping a normalized value to an rgb, + rgba, hex, hsl, hsv, or named color string. At minimum, + a mapping for the lowest (0) and highest (1) values are + required. For example, `[[0, 'rgb(0,0,255)'], [1, + 'rgb(255,0,0)']]`. To control the bounds of the + colorscale in color space, use `zmin` and `zmax`. + Alternatively, `colorscale` may be a palette name + string of the following list: Blackbody,Bluered,Blues,C + ividis,Earth,Electric,Greens,Greys,Hot,Jet,Picnic,Portl + and,Rainbow,RdBu,Reds,Viridis,YlGnBu,YlOrRd. + connectgaps + Determines whether or not gaps (i.e. {nan} or missing + values) in the `z` data are filled in. It is defaulted + to true if `z` is a one dimensional array and `zsmooth` + is not false; otherwise it is defaulted to false. + customdata + Assigns extra data each datum. This may be useful when + listening to hover, click and selection events. Note + that, "scatter" traces also appends customdata items in + the markers DOM elements + customdatasrc + Sets the source reference on Chart Studio Cloud for + `customdata`. + dx + Sets the x coordinate step. See `x0` for more info. + dy + Sets the y coordinate step. See `y0` for more info. + hoverinfo + Determines which trace information appear on hover. If + `none` or `skip` are set, no information is displayed + upon hovering. But, if `none` is set, click and hover + events are still fired. + hoverinfosrc + Sets the source reference on Chart Studio Cloud for + `hoverinfo`. + hoverlabel + :class:`plotly.graph_objects.heatmap.Hoverlabel` + instance or dict with compatible properties + hoverongaps + Determines whether or not gaps (i.e. {nan} or missing + values) in the `z` data have hover labels associated + with them. + hovertemplate + Template string used for rendering the information that + appear on hover box. Note that this will override + `hoverinfo`. Variables are inserted using %{variable}, + for example "y: %{y}" as well as %{xother}, {%_xother}, + {%_xother_}, {%xother_}. When showing info for several + points, "xother" will be added to those with different + x positions from the first point. An underscore before + or after "(x|y)other" will add a space on that side, + only when this field is shown. Numbers are formatted + using d3-format's syntax %{variable:d3-format}, for + example "Price: %{y:$.2f}". + https://github.com/d3/d3-format/tree/v1.4.5#d3-format + for details on the formatting syntax. Dates are + formatted using d3-time-format's syntax + %{variable|d3-time-format}, for example "Day: + %{2019-01-01|%A}". https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format for details on the + date formatting syntax. Variables that can't be found + will be replaced with the specifier. For example, a + template of "data: %{x}, %{y}" will result in a value + of "data: 1, %{y}" if x is 1 and y is missing. + Variables with an undefined value will be replaced with + the fallback value. The variables available in + `hovertemplate` are the ones emitted as event data + described at this link + https://plotly.com/javascript/plotlyjs-events/#event- + data. Additionally, all attributes that can be + specified per-point (the ones that are `arrayOk: true`) + are available. Anything contained in tag `` is + displayed in the secondary box, for example + `%{fullData.name}`. To hide the + secondary box completely, use an empty tag + ``. + hovertemplatefallback + Fallback string that's displayed when a variable + referenced in a template is missing. If the boolean + value 'false' is passed in, the specifier with the + missing variable will be displayed. + hovertemplatesrc + Sets the source reference on Chart Studio Cloud for + `hovertemplate`. + hovertext + Same as `text`. + hovertextsrc + Sets the source reference on Chart Studio Cloud for + `hovertext`. + ids + Assigns id labels to each datum. These ids for object + constancy of data points during animation. Should be an + array of strings, not numbers or any other type. + idssrc + Sets the source reference on Chart Studio Cloud for + `ids`. + legend + Sets the reference to a legend to show this trace in. + References to these legends are "legend", "legend2", + "legend3", etc. Settings for these legends are set in + the layout, under `layout.legend`, `layout.legend2`, + etc. + legendgroup + Sets the legend group for this trace. Traces and shapes + part of the same legend group hide/show at the same + time when toggling legend items. + legendgrouptitle + :class:`plotly.graph_objects.heatmap.Legendgrouptitle` + instance or dict with compatible properties + legendrank + Sets the legend rank for this trace. Items and groups + with smaller ranks are presented on top/left side while + with "reversed" `legend.traceorder` they are on + bottom/right side. The default legendrank is 1000, so + that you can use ranks less than 1000 to place certain + items before all unranked items, and ranks greater than + 1000 to go after all unranked items. When having + unranked or equal rank items shapes would be displayed + after traces i.e. according to their order in data and + layout. + legendwidth + Sets the width (in px or fraction) of the legend for + this trace. + meta + Assigns extra meta information associated with this + trace that can be used in various text attributes. + Attributes such as trace `name`, graph, axis and + colorbar `title.text`, annotation `text` + `rangeselector`, `updatemenues` and `sliders` `label` + text all support `meta`. To access the trace `meta` + values in an attribute in the same trace, simply use + `%{meta[i]}` where `i` is the index or key of the + `meta` item in question. To access trace `meta` in + layout attributes, use `%{data[n[.meta[i]}` where `i` + is the index or key of the `meta` and `n` is the trace + index. + metasrc + Sets the source reference on Chart Studio Cloud for + `meta`. + name + Sets the trace name. The trace name appears as the + legend item and on hover. + opacity + Sets the opacity of the trace. + reversescale + Reverses the color mapping if true. If true, `zmin` + will correspond to the last color in the array and + `zmax` will correspond to the first color. + showlegend + Determines whether or not an item corresponding to this + trace is shown in the legend. + showscale + Determines whether or not a colorbar is displayed for + this trace. + stream + :class:`plotly.graph_objects.heatmap.Stream` instance + or dict with compatible properties + text + Sets the text elements associated with each z value. + textfont + Sets the text font. + textsrc + Sets the source reference on Chart Studio Cloud for + `text`. + texttemplate + Template string used for rendering the information text + that appears on points. Note that this will override + `textinfo`. Variables are inserted using %{variable}, + for example "y: %{y}". Numbers are formatted using + d3-format's syntax %{variable:d3-format}, for example + "Price: %{y:$.2f}". + https://github.com/d3/d3-format/tree/v1.4.5#d3-format + for details on the formatting syntax. Dates are + formatted using d3-time-format's syntax + %{variable|d3-time-format}, for example "Day: + %{2019-01-01|%A}". https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format for details on the + date formatting syntax. Variables that can't be found + will be replaced with the specifier. For example, a + template of "data: %{x}, %{y}" will result in a value + of "data: 1, %{y}" if x is 1 and y is missing. + Variables with an undefined value will be replaced with + the fallback value. All attributes that can be + specified per-point (the ones that are `arrayOk: true`) + are available. Finally, the template string has access + to variables `x`, `y`, `z` and `text`. + texttemplatefallback + Fallback string that's displayed when a variable + referenced in a template is missing. If the boolean + value 'false' is passed in, the specifier with the + missing variable will be displayed. + transpose + Transposes the z data. + uid + Assign an id to this trace, Use this to provide object + constancy between traces during animations and + transitions. + uirevision + Controls persistence of some user-driven changes to the + trace: `constraintrange` in `parcoords` traces, as well + as some `editable: true` modifications such as `name` + and `colorbar.title`. Defaults to `layout.uirevision`. + Note that other user-driven trace attribute changes are + controlled by `layout` attributes: `trace.visible` is + controlled by `layout.legend.uirevision`, + `selectedpoints` is controlled by + `layout.selectionrevision`, and `colorbar.(x|y)` + (accessible with `config: {editable: true}`) is + controlled by `layout.editrevision`. Trace changes are + tracked by `uid`, which only falls back on trace index + if no `uid` is provided. So if your app can add/remove + traces before the end of the `data` array, such that + the same trace has a different index, you can still + preserve user-driven changes if you give each trace a + `uid` that stays with it as it moves. + visible + Determines whether or not this trace is visible. If + "legendonly", the trace is not drawn, but can appear as + a legend item (provided that the legend itself is + visible). + x + Sets the x coordinates. + x0 + Alternate to `x`. Builds a linear space of x + coordinates. Use with `dx` where `x0` is the starting + coordinate and `dx` the step. + xaxis + Sets a reference between this trace's x coordinates and + a 2D cartesian x axis. If "x" (the default value), the + x coordinates refer to `layout.xaxis`. If "x2", the x + coordinates refer to `layout.xaxis2`, and so on. + xcalendar + Sets the calendar system to use with `x` date data. + xgap + Sets the horizontal gap (in pixels) between bricks. + xhoverformat + Sets the hover text formatting rulefor `x` using d3 + formatting mini-languages which are very similar to + those in Python. For numbers, see: + https://github.com/d3/d3-format/tree/v1.4.5#d3-format. + And for dates see: https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format. We add two items to + d3's date formatter: "%h" for half of the year as a + decimal number as well as "%{n}f" for fractional + seconds with n digits. For example, *2016-10-13 + 09:15:23.456* with tickformat "%H~%M~%S.%2f" would + display *09~15~23.46*By default the values are + formatted using `xaxis.hoverformat`. + xperiod + Only relevant when the axis `type` is "date". Sets the + period positioning in milliseconds or "M" on the x + axis. Special values in the form of "M" could be + used to declare the number of months. In this case `n` + must be a positive integer. + xperiod0 + Only relevant when the axis `type` is "date". Sets the + base for period positioning in milliseconds or date + string on the x0 axis. When `x0period` is round number + of weeks, the `x0period0` by default would be on a + Sunday i.e. 2000-01-02, otherwise it would be at + 2000-01-01. + xperiodalignment + Only relevant when the axis `type` is "date". Sets the + alignment of data points on the x axis. + xsrc + Sets the source reference on Chart Studio Cloud for + `x`. + xtype + If "array", the heatmap's x coordinates are given by + "x" (the default behavior when `x` is provided). If + "scaled", the heatmap's x coordinates are given by "x0" + and "dx" (the default behavior when `x` is not + provided). + y + Sets the y coordinates. + y0 + Alternate to `y`. Builds a linear space of y + coordinates. Use with `dy` where `y0` is the starting + coordinate and `dy` the step. + yaxis + Sets a reference between this trace's y coordinates and + a 2D cartesian y axis. If "y" (the default value), the + y coordinates refer to `layout.yaxis`. If "y2", the y + coordinates refer to `layout.yaxis2`, and so on. + ycalendar + Sets the calendar system to use with `y` date data. + ygap + Sets the vertical gap (in pixels) between bricks. + yhoverformat + Sets the hover text formatting rulefor `y` using d3 + formatting mini-languages which are very similar to + those in Python. For numbers, see: + https://github.com/d3/d3-format/tree/v1.4.5#d3-format. + And for dates see: https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format. We add two items to + d3's date formatter: "%h" for half of the year as a + decimal number as well as "%{n}f" for fractional + seconds with n digits. For example, *2016-10-13 + 09:15:23.456* with tickformat "%H~%M~%S.%2f" would + display *09~15~23.46*By default the values are + formatted using `yaxis.hoverformat`. + yperiod + Only relevant when the axis `type` is "date". Sets the + period positioning in milliseconds or "M" on the y + axis. Special values in the form of "M" could be + used to declare the number of months. In this case `n` + must be a positive integer. + yperiod0 + Only relevant when the axis `type` is "date". Sets the + base for period positioning in milliseconds or date + string on the y0 axis. When `y0period` is round number + of weeks, the `y0period0` by default would be on a + Sunday i.e. 2000-01-02, otherwise it would be at + 2000-01-01. + yperiodalignment + Only relevant when the axis `type` is "date". Sets the + alignment of data points on the y axis. + ysrc + Sets the source reference on Chart Studio Cloud for + `y`. + ytype + If "array", the heatmap's y coordinates are given by + "y" (the default behavior when `y` is provided) If + "scaled", the heatmap's y coordinates are given by "y0" + and "dy" (the default behavior when `y` is not + provided) + z + Sets the z data. + zauto + Determines whether or not the color domain is computed + with respect to the input data (here in `z`) or the + bounds set in `zmin` and `zmax` Defaults to `false` + when `zmin` and `zmax` are set by the user. + zhoverformat + Sets the hover text formatting rulefor `z` using d3 + formatting mini-languages which are very similar to + those in Python. For numbers, see: https://github.com/d + 3/d3-format/tree/v1.4.5#d3-format.By default the values + are formatted using generic number format. + zmax + Sets the upper bound of the color domain. Value should + have the same units as in `z` and if set, `zmin` must + be set as well. + zmid + Sets the mid-point of the color domain by scaling + `zmin` and/or `zmax` to be equidistant to this point. + Value should have the same units as in `z`. Has no + effect when `zauto` is `false`. + zmin + Sets the lower bound of the color domain. Value should + have the same units as in `z` and if set, `zmax` must + be set as well. + zorder + Sets the layer on which this trace is displayed, + relative to other SVG traces on the same subplot. SVG + traces with higher `zorder` appear in front of those + with lower `zorder`. + zsmooth + Picks a smoothing algorithm use to smooth `z` data. + zsrc + Sets the source reference on Chart Studio Cloud for + `z`. + row : 'all', int or None (default) + Subplot row index (starting from 1) for the trace to be + added. Only valid if figure was created using + `plotly.tools.make_subplots`.If 'all', addresses all + rows in the specified column(s). + col : 'all', int or None (default) + Subplot col index (starting from 1) for the trace to be + added. Only valid if figure was created using + `plotly.tools.make_subplots`.If 'all', addresses all + columns in the specified row(s). + secondary_y: boolean or None (default None) + If True, associate this trace with the secondary y-axis of the + subplot at the specified row and col. Only valid if all of the + following conditions are satisfied: + * The figure was created using `plotly.subplots.make_subplots`. + * The row and col arguments are not None + * The subplot at the specified row and col has type xy + (which is the default) and secondary_y True. These + properties are specified in the specs argument to + make_subplots. See the make_subplots docstring for more info. + + Returns + ------- + FigureWidget + """ + from plotly.graph_objs import Heatmap + + new_trace = Heatmap( + autocolorscale=autocolorscale, + coloraxis=coloraxis, + colorbar=colorbar, + colorscale=colorscale, + connectgaps=connectgaps, + customdata=customdata, + customdatasrc=customdatasrc, + dx=dx, + dy=dy, + hoverinfo=hoverinfo, + hoverinfosrc=hoverinfosrc, + hoverlabel=hoverlabel, + hoverongaps=hoverongaps, + hovertemplate=hovertemplate, + hovertemplatefallback=hovertemplatefallback, + hovertemplatesrc=hovertemplatesrc, + hovertext=hovertext, + hovertextsrc=hovertextsrc, + ids=ids, + idssrc=idssrc, + legend=legend, + legendgroup=legendgroup, + legendgrouptitle=legendgrouptitle, + legendrank=legendrank, + legendwidth=legendwidth, + meta=meta, + metasrc=metasrc, + name=name, + opacity=opacity, + reversescale=reversescale, + showlegend=showlegend, + showscale=showscale, + stream=stream, + text=text, + textfont=textfont, + textsrc=textsrc, + texttemplate=texttemplate, + texttemplatefallback=texttemplatefallback, + transpose=transpose, + uid=uid, + uirevision=uirevision, + visible=visible, + x=x, + x0=x0, + xaxis=xaxis, + xcalendar=xcalendar, + xgap=xgap, + xhoverformat=xhoverformat, + xperiod=xperiod, + xperiod0=xperiod0, + xperiodalignment=xperiodalignment, + xsrc=xsrc, + xtype=xtype, + y=y, + y0=y0, + yaxis=yaxis, + ycalendar=ycalendar, + ygap=ygap, + yhoverformat=yhoverformat, + yperiod=yperiod, + yperiod0=yperiod0, + yperiodalignment=yperiodalignment, + ysrc=ysrc, + ytype=ytype, + z=z, + zauto=zauto, + zhoverformat=zhoverformat, + zmax=zmax, + zmid=zmid, + zmin=zmin, + zorder=zorder, + zsmooth=zsmooth, + zsrc=zsrc, + **kwargs, + ) + return self.add_trace(new_trace, row=row, col=col, secondary_y=secondary_y) + + def add_histogram( + self, + alignmentgroup=None, + autobinx=None, + autobiny=None, + bingroup=None, + cliponaxis=None, + constraintext=None, + cumulative=None, + customdata=None, + customdatasrc=None, + error_x=None, + error_y=None, + histfunc=None, + histnorm=None, + hoverinfo=None, + hoverinfosrc=None, + hoverlabel=None, + hovertemplate=None, + hovertemplatefallback=None, + hovertemplatesrc=None, + hovertext=None, + hovertextsrc=None, + ids=None, + idssrc=None, + insidetextanchor=None, + insidetextfont=None, + legend=None, + legendgroup=None, + legendgrouptitle=None, + legendrank=None, + legendwidth=None, + marker=None, + meta=None, + metasrc=None, + name=None, + nbinsx=None, + nbinsy=None, + offsetgroup=None, + opacity=None, + orientation=None, + outsidetextfont=None, + selected=None, + selectedpoints=None, + showlegend=None, + stream=None, + text=None, + textangle=None, + textfont=None, + textposition=None, + textsrc=None, + texttemplate=None, + texttemplatefallback=None, + uid=None, + uirevision=None, + unselected=None, + visible=None, + x=None, + xaxis=None, + xbins=None, + xcalendar=None, + xhoverformat=None, + xsrc=None, + y=None, + yaxis=None, + ybins=None, + ycalendar=None, + yhoverformat=None, + ysrc=None, + zorder=None, + row=None, + col=None, + secondary_y=None, + **kwargs, + ) -> "FigureWidget": + """ + Add a new Histogram trace + + The sample data from which statistics are computed is set in + `x` for vertically spanning histograms and in `y` for + horizontally spanning histograms. Binning options are set + `xbins` and `ybins` respectively if no aggregation data is + provided. + + Parameters + ---------- + alignmentgroup + Set several traces linked to the same position axis or + matching axes to the same alignmentgroup. This controls + whether bars compute their positional range dependently + or independently. + autobinx + Obsolete: since v1.42 each bin attribute is auto- + determined separately and `autobinx` is not needed. + However, we accept `autobinx: true` or `false` and will + update `xbins` accordingly before deleting `autobinx` + from the trace. + autobiny + Obsolete: since v1.42 each bin attribute is auto- + determined separately and `autobiny` is not needed. + However, we accept `autobiny: true` or `false` and will + update `ybins` accordingly before deleting `autobiny` + from the trace. + bingroup + Set a group of histogram traces which will have + compatible bin settings. Note that traces on the same + subplot and with the same "orientation" under `barmode` + "stack", "relative" and "group" are forced into the + same bingroup, Using `bingroup`, traces under `barmode` + "overlay" and on different axes (of the same axis type) + can have compatible bin settings. Note that histogram + and histogram2d* trace can share the same `bingroup` + cliponaxis + Determines whether the text nodes are clipped about the + subplot axes. To show the text nodes above axis lines + and tick labels, make sure to set `xaxis.layer` and + `yaxis.layer` to *below traces*. + constraintext + Constrain the size of text inside or outside a bar to + be no larger than the bar itself. + cumulative + :class:`plotly.graph_objects.histogram.Cumulative` + instance or dict with compatible properties + customdata + Assigns extra data each datum. This may be useful when + listening to hover, click and selection events. Note + that, "scatter" traces also appends customdata items in + the markers DOM elements + customdatasrc + Sets the source reference on Chart Studio Cloud for + `customdata`. + error_x + :class:`plotly.graph_objects.histogram.ErrorX` instance + or dict with compatible properties + error_y + :class:`plotly.graph_objects.histogram.ErrorY` instance + or dict with compatible properties + histfunc + Specifies the binning function used for this histogram + trace. If "count", the histogram values are computed by + counting the number of values lying inside each bin. If + "sum", "avg", "min", "max", the histogram values are + computed using the sum, the average, the minimum or the + maximum of the values lying inside each bin + respectively. + histnorm + Specifies the type of normalization used for this + histogram trace. If "", the span of each bar + corresponds to the number of occurrences (i.e. the + number of data points lying inside the bins). If + "percent" / "probability", the span of each bar + corresponds to the percentage / fraction of occurrences + with respect to the total number of sample points + (here, the sum of all bin HEIGHTS equals 100% / 1). If + "density", the span of each bar corresponds to the + number of occurrences in a bin divided by the size of + the bin interval (here, the sum of all bin AREAS equals + the total number of sample points). If *probability + density*, the area of each bar corresponds to the + probability that an event will fall into the + corresponding bin (here, the sum of all bin AREAS + equals 1). + hoverinfo + Determines which trace information appear on hover. If + `none` or `skip` are set, no information is displayed + upon hovering. But, if `none` is set, click and hover + events are still fired. + hoverinfosrc + Sets the source reference on Chart Studio Cloud for + `hoverinfo`. + hoverlabel + :class:`plotly.graph_objects.histogram.Hoverlabel` + instance or dict with compatible properties + hovertemplate + Template string used for rendering the information that + appear on hover box. Note that this will override + `hoverinfo`. Variables are inserted using %{variable}, + for example "y: %{y}" as well as %{xother}, {%_xother}, + {%_xother_}, {%xother_}. When showing info for several + points, "xother" will be added to those with different + x positions from the first point. An underscore before + or after "(x|y)other" will add a space on that side, + only when this field is shown. Numbers are formatted + using d3-format's syntax %{variable:d3-format}, for + example "Price: %{y:$.2f}". + https://github.com/d3/d3-format/tree/v1.4.5#d3-format + for details on the formatting syntax. Dates are + formatted using d3-time-format's syntax + %{variable|d3-time-format}, for example "Day: + %{2019-01-01|%A}". https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format for details on the + date formatting syntax. Variables that can't be found + will be replaced with the specifier. For example, a + template of "data: %{x}, %{y}" will result in a value + of "data: 1, %{y}" if x is 1 and y is missing. + Variables with an undefined value will be replaced with + the fallback value. The variables available in + `hovertemplate` are the ones emitted as event data + described at this link + https://plotly.com/javascript/plotlyjs-events/#event- + data. Additionally, all attributes that can be + specified per-point (the ones that are `arrayOk: true`) + are available. Finally, the template string has access + to variable `binNumber` Anything contained in tag + `` is displayed in the secondary box, for + example `%{fullData.name}`. To hide the + secondary box completely, use an empty tag + ``. + hovertemplatefallback + Fallback string that's displayed when a variable + referenced in a template is missing. If the boolean + value 'false' is passed in, the specifier with the + missing variable will be displayed. + hovertemplatesrc + Sets the source reference on Chart Studio Cloud for + `hovertemplate`. + hovertext + Same as `text`. + hovertextsrc + Sets the source reference on Chart Studio Cloud for + `hovertext`. + ids + Assigns id labels to each datum. These ids for object + constancy of data points during animation. Should be an + array of strings, not numbers or any other type. + idssrc + Sets the source reference on Chart Studio Cloud for + `ids`. + insidetextanchor + Determines if texts are kept at center or start/end + points in `textposition` "inside" mode. + insidetextfont + Sets the font used for `text` lying inside the bar. + legend + Sets the reference to a legend to show this trace in. + References to these legends are "legend", "legend2", + "legend3", etc. Settings for these legends are set in + the layout, under `layout.legend`, `layout.legend2`, + etc. + legendgroup + Sets the legend group for this trace. Traces and shapes + part of the same legend group hide/show at the same + time when toggling legend items. + legendgrouptitle + :class:`plotly.graph_objects.histogram.Legendgrouptitle + ` instance or dict with compatible properties + legendrank + Sets the legend rank for this trace. Items and groups + with smaller ranks are presented on top/left side while + with "reversed" `legend.traceorder` they are on + bottom/right side. The default legendrank is 1000, so + that you can use ranks less than 1000 to place certain + items before all unranked items, and ranks greater than + 1000 to go after all unranked items. When having + unranked or equal rank items shapes would be displayed + after traces i.e. according to their order in data and + layout. + legendwidth + Sets the width (in px or fraction) of the legend for + this trace. + marker + :class:`plotly.graph_objects.histogram.Marker` instance + or dict with compatible properties + meta + Assigns extra meta information associated with this + trace that can be used in various text attributes. + Attributes such as trace `name`, graph, axis and + colorbar `title.text`, annotation `text` + `rangeselector`, `updatemenues` and `sliders` `label` + text all support `meta`. To access the trace `meta` + values in an attribute in the same trace, simply use + `%{meta[i]}` where `i` is the index or key of the + `meta` item in question. To access trace `meta` in + layout attributes, use `%{data[n[.meta[i]}` where `i` + is the index or key of the `meta` and `n` is the trace + index. + metasrc + Sets the source reference on Chart Studio Cloud for + `meta`. + name + Sets the trace name. The trace name appears as the + legend item and on hover. + nbinsx + Specifies the maximum number of desired bins. This + value will be used in an algorithm that will decide the + optimal bin size such that the histogram best + visualizes the distribution of the data. Ignored if + `xbins.size` is provided. + nbinsy + Specifies the maximum number of desired bins. This + value will be used in an algorithm that will decide the + optimal bin size such that the histogram best + visualizes the distribution of the data. Ignored if + `ybins.size` is provided. + offsetgroup + Set several traces linked to the same position axis or + matching axes to the same offsetgroup where bars of the + same position coordinate will line up. + opacity + Sets the opacity of the trace. + orientation + Sets the orientation of the bars. With "v" ("h"), the + value of the each bar spans along the vertical + (horizontal). + outsidetextfont + Sets the font used for `text` lying outside the bar. + selected + :class:`plotly.graph_objects.histogram.Selected` + instance or dict with compatible properties + selectedpoints + Array containing integer indices of selected points. + Has an effect only for traces that support selections. + Note that an empty array means an empty selection where + the `unselected` are turned on for all points, whereas, + any other non-array values means no selection all where + the `selected` and `unselected` styles have no effect. + showlegend + Determines whether or not an item corresponding to this + trace is shown in the legend. + stream + :class:`plotly.graph_objects.histogram.Stream` instance + or dict with compatible properties + text + Sets hover text elements associated with each bar. If a + single string, the same string appears over all bars. + If an array of string, the items are mapped in order to + the this trace's coordinates. + textangle + Sets the angle of the tick labels with respect to the + bar. For example, a `tickangle` of -90 draws the tick + labels vertically. With "auto" the texts may + automatically be rotated to fit with the maximum size + in bars. + textfont + Sets the text font. + textposition + Specifies the location of the `text`. "inside" + positions `text` inside, next to the bar end (rotated + and scaled if needed). "outside" positions `text` + outside, next to the bar end (scaled if needed), unless + there is another bar stacked on this one, then the text + gets pushed inside. "auto" tries to position `text` + inside the bar, but if the bar is too small and no bar + is stacked on this one the text is moved outside. If + "none", no text appears. + textsrc + Sets the source reference on Chart Studio Cloud for + `text`. + texttemplate + Template string used for rendering the information text + that appears on points. Note that this will override + `textinfo`. Variables are inserted using %{variable}, + for example "y: %{y}". Numbers are formatted using + d3-format's syntax %{variable:d3-format}, for example + "Price: %{y:$.2f}". + https://github.com/d3/d3-format/tree/v1.4.5#d3-format + for details on the formatting syntax. Dates are + formatted using d3-time-format's syntax + %{variable|d3-time-format}, for example "Day: + %{2019-01-01|%A}". https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format for details on the + date formatting syntax. Variables that can't be found + will be replaced with the specifier. For example, a + template of "data: %{x}, %{y}" will result in a value + of "data: 1, %{y}" if x is 1 and y is missing. + Variables with an undefined value will be replaced with + the fallback value. All attributes that can be + specified per-point (the ones that are `arrayOk: true`) + are available. Finally, the template string has access + to variables `label` and `value`. + texttemplatefallback + Fallback string that's displayed when a variable + referenced in a template is missing. If the boolean + value 'false' is passed in, the specifier with the + missing variable will be displayed. + uid + Assign an id to this trace, Use this to provide object + constancy between traces during animations and + transitions. + uirevision + Controls persistence of some user-driven changes to the + trace: `constraintrange` in `parcoords` traces, as well + as some `editable: true` modifications such as `name` + and `colorbar.title`. Defaults to `layout.uirevision`. + Note that other user-driven trace attribute changes are + controlled by `layout` attributes: `trace.visible` is + controlled by `layout.legend.uirevision`, + `selectedpoints` is controlled by + `layout.selectionrevision`, and `colorbar.(x|y)` + (accessible with `config: {editable: true}`) is + controlled by `layout.editrevision`. Trace changes are + tracked by `uid`, which only falls back on trace index + if no `uid` is provided. So if your app can add/remove + traces before the end of the `data` array, such that + the same trace has a different index, you can still + preserve user-driven changes if you give each trace a + `uid` that stays with it as it moves. + unselected + :class:`plotly.graph_objects.histogram.Unselected` + instance or dict with compatible properties + visible + Determines whether or not this trace is visible. If + "legendonly", the trace is not drawn, but can appear as + a legend item (provided that the legend itself is + visible). + x + Sets the sample data to be binned on the x axis. + xaxis + Sets a reference between this trace's x coordinates and + a 2D cartesian x axis. If "x" (the default value), the + x coordinates refer to `layout.xaxis`. If "x2", the x + coordinates refer to `layout.xaxis2`, and so on. + xbins + :class:`plotly.graph_objects.histogram.XBins` instance + or dict with compatible properties + xcalendar + Sets the calendar system to use with `x` date data. + xhoverformat + Sets the hover text formatting rulefor `x` using d3 + formatting mini-languages which are very similar to + those in Python. For numbers, see: + https://github.com/d3/d3-format/tree/v1.4.5#d3-format. + And for dates see: https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format. We add two items to + d3's date formatter: "%h" for half of the year as a + decimal number as well as "%{n}f" for fractional + seconds with n digits. For example, *2016-10-13 + 09:15:23.456* with tickformat "%H~%M~%S.%2f" would + display *09~15~23.46*By default the values are + formatted using `xaxis.hoverformat`. + xsrc + Sets the source reference on Chart Studio Cloud for + `x`. + y + Sets the sample data to be binned on the y axis. + yaxis + Sets a reference between this trace's y coordinates and + a 2D cartesian y axis. If "y" (the default value), the + y coordinates refer to `layout.yaxis`. If "y2", the y + coordinates refer to `layout.yaxis2`, and so on. + ybins + :class:`plotly.graph_objects.histogram.YBins` instance + or dict with compatible properties + ycalendar + Sets the calendar system to use with `y` date data. + yhoverformat + Sets the hover text formatting rulefor `y` using d3 + formatting mini-languages which are very similar to + those in Python. For numbers, see: + https://github.com/d3/d3-format/tree/v1.4.5#d3-format. + And for dates see: https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format. We add two items to + d3's date formatter: "%h" for half of the year as a + decimal number as well as "%{n}f" for fractional + seconds with n digits. For example, *2016-10-13 + 09:15:23.456* with tickformat "%H~%M~%S.%2f" would + display *09~15~23.46*By default the values are + formatted using `yaxis.hoverformat`. + ysrc + Sets the source reference on Chart Studio Cloud for + `y`. + zorder + Sets the layer on which this trace is displayed, + relative to other SVG traces on the same subplot. SVG + traces with higher `zorder` appear in front of those + with lower `zorder`. + row : 'all', int or None (default) + Subplot row index (starting from 1) for the trace to be + added. Only valid if figure was created using + `plotly.tools.make_subplots`.If 'all', addresses all + rows in the specified column(s). + col : 'all', int or None (default) + Subplot col index (starting from 1) for the trace to be + added. Only valid if figure was created using + `plotly.tools.make_subplots`.If 'all', addresses all + columns in the specified row(s). + secondary_y: boolean or None (default None) + If True, associate this trace with the secondary y-axis of the + subplot at the specified row and col. Only valid if all of the + following conditions are satisfied: + * The figure was created using `plotly.subplots.make_subplots`. + * The row and col arguments are not None + * The subplot at the specified row and col has type xy + (which is the default) and secondary_y True. These + properties are specified in the specs argument to + make_subplots. See the make_subplots docstring for more info. + + Returns + ------- + FigureWidget + """ + from plotly.graph_objs import Histogram + + new_trace = Histogram( + alignmentgroup=alignmentgroup, + autobinx=autobinx, + autobiny=autobiny, + bingroup=bingroup, + cliponaxis=cliponaxis, + constraintext=constraintext, + cumulative=cumulative, + customdata=customdata, + customdatasrc=customdatasrc, + error_x=error_x, + error_y=error_y, + histfunc=histfunc, + histnorm=histnorm, + hoverinfo=hoverinfo, + hoverinfosrc=hoverinfosrc, + hoverlabel=hoverlabel, + hovertemplate=hovertemplate, + hovertemplatefallback=hovertemplatefallback, + hovertemplatesrc=hovertemplatesrc, + hovertext=hovertext, + hovertextsrc=hovertextsrc, + ids=ids, + idssrc=idssrc, + insidetextanchor=insidetextanchor, + insidetextfont=insidetextfont, + legend=legend, + legendgroup=legendgroup, + legendgrouptitle=legendgrouptitle, + legendrank=legendrank, + legendwidth=legendwidth, + marker=marker, + meta=meta, + metasrc=metasrc, + name=name, + nbinsx=nbinsx, + nbinsy=nbinsy, + offsetgroup=offsetgroup, + opacity=opacity, + orientation=orientation, + outsidetextfont=outsidetextfont, + selected=selected, + selectedpoints=selectedpoints, + showlegend=showlegend, + stream=stream, + text=text, + textangle=textangle, + textfont=textfont, + textposition=textposition, + textsrc=textsrc, + texttemplate=texttemplate, + texttemplatefallback=texttemplatefallback, + uid=uid, + uirevision=uirevision, + unselected=unselected, + visible=visible, + x=x, + xaxis=xaxis, + xbins=xbins, + xcalendar=xcalendar, + xhoverformat=xhoverformat, + xsrc=xsrc, + y=y, + yaxis=yaxis, + ybins=ybins, + ycalendar=ycalendar, + yhoverformat=yhoverformat, + ysrc=ysrc, + zorder=zorder, + **kwargs, + ) + return self.add_trace(new_trace, row=row, col=col, secondary_y=secondary_y) + + def add_histogram2d( + self, + autobinx=None, + autobiny=None, + autocolorscale=None, + bingroup=None, + coloraxis=None, + colorbar=None, + colorscale=None, + customdata=None, + customdatasrc=None, + histfunc=None, + histnorm=None, + hoverinfo=None, + hoverinfosrc=None, + hoverlabel=None, + hovertemplate=None, + hovertemplatefallback=None, + hovertemplatesrc=None, + ids=None, + idssrc=None, + legend=None, + legendgroup=None, + legendgrouptitle=None, + legendrank=None, + legendwidth=None, + marker=None, + meta=None, + metasrc=None, + name=None, + nbinsx=None, + nbinsy=None, + opacity=None, + reversescale=None, + showlegend=None, + showscale=None, + stream=None, + textfont=None, + texttemplate=None, + texttemplatefallback=None, + uid=None, + uirevision=None, + visible=None, + x=None, + xaxis=None, + xbingroup=None, + xbins=None, + xcalendar=None, + xgap=None, + xhoverformat=None, + xsrc=None, + y=None, + yaxis=None, + ybingroup=None, + ybins=None, + ycalendar=None, + ygap=None, + yhoverformat=None, + ysrc=None, + z=None, + zauto=None, + zhoverformat=None, + zmax=None, + zmid=None, + zmin=None, + zsmooth=None, + zsrc=None, + row=None, + col=None, + secondary_y=None, + **kwargs, + ) -> "FigureWidget": + """ + Add a new Histogram2d trace + + The sample data from which statistics are computed is set in + `x` and `y` (where `x` and `y` represent marginal + distributions, binning is set in `xbins` and `ybins` in this + case) or `z` (where `z` represent the 2D distribution and + binning set, binning is set by `x` and `y` in this case). The + resulting distribution is visualized as a heatmap. + + Parameters + ---------- + autobinx + Obsolete: since v1.42 each bin attribute is auto- + determined separately and `autobinx` is not needed. + However, we accept `autobinx: true` or `false` and will + update `xbins` accordingly before deleting `autobinx` + from the trace. + autobiny + Obsolete: since v1.42 each bin attribute is auto- + determined separately and `autobiny` is not needed. + However, we accept `autobiny: true` or `false` and will + update `ybins` accordingly before deleting `autobiny` + from the trace. + autocolorscale + Determines whether the colorscale is a default palette + (`autocolorscale: true`) or the palette determined by + `colorscale`. In case `colorscale` is unspecified or + `autocolorscale` is true, the default palette will be + chosen according to whether numbers in the `color` + array are all positive, all negative or mixed. + bingroup + Set the `xbingroup` and `ybingroup` default prefix For + example, setting a `bingroup` of 1 on two histogram2d + traces will make them their x-bins and y-bins match + separately. + coloraxis + Sets a reference to a shared color axis. References to + these shared color axes are "coloraxis", "coloraxis2", + "coloraxis3", etc. Settings for these shared color axes + are set in the layout, under `layout.coloraxis`, + `layout.coloraxis2`, etc. Note that multiple color + scales can be linked to the same color axis. + colorbar + :class:`plotly.graph_objects.histogram2d.ColorBar` + instance or dict with compatible properties + colorscale + Sets the colorscale. The colorscale must be an array + containing arrays mapping a normalized value to an rgb, + rgba, hex, hsl, hsv, or named color string. At minimum, + a mapping for the lowest (0) and highest (1) values are + required. For example, `[[0, 'rgb(0,0,255)'], [1, + 'rgb(255,0,0)']]`. To control the bounds of the + colorscale in color space, use `zmin` and `zmax`. + Alternatively, `colorscale` may be a palette name + string of the following list: Blackbody,Bluered,Blues,C + ividis,Earth,Electric,Greens,Greys,Hot,Jet,Picnic,Portl + and,Rainbow,RdBu,Reds,Viridis,YlGnBu,YlOrRd. + customdata + Assigns extra data each datum. This may be useful when + listening to hover, click and selection events. Note + that, "scatter" traces also appends customdata items in + the markers DOM elements + customdatasrc + Sets the source reference on Chart Studio Cloud for + `customdata`. + histfunc + Specifies the binning function used for this histogram + trace. If "count", the histogram values are computed by + counting the number of values lying inside each bin. If + "sum", "avg", "min", "max", the histogram values are + computed using the sum, the average, the minimum or the + maximum of the values lying inside each bin + respectively. + histnorm + Specifies the type of normalization used for this + histogram trace. If "", the span of each bar + corresponds to the number of occurrences (i.e. the + number of data points lying inside the bins). If + "percent" / "probability", the span of each bar + corresponds to the percentage / fraction of occurrences + with respect to the total number of sample points + (here, the sum of all bin HEIGHTS equals 100% / 1). If + "density", the span of each bar corresponds to the + number of occurrences in a bin divided by the size of + the bin interval (here, the sum of all bin AREAS equals + the total number of sample points). If *probability + density*, the area of each bar corresponds to the + probability that an event will fall into the + corresponding bin (here, the sum of all bin AREAS + equals 1). + hoverinfo + Determines which trace information appear on hover. If + `none` or `skip` are set, no information is displayed + upon hovering. But, if `none` is set, click and hover + events are still fired. + hoverinfosrc + Sets the source reference on Chart Studio Cloud for + `hoverinfo`. + hoverlabel + :class:`plotly.graph_objects.histogram2d.Hoverlabel` + instance or dict with compatible properties + hovertemplate + Template string used for rendering the information that + appear on hover box. Note that this will override + `hoverinfo`. Variables are inserted using %{variable}, + for example "y: %{y}" as well as %{xother}, {%_xother}, + {%_xother_}, {%xother_}. When showing info for several + points, "xother" will be added to those with different + x positions from the first point. An underscore before + or after "(x|y)other" will add a space on that side, + only when this field is shown. Numbers are formatted + using d3-format's syntax %{variable:d3-format}, for + example "Price: %{y:$.2f}". + https://github.com/d3/d3-format/tree/v1.4.5#d3-format + for details on the formatting syntax. Dates are + formatted using d3-time-format's syntax + %{variable|d3-time-format}, for example "Day: + %{2019-01-01|%A}". https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format for details on the + date formatting syntax. Variables that can't be found + will be replaced with the specifier. For example, a + template of "data: %{x}, %{y}" will result in a value + of "data: 1, %{y}" if x is 1 and y is missing. + Variables with an undefined value will be replaced with + the fallback value. The variables available in + `hovertemplate` are the ones emitted as event data + described at this link + https://plotly.com/javascript/plotlyjs-events/#event- + data. Additionally, all attributes that can be + specified per-point (the ones that are `arrayOk: true`) + are available. Finally, the template string has access + to variable `z` Anything contained in tag `` is + displayed in the secondary box, for example + `%{fullData.name}`. To hide the + secondary box completely, use an empty tag + ``. + hovertemplatefallback + Fallback string that's displayed when a variable + referenced in a template is missing. If the boolean + value 'false' is passed in, the specifier with the + missing variable will be displayed. + hovertemplatesrc + Sets the source reference on Chart Studio Cloud for + `hovertemplate`. + ids + Assigns id labels to each datum. These ids for object + constancy of data points during animation. Should be an + array of strings, not numbers or any other type. + idssrc + Sets the source reference on Chart Studio Cloud for + `ids`. + legend + Sets the reference to a legend to show this trace in. + References to these legends are "legend", "legend2", + "legend3", etc. Settings for these legends are set in + the layout, under `layout.legend`, `layout.legend2`, + etc. + legendgroup + Sets the legend group for this trace. Traces and shapes + part of the same legend group hide/show at the same + time when toggling legend items. + legendgrouptitle + :class:`plotly.graph_objects.histogram2d.Legendgrouptit + le` instance or dict with compatible properties + legendrank + Sets the legend rank for this trace. Items and groups + with smaller ranks are presented on top/left side while + with "reversed" `legend.traceorder` they are on + bottom/right side. The default legendrank is 1000, so + that you can use ranks less than 1000 to place certain + items before all unranked items, and ranks greater than + 1000 to go after all unranked items. When having + unranked or equal rank items shapes would be displayed + after traces i.e. according to their order in data and + layout. + legendwidth + Sets the width (in px or fraction) of the legend for + this trace. + marker + :class:`plotly.graph_objects.histogram2d.Marker` + instance or dict with compatible properties + meta + Assigns extra meta information associated with this + trace that can be used in various text attributes. + Attributes such as trace `name`, graph, axis and + colorbar `title.text`, annotation `text` + `rangeselector`, `updatemenues` and `sliders` `label` + text all support `meta`. To access the trace `meta` + values in an attribute in the same trace, simply use + `%{meta[i]}` where `i` is the index or key of the + `meta` item in question. To access trace `meta` in + layout attributes, use `%{data[n[.meta[i]}` where `i` + is the index or key of the `meta` and `n` is the trace + index. + metasrc + Sets the source reference on Chart Studio Cloud for + `meta`. + name + Sets the trace name. The trace name appears as the + legend item and on hover. + nbinsx + Specifies the maximum number of desired bins. This + value will be used in an algorithm that will decide the + optimal bin size such that the histogram best + visualizes the distribution of the data. Ignored if + `xbins.size` is provided. + nbinsy + Specifies the maximum number of desired bins. This + value will be used in an algorithm that will decide the + optimal bin size such that the histogram best + visualizes the distribution of the data. Ignored if + `ybins.size` is provided. + opacity + Sets the opacity of the trace. + reversescale + Reverses the color mapping if true. If true, `zmin` + will correspond to the last color in the array and + `zmax` will correspond to the first color. + showlegend + Determines whether or not an item corresponding to this + trace is shown in the legend. + showscale + Determines whether or not a colorbar is displayed for + this trace. + stream + :class:`plotly.graph_objects.histogram2d.Stream` + instance or dict with compatible properties + textfont + Sets the text font. + texttemplate + Template string used for rendering the information text + that appears on points. Note that this will override + `textinfo`. Variables are inserted using %{variable}, + for example "y: %{y}". Numbers are formatted using + d3-format's syntax %{variable:d3-format}, for example + "Price: %{y:$.2f}". + https://github.com/d3/d3-format/tree/v1.4.5#d3-format + for details on the formatting syntax. Dates are + formatted using d3-time-format's syntax + %{variable|d3-time-format}, for example "Day: + %{2019-01-01|%A}". https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format for details on the + date formatting syntax. Variables that can't be found + will be replaced with the specifier. For example, a + template of "data: %{x}, %{y}" will result in a value + of "data: 1, %{y}" if x is 1 and y is missing. + Variables with an undefined value will be replaced with + the fallback value. All attributes that can be + specified per-point (the ones that are `arrayOk: true`) + are available. Finally, the template string has access + to variable `z` + texttemplatefallback + Fallback string that's displayed when a variable + referenced in a template is missing. If the boolean + value 'false' is passed in, the specifier with the + missing variable will be displayed. + uid + Assign an id to this trace, Use this to provide object + constancy between traces during animations and + transitions. + uirevision + Controls persistence of some user-driven changes to the + trace: `constraintrange` in `parcoords` traces, as well + as some `editable: true` modifications such as `name` + and `colorbar.title`. Defaults to `layout.uirevision`. + Note that other user-driven trace attribute changes are + controlled by `layout` attributes: `trace.visible` is + controlled by `layout.legend.uirevision`, + `selectedpoints` is controlled by + `layout.selectionrevision`, and `colorbar.(x|y)` + (accessible with `config: {editable: true}`) is + controlled by `layout.editrevision`. Trace changes are + tracked by `uid`, which only falls back on trace index + if no `uid` is provided. So if your app can add/remove + traces before the end of the `data` array, such that + the same trace has a different index, you can still + preserve user-driven changes if you give each trace a + `uid` that stays with it as it moves. + visible + Determines whether or not this trace is visible. If + "legendonly", the trace is not drawn, but can appear as + a legend item (provided that the legend itself is + visible). + x + Sets the sample data to be binned on the x axis. + xaxis + Sets a reference between this trace's x coordinates and + a 2D cartesian x axis. If "x" (the default value), the + x coordinates refer to `layout.xaxis`. If "x2", the x + coordinates refer to `layout.xaxis2`, and so on. + xbingroup + Set a group of histogram traces which will have + compatible x-bin settings. Using `xbingroup`, + histogram2d and histogram2dcontour traces (on axes of + the same axis type) can have compatible x-bin settings. + Note that the same `xbingroup` value can be used to set + (1D) histogram `bingroup` + xbins + :class:`plotly.graph_objects.histogram2d.XBins` + instance or dict with compatible properties + xcalendar + Sets the calendar system to use with `x` date data. + xgap + Sets the horizontal gap (in pixels) between bricks. + xhoverformat + Sets the hover text formatting rulefor `x` using d3 + formatting mini-languages which are very similar to + those in Python. For numbers, see: + https://github.com/d3/d3-format/tree/v1.4.5#d3-format. + And for dates see: https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format. We add two items to + d3's date formatter: "%h" for half of the year as a + decimal number as well as "%{n}f" for fractional + seconds with n digits. For example, *2016-10-13 + 09:15:23.456* with tickformat "%H~%M~%S.%2f" would + display *09~15~23.46*By default the values are + formatted using `xaxis.hoverformat`. + xsrc + Sets the source reference on Chart Studio Cloud for + `x`. + y + Sets the sample data to be binned on the y axis. + yaxis + Sets a reference between this trace's y coordinates and + a 2D cartesian y axis. If "y" (the default value), the + y coordinates refer to `layout.yaxis`. If "y2", the y + coordinates refer to `layout.yaxis2`, and so on. + ybingroup + Set a group of histogram traces which will have + compatible y-bin settings. Using `ybingroup`, + histogram2d and histogram2dcontour traces (on axes of + the same axis type) can have compatible y-bin settings. + Note that the same `ybingroup` value can be used to set + (1D) histogram `bingroup` + ybins + :class:`plotly.graph_objects.histogram2d.YBins` + instance or dict with compatible properties + ycalendar + Sets the calendar system to use with `y` date data. + ygap + Sets the vertical gap (in pixels) between bricks. + yhoverformat + Sets the hover text formatting rulefor `y` using d3 + formatting mini-languages which are very similar to + those in Python. For numbers, see: + https://github.com/d3/d3-format/tree/v1.4.5#d3-format. + And for dates see: https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format. We add two items to + d3's date formatter: "%h" for half of the year as a + decimal number as well as "%{n}f" for fractional + seconds with n digits. For example, *2016-10-13 + 09:15:23.456* with tickformat "%H~%M~%S.%2f" would + display *09~15~23.46*By default the values are + formatted using `yaxis.hoverformat`. + ysrc + Sets the source reference on Chart Studio Cloud for + `y`. + z + Sets the aggregation data. + zauto + Determines whether or not the color domain is computed + with respect to the input data (here in `z`) or the + bounds set in `zmin` and `zmax` Defaults to `false` + when `zmin` and `zmax` are set by the user. + zhoverformat + Sets the hover text formatting rulefor `z` using d3 + formatting mini-languages which are very similar to + those in Python. For numbers, see: https://github.com/d + 3/d3-format/tree/v1.4.5#d3-format.By default the values + are formatted using generic number format. + zmax + Sets the upper bound of the color domain. Value should + have the same units as in `z` and if set, `zmin` must + be set as well. + zmid + Sets the mid-point of the color domain by scaling + `zmin` and/or `zmax` to be equidistant to this point. + Value should have the same units as in `z`. Has no + effect when `zauto` is `false`. + zmin + Sets the lower bound of the color domain. Value should + have the same units as in `z` and if set, `zmax` must + be set as well. + zsmooth + Picks a smoothing algorithm use to smooth `z` data. + zsrc + Sets the source reference on Chart Studio Cloud for + `z`. + row : 'all', int or None (default) + Subplot row index (starting from 1) for the trace to be + added. Only valid if figure was created using + `plotly.tools.make_subplots`.If 'all', addresses all + rows in the specified column(s). + col : 'all', int or None (default) + Subplot col index (starting from 1) for the trace to be + added. Only valid if figure was created using + `plotly.tools.make_subplots`.If 'all', addresses all + columns in the specified row(s). + secondary_y: boolean or None (default None) + If True, associate this trace with the secondary y-axis of the + subplot at the specified row and col. Only valid if all of the + following conditions are satisfied: + * The figure was created using `plotly.subplots.make_subplots`. + * The row and col arguments are not None + * The subplot at the specified row and col has type xy + (which is the default) and secondary_y True. These + properties are specified in the specs argument to + make_subplots. See the make_subplots docstring for more info. + + Returns + ------- + FigureWidget + """ + from plotly.graph_objs import Histogram2d + + new_trace = Histogram2d( + autobinx=autobinx, + autobiny=autobiny, + autocolorscale=autocolorscale, + bingroup=bingroup, + coloraxis=coloraxis, + colorbar=colorbar, + colorscale=colorscale, + customdata=customdata, + customdatasrc=customdatasrc, + histfunc=histfunc, + histnorm=histnorm, + hoverinfo=hoverinfo, + hoverinfosrc=hoverinfosrc, + hoverlabel=hoverlabel, + hovertemplate=hovertemplate, + hovertemplatefallback=hovertemplatefallback, + hovertemplatesrc=hovertemplatesrc, + ids=ids, + idssrc=idssrc, + legend=legend, + legendgroup=legendgroup, + legendgrouptitle=legendgrouptitle, + legendrank=legendrank, + legendwidth=legendwidth, + marker=marker, + meta=meta, + metasrc=metasrc, + name=name, + nbinsx=nbinsx, + nbinsy=nbinsy, + opacity=opacity, + reversescale=reversescale, + showlegend=showlegend, + showscale=showscale, + stream=stream, + textfont=textfont, + texttemplate=texttemplate, + texttemplatefallback=texttemplatefallback, + uid=uid, + uirevision=uirevision, + visible=visible, + x=x, + xaxis=xaxis, + xbingroup=xbingroup, + xbins=xbins, + xcalendar=xcalendar, + xgap=xgap, + xhoverformat=xhoverformat, + xsrc=xsrc, + y=y, + yaxis=yaxis, + ybingroup=ybingroup, + ybins=ybins, + ycalendar=ycalendar, + ygap=ygap, + yhoverformat=yhoverformat, + ysrc=ysrc, + z=z, + zauto=zauto, + zhoverformat=zhoverformat, + zmax=zmax, + zmid=zmid, + zmin=zmin, + zsmooth=zsmooth, + zsrc=zsrc, + **kwargs, + ) + return self.add_trace(new_trace, row=row, col=col, secondary_y=secondary_y) + + def add_histogram2dcontour( + self, + autobinx=None, + autobiny=None, + autocolorscale=None, + autocontour=None, + bingroup=None, + coloraxis=None, + colorbar=None, + colorscale=None, + contours=None, + customdata=None, + customdatasrc=None, + histfunc=None, + histnorm=None, + hoverinfo=None, + hoverinfosrc=None, + hoverlabel=None, + hovertemplate=None, + hovertemplatefallback=None, + hovertemplatesrc=None, + ids=None, + idssrc=None, + legend=None, + legendgroup=None, + legendgrouptitle=None, + legendrank=None, + legendwidth=None, + line=None, + marker=None, + meta=None, + metasrc=None, + name=None, + nbinsx=None, + nbinsy=None, + ncontours=None, + opacity=None, + reversescale=None, + showlegend=None, + showscale=None, + stream=None, + textfont=None, + texttemplate=None, + texttemplatefallback=None, + uid=None, + uirevision=None, + visible=None, + x=None, + xaxis=None, + xbingroup=None, + xbins=None, + xcalendar=None, + xhoverformat=None, + xsrc=None, + y=None, + yaxis=None, + ybingroup=None, + ybins=None, + ycalendar=None, + yhoverformat=None, + ysrc=None, + z=None, + zauto=None, + zhoverformat=None, + zmax=None, + zmid=None, + zmin=None, + zsrc=None, + row=None, + col=None, + secondary_y=None, + **kwargs, + ) -> "FigureWidget": + """ + Add a new Histogram2dContour trace + + The sample data from which statistics are computed is set in + `x` and `y` (where `x` and `y` represent marginal + distributions, binning is set in `xbins` and `ybins` in this + case) or `z` (where `z` represent the 2D distribution and + binning set, binning is set by `x` and `y` in this case). The + resulting distribution is visualized as a contour plot. + + Parameters + ---------- + autobinx + Obsolete: since v1.42 each bin attribute is auto- + determined separately and `autobinx` is not needed. + However, we accept `autobinx: true` or `false` and will + update `xbins` accordingly before deleting `autobinx` + from the trace. + autobiny + Obsolete: since v1.42 each bin attribute is auto- + determined separately and `autobiny` is not needed. + However, we accept `autobiny: true` or `false` and will + update `ybins` accordingly before deleting `autobiny` + from the trace. + autocolorscale + Determines whether the colorscale is a default palette + (`autocolorscale: true`) or the palette determined by + `colorscale`. In case `colorscale` is unspecified or + `autocolorscale` is true, the default palette will be + chosen according to whether numbers in the `color` + array are all positive, all negative or mixed. + autocontour + Determines whether or not the contour level attributes + are picked by an algorithm. If True, the number of + contour levels can be set in `ncontours`. If False, set + the contour level attributes in `contours`. + bingroup + Set the `xbingroup` and `ybingroup` default prefix For + example, setting a `bingroup` of 1 on two histogram2d + traces will make them their x-bins and y-bins match + separately. + coloraxis + Sets a reference to a shared color axis. References to + these shared color axes are "coloraxis", "coloraxis2", + "coloraxis3", etc. Settings for these shared color axes + are set in the layout, under `layout.coloraxis`, + `layout.coloraxis2`, etc. Note that multiple color + scales can be linked to the same color axis. + colorbar + :class:`plotly.graph_objects.histogram2dcontour.ColorBa + r` instance or dict with compatible properties + colorscale + Sets the colorscale. The colorscale must be an array + containing arrays mapping a normalized value to an rgb, + rgba, hex, hsl, hsv, or named color string. At minimum, + a mapping for the lowest (0) and highest (1) values are + required. For example, `[[0, 'rgb(0,0,255)'], [1, + 'rgb(255,0,0)']]`. To control the bounds of the + colorscale in color space, use `zmin` and `zmax`. + Alternatively, `colorscale` may be a palette name + string of the following list: Blackbody,Bluered,Blues,C + ividis,Earth,Electric,Greens,Greys,Hot,Jet,Picnic,Portl + and,Rainbow,RdBu,Reds,Viridis,YlGnBu,YlOrRd. + contours + :class:`plotly.graph_objects.histogram2dcontour.Contour + s` instance or dict with compatible properties + customdata + Assigns extra data each datum. This may be useful when + listening to hover, click and selection events. Note + that, "scatter" traces also appends customdata items in + the markers DOM elements + customdatasrc + Sets the source reference on Chart Studio Cloud for + `customdata`. + histfunc + Specifies the binning function used for this histogram + trace. If "count", the histogram values are computed by + counting the number of values lying inside each bin. If + "sum", "avg", "min", "max", the histogram values are + computed using the sum, the average, the minimum or the + maximum of the values lying inside each bin + respectively. + histnorm + Specifies the type of normalization used for this + histogram trace. If "", the span of each bar + corresponds to the number of occurrences (i.e. the + number of data points lying inside the bins). If + "percent" / "probability", the span of each bar + corresponds to the percentage / fraction of occurrences + with respect to the total number of sample points + (here, the sum of all bin HEIGHTS equals 100% / 1). If + "density", the span of each bar corresponds to the + number of occurrences in a bin divided by the size of + the bin interval (here, the sum of all bin AREAS equals + the total number of sample points). If *probability + density*, the area of each bar corresponds to the + probability that an event will fall into the + corresponding bin (here, the sum of all bin AREAS + equals 1). + hoverinfo + Determines which trace information appear on hover. If + `none` or `skip` are set, no information is displayed + upon hovering. But, if `none` is set, click and hover + events are still fired. + hoverinfosrc + Sets the source reference on Chart Studio Cloud for + `hoverinfo`. + hoverlabel + :class:`plotly.graph_objects.histogram2dcontour.Hoverla + bel` instance or dict with compatible properties + hovertemplate + Template string used for rendering the information that + appear on hover box. Note that this will override + `hoverinfo`. Variables are inserted using %{variable}, + for example "y: %{y}" as well as %{xother}, {%_xother}, + {%_xother_}, {%xother_}. When showing info for several + points, "xother" will be added to those with different + x positions from the first point. An underscore before + or after "(x|y)other" will add a space on that side, + only when this field is shown. Numbers are formatted + using d3-format's syntax %{variable:d3-format}, for + example "Price: %{y:$.2f}". + https://github.com/d3/d3-format/tree/v1.4.5#d3-format + for details on the formatting syntax. Dates are + formatted using d3-time-format's syntax + %{variable|d3-time-format}, for example "Day: + %{2019-01-01|%A}". https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format for details on the + date formatting syntax. Variables that can't be found + will be replaced with the specifier. For example, a + template of "data: %{x}, %{y}" will result in a value + of "data: 1, %{y}" if x is 1 and y is missing. + Variables with an undefined value will be replaced with + the fallback value. The variables available in + `hovertemplate` are the ones emitted as event data + described at this link + https://plotly.com/javascript/plotlyjs-events/#event- + data. Additionally, all attributes that can be + specified per-point (the ones that are `arrayOk: true`) + are available. Finally, the template string has access + to variable `z` Anything contained in tag `` is + displayed in the secondary box, for example + `%{fullData.name}`. To hide the + secondary box completely, use an empty tag + ``. + hovertemplatefallback + Fallback string that's displayed when a variable + referenced in a template is missing. If the boolean + value 'false' is passed in, the specifier with the + missing variable will be displayed. + hovertemplatesrc + Sets the source reference on Chart Studio Cloud for + `hovertemplate`. + ids + Assigns id labels to each datum. These ids for object + constancy of data points during animation. Should be an + array of strings, not numbers or any other type. + idssrc + Sets the source reference on Chart Studio Cloud for + `ids`. + legend + Sets the reference to a legend to show this trace in. + References to these legends are "legend", "legend2", + "legend3", etc. Settings for these legends are set in + the layout, under `layout.legend`, `layout.legend2`, + etc. + legendgroup + Sets the legend group for this trace. Traces and shapes + part of the same legend group hide/show at the same + time when toggling legend items. + legendgrouptitle + :class:`plotly.graph_objects.histogram2dcontour.Legendg + rouptitle` instance or dict with compatible properties + legendrank + Sets the legend rank for this trace. Items and groups + with smaller ranks are presented on top/left side while + with "reversed" `legend.traceorder` they are on + bottom/right side. The default legendrank is 1000, so + that you can use ranks less than 1000 to place certain + items before all unranked items, and ranks greater than + 1000 to go after all unranked items. When having + unranked or equal rank items shapes would be displayed + after traces i.e. according to their order in data and + layout. + legendwidth + Sets the width (in px or fraction) of the legend for + this trace. + line + :class:`plotly.graph_objects.histogram2dcontour.Line` + instance or dict with compatible properties + marker + :class:`plotly.graph_objects.histogram2dcontour.Marker` + instance or dict with compatible properties + meta + Assigns extra meta information associated with this + trace that can be used in various text attributes. + Attributes such as trace `name`, graph, axis and + colorbar `title.text`, annotation `text` + `rangeselector`, `updatemenues` and `sliders` `label` + text all support `meta`. To access the trace `meta` + values in an attribute in the same trace, simply use + `%{meta[i]}` where `i` is the index or key of the + `meta` item in question. To access trace `meta` in + layout attributes, use `%{data[n[.meta[i]}` where `i` + is the index or key of the `meta` and `n` is the trace + index. + metasrc + Sets the source reference on Chart Studio Cloud for + `meta`. + name + Sets the trace name. The trace name appears as the + legend item and on hover. + nbinsx + Specifies the maximum number of desired bins. This + value will be used in an algorithm that will decide the + optimal bin size such that the histogram best + visualizes the distribution of the data. Ignored if + `xbins.size` is provided. + nbinsy + Specifies the maximum number of desired bins. This + value will be used in an algorithm that will decide the + optimal bin size such that the histogram best + visualizes the distribution of the data. Ignored if + `ybins.size` is provided. + ncontours + Sets the maximum number of contour levels. The actual + number of contours will be chosen automatically to be + less than or equal to the value of `ncontours`. Has an + effect only if `autocontour` is True or if + `contours.size` is missing. + opacity + Sets the opacity of the trace. + reversescale + Reverses the color mapping if true. If true, `zmin` + will correspond to the last color in the array and + `zmax` will correspond to the first color. + showlegend + Determines whether or not an item corresponding to this + trace is shown in the legend. + showscale + Determines whether or not a colorbar is displayed for + this trace. + stream + :class:`plotly.graph_objects.histogram2dcontour.Stream` + instance or dict with compatible properties + textfont + For this trace it only has an effect if `coloring` is + set to "heatmap". Sets the text font. + texttemplate + For this trace it only has an effect if `coloring` is + set to "heatmap". Template string used for rendering + the information text that appears on points. Note that + this will override `textinfo`. Variables are inserted + using %{variable}, for example "y: %{y}". Numbers are + formatted using d3-format's syntax + %{variable:d3-format}, for example "Price: %{y:$.2f}". + https://github.com/d3/d3-format/tree/v1.4.5#d3-format + for details on the formatting syntax. Dates are + formatted using d3-time-format's syntax + %{variable|d3-time-format}, for example "Day: + %{2019-01-01|%A}". https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format for details on the + date formatting syntax. Variables that can't be found + will be replaced with the specifier. For example, a + template of "data: %{x}, %{y}" will result in a value + of "data: 1, %{y}" if x is 1 and y is missing. + Variables with an undefined value will be replaced with + the fallback value. All attributes that can be + specified per-point (the ones that are `arrayOk: true`) + are available. Finally, the template string has access + to variables `x`, `y`, `z` and `text`. + texttemplatefallback + Fallback string that's displayed when a variable + referenced in a template is missing. If the boolean + value 'false' is passed in, the specifier with the + missing variable will be displayed. + uid + Assign an id to this trace, Use this to provide object + constancy between traces during animations and + transitions. + uirevision + Controls persistence of some user-driven changes to the + trace: `constraintrange` in `parcoords` traces, as well + as some `editable: true` modifications such as `name` + and `colorbar.title`. Defaults to `layout.uirevision`. + Note that other user-driven trace attribute changes are + controlled by `layout` attributes: `trace.visible` is + controlled by `layout.legend.uirevision`, + `selectedpoints` is controlled by + `layout.selectionrevision`, and `colorbar.(x|y)` + (accessible with `config: {editable: true}`) is + controlled by `layout.editrevision`. Trace changes are + tracked by `uid`, which only falls back on trace index + if no `uid` is provided. So if your app can add/remove + traces before the end of the `data` array, such that + the same trace has a different index, you can still + preserve user-driven changes if you give each trace a + `uid` that stays with it as it moves. + visible + Determines whether or not this trace is visible. If + "legendonly", the trace is not drawn, but can appear as + a legend item (provided that the legend itself is + visible). + x + Sets the sample data to be binned on the x axis. + xaxis + Sets a reference between this trace's x coordinates and + a 2D cartesian x axis. If "x" (the default value), the + x coordinates refer to `layout.xaxis`. If "x2", the x + coordinates refer to `layout.xaxis2`, and so on. + xbingroup + Set a group of histogram traces which will have + compatible x-bin settings. Using `xbingroup`, + histogram2d and histogram2dcontour traces (on axes of + the same axis type) can have compatible x-bin settings. + Note that the same `xbingroup` value can be used to set + (1D) histogram `bingroup` + xbins + :class:`plotly.graph_objects.histogram2dcontour.XBins` + instance or dict with compatible properties + xcalendar + Sets the calendar system to use with `x` date data. + xhoverformat + Sets the hover text formatting rulefor `x` using d3 + formatting mini-languages which are very similar to + those in Python. For numbers, see: + https://github.com/d3/d3-format/tree/v1.4.5#d3-format. + And for dates see: https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format. We add two items to + d3's date formatter: "%h" for half of the year as a + decimal number as well as "%{n}f" for fractional + seconds with n digits. For example, *2016-10-13 + 09:15:23.456* with tickformat "%H~%M~%S.%2f" would + display *09~15~23.46*By default the values are + formatted using `xaxis.hoverformat`. + xsrc + Sets the source reference on Chart Studio Cloud for + `x`. + y + Sets the sample data to be binned on the y axis. + yaxis + Sets a reference between this trace's y coordinates and + a 2D cartesian y axis. If "y" (the default value), the + y coordinates refer to `layout.yaxis`. If "y2", the y + coordinates refer to `layout.yaxis2`, and so on. + ybingroup + Set a group of histogram traces which will have + compatible y-bin settings. Using `ybingroup`, + histogram2d and histogram2dcontour traces (on axes of + the same axis type) can have compatible y-bin settings. + Note that the same `ybingroup` value can be used to set + (1D) histogram `bingroup` + ybins + :class:`plotly.graph_objects.histogram2dcontour.YBins` + instance or dict with compatible properties + ycalendar + Sets the calendar system to use with `y` date data. + yhoverformat + Sets the hover text formatting rulefor `y` using d3 + formatting mini-languages which are very similar to + those in Python. For numbers, see: + https://github.com/d3/d3-format/tree/v1.4.5#d3-format. + And for dates see: https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format. We add two items to + d3's date formatter: "%h" for half of the year as a + decimal number as well as "%{n}f" for fractional + seconds with n digits. For example, *2016-10-13 + 09:15:23.456* with tickformat "%H~%M~%S.%2f" would + display *09~15~23.46*By default the values are + formatted using `yaxis.hoverformat`. + ysrc + Sets the source reference on Chart Studio Cloud for + `y`. + z + Sets the aggregation data. + zauto + Determines whether or not the color domain is computed + with respect to the input data (here in `z`) or the + bounds set in `zmin` and `zmax` Defaults to `false` + when `zmin` and `zmax` are set by the user. + zhoverformat + Sets the hover text formatting rulefor `z` using d3 + formatting mini-languages which are very similar to + those in Python. For numbers, see: https://github.com/d + 3/d3-format/tree/v1.4.5#d3-format.By default the values + are formatted using generic number format. + zmax + Sets the upper bound of the color domain. Value should + have the same units as in `z` and if set, `zmin` must + be set as well. + zmid + Sets the mid-point of the color domain by scaling + `zmin` and/or `zmax` to be equidistant to this point. + Value should have the same units as in `z`. Has no + effect when `zauto` is `false`. + zmin + Sets the lower bound of the color domain. Value should + have the same units as in `z` and if set, `zmax` must + be set as well. + zsrc + Sets the source reference on Chart Studio Cloud for + `z`. + row : 'all', int or None (default) + Subplot row index (starting from 1) for the trace to be + added. Only valid if figure was created using + `plotly.tools.make_subplots`.If 'all', addresses all + rows in the specified column(s). + col : 'all', int or None (default) + Subplot col index (starting from 1) for the trace to be + added. Only valid if figure was created using + `plotly.tools.make_subplots`.If 'all', addresses all + columns in the specified row(s). + secondary_y: boolean or None (default None) + If True, associate this trace with the secondary y-axis of the + subplot at the specified row and col. Only valid if all of the + following conditions are satisfied: + * The figure was created using `plotly.subplots.make_subplots`. + * The row and col arguments are not None + * The subplot at the specified row and col has type xy + (which is the default) and secondary_y True. These + properties are specified in the specs argument to + make_subplots. See the make_subplots docstring for more info. + + Returns + ------- + FigureWidget + """ + from plotly.graph_objs import Histogram2dContour + + new_trace = Histogram2dContour( + autobinx=autobinx, + autobiny=autobiny, + autocolorscale=autocolorscale, + autocontour=autocontour, + bingroup=bingroup, + coloraxis=coloraxis, + colorbar=colorbar, + colorscale=colorscale, + contours=contours, + customdata=customdata, + customdatasrc=customdatasrc, + histfunc=histfunc, + histnorm=histnorm, + hoverinfo=hoverinfo, + hoverinfosrc=hoverinfosrc, + hoverlabel=hoverlabel, + hovertemplate=hovertemplate, + hovertemplatefallback=hovertemplatefallback, + hovertemplatesrc=hovertemplatesrc, + ids=ids, + idssrc=idssrc, + legend=legend, + legendgroup=legendgroup, + legendgrouptitle=legendgrouptitle, + legendrank=legendrank, + legendwidth=legendwidth, + line=line, + marker=marker, + meta=meta, + metasrc=metasrc, + name=name, + nbinsx=nbinsx, + nbinsy=nbinsy, + ncontours=ncontours, + opacity=opacity, + reversescale=reversescale, + showlegend=showlegend, + showscale=showscale, + stream=stream, + textfont=textfont, + texttemplate=texttemplate, + texttemplatefallback=texttemplatefallback, + uid=uid, + uirevision=uirevision, + visible=visible, + x=x, + xaxis=xaxis, + xbingroup=xbingroup, + xbins=xbins, + xcalendar=xcalendar, + xhoverformat=xhoverformat, + xsrc=xsrc, + y=y, + yaxis=yaxis, + ybingroup=ybingroup, + ybins=ybins, + ycalendar=ycalendar, + yhoverformat=yhoverformat, + ysrc=ysrc, + z=z, + zauto=zauto, + zhoverformat=zhoverformat, + zmax=zmax, + zmid=zmid, + zmin=zmin, + zsrc=zsrc, + **kwargs, + ) + return self.add_trace(new_trace, row=row, col=col, secondary_y=secondary_y) + + def add_icicle( + self, + branchvalues=None, + count=None, + customdata=None, + customdatasrc=None, + domain=None, + hoverinfo=None, + hoverinfosrc=None, + hoverlabel=None, + hovertemplate=None, + hovertemplatefallback=None, + hovertemplatesrc=None, + hovertext=None, + hovertextsrc=None, + ids=None, + idssrc=None, + insidetextfont=None, + labels=None, + labelssrc=None, + leaf=None, + legend=None, + legendgrouptitle=None, + legendrank=None, + legendwidth=None, + level=None, + marker=None, + maxdepth=None, + meta=None, + metasrc=None, + name=None, + opacity=None, + outsidetextfont=None, + parents=None, + parentssrc=None, + pathbar=None, + root=None, + sort=None, + stream=None, + text=None, + textfont=None, + textinfo=None, + textposition=None, + textsrc=None, + texttemplate=None, + texttemplatefallback=None, + texttemplatesrc=None, + tiling=None, + uid=None, + uirevision=None, + values=None, + valuessrc=None, + visible=None, + row=None, + col=None, + **kwargs, + ) -> "FigureWidget": + """ + Add a new Icicle trace + + Visualize hierarchal data from leaves (and/or outer branches) + towards root with rectangles. The icicle sectors are determined + by the entries in "labels" or "ids" and in "parents". + + Parameters + ---------- + branchvalues + Determines how the items in `values` are summed. When + set to "total", items in `values` are taken to be value + of all its descendants. When set to "remainder", items + in `values` corresponding to the root and the branches + sectors are taken to be the extra part not part of the + sum of the values at their leaves. + count + Determines default for `values` when it is not + provided, by inferring a 1 for each of the "leaves" + and/or "branches", otherwise 0. + customdata + Assigns extra data each datum. This may be useful when + listening to hover, click and selection events. Note + that, "scatter" traces also appends customdata items in + the markers DOM elements + customdatasrc + Sets the source reference on Chart Studio Cloud for + `customdata`. + domain + :class:`plotly.graph_objects.icicle.Domain` instance or + dict with compatible properties + hoverinfo + Determines which trace information appear on hover. If + `none` or `skip` are set, no information is displayed + upon hovering. But, if `none` is set, click and hover + events are still fired. + hoverinfosrc + Sets the source reference on Chart Studio Cloud for + `hoverinfo`. + hoverlabel + :class:`plotly.graph_objects.icicle.Hoverlabel` + instance or dict with compatible properties + hovertemplate + Template string used for rendering the information that + appear on hover box. Note that this will override + `hoverinfo`. Variables are inserted using %{variable}, + for example "y: %{y}" as well as %{xother}, {%_xother}, + {%_xother_}, {%xother_}. When showing info for several + points, "xother" will be added to those with different + x positions from the first point. An underscore before + or after "(x|y)other" will add a space on that side, + only when this field is shown. Numbers are formatted + using d3-format's syntax %{variable:d3-format}, for + example "Price: %{y:$.2f}". + https://github.com/d3/d3-format/tree/v1.4.5#d3-format + for details on the formatting syntax. Dates are + formatted using d3-time-format's syntax + %{variable|d3-time-format}, for example "Day: + %{2019-01-01|%A}". https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format for details on the + date formatting syntax. Variables that can't be found + will be replaced with the specifier. For example, a + template of "data: %{x}, %{y}" will result in a value + of "data: 1, %{y}" if x is 1 and y is missing. + Variables with an undefined value will be replaced with + the fallback value. The variables available in + `hovertemplate` are the ones emitted as event data + described at this link + https://plotly.com/javascript/plotlyjs-events/#event- + data. Additionally, all attributes that can be + specified per-point (the ones that are `arrayOk: true`) + are available. Finally, the template string has access + to variables `currentPath`, `root`, `entry`, + `percentRoot`, `percentEntry` and `percentParent`. + Anything contained in tag `` is displayed in the + secondary box, for example + `%{fullData.name}`. To hide the + secondary box completely, use an empty tag + ``. + hovertemplatefallback + Fallback string that's displayed when a variable + referenced in a template is missing. If the boolean + value 'false' is passed in, the specifier with the + missing variable will be displayed. + hovertemplatesrc + Sets the source reference on Chart Studio Cloud for + `hovertemplate`. + hovertext + Sets hover text elements associated with each sector. + If a single string, the same string appears for all + data points. If an array of string, the items are + mapped in order of this trace's sectors. To be seen, + trace `hoverinfo` must contain a "text" flag. + hovertextsrc + Sets the source reference on Chart Studio Cloud for + `hovertext`. + ids + Assigns id labels to each datum. These ids for object + constancy of data points during animation. Should be an + array of strings, not numbers or any other type. + idssrc + Sets the source reference on Chart Studio Cloud for + `ids`. + insidetextfont + Sets the font used for `textinfo` lying inside the + sector. + labels + Sets the labels of each of the sectors. + labelssrc + Sets the source reference on Chart Studio Cloud for + `labels`. + leaf + :class:`plotly.graph_objects.icicle.Leaf` instance or + dict with compatible properties + legend + Sets the reference to a legend to show this trace in. + References to these legends are "legend", "legend2", + "legend3", etc. Settings for these legends are set in + the layout, under `layout.legend`, `layout.legend2`, + etc. + legendgrouptitle + :class:`plotly.graph_objects.icicle.Legendgrouptitle` + instance or dict with compatible properties + legendrank + Sets the legend rank for this trace. Items and groups + with smaller ranks are presented on top/left side while + with "reversed" `legend.traceorder` they are on + bottom/right side. The default legendrank is 1000, so + that you can use ranks less than 1000 to place certain + items before all unranked items, and ranks greater than + 1000 to go after all unranked items. When having + unranked or equal rank items shapes would be displayed + after traces i.e. according to their order in data and + layout. + legendwidth + Sets the width (in px or fraction) of the legend for + this trace. + level + Sets the level from which this trace hierarchy is + rendered. Set `level` to `''` to start from the root + node in the hierarchy. Must be an "id" if `ids` is + filled in, otherwise plotly attempts to find a matching + item in `labels`. + marker + :class:`plotly.graph_objects.icicle.Marker` instance or + dict with compatible properties + maxdepth + Sets the number of rendered sectors from any given + `level`. Set `maxdepth` to "-1" to render all the + levels in the hierarchy. + meta + Assigns extra meta information associated with this + trace that can be used in various text attributes. + Attributes such as trace `name`, graph, axis and + colorbar `title.text`, annotation `text` + `rangeselector`, `updatemenues` and `sliders` `label` + text all support `meta`. To access the trace `meta` + values in an attribute in the same trace, simply use + `%{meta[i]}` where `i` is the index or key of the + `meta` item in question. To access trace `meta` in + layout attributes, use `%{data[n[.meta[i]}` where `i` + is the index or key of the `meta` and `n` is the trace + index. + metasrc + Sets the source reference on Chart Studio Cloud for + `meta`. + name + Sets the trace name. The trace name appears as the + legend item and on hover. + opacity + Sets the opacity of the trace. + outsidetextfont + Sets the font used for `textinfo` lying outside the + sector. This option refers to the root of the hierarchy + presented on top left corner of a treemap graph. Please + note that if a hierarchy has multiple root nodes, this + option won't have any effect and `insidetextfont` would + be used. + parents + Sets the parent sectors for each of the sectors. Empty + string items '' are understood to reference the root + node in the hierarchy. If `ids` is filled, `parents` + items are understood to be "ids" themselves. When `ids` + is not set, plotly attempts to find matching items in + `labels`, but beware they must be unique. + parentssrc + Sets the source reference on Chart Studio Cloud for + `parents`. + pathbar + :class:`plotly.graph_objects.icicle.Pathbar` instance + or dict with compatible properties + root + :class:`plotly.graph_objects.icicle.Root` instance or + dict with compatible properties + sort + Determines whether or not the sectors are reordered + from largest to smallest. + stream + :class:`plotly.graph_objects.icicle.Stream` instance or + dict with compatible properties + text + Sets text elements associated with each sector. If + trace `textinfo` contains a "text" flag, these elements + will be seen on the chart. If trace `hoverinfo` + contains a "text" flag and "hovertext" is not set, + these elements will be seen in the hover labels. + textfont + Sets the font used for `textinfo`. + textinfo + Determines which trace information appear on the graph. + textposition + Sets the positions of the `text` elements. + textsrc + Sets the source reference on Chart Studio Cloud for + `text`. + texttemplate + Template string used for rendering the information text + that appears on points. Note that this will override + `textinfo`. Variables are inserted using %{variable}, + for example "y: %{y}". Numbers are formatted using + d3-format's syntax %{variable:d3-format}, for example + "Price: %{y:$.2f}". + https://github.com/d3/d3-format/tree/v1.4.5#d3-format + for details on the formatting syntax. Dates are + formatted using d3-time-format's syntax + %{variable|d3-time-format}, for example "Day: + %{2019-01-01|%A}". https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format for details on the + date formatting syntax. Variables that can't be found + will be replaced with the specifier. For example, a + template of "data: %{x}, %{y}" will result in a value + of "data: 1, %{y}" if x is 1 and y is missing. + Variables with an undefined value will be replaced with + the fallback value. All attributes that can be + specified per-point (the ones that are `arrayOk: true`) + are available. Finally, the template string has access + to variables `currentPath`, `root`, `entry`, + `percentRoot`, `percentEntry`, `percentParent`, `label` + and `value`. + texttemplatefallback + Fallback string that's displayed when a variable + referenced in a template is missing. If the boolean + value 'false' is passed in, the specifier with the + missing variable will be displayed. + texttemplatesrc + Sets the source reference on Chart Studio Cloud for + `texttemplate`. + tiling + :class:`plotly.graph_objects.icicle.Tiling` instance or + dict with compatible properties + uid + Assign an id to this trace, Use this to provide object + constancy between traces during animations and + transitions. + uirevision + Controls persistence of some user-driven changes to the + trace: `constraintrange` in `parcoords` traces, as well + as some `editable: true` modifications such as `name` + and `colorbar.title`. Defaults to `layout.uirevision`. + Note that other user-driven trace attribute changes are + controlled by `layout` attributes: `trace.visible` is + controlled by `layout.legend.uirevision`, + `selectedpoints` is controlled by + `layout.selectionrevision`, and `colorbar.(x|y)` + (accessible with `config: {editable: true}`) is + controlled by `layout.editrevision`. Trace changes are + tracked by `uid`, which only falls back on trace index + if no `uid` is provided. So if your app can add/remove + traces before the end of the `data` array, such that + the same trace has a different index, you can still + preserve user-driven changes if you give each trace a + `uid` that stays with it as it moves. + values + Sets the values associated with each of the sectors. + Use with `branchvalues` to determine how the values are + summed. + valuessrc + Sets the source reference on Chart Studio Cloud for + `values`. + visible + Determines whether or not this trace is visible. If + "legendonly", the trace is not drawn, but can appear as + a legend item (provided that the legend itself is + visible). + row : 'all', int or None (default) + Subplot row index (starting from 1) for the trace to be + added. Only valid if figure was created using + `plotly.tools.make_subplots`.If 'all', addresses all + rows in the specified column(s). + col : 'all', int or None (default) + Subplot col index (starting from 1) for the trace to be + added. Only valid if figure was created using + `plotly.tools.make_subplots`.If 'all', addresses all + columns in the specified row(s). + + Returns + ------- + FigureWidget + """ + from plotly.graph_objs import Icicle + + new_trace = Icicle( + branchvalues=branchvalues, + count=count, + customdata=customdata, + customdatasrc=customdatasrc, + domain=domain, + hoverinfo=hoverinfo, + hoverinfosrc=hoverinfosrc, + hoverlabel=hoverlabel, + hovertemplate=hovertemplate, + hovertemplatefallback=hovertemplatefallback, + hovertemplatesrc=hovertemplatesrc, + hovertext=hovertext, + hovertextsrc=hovertextsrc, + ids=ids, + idssrc=idssrc, + insidetextfont=insidetextfont, + labels=labels, + labelssrc=labelssrc, + leaf=leaf, + legend=legend, + legendgrouptitle=legendgrouptitle, + legendrank=legendrank, + legendwidth=legendwidth, + level=level, + marker=marker, + maxdepth=maxdepth, + meta=meta, + metasrc=metasrc, + name=name, + opacity=opacity, + outsidetextfont=outsidetextfont, + parents=parents, + parentssrc=parentssrc, + pathbar=pathbar, + root=root, + sort=sort, + stream=stream, + text=text, + textfont=textfont, + textinfo=textinfo, + textposition=textposition, + textsrc=textsrc, + texttemplate=texttemplate, + texttemplatefallback=texttemplatefallback, + texttemplatesrc=texttemplatesrc, + tiling=tiling, + uid=uid, + uirevision=uirevision, + values=values, + valuessrc=valuessrc, + visible=visible, + **kwargs, + ) + return self.add_trace(new_trace, row=row, col=col) + + def add_image( + self, + colormodel=None, + customdata=None, + customdatasrc=None, + dx=None, + dy=None, + hoverinfo=None, + hoverinfosrc=None, + hoverlabel=None, + hovertemplate=None, + hovertemplatefallback=None, + hovertemplatesrc=None, + hovertext=None, + hovertextsrc=None, + ids=None, + idssrc=None, + legend=None, + legendgrouptitle=None, + legendrank=None, + legendwidth=None, + meta=None, + metasrc=None, + name=None, + opacity=None, + source=None, + stream=None, + text=None, + textsrc=None, + uid=None, + uirevision=None, + visible=None, + x0=None, + xaxis=None, + y0=None, + yaxis=None, + z=None, + zmax=None, + zmin=None, + zorder=None, + zsmooth=None, + zsrc=None, + row=None, + col=None, + secondary_y=None, + **kwargs, + ) -> "FigureWidget": + """ + Add a new Image trace + + Display an image, i.e. data on a 2D regular raster. By default, + when an image is displayed in a subplot, its y axis will be + reversed (ie. `autorange: 'reversed'`), constrained to the + domain (ie. `constrain: 'domain'`) and it will have the same + scale as its x axis (ie. `scaleanchor: 'x,`) in order for + pixels to be rendered as squares. + + Parameters + ---------- + colormodel + Color model used to map the numerical color components + described in `z` into colors. If `source` is specified, + this attribute will be set to `rgba256` otherwise it + defaults to `rgb`. + customdata + Assigns extra data each datum. This may be useful when + listening to hover, click and selection events. Note + that, "scatter" traces also appends customdata items in + the markers DOM elements + customdatasrc + Sets the source reference on Chart Studio Cloud for + `customdata`. + dx + Set the pixel's horizontal size. + dy + Set the pixel's vertical size + hoverinfo + Determines which trace information appear on hover. If + `none` or `skip` are set, no information is displayed + upon hovering. But, if `none` is set, click and hover + events are still fired. + hoverinfosrc + Sets the source reference on Chart Studio Cloud for + `hoverinfo`. + hoverlabel + :class:`plotly.graph_objects.image.Hoverlabel` instance + or dict with compatible properties + hovertemplate + Template string used for rendering the information that + appear on hover box. Note that this will override + `hoverinfo`. Variables are inserted using %{variable}, + for example "y: %{y}" as well as %{xother}, {%_xother}, + {%_xother_}, {%xother_}. When showing info for several + points, "xother" will be added to those with different + x positions from the first point. An underscore before + or after "(x|y)other" will add a space on that side, + only when this field is shown. Numbers are formatted + using d3-format's syntax %{variable:d3-format}, for + example "Price: %{y:$.2f}". + https://github.com/d3/d3-format/tree/v1.4.5#d3-format + for details on the formatting syntax. Dates are + formatted using d3-time-format's syntax + %{variable|d3-time-format}, for example "Day: + %{2019-01-01|%A}". https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format for details on the + date formatting syntax. Variables that can't be found + will be replaced with the specifier. For example, a + template of "data: %{x}, %{y}" will result in a value + of "data: 1, %{y}" if x is 1 and y is missing. + Variables with an undefined value will be replaced with + the fallback value. The variables available in + `hovertemplate` are the ones emitted as event data + described at this link + https://plotly.com/javascript/plotlyjs-events/#event- + data. Additionally, all attributes that can be + specified per-point (the ones that are `arrayOk: true`) + are available. Finally, the template string has access + to variables `z`, `color` and `colormodel`. Anything + contained in tag `` is displayed in the + secondary box, for example + `%{fullData.name}`. To hide the + secondary box completely, use an empty tag + ``. + hovertemplatefallback + Fallback string that's displayed when a variable + referenced in a template is missing. If the boolean + value 'false' is passed in, the specifier with the + missing variable will be displayed. + hovertemplatesrc + Sets the source reference on Chart Studio Cloud for + `hovertemplate`. + hovertext + Same as `text`. + hovertextsrc + Sets the source reference on Chart Studio Cloud for + `hovertext`. + ids + Assigns id labels to each datum. These ids for object + constancy of data points during animation. Should be an + array of strings, not numbers or any other type. + idssrc + Sets the source reference on Chart Studio Cloud for + `ids`. + legend + Sets the reference to a legend to show this trace in. + References to these legends are "legend", "legend2", + "legend3", etc. Settings for these legends are set in + the layout, under `layout.legend`, `layout.legend2`, + etc. + legendgrouptitle + :class:`plotly.graph_objects.image.Legendgrouptitle` + instance or dict with compatible properties + legendrank + Sets the legend rank for this trace. Items and groups + with smaller ranks are presented on top/left side while + with "reversed" `legend.traceorder` they are on + bottom/right side. The default legendrank is 1000, so + that you can use ranks less than 1000 to place certain + items before all unranked items, and ranks greater than + 1000 to go after all unranked items. When having + unranked or equal rank items shapes would be displayed + after traces i.e. according to their order in data and + layout. + legendwidth + Sets the width (in px or fraction) of the legend for + this trace. + meta + Assigns extra meta information associated with this + trace that can be used in various text attributes. + Attributes such as trace `name`, graph, axis and + colorbar `title.text`, annotation `text` + `rangeselector`, `updatemenues` and `sliders` `label` + text all support `meta`. To access the trace `meta` + values in an attribute in the same trace, simply use + `%{meta[i]}` where `i` is the index or key of the + `meta` item in question. To access trace `meta` in + layout attributes, use `%{data[n[.meta[i]}` where `i` + is the index or key of the `meta` and `n` is the trace + index. + metasrc + Sets the source reference on Chart Studio Cloud for + `meta`. + name + Sets the trace name. The trace name appears as the + legend item and on hover. + opacity + Sets the opacity of the trace. + source + Specifies the data URI of the image to be visualized. + The URI consists of "data:image/[][;base64\\]," + stream + :class:`plotly.graph_objects.image.Stream` instance or + dict with compatible properties + text + Sets the text elements associated with each z value. + textsrc + Sets the source reference on Chart Studio Cloud for + `text`. + uid + Assign an id to this trace, Use this to provide object + constancy between traces during animations and + transitions. + uirevision + Controls persistence of some user-driven changes to the + trace: `constraintrange` in `parcoords` traces, as well + as some `editable: true` modifications such as `name` + and `colorbar.title`. Defaults to `layout.uirevision`. + Note that other user-driven trace attribute changes are + controlled by `layout` attributes: `trace.visible` is + controlled by `layout.legend.uirevision`, + `selectedpoints` is controlled by + `layout.selectionrevision`, and `colorbar.(x|y)` + (accessible with `config: {editable: true}`) is + controlled by `layout.editrevision`. Trace changes are + tracked by `uid`, which only falls back on trace index + if no `uid` is provided. So if your app can add/remove + traces before the end of the `data` array, such that + the same trace has a different index, you can still + preserve user-driven changes if you give each trace a + `uid` that stays with it as it moves. + visible + Determines whether or not this trace is visible. If + "legendonly", the trace is not drawn, but can appear as + a legend item (provided that the legend itself is + visible). + x0 + Set the image's x position. The left edge of the image + (or the right edge if the x axis is reversed or dx is + negative) will be found at xmin=x0-dx/2 + xaxis + Sets a reference between this trace's x coordinates and + a 2D cartesian x axis. If "x" (the default value), the + x coordinates refer to `layout.xaxis`. If "x2", the x + coordinates refer to `layout.xaxis2`, and so on. + y0 + Set the image's y position. The top edge of the image + (or the bottom edge if the y axis is NOT reversed or if + dy is negative) will be found at ymin=y0-dy/2. By + default when an image trace is included, the y axis + will be reversed so that the image is right-side-up, + but you can disable this by setting + yaxis.autorange=true or by providing an explicit y axis + range. + yaxis + Sets a reference between this trace's y coordinates and + a 2D cartesian y axis. If "y" (the default value), the + y coordinates refer to `layout.yaxis`. If "y2", the y + coordinates refer to `layout.yaxis2`, and so on. + z + A 2-dimensional array in which each element is an array + of 3 or 4 numbers representing a color. + zmax + Array defining the higher bound for each color + component. Note that the default value will depend on + the colormodel. For the `rgb` colormodel, it is [255, + 255, 255]. For the `rgba` colormodel, it is [255, 255, + 255, 1]. For the `rgba256` colormodel, it is [255, 255, + 255, 255]. For the `hsl` colormodel, it is [360, 100, + 100]. For the `hsla` colormodel, it is [360, 100, 100, + 1]. + zmin + Array defining the lower bound for each color + component. Note that the default value will depend on + the colormodel. For the `rgb` colormodel, it is [0, 0, + 0]. For the `rgba` colormodel, it is [0, 0, 0, 0]. For + the `rgba256` colormodel, it is [0, 0, 0, 0]. For the + `hsl` colormodel, it is [0, 0, 0]. For the `hsla` + colormodel, it is [0, 0, 0, 0]. + zorder + Sets the layer on which this trace is displayed, + relative to other SVG traces on the same subplot. SVG + traces with higher `zorder` appear in front of those + with lower `zorder`. + zsmooth + Picks a smoothing algorithm used to smooth `z` data. + This only applies for image traces that use the + `source` attribute. + zsrc + Sets the source reference on Chart Studio Cloud for + `z`. + row : 'all', int or None (default) + Subplot row index (starting from 1) for the trace to be + added. Only valid if figure was created using + `plotly.tools.make_subplots`.If 'all', addresses all + rows in the specified column(s). + col : 'all', int or None (default) + Subplot col index (starting from 1) for the trace to be + added. Only valid if figure was created using + `plotly.tools.make_subplots`.If 'all', addresses all + columns in the specified row(s). + secondary_y: boolean or None (default None) + If True, associate this trace with the secondary y-axis of the + subplot at the specified row and col. Only valid if all of the + following conditions are satisfied: + * The figure was created using `plotly.subplots.make_subplots`. + * The row and col arguments are not None + * The subplot at the specified row and col has type xy + (which is the default) and secondary_y True. These + properties are specified in the specs argument to + make_subplots. See the make_subplots docstring for more info. + + Returns + ------- + FigureWidget + """ + from plotly.graph_objs import Image + + new_trace = Image( + colormodel=colormodel, + customdata=customdata, + customdatasrc=customdatasrc, + dx=dx, + dy=dy, + hoverinfo=hoverinfo, + hoverinfosrc=hoverinfosrc, + hoverlabel=hoverlabel, + hovertemplate=hovertemplate, + hovertemplatefallback=hovertemplatefallback, + hovertemplatesrc=hovertemplatesrc, + hovertext=hovertext, + hovertextsrc=hovertextsrc, + ids=ids, + idssrc=idssrc, + legend=legend, + legendgrouptitle=legendgrouptitle, + legendrank=legendrank, + legendwidth=legendwidth, + meta=meta, + metasrc=metasrc, + name=name, + opacity=opacity, + source=source, + stream=stream, + text=text, + textsrc=textsrc, + uid=uid, + uirevision=uirevision, + visible=visible, + x0=x0, + xaxis=xaxis, + y0=y0, + yaxis=yaxis, + z=z, + zmax=zmax, + zmin=zmin, + zorder=zorder, + zsmooth=zsmooth, + zsrc=zsrc, + **kwargs, + ) + return self.add_trace(new_trace, row=row, col=col, secondary_y=secondary_y) + + def add_indicator( + self, + align=None, + customdata=None, + customdatasrc=None, + delta=None, + domain=None, + gauge=None, + ids=None, + idssrc=None, + legend=None, + legendgrouptitle=None, + legendrank=None, + legendwidth=None, + meta=None, + metasrc=None, + mode=None, + name=None, + number=None, + stream=None, + title=None, + uid=None, + uirevision=None, + value=None, + visible=None, + row=None, + col=None, + **kwargs, + ) -> "FigureWidget": + """ + Add a new Indicator trace + + An indicator is used to visualize a single `value` along with + some contextual information such as `steps` or a `threshold`, + using a combination of three visual elements: a number, a + delta, and/or a gauge. Deltas are taken with respect to a + `reference`. Gauges can be either angular or bullet (aka + linear) gauges. + + Parameters + ---------- + align + Sets the horizontal alignment of the `text` within the + box. Note that this attribute has no effect if an + angular gauge is displayed: in this case, it is always + centered + customdata + Assigns extra data each datum. This may be useful when + listening to hover, click and selection events. Note + that, "scatter" traces also appends customdata items in + the markers DOM elements + customdatasrc + Sets the source reference on Chart Studio Cloud for + `customdata`. + delta + :class:`plotly.graph_objects.indicator.Delta` instance + or dict with compatible properties + domain + :class:`plotly.graph_objects.indicator.Domain` instance + or dict with compatible properties + gauge + The gauge of the Indicator plot. + ids + Assigns id labels to each datum. These ids for object + constancy of data points during animation. Should be an + array of strings, not numbers or any other type. + idssrc + Sets the source reference on Chart Studio Cloud for + `ids`. + legend + Sets the reference to a legend to show this trace in. + References to these legends are "legend", "legend2", + "legend3", etc. Settings for these legends are set in + the layout, under `layout.legend`, `layout.legend2`, + etc. + legendgrouptitle + :class:`plotly.graph_objects.indicator.Legendgrouptitle + ` instance or dict with compatible properties + legendrank + Sets the legend rank for this trace. Items and groups + with smaller ranks are presented on top/left side while + with "reversed" `legend.traceorder` they are on + bottom/right side. The default legendrank is 1000, so + that you can use ranks less than 1000 to place certain + items before all unranked items, and ranks greater than + 1000 to go after all unranked items. When having + unranked or equal rank items shapes would be displayed + after traces i.e. according to their order in data and + layout. + legendwidth + Sets the width (in px or fraction) of the legend for + this trace. + meta + Assigns extra meta information associated with this + trace that can be used in various text attributes. + Attributes such as trace `name`, graph, axis and + colorbar `title.text`, annotation `text` + `rangeselector`, `updatemenues` and `sliders` `label` + text all support `meta`. To access the trace `meta` + values in an attribute in the same trace, simply use + `%{meta[i]}` where `i` is the index or key of the + `meta` item in question. To access trace `meta` in + layout attributes, use `%{data[n[.meta[i]}` where `i` + is the index or key of the `meta` and `n` is the trace + index. + metasrc + Sets the source reference on Chart Studio Cloud for + `meta`. + mode + Determines how the value is displayed on the graph. + `number` displays the value numerically in text. + `delta` displays the difference to a reference value in + text. Finally, `gauge` displays the value graphically + on an axis. + name + Sets the trace name. The trace name appears as the + legend item and on hover. + number + :class:`plotly.graph_objects.indicator.Number` instance + or dict with compatible properties + stream + :class:`plotly.graph_objects.indicator.Stream` instance + or dict with compatible properties + title + :class:`plotly.graph_objects.indicator.Title` instance + or dict with compatible properties + uid + Assign an id to this trace, Use this to provide object + constancy between traces during animations and + transitions. + uirevision + Controls persistence of some user-driven changes to the + trace: `constraintrange` in `parcoords` traces, as well + as some `editable: true` modifications such as `name` + and `colorbar.title`. Defaults to `layout.uirevision`. + Note that other user-driven trace attribute changes are + controlled by `layout` attributes: `trace.visible` is + controlled by `layout.legend.uirevision`, + `selectedpoints` is controlled by + `layout.selectionrevision`, and `colorbar.(x|y)` + (accessible with `config: {editable: true}`) is + controlled by `layout.editrevision`. Trace changes are + tracked by `uid`, which only falls back on trace index + if no `uid` is provided. So if your app can add/remove + traces before the end of the `data` array, such that + the same trace has a different index, you can still + preserve user-driven changes if you give each trace a + `uid` that stays with it as it moves. + value + Sets the number to be displayed. + visible + Determines whether or not this trace is visible. If + "legendonly", the trace is not drawn, but can appear as + a legend item (provided that the legend itself is + visible). + row : 'all', int or None (default) + Subplot row index (starting from 1) for the trace to be + added. Only valid if figure was created using + `plotly.tools.make_subplots`.If 'all', addresses all + rows in the specified column(s). + col : 'all', int or None (default) + Subplot col index (starting from 1) for the trace to be + added. Only valid if figure was created using + `plotly.tools.make_subplots`.If 'all', addresses all + columns in the specified row(s). + + Returns + ------- + FigureWidget + """ + from plotly.graph_objs import Indicator + + new_trace = Indicator( + align=align, + customdata=customdata, + customdatasrc=customdatasrc, + delta=delta, + domain=domain, + gauge=gauge, + ids=ids, + idssrc=idssrc, + legend=legend, + legendgrouptitle=legendgrouptitle, + legendrank=legendrank, + legendwidth=legendwidth, + meta=meta, + metasrc=metasrc, + mode=mode, + name=name, + number=number, + stream=stream, + title=title, + uid=uid, + uirevision=uirevision, + value=value, + visible=visible, + **kwargs, + ) + return self.add_trace(new_trace, row=row, col=col) + + def add_isosurface( + self, + autocolorscale=None, + caps=None, + cauto=None, + cmax=None, + cmid=None, + cmin=None, + coloraxis=None, + colorbar=None, + colorscale=None, + contour=None, + customdata=None, + customdatasrc=None, + flatshading=None, + hoverinfo=None, + hoverinfosrc=None, + hoverlabel=None, + hovertemplate=None, + hovertemplatefallback=None, + hovertemplatesrc=None, + hovertext=None, + hovertextsrc=None, + ids=None, + idssrc=None, + isomax=None, + isomin=None, + legend=None, + legendgroup=None, + legendgrouptitle=None, + legendrank=None, + legendwidth=None, + lighting=None, + lightposition=None, + meta=None, + metasrc=None, + name=None, + opacity=None, + reversescale=None, + scene=None, + showlegend=None, + showscale=None, + slices=None, + spaceframe=None, + stream=None, + surface=None, + text=None, + textsrc=None, + uid=None, + uirevision=None, + value=None, + valuehoverformat=None, + valuesrc=None, + visible=None, + x=None, + xhoverformat=None, + xsrc=None, + y=None, + yhoverformat=None, + ysrc=None, + z=None, + zhoverformat=None, + zsrc=None, + row=None, + col=None, + **kwargs, + ) -> "FigureWidget": + """ + Add a new Isosurface trace + + Draws isosurfaces between iso-min and iso-max values with + coordinates given by four 1-dimensional arrays containing the + `value`, `x`, `y` and `z` of every vertex of a uniform or non- + uniform 3-D grid. Horizontal or vertical slices, caps as well + as spaceframe between iso-min and iso-max values could also be + drawn using this trace. + + Parameters + ---------- + autocolorscale + Determines whether the colorscale is a default palette + (`autocolorscale: true`) or the palette determined by + `colorscale`. In case `colorscale` is unspecified or + `autocolorscale` is true, the default palette will be + chosen according to whether numbers in the `color` + array are all positive, all negative or mixed. + caps + :class:`plotly.graph_objects.isosurface.Caps` instance + or dict with compatible properties + cauto + Determines whether or not the color domain is computed + with respect to the input data (here `value`) or the + bounds set in `cmin` and `cmax` Defaults to `false` + when `cmin` and `cmax` are set by the user. + cmax + Sets the upper bound of the color domain. Value should + have the same units as `value` and if set, `cmin` must + be set as well. + cmid + Sets the mid-point of the color domain by scaling + `cmin` and/or `cmax` to be equidistant to this point. + Value should have the same units as `value`. Has no + effect when `cauto` is `false`. + cmin + Sets the lower bound of the color domain. Value should + have the same units as `value` and if set, `cmax` must + be set as well. + coloraxis + Sets a reference to a shared color axis. References to + these shared color axes are "coloraxis", "coloraxis2", + "coloraxis3", etc. Settings for these shared color axes + are set in the layout, under `layout.coloraxis`, + `layout.coloraxis2`, etc. Note that multiple color + scales can be linked to the same color axis. + colorbar + :class:`plotly.graph_objects.isosurface.ColorBar` + instance or dict with compatible properties + colorscale + Sets the colorscale. The colorscale must be an array + containing arrays mapping a normalized value to an rgb, + rgba, hex, hsl, hsv, or named color string. At minimum, + a mapping for the lowest (0) and highest (1) values are + required. For example, `[[0, 'rgb(0,0,255)'], [1, + 'rgb(255,0,0)']]`. To control the bounds of the + colorscale in color space, use `cmin` and `cmax`. + Alternatively, `colorscale` may be a palette name + string of the following list: Blackbody,Bluered,Blues,C + ividis,Earth,Electric,Greens,Greys,Hot,Jet,Picnic,Portl + and,Rainbow,RdBu,Reds,Viridis,YlGnBu,YlOrRd. + contour + :class:`plotly.graph_objects.isosurface.Contour` + instance or dict with compatible properties + customdata + Assigns extra data each datum. This may be useful when + listening to hover, click and selection events. Note + that, "scatter" traces also appends customdata items in + the markers DOM elements + customdatasrc + Sets the source reference on Chart Studio Cloud for + `customdata`. + flatshading + Determines whether or not normal smoothing is applied + to the meshes, creating meshes with an angular, low- + poly look via flat reflections. + hoverinfo + Determines which trace information appear on hover. If + `none` or `skip` are set, no information is displayed + upon hovering. But, if `none` is set, click and hover + events are still fired. + hoverinfosrc + Sets the source reference on Chart Studio Cloud for + `hoverinfo`. + hoverlabel + :class:`plotly.graph_objects.isosurface.Hoverlabel` + instance or dict with compatible properties + hovertemplate + Template string used for rendering the information that + appear on hover box. Note that this will override + `hoverinfo`. Variables are inserted using %{variable}, + for example "y: %{y}" as well as %{xother}, {%_xother}, + {%_xother_}, {%xother_}. When showing info for several + points, "xother" will be added to those with different + x positions from the first point. An underscore before + or after "(x|y)other" will add a space on that side, + only when this field is shown. Numbers are formatted + using d3-format's syntax %{variable:d3-format}, for + example "Price: %{y:$.2f}". + https://github.com/d3/d3-format/tree/v1.4.5#d3-format + for details on the formatting syntax. Dates are + formatted using d3-time-format's syntax + %{variable|d3-time-format}, for example "Day: + %{2019-01-01|%A}". https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format for details on the + date formatting syntax. Variables that can't be found + will be replaced with the specifier. For example, a + template of "data: %{x}, %{y}" will result in a value + of "data: 1, %{y}" if x is 1 and y is missing. + Variables with an undefined value will be replaced with + the fallback value. The variables available in + `hovertemplate` are the ones emitted as event data + described at this link + https://plotly.com/javascript/plotlyjs-events/#event- + data. Additionally, all attributes that can be + specified per-point (the ones that are `arrayOk: true`) + are available. Anything contained in tag `` is + displayed in the secondary box, for example + `%{fullData.name}`. To hide the + secondary box completely, use an empty tag + ``. + hovertemplatefallback + Fallback string that's displayed when a variable + referenced in a template is missing. If the boolean + value 'false' is passed in, the specifier with the + missing variable will be displayed. + hovertemplatesrc + Sets the source reference on Chart Studio Cloud for + `hovertemplate`. + hovertext + Same as `text`. + hovertextsrc + Sets the source reference on Chart Studio Cloud for + `hovertext`. + ids + Assigns id labels to each datum. These ids for object + constancy of data points during animation. Should be an + array of strings, not numbers or any other type. + idssrc + Sets the source reference on Chart Studio Cloud for + `ids`. + isomax + Sets the maximum boundary for iso-surface plot. + isomin + Sets the minimum boundary for iso-surface plot. + legend + Sets the reference to a legend to show this trace in. + References to these legends are "legend", "legend2", + "legend3", etc. Settings for these legends are set in + the layout, under `layout.legend`, `layout.legend2`, + etc. + legendgroup + Sets the legend group for this trace. Traces and shapes + part of the same legend group hide/show at the same + time when toggling legend items. + legendgrouptitle + :class:`plotly.graph_objects.isosurface.Legendgrouptitl + e` instance or dict with compatible properties + legendrank + Sets the legend rank for this trace. Items and groups + with smaller ranks are presented on top/left side while + with "reversed" `legend.traceorder` they are on + bottom/right side. The default legendrank is 1000, so + that you can use ranks less than 1000 to place certain + items before all unranked items, and ranks greater than + 1000 to go after all unranked items. When having + unranked or equal rank items shapes would be displayed + after traces i.e. according to their order in data and + layout. + legendwidth + Sets the width (in px or fraction) of the legend for + this trace. + lighting + :class:`plotly.graph_objects.isosurface.Lighting` + instance or dict with compatible properties + lightposition + :class:`plotly.graph_objects.isosurface.Lightposition` + instance or dict with compatible properties + meta + Assigns extra meta information associated with this + trace that can be used in various text attributes. + Attributes such as trace `name`, graph, axis and + colorbar `title.text`, annotation `text` + `rangeselector`, `updatemenues` and `sliders` `label` + text all support `meta`. To access the trace `meta` + values in an attribute in the same trace, simply use + `%{meta[i]}` where `i` is the index or key of the + `meta` item in question. To access trace `meta` in + layout attributes, use `%{data[n[.meta[i]}` where `i` + is the index or key of the `meta` and `n` is the trace + index. + metasrc + Sets the source reference on Chart Studio Cloud for + `meta`. + name + Sets the trace name. The trace name appears as the + legend item and on hover. + opacity + Sets the opacity of the surface. Please note that in + the case of using high `opacity` values for example a + value greater than or equal to 0.5 on two surfaces (and + 0.25 with four surfaces), an overlay of multiple + transparent surfaces may not perfectly be sorted in + depth by the webgl API. This behavior may be improved + in the near future and is subject to change. + reversescale + Reverses the color mapping if true. If true, `cmin` + will correspond to the last color in the array and + `cmax` will correspond to the first color. + scene + Sets a reference between this trace's 3D coordinate + system and a 3D scene. If "scene" (the default value), + the (x,y,z) coordinates refer to `layout.scene`. If + "scene2", the (x,y,z) coordinates refer to + `layout.scene2`, and so on. + showlegend + Determines whether or not an item corresponding to this + trace is shown in the legend. + showscale + Determines whether or not a colorbar is displayed for + this trace. + slices + :class:`plotly.graph_objects.isosurface.Slices` + instance or dict with compatible properties + spaceframe + :class:`plotly.graph_objects.isosurface.Spaceframe` + instance or dict with compatible properties + stream + :class:`plotly.graph_objects.isosurface.Stream` + instance or dict with compatible properties + surface + :class:`plotly.graph_objects.isosurface.Surface` + instance or dict with compatible properties + text + Sets the text elements associated with the vertices. If + trace `hoverinfo` contains a "text" flag and + "hovertext" is not set, these elements will be seen in + the hover labels. + textsrc + Sets the source reference on Chart Studio Cloud for + `text`. + uid + Assign an id to this trace, Use this to provide object + constancy between traces during animations and + transitions. + uirevision + Controls persistence of some user-driven changes to the + trace: `constraintrange` in `parcoords` traces, as well + as some `editable: true` modifications such as `name` + and `colorbar.title`. Defaults to `layout.uirevision`. + Note that other user-driven trace attribute changes are + controlled by `layout` attributes: `trace.visible` is + controlled by `layout.legend.uirevision`, + `selectedpoints` is controlled by + `layout.selectionrevision`, and `colorbar.(x|y)` + (accessible with `config: {editable: true}`) is + controlled by `layout.editrevision`. Trace changes are + tracked by `uid`, which only falls back on trace index + if no `uid` is provided. So if your app can add/remove + traces before the end of the `data` array, such that + the same trace has a different index, you can still + preserve user-driven changes if you give each trace a + `uid` that stays with it as it moves. + value + Sets the 4th dimension (value) of the vertices. + valuehoverformat + Sets the hover text formatting rulefor `value` using + d3 formatting mini-languages which are very similar to + those in Python. For numbers, see: https://github.com/d + 3/d3-format/tree/v1.4.5#d3-format.By default the values + are formatted using generic number format. + valuesrc + Sets the source reference on Chart Studio Cloud for + `value`. + visible + Determines whether or not this trace is visible. If + "legendonly", the trace is not drawn, but can appear as + a legend item (provided that the legend itself is + visible). + x + Sets the X coordinates of the vertices on X axis. + xhoverformat + Sets the hover text formatting rulefor `x` using d3 + formatting mini-languages which are very similar to + those in Python. For numbers, see: + https://github.com/d3/d3-format/tree/v1.4.5#d3-format. + And for dates see: https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format. We add two items to + d3's date formatter: "%h" for half of the year as a + decimal number as well as "%{n}f" for fractional + seconds with n digits. For example, *2016-10-13 + 09:15:23.456* with tickformat "%H~%M~%S.%2f" would + display *09~15~23.46*By default the values are + formatted using `xaxis.hoverformat`. + xsrc + Sets the source reference on Chart Studio Cloud for + `x`. + y + Sets the Y coordinates of the vertices on Y axis. + yhoverformat + Sets the hover text formatting rulefor `y` using d3 + formatting mini-languages which are very similar to + those in Python. For numbers, see: + https://github.com/d3/d3-format/tree/v1.4.5#d3-format. + And for dates see: https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format. We add two items to + d3's date formatter: "%h" for half of the year as a + decimal number as well as "%{n}f" for fractional + seconds with n digits. For example, *2016-10-13 + 09:15:23.456* with tickformat "%H~%M~%S.%2f" would + display *09~15~23.46*By default the values are + formatted using `yaxis.hoverformat`. + ysrc + Sets the source reference on Chart Studio Cloud for + `y`. + z + Sets the Z coordinates of the vertices on Z axis. + zhoverformat + Sets the hover text formatting rulefor `z` using d3 + formatting mini-languages which are very similar to + those in Python. For numbers, see: + https://github.com/d3/d3-format/tree/v1.4.5#d3-format. + And for dates see: https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format. We add two items to + d3's date formatter: "%h" for half of the year as a + decimal number as well as "%{n}f" for fractional + seconds with n digits. For example, *2016-10-13 + 09:15:23.456* with tickformat "%H~%M~%S.%2f" would + display *09~15~23.46*By default the values are + formatted using `zaxis.hoverformat`. + zsrc + Sets the source reference on Chart Studio Cloud for + `z`. + row : 'all', int or None (default) + Subplot row index (starting from 1) for the trace to be + added. Only valid if figure was created using + `plotly.tools.make_subplots`.If 'all', addresses all + rows in the specified column(s). + col : 'all', int or None (default) + Subplot col index (starting from 1) for the trace to be + added. Only valid if figure was created using + `plotly.tools.make_subplots`.If 'all', addresses all + columns in the specified row(s). + + Returns + ------- + FigureWidget + """ + from plotly.graph_objs import Isosurface + + new_trace = Isosurface( + autocolorscale=autocolorscale, + caps=caps, + cauto=cauto, + cmax=cmax, + cmid=cmid, + cmin=cmin, + coloraxis=coloraxis, + colorbar=colorbar, + colorscale=colorscale, + contour=contour, + customdata=customdata, + customdatasrc=customdatasrc, + flatshading=flatshading, + hoverinfo=hoverinfo, + hoverinfosrc=hoverinfosrc, + hoverlabel=hoverlabel, + hovertemplate=hovertemplate, + hovertemplatefallback=hovertemplatefallback, + hovertemplatesrc=hovertemplatesrc, + hovertext=hovertext, + hovertextsrc=hovertextsrc, + ids=ids, + idssrc=idssrc, + isomax=isomax, + isomin=isomin, + legend=legend, + legendgroup=legendgroup, + legendgrouptitle=legendgrouptitle, + legendrank=legendrank, + legendwidth=legendwidth, + lighting=lighting, + lightposition=lightposition, + meta=meta, + metasrc=metasrc, + name=name, + opacity=opacity, + reversescale=reversescale, + scene=scene, + showlegend=showlegend, + showscale=showscale, + slices=slices, + spaceframe=spaceframe, + stream=stream, + surface=surface, + text=text, + textsrc=textsrc, + uid=uid, + uirevision=uirevision, + value=value, + valuehoverformat=valuehoverformat, + valuesrc=valuesrc, + visible=visible, + x=x, + xhoverformat=xhoverformat, + xsrc=xsrc, + y=y, + yhoverformat=yhoverformat, + ysrc=ysrc, + z=z, + zhoverformat=zhoverformat, + zsrc=zsrc, + **kwargs, + ) + return self.add_trace(new_trace, row=row, col=col) + + def add_mesh3d( + self, + alphahull=None, + autocolorscale=None, + cauto=None, + cmax=None, + cmid=None, + cmin=None, + color=None, + coloraxis=None, + colorbar=None, + colorscale=None, + contour=None, + customdata=None, + customdatasrc=None, + delaunayaxis=None, + facecolor=None, + facecolorsrc=None, + flatshading=None, + hoverinfo=None, + hoverinfosrc=None, + hoverlabel=None, + hovertemplate=None, + hovertemplatefallback=None, + hovertemplatesrc=None, + hovertext=None, + hovertextsrc=None, + i=None, + ids=None, + idssrc=None, + intensity=None, + intensitymode=None, + intensitysrc=None, + isrc=None, + j=None, + jsrc=None, + k=None, + ksrc=None, + legend=None, + legendgroup=None, + legendgrouptitle=None, + legendrank=None, + legendwidth=None, + lighting=None, + lightposition=None, + meta=None, + metasrc=None, + name=None, + opacity=None, + reversescale=None, + scene=None, + showlegend=None, + showscale=None, + stream=None, + text=None, + textsrc=None, + uid=None, + uirevision=None, + vertexcolor=None, + vertexcolorsrc=None, + visible=None, + x=None, + xcalendar=None, + xhoverformat=None, + xsrc=None, + y=None, + ycalendar=None, + yhoverformat=None, + ysrc=None, + z=None, + zcalendar=None, + zhoverformat=None, + zsrc=None, + row=None, + col=None, + **kwargs, + ) -> "FigureWidget": + """ + Add a new Mesh3d trace + + Draws sets of triangles with coordinates given by three + 1-dimensional arrays in `x`, `y`, `z` and (1) a sets of `i`, + `j`, `k` indices (2) Delaunay triangulation or (3) the Alpha- + shape algorithm or (4) the Convex-hull algorithm + + Parameters + ---------- + alphahull + Determines how the mesh surface triangles are derived + from the set of vertices (points) represented by the + `x`, `y` and `z` arrays, if the `i`, `j`, `k` arrays + are not supplied. For general use of `mesh3d` it is + preferred that `i`, `j`, `k` are supplied. If "-1", + Delaunay triangulation is used, which is mainly + suitable if the mesh is a single, more or less layer + surface that is perpendicular to `delaunayaxis`. In + case the `delaunayaxis` intersects the mesh surface at + more than one point it will result triangles that are + very long in the dimension of `delaunayaxis`. If ">0", + the alpha-shape algorithm is used. In this case, the + positive `alphahull` value signals the use of the + alpha-shape algorithm, _and_ its value acts as the + parameter for the mesh fitting. If 0, the convex-hull + algorithm is used. It is suitable for convex bodies or + if the intention is to enclose the `x`, `y` and `z` + point set into a convex hull. + autocolorscale + Determines whether the colorscale is a default palette + (`autocolorscale: true`) or the palette determined by + `colorscale`. In case `colorscale` is unspecified or + `autocolorscale` is true, the default palette will be + chosen according to whether numbers in the `color` + array are all positive, all negative or mixed. + cauto + Determines whether or not the color domain is computed + with respect to the input data (here `intensity`) or + the bounds set in `cmin` and `cmax` Defaults to `false` + when `cmin` and `cmax` are set by the user. + cmax + Sets the upper bound of the color domain. Value should + have the same units as `intensity` and if set, `cmin` + must be set as well. + cmid + Sets the mid-point of the color domain by scaling + `cmin` and/or `cmax` to be equidistant to this point. + Value should have the same units as `intensity`. Has no + effect when `cauto` is `false`. + cmin + Sets the lower bound of the color domain. Value should + have the same units as `intensity` and if set, `cmax` + must be set as well. + color + Sets the color of the whole mesh + coloraxis + Sets a reference to a shared color axis. References to + these shared color axes are "coloraxis", "coloraxis2", + "coloraxis3", etc. Settings for these shared color axes + are set in the layout, under `layout.coloraxis`, + `layout.coloraxis2`, etc. Note that multiple color + scales can be linked to the same color axis. + colorbar + :class:`plotly.graph_objects.mesh3d.ColorBar` instance + or dict with compatible properties + colorscale + Sets the colorscale. The colorscale must be an array + containing arrays mapping a normalized value to an rgb, + rgba, hex, hsl, hsv, or named color string. At minimum, + a mapping for the lowest (0) and highest (1) values are + required. For example, `[[0, 'rgb(0,0,255)'], [1, + 'rgb(255,0,0)']]`. To control the bounds of the + colorscale in color space, use `cmin` and `cmax`. + Alternatively, `colorscale` may be a palette name + string of the following list: Blackbody,Bluered,Blues,C + ividis,Earth,Electric,Greens,Greys,Hot,Jet,Picnic,Portl + and,Rainbow,RdBu,Reds,Viridis,YlGnBu,YlOrRd. + contour + :class:`plotly.graph_objects.mesh3d.Contour` instance + or dict with compatible properties + customdata + Assigns extra data each datum. This may be useful when + listening to hover, click and selection events. Note + that, "scatter" traces also appends customdata items in + the markers DOM elements + customdatasrc + Sets the source reference on Chart Studio Cloud for + `customdata`. + delaunayaxis + Sets the Delaunay axis, which is the axis that is + perpendicular to the surface of the Delaunay + triangulation. It has an effect if `i`, `j`, `k` are + not provided and `alphahull` is set to indicate + Delaunay triangulation. + facecolor + Sets the color of each face Overrides "color" and + "vertexcolor". + facecolorsrc + Sets the source reference on Chart Studio Cloud for + `facecolor`. + flatshading + Determines whether or not normal smoothing is applied + to the meshes, creating meshes with an angular, low- + poly look via flat reflections. + hoverinfo + Determines which trace information appear on hover. If + `none` or `skip` are set, no information is displayed + upon hovering. But, if `none` is set, click and hover + events are still fired. + hoverinfosrc + Sets the source reference on Chart Studio Cloud for + `hoverinfo`. + hoverlabel + :class:`plotly.graph_objects.mesh3d.Hoverlabel` + instance or dict with compatible properties + hovertemplate + Template string used for rendering the information that + appear on hover box. Note that this will override + `hoverinfo`. Variables are inserted using %{variable}, + for example "y: %{y}" as well as %{xother}, {%_xother}, + {%_xother_}, {%xother_}. When showing info for several + points, "xother" will be added to those with different + x positions from the first point. An underscore before + or after "(x|y)other" will add a space on that side, + only when this field is shown. Numbers are formatted + using d3-format's syntax %{variable:d3-format}, for + example "Price: %{y:$.2f}". + https://github.com/d3/d3-format/tree/v1.4.5#d3-format + for details on the formatting syntax. Dates are + formatted using d3-time-format's syntax + %{variable|d3-time-format}, for example "Day: + %{2019-01-01|%A}". https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format for details on the + date formatting syntax. Variables that can't be found + will be replaced with the specifier. For example, a + template of "data: %{x}, %{y}" will result in a value + of "data: 1, %{y}" if x is 1 and y is missing. + Variables with an undefined value will be replaced with + the fallback value. The variables available in + `hovertemplate` are the ones emitted as event data + described at this link + https://plotly.com/javascript/plotlyjs-events/#event- + data. Additionally, all attributes that can be + specified per-point (the ones that are `arrayOk: true`) + are available. Anything contained in tag `` is + displayed in the secondary box, for example + `%{fullData.name}`. To hide the + secondary box completely, use an empty tag + ``. + hovertemplatefallback + Fallback string that's displayed when a variable + referenced in a template is missing. If the boolean + value 'false' is passed in, the specifier with the + missing variable will be displayed. + hovertemplatesrc + Sets the source reference on Chart Studio Cloud for + `hovertemplate`. + hovertext + Same as `text`. + hovertextsrc + Sets the source reference on Chart Studio Cloud for + `hovertext`. + i + A vector of vertex indices, i.e. integer values between + 0 and the length of the vertex vectors, representing + the "first" vertex of a triangle. For example, `{i[m], + j[m], k[m]}` together represent face m (triangle m) in + the mesh, where `i[m] = n` points to the triplet + `{x[n], y[n], z[n]}` in the vertex arrays. Therefore, + each element in `i` represents a point in space, which + is the first vertex of a triangle. + ids + Assigns id labels to each datum. These ids for object + constancy of data points during animation. Should be an + array of strings, not numbers or any other type. + idssrc + Sets the source reference on Chart Studio Cloud for + `ids`. + intensity + Sets the intensity values for vertices or cells as + defined by `intensitymode`. It can be used for plotting + fields on meshes. + intensitymode + Determines the source of `intensity` values. + intensitysrc + Sets the source reference on Chart Studio Cloud for + `intensity`. + isrc + Sets the source reference on Chart Studio Cloud for + `i`. + j + A vector of vertex indices, i.e. integer values between + 0 and the length of the vertex vectors, representing + the "second" vertex of a triangle. For example, `{i[m], + j[m], k[m]}` together represent face m (triangle m) in + the mesh, where `j[m] = n` points to the triplet + `{x[n], y[n], z[n]}` in the vertex arrays. Therefore, + each element in `j` represents a point in space, which + is the second vertex of a triangle. + jsrc + Sets the source reference on Chart Studio Cloud for + `j`. + k + A vector of vertex indices, i.e. integer values between + 0 and the length of the vertex vectors, representing + the "third" vertex of a triangle. For example, `{i[m], + j[m], k[m]}` together represent face m (triangle m) in + the mesh, where `k[m] = n` points to the triplet + `{x[n], y[n], z[n]}` in the vertex arrays. Therefore, + each element in `k` represents a point in space, which + is the third vertex of a triangle. + ksrc + Sets the source reference on Chart Studio Cloud for + `k`. + legend + Sets the reference to a legend to show this trace in. + References to these legends are "legend", "legend2", + "legend3", etc. Settings for these legends are set in + the layout, under `layout.legend`, `layout.legend2`, + etc. + legendgroup + Sets the legend group for this trace. Traces and shapes + part of the same legend group hide/show at the same + time when toggling legend items. + legendgrouptitle + :class:`plotly.graph_objects.mesh3d.Legendgrouptitle` + instance or dict with compatible properties + legendrank + Sets the legend rank for this trace. Items and groups + with smaller ranks are presented on top/left side while + with "reversed" `legend.traceorder` they are on + bottom/right side. The default legendrank is 1000, so + that you can use ranks less than 1000 to place certain + items before all unranked items, and ranks greater than + 1000 to go after all unranked items. When having + unranked or equal rank items shapes would be displayed + after traces i.e. according to their order in data and + layout. + legendwidth + Sets the width (in px or fraction) of the legend for + this trace. + lighting + :class:`plotly.graph_objects.mesh3d.Lighting` instance + or dict with compatible properties + lightposition + :class:`plotly.graph_objects.mesh3d.Lightposition` + instance or dict with compatible properties + meta + Assigns extra meta information associated with this + trace that can be used in various text attributes. + Attributes such as trace `name`, graph, axis and + colorbar `title.text`, annotation `text` + `rangeselector`, `updatemenues` and `sliders` `label` + text all support `meta`. To access the trace `meta` + values in an attribute in the same trace, simply use + `%{meta[i]}` where `i` is the index or key of the + `meta` item in question. To access trace `meta` in + layout attributes, use `%{data[n[.meta[i]}` where `i` + is the index or key of the `meta` and `n` is the trace + index. + metasrc + Sets the source reference on Chart Studio Cloud for + `meta`. + name + Sets the trace name. The trace name appears as the + legend item and on hover. + opacity + Sets the opacity of the surface. Please note that in + the case of using high `opacity` values for example a + value greater than or equal to 0.5 on two surfaces (and + 0.25 with four surfaces), an overlay of multiple + transparent surfaces may not perfectly be sorted in + depth by the webgl API. This behavior may be improved + in the near future and is subject to change. + reversescale + Reverses the color mapping if true. If true, `cmin` + will correspond to the last color in the array and + `cmax` will correspond to the first color. + scene + Sets a reference between this trace's 3D coordinate + system and a 3D scene. If "scene" (the default value), + the (x,y,z) coordinates refer to `layout.scene`. If + "scene2", the (x,y,z) coordinates refer to + `layout.scene2`, and so on. + showlegend + Determines whether or not an item corresponding to this + trace is shown in the legend. + showscale + Determines whether or not a colorbar is displayed for + this trace. + stream + :class:`plotly.graph_objects.mesh3d.Stream` instance or + dict with compatible properties + text + Sets the text elements associated with the vertices. If + trace `hoverinfo` contains a "text" flag and + "hovertext" is not set, these elements will be seen in + the hover labels. + textsrc + Sets the source reference on Chart Studio Cloud for + `text`. + uid + Assign an id to this trace, Use this to provide object + constancy between traces during animations and + transitions. + uirevision + Controls persistence of some user-driven changes to the + trace: `constraintrange` in `parcoords` traces, as well + as some `editable: true` modifications such as `name` + and `colorbar.title`. Defaults to `layout.uirevision`. + Note that other user-driven trace attribute changes are + controlled by `layout` attributes: `trace.visible` is + controlled by `layout.legend.uirevision`, + `selectedpoints` is controlled by + `layout.selectionrevision`, and `colorbar.(x|y)` + (accessible with `config: {editable: true}`) is + controlled by `layout.editrevision`. Trace changes are + tracked by `uid`, which only falls back on trace index + if no `uid` is provided. So if your app can add/remove + traces before the end of the `data` array, such that + the same trace has a different index, you can still + preserve user-driven changes if you give each trace a + `uid` that stays with it as it moves. + vertexcolor + Sets the color of each vertex Overrides "color". While + Red, green and blue colors are in the range of 0 and + 255; in the case of having vertex color data in RGBA + format, the alpha color should be normalized to be + between 0 and 1. + vertexcolorsrc + Sets the source reference on Chart Studio Cloud for + `vertexcolor`. + visible + Determines whether or not this trace is visible. If + "legendonly", the trace is not drawn, but can appear as + a legend item (provided that the legend itself is + visible). + x + Sets the X coordinates of the vertices. The nth element + of vectors `x`, `y` and `z` jointly represent the X, Y + and Z coordinates of the nth vertex. + xcalendar + Sets the calendar system to use with `x` date data. + xhoverformat + Sets the hover text formatting rulefor `x` using d3 + formatting mini-languages which are very similar to + those in Python. For numbers, see: + https://github.com/d3/d3-format/tree/v1.4.5#d3-format. + And for dates see: https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format. We add two items to + d3's date formatter: "%h" for half of the year as a + decimal number as well as "%{n}f" for fractional + seconds with n digits. For example, *2016-10-13 + 09:15:23.456* with tickformat "%H~%M~%S.%2f" would + display *09~15~23.46*By default the values are + formatted using `xaxis.hoverformat`. + xsrc + Sets the source reference on Chart Studio Cloud for + `x`. + y + Sets the Y coordinates of the vertices. The nth element + of vectors `x`, `y` and `z` jointly represent the X, Y + and Z coordinates of the nth vertex. + ycalendar + Sets the calendar system to use with `y` date data. + yhoverformat + Sets the hover text formatting rulefor `y` using d3 + formatting mini-languages which are very similar to + those in Python. For numbers, see: + https://github.com/d3/d3-format/tree/v1.4.5#d3-format. + And for dates see: https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format. We add two items to + d3's date formatter: "%h" for half of the year as a + decimal number as well as "%{n}f" for fractional + seconds with n digits. For example, *2016-10-13 + 09:15:23.456* with tickformat "%H~%M~%S.%2f" would + display *09~15~23.46*By default the values are + formatted using `yaxis.hoverformat`. + ysrc + Sets the source reference on Chart Studio Cloud for + `y`. + z + Sets the Z coordinates of the vertices. The nth element + of vectors `x`, `y` and `z` jointly represent the X, Y + and Z coordinates of the nth vertex. + zcalendar + Sets the calendar system to use with `z` date data. + zhoverformat + Sets the hover text formatting rulefor `z` using d3 + formatting mini-languages which are very similar to + those in Python. For numbers, see: + https://github.com/d3/d3-format/tree/v1.4.5#d3-format. + And for dates see: https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format. We add two items to + d3's date formatter: "%h" for half of the year as a + decimal number as well as "%{n}f" for fractional + seconds with n digits. For example, *2016-10-13 + 09:15:23.456* with tickformat "%H~%M~%S.%2f" would + display *09~15~23.46*By default the values are + formatted using `zaxis.hoverformat`. + zsrc + Sets the source reference on Chart Studio Cloud for + `z`. + row : 'all', int or None (default) + Subplot row index (starting from 1) for the trace to be + added. Only valid if figure was created using + `plotly.tools.make_subplots`.If 'all', addresses all + rows in the specified column(s). + col : 'all', int or None (default) + Subplot col index (starting from 1) for the trace to be + added. Only valid if figure was created using + `plotly.tools.make_subplots`.If 'all', addresses all + columns in the specified row(s). + + Returns + ------- + FigureWidget + """ + from plotly.graph_objs import Mesh3d + + new_trace = Mesh3d( + alphahull=alphahull, + autocolorscale=autocolorscale, + cauto=cauto, + cmax=cmax, + cmid=cmid, + cmin=cmin, + color=color, + coloraxis=coloraxis, + colorbar=colorbar, + colorscale=colorscale, + contour=contour, + customdata=customdata, + customdatasrc=customdatasrc, + delaunayaxis=delaunayaxis, + facecolor=facecolor, + facecolorsrc=facecolorsrc, + flatshading=flatshading, + hoverinfo=hoverinfo, + hoverinfosrc=hoverinfosrc, + hoverlabel=hoverlabel, + hovertemplate=hovertemplate, + hovertemplatefallback=hovertemplatefallback, + hovertemplatesrc=hovertemplatesrc, + hovertext=hovertext, + hovertextsrc=hovertextsrc, + i=i, + ids=ids, + idssrc=idssrc, + intensity=intensity, + intensitymode=intensitymode, + intensitysrc=intensitysrc, + isrc=isrc, + j=j, + jsrc=jsrc, + k=k, + ksrc=ksrc, + legend=legend, + legendgroup=legendgroup, + legendgrouptitle=legendgrouptitle, + legendrank=legendrank, + legendwidth=legendwidth, + lighting=lighting, + lightposition=lightposition, + meta=meta, + metasrc=metasrc, + name=name, + opacity=opacity, + reversescale=reversescale, + scene=scene, + showlegend=showlegend, + showscale=showscale, + stream=stream, + text=text, + textsrc=textsrc, + uid=uid, + uirevision=uirevision, + vertexcolor=vertexcolor, + vertexcolorsrc=vertexcolorsrc, + visible=visible, + x=x, + xcalendar=xcalendar, + xhoverformat=xhoverformat, + xsrc=xsrc, + y=y, + ycalendar=ycalendar, + yhoverformat=yhoverformat, + ysrc=ysrc, + z=z, + zcalendar=zcalendar, + zhoverformat=zhoverformat, + zsrc=zsrc, + **kwargs, + ) + return self.add_trace(new_trace, row=row, col=col) + + def add_ohlc( + self, + close=None, + closesrc=None, + customdata=None, + customdatasrc=None, + decreasing=None, + high=None, + highsrc=None, + hoverinfo=None, + hoverinfosrc=None, + hoverlabel=None, + hovertemplate=None, + hovertemplatefallback=None, + hovertemplatesrc=None, + hovertext=None, + hovertextsrc=None, + ids=None, + idssrc=None, + increasing=None, + legend=None, + legendgroup=None, + legendgrouptitle=None, + legendrank=None, + legendwidth=None, + line=None, + low=None, + lowsrc=None, + meta=None, + metasrc=None, + name=None, + opacity=None, + open=None, + opensrc=None, + selectedpoints=None, + showlegend=None, + stream=None, + text=None, + textsrc=None, + tickwidth=None, + uid=None, + uirevision=None, + visible=None, + x=None, + xaxis=None, + xcalendar=None, + xhoverformat=None, + xperiod=None, + xperiod0=None, + xperiodalignment=None, + xsrc=None, + yaxis=None, + yhoverformat=None, + zorder=None, + row=None, + col=None, + secondary_y=None, + **kwargs, + ) -> "FigureWidget": + """ + Add a new Ohlc trace + + The ohlc (short for Open-High-Low-Close) is a style of + financial chart describing open, high, low and close for a + given `x` coordinate (most likely time). The tip of the lines + represent the `low` and `high` values and the horizontal + segments represent the `open` and `close` values. Sample points + where the close value is higher (lower) then the open value are + called increasing (decreasing). By default, increasing items + are drawn in green whereas decreasing are drawn in red. + + Parameters + ---------- + close + Sets the close values. + closesrc + Sets the source reference on Chart Studio Cloud for + `close`. + customdata + Assigns extra data each datum. This may be useful when + listening to hover, click and selection events. Note + that, "scatter" traces also appends customdata items in + the markers DOM elements + customdatasrc + Sets the source reference on Chart Studio Cloud for + `customdata`. + decreasing + :class:`plotly.graph_objects.ohlc.Decreasing` instance + or dict with compatible properties + high + Sets the high values. + highsrc + Sets the source reference on Chart Studio Cloud for + `high`. + hoverinfo + Determines which trace information appear on hover. If + `none` or `skip` are set, no information is displayed + upon hovering. But, if `none` is set, click and hover + events are still fired. + hoverinfosrc + Sets the source reference on Chart Studio Cloud for + `hoverinfo`. + hoverlabel + :class:`plotly.graph_objects.ohlc.Hoverlabel` instance + or dict with compatible properties + hovertemplate + Template string used for rendering the information that + appear on hover box. Note that this will override + `hoverinfo`. Variables are inserted using %{variable}, + for example "y: %{y}" as well as %{xother}, {%_xother}, + {%_xother_}, {%xother_}. When showing info for several + points, "xother" will be added to those with different + x positions from the first point. An underscore before + or after "(x|y)other" will add a space on that side, + only when this field is shown. Numbers are formatted + using d3-format's syntax %{variable:d3-format}, for + example "Price: %{y:$.2f}". + https://github.com/d3/d3-format/tree/v1.4.5#d3-format + for details on the formatting syntax. Dates are + formatted using d3-time-format's syntax + %{variable|d3-time-format}, for example "Day: + %{2019-01-01|%A}". https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format for details on the + date formatting syntax. Variables that can't be found + will be replaced with the specifier. For example, a + template of "data: %{x}, %{y}" will result in a value + of "data: 1, %{y}" if x is 1 and y is missing. + Variables with an undefined value will be replaced with + the fallback value. The variables available in + `hovertemplate` are the ones emitted as event data + described at this link + https://plotly.com/javascript/plotlyjs-events/#event- + data. Additionally, all attributes that can be + specified per-point (the ones that are `arrayOk: true`) + are available. Finally, the template string has access + to variables `open`, `high`, `low` and `close`. + Anything contained in tag `` is displayed in the + secondary box, for example + `%{fullData.name}`. To hide the + secondary box completely, use an empty tag + ``. + hovertemplatefallback + Fallback string that's displayed when a variable + referenced in a template is missing. If the boolean + value 'false' is passed in, the specifier with the + missing variable will be displayed. + hovertemplatesrc + Sets the source reference on Chart Studio Cloud for + `hovertemplate`. + hovertext + Same as `text`. + hovertextsrc + Sets the source reference on Chart Studio Cloud for + `hovertext`. + ids + Assigns id labels to each datum. These ids for object + constancy of data points during animation. Should be an + array of strings, not numbers or any other type. + idssrc + Sets the source reference on Chart Studio Cloud for + `ids`. + increasing + :class:`plotly.graph_objects.ohlc.Increasing` instance + or dict with compatible properties + legend + Sets the reference to a legend to show this trace in. + References to these legends are "legend", "legend2", + "legend3", etc. Settings for these legends are set in + the layout, under `layout.legend`, `layout.legend2`, + etc. + legendgroup + Sets the legend group for this trace. Traces and shapes + part of the same legend group hide/show at the same + time when toggling legend items. + legendgrouptitle + :class:`plotly.graph_objects.ohlc.Legendgrouptitle` + instance or dict with compatible properties + legendrank + Sets the legend rank for this trace. Items and groups + with smaller ranks are presented on top/left side while + with "reversed" `legend.traceorder` they are on + bottom/right side. The default legendrank is 1000, so + that you can use ranks less than 1000 to place certain + items before all unranked items, and ranks greater than + 1000 to go after all unranked items. When having + unranked or equal rank items shapes would be displayed + after traces i.e. according to their order in data and + layout. + legendwidth + Sets the width (in px or fraction) of the legend for + this trace. + line + :class:`plotly.graph_objects.ohlc.Line` instance or + dict with compatible properties + low + Sets the low values. + lowsrc + Sets the source reference on Chart Studio Cloud for + `low`. + meta + Assigns extra meta information associated with this + trace that can be used in various text attributes. + Attributes such as trace `name`, graph, axis and + colorbar `title.text`, annotation `text` + `rangeselector`, `updatemenues` and `sliders` `label` + text all support `meta`. To access the trace `meta` + values in an attribute in the same trace, simply use + `%{meta[i]}` where `i` is the index or key of the + `meta` item in question. To access trace `meta` in + layout attributes, use `%{data[n[.meta[i]}` where `i` + is the index or key of the `meta` and `n` is the trace + index. + metasrc + Sets the source reference on Chart Studio Cloud for + `meta`. + name + Sets the trace name. The trace name appears as the + legend item and on hover. + opacity + Sets the opacity of the trace. + open + Sets the open values. + opensrc + Sets the source reference on Chart Studio Cloud for + `open`. + selectedpoints + Array containing integer indices of selected points. + Has an effect only for traces that support selections. + Note that an empty array means an empty selection where + the `unselected` are turned on for all points, whereas, + any other non-array values means no selection all where + the `selected` and `unselected` styles have no effect. + showlegend + Determines whether or not an item corresponding to this + trace is shown in the legend. + stream + :class:`plotly.graph_objects.ohlc.Stream` instance or + dict with compatible properties + text + Sets hover text elements associated with each sample + point. If a single string, the same string appears over + all the data points. If an array of string, the items + are mapped in order to this trace's sample points. + textsrc + Sets the source reference on Chart Studio Cloud for + `text`. + tickwidth + Sets the width of the open/close tick marks relative to + the "x" minimal interval. + uid + Assign an id to this trace, Use this to provide object + constancy between traces during animations and + transitions. + uirevision + Controls persistence of some user-driven changes to the + trace: `constraintrange` in `parcoords` traces, as well + as some `editable: true` modifications such as `name` + and `colorbar.title`. Defaults to `layout.uirevision`. + Note that other user-driven trace attribute changes are + controlled by `layout` attributes: `trace.visible` is + controlled by `layout.legend.uirevision`, + `selectedpoints` is controlled by + `layout.selectionrevision`, and `colorbar.(x|y)` + (accessible with `config: {editable: true}`) is + controlled by `layout.editrevision`. Trace changes are + tracked by `uid`, which only falls back on trace index + if no `uid` is provided. So if your app can add/remove + traces before the end of the `data` array, such that + the same trace has a different index, you can still + preserve user-driven changes if you give each trace a + `uid` that stays with it as it moves. + visible + Determines whether or not this trace is visible. If + "legendonly", the trace is not drawn, but can appear as + a legend item (provided that the legend itself is + visible). + x + Sets the x coordinates. If absent, linear coordinate + will be generated. + xaxis + Sets a reference between this trace's x coordinates and + a 2D cartesian x axis. If "x" (the default value), the + x coordinates refer to `layout.xaxis`. If "x2", the x + coordinates refer to `layout.xaxis2`, and so on. + xcalendar + Sets the calendar system to use with `x` date data. + xhoverformat + Sets the hover text formatting rulefor `x` using d3 + formatting mini-languages which are very similar to + those in Python. For numbers, see: + https://github.com/d3/d3-format/tree/v1.4.5#d3-format. + And for dates see: https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format. We add two items to + d3's date formatter: "%h" for half of the year as a + decimal number as well as "%{n}f" for fractional + seconds with n digits. For example, *2016-10-13 + 09:15:23.456* with tickformat "%H~%M~%S.%2f" would + display *09~15~23.46*By default the values are + formatted using `xaxis.hoverformat`. + xperiod + Only relevant when the axis `type` is "date". Sets the + period positioning in milliseconds or "M" on the x + axis. Special values in the form of "M" could be + used to declare the number of months. In this case `n` + must be a positive integer. + xperiod0 + Only relevant when the axis `type` is "date". Sets the + base for period positioning in milliseconds or date + string on the x0 axis. When `x0period` is round number + of weeks, the `x0period0` by default would be on a + Sunday i.e. 2000-01-02, otherwise it would be at + 2000-01-01. + xperiodalignment + Only relevant when the axis `type` is "date". Sets the + alignment of data points on the x axis. + xsrc + Sets the source reference on Chart Studio Cloud for + `x`. + yaxis + Sets a reference between this trace's y coordinates and + a 2D cartesian y axis. If "y" (the default value), the + y coordinates refer to `layout.yaxis`. If "y2", the y + coordinates refer to `layout.yaxis2`, and so on. + yhoverformat + Sets the hover text formatting rulefor `y` using d3 + formatting mini-languages which are very similar to + those in Python. For numbers, see: + https://github.com/d3/d3-format/tree/v1.4.5#d3-format. + And for dates see: https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format. We add two items to + d3's date formatter: "%h" for half of the year as a + decimal number as well as "%{n}f" for fractional + seconds with n digits. For example, *2016-10-13 + 09:15:23.456* with tickformat "%H~%M~%S.%2f" would + display *09~15~23.46*By default the values are + formatted using `yaxis.hoverformat`. + zorder + Sets the layer on which this trace is displayed, + relative to other SVG traces on the same subplot. SVG + traces with higher `zorder` appear in front of those + with lower `zorder`. + row : 'all', int or None (default) + Subplot row index (starting from 1) for the trace to be + added. Only valid if figure was created using + `plotly.tools.make_subplots`.If 'all', addresses all + rows in the specified column(s). + col : 'all', int or None (default) + Subplot col index (starting from 1) for the trace to be + added. Only valid if figure was created using + `plotly.tools.make_subplots`.If 'all', addresses all + columns in the specified row(s). + secondary_y: boolean or None (default None) + If True, associate this trace with the secondary y-axis of the + subplot at the specified row and col. Only valid if all of the + following conditions are satisfied: + * The figure was created using `plotly.subplots.make_subplots`. + * The row and col arguments are not None + * The subplot at the specified row and col has type xy + (which is the default) and secondary_y True. These + properties are specified in the specs argument to + make_subplots. See the make_subplots docstring for more info. + + Returns + ------- + FigureWidget + """ + from plotly.graph_objs import Ohlc + + new_trace = Ohlc( + close=close, + closesrc=closesrc, + customdata=customdata, + customdatasrc=customdatasrc, + decreasing=decreasing, + high=high, + highsrc=highsrc, + hoverinfo=hoverinfo, + hoverinfosrc=hoverinfosrc, + hoverlabel=hoverlabel, + hovertemplate=hovertemplate, + hovertemplatefallback=hovertemplatefallback, + hovertemplatesrc=hovertemplatesrc, + hovertext=hovertext, + hovertextsrc=hovertextsrc, + ids=ids, + idssrc=idssrc, + increasing=increasing, + legend=legend, + legendgroup=legendgroup, + legendgrouptitle=legendgrouptitle, + legendrank=legendrank, + legendwidth=legendwidth, + line=line, + low=low, + lowsrc=lowsrc, + meta=meta, + metasrc=metasrc, + name=name, + opacity=opacity, + open=open, + opensrc=opensrc, + selectedpoints=selectedpoints, + showlegend=showlegend, + stream=stream, + text=text, + textsrc=textsrc, + tickwidth=tickwidth, + uid=uid, + uirevision=uirevision, + visible=visible, + x=x, + xaxis=xaxis, + xcalendar=xcalendar, + xhoverformat=xhoverformat, + xperiod=xperiod, + xperiod0=xperiod0, + xperiodalignment=xperiodalignment, + xsrc=xsrc, + yaxis=yaxis, + yhoverformat=yhoverformat, + zorder=zorder, + **kwargs, + ) + return self.add_trace(new_trace, row=row, col=col, secondary_y=secondary_y) + + def add_parcats( + self, + arrangement=None, + bundlecolors=None, + counts=None, + countssrc=None, + dimensions=None, + dimensiondefaults=None, + domain=None, + hoverinfo=None, + hoveron=None, + hovertemplate=None, + hovertemplatefallback=None, + labelfont=None, + legendgrouptitle=None, + legendwidth=None, + line=None, + meta=None, + metasrc=None, + name=None, + sortpaths=None, + stream=None, + tickfont=None, + uid=None, + uirevision=None, + visible=None, + row=None, + col=None, + **kwargs, + ) -> "FigureWidget": + """ + Add a new Parcats trace + + Parallel categories diagram for multidimensional categorical + data. + + Parameters + ---------- + arrangement + Sets the drag interaction mode for categories and + dimensions. If `perpendicular`, the categories can only + move along a line perpendicular to the paths. If + `freeform`, the categories can freely move on the + plane. If `fixed`, the categories and dimensions are + stationary. + bundlecolors + Sort paths so that like colors are bundled together + within each category. + counts + The number of observations represented by each state. + Defaults to 1 so that each state represents one + observation + countssrc + Sets the source reference on Chart Studio Cloud for + `counts`. + dimensions + The dimensions (variables) of the parallel categories + diagram. + dimensiondefaults + When used in a template (as + layout.template.data.parcats.dimensiondefaults), sets + the default property values to use for elements of + parcats.dimensions + domain + :class:`plotly.graph_objects.parcats.Domain` instance + or dict with compatible properties + hoverinfo + Determines which trace information appear on hover. If + `none` or `skip` are set, no information is displayed + upon hovering. But, if `none` is set, click and hover + events are still fired. + hoveron + Sets the hover interaction mode for the parcats + diagram. If `category`, hover interaction take place + per category. If `color`, hover interactions take place + per color per category. If `dimension`, hover + interactions take place across all categories per + dimension. + hovertemplate + Template string used for rendering the information that + appear on hover box. Note that this will override + `hoverinfo`. Variables are inserted using %{variable}, + for example "y: %{y}" as well as %{xother}, {%_xother}, + {%_xother_}, {%xother_}. When showing info for several + points, "xother" will be added to those with different + x positions from the first point. An underscore before + or after "(x|y)other" will add a space on that side, + only when this field is shown. Numbers are formatted + using d3-format's syntax %{variable:d3-format}, for + example "Price: %{y:$.2f}". + https://github.com/d3/d3-format/tree/v1.4.5#d3-format + for details on the formatting syntax. Dates are + formatted using d3-time-format's syntax + %{variable|d3-time-format}, for example "Day: + %{2019-01-01|%A}". https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format for details on the + date formatting syntax. Variables that can't be found + will be replaced with the specifier. For example, a + template of "data: %{x}, %{y}" will result in a value + of "data: 1, %{y}" if x is 1 and y is missing. + Variables with an undefined value will be replaced with + the fallback value. The variables available in + `hovertemplate` are the ones emitted as event data + described at this link + https://plotly.com/javascript/plotlyjs-events/#event- + data. Additionally, all attributes that can be + specified per-point (the ones that are `arrayOk: true`) + are available. Finally, the template string has access + to variables `count`, `probability`, `category`, + `categorycount`, `colorcount` and `bandcolorcount`. + Anything contained in tag `` is displayed in the + secondary box, for example + `%{fullData.name}`. To hide the + secondary box completely, use an empty tag + ``. + hovertemplatefallback + Fallback string that's displayed when a variable + referenced in a template is missing. If the boolean + value 'false' is passed in, the specifier with the + missing variable will be displayed. + labelfont + Sets the font for the `dimension` labels. + legendgrouptitle + :class:`plotly.graph_objects.parcats.Legendgrouptitle` + instance or dict with compatible properties + legendwidth + Sets the width (in px or fraction) of the legend for + this trace. + line + :class:`plotly.graph_objects.parcats.Line` instance or + dict with compatible properties + meta + Assigns extra meta information associated with this + trace that can be used in various text attributes. + Attributes such as trace `name`, graph, axis and + colorbar `title.text`, annotation `text` + `rangeselector`, `updatemenues` and `sliders` `label` + text all support `meta`. To access the trace `meta` + values in an attribute in the same trace, simply use + `%{meta[i]}` where `i` is the index or key of the + `meta` item in question. To access trace `meta` in + layout attributes, use `%{data[n[.meta[i]}` where `i` + is the index or key of the `meta` and `n` is the trace + index. + metasrc + Sets the source reference on Chart Studio Cloud for + `meta`. + name + Sets the trace name. The trace name appears as the + legend item and on hover. + sortpaths + Sets the path sorting algorithm. If `forward`, sort + paths based on dimension categories from left to right. + If `backward`, sort paths based on dimensions + categories from right to left. + stream + :class:`plotly.graph_objects.parcats.Stream` instance + or dict with compatible properties + tickfont + Sets the font for the `category` labels. + uid + Assign an id to this trace, Use this to provide object + constancy between traces during animations and + transitions. + uirevision + Controls persistence of some user-driven changes to the + trace: `constraintrange` in `parcoords` traces, as well + as some `editable: true` modifications such as `name` + and `colorbar.title`. Defaults to `layout.uirevision`. + Note that other user-driven trace attribute changes are + controlled by `layout` attributes: `trace.visible` is + controlled by `layout.legend.uirevision`, + `selectedpoints` is controlled by + `layout.selectionrevision`, and `colorbar.(x|y)` + (accessible with `config: {editable: true}`) is + controlled by `layout.editrevision`. Trace changes are + tracked by `uid`, which only falls back on trace index + if no `uid` is provided. So if your app can add/remove + traces before the end of the `data` array, such that + the same trace has a different index, you can still + preserve user-driven changes if you give each trace a + `uid` that stays with it as it moves. + visible + Determines whether or not this trace is visible. If + "legendonly", the trace is not drawn, but can appear as + a legend item (provided that the legend itself is + visible). + row : 'all', int or None (default) + Subplot row index (starting from 1) for the trace to be + added. Only valid if figure was created using + `plotly.tools.make_subplots`.If 'all', addresses all + rows in the specified column(s). + col : 'all', int or None (default) + Subplot col index (starting from 1) for the trace to be + added. Only valid if figure was created using + `plotly.tools.make_subplots`.If 'all', addresses all + columns in the specified row(s). + + Returns + ------- + FigureWidget + """ + from plotly.graph_objs import Parcats + + new_trace = Parcats( + arrangement=arrangement, + bundlecolors=bundlecolors, + counts=counts, + countssrc=countssrc, + dimensions=dimensions, + dimensiondefaults=dimensiondefaults, + domain=domain, + hoverinfo=hoverinfo, + hoveron=hoveron, + hovertemplate=hovertemplate, + hovertemplatefallback=hovertemplatefallback, + labelfont=labelfont, + legendgrouptitle=legendgrouptitle, + legendwidth=legendwidth, + line=line, + meta=meta, + metasrc=metasrc, + name=name, + sortpaths=sortpaths, + stream=stream, + tickfont=tickfont, + uid=uid, + uirevision=uirevision, + visible=visible, + **kwargs, + ) + return self.add_trace(new_trace, row=row, col=col) + + def add_parcoords( + self, + customdata=None, + customdatasrc=None, + dimensions=None, + dimensiondefaults=None, + domain=None, + ids=None, + idssrc=None, + labelangle=None, + labelfont=None, + labelside=None, + legend=None, + legendgrouptitle=None, + legendrank=None, + legendwidth=None, + line=None, + meta=None, + metasrc=None, + name=None, + rangefont=None, + stream=None, + tickfont=None, + uid=None, + uirevision=None, + unselected=None, + visible=None, + row=None, + col=None, + **kwargs, + ) -> "FigureWidget": + """ + Add a new Parcoords trace + + Parallel coordinates for multidimensional exploratory data + analysis. The samples are specified in `dimensions`. The colors + are set in `line.color`. + + Parameters + ---------- + customdata + Assigns extra data each datum. This may be useful when + listening to hover, click and selection events. Note + that, "scatter" traces also appends customdata items in + the markers DOM elements + customdatasrc + Sets the source reference on Chart Studio Cloud for + `customdata`. + dimensions + The dimensions (variables) of the parallel coordinates + chart. 2..60 dimensions are supported. + dimensiondefaults + When used in a template (as + layout.template.data.parcoords.dimensiondefaults), sets + the default property values to use for elements of + parcoords.dimensions + domain + :class:`plotly.graph_objects.parcoords.Domain` instance + or dict with compatible properties + ids + Assigns id labels to each datum. These ids for object + constancy of data points during animation. Should be an + array of strings, not numbers or any other type. + idssrc + Sets the source reference on Chart Studio Cloud for + `ids`. + labelangle + Sets the angle of the labels with respect to the + horizontal. For example, a `tickangle` of -90 draws the + labels vertically. Tilted labels with "labelangle" may + be positioned better inside margins when + `labelposition` is set to "bottom". + labelfont + Sets the font for the `dimension` labels. + labelside + Specifies the location of the `label`. "top" positions + labels above, next to the title "bottom" positions + labels below the graph Tilted labels with "labelangle" + may be positioned better inside margins when + `labelposition` is set to "bottom". + legend + Sets the reference to a legend to show this trace in. + References to these legends are "legend", "legend2", + "legend3", etc. Settings for these legends are set in + the layout, under `layout.legend`, `layout.legend2`, + etc. + legendgrouptitle + :class:`plotly.graph_objects.parcoords.Legendgrouptitle + ` instance or dict with compatible properties + legendrank + Sets the legend rank for this trace. Items and groups + with smaller ranks are presented on top/left side while + with "reversed" `legend.traceorder` they are on + bottom/right side. The default legendrank is 1000, so + that you can use ranks less than 1000 to place certain + items before all unranked items, and ranks greater than + 1000 to go after all unranked items. When having + unranked or equal rank items shapes would be displayed + after traces i.e. according to their order in data and + layout. + legendwidth + Sets the width (in px or fraction) of the legend for + this trace. + line + :class:`plotly.graph_objects.parcoords.Line` instance + or dict with compatible properties + meta + Assigns extra meta information associated with this + trace that can be used in various text attributes. + Attributes such as trace `name`, graph, axis and + colorbar `title.text`, annotation `text` + `rangeselector`, `updatemenues` and `sliders` `label` + text all support `meta`. To access the trace `meta` + values in an attribute in the same trace, simply use + `%{meta[i]}` where `i` is the index or key of the + `meta` item in question. To access trace `meta` in + layout attributes, use `%{data[n[.meta[i]}` where `i` + is the index or key of the `meta` and `n` is the trace + index. + metasrc + Sets the source reference on Chart Studio Cloud for + `meta`. + name + Sets the trace name. The trace name appears as the + legend item and on hover. + rangefont + Sets the font for the `dimension` range values. + stream + :class:`plotly.graph_objects.parcoords.Stream` instance + or dict with compatible properties + tickfont + Sets the font for the `dimension` tick values. + uid + Assign an id to this trace, Use this to provide object + constancy between traces during animations and + transitions. + uirevision + Controls persistence of some user-driven changes to the + trace: `constraintrange` in `parcoords` traces, as well + as some `editable: true` modifications such as `name` + and `colorbar.title`. Defaults to `layout.uirevision`. + Note that other user-driven trace attribute changes are + controlled by `layout` attributes: `trace.visible` is + controlled by `layout.legend.uirevision`, + `selectedpoints` is controlled by + `layout.selectionrevision`, and `colorbar.(x|y)` + (accessible with `config: {editable: true}`) is + controlled by `layout.editrevision`. Trace changes are + tracked by `uid`, which only falls back on trace index + if no `uid` is provided. So if your app can add/remove + traces before the end of the `data` array, such that + the same trace has a different index, you can still + preserve user-driven changes if you give each trace a + `uid` that stays with it as it moves. + unselected + :class:`plotly.graph_objects.parcoords.Unselected` + instance or dict with compatible properties + visible + Determines whether or not this trace is visible. If + "legendonly", the trace is not drawn, but can appear as + a legend item (provided that the legend itself is + visible). + row : 'all', int or None (default) + Subplot row index (starting from 1) for the trace to be + added. Only valid if figure was created using + `plotly.tools.make_subplots`.If 'all', addresses all + rows in the specified column(s). + col : 'all', int or None (default) + Subplot col index (starting from 1) for the trace to be + added. Only valid if figure was created using + `plotly.tools.make_subplots`.If 'all', addresses all + columns in the specified row(s). + + Returns + ------- + FigureWidget + """ + from plotly.graph_objs import Parcoords + + new_trace = Parcoords( + customdata=customdata, + customdatasrc=customdatasrc, + dimensions=dimensions, + dimensiondefaults=dimensiondefaults, + domain=domain, + ids=ids, + idssrc=idssrc, + labelangle=labelangle, + labelfont=labelfont, + labelside=labelside, + legend=legend, + legendgrouptitle=legendgrouptitle, + legendrank=legendrank, + legendwidth=legendwidth, + line=line, + meta=meta, + metasrc=metasrc, + name=name, + rangefont=rangefont, + stream=stream, + tickfont=tickfont, + uid=uid, + uirevision=uirevision, + unselected=unselected, + visible=visible, + **kwargs, + ) + return self.add_trace(new_trace, row=row, col=col) + + def add_pie( + self, + automargin=None, + customdata=None, + customdatasrc=None, + direction=None, + dlabel=None, + domain=None, + hole=None, + hoverinfo=None, + hoverinfosrc=None, + hoverlabel=None, + hovertemplate=None, + hovertemplatefallback=None, + hovertemplatesrc=None, + hovertext=None, + hovertextsrc=None, + ids=None, + idssrc=None, + insidetextfont=None, + insidetextorientation=None, + label0=None, + labels=None, + labelssrc=None, + legend=None, + legendgroup=None, + legendgrouptitle=None, + legendrank=None, + legendsrc=None, + legendwidth=None, + marker=None, + meta=None, + metasrc=None, + name=None, + opacity=None, + outsidetextfont=None, + pull=None, + pullsrc=None, + rotation=None, + scalegroup=None, + showlegend=None, + showlegendsrc=None, + sort=None, + stream=None, + text=None, + textfont=None, + textinfo=None, + textposition=None, + textpositionsrc=None, + textsrc=None, + texttemplate=None, + texttemplatefallback=None, + texttemplatesrc=None, + title=None, + uid=None, + uirevision=None, + values=None, + valuessrc=None, + visible=None, + row=None, + col=None, + **kwargs, + ) -> "FigureWidget": + """ + Add a new Pie trace + + A data visualized by the sectors of the pie is set in `values`. + The sector labels are set in `labels`. The sector colors are + set in `marker.colors` + + Parameters + ---------- + automargin + Determines whether outside text labels can push the + margins. + customdata + Assigns extra data each datum. This may be useful when + listening to hover, click and selection events. Note + that, "scatter" traces also appends customdata items in + the markers DOM elements + customdatasrc + Sets the source reference on Chart Studio Cloud for + `customdata`. + direction + Specifies the direction at which succeeding sectors + follow one another. + dlabel + Sets the label step. See `label0` for more info. + domain + :class:`plotly.graph_objects.pie.Domain` instance or + dict with compatible properties + hole + Sets the fraction of the radius to cut out of the pie. + Use this to make a donut chart. + hoverinfo + Determines which trace information appear on hover. If + `none` or `skip` are set, no information is displayed + upon hovering. But, if `none` is set, click and hover + events are still fired. + hoverinfosrc + Sets the source reference on Chart Studio Cloud for + `hoverinfo`. + hoverlabel + :class:`plotly.graph_objects.pie.Hoverlabel` instance + or dict with compatible properties + hovertemplate + Template string used for rendering the information that + appear on hover box. Note that this will override + `hoverinfo`. Variables are inserted using %{variable}, + for example "y: %{y}" as well as %{xother}, {%_xother}, + {%_xother_}, {%xother_}. When showing info for several + points, "xother" will be added to those with different + x positions from the first point. An underscore before + or after "(x|y)other" will add a space on that side, + only when this field is shown. Numbers are formatted + using d3-format's syntax %{variable:d3-format}, for + example "Price: %{y:$.2f}". + https://github.com/d3/d3-format/tree/v1.4.5#d3-format + for details on the formatting syntax. Dates are + formatted using d3-time-format's syntax + %{variable|d3-time-format}, for example "Day: + %{2019-01-01|%A}". https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format for details on the + date formatting syntax. Variables that can't be found + will be replaced with the specifier. For example, a + template of "data: %{x}, %{y}" will result in a value + of "data: 1, %{y}" if x is 1 and y is missing. + Variables with an undefined value will be replaced with + the fallback value. The variables available in + `hovertemplate` are the ones emitted as event data + described at this link + https://plotly.com/javascript/plotlyjs-events/#event- + data. Additionally, all attributes that can be + specified per-point (the ones that are `arrayOk: true`) + are available. Finally, the template string has access + to variables `label`, `color`, `value`, `percent` and + `text`. Anything contained in tag `` is + displayed in the secondary box, for example + `%{fullData.name}`. To hide the + secondary box completely, use an empty tag + ``. + hovertemplatefallback + Fallback string that's displayed when a variable + referenced in a template is missing. If the boolean + value 'false' is passed in, the specifier with the + missing variable will be displayed. + hovertemplatesrc + Sets the source reference on Chart Studio Cloud for + `hovertemplate`. + hovertext + Sets hover text elements associated with each sector. + If a single string, the same string appears for all + data points. If an array of string, the items are + mapped in order of this trace's sectors. To be seen, + trace `hoverinfo` must contain a "text" flag. + hovertextsrc + Sets the source reference on Chart Studio Cloud for + `hovertext`. + ids + Assigns id labels to each datum. These ids for object + constancy of data points during animation. Should be an + array of strings, not numbers or any other type. + idssrc + Sets the source reference on Chart Studio Cloud for + `ids`. + insidetextfont + Sets the font used for `textinfo` lying inside the + sector. + insidetextorientation + Controls the orientation of the text inside chart + sectors. When set to "auto", text may be oriented in + any direction in order to be as big as possible in the + middle of a sector. The "horizontal" option orients + text to be parallel with the bottom of the chart, and + may make text smaller in order to achieve that goal. + The "radial" option orients text along the radius of + the sector. The "tangential" option orients text + perpendicular to the radius of the sector. + label0 + Alternate to `labels`. Builds a numeric set of labels. + Use with `dlabel` where `label0` is the starting label + and `dlabel` the step. + labels + Sets the sector labels. If `labels` entries are + duplicated, we sum associated `values` or simply count + occurrences if `values` is not provided. For other + array attributes (including color) we use the first + non-empty entry among all occurrences of the label. + labelssrc + Sets the source reference on Chart Studio Cloud for + `labels`. + legend + Sets the reference to a legend to show the pie slices + in. Can be an array if `values` is set. In that case, + each entry specifies the legend reference for one + slice. References to these legends are "legend", + "legend2", "legend3", etc. Settings for these legends + are set in the layout, under `layout.legend`, + `layout.legend2`, etc. + legendgroup + Sets the legend group for this trace. Traces and shapes + part of the same legend group hide/show at the same + time when toggling legend items. + legendgrouptitle + :class:`plotly.graph_objects.pie.Legendgrouptitle` + instance or dict with compatible properties + legendrank + Sets the legend rank for this trace. Items and groups + with smaller ranks are presented on top/left side while + with "reversed" `legend.traceorder` they are on + bottom/right side. The default legendrank is 1000, so + that you can use ranks less than 1000 to place certain + items before all unranked items, and ranks greater than + 1000 to go after all unranked items. When having + unranked or equal rank items shapes would be displayed + after traces i.e. according to their order in data and + layout. + legendsrc + Sets the source reference on Chart Studio Cloud for + `legend`. + legendwidth + Sets the width (in px or fraction) of the legend for + this trace. + marker + :class:`plotly.graph_objects.pie.Marker` instance or + dict with compatible properties + meta + Assigns extra meta information associated with this + trace that can be used in various text attributes. + Attributes such as trace `name`, graph, axis and + colorbar `title.text`, annotation `text` + `rangeselector`, `updatemenues` and `sliders` `label` + text all support `meta`. To access the trace `meta` + values in an attribute in the same trace, simply use + `%{meta[i]}` where `i` is the index or key of the + `meta` item in question. To access trace `meta` in + layout attributes, use `%{data[n[.meta[i]}` where `i` + is the index or key of the `meta` and `n` is the trace + index. + metasrc + Sets the source reference on Chart Studio Cloud for + `meta`. + name + Sets the trace name. The trace name appears as the + legend item and on hover. + opacity + Sets the opacity of the trace. + outsidetextfont + Sets the font used for `textinfo` lying outside the + sector. + pull + Sets the fraction of larger radius to pull the sectors + out from the center. This can be a constant to pull all + slices apart from each other equally or an array to + highlight one or more slices. + pullsrc + Sets the source reference on Chart Studio Cloud for + `pull`. + rotation + Instead of the first slice starting at 12 o'clock, + rotate to some other angle. + scalegroup + If there are multiple pie charts that should be sized + according to their totals, link them by providing a + non-empty group id here shared by every trace in the + same group. + showlegend + Determines whether or not items corresponding to the + pie slices are shown in the legend. Can be an array if + `values` is set. In that case, each entry specifies + appearance in the legend for one slice. + showlegendsrc + Sets the source reference on Chart Studio Cloud for + `showlegend`. + sort + Determines whether or not the sectors are reordered + from largest to smallest. + stream + :class:`plotly.graph_objects.pie.Stream` instance or + dict with compatible properties + text + Sets text elements associated with each sector. If + trace `textinfo` contains a "text" flag, these elements + will be seen on the chart. If trace `hoverinfo` + contains a "text" flag and "hovertext" is not set, + these elements will be seen in the hover labels. + textfont + Sets the font used for `textinfo`. + textinfo + Determines which trace information appear on the graph. + textposition + Specifies the location of the `textinfo`. + textpositionsrc + Sets the source reference on Chart Studio Cloud for + `textposition`. + textsrc + Sets the source reference on Chart Studio Cloud for + `text`. + texttemplate + Template string used for rendering the information text + that appears on points. Note that this will override + `textinfo`. Variables are inserted using %{variable}, + for example "y: %{y}". Numbers are formatted using + d3-format's syntax %{variable:d3-format}, for example + "Price: %{y:$.2f}". + https://github.com/d3/d3-format/tree/v1.4.5#d3-format + for details on the formatting syntax. Dates are + formatted using d3-time-format's syntax + %{variable|d3-time-format}, for example "Day: + %{2019-01-01|%A}". https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format for details on the + date formatting syntax. Variables that can't be found + will be replaced with the specifier. For example, a + template of "data: %{x}, %{y}" will result in a value + of "data: 1, %{y}" if x is 1 and y is missing. + Variables with an undefined value will be replaced with + the fallback value. All attributes that can be + specified per-point (the ones that are `arrayOk: true`) + are available. Finally, the template string has access + to variables `label`, `color`, `value`, `percent` and + `text`. + texttemplatefallback + Fallback string that's displayed when a variable + referenced in a template is missing. If the boolean + value 'false' is passed in, the specifier with the + missing variable will be displayed. + texttemplatesrc + Sets the source reference on Chart Studio Cloud for + `texttemplate`. + title + :class:`plotly.graph_objects.pie.Title` instance or + dict with compatible properties + uid + Assign an id to this trace, Use this to provide object + constancy between traces during animations and + transitions. + uirevision + Controls persistence of some user-driven changes to the + trace: `constraintrange` in `parcoords` traces, as well + as some `editable: true` modifications such as `name` + and `colorbar.title`. Defaults to `layout.uirevision`. + Note that other user-driven trace attribute changes are + controlled by `layout` attributes: `trace.visible` is + controlled by `layout.legend.uirevision`, + `selectedpoints` is controlled by + `layout.selectionrevision`, and `colorbar.(x|y)` + (accessible with `config: {editable: true}`) is + controlled by `layout.editrevision`. Trace changes are + tracked by `uid`, which only falls back on trace index + if no `uid` is provided. So if your app can add/remove + traces before the end of the `data` array, such that + the same trace has a different index, you can still + preserve user-driven changes if you give each trace a + `uid` that stays with it as it moves. + values + Sets the values of the sectors. If omitted, we count + occurrences of each label. + valuessrc + Sets the source reference on Chart Studio Cloud for + `values`. + visible + Determines whether or not this trace is visible. If + "legendonly", the trace is not drawn, but can appear as + a legend item (provided that the legend itself is + visible). + row : 'all', int or None (default) + Subplot row index (starting from 1) for the trace to be + added. Only valid if figure was created using + `plotly.tools.make_subplots`.If 'all', addresses all + rows in the specified column(s). + col : 'all', int or None (default) + Subplot col index (starting from 1) for the trace to be + added. Only valid if figure was created using + `plotly.tools.make_subplots`.If 'all', addresses all + columns in the specified row(s). + + Returns + ------- + FigureWidget + """ + from plotly.graph_objs import Pie + + new_trace = Pie( + automargin=automargin, + customdata=customdata, + customdatasrc=customdatasrc, + direction=direction, + dlabel=dlabel, + domain=domain, + hole=hole, + hoverinfo=hoverinfo, + hoverinfosrc=hoverinfosrc, + hoverlabel=hoverlabel, + hovertemplate=hovertemplate, + hovertemplatefallback=hovertemplatefallback, + hovertemplatesrc=hovertemplatesrc, + hovertext=hovertext, + hovertextsrc=hovertextsrc, + ids=ids, + idssrc=idssrc, + insidetextfont=insidetextfont, + insidetextorientation=insidetextorientation, + label0=label0, + labels=labels, + labelssrc=labelssrc, + legend=legend, + legendgroup=legendgroup, + legendgrouptitle=legendgrouptitle, + legendrank=legendrank, + legendsrc=legendsrc, + legendwidth=legendwidth, + marker=marker, + meta=meta, + metasrc=metasrc, + name=name, + opacity=opacity, + outsidetextfont=outsidetextfont, + pull=pull, + pullsrc=pullsrc, + rotation=rotation, + scalegroup=scalegroup, + showlegend=showlegend, + showlegendsrc=showlegendsrc, + sort=sort, + stream=stream, + text=text, + textfont=textfont, + textinfo=textinfo, + textposition=textposition, + textpositionsrc=textpositionsrc, + textsrc=textsrc, + texttemplate=texttemplate, + texttemplatefallback=texttemplatefallback, + texttemplatesrc=texttemplatesrc, + title=title, + uid=uid, + uirevision=uirevision, + values=values, + valuessrc=valuessrc, + visible=visible, + **kwargs, + ) + return self.add_trace(new_trace, row=row, col=col) + + def add_sankey( + self, + arrangement=None, + customdata=None, + customdatasrc=None, + domain=None, + hoverinfo=None, + hoverlabel=None, + ids=None, + idssrc=None, + legend=None, + legendgrouptitle=None, + legendrank=None, + legendwidth=None, + link=None, + meta=None, + metasrc=None, + name=None, + node=None, + orientation=None, + selectedpoints=None, + stream=None, + textfont=None, + uid=None, + uirevision=None, + valueformat=None, + valuesuffix=None, + visible=None, + row=None, + col=None, + **kwargs, + ) -> "FigureWidget": + """ + Add a new Sankey trace + + Sankey plots for network flow data analysis. The nodes are + specified in `nodes` and the links between sources and targets + in `links`. The colors are set in `nodes[i].color` and + `links[i].color`, otherwise defaults are used. + + Parameters + ---------- + arrangement + If value is `snap` (the default), the node arrangement + is assisted by automatic snapping of elements to + preserve space between nodes specified via `nodepad`. + If value is `perpendicular`, the nodes can only move + along a line perpendicular to the flow. If value is + `freeform`, the nodes can freely move on the plane. If + value is `fixed`, the nodes are stationary. + customdata + Assigns extra data each datum. This may be useful when + listening to hover, click and selection events. Note + that, "scatter" traces also appends customdata items in + the markers DOM elements + customdatasrc + Sets the source reference on Chart Studio Cloud for + `customdata`. + domain + :class:`plotly.graph_objects.sankey.Domain` instance or + dict with compatible properties + hoverinfo + Determines which trace information appear on hover. If + `none` or `skip` are set, no information is displayed + upon hovering. But, if `none` is set, click and hover + events are still fired. Note that this attribute is + superseded by `node.hoverinfo` and `node.hoverinfo` for + nodes and links respectively. + hoverlabel + :class:`plotly.graph_objects.sankey.Hoverlabel` + instance or dict with compatible properties + ids + Assigns id labels to each datum. These ids for object + constancy of data points during animation. Should be an + array of strings, not numbers or any other type. + idssrc + Sets the source reference on Chart Studio Cloud for + `ids`. + legend + Sets the reference to a legend to show this trace in. + References to these legends are "legend", "legend2", + "legend3", etc. Settings for these legends are set in + the layout, under `layout.legend`, `layout.legend2`, + etc. + legendgrouptitle + :class:`plotly.graph_objects.sankey.Legendgrouptitle` + instance or dict with compatible properties + legendrank + Sets the legend rank for this trace. Items and groups + with smaller ranks are presented on top/left side while + with "reversed" `legend.traceorder` they are on + bottom/right side. The default legendrank is 1000, so + that you can use ranks less than 1000 to place certain + items before all unranked items, and ranks greater than + 1000 to go after all unranked items. When having + unranked or equal rank items shapes would be displayed + after traces i.e. according to their order in data and + layout. + legendwidth + Sets the width (in px or fraction) of the legend for + this trace. + link + The links of the Sankey plot. + meta + Assigns extra meta information associated with this + trace that can be used in various text attributes. + Attributes such as trace `name`, graph, axis and + colorbar `title.text`, annotation `text` + `rangeselector`, `updatemenues` and `sliders` `label` + text all support `meta`. To access the trace `meta` + values in an attribute in the same trace, simply use + `%{meta[i]}` where `i` is the index or key of the + `meta` item in question. To access trace `meta` in + layout attributes, use `%{data[n[.meta[i]}` where `i` + is the index or key of the `meta` and `n` is the trace + index. + metasrc + Sets the source reference on Chart Studio Cloud for + `meta`. + name + Sets the trace name. The trace name appears as the + legend item and on hover. + node + The nodes of the Sankey plot. + orientation + Sets the orientation of the Sankey diagram. + selectedpoints + Array containing integer indices of selected points. + Has an effect only for traces that support selections. + Note that an empty array means an empty selection where + the `unselected` are turned on for all points, whereas, + any other non-array values means no selection all where + the `selected` and `unselected` styles have no effect. + stream + :class:`plotly.graph_objects.sankey.Stream` instance or + dict with compatible properties + textfont + Sets the font for node labels + uid + Assign an id to this trace, Use this to provide object + constancy between traces during animations and + transitions. + uirevision + Controls persistence of some user-driven changes to the + trace: `constraintrange` in `parcoords` traces, as well + as some `editable: true` modifications such as `name` + and `colorbar.title`. Defaults to `layout.uirevision`. + Note that other user-driven trace attribute changes are + controlled by `layout` attributes: `trace.visible` is + controlled by `layout.legend.uirevision`, + `selectedpoints` is controlled by + `layout.selectionrevision`, and `colorbar.(x|y)` + (accessible with `config: {editable: true}`) is + controlled by `layout.editrevision`. Trace changes are + tracked by `uid`, which only falls back on trace index + if no `uid` is provided. So if your app can add/remove + traces before the end of the `data` array, such that + the same trace has a different index, you can still + preserve user-driven changes if you give each trace a + `uid` that stays with it as it moves. + valueformat + Sets the value formatting rule using d3 formatting + mini-languages which are very similar to those in + Python. For numbers, see: + https://github.com/d3/d3-format/tree/v1.4.5#d3-format. + valuesuffix + Adds a unit to follow the value in the hover tooltip. + Add a space if a separation is necessary from the + value. + visible + Determines whether or not this trace is visible. If + "legendonly", the trace is not drawn, but can appear as + a legend item (provided that the legend itself is + visible). + row : 'all', int or None (default) + Subplot row index (starting from 1) for the trace to be + added. Only valid if figure was created using + `plotly.tools.make_subplots`.If 'all', addresses all + rows in the specified column(s). + col : 'all', int or None (default) + Subplot col index (starting from 1) for the trace to be + added. Only valid if figure was created using + `plotly.tools.make_subplots`.If 'all', addresses all + columns in the specified row(s). + + Returns + ------- + FigureWidget + """ + from plotly.graph_objs import Sankey + + new_trace = Sankey( + arrangement=arrangement, + customdata=customdata, + customdatasrc=customdatasrc, + domain=domain, + hoverinfo=hoverinfo, + hoverlabel=hoverlabel, + ids=ids, + idssrc=idssrc, + legend=legend, + legendgrouptitle=legendgrouptitle, + legendrank=legendrank, + legendwidth=legendwidth, + link=link, + meta=meta, + metasrc=metasrc, + name=name, + node=node, + orientation=orientation, + selectedpoints=selectedpoints, + stream=stream, + textfont=textfont, + uid=uid, + uirevision=uirevision, + valueformat=valueformat, + valuesuffix=valuesuffix, + visible=visible, + **kwargs, + ) + return self.add_trace(new_trace, row=row, col=col) + + def add_scatter( + self, + alignmentgroup=None, + cliponaxis=None, + connectgaps=None, + customdata=None, + customdatasrc=None, + dx=None, + dy=None, + error_x=None, + error_y=None, + fill=None, + fillcolor=None, + fillgradient=None, + fillpattern=None, + groupnorm=None, + hoverinfo=None, + hoverinfosrc=None, + hoverlabel=None, + hoveron=None, + hovertemplate=None, + hovertemplatefallback=None, + hovertemplatesrc=None, + hovertext=None, + hovertextsrc=None, + ids=None, + idssrc=None, + legend=None, + legendgroup=None, + legendgrouptitle=None, + legendrank=None, + legendwidth=None, + line=None, + marker=None, + meta=None, + metasrc=None, + mode=None, + name=None, + offsetgroup=None, + opacity=None, + orientation=None, + selected=None, + selectedpoints=None, + showlegend=None, + stackgaps=None, + stackgroup=None, + stream=None, + text=None, + textfont=None, + textposition=None, + textpositionsrc=None, + textsrc=None, + texttemplate=None, + texttemplatefallback=None, + texttemplatesrc=None, + uid=None, + uirevision=None, + unselected=None, + visible=None, + x=None, + x0=None, + xaxis=None, + xcalendar=None, + xhoverformat=None, + xperiod=None, + xperiod0=None, + xperiodalignment=None, + xsrc=None, + y=None, + y0=None, + yaxis=None, + ycalendar=None, + yhoverformat=None, + yperiod=None, + yperiod0=None, + yperiodalignment=None, + ysrc=None, + zorder=None, + row=None, + col=None, + secondary_y=None, + **kwargs, + ) -> "FigureWidget": + """ + Add a new Scatter trace + + The scatter trace type encompasses line charts, scatter charts, + text charts, and bubble charts. The data visualized as scatter + point or lines is set in `x` and `y`. Text (appearing either on + the chart or on hover only) is via `text`. Bubble charts are + achieved by setting `marker.size` and/or `marker.color` to + numerical arrays. + + Parameters + ---------- + alignmentgroup + Set several traces linked to the same position axis or + matching axes to the same alignmentgroup. This controls + whether bars compute their positional range dependently + or independently. + cliponaxis + Determines whether or not markers and text nodes are + clipped about the subplot axes. To show markers and + text nodes above axis lines and tick labels, make sure + to set `xaxis.layer` and `yaxis.layer` to *below + traces*. + connectgaps + Determines whether or not gaps (i.e. {nan} or missing + values) in the provided data arrays are connected. + customdata + Assigns extra data each datum. This may be useful when + listening to hover, click and selection events. Note + that, "scatter" traces also appends customdata items in + the markers DOM elements + customdatasrc + Sets the source reference on Chart Studio Cloud for + `customdata`. + dx + Sets the x coordinate step. See `x0` for more info. + dy + Sets the y coordinate step. See `y0` for more info. + error_x + :class:`plotly.graph_objects.scatter.ErrorX` instance + or dict with compatible properties + error_y + :class:`plotly.graph_objects.scatter.ErrorY` instance + or dict with compatible properties + fill + Sets the area to fill with a solid color. Defaults to + "none" unless this trace is stacked, then it gets + "tonexty" ("tonextx") if `orientation` is "v" ("h") Use + with `fillcolor` if not "none". "tozerox" and "tozeroy" + fill to x=0 and y=0 respectively. "tonextx" and + "tonexty" fill between the endpoints of this trace and + the endpoints of the trace before it, connecting those + endpoints with straight lines (to make a stacked area + graph); if there is no trace before it, they behave + like "tozerox" and "tozeroy". "toself" connects the + endpoints of the trace (or each segment of the trace if + it has gaps) into a closed shape. "tonext" fills the + space between two traces if one completely encloses the + other (eg consecutive contour lines), and behaves like + "toself" if there is no trace before it. "tonext" + should not be used if one trace does not enclose the + other. Traces in a `stackgroup` will only fill to (or + be filled to) other traces in the same group. With + multiple `stackgroup`s or some traces stacked and some + not, if fill-linked traces are not already consecutive, + the later ones will be pushed down in the drawing + order. + fillcolor + Sets the fill color. Defaults to a half-transparent + variant of the line color, marker color, or marker line + color, whichever is available. If fillgradient is + specified, fillcolor is ignored except for setting the + background color of the hover label, if any. + fillgradient + Sets a fill gradient. If not specified, the fillcolor + is used instead. + fillpattern + Sets the pattern within the marker. + groupnorm + Only relevant when `stackgroup` is used, and only the + first `groupnorm` found in the `stackgroup` will be + used - including if `visible` is "legendonly" but not + if it is `false`. Sets the normalization for the sum of + this `stackgroup`. With "fraction", the value of each + trace at each location is divided by the sum of all + trace values at that location. "percent" is the same + but multiplied by 100 to show percentages. If there are + multiple subplots, or multiple `stackgroup`s on one + subplot, each will be normalized within its own set. + hoverinfo + Determines which trace information appear on hover. If + `none` or `skip` are set, no information is displayed + upon hovering. But, if `none` is set, click and hover + events are still fired. + hoverinfosrc + Sets the source reference on Chart Studio Cloud for + `hoverinfo`. + hoverlabel + :class:`plotly.graph_objects.scatter.Hoverlabel` + instance or dict with compatible properties + hoveron + Do the hover effects highlight individual points + (markers or line points) or do they highlight filled + regions? If the fill is "toself" or "tonext" and there + are no markers or text, then the default is "fills", + otherwise it is "points". + hovertemplate + Template string used for rendering the information that + appear on hover box. Note that this will override + `hoverinfo`. Variables are inserted using %{variable}, + for example "y: %{y}" as well as %{xother}, {%_xother}, + {%_xother_}, {%xother_}. When showing info for several + points, "xother" will be added to those with different + x positions from the first point. An underscore before + or after "(x|y)other" will add a space on that side, + only when this field is shown. Numbers are formatted + using d3-format's syntax %{variable:d3-format}, for + example "Price: %{y:$.2f}". + https://github.com/d3/d3-format/tree/v1.4.5#d3-format + for details on the formatting syntax. Dates are + formatted using d3-time-format's syntax + %{variable|d3-time-format}, for example "Day: + %{2019-01-01|%A}". https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format for details on the + date formatting syntax. Variables that can't be found + will be replaced with the specifier. For example, a + template of "data: %{x}, %{y}" will result in a value + of "data: 1, %{y}" if x is 1 and y is missing. + Variables with an undefined value will be replaced with + the fallback value. The variables available in + `hovertemplate` are the ones emitted as event data + described at this link + https://plotly.com/javascript/plotlyjs-events/#event- + data. Additionally, all attributes that can be + specified per-point (the ones that are `arrayOk: true`) + are available. Anything contained in tag `` is + displayed in the secondary box, for example + `%{fullData.name}`. To hide the + secondary box completely, use an empty tag + ``. + hovertemplatefallback + Fallback string that's displayed when a variable + referenced in a template is missing. If the boolean + value 'false' is passed in, the specifier with the + missing variable will be displayed. + hovertemplatesrc + Sets the source reference on Chart Studio Cloud for + `hovertemplate`. + hovertext + Sets hover text elements associated with each (x,y) + pair. If a single string, the same string appears over + all the data points. If an array of string, the items + are mapped in order to the this trace's (x,y) + coordinates. To be seen, trace `hoverinfo` must contain + a "text" flag. + hovertextsrc + Sets the source reference on Chart Studio Cloud for + `hovertext`. + ids + Assigns id labels to each datum. These ids for object + constancy of data points during animation. Should be an + array of strings, not numbers or any other type. + idssrc + Sets the source reference on Chart Studio Cloud for + `ids`. + legend + Sets the reference to a legend to show this trace in. + References to these legends are "legend", "legend2", + "legend3", etc. Settings for these legends are set in + the layout, under `layout.legend`, `layout.legend2`, + etc. + legendgroup + Sets the legend group for this trace. Traces and shapes + part of the same legend group hide/show at the same + time when toggling legend items. + legendgrouptitle + :class:`plotly.graph_objects.scatter.Legendgrouptitle` + instance or dict with compatible properties + legendrank + Sets the legend rank for this trace. Items and groups + with smaller ranks are presented on top/left side while + with "reversed" `legend.traceorder` they are on + bottom/right side. The default legendrank is 1000, so + that you can use ranks less than 1000 to place certain + items before all unranked items, and ranks greater than + 1000 to go after all unranked items. When having + unranked or equal rank items shapes would be displayed + after traces i.e. according to their order in data and + layout. + legendwidth + Sets the width (in px or fraction) of the legend for + this trace. + line + :class:`plotly.graph_objects.scatter.Line` instance or + dict with compatible properties + marker + :class:`plotly.graph_objects.scatter.Marker` instance + or dict with compatible properties + meta + Assigns extra meta information associated with this + trace that can be used in various text attributes. + Attributes such as trace `name`, graph, axis and + colorbar `title.text`, annotation `text` + `rangeselector`, `updatemenues` and `sliders` `label` + text all support `meta`. To access the trace `meta` + values in an attribute in the same trace, simply use + `%{meta[i]}` where `i` is the index or key of the + `meta` item in question. To access trace `meta` in + layout attributes, use `%{data[n[.meta[i]}` where `i` + is the index or key of the `meta` and `n` is the trace + index. + metasrc + Sets the source reference on Chart Studio Cloud for + `meta`. + mode + Determines the drawing mode for this scatter trace. If + the provided `mode` includes "text" then the `text` + elements appear at the coordinates. Otherwise, the + `text` elements appear on hover. If there are less than + 20 points and the trace is not stacked then the default + is "lines+markers". Otherwise, "lines". + name + Sets the trace name. The trace name appears as the + legend item and on hover. + offsetgroup + Set several traces linked to the same position axis or + matching axes to the same offsetgroup where bars of the + same position coordinate will line up. + opacity + Sets the opacity of the trace. + orientation + Only relevant in the following cases: 1. when + `scattermode` is set to "group". 2. when `stackgroup` + is used, and only the first `orientation` found in the + `stackgroup` will be used - including if `visible` is + "legendonly" but not if it is `false`. Sets the + stacking direction. With "v" ("h"), the y (x) values of + subsequent traces are added. Also affects the default + value of `fill`. + selected + :class:`plotly.graph_objects.scatter.Selected` instance + or dict with compatible properties + selectedpoints + Array containing integer indices of selected points. + Has an effect only for traces that support selections. + Note that an empty array means an empty selection where + the `unselected` are turned on for all points, whereas, + any other non-array values means no selection all where + the `selected` and `unselected` styles have no effect. + showlegend + Determines whether or not an item corresponding to this + trace is shown in the legend. + stackgaps + Only relevant when `stackgroup` is used, and only the + first `stackgaps` found in the `stackgroup` will be + used - including if `visible` is "legendonly" but not + if it is `false`. Determines how we handle locations at + which other traces in this group have data but this one + does not. With *infer zero* we insert a zero at these + locations. With "interpolate" we linearly interpolate + between existing values, and extrapolate a constant + beyond the existing values. + stackgroup + Set several scatter traces (on the same subplot) to the + same stackgroup in order to add their y values (or + their x values if `orientation` is "h"). If blank or + omitted this trace will not be stacked. Stacking also + turns `fill` on by default, using "tonexty" ("tonextx") + if `orientation` is "h" ("v") and sets the default + `mode` to "lines" irrespective of point count. You can + only stack on a numeric (linear or log) axis. Traces in + a `stackgroup` will only fill to (or be filled to) + other traces in the same group. With multiple + `stackgroup`s or some traces stacked and some not, if + fill-linked traces are not already consecutive, the + later ones will be pushed down in the drawing order. + stream + :class:`plotly.graph_objects.scatter.Stream` instance + or dict with compatible properties + text + Sets text elements associated with each (x,y) pair. If + a single string, the same string appears over all the + data points. If an array of string, the items are + mapped in order to the this trace's (x,y) coordinates. + If trace `hoverinfo` contains a "text" flag and + "hovertext" is not set, these elements will be seen in + the hover labels. + textfont + Sets the text font. + textposition + Sets the positions of the `text` elements with respects + to the (x,y) coordinates. + textpositionsrc + Sets the source reference on Chart Studio Cloud for + `textposition`. + textsrc + Sets the source reference on Chart Studio Cloud for + `text`. + texttemplate + Template string used for rendering the information text + that appears on points. Note that this will override + `textinfo`. Variables are inserted using %{variable}, + for example "y: %{y}". Numbers are formatted using + d3-format's syntax %{variable:d3-format}, for example + "Price: %{y:$.2f}". + https://github.com/d3/d3-format/tree/v1.4.5#d3-format + for details on the formatting syntax. Dates are + formatted using d3-time-format's syntax + %{variable|d3-time-format}, for example "Day: + %{2019-01-01|%A}". https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format for details on the + date formatting syntax. Variables that can't be found + will be replaced with the specifier. For example, a + template of "data: %{x}, %{y}" will result in a value + of "data: 1, %{y}" if x is 1 and y is missing. + Variables with an undefined value will be replaced with + the fallback value. All attributes that can be + specified per-point (the ones that are `arrayOk: true`) + are available. + texttemplatefallback + Fallback string that's displayed when a variable + referenced in a template is missing. If the boolean + value 'false' is passed in, the specifier with the + missing variable will be displayed. + texttemplatesrc + Sets the source reference on Chart Studio Cloud for + `texttemplate`. + uid + Assign an id to this trace, Use this to provide object + constancy between traces during animations and + transitions. + uirevision + Controls persistence of some user-driven changes to the + trace: `constraintrange` in `parcoords` traces, as well + as some `editable: true` modifications such as `name` + and `colorbar.title`. Defaults to `layout.uirevision`. + Note that other user-driven trace attribute changes are + controlled by `layout` attributes: `trace.visible` is + controlled by `layout.legend.uirevision`, + `selectedpoints` is controlled by + `layout.selectionrevision`, and `colorbar.(x|y)` + (accessible with `config: {editable: true}`) is + controlled by `layout.editrevision`. Trace changes are + tracked by `uid`, which only falls back on trace index + if no `uid` is provided. So if your app can add/remove + traces before the end of the `data` array, such that + the same trace has a different index, you can still + preserve user-driven changes if you give each trace a + `uid` that stays with it as it moves. + unselected + :class:`plotly.graph_objects.scatter.Unselected` + instance or dict with compatible properties + visible + Determines whether or not this trace is visible. If + "legendonly", the trace is not drawn, but can appear as + a legend item (provided that the legend itself is + visible). + x + Sets the x coordinates. + x0 + Alternate to `x`. Builds a linear space of x + coordinates. Use with `dx` where `x0` is the starting + coordinate and `dx` the step. + xaxis + Sets a reference between this trace's x coordinates and + a 2D cartesian x axis. If "x" (the default value), the + x coordinates refer to `layout.xaxis`. If "x2", the x + coordinates refer to `layout.xaxis2`, and so on. + xcalendar + Sets the calendar system to use with `x` date data. + xhoverformat + Sets the hover text formatting rulefor `x` using d3 + formatting mini-languages which are very similar to + those in Python. For numbers, see: + https://github.com/d3/d3-format/tree/v1.4.5#d3-format. + And for dates see: https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format. We add two items to + d3's date formatter: "%h" for half of the year as a + decimal number as well as "%{n}f" for fractional + seconds with n digits. For example, *2016-10-13 + 09:15:23.456* with tickformat "%H~%M~%S.%2f" would + display *09~15~23.46*By default the values are + formatted using `xaxis.hoverformat`. + xperiod + Only relevant when the axis `type` is "date". Sets the + period positioning in milliseconds or "M" on the x + axis. Special values in the form of "M" could be + used to declare the number of months. In this case `n` + must be a positive integer. + xperiod0 + Only relevant when the axis `type` is "date". Sets the + base for period positioning in milliseconds or date + string on the x0 axis. When `x0period` is round number + of weeks, the `x0period0` by default would be on a + Sunday i.e. 2000-01-02, otherwise it would be at + 2000-01-01. + xperiodalignment + Only relevant when the axis `type` is "date". Sets the + alignment of data points on the x axis. + xsrc + Sets the source reference on Chart Studio Cloud for + `x`. + y + Sets the y coordinates. + y0 + Alternate to `y`. Builds a linear space of y + coordinates. Use with `dy` where `y0` is the starting + coordinate and `dy` the step. + yaxis + Sets a reference between this trace's y coordinates and + a 2D cartesian y axis. If "y" (the default value), the + y coordinates refer to `layout.yaxis`. If "y2", the y + coordinates refer to `layout.yaxis2`, and so on. + ycalendar + Sets the calendar system to use with `y` date data. + yhoverformat + Sets the hover text formatting rulefor `y` using d3 + formatting mini-languages which are very similar to + those in Python. For numbers, see: + https://github.com/d3/d3-format/tree/v1.4.5#d3-format. + And for dates see: https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format. We add two items to + d3's date formatter: "%h" for half of the year as a + decimal number as well as "%{n}f" for fractional + seconds with n digits. For example, *2016-10-13 + 09:15:23.456* with tickformat "%H~%M~%S.%2f" would + display *09~15~23.46*By default the values are + formatted using `yaxis.hoverformat`. + yperiod + Only relevant when the axis `type` is "date". Sets the + period positioning in milliseconds or "M" on the y + axis. Special values in the form of "M" could be + used to declare the number of months. In this case `n` + must be a positive integer. + yperiod0 + Only relevant when the axis `type` is "date". Sets the + base for period positioning in milliseconds or date + string on the y0 axis. When `y0period` is round number + of weeks, the `y0period0` by default would be on a + Sunday i.e. 2000-01-02, otherwise it would be at + 2000-01-01. + yperiodalignment + Only relevant when the axis `type` is "date". Sets the + alignment of data points on the y axis. + ysrc + Sets the source reference on Chart Studio Cloud for + `y`. + zorder + Sets the layer on which this trace is displayed, + relative to other SVG traces on the same subplot. SVG + traces with higher `zorder` appear in front of those + with lower `zorder`. + row : 'all', int or None (default) + Subplot row index (starting from 1) for the trace to be + added. Only valid if figure was created using + `plotly.tools.make_subplots`.If 'all', addresses all + rows in the specified column(s). + col : 'all', int or None (default) + Subplot col index (starting from 1) for the trace to be + added. Only valid if figure was created using + `plotly.tools.make_subplots`.If 'all', addresses all + columns in the specified row(s). + secondary_y: boolean or None (default None) + If True, associate this trace with the secondary y-axis of the + subplot at the specified row and col. Only valid if all of the + following conditions are satisfied: + * The figure was created using `plotly.subplots.make_subplots`. + * The row and col arguments are not None + * The subplot at the specified row and col has type xy + (which is the default) and secondary_y True. These + properties are specified in the specs argument to + make_subplots. See the make_subplots docstring for more info. + + Returns + ------- + FigureWidget + """ + from plotly.graph_objs import Scatter + + new_trace = Scatter( + alignmentgroup=alignmentgroup, + cliponaxis=cliponaxis, + connectgaps=connectgaps, + customdata=customdata, + customdatasrc=customdatasrc, + dx=dx, + dy=dy, + error_x=error_x, + error_y=error_y, + fill=fill, + fillcolor=fillcolor, + fillgradient=fillgradient, + fillpattern=fillpattern, + groupnorm=groupnorm, + hoverinfo=hoverinfo, + hoverinfosrc=hoverinfosrc, + hoverlabel=hoverlabel, + hoveron=hoveron, + hovertemplate=hovertemplate, + hovertemplatefallback=hovertemplatefallback, + hovertemplatesrc=hovertemplatesrc, + hovertext=hovertext, + hovertextsrc=hovertextsrc, + ids=ids, + idssrc=idssrc, + legend=legend, + legendgroup=legendgroup, + legendgrouptitle=legendgrouptitle, + legendrank=legendrank, + legendwidth=legendwidth, + line=line, + marker=marker, + meta=meta, + metasrc=metasrc, + mode=mode, + name=name, + offsetgroup=offsetgroup, + opacity=opacity, + orientation=orientation, + selected=selected, + selectedpoints=selectedpoints, + showlegend=showlegend, + stackgaps=stackgaps, + stackgroup=stackgroup, + stream=stream, + text=text, + textfont=textfont, + textposition=textposition, + textpositionsrc=textpositionsrc, + textsrc=textsrc, + texttemplate=texttemplate, + texttemplatefallback=texttemplatefallback, + texttemplatesrc=texttemplatesrc, + uid=uid, + uirevision=uirevision, + unselected=unselected, + visible=visible, + x=x, + x0=x0, + xaxis=xaxis, + xcalendar=xcalendar, + xhoverformat=xhoverformat, + xperiod=xperiod, + xperiod0=xperiod0, + xperiodalignment=xperiodalignment, + xsrc=xsrc, + y=y, + y0=y0, + yaxis=yaxis, + ycalendar=ycalendar, + yhoverformat=yhoverformat, + yperiod=yperiod, + yperiod0=yperiod0, + yperiodalignment=yperiodalignment, + ysrc=ysrc, + zorder=zorder, + **kwargs, + ) + return self.add_trace(new_trace, row=row, col=col, secondary_y=secondary_y) + + def add_scatter3d( + self, + connectgaps=None, + customdata=None, + customdatasrc=None, + error_x=None, + error_y=None, + error_z=None, + hoverinfo=None, + hoverinfosrc=None, + hoverlabel=None, + hovertemplate=None, + hovertemplatefallback=None, + hovertemplatesrc=None, + hovertext=None, + hovertextsrc=None, + ids=None, + idssrc=None, + legend=None, + legendgroup=None, + legendgrouptitle=None, + legendrank=None, + legendwidth=None, + line=None, + marker=None, + meta=None, + metasrc=None, + mode=None, + name=None, + opacity=None, + projection=None, + scene=None, + showlegend=None, + stream=None, + surfaceaxis=None, + surfacecolor=None, + text=None, + textfont=None, + textposition=None, + textpositionsrc=None, + textsrc=None, + texttemplate=None, + texttemplatefallback=None, + texttemplatesrc=None, + uid=None, + uirevision=None, + visible=None, + x=None, + xcalendar=None, + xhoverformat=None, + xsrc=None, + y=None, + ycalendar=None, + yhoverformat=None, + ysrc=None, + z=None, + zcalendar=None, + zhoverformat=None, + zsrc=None, + row=None, + col=None, + **kwargs, + ) -> "FigureWidget": + """ + Add a new Scatter3d trace + + The data visualized as scatter point or lines in 3D dimension + is set in `x`, `y`, `z`. Text (appearing either on the chart or + on hover only) is via `text`. Bubble charts are achieved by + setting `marker.size` and/or `marker.color` Projections are + achieved via `projection`. Surface fills are achieved via + `surfaceaxis`. + + Parameters + ---------- + connectgaps + Determines whether or not gaps (i.e. {nan} or missing + values) in the provided data arrays are connected. + customdata + Assigns extra data each datum. This may be useful when + listening to hover, click and selection events. Note + that, "scatter" traces also appends customdata items in + the markers DOM elements + customdatasrc + Sets the source reference on Chart Studio Cloud for + `customdata`. + error_x + :class:`plotly.graph_objects.scatter3d.ErrorX` instance + or dict with compatible properties + error_y + :class:`plotly.graph_objects.scatter3d.ErrorY` instance + or dict with compatible properties + error_z + :class:`plotly.graph_objects.scatter3d.ErrorZ` instance + or dict with compatible properties + hoverinfo + Determines which trace information appear on hover. If + `none` or `skip` are set, no information is displayed + upon hovering. But, if `none` is set, click and hover + events are still fired. + hoverinfosrc + Sets the source reference on Chart Studio Cloud for + `hoverinfo`. + hoverlabel + :class:`plotly.graph_objects.scatter3d.Hoverlabel` + instance or dict with compatible properties + hovertemplate + Template string used for rendering the information that + appear on hover box. Note that this will override + `hoverinfo`. Variables are inserted using %{variable}, + for example "y: %{y}" as well as %{xother}, {%_xother}, + {%_xother_}, {%xother_}. When showing info for several + points, "xother" will be added to those with different + x positions from the first point. An underscore before + or after "(x|y)other" will add a space on that side, + only when this field is shown. Numbers are formatted + using d3-format's syntax %{variable:d3-format}, for + example "Price: %{y:$.2f}". + https://github.com/d3/d3-format/tree/v1.4.5#d3-format + for details on the formatting syntax. Dates are + formatted using d3-time-format's syntax + %{variable|d3-time-format}, for example "Day: + %{2019-01-01|%A}". https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format for details on the + date formatting syntax. Variables that can't be found + will be replaced with the specifier. For example, a + template of "data: %{x}, %{y}" will result in a value + of "data: 1, %{y}" if x is 1 and y is missing. + Variables with an undefined value will be replaced with + the fallback value. The variables available in + `hovertemplate` are the ones emitted as event data + described at this link + https://plotly.com/javascript/plotlyjs-events/#event- + data. Additionally, all attributes that can be + specified per-point (the ones that are `arrayOk: true`) + are available. Anything contained in tag `` is + displayed in the secondary box, for example + `%{fullData.name}`. To hide the + secondary box completely, use an empty tag + ``. + hovertemplatefallback + Fallback string that's displayed when a variable + referenced in a template is missing. If the boolean + value 'false' is passed in, the specifier with the + missing variable will be displayed. + hovertemplatesrc + Sets the source reference on Chart Studio Cloud for + `hovertemplate`. + hovertext + Sets text elements associated with each (x,y,z) + triplet. If a single string, the same string appears + over all the data points. If an array of string, the + items are mapped in order to the this trace's (x,y,z) + coordinates. To be seen, trace `hoverinfo` must contain + a "text" flag. + hovertextsrc + Sets the source reference on Chart Studio Cloud for + `hovertext`. + ids + Assigns id labels to each datum. These ids for object + constancy of data points during animation. Should be an + array of strings, not numbers or any other type. + idssrc + Sets the source reference on Chart Studio Cloud for + `ids`. + legend + Sets the reference to a legend to show this trace in. + References to these legends are "legend", "legend2", + "legend3", etc. Settings for these legends are set in + the layout, under `layout.legend`, `layout.legend2`, + etc. + legendgroup + Sets the legend group for this trace. Traces and shapes + part of the same legend group hide/show at the same + time when toggling legend items. + legendgrouptitle + :class:`plotly.graph_objects.scatter3d.Legendgrouptitle + ` instance or dict with compatible properties + legendrank + Sets the legend rank for this trace. Items and groups + with smaller ranks are presented on top/left side while + with "reversed" `legend.traceorder` they are on + bottom/right side. The default legendrank is 1000, so + that you can use ranks less than 1000 to place certain + items before all unranked items, and ranks greater than + 1000 to go after all unranked items. When having + unranked or equal rank items shapes would be displayed + after traces i.e. according to their order in data and + layout. + legendwidth + Sets the width (in px or fraction) of the legend for + this trace. + line + :class:`plotly.graph_objects.scatter3d.Line` instance + or dict with compatible properties + marker + :class:`plotly.graph_objects.scatter3d.Marker` instance + or dict with compatible properties + meta + Assigns extra meta information associated with this + trace that can be used in various text attributes. + Attributes such as trace `name`, graph, axis and + colorbar `title.text`, annotation `text` + `rangeselector`, `updatemenues` and `sliders` `label` + text all support `meta`. To access the trace `meta` + values in an attribute in the same trace, simply use + `%{meta[i]}` where `i` is the index or key of the + `meta` item in question. To access trace `meta` in + layout attributes, use `%{data[n[.meta[i]}` where `i` + is the index or key of the `meta` and `n` is the trace + index. + metasrc + Sets the source reference on Chart Studio Cloud for + `meta`. + mode + Determines the drawing mode for this scatter trace. If + the provided `mode` includes "text" then the `text` + elements appear at the coordinates. Otherwise, the + `text` elements appear on hover. If there are less than + 20 points and the trace is not stacked then the default + is "lines+markers". Otherwise, "lines". + name + Sets the trace name. The trace name appears as the + legend item and on hover. + opacity + Sets the opacity of the trace. + projection + :class:`plotly.graph_objects.scatter3d.Projection` + instance or dict with compatible properties + scene + Sets a reference between this trace's 3D coordinate + system and a 3D scene. If "scene" (the default value), + the (x,y,z) coordinates refer to `layout.scene`. If + "scene2", the (x,y,z) coordinates refer to + `layout.scene2`, and so on. + showlegend + Determines whether or not an item corresponding to this + trace is shown in the legend. + stream + :class:`plotly.graph_objects.scatter3d.Stream` instance + or dict with compatible properties + surfaceaxis + If "-1", the scatter points are not fill with a surface + If 0, 1, 2, the scatter points are filled with a + Delaunay surface about the x, y, z respectively. + surfacecolor + Sets the surface fill color. + text + Sets text elements associated with each (x,y,z) + triplet. If a single string, the same string appears + over all the data points. If an array of string, the + items are mapped in order to the this trace's (x,y,z) + coordinates. If trace `hoverinfo` contains a "text" + flag and "hovertext" is not set, these elements will be + seen in the hover labels. + textfont + Sets the text font. + textposition + Sets the positions of the `text` elements with respects + to the (x,y) coordinates. + textpositionsrc + Sets the source reference on Chart Studio Cloud for + `textposition`. + textsrc + Sets the source reference on Chart Studio Cloud for + `text`. + texttemplate + Template string used for rendering the information text + that appears on points. Note that this will override + `textinfo`. Variables are inserted using %{variable}, + for example "y: %{y}". Numbers are formatted using + d3-format's syntax %{variable:d3-format}, for example + "Price: %{y:$.2f}". + https://github.com/d3/d3-format/tree/v1.4.5#d3-format + for details on the formatting syntax. Dates are + formatted using d3-time-format's syntax + %{variable|d3-time-format}, for example "Day: + %{2019-01-01|%A}". https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format for details on the + date formatting syntax. Variables that can't be found + will be replaced with the specifier. For example, a + template of "data: %{x}, %{y}" will result in a value + of "data: 1, %{y}" if x is 1 and y is missing. + Variables with an undefined value will be replaced with + the fallback value. All attributes that can be + specified per-point (the ones that are `arrayOk: true`) + are available. + texttemplatefallback + Fallback string that's displayed when a variable + referenced in a template is missing. If the boolean + value 'false' is passed in, the specifier with the + missing variable will be displayed. + texttemplatesrc + Sets the source reference on Chart Studio Cloud for + `texttemplate`. + uid + Assign an id to this trace, Use this to provide object + constancy between traces during animations and + transitions. + uirevision + Controls persistence of some user-driven changes to the + trace: `constraintrange` in `parcoords` traces, as well + as some `editable: true` modifications such as `name` + and `colorbar.title`. Defaults to `layout.uirevision`. + Note that other user-driven trace attribute changes are + controlled by `layout` attributes: `trace.visible` is + controlled by `layout.legend.uirevision`, + `selectedpoints` is controlled by + `layout.selectionrevision`, and `colorbar.(x|y)` + (accessible with `config: {editable: true}`) is + controlled by `layout.editrevision`. Trace changes are + tracked by `uid`, which only falls back on trace index + if no `uid` is provided. So if your app can add/remove + traces before the end of the `data` array, such that + the same trace has a different index, you can still + preserve user-driven changes if you give each trace a + `uid` that stays with it as it moves. + visible + Determines whether or not this trace is visible. If + "legendonly", the trace is not drawn, but can appear as + a legend item (provided that the legend itself is + visible). + x + Sets the x coordinates. + xcalendar + Sets the calendar system to use with `x` date data. + xhoverformat + Sets the hover text formatting rulefor `x` using d3 + formatting mini-languages which are very similar to + those in Python. For numbers, see: + https://github.com/d3/d3-format/tree/v1.4.5#d3-format. + And for dates see: https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format. We add two items to + d3's date formatter: "%h" for half of the year as a + decimal number as well as "%{n}f" for fractional + seconds with n digits. For example, *2016-10-13 + 09:15:23.456* with tickformat "%H~%M~%S.%2f" would + display *09~15~23.46*By default the values are + formatted using `xaxis.hoverformat`. + xsrc + Sets the source reference on Chart Studio Cloud for + `x`. + y + Sets the y coordinates. + ycalendar + Sets the calendar system to use with `y` date data. + yhoverformat + Sets the hover text formatting rulefor `y` using d3 + formatting mini-languages which are very similar to + those in Python. For numbers, see: + https://github.com/d3/d3-format/tree/v1.4.5#d3-format. + And for dates see: https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format. We add two items to + d3's date formatter: "%h" for half of the year as a + decimal number as well as "%{n}f" for fractional + seconds with n digits. For example, *2016-10-13 + 09:15:23.456* with tickformat "%H~%M~%S.%2f" would + display *09~15~23.46*By default the values are + formatted using `yaxis.hoverformat`. + ysrc + Sets the source reference on Chart Studio Cloud for + `y`. + z + Sets the z coordinates. + zcalendar + Sets the calendar system to use with `z` date data. + zhoverformat + Sets the hover text formatting rulefor `z` using d3 + formatting mini-languages which are very similar to + those in Python. For numbers, see: + https://github.com/d3/d3-format/tree/v1.4.5#d3-format. + And for dates see: https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format. We add two items to + d3's date formatter: "%h" for half of the year as a + decimal number as well as "%{n}f" for fractional + seconds with n digits. For example, *2016-10-13 + 09:15:23.456* with tickformat "%H~%M~%S.%2f" would + display *09~15~23.46*By default the values are + formatted using `zaxis.hoverformat`. + zsrc + Sets the source reference on Chart Studio Cloud for + `z`. + row : 'all', int or None (default) + Subplot row index (starting from 1) for the trace to be + added. Only valid if figure was created using + `plotly.tools.make_subplots`.If 'all', addresses all + rows in the specified column(s). + col : 'all', int or None (default) + Subplot col index (starting from 1) for the trace to be + added. Only valid if figure was created using + `plotly.tools.make_subplots`.If 'all', addresses all + columns in the specified row(s). + + Returns + ------- + FigureWidget + """ + from plotly.graph_objs import Scatter3d + + new_trace = Scatter3d( + connectgaps=connectgaps, + customdata=customdata, + customdatasrc=customdatasrc, + error_x=error_x, + error_y=error_y, + error_z=error_z, + hoverinfo=hoverinfo, + hoverinfosrc=hoverinfosrc, + hoverlabel=hoverlabel, + hovertemplate=hovertemplate, + hovertemplatefallback=hovertemplatefallback, + hovertemplatesrc=hovertemplatesrc, + hovertext=hovertext, + hovertextsrc=hovertextsrc, + ids=ids, + idssrc=idssrc, + legend=legend, + legendgroup=legendgroup, + legendgrouptitle=legendgrouptitle, + legendrank=legendrank, + legendwidth=legendwidth, + line=line, + marker=marker, + meta=meta, + metasrc=metasrc, + mode=mode, + name=name, + opacity=opacity, + projection=projection, + scene=scene, + showlegend=showlegend, + stream=stream, + surfaceaxis=surfaceaxis, + surfacecolor=surfacecolor, + text=text, + textfont=textfont, + textposition=textposition, + textpositionsrc=textpositionsrc, + textsrc=textsrc, + texttemplate=texttemplate, + texttemplatefallback=texttemplatefallback, + texttemplatesrc=texttemplatesrc, + uid=uid, + uirevision=uirevision, + visible=visible, + x=x, + xcalendar=xcalendar, + xhoverformat=xhoverformat, + xsrc=xsrc, + y=y, + ycalendar=ycalendar, + yhoverformat=yhoverformat, + ysrc=ysrc, + z=z, + zcalendar=zcalendar, + zhoverformat=zhoverformat, + zsrc=zsrc, + **kwargs, + ) + return self.add_trace(new_trace, row=row, col=col) + + def add_scattercarpet( + self, + a=None, + asrc=None, + b=None, + bsrc=None, + carpet=None, + connectgaps=None, + customdata=None, + customdatasrc=None, + fill=None, + fillcolor=None, + hoverinfo=None, + hoverinfosrc=None, + hoverlabel=None, + hoveron=None, + hovertemplate=None, + hovertemplatefallback=None, + hovertemplatesrc=None, + hovertext=None, + hovertextsrc=None, + ids=None, + idssrc=None, + legend=None, + legendgroup=None, + legendgrouptitle=None, + legendrank=None, + legendwidth=None, + line=None, + marker=None, + meta=None, + metasrc=None, + mode=None, + name=None, + opacity=None, + selected=None, + selectedpoints=None, + showlegend=None, + stream=None, + text=None, + textfont=None, + textposition=None, + textpositionsrc=None, + textsrc=None, + texttemplate=None, + texttemplatefallback=None, + texttemplatesrc=None, + uid=None, + uirevision=None, + unselected=None, + visible=None, + xaxis=None, + yaxis=None, + zorder=None, + row=None, + col=None, + secondary_y=None, + **kwargs, + ) -> "FigureWidget": + """ + Add a new Scattercarpet trace + + Plots a scatter trace on either the first carpet axis or the + carpet axis with a matching `carpet` attribute. + + Parameters + ---------- + a + Sets the a-axis coordinates. + asrc + Sets the source reference on Chart Studio Cloud for + `a`. + b + Sets the b-axis coordinates. + bsrc + Sets the source reference on Chart Studio Cloud for + `b`. + carpet + An identifier for this carpet, so that `scattercarpet` + and `contourcarpet` traces can specify a carpet plot on + which they lie + connectgaps + Determines whether or not gaps (i.e. {nan} or missing + values) in the provided data arrays are connected. + customdata + Assigns extra data each datum. This may be useful when + listening to hover, click and selection events. Note + that, "scatter" traces also appends customdata items in + the markers DOM elements + customdatasrc + Sets the source reference on Chart Studio Cloud for + `customdata`. + fill + Sets the area to fill with a solid color. Use with + `fillcolor` if not "none". scatterternary has a subset + of the options available to scatter. "toself" connects + the endpoints of the trace (or each segment of the + trace if it has gaps) into a closed shape. "tonext" + fills the space between two traces if one completely + encloses the other (eg consecutive contour lines), and + behaves like "toself" if there is no trace before it. + "tonext" should not be used if one trace does not + enclose the other. + fillcolor + Sets the fill color. Defaults to a half-transparent + variant of the line color, marker color, or marker line + color, whichever is available. + hoverinfo + Determines which trace information appear on hover. If + `none` or `skip` are set, no information is displayed + upon hovering. But, if `none` is set, click and hover + events are still fired. + hoverinfosrc + Sets the source reference on Chart Studio Cloud for + `hoverinfo`. + hoverlabel + :class:`plotly.graph_objects.scattercarpet.Hoverlabel` + instance or dict with compatible properties + hoveron + Do the hover effects highlight individual points + (markers or line points) or do they highlight filled + regions? If the fill is "toself" or "tonext" and there + are no markers or text, then the default is "fills", + otherwise it is "points". + hovertemplate + Template string used for rendering the information that + appear on hover box. Note that this will override + `hoverinfo`. Variables are inserted using %{variable}, + for example "y: %{y}" as well as %{xother}, {%_xother}, + {%_xother_}, {%xother_}. When showing info for several + points, "xother" will be added to those with different + x positions from the first point. An underscore before + or after "(x|y)other" will add a space on that side, + only when this field is shown. Numbers are formatted + using d3-format's syntax %{variable:d3-format}, for + example "Price: %{y:$.2f}". + https://github.com/d3/d3-format/tree/v1.4.5#d3-format + for details on the formatting syntax. Dates are + formatted using d3-time-format's syntax + %{variable|d3-time-format}, for example "Day: + %{2019-01-01|%A}". https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format for details on the + date formatting syntax. Variables that can't be found + will be replaced with the specifier. For example, a + template of "data: %{x}, %{y}" will result in a value + of "data: 1, %{y}" if x is 1 and y is missing. + Variables with an undefined value will be replaced with + the fallback value. The variables available in + `hovertemplate` are the ones emitted as event data + described at this link + https://plotly.com/javascript/plotlyjs-events/#event- + data. Additionally, all attributes that can be + specified per-point (the ones that are `arrayOk: true`) + are available. Anything contained in tag `` is + displayed in the secondary box, for example + `%{fullData.name}`. To hide the + secondary box completely, use an empty tag + ``. + hovertemplatefallback + Fallback string that's displayed when a variable + referenced in a template is missing. If the boolean + value 'false' is passed in, the specifier with the + missing variable will be displayed. + hovertemplatesrc + Sets the source reference on Chart Studio Cloud for + `hovertemplate`. + hovertext + Sets hover text elements associated with each (a,b) + point. If a single string, the same string appears over + all the data points. If an array of strings, the items + are mapped in order to the the data points in (a,b). To + be seen, trace `hoverinfo` must contain a "text" flag. + hovertextsrc + Sets the source reference on Chart Studio Cloud for + `hovertext`. + ids + Assigns id labels to each datum. These ids for object + constancy of data points during animation. Should be an + array of strings, not numbers or any other type. + idssrc + Sets the source reference on Chart Studio Cloud for + `ids`. + legend + Sets the reference to a legend to show this trace in. + References to these legends are "legend", "legend2", + "legend3", etc. Settings for these legends are set in + the layout, under `layout.legend`, `layout.legend2`, + etc. + legendgroup + Sets the legend group for this trace. Traces and shapes + part of the same legend group hide/show at the same + time when toggling legend items. + legendgrouptitle + :class:`plotly.graph_objects.scattercarpet.Legendgroupt + itle` instance or dict with compatible properties + legendrank + Sets the legend rank for this trace. Items and groups + with smaller ranks are presented on top/left side while + with "reversed" `legend.traceorder` they are on + bottom/right side. The default legendrank is 1000, so + that you can use ranks less than 1000 to place certain + items before all unranked items, and ranks greater than + 1000 to go after all unranked items. When having + unranked or equal rank items shapes would be displayed + after traces i.e. according to their order in data and + layout. + legendwidth + Sets the width (in px or fraction) of the legend for + this trace. + line + :class:`plotly.graph_objects.scattercarpet.Line` + instance or dict with compatible properties + marker + :class:`plotly.graph_objects.scattercarpet.Marker` + instance or dict with compatible properties + meta + Assigns extra meta information associated with this + trace that can be used in various text attributes. + Attributes such as trace `name`, graph, axis and + colorbar `title.text`, annotation `text` + `rangeselector`, `updatemenues` and `sliders` `label` + text all support `meta`. To access the trace `meta` + values in an attribute in the same trace, simply use + `%{meta[i]}` where `i` is the index or key of the + `meta` item in question. To access trace `meta` in + layout attributes, use `%{data[n[.meta[i]}` where `i` + is the index or key of the `meta` and `n` is the trace + index. + metasrc + Sets the source reference on Chart Studio Cloud for + `meta`. + mode + Determines the drawing mode for this scatter trace. If + the provided `mode` includes "text" then the `text` + elements appear at the coordinates. Otherwise, the + `text` elements appear on hover. If there are less than + 20 points and the trace is not stacked then the default + is "lines+markers". Otherwise, "lines". + name + Sets the trace name. The trace name appears as the + legend item and on hover. + opacity + Sets the opacity of the trace. + selected + :class:`plotly.graph_objects.scattercarpet.Selected` + instance or dict with compatible properties + selectedpoints + Array containing integer indices of selected points. + Has an effect only for traces that support selections. + Note that an empty array means an empty selection where + the `unselected` are turned on for all points, whereas, + any other non-array values means no selection all where + the `selected` and `unselected` styles have no effect. + showlegend + Determines whether or not an item corresponding to this + trace is shown in the legend. + stream + :class:`plotly.graph_objects.scattercarpet.Stream` + instance or dict with compatible properties + text + Sets text elements associated with each (a,b) point. If + a single string, the same string appears over all the + data points. If an array of strings, the items are + mapped in order to the the data points in (a,b). If + trace `hoverinfo` contains a "text" flag and + "hovertext" is not set, these elements will be seen in + the hover labels. + textfont + Sets the text font. + textposition + Sets the positions of the `text` elements with respects + to the (x,y) coordinates. + textpositionsrc + Sets the source reference on Chart Studio Cloud for + `textposition`. + textsrc + Sets the source reference on Chart Studio Cloud for + `text`. + texttemplate + Template string used for rendering the information text + that appears on points. Note that this will override + `textinfo`. Variables are inserted using %{variable}, + for example "y: %{y}". Numbers are formatted using + d3-format's syntax %{variable:d3-format}, for example + "Price: %{y:$.2f}". + https://github.com/d3/d3-format/tree/v1.4.5#d3-format + for details on the formatting syntax. Dates are + formatted using d3-time-format's syntax + %{variable|d3-time-format}, for example "Day: + %{2019-01-01|%A}". https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format for details on the + date formatting syntax. Variables that can't be found + will be replaced with the specifier. For example, a + template of "data: %{x}, %{y}" will result in a value + of "data: 1, %{y}" if x is 1 and y is missing. + Variables with an undefined value will be replaced with + the fallback value. All attributes that can be + specified per-point (the ones that are `arrayOk: true`) + are available. Finally, the template string has access + to variables `a`, `b` and `text`. + texttemplatefallback + Fallback string that's displayed when a variable + referenced in a template is missing. If the boolean + value 'false' is passed in, the specifier with the + missing variable will be displayed. + texttemplatesrc + Sets the source reference on Chart Studio Cloud for + `texttemplate`. + uid + Assign an id to this trace, Use this to provide object + constancy between traces during animations and + transitions. + uirevision + Controls persistence of some user-driven changes to the + trace: `constraintrange` in `parcoords` traces, as well + as some `editable: true` modifications such as `name` + and `colorbar.title`. Defaults to `layout.uirevision`. + Note that other user-driven trace attribute changes are + controlled by `layout` attributes: `trace.visible` is + controlled by `layout.legend.uirevision`, + `selectedpoints` is controlled by + `layout.selectionrevision`, and `colorbar.(x|y)` + (accessible with `config: {editable: true}`) is + controlled by `layout.editrevision`. Trace changes are + tracked by `uid`, which only falls back on trace index + if no `uid` is provided. So if your app can add/remove + traces before the end of the `data` array, such that + the same trace has a different index, you can still + preserve user-driven changes if you give each trace a + `uid` that stays with it as it moves. + unselected + :class:`plotly.graph_objects.scattercarpet.Unselected` + instance or dict with compatible properties + visible + Determines whether or not this trace is visible. If + "legendonly", the trace is not drawn, but can appear as + a legend item (provided that the legend itself is + visible). + xaxis + Sets a reference between this trace's x coordinates and + a 2D cartesian x axis. If "x" (the default value), the + x coordinates refer to `layout.xaxis`. If "x2", the x + coordinates refer to `layout.xaxis2`, and so on. + yaxis + Sets a reference between this trace's y coordinates and + a 2D cartesian y axis. If "y" (the default value), the + y coordinates refer to `layout.yaxis`. If "y2", the y + coordinates refer to `layout.yaxis2`, and so on. + zorder + Sets the layer on which this trace is displayed, + relative to other SVG traces on the same subplot. SVG + traces with higher `zorder` appear in front of those + with lower `zorder`. + row : 'all', int or None (default) + Subplot row index (starting from 1) for the trace to be + added. Only valid if figure was created using + `plotly.tools.make_subplots`.If 'all', addresses all + rows in the specified column(s). + col : 'all', int or None (default) + Subplot col index (starting from 1) for the trace to be + added. Only valid if figure was created using + `plotly.tools.make_subplots`.If 'all', addresses all + columns in the specified row(s). + secondary_y: boolean or None (default None) + If True, associate this trace with the secondary y-axis of the + subplot at the specified row and col. Only valid if all of the + following conditions are satisfied: + * The figure was created using `plotly.subplots.make_subplots`. + * The row and col arguments are not None + * The subplot at the specified row and col has type xy + (which is the default) and secondary_y True. These + properties are specified in the specs argument to + make_subplots. See the make_subplots docstring for more info. + + Returns + ------- + FigureWidget + """ + from plotly.graph_objs import Scattercarpet + + new_trace = Scattercarpet( + a=a, + asrc=asrc, + b=b, + bsrc=bsrc, + carpet=carpet, + connectgaps=connectgaps, + customdata=customdata, + customdatasrc=customdatasrc, + fill=fill, + fillcolor=fillcolor, + hoverinfo=hoverinfo, + hoverinfosrc=hoverinfosrc, + hoverlabel=hoverlabel, + hoveron=hoveron, + hovertemplate=hovertemplate, + hovertemplatefallback=hovertemplatefallback, + hovertemplatesrc=hovertemplatesrc, + hovertext=hovertext, + hovertextsrc=hovertextsrc, + ids=ids, + idssrc=idssrc, + legend=legend, + legendgroup=legendgroup, + legendgrouptitle=legendgrouptitle, + legendrank=legendrank, + legendwidth=legendwidth, + line=line, + marker=marker, + meta=meta, + metasrc=metasrc, + mode=mode, + name=name, + opacity=opacity, + selected=selected, + selectedpoints=selectedpoints, + showlegend=showlegend, + stream=stream, + text=text, + textfont=textfont, + textposition=textposition, + textpositionsrc=textpositionsrc, + textsrc=textsrc, + texttemplate=texttemplate, + texttemplatefallback=texttemplatefallback, + texttemplatesrc=texttemplatesrc, + uid=uid, + uirevision=uirevision, + unselected=unselected, + visible=visible, + xaxis=xaxis, + yaxis=yaxis, + zorder=zorder, + **kwargs, + ) + return self.add_trace(new_trace, row=row, col=col, secondary_y=secondary_y) + + def add_scattergeo( + self, + connectgaps=None, + customdata=None, + customdatasrc=None, + featureidkey=None, + fill=None, + fillcolor=None, + geo=None, + geojson=None, + hoverinfo=None, + hoverinfosrc=None, + hoverlabel=None, + hovertemplate=None, + hovertemplatefallback=None, + hovertemplatesrc=None, + hovertext=None, + hovertextsrc=None, + ids=None, + idssrc=None, + lat=None, + latsrc=None, + legend=None, + legendgroup=None, + legendgrouptitle=None, + legendrank=None, + legendwidth=None, + line=None, + locationmode=None, + locations=None, + locationssrc=None, + lon=None, + lonsrc=None, + marker=None, + meta=None, + metasrc=None, + mode=None, + name=None, + opacity=None, + selected=None, + selectedpoints=None, + showlegend=None, + stream=None, + text=None, + textfont=None, + textposition=None, + textpositionsrc=None, + textsrc=None, + texttemplate=None, + texttemplatefallback=None, + texttemplatesrc=None, + uid=None, + uirevision=None, + unselected=None, + visible=None, + row=None, + col=None, + **kwargs, + ) -> "FigureWidget": + """ + Add a new Scattergeo trace + + The data visualized as scatter point or lines on a geographic + map is provided either by longitude/latitude pairs in `lon` and + `lat` respectively or by geographic location IDs or names in + `locations`. + + Parameters + ---------- + connectgaps + Determines whether or not gaps (i.e. {nan} or missing + values) in the provided data arrays are connected. + customdata + Assigns extra data each datum. This may be useful when + listening to hover, click and selection events. Note + that, "scatter" traces also appends customdata items in + the markers DOM elements + customdatasrc + Sets the source reference on Chart Studio Cloud for + `customdata`. + featureidkey + Sets the key in GeoJSON features which is used as id to + match the items included in the `locations` array. Only + has an effect when `geojson` is set. Support nested + property, for example "properties.name". + fill + Sets the area to fill with a solid color. Use with + `fillcolor` if not "none". "toself" connects the + endpoints of the trace (or each segment of the trace if + it has gaps) into a closed shape. + fillcolor + Sets the fill color. Defaults to a half-transparent + variant of the line color, marker color, or marker line + color, whichever is available. + geo + Sets a reference between this trace's geospatial + coordinates and a geographic map. If "geo" (the default + value), the geospatial coordinates refer to + `layout.geo`. If "geo2", the geospatial coordinates + refer to `layout.geo2`, and so on. + geojson + Sets optional GeoJSON data associated with this trace. + If not given, the features on the base map are used + when `locations` is set. It can be set as a valid + GeoJSON object or as a URL string. Note that we only + accept GeoJSONs of type "FeatureCollection" or + "Feature" with geometries of type "Polygon" or + "MultiPolygon". + hoverinfo + Determines which trace information appear on hover. If + `none` or `skip` are set, no information is displayed + upon hovering. But, if `none` is set, click and hover + events are still fired. + hoverinfosrc + Sets the source reference on Chart Studio Cloud for + `hoverinfo`. + hoverlabel + :class:`plotly.graph_objects.scattergeo.Hoverlabel` + instance or dict with compatible properties + hovertemplate + Template string used for rendering the information that + appear on hover box. Note that this will override + `hoverinfo`. Variables are inserted using %{variable}, + for example "y: %{y}" as well as %{xother}, {%_xother}, + {%_xother_}, {%xother_}. When showing info for several + points, "xother" will be added to those with different + x positions from the first point. An underscore before + or after "(x|y)other" will add a space on that side, + only when this field is shown. Numbers are formatted + using d3-format's syntax %{variable:d3-format}, for + example "Price: %{y:$.2f}". + https://github.com/d3/d3-format/tree/v1.4.5#d3-format + for details on the formatting syntax. Dates are + formatted using d3-time-format's syntax + %{variable|d3-time-format}, for example "Day: + %{2019-01-01|%A}". https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format for details on the + date formatting syntax. Variables that can't be found + will be replaced with the specifier. For example, a + template of "data: %{x}, %{y}" will result in a value + of "data: 1, %{y}" if x is 1 and y is missing. + Variables with an undefined value will be replaced with + the fallback value. The variables available in + `hovertemplate` are the ones emitted as event data + described at this link + https://plotly.com/javascript/plotlyjs-events/#event- + data. Additionally, all attributes that can be + specified per-point (the ones that are `arrayOk: true`) + are available. Anything contained in tag `` is + displayed in the secondary box, for example + `%{fullData.name}`. To hide the + secondary box completely, use an empty tag + ``. + hovertemplatefallback + Fallback string that's displayed when a variable + referenced in a template is missing. If the boolean + value 'false' is passed in, the specifier with the + missing variable will be displayed. + hovertemplatesrc + Sets the source reference on Chart Studio Cloud for + `hovertemplate`. + hovertext + Sets hover text elements associated with each (lon,lat) + pair or item in `locations`. If a single string, the + same string appears over all the data points. If an + array of string, the items are mapped in order to the + this trace's (lon,lat) or `locations` coordinates. To + be seen, trace `hoverinfo` must contain a "text" flag. + hovertextsrc + Sets the source reference on Chart Studio Cloud for + `hovertext`. + ids + Assigns id labels to each datum. These ids for object + constancy of data points during animation. Should be an + array of strings, not numbers or any other type. + idssrc + Sets the source reference on Chart Studio Cloud for + `ids`. + lat + Sets the latitude coordinates (in degrees North). + latsrc + Sets the source reference on Chart Studio Cloud for + `lat`. + legend + Sets the reference to a legend to show this trace in. + References to these legends are "legend", "legend2", + "legend3", etc. Settings for these legends are set in + the layout, under `layout.legend`, `layout.legend2`, + etc. + legendgroup + Sets the legend group for this trace. Traces and shapes + part of the same legend group hide/show at the same + time when toggling legend items. + legendgrouptitle + :class:`plotly.graph_objects.scattergeo.Legendgrouptitl + e` instance or dict with compatible properties + legendrank + Sets the legend rank for this trace. Items and groups + with smaller ranks are presented on top/left side while + with "reversed" `legend.traceorder` they are on + bottom/right side. The default legendrank is 1000, so + that you can use ranks less than 1000 to place certain + items before all unranked items, and ranks greater than + 1000 to go after all unranked items. When having + unranked or equal rank items shapes would be displayed + after traces i.e. according to their order in data and + layout. + legendwidth + Sets the width (in px or fraction) of the legend for + this trace. + line + :class:`plotly.graph_objects.scattergeo.Line` instance + or dict with compatible properties + locationmode + The library used by the *country names* `locationmode` + option is changing in an upcoming version. Country + names in existing plots may not work in the new + version. Determines the set of locations used to match + entries in `locations` to regions on the map. Values + "ISO-3", "USA-states", *country names* correspond to + features on the base map and value "geojson-id" + corresponds to features from a custom GeoJSON linked to + the `geojson` attribute. + locations + Sets the coordinates via location IDs or names. + Coordinates correspond to the centroid of each location + given. See `locationmode` for more info. + locationssrc + Sets the source reference on Chart Studio Cloud for + `locations`. + lon + Sets the longitude coordinates (in degrees East). + lonsrc + Sets the source reference on Chart Studio Cloud for + `lon`. + marker + :class:`plotly.graph_objects.scattergeo.Marker` + instance or dict with compatible properties + meta + Assigns extra meta information associated with this + trace that can be used in various text attributes. + Attributes such as trace `name`, graph, axis and + colorbar `title.text`, annotation `text` + `rangeselector`, `updatemenues` and `sliders` `label` + text all support `meta`. To access the trace `meta` + values in an attribute in the same trace, simply use + `%{meta[i]}` where `i` is the index or key of the + `meta` item in question. To access trace `meta` in + layout attributes, use `%{data[n[.meta[i]}` where `i` + is the index or key of the `meta` and `n` is the trace + index. + metasrc + Sets the source reference on Chart Studio Cloud for + `meta`. + mode + Determines the drawing mode for this scatter trace. If + the provided `mode` includes "text" then the `text` + elements appear at the coordinates. Otherwise, the + `text` elements appear on hover. If there are less than + 20 points and the trace is not stacked then the default + is "lines+markers". Otherwise, "lines". + name + Sets the trace name. The trace name appears as the + legend item and on hover. + opacity + Sets the opacity of the trace. + selected + :class:`plotly.graph_objects.scattergeo.Selected` + instance or dict with compatible properties + selectedpoints + Array containing integer indices of selected points. + Has an effect only for traces that support selections. + Note that an empty array means an empty selection where + the `unselected` are turned on for all points, whereas, + any other non-array values means no selection all where + the `selected` and `unselected` styles have no effect. + showlegend + Determines whether or not an item corresponding to this + trace is shown in the legend. + stream + :class:`plotly.graph_objects.scattergeo.Stream` + instance or dict with compatible properties + text + Sets text elements associated with each (lon,lat) pair + or item in `locations`. If a single string, the same + string appears over all the data points. If an array of + string, the items are mapped in order to the this + trace's (lon,lat) or `locations` coordinates. If trace + `hoverinfo` contains a "text" flag and "hovertext" is + not set, these elements will be seen in the hover + labels. + textfont + Sets the text font. + textposition + Sets the positions of the `text` elements with respects + to the (x,y) coordinates. + textpositionsrc + Sets the source reference on Chart Studio Cloud for + `textposition`. + textsrc + Sets the source reference on Chart Studio Cloud for + `text`. + texttemplate + Template string used for rendering the information text + that appears on points. Note that this will override + `textinfo`. Variables are inserted using %{variable}, + for example "y: %{y}". Numbers are formatted using + d3-format's syntax %{variable:d3-format}, for example + "Price: %{y:$.2f}". + https://github.com/d3/d3-format/tree/v1.4.5#d3-format + for details on the formatting syntax. Dates are + formatted using d3-time-format's syntax + %{variable|d3-time-format}, for example "Day: + %{2019-01-01|%A}". https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format for details on the + date formatting syntax. Variables that can't be found + will be replaced with the specifier. For example, a + template of "data: %{x}, %{y}" will result in a value + of "data: 1, %{y}" if x is 1 and y is missing. + Variables with an undefined value will be replaced with + the fallback value. All attributes that can be + specified per-point (the ones that are `arrayOk: true`) + are available. Finally, the template string has access + to variables `lat`, `lon`, `location` and `text`. + texttemplatefallback + Fallback string that's displayed when a variable + referenced in a template is missing. If the boolean + value 'false' is passed in, the specifier with the + missing variable will be displayed. + texttemplatesrc + Sets the source reference on Chart Studio Cloud for + `texttemplate`. + uid + Assign an id to this trace, Use this to provide object + constancy between traces during animations and + transitions. + uirevision + Controls persistence of some user-driven changes to the + trace: `constraintrange` in `parcoords` traces, as well + as some `editable: true` modifications such as `name` + and `colorbar.title`. Defaults to `layout.uirevision`. + Note that other user-driven trace attribute changes are + controlled by `layout` attributes: `trace.visible` is + controlled by `layout.legend.uirevision`, + `selectedpoints` is controlled by + `layout.selectionrevision`, and `colorbar.(x|y)` + (accessible with `config: {editable: true}`) is + controlled by `layout.editrevision`. Trace changes are + tracked by `uid`, which only falls back on trace index + if no `uid` is provided. So if your app can add/remove + traces before the end of the `data` array, such that + the same trace has a different index, you can still + preserve user-driven changes if you give each trace a + `uid` that stays with it as it moves. + unselected + :class:`plotly.graph_objects.scattergeo.Unselected` + instance or dict with compatible properties + visible + Determines whether or not this trace is visible. If + "legendonly", the trace is not drawn, but can appear as + a legend item (provided that the legend itself is + visible). + row : 'all', int or None (default) + Subplot row index (starting from 1) for the trace to be + added. Only valid if figure was created using + `plotly.tools.make_subplots`.If 'all', addresses all + rows in the specified column(s). + col : 'all', int or None (default) + Subplot col index (starting from 1) for the trace to be + added. Only valid if figure was created using + `plotly.tools.make_subplots`.If 'all', addresses all + columns in the specified row(s). + + Returns + ------- + FigureWidget + """ + from plotly.graph_objs import Scattergeo + + new_trace = Scattergeo( + connectgaps=connectgaps, + customdata=customdata, + customdatasrc=customdatasrc, + featureidkey=featureidkey, + fill=fill, + fillcolor=fillcolor, + geo=geo, + geojson=geojson, + hoverinfo=hoverinfo, + hoverinfosrc=hoverinfosrc, + hoverlabel=hoverlabel, + hovertemplate=hovertemplate, + hovertemplatefallback=hovertemplatefallback, + hovertemplatesrc=hovertemplatesrc, + hovertext=hovertext, + hovertextsrc=hovertextsrc, + ids=ids, + idssrc=idssrc, + lat=lat, + latsrc=latsrc, + legend=legend, + legendgroup=legendgroup, + legendgrouptitle=legendgrouptitle, + legendrank=legendrank, + legendwidth=legendwidth, + line=line, + locationmode=locationmode, + locations=locations, + locationssrc=locationssrc, + lon=lon, + lonsrc=lonsrc, + marker=marker, + meta=meta, + metasrc=metasrc, + mode=mode, + name=name, + opacity=opacity, + selected=selected, + selectedpoints=selectedpoints, + showlegend=showlegend, + stream=stream, + text=text, + textfont=textfont, + textposition=textposition, + textpositionsrc=textpositionsrc, + textsrc=textsrc, + texttemplate=texttemplate, + texttemplatefallback=texttemplatefallback, + texttemplatesrc=texttemplatesrc, + uid=uid, + uirevision=uirevision, + unselected=unselected, + visible=visible, + **kwargs, + ) + return self.add_trace(new_trace, row=row, col=col) + + def add_scattergl( + self, + connectgaps=None, + customdata=None, + customdatasrc=None, + dx=None, + dy=None, + error_x=None, + error_y=None, + fill=None, + fillcolor=None, + hoverinfo=None, + hoverinfosrc=None, + hoverlabel=None, + hovertemplate=None, + hovertemplatefallback=None, + hovertemplatesrc=None, + hovertext=None, + hovertextsrc=None, + ids=None, + idssrc=None, + legend=None, + legendgroup=None, + legendgrouptitle=None, + legendrank=None, + legendwidth=None, + line=None, + marker=None, + meta=None, + metasrc=None, + mode=None, + name=None, + opacity=None, + selected=None, + selectedpoints=None, + showlegend=None, + stream=None, + text=None, + textfont=None, + textposition=None, + textpositionsrc=None, + textsrc=None, + texttemplate=None, + texttemplatefallback=None, + texttemplatesrc=None, + uid=None, + uirevision=None, + unselected=None, + visible=None, + x=None, + x0=None, + xaxis=None, + xcalendar=None, + xhoverformat=None, + xperiod=None, + xperiod0=None, + xperiodalignment=None, + xsrc=None, + y=None, + y0=None, + yaxis=None, + ycalendar=None, + yhoverformat=None, + yperiod=None, + yperiod0=None, + yperiodalignment=None, + ysrc=None, + row=None, + col=None, + secondary_y=None, + **kwargs, + ) -> "FigureWidget": + """ + Add a new Scattergl trace + + The data visualized as scatter point or lines is set in `x` and + `y` using the WebGL plotting engine. Bubble charts are achieved + by setting `marker.size` and/or `marker.color` to a numerical + arrays. + + Parameters + ---------- + connectgaps + Determines whether or not gaps (i.e. {nan} or missing + values) in the provided data arrays are connected. + customdata + Assigns extra data each datum. This may be useful when + listening to hover, click and selection events. Note + that, "scatter" traces also appends customdata items in + the markers DOM elements + customdatasrc + Sets the source reference on Chart Studio Cloud for + `customdata`. + dx + Sets the x coordinate step. See `x0` for more info. + dy + Sets the y coordinate step. See `y0` for more info. + error_x + :class:`plotly.graph_objects.scattergl.ErrorX` instance + or dict with compatible properties + error_y + :class:`plotly.graph_objects.scattergl.ErrorY` instance + or dict with compatible properties + fill + Sets the area to fill with a solid color. Defaults to + "none" unless this trace is stacked, then it gets + "tonexty" ("tonextx") if `orientation` is "v" ("h") Use + with `fillcolor` if not "none". "tozerox" and "tozeroy" + fill to x=0 and y=0 respectively. "tonextx" and + "tonexty" fill between the endpoints of this trace and + the endpoints of the trace before it, connecting those + endpoints with straight lines (to make a stacked area + graph); if there is no trace before it, they behave + like "tozerox" and "tozeroy". "toself" connects the + endpoints of the trace (or each segment of the trace if + it has gaps) into a closed shape. "tonext" fills the + space between two traces if one completely encloses the + other (eg consecutive contour lines), and behaves like + "toself" if there is no trace before it. "tonext" + should not be used if one trace does not enclose the + other. Traces in a `stackgroup` will only fill to (or + be filled to) other traces in the same group. With + multiple `stackgroup`s or some traces stacked and some + not, if fill-linked traces are not already consecutive, + the later ones will be pushed down in the drawing + order. + fillcolor + Sets the fill color. Defaults to a half-transparent + variant of the line color, marker color, or marker line + color, whichever is available. + hoverinfo + Determines which trace information appear on hover. If + `none` or `skip` are set, no information is displayed + upon hovering. But, if `none` is set, click and hover + events are still fired. + hoverinfosrc + Sets the source reference on Chart Studio Cloud for + `hoverinfo`. + hoverlabel + :class:`plotly.graph_objects.scattergl.Hoverlabel` + instance or dict with compatible properties + hovertemplate + Template string used for rendering the information that + appear on hover box. Note that this will override + `hoverinfo`. Variables are inserted using %{variable}, + for example "y: %{y}" as well as %{xother}, {%_xother}, + {%_xother_}, {%xother_}. When showing info for several + points, "xother" will be added to those with different + x positions from the first point. An underscore before + or after "(x|y)other" will add a space on that side, + only when this field is shown. Numbers are formatted + using d3-format's syntax %{variable:d3-format}, for + example "Price: %{y:$.2f}". + https://github.com/d3/d3-format/tree/v1.4.5#d3-format + for details on the formatting syntax. Dates are + formatted using d3-time-format's syntax + %{variable|d3-time-format}, for example "Day: + %{2019-01-01|%A}". https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format for details on the + date formatting syntax. Variables that can't be found + will be replaced with the specifier. For example, a + template of "data: %{x}, %{y}" will result in a value + of "data: 1, %{y}" if x is 1 and y is missing. + Variables with an undefined value will be replaced with + the fallback value. The variables available in + `hovertemplate` are the ones emitted as event data + described at this link + https://plotly.com/javascript/plotlyjs-events/#event- + data. Additionally, all attributes that can be + specified per-point (the ones that are `arrayOk: true`) + are available. Anything contained in tag `` is + displayed in the secondary box, for example + `%{fullData.name}`. To hide the + secondary box completely, use an empty tag + ``. + hovertemplatefallback + Fallback string that's displayed when a variable + referenced in a template is missing. If the boolean + value 'false' is passed in, the specifier with the + missing variable will be displayed. + hovertemplatesrc + Sets the source reference on Chart Studio Cloud for + `hovertemplate`. + hovertext + Sets hover text elements associated with each (x,y) + pair. If a single string, the same string appears over + all the data points. If an array of string, the items + are mapped in order to the this trace's (x,y) + coordinates. To be seen, trace `hoverinfo` must contain + a "text" flag. + hovertextsrc + Sets the source reference on Chart Studio Cloud for + `hovertext`. + ids + Assigns id labels to each datum. These ids for object + constancy of data points during animation. Should be an + array of strings, not numbers or any other type. + idssrc + Sets the source reference on Chart Studio Cloud for + `ids`. + legend + Sets the reference to a legend to show this trace in. + References to these legends are "legend", "legend2", + "legend3", etc. Settings for these legends are set in + the layout, under `layout.legend`, `layout.legend2`, + etc. + legendgroup + Sets the legend group for this trace. Traces and shapes + part of the same legend group hide/show at the same + time when toggling legend items. + legendgrouptitle + :class:`plotly.graph_objects.scattergl.Legendgrouptitle + ` instance or dict with compatible properties + legendrank + Sets the legend rank for this trace. Items and groups + with smaller ranks are presented on top/left side while + with "reversed" `legend.traceorder` they are on + bottom/right side. The default legendrank is 1000, so + that you can use ranks less than 1000 to place certain + items before all unranked items, and ranks greater than + 1000 to go after all unranked items. When having + unranked or equal rank items shapes would be displayed + after traces i.e. according to their order in data and + layout. + legendwidth + Sets the width (in px or fraction) of the legend for + this trace. + line + :class:`plotly.graph_objects.scattergl.Line` instance + or dict with compatible properties + marker + :class:`plotly.graph_objects.scattergl.Marker` instance + or dict with compatible properties + meta + Assigns extra meta information associated with this + trace that can be used in various text attributes. + Attributes such as trace `name`, graph, axis and + colorbar `title.text`, annotation `text` + `rangeselector`, `updatemenues` and `sliders` `label` + text all support `meta`. To access the trace `meta` + values in an attribute in the same trace, simply use + `%{meta[i]}` where `i` is the index or key of the + `meta` item in question. To access trace `meta` in + layout attributes, use `%{data[n[.meta[i]}` where `i` + is the index or key of the `meta` and `n` is the trace + index. + metasrc + Sets the source reference on Chart Studio Cloud for + `meta`. + mode + Determines the drawing mode for this scatter trace. + name + Sets the trace name. The trace name appears as the + legend item and on hover. + opacity + Sets the opacity of the trace. + selected + :class:`plotly.graph_objects.scattergl.Selected` + instance or dict with compatible properties + selectedpoints + Array containing integer indices of selected points. + Has an effect only for traces that support selections. + Note that an empty array means an empty selection where + the `unselected` are turned on for all points, whereas, + any other non-array values means no selection all where + the `selected` and `unselected` styles have no effect. + showlegend + Determines whether or not an item corresponding to this + trace is shown in the legend. + stream + :class:`plotly.graph_objects.scattergl.Stream` instance + or dict with compatible properties + text + Sets text elements associated with each (x,y) pair. If + a single string, the same string appears over all the + data points. If an array of string, the items are + mapped in order to the this trace's (x,y) coordinates. + If trace `hoverinfo` contains a "text" flag and + "hovertext" is not set, these elements will be seen in + the hover labels. + textfont + Sets the text font. + textposition + Sets the positions of the `text` elements with respects + to the (x,y) coordinates. + textpositionsrc + Sets the source reference on Chart Studio Cloud for + `textposition`. + textsrc + Sets the source reference on Chart Studio Cloud for + `text`. + texttemplate + Template string used for rendering the information text + that appears on points. Note that this will override + `textinfo`. Variables are inserted using %{variable}, + for example "y: %{y}". Numbers are formatted using + d3-format's syntax %{variable:d3-format}, for example + "Price: %{y:$.2f}". + https://github.com/d3/d3-format/tree/v1.4.5#d3-format + for details on the formatting syntax. Dates are + formatted using d3-time-format's syntax + %{variable|d3-time-format}, for example "Day: + %{2019-01-01|%A}". https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format for details on the + date formatting syntax. Variables that can't be found + will be replaced with the specifier. For example, a + template of "data: %{x}, %{y}" will result in a value + of "data: 1, %{y}" if x is 1 and y is missing. + Variables with an undefined value will be replaced with + the fallback value. All attributes that can be + specified per-point (the ones that are `arrayOk: true`) + are available. + texttemplatefallback + Fallback string that's displayed when a variable + referenced in a template is missing. If the boolean + value 'false' is passed in, the specifier with the + missing variable will be displayed. + texttemplatesrc + Sets the source reference on Chart Studio Cloud for + `texttemplate`. + uid + Assign an id to this trace, Use this to provide object + constancy between traces during animations and + transitions. + uirevision + Controls persistence of some user-driven changes to the + trace: `constraintrange` in `parcoords` traces, as well + as some `editable: true` modifications such as `name` + and `colorbar.title`. Defaults to `layout.uirevision`. + Note that other user-driven trace attribute changes are + controlled by `layout` attributes: `trace.visible` is + controlled by `layout.legend.uirevision`, + `selectedpoints` is controlled by + `layout.selectionrevision`, and `colorbar.(x|y)` + (accessible with `config: {editable: true}`) is + controlled by `layout.editrevision`. Trace changes are + tracked by `uid`, which only falls back on trace index + if no `uid` is provided. So if your app can add/remove + traces before the end of the `data` array, such that + the same trace has a different index, you can still + preserve user-driven changes if you give each trace a + `uid` that stays with it as it moves. + unselected + :class:`plotly.graph_objects.scattergl.Unselected` + instance or dict with compatible properties + visible + Determines whether or not this trace is visible. If + "legendonly", the trace is not drawn, but can appear as + a legend item (provided that the legend itself is + visible). + x + Sets the x coordinates. + x0 + Alternate to `x`. Builds a linear space of x + coordinates. Use with `dx` where `x0` is the starting + coordinate and `dx` the step. + xaxis + Sets a reference between this trace's x coordinates and + a 2D cartesian x axis. If "x" (the default value), the + x coordinates refer to `layout.xaxis`. If "x2", the x + coordinates refer to `layout.xaxis2`, and so on. + xcalendar + Sets the calendar system to use with `x` date data. + xhoverformat + Sets the hover text formatting rulefor `x` using d3 + formatting mini-languages which are very similar to + those in Python. For numbers, see: + https://github.com/d3/d3-format/tree/v1.4.5#d3-format. + And for dates see: https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format. We add two items to + d3's date formatter: "%h" for half of the year as a + decimal number as well as "%{n}f" for fractional + seconds with n digits. For example, *2016-10-13 + 09:15:23.456* with tickformat "%H~%M~%S.%2f" would + display *09~15~23.46*By default the values are + formatted using `xaxis.hoverformat`. + xperiod + Only relevant when the axis `type` is "date". Sets the + period positioning in milliseconds or "M" on the x + axis. Special values in the form of "M" could be + used to declare the number of months. In this case `n` + must be a positive integer. + xperiod0 + Only relevant when the axis `type` is "date". Sets the + base for period positioning in milliseconds or date + string on the x0 axis. When `x0period` is round number + of weeks, the `x0period0` by default would be on a + Sunday i.e. 2000-01-02, otherwise it would be at + 2000-01-01. + xperiodalignment + Only relevant when the axis `type` is "date". Sets the + alignment of data points on the x axis. + xsrc + Sets the source reference on Chart Studio Cloud for + `x`. + y + Sets the y coordinates. + y0 + Alternate to `y`. Builds a linear space of y + coordinates. Use with `dy` where `y0` is the starting + coordinate and `dy` the step. + yaxis + Sets a reference between this trace's y coordinates and + a 2D cartesian y axis. If "y" (the default value), the + y coordinates refer to `layout.yaxis`. If "y2", the y + coordinates refer to `layout.yaxis2`, and so on. + ycalendar + Sets the calendar system to use with `y` date data. + yhoverformat + Sets the hover text formatting rulefor `y` using d3 + formatting mini-languages which are very similar to + those in Python. For numbers, see: + https://github.com/d3/d3-format/tree/v1.4.5#d3-format. + And for dates see: https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format. We add two items to + d3's date formatter: "%h" for half of the year as a + decimal number as well as "%{n}f" for fractional + seconds with n digits. For example, *2016-10-13 + 09:15:23.456* with tickformat "%H~%M~%S.%2f" would + display *09~15~23.46*By default the values are + formatted using `yaxis.hoverformat`. + yperiod + Only relevant when the axis `type` is "date". Sets the + period positioning in milliseconds or "M" on the y + axis. Special values in the form of "M" could be + used to declare the number of months. In this case `n` + must be a positive integer. + yperiod0 + Only relevant when the axis `type` is "date". Sets the + base for period positioning in milliseconds or date + string on the y0 axis. When `y0period` is round number + of weeks, the `y0period0` by default would be on a + Sunday i.e. 2000-01-02, otherwise it would be at + 2000-01-01. + yperiodalignment + Only relevant when the axis `type` is "date". Sets the + alignment of data points on the y axis. + ysrc + Sets the source reference on Chart Studio Cloud for + `y`. + row : 'all', int or None (default) + Subplot row index (starting from 1) for the trace to be + added. Only valid if figure was created using + `plotly.tools.make_subplots`.If 'all', addresses all + rows in the specified column(s). + col : 'all', int or None (default) + Subplot col index (starting from 1) for the trace to be + added. Only valid if figure was created using + `plotly.tools.make_subplots`.If 'all', addresses all + columns in the specified row(s). + secondary_y: boolean or None (default None) + If True, associate this trace with the secondary y-axis of the + subplot at the specified row and col. Only valid if all of the + following conditions are satisfied: + * The figure was created using `plotly.subplots.make_subplots`. + * The row and col arguments are not None + * The subplot at the specified row and col has type xy + (which is the default) and secondary_y True. These + properties are specified in the specs argument to + make_subplots. See the make_subplots docstring for more info. + + Returns + ------- + FigureWidget + """ + from plotly.graph_objs import Scattergl + + new_trace = Scattergl( + connectgaps=connectgaps, + customdata=customdata, + customdatasrc=customdatasrc, + dx=dx, + dy=dy, + error_x=error_x, + error_y=error_y, + fill=fill, + fillcolor=fillcolor, + hoverinfo=hoverinfo, + hoverinfosrc=hoverinfosrc, + hoverlabel=hoverlabel, + hovertemplate=hovertemplate, + hovertemplatefallback=hovertemplatefallback, + hovertemplatesrc=hovertemplatesrc, + hovertext=hovertext, + hovertextsrc=hovertextsrc, + ids=ids, + idssrc=idssrc, + legend=legend, + legendgroup=legendgroup, + legendgrouptitle=legendgrouptitle, + legendrank=legendrank, + legendwidth=legendwidth, + line=line, + marker=marker, + meta=meta, + metasrc=metasrc, + mode=mode, + name=name, + opacity=opacity, + selected=selected, + selectedpoints=selectedpoints, + showlegend=showlegend, + stream=stream, + text=text, + textfont=textfont, + textposition=textposition, + textpositionsrc=textpositionsrc, + textsrc=textsrc, + texttemplate=texttemplate, + texttemplatefallback=texttemplatefallback, + texttemplatesrc=texttemplatesrc, + uid=uid, + uirevision=uirevision, + unselected=unselected, + visible=visible, + x=x, + x0=x0, + xaxis=xaxis, + xcalendar=xcalendar, + xhoverformat=xhoverformat, + xperiod=xperiod, + xperiod0=xperiod0, + xperiodalignment=xperiodalignment, + xsrc=xsrc, + y=y, + y0=y0, + yaxis=yaxis, + ycalendar=ycalendar, + yhoverformat=yhoverformat, + yperiod=yperiod, + yperiod0=yperiod0, + yperiodalignment=yperiodalignment, + ysrc=ysrc, + **kwargs, + ) + return self.add_trace(new_trace, row=row, col=col, secondary_y=secondary_y) + + def add_scattermap( + self, + below=None, + cluster=None, + connectgaps=None, + customdata=None, + customdatasrc=None, + fill=None, + fillcolor=None, + hoverinfo=None, + hoverinfosrc=None, + hoverlabel=None, + hovertemplate=None, + hovertemplatefallback=None, + hovertemplatesrc=None, + hovertext=None, + hovertextsrc=None, + ids=None, + idssrc=None, + lat=None, + latsrc=None, + legend=None, + legendgroup=None, + legendgrouptitle=None, + legendrank=None, + legendwidth=None, + line=None, + lon=None, + lonsrc=None, + marker=None, + meta=None, + metasrc=None, + mode=None, + name=None, + opacity=None, + selected=None, + selectedpoints=None, + showlegend=None, + stream=None, + subplot=None, + text=None, + textfont=None, + textposition=None, + textsrc=None, + texttemplate=None, + texttemplatefallback=None, + texttemplatesrc=None, + uid=None, + uirevision=None, + unselected=None, + visible=None, + row=None, + col=None, + **kwargs, + ) -> "FigureWidget": + """ + Add a new Scattermap trace + + The data visualized as scatter point, lines or marker symbols + on a MapLibre GL geographic map is provided by + longitude/latitude pairs in `lon` and `lat`. + + Parameters + ---------- + below + Determines if this scattermap trace's layers are to be + inserted before the layer with the specified ID. By + default, scattermap layers are inserted above all the + base layers. To place the scattermap layers above every + other layer, set `below` to "''". + cluster + :class:`plotly.graph_objects.scattermap.Cluster` + instance or dict with compatible properties + connectgaps + Determines whether or not gaps (i.e. {nan} or missing + values) in the provided data arrays are connected. + customdata + Assigns extra data each datum. This may be useful when + listening to hover, click and selection events. Note + that, "scatter" traces also appends customdata items in + the markers DOM elements + customdatasrc + Sets the source reference on Chart Studio Cloud for + `customdata`. + fill + Sets the area to fill with a solid color. Use with + `fillcolor` if not "none". "toself" connects the + endpoints of the trace (or each segment of the trace if + it has gaps) into a closed shape. + fillcolor + Sets the fill color. Defaults to a half-transparent + variant of the line color, marker color, or marker line + color, whichever is available. + hoverinfo + Determines which trace information appear on hover. If + `none` or `skip` are set, no information is displayed + upon hovering. But, if `none` is set, click and hover + events are still fired. + hoverinfosrc + Sets the source reference on Chart Studio Cloud for + `hoverinfo`. + hoverlabel + :class:`plotly.graph_objects.scattermap.Hoverlabel` + instance or dict with compatible properties + hovertemplate + Template string used for rendering the information that + appear on hover box. Note that this will override + `hoverinfo`. Variables are inserted using %{variable}, + for example "y: %{y}" as well as %{xother}, {%_xother}, + {%_xother_}, {%xother_}. When showing info for several + points, "xother" will be added to those with different + x positions from the first point. An underscore before + or after "(x|y)other" will add a space on that side, + only when this field is shown. Numbers are formatted + using d3-format's syntax %{variable:d3-format}, for + example "Price: %{y:$.2f}". + https://github.com/d3/d3-format/tree/v1.4.5#d3-format + for details on the formatting syntax. Dates are + formatted using d3-time-format's syntax + %{variable|d3-time-format}, for example "Day: + %{2019-01-01|%A}". https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format for details on the + date formatting syntax. Variables that can't be found + will be replaced with the specifier. For example, a + template of "data: %{x}, %{y}" will result in a value + of "data: 1, %{y}" if x is 1 and y is missing. + Variables with an undefined value will be replaced with + the fallback value. The variables available in + `hovertemplate` are the ones emitted as event data + described at this link + https://plotly.com/javascript/plotlyjs-events/#event- + data. Additionally, all attributes that can be + specified per-point (the ones that are `arrayOk: true`) + are available. Anything contained in tag `` is + displayed in the secondary box, for example + `%{fullData.name}`. To hide the + secondary box completely, use an empty tag + ``. + hovertemplatefallback + Fallback string that's displayed when a variable + referenced in a template is missing. If the boolean + value 'false' is passed in, the specifier with the + missing variable will be displayed. + hovertemplatesrc + Sets the source reference on Chart Studio Cloud for + `hovertemplate`. + hovertext + Sets hover text elements associated with each (lon,lat) + pair If a single string, the same string appears over + all the data points. If an array of string, the items + are mapped in order to the this trace's (lon,lat) + coordinates. To be seen, trace `hoverinfo` must contain + a "text" flag. + hovertextsrc + Sets the source reference on Chart Studio Cloud for + `hovertext`. + ids + Assigns id labels to each datum. These ids for object + constancy of data points during animation. Should be an + array of strings, not numbers or any other type. + idssrc + Sets the source reference on Chart Studio Cloud for + `ids`. + lat + Sets the latitude coordinates (in degrees North). + latsrc + Sets the source reference on Chart Studio Cloud for + `lat`. + legend + Sets the reference to a legend to show this trace in. + References to these legends are "legend", "legend2", + "legend3", etc. Settings for these legends are set in + the layout, under `layout.legend`, `layout.legend2`, + etc. + legendgroup + Sets the legend group for this trace. Traces and shapes + part of the same legend group hide/show at the same + time when toggling legend items. + legendgrouptitle + :class:`plotly.graph_objects.scattermap.Legendgrouptitl + e` instance or dict with compatible properties + legendrank + Sets the legend rank for this trace. Items and groups + with smaller ranks are presented on top/left side while + with "reversed" `legend.traceorder` they are on + bottom/right side. The default legendrank is 1000, so + that you can use ranks less than 1000 to place certain + items before all unranked items, and ranks greater than + 1000 to go after all unranked items. When having + unranked or equal rank items shapes would be displayed + after traces i.e. according to their order in data and + layout. + legendwidth + Sets the width (in px or fraction) of the legend for + this trace. + line + :class:`plotly.graph_objects.scattermap.Line` instance + or dict with compatible properties + lon + Sets the longitude coordinates (in degrees East). + lonsrc + Sets the source reference on Chart Studio Cloud for + `lon`. + marker + :class:`plotly.graph_objects.scattermap.Marker` + instance or dict with compatible properties + meta + Assigns extra meta information associated with this + trace that can be used in various text attributes. + Attributes such as trace `name`, graph, axis and + colorbar `title.text`, annotation `text` + `rangeselector`, `updatemenues` and `sliders` `label` + text all support `meta`. To access the trace `meta` + values in an attribute in the same trace, simply use + `%{meta[i]}` where `i` is the index or key of the + `meta` item in question. To access trace `meta` in + layout attributes, use `%{data[n[.meta[i]}` where `i` + is the index or key of the `meta` and `n` is the trace + index. + metasrc + Sets the source reference on Chart Studio Cloud for + `meta`. + mode + Determines the drawing mode for this scatter trace. If + the provided `mode` includes "text" then the `text` + elements appear at the coordinates. Otherwise, the + `text` elements appear on hover. + name + Sets the trace name. The trace name appears as the + legend item and on hover. + opacity + Sets the opacity of the trace. + selected + :class:`plotly.graph_objects.scattermap.Selected` + instance or dict with compatible properties + selectedpoints + Array containing integer indices of selected points. + Has an effect only for traces that support selections. + Note that an empty array means an empty selection where + the `unselected` are turned on for all points, whereas, + any other non-array values means no selection all where + the `selected` and `unselected` styles have no effect. + showlegend + Determines whether or not an item corresponding to this + trace is shown in the legend. + stream + :class:`plotly.graph_objects.scattermap.Stream` + instance or dict with compatible properties + subplot + Sets a reference between this trace's data coordinates + and a map subplot. If "map" (the default value), the + data refer to `layout.map`. If "map2", the data refer + to `layout.map2`, and so on. + text + Sets text elements associated with each (lon,lat) pair + If a single string, the same string appears over all + the data points. If an array of string, the items are + mapped in order to the this trace's (lon,lat) + coordinates. If trace `hoverinfo` contains a "text" + flag and "hovertext" is not set, these elements will be + seen in the hover labels. + textfont + Sets the icon text font (color=map.layer.paint.text- + color, size=map.layer.layout.text-size). Has an effect + only when `type` is set to "symbol". + textposition + Sets the positions of the `text` elements with respects + to the (x,y) coordinates. + textsrc + Sets the source reference on Chart Studio Cloud for + `text`. + texttemplate + Template string used for rendering the information text + that appears on points. Note that this will override + `textinfo`. Variables are inserted using %{variable}, + for example "y: %{y}". Numbers are formatted using + d3-format's syntax %{variable:d3-format}, for example + "Price: %{y:$.2f}". + https://github.com/d3/d3-format/tree/v1.4.5#d3-format + for details on the formatting syntax. Dates are + formatted using d3-time-format's syntax + %{variable|d3-time-format}, for example "Day: + %{2019-01-01|%A}". https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format for details on the + date formatting syntax. Variables that can't be found + will be replaced with the specifier. For example, a + template of "data: %{x}, %{y}" will result in a value + of "data: 1, %{y}" if x is 1 and y is missing. + Variables with an undefined value will be replaced with + the fallback value. All attributes that can be + specified per-point (the ones that are `arrayOk: true`) + are available. Finally, the template string has access + to variables `lat`, `lon` and `text`. + texttemplatefallback + Fallback string that's displayed when a variable + referenced in a template is missing. If the boolean + value 'false' is passed in, the specifier with the + missing variable will be displayed. + texttemplatesrc + Sets the source reference on Chart Studio Cloud for + `texttemplate`. + uid + Assign an id to this trace, Use this to provide object + constancy between traces during animations and + transitions. + uirevision + Controls persistence of some user-driven changes to the + trace: `constraintrange` in `parcoords` traces, as well + as some `editable: true` modifications such as `name` + and `colorbar.title`. Defaults to `layout.uirevision`. + Note that other user-driven trace attribute changes are + controlled by `layout` attributes: `trace.visible` is + controlled by `layout.legend.uirevision`, + `selectedpoints` is controlled by + `layout.selectionrevision`, and `colorbar.(x|y)` + (accessible with `config: {editable: true}`) is + controlled by `layout.editrevision`. Trace changes are + tracked by `uid`, which only falls back on trace index + if no `uid` is provided. So if your app can add/remove + traces before the end of the `data` array, such that + the same trace has a different index, you can still + preserve user-driven changes if you give each trace a + `uid` that stays with it as it moves. + unselected + :class:`plotly.graph_objects.scattermap.Unselected` + instance or dict with compatible properties + visible + Determines whether or not this trace is visible. If + "legendonly", the trace is not drawn, but can appear as + a legend item (provided that the legend itself is + visible). + row : 'all', int or None (default) + Subplot row index (starting from 1) for the trace to be + added. Only valid if figure was created using + `plotly.tools.make_subplots`.If 'all', addresses all + rows in the specified column(s). + col : 'all', int or None (default) + Subplot col index (starting from 1) for the trace to be + added. Only valid if figure was created using + `plotly.tools.make_subplots`.If 'all', addresses all + columns in the specified row(s). + + Returns + ------- + FigureWidget + """ + from plotly.graph_objs import Scattermap + + new_trace = Scattermap( + below=below, + cluster=cluster, + connectgaps=connectgaps, + customdata=customdata, + customdatasrc=customdatasrc, + fill=fill, + fillcolor=fillcolor, + hoverinfo=hoverinfo, + hoverinfosrc=hoverinfosrc, + hoverlabel=hoverlabel, + hovertemplate=hovertemplate, + hovertemplatefallback=hovertemplatefallback, + hovertemplatesrc=hovertemplatesrc, + hovertext=hovertext, + hovertextsrc=hovertextsrc, + ids=ids, + idssrc=idssrc, + lat=lat, + latsrc=latsrc, + legend=legend, + legendgroup=legendgroup, + legendgrouptitle=legendgrouptitle, + legendrank=legendrank, + legendwidth=legendwidth, + line=line, + lon=lon, + lonsrc=lonsrc, + marker=marker, + meta=meta, + metasrc=metasrc, + mode=mode, + name=name, + opacity=opacity, + selected=selected, + selectedpoints=selectedpoints, + showlegend=showlegend, + stream=stream, + subplot=subplot, + text=text, + textfont=textfont, + textposition=textposition, + textsrc=textsrc, + texttemplate=texttemplate, + texttemplatefallback=texttemplatefallback, + texttemplatesrc=texttemplatesrc, + uid=uid, + uirevision=uirevision, + unselected=unselected, + visible=visible, + **kwargs, + ) + return self.add_trace(new_trace, row=row, col=col) + + def add_scattermapbox( + self, + below=None, + cluster=None, + connectgaps=None, + customdata=None, + customdatasrc=None, + fill=None, + fillcolor=None, + hoverinfo=None, + hoverinfosrc=None, + hoverlabel=None, + hovertemplate=None, + hovertemplatefallback=None, + hovertemplatesrc=None, + hovertext=None, + hovertextsrc=None, + ids=None, + idssrc=None, + lat=None, + latsrc=None, + legend=None, + legendgroup=None, + legendgrouptitle=None, + legendrank=None, + legendwidth=None, + line=None, + lon=None, + lonsrc=None, + marker=None, + meta=None, + metasrc=None, + mode=None, + name=None, + opacity=None, + selected=None, + selectedpoints=None, + showlegend=None, + stream=None, + subplot=None, + text=None, + textfont=None, + textposition=None, + textsrc=None, + texttemplate=None, + texttemplatefallback=None, + texttemplatesrc=None, + uid=None, + uirevision=None, + unselected=None, + visible=None, + row=None, + col=None, + **kwargs, + ) -> "FigureWidget": + """ + Add a new Scattermapbox trace + + "scattermapbox" trace is deprecated! Please consider switching + to the "scattermap" trace type and `map` subplots. Learn more + at: https://plotly.com/python/maplibre-migration/ as well as + https://plotly.com/javascript/maplibre-migration/ The data + visualized as scatter point, lines or marker symbols on a + Mapbox GL geographic map is provided by longitude/latitude + pairs in `lon` and `lat`. + + Parameters + ---------- + below + Determines if this scattermapbox trace's layers are to + be inserted before the layer with the specified ID. By + default, scattermapbox layers are inserted above all + the base layers. To place the scattermapbox layers + above every other layer, set `below` to "''". + cluster + :class:`plotly.graph_objects.scattermapbox.Cluster` + instance or dict with compatible properties + connectgaps + Determines whether or not gaps (i.e. {nan} or missing + values) in the provided data arrays are connected. + customdata + Assigns extra data each datum. This may be useful when + listening to hover, click and selection events. Note + that, "scatter" traces also appends customdata items in + the markers DOM elements + customdatasrc + Sets the source reference on Chart Studio Cloud for + `customdata`. + fill + Sets the area to fill with a solid color. Use with + `fillcolor` if not "none". "toself" connects the + endpoints of the trace (or each segment of the trace if + it has gaps) into a closed shape. + fillcolor + Sets the fill color. Defaults to a half-transparent + variant of the line color, marker color, or marker line + color, whichever is available. + hoverinfo + Determines which trace information appear on hover. If + `none` or `skip` are set, no information is displayed + upon hovering. But, if `none` is set, click and hover + events are still fired. + hoverinfosrc + Sets the source reference on Chart Studio Cloud for + `hoverinfo`. + hoverlabel + :class:`plotly.graph_objects.scattermapbox.Hoverlabel` + instance or dict with compatible properties + hovertemplate + Template string used for rendering the information that + appear on hover box. Note that this will override + `hoverinfo`. Variables are inserted using %{variable}, + for example "y: %{y}" as well as %{xother}, {%_xother}, + {%_xother_}, {%xother_}. When showing info for several + points, "xother" will be added to those with different + x positions from the first point. An underscore before + or after "(x|y)other" will add a space on that side, + only when this field is shown. Numbers are formatted + using d3-format's syntax %{variable:d3-format}, for + example "Price: %{y:$.2f}". + https://github.com/d3/d3-format/tree/v1.4.5#d3-format + for details on the formatting syntax. Dates are + formatted using d3-time-format's syntax + %{variable|d3-time-format}, for example "Day: + %{2019-01-01|%A}". https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format for details on the + date formatting syntax. Variables that can't be found + will be replaced with the specifier. For example, a + template of "data: %{x}, %{y}" will result in a value + of "data: 1, %{y}" if x is 1 and y is missing. + Variables with an undefined value will be replaced with + the fallback value. The variables available in + `hovertemplate` are the ones emitted as event data + described at this link + https://plotly.com/javascript/plotlyjs-events/#event- + data. Additionally, all attributes that can be + specified per-point (the ones that are `arrayOk: true`) + are available. Anything contained in tag `` is + displayed in the secondary box, for example + `%{fullData.name}`. To hide the + secondary box completely, use an empty tag + ``. + hovertemplatefallback + Fallback string that's displayed when a variable + referenced in a template is missing. If the boolean + value 'false' is passed in, the specifier with the + missing variable will be displayed. + hovertemplatesrc + Sets the source reference on Chart Studio Cloud for + `hovertemplate`. + hovertext + Sets hover text elements associated with each (lon,lat) + pair If a single string, the same string appears over + all the data points. If an array of string, the items + are mapped in order to the this trace's (lon,lat) + coordinates. To be seen, trace `hoverinfo` must contain + a "text" flag. + hovertextsrc + Sets the source reference on Chart Studio Cloud for + `hovertext`. + ids + Assigns id labels to each datum. These ids for object + constancy of data points during animation. Should be an + array of strings, not numbers or any other type. + idssrc + Sets the source reference on Chart Studio Cloud for + `ids`. + lat + Sets the latitude coordinates (in degrees North). + latsrc + Sets the source reference on Chart Studio Cloud for + `lat`. + legend + Sets the reference to a legend to show this trace in. + References to these legends are "legend", "legend2", + "legend3", etc. Settings for these legends are set in + the layout, under `layout.legend`, `layout.legend2`, + etc. + legendgroup + Sets the legend group for this trace. Traces and shapes + part of the same legend group hide/show at the same + time when toggling legend items. + legendgrouptitle + :class:`plotly.graph_objects.scattermapbox.Legendgroupt + itle` instance or dict with compatible properties + legendrank + Sets the legend rank for this trace. Items and groups + with smaller ranks are presented on top/left side while + with "reversed" `legend.traceorder` they are on + bottom/right side. The default legendrank is 1000, so + that you can use ranks less than 1000 to place certain + items before all unranked items, and ranks greater than + 1000 to go after all unranked items. When having + unranked or equal rank items shapes would be displayed + after traces i.e. according to their order in data and + layout. + legendwidth + Sets the width (in px or fraction) of the legend for + this trace. + line + :class:`plotly.graph_objects.scattermapbox.Line` + instance or dict with compatible properties + lon + Sets the longitude coordinates (in degrees East). + lonsrc + Sets the source reference on Chart Studio Cloud for + `lon`. + marker + :class:`plotly.graph_objects.scattermapbox.Marker` + instance or dict with compatible properties + meta + Assigns extra meta information associated with this + trace that can be used in various text attributes. + Attributes such as trace `name`, graph, axis and + colorbar `title.text`, annotation `text` + `rangeselector`, `updatemenues` and `sliders` `label` + text all support `meta`. To access the trace `meta` + values in an attribute in the same trace, simply use + `%{meta[i]}` where `i` is the index or key of the + `meta` item in question. To access trace `meta` in + layout attributes, use `%{data[n[.meta[i]}` where `i` + is the index or key of the `meta` and `n` is the trace + index. + metasrc + Sets the source reference on Chart Studio Cloud for + `meta`. + mode + Determines the drawing mode for this scatter trace. If + the provided `mode` includes "text" then the `text` + elements appear at the coordinates. Otherwise, the + `text` elements appear on hover. + name + Sets the trace name. The trace name appears as the + legend item and on hover. + opacity + Sets the opacity of the trace. + selected + :class:`plotly.graph_objects.scattermapbox.Selected` + instance or dict with compatible properties + selectedpoints + Array containing integer indices of selected points. + Has an effect only for traces that support selections. + Note that an empty array means an empty selection where + the `unselected` are turned on for all points, whereas, + any other non-array values means no selection all where + the `selected` and `unselected` styles have no effect. + showlegend + Determines whether or not an item corresponding to this + trace is shown in the legend. + stream + :class:`plotly.graph_objects.scattermapbox.Stream` + instance or dict with compatible properties + subplot + mapbox subplots and traces are deprecated! Please + consider switching to `map` subplots and traces. Learn + more at: https://plotly.com/python/maplibre-migration/ + as well as https://plotly.com/javascript/maplibre- + migration/ Sets a reference between this trace's data + coordinates and a mapbox subplot. If "mapbox" (the + default value), the data refer to `layout.mapbox`. If + "mapbox2", the data refer to `layout.mapbox2`, and so + on. + text + Sets text elements associated with each (lon,lat) pair + If a single string, the same string appears over all + the data points. If an array of string, the items are + mapped in order to the this trace's (lon,lat) + coordinates. If trace `hoverinfo` contains a "text" + flag and "hovertext" is not set, these elements will be + seen in the hover labels. + textfont + Sets the icon text font (color=mapbox.layer.paint.text- + color, size=mapbox.layer.layout.text-size). Has an + effect only when `type` is set to "symbol". + textposition + Sets the positions of the `text` elements with respects + to the (x,y) coordinates. + textsrc + Sets the source reference on Chart Studio Cloud for + `text`. + texttemplate + Template string used for rendering the information text + that appears on points. Note that this will override + `textinfo`. Variables are inserted using %{variable}, + for example "y: %{y}". Numbers are formatted using + d3-format's syntax %{variable:d3-format}, for example + "Price: %{y:$.2f}". + https://github.com/d3/d3-format/tree/v1.4.5#d3-format + for details on the formatting syntax. Dates are + formatted using d3-time-format's syntax + %{variable|d3-time-format}, for example "Day: + %{2019-01-01|%A}". https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format for details on the + date formatting syntax. Variables that can't be found + will be replaced with the specifier. For example, a + template of "data: %{x}, %{y}" will result in a value + of "data: 1, %{y}" if x is 1 and y is missing. + Variables with an undefined value will be replaced with + the fallback value. All attributes that can be + specified per-point (the ones that are `arrayOk: true`) + are available. Finally, the template string has access + to variables `lat`, `lon` and `text`. + texttemplatefallback + Fallback string that's displayed when a variable + referenced in a template is missing. If the boolean + value 'false' is passed in, the specifier with the + missing variable will be displayed. + texttemplatesrc + Sets the source reference on Chart Studio Cloud for + `texttemplate`. + uid + Assign an id to this trace, Use this to provide object + constancy between traces during animations and + transitions. + uirevision + Controls persistence of some user-driven changes to the + trace: `constraintrange` in `parcoords` traces, as well + as some `editable: true` modifications such as `name` + and `colorbar.title`. Defaults to `layout.uirevision`. + Note that other user-driven trace attribute changes are + controlled by `layout` attributes: `trace.visible` is + controlled by `layout.legend.uirevision`, + `selectedpoints` is controlled by + `layout.selectionrevision`, and `colorbar.(x|y)` + (accessible with `config: {editable: true}`) is + controlled by `layout.editrevision`. Trace changes are + tracked by `uid`, which only falls back on trace index + if no `uid` is provided. So if your app can add/remove + traces before the end of the `data` array, such that + the same trace has a different index, you can still + preserve user-driven changes if you give each trace a + `uid` that stays with it as it moves. + unselected + :class:`plotly.graph_objects.scattermapbox.Unselected` + instance or dict with compatible properties + visible + Determines whether or not this trace is visible. If + "legendonly", the trace is not drawn, but can appear as + a legend item (provided that the legend itself is + visible). + row : 'all', int or None (default) + Subplot row index (starting from 1) for the trace to be + added. Only valid if figure was created using + `plotly.tools.make_subplots`.If 'all', addresses all + rows in the specified column(s). + col : 'all', int or None (default) + Subplot col index (starting from 1) for the trace to be + added. Only valid if figure was created using + `plotly.tools.make_subplots`.If 'all', addresses all + columns in the specified row(s). + + Returns + ------- + FigureWidget + """ + from plotly.graph_objs import Scattermapbox + + new_trace = Scattermapbox( + below=below, + cluster=cluster, + connectgaps=connectgaps, + customdata=customdata, + customdatasrc=customdatasrc, + fill=fill, + fillcolor=fillcolor, + hoverinfo=hoverinfo, + hoverinfosrc=hoverinfosrc, + hoverlabel=hoverlabel, + hovertemplate=hovertemplate, + hovertemplatefallback=hovertemplatefallback, + hovertemplatesrc=hovertemplatesrc, + hovertext=hovertext, + hovertextsrc=hovertextsrc, + ids=ids, + idssrc=idssrc, + lat=lat, + latsrc=latsrc, + legend=legend, + legendgroup=legendgroup, + legendgrouptitle=legendgrouptitle, + legendrank=legendrank, + legendwidth=legendwidth, + line=line, + lon=lon, + lonsrc=lonsrc, + marker=marker, + meta=meta, + metasrc=metasrc, + mode=mode, + name=name, + opacity=opacity, + selected=selected, + selectedpoints=selectedpoints, + showlegend=showlegend, + stream=stream, + subplot=subplot, + text=text, + textfont=textfont, + textposition=textposition, + textsrc=textsrc, + texttemplate=texttemplate, + texttemplatefallback=texttemplatefallback, + texttemplatesrc=texttemplatesrc, + uid=uid, + uirevision=uirevision, + unselected=unselected, + visible=visible, + **kwargs, + ) + return self.add_trace(new_trace, row=row, col=col) + + def add_scatterpolar( + self, + cliponaxis=None, + connectgaps=None, + customdata=None, + customdatasrc=None, + dr=None, + dtheta=None, + fill=None, + fillcolor=None, + hoverinfo=None, + hoverinfosrc=None, + hoverlabel=None, + hoveron=None, + hovertemplate=None, + hovertemplatefallback=None, + hovertemplatesrc=None, + hovertext=None, + hovertextsrc=None, + ids=None, + idssrc=None, + legend=None, + legendgroup=None, + legendgrouptitle=None, + legendrank=None, + legendwidth=None, + line=None, + marker=None, + meta=None, + metasrc=None, + mode=None, + name=None, + opacity=None, + r=None, + r0=None, + rsrc=None, + selected=None, + selectedpoints=None, + showlegend=None, + stream=None, + subplot=None, + text=None, + textfont=None, + textposition=None, + textpositionsrc=None, + textsrc=None, + texttemplate=None, + texttemplatefallback=None, + texttemplatesrc=None, + theta=None, + theta0=None, + thetasrc=None, + thetaunit=None, + uid=None, + uirevision=None, + unselected=None, + visible=None, + row=None, + col=None, + **kwargs, + ) -> "FigureWidget": + """ + Add a new Scatterpolar trace + + The scatterpolar trace type encompasses line charts, scatter + charts, text charts, and bubble charts in polar coordinates. + The data visualized as scatter point or lines is set in `r` + (radial) and `theta` (angular) coordinates Text (appearing + either on the chart or on hover only) is via `text`. Bubble + charts are achieved by setting `marker.size` and/or + `marker.color` to numerical arrays. + + Parameters + ---------- + cliponaxis + Determines whether or not markers and text nodes are + clipped about the subplot axes. To show markers and + text nodes above axis lines and tick labels, make sure + to set `xaxis.layer` and `yaxis.layer` to *below + traces*. + connectgaps + Determines whether or not gaps (i.e. {nan} or missing + values) in the provided data arrays are connected. + customdata + Assigns extra data each datum. This may be useful when + listening to hover, click and selection events. Note + that, "scatter" traces also appends customdata items in + the markers DOM elements + customdatasrc + Sets the source reference on Chart Studio Cloud for + `customdata`. + dr + Sets the r coordinate step. + dtheta + Sets the theta coordinate step. By default, the + `dtheta` step equals the subplot's period divided by + the length of the `r` coordinates. + fill + Sets the area to fill with a solid color. Use with + `fillcolor` if not "none". scatterpolar has a subset of + the options available to scatter. "toself" connects the + endpoints of the trace (or each segment of the trace if + it has gaps) into a closed shape. "tonext" fills the + space between two traces if one completely encloses the + other (eg consecutive contour lines), and behaves like + "toself" if there is no trace before it. "tonext" + should not be used if one trace does not enclose the + other. + fillcolor + Sets the fill color. Defaults to a half-transparent + variant of the line color, marker color, or marker line + color, whichever is available. + hoverinfo + Determines which trace information appear on hover. If + `none` or `skip` are set, no information is displayed + upon hovering. But, if `none` is set, click and hover + events are still fired. + hoverinfosrc + Sets the source reference on Chart Studio Cloud for + `hoverinfo`. + hoverlabel + :class:`plotly.graph_objects.scatterpolar.Hoverlabel` + instance or dict with compatible properties + hoveron + Do the hover effects highlight individual points + (markers or line points) or do they highlight filled + regions? If the fill is "toself" or "tonext" and there + are no markers or text, then the default is "fills", + otherwise it is "points". + hovertemplate + Template string used for rendering the information that + appear on hover box. Note that this will override + `hoverinfo`. Variables are inserted using %{variable}, + for example "y: %{y}" as well as %{xother}, {%_xother}, + {%_xother_}, {%xother_}. When showing info for several + points, "xother" will be added to those with different + x positions from the first point. An underscore before + or after "(x|y)other" will add a space on that side, + only when this field is shown. Numbers are formatted + using d3-format's syntax %{variable:d3-format}, for + example "Price: %{y:$.2f}". + https://github.com/d3/d3-format/tree/v1.4.5#d3-format + for details on the formatting syntax. Dates are + formatted using d3-time-format's syntax + %{variable|d3-time-format}, for example "Day: + %{2019-01-01|%A}". https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format for details on the + date formatting syntax. Variables that can't be found + will be replaced with the specifier. For example, a + template of "data: %{x}, %{y}" will result in a value + of "data: 1, %{y}" if x is 1 and y is missing. + Variables with an undefined value will be replaced with + the fallback value. The variables available in + `hovertemplate` are the ones emitted as event data + described at this link + https://plotly.com/javascript/plotlyjs-events/#event- + data. Additionally, all attributes that can be + specified per-point (the ones that are `arrayOk: true`) + are available. Anything contained in tag `` is + displayed in the secondary box, for example + `%{fullData.name}`. To hide the + secondary box completely, use an empty tag + ``. + hovertemplatefallback + Fallback string that's displayed when a variable + referenced in a template is missing. If the boolean + value 'false' is passed in, the specifier with the + missing variable will be displayed. + hovertemplatesrc + Sets the source reference on Chart Studio Cloud for + `hovertemplate`. + hovertext + Sets hover text elements associated with each (x,y) + pair. If a single string, the same string appears over + all the data points. If an array of string, the items + are mapped in order to the this trace's (x,y) + coordinates. To be seen, trace `hoverinfo` must contain + a "text" flag. + hovertextsrc + Sets the source reference on Chart Studio Cloud for + `hovertext`. + ids + Assigns id labels to each datum. These ids for object + constancy of data points during animation. Should be an + array of strings, not numbers or any other type. + idssrc + Sets the source reference on Chart Studio Cloud for + `ids`. + legend + Sets the reference to a legend to show this trace in. + References to these legends are "legend", "legend2", + "legend3", etc. Settings for these legends are set in + the layout, under `layout.legend`, `layout.legend2`, + etc. + legendgroup + Sets the legend group for this trace. Traces and shapes + part of the same legend group hide/show at the same + time when toggling legend items. + legendgrouptitle + :class:`plotly.graph_objects.scatterpolar.Legendgroupti + tle` instance or dict with compatible properties + legendrank + Sets the legend rank for this trace. Items and groups + with smaller ranks are presented on top/left side while + with "reversed" `legend.traceorder` they are on + bottom/right side. The default legendrank is 1000, so + that you can use ranks less than 1000 to place certain + items before all unranked items, and ranks greater than + 1000 to go after all unranked items. When having + unranked or equal rank items shapes would be displayed + after traces i.e. according to their order in data and + layout. + legendwidth + Sets the width (in px or fraction) of the legend for + this trace. + line + :class:`plotly.graph_objects.scatterpolar.Line` + instance or dict with compatible properties + marker + :class:`plotly.graph_objects.scatterpolar.Marker` + instance or dict with compatible properties + meta + Assigns extra meta information associated with this + trace that can be used in various text attributes. + Attributes such as trace `name`, graph, axis and + colorbar `title.text`, annotation `text` + `rangeselector`, `updatemenues` and `sliders` `label` + text all support `meta`. To access the trace `meta` + values in an attribute in the same trace, simply use + `%{meta[i]}` where `i` is the index or key of the + `meta` item in question. To access trace `meta` in + layout attributes, use `%{data[n[.meta[i]}` where `i` + is the index or key of the `meta` and `n` is the trace + index. + metasrc + Sets the source reference on Chart Studio Cloud for + `meta`. + mode + Determines the drawing mode for this scatter trace. If + the provided `mode` includes "text" then the `text` + elements appear at the coordinates. Otherwise, the + `text` elements appear on hover. If there are less than + 20 points and the trace is not stacked then the default + is "lines+markers". Otherwise, "lines". + name + Sets the trace name. The trace name appears as the + legend item and on hover. + opacity + Sets the opacity of the trace. + r + Sets the radial coordinates + r0 + Alternate to `r`. Builds a linear space of r + coordinates. Use with `dr` where `r0` is the starting + coordinate and `dr` the step. + rsrc + Sets the source reference on Chart Studio Cloud for + `r`. + selected + :class:`plotly.graph_objects.scatterpolar.Selected` + instance or dict with compatible properties + selectedpoints + Array containing integer indices of selected points. + Has an effect only for traces that support selections. + Note that an empty array means an empty selection where + the `unselected` are turned on for all points, whereas, + any other non-array values means no selection all where + the `selected` and `unselected` styles have no effect. + showlegend + Determines whether or not an item corresponding to this + trace is shown in the legend. + stream + :class:`plotly.graph_objects.scatterpolar.Stream` + instance or dict with compatible properties + subplot + Sets a reference between this trace's data coordinates + and a polar subplot. If "polar" (the default value), + the data refer to `layout.polar`. If "polar2", the data + refer to `layout.polar2`, and so on. + text + Sets text elements associated with each (x,y) pair. If + a single string, the same string appears over all the + data points. If an array of string, the items are + mapped in order to the this trace's (x,y) coordinates. + If trace `hoverinfo` contains a "text" flag and + "hovertext" is not set, these elements will be seen in + the hover labels. + textfont + Sets the text font. + textposition + Sets the positions of the `text` elements with respects + to the (x,y) coordinates. + textpositionsrc + Sets the source reference on Chart Studio Cloud for + `textposition`. + textsrc + Sets the source reference on Chart Studio Cloud for + `text`. + texttemplate + Template string used for rendering the information text + that appears on points. Note that this will override + `textinfo`. Variables are inserted using %{variable}, + for example "y: %{y}". Numbers are formatted using + d3-format's syntax %{variable:d3-format}, for example + "Price: %{y:$.2f}". + https://github.com/d3/d3-format/tree/v1.4.5#d3-format + for details on the formatting syntax. Dates are + formatted using d3-time-format's syntax + %{variable|d3-time-format}, for example "Day: + %{2019-01-01|%A}". https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format for details on the + date formatting syntax. Variables that can't be found + will be replaced with the specifier. For example, a + template of "data: %{x}, %{y}" will result in a value + of "data: 1, %{y}" if x is 1 and y is missing. + Variables with an undefined value will be replaced with + the fallback value. All attributes that can be + specified per-point (the ones that are `arrayOk: true`) + are available. Finally, the template string has access + to variables `r`, `theta` and `text`. + texttemplatefallback + Fallback string that's displayed when a variable + referenced in a template is missing. If the boolean + value 'false' is passed in, the specifier with the + missing variable will be displayed. + texttemplatesrc + Sets the source reference on Chart Studio Cloud for + `texttemplate`. + theta + Sets the angular coordinates + theta0 + Alternate to `theta`. Builds a linear space of theta + coordinates. Use with `dtheta` where `theta0` is the + starting coordinate and `dtheta` the step. + thetasrc + Sets the source reference on Chart Studio Cloud for + `theta`. + thetaunit + Sets the unit of input "theta" values. Has an effect + only when on "linear" angular axes. + uid + Assign an id to this trace, Use this to provide object + constancy between traces during animations and + transitions. + uirevision + Controls persistence of some user-driven changes to the + trace: `constraintrange` in `parcoords` traces, as well + as some `editable: true` modifications such as `name` + and `colorbar.title`. Defaults to `layout.uirevision`. + Note that other user-driven trace attribute changes are + controlled by `layout` attributes: `trace.visible` is + controlled by `layout.legend.uirevision`, + `selectedpoints` is controlled by + `layout.selectionrevision`, and `colorbar.(x|y)` + (accessible with `config: {editable: true}`) is + controlled by `layout.editrevision`. Trace changes are + tracked by `uid`, which only falls back on trace index + if no `uid` is provided. So if your app can add/remove + traces before the end of the `data` array, such that + the same trace has a different index, you can still + preserve user-driven changes if you give each trace a + `uid` that stays with it as it moves. + unselected + :class:`plotly.graph_objects.scatterpolar.Unselected` + instance or dict with compatible properties + visible + Determines whether or not this trace is visible. If + "legendonly", the trace is not drawn, but can appear as + a legend item (provided that the legend itself is + visible). + row : 'all', int or None (default) + Subplot row index (starting from 1) for the trace to be + added. Only valid if figure was created using + `plotly.tools.make_subplots`.If 'all', addresses all + rows in the specified column(s). + col : 'all', int or None (default) + Subplot col index (starting from 1) for the trace to be + added. Only valid if figure was created using + `plotly.tools.make_subplots`.If 'all', addresses all + columns in the specified row(s). + + Returns + ------- + FigureWidget + """ + from plotly.graph_objs import Scatterpolar + + new_trace = Scatterpolar( + cliponaxis=cliponaxis, + connectgaps=connectgaps, + customdata=customdata, + customdatasrc=customdatasrc, + dr=dr, + dtheta=dtheta, + fill=fill, + fillcolor=fillcolor, + hoverinfo=hoverinfo, + hoverinfosrc=hoverinfosrc, + hoverlabel=hoverlabel, + hoveron=hoveron, + hovertemplate=hovertemplate, + hovertemplatefallback=hovertemplatefallback, + hovertemplatesrc=hovertemplatesrc, + hovertext=hovertext, + hovertextsrc=hovertextsrc, + ids=ids, + idssrc=idssrc, + legend=legend, + legendgroup=legendgroup, + legendgrouptitle=legendgrouptitle, + legendrank=legendrank, + legendwidth=legendwidth, + line=line, + marker=marker, + meta=meta, + metasrc=metasrc, + mode=mode, + name=name, + opacity=opacity, + r=r, + r0=r0, + rsrc=rsrc, + selected=selected, + selectedpoints=selectedpoints, + showlegend=showlegend, + stream=stream, + subplot=subplot, + text=text, + textfont=textfont, + textposition=textposition, + textpositionsrc=textpositionsrc, + textsrc=textsrc, + texttemplate=texttemplate, + texttemplatefallback=texttemplatefallback, + texttemplatesrc=texttemplatesrc, + theta=theta, + theta0=theta0, + thetasrc=thetasrc, + thetaunit=thetaunit, + uid=uid, + uirevision=uirevision, + unselected=unselected, + visible=visible, + **kwargs, + ) + return self.add_trace(new_trace, row=row, col=col) + + def add_scatterpolargl( + self, + connectgaps=None, + customdata=None, + customdatasrc=None, + dr=None, + dtheta=None, + fill=None, + fillcolor=None, + hoverinfo=None, + hoverinfosrc=None, + hoverlabel=None, + hovertemplate=None, + hovertemplatefallback=None, + hovertemplatesrc=None, + hovertext=None, + hovertextsrc=None, + ids=None, + idssrc=None, + legend=None, + legendgroup=None, + legendgrouptitle=None, + legendrank=None, + legendwidth=None, + line=None, + marker=None, + meta=None, + metasrc=None, + mode=None, + name=None, + opacity=None, + r=None, + r0=None, + rsrc=None, + selected=None, + selectedpoints=None, + showlegend=None, + stream=None, + subplot=None, + text=None, + textfont=None, + textposition=None, + textpositionsrc=None, + textsrc=None, + texttemplate=None, + texttemplatefallback=None, + texttemplatesrc=None, + theta=None, + theta0=None, + thetasrc=None, + thetaunit=None, + uid=None, + uirevision=None, + unselected=None, + visible=None, + row=None, + col=None, + **kwargs, + ) -> "FigureWidget": + """ + Add a new Scatterpolargl trace + + The scatterpolargl trace type encompasses line charts, scatter + charts, and bubble charts in polar coordinates using the WebGL + plotting engine. The data visualized as scatter point or lines + is set in `r` (radial) and `theta` (angular) coordinates Bubble + charts are achieved by setting `marker.size` and/or + `marker.color` to numerical arrays. + + Parameters + ---------- + connectgaps + Determines whether or not gaps (i.e. {nan} or missing + values) in the provided data arrays are connected. + customdata + Assigns extra data each datum. This may be useful when + listening to hover, click and selection events. Note + that, "scatter" traces also appends customdata items in + the markers DOM elements + customdatasrc + Sets the source reference on Chart Studio Cloud for + `customdata`. + dr + Sets the r coordinate step. + dtheta + Sets the theta coordinate step. By default, the + `dtheta` step equals the subplot's period divided by + the length of the `r` coordinates. + fill + Sets the area to fill with a solid color. Defaults to + "none" unless this trace is stacked, then it gets + "tonexty" ("tonextx") if `orientation` is "v" ("h") Use + with `fillcolor` if not "none". "tozerox" and "tozeroy" + fill to x=0 and y=0 respectively. "tonextx" and + "tonexty" fill between the endpoints of this trace and + the endpoints of the trace before it, connecting those + endpoints with straight lines (to make a stacked area + graph); if there is no trace before it, they behave + like "tozerox" and "tozeroy". "toself" connects the + endpoints of the trace (or each segment of the trace if + it has gaps) into a closed shape. "tonext" fills the + space between two traces if one completely encloses the + other (eg consecutive contour lines), and behaves like + "toself" if there is no trace before it. "tonext" + should not be used if one trace does not enclose the + other. Traces in a `stackgroup` will only fill to (or + be filled to) other traces in the same group. With + multiple `stackgroup`s or some traces stacked and some + not, if fill-linked traces are not already consecutive, + the later ones will be pushed down in the drawing + order. + fillcolor + Sets the fill color. Defaults to a half-transparent + variant of the line color, marker color, or marker line + color, whichever is available. + hoverinfo + Determines which trace information appear on hover. If + `none` or `skip` are set, no information is displayed + upon hovering. But, if `none` is set, click and hover + events are still fired. + hoverinfosrc + Sets the source reference on Chart Studio Cloud for + `hoverinfo`. + hoverlabel + :class:`plotly.graph_objects.scatterpolargl.Hoverlabel` + instance or dict with compatible properties + hovertemplate + Template string used for rendering the information that + appear on hover box. Note that this will override + `hoverinfo`. Variables are inserted using %{variable}, + for example "y: %{y}" as well as %{xother}, {%_xother}, + {%_xother_}, {%xother_}. When showing info for several + points, "xother" will be added to those with different + x positions from the first point. An underscore before + or after "(x|y)other" will add a space on that side, + only when this field is shown. Numbers are formatted + using d3-format's syntax %{variable:d3-format}, for + example "Price: %{y:$.2f}". + https://github.com/d3/d3-format/tree/v1.4.5#d3-format + for details on the formatting syntax. Dates are + formatted using d3-time-format's syntax + %{variable|d3-time-format}, for example "Day: + %{2019-01-01|%A}". https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format for details on the + date formatting syntax. Variables that can't be found + will be replaced with the specifier. For example, a + template of "data: %{x}, %{y}" will result in a value + of "data: 1, %{y}" if x is 1 and y is missing. + Variables with an undefined value will be replaced with + the fallback value. The variables available in + `hovertemplate` are the ones emitted as event data + described at this link + https://plotly.com/javascript/plotlyjs-events/#event- + data. Additionally, all attributes that can be + specified per-point (the ones that are `arrayOk: true`) + are available. Anything contained in tag `` is + displayed in the secondary box, for example + `%{fullData.name}`. To hide the + secondary box completely, use an empty tag + ``. + hovertemplatefallback + Fallback string that's displayed when a variable + referenced in a template is missing. If the boolean + value 'false' is passed in, the specifier with the + missing variable will be displayed. + hovertemplatesrc + Sets the source reference on Chart Studio Cloud for + `hovertemplate`. + hovertext + Sets hover text elements associated with each (x,y) + pair. If a single string, the same string appears over + all the data points. If an array of string, the items + are mapped in order to the this trace's (x,y) + coordinates. To be seen, trace `hoverinfo` must contain + a "text" flag. + hovertextsrc + Sets the source reference on Chart Studio Cloud for + `hovertext`. + ids + Assigns id labels to each datum. These ids for object + constancy of data points during animation. Should be an + array of strings, not numbers or any other type. + idssrc + Sets the source reference on Chart Studio Cloud for + `ids`. + legend + Sets the reference to a legend to show this trace in. + References to these legends are "legend", "legend2", + "legend3", etc. Settings for these legends are set in + the layout, under `layout.legend`, `layout.legend2`, + etc. + legendgroup + Sets the legend group for this trace. Traces and shapes + part of the same legend group hide/show at the same + time when toggling legend items. + legendgrouptitle + :class:`plotly.graph_objects.scatterpolargl.Legendgroup + title` instance or dict with compatible properties + legendrank + Sets the legend rank for this trace. Items and groups + with smaller ranks are presented on top/left side while + with "reversed" `legend.traceorder` they are on + bottom/right side. The default legendrank is 1000, so + that you can use ranks less than 1000 to place certain + items before all unranked items, and ranks greater than + 1000 to go after all unranked items. When having + unranked or equal rank items shapes would be displayed + after traces i.e. according to their order in data and + layout. + legendwidth + Sets the width (in px or fraction) of the legend for + this trace. + line + :class:`plotly.graph_objects.scatterpolargl.Line` + instance or dict with compatible properties + marker + :class:`plotly.graph_objects.scatterpolargl.Marker` + instance or dict with compatible properties + meta + Assigns extra meta information associated with this + trace that can be used in various text attributes. + Attributes such as trace `name`, graph, axis and + colorbar `title.text`, annotation `text` + `rangeselector`, `updatemenues` and `sliders` `label` + text all support `meta`. To access the trace `meta` + values in an attribute in the same trace, simply use + `%{meta[i]}` where `i` is the index or key of the + `meta` item in question. To access trace `meta` in + layout attributes, use `%{data[n[.meta[i]}` where `i` + is the index or key of the `meta` and `n` is the trace + index. + metasrc + Sets the source reference on Chart Studio Cloud for + `meta`. + mode + Determines the drawing mode for this scatter trace. If + the provided `mode` includes "text" then the `text` + elements appear at the coordinates. Otherwise, the + `text` elements appear on hover. If there are less than + 20 points and the trace is not stacked then the default + is "lines+markers". Otherwise, "lines". + name + Sets the trace name. The trace name appears as the + legend item and on hover. + opacity + Sets the opacity of the trace. + r + Sets the radial coordinates + r0 + Alternate to `r`. Builds a linear space of r + coordinates. Use with `dr` where `r0` is the starting + coordinate and `dr` the step. + rsrc + Sets the source reference on Chart Studio Cloud for + `r`. + selected + :class:`plotly.graph_objects.scatterpolargl.Selected` + instance or dict with compatible properties + selectedpoints + Array containing integer indices of selected points. + Has an effect only for traces that support selections. + Note that an empty array means an empty selection where + the `unselected` are turned on for all points, whereas, + any other non-array values means no selection all where + the `selected` and `unselected` styles have no effect. + showlegend + Determines whether or not an item corresponding to this + trace is shown in the legend. + stream + :class:`plotly.graph_objects.scatterpolargl.Stream` + instance or dict with compatible properties + subplot + Sets a reference between this trace's data coordinates + and a polar subplot. If "polar" (the default value), + the data refer to `layout.polar`. If "polar2", the data + refer to `layout.polar2`, and so on. + text + Sets text elements associated with each (x,y) pair. If + a single string, the same string appears over all the + data points. If an array of string, the items are + mapped in order to the this trace's (x,y) coordinates. + If trace `hoverinfo` contains a "text" flag and + "hovertext" is not set, these elements will be seen in + the hover labels. + textfont + Sets the text font. + textposition + Sets the positions of the `text` elements with respects + to the (x,y) coordinates. + textpositionsrc + Sets the source reference on Chart Studio Cloud for + `textposition`. + textsrc + Sets the source reference on Chart Studio Cloud for + `text`. + texttemplate + Template string used for rendering the information text + that appears on points. Note that this will override + `textinfo`. Variables are inserted using %{variable}, + for example "y: %{y}". Numbers are formatted using + d3-format's syntax %{variable:d3-format}, for example + "Price: %{y:$.2f}". + https://github.com/d3/d3-format/tree/v1.4.5#d3-format + for details on the formatting syntax. Dates are + formatted using d3-time-format's syntax + %{variable|d3-time-format}, for example "Day: + %{2019-01-01|%A}". https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format for details on the + date formatting syntax. Variables that can't be found + will be replaced with the specifier. For example, a + template of "data: %{x}, %{y}" will result in a value + of "data: 1, %{y}" if x is 1 and y is missing. + Variables with an undefined value will be replaced with + the fallback value. All attributes that can be + specified per-point (the ones that are `arrayOk: true`) + are available. Finally, the template string has access + to variables `r`, `theta` and `text`. + texttemplatefallback + Fallback string that's displayed when a variable + referenced in a template is missing. If the boolean + value 'false' is passed in, the specifier with the + missing variable will be displayed. + texttemplatesrc + Sets the source reference on Chart Studio Cloud for + `texttemplate`. + theta + Sets the angular coordinates + theta0 + Alternate to `theta`. Builds a linear space of theta + coordinates. Use with `dtheta` where `theta0` is the + starting coordinate and `dtheta` the step. + thetasrc + Sets the source reference on Chart Studio Cloud for + `theta`. + thetaunit + Sets the unit of input "theta" values. Has an effect + only when on "linear" angular axes. + uid + Assign an id to this trace, Use this to provide object + constancy between traces during animations and + transitions. + uirevision + Controls persistence of some user-driven changes to the + trace: `constraintrange` in `parcoords` traces, as well + as some `editable: true` modifications such as `name` + and `colorbar.title`. Defaults to `layout.uirevision`. + Note that other user-driven trace attribute changes are + controlled by `layout` attributes: `trace.visible` is + controlled by `layout.legend.uirevision`, + `selectedpoints` is controlled by + `layout.selectionrevision`, and `colorbar.(x|y)` + (accessible with `config: {editable: true}`) is + controlled by `layout.editrevision`. Trace changes are + tracked by `uid`, which only falls back on trace index + if no `uid` is provided. So if your app can add/remove + traces before the end of the `data` array, such that + the same trace has a different index, you can still + preserve user-driven changes if you give each trace a + `uid` that stays with it as it moves. + unselected + :class:`plotly.graph_objects.scatterpolargl.Unselected` + instance or dict with compatible properties + visible + Determines whether or not this trace is visible. If + "legendonly", the trace is not drawn, but can appear as + a legend item (provided that the legend itself is + visible). + row : 'all', int or None (default) + Subplot row index (starting from 1) for the trace to be + added. Only valid if figure was created using + `plotly.tools.make_subplots`.If 'all', addresses all + rows in the specified column(s). + col : 'all', int or None (default) + Subplot col index (starting from 1) for the trace to be + added. Only valid if figure was created using + `plotly.tools.make_subplots`.If 'all', addresses all + columns in the specified row(s). + + Returns + ------- + FigureWidget + """ + from plotly.graph_objs import Scatterpolargl + + new_trace = Scatterpolargl( + connectgaps=connectgaps, + customdata=customdata, + customdatasrc=customdatasrc, + dr=dr, + dtheta=dtheta, + fill=fill, + fillcolor=fillcolor, + hoverinfo=hoverinfo, + hoverinfosrc=hoverinfosrc, + hoverlabel=hoverlabel, + hovertemplate=hovertemplate, + hovertemplatefallback=hovertemplatefallback, + hovertemplatesrc=hovertemplatesrc, + hovertext=hovertext, + hovertextsrc=hovertextsrc, + ids=ids, + idssrc=idssrc, + legend=legend, + legendgroup=legendgroup, + legendgrouptitle=legendgrouptitle, + legendrank=legendrank, + legendwidth=legendwidth, + line=line, + marker=marker, + meta=meta, + metasrc=metasrc, + mode=mode, + name=name, + opacity=opacity, + r=r, + r0=r0, + rsrc=rsrc, + selected=selected, + selectedpoints=selectedpoints, + showlegend=showlegend, + stream=stream, + subplot=subplot, + text=text, + textfont=textfont, + textposition=textposition, + textpositionsrc=textpositionsrc, + textsrc=textsrc, + texttemplate=texttemplate, + texttemplatefallback=texttemplatefallback, + texttemplatesrc=texttemplatesrc, + theta=theta, + theta0=theta0, + thetasrc=thetasrc, + thetaunit=thetaunit, + uid=uid, + uirevision=uirevision, + unselected=unselected, + visible=visible, + **kwargs, + ) + return self.add_trace(new_trace, row=row, col=col) + + def add_scattersmith( + self, + cliponaxis=None, + connectgaps=None, + customdata=None, + customdatasrc=None, + fill=None, + fillcolor=None, + hoverinfo=None, + hoverinfosrc=None, + hoverlabel=None, + hoveron=None, + hovertemplate=None, + hovertemplatefallback=None, + hovertemplatesrc=None, + hovertext=None, + hovertextsrc=None, + ids=None, + idssrc=None, + imag=None, + imagsrc=None, + legend=None, + legendgroup=None, + legendgrouptitle=None, + legendrank=None, + legendwidth=None, + line=None, + marker=None, + meta=None, + metasrc=None, + mode=None, + name=None, + opacity=None, + real=None, + realsrc=None, + selected=None, + selectedpoints=None, + showlegend=None, + stream=None, + subplot=None, + text=None, + textfont=None, + textposition=None, + textpositionsrc=None, + textsrc=None, + texttemplate=None, + texttemplatefallback=None, + texttemplatesrc=None, + uid=None, + uirevision=None, + unselected=None, + visible=None, + row=None, + col=None, + **kwargs, + ) -> "FigureWidget": + """ + Add a new Scattersmith trace + + The scattersmith trace type encompasses line charts, scatter + charts, text charts, and bubble charts in smith coordinates. + The data visualized as scatter point or lines is set in `real` + and `imag` (imaginary) coordinates Text (appearing either on + the chart or on hover only) is via `text`. Bubble charts are + achieved by setting `marker.size` and/or `marker.color` to + numerical arrays. + + Parameters + ---------- + cliponaxis + Determines whether or not markers and text nodes are + clipped about the subplot axes. To show markers and + text nodes above axis lines and tick labels, make sure + to set `xaxis.layer` and `yaxis.layer` to *below + traces*. + connectgaps + Determines whether or not gaps (i.e. {nan} or missing + values) in the provided data arrays are connected. + customdata + Assigns extra data each datum. This may be useful when + listening to hover, click and selection events. Note + that, "scatter" traces also appends customdata items in + the markers DOM elements + customdatasrc + Sets the source reference on Chart Studio Cloud for + `customdata`. + fill + Sets the area to fill with a solid color. Use with + `fillcolor` if not "none". scattersmith has a subset of + the options available to scatter. "toself" connects the + endpoints of the trace (or each segment of the trace if + it has gaps) into a closed shape. "tonext" fills the + space between two traces if one completely encloses the + other (eg consecutive contour lines), and behaves like + "toself" if there is no trace before it. "tonext" + should not be used if one trace does not enclose the + other. + fillcolor + Sets the fill color. Defaults to a half-transparent + variant of the line color, marker color, or marker line + color, whichever is available. + hoverinfo + Determines which trace information appear on hover. If + `none` or `skip` are set, no information is displayed + upon hovering. But, if `none` is set, click and hover + events are still fired. + hoverinfosrc + Sets the source reference on Chart Studio Cloud for + `hoverinfo`. + hoverlabel + :class:`plotly.graph_objects.scattersmith.Hoverlabel` + instance or dict with compatible properties + hoveron + Do the hover effects highlight individual points + (markers or line points) or do they highlight filled + regions? If the fill is "toself" or "tonext" and there + are no markers or text, then the default is "fills", + otherwise it is "points". + hovertemplate + Template string used for rendering the information that + appear on hover box. Note that this will override + `hoverinfo`. Variables are inserted using %{variable}, + for example "y: %{y}" as well as %{xother}, {%_xother}, + {%_xother_}, {%xother_}. When showing info for several + points, "xother" will be added to those with different + x positions from the first point. An underscore before + or after "(x|y)other" will add a space on that side, + only when this field is shown. Numbers are formatted + using d3-format's syntax %{variable:d3-format}, for + example "Price: %{y:$.2f}". + https://github.com/d3/d3-format/tree/v1.4.5#d3-format + for details on the formatting syntax. Dates are + formatted using d3-time-format's syntax + %{variable|d3-time-format}, for example "Day: + %{2019-01-01|%A}". https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format for details on the + date formatting syntax. Variables that can't be found + will be replaced with the specifier. For example, a + template of "data: %{x}, %{y}" will result in a value + of "data: 1, %{y}" if x is 1 and y is missing. + Variables with an undefined value will be replaced with + the fallback value. The variables available in + `hovertemplate` are the ones emitted as event data + described at this link + https://plotly.com/javascript/plotlyjs-events/#event- + data. Additionally, all attributes that can be + specified per-point (the ones that are `arrayOk: true`) + are available. Anything contained in tag `` is + displayed in the secondary box, for example + `%{fullData.name}`. To hide the + secondary box completely, use an empty tag + ``. + hovertemplatefallback + Fallback string that's displayed when a variable + referenced in a template is missing. If the boolean + value 'false' is passed in, the specifier with the + missing variable will be displayed. + hovertemplatesrc + Sets the source reference on Chart Studio Cloud for + `hovertemplate`. + hovertext + Sets hover text elements associated with each (x,y) + pair. If a single string, the same string appears over + all the data points. If an array of string, the items + are mapped in order to the this trace's (x,y) + coordinates. To be seen, trace `hoverinfo` must contain + a "text" flag. + hovertextsrc + Sets the source reference on Chart Studio Cloud for + `hovertext`. + ids + Assigns id labels to each datum. These ids for object + constancy of data points during animation. Should be an + array of strings, not numbers or any other type. + idssrc + Sets the source reference on Chart Studio Cloud for + `ids`. + imag + Sets the imaginary component of the data, in units of + normalized impedance such that real=1, imag=0 is the + center of the chart. + imagsrc + Sets the source reference on Chart Studio Cloud for + `imag`. + legend + Sets the reference to a legend to show this trace in. + References to these legends are "legend", "legend2", + "legend3", etc. Settings for these legends are set in + the layout, under `layout.legend`, `layout.legend2`, + etc. + legendgroup + Sets the legend group for this trace. Traces and shapes + part of the same legend group hide/show at the same + time when toggling legend items. + legendgrouptitle + :class:`plotly.graph_objects.scattersmith.Legendgroupti + tle` instance or dict with compatible properties + legendrank + Sets the legend rank for this trace. Items and groups + with smaller ranks are presented on top/left side while + with "reversed" `legend.traceorder` they are on + bottom/right side. The default legendrank is 1000, so + that you can use ranks less than 1000 to place certain + items before all unranked items, and ranks greater than + 1000 to go after all unranked items. When having + unranked or equal rank items shapes would be displayed + after traces i.e. according to their order in data and + layout. + legendwidth + Sets the width (in px or fraction) of the legend for + this trace. + line + :class:`plotly.graph_objects.scattersmith.Line` + instance or dict with compatible properties + marker + :class:`plotly.graph_objects.scattersmith.Marker` + instance or dict with compatible properties + meta + Assigns extra meta information associated with this + trace that can be used in various text attributes. + Attributes such as trace `name`, graph, axis and + colorbar `title.text`, annotation `text` + `rangeselector`, `updatemenues` and `sliders` `label` + text all support `meta`. To access the trace `meta` + values in an attribute in the same trace, simply use + `%{meta[i]}` where `i` is the index or key of the + `meta` item in question. To access trace `meta` in + layout attributes, use `%{data[n[.meta[i]}` where `i` + is the index or key of the `meta` and `n` is the trace + index. + metasrc + Sets the source reference on Chart Studio Cloud for + `meta`. + mode + Determines the drawing mode for this scatter trace. If + the provided `mode` includes "text" then the `text` + elements appear at the coordinates. Otherwise, the + `text` elements appear on hover. If there are less than + 20 points and the trace is not stacked then the default + is "lines+markers". Otherwise, "lines". + name + Sets the trace name. The trace name appears as the + legend item and on hover. + opacity + Sets the opacity of the trace. + real + Sets the real component of the data, in units of + normalized impedance such that real=1, imag=0 is the + center of the chart. + realsrc + Sets the source reference on Chart Studio Cloud for + `real`. + selected + :class:`plotly.graph_objects.scattersmith.Selected` + instance or dict with compatible properties + selectedpoints + Array containing integer indices of selected points. + Has an effect only for traces that support selections. + Note that an empty array means an empty selection where + the `unselected` are turned on for all points, whereas, + any other non-array values means no selection all where + the `selected` and `unselected` styles have no effect. + showlegend + Determines whether or not an item corresponding to this + trace is shown in the legend. + stream + :class:`plotly.graph_objects.scattersmith.Stream` + instance or dict with compatible properties + subplot + Sets a reference between this trace's data coordinates + and a smith subplot. If "smith" (the default value), + the data refer to `layout.smith`. If "smith2", the data + refer to `layout.smith2`, and so on. + text + Sets text elements associated with each (x,y) pair. If + a single string, the same string appears over all the + data points. If an array of string, the items are + mapped in order to the this trace's (x,y) coordinates. + If trace `hoverinfo` contains a "text" flag and + "hovertext" is not set, these elements will be seen in + the hover labels. + textfont + Sets the text font. + textposition + Sets the positions of the `text` elements with respects + to the (x,y) coordinates. + textpositionsrc + Sets the source reference on Chart Studio Cloud for + `textposition`. + textsrc + Sets the source reference on Chart Studio Cloud for + `text`. + texttemplate + Template string used for rendering the information text + that appears on points. Note that this will override + `textinfo`. Variables are inserted using %{variable}, + for example "y: %{y}". Numbers are formatted using + d3-format's syntax %{variable:d3-format}, for example + "Price: %{y:$.2f}". + https://github.com/d3/d3-format/tree/v1.4.5#d3-format + for details on the formatting syntax. Dates are + formatted using d3-time-format's syntax + %{variable|d3-time-format}, for example "Day: + %{2019-01-01|%A}". https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format for details on the + date formatting syntax. Variables that can't be found + will be replaced with the specifier. For example, a + template of "data: %{x}, %{y}" will result in a value + of "data: 1, %{y}" if x is 1 and y is missing. + Variables with an undefined value will be replaced with + the fallback value. All attributes that can be + specified per-point (the ones that are `arrayOk: true`) + are available. Finally, the template string has access + to variables `real`, `imag` and `text`. + texttemplatefallback + Fallback string that's displayed when a variable + referenced in a template is missing. If the boolean + value 'false' is passed in, the specifier with the + missing variable will be displayed. + texttemplatesrc + Sets the source reference on Chart Studio Cloud for + `texttemplate`. + uid + Assign an id to this trace, Use this to provide object + constancy between traces during animations and + transitions. + uirevision + Controls persistence of some user-driven changes to the + trace: `constraintrange` in `parcoords` traces, as well + as some `editable: true` modifications such as `name` + and `colorbar.title`. Defaults to `layout.uirevision`. + Note that other user-driven trace attribute changes are + controlled by `layout` attributes: `trace.visible` is + controlled by `layout.legend.uirevision`, + `selectedpoints` is controlled by + `layout.selectionrevision`, and `colorbar.(x|y)` + (accessible with `config: {editable: true}`) is + controlled by `layout.editrevision`. Trace changes are + tracked by `uid`, which only falls back on trace index + if no `uid` is provided. So if your app can add/remove + traces before the end of the `data` array, such that + the same trace has a different index, you can still + preserve user-driven changes if you give each trace a + `uid` that stays with it as it moves. + unselected + :class:`plotly.graph_objects.scattersmith.Unselected` + instance or dict with compatible properties + visible + Determines whether or not this trace is visible. If + "legendonly", the trace is not drawn, but can appear as + a legend item (provided that the legend itself is + visible). + row : 'all', int or None (default) + Subplot row index (starting from 1) for the trace to be + added. Only valid if figure was created using + `plotly.tools.make_subplots`.If 'all', addresses all + rows in the specified column(s). + col : 'all', int or None (default) + Subplot col index (starting from 1) for the trace to be + added. Only valid if figure was created using + `plotly.tools.make_subplots`.If 'all', addresses all + columns in the specified row(s). + + Returns + ------- + FigureWidget + """ + from plotly.graph_objs import Scattersmith + + new_trace = Scattersmith( + cliponaxis=cliponaxis, + connectgaps=connectgaps, + customdata=customdata, + customdatasrc=customdatasrc, + fill=fill, + fillcolor=fillcolor, + hoverinfo=hoverinfo, + hoverinfosrc=hoverinfosrc, + hoverlabel=hoverlabel, + hoveron=hoveron, + hovertemplate=hovertemplate, + hovertemplatefallback=hovertemplatefallback, + hovertemplatesrc=hovertemplatesrc, + hovertext=hovertext, + hovertextsrc=hovertextsrc, + ids=ids, + idssrc=idssrc, + imag=imag, + imagsrc=imagsrc, + legend=legend, + legendgroup=legendgroup, + legendgrouptitle=legendgrouptitle, + legendrank=legendrank, + legendwidth=legendwidth, + line=line, + marker=marker, + meta=meta, + metasrc=metasrc, + mode=mode, + name=name, + opacity=opacity, + real=real, + realsrc=realsrc, + selected=selected, + selectedpoints=selectedpoints, + showlegend=showlegend, + stream=stream, + subplot=subplot, + text=text, + textfont=textfont, + textposition=textposition, + textpositionsrc=textpositionsrc, + textsrc=textsrc, + texttemplate=texttemplate, + texttemplatefallback=texttemplatefallback, + texttemplatesrc=texttemplatesrc, + uid=uid, + uirevision=uirevision, + unselected=unselected, + visible=visible, + **kwargs, + ) + return self.add_trace(new_trace, row=row, col=col) + + def add_scatterternary( + self, + a=None, + asrc=None, + b=None, + bsrc=None, + c=None, + cliponaxis=None, + connectgaps=None, + csrc=None, + customdata=None, + customdatasrc=None, + fill=None, + fillcolor=None, + hoverinfo=None, + hoverinfosrc=None, + hoverlabel=None, + hoveron=None, + hovertemplate=None, + hovertemplatefallback=None, + hovertemplatesrc=None, + hovertext=None, + hovertextsrc=None, + ids=None, + idssrc=None, + legend=None, + legendgroup=None, + legendgrouptitle=None, + legendrank=None, + legendwidth=None, + line=None, + marker=None, + meta=None, + metasrc=None, + mode=None, + name=None, + opacity=None, + selected=None, + selectedpoints=None, + showlegend=None, + stream=None, + subplot=None, + sum=None, + text=None, + textfont=None, + textposition=None, + textpositionsrc=None, + textsrc=None, + texttemplate=None, + texttemplatefallback=None, + texttemplatesrc=None, + uid=None, + uirevision=None, + unselected=None, + visible=None, + row=None, + col=None, + **kwargs, + ) -> "FigureWidget": + """ + Add a new Scatterternary trace + + Provides similar functionality to the "scatter" type but on a + ternary phase diagram. The data is provided by at least two + arrays out of `a`, `b`, `c` triplets. + + Parameters + ---------- + a + Sets the quantity of component `a` in each data point. + If `a`, `b`, and `c` are all provided, they need not be + normalized, only the relative values matter. If only + two arrays are provided they must be normalized to + match `ternary.sum`. + asrc + Sets the source reference on Chart Studio Cloud for + `a`. + b + Sets the quantity of component `a` in each data point. + If `a`, `b`, and `c` are all provided, they need not be + normalized, only the relative values matter. If only + two arrays are provided they must be normalized to + match `ternary.sum`. + bsrc + Sets the source reference on Chart Studio Cloud for + `b`. + c + Sets the quantity of component `a` in each data point. + If `a`, `b`, and `c` are all provided, they need not be + normalized, only the relative values matter. If only + two arrays are provided they must be normalized to + match `ternary.sum`. + cliponaxis + Determines whether or not markers and text nodes are + clipped about the subplot axes. To show markers and + text nodes above axis lines and tick labels, make sure + to set `xaxis.layer` and `yaxis.layer` to *below + traces*. + connectgaps + Determines whether or not gaps (i.e. {nan} or missing + values) in the provided data arrays are connected. + csrc + Sets the source reference on Chart Studio Cloud for + `c`. + customdata + Assigns extra data each datum. This may be useful when + listening to hover, click and selection events. Note + that, "scatter" traces also appends customdata items in + the markers DOM elements + customdatasrc + Sets the source reference on Chart Studio Cloud for + `customdata`. + fill + Sets the area to fill with a solid color. Use with + `fillcolor` if not "none". scatterternary has a subset + of the options available to scatter. "toself" connects + the endpoints of the trace (or each segment of the + trace if it has gaps) into a closed shape. "tonext" + fills the space between two traces if one completely + encloses the other (eg consecutive contour lines), and + behaves like "toself" if there is no trace before it. + "tonext" should not be used if one trace does not + enclose the other. + fillcolor + Sets the fill color. Defaults to a half-transparent + variant of the line color, marker color, or marker line + color, whichever is available. + hoverinfo + Determines which trace information appear on hover. If + `none` or `skip` are set, no information is displayed + upon hovering. But, if `none` is set, click and hover + events are still fired. + hoverinfosrc + Sets the source reference on Chart Studio Cloud for + `hoverinfo`. + hoverlabel + :class:`plotly.graph_objects.scatterternary.Hoverlabel` + instance or dict with compatible properties + hoveron + Do the hover effects highlight individual points + (markers or line points) or do they highlight filled + regions? If the fill is "toself" or "tonext" and there + are no markers or text, then the default is "fills", + otherwise it is "points". + hovertemplate + Template string used for rendering the information that + appear on hover box. Note that this will override + `hoverinfo`. Variables are inserted using %{variable}, + for example "y: %{y}" as well as %{xother}, {%_xother}, + {%_xother_}, {%xother_}. When showing info for several + points, "xother" will be added to those with different + x positions from the first point. An underscore before + or after "(x|y)other" will add a space on that side, + only when this field is shown. Numbers are formatted + using d3-format's syntax %{variable:d3-format}, for + example "Price: %{y:$.2f}". + https://github.com/d3/d3-format/tree/v1.4.5#d3-format + for details on the formatting syntax. Dates are + formatted using d3-time-format's syntax + %{variable|d3-time-format}, for example "Day: + %{2019-01-01|%A}". https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format for details on the + date formatting syntax. Variables that can't be found + will be replaced with the specifier. For example, a + template of "data: %{x}, %{y}" will result in a value + of "data: 1, %{y}" if x is 1 and y is missing. + Variables with an undefined value will be replaced with + the fallback value. The variables available in + `hovertemplate` are the ones emitted as event data + described at this link + https://plotly.com/javascript/plotlyjs-events/#event- + data. Additionally, all attributes that can be + specified per-point (the ones that are `arrayOk: true`) + are available. Anything contained in tag `` is + displayed in the secondary box, for example + `%{fullData.name}`. To hide the + secondary box completely, use an empty tag + ``. + hovertemplatefallback + Fallback string that's displayed when a variable + referenced in a template is missing. If the boolean + value 'false' is passed in, the specifier with the + missing variable will be displayed. + hovertemplatesrc + Sets the source reference on Chart Studio Cloud for + `hovertemplate`. + hovertext + Sets hover text elements associated with each (a,b,c) + point. If a single string, the same string appears over + all the data points. If an array of strings, the items + are mapped in order to the the data points in (a,b,c). + To be seen, trace `hoverinfo` must contain a "text" + flag. + hovertextsrc + Sets the source reference on Chart Studio Cloud for + `hovertext`. + ids + Assigns id labels to each datum. These ids for object + constancy of data points during animation. Should be an + array of strings, not numbers or any other type. + idssrc + Sets the source reference on Chart Studio Cloud for + `ids`. + legend + Sets the reference to a legend to show this trace in. + References to these legends are "legend", "legend2", + "legend3", etc. Settings for these legends are set in + the layout, under `layout.legend`, `layout.legend2`, + etc. + legendgroup + Sets the legend group for this trace. Traces and shapes + part of the same legend group hide/show at the same + time when toggling legend items. + legendgrouptitle + :class:`plotly.graph_objects.scatterternary.Legendgroup + title` instance or dict with compatible properties + legendrank + Sets the legend rank for this trace. Items and groups + with smaller ranks are presented on top/left side while + with "reversed" `legend.traceorder` they are on + bottom/right side. The default legendrank is 1000, so + that you can use ranks less than 1000 to place certain + items before all unranked items, and ranks greater than + 1000 to go after all unranked items. When having + unranked or equal rank items shapes would be displayed + after traces i.e. according to their order in data and + layout. + legendwidth + Sets the width (in px or fraction) of the legend for + this trace. + line + :class:`plotly.graph_objects.scatterternary.Line` + instance or dict with compatible properties + marker + :class:`plotly.graph_objects.scatterternary.Marker` + instance or dict with compatible properties + meta + Assigns extra meta information associated with this + trace that can be used in various text attributes. + Attributes such as trace `name`, graph, axis and + colorbar `title.text`, annotation `text` + `rangeselector`, `updatemenues` and `sliders` `label` + text all support `meta`. To access the trace `meta` + values in an attribute in the same trace, simply use + `%{meta[i]}` where `i` is the index or key of the + `meta` item in question. To access trace `meta` in + layout attributes, use `%{data[n[.meta[i]}` where `i` + is the index or key of the `meta` and `n` is the trace + index. + metasrc + Sets the source reference on Chart Studio Cloud for + `meta`. + mode + Determines the drawing mode for this scatter trace. If + the provided `mode` includes "text" then the `text` + elements appear at the coordinates. Otherwise, the + `text` elements appear on hover. If there are less than + 20 points and the trace is not stacked then the default + is "lines+markers". Otherwise, "lines". + name + Sets the trace name. The trace name appears as the + legend item and on hover. + opacity + Sets the opacity of the trace. + selected + :class:`plotly.graph_objects.scatterternary.Selected` + instance or dict with compatible properties + selectedpoints + Array containing integer indices of selected points. + Has an effect only for traces that support selections. + Note that an empty array means an empty selection where + the `unselected` are turned on for all points, whereas, + any other non-array values means no selection all where + the `selected` and `unselected` styles have no effect. + showlegend + Determines whether or not an item corresponding to this + trace is shown in the legend. + stream + :class:`plotly.graph_objects.scatterternary.Stream` + instance or dict with compatible properties + subplot + Sets a reference between this trace's data coordinates + and a ternary subplot. If "ternary" (the default + value), the data refer to `layout.ternary`. If + "ternary2", the data refer to `layout.ternary2`, and so + on. + sum + The number each triplet should sum to, if only two of + `a`, `b`, and `c` are provided. This overrides + `ternary.sum` to normalize this specific trace, but + does not affect the values displayed on the axes. 0 (or + missing) means to use ternary.sum + text + Sets text elements associated with each (a,b,c) point. + If a single string, the same string appears over all + the data points. If an array of strings, the items are + mapped in order to the the data points in (a,b,c). If + trace `hoverinfo` contains a "text" flag and + "hovertext" is not set, these elements will be seen in + the hover labels. + textfont + Sets the text font. + textposition + Sets the positions of the `text` elements with respects + to the (x,y) coordinates. + textpositionsrc + Sets the source reference on Chart Studio Cloud for + `textposition`. + textsrc + Sets the source reference on Chart Studio Cloud for + `text`. + texttemplate + Template string used for rendering the information text + that appears on points. Note that this will override + `textinfo`. Variables are inserted using %{variable}, + for example "y: %{y}". Numbers are formatted using + d3-format's syntax %{variable:d3-format}, for example + "Price: %{y:$.2f}". + https://github.com/d3/d3-format/tree/v1.4.5#d3-format + for details on the formatting syntax. Dates are + formatted using d3-time-format's syntax + %{variable|d3-time-format}, for example "Day: + %{2019-01-01|%A}". https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format for details on the + date formatting syntax. Variables that can't be found + will be replaced with the specifier. For example, a + template of "data: %{x}, %{y}" will result in a value + of "data: 1, %{y}" if x is 1 and y is missing. + Variables with an undefined value will be replaced with + the fallback value. All attributes that can be + specified per-point (the ones that are `arrayOk: true`) + are available. Finally, the template string has access + to variables `a`, `b`, `c` and `text`. + texttemplatefallback + Fallback string that's displayed when a variable + referenced in a template is missing. If the boolean + value 'false' is passed in, the specifier with the + missing variable will be displayed. + texttemplatesrc + Sets the source reference on Chart Studio Cloud for + `texttemplate`. + uid + Assign an id to this trace, Use this to provide object + constancy between traces during animations and + transitions. + uirevision + Controls persistence of some user-driven changes to the + trace: `constraintrange` in `parcoords` traces, as well + as some `editable: true` modifications such as `name` + and `colorbar.title`. Defaults to `layout.uirevision`. + Note that other user-driven trace attribute changes are + controlled by `layout` attributes: `trace.visible` is + controlled by `layout.legend.uirevision`, + `selectedpoints` is controlled by + `layout.selectionrevision`, and `colorbar.(x|y)` + (accessible with `config: {editable: true}`) is + controlled by `layout.editrevision`. Trace changes are + tracked by `uid`, which only falls back on trace index + if no `uid` is provided. So if your app can add/remove + traces before the end of the `data` array, such that + the same trace has a different index, you can still + preserve user-driven changes if you give each trace a + `uid` that stays with it as it moves. + unselected + :class:`plotly.graph_objects.scatterternary.Unselected` + instance or dict with compatible properties + visible + Determines whether or not this trace is visible. If + "legendonly", the trace is not drawn, but can appear as + a legend item (provided that the legend itself is + visible). + row : 'all', int or None (default) + Subplot row index (starting from 1) for the trace to be + added. Only valid if figure was created using + `plotly.tools.make_subplots`.If 'all', addresses all + rows in the specified column(s). + col : 'all', int or None (default) + Subplot col index (starting from 1) for the trace to be + added. Only valid if figure was created using + `plotly.tools.make_subplots`.If 'all', addresses all + columns in the specified row(s). + + Returns + ------- + FigureWidget + """ + from plotly.graph_objs import Scatterternary + + new_trace = Scatterternary( + a=a, + asrc=asrc, + b=b, + bsrc=bsrc, + c=c, + cliponaxis=cliponaxis, + connectgaps=connectgaps, + csrc=csrc, + customdata=customdata, + customdatasrc=customdatasrc, + fill=fill, + fillcolor=fillcolor, + hoverinfo=hoverinfo, + hoverinfosrc=hoverinfosrc, + hoverlabel=hoverlabel, + hoveron=hoveron, + hovertemplate=hovertemplate, + hovertemplatefallback=hovertemplatefallback, + hovertemplatesrc=hovertemplatesrc, + hovertext=hovertext, + hovertextsrc=hovertextsrc, + ids=ids, + idssrc=idssrc, + legend=legend, + legendgroup=legendgroup, + legendgrouptitle=legendgrouptitle, + legendrank=legendrank, + legendwidth=legendwidth, + line=line, + marker=marker, + meta=meta, + metasrc=metasrc, + mode=mode, + name=name, + opacity=opacity, + selected=selected, + selectedpoints=selectedpoints, + showlegend=showlegend, + stream=stream, + subplot=subplot, + sum=sum, + text=text, + textfont=textfont, + textposition=textposition, + textpositionsrc=textpositionsrc, + textsrc=textsrc, + texttemplate=texttemplate, + texttemplatefallback=texttemplatefallback, + texttemplatesrc=texttemplatesrc, + uid=uid, + uirevision=uirevision, + unselected=unselected, + visible=visible, + **kwargs, + ) + return self.add_trace(new_trace, row=row, col=col) + + def add_splom( + self, + customdata=None, + customdatasrc=None, + diagonal=None, + dimensions=None, + dimensiondefaults=None, + hoverinfo=None, + hoverinfosrc=None, + hoverlabel=None, + hovertemplate=None, + hovertemplatefallback=None, + hovertemplatesrc=None, + hovertext=None, + hovertextsrc=None, + ids=None, + idssrc=None, + legend=None, + legendgroup=None, + legendgrouptitle=None, + legendrank=None, + legendwidth=None, + marker=None, + meta=None, + metasrc=None, + name=None, + opacity=None, + selected=None, + selectedpoints=None, + showlegend=None, + showlowerhalf=None, + showupperhalf=None, + stream=None, + text=None, + textsrc=None, + uid=None, + uirevision=None, + unselected=None, + visible=None, + xaxes=None, + xhoverformat=None, + yaxes=None, + yhoverformat=None, + row=None, + col=None, + **kwargs, + ) -> "FigureWidget": + """ + Add a new Splom trace + + Splom traces generate scatter plot matrix visualizations. Each + splom `dimensions` items correspond to a generated axis. Values + for each of those dimensions are set in `dimensions[i].values`. + Splom traces support all `scattergl` marker style attributes. + Specify `layout.grid` attributes and/or layout x-axis and + y-axis attributes for more control over the axis positioning + and style. + + Parameters + ---------- + customdata + Assigns extra data each datum. This may be useful when + listening to hover, click and selection events. Note + that, "scatter" traces also appends customdata items in + the markers DOM elements + customdatasrc + Sets the source reference on Chart Studio Cloud for + `customdata`. + diagonal + :class:`plotly.graph_objects.splom.Diagonal` instance + or dict with compatible properties + dimensions + A tuple of + :class:`plotly.graph_objects.splom.Dimension` instances + or dicts with compatible properties + dimensiondefaults + When used in a template (as + layout.template.data.splom.dimensiondefaults), sets the + default property values to use for elements of + splom.dimensions + hoverinfo + Determines which trace information appear on hover. If + `none` or `skip` are set, no information is displayed + upon hovering. But, if `none` is set, click and hover + events are still fired. + hoverinfosrc + Sets the source reference on Chart Studio Cloud for + `hoverinfo`. + hoverlabel + :class:`plotly.graph_objects.splom.Hoverlabel` instance + or dict with compatible properties + hovertemplate + Template string used for rendering the information that + appear on hover box. Note that this will override + `hoverinfo`. Variables are inserted using %{variable}, + for example "y: %{y}" as well as %{xother}, {%_xother}, + {%_xother_}, {%xother_}. When showing info for several + points, "xother" will be added to those with different + x positions from the first point. An underscore before + or after "(x|y)other" will add a space on that side, + only when this field is shown. Numbers are formatted + using d3-format's syntax %{variable:d3-format}, for + example "Price: %{y:$.2f}". + https://github.com/d3/d3-format/tree/v1.4.5#d3-format + for details on the formatting syntax. Dates are + formatted using d3-time-format's syntax + %{variable|d3-time-format}, for example "Day: + %{2019-01-01|%A}". https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format for details on the + date formatting syntax. Variables that can't be found + will be replaced with the specifier. For example, a + template of "data: %{x}, %{y}" will result in a value + of "data: 1, %{y}" if x is 1 and y is missing. + Variables with an undefined value will be replaced with + the fallback value. The variables available in + `hovertemplate` are the ones emitted as event data + described at this link + https://plotly.com/javascript/plotlyjs-events/#event- + data. Additionally, all attributes that can be + specified per-point (the ones that are `arrayOk: true`) + are available. Anything contained in tag `` is + displayed in the secondary box, for example + `%{fullData.name}`. To hide the + secondary box completely, use an empty tag + ``. + hovertemplatefallback + Fallback string that's displayed when a variable + referenced in a template is missing. If the boolean + value 'false' is passed in, the specifier with the + missing variable will be displayed. + hovertemplatesrc + Sets the source reference on Chart Studio Cloud for + `hovertemplate`. + hovertext + Same as `text`. + hovertextsrc + Sets the source reference on Chart Studio Cloud for + `hovertext`. + ids + Assigns id labels to each datum. These ids for object + constancy of data points during animation. Should be an + array of strings, not numbers or any other type. + idssrc + Sets the source reference on Chart Studio Cloud for + `ids`. + legend + Sets the reference to a legend to show this trace in. + References to these legends are "legend", "legend2", + "legend3", etc. Settings for these legends are set in + the layout, under `layout.legend`, `layout.legend2`, + etc. + legendgroup + Sets the legend group for this trace. Traces and shapes + part of the same legend group hide/show at the same + time when toggling legend items. + legendgrouptitle + :class:`plotly.graph_objects.splom.Legendgrouptitle` + instance or dict with compatible properties + legendrank + Sets the legend rank for this trace. Items and groups + with smaller ranks are presented on top/left side while + with "reversed" `legend.traceorder` they are on + bottom/right side. The default legendrank is 1000, so + that you can use ranks less than 1000 to place certain + items before all unranked items, and ranks greater than + 1000 to go after all unranked items. When having + unranked or equal rank items shapes would be displayed + after traces i.e. according to their order in data and + layout. + legendwidth + Sets the width (in px or fraction) of the legend for + this trace. + marker + :class:`plotly.graph_objects.splom.Marker` instance or + dict with compatible properties + meta + Assigns extra meta information associated with this + trace that can be used in various text attributes. + Attributes such as trace `name`, graph, axis and + colorbar `title.text`, annotation `text` + `rangeselector`, `updatemenues` and `sliders` `label` + text all support `meta`. To access the trace `meta` + values in an attribute in the same trace, simply use + `%{meta[i]}` where `i` is the index or key of the + `meta` item in question. To access trace `meta` in + layout attributes, use `%{data[n[.meta[i]}` where `i` + is the index or key of the `meta` and `n` is the trace + index. + metasrc + Sets the source reference on Chart Studio Cloud for + `meta`. + name + Sets the trace name. The trace name appears as the + legend item and on hover. + opacity + Sets the opacity of the trace. + selected + :class:`plotly.graph_objects.splom.Selected` instance + or dict with compatible properties + selectedpoints + Array containing integer indices of selected points. + Has an effect only for traces that support selections. + Note that an empty array means an empty selection where + the `unselected` are turned on for all points, whereas, + any other non-array values means no selection all where + the `selected` and `unselected` styles have no effect. + showlegend + Determines whether or not an item corresponding to this + trace is shown in the legend. + showlowerhalf + Determines whether or not subplots on the lower half + from the diagonal are displayed. + showupperhalf + Determines whether or not subplots on the upper half + from the diagonal are displayed. + stream + :class:`plotly.graph_objects.splom.Stream` instance or + dict with compatible properties + text + Sets text elements associated with each (x,y) pair to + appear on hover. If a single string, the same string + appears over all the data points. If an array of + string, the items are mapped in order to the this + trace's (x,y) coordinates. + textsrc + Sets the source reference on Chart Studio Cloud for + `text`. + uid + Assign an id to this trace, Use this to provide object + constancy between traces during animations and + transitions. + uirevision + Controls persistence of some user-driven changes to the + trace: `constraintrange` in `parcoords` traces, as well + as some `editable: true` modifications such as `name` + and `colorbar.title`. Defaults to `layout.uirevision`. + Note that other user-driven trace attribute changes are + controlled by `layout` attributes: `trace.visible` is + controlled by `layout.legend.uirevision`, + `selectedpoints` is controlled by + `layout.selectionrevision`, and `colorbar.(x|y)` + (accessible with `config: {editable: true}`) is + controlled by `layout.editrevision`. Trace changes are + tracked by `uid`, which only falls back on trace index + if no `uid` is provided. So if your app can add/remove + traces before the end of the `data` array, such that + the same trace has a different index, you can still + preserve user-driven changes if you give each trace a + `uid` that stays with it as it moves. + unselected + :class:`plotly.graph_objects.splom.Unselected` instance + or dict with compatible properties + visible + Determines whether or not this trace is visible. If + "legendonly", the trace is not drawn, but can appear as + a legend item (provided that the legend itself is + visible). + xaxes + Sets the list of x axes corresponding to dimensions of + this splom trace. By default, a splom will match the + first N xaxes where N is the number of input + dimensions. Note that, in case where `diagonal.visible` + is false and `showupperhalf` or `showlowerhalf` is + false, this splom trace will generate one less x-axis + and one less y-axis. + xhoverformat + Sets the hover text formatting rulefor `x` using d3 + formatting mini-languages which are very similar to + those in Python. For numbers, see: + https://github.com/d3/d3-format/tree/v1.4.5#d3-format. + And for dates see: https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format. We add two items to + d3's date formatter: "%h" for half of the year as a + decimal number as well as "%{n}f" for fractional + seconds with n digits. For example, *2016-10-13 + 09:15:23.456* with tickformat "%H~%M~%S.%2f" would + display *09~15~23.46*By default the values are + formatted using `xaxis.hoverformat`. + yaxes + Sets the list of y axes corresponding to dimensions of + this splom trace. By default, a splom will match the + first N yaxes where N is the number of input + dimensions. Note that, in case where `diagonal.visible` + is false and `showupperhalf` or `showlowerhalf` is + false, this splom trace will generate one less x-axis + and one less y-axis. + yhoverformat + Sets the hover text formatting rulefor `y` using d3 + formatting mini-languages which are very similar to + those in Python. For numbers, see: + https://github.com/d3/d3-format/tree/v1.4.5#d3-format. + And for dates see: https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format. We add two items to + d3's date formatter: "%h" for half of the year as a + decimal number as well as "%{n}f" for fractional + seconds with n digits. For example, *2016-10-13 + 09:15:23.456* with tickformat "%H~%M~%S.%2f" would + display *09~15~23.46*By default the values are + formatted using `yaxis.hoverformat`. + row : 'all', int or None (default) + Subplot row index (starting from 1) for the trace to be + added. Only valid if figure was created using + `plotly.tools.make_subplots`.If 'all', addresses all + rows in the specified column(s). + col : 'all', int or None (default) + Subplot col index (starting from 1) for the trace to be + added. Only valid if figure was created using + `plotly.tools.make_subplots`.If 'all', addresses all + columns in the specified row(s). + + Returns + ------- + FigureWidget + """ + from plotly.graph_objs import Splom + + new_trace = Splom( + customdata=customdata, + customdatasrc=customdatasrc, + diagonal=diagonal, + dimensions=dimensions, + dimensiondefaults=dimensiondefaults, + hoverinfo=hoverinfo, + hoverinfosrc=hoverinfosrc, + hoverlabel=hoverlabel, + hovertemplate=hovertemplate, + hovertemplatefallback=hovertemplatefallback, + hovertemplatesrc=hovertemplatesrc, + hovertext=hovertext, + hovertextsrc=hovertextsrc, + ids=ids, + idssrc=idssrc, + legend=legend, + legendgroup=legendgroup, + legendgrouptitle=legendgrouptitle, + legendrank=legendrank, + legendwidth=legendwidth, + marker=marker, + meta=meta, + metasrc=metasrc, + name=name, + opacity=opacity, + selected=selected, + selectedpoints=selectedpoints, + showlegend=showlegend, + showlowerhalf=showlowerhalf, + showupperhalf=showupperhalf, + stream=stream, + text=text, + textsrc=textsrc, + uid=uid, + uirevision=uirevision, + unselected=unselected, + visible=visible, + xaxes=xaxes, + xhoverformat=xhoverformat, + yaxes=yaxes, + yhoverformat=yhoverformat, + **kwargs, + ) + return self.add_trace(new_trace, row=row, col=col) + + def add_streamtube( + self, + autocolorscale=None, + cauto=None, + cmax=None, + cmid=None, + cmin=None, + coloraxis=None, + colorbar=None, + colorscale=None, + customdata=None, + customdatasrc=None, + hoverinfo=None, + hoverinfosrc=None, + hoverlabel=None, + hovertemplate=None, + hovertemplatefallback=None, + hovertemplatesrc=None, + hovertext=None, + ids=None, + idssrc=None, + legend=None, + legendgroup=None, + legendgrouptitle=None, + legendrank=None, + legendwidth=None, + lighting=None, + lightposition=None, + maxdisplayed=None, + meta=None, + metasrc=None, + name=None, + opacity=None, + reversescale=None, + scene=None, + showlegend=None, + showscale=None, + sizeref=None, + starts=None, + stream=None, + text=None, + u=None, + uhoverformat=None, + uid=None, + uirevision=None, + usrc=None, + v=None, + vhoverformat=None, + visible=None, + vsrc=None, + w=None, + whoverformat=None, + wsrc=None, + x=None, + xhoverformat=None, + xsrc=None, + y=None, + yhoverformat=None, + ysrc=None, + z=None, + zhoverformat=None, + zsrc=None, + row=None, + col=None, + **kwargs, + ) -> "FigureWidget": + """ + Add a new Streamtube trace + + Use a streamtube trace to visualize flow in a vector field. + Specify a vector field using 6 1D arrays of equal length, 3 + position arrays `x`, `y` and `z` and 3 vector component arrays + `u`, `v`, and `w`. By default, the tubes' starting positions + will be cut from the vector field's x-z plane at its minimum y + value. To specify your own starting position, use attributes + `starts.x`, `starts.y` and `starts.z`. The color is encoded by + the norm of (u, v, w), and the local radius by the divergence + of (u, v, w). + + Parameters + ---------- + autocolorscale + Determines whether the colorscale is a default palette + (`autocolorscale: true`) or the palette determined by + `colorscale`. In case `colorscale` is unspecified or + `autocolorscale` is true, the default palette will be + chosen according to whether numbers in the `color` + array are all positive, all negative or mixed. + cauto + Determines whether or not the color domain is computed + with respect to the input data (here u/v/w norm) or the + bounds set in `cmin` and `cmax` Defaults to `false` + when `cmin` and `cmax` are set by the user. + cmax + Sets the upper bound of the color domain. Value should + have the same units as u/v/w norm and if set, `cmin` + must be set as well. + cmid + Sets the mid-point of the color domain by scaling + `cmin` and/or `cmax` to be equidistant to this point. + Value should have the same units as u/v/w norm. Has no + effect when `cauto` is `false`. + cmin + Sets the lower bound of the color domain. Value should + have the same units as u/v/w norm and if set, `cmax` + must be set as well. + coloraxis + Sets a reference to a shared color axis. References to + these shared color axes are "coloraxis", "coloraxis2", + "coloraxis3", etc. Settings for these shared color axes + are set in the layout, under `layout.coloraxis`, + `layout.coloraxis2`, etc. Note that multiple color + scales can be linked to the same color axis. + colorbar + :class:`plotly.graph_objects.streamtube.ColorBar` + instance or dict with compatible properties + colorscale + Sets the colorscale. The colorscale must be an array + containing arrays mapping a normalized value to an rgb, + rgba, hex, hsl, hsv, or named color string. At minimum, + a mapping for the lowest (0) and highest (1) values are + required. For example, `[[0, 'rgb(0,0,255)'], [1, + 'rgb(255,0,0)']]`. To control the bounds of the + colorscale in color space, use `cmin` and `cmax`. + Alternatively, `colorscale` may be a palette name + string of the following list: Blackbody,Bluered,Blues,C + ividis,Earth,Electric,Greens,Greys,Hot,Jet,Picnic,Portl + and,Rainbow,RdBu,Reds,Viridis,YlGnBu,YlOrRd. + customdata + Assigns extra data each datum. This may be useful when + listening to hover, click and selection events. Note + that, "scatter" traces also appends customdata items in + the markers DOM elements + customdatasrc + Sets the source reference on Chart Studio Cloud for + `customdata`. + hoverinfo + Determines which trace information appear on hover. If + `none` or `skip` are set, no information is displayed + upon hovering. But, if `none` is set, click and hover + events are still fired. + hoverinfosrc + Sets the source reference on Chart Studio Cloud for + `hoverinfo`. + hoverlabel + :class:`plotly.graph_objects.streamtube.Hoverlabel` + instance or dict with compatible properties + hovertemplate + Template string used for rendering the information that + appear on hover box. Note that this will override + `hoverinfo`. Variables are inserted using %{variable}, + for example "y: %{y}" as well as %{xother}, {%_xother}, + {%_xother_}, {%xother_}. When showing info for several + points, "xother" will be added to those with different + x positions from the first point. An underscore before + or after "(x|y)other" will add a space on that side, + only when this field is shown. Numbers are formatted + using d3-format's syntax %{variable:d3-format}, for + example "Price: %{y:$.2f}". + https://github.com/d3/d3-format/tree/v1.4.5#d3-format + for details on the formatting syntax. Dates are + formatted using d3-time-format's syntax + %{variable|d3-time-format}, for example "Day: + %{2019-01-01|%A}". https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format for details on the + date formatting syntax. Variables that can't be found + will be replaced with the specifier. For example, a + template of "data: %{x}, %{y}" will result in a value + of "data: 1, %{y}" if x is 1 and y is missing. + Variables with an undefined value will be replaced with + the fallback value. The variables available in + `hovertemplate` are the ones emitted as event data + described at this link + https://plotly.com/javascript/plotlyjs-events/#event- + data. Additionally, all attributes that can be + specified per-point (the ones that are `arrayOk: true`) + are available. Finally, the template string has access + to variables `tubex`, `tubey`, `tubez`, `tubeu`, + `tubev`, `tubew`, `norm` and `divergence`. Anything + contained in tag `` is displayed in the + secondary box, for example + `%{fullData.name}`. To hide the + secondary box completely, use an empty tag + ``. + hovertemplatefallback + Fallback string that's displayed when a variable + referenced in a template is missing. If the boolean + value 'false' is passed in, the specifier with the + missing variable will be displayed. + hovertemplatesrc + Sets the source reference on Chart Studio Cloud for + `hovertemplate`. + hovertext + Same as `text`. + ids + Assigns id labels to each datum. These ids for object + constancy of data points during animation. Should be an + array of strings, not numbers or any other type. + idssrc + Sets the source reference on Chart Studio Cloud for + `ids`. + legend + Sets the reference to a legend to show this trace in. + References to these legends are "legend", "legend2", + "legend3", etc. Settings for these legends are set in + the layout, under `layout.legend`, `layout.legend2`, + etc. + legendgroup + Sets the legend group for this trace. Traces and shapes + part of the same legend group hide/show at the same + time when toggling legend items. + legendgrouptitle + :class:`plotly.graph_objects.streamtube.Legendgrouptitl + e` instance or dict with compatible properties + legendrank + Sets the legend rank for this trace. Items and groups + with smaller ranks are presented on top/left side while + with "reversed" `legend.traceorder` they are on + bottom/right side. The default legendrank is 1000, so + that you can use ranks less than 1000 to place certain + items before all unranked items, and ranks greater than + 1000 to go after all unranked items. When having + unranked or equal rank items shapes would be displayed + after traces i.e. according to their order in data and + layout. + legendwidth + Sets the width (in px or fraction) of the legend for + this trace. + lighting + :class:`plotly.graph_objects.streamtube.Lighting` + instance or dict with compatible properties + lightposition + :class:`plotly.graph_objects.streamtube.Lightposition` + instance or dict with compatible properties + maxdisplayed + The maximum number of displayed segments in a + streamtube. + meta + Assigns extra meta information associated with this + trace that can be used in various text attributes. + Attributes such as trace `name`, graph, axis and + colorbar `title.text`, annotation `text` + `rangeselector`, `updatemenues` and `sliders` `label` + text all support `meta`. To access the trace `meta` + values in an attribute in the same trace, simply use + `%{meta[i]}` where `i` is the index or key of the + `meta` item in question. To access trace `meta` in + layout attributes, use `%{data[n[.meta[i]}` where `i` + is the index or key of the `meta` and `n` is the trace + index. + metasrc + Sets the source reference on Chart Studio Cloud for + `meta`. + name + Sets the trace name. The trace name appears as the + legend item and on hover. + opacity + Sets the opacity of the surface. Please note that in + the case of using high `opacity` values for example a + value greater than or equal to 0.5 on two surfaces (and + 0.25 with four surfaces), an overlay of multiple + transparent surfaces may not perfectly be sorted in + depth by the webgl API. This behavior may be improved + in the near future and is subject to change. + reversescale + Reverses the color mapping if true. If true, `cmin` + will correspond to the last color in the array and + `cmax` will correspond to the first color. + scene + Sets a reference between this trace's 3D coordinate + system and a 3D scene. If "scene" (the default value), + the (x,y,z) coordinates refer to `layout.scene`. If + "scene2", the (x,y,z) coordinates refer to + `layout.scene2`, and so on. + showlegend + Determines whether or not an item corresponding to this + trace is shown in the legend. + showscale + Determines whether or not a colorbar is displayed for + this trace. + sizeref + The scaling factor for the streamtubes. The default is + 1, which avoids two max divergence tubes from touching + at adjacent starting positions. + starts + :class:`plotly.graph_objects.streamtube.Starts` + instance or dict with compatible properties + stream + :class:`plotly.graph_objects.streamtube.Stream` + instance or dict with compatible properties + text + Sets a text element associated with this trace. If + trace `hoverinfo` contains a "text" flag, this text + element will be seen in all hover labels. Note that + streamtube traces do not support array `text` values. + u + Sets the x components of the vector field. + uhoverformat + Sets the hover text formatting rulefor `u` using d3 + formatting mini-languages which are very similar to + those in Python. For numbers, see: https://github.com/d + 3/d3-format/tree/v1.4.5#d3-format.By default the values + are formatted using generic number format. + uid + Assign an id to this trace, Use this to provide object + constancy between traces during animations and + transitions. + uirevision + Controls persistence of some user-driven changes to the + trace: `constraintrange` in `parcoords` traces, as well + as some `editable: true` modifications such as `name` + and `colorbar.title`. Defaults to `layout.uirevision`. + Note that other user-driven trace attribute changes are + controlled by `layout` attributes: `trace.visible` is + controlled by `layout.legend.uirevision`, + `selectedpoints` is controlled by + `layout.selectionrevision`, and `colorbar.(x|y)` + (accessible with `config: {editable: true}`) is + controlled by `layout.editrevision`. Trace changes are + tracked by `uid`, which only falls back on trace index + if no `uid` is provided. So if your app can add/remove + traces before the end of the `data` array, such that + the same trace has a different index, you can still + preserve user-driven changes if you give each trace a + `uid` that stays with it as it moves. + usrc + Sets the source reference on Chart Studio Cloud for + `u`. + v + Sets the y components of the vector field. + vhoverformat + Sets the hover text formatting rulefor `v` using d3 + formatting mini-languages which are very similar to + those in Python. For numbers, see: https://github.com/d + 3/d3-format/tree/v1.4.5#d3-format.By default the values + are formatted using generic number format. + visible + Determines whether or not this trace is visible. If + "legendonly", the trace is not drawn, but can appear as + a legend item (provided that the legend itself is + visible). + vsrc + Sets the source reference on Chart Studio Cloud for + `v`. + w + Sets the z components of the vector field. + whoverformat + Sets the hover text formatting rulefor `w` using d3 + formatting mini-languages which are very similar to + those in Python. For numbers, see: https://github.com/d + 3/d3-format/tree/v1.4.5#d3-format.By default the values + are formatted using generic number format. + wsrc + Sets the source reference on Chart Studio Cloud for + `w`. + x + Sets the x coordinates of the vector field. + xhoverformat + Sets the hover text formatting rulefor `x` using d3 + formatting mini-languages which are very similar to + those in Python. For numbers, see: + https://github.com/d3/d3-format/tree/v1.4.5#d3-format. + And for dates see: https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format. We add two items to + d3's date formatter: "%h" for half of the year as a + decimal number as well as "%{n}f" for fractional + seconds with n digits. For example, *2016-10-13 + 09:15:23.456* with tickformat "%H~%M~%S.%2f" would + display *09~15~23.46*By default the values are + formatted using `xaxis.hoverformat`. + xsrc + Sets the source reference on Chart Studio Cloud for + `x`. + y + Sets the y coordinates of the vector field. + yhoverformat + Sets the hover text formatting rulefor `y` using d3 + formatting mini-languages which are very similar to + those in Python. For numbers, see: + https://github.com/d3/d3-format/tree/v1.4.5#d3-format. + And for dates see: https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format. We add two items to + d3's date formatter: "%h" for half of the year as a + decimal number as well as "%{n}f" for fractional + seconds with n digits. For example, *2016-10-13 + 09:15:23.456* with tickformat "%H~%M~%S.%2f" would + display *09~15~23.46*By default the values are + formatted using `yaxis.hoverformat`. + ysrc + Sets the source reference on Chart Studio Cloud for + `y`. + z + Sets the z coordinates of the vector field. + zhoverformat + Sets the hover text formatting rulefor `z` using d3 + formatting mini-languages which are very similar to + those in Python. For numbers, see: + https://github.com/d3/d3-format/tree/v1.4.5#d3-format. + And for dates see: https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format. We add two items to + d3's date formatter: "%h" for half of the year as a + decimal number as well as "%{n}f" for fractional + seconds with n digits. For example, *2016-10-13 + 09:15:23.456* with tickformat "%H~%M~%S.%2f" would + display *09~15~23.46*By default the values are + formatted using `zaxis.hoverformat`. + zsrc + Sets the source reference on Chart Studio Cloud for + `z`. + row : 'all', int or None (default) + Subplot row index (starting from 1) for the trace to be + added. Only valid if figure was created using + `plotly.tools.make_subplots`.If 'all', addresses all + rows in the specified column(s). + col : 'all', int or None (default) + Subplot col index (starting from 1) for the trace to be + added. Only valid if figure was created using + `plotly.tools.make_subplots`.If 'all', addresses all + columns in the specified row(s). + + Returns + ------- + FigureWidget + """ + from plotly.graph_objs import Streamtube + + new_trace = Streamtube( + autocolorscale=autocolorscale, + cauto=cauto, + cmax=cmax, + cmid=cmid, + cmin=cmin, + coloraxis=coloraxis, + colorbar=colorbar, + colorscale=colorscale, + customdata=customdata, + customdatasrc=customdatasrc, + hoverinfo=hoverinfo, + hoverinfosrc=hoverinfosrc, + hoverlabel=hoverlabel, + hovertemplate=hovertemplate, + hovertemplatefallback=hovertemplatefallback, + hovertemplatesrc=hovertemplatesrc, + hovertext=hovertext, + ids=ids, + idssrc=idssrc, + legend=legend, + legendgroup=legendgroup, + legendgrouptitle=legendgrouptitle, + legendrank=legendrank, + legendwidth=legendwidth, + lighting=lighting, + lightposition=lightposition, + maxdisplayed=maxdisplayed, + meta=meta, + metasrc=metasrc, + name=name, + opacity=opacity, + reversescale=reversescale, + scene=scene, + showlegend=showlegend, + showscale=showscale, + sizeref=sizeref, + starts=starts, + stream=stream, + text=text, + u=u, + uhoverformat=uhoverformat, + uid=uid, + uirevision=uirevision, + usrc=usrc, + v=v, + vhoverformat=vhoverformat, + visible=visible, + vsrc=vsrc, + w=w, + whoverformat=whoverformat, + wsrc=wsrc, + x=x, + xhoverformat=xhoverformat, + xsrc=xsrc, + y=y, + yhoverformat=yhoverformat, + ysrc=ysrc, + z=z, + zhoverformat=zhoverformat, + zsrc=zsrc, + **kwargs, + ) + return self.add_trace(new_trace, row=row, col=col) + + def add_sunburst( + self, + branchvalues=None, + count=None, + customdata=None, + customdatasrc=None, + domain=None, + hoverinfo=None, + hoverinfosrc=None, + hoverlabel=None, + hovertemplate=None, + hovertemplatefallback=None, + hovertemplatesrc=None, + hovertext=None, + hovertextsrc=None, + ids=None, + idssrc=None, + insidetextfont=None, + insidetextorientation=None, + labels=None, + labelssrc=None, + leaf=None, + legend=None, + legendgrouptitle=None, + legendrank=None, + legendwidth=None, + level=None, + marker=None, + maxdepth=None, + meta=None, + metasrc=None, + name=None, + opacity=None, + outsidetextfont=None, + parents=None, + parentssrc=None, + root=None, + rotation=None, + sort=None, + stream=None, + text=None, + textfont=None, + textinfo=None, + textsrc=None, + texttemplate=None, + texttemplatefallback=None, + texttemplatesrc=None, + uid=None, + uirevision=None, + values=None, + valuessrc=None, + visible=None, + row=None, + col=None, + **kwargs, + ) -> "FigureWidget": + """ + Add a new Sunburst trace + + Visualize hierarchal data spanning outward radially from root + to leaves. The sunburst sectors are determined by the entries + in "labels" or "ids" and in "parents". + + Parameters + ---------- + branchvalues + Determines how the items in `values` are summed. When + set to "total", items in `values` are taken to be value + of all its descendants. When set to "remainder", items + in `values` corresponding to the root and the branches + sectors are taken to be the extra part not part of the + sum of the values at their leaves. + count + Determines default for `values` when it is not + provided, by inferring a 1 for each of the "leaves" + and/or "branches", otherwise 0. + customdata + Assigns extra data each datum. This may be useful when + listening to hover, click and selection events. Note + that, "scatter" traces also appends customdata items in + the markers DOM elements + customdatasrc + Sets the source reference on Chart Studio Cloud for + `customdata`. + domain + :class:`plotly.graph_objects.sunburst.Domain` instance + or dict with compatible properties + hoverinfo + Determines which trace information appear on hover. If + `none` or `skip` are set, no information is displayed + upon hovering. But, if `none` is set, click and hover + events are still fired. + hoverinfosrc + Sets the source reference on Chart Studio Cloud for + `hoverinfo`. + hoverlabel + :class:`plotly.graph_objects.sunburst.Hoverlabel` + instance or dict with compatible properties + hovertemplate + Template string used for rendering the information that + appear on hover box. Note that this will override + `hoverinfo`. Variables are inserted using %{variable}, + for example "y: %{y}" as well as %{xother}, {%_xother}, + {%_xother_}, {%xother_}. When showing info for several + points, "xother" will be added to those with different + x positions from the first point. An underscore before + or after "(x|y)other" will add a space on that side, + only when this field is shown. Numbers are formatted + using d3-format's syntax %{variable:d3-format}, for + example "Price: %{y:$.2f}". + https://github.com/d3/d3-format/tree/v1.4.5#d3-format + for details on the formatting syntax. Dates are + formatted using d3-time-format's syntax + %{variable|d3-time-format}, for example "Day: + %{2019-01-01|%A}". https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format for details on the + date formatting syntax. Variables that can't be found + will be replaced with the specifier. For example, a + template of "data: %{x}, %{y}" will result in a value + of "data: 1, %{y}" if x is 1 and y is missing. + Variables with an undefined value will be replaced with + the fallback value. The variables available in + `hovertemplate` are the ones emitted as event data + described at this link + https://plotly.com/javascript/plotlyjs-events/#event- + data. Additionally, all attributes that can be + specified per-point (the ones that are `arrayOk: true`) + are available. Finally, the template string has access + to variables `currentPath`, `root`, `entry`, + `percentRoot`, `percentEntry` and `percentParent`. + Anything contained in tag `` is displayed in the + secondary box, for example + `%{fullData.name}`. To hide the + secondary box completely, use an empty tag + ``. + hovertemplatefallback + Fallback string that's displayed when a variable + referenced in a template is missing. If the boolean + value 'false' is passed in, the specifier with the + missing variable will be displayed. + hovertemplatesrc + Sets the source reference on Chart Studio Cloud for + `hovertemplate`. + hovertext + Sets hover text elements associated with each sector. + If a single string, the same string appears for all + data points. If an array of string, the items are + mapped in order of this trace's sectors. To be seen, + trace `hoverinfo` must contain a "text" flag. + hovertextsrc + Sets the source reference on Chart Studio Cloud for + `hovertext`. + ids + Assigns id labels to each datum. These ids for object + constancy of data points during animation. Should be an + array of strings, not numbers or any other type. + idssrc + Sets the source reference on Chart Studio Cloud for + `ids`. + insidetextfont + Sets the font used for `textinfo` lying inside the + sector. + insidetextorientation + Controls the orientation of the text inside chart + sectors. When set to "auto", text may be oriented in + any direction in order to be as big as possible in the + middle of a sector. The "horizontal" option orients + text to be parallel with the bottom of the chart, and + may make text smaller in order to achieve that goal. + The "radial" option orients text along the radius of + the sector. The "tangential" option orients text + perpendicular to the radius of the sector. + labels + Sets the labels of each of the sectors. + labelssrc + Sets the source reference on Chart Studio Cloud for + `labels`. + leaf + :class:`plotly.graph_objects.sunburst.Leaf` instance or + dict with compatible properties + legend + Sets the reference to a legend to show this trace in. + References to these legends are "legend", "legend2", + "legend3", etc. Settings for these legends are set in + the layout, under `layout.legend`, `layout.legend2`, + etc. + legendgrouptitle + :class:`plotly.graph_objects.sunburst.Legendgrouptitle` + instance or dict with compatible properties + legendrank + Sets the legend rank for this trace. Items and groups + with smaller ranks are presented on top/left side while + with "reversed" `legend.traceorder` they are on + bottom/right side. The default legendrank is 1000, so + that you can use ranks less than 1000 to place certain + items before all unranked items, and ranks greater than + 1000 to go after all unranked items. When having + unranked or equal rank items shapes would be displayed + after traces i.e. according to their order in data and + layout. + legendwidth + Sets the width (in px or fraction) of the legend for + this trace. + level + Sets the level from which this trace hierarchy is + rendered. Set `level` to `''` to start from the root + node in the hierarchy. Must be an "id" if `ids` is + filled in, otherwise plotly attempts to find a matching + item in `labels`. + marker + :class:`plotly.graph_objects.sunburst.Marker` instance + or dict with compatible properties + maxdepth + Sets the number of rendered sectors from any given + `level`. Set `maxdepth` to "-1" to render all the + levels in the hierarchy. + meta + Assigns extra meta information associated with this + trace that can be used in various text attributes. + Attributes such as trace `name`, graph, axis and + colorbar `title.text`, annotation `text` + `rangeselector`, `updatemenues` and `sliders` `label` + text all support `meta`. To access the trace `meta` + values in an attribute in the same trace, simply use + `%{meta[i]}` where `i` is the index or key of the + `meta` item in question. To access trace `meta` in + layout attributes, use `%{data[n[.meta[i]}` where `i` + is the index or key of the `meta` and `n` is the trace + index. + metasrc + Sets the source reference on Chart Studio Cloud for + `meta`. + name + Sets the trace name. The trace name appears as the + legend item and on hover. + opacity + Sets the opacity of the trace. + outsidetextfont + Sets the font used for `textinfo` lying outside the + sector. This option refers to the root of the hierarchy + presented at the center of a sunburst graph. Please + note that if a hierarchy has multiple root nodes, this + option won't have any effect and `insidetextfont` would + be used. + parents + Sets the parent sectors for each of the sectors. Empty + string items '' are understood to reference the root + node in the hierarchy. If `ids` is filled, `parents` + items are understood to be "ids" themselves. When `ids` + is not set, plotly attempts to find matching items in + `labels`, but beware they must be unique. + parentssrc + Sets the source reference on Chart Studio Cloud for + `parents`. + root + :class:`plotly.graph_objects.sunburst.Root` instance or + dict with compatible properties + rotation + Rotates the whole diagram counterclockwise by some + angle. By default the first slice starts at 3 o'clock. + sort + Determines whether or not the sectors are reordered + from largest to smallest. + stream + :class:`plotly.graph_objects.sunburst.Stream` instance + or dict with compatible properties + text + Sets text elements associated with each sector. If + trace `textinfo` contains a "text" flag, these elements + will be seen on the chart. If trace `hoverinfo` + contains a "text" flag and "hovertext" is not set, + these elements will be seen in the hover labels. + textfont + Sets the font used for `textinfo`. + textinfo + Determines which trace information appear on the graph. + textsrc + Sets the source reference on Chart Studio Cloud for + `text`. + texttemplate + Template string used for rendering the information text + that appears on points. Note that this will override + `textinfo`. Variables are inserted using %{variable}, + for example "y: %{y}". Numbers are formatted using + d3-format's syntax %{variable:d3-format}, for example + "Price: %{y:$.2f}". + https://github.com/d3/d3-format/tree/v1.4.5#d3-format + for details on the formatting syntax. Dates are + formatted using d3-time-format's syntax + %{variable|d3-time-format}, for example "Day: + %{2019-01-01|%A}". https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format for details on the + date formatting syntax. Variables that can't be found + will be replaced with the specifier. For example, a + template of "data: %{x}, %{y}" will result in a value + of "data: 1, %{y}" if x is 1 and y is missing. + Variables with an undefined value will be replaced with + the fallback value. All attributes that can be + specified per-point (the ones that are `arrayOk: true`) + are available. Finally, the template string has access + to variables `currentPath`, `root`, `entry`, + `percentRoot`, `percentEntry`, `percentParent`, `label` + and `value`. + texttemplatefallback + Fallback string that's displayed when a variable + referenced in a template is missing. If the boolean + value 'false' is passed in, the specifier with the + missing variable will be displayed. + texttemplatesrc + Sets the source reference on Chart Studio Cloud for + `texttemplate`. + uid + Assign an id to this trace, Use this to provide object + constancy between traces during animations and + transitions. + uirevision + Controls persistence of some user-driven changes to the + trace: `constraintrange` in `parcoords` traces, as well + as some `editable: true` modifications such as `name` + and `colorbar.title`. Defaults to `layout.uirevision`. + Note that other user-driven trace attribute changes are + controlled by `layout` attributes: `trace.visible` is + controlled by `layout.legend.uirevision`, + `selectedpoints` is controlled by + `layout.selectionrevision`, and `colorbar.(x|y)` + (accessible with `config: {editable: true}`) is + controlled by `layout.editrevision`. Trace changes are + tracked by `uid`, which only falls back on trace index + if no `uid` is provided. So if your app can add/remove + traces before the end of the `data` array, such that + the same trace has a different index, you can still + preserve user-driven changes if you give each trace a + `uid` that stays with it as it moves. + values + Sets the values associated with each of the sectors. + Use with `branchvalues` to determine how the values are + summed. + valuessrc + Sets the source reference on Chart Studio Cloud for + `values`. + visible + Determines whether or not this trace is visible. If + "legendonly", the trace is not drawn, but can appear as + a legend item (provided that the legend itself is + visible). + row : 'all', int or None (default) + Subplot row index (starting from 1) for the trace to be + added. Only valid if figure was created using + `plotly.tools.make_subplots`.If 'all', addresses all + rows in the specified column(s). + col : 'all', int or None (default) + Subplot col index (starting from 1) for the trace to be + added. Only valid if figure was created using + `plotly.tools.make_subplots`.If 'all', addresses all + columns in the specified row(s). + + Returns + ------- + FigureWidget + """ + from plotly.graph_objs import Sunburst + + new_trace = Sunburst( + branchvalues=branchvalues, + count=count, + customdata=customdata, + customdatasrc=customdatasrc, + domain=domain, + hoverinfo=hoverinfo, + hoverinfosrc=hoverinfosrc, + hoverlabel=hoverlabel, + hovertemplate=hovertemplate, + hovertemplatefallback=hovertemplatefallback, + hovertemplatesrc=hovertemplatesrc, + hovertext=hovertext, + hovertextsrc=hovertextsrc, + ids=ids, + idssrc=idssrc, + insidetextfont=insidetextfont, + insidetextorientation=insidetextorientation, + labels=labels, + labelssrc=labelssrc, + leaf=leaf, + legend=legend, + legendgrouptitle=legendgrouptitle, + legendrank=legendrank, + legendwidth=legendwidth, + level=level, + marker=marker, + maxdepth=maxdepth, + meta=meta, + metasrc=metasrc, + name=name, + opacity=opacity, + outsidetextfont=outsidetextfont, + parents=parents, + parentssrc=parentssrc, + root=root, + rotation=rotation, + sort=sort, + stream=stream, + text=text, + textfont=textfont, + textinfo=textinfo, + textsrc=textsrc, + texttemplate=texttemplate, + texttemplatefallback=texttemplatefallback, + texttemplatesrc=texttemplatesrc, + uid=uid, + uirevision=uirevision, + values=values, + valuessrc=valuessrc, + visible=visible, + **kwargs, + ) + return self.add_trace(new_trace, row=row, col=col) + + def add_surface( + self, + autocolorscale=None, + cauto=None, + cmax=None, + cmid=None, + cmin=None, + coloraxis=None, + colorbar=None, + colorscale=None, + connectgaps=None, + contours=None, + customdata=None, + customdatasrc=None, + hidesurface=None, + hoverinfo=None, + hoverinfosrc=None, + hoverlabel=None, + hovertemplate=None, + hovertemplatefallback=None, + hovertemplatesrc=None, + hovertext=None, + hovertextsrc=None, + ids=None, + idssrc=None, + legend=None, + legendgroup=None, + legendgrouptitle=None, + legendrank=None, + legendwidth=None, + lighting=None, + lightposition=None, + meta=None, + metasrc=None, + name=None, + opacity=None, + opacityscale=None, + reversescale=None, + scene=None, + showlegend=None, + showscale=None, + stream=None, + surfacecolor=None, + surfacecolorsrc=None, + text=None, + textsrc=None, + uid=None, + uirevision=None, + visible=None, + x=None, + xcalendar=None, + xhoverformat=None, + xsrc=None, + y=None, + ycalendar=None, + yhoverformat=None, + ysrc=None, + z=None, + zcalendar=None, + zhoverformat=None, + zsrc=None, + row=None, + col=None, + **kwargs, + ) -> "FigureWidget": + """ + Add a new Surface trace + + The data the describes the coordinates of the surface is set in + `z`. Data in `z` should be a 2D list. Coordinates in `x` and + `y` can either be 1D lists or 2D lists (e.g. to graph + parametric surfaces). If not provided in `x` and `y`, the x and + y coordinates are assumed to be linear starting at 0 with a + unit step. The color scale corresponds to the `z` values by + default. For custom color scales, use `surfacecolor` which + should be a 2D list, where its bounds can be controlled using + `cmin` and `cmax`. + + Parameters + ---------- + autocolorscale + Determines whether the colorscale is a default palette + (`autocolorscale: true`) or the palette determined by + `colorscale`. In case `colorscale` is unspecified or + `autocolorscale` is true, the default palette will be + chosen according to whether numbers in the `color` + array are all positive, all negative or mixed. + cauto + Determines whether or not the color domain is computed + with respect to the input data (here z or surfacecolor) + or the bounds set in `cmin` and `cmax` Defaults to + `false` when `cmin` and `cmax` are set by the user. + cmax + Sets the upper bound of the color domain. Value should + have the same units as z or surfacecolor and if set, + `cmin` must be set as well. + cmid + Sets the mid-point of the color domain by scaling + `cmin` and/or `cmax` to be equidistant to this point. + Value should have the same units as z or surfacecolor. + Has no effect when `cauto` is `false`. + cmin + Sets the lower bound of the color domain. Value should + have the same units as z or surfacecolor and if set, + `cmax` must be set as well. + coloraxis + Sets a reference to a shared color axis. References to + these shared color axes are "coloraxis", "coloraxis2", + "coloraxis3", etc. Settings for these shared color axes + are set in the layout, under `layout.coloraxis`, + `layout.coloraxis2`, etc. Note that multiple color + scales can be linked to the same color axis. + colorbar + :class:`plotly.graph_objects.surface.ColorBar` instance + or dict with compatible properties + colorscale + Sets the colorscale. The colorscale must be an array + containing arrays mapping a normalized value to an rgb, + rgba, hex, hsl, hsv, or named color string. At minimum, + a mapping for the lowest (0) and highest (1) values are + required. For example, `[[0, 'rgb(0,0,255)'], [1, + 'rgb(255,0,0)']]`. To control the bounds of the + colorscale in color space, use `cmin` and `cmax`. + Alternatively, `colorscale` may be a palette name + string of the following list: Blackbody,Bluered,Blues,C + ividis,Earth,Electric,Greens,Greys,Hot,Jet,Picnic,Portl + and,Rainbow,RdBu,Reds,Viridis,YlGnBu,YlOrRd. + connectgaps + Determines whether or not gaps (i.e. {nan} or missing + values) in the `z` data are filled in. + contours + :class:`plotly.graph_objects.surface.Contours` instance + or dict with compatible properties + customdata + Assigns extra data each datum. This may be useful when + listening to hover, click and selection events. Note + that, "scatter" traces also appends customdata items in + the markers DOM elements + customdatasrc + Sets the source reference on Chart Studio Cloud for + `customdata`. + hidesurface + Determines whether or not a surface is drawn. For + example, set `hidesurface` to False `contours.x.show` + to True and `contours.y.show` to True to draw a wire + frame plot. + hoverinfo + Determines which trace information appear on hover. If + `none` or `skip` are set, no information is displayed + upon hovering. But, if `none` is set, click and hover + events are still fired. + hoverinfosrc + Sets the source reference on Chart Studio Cloud for + `hoverinfo`. + hoverlabel + :class:`plotly.graph_objects.surface.Hoverlabel` + instance or dict with compatible properties + hovertemplate + Template string used for rendering the information that + appear on hover box. Note that this will override + `hoverinfo`. Variables are inserted using %{variable}, + for example "y: %{y}" as well as %{xother}, {%_xother}, + {%_xother_}, {%xother_}. When showing info for several + points, "xother" will be added to those with different + x positions from the first point. An underscore before + or after "(x|y)other" will add a space on that side, + only when this field is shown. Numbers are formatted + using d3-format's syntax %{variable:d3-format}, for + example "Price: %{y:$.2f}". + https://github.com/d3/d3-format/tree/v1.4.5#d3-format + for details on the formatting syntax. Dates are + formatted using d3-time-format's syntax + %{variable|d3-time-format}, for example "Day: + %{2019-01-01|%A}". https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format for details on the + date formatting syntax. Variables that can't be found + will be replaced with the specifier. For example, a + template of "data: %{x}, %{y}" will result in a value + of "data: 1, %{y}" if x is 1 and y is missing. + Variables with an undefined value will be replaced with + the fallback value. The variables available in + `hovertemplate` are the ones emitted as event data + described at this link + https://plotly.com/javascript/plotlyjs-events/#event- + data. Additionally, all attributes that can be + specified per-point (the ones that are `arrayOk: true`) + are available. Anything contained in tag `` is + displayed in the secondary box, for example + `%{fullData.name}`. To hide the + secondary box completely, use an empty tag + ``. + hovertemplatefallback + Fallback string that's displayed when a variable + referenced in a template is missing. If the boolean + value 'false' is passed in, the specifier with the + missing variable will be displayed. + hovertemplatesrc + Sets the source reference on Chart Studio Cloud for + `hovertemplate`. + hovertext + Same as `text`. + hovertextsrc + Sets the source reference on Chart Studio Cloud for + `hovertext`. + ids + Assigns id labels to each datum. These ids for object + constancy of data points during animation. Should be an + array of strings, not numbers or any other type. + idssrc + Sets the source reference on Chart Studio Cloud for + `ids`. + legend + Sets the reference to a legend to show this trace in. + References to these legends are "legend", "legend2", + "legend3", etc. Settings for these legends are set in + the layout, under `layout.legend`, `layout.legend2`, + etc. + legendgroup + Sets the legend group for this trace. Traces and shapes + part of the same legend group hide/show at the same + time when toggling legend items. + legendgrouptitle + :class:`plotly.graph_objects.surface.Legendgrouptitle` + instance or dict with compatible properties + legendrank + Sets the legend rank for this trace. Items and groups + with smaller ranks are presented on top/left side while + with "reversed" `legend.traceorder` they are on + bottom/right side. The default legendrank is 1000, so + that you can use ranks less than 1000 to place certain + items before all unranked items, and ranks greater than + 1000 to go after all unranked items. When having + unranked or equal rank items shapes would be displayed + after traces i.e. according to their order in data and + layout. + legendwidth + Sets the width (in px or fraction) of the legend for + this trace. + lighting + :class:`plotly.graph_objects.surface.Lighting` instance + or dict with compatible properties + lightposition + :class:`plotly.graph_objects.surface.Lightposition` + instance or dict with compatible properties + meta + Assigns extra meta information associated with this + trace that can be used in various text attributes. + Attributes such as trace `name`, graph, axis and + colorbar `title.text`, annotation `text` + `rangeselector`, `updatemenues` and `sliders` `label` + text all support `meta`. To access the trace `meta` + values in an attribute in the same trace, simply use + `%{meta[i]}` where `i` is the index or key of the + `meta` item in question. To access trace `meta` in + layout attributes, use `%{data[n[.meta[i]}` where `i` + is the index or key of the `meta` and `n` is the trace + index. + metasrc + Sets the source reference on Chart Studio Cloud for + `meta`. + name + Sets the trace name. The trace name appears as the + legend item and on hover. + opacity + Sets the opacity of the surface. Please note that in + the case of using high `opacity` values for example a + value greater than or equal to 0.5 on two surfaces (and + 0.25 with four surfaces), an overlay of multiple + transparent surfaces may not perfectly be sorted in + depth by the webgl API. This behavior may be improved + in the near future and is subject to change. + opacityscale + Sets the opacityscale. The opacityscale must be an + array containing arrays mapping a normalized value to + an opacity value. At minimum, a mapping for the lowest + (0) and highest (1) values are required. For example, + `[[0, 1], [0.5, 0.2], [1, 1]]` means that higher/lower + values would have higher opacity values and those in + the middle would be more transparent Alternatively, + `opacityscale` may be a palette name string of the + following list: 'min', 'max', 'extremes' and 'uniform'. + The default is 'uniform'. + reversescale + Reverses the color mapping if true. If true, `cmin` + will correspond to the last color in the array and + `cmax` will correspond to the first color. + scene + Sets a reference between this trace's 3D coordinate + system and a 3D scene. If "scene" (the default value), + the (x,y,z) coordinates refer to `layout.scene`. If + "scene2", the (x,y,z) coordinates refer to + `layout.scene2`, and so on. + showlegend + Determines whether or not an item corresponding to this + trace is shown in the legend. + showscale + Determines whether or not a colorbar is displayed for + this trace. + stream + :class:`plotly.graph_objects.surface.Stream` instance + or dict with compatible properties + surfacecolor + Sets the surface color values, used for setting a color + scale independent of `z`. + surfacecolorsrc + Sets the source reference on Chart Studio Cloud for + `surfacecolor`. + text + Sets the text elements associated with each z value. If + trace `hoverinfo` contains a "text" flag and + "hovertext" is not set, these elements will be seen in + the hover labels. + textsrc + Sets the source reference on Chart Studio Cloud for + `text`. + uid + Assign an id to this trace, Use this to provide object + constancy between traces during animations and + transitions. + uirevision + Controls persistence of some user-driven changes to the + trace: `constraintrange` in `parcoords` traces, as well + as some `editable: true` modifications such as `name` + and `colorbar.title`. Defaults to `layout.uirevision`. + Note that other user-driven trace attribute changes are + controlled by `layout` attributes: `trace.visible` is + controlled by `layout.legend.uirevision`, + `selectedpoints` is controlled by + `layout.selectionrevision`, and `colorbar.(x|y)` + (accessible with `config: {editable: true}`) is + controlled by `layout.editrevision`. Trace changes are + tracked by `uid`, which only falls back on trace index + if no `uid` is provided. So if your app can add/remove + traces before the end of the `data` array, such that + the same trace has a different index, you can still + preserve user-driven changes if you give each trace a + `uid` that stays with it as it moves. + visible + Determines whether or not this trace is visible. If + "legendonly", the trace is not drawn, but can appear as + a legend item (provided that the legend itself is + visible). + x + Sets the x coordinates. + xcalendar + Sets the calendar system to use with `x` date data. + xhoverformat + Sets the hover text formatting rulefor `x` using d3 + formatting mini-languages which are very similar to + those in Python. For numbers, see: + https://github.com/d3/d3-format/tree/v1.4.5#d3-format. + And for dates see: https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format. We add two items to + d3's date formatter: "%h" for half of the year as a + decimal number as well as "%{n}f" for fractional + seconds with n digits. For example, *2016-10-13 + 09:15:23.456* with tickformat "%H~%M~%S.%2f" would + display *09~15~23.46*By default the values are + formatted using `xaxis.hoverformat`. + xsrc + Sets the source reference on Chart Studio Cloud for + `x`. + y + Sets the y coordinates. + ycalendar + Sets the calendar system to use with `y` date data. + yhoverformat + Sets the hover text formatting rulefor `y` using d3 + formatting mini-languages which are very similar to + those in Python. For numbers, see: + https://github.com/d3/d3-format/tree/v1.4.5#d3-format. + And for dates see: https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format. We add two items to + d3's date formatter: "%h" for half of the year as a + decimal number as well as "%{n}f" for fractional + seconds with n digits. For example, *2016-10-13 + 09:15:23.456* with tickformat "%H~%M~%S.%2f" would + display *09~15~23.46*By default the values are + formatted using `yaxis.hoverformat`. + ysrc + Sets the source reference on Chart Studio Cloud for + `y`. + z + Sets the z coordinates. + zcalendar + Sets the calendar system to use with `z` date data. + zhoverformat + Sets the hover text formatting rulefor `z` using d3 + formatting mini-languages which are very similar to + those in Python. For numbers, see: + https://github.com/d3/d3-format/tree/v1.4.5#d3-format. + And for dates see: https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format. We add two items to + d3's date formatter: "%h" for half of the year as a + decimal number as well as "%{n}f" for fractional + seconds with n digits. For example, *2016-10-13 + 09:15:23.456* with tickformat "%H~%M~%S.%2f" would + display *09~15~23.46*By default the values are + formatted using `zaxis.hoverformat`. + zsrc + Sets the source reference on Chart Studio Cloud for + `z`. + row : 'all', int or None (default) + Subplot row index (starting from 1) for the trace to be + added. Only valid if figure was created using + `plotly.tools.make_subplots`.If 'all', addresses all + rows in the specified column(s). + col : 'all', int or None (default) + Subplot col index (starting from 1) for the trace to be + added. Only valid if figure was created using + `plotly.tools.make_subplots`.If 'all', addresses all + columns in the specified row(s). + + Returns + ------- + FigureWidget + """ + from plotly.graph_objs import Surface + + new_trace = Surface( + autocolorscale=autocolorscale, + cauto=cauto, + cmax=cmax, + cmid=cmid, + cmin=cmin, + coloraxis=coloraxis, + colorbar=colorbar, + colorscale=colorscale, + connectgaps=connectgaps, + contours=contours, + customdata=customdata, + customdatasrc=customdatasrc, + hidesurface=hidesurface, + hoverinfo=hoverinfo, + hoverinfosrc=hoverinfosrc, + hoverlabel=hoverlabel, + hovertemplate=hovertemplate, + hovertemplatefallback=hovertemplatefallback, + hovertemplatesrc=hovertemplatesrc, + hovertext=hovertext, + hovertextsrc=hovertextsrc, + ids=ids, + idssrc=idssrc, + legend=legend, + legendgroup=legendgroup, + legendgrouptitle=legendgrouptitle, + legendrank=legendrank, + legendwidth=legendwidth, + lighting=lighting, + lightposition=lightposition, + meta=meta, + metasrc=metasrc, + name=name, + opacity=opacity, + opacityscale=opacityscale, + reversescale=reversescale, + scene=scene, + showlegend=showlegend, + showscale=showscale, + stream=stream, + surfacecolor=surfacecolor, + surfacecolorsrc=surfacecolorsrc, + text=text, + textsrc=textsrc, + uid=uid, + uirevision=uirevision, + visible=visible, + x=x, + xcalendar=xcalendar, + xhoverformat=xhoverformat, + xsrc=xsrc, + y=y, + ycalendar=ycalendar, + yhoverformat=yhoverformat, + ysrc=ysrc, + z=z, + zcalendar=zcalendar, + zhoverformat=zhoverformat, + zsrc=zsrc, + **kwargs, + ) + return self.add_trace(new_trace, row=row, col=col) + + def add_table( + self, + cells=None, + columnorder=None, + columnordersrc=None, + columnwidth=None, + columnwidthsrc=None, + customdata=None, + customdatasrc=None, + domain=None, + header=None, + hoverinfo=None, + hoverinfosrc=None, + hoverlabel=None, + ids=None, + idssrc=None, + legend=None, + legendgrouptitle=None, + legendrank=None, + legendwidth=None, + meta=None, + metasrc=None, + name=None, + stream=None, + uid=None, + uirevision=None, + visible=None, + row=None, + col=None, + **kwargs, + ) -> "FigureWidget": + """ + Add a new Table trace + + Table view for detailed data viewing. The data are arranged in + a grid of rows and columns. Most styling can be specified for + columns, rows or individual cells. Table is using a column- + major order, ie. the grid is represented as a vector of column + vectors. + + Parameters + ---------- + cells + :class:`plotly.graph_objects.table.Cells` instance or + dict with compatible properties + columnorder + Specifies the rendered order of the data columns; for + example, a value `2` at position `0` means that column + index `0` in the data will be rendered as the third + column, as columns have an index base of zero. + columnordersrc + Sets the source reference on Chart Studio Cloud for + `columnorder`. + columnwidth + The width of columns expressed as a ratio. Columns fill + the available width in proportion of their specified + column widths. + columnwidthsrc + Sets the source reference on Chart Studio Cloud for + `columnwidth`. + customdata + Assigns extra data each datum. This may be useful when + listening to hover, click and selection events. Note + that, "scatter" traces also appends customdata items in + the markers DOM elements + customdatasrc + Sets the source reference on Chart Studio Cloud for + `customdata`. + domain + :class:`plotly.graph_objects.table.Domain` instance or + dict with compatible properties + header + :class:`plotly.graph_objects.table.Header` instance or + dict with compatible properties + hoverinfo + Determines which trace information appear on hover. If + `none` or `skip` are set, no information is displayed + upon hovering. But, if `none` is set, click and hover + events are still fired. + hoverinfosrc + Sets the source reference on Chart Studio Cloud for + `hoverinfo`. + hoverlabel + :class:`plotly.graph_objects.table.Hoverlabel` instance + or dict with compatible properties + ids + Assigns id labels to each datum. These ids for object + constancy of data points during animation. Should be an + array of strings, not numbers or any other type. + idssrc + Sets the source reference on Chart Studio Cloud for + `ids`. + legend + Sets the reference to a legend to show this trace in. + References to these legends are "legend", "legend2", + "legend3", etc. Settings for these legends are set in + the layout, under `layout.legend`, `layout.legend2`, + etc. + legendgrouptitle + :class:`plotly.graph_objects.table.Legendgrouptitle` + instance or dict with compatible properties + legendrank + Sets the legend rank for this trace. Items and groups + with smaller ranks are presented on top/left side while + with "reversed" `legend.traceorder` they are on + bottom/right side. The default legendrank is 1000, so + that you can use ranks less than 1000 to place certain + items before all unranked items, and ranks greater than + 1000 to go after all unranked items. When having + unranked or equal rank items shapes would be displayed + after traces i.e. according to their order in data and + layout. + legendwidth + Sets the width (in px or fraction) of the legend for + this trace. + meta + Assigns extra meta information associated with this + trace that can be used in various text attributes. + Attributes such as trace `name`, graph, axis and + colorbar `title.text`, annotation `text` + `rangeselector`, `updatemenues` and `sliders` `label` + text all support `meta`. To access the trace `meta` + values in an attribute in the same trace, simply use + `%{meta[i]}` where `i` is the index or key of the + `meta` item in question. To access trace `meta` in + layout attributes, use `%{data[n[.meta[i]}` where `i` + is the index or key of the `meta` and `n` is the trace + index. + metasrc + Sets the source reference on Chart Studio Cloud for + `meta`. + name + Sets the trace name. The trace name appears as the + legend item and on hover. + stream + :class:`plotly.graph_objects.table.Stream` instance or + dict with compatible properties + uid + Assign an id to this trace, Use this to provide object + constancy between traces during animations and + transitions. + uirevision + Controls persistence of some user-driven changes to the + trace: `constraintrange` in `parcoords` traces, as well + as some `editable: true` modifications such as `name` + and `colorbar.title`. Defaults to `layout.uirevision`. + Note that other user-driven trace attribute changes are + controlled by `layout` attributes: `trace.visible` is + controlled by `layout.legend.uirevision`, + `selectedpoints` is controlled by + `layout.selectionrevision`, and `colorbar.(x|y)` + (accessible with `config: {editable: true}`) is + controlled by `layout.editrevision`. Trace changes are + tracked by `uid`, which only falls back on trace index + if no `uid` is provided. So if your app can add/remove + traces before the end of the `data` array, such that + the same trace has a different index, you can still + preserve user-driven changes if you give each trace a + `uid` that stays with it as it moves. + visible + Determines whether or not this trace is visible. If + "legendonly", the trace is not drawn, but can appear as + a legend item (provided that the legend itself is + visible). + row : 'all', int or None (default) + Subplot row index (starting from 1) for the trace to be + added. Only valid if figure was created using + `plotly.tools.make_subplots`.If 'all', addresses all + rows in the specified column(s). + col : 'all', int or None (default) + Subplot col index (starting from 1) for the trace to be + added. Only valid if figure was created using + `plotly.tools.make_subplots`.If 'all', addresses all + columns in the specified row(s). + + Returns + ------- + FigureWidget + """ + from plotly.graph_objs import Table + + new_trace = Table( + cells=cells, + columnorder=columnorder, + columnordersrc=columnordersrc, + columnwidth=columnwidth, + columnwidthsrc=columnwidthsrc, + customdata=customdata, + customdatasrc=customdatasrc, + domain=domain, + header=header, + hoverinfo=hoverinfo, + hoverinfosrc=hoverinfosrc, + hoverlabel=hoverlabel, + ids=ids, + idssrc=idssrc, + legend=legend, + legendgrouptitle=legendgrouptitle, + legendrank=legendrank, + legendwidth=legendwidth, + meta=meta, + metasrc=metasrc, + name=name, + stream=stream, + uid=uid, + uirevision=uirevision, + visible=visible, + **kwargs, + ) + return self.add_trace(new_trace, row=row, col=col) + + def add_treemap( + self, + branchvalues=None, + count=None, + customdata=None, + customdatasrc=None, + domain=None, + hoverinfo=None, + hoverinfosrc=None, + hoverlabel=None, + hovertemplate=None, + hovertemplatefallback=None, + hovertemplatesrc=None, + hovertext=None, + hovertextsrc=None, + ids=None, + idssrc=None, + insidetextfont=None, + labels=None, + labelssrc=None, + legend=None, + legendgrouptitle=None, + legendrank=None, + legendwidth=None, + level=None, + marker=None, + maxdepth=None, + meta=None, + metasrc=None, + name=None, + opacity=None, + outsidetextfont=None, + parents=None, + parentssrc=None, + pathbar=None, + root=None, + sort=None, + stream=None, + text=None, + textfont=None, + textinfo=None, + textposition=None, + textsrc=None, + texttemplate=None, + texttemplatefallback=None, + texttemplatesrc=None, + tiling=None, + uid=None, + uirevision=None, + values=None, + valuessrc=None, + visible=None, + row=None, + col=None, + **kwargs, + ) -> "FigureWidget": + """ + Add a new Treemap trace + + Visualize hierarchal data from leaves (and/or outer branches) + towards root with rectangles. The treemap sectors are + determined by the entries in "labels" or "ids" and in + "parents". + + Parameters + ---------- + branchvalues + Determines how the items in `values` are summed. When + set to "total", items in `values` are taken to be value + of all its descendants. When set to "remainder", items + in `values` corresponding to the root and the branches + sectors are taken to be the extra part not part of the + sum of the values at their leaves. + count + Determines default for `values` when it is not + provided, by inferring a 1 for each of the "leaves" + and/or "branches", otherwise 0. + customdata + Assigns extra data each datum. This may be useful when + listening to hover, click and selection events. Note + that, "scatter" traces also appends customdata items in + the markers DOM elements + customdatasrc + Sets the source reference on Chart Studio Cloud for + `customdata`. + domain + :class:`plotly.graph_objects.treemap.Domain` instance + or dict with compatible properties + hoverinfo + Determines which trace information appear on hover. If + `none` or `skip` are set, no information is displayed + upon hovering. But, if `none` is set, click and hover + events are still fired. + hoverinfosrc + Sets the source reference on Chart Studio Cloud for + `hoverinfo`. + hoverlabel + :class:`plotly.graph_objects.treemap.Hoverlabel` + instance or dict with compatible properties + hovertemplate + Template string used for rendering the information that + appear on hover box. Note that this will override + `hoverinfo`. Variables are inserted using %{variable}, + for example "y: %{y}" as well as %{xother}, {%_xother}, + {%_xother_}, {%xother_}. When showing info for several + points, "xother" will be added to those with different + x positions from the first point. An underscore before + or after "(x|y)other" will add a space on that side, + only when this field is shown. Numbers are formatted + using d3-format's syntax %{variable:d3-format}, for + example "Price: %{y:$.2f}". + https://github.com/d3/d3-format/tree/v1.4.5#d3-format + for details on the formatting syntax. Dates are + formatted using d3-time-format's syntax + %{variable|d3-time-format}, for example "Day: + %{2019-01-01|%A}". https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format for details on the + date formatting syntax. Variables that can't be found + will be replaced with the specifier. For example, a + template of "data: %{x}, %{y}" will result in a value + of "data: 1, %{y}" if x is 1 and y is missing. + Variables with an undefined value will be replaced with + the fallback value. The variables available in + `hovertemplate` are the ones emitted as event data + described at this link + https://plotly.com/javascript/plotlyjs-events/#event- + data. Additionally, all attributes that can be + specified per-point (the ones that are `arrayOk: true`) + are available. Finally, the template string has access + to variables `currentPath`, `root`, `entry`, + `percentRoot`, `percentEntry` and `percentParent`. + Anything contained in tag `` is displayed in the + secondary box, for example + `%{fullData.name}`. To hide the + secondary box completely, use an empty tag + ``. + hovertemplatefallback + Fallback string that's displayed when a variable + referenced in a template is missing. If the boolean + value 'false' is passed in, the specifier with the + missing variable will be displayed. + hovertemplatesrc + Sets the source reference on Chart Studio Cloud for + `hovertemplate`. + hovertext + Sets hover text elements associated with each sector. + If a single string, the same string appears for all + data points. If an array of string, the items are + mapped in order of this trace's sectors. To be seen, + trace `hoverinfo` must contain a "text" flag. + hovertextsrc + Sets the source reference on Chart Studio Cloud for + `hovertext`. + ids + Assigns id labels to each datum. These ids for object + constancy of data points during animation. Should be an + array of strings, not numbers or any other type. + idssrc + Sets the source reference on Chart Studio Cloud for + `ids`. + insidetextfont + Sets the font used for `textinfo` lying inside the + sector. + labels + Sets the labels of each of the sectors. + labelssrc + Sets the source reference on Chart Studio Cloud for + `labels`. + legend + Sets the reference to a legend to show this trace in. + References to these legends are "legend", "legend2", + "legend3", etc. Settings for these legends are set in + the layout, under `layout.legend`, `layout.legend2`, + etc. + legendgrouptitle + :class:`plotly.graph_objects.treemap.Legendgrouptitle` + instance or dict with compatible properties + legendrank + Sets the legend rank for this trace. Items and groups + with smaller ranks are presented on top/left side while + with "reversed" `legend.traceorder` they are on + bottom/right side. The default legendrank is 1000, so + that you can use ranks less than 1000 to place certain + items before all unranked items, and ranks greater than + 1000 to go after all unranked items. When having + unranked or equal rank items shapes would be displayed + after traces i.e. according to their order in data and + layout. + legendwidth + Sets the width (in px or fraction) of the legend for + this trace. + level + Sets the level from which this trace hierarchy is + rendered. Set `level` to `''` to start from the root + node in the hierarchy. Must be an "id" if `ids` is + filled in, otherwise plotly attempts to find a matching + item in `labels`. + marker + :class:`plotly.graph_objects.treemap.Marker` instance + or dict with compatible properties + maxdepth + Sets the number of rendered sectors from any given + `level`. Set `maxdepth` to "-1" to render all the + levels in the hierarchy. + meta + Assigns extra meta information associated with this + trace that can be used in various text attributes. + Attributes such as trace `name`, graph, axis and + colorbar `title.text`, annotation `text` + `rangeselector`, `updatemenues` and `sliders` `label` + text all support `meta`. To access the trace `meta` + values in an attribute in the same trace, simply use + `%{meta[i]}` where `i` is the index or key of the + `meta` item in question. To access trace `meta` in + layout attributes, use `%{data[n[.meta[i]}` where `i` + is the index or key of the `meta` and `n` is the trace + index. + metasrc + Sets the source reference on Chart Studio Cloud for + `meta`. + name + Sets the trace name. The trace name appears as the + legend item and on hover. + opacity + Sets the opacity of the trace. + outsidetextfont + Sets the font used for `textinfo` lying outside the + sector. This option refers to the root of the hierarchy + presented on top left corner of a treemap graph. Please + note that if a hierarchy has multiple root nodes, this + option won't have any effect and `insidetextfont` would + be used. + parents + Sets the parent sectors for each of the sectors. Empty + string items '' are understood to reference the root + node in the hierarchy. If `ids` is filled, `parents` + items are understood to be "ids" themselves. When `ids` + is not set, plotly attempts to find matching items in + `labels`, but beware they must be unique. + parentssrc + Sets the source reference on Chart Studio Cloud for + `parents`. + pathbar + :class:`plotly.graph_objects.treemap.Pathbar` instance + or dict with compatible properties + root + :class:`plotly.graph_objects.treemap.Root` instance or + dict with compatible properties + sort + Determines whether or not the sectors are reordered + from largest to smallest. + stream + :class:`plotly.graph_objects.treemap.Stream` instance + or dict with compatible properties + text + Sets text elements associated with each sector. If + trace `textinfo` contains a "text" flag, these elements + will be seen on the chart. If trace `hoverinfo` + contains a "text" flag and "hovertext" is not set, + these elements will be seen in the hover labels. + textfont + Sets the font used for `textinfo`. + textinfo + Determines which trace information appear on the graph. + textposition + Sets the positions of the `text` elements. + textsrc + Sets the source reference on Chart Studio Cloud for + `text`. + texttemplate + Template string used for rendering the information text + that appears on points. Note that this will override + `textinfo`. Variables are inserted using %{variable}, + for example "y: %{y}". Numbers are formatted using + d3-format's syntax %{variable:d3-format}, for example + "Price: %{y:$.2f}". + https://github.com/d3/d3-format/tree/v1.4.5#d3-format + for details on the formatting syntax. Dates are + formatted using d3-time-format's syntax + %{variable|d3-time-format}, for example "Day: + %{2019-01-01|%A}". https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format for details on the + date formatting syntax. Variables that can't be found + will be replaced with the specifier. For example, a + template of "data: %{x}, %{y}" will result in a value + of "data: 1, %{y}" if x is 1 and y is missing. + Variables with an undefined value will be replaced with + the fallback value. All attributes that can be + specified per-point (the ones that are `arrayOk: true`) + are available. Finally, the template string has access + to variables `currentPath`, `root`, `entry`, + `percentRoot`, `percentEntry`, `percentParent`, `label` + and `value`. + texttemplatefallback + Fallback string that's displayed when a variable + referenced in a template is missing. If the boolean + value 'false' is passed in, the specifier with the + missing variable will be displayed. + texttemplatesrc + Sets the source reference on Chart Studio Cloud for + `texttemplate`. + tiling + :class:`plotly.graph_objects.treemap.Tiling` instance + or dict with compatible properties + uid + Assign an id to this trace, Use this to provide object + constancy between traces during animations and + transitions. + uirevision + Controls persistence of some user-driven changes to the + trace: `constraintrange` in `parcoords` traces, as well + as some `editable: true` modifications such as `name` + and `colorbar.title`. Defaults to `layout.uirevision`. + Note that other user-driven trace attribute changes are + controlled by `layout` attributes: `trace.visible` is + controlled by `layout.legend.uirevision`, + `selectedpoints` is controlled by + `layout.selectionrevision`, and `colorbar.(x|y)` + (accessible with `config: {editable: true}`) is + controlled by `layout.editrevision`. Trace changes are + tracked by `uid`, which only falls back on trace index + if no `uid` is provided. So if your app can add/remove + traces before the end of the `data` array, such that + the same trace has a different index, you can still + preserve user-driven changes if you give each trace a + `uid` that stays with it as it moves. + values + Sets the values associated with each of the sectors. + Use with `branchvalues` to determine how the values are + summed. + valuessrc + Sets the source reference on Chart Studio Cloud for + `values`. + visible + Determines whether or not this trace is visible. If + "legendonly", the trace is not drawn, but can appear as + a legend item (provided that the legend itself is + visible). + row : 'all', int or None (default) + Subplot row index (starting from 1) for the trace to be + added. Only valid if figure was created using + `plotly.tools.make_subplots`.If 'all', addresses all + rows in the specified column(s). + col : 'all', int or None (default) + Subplot col index (starting from 1) for the trace to be + added. Only valid if figure was created using + `plotly.tools.make_subplots`.If 'all', addresses all + columns in the specified row(s). + + Returns + ------- + FigureWidget + """ + from plotly.graph_objs import Treemap + + new_trace = Treemap( + branchvalues=branchvalues, + count=count, + customdata=customdata, + customdatasrc=customdatasrc, + domain=domain, + hoverinfo=hoverinfo, + hoverinfosrc=hoverinfosrc, + hoverlabel=hoverlabel, + hovertemplate=hovertemplate, + hovertemplatefallback=hovertemplatefallback, + hovertemplatesrc=hovertemplatesrc, + hovertext=hovertext, + hovertextsrc=hovertextsrc, + ids=ids, + idssrc=idssrc, + insidetextfont=insidetextfont, + labels=labels, + labelssrc=labelssrc, + legend=legend, + legendgrouptitle=legendgrouptitle, + legendrank=legendrank, + legendwidth=legendwidth, + level=level, + marker=marker, + maxdepth=maxdepth, + meta=meta, + metasrc=metasrc, + name=name, + opacity=opacity, + outsidetextfont=outsidetextfont, + parents=parents, + parentssrc=parentssrc, + pathbar=pathbar, + root=root, + sort=sort, + stream=stream, + text=text, + textfont=textfont, + textinfo=textinfo, + textposition=textposition, + textsrc=textsrc, + texttemplate=texttemplate, + texttemplatefallback=texttemplatefallback, + texttemplatesrc=texttemplatesrc, + tiling=tiling, + uid=uid, + uirevision=uirevision, + values=values, + valuessrc=valuessrc, + visible=visible, + **kwargs, + ) + return self.add_trace(new_trace, row=row, col=col) + + def add_violin( + self, + alignmentgroup=None, + bandwidth=None, + box=None, + customdata=None, + customdatasrc=None, + fillcolor=None, + hoverinfo=None, + hoverinfosrc=None, + hoverlabel=None, + hoveron=None, + hovertemplate=None, + hovertemplatefallback=None, + hovertemplatesrc=None, + hovertext=None, + hovertextsrc=None, + ids=None, + idssrc=None, + jitter=None, + legend=None, + legendgroup=None, + legendgrouptitle=None, + legendrank=None, + legendwidth=None, + line=None, + marker=None, + meanline=None, + meta=None, + metasrc=None, + name=None, + offsetgroup=None, + opacity=None, + orientation=None, + pointpos=None, + points=None, + quartilemethod=None, + scalegroup=None, + scalemode=None, + selected=None, + selectedpoints=None, + showlegend=None, + side=None, + span=None, + spanmode=None, + stream=None, + text=None, + textsrc=None, + uid=None, + uirevision=None, + unselected=None, + visible=None, + width=None, + x=None, + x0=None, + xaxis=None, + xhoverformat=None, + xsrc=None, + y=None, + y0=None, + yaxis=None, + yhoverformat=None, + ysrc=None, + zorder=None, + row=None, + col=None, + secondary_y=None, + **kwargs, + ) -> "FigureWidget": + """ + Add a new Violin trace + + In vertical (horizontal) violin plots, statistics are computed + using `y` (`x`) values. By supplying an `x` (`y`) array, one + violin per distinct x (y) value is drawn If no `x` (`y`) list + is provided, a single violin is drawn. That violin position is + then positioned with with `name` or with `x0` (`y0`) if + provided. + + Parameters + ---------- + alignmentgroup + Set several traces linked to the same position axis or + matching axes to the same alignmentgroup. This controls + whether bars compute their positional range dependently + or independently. + bandwidth + Sets the bandwidth used to compute the kernel density + estimate. By default, the bandwidth is determined by + Silverman's rule of thumb. + box + :class:`plotly.graph_objects.violin.Box` instance or + dict with compatible properties + customdata + Assigns extra data each datum. This may be useful when + listening to hover, click and selection events. Note + that, "scatter" traces also appends customdata items in + the markers DOM elements + customdatasrc + Sets the source reference on Chart Studio Cloud for + `customdata`. + fillcolor + Sets the fill color. Defaults to a half-transparent + variant of the line color, marker color, or marker line + color, whichever is available. + hoverinfo + Determines which trace information appear on hover. If + `none` or `skip` are set, no information is displayed + upon hovering. But, if `none` is set, click and hover + events are still fired. + hoverinfosrc + Sets the source reference on Chart Studio Cloud for + `hoverinfo`. + hoverlabel + :class:`plotly.graph_objects.violin.Hoverlabel` + instance or dict with compatible properties + hoveron + Do the hover effects highlight individual violins or + sample points or the kernel density estimate or any + combination of them? + hovertemplate + Template string used for rendering the information that + appear on hover box. Note that this will override + `hoverinfo`. Variables are inserted using %{variable}, + for example "y: %{y}" as well as %{xother}, {%_xother}, + {%_xother_}, {%xother_}. When showing info for several + points, "xother" will be added to those with different + x positions from the first point. An underscore before + or after "(x|y)other" will add a space on that side, + only when this field is shown. Numbers are formatted + using d3-format's syntax %{variable:d3-format}, for + example "Price: %{y:$.2f}". + https://github.com/d3/d3-format/tree/v1.4.5#d3-format + for details on the formatting syntax. Dates are + formatted using d3-time-format's syntax + %{variable|d3-time-format}, for example "Day: + %{2019-01-01|%A}". https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format for details on the + date formatting syntax. Variables that can't be found + will be replaced with the specifier. For example, a + template of "data: %{x}, %{y}" will result in a value + of "data: 1, %{y}" if x is 1 and y is missing. + Variables with an undefined value will be replaced with + the fallback value. The variables available in + `hovertemplate` are the ones emitted as event data + described at this link + https://plotly.com/javascript/plotlyjs-events/#event- + data. Additionally, all attributes that can be + specified per-point (the ones that are `arrayOk: true`) + are available. Anything contained in tag `` is + displayed in the secondary box, for example + `%{fullData.name}`. To hide the + secondary box completely, use an empty tag + ``. + hovertemplatefallback + Fallback string that's displayed when a variable + referenced in a template is missing. If the boolean + value 'false' is passed in, the specifier with the + missing variable will be displayed. + hovertemplatesrc + Sets the source reference on Chart Studio Cloud for + `hovertemplate`. + hovertext + Same as `text`. + hovertextsrc + Sets the source reference on Chart Studio Cloud for + `hovertext`. + ids + Assigns id labels to each datum. These ids for object + constancy of data points during animation. Should be an + array of strings, not numbers or any other type. + idssrc + Sets the source reference on Chart Studio Cloud for + `ids`. + jitter + Sets the amount of jitter in the sample points drawn. + If 0, the sample points align along the distribution + axis. If 1, the sample points are drawn in a random + jitter of width equal to the width of the violins. + legend + Sets the reference to a legend to show this trace in. + References to these legends are "legend", "legend2", + "legend3", etc. Settings for these legends are set in + the layout, under `layout.legend`, `layout.legend2`, + etc. + legendgroup + Sets the legend group for this trace. Traces and shapes + part of the same legend group hide/show at the same + time when toggling legend items. + legendgrouptitle + :class:`plotly.graph_objects.violin.Legendgrouptitle` + instance or dict with compatible properties + legendrank + Sets the legend rank for this trace. Items and groups + with smaller ranks are presented on top/left side while + with "reversed" `legend.traceorder` they are on + bottom/right side. The default legendrank is 1000, so + that you can use ranks less than 1000 to place certain + items before all unranked items, and ranks greater than + 1000 to go after all unranked items. When having + unranked or equal rank items shapes would be displayed + after traces i.e. according to their order in data and + layout. + legendwidth + Sets the width (in px or fraction) of the legend for + this trace. + line + :class:`plotly.graph_objects.violin.Line` instance or + dict with compatible properties + marker + :class:`plotly.graph_objects.violin.Marker` instance or + dict with compatible properties + meanline + :class:`plotly.graph_objects.violin.Meanline` instance + or dict with compatible properties + meta + Assigns extra meta information associated with this + trace that can be used in various text attributes. + Attributes such as trace `name`, graph, axis and + colorbar `title.text`, annotation `text` + `rangeselector`, `updatemenues` and `sliders` `label` + text all support `meta`. To access the trace `meta` + values in an attribute in the same trace, simply use + `%{meta[i]}` where `i` is the index or key of the + `meta` item in question. To access trace `meta` in + layout attributes, use `%{data[n[.meta[i]}` where `i` + is the index or key of the `meta` and `n` is the trace + index. + metasrc + Sets the source reference on Chart Studio Cloud for + `meta`. + name + Sets the trace name. The trace name appears as the + legend item and on hover. For violin traces, the name + will also be used for the position coordinate, if `x` + and `x0` (`y` and `y0` if horizontal) are missing and + the position axis is categorical. Note that the trace + name is also used as a default value for attribute + `scalegroup` (please see its description for details). + offsetgroup + Set several traces linked to the same position axis or + matching axes to the same offsetgroup where bars of the + same position coordinate will line up. + opacity + Sets the opacity of the trace. + orientation + Sets the orientation of the violin(s). If "v" ("h"), + the distribution is visualized along the vertical + (horizontal). + pointpos + Sets the position of the sample points in relation to + the violins. If 0, the sample points are places over + the center of the violins. Positive (negative) values + correspond to positions to the right (left) for + vertical violins and above (below) for horizontal + violins. + points + If "outliers", only the sample points lying outside the + whiskers are shown If "suspectedoutliers", the outlier + points are shown and points either less than 4*Q1-3*Q3 + or greater than 4*Q3-3*Q1 are highlighted (see + `outliercolor`) If "all", all sample points are shown + If False, only the violins are shown with no sample + points. Defaults to "suspectedoutliers" when + `marker.outliercolor` or `marker.line.outliercolor` is + set, otherwise defaults to "outliers". + quartilemethod + Sets the method used to compute the sample's Q1 and Q3 + quartiles. The "linear" method uses the 25th percentile + for Q1 and 75th percentile for Q3 as computed using + method #10 (listed on + http://jse.amstat.org/v14n3/langford.html). The + "exclusive" method uses the median to divide the + ordered dataset into two halves if the sample is odd, + it does not include the median in either half - Q1 is + then the median of the lower half and Q3 the median of + the upper half. The "inclusive" method also uses the + median to divide the ordered dataset into two halves + but if the sample is odd, it includes the median in + both halves - Q1 is then the median of the lower half + and Q3 the median of the upper half. + scalegroup + If there are multiple violins that should be sized + according to to some metric (see `scalemode`), link + them by providing a non-empty group id here shared by + every trace in the same group. If a violin's `width` is + undefined, `scalegroup` will default to the trace's + name. In this case, violins with the same names will be + linked together + scalemode + Sets the metric by which the width of each violin is + determined. "width" means each violin has the same + (max) width "count" means the violins are scaled by the + number of sample points making up each violin. + selected + :class:`plotly.graph_objects.violin.Selected` instance + or dict with compatible properties + selectedpoints + Array containing integer indices of selected points. + Has an effect only for traces that support selections. + Note that an empty array means an empty selection where + the `unselected` are turned on for all points, whereas, + any other non-array values means no selection all where + the `selected` and `unselected` styles have no effect. + showlegend + Determines whether or not an item corresponding to this + trace is shown in the legend. + side + Determines on which side of the position value the + density function making up one half of a violin is + plotted. Useful when comparing two violin traces under + "overlay" mode, where one trace has `side` set to + "positive" and the other to "negative". + span + Sets the span in data space for which the density + function will be computed. Has an effect only when + `spanmode` is set to "manual". + spanmode + Sets the method by which the span in data space where + the density function will be computed. "soft" means the + span goes from the sample's minimum value minus two + bandwidths to the sample's maximum value plus two + bandwidths. "hard" means the span goes from the + sample's minimum to its maximum value. For custom span + settings, use mode "manual" and fill in the `span` + attribute. + stream + :class:`plotly.graph_objects.violin.Stream` instance or + dict with compatible properties + text + Sets the text elements associated with each sample + value. If a single string, the same string appears over + all the data points. If an array of string, the items + are mapped in order to the this trace's (x,y) + coordinates. To be seen, trace `hoverinfo` must contain + a "text" flag. + textsrc + Sets the source reference on Chart Studio Cloud for + `text`. + uid + Assign an id to this trace, Use this to provide object + constancy between traces during animations and + transitions. + uirevision + Controls persistence of some user-driven changes to the + trace: `constraintrange` in `parcoords` traces, as well + as some `editable: true` modifications such as `name` + and `colorbar.title`. Defaults to `layout.uirevision`. + Note that other user-driven trace attribute changes are + controlled by `layout` attributes: `trace.visible` is + controlled by `layout.legend.uirevision`, + `selectedpoints` is controlled by + `layout.selectionrevision`, and `colorbar.(x|y)` + (accessible with `config: {editable: true}`) is + controlled by `layout.editrevision`. Trace changes are + tracked by `uid`, which only falls back on trace index + if no `uid` is provided. So if your app can add/remove + traces before the end of the `data` array, such that + the same trace has a different index, you can still + preserve user-driven changes if you give each trace a + `uid` that stays with it as it moves. + unselected + :class:`plotly.graph_objects.violin.Unselected` + instance or dict with compatible properties + visible + Determines whether or not this trace is visible. If + "legendonly", the trace is not drawn, but can appear as + a legend item (provided that the legend itself is + visible). + width + Sets the width of the violin in data coordinates. If 0 + (default value) the width is automatically selected + based on the positions of other violin traces in the + same subplot. + x + Sets the x sample data or coordinates. See overview for + more info. + x0 + Sets the x coordinate for single-box traces or the + starting coordinate for multi-box traces set using + q1/median/q3. See overview for more info. + xaxis + Sets a reference between this trace's x coordinates and + a 2D cartesian x axis. If "x" (the default value), the + x coordinates refer to `layout.xaxis`. If "x2", the x + coordinates refer to `layout.xaxis2`, and so on. + xhoverformat + Sets the hover text formatting rulefor `x` using d3 + formatting mini-languages which are very similar to + those in Python. For numbers, see: + https://github.com/d3/d3-format/tree/v1.4.5#d3-format. + And for dates see: https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format. We add two items to + d3's date formatter: "%h" for half of the year as a + decimal number as well as "%{n}f" for fractional + seconds with n digits. For example, *2016-10-13 + 09:15:23.456* with tickformat "%H~%M~%S.%2f" would + display *09~15~23.46*By default the values are + formatted using `xaxis.hoverformat`. + xsrc + Sets the source reference on Chart Studio Cloud for + `x`. + y + Sets the y sample data or coordinates. See overview for + more info. + y0 + Sets the y coordinate for single-box traces or the + starting coordinate for multi-box traces set using + q1/median/q3. See overview for more info. + yaxis + Sets a reference between this trace's y coordinates and + a 2D cartesian y axis. If "y" (the default value), the + y coordinates refer to `layout.yaxis`. If "y2", the y + coordinates refer to `layout.yaxis2`, and so on. + yhoverformat + Sets the hover text formatting rulefor `y` using d3 + formatting mini-languages which are very similar to + those in Python. For numbers, see: + https://github.com/d3/d3-format/tree/v1.4.5#d3-format. + And for dates see: https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format. We add two items to + d3's date formatter: "%h" for half of the year as a + decimal number as well as "%{n}f" for fractional + seconds with n digits. For example, *2016-10-13 + 09:15:23.456* with tickformat "%H~%M~%S.%2f" would + display *09~15~23.46*By default the values are + formatted using `yaxis.hoverformat`. + ysrc + Sets the source reference on Chart Studio Cloud for + `y`. + zorder + Sets the layer on which this trace is displayed, + relative to other SVG traces on the same subplot. SVG + traces with higher `zorder` appear in front of those + with lower `zorder`. + row : 'all', int or None (default) + Subplot row index (starting from 1) for the trace to be + added. Only valid if figure was created using + `plotly.tools.make_subplots`.If 'all', addresses all + rows in the specified column(s). + col : 'all', int or None (default) + Subplot col index (starting from 1) for the trace to be + added. Only valid if figure was created using + `plotly.tools.make_subplots`.If 'all', addresses all + columns in the specified row(s). + secondary_y: boolean or None (default None) + If True, associate this trace with the secondary y-axis of the + subplot at the specified row and col. Only valid if all of the + following conditions are satisfied: + * The figure was created using `plotly.subplots.make_subplots`. + * The row and col arguments are not None + * The subplot at the specified row and col has type xy + (which is the default) and secondary_y True. These + properties are specified in the specs argument to + make_subplots. See the make_subplots docstring for more info. + + Returns + ------- + FigureWidget + """ + from plotly.graph_objs import Violin + + new_trace = Violin( + alignmentgroup=alignmentgroup, + bandwidth=bandwidth, + box=box, + customdata=customdata, + customdatasrc=customdatasrc, + fillcolor=fillcolor, + hoverinfo=hoverinfo, + hoverinfosrc=hoverinfosrc, + hoverlabel=hoverlabel, + hoveron=hoveron, + hovertemplate=hovertemplate, + hovertemplatefallback=hovertemplatefallback, + hovertemplatesrc=hovertemplatesrc, + hovertext=hovertext, + hovertextsrc=hovertextsrc, + ids=ids, + idssrc=idssrc, + jitter=jitter, + legend=legend, + legendgroup=legendgroup, + legendgrouptitle=legendgrouptitle, + legendrank=legendrank, + legendwidth=legendwidth, + line=line, + marker=marker, + meanline=meanline, + meta=meta, + metasrc=metasrc, + name=name, + offsetgroup=offsetgroup, + opacity=opacity, + orientation=orientation, + pointpos=pointpos, + points=points, + quartilemethod=quartilemethod, + scalegroup=scalegroup, + scalemode=scalemode, + selected=selected, + selectedpoints=selectedpoints, + showlegend=showlegend, + side=side, + span=span, + spanmode=spanmode, + stream=stream, + text=text, + textsrc=textsrc, + uid=uid, + uirevision=uirevision, + unselected=unselected, + visible=visible, + width=width, + x=x, + x0=x0, + xaxis=xaxis, + xhoverformat=xhoverformat, + xsrc=xsrc, + y=y, + y0=y0, + yaxis=yaxis, + yhoverformat=yhoverformat, + ysrc=ysrc, + zorder=zorder, + **kwargs, + ) + return self.add_trace(new_trace, row=row, col=col, secondary_y=secondary_y) + + def add_volume( + self, + autocolorscale=None, + caps=None, + cauto=None, + cmax=None, + cmid=None, + cmin=None, + coloraxis=None, + colorbar=None, + colorscale=None, + contour=None, + customdata=None, + customdatasrc=None, + flatshading=None, + hoverinfo=None, + hoverinfosrc=None, + hoverlabel=None, + hovertemplate=None, + hovertemplatefallback=None, + hovertemplatesrc=None, + hovertext=None, + hovertextsrc=None, + ids=None, + idssrc=None, + isomax=None, + isomin=None, + legend=None, + legendgroup=None, + legendgrouptitle=None, + legendrank=None, + legendwidth=None, + lighting=None, + lightposition=None, + meta=None, + metasrc=None, + name=None, + opacity=None, + opacityscale=None, + reversescale=None, + scene=None, + showlegend=None, + showscale=None, + slices=None, + spaceframe=None, + stream=None, + surface=None, + text=None, + textsrc=None, + uid=None, + uirevision=None, + value=None, + valuehoverformat=None, + valuesrc=None, + visible=None, + x=None, + xhoverformat=None, + xsrc=None, + y=None, + yhoverformat=None, + ysrc=None, + z=None, + zhoverformat=None, + zsrc=None, + row=None, + col=None, + **kwargs, + ) -> "FigureWidget": + """ + Add a new Volume trace + + Draws volume trace between iso-min and iso-max values with + coordinates given by four 1-dimensional arrays containing the + `value`, `x`, `y` and `z` of every vertex of a uniform or non- + uniform 3-D grid. Horizontal or vertical slices, caps as well + as spaceframe between iso-min and iso-max values could also be + drawn using this trace. + + Parameters + ---------- + autocolorscale + Determines whether the colorscale is a default palette + (`autocolorscale: true`) or the palette determined by + `colorscale`. In case `colorscale` is unspecified or + `autocolorscale` is true, the default palette will be + chosen according to whether numbers in the `color` + array are all positive, all negative or mixed. + caps + :class:`plotly.graph_objects.volume.Caps` instance or + dict with compatible properties + cauto + Determines whether or not the color domain is computed + with respect to the input data (here `value`) or the + bounds set in `cmin` and `cmax` Defaults to `false` + when `cmin` and `cmax` are set by the user. + cmax + Sets the upper bound of the color domain. Value should + have the same units as `value` and if set, `cmin` must + be set as well. + cmid + Sets the mid-point of the color domain by scaling + `cmin` and/or `cmax` to be equidistant to this point. + Value should have the same units as `value`. Has no + effect when `cauto` is `false`. + cmin + Sets the lower bound of the color domain. Value should + have the same units as `value` and if set, `cmax` must + be set as well. + coloraxis + Sets a reference to a shared color axis. References to + these shared color axes are "coloraxis", "coloraxis2", + "coloraxis3", etc. Settings for these shared color axes + are set in the layout, under `layout.coloraxis`, + `layout.coloraxis2`, etc. Note that multiple color + scales can be linked to the same color axis. + colorbar + :class:`plotly.graph_objects.volume.ColorBar` instance + or dict with compatible properties + colorscale + Sets the colorscale. The colorscale must be an array + containing arrays mapping a normalized value to an rgb, + rgba, hex, hsl, hsv, or named color string. At minimum, + a mapping for the lowest (0) and highest (1) values are + required. For example, `[[0, 'rgb(0,0,255)'], [1, + 'rgb(255,0,0)']]`. To control the bounds of the + colorscale in color space, use `cmin` and `cmax`. + Alternatively, `colorscale` may be a palette name + string of the following list: Blackbody,Bluered,Blues,C + ividis,Earth,Electric,Greens,Greys,Hot,Jet,Picnic,Portl + and,Rainbow,RdBu,Reds,Viridis,YlGnBu,YlOrRd. + contour + :class:`plotly.graph_objects.volume.Contour` instance + or dict with compatible properties + customdata + Assigns extra data each datum. This may be useful when + listening to hover, click and selection events. Note + that, "scatter" traces also appends customdata items in + the markers DOM elements + customdatasrc + Sets the source reference on Chart Studio Cloud for + `customdata`. + flatshading + Determines whether or not normal smoothing is applied + to the meshes, creating meshes with an angular, low- + poly look via flat reflections. + hoverinfo + Determines which trace information appear on hover. If + `none` or `skip` are set, no information is displayed + upon hovering. But, if `none` is set, click and hover + events are still fired. + hoverinfosrc + Sets the source reference on Chart Studio Cloud for + `hoverinfo`. + hoverlabel + :class:`plotly.graph_objects.volume.Hoverlabel` + instance or dict with compatible properties + hovertemplate + Template string used for rendering the information that + appear on hover box. Note that this will override + `hoverinfo`. Variables are inserted using %{variable}, + for example "y: %{y}" as well as %{xother}, {%_xother}, + {%_xother_}, {%xother_}. When showing info for several + points, "xother" will be added to those with different + x positions from the first point. An underscore before + or after "(x|y)other" will add a space on that side, + only when this field is shown. Numbers are formatted + using d3-format's syntax %{variable:d3-format}, for + example "Price: %{y:$.2f}". + https://github.com/d3/d3-format/tree/v1.4.5#d3-format + for details on the formatting syntax. Dates are + formatted using d3-time-format's syntax + %{variable|d3-time-format}, for example "Day: + %{2019-01-01|%A}". https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format for details on the + date formatting syntax. Variables that can't be found + will be replaced with the specifier. For example, a + template of "data: %{x}, %{y}" will result in a value + of "data: 1, %{y}" if x is 1 and y is missing. + Variables with an undefined value will be replaced with + the fallback value. The variables available in + `hovertemplate` are the ones emitted as event data + described at this link + https://plotly.com/javascript/plotlyjs-events/#event- + data. Additionally, all attributes that can be + specified per-point (the ones that are `arrayOk: true`) + are available. Anything contained in tag `` is + displayed in the secondary box, for example + `%{fullData.name}`. To hide the + secondary box completely, use an empty tag + ``. + hovertemplatefallback + Fallback string that's displayed when a variable + referenced in a template is missing. If the boolean + value 'false' is passed in, the specifier with the + missing variable will be displayed. + hovertemplatesrc + Sets the source reference on Chart Studio Cloud for + `hovertemplate`. + hovertext + Same as `text`. + hovertextsrc + Sets the source reference on Chart Studio Cloud for + `hovertext`. + ids + Assigns id labels to each datum. These ids for object + constancy of data points during animation. Should be an + array of strings, not numbers or any other type. + idssrc + Sets the source reference on Chart Studio Cloud for + `ids`. + isomax + Sets the maximum boundary for iso-surface plot. + isomin + Sets the minimum boundary for iso-surface plot. + legend + Sets the reference to a legend to show this trace in. + References to these legends are "legend", "legend2", + "legend3", etc. Settings for these legends are set in + the layout, under `layout.legend`, `layout.legend2`, + etc. + legendgroup + Sets the legend group for this trace. Traces and shapes + part of the same legend group hide/show at the same + time when toggling legend items. + legendgrouptitle + :class:`plotly.graph_objects.volume.Legendgrouptitle` + instance or dict with compatible properties + legendrank + Sets the legend rank for this trace. Items and groups + with smaller ranks are presented on top/left side while + with "reversed" `legend.traceorder` they are on + bottom/right side. The default legendrank is 1000, so + that you can use ranks less than 1000 to place certain + items before all unranked items, and ranks greater than + 1000 to go after all unranked items. When having + unranked or equal rank items shapes would be displayed + after traces i.e. according to their order in data and + layout. + legendwidth + Sets the width (in px or fraction) of the legend for + this trace. + lighting + :class:`plotly.graph_objects.volume.Lighting` instance + or dict with compatible properties + lightposition + :class:`plotly.graph_objects.volume.Lightposition` + instance or dict with compatible properties + meta + Assigns extra meta information associated with this + trace that can be used in various text attributes. + Attributes such as trace `name`, graph, axis and + colorbar `title.text`, annotation `text` + `rangeselector`, `updatemenues` and `sliders` `label` + text all support `meta`. To access the trace `meta` + values in an attribute in the same trace, simply use + `%{meta[i]}` where `i` is the index or key of the + `meta` item in question. To access trace `meta` in + layout attributes, use `%{data[n[.meta[i]}` where `i` + is the index or key of the `meta` and `n` is the trace + index. + metasrc + Sets the source reference on Chart Studio Cloud for + `meta`. + name + Sets the trace name. The trace name appears as the + legend item and on hover. + opacity + Sets the opacity of the surface. Please note that in + the case of using high `opacity` values for example a + value greater than or equal to 0.5 on two surfaces (and + 0.25 with four surfaces), an overlay of multiple + transparent surfaces may not perfectly be sorted in + depth by the webgl API. This behavior may be improved + in the near future and is subject to change. + opacityscale + Sets the opacityscale. The opacityscale must be an + array containing arrays mapping a normalized value to + an opacity value. At minimum, a mapping for the lowest + (0) and highest (1) values are required. For example, + `[[0, 1], [0.5, 0.2], [1, 1]]` means that higher/lower + values would have higher opacity values and those in + the middle would be more transparent Alternatively, + `opacityscale` may be a palette name string of the + following list: 'min', 'max', 'extremes' and 'uniform'. + The default is 'uniform'. + reversescale + Reverses the color mapping if true. If true, `cmin` + will correspond to the last color in the array and + `cmax` will correspond to the first color. + scene + Sets a reference between this trace's 3D coordinate + system and a 3D scene. If "scene" (the default value), + the (x,y,z) coordinates refer to `layout.scene`. If + "scene2", the (x,y,z) coordinates refer to + `layout.scene2`, and so on. + showlegend + Determines whether or not an item corresponding to this + trace is shown in the legend. + showscale + Determines whether or not a colorbar is displayed for + this trace. + slices + :class:`plotly.graph_objects.volume.Slices` instance or + dict with compatible properties + spaceframe + :class:`plotly.graph_objects.volume.Spaceframe` + instance or dict with compatible properties + stream + :class:`plotly.graph_objects.volume.Stream` instance or + dict with compatible properties + surface + :class:`plotly.graph_objects.volume.Surface` instance + or dict with compatible properties + text + Sets the text elements associated with the vertices. If + trace `hoverinfo` contains a "text" flag and + "hovertext" is not set, these elements will be seen in + the hover labels. + textsrc + Sets the source reference on Chart Studio Cloud for + `text`. + uid + Assign an id to this trace, Use this to provide object + constancy between traces during animations and + transitions. + uirevision + Controls persistence of some user-driven changes to the + trace: `constraintrange` in `parcoords` traces, as well + as some `editable: true` modifications such as `name` + and `colorbar.title`. Defaults to `layout.uirevision`. + Note that other user-driven trace attribute changes are + controlled by `layout` attributes: `trace.visible` is + controlled by `layout.legend.uirevision`, + `selectedpoints` is controlled by + `layout.selectionrevision`, and `colorbar.(x|y)` + (accessible with `config: {editable: true}`) is + controlled by `layout.editrevision`. Trace changes are + tracked by `uid`, which only falls back on trace index + if no `uid` is provided. So if your app can add/remove + traces before the end of the `data` array, such that + the same trace has a different index, you can still + preserve user-driven changes if you give each trace a + `uid` that stays with it as it moves. + value + Sets the 4th dimension (value) of the vertices. + valuehoverformat + Sets the hover text formatting rulefor `value` using + d3 formatting mini-languages which are very similar to + those in Python. For numbers, see: https://github.com/d + 3/d3-format/tree/v1.4.5#d3-format.By default the values + are formatted using generic number format. + valuesrc + Sets the source reference on Chart Studio Cloud for + `value`. + visible + Determines whether or not this trace is visible. If + "legendonly", the trace is not drawn, but can appear as + a legend item (provided that the legend itself is + visible). + x + Sets the X coordinates of the vertices on X axis. + xhoverformat + Sets the hover text formatting rulefor `x` using d3 + formatting mini-languages which are very similar to + those in Python. For numbers, see: + https://github.com/d3/d3-format/tree/v1.4.5#d3-format. + And for dates see: https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format. We add two items to + d3's date formatter: "%h" for half of the year as a + decimal number as well as "%{n}f" for fractional + seconds with n digits. For example, *2016-10-13 + 09:15:23.456* with tickformat "%H~%M~%S.%2f" would + display *09~15~23.46*By default the values are + formatted using `xaxis.hoverformat`. + xsrc + Sets the source reference on Chart Studio Cloud for + `x`. + y + Sets the Y coordinates of the vertices on Y axis. + yhoverformat + Sets the hover text formatting rulefor `y` using d3 + formatting mini-languages which are very similar to + those in Python. For numbers, see: + https://github.com/d3/d3-format/tree/v1.4.5#d3-format. + And for dates see: https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format. We add two items to + d3's date formatter: "%h" for half of the year as a + decimal number as well as "%{n}f" for fractional + seconds with n digits. For example, *2016-10-13 + 09:15:23.456* with tickformat "%H~%M~%S.%2f" would + display *09~15~23.46*By default the values are + formatted using `yaxis.hoverformat`. + ysrc + Sets the source reference on Chart Studio Cloud for + `y`. + z + Sets the Z coordinates of the vertices on Z axis. + zhoverformat + Sets the hover text formatting rulefor `z` using d3 + formatting mini-languages which are very similar to + those in Python. For numbers, see: + https://github.com/d3/d3-format/tree/v1.4.5#d3-format. + And for dates see: https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format. We add two items to + d3's date formatter: "%h" for half of the year as a + decimal number as well as "%{n}f" for fractional + seconds with n digits. For example, *2016-10-13 + 09:15:23.456* with tickformat "%H~%M~%S.%2f" would + display *09~15~23.46*By default the values are + formatted using `zaxis.hoverformat`. + zsrc + Sets the source reference on Chart Studio Cloud for + `z`. + row : 'all', int or None (default) + Subplot row index (starting from 1) for the trace to be + added. Only valid if figure was created using + `plotly.tools.make_subplots`.If 'all', addresses all + rows in the specified column(s). + col : 'all', int or None (default) + Subplot col index (starting from 1) for the trace to be + added. Only valid if figure was created using + `plotly.tools.make_subplots`.If 'all', addresses all + columns in the specified row(s). + + Returns + ------- + FigureWidget + """ + from plotly.graph_objs import Volume + + new_trace = Volume( + autocolorscale=autocolorscale, + caps=caps, + cauto=cauto, + cmax=cmax, + cmid=cmid, + cmin=cmin, + coloraxis=coloraxis, + colorbar=colorbar, + colorscale=colorscale, + contour=contour, + customdata=customdata, + customdatasrc=customdatasrc, + flatshading=flatshading, + hoverinfo=hoverinfo, + hoverinfosrc=hoverinfosrc, + hoverlabel=hoverlabel, + hovertemplate=hovertemplate, + hovertemplatefallback=hovertemplatefallback, + hovertemplatesrc=hovertemplatesrc, + hovertext=hovertext, + hovertextsrc=hovertextsrc, + ids=ids, + idssrc=idssrc, + isomax=isomax, + isomin=isomin, + legend=legend, + legendgroup=legendgroup, + legendgrouptitle=legendgrouptitle, + legendrank=legendrank, + legendwidth=legendwidth, + lighting=lighting, + lightposition=lightposition, + meta=meta, + metasrc=metasrc, + name=name, + opacity=opacity, + opacityscale=opacityscale, + reversescale=reversescale, + scene=scene, + showlegend=showlegend, + showscale=showscale, + slices=slices, + spaceframe=spaceframe, + stream=stream, + surface=surface, + text=text, + textsrc=textsrc, + uid=uid, + uirevision=uirevision, + value=value, + valuehoverformat=valuehoverformat, + valuesrc=valuesrc, + visible=visible, + x=x, + xhoverformat=xhoverformat, + xsrc=xsrc, + y=y, + yhoverformat=yhoverformat, + ysrc=ysrc, + z=z, + zhoverformat=zhoverformat, + zsrc=zsrc, + **kwargs, + ) + return self.add_trace(new_trace, row=row, col=col) + + def add_waterfall( + self, + alignmentgroup=None, + base=None, + cliponaxis=None, + connector=None, + constraintext=None, + customdata=None, + customdatasrc=None, + decreasing=None, + dx=None, + dy=None, + hoverinfo=None, + hoverinfosrc=None, + hoverlabel=None, + hovertemplate=None, + hovertemplatefallback=None, + hovertemplatesrc=None, + hovertext=None, + hovertextsrc=None, + ids=None, + idssrc=None, + increasing=None, + insidetextanchor=None, + insidetextfont=None, + legend=None, + legendgroup=None, + legendgrouptitle=None, + legendrank=None, + legendwidth=None, + measure=None, + measuresrc=None, + meta=None, + metasrc=None, + name=None, + offset=None, + offsetgroup=None, + offsetsrc=None, + opacity=None, + orientation=None, + outsidetextfont=None, + selectedpoints=None, + showlegend=None, + stream=None, + text=None, + textangle=None, + textfont=None, + textinfo=None, + textposition=None, + textpositionsrc=None, + textsrc=None, + texttemplate=None, + texttemplatefallback=None, + texttemplatesrc=None, + totals=None, + uid=None, + uirevision=None, + visible=None, + width=None, + widthsrc=None, + x=None, + x0=None, + xaxis=None, + xhoverformat=None, + xperiod=None, + xperiod0=None, + xperiodalignment=None, + xsrc=None, + y=None, + y0=None, + yaxis=None, + yhoverformat=None, + yperiod=None, + yperiod0=None, + yperiodalignment=None, + ysrc=None, + zorder=None, + row=None, + col=None, + secondary_y=None, + **kwargs, + ) -> "FigureWidget": + """ + Add a new Waterfall trace + + Draws waterfall trace which is useful graph to displays the + contribution of various elements (either positive or negative) + in a bar chart. The data visualized by the span of the bars is + set in `y` if `orientation` is set to "v" (the default) and the + labels are set in `x`. By setting `orientation` to "h", the + roles are interchanged. + + Parameters + ---------- + alignmentgroup + Set several traces linked to the same position axis or + matching axes to the same alignmentgroup. This controls + whether bars compute their positional range dependently + or independently. + base + Sets where the bar base is drawn (in position axis + units). + cliponaxis + Determines whether the text nodes are clipped about the + subplot axes. To show the text nodes above axis lines + and tick labels, make sure to set `xaxis.layer` and + `yaxis.layer` to *below traces*. + connector + :class:`plotly.graph_objects.waterfall.Connector` + instance or dict with compatible properties + constraintext + Constrain the size of text inside or outside a bar to + be no larger than the bar itself. + customdata + Assigns extra data each datum. This may be useful when + listening to hover, click and selection events. Note + that, "scatter" traces also appends customdata items in + the markers DOM elements + customdatasrc + Sets the source reference on Chart Studio Cloud for + `customdata`. + decreasing + :class:`plotly.graph_objects.waterfall.Decreasing` + instance or dict with compatible properties + dx + Sets the x coordinate step. See `x0` for more info. + dy + Sets the y coordinate step. See `y0` for more info. + hoverinfo + Determines which trace information appear on hover. If + `none` or `skip` are set, no information is displayed + upon hovering. But, if `none` is set, click and hover + events are still fired. + hoverinfosrc + Sets the source reference on Chart Studio Cloud for + `hoverinfo`. + hoverlabel + :class:`plotly.graph_objects.waterfall.Hoverlabel` + instance or dict with compatible properties + hovertemplate + Template string used for rendering the information that + appear on hover box. Note that this will override + `hoverinfo`. Variables are inserted using %{variable}, + for example "y: %{y}" as well as %{xother}, {%_xother}, + {%_xother_}, {%xother_}. When showing info for several + points, "xother" will be added to those with different + x positions from the first point. An underscore before + or after "(x|y)other" will add a space on that side, + only when this field is shown. Numbers are formatted + using d3-format's syntax %{variable:d3-format}, for + example "Price: %{y:$.2f}". + https://github.com/d3/d3-format/tree/v1.4.5#d3-format + for details on the formatting syntax. Dates are + formatted using d3-time-format's syntax + %{variable|d3-time-format}, for example "Day: + %{2019-01-01|%A}". https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format for details on the + date formatting syntax. Variables that can't be found + will be replaced with the specifier. For example, a + template of "data: %{x}, %{y}" will result in a value + of "data: 1, %{y}" if x is 1 and y is missing. + Variables with an undefined value will be replaced with + the fallback value. The variables available in + `hovertemplate` are the ones emitted as event data + described at this link + https://plotly.com/javascript/plotlyjs-events/#event- + data. Additionally, all attributes that can be + specified per-point (the ones that are `arrayOk: true`) + are available. Finally, the template string has access + to variables `initial`, `delta` and `final`. Anything + contained in tag `` is displayed in the + secondary box, for example + `%{fullData.name}`. To hide the + secondary box completely, use an empty tag + ``. + hovertemplatefallback + Fallback string that's displayed when a variable + referenced in a template is missing. If the boolean + value 'false' is passed in, the specifier with the + missing variable will be displayed. + hovertemplatesrc + Sets the source reference on Chart Studio Cloud for + `hovertemplate`. + hovertext + Sets hover text elements associated with each (x,y) + pair. If a single string, the same string appears over + all the data points. If an array of string, the items + are mapped in order to the this trace's (x,y) + coordinates. To be seen, trace `hoverinfo` must contain + a "text" flag. + hovertextsrc + Sets the source reference on Chart Studio Cloud for + `hovertext`. + ids + Assigns id labels to each datum. These ids for object + constancy of data points during animation. Should be an + array of strings, not numbers or any other type. + idssrc + Sets the source reference on Chart Studio Cloud for + `ids`. + increasing + :class:`plotly.graph_objects.waterfall.Increasing` + instance or dict with compatible properties + insidetextanchor + Determines if texts are kept at center or start/end + points in `textposition` "inside" mode. + insidetextfont + Sets the font used for `text` lying inside the bar. + legend + Sets the reference to a legend to show this trace in. + References to these legends are "legend", "legend2", + "legend3", etc. Settings for these legends are set in + the layout, under `layout.legend`, `layout.legend2`, + etc. + legendgroup + Sets the legend group for this trace. Traces and shapes + part of the same legend group hide/show at the same + time when toggling legend items. + legendgrouptitle + :class:`plotly.graph_objects.waterfall.Legendgrouptitle + ` instance or dict with compatible properties + legendrank + Sets the legend rank for this trace. Items and groups + with smaller ranks are presented on top/left side while + with "reversed" `legend.traceorder` they are on + bottom/right side. The default legendrank is 1000, so + that you can use ranks less than 1000 to place certain + items before all unranked items, and ranks greater than + 1000 to go after all unranked items. When having + unranked or equal rank items shapes would be displayed + after traces i.e. according to their order in data and + layout. + legendwidth + Sets the width (in px or fraction) of the legend for + this trace. + measure + An array containing types of values. By default the + values are considered as 'relative'. However; it is + possible to use 'total' to compute the sums. Also + 'absolute' could be applied to reset the computed total + or to declare an initial value where needed. + measuresrc + Sets the source reference on Chart Studio Cloud for + `measure`. + meta + Assigns extra meta information associated with this + trace that can be used in various text attributes. + Attributes such as trace `name`, graph, axis and + colorbar `title.text`, annotation `text` + `rangeselector`, `updatemenues` and `sliders` `label` + text all support `meta`. To access the trace `meta` + values in an attribute in the same trace, simply use + `%{meta[i]}` where `i` is the index or key of the + `meta` item in question. To access trace `meta` in + layout attributes, use `%{data[n[.meta[i]}` where `i` + is the index or key of the `meta` and `n` is the trace + index. + metasrc + Sets the source reference on Chart Studio Cloud for + `meta`. + name + Sets the trace name. The trace name appears as the + legend item and on hover. + offset + Shifts the position where the bar is drawn (in position + axis units). In "group" barmode, traces that set + "offset" will be excluded and drawn in "overlay" mode + instead. + offsetgroup + Set several traces linked to the same position axis or + matching axes to the same offsetgroup where bars of the + same position coordinate will line up. + offsetsrc + Sets the source reference on Chart Studio Cloud for + `offset`. + opacity + Sets the opacity of the trace. + orientation + Sets the orientation of the bars. With "v" ("h"), the + value of the each bar spans along the vertical + (horizontal). + outsidetextfont + Sets the font used for `text` lying outside the bar. + selectedpoints + Array containing integer indices of selected points. + Has an effect only for traces that support selections. + Note that an empty array means an empty selection where + the `unselected` are turned on for all points, whereas, + any other non-array values means no selection all where + the `selected` and `unselected` styles have no effect. + showlegend + Determines whether or not an item corresponding to this + trace is shown in the legend. + stream + :class:`plotly.graph_objects.waterfall.Stream` instance + or dict with compatible properties + text + Sets text elements associated with each (x,y) pair. If + a single string, the same string appears over all the + data points. If an array of string, the items are + mapped in order to the this trace's (x,y) coordinates. + If trace `hoverinfo` contains a "text" flag and + "hovertext" is not set, these elements will be seen in + the hover labels. + textangle + Sets the angle of the tick labels with respect to the + bar. For example, a `tickangle` of -90 draws the tick + labels vertically. With "auto" the texts may + automatically be rotated to fit with the maximum size + in bars. + textfont + Sets the font used for `text`. + textinfo + Determines which trace information appear on the graph. + In the case of having multiple waterfalls, totals are + computed separately (per trace). + textposition + Specifies the location of the `text`. "inside" + positions `text` inside, next to the bar end (rotated + and scaled if needed). "outside" positions `text` + outside, next to the bar end (scaled if needed), unless + there is another bar stacked on this one, then the text + gets pushed inside. "auto" tries to position `text` + inside the bar, but if the bar is too small and no bar + is stacked on this one the text is moved outside. If + "none", no text appears. + textpositionsrc + Sets the source reference on Chart Studio Cloud for + `textposition`. + textsrc + Sets the source reference on Chart Studio Cloud for + `text`. + texttemplate + Template string used for rendering the information text + that appears on points. Note that this will override + `textinfo`. Variables are inserted using %{variable}, + for example "y: %{y}". Numbers are formatted using + d3-format's syntax %{variable:d3-format}, for example + "Price: %{y:$.2f}". + https://github.com/d3/d3-format/tree/v1.4.5#d3-format + for details on the formatting syntax. Dates are + formatted using d3-time-format's syntax + %{variable|d3-time-format}, for example "Day: + %{2019-01-01|%A}". https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format for details on the + date formatting syntax. Variables that can't be found + will be replaced with the specifier. For example, a + template of "data: %{x}, %{y}" will result in a value + of "data: 1, %{y}" if x is 1 and y is missing. + Variables with an undefined value will be replaced with + the fallback value. All attributes that can be + specified per-point (the ones that are `arrayOk: true`) + are available. Finally, the template string has access + to variables `initial`, `delta`, `final` and `label`. + texttemplatefallback + Fallback string that's displayed when a variable + referenced in a template is missing. If the boolean + value 'false' is passed in, the specifier with the + missing variable will be displayed. + texttemplatesrc + Sets the source reference on Chart Studio Cloud for + `texttemplate`. + totals + :class:`plotly.graph_objects.waterfall.Totals` instance + or dict with compatible properties + uid + Assign an id to this trace, Use this to provide object + constancy between traces during animations and + transitions. + uirevision + Controls persistence of some user-driven changes to the + trace: `constraintrange` in `parcoords` traces, as well + as some `editable: true` modifications such as `name` + and `colorbar.title`. Defaults to `layout.uirevision`. + Note that other user-driven trace attribute changes are + controlled by `layout` attributes: `trace.visible` is + controlled by `layout.legend.uirevision`, + `selectedpoints` is controlled by + `layout.selectionrevision`, and `colorbar.(x|y)` + (accessible with `config: {editable: true}`) is + controlled by `layout.editrevision`. Trace changes are + tracked by `uid`, which only falls back on trace index + if no `uid` is provided. So if your app can add/remove + traces before the end of the `data` array, such that + the same trace has a different index, you can still + preserve user-driven changes if you give each trace a + `uid` that stays with it as it moves. + visible + Determines whether or not this trace is visible. If + "legendonly", the trace is not drawn, but can appear as + a legend item (provided that the legend itself is + visible). + width + Sets the bar width (in position axis units). + widthsrc + Sets the source reference on Chart Studio Cloud for + `width`. + x + Sets the x coordinates. + x0 + Alternate to `x`. Builds a linear space of x + coordinates. Use with `dx` where `x0` is the starting + coordinate and `dx` the step. + xaxis + Sets a reference between this trace's x coordinates and + a 2D cartesian x axis. If "x" (the default value), the + x coordinates refer to `layout.xaxis`. If "x2", the x + coordinates refer to `layout.xaxis2`, and so on. + xhoverformat + Sets the hover text formatting rulefor `x` using d3 + formatting mini-languages which are very similar to + those in Python. For numbers, see: + https://github.com/d3/d3-format/tree/v1.4.5#d3-format. + And for dates see: https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format. We add two items to + d3's date formatter: "%h" for half of the year as a + decimal number as well as "%{n}f" for fractional + seconds with n digits. For example, *2016-10-13 + 09:15:23.456* with tickformat "%H~%M~%S.%2f" would + display *09~15~23.46*By default the values are + formatted using `xaxis.hoverformat`. + xperiod + Only relevant when the axis `type` is "date". Sets the + period positioning in milliseconds or "M" on the x + axis. Special values in the form of "M" could be + used to declare the number of months. In this case `n` + must be a positive integer. + xperiod0 + Only relevant when the axis `type` is "date". Sets the + base for period positioning in milliseconds or date + string on the x0 axis. When `x0period` is round number + of weeks, the `x0period0` by default would be on a + Sunday i.e. 2000-01-02, otherwise it would be at + 2000-01-01. + xperiodalignment + Only relevant when the axis `type` is "date". Sets the + alignment of data points on the x axis. + xsrc + Sets the source reference on Chart Studio Cloud for + `x`. + y + Sets the y coordinates. + y0 + Alternate to `y`. Builds a linear space of y + coordinates. Use with `dy` where `y0` is the starting + coordinate and `dy` the step. + yaxis + Sets a reference between this trace's y coordinates and + a 2D cartesian y axis. If "y" (the default value), the + y coordinates refer to `layout.yaxis`. If "y2", the y + coordinates refer to `layout.yaxis2`, and so on. + yhoverformat + Sets the hover text formatting rulefor `y` using d3 + formatting mini-languages which are very similar to + those in Python. For numbers, see: + https://github.com/d3/d3-format/tree/v1.4.5#d3-format. + And for dates see: https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format. We add two items to + d3's date formatter: "%h" for half of the year as a + decimal number as well as "%{n}f" for fractional + seconds with n digits. For example, *2016-10-13 + 09:15:23.456* with tickformat "%H~%M~%S.%2f" would + display *09~15~23.46*By default the values are + formatted using `yaxis.hoverformat`. + yperiod + Only relevant when the axis `type` is "date". Sets the + period positioning in milliseconds or "M" on the y + axis. Special values in the form of "M" could be + used to declare the number of months. In this case `n` + must be a positive integer. + yperiod0 + Only relevant when the axis `type` is "date". Sets the + base for period positioning in milliseconds or date + string on the y0 axis. When `y0period` is round number + of weeks, the `y0period0` by default would be on a + Sunday i.e. 2000-01-02, otherwise it would be at + 2000-01-01. + yperiodalignment + Only relevant when the axis `type` is "date". Sets the + alignment of data points on the y axis. + ysrc + Sets the source reference on Chart Studio Cloud for + `y`. + zorder + Sets the layer on which this trace is displayed, + relative to other SVG traces on the same subplot. SVG + traces with higher `zorder` appear in front of those + with lower `zorder`. + row : 'all', int or None (default) + Subplot row index (starting from 1) for the trace to be + added. Only valid if figure was created using + `plotly.tools.make_subplots`.If 'all', addresses all + rows in the specified column(s). + col : 'all', int or None (default) + Subplot col index (starting from 1) for the trace to be + added. Only valid if figure was created using + `plotly.tools.make_subplots`.If 'all', addresses all + columns in the specified row(s). + secondary_y: boolean or None (default None) + If True, associate this trace with the secondary y-axis of the + subplot at the specified row and col. Only valid if all of the + following conditions are satisfied: + * The figure was created using `plotly.subplots.make_subplots`. + * The row and col arguments are not None + * The subplot at the specified row and col has type xy + (which is the default) and secondary_y True. These + properties are specified in the specs argument to + make_subplots. See the make_subplots docstring for more info. + + Returns + ------- + FigureWidget + """ + from plotly.graph_objs import Waterfall + + new_trace = Waterfall( + alignmentgroup=alignmentgroup, + base=base, + cliponaxis=cliponaxis, + connector=connector, + constraintext=constraintext, + customdata=customdata, + customdatasrc=customdatasrc, + decreasing=decreasing, + dx=dx, + dy=dy, + hoverinfo=hoverinfo, + hoverinfosrc=hoverinfosrc, + hoverlabel=hoverlabel, + hovertemplate=hovertemplate, + hovertemplatefallback=hovertemplatefallback, + hovertemplatesrc=hovertemplatesrc, + hovertext=hovertext, + hovertextsrc=hovertextsrc, + ids=ids, + idssrc=idssrc, + increasing=increasing, + insidetextanchor=insidetextanchor, + insidetextfont=insidetextfont, + legend=legend, + legendgroup=legendgroup, + legendgrouptitle=legendgrouptitle, + legendrank=legendrank, + legendwidth=legendwidth, + measure=measure, + measuresrc=measuresrc, + meta=meta, + metasrc=metasrc, + name=name, + offset=offset, + offsetgroup=offsetgroup, + offsetsrc=offsetsrc, + opacity=opacity, + orientation=orientation, + outsidetextfont=outsidetextfont, + selectedpoints=selectedpoints, + showlegend=showlegend, + stream=stream, + text=text, + textangle=textangle, + textfont=textfont, + textinfo=textinfo, + textposition=textposition, + textpositionsrc=textpositionsrc, + textsrc=textsrc, + texttemplate=texttemplate, + texttemplatefallback=texttemplatefallback, + texttemplatesrc=texttemplatesrc, + totals=totals, + uid=uid, + uirevision=uirevision, + visible=visible, + width=width, + widthsrc=widthsrc, + x=x, + x0=x0, + xaxis=xaxis, + xhoverformat=xhoverformat, + xperiod=xperiod, + xperiod0=xperiod0, + xperiodalignment=xperiodalignment, + xsrc=xsrc, + y=y, + y0=y0, + yaxis=yaxis, + yhoverformat=yhoverformat, + yperiod=yperiod, + yperiod0=yperiod0, + yperiodalignment=yperiodalignment, + ysrc=ysrc, + zorder=zorder, + **kwargs, + ) + return self.add_trace(new_trace, row=row, col=col, secondary_y=secondary_y) + + def select_coloraxes(self, selector=None, row=None, col=None): + """ + Select coloraxis subplot objects from a particular subplot cell + and/or coloraxis subplot objects that satisfy custom selection + criteria. + + Parameters + ---------- + selector: dict, function, or None (default None) + Dict to use as selection criteria. + coloraxis objects will be selected if they contain + properties corresponding to all of the dictionary's keys, with + values that exactly match the supplied values. If None + (the default), all coloraxis objects are selected. If a + function, it must be a function accepting a single argument and + returning a boolean. The function will be called on each + coloraxis and those for which the function returned True will + be in the selection. + row, col: int or None (default None) + Subplot row and column index of coloraxis objects to select. + To select coloraxis objects by row and column, the Figure + must have been created using plotly.subplots.make_subplots. + If None (the default), all coloraxis objects are selected. + Returns + ------- + generator + Generator that iterates through all of the coloraxis + objects that satisfy all of the specified selection criteria + """ + + return self._select_layout_subplots_by_prefix("coloraxis", selector, row, col) + + def for_each_coloraxis( + self, fn, selector=None, row=None, col=None + ) -> "FigureWidget": + """ + Apply a function to all coloraxis objects that satisfy the + specified selection criteria + + Parameters + ---------- + fn: + Function that inputs a single coloraxis object. + selector: dict, function, or None (default None) + Dict to use as selection criteria. + coloraxis objects will be selected if they contain + properties corresponding to all of the dictionary's keys, with + values that exactly match the supplied values. If None + (the default), all coloraxis objects are selected. If a + function, it must be a function accepting a single argument and + returning a boolean. The function will be called on each + coloraxis and those for which the function returned True will + be in the selection. + row, col: int or None (default None) + Subplot row and column index of coloraxis objects to select. + To select coloraxis objects by row and column, the Figure + must have been created using plotly.subplots.make_subplots. + If None (the default), all coloraxis objects are selected. + Returns + ------- + self + Returns the FigureWidget object that the method was called on + """ + for obj in self.select_coloraxes(selector=selector, row=row, col=col): + fn(obj) + + return self + + def update_coloraxes( + self, patch=None, selector=None, overwrite=False, row=None, col=None, **kwargs + ) -> "FigureWidget": + """ + Perform a property update operation on all coloraxis objects + that satisfy the specified selection criteria + + Parameters + ---------- + patch: dict + Dictionary of property updates to be applied to all + coloraxis objects that satisfy the selection criteria. + selector: dict, function, or None (default None) + Dict to use as selection criteria. + coloraxis objects will be selected if they contain + properties corresponding to all of the dictionary's keys, with + values that exactly match the supplied values. If None + (the default), all coloraxis objects are selected. If a + function, it must be a function accepting a single argument and + returning a boolean. The function will be called on each + coloraxis and those for which the function returned True will + be in the selection. + overwrite: bool + If True, overwrite existing properties. If False, apply updates + to existing properties recursively, preserving existing + properties that are not specified in the update operation. + row, col: int or None (default None) + Subplot row and column index of coloraxis objects to select. + To select coloraxis objects by row and column, the Figure + must have been created using plotly.subplots.make_subplots. + If None (the default), all coloraxis objects are selected. + **kwargs + Additional property updates to apply to each selected + coloraxis object. If a property is specified in + both patch and in **kwargs then the one in **kwargs + takes precedence. + Returns + ------- + self + Returns the FigureWidget object that the method was called on + """ + for obj in self.select_coloraxes(selector=selector, row=row, col=col): + obj.update(patch, overwrite=overwrite, **kwargs) + + return self + + def select_geos(self, selector=None, row=None, col=None): + """ + Select geo subplot objects from a particular subplot cell + and/or geo subplot objects that satisfy custom selection + criteria. + + Parameters + ---------- + selector: dict, function, or None (default None) + Dict to use as selection criteria. + geo objects will be selected if they contain + properties corresponding to all of the dictionary's keys, with + values that exactly match the supplied values. If None + (the default), all geo objects are selected. If a + function, it must be a function accepting a single argument and + returning a boolean. The function will be called on each + geo and those for which the function returned True will + be in the selection. + row, col: int or None (default None) + Subplot row and column index of geo objects to select. + To select geo objects by row and column, the Figure + must have been created using plotly.subplots.make_subplots. + If None (the default), all geo objects are selected. + Returns + ------- + generator + Generator that iterates through all of the geo + objects that satisfy all of the specified selection criteria + """ + + return self._select_layout_subplots_by_prefix("geo", selector, row, col) + + def for_each_geo(self, fn, selector=None, row=None, col=None) -> "FigureWidget": + """ + Apply a function to all geo objects that satisfy the + specified selection criteria + + Parameters + ---------- + fn: + Function that inputs a single geo object. + selector: dict, function, or None (default None) + Dict to use as selection criteria. + geo objects will be selected if they contain + properties corresponding to all of the dictionary's keys, with + values that exactly match the supplied values. If None + (the default), all geo objects are selected. If a + function, it must be a function accepting a single argument and + returning a boolean. The function will be called on each + geo and those for which the function returned True will + be in the selection. + row, col: int or None (default None) + Subplot row and column index of geo objects to select. + To select geo objects by row and column, the Figure + must have been created using plotly.subplots.make_subplots. + If None (the default), all geo objects are selected. + Returns + ------- + self + Returns the FigureWidget object that the method was called on + """ + for obj in self.select_geos(selector=selector, row=row, col=col): + fn(obj) + + return self + + def update_geos( + self, patch=None, selector=None, overwrite=False, row=None, col=None, **kwargs + ) -> "FigureWidget": + """ + Perform a property update operation on all geo objects + that satisfy the specified selection criteria + + Parameters + ---------- + patch: dict + Dictionary of property updates to be applied to all + geo objects that satisfy the selection criteria. + selector: dict, function, or None (default None) + Dict to use as selection criteria. + geo objects will be selected if they contain + properties corresponding to all of the dictionary's keys, with + values that exactly match the supplied values. If None + (the default), all geo objects are selected. If a + function, it must be a function accepting a single argument and + returning a boolean. The function will be called on each + geo and those for which the function returned True will + be in the selection. + overwrite: bool + If True, overwrite existing properties. If False, apply updates + to existing properties recursively, preserving existing + properties that are not specified in the update operation. + row, col: int or None (default None) + Subplot row and column index of geo objects to select. + To select geo objects by row and column, the Figure + must have been created using plotly.subplots.make_subplots. + If None (the default), all geo objects are selected. + **kwargs + Additional property updates to apply to each selected + geo object. If a property is specified in + both patch and in **kwargs then the one in **kwargs + takes precedence. + Returns + ------- + self + Returns the FigureWidget object that the method was called on + """ + for obj in self.select_geos(selector=selector, row=row, col=col): + obj.update(patch, overwrite=overwrite, **kwargs) + + return self + + def select_legends(self, selector=None, row=None, col=None): + """ + Select legend subplot objects from a particular subplot cell + and/or legend subplot objects that satisfy custom selection + criteria. + + Parameters + ---------- + selector: dict, function, or None (default None) + Dict to use as selection criteria. + legend objects will be selected if they contain + properties corresponding to all of the dictionary's keys, with + values that exactly match the supplied values. If None + (the default), all legend objects are selected. If a + function, it must be a function accepting a single argument and + returning a boolean. The function will be called on each + legend and those for which the function returned True will + be in the selection. + row, col: int or None (default None) + Subplot row and column index of legend objects to select. + To select legend objects by row and column, the Figure + must have been created using plotly.subplots.make_subplots. + If None (the default), all legend objects are selected. + Returns + ------- + generator + Generator that iterates through all of the legend + objects that satisfy all of the specified selection criteria + """ + + return self._select_layout_subplots_by_prefix("legend", selector, row, col) + + def for_each_legend(self, fn, selector=None, row=None, col=None) -> "FigureWidget": + """ + Apply a function to all legend objects that satisfy the + specified selection criteria + + Parameters + ---------- + fn: + Function that inputs a single legend object. + selector: dict, function, or None (default None) + Dict to use as selection criteria. + legend objects will be selected if they contain + properties corresponding to all of the dictionary's keys, with + values that exactly match the supplied values. If None + (the default), all legend objects are selected. If a + function, it must be a function accepting a single argument and + returning a boolean. The function will be called on each + legend and those for which the function returned True will + be in the selection. + row, col: int or None (default None) + Subplot row and column index of legend objects to select. + To select legend objects by row and column, the Figure + must have been created using plotly.subplots.make_subplots. + If None (the default), all legend objects are selected. + Returns + ------- + self + Returns the FigureWidget object that the method was called on + """ + for obj in self.select_legends(selector=selector, row=row, col=col): + fn(obj) + + return self + + def update_legends( + self, patch=None, selector=None, overwrite=False, row=None, col=None, **kwargs + ) -> "FigureWidget": + """ + Perform a property update operation on all legend objects + that satisfy the specified selection criteria + + Parameters + ---------- + patch: dict + Dictionary of property updates to be applied to all + legend objects that satisfy the selection criteria. + selector: dict, function, or None (default None) + Dict to use as selection criteria. + legend objects will be selected if they contain + properties corresponding to all of the dictionary's keys, with + values that exactly match the supplied values. If None + (the default), all legend objects are selected. If a + function, it must be a function accepting a single argument and + returning a boolean. The function will be called on each + legend and those for which the function returned True will + be in the selection. + overwrite: bool + If True, overwrite existing properties. If False, apply updates + to existing properties recursively, preserving existing + properties that are not specified in the update operation. + row, col: int or None (default None) + Subplot row and column index of legend objects to select. + To select legend objects by row and column, the Figure + must have been created using plotly.subplots.make_subplots. + If None (the default), all legend objects are selected. + **kwargs + Additional property updates to apply to each selected + legend object. If a property is specified in + both patch and in **kwargs then the one in **kwargs + takes precedence. + Returns + ------- + self + Returns the FigureWidget object that the method was called on + """ + for obj in self.select_legends(selector=selector, row=row, col=col): + obj.update(patch, overwrite=overwrite, **kwargs) + + return self + + def select_maps(self, selector=None, row=None, col=None): + """ + Select map subplot objects from a particular subplot cell + and/or map subplot objects that satisfy custom selection + criteria. + + Parameters + ---------- + selector: dict, function, or None (default None) + Dict to use as selection criteria. + map objects will be selected if they contain + properties corresponding to all of the dictionary's keys, with + values that exactly match the supplied values. If None + (the default), all map objects are selected. If a + function, it must be a function accepting a single argument and + returning a boolean. The function will be called on each + map and those for which the function returned True will + be in the selection. + row, col: int or None (default None) + Subplot row and column index of map objects to select. + To select map objects by row and column, the Figure + must have been created using plotly.subplots.make_subplots. + If None (the default), all map objects are selected. + Returns + ------- + generator + Generator that iterates through all of the map + objects that satisfy all of the specified selection criteria + """ + + return self._select_layout_subplots_by_prefix("map", selector, row, col) + + def for_each_map(self, fn, selector=None, row=None, col=None) -> "FigureWidget": + """ + Apply a function to all map objects that satisfy the + specified selection criteria + + Parameters + ---------- + fn: + Function that inputs a single map object. + selector: dict, function, or None (default None) + Dict to use as selection criteria. + map objects will be selected if they contain + properties corresponding to all of the dictionary's keys, with + values that exactly match the supplied values. If None + (the default), all map objects are selected. If a + function, it must be a function accepting a single argument and + returning a boolean. The function will be called on each + map and those for which the function returned True will + be in the selection. + row, col: int or None (default None) + Subplot row and column index of map objects to select. + To select map objects by row and column, the Figure + must have been created using plotly.subplots.make_subplots. + If None (the default), all map objects are selected. + Returns + ------- + self + Returns the FigureWidget object that the method was called on + """ + for obj in self.select_maps(selector=selector, row=row, col=col): + fn(obj) + + return self + + def update_maps( + self, patch=None, selector=None, overwrite=False, row=None, col=None, **kwargs + ) -> "FigureWidget": + """ + Perform a property update operation on all map objects + that satisfy the specified selection criteria + + Parameters + ---------- + patch: dict + Dictionary of property updates to be applied to all + map objects that satisfy the selection criteria. + selector: dict, function, or None (default None) + Dict to use as selection criteria. + map objects will be selected if they contain + properties corresponding to all of the dictionary's keys, with + values that exactly match the supplied values. If None + (the default), all map objects are selected. If a + function, it must be a function accepting a single argument and + returning a boolean. The function will be called on each + map and those for which the function returned True will + be in the selection. + overwrite: bool + If True, overwrite existing properties. If False, apply updates + to existing properties recursively, preserving existing + properties that are not specified in the update operation. + row, col: int or None (default None) + Subplot row and column index of map objects to select. + To select map objects by row and column, the Figure + must have been created using plotly.subplots.make_subplots. + If None (the default), all map objects are selected. + **kwargs + Additional property updates to apply to each selected + map object. If a property is specified in + both patch and in **kwargs then the one in **kwargs + takes precedence. + Returns + ------- + self + Returns the FigureWidget object that the method was called on + """ + for obj in self.select_maps(selector=selector, row=row, col=col): + obj.update(patch, overwrite=overwrite, **kwargs) + + return self + + def select_mapboxes(self, selector=None, row=None, col=None): + """ + Select mapbox subplot objects from a particular subplot cell + and/or mapbox subplot objects that satisfy custom selection + criteria. + + Parameters + ---------- + selector: dict, function, or None (default None) + Dict to use as selection criteria. + mapbox objects will be selected if they contain + properties corresponding to all of the dictionary's keys, with + values that exactly match the supplied values. If None + (the default), all mapbox objects are selected. If a + function, it must be a function accepting a single argument and + returning a boolean. The function will be called on each + mapbox and those for which the function returned True will + be in the selection. + row, col: int or None (default None) + Subplot row and column index of mapbox objects to select. + To select mapbox objects by row and column, the Figure + must have been created using plotly.subplots.make_subplots. + If None (the default), all mapbox objects are selected. + Returns + ------- + generator + Generator that iterates through all of the mapbox + objects that satisfy all of the specified selection criteria + """ + + return self._select_layout_subplots_by_prefix("mapbox", selector, row, col) + + def for_each_mapbox(self, fn, selector=None, row=None, col=None) -> "FigureWidget": + """ + Apply a function to all mapbox objects that satisfy the + specified selection criteria + + Parameters + ---------- + fn: + Function that inputs a single mapbox object. + selector: dict, function, or None (default None) + Dict to use as selection criteria. + mapbox objects will be selected if they contain + properties corresponding to all of the dictionary's keys, with + values that exactly match the supplied values. If None + (the default), all mapbox objects are selected. If a + function, it must be a function accepting a single argument and + returning a boolean. The function will be called on each + mapbox and those for which the function returned True will + be in the selection. + row, col: int or None (default None) + Subplot row and column index of mapbox objects to select. + To select mapbox objects by row and column, the Figure + must have been created using plotly.subplots.make_subplots. + If None (the default), all mapbox objects are selected. + Returns + ------- + self + Returns the FigureWidget object that the method was called on + """ + for obj in self.select_mapboxes(selector=selector, row=row, col=col): + fn(obj) + + return self + + def update_mapboxes( + self, patch=None, selector=None, overwrite=False, row=None, col=None, **kwargs + ) -> "FigureWidget": + """ + Perform a property update operation on all mapbox objects + that satisfy the specified selection criteria + + Parameters + ---------- + patch: dict + Dictionary of property updates to be applied to all + mapbox objects that satisfy the selection criteria. + selector: dict, function, or None (default None) + Dict to use as selection criteria. + mapbox objects will be selected if they contain + properties corresponding to all of the dictionary's keys, with + values that exactly match the supplied values. If None + (the default), all mapbox objects are selected. If a + function, it must be a function accepting a single argument and + returning a boolean. The function will be called on each + mapbox and those for which the function returned True will + be in the selection. + overwrite: bool + If True, overwrite existing properties. If False, apply updates + to existing properties recursively, preserving existing + properties that are not specified in the update operation. + row, col: int or None (default None) + Subplot row and column index of mapbox objects to select. + To select mapbox objects by row and column, the Figure + must have been created using plotly.subplots.make_subplots. + If None (the default), all mapbox objects are selected. + **kwargs + Additional property updates to apply to each selected + mapbox object. If a property is specified in + both patch and in **kwargs then the one in **kwargs + takes precedence. + Returns + ------- + self + Returns the FigureWidget object that the method was called on + """ + for obj in self.select_mapboxes(selector=selector, row=row, col=col): + obj.update(patch, overwrite=overwrite, **kwargs) + + return self + + def select_polars(self, selector=None, row=None, col=None): + """ + Select polar subplot objects from a particular subplot cell + and/or polar subplot objects that satisfy custom selection + criteria. + + Parameters + ---------- + selector: dict, function, or None (default None) + Dict to use as selection criteria. + polar objects will be selected if they contain + properties corresponding to all of the dictionary's keys, with + values that exactly match the supplied values. If None + (the default), all polar objects are selected. If a + function, it must be a function accepting a single argument and + returning a boolean. The function will be called on each + polar and those for which the function returned True will + be in the selection. + row, col: int or None (default None) + Subplot row and column index of polar objects to select. + To select polar objects by row and column, the Figure + must have been created using plotly.subplots.make_subplots. + If None (the default), all polar objects are selected. + Returns + ------- + generator + Generator that iterates through all of the polar + objects that satisfy all of the specified selection criteria + """ + + return self._select_layout_subplots_by_prefix("polar", selector, row, col) + + def for_each_polar(self, fn, selector=None, row=None, col=None) -> "FigureWidget": + """ + Apply a function to all polar objects that satisfy the + specified selection criteria + + Parameters + ---------- + fn: + Function that inputs a single polar object. + selector: dict, function, or None (default None) + Dict to use as selection criteria. + polar objects will be selected if they contain + properties corresponding to all of the dictionary's keys, with + values that exactly match the supplied values. If None + (the default), all polar objects are selected. If a + function, it must be a function accepting a single argument and + returning a boolean. The function will be called on each + polar and those for which the function returned True will + be in the selection. + row, col: int or None (default None) + Subplot row and column index of polar objects to select. + To select polar objects by row and column, the Figure + must have been created using plotly.subplots.make_subplots. + If None (the default), all polar objects are selected. + Returns + ------- + self + Returns the FigureWidget object that the method was called on + """ + for obj in self.select_polars(selector=selector, row=row, col=col): + fn(obj) + + return self + + def update_polars( + self, patch=None, selector=None, overwrite=False, row=None, col=None, **kwargs + ) -> "FigureWidget": + """ + Perform a property update operation on all polar objects + that satisfy the specified selection criteria + + Parameters + ---------- + patch: dict + Dictionary of property updates to be applied to all + polar objects that satisfy the selection criteria. + selector: dict, function, or None (default None) + Dict to use as selection criteria. + polar objects will be selected if they contain + properties corresponding to all of the dictionary's keys, with + values that exactly match the supplied values. If None + (the default), all polar objects are selected. If a + function, it must be a function accepting a single argument and + returning a boolean. The function will be called on each + polar and those for which the function returned True will + be in the selection. + overwrite: bool + If True, overwrite existing properties. If False, apply updates + to existing properties recursively, preserving existing + properties that are not specified in the update operation. + row, col: int or None (default None) + Subplot row and column index of polar objects to select. + To select polar objects by row and column, the Figure + must have been created using plotly.subplots.make_subplots. + If None (the default), all polar objects are selected. + **kwargs + Additional property updates to apply to each selected + polar object. If a property is specified in + both patch and in **kwargs then the one in **kwargs + takes precedence. + Returns + ------- + self + Returns the FigureWidget object that the method was called on + """ + for obj in self.select_polars(selector=selector, row=row, col=col): + obj.update(patch, overwrite=overwrite, **kwargs) + + return self + + def select_scenes(self, selector=None, row=None, col=None): + """ + Select scene subplot objects from a particular subplot cell + and/or scene subplot objects that satisfy custom selection + criteria. + + Parameters + ---------- + selector: dict, function, or None (default None) + Dict to use as selection criteria. + scene objects will be selected if they contain + properties corresponding to all of the dictionary's keys, with + values that exactly match the supplied values. If None + (the default), all scene objects are selected. If a + function, it must be a function accepting a single argument and + returning a boolean. The function will be called on each + scene and those for which the function returned True will + be in the selection. + row, col: int or None (default None) + Subplot row and column index of scene objects to select. + To select scene objects by row and column, the Figure + must have been created using plotly.subplots.make_subplots. + If None (the default), all scene objects are selected. + Returns + ------- + generator + Generator that iterates through all of the scene + objects that satisfy all of the specified selection criteria + """ + + return self._select_layout_subplots_by_prefix("scene", selector, row, col) + + def for_each_scene(self, fn, selector=None, row=None, col=None) -> "FigureWidget": + """ + Apply a function to all scene objects that satisfy the + specified selection criteria + + Parameters + ---------- + fn: + Function that inputs a single scene object. + selector: dict, function, or None (default None) + Dict to use as selection criteria. + scene objects will be selected if they contain + properties corresponding to all of the dictionary's keys, with + values that exactly match the supplied values. If None + (the default), all scene objects are selected. If a + function, it must be a function accepting a single argument and + returning a boolean. The function will be called on each + scene and those for which the function returned True will + be in the selection. + row, col: int or None (default None) + Subplot row and column index of scene objects to select. + To select scene objects by row and column, the Figure + must have been created using plotly.subplots.make_subplots. + If None (the default), all scene objects are selected. + Returns + ------- + self + Returns the FigureWidget object that the method was called on + """ + for obj in self.select_scenes(selector=selector, row=row, col=col): + fn(obj) + + return self + + def update_scenes( + self, patch=None, selector=None, overwrite=False, row=None, col=None, **kwargs + ) -> "FigureWidget": + """ + Perform a property update operation on all scene objects + that satisfy the specified selection criteria + + Parameters + ---------- + patch: dict + Dictionary of property updates to be applied to all + scene objects that satisfy the selection criteria. + selector: dict, function, or None (default None) + Dict to use as selection criteria. + scene objects will be selected if they contain + properties corresponding to all of the dictionary's keys, with + values that exactly match the supplied values. If None + (the default), all scene objects are selected. If a + function, it must be a function accepting a single argument and + returning a boolean. The function will be called on each + scene and those for which the function returned True will + be in the selection. + overwrite: bool + If True, overwrite existing properties. If False, apply updates + to existing properties recursively, preserving existing + properties that are not specified in the update operation. + row, col: int or None (default None) + Subplot row and column index of scene objects to select. + To select scene objects by row and column, the Figure + must have been created using plotly.subplots.make_subplots. + If None (the default), all scene objects are selected. + **kwargs + Additional property updates to apply to each selected + scene object. If a property is specified in + both patch and in **kwargs then the one in **kwargs + takes precedence. + Returns + ------- + self + Returns the FigureWidget object that the method was called on + """ + for obj in self.select_scenes(selector=selector, row=row, col=col): + obj.update(patch, overwrite=overwrite, **kwargs) + + return self + + def select_smiths(self, selector=None, row=None, col=None): + """ + Select smith subplot objects from a particular subplot cell + and/or smith subplot objects that satisfy custom selection + criteria. + + Parameters + ---------- + selector: dict, function, or None (default None) + Dict to use as selection criteria. + smith objects will be selected if they contain + properties corresponding to all of the dictionary's keys, with + values that exactly match the supplied values. If None + (the default), all smith objects are selected. If a + function, it must be a function accepting a single argument and + returning a boolean. The function will be called on each + smith and those for which the function returned True will + be in the selection. + row, col: int or None (default None) + Subplot row and column index of smith objects to select. + To select smith objects by row and column, the Figure + must have been created using plotly.subplots.make_subplots. + If None (the default), all smith objects are selected. + Returns + ------- + generator + Generator that iterates through all of the smith + objects that satisfy all of the specified selection criteria + """ + + return self._select_layout_subplots_by_prefix("smith", selector, row, col) + + def for_each_smith(self, fn, selector=None, row=None, col=None) -> "FigureWidget": + """ + Apply a function to all smith objects that satisfy the + specified selection criteria + + Parameters + ---------- + fn: + Function that inputs a single smith object. + selector: dict, function, or None (default None) + Dict to use as selection criteria. + smith objects will be selected if they contain + properties corresponding to all of the dictionary's keys, with + values that exactly match the supplied values. If None + (the default), all smith objects are selected. If a + function, it must be a function accepting a single argument and + returning a boolean. The function will be called on each + smith and those for which the function returned True will + be in the selection. + row, col: int or None (default None) + Subplot row and column index of smith objects to select. + To select smith objects by row and column, the Figure + must have been created using plotly.subplots.make_subplots. + If None (the default), all smith objects are selected. + Returns + ------- + self + Returns the FigureWidget object that the method was called on + """ + for obj in self.select_smiths(selector=selector, row=row, col=col): + fn(obj) + + return self + + def update_smiths( + self, patch=None, selector=None, overwrite=False, row=None, col=None, **kwargs + ) -> "FigureWidget": + """ + Perform a property update operation on all smith objects + that satisfy the specified selection criteria + + Parameters + ---------- + patch: dict + Dictionary of property updates to be applied to all + smith objects that satisfy the selection criteria. + selector: dict, function, or None (default None) + Dict to use as selection criteria. + smith objects will be selected if they contain + properties corresponding to all of the dictionary's keys, with + values that exactly match the supplied values. If None + (the default), all smith objects are selected. If a + function, it must be a function accepting a single argument and + returning a boolean. The function will be called on each + smith and those for which the function returned True will + be in the selection. + overwrite: bool + If True, overwrite existing properties. If False, apply updates + to existing properties recursively, preserving existing + properties that are not specified in the update operation. + row, col: int or None (default None) + Subplot row and column index of smith objects to select. + To select smith objects by row and column, the Figure + must have been created using plotly.subplots.make_subplots. + If None (the default), all smith objects are selected. + **kwargs + Additional property updates to apply to each selected + smith object. If a property is specified in + both patch and in **kwargs then the one in **kwargs + takes precedence. + Returns + ------- + self + Returns the FigureWidget object that the method was called on + """ + for obj in self.select_smiths(selector=selector, row=row, col=col): + obj.update(patch, overwrite=overwrite, **kwargs) + + return self + + def select_ternaries(self, selector=None, row=None, col=None): + """ + Select ternary subplot objects from a particular subplot cell + and/or ternary subplot objects that satisfy custom selection + criteria. + + Parameters + ---------- + selector: dict, function, or None (default None) + Dict to use as selection criteria. + ternary objects will be selected if they contain + properties corresponding to all of the dictionary's keys, with + values that exactly match the supplied values. If None + (the default), all ternary objects are selected. If a + function, it must be a function accepting a single argument and + returning a boolean. The function will be called on each + ternary and those for which the function returned True will + be in the selection. + row, col: int or None (default None) + Subplot row and column index of ternary objects to select. + To select ternary objects by row and column, the Figure + must have been created using plotly.subplots.make_subplots. + If None (the default), all ternary objects are selected. + Returns + ------- + generator + Generator that iterates through all of the ternary + objects that satisfy all of the specified selection criteria + """ + + return self._select_layout_subplots_by_prefix("ternary", selector, row, col) + + def for_each_ternary(self, fn, selector=None, row=None, col=None) -> "FigureWidget": + """ + Apply a function to all ternary objects that satisfy the + specified selection criteria + + Parameters + ---------- + fn: + Function that inputs a single ternary object. + selector: dict, function, or None (default None) + Dict to use as selection criteria. + ternary objects will be selected if they contain + properties corresponding to all of the dictionary's keys, with + values that exactly match the supplied values. If None + (the default), all ternary objects are selected. If a + function, it must be a function accepting a single argument and + returning a boolean. The function will be called on each + ternary and those for which the function returned True will + be in the selection. + row, col: int or None (default None) + Subplot row and column index of ternary objects to select. + To select ternary objects by row and column, the Figure + must have been created using plotly.subplots.make_subplots. + If None (the default), all ternary objects are selected. + Returns + ------- + self + Returns the FigureWidget object that the method was called on + """ + for obj in self.select_ternaries(selector=selector, row=row, col=col): + fn(obj) + + return self + + def update_ternaries( + self, patch=None, selector=None, overwrite=False, row=None, col=None, **kwargs + ) -> "FigureWidget": + """ + Perform a property update operation on all ternary objects + that satisfy the specified selection criteria + + Parameters + ---------- + patch: dict + Dictionary of property updates to be applied to all + ternary objects that satisfy the selection criteria. + selector: dict, function, or None (default None) + Dict to use as selection criteria. + ternary objects will be selected if they contain + properties corresponding to all of the dictionary's keys, with + values that exactly match the supplied values. If None + (the default), all ternary objects are selected. If a + function, it must be a function accepting a single argument and + returning a boolean. The function will be called on each + ternary and those for which the function returned True will + be in the selection. + overwrite: bool + If True, overwrite existing properties. If False, apply updates + to existing properties recursively, preserving existing + properties that are not specified in the update operation. + row, col: int or None (default None) + Subplot row and column index of ternary objects to select. + To select ternary objects by row and column, the Figure + must have been created using plotly.subplots.make_subplots. + If None (the default), all ternary objects are selected. + **kwargs + Additional property updates to apply to each selected + ternary object. If a property is specified in + both patch and in **kwargs then the one in **kwargs + takes precedence. + Returns + ------- + self + Returns the FigureWidget object that the method was called on + """ + for obj in self.select_ternaries(selector=selector, row=row, col=col): + obj.update(patch, overwrite=overwrite, **kwargs) + + return self + + def select_xaxes(self, selector=None, row=None, col=None): + """ + Select xaxis subplot objects from a particular subplot cell + and/or xaxis subplot objects that satisfy custom selection + criteria. + + Parameters + ---------- + selector: dict, function, or None (default None) + Dict to use as selection criteria. + xaxis objects will be selected if they contain + properties corresponding to all of the dictionary's keys, with + values that exactly match the supplied values. If None + (the default), all xaxis objects are selected. If a + function, it must be a function accepting a single argument and + returning a boolean. The function will be called on each + xaxis and those for which the function returned True will + be in the selection. + row, col: int or None (default None) + Subplot row and column index of xaxis objects to select. + To select xaxis objects by row and column, the Figure + must have been created using plotly.subplots.make_subplots. + If None (the default), all xaxis objects are selected. + Returns + ------- + generator + Generator that iterates through all of the xaxis + objects that satisfy all of the specified selection criteria + """ + + return self._select_layout_subplots_by_prefix("xaxis", selector, row, col) + + def for_each_xaxis(self, fn, selector=None, row=None, col=None) -> "FigureWidget": + """ + Apply a function to all xaxis objects that satisfy the + specified selection criteria + + Parameters + ---------- + fn: + Function that inputs a single xaxis object. + selector: dict, function, or None (default None) + Dict to use as selection criteria. + xaxis objects will be selected if they contain + properties corresponding to all of the dictionary's keys, with + values that exactly match the supplied values. If None + (the default), all xaxis objects are selected. If a + function, it must be a function accepting a single argument and + returning a boolean. The function will be called on each + xaxis and those for which the function returned True will + be in the selection. + row, col: int or None (default None) + Subplot row and column index of xaxis objects to select. + To select xaxis objects by row and column, the Figure + must have been created using plotly.subplots.make_subplots. + If None (the default), all xaxis objects are selected. + Returns + ------- + self + Returns the FigureWidget object that the method was called on + """ + for obj in self.select_xaxes(selector=selector, row=row, col=col): + fn(obj) + + return self + + def update_xaxes( + self, patch=None, selector=None, overwrite=False, row=None, col=None, **kwargs + ) -> "FigureWidget": + """ + Perform a property update operation on all xaxis objects + that satisfy the specified selection criteria + + Parameters + ---------- + patch: dict + Dictionary of property updates to be applied to all + xaxis objects that satisfy the selection criteria. + selector: dict, function, or None (default None) + Dict to use as selection criteria. + xaxis objects will be selected if they contain + properties corresponding to all of the dictionary's keys, with + values that exactly match the supplied values. If None + (the default), all xaxis objects are selected. If a + function, it must be a function accepting a single argument and + returning a boolean. The function will be called on each + xaxis and those for which the function returned True will + be in the selection. + overwrite: bool + If True, overwrite existing properties. If False, apply updates + to existing properties recursively, preserving existing + properties that are not specified in the update operation. + row, col: int or None (default None) + Subplot row and column index of xaxis objects to select. + To select xaxis objects by row and column, the Figure + must have been created using plotly.subplots.make_subplots. + If None (the default), all xaxis objects are selected. + **kwargs + Additional property updates to apply to each selected + xaxis object. If a property is specified in + both patch and in **kwargs then the one in **kwargs + takes precedence. + Returns + ------- + self + Returns the FigureWidget object that the method was called on + """ + for obj in self.select_xaxes(selector=selector, row=row, col=col): + obj.update(patch, overwrite=overwrite, **kwargs) + + return self + + def select_yaxes(self, selector=None, row=None, col=None, secondary_y=None): + """ + Select yaxis subplot objects from a particular subplot cell + and/or yaxis subplot objects that satisfy custom selection + criteria. + + Parameters + ---------- + selector: dict, function, or None (default None) + Dict to use as selection criteria. + yaxis objects will be selected if they contain + properties corresponding to all of the dictionary's keys, with + values that exactly match the supplied values. If None + (the default), all yaxis objects are selected. If a + function, it must be a function accepting a single argument and + returning a boolean. The function will be called on each + yaxis and those for which the function returned True will + be in the selection. + row, col: int or None (default None) + Subplot row and column index of yaxis objects to select. + To select yaxis objects by row and column, the Figure + must have been created using plotly.subplots.make_subplots. + If None (the default), all yaxis objects are selected. + secondary_y: boolean or None (default None) + * If True, only select yaxis objects associated with the secondary + y-axis of the subplot. + * If False, only select yaxis objects associated with the primary + y-axis of the subplot. + * If None (the default), do not filter yaxis objects based on + a secondary y-axis condition. + + To select yaxis objects by secondary y-axis, the Figure must + have been created using plotly.subplots.make_subplots. See + the docstring for the specs argument to make_subplots for more + info on creating subplots with secondary y-axes. + Returns + ------- + generator + Generator that iterates through all of the yaxis + objects that satisfy all of the specified selection criteria + """ + + return self._select_layout_subplots_by_prefix( + "yaxis", selector, row, col, secondary_y=secondary_y + ) + + def for_each_yaxis( + self, fn, selector=None, row=None, col=None, secondary_y=None + ) -> "FigureWidget": + """ + Apply a function to all yaxis objects that satisfy the + specified selection criteria + + Parameters + ---------- + fn: + Function that inputs a single yaxis object. + selector: dict, function, or None (default None) + Dict to use as selection criteria. + yaxis objects will be selected if they contain + properties corresponding to all of the dictionary's keys, with + values that exactly match the supplied values. If None + (the default), all yaxis objects are selected. If a + function, it must be a function accepting a single argument and + returning a boolean. The function will be called on each + yaxis and those for which the function returned True will + be in the selection. + row, col: int or None (default None) + Subplot row and column index of yaxis objects to select. + To select yaxis objects by row and column, the Figure + must have been created using plotly.subplots.make_subplots. + If None (the default), all yaxis objects are selected. + secondary_y: boolean or None (default None) + * If True, only select yaxis objects associated with the secondary + y-axis of the subplot. + * If False, only select yaxis objects associated with the primary + y-axis of the subplot. + * If None (the default), do not filter yaxis objects based on + a secondary y-axis condition. + + To select yaxis objects by secondary y-axis, the Figure must + have been created using plotly.subplots.make_subplots. See + the docstring for the specs argument to make_subplots for more + info on creating subplots with secondary y-axes. + Returns + ------- + self + Returns the FigureWidget object that the method was called on + """ + for obj in self.select_yaxes( + selector=selector, row=row, col=col, secondary_y=secondary_y + ): + fn(obj) + + return self + + def update_yaxes( + self, + patch=None, + selector=None, + overwrite=False, + row=None, + col=None, + secondary_y=None, + **kwargs, + ) -> "FigureWidget": + """ + Perform a property update operation on all yaxis objects + that satisfy the specified selection criteria + + Parameters + ---------- + patch: dict + Dictionary of property updates to be applied to all + yaxis objects that satisfy the selection criteria. + selector: dict, function, or None (default None) + Dict to use as selection criteria. + yaxis objects will be selected if they contain + properties corresponding to all of the dictionary's keys, with + values that exactly match the supplied values. If None + (the default), all yaxis objects are selected. If a + function, it must be a function accepting a single argument and + returning a boolean. The function will be called on each + yaxis and those for which the function returned True will + be in the selection. + overwrite: bool + If True, overwrite existing properties. If False, apply updates + to existing properties recursively, preserving existing + properties that are not specified in the update operation. + row, col: int or None (default None) + Subplot row and column index of yaxis objects to select. + To select yaxis objects by row and column, the Figure + must have been created using plotly.subplots.make_subplots. + If None (the default), all yaxis objects are selected. + secondary_y: boolean or None (default None) + * If True, only select yaxis objects associated with the secondary + y-axis of the subplot. + * If False, only select yaxis objects associated with the primary + y-axis of the subplot. + * If None (the default), do not filter yaxis objects based on + a secondary y-axis condition. + + To select yaxis objects by secondary y-axis, the Figure must + have been created using plotly.subplots.make_subplots. See + the docstring for the specs argument to make_subplots for more + info on creating subplots with secondary y-axes. + **kwargs + Additional property updates to apply to each selected + yaxis object. If a property is specified in + both patch and in **kwargs then the one in **kwargs + takes precedence. + Returns + ------- + self + Returns the FigureWidget object that the method was called on + """ + for obj in self.select_yaxes( + selector=selector, row=row, col=col, secondary_y=secondary_y + ): + obj.update(patch, overwrite=overwrite, **kwargs) + + return self + + def select_annotations(self, selector=None, row=None, col=None, secondary_y=None): + """ + Select annotations from a particular subplot cell and/or annotations + that satisfy custom selection criteria. + + Parameters + ---------- + selector: dict, function, int, str, or None (default None) + Dict to use as selection criteria. + Annotations will be selected if they contain properties corresponding + to all of the dictionary's keys, with values that exactly match + the supplied values. If None (the default), all annotations are + selected. If a function, it must be a function accepting a single + argument and returning a boolean. The function will be called on + each annotation and those for which the function returned True + will be in the selection. If an int N, the Nth annotation matching row + and col will be selected (N can be negative). If a string S, the selector + is equivalent to dict(type=S). + row, col: int or None (default None) + Subplot row and column index of annotations to select. + To select annotations by row and column, the Figure must have been + created using plotly.subplots.make_subplots. To select only those + annotation that are in paper coordinates, set row and col to the + string 'paper'. If None (the default), all annotations are selected. + secondary_y: boolean or None (default None) + * If True, only select annotations associated with the secondary + y-axis of the subplot. + * If False, only select annotations associated with the primary + y-axis of the subplot. + * If None (the default), do not filter annotations based on secondary + y-axis. + + To select annotations by secondary y-axis, the Figure must have been + created using plotly.subplots.make_subplots. See the docstring + for the specs argument to make_subplots for more info on + creating subplots with secondary y-axes. + Returns + ------- + generator + Generator that iterates through all of the annotations that satisfy + all of the specified selection criteria + """ + return self._select_annotations_like( + "annotations", selector=selector, row=row, col=col, secondary_y=secondary_y + ) + + def for_each_annotation( + self, fn, selector=None, row=None, col=None, secondary_y=None + ): + """ + Apply a function to all annotations that satisfy the specified selection + criteria + + Parameters + ---------- + fn: + Function that inputs a single annotation object. + selector: dict, function, int, str or None (default None) + Dict to use as selection criteria. + Traces will be selected if they contain properties corresponding + to all of the dictionary's keys, with values that exactly match + the supplied values. If None (the default), all annotations are + selected. If a function, it must be a function accepting a single + argument and returning a boolean. The function will be called on + each annotation and those for which the function returned True + will be in the selection. If an int N, the Nth annotation matching row + and col will be selected (N can be negative). If a string S, the selector + is equivalent to dict(type=S). + row, col: int or None (default None) + Subplot row and column index of annotations to select. + To select annotations by row and column, the Figure must have been + created using plotly.subplots.make_subplots. To select only those + annotations that are in paper coordinates, set row and col to the + string 'paper'. If None (the default), all annotations are selected. + secondary_y: boolean or None (default None) + * If True, only select annotations associated with the secondary + y-axis of the subplot. + * If False, only select annotations associated with the primary + y-axis of the subplot. + * If None (the default), do not filter annotations based on secondary + y-axis. + + To select annotations by secondary y-axis, the Figure must have been + created using plotly.subplots.make_subplots. See the docstring + for the specs argument to make_subplots for more info on + creating subplots with secondary y-axes. + Returns + ------- + self + Returns the FigureWidget object that the method was called on + """ + for obj in self._select_annotations_like( + prop="annotations", + selector=selector, + row=row, + col=col, + secondary_y=secondary_y, + ): + fn(obj) + + return self + + def update_annotations( + self, patch=None, selector=None, row=None, col=None, secondary_y=None, **kwargs + ) -> "FigureWidget": + """ + Perform a property update operation on all annotations that satisfy the + specified selection criteria + + Parameters + ---------- + patch: dict or None (default None) + Dictionary of property updates to be applied to all annotations that + satisfy the selection criteria. + selector: dict, function, int, str or None (default None) + Dict to use as selection criteria. + Traces will be selected if they contain properties corresponding + to all of the dictionary's keys, with values that exactly match + the supplied values. If None (the default), all annotations are + selected. If a function, it must be a function accepting a single + argument and returning a boolean. The function will be called on + each annotation and those for which the function returned True + will be in the selection. If an int N, the Nth annotation matching row + and col will be selected (N can be negative). If a string S, the selector + is equivalent to dict(type=S). + row, col: int or None (default None) + Subplot row and column index of annotations to select. + To select annotations by row and column, the Figure must have been + created using plotly.subplots.make_subplots. To select only those + annotation that are in paper coordinates, set row and col to the + string 'paper'. If None (the default), all annotations are selected. + secondary_y: boolean or None (default None) + * If True, only select annotations associated with the secondary + y-axis of the subplot. + * If False, only select annotations associated with the primary + y-axis of the subplot. + * If None (the default), do not filter annotations based on secondary + y-axis. + + To select annotations by secondary y-axis, the Figure must have been + created using plotly.subplots.make_subplots. See the docstring + for the specs argument to make_subplots for more info on + creating subplots with secondary y-axes. + **kwargs + Additional property updates to apply to each selected annotation. If + a property is specified in both patch and in **kwargs then the + one in **kwargs takes precedence. + + Returns + ------- + self + Returns the FigureWidget object that the method was called on + """ + for obj in self._select_annotations_like( + prop="annotations", + selector=selector, + row=row, + col=col, + secondary_y=secondary_y, + ): + obj.update(patch, **kwargs) + + return self + + def add_annotation( + self, + arg=None, + align=None, + arrowcolor=None, + arrowhead=None, + arrowside=None, + arrowsize=None, + arrowwidth=None, + ax=None, + axref=None, + ay=None, + ayref=None, + bgcolor=None, + bordercolor=None, + borderpad=None, + borderwidth=None, + captureevents=None, + clicktoshow=None, + font=None, + height=None, + hoverlabel=None, + hovertext=None, + name=None, + opacity=None, + showarrow=None, + standoff=None, + startarrowhead=None, + startarrowsize=None, + startstandoff=None, + templateitemname=None, + text=None, + textangle=None, + valign=None, + visible=None, + width=None, + x=None, + xanchor=None, + xclick=None, + xref=None, + xshift=None, + y=None, + yanchor=None, + yclick=None, + yref=None, + yshift=None, + row=None, + col=None, + secondary_y=None, + exclude_empty_subplots=None, + **kwargs, + ) -> "FigureWidget": + """ + Create and add a new annotation to the figure's layout + + Parameters + ---------- + arg + instance of Annotation or dict with compatible + properties + align + Sets the horizontal alignment of the `text` within the + box. Has an effect only if `text` spans two or more + lines (i.e. `text` contains one or more
HTML tags) + or if an explicit width is set to override the text + width. + arrowcolor + Sets the color of the annotation arrow. + arrowhead + Sets the end annotation arrow head style. + arrowside + Sets the annotation arrow head position. + arrowsize + Sets the size of the end annotation arrow head, + relative to `arrowwidth`. A value of 1 (default) gives + a head about 3x as wide as the line. + arrowwidth + Sets the width (in px) of annotation arrow line. + ax + Sets the x component of the arrow tail about the arrow + head. If `axref` is `pixel`, a positive (negative) + component corresponds to an arrow pointing from right + to left (left to right). If `axref` is not `pixel` and + is exactly the same as `xref`, this is an absolute + value on that axis, like `x`, specified in the same + coordinates as `xref`. + axref + Indicates in what coordinates the tail of the + annotation (ax,ay) is specified. If set to a x axis id + (e.g. "x" or "x2"), the `x` position refers to a x + coordinate. If set to "paper", the `x` position refers + to the distance from the left of the plotting area in + normalized coordinates where 0 (1) corresponds to the + left (right). If set to a x axis ID followed by + "domain" (separated by a space), the position behaves + like for "paper", but refers to the distance in + fractions of the domain length from the left of the + domain of that axis: e.g., *x2 domain* refers to the + domain of the second x axis and a x position of 0.5 + refers to the point between the left and the right of + the domain of the second x axis. In order for absolute + positioning of the arrow to work, "axref" must be + exactly the same as "xref", otherwise "axref" will + revert to "pixel" (explained next). For relative + positioning, "axref" can be set to "pixel", in which + case the "ax" value is specified in pixels relative to + "x". Absolute positioning is useful for trendline + annotations which should continue to indicate the + correct trend when zoomed. Relative positioning is + useful for specifying the text offset for an annotated + point. + ay + Sets the y component of the arrow tail about the arrow + head. If `ayref` is `pixel`, a positive (negative) + component corresponds to an arrow pointing from bottom + to top (top to bottom). If `ayref` is not `pixel` and + is exactly the same as `yref`, this is an absolute + value on that axis, like `y`, specified in the same + coordinates as `yref`. + ayref + Indicates in what coordinates the tail of the + annotation (ax,ay) is specified. If set to a y axis id + (e.g. "y" or "y2"), the `y` position refers to a y + coordinate. If set to "paper", the `y` position refers + to the distance from the bottom of the plotting area in + normalized coordinates where 0 (1) corresponds to the + bottom (top). If set to a y axis ID followed by + "domain" (separated by a space), the position behaves + like for "paper", but refers to the distance in + fractions of the domain length from the bottom of the + domain of that axis: e.g., *y2 domain* refers to the + domain of the second y axis and a y position of 0.5 + refers to the point between the bottom and the top of + the domain of the second y axis. In order for absolute + positioning of the arrow to work, "ayref" must be + exactly the same as "yref", otherwise "ayref" will + revert to "pixel" (explained next). For relative + positioning, "ayref" can be set to "pixel", in which + case the "ay" value is specified in pixels relative to + "y". Absolute positioning is useful for trendline + annotations which should continue to indicate the + correct trend when zoomed. Relative positioning is + useful for specifying the text offset for an annotated + point. + bgcolor + Sets the background color of the annotation. + bordercolor + Sets the color of the border enclosing the annotation + `text`. + borderpad + Sets the padding (in px) between the `text` and the + enclosing border. + borderwidth + Sets the width (in px) of the border enclosing the + annotation `text`. + captureevents + Determines whether the annotation text box captures + mouse move and click events, or allows those events to + pass through to data points in the plot that may be + behind the annotation. By default `captureevents` is + False unless `hovertext` is provided. If you use the + event `plotly_clickannotation` without `hovertext` you + must explicitly enable `captureevents`. + clicktoshow + Makes this annotation respond to clicks on the plot. If + you click a data point that exactly matches the `x` and + `y` values of this annotation, and it is hidden + (visible: false), it will appear. In "onoff" mode, you + must click the same point again to make it disappear, + so if you click multiple points, you can show multiple + annotations. In "onout" mode, a click anywhere else in + the plot (on another data point or not) will hide this + annotation. If you need to show/hide this annotation in + response to different `x` or `y` values, you can set + `xclick` and/or `yclick`. This is useful for example to + label the side of a bar. To label markers though, + `standoff` is preferred over `xclick` and `yclick`. + font + Sets the annotation text font. + height + Sets an explicit height for the text box. null + (default) lets the text set the box height. Taller text + will be clipped. + hoverlabel + :class:`plotly.graph_objects.layout.annotation.Hoverlab + el` instance or dict with compatible properties + hovertext + Sets text to appear when hovering over this annotation. + If omitted or blank, no hover label will appear. + name + When used in a template, named items are created in the + output figure in addition to any items the figure + already has in this array. You can modify these items + in the output figure by making your own item with + `templateitemname` matching this `name` alongside your + modifications (including `visible: false` or `enabled: + false` to hide it). Has no effect outside of a + template. + opacity + Sets the opacity of the annotation (text + arrow). + showarrow + Determines whether or not the annotation is drawn with + an arrow. If True, `text` is placed near the arrow's + tail. If False, `text` lines up with the `x` and `y` + provided. + standoff + Sets a distance, in pixels, to move the end arrowhead + away from the position it is pointing at, for example + to point at the edge of a marker independent of zoom. + Note that this shortens the arrow from the `ax` / `ay` + vector, in contrast to `xshift` / `yshift` which moves + everything by this amount. + startarrowhead + Sets the start annotation arrow head style. + startarrowsize + Sets the size of the start annotation arrow head, + relative to `arrowwidth`. A value of 1 (default) gives + a head about 3x as wide as the line. + startstandoff + Sets a distance, in pixels, to move the start arrowhead + away from the position it is pointing at, for example + to point at the edge of a marker independent of zoom. + Note that this shortens the arrow from the `ax` / `ay` + vector, in contrast to `xshift` / `yshift` which moves + everything by this amount. + templateitemname + Used to refer to a named item in this array in the + template. Named items from the template will be created + even without a matching item in the input figure, but + you can modify one by making an item with + `templateitemname` matching its `name`, alongside your + modifications (including `visible: false` or `enabled: + false` to hide it). If there is no template or no + matching item, this item will be hidden unless you + explicitly show it with `visible: true`. + text + Sets the text associated with this annotation. Plotly + uses a subset of HTML tags to do things like newline + (`
`), bold (``), italics (``), + hyperlinks (``). Tags ``, + ``, ``, ``, ``, and `` are also + supported. + textangle + Sets the angle at which the `text` is drawn with + respect to the horizontal. + valign + Sets the vertical alignment of the `text` within the + box. Has an effect only if an explicit height is set to + override the text height. + visible + Determines whether or not this annotation is visible. + width + Sets an explicit width for the text box. null (default) + lets the text set the box width. Wider text will be + clipped. There is no automatic wrapping; use
to + start a new line. + x + Sets the annotation's x position. If the axis `type` is + "log", then you must take the log of your desired + range. If the axis `type` is "date", it should be date + strings, like date data, though Date objects and unix + milliseconds will be accepted and converted to strings. + If the axis `type` is "category", it should be numbers, + using the scale where each category is assigned a + serial number from zero in the order it appears. + xanchor + Sets the text box's horizontal position anchor This + anchor binds the `x` position to the "left", "center" + or "right" of the annotation. For example, if `x` is + set to 1, `xref` to "paper" and `xanchor` to "right" + then the right-most portion of the annotation lines up + with the right-most edge of the plotting area. If + "auto", the anchor is equivalent to "center" for data- + referenced annotations or if there is an arrow, whereas + for paper-referenced with no arrow, the anchor picked + corresponds to the closest side. + xclick + Toggle this annotation when clicking a data point whose + `x` value is `xclick` rather than the annotation's `x` + value. + xref + Sets the annotation's x coordinate axis. If set to a x + axis id (e.g. "x" or "x2"), the `x` position refers to + a x coordinate. If set to "paper", the `x` position + refers to the distance from the left of the plotting + area in normalized coordinates where 0 (1) corresponds + to the left (right). If set to a x axis ID followed by + "domain" (separated by a space), the position behaves + like for "paper", but refers to the distance in + fractions of the domain length from the left of the + domain of that axis: e.g., *x2 domain* refers to the + domain of the second x axis and a x position of 0.5 + refers to the point between the left and the right of + the domain of the second x axis. + xshift + Shifts the position of the whole annotation and arrow + to the right (positive) or left (negative) by this many + pixels. + y + Sets the annotation's y position. If the axis `type` is + "log", then you must take the log of your desired + range. If the axis `type` is "date", it should be date + strings, like date data, though Date objects and unix + milliseconds will be accepted and converted to strings. + If the axis `type` is "category", it should be numbers, + using the scale where each category is assigned a + serial number from zero in the order it appears. + yanchor + Sets the text box's vertical position anchor This + anchor binds the `y` position to the "top", "middle" or + "bottom" of the annotation. For example, if `y` is set + to 1, `yref` to "paper" and `yanchor` to "top" then the + top-most portion of the annotation lines up with the + top-most edge of the plotting area. If "auto", the + anchor is equivalent to "middle" for data-referenced + annotations or if there is an arrow, whereas for paper- + referenced with no arrow, the anchor picked corresponds + to the closest side. + yclick + Toggle this annotation when clicking a data point whose + `y` value is `yclick` rather than the annotation's `y` + value. + yref + Sets the annotation's y coordinate axis. If set to a y + axis id (e.g. "y" or "y2"), the `y` position refers to + a y coordinate. If set to "paper", the `y` position + refers to the distance from the bottom of the plotting + area in normalized coordinates where 0 (1) corresponds + to the bottom (top). If set to a y axis ID followed by + "domain" (separated by a space), the position behaves + like for "paper", but refers to the distance in + fractions of the domain length from the bottom of the + domain of that axis: e.g., *y2 domain* refers to the + domain of the second y axis and a y position of 0.5 + refers to the point between the bottom and the top of + the domain of the second y axis. + yshift + Shifts the position of the whole annotation and arrow + up (positive) or down (negative) by this many pixels. + row + Subplot row for annotation. If 'all', addresses all + rows in the specified column(s). + col + Subplot column for annotation. If 'all', addresses all + columns in the specified row(s). + secondary_y + Whether to add annotation to secondary y-axis + exclude_empty_subplots + If True, annotation will not be added to subplots + without traces. + + Returns + ------- + FigureWidget + """ + from plotly.graph_objs import layout as _layout + + new_obj = _layout.Annotation( + arg, + align=align, + arrowcolor=arrowcolor, + arrowhead=arrowhead, + arrowside=arrowside, + arrowsize=arrowsize, + arrowwidth=arrowwidth, + ax=ax, + axref=axref, + ay=ay, + ayref=ayref, + bgcolor=bgcolor, + bordercolor=bordercolor, + borderpad=borderpad, + borderwidth=borderwidth, + captureevents=captureevents, + clicktoshow=clicktoshow, + font=font, + height=height, + hoverlabel=hoverlabel, + hovertext=hovertext, + name=name, + opacity=opacity, + showarrow=showarrow, + standoff=standoff, + startarrowhead=startarrowhead, + startarrowsize=startarrowsize, + startstandoff=startstandoff, + templateitemname=templateitemname, + text=text, + textangle=textangle, + valign=valign, + visible=visible, + width=width, + x=x, + xanchor=xanchor, + xclick=xclick, + xref=xref, + xshift=xshift, + y=y, + yanchor=yanchor, + yclick=yclick, + yref=yref, + yshift=yshift, + **kwargs, + ) + return self._add_annotation_like( + "annotation", + "annotations", + new_obj, + row=row, + col=col, + secondary_y=secondary_y, + exclude_empty_subplots=exclude_empty_subplots, + ) + + def select_layout_images(self, selector=None, row=None, col=None, secondary_y=None): + """ + Select images from a particular subplot cell and/or images + that satisfy custom selection criteria. + + Parameters + ---------- + selector: dict, function, int, str, or None (default None) + Dict to use as selection criteria. + Annotations will be selected if they contain properties corresponding + to all of the dictionary's keys, with values that exactly match + the supplied values. If None (the default), all images are + selected. If a function, it must be a function accepting a single + argument and returning a boolean. The function will be called on + each image and those for which the function returned True + will be in the selection. If an int N, the Nth image matching row + and col will be selected (N can be negative). If a string S, the selector + is equivalent to dict(type=S). + row, col: int or None (default None) + Subplot row and column index of images to select. + To select images by row and column, the Figure must have been + created using plotly.subplots.make_subplots. To select only those + image that are in paper coordinates, set row and col to the + string 'paper'. If None (the default), all images are selected. + secondary_y: boolean or None (default None) + * If True, only select images associated with the secondary + y-axis of the subplot. + * If False, only select images associated with the primary + y-axis of the subplot. + * If None (the default), do not filter images based on secondary + y-axis. + + To select images by secondary y-axis, the Figure must have been + created using plotly.subplots.make_subplots. See the docstring + for the specs argument to make_subplots for more info on + creating subplots with secondary y-axes. + Returns + ------- + generator + Generator that iterates through all of the images that satisfy + all of the specified selection criteria + """ + return self._select_annotations_like( + "images", selector=selector, row=row, col=col, secondary_y=secondary_y + ) + + def for_each_layout_image( + self, fn, selector=None, row=None, col=None, secondary_y=None + ): + """ + Apply a function to all images that satisfy the specified selection + criteria + + Parameters + ---------- + fn: + Function that inputs a single image object. + selector: dict, function, int, str or None (default None) + Dict to use as selection criteria. + Traces will be selected if they contain properties corresponding + to all of the dictionary's keys, with values that exactly match + the supplied values. If None (the default), all images are + selected. If a function, it must be a function accepting a single + argument and returning a boolean. The function will be called on + each image and those for which the function returned True + will be in the selection. If an int N, the Nth image matching row + and col will be selected (N can be negative). If a string S, the selector + is equivalent to dict(type=S). + row, col: int or None (default None) + Subplot row and column index of images to select. + To select images by row and column, the Figure must have been + created using plotly.subplots.make_subplots. To select only those + images that are in paper coordinates, set row and col to the + string 'paper'. If None (the default), all images are selected. + secondary_y: boolean or None (default None) + * If True, only select images associated with the secondary + y-axis of the subplot. + * If False, only select images associated with the primary + y-axis of the subplot. + * If None (the default), do not filter images based on secondary + y-axis. + + To select images by secondary y-axis, the Figure must have been + created using plotly.subplots.make_subplots. See the docstring + for the specs argument to make_subplots for more info on + creating subplots with secondary y-axes. + Returns + ------- + self + Returns the FigureWidget object that the method was called on + """ + for obj in self._select_annotations_like( + prop="images", + selector=selector, + row=row, + col=col, + secondary_y=secondary_y, + ): + fn(obj) + + return self + + def update_layout_images( + self, patch=None, selector=None, row=None, col=None, secondary_y=None, **kwargs + ) -> "FigureWidget": + """ + Perform a property update operation on all images that satisfy the + specified selection criteria + + Parameters + ---------- + patch: dict or None (default None) + Dictionary of property updates to be applied to all images that + satisfy the selection criteria. + selector: dict, function, int, str or None (default None) + Dict to use as selection criteria. + Traces will be selected if they contain properties corresponding + to all of the dictionary's keys, with values that exactly match + the supplied values. If None (the default), all images are + selected. If a function, it must be a function accepting a single + argument and returning a boolean. The function will be called on + each image and those for which the function returned True + will be in the selection. If an int N, the Nth image matching row + and col will be selected (N can be negative). If a string S, the selector + is equivalent to dict(type=S). + row, col: int or None (default None) + Subplot row and column index of images to select. + To select images by row and column, the Figure must have been + created using plotly.subplots.make_subplots. To select only those + image that are in paper coordinates, set row and col to the + string 'paper'. If None (the default), all images are selected. + secondary_y: boolean or None (default None) + * If True, only select images associated with the secondary + y-axis of the subplot. + * If False, only select images associated with the primary + y-axis of the subplot. + * If None (the default), do not filter images based on secondary + y-axis. + + To select images by secondary y-axis, the Figure must have been + created using plotly.subplots.make_subplots. See the docstring + for the specs argument to make_subplots for more info on + creating subplots with secondary y-axes. + **kwargs + Additional property updates to apply to each selected image. If + a property is specified in both patch and in **kwargs then the + one in **kwargs takes precedence. + + Returns + ------- + self + Returns the FigureWidget object that the method was called on + """ + for obj in self._select_annotations_like( + prop="images", + selector=selector, + row=row, + col=col, + secondary_y=secondary_y, + ): + obj.update(patch, **kwargs) + + return self + + def add_layout_image( + self, + arg=None, + layer=None, + name=None, + opacity=None, + sizex=None, + sizey=None, + sizing=None, + source=None, + templateitemname=None, + visible=None, + x=None, + xanchor=None, + xref=None, + y=None, + yanchor=None, + yref=None, + row=None, + col=None, + secondary_y=None, + exclude_empty_subplots=None, + **kwargs, + ) -> "FigureWidget": + """ + Create and add a new image to the figure's layout + + Parameters + ---------- + arg + instance of Image or dict with compatible properties + layer + Specifies whether images are drawn below or above + traces. When `xref` and `yref` are both set to `paper`, + image is drawn below the entire plot area. + name + When used in a template, named items are created in the + output figure in addition to any items the figure + already has in this array. You can modify these items + in the output figure by making your own item with + `templateitemname` matching this `name` alongside your + modifications (including `visible: false` or `enabled: + false` to hide it). Has no effect outside of a + template. + opacity + Sets the opacity of the image. + sizex + Sets the image container size horizontally. The image + will be sized based on the `position` value. When + `xref` is set to `paper`, units are sized relative to + the plot width. When `xref` ends with ` domain`, units + are sized relative to the axis width. + sizey + Sets the image container size vertically. The image + will be sized based on the `position` value. When + `yref` is set to `paper`, units are sized relative to + the plot height. When `yref` ends with ` domain`, units + are sized relative to the axis height. + sizing + Specifies which dimension of the image to constrain. + source + Specifies the URL of the image to be used. The URL must + be accessible from the domain where the plot code is + run, and can be either relative or absolute. + templateitemname + Used to refer to a named item in this array in the + template. Named items from the template will be created + even without a matching item in the input figure, but + you can modify one by making an item with + `templateitemname` matching its `name`, alongside your + modifications (including `visible: false` or `enabled: + false` to hide it). If there is no template or no + matching item, this item will be hidden unless you + explicitly show it with `visible: true`. + visible + Determines whether or not this image is visible. + x + Sets the image's x position. When `xref` is set to + `paper`, units are sized relative to the plot height. + See `xref` for more info + xanchor + Sets the anchor for the x position + xref + Sets the images's x coordinate axis. If set to a x axis + id (e.g. "x" or "x2"), the `x` position refers to a x + coordinate. If set to "paper", the `x` position refers + to the distance from the left of the plotting area in + normalized coordinates where 0 (1) corresponds to the + left (right). If set to a x axis ID followed by + "domain" (separated by a space), the position behaves + like for "paper", but refers to the distance in + fractions of the domain length from the left of the + domain of that axis: e.g., *x2 domain* refers to the + domain of the second x axis and a x position of 0.5 + refers to the point between the left and the right of + the domain of the second x axis. + y + Sets the image's y position. When `yref` is set to + `paper`, units are sized relative to the plot height. + See `yref` for more info + yanchor + Sets the anchor for the y position. + yref + Sets the images's y coordinate axis. If set to a y axis + id (e.g. "y" or "y2"), the `y` position refers to a y + coordinate. If set to "paper", the `y` position refers + to the distance from the bottom of the plotting area in + normalized coordinates where 0 (1) corresponds to the + bottom (top). If set to a y axis ID followed by + "domain" (separated by a space), the position behaves + like for "paper", but refers to the distance in + fractions of the domain length from the bottom of the + domain of that axis: e.g., *y2 domain* refers to the + domain of the second y axis and a y position of 0.5 + refers to the point between the bottom and the top of + the domain of the second y axis. + row + Subplot row for image. If 'all', addresses all rows in + the specified column(s). + col + Subplot column for image. If 'all', addresses all + columns in the specified row(s). + secondary_y + Whether to add image to secondary y-axis + exclude_empty_subplots + If True, image will not be added to subplots without + traces. + + Returns + ------- + FigureWidget + """ + from plotly.graph_objs import layout as _layout + + new_obj = _layout.Image( + arg, + layer=layer, + name=name, + opacity=opacity, + sizex=sizex, + sizey=sizey, + sizing=sizing, + source=source, + templateitemname=templateitemname, + visible=visible, + x=x, + xanchor=xanchor, + xref=xref, + y=y, + yanchor=yanchor, + yref=yref, + **kwargs, + ) + return self._add_annotation_like( + "image", + "images", + new_obj, + row=row, + col=col, + secondary_y=secondary_y, + exclude_empty_subplots=exclude_empty_subplots, + ) + + def select_selections(self, selector=None, row=None, col=None, secondary_y=None): + """ + Select selections from a particular subplot cell and/or selections + that satisfy custom selection criteria. + + Parameters + ---------- + selector: dict, function, int, str, or None (default None) + Dict to use as selection criteria. + Annotations will be selected if they contain properties corresponding + to all of the dictionary's keys, with values that exactly match + the supplied values. If None (the default), all selections are + selected. If a function, it must be a function accepting a single + argument and returning a boolean. The function will be called on + each selection and those for which the function returned True + will be in the selection. If an int N, the Nth selection matching row + and col will be selected (N can be negative). If a string S, the selector + is equivalent to dict(type=S). + row, col: int or None (default None) + Subplot row and column index of selections to select. + To select selections by row and column, the Figure must have been + created using plotly.subplots.make_subplots. To select only those + selection that are in paper coordinates, set row and col to the + string 'paper'. If None (the default), all selections are selected. + secondary_y: boolean or None (default None) + * If True, only select selections associated with the secondary + y-axis of the subplot. + * If False, only select selections associated with the primary + y-axis of the subplot. + * If None (the default), do not filter selections based on secondary + y-axis. + + To select selections by secondary y-axis, the Figure must have been + created using plotly.subplots.make_subplots. See the docstring + for the specs argument to make_subplots for more info on + creating subplots with secondary y-axes. + Returns + ------- + generator + Generator that iterates through all of the selections that satisfy + all of the specified selection criteria + """ + return self._select_annotations_like( + "selections", selector=selector, row=row, col=col, secondary_y=secondary_y + ) + + def for_each_selection( + self, fn, selector=None, row=None, col=None, secondary_y=None + ): + """ + Apply a function to all selections that satisfy the specified selection + criteria + + Parameters + ---------- + fn: + Function that inputs a single selection object. + selector: dict, function, int, str or None (default None) + Dict to use as selection criteria. + Traces will be selected if they contain properties corresponding + to all of the dictionary's keys, with values that exactly match + the supplied values. If None (the default), all selections are + selected. If a function, it must be a function accepting a single + argument and returning a boolean. The function will be called on + each selection and those for which the function returned True + will be in the selection. If an int N, the Nth selection matching row + and col will be selected (N can be negative). If a string S, the selector + is equivalent to dict(type=S). + row, col: int or None (default None) + Subplot row and column index of selections to select. + To select selections by row and column, the Figure must have been + created using plotly.subplots.make_subplots. To select only those + selections that are in paper coordinates, set row and col to the + string 'paper'. If None (the default), all selections are selected. + secondary_y: boolean or None (default None) + * If True, only select selections associated with the secondary + y-axis of the subplot. + * If False, only select selections associated with the primary + y-axis of the subplot. + * If None (the default), do not filter selections based on secondary + y-axis. + + To select selections by secondary y-axis, the Figure must have been + created using plotly.subplots.make_subplots. See the docstring + for the specs argument to make_subplots for more info on + creating subplots with secondary y-axes. + Returns + ------- + self + Returns the FigureWidget object that the method was called on + """ + for obj in self._select_annotations_like( + prop="selections", + selector=selector, + row=row, + col=col, + secondary_y=secondary_y, + ): + fn(obj) + + return self + + def update_selections( + self, patch=None, selector=None, row=None, col=None, secondary_y=None, **kwargs + ) -> "FigureWidget": + """ + Perform a property update operation on all selections that satisfy the + specified selection criteria + + Parameters + ---------- + patch: dict or None (default None) + Dictionary of property updates to be applied to all selections that + satisfy the selection criteria. + selector: dict, function, int, str or None (default None) + Dict to use as selection criteria. + Traces will be selected if they contain properties corresponding + to all of the dictionary's keys, with values that exactly match + the supplied values. If None (the default), all selections are + selected. If a function, it must be a function accepting a single + argument and returning a boolean. The function will be called on + each selection and those for which the function returned True + will be in the selection. If an int N, the Nth selection matching row + and col will be selected (N can be negative). If a string S, the selector + is equivalent to dict(type=S). + row, col: int or None (default None) + Subplot row and column index of selections to select. + To select selections by row and column, the Figure must have been + created using plotly.subplots.make_subplots. To select only those + selection that are in paper coordinates, set row and col to the + string 'paper'. If None (the default), all selections are selected. + secondary_y: boolean or None (default None) + * If True, only select selections associated with the secondary + y-axis of the subplot. + * If False, only select selections associated with the primary + y-axis of the subplot. + * If None (the default), do not filter selections based on secondary + y-axis. + + To select selections by secondary y-axis, the Figure must have been + created using plotly.subplots.make_subplots. See the docstring + for the specs argument to make_subplots for more info on + creating subplots with secondary y-axes. + **kwargs + Additional property updates to apply to each selected selection. If + a property is specified in both patch and in **kwargs then the + one in **kwargs takes precedence. + + Returns + ------- + self + Returns the FigureWidget object that the method was called on + """ + for obj in self._select_annotations_like( + prop="selections", + selector=selector, + row=row, + col=col, + secondary_y=secondary_y, + ): + obj.update(patch, **kwargs) + + return self + + def add_selection( + self, + arg=None, + line=None, + name=None, + opacity=None, + path=None, + templateitemname=None, + type=None, + x0=None, + x1=None, + xref=None, + y0=None, + y1=None, + yref=None, + row=None, + col=None, + secondary_y=None, + exclude_empty_subplots=None, + **kwargs, + ) -> "FigureWidget": + """ + Create and add a new selection to the figure's layout + + Parameters + ---------- + arg + instance of Selection or dict with compatible + properties + line + :class:`plotly.graph_objects.layout.selection.Line` + instance or dict with compatible properties + name + When used in a template, named items are created in the + output figure in addition to any items the figure + already has in this array. You can modify these items + in the output figure by making your own item with + `templateitemname` matching this `name` alongside your + modifications (including `visible: false` or `enabled: + false` to hide it). Has no effect outside of a + template. + opacity + Sets the opacity of the selection. + path + For `type` "path" - a valid SVG path similar to + `shapes.path` in data coordinates. Allowed segments + are: M, L and Z. + templateitemname + Used to refer to a named item in this array in the + template. Named items from the template will be created + even without a matching item in the input figure, but + you can modify one by making an item with + `templateitemname` matching its `name`, alongside your + modifications (including `visible: false` or `enabled: + false` to hide it). If there is no template or no + matching item, this item will be hidden unless you + explicitly show it with `visible: true`. + type + Specifies the selection type to be drawn. If "rect", a + rectangle is drawn linking (`x0`,`y0`), (`x1`,`y0`), + (`x1`,`y1`) and (`x0`,`y1`). If "path", draw a custom + SVG path using `path`. + x0 + Sets the selection's starting x position. + x1 + Sets the selection's end x position. + xref + Sets the selection's x coordinate axis. If set to a x + axis id (e.g. "x" or "x2"), the `x` position refers to + a x coordinate. If set to "paper", the `x` position + refers to the distance from the left of the plotting + area in normalized coordinates where 0 (1) corresponds + to the left (right). If set to a x axis ID followed by + "domain" (separated by a space), the position behaves + like for "paper", but refers to the distance in + fractions of the domain length from the left of the + domain of that axis: e.g., *x2 domain* refers to the + domain of the second x axis and a x position of 0.5 + refers to the point between the left and the right of + the domain of the second x axis. + y0 + Sets the selection's starting y position. + y1 + Sets the selection's end y position. + yref + Sets the selection's x coordinate axis. If set to a y + axis id (e.g. "y" or "y2"), the `y` position refers to + a y coordinate. If set to "paper", the `y` position + refers to the distance from the bottom of the plotting + area in normalized coordinates where 0 (1) corresponds + to the bottom (top). If set to a y axis ID followed by + "domain" (separated by a space), the position behaves + like for "paper", but refers to the distance in + fractions of the domain length from the bottom of the + domain of that axis: e.g., *y2 domain* refers to the + domain of the second y axis and a y position of 0.5 + refers to the point between the bottom and the top of + the domain of the second y axis. + row + Subplot row for selection. If 'all', addresses all rows + in the specified column(s). + col + Subplot column for selection. If 'all', addresses all + columns in the specified row(s). + secondary_y + Whether to add selection to secondary y-axis + exclude_empty_subplots + If True, selection will not be added to subplots + without traces. + + Returns + ------- + FigureWidget + """ + from plotly.graph_objs import layout as _layout + + new_obj = _layout.Selection( + arg, + line=line, + name=name, + opacity=opacity, + path=path, + templateitemname=templateitemname, + type=type, + x0=x0, + x1=x1, + xref=xref, + y0=y0, + y1=y1, + yref=yref, + **kwargs, + ) + return self._add_annotation_like( + "selection", + "selections", + new_obj, + row=row, + col=col, + secondary_y=secondary_y, + exclude_empty_subplots=exclude_empty_subplots, + ) + + def select_shapes(self, selector=None, row=None, col=None, secondary_y=None): + """ + Select shapes from a particular subplot cell and/or shapes + that satisfy custom selection criteria. + + Parameters + ---------- + selector: dict, function, int, str, or None (default None) + Dict to use as selection criteria. + Annotations will be selected if they contain properties corresponding + to all of the dictionary's keys, with values that exactly match + the supplied values. If None (the default), all shapes are + selected. If a function, it must be a function accepting a single + argument and returning a boolean. The function will be called on + each shape and those for which the function returned True + will be in the selection. If an int N, the Nth shape matching row + and col will be selected (N can be negative). If a string S, the selector + is equivalent to dict(type=S). + row, col: int or None (default None) + Subplot row and column index of shapes to select. + To select shapes by row and column, the Figure must have been + created using plotly.subplots.make_subplots. To select only those + shape that are in paper coordinates, set row and col to the + string 'paper'. If None (the default), all shapes are selected. + secondary_y: boolean or None (default None) + * If True, only select shapes associated with the secondary + y-axis of the subplot. + * If False, only select shapes associated with the primary + y-axis of the subplot. + * If None (the default), do not filter shapes based on secondary + y-axis. + + To select shapes by secondary y-axis, the Figure must have been + created using plotly.subplots.make_subplots. See the docstring + for the specs argument to make_subplots for more info on + creating subplots with secondary y-axes. + Returns + ------- + generator + Generator that iterates through all of the shapes that satisfy + all of the specified selection criteria + """ + return self._select_annotations_like( + "shapes", selector=selector, row=row, col=col, secondary_y=secondary_y + ) + + def for_each_shape(self, fn, selector=None, row=None, col=None, secondary_y=None): + """ + Apply a function to all shapes that satisfy the specified selection + criteria + + Parameters + ---------- + fn: + Function that inputs a single shape object. + selector: dict, function, int, str or None (default None) + Dict to use as selection criteria. + Traces will be selected if they contain properties corresponding + to all of the dictionary's keys, with values that exactly match + the supplied values. If None (the default), all shapes are + selected. If a function, it must be a function accepting a single + argument and returning a boolean. The function will be called on + each shape and those for which the function returned True + will be in the selection. If an int N, the Nth shape matching row + and col will be selected (N can be negative). If a string S, the selector + is equivalent to dict(type=S). + row, col: int or None (default None) + Subplot row and column index of shapes to select. + To select shapes by row and column, the Figure must have been + created using plotly.subplots.make_subplots. To select only those + shapes that are in paper coordinates, set row and col to the + string 'paper'. If None (the default), all shapes are selected. + secondary_y: boolean or None (default None) + * If True, only select shapes associated with the secondary + y-axis of the subplot. + * If False, only select shapes associated with the primary + y-axis of the subplot. + * If None (the default), do not filter shapes based on secondary + y-axis. + + To select shapes by secondary y-axis, the Figure must have been + created using plotly.subplots.make_subplots. See the docstring + for the specs argument to make_subplots for more info on + creating subplots with secondary y-axes. + Returns + ------- + self + Returns the FigureWidget object that the method was called on + """ + for obj in self._select_annotations_like( + prop="shapes", + selector=selector, + row=row, + col=col, + secondary_y=secondary_y, + ): + fn(obj) + + return self + + def update_shapes( + self, patch=None, selector=None, row=None, col=None, secondary_y=None, **kwargs + ) -> "FigureWidget": + """ + Perform a property update operation on all shapes that satisfy the + specified selection criteria + + Parameters + ---------- + patch: dict or None (default None) + Dictionary of property updates to be applied to all shapes that + satisfy the selection criteria. + selector: dict, function, int, str or None (default None) + Dict to use as selection criteria. + Traces will be selected if they contain properties corresponding + to all of the dictionary's keys, with values that exactly match + the supplied values. If None (the default), all shapes are + selected. If a function, it must be a function accepting a single + argument and returning a boolean. The function will be called on + each shape and those for which the function returned True + will be in the selection. If an int N, the Nth shape matching row + and col will be selected (N can be negative). If a string S, the selector + is equivalent to dict(type=S). + row, col: int or None (default None) + Subplot row and column index of shapes to select. + To select shapes by row and column, the Figure must have been + created using plotly.subplots.make_subplots. To select only those + shape that are in paper coordinates, set row and col to the + string 'paper'. If None (the default), all shapes are selected. + secondary_y: boolean or None (default None) + * If True, only select shapes associated with the secondary + y-axis of the subplot. + * If False, only select shapes associated with the primary + y-axis of the subplot. + * If None (the default), do not filter shapes based on secondary + y-axis. + + To select shapes by secondary y-axis, the Figure must have been + created using plotly.subplots.make_subplots. See the docstring + for the specs argument to make_subplots for more info on + creating subplots with secondary y-axes. + **kwargs + Additional property updates to apply to each selected shape. If + a property is specified in both patch and in **kwargs then the + one in **kwargs takes precedence. + + Returns + ------- + self + Returns the FigureWidget object that the method was called on + """ + for obj in self._select_annotations_like( + prop="shapes", + selector=selector, + row=row, + col=col, + secondary_y=secondary_y, + ): + obj.update(patch, **kwargs) + + return self + + def add_shape( + self, + arg=None, + editable=None, + fillcolor=None, + fillrule=None, + label=None, + layer=None, + legend=None, + legendgroup=None, + legendgrouptitle=None, + legendrank=None, + legendwidth=None, + line=None, + name=None, + opacity=None, + path=None, + showlegend=None, + templateitemname=None, + type=None, + visible=None, + x0=None, + x0shift=None, + x1=None, + x1shift=None, + xanchor=None, + xref=None, + xsizemode=None, + y0=None, + y0shift=None, + y1=None, + y1shift=None, + yanchor=None, + yref=None, + ysizemode=None, + row=None, + col=None, + secondary_y=None, + exclude_empty_subplots=None, + **kwargs, + ) -> "FigureWidget": + """ + Create and add a new shape to the figure's layout + + Parameters + ---------- + arg + instance of Shape or dict with compatible properties + editable + Determines whether the shape could be activated for + edit or not. Has no effect when the older editable + shapes mode is enabled via `config.editable` or + `config.edits.shapePosition`. + fillcolor + Sets the color filling the shape's interior. Only + applies to closed shapes. + fillrule + Determines which regions of complex paths constitute + the interior. For more info please visit + https://developer.mozilla.org/en- + US/docs/Web/SVG/Attribute/fill-rule + label + :class:`plotly.graph_objects.layout.shape.Label` + instance or dict with compatible properties + layer + Specifies whether shapes are drawn below gridlines + ("below"), between gridlines and traces ("between") or + above traces ("above"). + legend + Sets the reference to a legend to show this shape in. + References to these legends are "legend", "legend2", + "legend3", etc. Settings for these legends are set in + the layout, under `layout.legend`, `layout.legend2`, + etc. + legendgroup + Sets the legend group for this shape. Traces and shapes + part of the same legend group hide/show at the same + time when toggling legend items. + legendgrouptitle + :class:`plotly.graph_objects.layout.shape.Legendgroupti + tle` instance or dict with compatible properties + legendrank + Sets the legend rank for this shape. Items and groups + with smaller ranks are presented on top/left side while + with "reversed" `legend.traceorder` they are on + bottom/right side. The default legendrank is 1000, so + that you can use ranks less than 1000 to place certain + items before all unranked items, and ranks greater than + 1000 to go after all unranked items. When having + unranked or equal rank items shapes would be displayed + after traces i.e. according to their order in data and + layout. + legendwidth + Sets the width (in px or fraction) of the legend for + this shape. + line + :class:`plotly.graph_objects.layout.shape.Line` + instance or dict with compatible properties + name + When used in a template, named items are created in the + output figure in addition to any items the figure + already has in this array. You can modify these items + in the output figure by making your own item with + `templateitemname` matching this `name` alongside your + modifications (including `visible: false` or `enabled: + false` to hide it). Has no effect outside of a + template. + opacity + Sets the opacity of the shape. + path + For `type` "path" - a valid SVG path with the pixel + values replaced by data values in + `xsizemode`/`ysizemode` being "scaled" and taken + unmodified as pixels relative to `xanchor` and + `yanchor` in case of "pixel" size mode. There are a few + restrictions / quirks only absolute instructions, not + relative. So the allowed segments are: M, L, H, V, Q, + C, T, S, and Z arcs (A) are not allowed because radius + rx and ry are relative. In the future we could consider + supporting relative commands, but we would have to + decide on how to handle date and log axes. Note that + even as is, Q and C Bezier paths that are smooth on + linear axes may not be smooth on log, and vice versa. + no chained "polybezier" commands - specify the segment + type for each one. On category axes, values are numbers + scaled to the serial numbers of categories because + using the categories themselves there would be no way + to describe fractional positions On data axes: because + space and T are both normal components of path strings, + we can't use either to separate date from time parts. + Therefore we'll use underscore for this purpose: + 2015-02-21_13:45:56.789 + showlegend + Determines whether or not this shape is shown in the + legend. + templateitemname + Used to refer to a named item in this array in the + template. Named items from the template will be created + even without a matching item in the input figure, but + you can modify one by making an item with + `templateitemname` matching its `name`, alongside your + modifications (including `visible: false` or `enabled: + false` to hide it). If there is no template or no + matching item, this item will be hidden unless you + explicitly show it with `visible: true`. + type + Specifies the shape type to be drawn. If "line", a line + is drawn from (`x0`,`y0`) to (`x1`,`y1`) with respect + to the axes' sizing mode. If "circle", a circle is + drawn from ((`x0`+`x1`)/2, (`y0`+`y1`)/2)) with radius + (|(`x0`+`x1`)/2 - `x0`|, |(`y0`+`y1`)/2 -`y0`)|) with + respect to the axes' sizing mode. If "rect", a + rectangle is drawn linking (`x0`,`y0`), (`x1`,`y0`), + (`x1`,`y1`), (`x0`,`y1`), (`x0`,`y0`) with respect to + the axes' sizing mode. If "path", draw a custom SVG + path using `path`. with respect to the axes' sizing + mode. + visible + Determines whether or not this shape is visible. If + "legendonly", the shape is not drawn, but can appear as + a legend item (provided that the legend itself is + visible). + x0 + Sets the shape's starting x position. See `type` and + `xsizemode` for more info. + x0shift + Shifts `x0` away from the center of the category when + `xref` is a "category" or "multicategory" axis. -0.5 + corresponds to the start of the category and 0.5 + corresponds to the end of the category. + x1 + Sets the shape's end x position. See `type` and + `xsizemode` for more info. + x1shift + Shifts `x1` away from the center of the category when + `xref` is a "category" or "multicategory" axis. -0.5 + corresponds to the start of the category and 0.5 + corresponds to the end of the category. + xanchor + Only relevant in conjunction with `xsizemode` set to + "pixel". Specifies the anchor point on the x axis to + which `x0`, `x1` and x coordinates within `path` are + relative to. E.g. useful to attach a pixel sized shape + to a certain data value. No effect when `xsizemode` not + set to "pixel". + xref + Sets the shape's x coordinate axis. If set to a x axis + id (e.g. "x" or "x2"), the `x` position refers to a x + coordinate. If set to "paper", the `x` position refers + to the distance from the left of the plotting area in + normalized coordinates where 0 (1) corresponds to the + left (right). If set to a x axis ID followed by + "domain" (separated by a space), the position behaves + like for "paper", but refers to the distance in + fractions of the domain length from the left of the + domain of that axis: e.g., *x2 domain* refers to the + domain of the second x axis and a x position of 0.5 + refers to the point between the left and the right of + the domain of the second x axis. + xsizemode + Sets the shapes's sizing mode along the x axis. If set + to "scaled", `x0`, `x1` and x coordinates within `path` + refer to data values on the x axis or a fraction of the + plot area's width (`xref` set to "paper"). If set to + "pixel", `xanchor` specifies the x position in terms of + data or plot fraction but `x0`, `x1` and x coordinates + within `path` are pixels relative to `xanchor`. This + way, the shape can have a fixed width while maintaining + a position relative to data or plot fraction. + y0 + Sets the shape's starting y position. See `type` and + `ysizemode` for more info. + y0shift + Shifts `y0` away from the center of the category when + `yref` is a "category" or "multicategory" axis. -0.5 + corresponds to the start of the category and 0.5 + corresponds to the end of the category. + y1 + Sets the shape's end y position. See `type` and + `ysizemode` for more info. + y1shift + Shifts `y1` away from the center of the category when + `yref` is a "category" or "multicategory" axis. -0.5 + corresponds to the start of the category and 0.5 + corresponds to the end of the category. + yanchor + Only relevant in conjunction with `ysizemode` set to + "pixel". Specifies the anchor point on the y axis to + which `y0`, `y1` and y coordinates within `path` are + relative to. E.g. useful to attach a pixel sized shape + to a certain data value. No effect when `ysizemode` not + set to "pixel". + yref + Sets the shape's y coordinate axis. If set to a y axis + id (e.g. "y" or "y2"), the `y` position refers to a y + coordinate. If set to "paper", the `y` position refers + to the distance from the bottom of the plotting area in + normalized coordinates where 0 (1) corresponds to the + bottom (top). If set to a y axis ID followed by + "domain" (separated by a space), the position behaves + like for "paper", but refers to the distance in + fractions of the domain length from the bottom of the + domain of that axis: e.g., *y2 domain* refers to the + domain of the second y axis and a y position of 0.5 + refers to the point between the bottom and the top of + the domain of the second y axis. + ysizemode + Sets the shapes's sizing mode along the y axis. If set + to "scaled", `y0`, `y1` and y coordinates within `path` + refer to data values on the y axis or a fraction of the + plot area's height (`yref` set to "paper"). If set to + "pixel", `yanchor` specifies the y position in terms of + data or plot fraction but `y0`, `y1` and y coordinates + within `path` are pixels relative to `yanchor`. This + way, the shape can have a fixed height while + maintaining a position relative to data or plot + fraction. + row + Subplot row for shape. If 'all', addresses all rows in + the specified column(s). + col + Subplot column for shape. If 'all', addresses all + columns in the specified row(s). + secondary_y + Whether to add shape to secondary y-axis + exclude_empty_subplots + If True, shape will not be added to subplots without + traces. + + Returns + ------- + FigureWidget + """ + from plotly.graph_objs import layout as _layout + + new_obj = _layout.Shape( + arg, + editable=editable, + fillcolor=fillcolor, + fillrule=fillrule, + label=label, + layer=layer, + legend=legend, + legendgroup=legendgroup, + legendgrouptitle=legendgrouptitle, + legendrank=legendrank, + legendwidth=legendwidth, + line=line, + name=name, + opacity=opacity, + path=path, + showlegend=showlegend, + templateitemname=templateitemname, + type=type, + visible=visible, + x0=x0, + x0shift=x0shift, + x1=x1, + x1shift=x1shift, + xanchor=xanchor, + xref=xref, + xsizemode=xsizemode, + y0=y0, + y0shift=y0shift, + y1=y1, + y1shift=y1shift, + yanchor=yanchor, + yref=yref, + ysizemode=ysizemode, + **kwargs, + ) + return self._add_annotation_like( + "shape", + "shapes", + new_obj, + row=row, + col=col, + secondary_y=secondary_y, + exclude_empty_subplots=exclude_empty_subplots, + ) diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/_frame.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/_frame.py new file mode 100644 index 0000000000000000000000000000000000000000..703e8d244af7c68a2d33139e5bd72a1d136cd5b0 --- /dev/null +++ b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/_frame.py @@ -0,0 +1,220 @@ +# --- THIS FILE IS AUTO-GENERATED --- +# Modifications will be overwitten the next time code generation run. + +from plotly.basedatatypes import BaseFrameHierarchyType as _BaseFrameHierarchyType +import copy as _copy + + +class Frame(_BaseFrameHierarchyType): + _parent_path_str = "" + _path_str = "frame" + _valid_props = {"baseframe", "data", "group", "layout", "name", "traces"} + + @property + def baseframe(self): + """ + The name of the frame into which this frame's properties are + merged before applying. This is used to unify properties and + avoid needing to specify the same values for the same + properties in multiple frames. + + The 'baseframe' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["baseframe"] + + @baseframe.setter + def baseframe(self, val): + self["baseframe"] = val + + @property + def data(self): + """ + A list of traces this frame modifies. The format is identical + to the normal trace definition. + + Returns + ------- + Any + """ + return self["data"] + + @data.setter + def data(self, val): + self["data"] = val + + @property + def group(self): + """ + An identifier that specifies the group to which the frame + belongs, used by animate to select a subset of frames. + + The 'group' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["group"] + + @group.setter + def group(self, val): + self["group"] = val + + @property + def layout(self): + """ + Layout properties which this frame modifies. The format is + identical to the normal layout definition. + + Returns + ------- + Any + """ + return self["layout"] + + @layout.setter + def layout(self, val): + self["layout"] = val + + @property + def name(self): + """ + A label by which to identify the frame + + The 'name' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["name"] + + @name.setter + def name(self, val): + self["name"] = val + + @property + def traces(self): + """ + A list of trace indices that identify the respective traces in + the data attribute + + The 'traces' property accepts values of any type + + Returns + ------- + Any + """ + return self["traces"] + + @traces.setter + def traces(self, val): + self["traces"] = val + + @property + def _prop_descriptions(self): + return """\ + baseframe + The name of the frame into which this frame's + properties are merged before applying. This is used to + unify properties and avoid needing to specify the same + values for the same properties in multiple frames. + data + A list of traces this frame modifies. The format is + identical to the normal trace definition. + group + An identifier that specifies the group to which the + frame belongs, used by animate to select a subset of + frames. + layout + Layout properties which this frame modifies. The format + is identical to the normal layout definition. + name + A label by which to identify the frame + traces + A list of trace indices that identify the respective + traces in the data attribute + """ + + def __init__( + self, + arg=None, + baseframe=None, + data=None, + group=None, + layout=None, + name=None, + traces=None, + **kwargs, + ): + """ + Construct a new Frame object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of :class:`plotly.graph_objs.Frame` + baseframe + The name of the frame into which this frame's + properties are merged before applying. This is used to + unify properties and avoid needing to specify the same + values for the same properties in multiple frames. + data + A list of traces this frame modifies. The format is + identical to the normal trace definition. + group + An identifier that specifies the group to which the + frame belongs, used by animate to select a subset of + frames. + layout + Layout properties which this frame modifies. The format + is identical to the normal layout definition. + name + A label by which to identify the frame + traces + A list of trace indices that identify the respective + traces in the data attribute + + Returns + ------- + Frame + """ + super().__init__("frames") + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + if arg is None: + arg = {} + elif isinstance(arg, self.__class__): + arg = arg.to_plotly_json() + elif isinstance(arg, dict): + arg = _copy.copy(arg) + else: + raise ValueError("""\ +The first argument to the plotly.graph_objs.Frame +constructor must be a dict or +an instance of :class:`plotly.graph_objs.Frame`""") + + self._skip_invalid = kwargs.pop("skip_invalid", False) + self._validate = kwargs.pop("_validate", True) + + self._set_property("baseframe", arg, baseframe) + self._set_property("data", arg, data) + self._set_property("group", arg, group) + self._set_property("layout", arg, layout) + self._set_property("name", arg, name) + self._set_property("traces", arg, traces) + self._process_kwargs(**dict(arg, **kwargs)) + self._skip_invalid = False diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/_funnel.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/_funnel.py new file mode 100644 index 0000000000000000000000000000000000000000..244c2861bbdc23b9eda8501655e33997bba44386 --- /dev/null +++ b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/_funnel.py @@ -0,0 +1,2487 @@ +# --- THIS FILE IS AUTO-GENERATED --- +# Modifications will be overwitten the next time code generation run. + +from plotly.basedatatypes import BaseTraceType as _BaseTraceType +import copy as _copy + + +class Funnel(_BaseTraceType): + _parent_path_str = "" + _path_str = "funnel" + _valid_props = { + "alignmentgroup", + "cliponaxis", + "connector", + "constraintext", + "customdata", + "customdatasrc", + "dx", + "dy", + "hoverinfo", + "hoverinfosrc", + "hoverlabel", + "hovertemplate", + "hovertemplatefallback", + "hovertemplatesrc", + "hovertext", + "hovertextsrc", + "ids", + "idssrc", + "insidetextanchor", + "insidetextfont", + "legend", + "legendgroup", + "legendgrouptitle", + "legendrank", + "legendwidth", + "marker", + "meta", + "metasrc", + "name", + "offset", + "offsetgroup", + "opacity", + "orientation", + "outsidetextfont", + "selectedpoints", + "showlegend", + "stream", + "text", + "textangle", + "textfont", + "textinfo", + "textposition", + "textpositionsrc", + "textsrc", + "texttemplate", + "texttemplatefallback", + "texttemplatesrc", + "type", + "uid", + "uirevision", + "visible", + "width", + "x", + "x0", + "xaxis", + "xhoverformat", + "xperiod", + "xperiod0", + "xperiodalignment", + "xsrc", + "y", + "y0", + "yaxis", + "yhoverformat", + "yperiod", + "yperiod0", + "yperiodalignment", + "ysrc", + "zorder", + } + + @property + def alignmentgroup(self): + """ + Set several traces linked to the same position axis or matching + axes to the same alignmentgroup. This controls whether bars + compute their positional range dependently or independently. + + The 'alignmentgroup' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["alignmentgroup"] + + @alignmentgroup.setter + def alignmentgroup(self, val): + self["alignmentgroup"] = val + + @property + def cliponaxis(self): + """ + Determines whether the text nodes are clipped about the subplot + axes. To show the text nodes above axis lines and tick labels, + make sure to set `xaxis.layer` and `yaxis.layer` to *below + traces*. + + The 'cliponaxis' property is a boolean and must be specified as: + - A boolean value: True or False + + Returns + ------- + bool + """ + return self["cliponaxis"] + + @cliponaxis.setter + def cliponaxis(self, val): + self["cliponaxis"] = val + + @property + def connector(self): + """ + The 'connector' property is an instance of Connector + that may be specified as: + - An instance of :class:`plotly.graph_objs.funnel.Connector` + - A dict of string/value properties that will be passed + to the Connector constructor + + Returns + ------- + plotly.graph_objs.funnel.Connector + """ + return self["connector"] + + @connector.setter + def connector(self, val): + self["connector"] = val + + @property + def constraintext(self): + """ + Constrain the size of text inside or outside a bar to be no + larger than the bar itself. + + The 'constraintext' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['inside', 'outside', 'both', 'none'] + + Returns + ------- + Any + """ + return self["constraintext"] + + @constraintext.setter + def constraintext(self, val): + self["constraintext"] = val + + @property + def customdata(self): + """ + Assigns extra data each datum. This may be useful when + listening to hover, click and selection events. Note that, + "scatter" traces also appends customdata items in the markers + DOM elements + + The 'customdata' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["customdata"] + + @customdata.setter + def customdata(self, val): + self["customdata"] = val + + @property + def customdatasrc(self): + """ + Sets the source reference on Chart Studio Cloud for + `customdata`. + + The 'customdatasrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["customdatasrc"] + + @customdatasrc.setter + def customdatasrc(self, val): + self["customdatasrc"] = val + + @property + def dx(self): + """ + Sets the x coordinate step. See `x0` for more info. + + The 'dx' property is a number and may be specified as: + - An int or float + + Returns + ------- + int|float + """ + return self["dx"] + + @dx.setter + def dx(self, val): + self["dx"] = val + + @property + def dy(self): + """ + Sets the y coordinate step. See `y0` for more info. + + The 'dy' property is a number and may be specified as: + - An int or float + + Returns + ------- + int|float + """ + return self["dy"] + + @dy.setter + def dy(self, val): + self["dy"] = val + + @property + def hoverinfo(self): + """ + Determines which trace information appear on hover. If `none` + or `skip` are set, no information is displayed upon hovering. + But, if `none` is set, click and hover events are still fired. + + The 'hoverinfo' property is a flaglist and may be specified + as a string containing: + - Any combination of ['name', 'x', 'y', 'text', 'percent initial', 'percent previous', 'percent total'] joined with '+' characters + (e.g. 'name+x') + OR exactly one of ['all', 'none', 'skip'] (e.g. 'skip') + - A list or array of the above + + Returns + ------- + Any|numpy.ndarray + """ + return self["hoverinfo"] + + @hoverinfo.setter + def hoverinfo(self, val): + self["hoverinfo"] = val + + @property + def hoverinfosrc(self): + """ + Sets the source reference on Chart Studio Cloud for + `hoverinfo`. + + The 'hoverinfosrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["hoverinfosrc"] + + @hoverinfosrc.setter + def hoverinfosrc(self, val): + self["hoverinfosrc"] = val + + @property + def hoverlabel(self): + """ + The 'hoverlabel' property is an instance of Hoverlabel + that may be specified as: + - An instance of :class:`plotly.graph_objs.funnel.Hoverlabel` + - A dict of string/value properties that will be passed + to the Hoverlabel constructor + + Returns + ------- + plotly.graph_objs.funnel.Hoverlabel + """ + return self["hoverlabel"] + + @hoverlabel.setter + def hoverlabel(self, val): + self["hoverlabel"] = val + + @property + def hovertemplate(self): + """ + Template string used for rendering the information that appear + on hover box. Note that this will override `hoverinfo`. + Variables are inserted using %{variable}, for example "y: %{y}" + as well as %{xother}, {%_xother}, {%_xother_}, {%xother_}. When + showing info for several points, "xother" will be added to + those with different x positions from the first point. An + underscore before or after "(x|y)other" will add a space on + that side, only when this field is shown. Numbers are formatted + using d3-format's syntax %{variable:d3-format}, for example + "Price: %{y:$.2f}". + https://github.com/d3/d3-format/tree/v1.4.5#d3-format for + details on the formatting syntax. Dates are formatted using + d3-time-format's syntax %{variable|d3-time-format}, for example + "Day: %{2019-01-01|%A}". https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format for details on the date + formatting syntax. Variables that can't be found will be + replaced with the specifier. For example, a template of "data: + %{x}, %{y}" will result in a value of "data: 1, %{y}" if x is 1 + and y is missing. Variables with an undefined value will be + replaced with the fallback value. The variables available in + `hovertemplate` are the ones emitted as event data described at + this link https://plotly.com/javascript/plotlyjs-events/#event- + data. Additionally, all attributes that can be specified per- + point (the ones that are `arrayOk: true`) are available. + Finally, the template string has access to variables + `percentInitial`, `percentPrevious` and `percentTotal`. + Anything contained in tag `` is displayed in the + secondary box, for example `%{fullData.name}`. + To hide the secondary box completely, use an empty tag + ``. + + The 'hovertemplate' property is a string and must be specified as: + - A string + - A number that will be converted to a string + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["hovertemplate"] + + @hovertemplate.setter + def hovertemplate(self, val): + self["hovertemplate"] = val + + @property + def hovertemplatefallback(self): + """ + Fallback string that's displayed when a variable referenced in + a template is missing. If the boolean value 'false' is passed + in, the specifier with the missing variable will be displayed. + + The 'hovertemplatefallback' property accepts values of any type + + Returns + ------- + Any + """ + return self["hovertemplatefallback"] + + @hovertemplatefallback.setter + def hovertemplatefallback(self, val): + self["hovertemplatefallback"] = val + + @property + def hovertemplatesrc(self): + """ + Sets the source reference on Chart Studio Cloud for + `hovertemplate`. + + The 'hovertemplatesrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["hovertemplatesrc"] + + @hovertemplatesrc.setter + def hovertemplatesrc(self, val): + self["hovertemplatesrc"] = val + + @property + def hovertext(self): + """ + Sets hover text elements associated with each (x,y) pair. If a + single string, the same string appears over all the data + points. If an array of string, the items are mapped in order to + the this trace's (x,y) coordinates. To be seen, trace + `hoverinfo` must contain a "text" flag. + + The 'hovertext' property is a string and must be specified as: + - A string + - A number that will be converted to a string + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["hovertext"] + + @hovertext.setter + def hovertext(self, val): + self["hovertext"] = val + + @property + def hovertextsrc(self): + """ + Sets the source reference on Chart Studio Cloud for + `hovertext`. + + The 'hovertextsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["hovertextsrc"] + + @hovertextsrc.setter + def hovertextsrc(self, val): + self["hovertextsrc"] = val + + @property + def ids(self): + """ + Assigns id labels to each datum. These ids for object constancy + of data points during animation. Should be an array of strings, + not numbers or any other type. + + The 'ids' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["ids"] + + @ids.setter + def ids(self, val): + self["ids"] = val + + @property + def idssrc(self): + """ + Sets the source reference on Chart Studio Cloud for `ids`. + + The 'idssrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["idssrc"] + + @idssrc.setter + def idssrc(self, val): + self["idssrc"] = val + + @property + def insidetextanchor(self): + """ + Determines if texts are kept at center or start/end points in + `textposition` "inside" mode. + + The 'insidetextanchor' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['end', 'middle', 'start'] + + Returns + ------- + Any + """ + return self["insidetextanchor"] + + @insidetextanchor.setter + def insidetextanchor(self, val): + self["insidetextanchor"] = val + + @property + def insidetextfont(self): + """ + Sets the font used for `text` lying inside the bar. + + The 'insidetextfont' property is an instance of Insidetextfont + that may be specified as: + - An instance of :class:`plotly.graph_objs.funnel.Insidetextfont` + - A dict of string/value properties that will be passed + to the Insidetextfont constructor + + Returns + ------- + plotly.graph_objs.funnel.Insidetextfont + """ + return self["insidetextfont"] + + @insidetextfont.setter + def insidetextfont(self, val): + self["insidetextfont"] = val + + @property + def legend(self): + """ + Sets the reference to a legend to show this trace in. + References to these legends are "legend", "legend2", "legend3", + etc. Settings for these legends are set in the layout, under + `layout.legend`, `layout.legend2`, etc. + + The 'legend' property is an identifier of a particular + subplot, of type 'legend', that may be specified as: + - the string 'legend' optionally followed by an integer >= 1 + (e.g. 'legend', 'legend1', 'legend2', 'legend3', etc.) + + Returns + ------- + str + """ + return self["legend"] + + @legend.setter + def legend(self, val): + self["legend"] = val + + @property + def legendgroup(self): + """ + Sets the legend group for this trace. Traces and shapes part of + the same legend group hide/show at the same time when toggling + legend items. + + The 'legendgroup' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["legendgroup"] + + @legendgroup.setter + def legendgroup(self, val): + self["legendgroup"] = val + + @property + def legendgrouptitle(self): + """ + The 'legendgrouptitle' property is an instance of Legendgrouptitle + that may be specified as: + - An instance of :class:`plotly.graph_objs.funnel.Legendgrouptitle` + - A dict of string/value properties that will be passed + to the Legendgrouptitle constructor + + Returns + ------- + plotly.graph_objs.funnel.Legendgrouptitle + """ + return self["legendgrouptitle"] + + @legendgrouptitle.setter + def legendgrouptitle(self, val): + self["legendgrouptitle"] = val + + @property + def legendrank(self): + """ + Sets the legend rank for this trace. Items and groups with + smaller ranks are presented on top/left side while with + "reversed" `legend.traceorder` they are on bottom/right side. + The default legendrank is 1000, so that you can use ranks less + than 1000 to place certain items before all unranked items, and + ranks greater than 1000 to go after all unranked items. When + having unranked or equal rank items shapes would be displayed + after traces i.e. according to their order in data and layout. + + The 'legendrank' property is a number and may be specified as: + - An int or float + + Returns + ------- + int|float + """ + return self["legendrank"] + + @legendrank.setter + def legendrank(self, val): + self["legendrank"] = val + + @property + def legendwidth(self): + """ + Sets the width (in px or fraction) of the legend for this + trace. + + The 'legendwidth' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["legendwidth"] + + @legendwidth.setter + def legendwidth(self, val): + self["legendwidth"] = val + + @property + def marker(self): + """ + The 'marker' property is an instance of Marker + that may be specified as: + - An instance of :class:`plotly.graph_objs.funnel.Marker` + - A dict of string/value properties that will be passed + to the Marker constructor + + Returns + ------- + plotly.graph_objs.funnel.Marker + """ + return self["marker"] + + @marker.setter + def marker(self, val): + self["marker"] = val + + @property + def meta(self): + """ + Assigns extra meta information associated with this trace that + can be used in various text attributes. Attributes such as + trace `name`, graph, axis and colorbar `title.text`, annotation + `text` `rangeselector`, `updatemenues` and `sliders` `label` + text all support `meta`. To access the trace `meta` values in + an attribute in the same trace, simply use `%{meta[i]}` where + `i` is the index or key of the `meta` item in question. To + access trace `meta` in layout attributes, use + `%{data[n[.meta[i]}` where `i` is the index or key of the + `meta` and `n` is the trace index. + + The 'meta' property accepts values of any type + + Returns + ------- + Any|numpy.ndarray + """ + return self["meta"] + + @meta.setter + def meta(self, val): + self["meta"] = val + + @property + def metasrc(self): + """ + Sets the source reference on Chart Studio Cloud for `meta`. + + The 'metasrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["metasrc"] + + @metasrc.setter + def metasrc(self, val): + self["metasrc"] = val + + @property + def name(self): + """ + Sets the trace name. The trace name appears as the legend item + and on hover. + + The 'name' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["name"] + + @name.setter + def name(self, val): + self["name"] = val + + @property + def offset(self): + """ + Shifts the position where the bar is drawn (in position axis + units). In "group" barmode, traces that set "offset" will be + excluded and drawn in "overlay" mode instead. + + The 'offset' property is a number and may be specified as: + - An int or float + + Returns + ------- + int|float + """ + return self["offset"] + + @offset.setter + def offset(self, val): + self["offset"] = val + + @property + def offsetgroup(self): + """ + Set several traces linked to the same position axis or matching + axes to the same offsetgroup where bars of the same position + coordinate will line up. + + The 'offsetgroup' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["offsetgroup"] + + @offsetgroup.setter + def offsetgroup(self, val): + self["offsetgroup"] = val + + @property + def opacity(self): + """ + Sets the opacity of the trace. + + The 'opacity' property is a number and may be specified as: + - An int or float in the interval [0, 1] + + Returns + ------- + int|float + """ + return self["opacity"] + + @opacity.setter + def opacity(self, val): + self["opacity"] = val + + @property + def orientation(self): + """ + Sets the orientation of the funnels. With "v" ("h"), the value + of the each bar spans along the vertical (horizontal). By + default funnels are tend to be oriented horizontally; unless + only "y" array is presented or orientation is set to "v". Also + regarding graphs including only 'horizontal' funnels, + "autorange" on the "y-axis" are set to "reversed". + + The 'orientation' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['v', 'h'] + + Returns + ------- + Any + """ + return self["orientation"] + + @orientation.setter + def orientation(self, val): + self["orientation"] = val + + @property + def outsidetextfont(self): + """ + Sets the font used for `text` lying outside the bar. + + The 'outsidetextfont' property is an instance of Outsidetextfont + that may be specified as: + - An instance of :class:`plotly.graph_objs.funnel.Outsidetextfont` + - A dict of string/value properties that will be passed + to the Outsidetextfont constructor + + Returns + ------- + plotly.graph_objs.funnel.Outsidetextfont + """ + return self["outsidetextfont"] + + @outsidetextfont.setter + def outsidetextfont(self, val): + self["outsidetextfont"] = val + + @property + def selectedpoints(self): + """ + Array containing integer indices of selected points. Has an + effect only for traces that support selections. Note that an + empty array means an empty selection where the `unselected` are + turned on for all points, whereas, any other non-array values + means no selection all where the `selected` and `unselected` + styles have no effect. + + The 'selectedpoints' property accepts values of any type + + Returns + ------- + Any + """ + return self["selectedpoints"] + + @selectedpoints.setter + def selectedpoints(self, val): + self["selectedpoints"] = val + + @property + def showlegend(self): + """ + Determines whether or not an item corresponding to this trace + is shown in the legend. + + The 'showlegend' property is a boolean and must be specified as: + - A boolean value: True or False + + Returns + ------- + bool + """ + return self["showlegend"] + + @showlegend.setter + def showlegend(self, val): + self["showlegend"] = val + + @property + def stream(self): + """ + The 'stream' property is an instance of Stream + that may be specified as: + - An instance of :class:`plotly.graph_objs.funnel.Stream` + - A dict of string/value properties that will be passed + to the Stream constructor + + Returns + ------- + plotly.graph_objs.funnel.Stream + """ + return self["stream"] + + @stream.setter + def stream(self, val): + self["stream"] = val + + @property + def text(self): + """ + Sets text elements associated with each (x,y) pair. If a single + string, the same string appears over all the data points. If an + array of string, the items are mapped in order to the this + trace's (x,y) coordinates. If trace `hoverinfo` contains a + "text" flag and "hovertext" is not set, these elements will be + seen in the hover labels. + + The 'text' property is a string and must be specified as: + - A string + - A number that will be converted to a string + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["text"] + + @text.setter + def text(self, val): + self["text"] = val + + @property + def textangle(self): + """ + Sets the angle of the tick labels with respect to the bar. For + example, a `tickangle` of -90 draws the tick labels vertically. + With "auto" the texts may automatically be rotated to fit with + the maximum size in bars. + + The 'textangle' property is a angle (in degrees) that may be + specified as a number between -180 and 180. + Numeric values outside this range are converted to the equivalent value + (e.g. 270 is converted to -90). + + Returns + ------- + int|float + """ + return self["textangle"] + + @textangle.setter + def textangle(self, val): + self["textangle"] = val + + @property + def textfont(self): + """ + Sets the font used for `text`. + + The 'textfont' property is an instance of Textfont + that may be specified as: + - An instance of :class:`plotly.graph_objs.funnel.Textfont` + - A dict of string/value properties that will be passed + to the Textfont constructor + + Returns + ------- + plotly.graph_objs.funnel.Textfont + """ + return self["textfont"] + + @textfont.setter + def textfont(self, val): + self["textfont"] = val + + @property + def textinfo(self): + """ + Determines which trace information appear on the graph. In the + case of having multiple funnels, percentages & totals are + computed separately (per trace). + + The 'textinfo' property is a flaglist and may be specified + as a string containing: + - Any combination of ['label', 'text', 'percent initial', 'percent previous', 'percent total', 'value'] joined with '+' characters + (e.g. 'label+text') + OR exactly one of ['none'] (e.g. 'none') + + Returns + ------- + Any + """ + return self["textinfo"] + + @textinfo.setter + def textinfo(self, val): + self["textinfo"] = val + + @property + def textposition(self): + """ + Specifies the location of the `text`. "inside" positions `text` + inside, next to the bar end (rotated and scaled if needed). + "outside" positions `text` outside, next to the bar end (scaled + if needed), unless there is another bar stacked on this one, + then the text gets pushed inside. "auto" tries to position + `text` inside the bar, but if the bar is too small and no bar + is stacked on this one the text is moved outside. If "none", no + text appears. + + The 'textposition' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['inside', 'outside', 'auto', 'none'] + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + Any|numpy.ndarray + """ + return self["textposition"] + + @textposition.setter + def textposition(self, val): + self["textposition"] = val + + @property + def textpositionsrc(self): + """ + Sets the source reference on Chart Studio Cloud for + `textposition`. + + The 'textpositionsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["textpositionsrc"] + + @textpositionsrc.setter + def textpositionsrc(self, val): + self["textpositionsrc"] = val + + @property + def textsrc(self): + """ + Sets the source reference on Chart Studio Cloud for `text`. + + The 'textsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["textsrc"] + + @textsrc.setter + def textsrc(self, val): + self["textsrc"] = val + + @property + def texttemplate(self): + """ + Template string used for rendering the information text that + appears on points. Note that this will override `textinfo`. + Variables are inserted using %{variable}, for example "y: + %{y}". Numbers are formatted using d3-format's syntax + %{variable:d3-format}, for example "Price: %{y:$.2f}". + https://github.com/d3/d3-format/tree/v1.4.5#d3-format for + details on the formatting syntax. Dates are formatted using + d3-time-format's syntax %{variable|d3-time-format}, for example + "Day: %{2019-01-01|%A}". https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format for details on the date + formatting syntax. Variables that can't be found will be + replaced with the specifier. For example, a template of "data: + %{x}, %{y}" will result in a value of "data: 1, %{y}" if x is 1 + and y is missing. Variables with an undefined value will be + replaced with the fallback value. All attributes that can be + specified per-point (the ones that are `arrayOk: true`) are + available. Finally, the template string has access to variables + `percentInitial`, `percentPrevious`, `percentTotal`, `label` + and `value`. + + The 'texttemplate' property is a string and must be specified as: + - A string + - A number that will be converted to a string + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["texttemplate"] + + @texttemplate.setter + def texttemplate(self, val): + self["texttemplate"] = val + + @property + def texttemplatefallback(self): + """ + Fallback string that's displayed when a variable referenced in + a template is missing. If the boolean value 'false' is passed + in, the specifier with the missing variable will be displayed. + + The 'texttemplatefallback' property accepts values of any type + + Returns + ------- + Any + """ + return self["texttemplatefallback"] + + @texttemplatefallback.setter + def texttemplatefallback(self, val): + self["texttemplatefallback"] = val + + @property + def texttemplatesrc(self): + """ + Sets the source reference on Chart Studio Cloud for + `texttemplate`. + + The 'texttemplatesrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["texttemplatesrc"] + + @texttemplatesrc.setter + def texttemplatesrc(self, val): + self["texttemplatesrc"] = val + + @property + def uid(self): + """ + Assign an id to this trace, Use this to provide object + constancy between traces during animations and transitions. + + The 'uid' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["uid"] + + @uid.setter + def uid(self, val): + self["uid"] = val + + @property + def uirevision(self): + """ + Controls persistence of some user-driven changes to the trace: + `constraintrange` in `parcoords` traces, as well as some + `editable: true` modifications such as `name` and + `colorbar.title`. Defaults to `layout.uirevision`. Note that + other user-driven trace attribute changes are controlled by + `layout` attributes: `trace.visible` is controlled by + `layout.legend.uirevision`, `selectedpoints` is controlled by + `layout.selectionrevision`, and `colorbar.(x|y)` (accessible + with `config: {editable: true}`) is controlled by + `layout.editrevision`. Trace changes are tracked by `uid`, + which only falls back on trace index if no `uid` is provided. + So if your app can add/remove traces before the end of the + `data` array, such that the same trace has a different index, + you can still preserve user-driven changes if you give each + trace a `uid` that stays with it as it moves. + + The 'uirevision' property accepts values of any type + + Returns + ------- + Any + """ + return self["uirevision"] + + @uirevision.setter + def uirevision(self, val): + self["uirevision"] = val + + @property + def visible(self): + """ + Determines whether or not this trace is visible. If + "legendonly", the trace is not drawn, but can appear as a + legend item (provided that the legend itself is visible). + + The 'visible' property is an enumeration that may be specified as: + - One of the following enumeration values: + [True, False, 'legendonly'] + + Returns + ------- + Any + """ + return self["visible"] + + @visible.setter + def visible(self, val): + self["visible"] = val + + @property + def width(self): + """ + Sets the bar width (in position axis units). + + The 'width' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["width"] + + @width.setter + def width(self, val): + self["width"] = val + + @property + def x(self): + """ + Sets the x coordinates. + + The 'x' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["x"] + + @x.setter + def x(self, val): + self["x"] = val + + @property + def x0(self): + """ + Alternate to `x`. Builds a linear space of x coordinates. Use + with `dx` where `x0` is the starting coordinate and `dx` the + step. + + The 'x0' property accepts values of any type + + Returns + ------- + Any + """ + return self["x0"] + + @x0.setter + def x0(self, val): + self["x0"] = val + + @property + def xaxis(self): + """ + Sets a reference between this trace's x coordinates and a 2D + cartesian x axis. If "x" (the default value), the x coordinates + refer to `layout.xaxis`. If "x2", the x coordinates refer to + `layout.xaxis2`, and so on. + + The 'xaxis' property is an identifier of a particular + subplot, of type 'x', that may be specified as: + - the string 'x' optionally followed by an integer >= 1 + (e.g. 'x', 'x1', 'x2', 'x3', etc.) + + Returns + ------- + str + """ + return self["xaxis"] + + @xaxis.setter + def xaxis(self, val): + self["xaxis"] = val + + @property + def xhoverformat(self): + """ + Sets the hover text formatting rulefor `x` using d3 formatting + mini-languages which are very similar to those in Python. For + numbers, see: + https://github.com/d3/d3-format/tree/v1.4.5#d3-format. And for + dates see: https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format. We add two items to d3's date + formatter: "%h" for half of the year as a decimal number as + well as "%{n}f" for fractional seconds with n digits. For + example, *2016-10-13 09:15:23.456* with tickformat + "%H~%M~%S.%2f" would display *09~15~23.46*By default the values + are formatted using `xaxis.hoverformat`. + + The 'xhoverformat' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["xhoverformat"] + + @xhoverformat.setter + def xhoverformat(self, val): + self["xhoverformat"] = val + + @property + def xperiod(self): + """ + Only relevant when the axis `type` is "date". Sets the period + positioning in milliseconds or "M" on the x axis. Special + values in the form of "M" could be used to declare the + number of months. In this case `n` must be a positive integer. + + The 'xperiod' property accepts values of any type + + Returns + ------- + Any + """ + return self["xperiod"] + + @xperiod.setter + def xperiod(self, val): + self["xperiod"] = val + + @property + def xperiod0(self): + """ + Only relevant when the axis `type` is "date". Sets the base for + period positioning in milliseconds or date string on the x0 + axis. When `x0period` is round number of weeks, the `x0period0` + by default would be on a Sunday i.e. 2000-01-02, otherwise it + would be at 2000-01-01. + + The 'xperiod0' property accepts values of any type + + Returns + ------- + Any + """ + return self["xperiod0"] + + @xperiod0.setter + def xperiod0(self, val): + self["xperiod0"] = val + + @property + def xperiodalignment(self): + """ + Only relevant when the axis `type` is "date". Sets the + alignment of data points on the x axis. + + The 'xperiodalignment' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['start', 'middle', 'end'] + + Returns + ------- + Any + """ + return self["xperiodalignment"] + + @xperiodalignment.setter + def xperiodalignment(self, val): + self["xperiodalignment"] = val + + @property + def xsrc(self): + """ + Sets the source reference on Chart Studio Cloud for `x`. + + The 'xsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["xsrc"] + + @xsrc.setter + def xsrc(self, val): + self["xsrc"] = val + + @property + def y(self): + """ + Sets the y coordinates. + + The 'y' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["y"] + + @y.setter + def y(self, val): + self["y"] = val + + @property + def y0(self): + """ + Alternate to `y`. Builds a linear space of y coordinates. Use + with `dy` where `y0` is the starting coordinate and `dy` the + step. + + The 'y0' property accepts values of any type + + Returns + ------- + Any + """ + return self["y0"] + + @y0.setter + def y0(self, val): + self["y0"] = val + + @property + def yaxis(self): + """ + Sets a reference between this trace's y coordinates and a 2D + cartesian y axis. If "y" (the default value), the y coordinates + refer to `layout.yaxis`. If "y2", the y coordinates refer to + `layout.yaxis2`, and so on. + + The 'yaxis' property is an identifier of a particular + subplot, of type 'y', that may be specified as: + - the string 'y' optionally followed by an integer >= 1 + (e.g. 'y', 'y1', 'y2', 'y3', etc.) + + Returns + ------- + str + """ + return self["yaxis"] + + @yaxis.setter + def yaxis(self, val): + self["yaxis"] = val + + @property + def yhoverformat(self): + """ + Sets the hover text formatting rulefor `y` using d3 formatting + mini-languages which are very similar to those in Python. For + numbers, see: + https://github.com/d3/d3-format/tree/v1.4.5#d3-format. And for + dates see: https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format. We add two items to d3's date + formatter: "%h" for half of the year as a decimal number as + well as "%{n}f" for fractional seconds with n digits. For + example, *2016-10-13 09:15:23.456* with tickformat + "%H~%M~%S.%2f" would display *09~15~23.46*By default the values + are formatted using `yaxis.hoverformat`. + + The 'yhoverformat' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["yhoverformat"] + + @yhoverformat.setter + def yhoverformat(self, val): + self["yhoverformat"] = val + + @property + def yperiod(self): + """ + Only relevant when the axis `type` is "date". Sets the period + positioning in milliseconds or "M" on the y axis. Special + values in the form of "M" could be used to declare the + number of months. In this case `n` must be a positive integer. + + The 'yperiod' property accepts values of any type + + Returns + ------- + Any + """ + return self["yperiod"] + + @yperiod.setter + def yperiod(self, val): + self["yperiod"] = val + + @property + def yperiod0(self): + """ + Only relevant when the axis `type` is "date". Sets the base for + period positioning in milliseconds or date string on the y0 + axis. When `y0period` is round number of weeks, the `y0period0` + by default would be on a Sunday i.e. 2000-01-02, otherwise it + would be at 2000-01-01. + + The 'yperiod0' property accepts values of any type + + Returns + ------- + Any + """ + return self["yperiod0"] + + @yperiod0.setter + def yperiod0(self, val): + self["yperiod0"] = val + + @property + def yperiodalignment(self): + """ + Only relevant when the axis `type` is "date". Sets the + alignment of data points on the y axis. + + The 'yperiodalignment' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['start', 'middle', 'end'] + + Returns + ------- + Any + """ + return self["yperiodalignment"] + + @yperiodalignment.setter + def yperiodalignment(self, val): + self["yperiodalignment"] = val + + @property + def ysrc(self): + """ + Sets the source reference on Chart Studio Cloud for `y`. + + The 'ysrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["ysrc"] + + @ysrc.setter + def ysrc(self, val): + self["ysrc"] = val + + @property + def zorder(self): + """ + Sets the layer on which this trace is displayed, relative to + other SVG traces on the same subplot. SVG traces with higher + `zorder` appear in front of those with lower `zorder`. + + The 'zorder' property is a integer and may be specified as: + - An int (or float that will be cast to an int) + + Returns + ------- + int + """ + return self["zorder"] + + @zorder.setter + def zorder(self, val): + self["zorder"] = val + + @property + def type(self): + return self._props["type"] + + @property + def _prop_descriptions(self): + return """\ + alignmentgroup + Set several traces linked to the same position axis or + matching axes to the same alignmentgroup. This controls + whether bars compute their positional range dependently + or independently. + cliponaxis + Determines whether the text nodes are clipped about the + subplot axes. To show the text nodes above axis lines + and tick labels, make sure to set `xaxis.layer` and + `yaxis.layer` to *below traces*. + connector + :class:`plotly.graph_objects.funnel.Connector` instance + or dict with compatible properties + constraintext + Constrain the size of text inside or outside a bar to + be no larger than the bar itself. + customdata + Assigns extra data each datum. This may be useful when + listening to hover, click and selection events. Note + that, "scatter" traces also appends customdata items in + the markers DOM elements + customdatasrc + Sets the source reference on Chart Studio Cloud for + `customdata`. + dx + Sets the x coordinate step. See `x0` for more info. + dy + Sets the y coordinate step. See `y0` for more info. + hoverinfo + Determines which trace information appear on hover. If + `none` or `skip` are set, no information is displayed + upon hovering. But, if `none` is set, click and hover + events are still fired. + hoverinfosrc + Sets the source reference on Chart Studio Cloud for + `hoverinfo`. + hoverlabel + :class:`plotly.graph_objects.funnel.Hoverlabel` + instance or dict with compatible properties + hovertemplate + Template string used for rendering the information that + appear on hover box. Note that this will override + `hoverinfo`. Variables are inserted using %{variable}, + for example "y: %{y}" as well as %{xother}, {%_xother}, + {%_xother_}, {%xother_}. When showing info for several + points, "xother" will be added to those with different + x positions from the first point. An underscore before + or after "(x|y)other" will add a space on that side, + only when this field is shown. Numbers are formatted + using d3-format's syntax %{variable:d3-format}, for + example "Price: %{y:$.2f}". + https://github.com/d3/d3-format/tree/v1.4.5#d3-format + for details on the formatting syntax. Dates are + formatted using d3-time-format's syntax + %{variable|d3-time-format}, for example "Day: + %{2019-01-01|%A}". https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format for details on the + date formatting syntax. Variables that can't be found + will be replaced with the specifier. For example, a + template of "data: %{x}, %{y}" will result in a value + of "data: 1, %{y}" if x is 1 and y is missing. + Variables with an undefined value will be replaced with + the fallback value. The variables available in + `hovertemplate` are the ones emitted as event data + described at this link + https://plotly.com/javascript/plotlyjs-events/#event- + data. Additionally, all attributes that can be + specified per-point (the ones that are `arrayOk: true`) + are available. Finally, the template string has access + to variables `percentInitial`, `percentPrevious` and + `percentTotal`. Anything contained in tag `` is + displayed in the secondary box, for example + `%{fullData.name}`. To hide the + secondary box completely, use an empty tag + ``. + hovertemplatefallback + Fallback string that's displayed when a variable + referenced in a template is missing. If the boolean + value 'false' is passed in, the specifier with the + missing variable will be displayed. + hovertemplatesrc + Sets the source reference on Chart Studio Cloud for + `hovertemplate`. + hovertext + Sets hover text elements associated with each (x,y) + pair. If a single string, the same string appears over + all the data points. If an array of string, the items + are mapped in order to the this trace's (x,y) + coordinates. To be seen, trace `hoverinfo` must contain + a "text" flag. + hovertextsrc + Sets the source reference on Chart Studio Cloud for + `hovertext`. + ids + Assigns id labels to each datum. These ids for object + constancy of data points during animation. Should be an + array of strings, not numbers or any other type. + idssrc + Sets the source reference on Chart Studio Cloud for + `ids`. + insidetextanchor + Determines if texts are kept at center or start/end + points in `textposition` "inside" mode. + insidetextfont + Sets the font used for `text` lying inside the bar. + legend + Sets the reference to a legend to show this trace in. + References to these legends are "legend", "legend2", + "legend3", etc. Settings for these legends are set in + the layout, under `layout.legend`, `layout.legend2`, + etc. + legendgroup + Sets the legend group for this trace. Traces and shapes + part of the same legend group hide/show at the same + time when toggling legend items. + legendgrouptitle + :class:`plotly.graph_objects.funnel.Legendgrouptitle` + instance or dict with compatible properties + legendrank + Sets the legend rank for this trace. Items and groups + with smaller ranks are presented on top/left side while + with "reversed" `legend.traceorder` they are on + bottom/right side. The default legendrank is 1000, so + that you can use ranks less than 1000 to place certain + items before all unranked items, and ranks greater than + 1000 to go after all unranked items. When having + unranked or equal rank items shapes would be displayed + after traces i.e. according to their order in data and + layout. + legendwidth + Sets the width (in px or fraction) of the legend for + this trace. + marker + :class:`plotly.graph_objects.funnel.Marker` instance or + dict with compatible properties + meta + Assigns extra meta information associated with this + trace that can be used in various text attributes. + Attributes such as trace `name`, graph, axis and + colorbar `title.text`, annotation `text` + `rangeselector`, `updatemenues` and `sliders` `label` + text all support `meta`. To access the trace `meta` + values in an attribute in the same trace, simply use + `%{meta[i]}` where `i` is the index or key of the + `meta` item in question. To access trace `meta` in + layout attributes, use `%{data[n[.meta[i]}` where `i` + is the index or key of the `meta` and `n` is the trace + index. + metasrc + Sets the source reference on Chart Studio Cloud for + `meta`. + name + Sets the trace name. The trace name appears as the + legend item and on hover. + offset + Shifts the position where the bar is drawn (in position + axis units). In "group" barmode, traces that set + "offset" will be excluded and drawn in "overlay" mode + instead. + offsetgroup + Set several traces linked to the same position axis or + matching axes to the same offsetgroup where bars of the + same position coordinate will line up. + opacity + Sets the opacity of the trace. + orientation + Sets the orientation of the funnels. With "v" ("h"), + the value of the each bar spans along the vertical + (horizontal). By default funnels are tend to be + oriented horizontally; unless only "y" array is + presented or orientation is set to "v". Also regarding + graphs including only 'horizontal' funnels, "autorange" + on the "y-axis" are set to "reversed". + outsidetextfont + Sets the font used for `text` lying outside the bar. + selectedpoints + Array containing integer indices of selected points. + Has an effect only for traces that support selections. + Note that an empty array means an empty selection where + the `unselected` are turned on for all points, whereas, + any other non-array values means no selection all where + the `selected` and `unselected` styles have no effect. + showlegend + Determines whether or not an item corresponding to this + trace is shown in the legend. + stream + :class:`plotly.graph_objects.funnel.Stream` instance or + dict with compatible properties + text + Sets text elements associated with each (x,y) pair. If + a single string, the same string appears over all the + data points. If an array of string, the items are + mapped in order to the this trace's (x,y) coordinates. + If trace `hoverinfo` contains a "text" flag and + "hovertext" is not set, these elements will be seen in + the hover labels. + textangle + Sets the angle of the tick labels with respect to the + bar. For example, a `tickangle` of -90 draws the tick + labels vertically. With "auto" the texts may + automatically be rotated to fit with the maximum size + in bars. + textfont + Sets the font used for `text`. + textinfo + Determines which trace information appear on the graph. + In the case of having multiple funnels, percentages & + totals are computed separately (per trace). + textposition + Specifies the location of the `text`. "inside" + positions `text` inside, next to the bar end (rotated + and scaled if needed). "outside" positions `text` + outside, next to the bar end (scaled if needed), unless + there is another bar stacked on this one, then the text + gets pushed inside. "auto" tries to position `text` + inside the bar, but if the bar is too small and no bar + is stacked on this one the text is moved outside. If + "none", no text appears. + textpositionsrc + Sets the source reference on Chart Studio Cloud for + `textposition`. + textsrc + Sets the source reference on Chart Studio Cloud for + `text`. + texttemplate + Template string used for rendering the information text + that appears on points. Note that this will override + `textinfo`. Variables are inserted using %{variable}, + for example "y: %{y}". Numbers are formatted using + d3-format's syntax %{variable:d3-format}, for example + "Price: %{y:$.2f}". + https://github.com/d3/d3-format/tree/v1.4.5#d3-format + for details on the formatting syntax. Dates are + formatted using d3-time-format's syntax + %{variable|d3-time-format}, for example "Day: + %{2019-01-01|%A}". https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format for details on the + date formatting syntax. Variables that can't be found + will be replaced with the specifier. For example, a + template of "data: %{x}, %{y}" will result in a value + of "data: 1, %{y}" if x is 1 and y is missing. + Variables with an undefined value will be replaced with + the fallback value. All attributes that can be + specified per-point (the ones that are `arrayOk: true`) + are available. Finally, the template string has access + to variables `percentInitial`, `percentPrevious`, + `percentTotal`, `label` and `value`. + texttemplatefallback + Fallback string that's displayed when a variable + referenced in a template is missing. If the boolean + value 'false' is passed in, the specifier with the + missing variable will be displayed. + texttemplatesrc + Sets the source reference on Chart Studio Cloud for + `texttemplate`. + uid + Assign an id to this trace, Use this to provide object + constancy between traces during animations and + transitions. + uirevision + Controls persistence of some user-driven changes to the + trace: `constraintrange` in `parcoords` traces, as well + as some `editable: true` modifications such as `name` + and `colorbar.title`. Defaults to `layout.uirevision`. + Note that other user-driven trace attribute changes are + controlled by `layout` attributes: `trace.visible` is + controlled by `layout.legend.uirevision`, + `selectedpoints` is controlled by + `layout.selectionrevision`, and `colorbar.(x|y)` + (accessible with `config: {editable: true}`) is + controlled by `layout.editrevision`. Trace changes are + tracked by `uid`, which only falls back on trace index + if no `uid` is provided. So if your app can add/remove + traces before the end of the `data` array, such that + the same trace has a different index, you can still + preserve user-driven changes if you give each trace a + `uid` that stays with it as it moves. + visible + Determines whether or not this trace is visible. If + "legendonly", the trace is not drawn, but can appear as + a legend item (provided that the legend itself is + visible). + width + Sets the bar width (in position axis units). + x + Sets the x coordinates. + x0 + Alternate to `x`. Builds a linear space of x + coordinates. Use with `dx` where `x0` is the starting + coordinate and `dx` the step. + xaxis + Sets a reference between this trace's x coordinates and + a 2D cartesian x axis. If "x" (the default value), the + x coordinates refer to `layout.xaxis`. If "x2", the x + coordinates refer to `layout.xaxis2`, and so on. + xhoverformat + Sets the hover text formatting rulefor `x` using d3 + formatting mini-languages which are very similar to + those in Python. For numbers, see: + https://github.com/d3/d3-format/tree/v1.4.5#d3-format. + And for dates see: https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format. We add two items to + d3's date formatter: "%h" for half of the year as a + decimal number as well as "%{n}f" for fractional + seconds with n digits. For example, *2016-10-13 + 09:15:23.456* with tickformat "%H~%M~%S.%2f" would + display *09~15~23.46*By default the values are + formatted using `xaxis.hoverformat`. + xperiod + Only relevant when the axis `type` is "date". Sets the + period positioning in milliseconds or "M" on the x + axis. Special values in the form of "M" could be + used to declare the number of months. In this case `n` + must be a positive integer. + xperiod0 + Only relevant when the axis `type` is "date". Sets the + base for period positioning in milliseconds or date + string on the x0 axis. When `x0period` is round number + of weeks, the `x0period0` by default would be on a + Sunday i.e. 2000-01-02, otherwise it would be at + 2000-01-01. + xperiodalignment + Only relevant when the axis `type` is "date". Sets the + alignment of data points on the x axis. + xsrc + Sets the source reference on Chart Studio Cloud for + `x`. + y + Sets the y coordinates. + y0 + Alternate to `y`. Builds a linear space of y + coordinates. Use with `dy` where `y0` is the starting + coordinate and `dy` the step. + yaxis + Sets a reference between this trace's y coordinates and + a 2D cartesian y axis. If "y" (the default value), the + y coordinates refer to `layout.yaxis`. If "y2", the y + coordinates refer to `layout.yaxis2`, and so on. + yhoverformat + Sets the hover text formatting rulefor `y` using d3 + formatting mini-languages which are very similar to + those in Python. For numbers, see: + https://github.com/d3/d3-format/tree/v1.4.5#d3-format. + And for dates see: https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format. We add two items to + d3's date formatter: "%h" for half of the year as a + decimal number as well as "%{n}f" for fractional + seconds with n digits. For example, *2016-10-13 + 09:15:23.456* with tickformat "%H~%M~%S.%2f" would + display *09~15~23.46*By default the values are + formatted using `yaxis.hoverformat`. + yperiod + Only relevant when the axis `type` is "date". Sets the + period positioning in milliseconds or "M" on the y + axis. Special values in the form of "M" could be + used to declare the number of months. In this case `n` + must be a positive integer. + yperiod0 + Only relevant when the axis `type` is "date". Sets the + base for period positioning in milliseconds or date + string on the y0 axis. When `y0period` is round number + of weeks, the `y0period0` by default would be on a + Sunday i.e. 2000-01-02, otherwise it would be at + 2000-01-01. + yperiodalignment + Only relevant when the axis `type` is "date". Sets the + alignment of data points on the y axis. + ysrc + Sets the source reference on Chart Studio Cloud for + `y`. + zorder + Sets the layer on which this trace is displayed, + relative to other SVG traces on the same subplot. SVG + traces with higher `zorder` appear in front of those + with lower `zorder`. + """ + + def __init__( + self, + arg=None, + alignmentgroup=None, + cliponaxis=None, + connector=None, + constraintext=None, + customdata=None, + customdatasrc=None, + dx=None, + dy=None, + hoverinfo=None, + hoverinfosrc=None, + hoverlabel=None, + hovertemplate=None, + hovertemplatefallback=None, + hovertemplatesrc=None, + hovertext=None, + hovertextsrc=None, + ids=None, + idssrc=None, + insidetextanchor=None, + insidetextfont=None, + legend=None, + legendgroup=None, + legendgrouptitle=None, + legendrank=None, + legendwidth=None, + marker=None, + meta=None, + metasrc=None, + name=None, + offset=None, + offsetgroup=None, + opacity=None, + orientation=None, + outsidetextfont=None, + selectedpoints=None, + showlegend=None, + stream=None, + text=None, + textangle=None, + textfont=None, + textinfo=None, + textposition=None, + textpositionsrc=None, + textsrc=None, + texttemplate=None, + texttemplatefallback=None, + texttemplatesrc=None, + uid=None, + uirevision=None, + visible=None, + width=None, + x=None, + x0=None, + xaxis=None, + xhoverformat=None, + xperiod=None, + xperiod0=None, + xperiodalignment=None, + xsrc=None, + y=None, + y0=None, + yaxis=None, + yhoverformat=None, + yperiod=None, + yperiod0=None, + yperiodalignment=None, + ysrc=None, + zorder=None, + **kwargs, + ): + """ + Construct a new Funnel object + + Visualize stages in a process using length-encoded bars. This + trace can be used to show data in either a part-to-whole + representation wherein each item appears in a single stage, or + in a "drop-off" representation wherein each item appears in + each stage it traversed. See also the "funnelarea" trace type + for a different approach to visualizing funnel data. + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of :class:`plotly.graph_objs.Funnel` + alignmentgroup + Set several traces linked to the same position axis or + matching axes to the same alignmentgroup. This controls + whether bars compute their positional range dependently + or independently. + cliponaxis + Determines whether the text nodes are clipped about the + subplot axes. To show the text nodes above axis lines + and tick labels, make sure to set `xaxis.layer` and + `yaxis.layer` to *below traces*. + connector + :class:`plotly.graph_objects.funnel.Connector` instance + or dict with compatible properties + constraintext + Constrain the size of text inside or outside a bar to + be no larger than the bar itself. + customdata + Assigns extra data each datum. This may be useful when + listening to hover, click and selection events. Note + that, "scatter" traces also appends customdata items in + the markers DOM elements + customdatasrc + Sets the source reference on Chart Studio Cloud for + `customdata`. + dx + Sets the x coordinate step. See `x0` for more info. + dy + Sets the y coordinate step. See `y0` for more info. + hoverinfo + Determines which trace information appear on hover. If + `none` or `skip` are set, no information is displayed + upon hovering. But, if `none` is set, click and hover + events are still fired. + hoverinfosrc + Sets the source reference on Chart Studio Cloud for + `hoverinfo`. + hoverlabel + :class:`plotly.graph_objects.funnel.Hoverlabel` + instance or dict with compatible properties + hovertemplate + Template string used for rendering the information that + appear on hover box. Note that this will override + `hoverinfo`. Variables are inserted using %{variable}, + for example "y: %{y}" as well as %{xother}, {%_xother}, + {%_xother_}, {%xother_}. When showing info for several + points, "xother" will be added to those with different + x positions from the first point. An underscore before + or after "(x|y)other" will add a space on that side, + only when this field is shown. Numbers are formatted + using d3-format's syntax %{variable:d3-format}, for + example "Price: %{y:$.2f}". + https://github.com/d3/d3-format/tree/v1.4.5#d3-format + for details on the formatting syntax. Dates are + formatted using d3-time-format's syntax + %{variable|d3-time-format}, for example "Day: + %{2019-01-01|%A}". https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format for details on the + date formatting syntax. Variables that can't be found + will be replaced with the specifier. For example, a + template of "data: %{x}, %{y}" will result in a value + of "data: 1, %{y}" if x is 1 and y is missing. + Variables with an undefined value will be replaced with + the fallback value. The variables available in + `hovertemplate` are the ones emitted as event data + described at this link + https://plotly.com/javascript/plotlyjs-events/#event- + data. Additionally, all attributes that can be + specified per-point (the ones that are `arrayOk: true`) + are available. Finally, the template string has access + to variables `percentInitial`, `percentPrevious` and + `percentTotal`. Anything contained in tag `` is + displayed in the secondary box, for example + `%{fullData.name}`. To hide the + secondary box completely, use an empty tag + ``. + hovertemplatefallback + Fallback string that's displayed when a variable + referenced in a template is missing. If the boolean + value 'false' is passed in, the specifier with the + missing variable will be displayed. + hovertemplatesrc + Sets the source reference on Chart Studio Cloud for + `hovertemplate`. + hovertext + Sets hover text elements associated with each (x,y) + pair. If a single string, the same string appears over + all the data points. If an array of string, the items + are mapped in order to the this trace's (x,y) + coordinates. To be seen, trace `hoverinfo` must contain + a "text" flag. + hovertextsrc + Sets the source reference on Chart Studio Cloud for + `hovertext`. + ids + Assigns id labels to each datum. These ids for object + constancy of data points during animation. Should be an + array of strings, not numbers or any other type. + idssrc + Sets the source reference on Chart Studio Cloud for + `ids`. + insidetextanchor + Determines if texts are kept at center or start/end + points in `textposition` "inside" mode. + insidetextfont + Sets the font used for `text` lying inside the bar. + legend + Sets the reference to a legend to show this trace in. + References to these legends are "legend", "legend2", + "legend3", etc. Settings for these legends are set in + the layout, under `layout.legend`, `layout.legend2`, + etc. + legendgroup + Sets the legend group for this trace. Traces and shapes + part of the same legend group hide/show at the same + time when toggling legend items. + legendgrouptitle + :class:`plotly.graph_objects.funnel.Legendgrouptitle` + instance or dict with compatible properties + legendrank + Sets the legend rank for this trace. Items and groups + with smaller ranks are presented on top/left side while + with "reversed" `legend.traceorder` they are on + bottom/right side. The default legendrank is 1000, so + that you can use ranks less than 1000 to place certain + items before all unranked items, and ranks greater than + 1000 to go after all unranked items. When having + unranked or equal rank items shapes would be displayed + after traces i.e. according to their order in data and + layout. + legendwidth + Sets the width (in px or fraction) of the legend for + this trace. + marker + :class:`plotly.graph_objects.funnel.Marker` instance or + dict with compatible properties + meta + Assigns extra meta information associated with this + trace that can be used in various text attributes. + Attributes such as trace `name`, graph, axis and + colorbar `title.text`, annotation `text` + `rangeselector`, `updatemenues` and `sliders` `label` + text all support `meta`. To access the trace `meta` + values in an attribute in the same trace, simply use + `%{meta[i]}` where `i` is the index or key of the + `meta` item in question. To access trace `meta` in + layout attributes, use `%{data[n[.meta[i]}` where `i` + is the index or key of the `meta` and `n` is the trace + index. + metasrc + Sets the source reference on Chart Studio Cloud for + `meta`. + name + Sets the trace name. The trace name appears as the + legend item and on hover. + offset + Shifts the position where the bar is drawn (in position + axis units). In "group" barmode, traces that set + "offset" will be excluded and drawn in "overlay" mode + instead. + offsetgroup + Set several traces linked to the same position axis or + matching axes to the same offsetgroup where bars of the + same position coordinate will line up. + opacity + Sets the opacity of the trace. + orientation + Sets the orientation of the funnels. With "v" ("h"), + the value of the each bar spans along the vertical + (horizontal). By default funnels are tend to be + oriented horizontally; unless only "y" array is + presented or orientation is set to "v". Also regarding + graphs including only 'horizontal' funnels, "autorange" + on the "y-axis" are set to "reversed". + outsidetextfont + Sets the font used for `text` lying outside the bar. + selectedpoints + Array containing integer indices of selected points. + Has an effect only for traces that support selections. + Note that an empty array means an empty selection where + the `unselected` are turned on for all points, whereas, + any other non-array values means no selection all where + the `selected` and `unselected` styles have no effect. + showlegend + Determines whether or not an item corresponding to this + trace is shown in the legend. + stream + :class:`plotly.graph_objects.funnel.Stream` instance or + dict with compatible properties + text + Sets text elements associated with each (x,y) pair. If + a single string, the same string appears over all the + data points. If an array of string, the items are + mapped in order to the this trace's (x,y) coordinates. + If trace `hoverinfo` contains a "text" flag and + "hovertext" is not set, these elements will be seen in + the hover labels. + textangle + Sets the angle of the tick labels with respect to the + bar. For example, a `tickangle` of -90 draws the tick + labels vertically. With "auto" the texts may + automatically be rotated to fit with the maximum size + in bars. + textfont + Sets the font used for `text`. + textinfo + Determines which trace information appear on the graph. + In the case of having multiple funnels, percentages & + totals are computed separately (per trace). + textposition + Specifies the location of the `text`. "inside" + positions `text` inside, next to the bar end (rotated + and scaled if needed). "outside" positions `text` + outside, next to the bar end (scaled if needed), unless + there is another bar stacked on this one, then the text + gets pushed inside. "auto" tries to position `text` + inside the bar, but if the bar is too small and no bar + is stacked on this one the text is moved outside. If + "none", no text appears. + textpositionsrc + Sets the source reference on Chart Studio Cloud for + `textposition`. + textsrc + Sets the source reference on Chart Studio Cloud for + `text`. + texttemplate + Template string used for rendering the information text + that appears on points. Note that this will override + `textinfo`. Variables are inserted using %{variable}, + for example "y: %{y}". Numbers are formatted using + d3-format's syntax %{variable:d3-format}, for example + "Price: %{y:$.2f}". + https://github.com/d3/d3-format/tree/v1.4.5#d3-format + for details on the formatting syntax. Dates are + formatted using d3-time-format's syntax + %{variable|d3-time-format}, for example "Day: + %{2019-01-01|%A}". https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format for details on the + date formatting syntax. Variables that can't be found + will be replaced with the specifier. For example, a + template of "data: %{x}, %{y}" will result in a value + of "data: 1, %{y}" if x is 1 and y is missing. + Variables with an undefined value will be replaced with + the fallback value. All attributes that can be + specified per-point (the ones that are `arrayOk: true`) + are available. Finally, the template string has access + to variables `percentInitial`, `percentPrevious`, + `percentTotal`, `label` and `value`. + texttemplatefallback + Fallback string that's displayed when a variable + referenced in a template is missing. If the boolean + value 'false' is passed in, the specifier with the + missing variable will be displayed. + texttemplatesrc + Sets the source reference on Chart Studio Cloud for + `texttemplate`. + uid + Assign an id to this trace, Use this to provide object + constancy between traces during animations and + transitions. + uirevision + Controls persistence of some user-driven changes to the + trace: `constraintrange` in `parcoords` traces, as well + as some `editable: true` modifications such as `name` + and `colorbar.title`. Defaults to `layout.uirevision`. + Note that other user-driven trace attribute changes are + controlled by `layout` attributes: `trace.visible` is + controlled by `layout.legend.uirevision`, + `selectedpoints` is controlled by + `layout.selectionrevision`, and `colorbar.(x|y)` + (accessible with `config: {editable: true}`) is + controlled by `layout.editrevision`. Trace changes are + tracked by `uid`, which only falls back on trace index + if no `uid` is provided. So if your app can add/remove + traces before the end of the `data` array, such that + the same trace has a different index, you can still + preserve user-driven changes if you give each trace a + `uid` that stays with it as it moves. + visible + Determines whether or not this trace is visible. If + "legendonly", the trace is not drawn, but can appear as + a legend item (provided that the legend itself is + visible). + width + Sets the bar width (in position axis units). + x + Sets the x coordinates. + x0 + Alternate to `x`. Builds a linear space of x + coordinates. Use with `dx` where `x0` is the starting + coordinate and `dx` the step. + xaxis + Sets a reference between this trace's x coordinates and + a 2D cartesian x axis. If "x" (the default value), the + x coordinates refer to `layout.xaxis`. If "x2", the x + coordinates refer to `layout.xaxis2`, and so on. + xhoverformat + Sets the hover text formatting rulefor `x` using d3 + formatting mini-languages which are very similar to + those in Python. For numbers, see: + https://github.com/d3/d3-format/tree/v1.4.5#d3-format. + And for dates see: https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format. We add two items to + d3's date formatter: "%h" for half of the year as a + decimal number as well as "%{n}f" for fractional + seconds with n digits. For example, *2016-10-13 + 09:15:23.456* with tickformat "%H~%M~%S.%2f" would + display *09~15~23.46*By default the values are + formatted using `xaxis.hoverformat`. + xperiod + Only relevant when the axis `type` is "date". Sets the + period positioning in milliseconds or "M" on the x + axis. Special values in the form of "M" could be + used to declare the number of months. In this case `n` + must be a positive integer. + xperiod0 + Only relevant when the axis `type` is "date". Sets the + base for period positioning in milliseconds or date + string on the x0 axis. When `x0period` is round number + of weeks, the `x0period0` by default would be on a + Sunday i.e. 2000-01-02, otherwise it would be at + 2000-01-01. + xperiodalignment + Only relevant when the axis `type` is "date". Sets the + alignment of data points on the x axis. + xsrc + Sets the source reference on Chart Studio Cloud for + `x`. + y + Sets the y coordinates. + y0 + Alternate to `y`. Builds a linear space of y + coordinates. Use with `dy` where `y0` is the starting + coordinate and `dy` the step. + yaxis + Sets a reference between this trace's y coordinates and + a 2D cartesian y axis. If "y" (the default value), the + y coordinates refer to `layout.yaxis`. If "y2", the y + coordinates refer to `layout.yaxis2`, and so on. + yhoverformat + Sets the hover text formatting rulefor `y` using d3 + formatting mini-languages which are very similar to + those in Python. For numbers, see: + https://github.com/d3/d3-format/tree/v1.4.5#d3-format. + And for dates see: https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format. We add two items to + d3's date formatter: "%h" for half of the year as a + decimal number as well as "%{n}f" for fractional + seconds with n digits. For example, *2016-10-13 + 09:15:23.456* with tickformat "%H~%M~%S.%2f" would + display *09~15~23.46*By default the values are + formatted using `yaxis.hoverformat`. + yperiod + Only relevant when the axis `type` is "date". Sets the + period positioning in milliseconds or "M" on the y + axis. Special values in the form of "M" could be + used to declare the number of months. In this case `n` + must be a positive integer. + yperiod0 + Only relevant when the axis `type` is "date". Sets the + base for period positioning in milliseconds or date + string on the y0 axis. When `y0period` is round number + of weeks, the `y0period0` by default would be on a + Sunday i.e. 2000-01-02, otherwise it would be at + 2000-01-01. + yperiodalignment + Only relevant when the axis `type` is "date". Sets the + alignment of data points on the y axis. + ysrc + Sets the source reference on Chart Studio Cloud for + `y`. + zorder + Sets the layer on which this trace is displayed, + relative to other SVG traces on the same subplot. SVG + traces with higher `zorder` appear in front of those + with lower `zorder`. + + Returns + ------- + Funnel + """ + super().__init__("funnel") + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + if arg is None: + arg = {} + elif isinstance(arg, self.__class__): + arg = arg.to_plotly_json() + elif isinstance(arg, dict): + arg = _copy.copy(arg) + else: + raise ValueError("""\ +The first argument to the plotly.graph_objs.Funnel +constructor must be a dict or +an instance of :class:`plotly.graph_objs.Funnel`""") + + self._skip_invalid = kwargs.pop("skip_invalid", False) + self._validate = kwargs.pop("_validate", True) + + self._set_property("alignmentgroup", arg, alignmentgroup) + self._set_property("cliponaxis", arg, cliponaxis) + self._set_property("connector", arg, connector) + self._set_property("constraintext", arg, constraintext) + self._set_property("customdata", arg, customdata) + self._set_property("customdatasrc", arg, customdatasrc) + self._set_property("dx", arg, dx) + self._set_property("dy", arg, dy) + self._set_property("hoverinfo", arg, hoverinfo) + self._set_property("hoverinfosrc", arg, hoverinfosrc) + self._set_property("hoverlabel", arg, hoverlabel) + self._set_property("hovertemplate", arg, hovertemplate) + self._set_property("hovertemplatefallback", arg, hovertemplatefallback) + self._set_property("hovertemplatesrc", arg, hovertemplatesrc) + self._set_property("hovertext", arg, hovertext) + self._set_property("hovertextsrc", arg, hovertextsrc) + self._set_property("ids", arg, ids) + self._set_property("idssrc", arg, idssrc) + self._set_property("insidetextanchor", arg, insidetextanchor) + self._set_property("insidetextfont", arg, insidetextfont) + self._set_property("legend", arg, legend) + self._set_property("legendgroup", arg, legendgroup) + self._set_property("legendgrouptitle", arg, legendgrouptitle) + self._set_property("legendrank", arg, legendrank) + self._set_property("legendwidth", arg, legendwidth) + self._set_property("marker", arg, marker) + self._set_property("meta", arg, meta) + self._set_property("metasrc", arg, metasrc) + self._set_property("name", arg, name) + self._set_property("offset", arg, offset) + self._set_property("offsetgroup", arg, offsetgroup) + self._set_property("opacity", arg, opacity) + self._set_property("orientation", arg, orientation) + self._set_property("outsidetextfont", arg, outsidetextfont) + self._set_property("selectedpoints", arg, selectedpoints) + self._set_property("showlegend", arg, showlegend) + self._set_property("stream", arg, stream) + self._set_property("text", arg, text) + self._set_property("textangle", arg, textangle) + self._set_property("textfont", arg, textfont) + self._set_property("textinfo", arg, textinfo) + self._set_property("textposition", arg, textposition) + self._set_property("textpositionsrc", arg, textpositionsrc) + self._set_property("textsrc", arg, textsrc) + self._set_property("texttemplate", arg, texttemplate) + self._set_property("texttemplatefallback", arg, texttemplatefallback) + self._set_property("texttemplatesrc", arg, texttemplatesrc) + self._set_property("uid", arg, uid) + self._set_property("uirevision", arg, uirevision) + self._set_property("visible", arg, visible) + self._set_property("width", arg, width) + self._set_property("x", arg, x) + self._set_property("x0", arg, x0) + self._set_property("xaxis", arg, xaxis) + self._set_property("xhoverformat", arg, xhoverformat) + self._set_property("xperiod", arg, xperiod) + self._set_property("xperiod0", arg, xperiod0) + self._set_property("xperiodalignment", arg, xperiodalignment) + self._set_property("xsrc", arg, xsrc) + self._set_property("y", arg, y) + self._set_property("y0", arg, y0) + self._set_property("yaxis", arg, yaxis) + self._set_property("yhoverformat", arg, yhoverformat) + self._set_property("yperiod", arg, yperiod) + self._set_property("yperiod0", arg, yperiod0) + self._set_property("yperiodalignment", arg, yperiodalignment) + self._set_property("ysrc", arg, ysrc) + self._set_property("zorder", arg, zorder) + + self._props["type"] = "funnel" + arg.pop("type", None) + self._process_kwargs(**dict(arg, **kwargs)) + self._skip_invalid = False diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/_funnelarea.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/_funnelarea.py new file mode 100644 index 0000000000000000000000000000000000000000..a3db350eb990cb1477ada69a47587e85e93d6382 --- /dev/null +++ b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/_funnelarea.py @@ -0,0 +1,1734 @@ +# --- THIS FILE IS AUTO-GENERATED --- +# Modifications will be overwitten the next time code generation run. + +from plotly.basedatatypes import BaseTraceType as _BaseTraceType +import copy as _copy + + +class Funnelarea(_BaseTraceType): + _parent_path_str = "" + _path_str = "funnelarea" + _valid_props = { + "aspectratio", + "baseratio", + "customdata", + "customdatasrc", + "dlabel", + "domain", + "hoverinfo", + "hoverinfosrc", + "hoverlabel", + "hovertemplate", + "hovertemplatefallback", + "hovertemplatesrc", + "hovertext", + "hovertextsrc", + "ids", + "idssrc", + "insidetextfont", + "label0", + "labels", + "labelssrc", + "legend", + "legendgroup", + "legendgrouptitle", + "legendrank", + "legendwidth", + "marker", + "meta", + "metasrc", + "name", + "opacity", + "scalegroup", + "showlegend", + "stream", + "text", + "textfont", + "textinfo", + "textposition", + "textpositionsrc", + "textsrc", + "texttemplate", + "texttemplatefallback", + "texttemplatesrc", + "title", + "type", + "uid", + "uirevision", + "values", + "valuessrc", + "visible", + } + + @property + def aspectratio(self): + """ + Sets the ratio between height and width + + The 'aspectratio' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["aspectratio"] + + @aspectratio.setter + def aspectratio(self, val): + self["aspectratio"] = val + + @property + def baseratio(self): + """ + Sets the ratio between bottom length and maximum top length. + + The 'baseratio' property is a number and may be specified as: + - An int or float in the interval [0, 1] + + Returns + ------- + int|float + """ + return self["baseratio"] + + @baseratio.setter + def baseratio(self, val): + self["baseratio"] = val + + @property + def customdata(self): + """ + Assigns extra data each datum. This may be useful when + listening to hover, click and selection events. Note that, + "scatter" traces also appends customdata items in the markers + DOM elements + + The 'customdata' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["customdata"] + + @customdata.setter + def customdata(self, val): + self["customdata"] = val + + @property + def customdatasrc(self): + """ + Sets the source reference on Chart Studio Cloud for + `customdata`. + + The 'customdatasrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["customdatasrc"] + + @customdatasrc.setter + def customdatasrc(self, val): + self["customdatasrc"] = val + + @property + def dlabel(self): + """ + Sets the label step. See `label0` for more info. + + The 'dlabel' property is a number and may be specified as: + - An int or float + + Returns + ------- + int|float + """ + return self["dlabel"] + + @dlabel.setter + def dlabel(self, val): + self["dlabel"] = val + + @property + def domain(self): + """ + The 'domain' property is an instance of Domain + that may be specified as: + - An instance of :class:`plotly.graph_objs.funnelarea.Domain` + - A dict of string/value properties that will be passed + to the Domain constructor + + Returns + ------- + plotly.graph_objs.funnelarea.Domain + """ + return self["domain"] + + @domain.setter + def domain(self, val): + self["domain"] = val + + @property + def hoverinfo(self): + """ + Determines which trace information appear on hover. If `none` + or `skip` are set, no information is displayed upon hovering. + But, if `none` is set, click and hover events are still fired. + + The 'hoverinfo' property is a flaglist and may be specified + as a string containing: + - Any combination of ['label', 'text', 'value', 'percent', 'name'] joined with '+' characters + (e.g. 'label+text') + OR exactly one of ['all', 'none', 'skip'] (e.g. 'skip') + - A list or array of the above + + Returns + ------- + Any|numpy.ndarray + """ + return self["hoverinfo"] + + @hoverinfo.setter + def hoverinfo(self, val): + self["hoverinfo"] = val + + @property + def hoverinfosrc(self): + """ + Sets the source reference on Chart Studio Cloud for + `hoverinfo`. + + The 'hoverinfosrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["hoverinfosrc"] + + @hoverinfosrc.setter + def hoverinfosrc(self, val): + self["hoverinfosrc"] = val + + @property + def hoverlabel(self): + """ + The 'hoverlabel' property is an instance of Hoverlabel + that may be specified as: + - An instance of :class:`plotly.graph_objs.funnelarea.Hoverlabel` + - A dict of string/value properties that will be passed + to the Hoverlabel constructor + + Returns + ------- + plotly.graph_objs.funnelarea.Hoverlabel + """ + return self["hoverlabel"] + + @hoverlabel.setter + def hoverlabel(self, val): + self["hoverlabel"] = val + + @property + def hovertemplate(self): + """ + Template string used for rendering the information that appear + on hover box. Note that this will override `hoverinfo`. + Variables are inserted using %{variable}, for example "y: %{y}" + as well as %{xother}, {%_xother}, {%_xother_}, {%xother_}. When + showing info for several points, "xother" will be added to + those with different x positions from the first point. An + underscore before or after "(x|y)other" will add a space on + that side, only when this field is shown. Numbers are formatted + using d3-format's syntax %{variable:d3-format}, for example + "Price: %{y:$.2f}". + https://github.com/d3/d3-format/tree/v1.4.5#d3-format for + details on the formatting syntax. Dates are formatted using + d3-time-format's syntax %{variable|d3-time-format}, for example + "Day: %{2019-01-01|%A}". https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format for details on the date + formatting syntax. Variables that can't be found will be + replaced with the specifier. For example, a template of "data: + %{x}, %{y}" will result in a value of "data: 1, %{y}" if x is 1 + and y is missing. Variables with an undefined value will be + replaced with the fallback value. The variables available in + `hovertemplate` are the ones emitted as event data described at + this link https://plotly.com/javascript/plotlyjs-events/#event- + data. Additionally, all attributes that can be specified per- + point (the ones that are `arrayOk: true`) are available. + Finally, the template string has access to variables `label`, + `color`, `value`, `text` and `percent`. Anything contained in + tag `` is displayed in the secondary box, for example + `%{fullData.name}`. To hide the secondary box + completely, use an empty tag ``. + + The 'hovertemplate' property is a string and must be specified as: + - A string + - A number that will be converted to a string + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["hovertemplate"] + + @hovertemplate.setter + def hovertemplate(self, val): + self["hovertemplate"] = val + + @property + def hovertemplatefallback(self): + """ + Fallback string that's displayed when a variable referenced in + a template is missing. If the boolean value 'false' is passed + in, the specifier with the missing variable will be displayed. + + The 'hovertemplatefallback' property accepts values of any type + + Returns + ------- + Any + """ + return self["hovertemplatefallback"] + + @hovertemplatefallback.setter + def hovertemplatefallback(self, val): + self["hovertemplatefallback"] = val + + @property + def hovertemplatesrc(self): + """ + Sets the source reference on Chart Studio Cloud for + `hovertemplate`. + + The 'hovertemplatesrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["hovertemplatesrc"] + + @hovertemplatesrc.setter + def hovertemplatesrc(self, val): + self["hovertemplatesrc"] = val + + @property + def hovertext(self): + """ + Sets hover text elements associated with each sector. If a + single string, the same string appears for all data points. If + an array of string, the items are mapped in order of this + trace's sectors. To be seen, trace `hoverinfo` must contain a + "text" flag. + + The 'hovertext' property is a string and must be specified as: + - A string + - A number that will be converted to a string + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["hovertext"] + + @hovertext.setter + def hovertext(self, val): + self["hovertext"] = val + + @property + def hovertextsrc(self): + """ + Sets the source reference on Chart Studio Cloud for + `hovertext`. + + The 'hovertextsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["hovertextsrc"] + + @hovertextsrc.setter + def hovertextsrc(self, val): + self["hovertextsrc"] = val + + @property + def ids(self): + """ + Assigns id labels to each datum. These ids for object constancy + of data points during animation. Should be an array of strings, + not numbers or any other type. + + The 'ids' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["ids"] + + @ids.setter + def ids(self, val): + self["ids"] = val + + @property + def idssrc(self): + """ + Sets the source reference on Chart Studio Cloud for `ids`. + + The 'idssrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["idssrc"] + + @idssrc.setter + def idssrc(self, val): + self["idssrc"] = val + + @property + def insidetextfont(self): + """ + Sets the font used for `textinfo` lying inside the sector. + + The 'insidetextfont' property is an instance of Insidetextfont + that may be specified as: + - An instance of :class:`plotly.graph_objs.funnelarea.Insidetextfont` + - A dict of string/value properties that will be passed + to the Insidetextfont constructor + + Returns + ------- + plotly.graph_objs.funnelarea.Insidetextfont + """ + return self["insidetextfont"] + + @insidetextfont.setter + def insidetextfont(self, val): + self["insidetextfont"] = val + + @property + def label0(self): + """ + Alternate to `labels`. Builds a numeric set of labels. Use with + `dlabel` where `label0` is the starting label and `dlabel` the + step. + + The 'label0' property is a number and may be specified as: + - An int or float + + Returns + ------- + int|float + """ + return self["label0"] + + @label0.setter + def label0(self, val): + self["label0"] = val + + @property + def labels(self): + """ + Sets the sector labels. If `labels` entries are duplicated, we + sum associated `values` or simply count occurrences if `values` + is not provided. For other array attributes (including color) + we use the first non-empty entry among all occurrences of the + label. + + The 'labels' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["labels"] + + @labels.setter + def labels(self, val): + self["labels"] = val + + @property + def labelssrc(self): + """ + Sets the source reference on Chart Studio Cloud for `labels`. + + The 'labelssrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["labelssrc"] + + @labelssrc.setter + def labelssrc(self, val): + self["labelssrc"] = val + + @property + def legend(self): + """ + Sets the reference to a legend to show this trace in. + References to these legends are "legend", "legend2", "legend3", + etc. Settings for these legends are set in the layout, under + `layout.legend`, `layout.legend2`, etc. + + The 'legend' property is an identifier of a particular + subplot, of type 'legend', that may be specified as: + - the string 'legend' optionally followed by an integer >= 1 + (e.g. 'legend', 'legend1', 'legend2', 'legend3', etc.) + + Returns + ------- + str + """ + return self["legend"] + + @legend.setter + def legend(self, val): + self["legend"] = val + + @property + def legendgroup(self): + """ + Sets the legend group for this trace. Traces and shapes part of + the same legend group hide/show at the same time when toggling + legend items. + + The 'legendgroup' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["legendgroup"] + + @legendgroup.setter + def legendgroup(self, val): + self["legendgroup"] = val + + @property + def legendgrouptitle(self): + """ + The 'legendgrouptitle' property is an instance of Legendgrouptitle + that may be specified as: + - An instance of :class:`plotly.graph_objs.funnelarea.Legendgrouptitle` + - A dict of string/value properties that will be passed + to the Legendgrouptitle constructor + + Returns + ------- + plotly.graph_objs.funnelarea.Legendgrouptitle + """ + return self["legendgrouptitle"] + + @legendgrouptitle.setter + def legendgrouptitle(self, val): + self["legendgrouptitle"] = val + + @property + def legendrank(self): + """ + Sets the legend rank for this trace. Items and groups with + smaller ranks are presented on top/left side while with + "reversed" `legend.traceorder` they are on bottom/right side. + The default legendrank is 1000, so that you can use ranks less + than 1000 to place certain items before all unranked items, and + ranks greater than 1000 to go after all unranked items. When + having unranked or equal rank items shapes would be displayed + after traces i.e. according to their order in data and layout. + + The 'legendrank' property is a number and may be specified as: + - An int or float + + Returns + ------- + int|float + """ + return self["legendrank"] + + @legendrank.setter + def legendrank(self, val): + self["legendrank"] = val + + @property + def legendwidth(self): + """ + Sets the width (in px or fraction) of the legend for this + trace. + + The 'legendwidth' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["legendwidth"] + + @legendwidth.setter + def legendwidth(self, val): + self["legendwidth"] = val + + @property + def marker(self): + """ + The 'marker' property is an instance of Marker + that may be specified as: + - An instance of :class:`plotly.graph_objs.funnelarea.Marker` + - A dict of string/value properties that will be passed + to the Marker constructor + + Returns + ------- + plotly.graph_objs.funnelarea.Marker + """ + return self["marker"] + + @marker.setter + def marker(self, val): + self["marker"] = val + + @property + def meta(self): + """ + Assigns extra meta information associated with this trace that + can be used in various text attributes. Attributes such as + trace `name`, graph, axis and colorbar `title.text`, annotation + `text` `rangeselector`, `updatemenues` and `sliders` `label` + text all support `meta`. To access the trace `meta` values in + an attribute in the same trace, simply use `%{meta[i]}` where + `i` is the index or key of the `meta` item in question. To + access trace `meta` in layout attributes, use + `%{data[n[.meta[i]}` where `i` is the index or key of the + `meta` and `n` is the trace index. + + The 'meta' property accepts values of any type + + Returns + ------- + Any|numpy.ndarray + """ + return self["meta"] + + @meta.setter + def meta(self, val): + self["meta"] = val + + @property + def metasrc(self): + """ + Sets the source reference on Chart Studio Cloud for `meta`. + + The 'metasrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["metasrc"] + + @metasrc.setter + def metasrc(self, val): + self["metasrc"] = val + + @property + def name(self): + """ + Sets the trace name. The trace name appears as the legend item + and on hover. + + The 'name' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["name"] + + @name.setter + def name(self, val): + self["name"] = val + + @property + def opacity(self): + """ + Sets the opacity of the trace. + + The 'opacity' property is a number and may be specified as: + - An int or float in the interval [0, 1] + + Returns + ------- + int|float + """ + return self["opacity"] + + @opacity.setter + def opacity(self, val): + self["opacity"] = val + + @property + def scalegroup(self): + """ + If there are multiple funnelareas that should be sized + according to their totals, link them by providing a non-empty + group id here shared by every trace in the same group. + + The 'scalegroup' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["scalegroup"] + + @scalegroup.setter + def scalegroup(self, val): + self["scalegroup"] = val + + @property + def showlegend(self): + """ + Determines whether or not an item corresponding to this trace + is shown in the legend. + + The 'showlegend' property is a boolean and must be specified as: + - A boolean value: True or False + + Returns + ------- + bool + """ + return self["showlegend"] + + @showlegend.setter + def showlegend(self, val): + self["showlegend"] = val + + @property + def stream(self): + """ + The 'stream' property is an instance of Stream + that may be specified as: + - An instance of :class:`plotly.graph_objs.funnelarea.Stream` + - A dict of string/value properties that will be passed + to the Stream constructor + + Returns + ------- + plotly.graph_objs.funnelarea.Stream + """ + return self["stream"] + + @stream.setter + def stream(self, val): + self["stream"] = val + + @property + def text(self): + """ + Sets text elements associated with each sector. If trace + `textinfo` contains a "text" flag, these elements will be seen + on the chart. If trace `hoverinfo` contains a "text" flag and + "hovertext" is not set, these elements will be seen in the + hover labels. + + The 'text' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["text"] + + @text.setter + def text(self, val): + self["text"] = val + + @property + def textfont(self): + """ + Sets the font used for `textinfo`. + + The 'textfont' property is an instance of Textfont + that may be specified as: + - An instance of :class:`plotly.graph_objs.funnelarea.Textfont` + - A dict of string/value properties that will be passed + to the Textfont constructor + + Returns + ------- + plotly.graph_objs.funnelarea.Textfont + """ + return self["textfont"] + + @textfont.setter + def textfont(self, val): + self["textfont"] = val + + @property + def textinfo(self): + """ + Determines which trace information appear on the graph. + + The 'textinfo' property is a flaglist and may be specified + as a string containing: + - Any combination of ['label', 'text', 'value', 'percent'] joined with '+' characters + (e.g. 'label+text') + OR exactly one of ['none'] (e.g. 'none') + + Returns + ------- + Any + """ + return self["textinfo"] + + @textinfo.setter + def textinfo(self, val): + self["textinfo"] = val + + @property + def textposition(self): + """ + Specifies the location of the `textinfo`. + + The 'textposition' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['inside', 'none'] + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + Any|numpy.ndarray + """ + return self["textposition"] + + @textposition.setter + def textposition(self, val): + self["textposition"] = val + + @property + def textpositionsrc(self): + """ + Sets the source reference on Chart Studio Cloud for + `textposition`. + + The 'textpositionsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["textpositionsrc"] + + @textpositionsrc.setter + def textpositionsrc(self, val): + self["textpositionsrc"] = val + + @property + def textsrc(self): + """ + Sets the source reference on Chart Studio Cloud for `text`. + + The 'textsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["textsrc"] + + @textsrc.setter + def textsrc(self, val): + self["textsrc"] = val + + @property + def texttemplate(self): + """ + Template string used for rendering the information text that + appears on points. Note that this will override `textinfo`. + Variables are inserted using %{variable}, for example "y: + %{y}". Numbers are formatted using d3-format's syntax + %{variable:d3-format}, for example "Price: %{y:$.2f}". + https://github.com/d3/d3-format/tree/v1.4.5#d3-format for + details on the formatting syntax. Dates are formatted using + d3-time-format's syntax %{variable|d3-time-format}, for example + "Day: %{2019-01-01|%A}". https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format for details on the date + formatting syntax. Variables that can't be found will be + replaced with the specifier. For example, a template of "data: + %{x}, %{y}" will result in a value of "data: 1, %{y}" if x is 1 + and y is missing. Variables with an undefined value will be + replaced with the fallback value. All attributes that can be + specified per-point (the ones that are `arrayOk: true`) are + available. Finally, the template string has access to variables + `label`, `color`, `value`, `text` and `percent`. + + The 'texttemplate' property is a string and must be specified as: + - A string + - A number that will be converted to a string + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["texttemplate"] + + @texttemplate.setter + def texttemplate(self, val): + self["texttemplate"] = val + + @property + def texttemplatefallback(self): + """ + Fallback string that's displayed when a variable referenced in + a template is missing. If the boolean value 'false' is passed + in, the specifier with the missing variable will be displayed. + + The 'texttemplatefallback' property accepts values of any type + + Returns + ------- + Any + """ + return self["texttemplatefallback"] + + @texttemplatefallback.setter + def texttemplatefallback(self, val): + self["texttemplatefallback"] = val + + @property + def texttemplatesrc(self): + """ + Sets the source reference on Chart Studio Cloud for + `texttemplate`. + + The 'texttemplatesrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["texttemplatesrc"] + + @texttemplatesrc.setter + def texttemplatesrc(self, val): + self["texttemplatesrc"] = val + + @property + def title(self): + """ + The 'title' property is an instance of Title + that may be specified as: + - An instance of :class:`plotly.graph_objs.funnelarea.Title` + - A dict of string/value properties that will be passed + to the Title constructor + + Returns + ------- + plotly.graph_objs.funnelarea.Title + """ + return self["title"] + + @title.setter + def title(self, val): + self["title"] = val + + @property + def uid(self): + """ + Assign an id to this trace, Use this to provide object + constancy between traces during animations and transitions. + + The 'uid' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["uid"] + + @uid.setter + def uid(self, val): + self["uid"] = val + + @property + def uirevision(self): + """ + Controls persistence of some user-driven changes to the trace: + `constraintrange` in `parcoords` traces, as well as some + `editable: true` modifications such as `name` and + `colorbar.title`. Defaults to `layout.uirevision`. Note that + other user-driven trace attribute changes are controlled by + `layout` attributes: `trace.visible` is controlled by + `layout.legend.uirevision`, `selectedpoints` is controlled by + `layout.selectionrevision`, and `colorbar.(x|y)` (accessible + with `config: {editable: true}`) is controlled by + `layout.editrevision`. Trace changes are tracked by `uid`, + which only falls back on trace index if no `uid` is provided. + So if your app can add/remove traces before the end of the + `data` array, such that the same trace has a different index, + you can still preserve user-driven changes if you give each + trace a `uid` that stays with it as it moves. + + The 'uirevision' property accepts values of any type + + Returns + ------- + Any + """ + return self["uirevision"] + + @uirevision.setter + def uirevision(self, val): + self["uirevision"] = val + + @property + def values(self): + """ + Sets the values of the sectors. If omitted, we count + occurrences of each label. + + The 'values' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["values"] + + @values.setter + def values(self, val): + self["values"] = val + + @property + def valuessrc(self): + """ + Sets the source reference on Chart Studio Cloud for `values`. + + The 'valuessrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["valuessrc"] + + @valuessrc.setter + def valuessrc(self, val): + self["valuessrc"] = val + + @property + def visible(self): + """ + Determines whether or not this trace is visible. If + "legendonly", the trace is not drawn, but can appear as a + legend item (provided that the legend itself is visible). + + The 'visible' property is an enumeration that may be specified as: + - One of the following enumeration values: + [True, False, 'legendonly'] + + Returns + ------- + Any + """ + return self["visible"] + + @visible.setter + def visible(self, val): + self["visible"] = val + + @property + def type(self): + return self._props["type"] + + @property + def _prop_descriptions(self): + return """\ + aspectratio + Sets the ratio between height and width + baseratio + Sets the ratio between bottom length and maximum top + length. + customdata + Assigns extra data each datum. This may be useful when + listening to hover, click and selection events. Note + that, "scatter" traces also appends customdata items in + the markers DOM elements + customdatasrc + Sets the source reference on Chart Studio Cloud for + `customdata`. + dlabel + Sets the label step. See `label0` for more info. + domain + :class:`plotly.graph_objects.funnelarea.Domain` + instance or dict with compatible properties + hoverinfo + Determines which trace information appear on hover. If + `none` or `skip` are set, no information is displayed + upon hovering. But, if `none` is set, click and hover + events are still fired. + hoverinfosrc + Sets the source reference on Chart Studio Cloud for + `hoverinfo`. + hoverlabel + :class:`plotly.graph_objects.funnelarea.Hoverlabel` + instance or dict with compatible properties + hovertemplate + Template string used for rendering the information that + appear on hover box. Note that this will override + `hoverinfo`. Variables are inserted using %{variable}, + for example "y: %{y}" as well as %{xother}, {%_xother}, + {%_xother_}, {%xother_}. When showing info for several + points, "xother" will be added to those with different + x positions from the first point. An underscore before + or after "(x|y)other" will add a space on that side, + only when this field is shown. Numbers are formatted + using d3-format's syntax %{variable:d3-format}, for + example "Price: %{y:$.2f}". + https://github.com/d3/d3-format/tree/v1.4.5#d3-format + for details on the formatting syntax. Dates are + formatted using d3-time-format's syntax + %{variable|d3-time-format}, for example "Day: + %{2019-01-01|%A}". https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format for details on the + date formatting syntax. Variables that can't be found + will be replaced with the specifier. For example, a + template of "data: %{x}, %{y}" will result in a value + of "data: 1, %{y}" if x is 1 and y is missing. + Variables with an undefined value will be replaced with + the fallback value. The variables available in + `hovertemplate` are the ones emitted as event data + described at this link + https://plotly.com/javascript/plotlyjs-events/#event- + data. Additionally, all attributes that can be + specified per-point (the ones that are `arrayOk: true`) + are available. Finally, the template string has access + to variables `label`, `color`, `value`, `text` and + `percent`. Anything contained in tag `` is + displayed in the secondary box, for example + `%{fullData.name}`. To hide the + secondary box completely, use an empty tag + ``. + hovertemplatefallback + Fallback string that's displayed when a variable + referenced in a template is missing. If the boolean + value 'false' is passed in, the specifier with the + missing variable will be displayed. + hovertemplatesrc + Sets the source reference on Chart Studio Cloud for + `hovertemplate`. + hovertext + Sets hover text elements associated with each sector. + If a single string, the same string appears for all + data points. If an array of string, the items are + mapped in order of this trace's sectors. To be seen, + trace `hoverinfo` must contain a "text" flag. + hovertextsrc + Sets the source reference on Chart Studio Cloud for + `hovertext`. + ids + Assigns id labels to each datum. These ids for object + constancy of data points during animation. Should be an + array of strings, not numbers or any other type. + idssrc + Sets the source reference on Chart Studio Cloud for + `ids`. + insidetextfont + Sets the font used for `textinfo` lying inside the + sector. + label0 + Alternate to `labels`. Builds a numeric set of labels. + Use with `dlabel` where `label0` is the starting label + and `dlabel` the step. + labels + Sets the sector labels. If `labels` entries are + duplicated, we sum associated `values` or simply count + occurrences if `values` is not provided. For other + array attributes (including color) we use the first + non-empty entry among all occurrences of the label. + labelssrc + Sets the source reference on Chart Studio Cloud for + `labels`. + legend + Sets the reference to a legend to show this trace in. + References to these legends are "legend", "legend2", + "legend3", etc. Settings for these legends are set in + the layout, under `layout.legend`, `layout.legend2`, + etc. + legendgroup + Sets the legend group for this trace. Traces and shapes + part of the same legend group hide/show at the same + time when toggling legend items. + legendgrouptitle + :class:`plotly.graph_objects.funnelarea.Legendgrouptitl + e` instance or dict with compatible properties + legendrank + Sets the legend rank for this trace. Items and groups + with smaller ranks are presented on top/left side while + with "reversed" `legend.traceorder` they are on + bottom/right side. The default legendrank is 1000, so + that you can use ranks less than 1000 to place certain + items before all unranked items, and ranks greater than + 1000 to go after all unranked items. When having + unranked or equal rank items shapes would be displayed + after traces i.e. according to their order in data and + layout. + legendwidth + Sets the width (in px or fraction) of the legend for + this trace. + marker + :class:`plotly.graph_objects.funnelarea.Marker` + instance or dict with compatible properties + meta + Assigns extra meta information associated with this + trace that can be used in various text attributes. + Attributes such as trace `name`, graph, axis and + colorbar `title.text`, annotation `text` + `rangeselector`, `updatemenues` and `sliders` `label` + text all support `meta`. To access the trace `meta` + values in an attribute in the same trace, simply use + `%{meta[i]}` where `i` is the index or key of the + `meta` item in question. To access trace `meta` in + layout attributes, use `%{data[n[.meta[i]}` where `i` + is the index or key of the `meta` and `n` is the trace + index. + metasrc + Sets the source reference on Chart Studio Cloud for + `meta`. + name + Sets the trace name. The trace name appears as the + legend item and on hover. + opacity + Sets the opacity of the trace. + scalegroup + If there are multiple funnelareas that should be sized + according to their totals, link them by providing a + non-empty group id here shared by every trace in the + same group. + showlegend + Determines whether or not an item corresponding to this + trace is shown in the legend. + stream + :class:`plotly.graph_objects.funnelarea.Stream` + instance or dict with compatible properties + text + Sets text elements associated with each sector. If + trace `textinfo` contains a "text" flag, these elements + will be seen on the chart. If trace `hoverinfo` + contains a "text" flag and "hovertext" is not set, + these elements will be seen in the hover labels. + textfont + Sets the font used for `textinfo`. + textinfo + Determines which trace information appear on the graph. + textposition + Specifies the location of the `textinfo`. + textpositionsrc + Sets the source reference on Chart Studio Cloud for + `textposition`. + textsrc + Sets the source reference on Chart Studio Cloud for + `text`. + texttemplate + Template string used for rendering the information text + that appears on points. Note that this will override + `textinfo`. Variables are inserted using %{variable}, + for example "y: %{y}". Numbers are formatted using + d3-format's syntax %{variable:d3-format}, for example + "Price: %{y:$.2f}". + https://github.com/d3/d3-format/tree/v1.4.5#d3-format + for details on the formatting syntax. Dates are + formatted using d3-time-format's syntax + %{variable|d3-time-format}, for example "Day: + %{2019-01-01|%A}". https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format for details on the + date formatting syntax. Variables that can't be found + will be replaced with the specifier. For example, a + template of "data: %{x}, %{y}" will result in a value + of "data: 1, %{y}" if x is 1 and y is missing. + Variables with an undefined value will be replaced with + the fallback value. All attributes that can be + specified per-point (the ones that are `arrayOk: true`) + are available. Finally, the template string has access + to variables `label`, `color`, `value`, `text` and + `percent`. + texttemplatefallback + Fallback string that's displayed when a variable + referenced in a template is missing. If the boolean + value 'false' is passed in, the specifier with the + missing variable will be displayed. + texttemplatesrc + Sets the source reference on Chart Studio Cloud for + `texttemplate`. + title + :class:`plotly.graph_objects.funnelarea.Title` instance + or dict with compatible properties + uid + Assign an id to this trace, Use this to provide object + constancy between traces during animations and + transitions. + uirevision + Controls persistence of some user-driven changes to the + trace: `constraintrange` in `parcoords` traces, as well + as some `editable: true` modifications such as `name` + and `colorbar.title`. Defaults to `layout.uirevision`. + Note that other user-driven trace attribute changes are + controlled by `layout` attributes: `trace.visible` is + controlled by `layout.legend.uirevision`, + `selectedpoints` is controlled by + `layout.selectionrevision`, and `colorbar.(x|y)` + (accessible with `config: {editable: true}`) is + controlled by `layout.editrevision`. Trace changes are + tracked by `uid`, which only falls back on trace index + if no `uid` is provided. So if your app can add/remove + traces before the end of the `data` array, such that + the same trace has a different index, you can still + preserve user-driven changes if you give each trace a + `uid` that stays with it as it moves. + values + Sets the values of the sectors. If omitted, we count + occurrences of each label. + valuessrc + Sets the source reference on Chart Studio Cloud for + `values`. + visible + Determines whether or not this trace is visible. If + "legendonly", the trace is not drawn, but can appear as + a legend item (provided that the legend itself is + visible). + """ + + def __init__( + self, + arg=None, + aspectratio=None, + baseratio=None, + customdata=None, + customdatasrc=None, + dlabel=None, + domain=None, + hoverinfo=None, + hoverinfosrc=None, + hoverlabel=None, + hovertemplate=None, + hovertemplatefallback=None, + hovertemplatesrc=None, + hovertext=None, + hovertextsrc=None, + ids=None, + idssrc=None, + insidetextfont=None, + label0=None, + labels=None, + labelssrc=None, + legend=None, + legendgroup=None, + legendgrouptitle=None, + legendrank=None, + legendwidth=None, + marker=None, + meta=None, + metasrc=None, + name=None, + opacity=None, + scalegroup=None, + showlegend=None, + stream=None, + text=None, + textfont=None, + textinfo=None, + textposition=None, + textpositionsrc=None, + textsrc=None, + texttemplate=None, + texttemplatefallback=None, + texttemplatesrc=None, + title=None, + uid=None, + uirevision=None, + values=None, + valuessrc=None, + visible=None, + **kwargs, + ): + """ + Construct a new Funnelarea object + + Visualize stages in a process using area-encoded trapezoids. + This trace can be used to show data in a part-to-whole + representation similar to a "pie" trace, wherein each item + appears in a single stage. See also the "funnel" trace type for + a different approach to visualizing funnel data. + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of :class:`plotly.graph_objs.Funnelarea` + aspectratio + Sets the ratio between height and width + baseratio + Sets the ratio between bottom length and maximum top + length. + customdata + Assigns extra data each datum. This may be useful when + listening to hover, click and selection events. Note + that, "scatter" traces also appends customdata items in + the markers DOM elements + customdatasrc + Sets the source reference on Chart Studio Cloud for + `customdata`. + dlabel + Sets the label step. See `label0` for more info. + domain + :class:`plotly.graph_objects.funnelarea.Domain` + instance or dict with compatible properties + hoverinfo + Determines which trace information appear on hover. If + `none` or `skip` are set, no information is displayed + upon hovering. But, if `none` is set, click and hover + events are still fired. + hoverinfosrc + Sets the source reference on Chart Studio Cloud for + `hoverinfo`. + hoverlabel + :class:`plotly.graph_objects.funnelarea.Hoverlabel` + instance or dict with compatible properties + hovertemplate + Template string used for rendering the information that + appear on hover box. Note that this will override + `hoverinfo`. Variables are inserted using %{variable}, + for example "y: %{y}" as well as %{xother}, {%_xother}, + {%_xother_}, {%xother_}. When showing info for several + points, "xother" will be added to those with different + x positions from the first point. An underscore before + or after "(x|y)other" will add a space on that side, + only when this field is shown. Numbers are formatted + using d3-format's syntax %{variable:d3-format}, for + example "Price: %{y:$.2f}". + https://github.com/d3/d3-format/tree/v1.4.5#d3-format + for details on the formatting syntax. Dates are + formatted using d3-time-format's syntax + %{variable|d3-time-format}, for example "Day: + %{2019-01-01|%A}". https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format for details on the + date formatting syntax. Variables that can't be found + will be replaced with the specifier. For example, a + template of "data: %{x}, %{y}" will result in a value + of "data: 1, %{y}" if x is 1 and y is missing. + Variables with an undefined value will be replaced with + the fallback value. The variables available in + `hovertemplate` are the ones emitted as event data + described at this link + https://plotly.com/javascript/plotlyjs-events/#event- + data. Additionally, all attributes that can be + specified per-point (the ones that are `arrayOk: true`) + are available. Finally, the template string has access + to variables `label`, `color`, `value`, `text` and + `percent`. Anything contained in tag `` is + displayed in the secondary box, for example + `%{fullData.name}`. To hide the + secondary box completely, use an empty tag + ``. + hovertemplatefallback + Fallback string that's displayed when a variable + referenced in a template is missing. If the boolean + value 'false' is passed in, the specifier with the + missing variable will be displayed. + hovertemplatesrc + Sets the source reference on Chart Studio Cloud for + `hovertemplate`. + hovertext + Sets hover text elements associated with each sector. + If a single string, the same string appears for all + data points. If an array of string, the items are + mapped in order of this trace's sectors. To be seen, + trace `hoverinfo` must contain a "text" flag. + hovertextsrc + Sets the source reference on Chart Studio Cloud for + `hovertext`. + ids + Assigns id labels to each datum. These ids for object + constancy of data points during animation. Should be an + array of strings, not numbers or any other type. + idssrc + Sets the source reference on Chart Studio Cloud for + `ids`. + insidetextfont + Sets the font used for `textinfo` lying inside the + sector. + label0 + Alternate to `labels`. Builds a numeric set of labels. + Use with `dlabel` where `label0` is the starting label + and `dlabel` the step. + labels + Sets the sector labels. If `labels` entries are + duplicated, we sum associated `values` or simply count + occurrences if `values` is not provided. For other + array attributes (including color) we use the first + non-empty entry among all occurrences of the label. + labelssrc + Sets the source reference on Chart Studio Cloud for + `labels`. + legend + Sets the reference to a legend to show this trace in. + References to these legends are "legend", "legend2", + "legend3", etc. Settings for these legends are set in + the layout, under `layout.legend`, `layout.legend2`, + etc. + legendgroup + Sets the legend group for this trace. Traces and shapes + part of the same legend group hide/show at the same + time when toggling legend items. + legendgrouptitle + :class:`plotly.graph_objects.funnelarea.Legendgrouptitl + e` instance or dict with compatible properties + legendrank + Sets the legend rank for this trace. Items and groups + with smaller ranks are presented on top/left side while + with "reversed" `legend.traceorder` they are on + bottom/right side. The default legendrank is 1000, so + that you can use ranks less than 1000 to place certain + items before all unranked items, and ranks greater than + 1000 to go after all unranked items. When having + unranked or equal rank items shapes would be displayed + after traces i.e. according to their order in data and + layout. + legendwidth + Sets the width (in px or fraction) of the legend for + this trace. + marker + :class:`plotly.graph_objects.funnelarea.Marker` + instance or dict with compatible properties + meta + Assigns extra meta information associated with this + trace that can be used in various text attributes. + Attributes such as trace `name`, graph, axis and + colorbar `title.text`, annotation `text` + `rangeselector`, `updatemenues` and `sliders` `label` + text all support `meta`. To access the trace `meta` + values in an attribute in the same trace, simply use + `%{meta[i]}` where `i` is the index or key of the + `meta` item in question. To access trace `meta` in + layout attributes, use `%{data[n[.meta[i]}` where `i` + is the index or key of the `meta` and `n` is the trace + index. + metasrc + Sets the source reference on Chart Studio Cloud for + `meta`. + name + Sets the trace name. The trace name appears as the + legend item and on hover. + opacity + Sets the opacity of the trace. + scalegroup + If there are multiple funnelareas that should be sized + according to their totals, link them by providing a + non-empty group id here shared by every trace in the + same group. + showlegend + Determines whether or not an item corresponding to this + trace is shown in the legend. + stream + :class:`plotly.graph_objects.funnelarea.Stream` + instance or dict with compatible properties + text + Sets text elements associated with each sector. If + trace `textinfo` contains a "text" flag, these elements + will be seen on the chart. If trace `hoverinfo` + contains a "text" flag and "hovertext" is not set, + these elements will be seen in the hover labels. + textfont + Sets the font used for `textinfo`. + textinfo + Determines which trace information appear on the graph. + textposition + Specifies the location of the `textinfo`. + textpositionsrc + Sets the source reference on Chart Studio Cloud for + `textposition`. + textsrc + Sets the source reference on Chart Studio Cloud for + `text`. + texttemplate + Template string used for rendering the information text + that appears on points. Note that this will override + `textinfo`. Variables are inserted using %{variable}, + for example "y: %{y}". Numbers are formatted using + d3-format's syntax %{variable:d3-format}, for example + "Price: %{y:$.2f}". + https://github.com/d3/d3-format/tree/v1.4.5#d3-format + for details on the formatting syntax. Dates are + formatted using d3-time-format's syntax + %{variable|d3-time-format}, for example "Day: + %{2019-01-01|%A}". https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format for details on the + date formatting syntax. Variables that can't be found + will be replaced with the specifier. For example, a + template of "data: %{x}, %{y}" will result in a value + of "data: 1, %{y}" if x is 1 and y is missing. + Variables with an undefined value will be replaced with + the fallback value. All attributes that can be + specified per-point (the ones that are `arrayOk: true`) + are available. Finally, the template string has access + to variables `label`, `color`, `value`, `text` and + `percent`. + texttemplatefallback + Fallback string that's displayed when a variable + referenced in a template is missing. If the boolean + value 'false' is passed in, the specifier with the + missing variable will be displayed. + texttemplatesrc + Sets the source reference on Chart Studio Cloud for + `texttemplate`. + title + :class:`plotly.graph_objects.funnelarea.Title` instance + or dict with compatible properties + uid + Assign an id to this trace, Use this to provide object + constancy between traces during animations and + transitions. + uirevision + Controls persistence of some user-driven changes to the + trace: `constraintrange` in `parcoords` traces, as well + as some `editable: true` modifications such as `name` + and `colorbar.title`. Defaults to `layout.uirevision`. + Note that other user-driven trace attribute changes are + controlled by `layout` attributes: `trace.visible` is + controlled by `layout.legend.uirevision`, + `selectedpoints` is controlled by + `layout.selectionrevision`, and `colorbar.(x|y)` + (accessible with `config: {editable: true}`) is + controlled by `layout.editrevision`. Trace changes are + tracked by `uid`, which only falls back on trace index + if no `uid` is provided. So if your app can add/remove + traces before the end of the `data` array, such that + the same trace has a different index, you can still + preserve user-driven changes if you give each trace a + `uid` that stays with it as it moves. + values + Sets the values of the sectors. If omitted, we count + occurrences of each label. + valuessrc + Sets the source reference on Chart Studio Cloud for + `values`. + visible + Determines whether or not this trace is visible. If + "legendonly", the trace is not drawn, but can appear as + a legend item (provided that the legend itself is + visible). + + Returns + ------- + Funnelarea + """ + super().__init__("funnelarea") + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + if arg is None: + arg = {} + elif isinstance(arg, self.__class__): + arg = arg.to_plotly_json() + elif isinstance(arg, dict): + arg = _copy.copy(arg) + else: + raise ValueError("""\ +The first argument to the plotly.graph_objs.Funnelarea +constructor must be a dict or +an instance of :class:`plotly.graph_objs.Funnelarea`""") + + self._skip_invalid = kwargs.pop("skip_invalid", False) + self._validate = kwargs.pop("_validate", True) + + self._set_property("aspectratio", arg, aspectratio) + self._set_property("baseratio", arg, baseratio) + self._set_property("customdata", arg, customdata) + self._set_property("customdatasrc", arg, customdatasrc) + self._set_property("dlabel", arg, dlabel) + self._set_property("domain", arg, domain) + self._set_property("hoverinfo", arg, hoverinfo) + self._set_property("hoverinfosrc", arg, hoverinfosrc) + self._set_property("hoverlabel", arg, hoverlabel) + self._set_property("hovertemplate", arg, hovertemplate) + self._set_property("hovertemplatefallback", arg, hovertemplatefallback) + self._set_property("hovertemplatesrc", arg, hovertemplatesrc) + self._set_property("hovertext", arg, hovertext) + self._set_property("hovertextsrc", arg, hovertextsrc) + self._set_property("ids", arg, ids) + self._set_property("idssrc", arg, idssrc) + self._set_property("insidetextfont", arg, insidetextfont) + self._set_property("label0", arg, label0) + self._set_property("labels", arg, labels) + self._set_property("labelssrc", arg, labelssrc) + self._set_property("legend", arg, legend) + self._set_property("legendgroup", arg, legendgroup) + self._set_property("legendgrouptitle", arg, legendgrouptitle) + self._set_property("legendrank", arg, legendrank) + self._set_property("legendwidth", arg, legendwidth) + self._set_property("marker", arg, marker) + self._set_property("meta", arg, meta) + self._set_property("metasrc", arg, metasrc) + self._set_property("name", arg, name) + self._set_property("opacity", arg, opacity) + self._set_property("scalegroup", arg, scalegroup) + self._set_property("showlegend", arg, showlegend) + self._set_property("stream", arg, stream) + self._set_property("text", arg, text) + self._set_property("textfont", arg, textfont) + self._set_property("textinfo", arg, textinfo) + self._set_property("textposition", arg, textposition) + self._set_property("textpositionsrc", arg, textpositionsrc) + self._set_property("textsrc", arg, textsrc) + self._set_property("texttemplate", arg, texttemplate) + self._set_property("texttemplatefallback", arg, texttemplatefallback) + self._set_property("texttemplatesrc", arg, texttemplatesrc) + self._set_property("title", arg, title) + self._set_property("uid", arg, uid) + self._set_property("uirevision", arg, uirevision) + self._set_property("values", arg, values) + self._set_property("valuessrc", arg, valuessrc) + self._set_property("visible", arg, visible) + + self._props["type"] = "funnelarea" + arg.pop("type", None) + self._process_kwargs(**dict(arg, **kwargs)) + self._skip_invalid = False diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/_heatmap.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/_heatmap.py new file mode 100644 index 0000000000000000000000000000000000000000..69d10f2a18acb0a7f68b17bc8a8af4b8a53e0956 --- /dev/null +++ b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/_heatmap.py @@ -0,0 +1,2626 @@ +# --- THIS FILE IS AUTO-GENERATED --- +# Modifications will be overwitten the next time code generation run. + +from plotly.basedatatypes import BaseTraceType as _BaseTraceType +import copy as _copy + + +class Heatmap(_BaseTraceType): + _parent_path_str = "" + _path_str = "heatmap" + _valid_props = { + "autocolorscale", + "coloraxis", + "colorbar", + "colorscale", + "connectgaps", + "customdata", + "customdatasrc", + "dx", + "dy", + "hoverinfo", + "hoverinfosrc", + "hoverlabel", + "hoverongaps", + "hovertemplate", + "hovertemplatefallback", + "hovertemplatesrc", + "hovertext", + "hovertextsrc", + "ids", + "idssrc", + "legend", + "legendgroup", + "legendgrouptitle", + "legendrank", + "legendwidth", + "meta", + "metasrc", + "name", + "opacity", + "reversescale", + "showlegend", + "showscale", + "stream", + "text", + "textfont", + "textsrc", + "texttemplate", + "texttemplatefallback", + "transpose", + "type", + "uid", + "uirevision", + "visible", + "x", + "x0", + "xaxis", + "xcalendar", + "xgap", + "xhoverformat", + "xperiod", + "xperiod0", + "xperiodalignment", + "xsrc", + "xtype", + "y", + "y0", + "yaxis", + "ycalendar", + "ygap", + "yhoverformat", + "yperiod", + "yperiod0", + "yperiodalignment", + "ysrc", + "ytype", + "z", + "zauto", + "zhoverformat", + "zmax", + "zmid", + "zmin", + "zorder", + "zsmooth", + "zsrc", + } + + @property + def autocolorscale(self): + """ + Determines whether the colorscale is a default palette + (`autocolorscale: true`) or the palette determined by + `colorscale`. In case `colorscale` is unspecified or + `autocolorscale` is true, the default palette will be chosen + according to whether numbers in the `color` array are all + positive, all negative or mixed. + + The 'autocolorscale' property is a boolean and must be specified as: + - A boolean value: True or False + + Returns + ------- + bool + """ + return self["autocolorscale"] + + @autocolorscale.setter + def autocolorscale(self, val): + self["autocolorscale"] = val + + @property + def coloraxis(self): + """ + Sets a reference to a shared color axis. References to these + shared color axes are "coloraxis", "coloraxis2", "coloraxis3", + etc. Settings for these shared color axes are set in the + layout, under `layout.coloraxis`, `layout.coloraxis2`, etc. + Note that multiple color scales can be linked to the same color + axis. + + The 'coloraxis' property is an identifier of a particular + subplot, of type 'coloraxis', that may be specified as: + - the string 'coloraxis' optionally followed by an integer >= 1 + (e.g. 'coloraxis', 'coloraxis1', 'coloraxis2', 'coloraxis3', etc.) + + Returns + ------- + str + """ + return self["coloraxis"] + + @coloraxis.setter + def coloraxis(self, val): + self["coloraxis"] = val + + @property + def colorbar(self): + """ + The 'colorbar' property is an instance of ColorBar + that may be specified as: + - An instance of :class:`plotly.graph_objs.heatmap.ColorBar` + - A dict of string/value properties that will be passed + to the ColorBar constructor + + Returns + ------- + plotly.graph_objs.heatmap.ColorBar + """ + return self["colorbar"] + + @colorbar.setter + def colorbar(self, val): + self["colorbar"] = val + + @property + def colorscale(self): + """ + Sets the colorscale. The colorscale must be an array containing + arrays mapping a normalized value to an rgb, rgba, hex, hsl, + hsv, or named color string. At minimum, a mapping for the + lowest (0) and highest (1) values are required. For example, + `[[0, 'rgb(0,0,255)'], [1, 'rgb(255,0,0)']]`. To control the + bounds of the colorscale in color space, use `zmin` and `zmax`. + Alternatively, `colorscale` may be a palette name string of the + following list: Blackbody,Bluered,Blues,Cividis,Earth,Electric, + Greens,Greys,Hot,Jet,Picnic,Portland,Rainbow,RdBu,Reds,Viridis, + YlGnBu,YlOrRd. + + The 'colorscale' property is a colorscale and may be + specified as: + - A list of colors that will be spaced evenly to create the colorscale. + Many predefined colorscale lists are included in the sequential, diverging, + and cyclical modules in the plotly.colors package. + - A list of 2-element lists where the first element is the + normalized color level value (starting at 0 and ending at 1), + and the second item is a valid color string. + (e.g. [[0, 'green'], [0.5, 'red'], [1.0, 'rgb(0, 0, 255)']]) + - One of the following named colorscales: + ['aggrnyl', 'agsunset', 'algae', 'amp', 'armyrose', 'balance', + 'blackbody', 'bluered', 'blues', 'blugrn', 'bluyl', 'brbg', + 'brwnyl', 'bugn', 'bupu', 'burg', 'burgyl', 'cividis', 'curl', + 'darkmint', 'deep', 'delta', 'dense', 'earth', 'edge', 'electric', + 'emrld', 'fall', 'geyser', 'gnbu', 'gray', 'greens', 'greys', + 'haline', 'hot', 'hsv', 'ice', 'icefire', 'inferno', 'jet', + 'magenta', 'magma', 'matter', 'mint', 'mrybm', 'mygbm', 'oranges', + 'orrd', 'oryel', 'oxy', 'peach', 'phase', 'picnic', 'pinkyl', + 'piyg', 'plasma', 'plotly3', 'portland', 'prgn', 'pubu', 'pubugn', + 'puor', 'purd', 'purp', 'purples', 'purpor', 'rainbow', 'rdbu', + 'rdgy', 'rdpu', 'rdylbu', 'rdylgn', 'redor', 'reds', 'solar', + 'spectral', 'speed', 'sunset', 'sunsetdark', 'teal', 'tealgrn', + 'tealrose', 'tempo', 'temps', 'thermal', 'tropic', 'turbid', + 'turbo', 'twilight', 'viridis', 'ylgn', 'ylgnbu', 'ylorbr', + 'ylorrd']. + Appending '_r' to a named colorscale reverses it. + + Returns + ------- + str + """ + return self["colorscale"] + + @colorscale.setter + def colorscale(self, val): + self["colorscale"] = val + + @property + def connectgaps(self): + """ + Determines whether or not gaps (i.e. {nan} or missing values) + in the `z` data are filled in. It is defaulted to true if `z` + is a one dimensional array and `zsmooth` is not false; + otherwise it is defaulted to false. + + The 'connectgaps' property is a boolean and must be specified as: + - A boolean value: True or False + + Returns + ------- + bool + """ + return self["connectgaps"] + + @connectgaps.setter + def connectgaps(self, val): + self["connectgaps"] = val + + @property + def customdata(self): + """ + Assigns extra data each datum. This may be useful when + listening to hover, click and selection events. Note that, + "scatter" traces also appends customdata items in the markers + DOM elements + + The 'customdata' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["customdata"] + + @customdata.setter + def customdata(self, val): + self["customdata"] = val + + @property + def customdatasrc(self): + """ + Sets the source reference on Chart Studio Cloud for + `customdata`. + + The 'customdatasrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["customdatasrc"] + + @customdatasrc.setter + def customdatasrc(self, val): + self["customdatasrc"] = val + + @property + def dx(self): + """ + Sets the x coordinate step. See `x0` for more info. + + The 'dx' property is a number and may be specified as: + - An int or float + + Returns + ------- + int|float + """ + return self["dx"] + + @dx.setter + def dx(self, val): + self["dx"] = val + + @property + def dy(self): + """ + Sets the y coordinate step. See `y0` for more info. + + The 'dy' property is a number and may be specified as: + - An int or float + + Returns + ------- + int|float + """ + return self["dy"] + + @dy.setter + def dy(self, val): + self["dy"] = val + + @property + def hoverinfo(self): + """ + Determines which trace information appear on hover. If `none` + or `skip` are set, no information is displayed upon hovering. + But, if `none` is set, click and hover events are still fired. + + The 'hoverinfo' property is a flaglist and may be specified + as a string containing: + - Any combination of ['x', 'y', 'z', 'text', 'name'] joined with '+' characters + (e.g. 'x+y') + OR exactly one of ['all', 'none', 'skip'] (e.g. 'skip') + - A list or array of the above + + Returns + ------- + Any|numpy.ndarray + """ + return self["hoverinfo"] + + @hoverinfo.setter + def hoverinfo(self, val): + self["hoverinfo"] = val + + @property + def hoverinfosrc(self): + """ + Sets the source reference on Chart Studio Cloud for + `hoverinfo`. + + The 'hoverinfosrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["hoverinfosrc"] + + @hoverinfosrc.setter + def hoverinfosrc(self, val): + self["hoverinfosrc"] = val + + @property + def hoverlabel(self): + """ + The 'hoverlabel' property is an instance of Hoverlabel + that may be specified as: + - An instance of :class:`plotly.graph_objs.heatmap.Hoverlabel` + - A dict of string/value properties that will be passed + to the Hoverlabel constructor + + Returns + ------- + plotly.graph_objs.heatmap.Hoverlabel + """ + return self["hoverlabel"] + + @hoverlabel.setter + def hoverlabel(self, val): + self["hoverlabel"] = val + + @property + def hoverongaps(self): + """ + Determines whether or not gaps (i.e. {nan} or missing values) + in the `z` data have hover labels associated with them. + + The 'hoverongaps' property is a boolean and must be specified as: + - A boolean value: True or False + + Returns + ------- + bool + """ + return self["hoverongaps"] + + @hoverongaps.setter + def hoverongaps(self, val): + self["hoverongaps"] = val + + @property + def hovertemplate(self): + """ + Template string used for rendering the information that appear + on hover box. Note that this will override `hoverinfo`. + Variables are inserted using %{variable}, for example "y: %{y}" + as well as %{xother}, {%_xother}, {%_xother_}, {%xother_}. When + showing info for several points, "xother" will be added to + those with different x positions from the first point. An + underscore before or after "(x|y)other" will add a space on + that side, only when this field is shown. Numbers are formatted + using d3-format's syntax %{variable:d3-format}, for example + "Price: %{y:$.2f}". + https://github.com/d3/d3-format/tree/v1.4.5#d3-format for + details on the formatting syntax. Dates are formatted using + d3-time-format's syntax %{variable|d3-time-format}, for example + "Day: %{2019-01-01|%A}". https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format for details on the date + formatting syntax. Variables that can't be found will be + replaced with the specifier. For example, a template of "data: + %{x}, %{y}" will result in a value of "data: 1, %{y}" if x is 1 + and y is missing. Variables with an undefined value will be + replaced with the fallback value. The variables available in + `hovertemplate` are the ones emitted as event data described at + this link https://plotly.com/javascript/plotlyjs-events/#event- + data. Additionally, all attributes that can be specified per- + point (the ones that are `arrayOk: true`) are available. + Anything contained in tag `` is displayed in the + secondary box, for example `%{fullData.name}`. + To hide the secondary box completely, use an empty tag + ``. + + The 'hovertemplate' property is a string and must be specified as: + - A string + - A number that will be converted to a string + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["hovertemplate"] + + @hovertemplate.setter + def hovertemplate(self, val): + self["hovertemplate"] = val + + @property + def hovertemplatefallback(self): + """ + Fallback string that's displayed when a variable referenced in + a template is missing. If the boolean value 'false' is passed + in, the specifier with the missing variable will be displayed. + + The 'hovertemplatefallback' property accepts values of any type + + Returns + ------- + Any + """ + return self["hovertemplatefallback"] + + @hovertemplatefallback.setter + def hovertemplatefallback(self, val): + self["hovertemplatefallback"] = val + + @property + def hovertemplatesrc(self): + """ + Sets the source reference on Chart Studio Cloud for + `hovertemplate`. + + The 'hovertemplatesrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["hovertemplatesrc"] + + @hovertemplatesrc.setter + def hovertemplatesrc(self, val): + self["hovertemplatesrc"] = val + + @property + def hovertext(self): + """ + Same as `text`. + + The 'hovertext' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["hovertext"] + + @hovertext.setter + def hovertext(self, val): + self["hovertext"] = val + + @property + def hovertextsrc(self): + """ + Sets the source reference on Chart Studio Cloud for + `hovertext`. + + The 'hovertextsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["hovertextsrc"] + + @hovertextsrc.setter + def hovertextsrc(self, val): + self["hovertextsrc"] = val + + @property + def ids(self): + """ + Assigns id labels to each datum. These ids for object constancy + of data points during animation. Should be an array of strings, + not numbers or any other type. + + The 'ids' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["ids"] + + @ids.setter + def ids(self, val): + self["ids"] = val + + @property + def idssrc(self): + """ + Sets the source reference on Chart Studio Cloud for `ids`. + + The 'idssrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["idssrc"] + + @idssrc.setter + def idssrc(self, val): + self["idssrc"] = val + + @property + def legend(self): + """ + Sets the reference to a legend to show this trace in. + References to these legends are "legend", "legend2", "legend3", + etc. Settings for these legends are set in the layout, under + `layout.legend`, `layout.legend2`, etc. + + The 'legend' property is an identifier of a particular + subplot, of type 'legend', that may be specified as: + - the string 'legend' optionally followed by an integer >= 1 + (e.g. 'legend', 'legend1', 'legend2', 'legend3', etc.) + + Returns + ------- + str + """ + return self["legend"] + + @legend.setter + def legend(self, val): + self["legend"] = val + + @property + def legendgroup(self): + """ + Sets the legend group for this trace. Traces and shapes part of + the same legend group hide/show at the same time when toggling + legend items. + + The 'legendgroup' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["legendgroup"] + + @legendgroup.setter + def legendgroup(self, val): + self["legendgroup"] = val + + @property + def legendgrouptitle(self): + """ + The 'legendgrouptitle' property is an instance of Legendgrouptitle + that may be specified as: + - An instance of :class:`plotly.graph_objs.heatmap.Legendgrouptitle` + - A dict of string/value properties that will be passed + to the Legendgrouptitle constructor + + Returns + ------- + plotly.graph_objs.heatmap.Legendgrouptitle + """ + return self["legendgrouptitle"] + + @legendgrouptitle.setter + def legendgrouptitle(self, val): + self["legendgrouptitle"] = val + + @property + def legendrank(self): + """ + Sets the legend rank for this trace. Items and groups with + smaller ranks are presented on top/left side while with + "reversed" `legend.traceorder` they are on bottom/right side. + The default legendrank is 1000, so that you can use ranks less + than 1000 to place certain items before all unranked items, and + ranks greater than 1000 to go after all unranked items. When + having unranked or equal rank items shapes would be displayed + after traces i.e. according to their order in data and layout. + + The 'legendrank' property is a number and may be specified as: + - An int or float + + Returns + ------- + int|float + """ + return self["legendrank"] + + @legendrank.setter + def legendrank(self, val): + self["legendrank"] = val + + @property + def legendwidth(self): + """ + Sets the width (in px or fraction) of the legend for this + trace. + + The 'legendwidth' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["legendwidth"] + + @legendwidth.setter + def legendwidth(self, val): + self["legendwidth"] = val + + @property + def meta(self): + """ + Assigns extra meta information associated with this trace that + can be used in various text attributes. Attributes such as + trace `name`, graph, axis and colorbar `title.text`, annotation + `text` `rangeselector`, `updatemenues` and `sliders` `label` + text all support `meta`. To access the trace `meta` values in + an attribute in the same trace, simply use `%{meta[i]}` where + `i` is the index or key of the `meta` item in question. To + access trace `meta` in layout attributes, use + `%{data[n[.meta[i]}` where `i` is the index or key of the + `meta` and `n` is the trace index. + + The 'meta' property accepts values of any type + + Returns + ------- + Any|numpy.ndarray + """ + return self["meta"] + + @meta.setter + def meta(self, val): + self["meta"] = val + + @property + def metasrc(self): + """ + Sets the source reference on Chart Studio Cloud for `meta`. + + The 'metasrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["metasrc"] + + @metasrc.setter + def metasrc(self, val): + self["metasrc"] = val + + @property + def name(self): + """ + Sets the trace name. The trace name appears as the legend item + and on hover. + + The 'name' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["name"] + + @name.setter + def name(self, val): + self["name"] = val + + @property + def opacity(self): + """ + Sets the opacity of the trace. + + The 'opacity' property is a number and may be specified as: + - An int or float in the interval [0, 1] + + Returns + ------- + int|float + """ + return self["opacity"] + + @opacity.setter + def opacity(self, val): + self["opacity"] = val + + @property + def reversescale(self): + """ + Reverses the color mapping if true. If true, `zmin` will + correspond to the last color in the array and `zmax` will + correspond to the first color. + + The 'reversescale' property is a boolean and must be specified as: + - A boolean value: True or False + + Returns + ------- + bool + """ + return self["reversescale"] + + @reversescale.setter + def reversescale(self, val): + self["reversescale"] = val + + @property + def showlegend(self): + """ + Determines whether or not an item corresponding to this trace + is shown in the legend. + + The 'showlegend' property is a boolean and must be specified as: + - A boolean value: True or False + + Returns + ------- + bool + """ + return self["showlegend"] + + @showlegend.setter + def showlegend(self, val): + self["showlegend"] = val + + @property + def showscale(self): + """ + Determines whether or not a colorbar is displayed for this + trace. + + The 'showscale' property is a boolean and must be specified as: + - A boolean value: True or False + + Returns + ------- + bool + """ + return self["showscale"] + + @showscale.setter + def showscale(self, val): + self["showscale"] = val + + @property + def stream(self): + """ + The 'stream' property is an instance of Stream + that may be specified as: + - An instance of :class:`plotly.graph_objs.heatmap.Stream` + - A dict of string/value properties that will be passed + to the Stream constructor + + Returns + ------- + plotly.graph_objs.heatmap.Stream + """ + return self["stream"] + + @stream.setter + def stream(self, val): + self["stream"] = val + + @property + def text(self): + """ + Sets the text elements associated with each z value. + + The 'text' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["text"] + + @text.setter + def text(self, val): + self["text"] = val + + @property + def textfont(self): + """ + Sets the text font. + + The 'textfont' property is an instance of Textfont + that may be specified as: + - An instance of :class:`plotly.graph_objs.heatmap.Textfont` + - A dict of string/value properties that will be passed + to the Textfont constructor + + Returns + ------- + plotly.graph_objs.heatmap.Textfont + """ + return self["textfont"] + + @textfont.setter + def textfont(self, val): + self["textfont"] = val + + @property + def textsrc(self): + """ + Sets the source reference on Chart Studio Cloud for `text`. + + The 'textsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["textsrc"] + + @textsrc.setter + def textsrc(self, val): + self["textsrc"] = val + + @property + def texttemplate(self): + """ + Template string used for rendering the information text that + appears on points. Note that this will override `textinfo`. + Variables are inserted using %{variable}, for example "y: + %{y}". Numbers are formatted using d3-format's syntax + %{variable:d3-format}, for example "Price: %{y:$.2f}". + https://github.com/d3/d3-format/tree/v1.4.5#d3-format for + details on the formatting syntax. Dates are formatted using + d3-time-format's syntax %{variable|d3-time-format}, for example + "Day: %{2019-01-01|%A}". https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format for details on the date + formatting syntax. Variables that can't be found will be + replaced with the specifier. For example, a template of "data: + %{x}, %{y}" will result in a value of "data: 1, %{y}" if x is 1 + and y is missing. Variables with an undefined value will be + replaced with the fallback value. All attributes that can be + specified per-point (the ones that are `arrayOk: true`) are + available. Finally, the template string has access to variables + `x`, `y`, `z` and `text`. + + The 'texttemplate' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["texttemplate"] + + @texttemplate.setter + def texttemplate(self, val): + self["texttemplate"] = val + + @property + def texttemplatefallback(self): + """ + Fallback string that's displayed when a variable referenced in + a template is missing. If the boolean value 'false' is passed + in, the specifier with the missing variable will be displayed. + + The 'texttemplatefallback' property accepts values of any type + + Returns + ------- + Any + """ + return self["texttemplatefallback"] + + @texttemplatefallback.setter + def texttemplatefallback(self, val): + self["texttemplatefallback"] = val + + @property + def transpose(self): + """ + Transposes the z data. + + The 'transpose' property is a boolean and must be specified as: + - A boolean value: True or False + + Returns + ------- + bool + """ + return self["transpose"] + + @transpose.setter + def transpose(self, val): + self["transpose"] = val + + @property + def uid(self): + """ + Assign an id to this trace, Use this to provide object + constancy between traces during animations and transitions. + + The 'uid' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["uid"] + + @uid.setter + def uid(self, val): + self["uid"] = val + + @property + def uirevision(self): + """ + Controls persistence of some user-driven changes to the trace: + `constraintrange` in `parcoords` traces, as well as some + `editable: true` modifications such as `name` and + `colorbar.title`. Defaults to `layout.uirevision`. Note that + other user-driven trace attribute changes are controlled by + `layout` attributes: `trace.visible` is controlled by + `layout.legend.uirevision`, `selectedpoints` is controlled by + `layout.selectionrevision`, and `colorbar.(x|y)` (accessible + with `config: {editable: true}`) is controlled by + `layout.editrevision`. Trace changes are tracked by `uid`, + which only falls back on trace index if no `uid` is provided. + So if your app can add/remove traces before the end of the + `data` array, such that the same trace has a different index, + you can still preserve user-driven changes if you give each + trace a `uid` that stays with it as it moves. + + The 'uirevision' property accepts values of any type + + Returns + ------- + Any + """ + return self["uirevision"] + + @uirevision.setter + def uirevision(self, val): + self["uirevision"] = val + + @property + def visible(self): + """ + Determines whether or not this trace is visible. If + "legendonly", the trace is not drawn, but can appear as a + legend item (provided that the legend itself is visible). + + The 'visible' property is an enumeration that may be specified as: + - One of the following enumeration values: + [True, False, 'legendonly'] + + Returns + ------- + Any + """ + return self["visible"] + + @visible.setter + def visible(self, val): + self["visible"] = val + + @property + def x(self): + """ + Sets the x coordinates. + + The 'x' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["x"] + + @x.setter + def x(self, val): + self["x"] = val + + @property + def x0(self): + """ + Alternate to `x`. Builds a linear space of x coordinates. Use + with `dx` where `x0` is the starting coordinate and `dx` the + step. + + The 'x0' property accepts values of any type + + Returns + ------- + Any + """ + return self["x0"] + + @x0.setter + def x0(self, val): + self["x0"] = val + + @property + def xaxis(self): + """ + Sets a reference between this trace's x coordinates and a 2D + cartesian x axis. If "x" (the default value), the x coordinates + refer to `layout.xaxis`. If "x2", the x coordinates refer to + `layout.xaxis2`, and so on. + + The 'xaxis' property is an identifier of a particular + subplot, of type 'x', that may be specified as: + - the string 'x' optionally followed by an integer >= 1 + (e.g. 'x', 'x1', 'x2', 'x3', etc.) + + Returns + ------- + str + """ + return self["xaxis"] + + @xaxis.setter + def xaxis(self, val): + self["xaxis"] = val + + @property + def xcalendar(self): + """ + Sets the calendar system to use with `x` date data. + + The 'xcalendar' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['chinese', 'coptic', 'discworld', 'ethiopian', + 'gregorian', 'hebrew', 'islamic', 'jalali', 'julian', + 'mayan', 'nanakshahi', 'nepali', 'persian', 'taiwan', + 'thai', 'ummalqura'] + + Returns + ------- + Any + """ + return self["xcalendar"] + + @xcalendar.setter + def xcalendar(self, val): + self["xcalendar"] = val + + @property + def xgap(self): + """ + Sets the horizontal gap (in pixels) between bricks. + + The 'xgap' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["xgap"] + + @xgap.setter + def xgap(self, val): + self["xgap"] = val + + @property + def xhoverformat(self): + """ + Sets the hover text formatting rulefor `x` using d3 formatting + mini-languages which are very similar to those in Python. For + numbers, see: + https://github.com/d3/d3-format/tree/v1.4.5#d3-format. And for + dates see: https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format. We add two items to d3's date + formatter: "%h" for half of the year as a decimal number as + well as "%{n}f" for fractional seconds with n digits. For + example, *2016-10-13 09:15:23.456* with tickformat + "%H~%M~%S.%2f" would display *09~15~23.46*By default the values + are formatted using `xaxis.hoverformat`. + + The 'xhoverformat' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["xhoverformat"] + + @xhoverformat.setter + def xhoverformat(self, val): + self["xhoverformat"] = val + + @property + def xperiod(self): + """ + Only relevant when the axis `type` is "date". Sets the period + positioning in milliseconds or "M" on the x axis. Special + values in the form of "M" could be used to declare the + number of months. In this case `n` must be a positive integer. + + The 'xperiod' property accepts values of any type + + Returns + ------- + Any + """ + return self["xperiod"] + + @xperiod.setter + def xperiod(self, val): + self["xperiod"] = val + + @property + def xperiod0(self): + """ + Only relevant when the axis `type` is "date". Sets the base for + period positioning in milliseconds or date string on the x0 + axis. When `x0period` is round number of weeks, the `x0period0` + by default would be on a Sunday i.e. 2000-01-02, otherwise it + would be at 2000-01-01. + + The 'xperiod0' property accepts values of any type + + Returns + ------- + Any + """ + return self["xperiod0"] + + @xperiod0.setter + def xperiod0(self, val): + self["xperiod0"] = val + + @property + def xperiodalignment(self): + """ + Only relevant when the axis `type` is "date". Sets the + alignment of data points on the x axis. + + The 'xperiodalignment' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['start', 'middle', 'end'] + + Returns + ------- + Any + """ + return self["xperiodalignment"] + + @xperiodalignment.setter + def xperiodalignment(self, val): + self["xperiodalignment"] = val + + @property + def xsrc(self): + """ + Sets the source reference on Chart Studio Cloud for `x`. + + The 'xsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["xsrc"] + + @xsrc.setter + def xsrc(self, val): + self["xsrc"] = val + + @property + def xtype(self): + """ + If "array", the heatmap's x coordinates are given by "x" (the + default behavior when `x` is provided). If "scaled", the + heatmap's x coordinates are given by "x0" and "dx" (the default + behavior when `x` is not provided). + + The 'xtype' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['array', 'scaled'] + + Returns + ------- + Any + """ + return self["xtype"] + + @xtype.setter + def xtype(self, val): + self["xtype"] = val + + @property + def y(self): + """ + Sets the y coordinates. + + The 'y' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["y"] + + @y.setter + def y(self, val): + self["y"] = val + + @property + def y0(self): + """ + Alternate to `y`. Builds a linear space of y coordinates. Use + with `dy` where `y0` is the starting coordinate and `dy` the + step. + + The 'y0' property accepts values of any type + + Returns + ------- + Any + """ + return self["y0"] + + @y0.setter + def y0(self, val): + self["y0"] = val + + @property + def yaxis(self): + """ + Sets a reference between this trace's y coordinates and a 2D + cartesian y axis. If "y" (the default value), the y coordinates + refer to `layout.yaxis`. If "y2", the y coordinates refer to + `layout.yaxis2`, and so on. + + The 'yaxis' property is an identifier of a particular + subplot, of type 'y', that may be specified as: + - the string 'y' optionally followed by an integer >= 1 + (e.g. 'y', 'y1', 'y2', 'y3', etc.) + + Returns + ------- + str + """ + return self["yaxis"] + + @yaxis.setter + def yaxis(self, val): + self["yaxis"] = val + + @property + def ycalendar(self): + """ + Sets the calendar system to use with `y` date data. + + The 'ycalendar' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['chinese', 'coptic', 'discworld', 'ethiopian', + 'gregorian', 'hebrew', 'islamic', 'jalali', 'julian', + 'mayan', 'nanakshahi', 'nepali', 'persian', 'taiwan', + 'thai', 'ummalqura'] + + Returns + ------- + Any + """ + return self["ycalendar"] + + @ycalendar.setter + def ycalendar(self, val): + self["ycalendar"] = val + + @property + def ygap(self): + """ + Sets the vertical gap (in pixels) between bricks. + + The 'ygap' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["ygap"] + + @ygap.setter + def ygap(self, val): + self["ygap"] = val + + @property + def yhoverformat(self): + """ + Sets the hover text formatting rulefor `y` using d3 formatting + mini-languages which are very similar to those in Python. For + numbers, see: + https://github.com/d3/d3-format/tree/v1.4.5#d3-format. And for + dates see: https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format. We add two items to d3's date + formatter: "%h" for half of the year as a decimal number as + well as "%{n}f" for fractional seconds with n digits. For + example, *2016-10-13 09:15:23.456* with tickformat + "%H~%M~%S.%2f" would display *09~15~23.46*By default the values + are formatted using `yaxis.hoverformat`. + + The 'yhoverformat' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["yhoverformat"] + + @yhoverformat.setter + def yhoverformat(self, val): + self["yhoverformat"] = val + + @property + def yperiod(self): + """ + Only relevant when the axis `type` is "date". Sets the period + positioning in milliseconds or "M" on the y axis. Special + values in the form of "M" could be used to declare the + number of months. In this case `n` must be a positive integer. + + The 'yperiod' property accepts values of any type + + Returns + ------- + Any + """ + return self["yperiod"] + + @yperiod.setter + def yperiod(self, val): + self["yperiod"] = val + + @property + def yperiod0(self): + """ + Only relevant when the axis `type` is "date". Sets the base for + period positioning in milliseconds or date string on the y0 + axis. When `y0period` is round number of weeks, the `y0period0` + by default would be on a Sunday i.e. 2000-01-02, otherwise it + would be at 2000-01-01. + + The 'yperiod0' property accepts values of any type + + Returns + ------- + Any + """ + return self["yperiod0"] + + @yperiod0.setter + def yperiod0(self, val): + self["yperiod0"] = val + + @property + def yperiodalignment(self): + """ + Only relevant when the axis `type` is "date". Sets the + alignment of data points on the y axis. + + The 'yperiodalignment' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['start', 'middle', 'end'] + + Returns + ------- + Any + """ + return self["yperiodalignment"] + + @yperiodalignment.setter + def yperiodalignment(self, val): + self["yperiodalignment"] = val + + @property + def ysrc(self): + """ + Sets the source reference on Chart Studio Cloud for `y`. + + The 'ysrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["ysrc"] + + @ysrc.setter + def ysrc(self, val): + self["ysrc"] = val + + @property + def ytype(self): + """ + If "array", the heatmap's y coordinates are given by "y" (the + default behavior when `y` is provided) If "scaled", the + heatmap's y coordinates are given by "y0" and "dy" (the default + behavior when `y` is not provided) + + The 'ytype' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['array', 'scaled'] + + Returns + ------- + Any + """ + return self["ytype"] + + @ytype.setter + def ytype(self, val): + self["ytype"] = val + + @property + def z(self): + """ + Sets the z data. + + The 'z' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["z"] + + @z.setter + def z(self, val): + self["z"] = val + + @property + def zauto(self): + """ + Determines whether or not the color domain is computed with + respect to the input data (here in `z`) or the bounds set in + `zmin` and `zmax` Defaults to `false` when `zmin` and `zmax` + are set by the user. + + The 'zauto' property is a boolean and must be specified as: + - A boolean value: True or False + + Returns + ------- + bool + """ + return self["zauto"] + + @zauto.setter + def zauto(self, val): + self["zauto"] = val + + @property + def zhoverformat(self): + """ + Sets the hover text formatting rulefor `z` using d3 formatting + mini-languages which are very similar to those in Python. For + numbers, see: + https://github.com/d3/d3-format/tree/v1.4.5#d3-format.By + default the values are formatted using generic number format. + + The 'zhoverformat' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["zhoverformat"] + + @zhoverformat.setter + def zhoverformat(self, val): + self["zhoverformat"] = val + + @property + def zmax(self): + """ + Sets the upper bound of the color domain. Value should have the + same units as in `z` and if set, `zmin` must be set as well. + + The 'zmax' property is a number and may be specified as: + - An int or float + + Returns + ------- + int|float + """ + return self["zmax"] + + @zmax.setter + def zmax(self, val): + self["zmax"] = val + + @property + def zmid(self): + """ + Sets the mid-point of the color domain by scaling `zmin` and/or + `zmax` to be equidistant to this point. Value should have the + same units as in `z`. Has no effect when `zauto` is `false`. + + The 'zmid' property is a number and may be specified as: + - An int or float + + Returns + ------- + int|float + """ + return self["zmid"] + + @zmid.setter + def zmid(self, val): + self["zmid"] = val + + @property + def zmin(self): + """ + Sets the lower bound of the color domain. Value should have the + same units as in `z` and if set, `zmax` must be set as well. + + The 'zmin' property is a number and may be specified as: + - An int or float + + Returns + ------- + int|float + """ + return self["zmin"] + + @zmin.setter + def zmin(self, val): + self["zmin"] = val + + @property + def zorder(self): + """ + Sets the layer on which this trace is displayed, relative to + other SVG traces on the same subplot. SVG traces with higher + `zorder` appear in front of those with lower `zorder`. + + The 'zorder' property is a integer and may be specified as: + - An int (or float that will be cast to an int) + + Returns + ------- + int + """ + return self["zorder"] + + @zorder.setter + def zorder(self, val): + self["zorder"] = val + + @property + def zsmooth(self): + """ + Picks a smoothing algorithm use to smooth `z` data. + + The 'zsmooth' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['fast', 'best', False] + + Returns + ------- + Any + """ + return self["zsmooth"] + + @zsmooth.setter + def zsmooth(self, val): + self["zsmooth"] = val + + @property + def zsrc(self): + """ + Sets the source reference on Chart Studio Cloud for `z`. + + The 'zsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["zsrc"] + + @zsrc.setter + def zsrc(self, val): + self["zsrc"] = val + + @property + def type(self): + return self._props["type"] + + @property + def _prop_descriptions(self): + return """\ + autocolorscale + Determines whether the colorscale is a default palette + (`autocolorscale: true`) or the palette determined by + `colorscale`. In case `colorscale` is unspecified or + `autocolorscale` is true, the default palette will be + chosen according to whether numbers in the `color` + array are all positive, all negative or mixed. + coloraxis + Sets a reference to a shared color axis. References to + these shared color axes are "coloraxis", "coloraxis2", + "coloraxis3", etc. Settings for these shared color axes + are set in the layout, under `layout.coloraxis`, + `layout.coloraxis2`, etc. Note that multiple color + scales can be linked to the same color axis. + colorbar + :class:`plotly.graph_objects.heatmap.ColorBar` instance + or dict with compatible properties + colorscale + Sets the colorscale. The colorscale must be an array + containing arrays mapping a normalized value to an rgb, + rgba, hex, hsl, hsv, or named color string. At minimum, + a mapping for the lowest (0) and highest (1) values are + required. For example, `[[0, 'rgb(0,0,255)'], [1, + 'rgb(255,0,0)']]`. To control the bounds of the + colorscale in color space, use `zmin` and `zmax`. + Alternatively, `colorscale` may be a palette name + string of the following list: Blackbody,Bluered,Blues,C + ividis,Earth,Electric,Greens,Greys,Hot,Jet,Picnic,Portl + and,Rainbow,RdBu,Reds,Viridis,YlGnBu,YlOrRd. + connectgaps + Determines whether or not gaps (i.e. {nan} or missing + values) in the `z` data are filled in. It is defaulted + to true if `z` is a one dimensional array and `zsmooth` + is not false; otherwise it is defaulted to false. + customdata + Assigns extra data each datum. This may be useful when + listening to hover, click and selection events. Note + that, "scatter" traces also appends customdata items in + the markers DOM elements + customdatasrc + Sets the source reference on Chart Studio Cloud for + `customdata`. + dx + Sets the x coordinate step. See `x0` for more info. + dy + Sets the y coordinate step. See `y0` for more info. + hoverinfo + Determines which trace information appear on hover. If + `none` or `skip` are set, no information is displayed + upon hovering. But, if `none` is set, click and hover + events are still fired. + hoverinfosrc + Sets the source reference on Chart Studio Cloud for + `hoverinfo`. + hoverlabel + :class:`plotly.graph_objects.heatmap.Hoverlabel` + instance or dict with compatible properties + hoverongaps + Determines whether or not gaps (i.e. {nan} or missing + values) in the `z` data have hover labels associated + with them. + hovertemplate + Template string used for rendering the information that + appear on hover box. Note that this will override + `hoverinfo`. Variables are inserted using %{variable}, + for example "y: %{y}" as well as %{xother}, {%_xother}, + {%_xother_}, {%xother_}. When showing info for several + points, "xother" will be added to those with different + x positions from the first point. An underscore before + or after "(x|y)other" will add a space on that side, + only when this field is shown. Numbers are formatted + using d3-format's syntax %{variable:d3-format}, for + example "Price: %{y:$.2f}". + https://github.com/d3/d3-format/tree/v1.4.5#d3-format + for details on the formatting syntax. Dates are + formatted using d3-time-format's syntax + %{variable|d3-time-format}, for example "Day: + %{2019-01-01|%A}". https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format for details on the + date formatting syntax. Variables that can't be found + will be replaced with the specifier. For example, a + template of "data: %{x}, %{y}" will result in a value + of "data: 1, %{y}" if x is 1 and y is missing. + Variables with an undefined value will be replaced with + the fallback value. The variables available in + `hovertemplate` are the ones emitted as event data + described at this link + https://plotly.com/javascript/plotlyjs-events/#event- + data. Additionally, all attributes that can be + specified per-point (the ones that are `arrayOk: true`) + are available. Anything contained in tag `` is + displayed in the secondary box, for example + `%{fullData.name}`. To hide the + secondary box completely, use an empty tag + ``. + hovertemplatefallback + Fallback string that's displayed when a variable + referenced in a template is missing. If the boolean + value 'false' is passed in, the specifier with the + missing variable will be displayed. + hovertemplatesrc + Sets the source reference on Chart Studio Cloud for + `hovertemplate`. + hovertext + Same as `text`. + hovertextsrc + Sets the source reference on Chart Studio Cloud for + `hovertext`. + ids + Assigns id labels to each datum. These ids for object + constancy of data points during animation. Should be an + array of strings, not numbers or any other type. + idssrc + Sets the source reference on Chart Studio Cloud for + `ids`. + legend + Sets the reference to a legend to show this trace in. + References to these legends are "legend", "legend2", + "legend3", etc. Settings for these legends are set in + the layout, under `layout.legend`, `layout.legend2`, + etc. + legendgroup + Sets the legend group for this trace. Traces and shapes + part of the same legend group hide/show at the same + time when toggling legend items. + legendgrouptitle + :class:`plotly.graph_objects.heatmap.Legendgrouptitle` + instance or dict with compatible properties + legendrank + Sets the legend rank for this trace. Items and groups + with smaller ranks are presented on top/left side while + with "reversed" `legend.traceorder` they are on + bottom/right side. The default legendrank is 1000, so + that you can use ranks less than 1000 to place certain + items before all unranked items, and ranks greater than + 1000 to go after all unranked items. When having + unranked or equal rank items shapes would be displayed + after traces i.e. according to their order in data and + layout. + legendwidth + Sets the width (in px or fraction) of the legend for + this trace. + meta + Assigns extra meta information associated with this + trace that can be used in various text attributes. + Attributes such as trace `name`, graph, axis and + colorbar `title.text`, annotation `text` + `rangeselector`, `updatemenues` and `sliders` `label` + text all support `meta`. To access the trace `meta` + values in an attribute in the same trace, simply use + `%{meta[i]}` where `i` is the index or key of the + `meta` item in question. To access trace `meta` in + layout attributes, use `%{data[n[.meta[i]}` where `i` + is the index or key of the `meta` and `n` is the trace + index. + metasrc + Sets the source reference on Chart Studio Cloud for + `meta`. + name + Sets the trace name. The trace name appears as the + legend item and on hover. + opacity + Sets the opacity of the trace. + reversescale + Reverses the color mapping if true. If true, `zmin` + will correspond to the last color in the array and + `zmax` will correspond to the first color. + showlegend + Determines whether or not an item corresponding to this + trace is shown in the legend. + showscale + Determines whether or not a colorbar is displayed for + this trace. + stream + :class:`plotly.graph_objects.heatmap.Stream` instance + or dict with compatible properties + text + Sets the text elements associated with each z value. + textfont + Sets the text font. + textsrc + Sets the source reference on Chart Studio Cloud for + `text`. + texttemplate + Template string used for rendering the information text + that appears on points. Note that this will override + `textinfo`. Variables are inserted using %{variable}, + for example "y: %{y}". Numbers are formatted using + d3-format's syntax %{variable:d3-format}, for example + "Price: %{y:$.2f}". + https://github.com/d3/d3-format/tree/v1.4.5#d3-format + for details on the formatting syntax. Dates are + formatted using d3-time-format's syntax + %{variable|d3-time-format}, for example "Day: + %{2019-01-01|%A}". https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format for details on the + date formatting syntax. Variables that can't be found + will be replaced with the specifier. For example, a + template of "data: %{x}, %{y}" will result in a value + of "data: 1, %{y}" if x is 1 and y is missing. + Variables with an undefined value will be replaced with + the fallback value. All attributes that can be + specified per-point (the ones that are `arrayOk: true`) + are available. Finally, the template string has access + to variables `x`, `y`, `z` and `text`. + texttemplatefallback + Fallback string that's displayed when a variable + referenced in a template is missing. If the boolean + value 'false' is passed in, the specifier with the + missing variable will be displayed. + transpose + Transposes the z data. + uid + Assign an id to this trace, Use this to provide object + constancy between traces during animations and + transitions. + uirevision + Controls persistence of some user-driven changes to the + trace: `constraintrange` in `parcoords` traces, as well + as some `editable: true` modifications such as `name` + and `colorbar.title`. Defaults to `layout.uirevision`. + Note that other user-driven trace attribute changes are + controlled by `layout` attributes: `trace.visible` is + controlled by `layout.legend.uirevision`, + `selectedpoints` is controlled by + `layout.selectionrevision`, and `colorbar.(x|y)` + (accessible with `config: {editable: true}`) is + controlled by `layout.editrevision`. Trace changes are + tracked by `uid`, which only falls back on trace index + if no `uid` is provided. So if your app can add/remove + traces before the end of the `data` array, such that + the same trace has a different index, you can still + preserve user-driven changes if you give each trace a + `uid` that stays with it as it moves. + visible + Determines whether or not this trace is visible. If + "legendonly", the trace is not drawn, but can appear as + a legend item (provided that the legend itself is + visible). + x + Sets the x coordinates. + x0 + Alternate to `x`. Builds a linear space of x + coordinates. Use with `dx` where `x0` is the starting + coordinate and `dx` the step. + xaxis + Sets a reference between this trace's x coordinates and + a 2D cartesian x axis. If "x" (the default value), the + x coordinates refer to `layout.xaxis`. If "x2", the x + coordinates refer to `layout.xaxis2`, and so on. + xcalendar + Sets the calendar system to use with `x` date data. + xgap + Sets the horizontal gap (in pixels) between bricks. + xhoverformat + Sets the hover text formatting rulefor `x` using d3 + formatting mini-languages which are very similar to + those in Python. For numbers, see: + https://github.com/d3/d3-format/tree/v1.4.5#d3-format. + And for dates see: https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format. We add two items to + d3's date formatter: "%h" for half of the year as a + decimal number as well as "%{n}f" for fractional + seconds with n digits. For example, *2016-10-13 + 09:15:23.456* with tickformat "%H~%M~%S.%2f" would + display *09~15~23.46*By default the values are + formatted using `xaxis.hoverformat`. + xperiod + Only relevant when the axis `type` is "date". Sets the + period positioning in milliseconds or "M" on the x + axis. Special values in the form of "M" could be + used to declare the number of months. In this case `n` + must be a positive integer. + xperiod0 + Only relevant when the axis `type` is "date". Sets the + base for period positioning in milliseconds or date + string on the x0 axis. When `x0period` is round number + of weeks, the `x0period0` by default would be on a + Sunday i.e. 2000-01-02, otherwise it would be at + 2000-01-01. + xperiodalignment + Only relevant when the axis `type` is "date". Sets the + alignment of data points on the x axis. + xsrc + Sets the source reference on Chart Studio Cloud for + `x`. + xtype + If "array", the heatmap's x coordinates are given by + "x" (the default behavior when `x` is provided). If + "scaled", the heatmap's x coordinates are given by "x0" + and "dx" (the default behavior when `x` is not + provided). + y + Sets the y coordinates. + y0 + Alternate to `y`. Builds a linear space of y + coordinates. Use with `dy` where `y0` is the starting + coordinate and `dy` the step. + yaxis + Sets a reference between this trace's y coordinates and + a 2D cartesian y axis. If "y" (the default value), the + y coordinates refer to `layout.yaxis`. If "y2", the y + coordinates refer to `layout.yaxis2`, and so on. + ycalendar + Sets the calendar system to use with `y` date data. + ygap + Sets the vertical gap (in pixels) between bricks. + yhoverformat + Sets the hover text formatting rulefor `y` using d3 + formatting mini-languages which are very similar to + those in Python. For numbers, see: + https://github.com/d3/d3-format/tree/v1.4.5#d3-format. + And for dates see: https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format. We add two items to + d3's date formatter: "%h" for half of the year as a + decimal number as well as "%{n}f" for fractional + seconds with n digits. For example, *2016-10-13 + 09:15:23.456* with tickformat "%H~%M~%S.%2f" would + display *09~15~23.46*By default the values are + formatted using `yaxis.hoverformat`. + yperiod + Only relevant when the axis `type` is "date". Sets the + period positioning in milliseconds or "M" on the y + axis. Special values in the form of "M" could be + used to declare the number of months. In this case `n` + must be a positive integer. + yperiod0 + Only relevant when the axis `type` is "date". Sets the + base for period positioning in milliseconds or date + string on the y0 axis. When `y0period` is round number + of weeks, the `y0period0` by default would be on a + Sunday i.e. 2000-01-02, otherwise it would be at + 2000-01-01. + yperiodalignment + Only relevant when the axis `type` is "date". Sets the + alignment of data points on the y axis. + ysrc + Sets the source reference on Chart Studio Cloud for + `y`. + ytype + If "array", the heatmap's y coordinates are given by + "y" (the default behavior when `y` is provided) If + "scaled", the heatmap's y coordinates are given by "y0" + and "dy" (the default behavior when `y` is not + provided) + z + Sets the z data. + zauto + Determines whether or not the color domain is computed + with respect to the input data (here in `z`) or the + bounds set in `zmin` and `zmax` Defaults to `false` + when `zmin` and `zmax` are set by the user. + zhoverformat + Sets the hover text formatting rulefor `z` using d3 + formatting mini-languages which are very similar to + those in Python. For numbers, see: https://github.com/d + 3/d3-format/tree/v1.4.5#d3-format.By default the values + are formatted using generic number format. + zmax + Sets the upper bound of the color domain. Value should + have the same units as in `z` and if set, `zmin` must + be set as well. + zmid + Sets the mid-point of the color domain by scaling + `zmin` and/or `zmax` to be equidistant to this point. + Value should have the same units as in `z`. Has no + effect when `zauto` is `false`. + zmin + Sets the lower bound of the color domain. Value should + have the same units as in `z` and if set, `zmax` must + be set as well. + zorder + Sets the layer on which this trace is displayed, + relative to other SVG traces on the same subplot. SVG + traces with higher `zorder` appear in front of those + with lower `zorder`. + zsmooth + Picks a smoothing algorithm use to smooth `z` data. + zsrc + Sets the source reference on Chart Studio Cloud for + `z`. + """ + + def __init__( + self, + arg=None, + autocolorscale=None, + coloraxis=None, + colorbar=None, + colorscale=None, + connectgaps=None, + customdata=None, + customdatasrc=None, + dx=None, + dy=None, + hoverinfo=None, + hoverinfosrc=None, + hoverlabel=None, + hoverongaps=None, + hovertemplate=None, + hovertemplatefallback=None, + hovertemplatesrc=None, + hovertext=None, + hovertextsrc=None, + ids=None, + idssrc=None, + legend=None, + legendgroup=None, + legendgrouptitle=None, + legendrank=None, + legendwidth=None, + meta=None, + metasrc=None, + name=None, + opacity=None, + reversescale=None, + showlegend=None, + showscale=None, + stream=None, + text=None, + textfont=None, + textsrc=None, + texttemplate=None, + texttemplatefallback=None, + transpose=None, + uid=None, + uirevision=None, + visible=None, + x=None, + x0=None, + xaxis=None, + xcalendar=None, + xgap=None, + xhoverformat=None, + xperiod=None, + xperiod0=None, + xperiodalignment=None, + xsrc=None, + xtype=None, + y=None, + y0=None, + yaxis=None, + ycalendar=None, + ygap=None, + yhoverformat=None, + yperiod=None, + yperiod0=None, + yperiodalignment=None, + ysrc=None, + ytype=None, + z=None, + zauto=None, + zhoverformat=None, + zmax=None, + zmid=None, + zmin=None, + zorder=None, + zsmooth=None, + zsrc=None, + **kwargs, + ): + """ + Construct a new Heatmap object + + The data that describes the heatmap value-to-color mapping is + set in `z`. Data in `z` can either be a 2D list of values + (ragged or not) or a 1D array of values. In the case where `z` + is a 2D list, say that `z` has N rows and M columns. Then, by + default, the resulting heatmap will have N partitions along the + y axis and M partitions along the x axis. In other words, the + i-th row/ j-th column cell in `z` is mapped to the i-th + partition of the y axis (starting from the bottom of the plot) + and the j-th partition of the x-axis (starting from the left of + the plot). This behavior can be flipped by using `transpose`. + Moreover, `x` (`y`) can be provided with M or M+1 (N or N+1) + elements. If M (N), then the coordinates correspond to the + center of the heatmap cells and the cells have equal width. If + M+1 (N+1), then the coordinates correspond to the edges of the + heatmap cells. In the case where `z` is a 1D list, the x and y + coordinates must be provided in `x` and `y` respectively to + form data triplets. + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of :class:`plotly.graph_objs.Heatmap` + autocolorscale + Determines whether the colorscale is a default palette + (`autocolorscale: true`) or the palette determined by + `colorscale`. In case `colorscale` is unspecified or + `autocolorscale` is true, the default palette will be + chosen according to whether numbers in the `color` + array are all positive, all negative or mixed. + coloraxis + Sets a reference to a shared color axis. References to + these shared color axes are "coloraxis", "coloraxis2", + "coloraxis3", etc. Settings for these shared color axes + are set in the layout, under `layout.coloraxis`, + `layout.coloraxis2`, etc. Note that multiple color + scales can be linked to the same color axis. + colorbar + :class:`plotly.graph_objects.heatmap.ColorBar` instance + or dict with compatible properties + colorscale + Sets the colorscale. The colorscale must be an array + containing arrays mapping a normalized value to an rgb, + rgba, hex, hsl, hsv, or named color string. At minimum, + a mapping for the lowest (0) and highest (1) values are + required. For example, `[[0, 'rgb(0,0,255)'], [1, + 'rgb(255,0,0)']]`. To control the bounds of the + colorscale in color space, use `zmin` and `zmax`. + Alternatively, `colorscale` may be a palette name + string of the following list: Blackbody,Bluered,Blues,C + ividis,Earth,Electric,Greens,Greys,Hot,Jet,Picnic,Portl + and,Rainbow,RdBu,Reds,Viridis,YlGnBu,YlOrRd. + connectgaps + Determines whether or not gaps (i.e. {nan} or missing + values) in the `z` data are filled in. It is defaulted + to true if `z` is a one dimensional array and `zsmooth` + is not false; otherwise it is defaulted to false. + customdata + Assigns extra data each datum. This may be useful when + listening to hover, click and selection events. Note + that, "scatter" traces also appends customdata items in + the markers DOM elements + customdatasrc + Sets the source reference on Chart Studio Cloud for + `customdata`. + dx + Sets the x coordinate step. See `x0` for more info. + dy + Sets the y coordinate step. See `y0` for more info. + hoverinfo + Determines which trace information appear on hover. If + `none` or `skip` are set, no information is displayed + upon hovering. But, if `none` is set, click and hover + events are still fired. + hoverinfosrc + Sets the source reference on Chart Studio Cloud for + `hoverinfo`. + hoverlabel + :class:`plotly.graph_objects.heatmap.Hoverlabel` + instance or dict with compatible properties + hoverongaps + Determines whether or not gaps (i.e. {nan} or missing + values) in the `z` data have hover labels associated + with them. + hovertemplate + Template string used for rendering the information that + appear on hover box. Note that this will override + `hoverinfo`. Variables are inserted using %{variable}, + for example "y: %{y}" as well as %{xother}, {%_xother}, + {%_xother_}, {%xother_}. When showing info for several + points, "xother" will be added to those with different + x positions from the first point. An underscore before + or after "(x|y)other" will add a space on that side, + only when this field is shown. Numbers are formatted + using d3-format's syntax %{variable:d3-format}, for + example "Price: %{y:$.2f}". + https://github.com/d3/d3-format/tree/v1.4.5#d3-format + for details on the formatting syntax. Dates are + formatted using d3-time-format's syntax + %{variable|d3-time-format}, for example "Day: + %{2019-01-01|%A}". https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format for details on the + date formatting syntax. Variables that can't be found + will be replaced with the specifier. For example, a + template of "data: %{x}, %{y}" will result in a value + of "data: 1, %{y}" if x is 1 and y is missing. + Variables with an undefined value will be replaced with + the fallback value. The variables available in + `hovertemplate` are the ones emitted as event data + described at this link + https://plotly.com/javascript/plotlyjs-events/#event- + data. Additionally, all attributes that can be + specified per-point (the ones that are `arrayOk: true`) + are available. Anything contained in tag `` is + displayed in the secondary box, for example + `%{fullData.name}`. To hide the + secondary box completely, use an empty tag + ``. + hovertemplatefallback + Fallback string that's displayed when a variable + referenced in a template is missing. If the boolean + value 'false' is passed in, the specifier with the + missing variable will be displayed. + hovertemplatesrc + Sets the source reference on Chart Studio Cloud for + `hovertemplate`. + hovertext + Same as `text`. + hovertextsrc + Sets the source reference on Chart Studio Cloud for + `hovertext`. + ids + Assigns id labels to each datum. These ids for object + constancy of data points during animation. Should be an + array of strings, not numbers or any other type. + idssrc + Sets the source reference on Chart Studio Cloud for + `ids`. + legend + Sets the reference to a legend to show this trace in. + References to these legends are "legend", "legend2", + "legend3", etc. Settings for these legends are set in + the layout, under `layout.legend`, `layout.legend2`, + etc. + legendgroup + Sets the legend group for this trace. Traces and shapes + part of the same legend group hide/show at the same + time when toggling legend items. + legendgrouptitle + :class:`plotly.graph_objects.heatmap.Legendgrouptitle` + instance or dict with compatible properties + legendrank + Sets the legend rank for this trace. Items and groups + with smaller ranks are presented on top/left side while + with "reversed" `legend.traceorder` they are on + bottom/right side. The default legendrank is 1000, so + that you can use ranks less than 1000 to place certain + items before all unranked items, and ranks greater than + 1000 to go after all unranked items. When having + unranked or equal rank items shapes would be displayed + after traces i.e. according to their order in data and + layout. + legendwidth + Sets the width (in px or fraction) of the legend for + this trace. + meta + Assigns extra meta information associated with this + trace that can be used in various text attributes. + Attributes such as trace `name`, graph, axis and + colorbar `title.text`, annotation `text` + `rangeselector`, `updatemenues` and `sliders` `label` + text all support `meta`. To access the trace `meta` + values in an attribute in the same trace, simply use + `%{meta[i]}` where `i` is the index or key of the + `meta` item in question. To access trace `meta` in + layout attributes, use `%{data[n[.meta[i]}` where `i` + is the index or key of the `meta` and `n` is the trace + index. + metasrc + Sets the source reference on Chart Studio Cloud for + `meta`. + name + Sets the trace name. The trace name appears as the + legend item and on hover. + opacity + Sets the opacity of the trace. + reversescale + Reverses the color mapping if true. If true, `zmin` + will correspond to the last color in the array and + `zmax` will correspond to the first color. + showlegend + Determines whether or not an item corresponding to this + trace is shown in the legend. + showscale + Determines whether or not a colorbar is displayed for + this trace. + stream + :class:`plotly.graph_objects.heatmap.Stream` instance + or dict with compatible properties + text + Sets the text elements associated with each z value. + textfont + Sets the text font. + textsrc + Sets the source reference on Chart Studio Cloud for + `text`. + texttemplate + Template string used for rendering the information text + that appears on points. Note that this will override + `textinfo`. Variables are inserted using %{variable}, + for example "y: %{y}". Numbers are formatted using + d3-format's syntax %{variable:d3-format}, for example + "Price: %{y:$.2f}". + https://github.com/d3/d3-format/tree/v1.4.5#d3-format + for details on the formatting syntax. Dates are + formatted using d3-time-format's syntax + %{variable|d3-time-format}, for example "Day: + %{2019-01-01|%A}". https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format for details on the + date formatting syntax. Variables that can't be found + will be replaced with the specifier. For example, a + template of "data: %{x}, %{y}" will result in a value + of "data: 1, %{y}" if x is 1 and y is missing. + Variables with an undefined value will be replaced with + the fallback value. All attributes that can be + specified per-point (the ones that are `arrayOk: true`) + are available. Finally, the template string has access + to variables `x`, `y`, `z` and `text`. + texttemplatefallback + Fallback string that's displayed when a variable + referenced in a template is missing. If the boolean + value 'false' is passed in, the specifier with the + missing variable will be displayed. + transpose + Transposes the z data. + uid + Assign an id to this trace, Use this to provide object + constancy between traces during animations and + transitions. + uirevision + Controls persistence of some user-driven changes to the + trace: `constraintrange` in `parcoords` traces, as well + as some `editable: true` modifications such as `name` + and `colorbar.title`. Defaults to `layout.uirevision`. + Note that other user-driven trace attribute changes are + controlled by `layout` attributes: `trace.visible` is + controlled by `layout.legend.uirevision`, + `selectedpoints` is controlled by + `layout.selectionrevision`, and `colorbar.(x|y)` + (accessible with `config: {editable: true}`) is + controlled by `layout.editrevision`. Trace changes are + tracked by `uid`, which only falls back on trace index + if no `uid` is provided. So if your app can add/remove + traces before the end of the `data` array, such that + the same trace has a different index, you can still + preserve user-driven changes if you give each trace a + `uid` that stays with it as it moves. + visible + Determines whether or not this trace is visible. If + "legendonly", the trace is not drawn, but can appear as + a legend item (provided that the legend itself is + visible). + x + Sets the x coordinates. + x0 + Alternate to `x`. Builds a linear space of x + coordinates. Use with `dx` where `x0` is the starting + coordinate and `dx` the step. + xaxis + Sets a reference between this trace's x coordinates and + a 2D cartesian x axis. If "x" (the default value), the + x coordinates refer to `layout.xaxis`. If "x2", the x + coordinates refer to `layout.xaxis2`, and so on. + xcalendar + Sets the calendar system to use with `x` date data. + xgap + Sets the horizontal gap (in pixels) between bricks. + xhoverformat + Sets the hover text formatting rulefor `x` using d3 + formatting mini-languages which are very similar to + those in Python. For numbers, see: + https://github.com/d3/d3-format/tree/v1.4.5#d3-format. + And for dates see: https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format. We add two items to + d3's date formatter: "%h" for half of the year as a + decimal number as well as "%{n}f" for fractional + seconds with n digits. For example, *2016-10-13 + 09:15:23.456* with tickformat "%H~%M~%S.%2f" would + display *09~15~23.46*By default the values are + formatted using `xaxis.hoverformat`. + xperiod + Only relevant when the axis `type` is "date". Sets the + period positioning in milliseconds or "M" on the x + axis. Special values in the form of "M" could be + used to declare the number of months. In this case `n` + must be a positive integer. + xperiod0 + Only relevant when the axis `type` is "date". Sets the + base for period positioning in milliseconds or date + string on the x0 axis. When `x0period` is round number + of weeks, the `x0period0` by default would be on a + Sunday i.e. 2000-01-02, otherwise it would be at + 2000-01-01. + xperiodalignment + Only relevant when the axis `type` is "date". Sets the + alignment of data points on the x axis. + xsrc + Sets the source reference on Chart Studio Cloud for + `x`. + xtype + If "array", the heatmap's x coordinates are given by + "x" (the default behavior when `x` is provided). If + "scaled", the heatmap's x coordinates are given by "x0" + and "dx" (the default behavior when `x` is not + provided). + y + Sets the y coordinates. + y0 + Alternate to `y`. Builds a linear space of y + coordinates. Use with `dy` where `y0` is the starting + coordinate and `dy` the step. + yaxis + Sets a reference between this trace's y coordinates and + a 2D cartesian y axis. If "y" (the default value), the + y coordinates refer to `layout.yaxis`. If "y2", the y + coordinates refer to `layout.yaxis2`, and so on. + ycalendar + Sets the calendar system to use with `y` date data. + ygap + Sets the vertical gap (in pixels) between bricks. + yhoverformat + Sets the hover text formatting rulefor `y` using d3 + formatting mini-languages which are very similar to + those in Python. For numbers, see: + https://github.com/d3/d3-format/tree/v1.4.5#d3-format. + And for dates see: https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format. We add two items to + d3's date formatter: "%h" for half of the year as a + decimal number as well as "%{n}f" for fractional + seconds with n digits. For example, *2016-10-13 + 09:15:23.456* with tickformat "%H~%M~%S.%2f" would + display *09~15~23.46*By default the values are + formatted using `yaxis.hoverformat`. + yperiod + Only relevant when the axis `type` is "date". Sets the + period positioning in milliseconds or "M" on the y + axis. Special values in the form of "M" could be + used to declare the number of months. In this case `n` + must be a positive integer. + yperiod0 + Only relevant when the axis `type` is "date". Sets the + base for period positioning in milliseconds or date + string on the y0 axis. When `y0period` is round number + of weeks, the `y0period0` by default would be on a + Sunday i.e. 2000-01-02, otherwise it would be at + 2000-01-01. + yperiodalignment + Only relevant when the axis `type` is "date". Sets the + alignment of data points on the y axis. + ysrc + Sets the source reference on Chart Studio Cloud for + `y`. + ytype + If "array", the heatmap's y coordinates are given by + "y" (the default behavior when `y` is provided) If + "scaled", the heatmap's y coordinates are given by "y0" + and "dy" (the default behavior when `y` is not + provided) + z + Sets the z data. + zauto + Determines whether or not the color domain is computed + with respect to the input data (here in `z`) or the + bounds set in `zmin` and `zmax` Defaults to `false` + when `zmin` and `zmax` are set by the user. + zhoverformat + Sets the hover text formatting rulefor `z` using d3 + formatting mini-languages which are very similar to + those in Python. For numbers, see: https://github.com/d + 3/d3-format/tree/v1.4.5#d3-format.By default the values + are formatted using generic number format. + zmax + Sets the upper bound of the color domain. Value should + have the same units as in `z` and if set, `zmin` must + be set as well. + zmid + Sets the mid-point of the color domain by scaling + `zmin` and/or `zmax` to be equidistant to this point. + Value should have the same units as in `z`. Has no + effect when `zauto` is `false`. + zmin + Sets the lower bound of the color domain. Value should + have the same units as in `z` and if set, `zmax` must + be set as well. + zorder + Sets the layer on which this trace is displayed, + relative to other SVG traces on the same subplot. SVG + traces with higher `zorder` appear in front of those + with lower `zorder`. + zsmooth + Picks a smoothing algorithm use to smooth `z` data. + zsrc + Sets the source reference on Chart Studio Cloud for + `z`. + + Returns + ------- + Heatmap + """ + super().__init__("heatmap") + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + if arg is None: + arg = {} + elif isinstance(arg, self.__class__): + arg = arg.to_plotly_json() + elif isinstance(arg, dict): + arg = _copy.copy(arg) + else: + raise ValueError("""\ +The first argument to the plotly.graph_objs.Heatmap +constructor must be a dict or +an instance of :class:`plotly.graph_objs.Heatmap`""") + + self._skip_invalid = kwargs.pop("skip_invalid", False) + self._validate = kwargs.pop("_validate", True) + + self._set_property("autocolorscale", arg, autocolorscale) + self._set_property("coloraxis", arg, coloraxis) + self._set_property("colorbar", arg, colorbar) + self._set_property("colorscale", arg, colorscale) + self._set_property("connectgaps", arg, connectgaps) + self._set_property("customdata", arg, customdata) + self._set_property("customdatasrc", arg, customdatasrc) + self._set_property("dx", arg, dx) + self._set_property("dy", arg, dy) + self._set_property("hoverinfo", arg, hoverinfo) + self._set_property("hoverinfosrc", arg, hoverinfosrc) + self._set_property("hoverlabel", arg, hoverlabel) + self._set_property("hoverongaps", arg, hoverongaps) + self._set_property("hovertemplate", arg, hovertemplate) + self._set_property("hovertemplatefallback", arg, hovertemplatefallback) + self._set_property("hovertemplatesrc", arg, hovertemplatesrc) + self._set_property("hovertext", arg, hovertext) + self._set_property("hovertextsrc", arg, hovertextsrc) + self._set_property("ids", arg, ids) + self._set_property("idssrc", arg, idssrc) + self._set_property("legend", arg, legend) + self._set_property("legendgroup", arg, legendgroup) + self._set_property("legendgrouptitle", arg, legendgrouptitle) + self._set_property("legendrank", arg, legendrank) + self._set_property("legendwidth", arg, legendwidth) + self._set_property("meta", arg, meta) + self._set_property("metasrc", arg, metasrc) + self._set_property("name", arg, name) + self._set_property("opacity", arg, opacity) + self._set_property("reversescale", arg, reversescale) + self._set_property("showlegend", arg, showlegend) + self._set_property("showscale", arg, showscale) + self._set_property("stream", arg, stream) + self._set_property("text", arg, text) + self._set_property("textfont", arg, textfont) + self._set_property("textsrc", arg, textsrc) + self._set_property("texttemplate", arg, texttemplate) + self._set_property("texttemplatefallback", arg, texttemplatefallback) + self._set_property("transpose", arg, transpose) + self._set_property("uid", arg, uid) + self._set_property("uirevision", arg, uirevision) + self._set_property("visible", arg, visible) + self._set_property("x", arg, x) + self._set_property("x0", arg, x0) + self._set_property("xaxis", arg, xaxis) + self._set_property("xcalendar", arg, xcalendar) + self._set_property("xgap", arg, xgap) + self._set_property("xhoverformat", arg, xhoverformat) + self._set_property("xperiod", arg, xperiod) + self._set_property("xperiod0", arg, xperiod0) + self._set_property("xperiodalignment", arg, xperiodalignment) + self._set_property("xsrc", arg, xsrc) + self._set_property("xtype", arg, xtype) + self._set_property("y", arg, y) + self._set_property("y0", arg, y0) + self._set_property("yaxis", arg, yaxis) + self._set_property("ycalendar", arg, ycalendar) + self._set_property("ygap", arg, ygap) + self._set_property("yhoverformat", arg, yhoverformat) + self._set_property("yperiod", arg, yperiod) + self._set_property("yperiod0", arg, yperiod0) + self._set_property("yperiodalignment", arg, yperiodalignment) + self._set_property("ysrc", arg, ysrc) + self._set_property("ytype", arg, ytype) + self._set_property("z", arg, z) + self._set_property("zauto", arg, zauto) + self._set_property("zhoverformat", arg, zhoverformat) + self._set_property("zmax", arg, zmax) + self._set_property("zmid", arg, zmid) + self._set_property("zmin", arg, zmin) + self._set_property("zorder", arg, zorder) + self._set_property("zsmooth", arg, zsmooth) + self._set_property("zsrc", arg, zsrc) + + self._props["type"] = "heatmap" + arg.pop("type", None) + self._process_kwargs(**dict(arg, **kwargs)) + self._skip_invalid = False diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/_histogram.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/_histogram.py new file mode 100644 index 0000000000000000000000000000000000000000..f642f05be87036c2bfd27b71072524c8358977f3 --- /dev/null +++ b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/_histogram.py @@ -0,0 +1,2512 @@ +# --- THIS FILE IS AUTO-GENERATED --- +# Modifications will be overwitten the next time code generation run. + +from plotly.basedatatypes import BaseTraceType as _BaseTraceType +import copy as _copy + + +class Histogram(_BaseTraceType): + _parent_path_str = "" + _path_str = "histogram" + _valid_props = { + "alignmentgroup", + "autobinx", + "autobiny", + "bingroup", + "cliponaxis", + "constraintext", + "cumulative", + "customdata", + "customdatasrc", + "error_x", + "error_y", + "histfunc", + "histnorm", + "hoverinfo", + "hoverinfosrc", + "hoverlabel", + "hovertemplate", + "hovertemplatefallback", + "hovertemplatesrc", + "hovertext", + "hovertextsrc", + "ids", + "idssrc", + "insidetextanchor", + "insidetextfont", + "legend", + "legendgroup", + "legendgrouptitle", + "legendrank", + "legendwidth", + "marker", + "meta", + "metasrc", + "name", + "nbinsx", + "nbinsy", + "offsetgroup", + "opacity", + "orientation", + "outsidetextfont", + "selected", + "selectedpoints", + "showlegend", + "stream", + "text", + "textangle", + "textfont", + "textposition", + "textsrc", + "texttemplate", + "texttemplatefallback", + "type", + "uid", + "uirevision", + "unselected", + "visible", + "x", + "xaxis", + "xbins", + "xcalendar", + "xhoverformat", + "xsrc", + "y", + "yaxis", + "ybins", + "ycalendar", + "yhoverformat", + "ysrc", + "zorder", + } + + @property + def alignmentgroup(self): + """ + Set several traces linked to the same position axis or matching + axes to the same alignmentgroup. This controls whether bars + compute their positional range dependently or independently. + + The 'alignmentgroup' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["alignmentgroup"] + + @alignmentgroup.setter + def alignmentgroup(self, val): + self["alignmentgroup"] = val + + @property + def autobinx(self): + """ + Obsolete: since v1.42 each bin attribute is auto-determined + separately and `autobinx` is not needed. However, we accept + `autobinx: true` or `false` and will update `xbins` accordingly + before deleting `autobinx` from the trace. + + The 'autobinx' property is a boolean and must be specified as: + - A boolean value: True or False + + Returns + ------- + bool + """ + return self["autobinx"] + + @autobinx.setter + def autobinx(self, val): + self["autobinx"] = val + + @property + def autobiny(self): + """ + Obsolete: since v1.42 each bin attribute is auto-determined + separately and `autobiny` is not needed. However, we accept + `autobiny: true` or `false` and will update `ybins` accordingly + before deleting `autobiny` from the trace. + + The 'autobiny' property is a boolean and must be specified as: + - A boolean value: True or False + + Returns + ------- + bool + """ + return self["autobiny"] + + @autobiny.setter + def autobiny(self, val): + self["autobiny"] = val + + @property + def bingroup(self): + """ + Set a group of histogram traces which will have compatible bin + settings. Note that traces on the same subplot and with the + same "orientation" under `barmode` "stack", "relative" and + "group" are forced into the same bingroup, Using `bingroup`, + traces under `barmode` "overlay" and on different axes (of the + same axis type) can have compatible bin settings. Note that + histogram and histogram2d* trace can share the same `bingroup` + + The 'bingroup' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["bingroup"] + + @bingroup.setter + def bingroup(self, val): + self["bingroup"] = val + + @property + def cliponaxis(self): + """ + Determines whether the text nodes are clipped about the subplot + axes. To show the text nodes above axis lines and tick labels, + make sure to set `xaxis.layer` and `yaxis.layer` to *below + traces*. + + The 'cliponaxis' property is a boolean and must be specified as: + - A boolean value: True or False + + Returns + ------- + bool + """ + return self["cliponaxis"] + + @cliponaxis.setter + def cliponaxis(self, val): + self["cliponaxis"] = val + + @property + def constraintext(self): + """ + Constrain the size of text inside or outside a bar to be no + larger than the bar itself. + + The 'constraintext' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['inside', 'outside', 'both', 'none'] + + Returns + ------- + Any + """ + return self["constraintext"] + + @constraintext.setter + def constraintext(self, val): + self["constraintext"] = val + + @property + def cumulative(self): + """ + The 'cumulative' property is an instance of Cumulative + that may be specified as: + - An instance of :class:`plotly.graph_objs.histogram.Cumulative` + - A dict of string/value properties that will be passed + to the Cumulative constructor + + Returns + ------- + plotly.graph_objs.histogram.Cumulative + """ + return self["cumulative"] + + @cumulative.setter + def cumulative(self, val): + self["cumulative"] = val + + @property + def customdata(self): + """ + Assigns extra data each datum. This may be useful when + listening to hover, click and selection events. Note that, + "scatter" traces also appends customdata items in the markers + DOM elements + + The 'customdata' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["customdata"] + + @customdata.setter + def customdata(self, val): + self["customdata"] = val + + @property + def customdatasrc(self): + """ + Sets the source reference on Chart Studio Cloud for + `customdata`. + + The 'customdatasrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["customdatasrc"] + + @customdatasrc.setter + def customdatasrc(self, val): + self["customdatasrc"] = val + + @property + def error_x(self): + """ + The 'error_x' property is an instance of ErrorX + that may be specified as: + - An instance of :class:`plotly.graph_objs.histogram.ErrorX` + - A dict of string/value properties that will be passed + to the ErrorX constructor + + Returns + ------- + plotly.graph_objs.histogram.ErrorX + """ + return self["error_x"] + + @error_x.setter + def error_x(self, val): + self["error_x"] = val + + @property + def error_y(self): + """ + The 'error_y' property is an instance of ErrorY + that may be specified as: + - An instance of :class:`plotly.graph_objs.histogram.ErrorY` + - A dict of string/value properties that will be passed + to the ErrorY constructor + + Returns + ------- + plotly.graph_objs.histogram.ErrorY + """ + return self["error_y"] + + @error_y.setter + def error_y(self, val): + self["error_y"] = val + + @property + def histfunc(self): + """ + Specifies the binning function used for this histogram trace. + If "count", the histogram values are computed by counting the + number of values lying inside each bin. If "sum", "avg", "min", + "max", the histogram values are computed using the sum, the + average, the minimum or the maximum of the values lying inside + each bin respectively. + + The 'histfunc' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['count', 'sum', 'avg', 'min', 'max'] + + Returns + ------- + Any + """ + return self["histfunc"] + + @histfunc.setter + def histfunc(self, val): + self["histfunc"] = val + + @property + def histnorm(self): + """ + Specifies the type of normalization used for this histogram + trace. If "", the span of each bar corresponds to the number of + occurrences (i.e. the number of data points lying inside the + bins). If "percent" / "probability", the span of each bar + corresponds to the percentage / fraction of occurrences with + respect to the total number of sample points (here, the sum of + all bin HEIGHTS equals 100% / 1). If "density", the span of + each bar corresponds to the number of occurrences in a bin + divided by the size of the bin interval (here, the sum of all + bin AREAS equals the total number of sample points). If + *probability density*, the area of each bar corresponds to the + probability that an event will fall into the corresponding bin + (here, the sum of all bin AREAS equals 1). + + The 'histnorm' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['', 'percent', 'probability', 'density', 'probability + density'] + + Returns + ------- + Any + """ + return self["histnorm"] + + @histnorm.setter + def histnorm(self, val): + self["histnorm"] = val + + @property + def hoverinfo(self): + """ + Determines which trace information appear on hover. If `none` + or `skip` are set, no information is displayed upon hovering. + But, if `none` is set, click and hover events are still fired. + + The 'hoverinfo' property is a flaglist and may be specified + as a string containing: + - Any combination of ['x', 'y', 'z', 'text', 'name'] joined with '+' characters + (e.g. 'x+y') + OR exactly one of ['all', 'none', 'skip'] (e.g. 'skip') + - A list or array of the above + + Returns + ------- + Any|numpy.ndarray + """ + return self["hoverinfo"] + + @hoverinfo.setter + def hoverinfo(self, val): + self["hoverinfo"] = val + + @property + def hoverinfosrc(self): + """ + Sets the source reference on Chart Studio Cloud for + `hoverinfo`. + + The 'hoverinfosrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["hoverinfosrc"] + + @hoverinfosrc.setter + def hoverinfosrc(self, val): + self["hoverinfosrc"] = val + + @property + def hoverlabel(self): + """ + The 'hoverlabel' property is an instance of Hoverlabel + that may be specified as: + - An instance of :class:`plotly.graph_objs.histogram.Hoverlabel` + - A dict of string/value properties that will be passed + to the Hoverlabel constructor + + Returns + ------- + plotly.graph_objs.histogram.Hoverlabel + """ + return self["hoverlabel"] + + @hoverlabel.setter + def hoverlabel(self, val): + self["hoverlabel"] = val + + @property + def hovertemplate(self): + """ + Template string used for rendering the information that appear + on hover box. Note that this will override `hoverinfo`. + Variables are inserted using %{variable}, for example "y: %{y}" + as well as %{xother}, {%_xother}, {%_xother_}, {%xother_}. When + showing info for several points, "xother" will be added to + those with different x positions from the first point. An + underscore before or after "(x|y)other" will add a space on + that side, only when this field is shown. Numbers are formatted + using d3-format's syntax %{variable:d3-format}, for example + "Price: %{y:$.2f}". + https://github.com/d3/d3-format/tree/v1.4.5#d3-format for + details on the formatting syntax. Dates are formatted using + d3-time-format's syntax %{variable|d3-time-format}, for example + "Day: %{2019-01-01|%A}". https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format for details on the date + formatting syntax. Variables that can't be found will be + replaced with the specifier. For example, a template of "data: + %{x}, %{y}" will result in a value of "data: 1, %{y}" if x is 1 + and y is missing. Variables with an undefined value will be + replaced with the fallback value. The variables available in + `hovertemplate` are the ones emitted as event data described at + this link https://plotly.com/javascript/plotlyjs-events/#event- + data. Additionally, all attributes that can be specified per- + point (the ones that are `arrayOk: true`) are available. + Finally, the template string has access to variable `binNumber` + Anything contained in tag `` is displayed in the + secondary box, for example `%{fullData.name}`. + To hide the secondary box completely, use an empty tag + ``. + + The 'hovertemplate' property is a string and must be specified as: + - A string + - A number that will be converted to a string + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["hovertemplate"] + + @hovertemplate.setter + def hovertemplate(self, val): + self["hovertemplate"] = val + + @property + def hovertemplatefallback(self): + """ + Fallback string that's displayed when a variable referenced in + a template is missing. If the boolean value 'false' is passed + in, the specifier with the missing variable will be displayed. + + The 'hovertemplatefallback' property accepts values of any type + + Returns + ------- + Any + """ + return self["hovertemplatefallback"] + + @hovertemplatefallback.setter + def hovertemplatefallback(self, val): + self["hovertemplatefallback"] = val + + @property + def hovertemplatesrc(self): + """ + Sets the source reference on Chart Studio Cloud for + `hovertemplate`. + + The 'hovertemplatesrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["hovertemplatesrc"] + + @hovertemplatesrc.setter + def hovertemplatesrc(self, val): + self["hovertemplatesrc"] = val + + @property + def hovertext(self): + """ + Same as `text`. + + The 'hovertext' property is a string and must be specified as: + - A string + - A number that will be converted to a string + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["hovertext"] + + @hovertext.setter + def hovertext(self, val): + self["hovertext"] = val + + @property + def hovertextsrc(self): + """ + Sets the source reference on Chart Studio Cloud for + `hovertext`. + + The 'hovertextsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["hovertextsrc"] + + @hovertextsrc.setter + def hovertextsrc(self, val): + self["hovertextsrc"] = val + + @property + def ids(self): + """ + Assigns id labels to each datum. These ids for object constancy + of data points during animation. Should be an array of strings, + not numbers or any other type. + + The 'ids' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["ids"] + + @ids.setter + def ids(self, val): + self["ids"] = val + + @property + def idssrc(self): + """ + Sets the source reference on Chart Studio Cloud for `ids`. + + The 'idssrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["idssrc"] + + @idssrc.setter + def idssrc(self, val): + self["idssrc"] = val + + @property + def insidetextanchor(self): + """ + Determines if texts are kept at center or start/end points in + `textposition` "inside" mode. + + The 'insidetextanchor' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['end', 'middle', 'start'] + + Returns + ------- + Any + """ + return self["insidetextanchor"] + + @insidetextanchor.setter + def insidetextanchor(self, val): + self["insidetextanchor"] = val + + @property + def insidetextfont(self): + """ + Sets the font used for `text` lying inside the bar. + + The 'insidetextfont' property is an instance of Insidetextfont + that may be specified as: + - An instance of :class:`plotly.graph_objs.histogram.Insidetextfont` + - A dict of string/value properties that will be passed + to the Insidetextfont constructor + + Returns + ------- + plotly.graph_objs.histogram.Insidetextfont + """ + return self["insidetextfont"] + + @insidetextfont.setter + def insidetextfont(self, val): + self["insidetextfont"] = val + + @property + def legend(self): + """ + Sets the reference to a legend to show this trace in. + References to these legends are "legend", "legend2", "legend3", + etc. Settings for these legends are set in the layout, under + `layout.legend`, `layout.legend2`, etc. + + The 'legend' property is an identifier of a particular + subplot, of type 'legend', that may be specified as: + - the string 'legend' optionally followed by an integer >= 1 + (e.g. 'legend', 'legend1', 'legend2', 'legend3', etc.) + + Returns + ------- + str + """ + return self["legend"] + + @legend.setter + def legend(self, val): + self["legend"] = val + + @property + def legendgroup(self): + """ + Sets the legend group for this trace. Traces and shapes part of + the same legend group hide/show at the same time when toggling + legend items. + + The 'legendgroup' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["legendgroup"] + + @legendgroup.setter + def legendgroup(self, val): + self["legendgroup"] = val + + @property + def legendgrouptitle(self): + """ + The 'legendgrouptitle' property is an instance of Legendgrouptitle + that may be specified as: + - An instance of :class:`plotly.graph_objs.histogram.Legendgrouptitle` + - A dict of string/value properties that will be passed + to the Legendgrouptitle constructor + + Returns + ------- + plotly.graph_objs.histogram.Legendgrouptitle + """ + return self["legendgrouptitle"] + + @legendgrouptitle.setter + def legendgrouptitle(self, val): + self["legendgrouptitle"] = val + + @property + def legendrank(self): + """ + Sets the legend rank for this trace. Items and groups with + smaller ranks are presented on top/left side while with + "reversed" `legend.traceorder` they are on bottom/right side. + The default legendrank is 1000, so that you can use ranks less + than 1000 to place certain items before all unranked items, and + ranks greater than 1000 to go after all unranked items. When + having unranked or equal rank items shapes would be displayed + after traces i.e. according to their order in data and layout. + + The 'legendrank' property is a number and may be specified as: + - An int or float + + Returns + ------- + int|float + """ + return self["legendrank"] + + @legendrank.setter + def legendrank(self, val): + self["legendrank"] = val + + @property + def legendwidth(self): + """ + Sets the width (in px or fraction) of the legend for this + trace. + + The 'legendwidth' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["legendwidth"] + + @legendwidth.setter + def legendwidth(self, val): + self["legendwidth"] = val + + @property + def marker(self): + """ + The 'marker' property is an instance of Marker + that may be specified as: + - An instance of :class:`plotly.graph_objs.histogram.Marker` + - A dict of string/value properties that will be passed + to the Marker constructor + + Returns + ------- + plotly.graph_objs.histogram.Marker + """ + return self["marker"] + + @marker.setter + def marker(self, val): + self["marker"] = val + + @property + def meta(self): + """ + Assigns extra meta information associated with this trace that + can be used in various text attributes. Attributes such as + trace `name`, graph, axis and colorbar `title.text`, annotation + `text` `rangeselector`, `updatemenues` and `sliders` `label` + text all support `meta`. To access the trace `meta` values in + an attribute in the same trace, simply use `%{meta[i]}` where + `i` is the index or key of the `meta` item in question. To + access trace `meta` in layout attributes, use + `%{data[n[.meta[i]}` where `i` is the index or key of the + `meta` and `n` is the trace index. + + The 'meta' property accepts values of any type + + Returns + ------- + Any|numpy.ndarray + """ + return self["meta"] + + @meta.setter + def meta(self, val): + self["meta"] = val + + @property + def metasrc(self): + """ + Sets the source reference on Chart Studio Cloud for `meta`. + + The 'metasrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["metasrc"] + + @metasrc.setter + def metasrc(self, val): + self["metasrc"] = val + + @property + def name(self): + """ + Sets the trace name. The trace name appears as the legend item + and on hover. + + The 'name' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["name"] + + @name.setter + def name(self, val): + self["name"] = val + + @property + def nbinsx(self): + """ + Specifies the maximum number of desired bins. This value will + be used in an algorithm that will decide the optimal bin size + such that the histogram best visualizes the distribution of the + data. Ignored if `xbins.size` is provided. + + The 'nbinsx' property is a integer and may be specified as: + - An int (or float that will be cast to an int) + in the interval [0, 9223372036854775807] + + Returns + ------- + int + """ + return self["nbinsx"] + + @nbinsx.setter + def nbinsx(self, val): + self["nbinsx"] = val + + @property + def nbinsy(self): + """ + Specifies the maximum number of desired bins. This value will + be used in an algorithm that will decide the optimal bin size + such that the histogram best visualizes the distribution of the + data. Ignored if `ybins.size` is provided. + + The 'nbinsy' property is a integer and may be specified as: + - An int (or float that will be cast to an int) + in the interval [0, 9223372036854775807] + + Returns + ------- + int + """ + return self["nbinsy"] + + @nbinsy.setter + def nbinsy(self, val): + self["nbinsy"] = val + + @property + def offsetgroup(self): + """ + Set several traces linked to the same position axis or matching + axes to the same offsetgroup where bars of the same position + coordinate will line up. + + The 'offsetgroup' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["offsetgroup"] + + @offsetgroup.setter + def offsetgroup(self, val): + self["offsetgroup"] = val + + @property + def opacity(self): + """ + Sets the opacity of the trace. + + The 'opacity' property is a number and may be specified as: + - An int or float in the interval [0, 1] + + Returns + ------- + int|float + """ + return self["opacity"] + + @opacity.setter + def opacity(self, val): + self["opacity"] = val + + @property + def orientation(self): + """ + Sets the orientation of the bars. With "v" ("h"), the value of + the each bar spans along the vertical (horizontal). + + The 'orientation' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['v', 'h'] + + Returns + ------- + Any + """ + return self["orientation"] + + @orientation.setter + def orientation(self, val): + self["orientation"] = val + + @property + def outsidetextfont(self): + """ + Sets the font used for `text` lying outside the bar. + + The 'outsidetextfont' property is an instance of Outsidetextfont + that may be specified as: + - An instance of :class:`plotly.graph_objs.histogram.Outsidetextfont` + - A dict of string/value properties that will be passed + to the Outsidetextfont constructor + + Returns + ------- + plotly.graph_objs.histogram.Outsidetextfont + """ + return self["outsidetextfont"] + + @outsidetextfont.setter + def outsidetextfont(self, val): + self["outsidetextfont"] = val + + @property + def selected(self): + """ + The 'selected' property is an instance of Selected + that may be specified as: + - An instance of :class:`plotly.graph_objs.histogram.Selected` + - A dict of string/value properties that will be passed + to the Selected constructor + + Returns + ------- + plotly.graph_objs.histogram.Selected + """ + return self["selected"] + + @selected.setter + def selected(self, val): + self["selected"] = val + + @property + def selectedpoints(self): + """ + Array containing integer indices of selected points. Has an + effect only for traces that support selections. Note that an + empty array means an empty selection where the `unselected` are + turned on for all points, whereas, any other non-array values + means no selection all where the `selected` and `unselected` + styles have no effect. + + The 'selectedpoints' property accepts values of any type + + Returns + ------- + Any + """ + return self["selectedpoints"] + + @selectedpoints.setter + def selectedpoints(self, val): + self["selectedpoints"] = val + + @property + def showlegend(self): + """ + Determines whether or not an item corresponding to this trace + is shown in the legend. + + The 'showlegend' property is a boolean and must be specified as: + - A boolean value: True or False + + Returns + ------- + bool + """ + return self["showlegend"] + + @showlegend.setter + def showlegend(self, val): + self["showlegend"] = val + + @property + def stream(self): + """ + The 'stream' property is an instance of Stream + that may be specified as: + - An instance of :class:`plotly.graph_objs.histogram.Stream` + - A dict of string/value properties that will be passed + to the Stream constructor + + Returns + ------- + plotly.graph_objs.histogram.Stream + """ + return self["stream"] + + @stream.setter + def stream(self, val): + self["stream"] = val + + @property + def text(self): + """ + Sets hover text elements associated with each bar. If a single + string, the same string appears over all bars. If an array of + string, the items are mapped in order to the this trace's + coordinates. + + The 'text' property is a string and must be specified as: + - A string + - A number that will be converted to a string + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["text"] + + @text.setter + def text(self, val): + self["text"] = val + + @property + def textangle(self): + """ + Sets the angle of the tick labels with respect to the bar. For + example, a `tickangle` of -90 draws the tick labels vertically. + With "auto" the texts may automatically be rotated to fit with + the maximum size in bars. + + The 'textangle' property is a angle (in degrees) that may be + specified as a number between -180 and 180. + Numeric values outside this range are converted to the equivalent value + (e.g. 270 is converted to -90). + + Returns + ------- + int|float + """ + return self["textangle"] + + @textangle.setter + def textangle(self, val): + self["textangle"] = val + + @property + def textfont(self): + """ + Sets the text font. + + The 'textfont' property is an instance of Textfont + that may be specified as: + - An instance of :class:`plotly.graph_objs.histogram.Textfont` + - A dict of string/value properties that will be passed + to the Textfont constructor + + Returns + ------- + plotly.graph_objs.histogram.Textfont + """ + return self["textfont"] + + @textfont.setter + def textfont(self, val): + self["textfont"] = val + + @property + def textposition(self): + """ + Specifies the location of the `text`. "inside" positions `text` + inside, next to the bar end (rotated and scaled if needed). + "outside" positions `text` outside, next to the bar end (scaled + if needed), unless there is another bar stacked on this one, + then the text gets pushed inside. "auto" tries to position + `text` inside the bar, but if the bar is too small and no bar + is stacked on this one the text is moved outside. If "none", no + text appears. + + The 'textposition' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['inside', 'outside', 'auto', 'none'] + + Returns + ------- + Any + """ + return self["textposition"] + + @textposition.setter + def textposition(self, val): + self["textposition"] = val + + @property + def textsrc(self): + """ + Sets the source reference on Chart Studio Cloud for `text`. + + The 'textsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["textsrc"] + + @textsrc.setter + def textsrc(self, val): + self["textsrc"] = val + + @property + def texttemplate(self): + """ + Template string used for rendering the information text that + appears on points. Note that this will override `textinfo`. + Variables are inserted using %{variable}, for example "y: + %{y}". Numbers are formatted using d3-format's syntax + %{variable:d3-format}, for example "Price: %{y:$.2f}". + https://github.com/d3/d3-format/tree/v1.4.5#d3-format for + details on the formatting syntax. Dates are formatted using + d3-time-format's syntax %{variable|d3-time-format}, for example + "Day: %{2019-01-01|%A}". https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format for details on the date + formatting syntax. Variables that can't be found will be + replaced with the specifier. For example, a template of "data: + %{x}, %{y}" will result in a value of "data: 1, %{y}" if x is 1 + and y is missing. Variables with an undefined value will be + replaced with the fallback value. All attributes that can be + specified per-point (the ones that are `arrayOk: true`) are + available. Finally, the template string has access to variables + `label` and `value`. + + The 'texttemplate' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["texttemplate"] + + @texttemplate.setter + def texttemplate(self, val): + self["texttemplate"] = val + + @property + def texttemplatefallback(self): + """ + Fallback string that's displayed when a variable referenced in + a template is missing. If the boolean value 'false' is passed + in, the specifier with the missing variable will be displayed. + + The 'texttemplatefallback' property accepts values of any type + + Returns + ------- + Any + """ + return self["texttemplatefallback"] + + @texttemplatefallback.setter + def texttemplatefallback(self, val): + self["texttemplatefallback"] = val + + @property + def uid(self): + """ + Assign an id to this trace, Use this to provide object + constancy between traces during animations and transitions. + + The 'uid' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["uid"] + + @uid.setter + def uid(self, val): + self["uid"] = val + + @property + def uirevision(self): + """ + Controls persistence of some user-driven changes to the trace: + `constraintrange` in `parcoords` traces, as well as some + `editable: true` modifications such as `name` and + `colorbar.title`. Defaults to `layout.uirevision`. Note that + other user-driven trace attribute changes are controlled by + `layout` attributes: `trace.visible` is controlled by + `layout.legend.uirevision`, `selectedpoints` is controlled by + `layout.selectionrevision`, and `colorbar.(x|y)` (accessible + with `config: {editable: true}`) is controlled by + `layout.editrevision`. Trace changes are tracked by `uid`, + which only falls back on trace index if no `uid` is provided. + So if your app can add/remove traces before the end of the + `data` array, such that the same trace has a different index, + you can still preserve user-driven changes if you give each + trace a `uid` that stays with it as it moves. + + The 'uirevision' property accepts values of any type + + Returns + ------- + Any + """ + return self["uirevision"] + + @uirevision.setter + def uirevision(self, val): + self["uirevision"] = val + + @property + def unselected(self): + """ + The 'unselected' property is an instance of Unselected + that may be specified as: + - An instance of :class:`plotly.graph_objs.histogram.Unselected` + - A dict of string/value properties that will be passed + to the Unselected constructor + + Returns + ------- + plotly.graph_objs.histogram.Unselected + """ + return self["unselected"] + + @unselected.setter + def unselected(self, val): + self["unselected"] = val + + @property + def visible(self): + """ + Determines whether or not this trace is visible. If + "legendonly", the trace is not drawn, but can appear as a + legend item (provided that the legend itself is visible). + + The 'visible' property is an enumeration that may be specified as: + - One of the following enumeration values: + [True, False, 'legendonly'] + + Returns + ------- + Any + """ + return self["visible"] + + @visible.setter + def visible(self, val): + self["visible"] = val + + @property + def x(self): + """ + Sets the sample data to be binned on the x axis. + + The 'x' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["x"] + + @x.setter + def x(self, val): + self["x"] = val + + @property + def xaxis(self): + """ + Sets a reference between this trace's x coordinates and a 2D + cartesian x axis. If "x" (the default value), the x coordinates + refer to `layout.xaxis`. If "x2", the x coordinates refer to + `layout.xaxis2`, and so on. + + The 'xaxis' property is an identifier of a particular + subplot, of type 'x', that may be specified as: + - the string 'x' optionally followed by an integer >= 1 + (e.g. 'x', 'x1', 'x2', 'x3', etc.) + + Returns + ------- + str + """ + return self["xaxis"] + + @xaxis.setter + def xaxis(self, val): + self["xaxis"] = val + + @property + def xbins(self): + """ + The 'xbins' property is an instance of XBins + that may be specified as: + - An instance of :class:`plotly.graph_objs.histogram.XBins` + - A dict of string/value properties that will be passed + to the XBins constructor + + Returns + ------- + plotly.graph_objs.histogram.XBins + """ + return self["xbins"] + + @xbins.setter + def xbins(self, val): + self["xbins"] = val + + @property + def xcalendar(self): + """ + Sets the calendar system to use with `x` date data. + + The 'xcalendar' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['chinese', 'coptic', 'discworld', 'ethiopian', + 'gregorian', 'hebrew', 'islamic', 'jalali', 'julian', + 'mayan', 'nanakshahi', 'nepali', 'persian', 'taiwan', + 'thai', 'ummalqura'] + + Returns + ------- + Any + """ + return self["xcalendar"] + + @xcalendar.setter + def xcalendar(self, val): + self["xcalendar"] = val + + @property + def xhoverformat(self): + """ + Sets the hover text formatting rulefor `x` using d3 formatting + mini-languages which are very similar to those in Python. For + numbers, see: + https://github.com/d3/d3-format/tree/v1.4.5#d3-format. And for + dates see: https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format. We add two items to d3's date + formatter: "%h" for half of the year as a decimal number as + well as "%{n}f" for fractional seconds with n digits. For + example, *2016-10-13 09:15:23.456* with tickformat + "%H~%M~%S.%2f" would display *09~15~23.46*By default the values + are formatted using `xaxis.hoverformat`. + + The 'xhoverformat' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["xhoverformat"] + + @xhoverformat.setter + def xhoverformat(self, val): + self["xhoverformat"] = val + + @property + def xsrc(self): + """ + Sets the source reference on Chart Studio Cloud for `x`. + + The 'xsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["xsrc"] + + @xsrc.setter + def xsrc(self, val): + self["xsrc"] = val + + @property + def y(self): + """ + Sets the sample data to be binned on the y axis. + + The 'y' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["y"] + + @y.setter + def y(self, val): + self["y"] = val + + @property + def yaxis(self): + """ + Sets a reference between this trace's y coordinates and a 2D + cartesian y axis. If "y" (the default value), the y coordinates + refer to `layout.yaxis`. If "y2", the y coordinates refer to + `layout.yaxis2`, and so on. + + The 'yaxis' property is an identifier of a particular + subplot, of type 'y', that may be specified as: + - the string 'y' optionally followed by an integer >= 1 + (e.g. 'y', 'y1', 'y2', 'y3', etc.) + + Returns + ------- + str + """ + return self["yaxis"] + + @yaxis.setter + def yaxis(self, val): + self["yaxis"] = val + + @property + def ybins(self): + """ + The 'ybins' property is an instance of YBins + that may be specified as: + - An instance of :class:`plotly.graph_objs.histogram.YBins` + - A dict of string/value properties that will be passed + to the YBins constructor + + Returns + ------- + plotly.graph_objs.histogram.YBins + """ + return self["ybins"] + + @ybins.setter + def ybins(self, val): + self["ybins"] = val + + @property + def ycalendar(self): + """ + Sets the calendar system to use with `y` date data. + + The 'ycalendar' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['chinese', 'coptic', 'discworld', 'ethiopian', + 'gregorian', 'hebrew', 'islamic', 'jalali', 'julian', + 'mayan', 'nanakshahi', 'nepali', 'persian', 'taiwan', + 'thai', 'ummalqura'] + + Returns + ------- + Any + """ + return self["ycalendar"] + + @ycalendar.setter + def ycalendar(self, val): + self["ycalendar"] = val + + @property + def yhoverformat(self): + """ + Sets the hover text formatting rulefor `y` using d3 formatting + mini-languages which are very similar to those in Python. For + numbers, see: + https://github.com/d3/d3-format/tree/v1.4.5#d3-format. And for + dates see: https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format. We add two items to d3's date + formatter: "%h" for half of the year as a decimal number as + well as "%{n}f" for fractional seconds with n digits. For + example, *2016-10-13 09:15:23.456* with tickformat + "%H~%M~%S.%2f" would display *09~15~23.46*By default the values + are formatted using `yaxis.hoverformat`. + + The 'yhoverformat' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["yhoverformat"] + + @yhoverformat.setter + def yhoverformat(self, val): + self["yhoverformat"] = val + + @property + def ysrc(self): + """ + Sets the source reference on Chart Studio Cloud for `y`. + + The 'ysrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["ysrc"] + + @ysrc.setter + def ysrc(self, val): + self["ysrc"] = val + + @property + def zorder(self): + """ + Sets the layer on which this trace is displayed, relative to + other SVG traces on the same subplot. SVG traces with higher + `zorder` appear in front of those with lower `zorder`. + + The 'zorder' property is a integer and may be specified as: + - An int (or float that will be cast to an int) + + Returns + ------- + int + """ + return self["zorder"] + + @zorder.setter + def zorder(self, val): + self["zorder"] = val + + @property + def type(self): + return self._props["type"] + + @property + def _prop_descriptions(self): + return """\ + alignmentgroup + Set several traces linked to the same position axis or + matching axes to the same alignmentgroup. This controls + whether bars compute their positional range dependently + or independently. + autobinx + Obsolete: since v1.42 each bin attribute is auto- + determined separately and `autobinx` is not needed. + However, we accept `autobinx: true` or `false` and will + update `xbins` accordingly before deleting `autobinx` + from the trace. + autobiny + Obsolete: since v1.42 each bin attribute is auto- + determined separately and `autobiny` is not needed. + However, we accept `autobiny: true` or `false` and will + update `ybins` accordingly before deleting `autobiny` + from the trace. + bingroup + Set a group of histogram traces which will have + compatible bin settings. Note that traces on the same + subplot and with the same "orientation" under `barmode` + "stack", "relative" and "group" are forced into the + same bingroup, Using `bingroup`, traces under `barmode` + "overlay" and on different axes (of the same axis type) + can have compatible bin settings. Note that histogram + and histogram2d* trace can share the same `bingroup` + cliponaxis + Determines whether the text nodes are clipped about the + subplot axes. To show the text nodes above axis lines + and tick labels, make sure to set `xaxis.layer` and + `yaxis.layer` to *below traces*. + constraintext + Constrain the size of text inside or outside a bar to + be no larger than the bar itself. + cumulative + :class:`plotly.graph_objects.histogram.Cumulative` + instance or dict with compatible properties + customdata + Assigns extra data each datum. This may be useful when + listening to hover, click and selection events. Note + that, "scatter" traces also appends customdata items in + the markers DOM elements + customdatasrc + Sets the source reference on Chart Studio Cloud for + `customdata`. + error_x + :class:`plotly.graph_objects.histogram.ErrorX` instance + or dict with compatible properties + error_y + :class:`plotly.graph_objects.histogram.ErrorY` instance + or dict with compatible properties + histfunc + Specifies the binning function used for this histogram + trace. If "count", the histogram values are computed by + counting the number of values lying inside each bin. If + "sum", "avg", "min", "max", the histogram values are + computed using the sum, the average, the minimum or the + maximum of the values lying inside each bin + respectively. + histnorm + Specifies the type of normalization used for this + histogram trace. If "", the span of each bar + corresponds to the number of occurrences (i.e. the + number of data points lying inside the bins). If + "percent" / "probability", the span of each bar + corresponds to the percentage / fraction of occurrences + with respect to the total number of sample points + (here, the sum of all bin HEIGHTS equals 100% / 1). If + "density", the span of each bar corresponds to the + number of occurrences in a bin divided by the size of + the bin interval (here, the sum of all bin AREAS equals + the total number of sample points). If *probability + density*, the area of each bar corresponds to the + probability that an event will fall into the + corresponding bin (here, the sum of all bin AREAS + equals 1). + hoverinfo + Determines which trace information appear on hover. If + `none` or `skip` are set, no information is displayed + upon hovering. But, if `none` is set, click and hover + events are still fired. + hoverinfosrc + Sets the source reference on Chart Studio Cloud for + `hoverinfo`. + hoverlabel + :class:`plotly.graph_objects.histogram.Hoverlabel` + instance or dict with compatible properties + hovertemplate + Template string used for rendering the information that + appear on hover box. Note that this will override + `hoverinfo`. Variables are inserted using %{variable}, + for example "y: %{y}" as well as %{xother}, {%_xother}, + {%_xother_}, {%xother_}. When showing info for several + points, "xother" will be added to those with different + x positions from the first point. An underscore before + or after "(x|y)other" will add a space on that side, + only when this field is shown. Numbers are formatted + using d3-format's syntax %{variable:d3-format}, for + example "Price: %{y:$.2f}". + https://github.com/d3/d3-format/tree/v1.4.5#d3-format + for details on the formatting syntax. Dates are + formatted using d3-time-format's syntax + %{variable|d3-time-format}, for example "Day: + %{2019-01-01|%A}". https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format for details on the + date formatting syntax. Variables that can't be found + will be replaced with the specifier. For example, a + template of "data: %{x}, %{y}" will result in a value + of "data: 1, %{y}" if x is 1 and y is missing. + Variables with an undefined value will be replaced with + the fallback value. The variables available in + `hovertemplate` are the ones emitted as event data + described at this link + https://plotly.com/javascript/plotlyjs-events/#event- + data. Additionally, all attributes that can be + specified per-point (the ones that are `arrayOk: true`) + are available. Finally, the template string has access + to variable `binNumber` Anything contained in tag + `` is displayed in the secondary box, for + example `%{fullData.name}`. To hide the + secondary box completely, use an empty tag + ``. + hovertemplatefallback + Fallback string that's displayed when a variable + referenced in a template is missing. If the boolean + value 'false' is passed in, the specifier with the + missing variable will be displayed. + hovertemplatesrc + Sets the source reference on Chart Studio Cloud for + `hovertemplate`. + hovertext + Same as `text`. + hovertextsrc + Sets the source reference on Chart Studio Cloud for + `hovertext`. + ids + Assigns id labels to each datum. These ids for object + constancy of data points during animation. Should be an + array of strings, not numbers or any other type. + idssrc + Sets the source reference on Chart Studio Cloud for + `ids`. + insidetextanchor + Determines if texts are kept at center or start/end + points in `textposition` "inside" mode. + insidetextfont + Sets the font used for `text` lying inside the bar. + legend + Sets the reference to a legend to show this trace in. + References to these legends are "legend", "legend2", + "legend3", etc. Settings for these legends are set in + the layout, under `layout.legend`, `layout.legend2`, + etc. + legendgroup + Sets the legend group for this trace. Traces and shapes + part of the same legend group hide/show at the same + time when toggling legend items. + legendgrouptitle + :class:`plotly.graph_objects.histogram.Legendgrouptitle + ` instance or dict with compatible properties + legendrank + Sets the legend rank for this trace. Items and groups + with smaller ranks are presented on top/left side while + with "reversed" `legend.traceorder` they are on + bottom/right side. The default legendrank is 1000, so + that you can use ranks less than 1000 to place certain + items before all unranked items, and ranks greater than + 1000 to go after all unranked items. When having + unranked or equal rank items shapes would be displayed + after traces i.e. according to their order in data and + layout. + legendwidth + Sets the width (in px or fraction) of the legend for + this trace. + marker + :class:`plotly.graph_objects.histogram.Marker` instance + or dict with compatible properties + meta + Assigns extra meta information associated with this + trace that can be used in various text attributes. + Attributes such as trace `name`, graph, axis and + colorbar `title.text`, annotation `text` + `rangeselector`, `updatemenues` and `sliders` `label` + text all support `meta`. To access the trace `meta` + values in an attribute in the same trace, simply use + `%{meta[i]}` where `i` is the index or key of the + `meta` item in question. To access trace `meta` in + layout attributes, use `%{data[n[.meta[i]}` where `i` + is the index or key of the `meta` and `n` is the trace + index. + metasrc + Sets the source reference on Chart Studio Cloud for + `meta`. + name + Sets the trace name. The trace name appears as the + legend item and on hover. + nbinsx + Specifies the maximum number of desired bins. This + value will be used in an algorithm that will decide the + optimal bin size such that the histogram best + visualizes the distribution of the data. Ignored if + `xbins.size` is provided. + nbinsy + Specifies the maximum number of desired bins. This + value will be used in an algorithm that will decide the + optimal bin size such that the histogram best + visualizes the distribution of the data. Ignored if + `ybins.size` is provided. + offsetgroup + Set several traces linked to the same position axis or + matching axes to the same offsetgroup where bars of the + same position coordinate will line up. + opacity + Sets the opacity of the trace. + orientation + Sets the orientation of the bars. With "v" ("h"), the + value of the each bar spans along the vertical + (horizontal). + outsidetextfont + Sets the font used for `text` lying outside the bar. + selected + :class:`plotly.graph_objects.histogram.Selected` + instance or dict with compatible properties + selectedpoints + Array containing integer indices of selected points. + Has an effect only for traces that support selections. + Note that an empty array means an empty selection where + the `unselected` are turned on for all points, whereas, + any other non-array values means no selection all where + the `selected` and `unselected` styles have no effect. + showlegend + Determines whether or not an item corresponding to this + trace is shown in the legend. + stream + :class:`plotly.graph_objects.histogram.Stream` instance + or dict with compatible properties + text + Sets hover text elements associated with each bar. If a + single string, the same string appears over all bars. + If an array of string, the items are mapped in order to + the this trace's coordinates. + textangle + Sets the angle of the tick labels with respect to the + bar. For example, a `tickangle` of -90 draws the tick + labels vertically. With "auto" the texts may + automatically be rotated to fit with the maximum size + in bars. + textfont + Sets the text font. + textposition + Specifies the location of the `text`. "inside" + positions `text` inside, next to the bar end (rotated + and scaled if needed). "outside" positions `text` + outside, next to the bar end (scaled if needed), unless + there is another bar stacked on this one, then the text + gets pushed inside. "auto" tries to position `text` + inside the bar, but if the bar is too small and no bar + is stacked on this one the text is moved outside. If + "none", no text appears. + textsrc + Sets the source reference on Chart Studio Cloud for + `text`. + texttemplate + Template string used for rendering the information text + that appears on points. Note that this will override + `textinfo`. Variables are inserted using %{variable}, + for example "y: %{y}". Numbers are formatted using + d3-format's syntax %{variable:d3-format}, for example + "Price: %{y:$.2f}". + https://github.com/d3/d3-format/tree/v1.4.5#d3-format + for details on the formatting syntax. Dates are + formatted using d3-time-format's syntax + %{variable|d3-time-format}, for example "Day: + %{2019-01-01|%A}". https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format for details on the + date formatting syntax. Variables that can't be found + will be replaced with the specifier. For example, a + template of "data: %{x}, %{y}" will result in a value + of "data: 1, %{y}" if x is 1 and y is missing. + Variables with an undefined value will be replaced with + the fallback value. All attributes that can be + specified per-point (the ones that are `arrayOk: true`) + are available. Finally, the template string has access + to variables `label` and `value`. + texttemplatefallback + Fallback string that's displayed when a variable + referenced in a template is missing. If the boolean + value 'false' is passed in, the specifier with the + missing variable will be displayed. + uid + Assign an id to this trace, Use this to provide object + constancy between traces during animations and + transitions. + uirevision + Controls persistence of some user-driven changes to the + trace: `constraintrange` in `parcoords` traces, as well + as some `editable: true` modifications such as `name` + and `colorbar.title`. Defaults to `layout.uirevision`. + Note that other user-driven trace attribute changes are + controlled by `layout` attributes: `trace.visible` is + controlled by `layout.legend.uirevision`, + `selectedpoints` is controlled by + `layout.selectionrevision`, and `colorbar.(x|y)` + (accessible with `config: {editable: true}`) is + controlled by `layout.editrevision`. Trace changes are + tracked by `uid`, which only falls back on trace index + if no `uid` is provided. So if your app can add/remove + traces before the end of the `data` array, such that + the same trace has a different index, you can still + preserve user-driven changes if you give each trace a + `uid` that stays with it as it moves. + unselected + :class:`plotly.graph_objects.histogram.Unselected` + instance or dict with compatible properties + visible + Determines whether or not this trace is visible. If + "legendonly", the trace is not drawn, but can appear as + a legend item (provided that the legend itself is + visible). + x + Sets the sample data to be binned on the x axis. + xaxis + Sets a reference between this trace's x coordinates and + a 2D cartesian x axis. If "x" (the default value), the + x coordinates refer to `layout.xaxis`. If "x2", the x + coordinates refer to `layout.xaxis2`, and so on. + xbins + :class:`plotly.graph_objects.histogram.XBins` instance + or dict with compatible properties + xcalendar + Sets the calendar system to use with `x` date data. + xhoverformat + Sets the hover text formatting rulefor `x` using d3 + formatting mini-languages which are very similar to + those in Python. For numbers, see: + https://github.com/d3/d3-format/tree/v1.4.5#d3-format. + And for dates see: https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format. We add two items to + d3's date formatter: "%h" for half of the year as a + decimal number as well as "%{n}f" for fractional + seconds with n digits. For example, *2016-10-13 + 09:15:23.456* with tickformat "%H~%M~%S.%2f" would + display *09~15~23.46*By default the values are + formatted using `xaxis.hoverformat`. + xsrc + Sets the source reference on Chart Studio Cloud for + `x`. + y + Sets the sample data to be binned on the y axis. + yaxis + Sets a reference between this trace's y coordinates and + a 2D cartesian y axis. If "y" (the default value), the + y coordinates refer to `layout.yaxis`. If "y2", the y + coordinates refer to `layout.yaxis2`, and so on. + ybins + :class:`plotly.graph_objects.histogram.YBins` instance + or dict with compatible properties + ycalendar + Sets the calendar system to use with `y` date data. + yhoverformat + Sets the hover text formatting rulefor `y` using d3 + formatting mini-languages which are very similar to + those in Python. For numbers, see: + https://github.com/d3/d3-format/tree/v1.4.5#d3-format. + And for dates see: https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format. We add two items to + d3's date formatter: "%h" for half of the year as a + decimal number as well as "%{n}f" for fractional + seconds with n digits. For example, *2016-10-13 + 09:15:23.456* with tickformat "%H~%M~%S.%2f" would + display *09~15~23.46*By default the values are + formatted using `yaxis.hoverformat`. + ysrc + Sets the source reference on Chart Studio Cloud for + `y`. + zorder + Sets the layer on which this trace is displayed, + relative to other SVG traces on the same subplot. SVG + traces with higher `zorder` appear in front of those + with lower `zorder`. + """ + + def __init__( + self, + arg=None, + alignmentgroup=None, + autobinx=None, + autobiny=None, + bingroup=None, + cliponaxis=None, + constraintext=None, + cumulative=None, + customdata=None, + customdatasrc=None, + error_x=None, + error_y=None, + histfunc=None, + histnorm=None, + hoverinfo=None, + hoverinfosrc=None, + hoverlabel=None, + hovertemplate=None, + hovertemplatefallback=None, + hovertemplatesrc=None, + hovertext=None, + hovertextsrc=None, + ids=None, + idssrc=None, + insidetextanchor=None, + insidetextfont=None, + legend=None, + legendgroup=None, + legendgrouptitle=None, + legendrank=None, + legendwidth=None, + marker=None, + meta=None, + metasrc=None, + name=None, + nbinsx=None, + nbinsy=None, + offsetgroup=None, + opacity=None, + orientation=None, + outsidetextfont=None, + selected=None, + selectedpoints=None, + showlegend=None, + stream=None, + text=None, + textangle=None, + textfont=None, + textposition=None, + textsrc=None, + texttemplate=None, + texttemplatefallback=None, + uid=None, + uirevision=None, + unselected=None, + visible=None, + x=None, + xaxis=None, + xbins=None, + xcalendar=None, + xhoverformat=None, + xsrc=None, + y=None, + yaxis=None, + ybins=None, + ycalendar=None, + yhoverformat=None, + ysrc=None, + zorder=None, + **kwargs, + ): + """ + Construct a new Histogram object + + The sample data from which statistics are computed is set in + `x` for vertically spanning histograms and in `y` for + horizontally spanning histograms. Binning options are set + `xbins` and `ybins` respectively if no aggregation data is + provided. + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of :class:`plotly.graph_objs.Histogram` + alignmentgroup + Set several traces linked to the same position axis or + matching axes to the same alignmentgroup. This controls + whether bars compute their positional range dependently + or independently. + autobinx + Obsolete: since v1.42 each bin attribute is auto- + determined separately and `autobinx` is not needed. + However, we accept `autobinx: true` or `false` and will + update `xbins` accordingly before deleting `autobinx` + from the trace. + autobiny + Obsolete: since v1.42 each bin attribute is auto- + determined separately and `autobiny` is not needed. + However, we accept `autobiny: true` or `false` and will + update `ybins` accordingly before deleting `autobiny` + from the trace. + bingroup + Set a group of histogram traces which will have + compatible bin settings. Note that traces on the same + subplot and with the same "orientation" under `barmode` + "stack", "relative" and "group" are forced into the + same bingroup, Using `bingroup`, traces under `barmode` + "overlay" and on different axes (of the same axis type) + can have compatible bin settings. Note that histogram + and histogram2d* trace can share the same `bingroup` + cliponaxis + Determines whether the text nodes are clipped about the + subplot axes. To show the text nodes above axis lines + and tick labels, make sure to set `xaxis.layer` and + `yaxis.layer` to *below traces*. + constraintext + Constrain the size of text inside or outside a bar to + be no larger than the bar itself. + cumulative + :class:`plotly.graph_objects.histogram.Cumulative` + instance or dict with compatible properties + customdata + Assigns extra data each datum. This may be useful when + listening to hover, click and selection events. Note + that, "scatter" traces also appends customdata items in + the markers DOM elements + customdatasrc + Sets the source reference on Chart Studio Cloud for + `customdata`. + error_x + :class:`plotly.graph_objects.histogram.ErrorX` instance + or dict with compatible properties + error_y + :class:`plotly.graph_objects.histogram.ErrorY` instance + or dict with compatible properties + histfunc + Specifies the binning function used for this histogram + trace. If "count", the histogram values are computed by + counting the number of values lying inside each bin. If + "sum", "avg", "min", "max", the histogram values are + computed using the sum, the average, the minimum or the + maximum of the values lying inside each bin + respectively. + histnorm + Specifies the type of normalization used for this + histogram trace. If "", the span of each bar + corresponds to the number of occurrences (i.e. the + number of data points lying inside the bins). If + "percent" / "probability", the span of each bar + corresponds to the percentage / fraction of occurrences + with respect to the total number of sample points + (here, the sum of all bin HEIGHTS equals 100% / 1). If + "density", the span of each bar corresponds to the + number of occurrences in a bin divided by the size of + the bin interval (here, the sum of all bin AREAS equals + the total number of sample points). If *probability + density*, the area of each bar corresponds to the + probability that an event will fall into the + corresponding bin (here, the sum of all bin AREAS + equals 1). + hoverinfo + Determines which trace information appear on hover. If + `none` or `skip` are set, no information is displayed + upon hovering. But, if `none` is set, click and hover + events are still fired. + hoverinfosrc + Sets the source reference on Chart Studio Cloud for + `hoverinfo`. + hoverlabel + :class:`plotly.graph_objects.histogram.Hoverlabel` + instance or dict with compatible properties + hovertemplate + Template string used for rendering the information that + appear on hover box. Note that this will override + `hoverinfo`. Variables are inserted using %{variable}, + for example "y: %{y}" as well as %{xother}, {%_xother}, + {%_xother_}, {%xother_}. When showing info for several + points, "xother" will be added to those with different + x positions from the first point. An underscore before + or after "(x|y)other" will add a space on that side, + only when this field is shown. Numbers are formatted + using d3-format's syntax %{variable:d3-format}, for + example "Price: %{y:$.2f}". + https://github.com/d3/d3-format/tree/v1.4.5#d3-format + for details on the formatting syntax. Dates are + formatted using d3-time-format's syntax + %{variable|d3-time-format}, for example "Day: + %{2019-01-01|%A}". https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format for details on the + date formatting syntax. Variables that can't be found + will be replaced with the specifier. For example, a + template of "data: %{x}, %{y}" will result in a value + of "data: 1, %{y}" if x is 1 and y is missing. + Variables with an undefined value will be replaced with + the fallback value. The variables available in + `hovertemplate` are the ones emitted as event data + described at this link + https://plotly.com/javascript/plotlyjs-events/#event- + data. Additionally, all attributes that can be + specified per-point (the ones that are `arrayOk: true`) + are available. Finally, the template string has access + to variable `binNumber` Anything contained in tag + `` is displayed in the secondary box, for + example `%{fullData.name}`. To hide the + secondary box completely, use an empty tag + ``. + hovertemplatefallback + Fallback string that's displayed when a variable + referenced in a template is missing. If the boolean + value 'false' is passed in, the specifier with the + missing variable will be displayed. + hovertemplatesrc + Sets the source reference on Chart Studio Cloud for + `hovertemplate`. + hovertext + Same as `text`. + hovertextsrc + Sets the source reference on Chart Studio Cloud for + `hovertext`. + ids + Assigns id labels to each datum. These ids for object + constancy of data points during animation. Should be an + array of strings, not numbers or any other type. + idssrc + Sets the source reference on Chart Studio Cloud for + `ids`. + insidetextanchor + Determines if texts are kept at center or start/end + points in `textposition` "inside" mode. + insidetextfont + Sets the font used for `text` lying inside the bar. + legend + Sets the reference to a legend to show this trace in. + References to these legends are "legend", "legend2", + "legend3", etc. Settings for these legends are set in + the layout, under `layout.legend`, `layout.legend2`, + etc. + legendgroup + Sets the legend group for this trace. Traces and shapes + part of the same legend group hide/show at the same + time when toggling legend items. + legendgrouptitle + :class:`plotly.graph_objects.histogram.Legendgrouptitle + ` instance or dict with compatible properties + legendrank + Sets the legend rank for this trace. Items and groups + with smaller ranks are presented on top/left side while + with "reversed" `legend.traceorder` they are on + bottom/right side. The default legendrank is 1000, so + that you can use ranks less than 1000 to place certain + items before all unranked items, and ranks greater than + 1000 to go after all unranked items. When having + unranked or equal rank items shapes would be displayed + after traces i.e. according to their order in data and + layout. + legendwidth + Sets the width (in px or fraction) of the legend for + this trace. + marker + :class:`plotly.graph_objects.histogram.Marker` instance + or dict with compatible properties + meta + Assigns extra meta information associated with this + trace that can be used in various text attributes. + Attributes such as trace `name`, graph, axis and + colorbar `title.text`, annotation `text` + `rangeselector`, `updatemenues` and `sliders` `label` + text all support `meta`. To access the trace `meta` + values in an attribute in the same trace, simply use + `%{meta[i]}` where `i` is the index or key of the + `meta` item in question. To access trace `meta` in + layout attributes, use `%{data[n[.meta[i]}` where `i` + is the index or key of the `meta` and `n` is the trace + index. + metasrc + Sets the source reference on Chart Studio Cloud for + `meta`. + name + Sets the trace name. The trace name appears as the + legend item and on hover. + nbinsx + Specifies the maximum number of desired bins. This + value will be used in an algorithm that will decide the + optimal bin size such that the histogram best + visualizes the distribution of the data. Ignored if + `xbins.size` is provided. + nbinsy + Specifies the maximum number of desired bins. This + value will be used in an algorithm that will decide the + optimal bin size such that the histogram best + visualizes the distribution of the data. Ignored if + `ybins.size` is provided. + offsetgroup + Set several traces linked to the same position axis or + matching axes to the same offsetgroup where bars of the + same position coordinate will line up. + opacity + Sets the opacity of the trace. + orientation + Sets the orientation of the bars. With "v" ("h"), the + value of the each bar spans along the vertical + (horizontal). + outsidetextfont + Sets the font used for `text` lying outside the bar. + selected + :class:`plotly.graph_objects.histogram.Selected` + instance or dict with compatible properties + selectedpoints + Array containing integer indices of selected points. + Has an effect only for traces that support selections. + Note that an empty array means an empty selection where + the `unselected` are turned on for all points, whereas, + any other non-array values means no selection all where + the `selected` and `unselected` styles have no effect. + showlegend + Determines whether or not an item corresponding to this + trace is shown in the legend. + stream + :class:`plotly.graph_objects.histogram.Stream` instance + or dict with compatible properties + text + Sets hover text elements associated with each bar. If a + single string, the same string appears over all bars. + If an array of string, the items are mapped in order to + the this trace's coordinates. + textangle + Sets the angle of the tick labels with respect to the + bar. For example, a `tickangle` of -90 draws the tick + labels vertically. With "auto" the texts may + automatically be rotated to fit with the maximum size + in bars. + textfont + Sets the text font. + textposition + Specifies the location of the `text`. "inside" + positions `text` inside, next to the bar end (rotated + and scaled if needed). "outside" positions `text` + outside, next to the bar end (scaled if needed), unless + there is another bar stacked on this one, then the text + gets pushed inside. "auto" tries to position `text` + inside the bar, but if the bar is too small and no bar + is stacked on this one the text is moved outside. If + "none", no text appears. + textsrc + Sets the source reference on Chart Studio Cloud for + `text`. + texttemplate + Template string used for rendering the information text + that appears on points. Note that this will override + `textinfo`. Variables are inserted using %{variable}, + for example "y: %{y}". Numbers are formatted using + d3-format's syntax %{variable:d3-format}, for example + "Price: %{y:$.2f}". + https://github.com/d3/d3-format/tree/v1.4.5#d3-format + for details on the formatting syntax. Dates are + formatted using d3-time-format's syntax + %{variable|d3-time-format}, for example "Day: + %{2019-01-01|%A}". https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format for details on the + date formatting syntax. Variables that can't be found + will be replaced with the specifier. For example, a + template of "data: %{x}, %{y}" will result in a value + of "data: 1, %{y}" if x is 1 and y is missing. + Variables with an undefined value will be replaced with + the fallback value. All attributes that can be + specified per-point (the ones that are `arrayOk: true`) + are available. Finally, the template string has access + to variables `label` and `value`. + texttemplatefallback + Fallback string that's displayed when a variable + referenced in a template is missing. If the boolean + value 'false' is passed in, the specifier with the + missing variable will be displayed. + uid + Assign an id to this trace, Use this to provide object + constancy between traces during animations and + transitions. + uirevision + Controls persistence of some user-driven changes to the + trace: `constraintrange` in `parcoords` traces, as well + as some `editable: true` modifications such as `name` + and `colorbar.title`. Defaults to `layout.uirevision`. + Note that other user-driven trace attribute changes are + controlled by `layout` attributes: `trace.visible` is + controlled by `layout.legend.uirevision`, + `selectedpoints` is controlled by + `layout.selectionrevision`, and `colorbar.(x|y)` + (accessible with `config: {editable: true}`) is + controlled by `layout.editrevision`. Trace changes are + tracked by `uid`, which only falls back on trace index + if no `uid` is provided. So if your app can add/remove + traces before the end of the `data` array, such that + the same trace has a different index, you can still + preserve user-driven changes if you give each trace a + `uid` that stays with it as it moves. + unselected + :class:`plotly.graph_objects.histogram.Unselected` + instance or dict with compatible properties + visible + Determines whether or not this trace is visible. If + "legendonly", the trace is not drawn, but can appear as + a legend item (provided that the legend itself is + visible). + x + Sets the sample data to be binned on the x axis. + xaxis + Sets a reference between this trace's x coordinates and + a 2D cartesian x axis. If "x" (the default value), the + x coordinates refer to `layout.xaxis`. If "x2", the x + coordinates refer to `layout.xaxis2`, and so on. + xbins + :class:`plotly.graph_objects.histogram.XBins` instance + or dict with compatible properties + xcalendar + Sets the calendar system to use with `x` date data. + xhoverformat + Sets the hover text formatting rulefor `x` using d3 + formatting mini-languages which are very similar to + those in Python. For numbers, see: + https://github.com/d3/d3-format/tree/v1.4.5#d3-format. + And for dates see: https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format. We add two items to + d3's date formatter: "%h" for half of the year as a + decimal number as well as "%{n}f" for fractional + seconds with n digits. For example, *2016-10-13 + 09:15:23.456* with tickformat "%H~%M~%S.%2f" would + display *09~15~23.46*By default the values are + formatted using `xaxis.hoverformat`. + xsrc + Sets the source reference on Chart Studio Cloud for + `x`. + y + Sets the sample data to be binned on the y axis. + yaxis + Sets a reference between this trace's y coordinates and + a 2D cartesian y axis. If "y" (the default value), the + y coordinates refer to `layout.yaxis`. If "y2", the y + coordinates refer to `layout.yaxis2`, and so on. + ybins + :class:`plotly.graph_objects.histogram.YBins` instance + or dict with compatible properties + ycalendar + Sets the calendar system to use with `y` date data. + yhoverformat + Sets the hover text formatting rulefor `y` using d3 + formatting mini-languages which are very similar to + those in Python. For numbers, see: + https://github.com/d3/d3-format/tree/v1.4.5#d3-format. + And for dates see: https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format. We add two items to + d3's date formatter: "%h" for half of the year as a + decimal number as well as "%{n}f" for fractional + seconds with n digits. For example, *2016-10-13 + 09:15:23.456* with tickformat "%H~%M~%S.%2f" would + display *09~15~23.46*By default the values are + formatted using `yaxis.hoverformat`. + ysrc + Sets the source reference on Chart Studio Cloud for + `y`. + zorder + Sets the layer on which this trace is displayed, + relative to other SVG traces on the same subplot. SVG + traces with higher `zorder` appear in front of those + with lower `zorder`. + + Returns + ------- + Histogram + """ + super().__init__("histogram") + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + if arg is None: + arg = {} + elif isinstance(arg, self.__class__): + arg = arg.to_plotly_json() + elif isinstance(arg, dict): + arg = _copy.copy(arg) + else: + raise ValueError("""\ +The first argument to the plotly.graph_objs.Histogram +constructor must be a dict or +an instance of :class:`plotly.graph_objs.Histogram`""") + + self._skip_invalid = kwargs.pop("skip_invalid", False) + self._validate = kwargs.pop("_validate", True) + + self._set_property("alignmentgroup", arg, alignmentgroup) + self._set_property("autobinx", arg, autobinx) + self._set_property("autobiny", arg, autobiny) + self._set_property("bingroup", arg, bingroup) + self._set_property("cliponaxis", arg, cliponaxis) + self._set_property("constraintext", arg, constraintext) + self._set_property("cumulative", arg, cumulative) + self._set_property("customdata", arg, customdata) + self._set_property("customdatasrc", arg, customdatasrc) + self._set_property("error_x", arg, error_x) + self._set_property("error_y", arg, error_y) + self._set_property("histfunc", arg, histfunc) + self._set_property("histnorm", arg, histnorm) + self._set_property("hoverinfo", arg, hoverinfo) + self._set_property("hoverinfosrc", arg, hoverinfosrc) + self._set_property("hoverlabel", arg, hoverlabel) + self._set_property("hovertemplate", arg, hovertemplate) + self._set_property("hovertemplatefallback", arg, hovertemplatefallback) + self._set_property("hovertemplatesrc", arg, hovertemplatesrc) + self._set_property("hovertext", arg, hovertext) + self._set_property("hovertextsrc", arg, hovertextsrc) + self._set_property("ids", arg, ids) + self._set_property("idssrc", arg, idssrc) + self._set_property("insidetextanchor", arg, insidetextanchor) + self._set_property("insidetextfont", arg, insidetextfont) + self._set_property("legend", arg, legend) + self._set_property("legendgroup", arg, legendgroup) + self._set_property("legendgrouptitle", arg, legendgrouptitle) + self._set_property("legendrank", arg, legendrank) + self._set_property("legendwidth", arg, legendwidth) + self._set_property("marker", arg, marker) + self._set_property("meta", arg, meta) + self._set_property("metasrc", arg, metasrc) + self._set_property("name", arg, name) + self._set_property("nbinsx", arg, nbinsx) + self._set_property("nbinsy", arg, nbinsy) + self._set_property("offsetgroup", arg, offsetgroup) + self._set_property("opacity", arg, opacity) + self._set_property("orientation", arg, orientation) + self._set_property("outsidetextfont", arg, outsidetextfont) + self._set_property("selected", arg, selected) + self._set_property("selectedpoints", arg, selectedpoints) + self._set_property("showlegend", arg, showlegend) + self._set_property("stream", arg, stream) + self._set_property("text", arg, text) + self._set_property("textangle", arg, textangle) + self._set_property("textfont", arg, textfont) + self._set_property("textposition", arg, textposition) + self._set_property("textsrc", arg, textsrc) + self._set_property("texttemplate", arg, texttemplate) + self._set_property("texttemplatefallback", arg, texttemplatefallback) + self._set_property("uid", arg, uid) + self._set_property("uirevision", arg, uirevision) + self._set_property("unselected", arg, unselected) + self._set_property("visible", arg, visible) + self._set_property("x", arg, x) + self._set_property("xaxis", arg, xaxis) + self._set_property("xbins", arg, xbins) + self._set_property("xcalendar", arg, xcalendar) + self._set_property("xhoverformat", arg, xhoverformat) + self._set_property("xsrc", arg, xsrc) + self._set_property("y", arg, y) + self._set_property("yaxis", arg, yaxis) + self._set_property("ybins", arg, ybins) + self._set_property("ycalendar", arg, ycalendar) + self._set_property("yhoverformat", arg, yhoverformat) + self._set_property("ysrc", arg, ysrc) + self._set_property("zorder", arg, zorder) + + self._props["type"] = "histogram" + arg.pop("type", None) + self._process_kwargs(**dict(arg, **kwargs)) + self._skip_invalid = False diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/_histogram2d.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/_histogram2d.py new file mode 100644 index 0000000000000000000000000000000000000000..67a70a6db6a2b308ff059753965ab326a6182a7c --- /dev/null +++ b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/_histogram2d.py @@ -0,0 +1,2459 @@ +# --- THIS FILE IS AUTO-GENERATED --- +# Modifications will be overwitten the next time code generation run. + +from plotly.basedatatypes import BaseTraceType as _BaseTraceType +import copy as _copy + + +class Histogram2d(_BaseTraceType): + _parent_path_str = "" + _path_str = "histogram2d" + _valid_props = { + "autobinx", + "autobiny", + "autocolorscale", + "bingroup", + "coloraxis", + "colorbar", + "colorscale", + "customdata", + "customdatasrc", + "histfunc", + "histnorm", + "hoverinfo", + "hoverinfosrc", + "hoverlabel", + "hovertemplate", + "hovertemplatefallback", + "hovertemplatesrc", + "ids", + "idssrc", + "legend", + "legendgroup", + "legendgrouptitle", + "legendrank", + "legendwidth", + "marker", + "meta", + "metasrc", + "name", + "nbinsx", + "nbinsy", + "opacity", + "reversescale", + "showlegend", + "showscale", + "stream", + "textfont", + "texttemplate", + "texttemplatefallback", + "type", + "uid", + "uirevision", + "visible", + "x", + "xaxis", + "xbingroup", + "xbins", + "xcalendar", + "xgap", + "xhoverformat", + "xsrc", + "y", + "yaxis", + "ybingroup", + "ybins", + "ycalendar", + "ygap", + "yhoverformat", + "ysrc", + "z", + "zauto", + "zhoverformat", + "zmax", + "zmid", + "zmin", + "zsmooth", + "zsrc", + } + + @property + def autobinx(self): + """ + Obsolete: since v1.42 each bin attribute is auto-determined + separately and `autobinx` is not needed. However, we accept + `autobinx: true` or `false` and will update `xbins` accordingly + before deleting `autobinx` from the trace. + + The 'autobinx' property is a boolean and must be specified as: + - A boolean value: True or False + + Returns + ------- + bool + """ + return self["autobinx"] + + @autobinx.setter + def autobinx(self, val): + self["autobinx"] = val + + @property + def autobiny(self): + """ + Obsolete: since v1.42 each bin attribute is auto-determined + separately and `autobiny` is not needed. However, we accept + `autobiny: true` or `false` and will update `ybins` accordingly + before deleting `autobiny` from the trace. + + The 'autobiny' property is a boolean and must be specified as: + - A boolean value: True or False + + Returns + ------- + bool + """ + return self["autobiny"] + + @autobiny.setter + def autobiny(self, val): + self["autobiny"] = val + + @property + def autocolorscale(self): + """ + Determines whether the colorscale is a default palette + (`autocolorscale: true`) or the palette determined by + `colorscale`. In case `colorscale` is unspecified or + `autocolorscale` is true, the default palette will be chosen + according to whether numbers in the `color` array are all + positive, all negative or mixed. + + The 'autocolorscale' property is a boolean and must be specified as: + - A boolean value: True or False + + Returns + ------- + bool + """ + return self["autocolorscale"] + + @autocolorscale.setter + def autocolorscale(self, val): + self["autocolorscale"] = val + + @property + def bingroup(self): + """ + Set the `xbingroup` and `ybingroup` default prefix For example, + setting a `bingroup` of 1 on two histogram2d traces will make + them their x-bins and y-bins match separately. + + The 'bingroup' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["bingroup"] + + @bingroup.setter + def bingroup(self, val): + self["bingroup"] = val + + @property + def coloraxis(self): + """ + Sets a reference to a shared color axis. References to these + shared color axes are "coloraxis", "coloraxis2", "coloraxis3", + etc. Settings for these shared color axes are set in the + layout, under `layout.coloraxis`, `layout.coloraxis2`, etc. + Note that multiple color scales can be linked to the same color + axis. + + The 'coloraxis' property is an identifier of a particular + subplot, of type 'coloraxis', that may be specified as: + - the string 'coloraxis' optionally followed by an integer >= 1 + (e.g. 'coloraxis', 'coloraxis1', 'coloraxis2', 'coloraxis3', etc.) + + Returns + ------- + str + """ + return self["coloraxis"] + + @coloraxis.setter + def coloraxis(self, val): + self["coloraxis"] = val + + @property + def colorbar(self): + """ + The 'colorbar' property is an instance of ColorBar + that may be specified as: + - An instance of :class:`plotly.graph_objs.histogram2d.ColorBar` + - A dict of string/value properties that will be passed + to the ColorBar constructor + + Returns + ------- + plotly.graph_objs.histogram2d.ColorBar + """ + return self["colorbar"] + + @colorbar.setter + def colorbar(self, val): + self["colorbar"] = val + + @property + def colorscale(self): + """ + Sets the colorscale. The colorscale must be an array containing + arrays mapping a normalized value to an rgb, rgba, hex, hsl, + hsv, or named color string. At minimum, a mapping for the + lowest (0) and highest (1) values are required. For example, + `[[0, 'rgb(0,0,255)'], [1, 'rgb(255,0,0)']]`. To control the + bounds of the colorscale in color space, use `zmin` and `zmax`. + Alternatively, `colorscale` may be a palette name string of the + following list: Blackbody,Bluered,Blues,Cividis,Earth,Electric, + Greens,Greys,Hot,Jet,Picnic,Portland,Rainbow,RdBu,Reds,Viridis, + YlGnBu,YlOrRd. + + The 'colorscale' property is a colorscale and may be + specified as: + - A list of colors that will be spaced evenly to create the colorscale. + Many predefined colorscale lists are included in the sequential, diverging, + and cyclical modules in the plotly.colors package. + - A list of 2-element lists where the first element is the + normalized color level value (starting at 0 and ending at 1), + and the second item is a valid color string. + (e.g. [[0, 'green'], [0.5, 'red'], [1.0, 'rgb(0, 0, 255)']]) + - One of the following named colorscales: + ['aggrnyl', 'agsunset', 'algae', 'amp', 'armyrose', 'balance', + 'blackbody', 'bluered', 'blues', 'blugrn', 'bluyl', 'brbg', + 'brwnyl', 'bugn', 'bupu', 'burg', 'burgyl', 'cividis', 'curl', + 'darkmint', 'deep', 'delta', 'dense', 'earth', 'edge', 'electric', + 'emrld', 'fall', 'geyser', 'gnbu', 'gray', 'greens', 'greys', + 'haline', 'hot', 'hsv', 'ice', 'icefire', 'inferno', 'jet', + 'magenta', 'magma', 'matter', 'mint', 'mrybm', 'mygbm', 'oranges', + 'orrd', 'oryel', 'oxy', 'peach', 'phase', 'picnic', 'pinkyl', + 'piyg', 'plasma', 'plotly3', 'portland', 'prgn', 'pubu', 'pubugn', + 'puor', 'purd', 'purp', 'purples', 'purpor', 'rainbow', 'rdbu', + 'rdgy', 'rdpu', 'rdylbu', 'rdylgn', 'redor', 'reds', 'solar', + 'spectral', 'speed', 'sunset', 'sunsetdark', 'teal', 'tealgrn', + 'tealrose', 'tempo', 'temps', 'thermal', 'tropic', 'turbid', + 'turbo', 'twilight', 'viridis', 'ylgn', 'ylgnbu', 'ylorbr', + 'ylorrd']. + Appending '_r' to a named colorscale reverses it. + + Returns + ------- + str + """ + return self["colorscale"] + + @colorscale.setter + def colorscale(self, val): + self["colorscale"] = val + + @property + def customdata(self): + """ + Assigns extra data each datum. This may be useful when + listening to hover, click and selection events. Note that, + "scatter" traces also appends customdata items in the markers + DOM elements + + The 'customdata' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["customdata"] + + @customdata.setter + def customdata(self, val): + self["customdata"] = val + + @property + def customdatasrc(self): + """ + Sets the source reference on Chart Studio Cloud for + `customdata`. + + The 'customdatasrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["customdatasrc"] + + @customdatasrc.setter + def customdatasrc(self, val): + self["customdatasrc"] = val + + @property + def histfunc(self): + """ + Specifies the binning function used for this histogram trace. + If "count", the histogram values are computed by counting the + number of values lying inside each bin. If "sum", "avg", "min", + "max", the histogram values are computed using the sum, the + average, the minimum or the maximum of the values lying inside + each bin respectively. + + The 'histfunc' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['count', 'sum', 'avg', 'min', 'max'] + + Returns + ------- + Any + """ + return self["histfunc"] + + @histfunc.setter + def histfunc(self, val): + self["histfunc"] = val + + @property + def histnorm(self): + """ + Specifies the type of normalization used for this histogram + trace. If "", the span of each bar corresponds to the number of + occurrences (i.e. the number of data points lying inside the + bins). If "percent" / "probability", the span of each bar + corresponds to the percentage / fraction of occurrences with + respect to the total number of sample points (here, the sum of + all bin HEIGHTS equals 100% / 1). If "density", the span of + each bar corresponds to the number of occurrences in a bin + divided by the size of the bin interval (here, the sum of all + bin AREAS equals the total number of sample points). If + *probability density*, the area of each bar corresponds to the + probability that an event will fall into the corresponding bin + (here, the sum of all bin AREAS equals 1). + + The 'histnorm' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['', 'percent', 'probability', 'density', 'probability + density'] + + Returns + ------- + Any + """ + return self["histnorm"] + + @histnorm.setter + def histnorm(self, val): + self["histnorm"] = val + + @property + def hoverinfo(self): + """ + Determines which trace information appear on hover. If `none` + or `skip` are set, no information is displayed upon hovering. + But, if `none` is set, click and hover events are still fired. + + The 'hoverinfo' property is a flaglist and may be specified + as a string containing: + - Any combination of ['x', 'y', 'z', 'text', 'name'] joined with '+' characters + (e.g. 'x+y') + OR exactly one of ['all', 'none', 'skip'] (e.g. 'skip') + - A list or array of the above + + Returns + ------- + Any|numpy.ndarray + """ + return self["hoverinfo"] + + @hoverinfo.setter + def hoverinfo(self, val): + self["hoverinfo"] = val + + @property + def hoverinfosrc(self): + """ + Sets the source reference on Chart Studio Cloud for + `hoverinfo`. + + The 'hoverinfosrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["hoverinfosrc"] + + @hoverinfosrc.setter + def hoverinfosrc(self, val): + self["hoverinfosrc"] = val + + @property + def hoverlabel(self): + """ + The 'hoverlabel' property is an instance of Hoverlabel + that may be specified as: + - An instance of :class:`plotly.graph_objs.histogram2d.Hoverlabel` + - A dict of string/value properties that will be passed + to the Hoverlabel constructor + + Returns + ------- + plotly.graph_objs.histogram2d.Hoverlabel + """ + return self["hoverlabel"] + + @hoverlabel.setter + def hoverlabel(self, val): + self["hoverlabel"] = val + + @property + def hovertemplate(self): + """ + Template string used for rendering the information that appear + on hover box. Note that this will override `hoverinfo`. + Variables are inserted using %{variable}, for example "y: %{y}" + as well as %{xother}, {%_xother}, {%_xother_}, {%xother_}. When + showing info for several points, "xother" will be added to + those with different x positions from the first point. An + underscore before or after "(x|y)other" will add a space on + that side, only when this field is shown. Numbers are formatted + using d3-format's syntax %{variable:d3-format}, for example + "Price: %{y:$.2f}". + https://github.com/d3/d3-format/tree/v1.4.5#d3-format for + details on the formatting syntax. Dates are formatted using + d3-time-format's syntax %{variable|d3-time-format}, for example + "Day: %{2019-01-01|%A}". https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format for details on the date + formatting syntax. Variables that can't be found will be + replaced with the specifier. For example, a template of "data: + %{x}, %{y}" will result in a value of "data: 1, %{y}" if x is 1 + and y is missing. Variables with an undefined value will be + replaced with the fallback value. The variables available in + `hovertemplate` are the ones emitted as event data described at + this link https://plotly.com/javascript/plotlyjs-events/#event- + data. Additionally, all attributes that can be specified per- + point (the ones that are `arrayOk: true`) are available. + Finally, the template string has access to variable `z` + Anything contained in tag `` is displayed in the + secondary box, for example `%{fullData.name}`. + To hide the secondary box completely, use an empty tag + ``. + + The 'hovertemplate' property is a string and must be specified as: + - A string + - A number that will be converted to a string + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["hovertemplate"] + + @hovertemplate.setter + def hovertemplate(self, val): + self["hovertemplate"] = val + + @property + def hovertemplatefallback(self): + """ + Fallback string that's displayed when a variable referenced in + a template is missing. If the boolean value 'false' is passed + in, the specifier with the missing variable will be displayed. + + The 'hovertemplatefallback' property accepts values of any type + + Returns + ------- + Any + """ + return self["hovertemplatefallback"] + + @hovertemplatefallback.setter + def hovertemplatefallback(self, val): + self["hovertemplatefallback"] = val + + @property + def hovertemplatesrc(self): + """ + Sets the source reference on Chart Studio Cloud for + `hovertemplate`. + + The 'hovertemplatesrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["hovertemplatesrc"] + + @hovertemplatesrc.setter + def hovertemplatesrc(self, val): + self["hovertemplatesrc"] = val + + @property + def ids(self): + """ + Assigns id labels to each datum. These ids for object constancy + of data points during animation. Should be an array of strings, + not numbers or any other type. + + The 'ids' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["ids"] + + @ids.setter + def ids(self, val): + self["ids"] = val + + @property + def idssrc(self): + """ + Sets the source reference on Chart Studio Cloud for `ids`. + + The 'idssrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["idssrc"] + + @idssrc.setter + def idssrc(self, val): + self["idssrc"] = val + + @property + def legend(self): + """ + Sets the reference to a legend to show this trace in. + References to these legends are "legend", "legend2", "legend3", + etc. Settings for these legends are set in the layout, under + `layout.legend`, `layout.legend2`, etc. + + The 'legend' property is an identifier of a particular + subplot, of type 'legend', that may be specified as: + - the string 'legend' optionally followed by an integer >= 1 + (e.g. 'legend', 'legend1', 'legend2', 'legend3', etc.) + + Returns + ------- + str + """ + return self["legend"] + + @legend.setter + def legend(self, val): + self["legend"] = val + + @property + def legendgroup(self): + """ + Sets the legend group for this trace. Traces and shapes part of + the same legend group hide/show at the same time when toggling + legend items. + + The 'legendgroup' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["legendgroup"] + + @legendgroup.setter + def legendgroup(self, val): + self["legendgroup"] = val + + @property + def legendgrouptitle(self): + """ + The 'legendgrouptitle' property is an instance of Legendgrouptitle + that may be specified as: + - An instance of :class:`plotly.graph_objs.histogram2d.Legendgrouptitle` + - A dict of string/value properties that will be passed + to the Legendgrouptitle constructor + + Returns + ------- + plotly.graph_objs.histogram2d.Legendgrouptitle + """ + return self["legendgrouptitle"] + + @legendgrouptitle.setter + def legendgrouptitle(self, val): + self["legendgrouptitle"] = val + + @property + def legendrank(self): + """ + Sets the legend rank for this trace. Items and groups with + smaller ranks are presented on top/left side while with + "reversed" `legend.traceorder` they are on bottom/right side. + The default legendrank is 1000, so that you can use ranks less + than 1000 to place certain items before all unranked items, and + ranks greater than 1000 to go after all unranked items. When + having unranked or equal rank items shapes would be displayed + after traces i.e. according to their order in data and layout. + + The 'legendrank' property is a number and may be specified as: + - An int or float + + Returns + ------- + int|float + """ + return self["legendrank"] + + @legendrank.setter + def legendrank(self, val): + self["legendrank"] = val + + @property + def legendwidth(self): + """ + Sets the width (in px or fraction) of the legend for this + trace. + + The 'legendwidth' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["legendwidth"] + + @legendwidth.setter + def legendwidth(self, val): + self["legendwidth"] = val + + @property + def marker(self): + """ + The 'marker' property is an instance of Marker + that may be specified as: + - An instance of :class:`plotly.graph_objs.histogram2d.Marker` + - A dict of string/value properties that will be passed + to the Marker constructor + + Returns + ------- + plotly.graph_objs.histogram2d.Marker + """ + return self["marker"] + + @marker.setter + def marker(self, val): + self["marker"] = val + + @property + def meta(self): + """ + Assigns extra meta information associated with this trace that + can be used in various text attributes. Attributes such as + trace `name`, graph, axis and colorbar `title.text`, annotation + `text` `rangeselector`, `updatemenues` and `sliders` `label` + text all support `meta`. To access the trace `meta` values in + an attribute in the same trace, simply use `%{meta[i]}` where + `i` is the index or key of the `meta` item in question. To + access trace `meta` in layout attributes, use + `%{data[n[.meta[i]}` where `i` is the index or key of the + `meta` and `n` is the trace index. + + The 'meta' property accepts values of any type + + Returns + ------- + Any|numpy.ndarray + """ + return self["meta"] + + @meta.setter + def meta(self, val): + self["meta"] = val + + @property + def metasrc(self): + """ + Sets the source reference on Chart Studio Cloud for `meta`. + + The 'metasrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["metasrc"] + + @metasrc.setter + def metasrc(self, val): + self["metasrc"] = val + + @property + def name(self): + """ + Sets the trace name. The trace name appears as the legend item + and on hover. + + The 'name' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["name"] + + @name.setter + def name(self, val): + self["name"] = val + + @property + def nbinsx(self): + """ + Specifies the maximum number of desired bins. This value will + be used in an algorithm that will decide the optimal bin size + such that the histogram best visualizes the distribution of the + data. Ignored if `xbins.size` is provided. + + The 'nbinsx' property is a integer and may be specified as: + - An int (or float that will be cast to an int) + in the interval [0, 9223372036854775807] + + Returns + ------- + int + """ + return self["nbinsx"] + + @nbinsx.setter + def nbinsx(self, val): + self["nbinsx"] = val + + @property + def nbinsy(self): + """ + Specifies the maximum number of desired bins. This value will + be used in an algorithm that will decide the optimal bin size + such that the histogram best visualizes the distribution of the + data. Ignored if `ybins.size` is provided. + + The 'nbinsy' property is a integer and may be specified as: + - An int (or float that will be cast to an int) + in the interval [0, 9223372036854775807] + + Returns + ------- + int + """ + return self["nbinsy"] + + @nbinsy.setter + def nbinsy(self, val): + self["nbinsy"] = val + + @property + def opacity(self): + """ + Sets the opacity of the trace. + + The 'opacity' property is a number and may be specified as: + - An int or float in the interval [0, 1] + + Returns + ------- + int|float + """ + return self["opacity"] + + @opacity.setter + def opacity(self, val): + self["opacity"] = val + + @property + def reversescale(self): + """ + Reverses the color mapping if true. If true, `zmin` will + correspond to the last color in the array and `zmax` will + correspond to the first color. + + The 'reversescale' property is a boolean and must be specified as: + - A boolean value: True or False + + Returns + ------- + bool + """ + return self["reversescale"] + + @reversescale.setter + def reversescale(self, val): + self["reversescale"] = val + + @property + def showlegend(self): + """ + Determines whether or not an item corresponding to this trace + is shown in the legend. + + The 'showlegend' property is a boolean and must be specified as: + - A boolean value: True or False + + Returns + ------- + bool + """ + return self["showlegend"] + + @showlegend.setter + def showlegend(self, val): + self["showlegend"] = val + + @property + def showscale(self): + """ + Determines whether or not a colorbar is displayed for this + trace. + + The 'showscale' property is a boolean and must be specified as: + - A boolean value: True or False + + Returns + ------- + bool + """ + return self["showscale"] + + @showscale.setter + def showscale(self, val): + self["showscale"] = val + + @property + def stream(self): + """ + The 'stream' property is an instance of Stream + that may be specified as: + - An instance of :class:`plotly.graph_objs.histogram2d.Stream` + - A dict of string/value properties that will be passed + to the Stream constructor + + Returns + ------- + plotly.graph_objs.histogram2d.Stream + """ + return self["stream"] + + @stream.setter + def stream(self, val): + self["stream"] = val + + @property + def textfont(self): + """ + Sets the text font. + + The 'textfont' property is an instance of Textfont + that may be specified as: + - An instance of :class:`plotly.graph_objs.histogram2d.Textfont` + - A dict of string/value properties that will be passed + to the Textfont constructor + + Returns + ------- + plotly.graph_objs.histogram2d.Textfont + """ + return self["textfont"] + + @textfont.setter + def textfont(self, val): + self["textfont"] = val + + @property + def texttemplate(self): + """ + Template string used for rendering the information text that + appears on points. Note that this will override `textinfo`. + Variables are inserted using %{variable}, for example "y: + %{y}". Numbers are formatted using d3-format's syntax + %{variable:d3-format}, for example "Price: %{y:$.2f}". + https://github.com/d3/d3-format/tree/v1.4.5#d3-format for + details on the formatting syntax. Dates are formatted using + d3-time-format's syntax %{variable|d3-time-format}, for example + "Day: %{2019-01-01|%A}". https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format for details on the date + formatting syntax. Variables that can't be found will be + replaced with the specifier. For example, a template of "data: + %{x}, %{y}" will result in a value of "data: 1, %{y}" if x is 1 + and y is missing. Variables with an undefined value will be + replaced with the fallback value. All attributes that can be + specified per-point (the ones that are `arrayOk: true`) are + available. Finally, the template string has access to variable + `z` + + The 'texttemplate' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["texttemplate"] + + @texttemplate.setter + def texttemplate(self, val): + self["texttemplate"] = val + + @property + def texttemplatefallback(self): + """ + Fallback string that's displayed when a variable referenced in + a template is missing. If the boolean value 'false' is passed + in, the specifier with the missing variable will be displayed. + + The 'texttemplatefallback' property accepts values of any type + + Returns + ------- + Any + """ + return self["texttemplatefallback"] + + @texttemplatefallback.setter + def texttemplatefallback(self, val): + self["texttemplatefallback"] = val + + @property + def uid(self): + """ + Assign an id to this trace, Use this to provide object + constancy between traces during animations and transitions. + + The 'uid' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["uid"] + + @uid.setter + def uid(self, val): + self["uid"] = val + + @property + def uirevision(self): + """ + Controls persistence of some user-driven changes to the trace: + `constraintrange` in `parcoords` traces, as well as some + `editable: true` modifications such as `name` and + `colorbar.title`. Defaults to `layout.uirevision`. Note that + other user-driven trace attribute changes are controlled by + `layout` attributes: `trace.visible` is controlled by + `layout.legend.uirevision`, `selectedpoints` is controlled by + `layout.selectionrevision`, and `colorbar.(x|y)` (accessible + with `config: {editable: true}`) is controlled by + `layout.editrevision`. Trace changes are tracked by `uid`, + which only falls back on trace index if no `uid` is provided. + So if your app can add/remove traces before the end of the + `data` array, such that the same trace has a different index, + you can still preserve user-driven changes if you give each + trace a `uid` that stays with it as it moves. + + The 'uirevision' property accepts values of any type + + Returns + ------- + Any + """ + return self["uirevision"] + + @uirevision.setter + def uirevision(self, val): + self["uirevision"] = val + + @property + def visible(self): + """ + Determines whether or not this trace is visible. If + "legendonly", the trace is not drawn, but can appear as a + legend item (provided that the legend itself is visible). + + The 'visible' property is an enumeration that may be specified as: + - One of the following enumeration values: + [True, False, 'legendonly'] + + Returns + ------- + Any + """ + return self["visible"] + + @visible.setter + def visible(self, val): + self["visible"] = val + + @property + def x(self): + """ + Sets the sample data to be binned on the x axis. + + The 'x' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["x"] + + @x.setter + def x(self, val): + self["x"] = val + + @property + def xaxis(self): + """ + Sets a reference between this trace's x coordinates and a 2D + cartesian x axis. If "x" (the default value), the x coordinates + refer to `layout.xaxis`. If "x2", the x coordinates refer to + `layout.xaxis2`, and so on. + + The 'xaxis' property is an identifier of a particular + subplot, of type 'x', that may be specified as: + - the string 'x' optionally followed by an integer >= 1 + (e.g. 'x', 'x1', 'x2', 'x3', etc.) + + Returns + ------- + str + """ + return self["xaxis"] + + @xaxis.setter + def xaxis(self, val): + self["xaxis"] = val + + @property + def xbingroup(self): + """ + Set a group of histogram traces which will have compatible + x-bin settings. Using `xbingroup`, histogram2d and + histogram2dcontour traces (on axes of the same axis type) can + have compatible x-bin settings. Note that the same `xbingroup` + value can be used to set (1D) histogram `bingroup` + + The 'xbingroup' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["xbingroup"] + + @xbingroup.setter + def xbingroup(self, val): + self["xbingroup"] = val + + @property + def xbins(self): + """ + The 'xbins' property is an instance of XBins + that may be specified as: + - An instance of :class:`plotly.graph_objs.histogram2d.XBins` + - A dict of string/value properties that will be passed + to the XBins constructor + + Returns + ------- + plotly.graph_objs.histogram2d.XBins + """ + return self["xbins"] + + @xbins.setter + def xbins(self, val): + self["xbins"] = val + + @property + def xcalendar(self): + """ + Sets the calendar system to use with `x` date data. + + The 'xcalendar' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['chinese', 'coptic', 'discworld', 'ethiopian', + 'gregorian', 'hebrew', 'islamic', 'jalali', 'julian', + 'mayan', 'nanakshahi', 'nepali', 'persian', 'taiwan', + 'thai', 'ummalqura'] + + Returns + ------- + Any + """ + return self["xcalendar"] + + @xcalendar.setter + def xcalendar(self, val): + self["xcalendar"] = val + + @property + def xgap(self): + """ + Sets the horizontal gap (in pixels) between bricks. + + The 'xgap' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["xgap"] + + @xgap.setter + def xgap(self, val): + self["xgap"] = val + + @property + def xhoverformat(self): + """ + Sets the hover text formatting rulefor `x` using d3 formatting + mini-languages which are very similar to those in Python. For + numbers, see: + https://github.com/d3/d3-format/tree/v1.4.5#d3-format. And for + dates see: https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format. We add two items to d3's date + formatter: "%h" for half of the year as a decimal number as + well as "%{n}f" for fractional seconds with n digits. For + example, *2016-10-13 09:15:23.456* with tickformat + "%H~%M~%S.%2f" would display *09~15~23.46*By default the values + are formatted using `xaxis.hoverformat`. + + The 'xhoverformat' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["xhoverformat"] + + @xhoverformat.setter + def xhoverformat(self, val): + self["xhoverformat"] = val + + @property + def xsrc(self): + """ + Sets the source reference on Chart Studio Cloud for `x`. + + The 'xsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["xsrc"] + + @xsrc.setter + def xsrc(self, val): + self["xsrc"] = val + + @property + def y(self): + """ + Sets the sample data to be binned on the y axis. + + The 'y' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["y"] + + @y.setter + def y(self, val): + self["y"] = val + + @property + def yaxis(self): + """ + Sets a reference between this trace's y coordinates and a 2D + cartesian y axis. If "y" (the default value), the y coordinates + refer to `layout.yaxis`. If "y2", the y coordinates refer to + `layout.yaxis2`, and so on. + + The 'yaxis' property is an identifier of a particular + subplot, of type 'y', that may be specified as: + - the string 'y' optionally followed by an integer >= 1 + (e.g. 'y', 'y1', 'y2', 'y3', etc.) + + Returns + ------- + str + """ + return self["yaxis"] + + @yaxis.setter + def yaxis(self, val): + self["yaxis"] = val + + @property + def ybingroup(self): + """ + Set a group of histogram traces which will have compatible + y-bin settings. Using `ybingroup`, histogram2d and + histogram2dcontour traces (on axes of the same axis type) can + have compatible y-bin settings. Note that the same `ybingroup` + value can be used to set (1D) histogram `bingroup` + + The 'ybingroup' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["ybingroup"] + + @ybingroup.setter + def ybingroup(self, val): + self["ybingroup"] = val + + @property + def ybins(self): + """ + The 'ybins' property is an instance of YBins + that may be specified as: + - An instance of :class:`plotly.graph_objs.histogram2d.YBins` + - A dict of string/value properties that will be passed + to the YBins constructor + + Returns + ------- + plotly.graph_objs.histogram2d.YBins + """ + return self["ybins"] + + @ybins.setter + def ybins(self, val): + self["ybins"] = val + + @property + def ycalendar(self): + """ + Sets the calendar system to use with `y` date data. + + The 'ycalendar' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['chinese', 'coptic', 'discworld', 'ethiopian', + 'gregorian', 'hebrew', 'islamic', 'jalali', 'julian', + 'mayan', 'nanakshahi', 'nepali', 'persian', 'taiwan', + 'thai', 'ummalqura'] + + Returns + ------- + Any + """ + return self["ycalendar"] + + @ycalendar.setter + def ycalendar(self, val): + self["ycalendar"] = val + + @property + def ygap(self): + """ + Sets the vertical gap (in pixels) between bricks. + + The 'ygap' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["ygap"] + + @ygap.setter + def ygap(self, val): + self["ygap"] = val + + @property + def yhoverformat(self): + """ + Sets the hover text formatting rulefor `y` using d3 formatting + mini-languages which are very similar to those in Python. For + numbers, see: + https://github.com/d3/d3-format/tree/v1.4.5#d3-format. And for + dates see: https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format. We add two items to d3's date + formatter: "%h" for half of the year as a decimal number as + well as "%{n}f" for fractional seconds with n digits. For + example, *2016-10-13 09:15:23.456* with tickformat + "%H~%M~%S.%2f" would display *09~15~23.46*By default the values + are formatted using `yaxis.hoverformat`. + + The 'yhoverformat' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["yhoverformat"] + + @yhoverformat.setter + def yhoverformat(self, val): + self["yhoverformat"] = val + + @property + def ysrc(self): + """ + Sets the source reference on Chart Studio Cloud for `y`. + + The 'ysrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["ysrc"] + + @ysrc.setter + def ysrc(self, val): + self["ysrc"] = val + + @property + def z(self): + """ + Sets the aggregation data. + + The 'z' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["z"] + + @z.setter + def z(self, val): + self["z"] = val + + @property + def zauto(self): + """ + Determines whether or not the color domain is computed with + respect to the input data (here in `z`) or the bounds set in + `zmin` and `zmax` Defaults to `false` when `zmin` and `zmax` + are set by the user. + + The 'zauto' property is a boolean and must be specified as: + - A boolean value: True or False + + Returns + ------- + bool + """ + return self["zauto"] + + @zauto.setter + def zauto(self, val): + self["zauto"] = val + + @property + def zhoverformat(self): + """ + Sets the hover text formatting rulefor `z` using d3 formatting + mini-languages which are very similar to those in Python. For + numbers, see: + https://github.com/d3/d3-format/tree/v1.4.5#d3-format.By + default the values are formatted using generic number format. + + The 'zhoverformat' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["zhoverformat"] + + @zhoverformat.setter + def zhoverformat(self, val): + self["zhoverformat"] = val + + @property + def zmax(self): + """ + Sets the upper bound of the color domain. Value should have the + same units as in `z` and if set, `zmin` must be set as well. + + The 'zmax' property is a number and may be specified as: + - An int or float + + Returns + ------- + int|float + """ + return self["zmax"] + + @zmax.setter + def zmax(self, val): + self["zmax"] = val + + @property + def zmid(self): + """ + Sets the mid-point of the color domain by scaling `zmin` and/or + `zmax` to be equidistant to this point. Value should have the + same units as in `z`. Has no effect when `zauto` is `false`. + + The 'zmid' property is a number and may be specified as: + - An int or float + + Returns + ------- + int|float + """ + return self["zmid"] + + @zmid.setter + def zmid(self, val): + self["zmid"] = val + + @property + def zmin(self): + """ + Sets the lower bound of the color domain. Value should have the + same units as in `z` and if set, `zmax` must be set as well. + + The 'zmin' property is a number and may be specified as: + - An int or float + + Returns + ------- + int|float + """ + return self["zmin"] + + @zmin.setter + def zmin(self, val): + self["zmin"] = val + + @property + def zsmooth(self): + """ + Picks a smoothing algorithm use to smooth `z` data. + + The 'zsmooth' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['fast', 'best', False] + + Returns + ------- + Any + """ + return self["zsmooth"] + + @zsmooth.setter + def zsmooth(self, val): + self["zsmooth"] = val + + @property + def zsrc(self): + """ + Sets the source reference on Chart Studio Cloud for `z`. + + The 'zsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["zsrc"] + + @zsrc.setter + def zsrc(self, val): + self["zsrc"] = val + + @property + def type(self): + return self._props["type"] + + @property + def _prop_descriptions(self): + return """\ + autobinx + Obsolete: since v1.42 each bin attribute is auto- + determined separately and `autobinx` is not needed. + However, we accept `autobinx: true` or `false` and will + update `xbins` accordingly before deleting `autobinx` + from the trace. + autobiny + Obsolete: since v1.42 each bin attribute is auto- + determined separately and `autobiny` is not needed. + However, we accept `autobiny: true` or `false` and will + update `ybins` accordingly before deleting `autobiny` + from the trace. + autocolorscale + Determines whether the colorscale is a default palette + (`autocolorscale: true`) or the palette determined by + `colorscale`. In case `colorscale` is unspecified or + `autocolorscale` is true, the default palette will be + chosen according to whether numbers in the `color` + array are all positive, all negative or mixed. + bingroup + Set the `xbingroup` and `ybingroup` default prefix For + example, setting a `bingroup` of 1 on two histogram2d + traces will make them their x-bins and y-bins match + separately. + coloraxis + Sets a reference to a shared color axis. References to + these shared color axes are "coloraxis", "coloraxis2", + "coloraxis3", etc. Settings for these shared color axes + are set in the layout, under `layout.coloraxis`, + `layout.coloraxis2`, etc. Note that multiple color + scales can be linked to the same color axis. + colorbar + :class:`plotly.graph_objects.histogram2d.ColorBar` + instance or dict with compatible properties + colorscale + Sets the colorscale. The colorscale must be an array + containing arrays mapping a normalized value to an rgb, + rgba, hex, hsl, hsv, or named color string. At minimum, + a mapping for the lowest (0) and highest (1) values are + required. For example, `[[0, 'rgb(0,0,255)'], [1, + 'rgb(255,0,0)']]`. To control the bounds of the + colorscale in color space, use `zmin` and `zmax`. + Alternatively, `colorscale` may be a palette name + string of the following list: Blackbody,Bluered,Blues,C + ividis,Earth,Electric,Greens,Greys,Hot,Jet,Picnic,Portl + and,Rainbow,RdBu,Reds,Viridis,YlGnBu,YlOrRd. + customdata + Assigns extra data each datum. This may be useful when + listening to hover, click and selection events. Note + that, "scatter" traces also appends customdata items in + the markers DOM elements + customdatasrc + Sets the source reference on Chart Studio Cloud for + `customdata`. + histfunc + Specifies the binning function used for this histogram + trace. If "count", the histogram values are computed by + counting the number of values lying inside each bin. If + "sum", "avg", "min", "max", the histogram values are + computed using the sum, the average, the minimum or the + maximum of the values lying inside each bin + respectively. + histnorm + Specifies the type of normalization used for this + histogram trace. If "", the span of each bar + corresponds to the number of occurrences (i.e. the + number of data points lying inside the bins). If + "percent" / "probability", the span of each bar + corresponds to the percentage / fraction of occurrences + with respect to the total number of sample points + (here, the sum of all bin HEIGHTS equals 100% / 1). If + "density", the span of each bar corresponds to the + number of occurrences in a bin divided by the size of + the bin interval (here, the sum of all bin AREAS equals + the total number of sample points). If *probability + density*, the area of each bar corresponds to the + probability that an event will fall into the + corresponding bin (here, the sum of all bin AREAS + equals 1). + hoverinfo + Determines which trace information appear on hover. If + `none` or `skip` are set, no information is displayed + upon hovering. But, if `none` is set, click and hover + events are still fired. + hoverinfosrc + Sets the source reference on Chart Studio Cloud for + `hoverinfo`. + hoverlabel + :class:`plotly.graph_objects.histogram2d.Hoverlabel` + instance or dict with compatible properties + hovertemplate + Template string used for rendering the information that + appear on hover box. Note that this will override + `hoverinfo`. Variables are inserted using %{variable}, + for example "y: %{y}" as well as %{xother}, {%_xother}, + {%_xother_}, {%xother_}. When showing info for several + points, "xother" will be added to those with different + x positions from the first point. An underscore before + or after "(x|y)other" will add a space on that side, + only when this field is shown. Numbers are formatted + using d3-format's syntax %{variable:d3-format}, for + example "Price: %{y:$.2f}". + https://github.com/d3/d3-format/tree/v1.4.5#d3-format + for details on the formatting syntax. Dates are + formatted using d3-time-format's syntax + %{variable|d3-time-format}, for example "Day: + %{2019-01-01|%A}". https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format for details on the + date formatting syntax. Variables that can't be found + will be replaced with the specifier. For example, a + template of "data: %{x}, %{y}" will result in a value + of "data: 1, %{y}" if x is 1 and y is missing. + Variables with an undefined value will be replaced with + the fallback value. The variables available in + `hovertemplate` are the ones emitted as event data + described at this link + https://plotly.com/javascript/plotlyjs-events/#event- + data. Additionally, all attributes that can be + specified per-point (the ones that are `arrayOk: true`) + are available. Finally, the template string has access + to variable `z` Anything contained in tag `` is + displayed in the secondary box, for example + `%{fullData.name}`. To hide the + secondary box completely, use an empty tag + ``. + hovertemplatefallback + Fallback string that's displayed when a variable + referenced in a template is missing. If the boolean + value 'false' is passed in, the specifier with the + missing variable will be displayed. + hovertemplatesrc + Sets the source reference on Chart Studio Cloud for + `hovertemplate`. + ids + Assigns id labels to each datum. These ids for object + constancy of data points during animation. Should be an + array of strings, not numbers or any other type. + idssrc + Sets the source reference on Chart Studio Cloud for + `ids`. + legend + Sets the reference to a legend to show this trace in. + References to these legends are "legend", "legend2", + "legend3", etc. Settings for these legends are set in + the layout, under `layout.legend`, `layout.legend2`, + etc. + legendgroup + Sets the legend group for this trace. Traces and shapes + part of the same legend group hide/show at the same + time when toggling legend items. + legendgrouptitle + :class:`plotly.graph_objects.histogram2d.Legendgrouptit + le` instance or dict with compatible properties + legendrank + Sets the legend rank for this trace. Items and groups + with smaller ranks are presented on top/left side while + with "reversed" `legend.traceorder` they are on + bottom/right side. The default legendrank is 1000, so + that you can use ranks less than 1000 to place certain + items before all unranked items, and ranks greater than + 1000 to go after all unranked items. When having + unranked or equal rank items shapes would be displayed + after traces i.e. according to their order in data and + layout. + legendwidth + Sets the width (in px or fraction) of the legend for + this trace. + marker + :class:`plotly.graph_objects.histogram2d.Marker` + instance or dict with compatible properties + meta + Assigns extra meta information associated with this + trace that can be used in various text attributes. + Attributes such as trace `name`, graph, axis and + colorbar `title.text`, annotation `text` + `rangeselector`, `updatemenues` and `sliders` `label` + text all support `meta`. To access the trace `meta` + values in an attribute in the same trace, simply use + `%{meta[i]}` where `i` is the index or key of the + `meta` item in question. To access trace `meta` in + layout attributes, use `%{data[n[.meta[i]}` where `i` + is the index or key of the `meta` and `n` is the trace + index. + metasrc + Sets the source reference on Chart Studio Cloud for + `meta`. + name + Sets the trace name. The trace name appears as the + legend item and on hover. + nbinsx + Specifies the maximum number of desired bins. This + value will be used in an algorithm that will decide the + optimal bin size such that the histogram best + visualizes the distribution of the data. Ignored if + `xbins.size` is provided. + nbinsy + Specifies the maximum number of desired bins. This + value will be used in an algorithm that will decide the + optimal bin size such that the histogram best + visualizes the distribution of the data. Ignored if + `ybins.size` is provided. + opacity + Sets the opacity of the trace. + reversescale + Reverses the color mapping if true. If true, `zmin` + will correspond to the last color in the array and + `zmax` will correspond to the first color. + showlegend + Determines whether or not an item corresponding to this + trace is shown in the legend. + showscale + Determines whether or not a colorbar is displayed for + this trace. + stream + :class:`plotly.graph_objects.histogram2d.Stream` + instance or dict with compatible properties + textfont + Sets the text font. + texttemplate + Template string used for rendering the information text + that appears on points. Note that this will override + `textinfo`. Variables are inserted using %{variable}, + for example "y: %{y}". Numbers are formatted using + d3-format's syntax %{variable:d3-format}, for example + "Price: %{y:$.2f}". + https://github.com/d3/d3-format/tree/v1.4.5#d3-format + for details on the formatting syntax. Dates are + formatted using d3-time-format's syntax + %{variable|d3-time-format}, for example "Day: + %{2019-01-01|%A}". https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format for details on the + date formatting syntax. Variables that can't be found + will be replaced with the specifier. For example, a + template of "data: %{x}, %{y}" will result in a value + of "data: 1, %{y}" if x is 1 and y is missing. + Variables with an undefined value will be replaced with + the fallback value. All attributes that can be + specified per-point (the ones that are `arrayOk: true`) + are available. Finally, the template string has access + to variable `z` + texttemplatefallback + Fallback string that's displayed when a variable + referenced in a template is missing. If the boolean + value 'false' is passed in, the specifier with the + missing variable will be displayed. + uid + Assign an id to this trace, Use this to provide object + constancy between traces during animations and + transitions. + uirevision + Controls persistence of some user-driven changes to the + trace: `constraintrange` in `parcoords` traces, as well + as some `editable: true` modifications such as `name` + and `colorbar.title`. Defaults to `layout.uirevision`. + Note that other user-driven trace attribute changes are + controlled by `layout` attributes: `trace.visible` is + controlled by `layout.legend.uirevision`, + `selectedpoints` is controlled by + `layout.selectionrevision`, and `colorbar.(x|y)` + (accessible with `config: {editable: true}`) is + controlled by `layout.editrevision`. Trace changes are + tracked by `uid`, which only falls back on trace index + if no `uid` is provided. So if your app can add/remove + traces before the end of the `data` array, such that + the same trace has a different index, you can still + preserve user-driven changes if you give each trace a + `uid` that stays with it as it moves. + visible + Determines whether or not this trace is visible. If + "legendonly", the trace is not drawn, but can appear as + a legend item (provided that the legend itself is + visible). + x + Sets the sample data to be binned on the x axis. + xaxis + Sets a reference between this trace's x coordinates and + a 2D cartesian x axis. If "x" (the default value), the + x coordinates refer to `layout.xaxis`. If "x2", the x + coordinates refer to `layout.xaxis2`, and so on. + xbingroup + Set a group of histogram traces which will have + compatible x-bin settings. Using `xbingroup`, + histogram2d and histogram2dcontour traces (on axes of + the same axis type) can have compatible x-bin settings. + Note that the same `xbingroup` value can be used to set + (1D) histogram `bingroup` + xbins + :class:`plotly.graph_objects.histogram2d.XBins` + instance or dict with compatible properties + xcalendar + Sets the calendar system to use with `x` date data. + xgap + Sets the horizontal gap (in pixels) between bricks. + xhoverformat + Sets the hover text formatting rulefor `x` using d3 + formatting mini-languages which are very similar to + those in Python. For numbers, see: + https://github.com/d3/d3-format/tree/v1.4.5#d3-format. + And for dates see: https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format. We add two items to + d3's date formatter: "%h" for half of the year as a + decimal number as well as "%{n}f" for fractional + seconds with n digits. For example, *2016-10-13 + 09:15:23.456* with tickformat "%H~%M~%S.%2f" would + display *09~15~23.46*By default the values are + formatted using `xaxis.hoverformat`. + xsrc + Sets the source reference on Chart Studio Cloud for + `x`. + y + Sets the sample data to be binned on the y axis. + yaxis + Sets a reference between this trace's y coordinates and + a 2D cartesian y axis. If "y" (the default value), the + y coordinates refer to `layout.yaxis`. If "y2", the y + coordinates refer to `layout.yaxis2`, and so on. + ybingroup + Set a group of histogram traces which will have + compatible y-bin settings. Using `ybingroup`, + histogram2d and histogram2dcontour traces (on axes of + the same axis type) can have compatible y-bin settings. + Note that the same `ybingroup` value can be used to set + (1D) histogram `bingroup` + ybins + :class:`plotly.graph_objects.histogram2d.YBins` + instance or dict with compatible properties + ycalendar + Sets the calendar system to use with `y` date data. + ygap + Sets the vertical gap (in pixels) between bricks. + yhoverformat + Sets the hover text formatting rulefor `y` using d3 + formatting mini-languages which are very similar to + those in Python. For numbers, see: + https://github.com/d3/d3-format/tree/v1.4.5#d3-format. + And for dates see: https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format. We add two items to + d3's date formatter: "%h" for half of the year as a + decimal number as well as "%{n}f" for fractional + seconds with n digits. For example, *2016-10-13 + 09:15:23.456* with tickformat "%H~%M~%S.%2f" would + display *09~15~23.46*By default the values are + formatted using `yaxis.hoverformat`. + ysrc + Sets the source reference on Chart Studio Cloud for + `y`. + z + Sets the aggregation data. + zauto + Determines whether or not the color domain is computed + with respect to the input data (here in `z`) or the + bounds set in `zmin` and `zmax` Defaults to `false` + when `zmin` and `zmax` are set by the user. + zhoverformat + Sets the hover text formatting rulefor `z` using d3 + formatting mini-languages which are very similar to + those in Python. For numbers, see: https://github.com/d + 3/d3-format/tree/v1.4.5#d3-format.By default the values + are formatted using generic number format. + zmax + Sets the upper bound of the color domain. Value should + have the same units as in `z` and if set, `zmin` must + be set as well. + zmid + Sets the mid-point of the color domain by scaling + `zmin` and/or `zmax` to be equidistant to this point. + Value should have the same units as in `z`. Has no + effect when `zauto` is `false`. + zmin + Sets the lower bound of the color domain. Value should + have the same units as in `z` and if set, `zmax` must + be set as well. + zsmooth + Picks a smoothing algorithm use to smooth `z` data. + zsrc + Sets the source reference on Chart Studio Cloud for + `z`. + """ + + def __init__( + self, + arg=None, + autobinx=None, + autobiny=None, + autocolorscale=None, + bingroup=None, + coloraxis=None, + colorbar=None, + colorscale=None, + customdata=None, + customdatasrc=None, + histfunc=None, + histnorm=None, + hoverinfo=None, + hoverinfosrc=None, + hoverlabel=None, + hovertemplate=None, + hovertemplatefallback=None, + hovertemplatesrc=None, + ids=None, + idssrc=None, + legend=None, + legendgroup=None, + legendgrouptitle=None, + legendrank=None, + legendwidth=None, + marker=None, + meta=None, + metasrc=None, + name=None, + nbinsx=None, + nbinsy=None, + opacity=None, + reversescale=None, + showlegend=None, + showscale=None, + stream=None, + textfont=None, + texttemplate=None, + texttemplatefallback=None, + uid=None, + uirevision=None, + visible=None, + x=None, + xaxis=None, + xbingroup=None, + xbins=None, + xcalendar=None, + xgap=None, + xhoverformat=None, + xsrc=None, + y=None, + yaxis=None, + ybingroup=None, + ybins=None, + ycalendar=None, + ygap=None, + yhoverformat=None, + ysrc=None, + z=None, + zauto=None, + zhoverformat=None, + zmax=None, + zmid=None, + zmin=None, + zsmooth=None, + zsrc=None, + **kwargs, + ): + """ + Construct a new Histogram2d object + + The sample data from which statistics are computed is set in + `x` and `y` (where `x` and `y` represent marginal + distributions, binning is set in `xbins` and `ybins` in this + case) or `z` (where `z` represent the 2D distribution and + binning set, binning is set by `x` and `y` in this case). The + resulting distribution is visualized as a heatmap. + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of :class:`plotly.graph_objs.Histogram2d` + autobinx + Obsolete: since v1.42 each bin attribute is auto- + determined separately and `autobinx` is not needed. + However, we accept `autobinx: true` or `false` and will + update `xbins` accordingly before deleting `autobinx` + from the trace. + autobiny + Obsolete: since v1.42 each bin attribute is auto- + determined separately and `autobiny` is not needed. + However, we accept `autobiny: true` or `false` and will + update `ybins` accordingly before deleting `autobiny` + from the trace. + autocolorscale + Determines whether the colorscale is a default palette + (`autocolorscale: true`) or the palette determined by + `colorscale`. In case `colorscale` is unspecified or + `autocolorscale` is true, the default palette will be + chosen according to whether numbers in the `color` + array are all positive, all negative or mixed. + bingroup + Set the `xbingroup` and `ybingroup` default prefix For + example, setting a `bingroup` of 1 on two histogram2d + traces will make them their x-bins and y-bins match + separately. + coloraxis + Sets a reference to a shared color axis. References to + these shared color axes are "coloraxis", "coloraxis2", + "coloraxis3", etc. Settings for these shared color axes + are set in the layout, under `layout.coloraxis`, + `layout.coloraxis2`, etc. Note that multiple color + scales can be linked to the same color axis. + colorbar + :class:`plotly.graph_objects.histogram2d.ColorBar` + instance or dict with compatible properties + colorscale + Sets the colorscale. The colorscale must be an array + containing arrays mapping a normalized value to an rgb, + rgba, hex, hsl, hsv, or named color string. At minimum, + a mapping for the lowest (0) and highest (1) values are + required. For example, `[[0, 'rgb(0,0,255)'], [1, + 'rgb(255,0,0)']]`. To control the bounds of the + colorscale in color space, use `zmin` and `zmax`. + Alternatively, `colorscale` may be a palette name + string of the following list: Blackbody,Bluered,Blues,C + ividis,Earth,Electric,Greens,Greys,Hot,Jet,Picnic,Portl + and,Rainbow,RdBu,Reds,Viridis,YlGnBu,YlOrRd. + customdata + Assigns extra data each datum. This may be useful when + listening to hover, click and selection events. Note + that, "scatter" traces also appends customdata items in + the markers DOM elements + customdatasrc + Sets the source reference on Chart Studio Cloud for + `customdata`. + histfunc + Specifies the binning function used for this histogram + trace. If "count", the histogram values are computed by + counting the number of values lying inside each bin. If + "sum", "avg", "min", "max", the histogram values are + computed using the sum, the average, the minimum or the + maximum of the values lying inside each bin + respectively. + histnorm + Specifies the type of normalization used for this + histogram trace. If "", the span of each bar + corresponds to the number of occurrences (i.e. the + number of data points lying inside the bins). If + "percent" / "probability", the span of each bar + corresponds to the percentage / fraction of occurrences + with respect to the total number of sample points + (here, the sum of all bin HEIGHTS equals 100% / 1). If + "density", the span of each bar corresponds to the + number of occurrences in a bin divided by the size of + the bin interval (here, the sum of all bin AREAS equals + the total number of sample points). If *probability + density*, the area of each bar corresponds to the + probability that an event will fall into the + corresponding bin (here, the sum of all bin AREAS + equals 1). + hoverinfo + Determines which trace information appear on hover. If + `none` or `skip` are set, no information is displayed + upon hovering. But, if `none` is set, click and hover + events are still fired. + hoverinfosrc + Sets the source reference on Chart Studio Cloud for + `hoverinfo`. + hoverlabel + :class:`plotly.graph_objects.histogram2d.Hoverlabel` + instance or dict with compatible properties + hovertemplate + Template string used for rendering the information that + appear on hover box. Note that this will override + `hoverinfo`. Variables are inserted using %{variable}, + for example "y: %{y}" as well as %{xother}, {%_xother}, + {%_xother_}, {%xother_}. When showing info for several + points, "xother" will be added to those with different + x positions from the first point. An underscore before + or after "(x|y)other" will add a space on that side, + only when this field is shown. Numbers are formatted + using d3-format's syntax %{variable:d3-format}, for + example "Price: %{y:$.2f}". + https://github.com/d3/d3-format/tree/v1.4.5#d3-format + for details on the formatting syntax. Dates are + formatted using d3-time-format's syntax + %{variable|d3-time-format}, for example "Day: + %{2019-01-01|%A}". https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format for details on the + date formatting syntax. Variables that can't be found + will be replaced with the specifier. For example, a + template of "data: %{x}, %{y}" will result in a value + of "data: 1, %{y}" if x is 1 and y is missing. + Variables with an undefined value will be replaced with + the fallback value. The variables available in + `hovertemplate` are the ones emitted as event data + described at this link + https://plotly.com/javascript/plotlyjs-events/#event- + data. Additionally, all attributes that can be + specified per-point (the ones that are `arrayOk: true`) + are available. Finally, the template string has access + to variable `z` Anything contained in tag `` is + displayed in the secondary box, for example + `%{fullData.name}`. To hide the + secondary box completely, use an empty tag + ``. + hovertemplatefallback + Fallback string that's displayed when a variable + referenced in a template is missing. If the boolean + value 'false' is passed in, the specifier with the + missing variable will be displayed. + hovertemplatesrc + Sets the source reference on Chart Studio Cloud for + `hovertemplate`. + ids + Assigns id labels to each datum. These ids for object + constancy of data points during animation. Should be an + array of strings, not numbers or any other type. + idssrc + Sets the source reference on Chart Studio Cloud for + `ids`. + legend + Sets the reference to a legend to show this trace in. + References to these legends are "legend", "legend2", + "legend3", etc. Settings for these legends are set in + the layout, under `layout.legend`, `layout.legend2`, + etc. + legendgroup + Sets the legend group for this trace. Traces and shapes + part of the same legend group hide/show at the same + time when toggling legend items. + legendgrouptitle + :class:`plotly.graph_objects.histogram2d.Legendgrouptit + le` instance or dict with compatible properties + legendrank + Sets the legend rank for this trace. Items and groups + with smaller ranks are presented on top/left side while + with "reversed" `legend.traceorder` they are on + bottom/right side. The default legendrank is 1000, so + that you can use ranks less than 1000 to place certain + items before all unranked items, and ranks greater than + 1000 to go after all unranked items. When having + unranked or equal rank items shapes would be displayed + after traces i.e. according to their order in data and + layout. + legendwidth + Sets the width (in px or fraction) of the legend for + this trace. + marker + :class:`plotly.graph_objects.histogram2d.Marker` + instance or dict with compatible properties + meta + Assigns extra meta information associated with this + trace that can be used in various text attributes. + Attributes such as trace `name`, graph, axis and + colorbar `title.text`, annotation `text` + `rangeselector`, `updatemenues` and `sliders` `label` + text all support `meta`. To access the trace `meta` + values in an attribute in the same trace, simply use + `%{meta[i]}` where `i` is the index or key of the + `meta` item in question. To access trace `meta` in + layout attributes, use `%{data[n[.meta[i]}` where `i` + is the index or key of the `meta` and `n` is the trace + index. + metasrc + Sets the source reference on Chart Studio Cloud for + `meta`. + name + Sets the trace name. The trace name appears as the + legend item and on hover. + nbinsx + Specifies the maximum number of desired bins. This + value will be used in an algorithm that will decide the + optimal bin size such that the histogram best + visualizes the distribution of the data. Ignored if + `xbins.size` is provided. + nbinsy + Specifies the maximum number of desired bins. This + value will be used in an algorithm that will decide the + optimal bin size such that the histogram best + visualizes the distribution of the data. Ignored if + `ybins.size` is provided. + opacity + Sets the opacity of the trace. + reversescale + Reverses the color mapping if true. If true, `zmin` + will correspond to the last color in the array and + `zmax` will correspond to the first color. + showlegend + Determines whether or not an item corresponding to this + trace is shown in the legend. + showscale + Determines whether or not a colorbar is displayed for + this trace. + stream + :class:`plotly.graph_objects.histogram2d.Stream` + instance or dict with compatible properties + textfont + Sets the text font. + texttemplate + Template string used for rendering the information text + that appears on points. Note that this will override + `textinfo`. Variables are inserted using %{variable}, + for example "y: %{y}". Numbers are formatted using + d3-format's syntax %{variable:d3-format}, for example + "Price: %{y:$.2f}". + https://github.com/d3/d3-format/tree/v1.4.5#d3-format + for details on the formatting syntax. Dates are + formatted using d3-time-format's syntax + %{variable|d3-time-format}, for example "Day: + %{2019-01-01|%A}". https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format for details on the + date formatting syntax. Variables that can't be found + will be replaced with the specifier. For example, a + template of "data: %{x}, %{y}" will result in a value + of "data: 1, %{y}" if x is 1 and y is missing. + Variables with an undefined value will be replaced with + the fallback value. All attributes that can be + specified per-point (the ones that are `arrayOk: true`) + are available. Finally, the template string has access + to variable `z` + texttemplatefallback + Fallback string that's displayed when a variable + referenced in a template is missing. If the boolean + value 'false' is passed in, the specifier with the + missing variable will be displayed. + uid + Assign an id to this trace, Use this to provide object + constancy between traces during animations and + transitions. + uirevision + Controls persistence of some user-driven changes to the + trace: `constraintrange` in `parcoords` traces, as well + as some `editable: true` modifications such as `name` + and `colorbar.title`. Defaults to `layout.uirevision`. + Note that other user-driven trace attribute changes are + controlled by `layout` attributes: `trace.visible` is + controlled by `layout.legend.uirevision`, + `selectedpoints` is controlled by + `layout.selectionrevision`, and `colorbar.(x|y)` + (accessible with `config: {editable: true}`) is + controlled by `layout.editrevision`. Trace changes are + tracked by `uid`, which only falls back on trace index + if no `uid` is provided. So if your app can add/remove + traces before the end of the `data` array, such that + the same trace has a different index, you can still + preserve user-driven changes if you give each trace a + `uid` that stays with it as it moves. + visible + Determines whether or not this trace is visible. If + "legendonly", the trace is not drawn, but can appear as + a legend item (provided that the legend itself is + visible). + x + Sets the sample data to be binned on the x axis. + xaxis + Sets a reference between this trace's x coordinates and + a 2D cartesian x axis. If "x" (the default value), the + x coordinates refer to `layout.xaxis`. If "x2", the x + coordinates refer to `layout.xaxis2`, and so on. + xbingroup + Set a group of histogram traces which will have + compatible x-bin settings. Using `xbingroup`, + histogram2d and histogram2dcontour traces (on axes of + the same axis type) can have compatible x-bin settings. + Note that the same `xbingroup` value can be used to set + (1D) histogram `bingroup` + xbins + :class:`plotly.graph_objects.histogram2d.XBins` + instance or dict with compatible properties + xcalendar + Sets the calendar system to use with `x` date data. + xgap + Sets the horizontal gap (in pixels) between bricks. + xhoverformat + Sets the hover text formatting rulefor `x` using d3 + formatting mini-languages which are very similar to + those in Python. For numbers, see: + https://github.com/d3/d3-format/tree/v1.4.5#d3-format. + And for dates see: https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format. We add two items to + d3's date formatter: "%h" for half of the year as a + decimal number as well as "%{n}f" for fractional + seconds with n digits. For example, *2016-10-13 + 09:15:23.456* with tickformat "%H~%M~%S.%2f" would + display *09~15~23.46*By default the values are + formatted using `xaxis.hoverformat`. + xsrc + Sets the source reference on Chart Studio Cloud for + `x`. + y + Sets the sample data to be binned on the y axis. + yaxis + Sets a reference between this trace's y coordinates and + a 2D cartesian y axis. If "y" (the default value), the + y coordinates refer to `layout.yaxis`. If "y2", the y + coordinates refer to `layout.yaxis2`, and so on. + ybingroup + Set a group of histogram traces which will have + compatible y-bin settings. Using `ybingroup`, + histogram2d and histogram2dcontour traces (on axes of + the same axis type) can have compatible y-bin settings. + Note that the same `ybingroup` value can be used to set + (1D) histogram `bingroup` + ybins + :class:`plotly.graph_objects.histogram2d.YBins` + instance or dict with compatible properties + ycalendar + Sets the calendar system to use with `y` date data. + ygap + Sets the vertical gap (in pixels) between bricks. + yhoverformat + Sets the hover text formatting rulefor `y` using d3 + formatting mini-languages which are very similar to + those in Python. For numbers, see: + https://github.com/d3/d3-format/tree/v1.4.5#d3-format. + And for dates see: https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format. We add two items to + d3's date formatter: "%h" for half of the year as a + decimal number as well as "%{n}f" for fractional + seconds with n digits. For example, *2016-10-13 + 09:15:23.456* with tickformat "%H~%M~%S.%2f" would + display *09~15~23.46*By default the values are + formatted using `yaxis.hoverformat`. + ysrc + Sets the source reference on Chart Studio Cloud for + `y`. + z + Sets the aggregation data. + zauto + Determines whether or not the color domain is computed + with respect to the input data (here in `z`) or the + bounds set in `zmin` and `zmax` Defaults to `false` + when `zmin` and `zmax` are set by the user. + zhoverformat + Sets the hover text formatting rulefor `z` using d3 + formatting mini-languages which are very similar to + those in Python. For numbers, see: https://github.com/d + 3/d3-format/tree/v1.4.5#d3-format.By default the values + are formatted using generic number format. + zmax + Sets the upper bound of the color domain. Value should + have the same units as in `z` and if set, `zmin` must + be set as well. + zmid + Sets the mid-point of the color domain by scaling + `zmin` and/or `zmax` to be equidistant to this point. + Value should have the same units as in `z`. Has no + effect when `zauto` is `false`. + zmin + Sets the lower bound of the color domain. Value should + have the same units as in `z` and if set, `zmax` must + be set as well. + zsmooth + Picks a smoothing algorithm use to smooth `z` data. + zsrc + Sets the source reference on Chart Studio Cloud for + `z`. + + Returns + ------- + Histogram2d + """ + super().__init__("histogram2d") + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + if arg is None: + arg = {} + elif isinstance(arg, self.__class__): + arg = arg.to_plotly_json() + elif isinstance(arg, dict): + arg = _copy.copy(arg) + else: + raise ValueError("""\ +The first argument to the plotly.graph_objs.Histogram2d +constructor must be a dict or +an instance of :class:`plotly.graph_objs.Histogram2d`""") + + self._skip_invalid = kwargs.pop("skip_invalid", False) + self._validate = kwargs.pop("_validate", True) + + self._set_property("autobinx", arg, autobinx) + self._set_property("autobiny", arg, autobiny) + self._set_property("autocolorscale", arg, autocolorscale) + self._set_property("bingroup", arg, bingroup) + self._set_property("coloraxis", arg, coloraxis) + self._set_property("colorbar", arg, colorbar) + self._set_property("colorscale", arg, colorscale) + self._set_property("customdata", arg, customdata) + self._set_property("customdatasrc", arg, customdatasrc) + self._set_property("histfunc", arg, histfunc) + self._set_property("histnorm", arg, histnorm) + self._set_property("hoverinfo", arg, hoverinfo) + self._set_property("hoverinfosrc", arg, hoverinfosrc) + self._set_property("hoverlabel", arg, hoverlabel) + self._set_property("hovertemplate", arg, hovertemplate) + self._set_property("hovertemplatefallback", arg, hovertemplatefallback) + self._set_property("hovertemplatesrc", arg, hovertemplatesrc) + self._set_property("ids", arg, ids) + self._set_property("idssrc", arg, idssrc) + self._set_property("legend", arg, legend) + self._set_property("legendgroup", arg, legendgroup) + self._set_property("legendgrouptitle", arg, legendgrouptitle) + self._set_property("legendrank", arg, legendrank) + self._set_property("legendwidth", arg, legendwidth) + self._set_property("marker", arg, marker) + self._set_property("meta", arg, meta) + self._set_property("metasrc", arg, metasrc) + self._set_property("name", arg, name) + self._set_property("nbinsx", arg, nbinsx) + self._set_property("nbinsy", arg, nbinsy) + self._set_property("opacity", arg, opacity) + self._set_property("reversescale", arg, reversescale) + self._set_property("showlegend", arg, showlegend) + self._set_property("showscale", arg, showscale) + self._set_property("stream", arg, stream) + self._set_property("textfont", arg, textfont) + self._set_property("texttemplate", arg, texttemplate) + self._set_property("texttemplatefallback", arg, texttemplatefallback) + self._set_property("uid", arg, uid) + self._set_property("uirevision", arg, uirevision) + self._set_property("visible", arg, visible) + self._set_property("x", arg, x) + self._set_property("xaxis", arg, xaxis) + self._set_property("xbingroup", arg, xbingroup) + self._set_property("xbins", arg, xbins) + self._set_property("xcalendar", arg, xcalendar) + self._set_property("xgap", arg, xgap) + self._set_property("xhoverformat", arg, xhoverformat) + self._set_property("xsrc", arg, xsrc) + self._set_property("y", arg, y) + self._set_property("yaxis", arg, yaxis) + self._set_property("ybingroup", arg, ybingroup) + self._set_property("ybins", arg, ybins) + self._set_property("ycalendar", arg, ycalendar) + self._set_property("ygap", arg, ygap) + self._set_property("yhoverformat", arg, yhoverformat) + self._set_property("ysrc", arg, ysrc) + self._set_property("z", arg, z) + self._set_property("zauto", arg, zauto) + self._set_property("zhoverformat", arg, zhoverformat) + self._set_property("zmax", arg, zmax) + self._set_property("zmid", arg, zmid) + self._set_property("zmin", arg, zmin) + self._set_property("zsmooth", arg, zsmooth) + self._set_property("zsrc", arg, zsrc) + + self._props["type"] = "histogram2d" + arg.pop("type", None) + self._process_kwargs(**dict(arg, **kwargs)) + self._skip_invalid = False diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/_histogram2dcontour.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/_histogram2dcontour.py new file mode 100644 index 0000000000000000000000000000000000000000..c36c7078033f8f2288ede095b0b53f50b484790b --- /dev/null +++ b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/_histogram2dcontour.py @@ -0,0 +1,2517 @@ +# --- THIS FILE IS AUTO-GENERATED --- +# Modifications will be overwitten the next time code generation run. + +from plotly.basedatatypes import BaseTraceType as _BaseTraceType +import copy as _copy + + +class Histogram2dContour(_BaseTraceType): + _parent_path_str = "" + _path_str = "histogram2dcontour" + _valid_props = { + "autobinx", + "autobiny", + "autocolorscale", + "autocontour", + "bingroup", + "coloraxis", + "colorbar", + "colorscale", + "contours", + "customdata", + "customdatasrc", + "histfunc", + "histnorm", + "hoverinfo", + "hoverinfosrc", + "hoverlabel", + "hovertemplate", + "hovertemplatefallback", + "hovertemplatesrc", + "ids", + "idssrc", + "legend", + "legendgroup", + "legendgrouptitle", + "legendrank", + "legendwidth", + "line", + "marker", + "meta", + "metasrc", + "name", + "nbinsx", + "nbinsy", + "ncontours", + "opacity", + "reversescale", + "showlegend", + "showscale", + "stream", + "textfont", + "texttemplate", + "texttemplatefallback", + "type", + "uid", + "uirevision", + "visible", + "x", + "xaxis", + "xbingroup", + "xbins", + "xcalendar", + "xhoverformat", + "xsrc", + "y", + "yaxis", + "ybingroup", + "ybins", + "ycalendar", + "yhoverformat", + "ysrc", + "z", + "zauto", + "zhoverformat", + "zmax", + "zmid", + "zmin", + "zsrc", + } + + @property + def autobinx(self): + """ + Obsolete: since v1.42 each bin attribute is auto-determined + separately and `autobinx` is not needed. However, we accept + `autobinx: true` or `false` and will update `xbins` accordingly + before deleting `autobinx` from the trace. + + The 'autobinx' property is a boolean and must be specified as: + - A boolean value: True or False + + Returns + ------- + bool + """ + return self["autobinx"] + + @autobinx.setter + def autobinx(self, val): + self["autobinx"] = val + + @property + def autobiny(self): + """ + Obsolete: since v1.42 each bin attribute is auto-determined + separately and `autobiny` is not needed. However, we accept + `autobiny: true` or `false` and will update `ybins` accordingly + before deleting `autobiny` from the trace. + + The 'autobiny' property is a boolean and must be specified as: + - A boolean value: True or False + + Returns + ------- + bool + """ + return self["autobiny"] + + @autobiny.setter + def autobiny(self, val): + self["autobiny"] = val + + @property + def autocolorscale(self): + """ + Determines whether the colorscale is a default palette + (`autocolorscale: true`) or the palette determined by + `colorscale`. In case `colorscale` is unspecified or + `autocolorscale` is true, the default palette will be chosen + according to whether numbers in the `color` array are all + positive, all negative or mixed. + + The 'autocolorscale' property is a boolean and must be specified as: + - A boolean value: True or False + + Returns + ------- + bool + """ + return self["autocolorscale"] + + @autocolorscale.setter + def autocolorscale(self, val): + self["autocolorscale"] = val + + @property + def autocontour(self): + """ + Determines whether or not the contour level attributes are + picked by an algorithm. If True, the number of contour levels + can be set in `ncontours`. If False, set the contour level + attributes in `contours`. + + The 'autocontour' property is a boolean and must be specified as: + - A boolean value: True or False + + Returns + ------- + bool + """ + return self["autocontour"] + + @autocontour.setter + def autocontour(self, val): + self["autocontour"] = val + + @property + def bingroup(self): + """ + Set the `xbingroup` and `ybingroup` default prefix For example, + setting a `bingroup` of 1 on two histogram2d traces will make + them their x-bins and y-bins match separately. + + The 'bingroup' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["bingroup"] + + @bingroup.setter + def bingroup(self, val): + self["bingroup"] = val + + @property + def coloraxis(self): + """ + Sets a reference to a shared color axis. References to these + shared color axes are "coloraxis", "coloraxis2", "coloraxis3", + etc. Settings for these shared color axes are set in the + layout, under `layout.coloraxis`, `layout.coloraxis2`, etc. + Note that multiple color scales can be linked to the same color + axis. + + The 'coloraxis' property is an identifier of a particular + subplot, of type 'coloraxis', that may be specified as: + - the string 'coloraxis' optionally followed by an integer >= 1 + (e.g. 'coloraxis', 'coloraxis1', 'coloraxis2', 'coloraxis3', etc.) + + Returns + ------- + str + """ + return self["coloraxis"] + + @coloraxis.setter + def coloraxis(self, val): + self["coloraxis"] = val + + @property + def colorbar(self): + """ + The 'colorbar' property is an instance of ColorBar + that may be specified as: + - An instance of :class:`plotly.graph_objs.histogram2dcontour.ColorBar` + - A dict of string/value properties that will be passed + to the ColorBar constructor + + Returns + ------- + plotly.graph_objs.histogram2dcontour.ColorBar + """ + return self["colorbar"] + + @colorbar.setter + def colorbar(self, val): + self["colorbar"] = val + + @property + def colorscale(self): + """ + Sets the colorscale. The colorscale must be an array containing + arrays mapping a normalized value to an rgb, rgba, hex, hsl, + hsv, or named color string. At minimum, a mapping for the + lowest (0) and highest (1) values are required. For example, + `[[0, 'rgb(0,0,255)'], [1, 'rgb(255,0,0)']]`. To control the + bounds of the colorscale in color space, use `zmin` and `zmax`. + Alternatively, `colorscale` may be a palette name string of the + following list: Blackbody,Bluered,Blues,Cividis,Earth,Electric, + Greens,Greys,Hot,Jet,Picnic,Portland,Rainbow,RdBu,Reds,Viridis, + YlGnBu,YlOrRd. + + The 'colorscale' property is a colorscale and may be + specified as: + - A list of colors that will be spaced evenly to create the colorscale. + Many predefined colorscale lists are included in the sequential, diverging, + and cyclical modules in the plotly.colors package. + - A list of 2-element lists where the first element is the + normalized color level value (starting at 0 and ending at 1), + and the second item is a valid color string. + (e.g. [[0, 'green'], [0.5, 'red'], [1.0, 'rgb(0, 0, 255)']]) + - One of the following named colorscales: + ['aggrnyl', 'agsunset', 'algae', 'amp', 'armyrose', 'balance', + 'blackbody', 'bluered', 'blues', 'blugrn', 'bluyl', 'brbg', + 'brwnyl', 'bugn', 'bupu', 'burg', 'burgyl', 'cividis', 'curl', + 'darkmint', 'deep', 'delta', 'dense', 'earth', 'edge', 'electric', + 'emrld', 'fall', 'geyser', 'gnbu', 'gray', 'greens', 'greys', + 'haline', 'hot', 'hsv', 'ice', 'icefire', 'inferno', 'jet', + 'magenta', 'magma', 'matter', 'mint', 'mrybm', 'mygbm', 'oranges', + 'orrd', 'oryel', 'oxy', 'peach', 'phase', 'picnic', 'pinkyl', + 'piyg', 'plasma', 'plotly3', 'portland', 'prgn', 'pubu', 'pubugn', + 'puor', 'purd', 'purp', 'purples', 'purpor', 'rainbow', 'rdbu', + 'rdgy', 'rdpu', 'rdylbu', 'rdylgn', 'redor', 'reds', 'solar', + 'spectral', 'speed', 'sunset', 'sunsetdark', 'teal', 'tealgrn', + 'tealrose', 'tempo', 'temps', 'thermal', 'tropic', 'turbid', + 'turbo', 'twilight', 'viridis', 'ylgn', 'ylgnbu', 'ylorbr', + 'ylorrd']. + Appending '_r' to a named colorscale reverses it. + + Returns + ------- + str + """ + return self["colorscale"] + + @colorscale.setter + def colorscale(self, val): + self["colorscale"] = val + + @property + def contours(self): + """ + The 'contours' property is an instance of Contours + that may be specified as: + - An instance of :class:`plotly.graph_objs.histogram2dcontour.Contours` + - A dict of string/value properties that will be passed + to the Contours constructor + + Returns + ------- + plotly.graph_objs.histogram2dcontour.Contours + """ + return self["contours"] + + @contours.setter + def contours(self, val): + self["contours"] = val + + @property + def customdata(self): + """ + Assigns extra data each datum. This may be useful when + listening to hover, click and selection events. Note that, + "scatter" traces also appends customdata items in the markers + DOM elements + + The 'customdata' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["customdata"] + + @customdata.setter + def customdata(self, val): + self["customdata"] = val + + @property + def customdatasrc(self): + """ + Sets the source reference on Chart Studio Cloud for + `customdata`. + + The 'customdatasrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["customdatasrc"] + + @customdatasrc.setter + def customdatasrc(self, val): + self["customdatasrc"] = val + + @property + def histfunc(self): + """ + Specifies the binning function used for this histogram trace. + If "count", the histogram values are computed by counting the + number of values lying inside each bin. If "sum", "avg", "min", + "max", the histogram values are computed using the sum, the + average, the minimum or the maximum of the values lying inside + each bin respectively. + + The 'histfunc' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['count', 'sum', 'avg', 'min', 'max'] + + Returns + ------- + Any + """ + return self["histfunc"] + + @histfunc.setter + def histfunc(self, val): + self["histfunc"] = val + + @property + def histnorm(self): + """ + Specifies the type of normalization used for this histogram + trace. If "", the span of each bar corresponds to the number of + occurrences (i.e. the number of data points lying inside the + bins). If "percent" / "probability", the span of each bar + corresponds to the percentage / fraction of occurrences with + respect to the total number of sample points (here, the sum of + all bin HEIGHTS equals 100% / 1). If "density", the span of + each bar corresponds to the number of occurrences in a bin + divided by the size of the bin interval (here, the sum of all + bin AREAS equals the total number of sample points). If + *probability density*, the area of each bar corresponds to the + probability that an event will fall into the corresponding bin + (here, the sum of all bin AREAS equals 1). + + The 'histnorm' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['', 'percent', 'probability', 'density', 'probability + density'] + + Returns + ------- + Any + """ + return self["histnorm"] + + @histnorm.setter + def histnorm(self, val): + self["histnorm"] = val + + @property + def hoverinfo(self): + """ + Determines which trace information appear on hover. If `none` + or `skip` are set, no information is displayed upon hovering. + But, if `none` is set, click and hover events are still fired. + + The 'hoverinfo' property is a flaglist and may be specified + as a string containing: + - Any combination of ['x', 'y', 'z', 'text', 'name'] joined with '+' characters + (e.g. 'x+y') + OR exactly one of ['all', 'none', 'skip'] (e.g. 'skip') + - A list or array of the above + + Returns + ------- + Any|numpy.ndarray + """ + return self["hoverinfo"] + + @hoverinfo.setter + def hoverinfo(self, val): + self["hoverinfo"] = val + + @property + def hoverinfosrc(self): + """ + Sets the source reference on Chart Studio Cloud for + `hoverinfo`. + + The 'hoverinfosrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["hoverinfosrc"] + + @hoverinfosrc.setter + def hoverinfosrc(self, val): + self["hoverinfosrc"] = val + + @property + def hoverlabel(self): + """ + The 'hoverlabel' property is an instance of Hoverlabel + that may be specified as: + - An instance of :class:`plotly.graph_objs.histogram2dcontour.Hoverlabel` + - A dict of string/value properties that will be passed + to the Hoverlabel constructor + + Returns + ------- + plotly.graph_objs.histogram2dcontour.Hoverlabel + """ + return self["hoverlabel"] + + @hoverlabel.setter + def hoverlabel(self, val): + self["hoverlabel"] = val + + @property + def hovertemplate(self): + """ + Template string used for rendering the information that appear + on hover box. Note that this will override `hoverinfo`. + Variables are inserted using %{variable}, for example "y: %{y}" + as well as %{xother}, {%_xother}, {%_xother_}, {%xother_}. When + showing info for several points, "xother" will be added to + those with different x positions from the first point. An + underscore before or after "(x|y)other" will add a space on + that side, only when this field is shown. Numbers are formatted + using d3-format's syntax %{variable:d3-format}, for example + "Price: %{y:$.2f}". + https://github.com/d3/d3-format/tree/v1.4.5#d3-format for + details on the formatting syntax. Dates are formatted using + d3-time-format's syntax %{variable|d3-time-format}, for example + "Day: %{2019-01-01|%A}". https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format for details on the date + formatting syntax. Variables that can't be found will be + replaced with the specifier. For example, a template of "data: + %{x}, %{y}" will result in a value of "data: 1, %{y}" if x is 1 + and y is missing. Variables with an undefined value will be + replaced with the fallback value. The variables available in + `hovertemplate` are the ones emitted as event data described at + this link https://plotly.com/javascript/plotlyjs-events/#event- + data. Additionally, all attributes that can be specified per- + point (the ones that are `arrayOk: true`) are available. + Finally, the template string has access to variable `z` + Anything contained in tag `` is displayed in the + secondary box, for example `%{fullData.name}`. + To hide the secondary box completely, use an empty tag + ``. + + The 'hovertemplate' property is a string and must be specified as: + - A string + - A number that will be converted to a string + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["hovertemplate"] + + @hovertemplate.setter + def hovertemplate(self, val): + self["hovertemplate"] = val + + @property + def hovertemplatefallback(self): + """ + Fallback string that's displayed when a variable referenced in + a template is missing. If the boolean value 'false' is passed + in, the specifier with the missing variable will be displayed. + + The 'hovertemplatefallback' property accepts values of any type + + Returns + ------- + Any + """ + return self["hovertemplatefallback"] + + @hovertemplatefallback.setter + def hovertemplatefallback(self, val): + self["hovertemplatefallback"] = val + + @property + def hovertemplatesrc(self): + """ + Sets the source reference on Chart Studio Cloud for + `hovertemplate`. + + The 'hovertemplatesrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["hovertemplatesrc"] + + @hovertemplatesrc.setter + def hovertemplatesrc(self, val): + self["hovertemplatesrc"] = val + + @property + def ids(self): + """ + Assigns id labels to each datum. These ids for object constancy + of data points during animation. Should be an array of strings, + not numbers or any other type. + + The 'ids' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["ids"] + + @ids.setter + def ids(self, val): + self["ids"] = val + + @property + def idssrc(self): + """ + Sets the source reference on Chart Studio Cloud for `ids`. + + The 'idssrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["idssrc"] + + @idssrc.setter + def idssrc(self, val): + self["idssrc"] = val + + @property + def legend(self): + """ + Sets the reference to a legend to show this trace in. + References to these legends are "legend", "legend2", "legend3", + etc. Settings for these legends are set in the layout, under + `layout.legend`, `layout.legend2`, etc. + + The 'legend' property is an identifier of a particular + subplot, of type 'legend', that may be specified as: + - the string 'legend' optionally followed by an integer >= 1 + (e.g. 'legend', 'legend1', 'legend2', 'legend3', etc.) + + Returns + ------- + str + """ + return self["legend"] + + @legend.setter + def legend(self, val): + self["legend"] = val + + @property + def legendgroup(self): + """ + Sets the legend group for this trace. Traces and shapes part of + the same legend group hide/show at the same time when toggling + legend items. + + The 'legendgroup' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["legendgroup"] + + @legendgroup.setter + def legendgroup(self, val): + self["legendgroup"] = val + + @property + def legendgrouptitle(self): + """ + The 'legendgrouptitle' property is an instance of Legendgrouptitle + that may be specified as: + - An instance of :class:`plotly.graph_objs.histogram2dcontour.Legendgrouptitle` + - A dict of string/value properties that will be passed + to the Legendgrouptitle constructor + + Returns + ------- + plotly.graph_objs.histogram2dcontour.Legendgrouptitle + """ + return self["legendgrouptitle"] + + @legendgrouptitle.setter + def legendgrouptitle(self, val): + self["legendgrouptitle"] = val + + @property + def legendrank(self): + """ + Sets the legend rank for this trace. Items and groups with + smaller ranks are presented on top/left side while with + "reversed" `legend.traceorder` they are on bottom/right side. + The default legendrank is 1000, so that you can use ranks less + than 1000 to place certain items before all unranked items, and + ranks greater than 1000 to go after all unranked items. When + having unranked or equal rank items shapes would be displayed + after traces i.e. according to their order in data and layout. + + The 'legendrank' property is a number and may be specified as: + - An int or float + + Returns + ------- + int|float + """ + return self["legendrank"] + + @legendrank.setter + def legendrank(self, val): + self["legendrank"] = val + + @property + def legendwidth(self): + """ + Sets the width (in px or fraction) of the legend for this + trace. + + The 'legendwidth' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["legendwidth"] + + @legendwidth.setter + def legendwidth(self, val): + self["legendwidth"] = val + + @property + def line(self): + """ + The 'line' property is an instance of Line + that may be specified as: + - An instance of :class:`plotly.graph_objs.histogram2dcontour.Line` + - A dict of string/value properties that will be passed + to the Line constructor + + Returns + ------- + plotly.graph_objs.histogram2dcontour.Line + """ + return self["line"] + + @line.setter + def line(self, val): + self["line"] = val + + @property + def marker(self): + """ + The 'marker' property is an instance of Marker + that may be specified as: + - An instance of :class:`plotly.graph_objs.histogram2dcontour.Marker` + - A dict of string/value properties that will be passed + to the Marker constructor + + Returns + ------- + plotly.graph_objs.histogram2dcontour.Marker + """ + return self["marker"] + + @marker.setter + def marker(self, val): + self["marker"] = val + + @property + def meta(self): + """ + Assigns extra meta information associated with this trace that + can be used in various text attributes. Attributes such as + trace `name`, graph, axis and colorbar `title.text`, annotation + `text` `rangeselector`, `updatemenues` and `sliders` `label` + text all support `meta`. To access the trace `meta` values in + an attribute in the same trace, simply use `%{meta[i]}` where + `i` is the index or key of the `meta` item in question. To + access trace `meta` in layout attributes, use + `%{data[n[.meta[i]}` where `i` is the index or key of the + `meta` and `n` is the trace index. + + The 'meta' property accepts values of any type + + Returns + ------- + Any|numpy.ndarray + """ + return self["meta"] + + @meta.setter + def meta(self, val): + self["meta"] = val + + @property + def metasrc(self): + """ + Sets the source reference on Chart Studio Cloud for `meta`. + + The 'metasrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["metasrc"] + + @metasrc.setter + def metasrc(self, val): + self["metasrc"] = val + + @property + def name(self): + """ + Sets the trace name. The trace name appears as the legend item + and on hover. + + The 'name' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["name"] + + @name.setter + def name(self, val): + self["name"] = val + + @property + def nbinsx(self): + """ + Specifies the maximum number of desired bins. This value will + be used in an algorithm that will decide the optimal bin size + such that the histogram best visualizes the distribution of the + data. Ignored if `xbins.size` is provided. + + The 'nbinsx' property is a integer and may be specified as: + - An int (or float that will be cast to an int) + in the interval [0, 9223372036854775807] + + Returns + ------- + int + """ + return self["nbinsx"] + + @nbinsx.setter + def nbinsx(self, val): + self["nbinsx"] = val + + @property + def nbinsy(self): + """ + Specifies the maximum number of desired bins. This value will + be used in an algorithm that will decide the optimal bin size + such that the histogram best visualizes the distribution of the + data. Ignored if `ybins.size` is provided. + + The 'nbinsy' property is a integer and may be specified as: + - An int (or float that will be cast to an int) + in the interval [0, 9223372036854775807] + + Returns + ------- + int + """ + return self["nbinsy"] + + @nbinsy.setter + def nbinsy(self, val): + self["nbinsy"] = val + + @property + def ncontours(self): + """ + Sets the maximum number of contour levels. The actual number of + contours will be chosen automatically to be less than or equal + to the value of `ncontours`. Has an effect only if + `autocontour` is True or if `contours.size` is missing. + + The 'ncontours' property is a integer and may be specified as: + - An int (or float that will be cast to an int) + in the interval [1, 9223372036854775807] + + Returns + ------- + int + """ + return self["ncontours"] + + @ncontours.setter + def ncontours(self, val): + self["ncontours"] = val + + @property + def opacity(self): + """ + Sets the opacity of the trace. + + The 'opacity' property is a number and may be specified as: + - An int or float in the interval [0, 1] + + Returns + ------- + int|float + """ + return self["opacity"] + + @opacity.setter + def opacity(self, val): + self["opacity"] = val + + @property + def reversescale(self): + """ + Reverses the color mapping if true. If true, `zmin` will + correspond to the last color in the array and `zmax` will + correspond to the first color. + + The 'reversescale' property is a boolean and must be specified as: + - A boolean value: True or False + + Returns + ------- + bool + """ + return self["reversescale"] + + @reversescale.setter + def reversescale(self, val): + self["reversescale"] = val + + @property + def showlegend(self): + """ + Determines whether or not an item corresponding to this trace + is shown in the legend. + + The 'showlegend' property is a boolean and must be specified as: + - A boolean value: True or False + + Returns + ------- + bool + """ + return self["showlegend"] + + @showlegend.setter + def showlegend(self, val): + self["showlegend"] = val + + @property + def showscale(self): + """ + Determines whether or not a colorbar is displayed for this + trace. + + The 'showscale' property is a boolean and must be specified as: + - A boolean value: True or False + + Returns + ------- + bool + """ + return self["showscale"] + + @showscale.setter + def showscale(self, val): + self["showscale"] = val + + @property + def stream(self): + """ + The 'stream' property is an instance of Stream + that may be specified as: + - An instance of :class:`plotly.graph_objs.histogram2dcontour.Stream` + - A dict of string/value properties that will be passed + to the Stream constructor + + Returns + ------- + plotly.graph_objs.histogram2dcontour.Stream + """ + return self["stream"] + + @stream.setter + def stream(self, val): + self["stream"] = val + + @property + def textfont(self): + """ + For this trace it only has an effect if `coloring` is set to + "heatmap". Sets the text font. + + The 'textfont' property is an instance of Textfont + that may be specified as: + - An instance of :class:`plotly.graph_objs.histogram2dcontour.Textfont` + - A dict of string/value properties that will be passed + to the Textfont constructor + + Returns + ------- + plotly.graph_objs.histogram2dcontour.Textfont + """ + return self["textfont"] + + @textfont.setter + def textfont(self, val): + self["textfont"] = val + + @property + def texttemplate(self): + """ + For this trace it only has an effect if `coloring` is set to + "heatmap". Template string used for rendering the information + text that appears on points. Note that this will override + `textinfo`. Variables are inserted using %{variable}, for + example "y: %{y}". Numbers are formatted using d3-format's + syntax %{variable:d3-format}, for example "Price: %{y:$.2f}". + https://github.com/d3/d3-format/tree/v1.4.5#d3-format for + details on the formatting syntax. Dates are formatted using + d3-time-format's syntax %{variable|d3-time-format}, for example + "Day: %{2019-01-01|%A}". https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format for details on the date + formatting syntax. Variables that can't be found will be + replaced with the specifier. For example, a template of "data: + %{x}, %{y}" will result in a value of "data: 1, %{y}" if x is 1 + and y is missing. Variables with an undefined value will be + replaced with the fallback value. All attributes that can be + specified per-point (the ones that are `arrayOk: true`) are + available. Finally, the template string has access to variables + `x`, `y`, `z` and `text`. + + The 'texttemplate' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["texttemplate"] + + @texttemplate.setter + def texttemplate(self, val): + self["texttemplate"] = val + + @property + def texttemplatefallback(self): + """ + Fallback string that's displayed when a variable referenced in + a template is missing. If the boolean value 'false' is passed + in, the specifier with the missing variable will be displayed. + + The 'texttemplatefallback' property accepts values of any type + + Returns + ------- + Any + """ + return self["texttemplatefallback"] + + @texttemplatefallback.setter + def texttemplatefallback(self, val): + self["texttemplatefallback"] = val + + @property + def uid(self): + """ + Assign an id to this trace, Use this to provide object + constancy between traces during animations and transitions. + + The 'uid' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["uid"] + + @uid.setter + def uid(self, val): + self["uid"] = val + + @property + def uirevision(self): + """ + Controls persistence of some user-driven changes to the trace: + `constraintrange` in `parcoords` traces, as well as some + `editable: true` modifications such as `name` and + `colorbar.title`. Defaults to `layout.uirevision`. Note that + other user-driven trace attribute changes are controlled by + `layout` attributes: `trace.visible` is controlled by + `layout.legend.uirevision`, `selectedpoints` is controlled by + `layout.selectionrevision`, and `colorbar.(x|y)` (accessible + with `config: {editable: true}`) is controlled by + `layout.editrevision`. Trace changes are tracked by `uid`, + which only falls back on trace index if no `uid` is provided. + So if your app can add/remove traces before the end of the + `data` array, such that the same trace has a different index, + you can still preserve user-driven changes if you give each + trace a `uid` that stays with it as it moves. + + The 'uirevision' property accepts values of any type + + Returns + ------- + Any + """ + return self["uirevision"] + + @uirevision.setter + def uirevision(self, val): + self["uirevision"] = val + + @property + def visible(self): + """ + Determines whether or not this trace is visible. If + "legendonly", the trace is not drawn, but can appear as a + legend item (provided that the legend itself is visible). + + The 'visible' property is an enumeration that may be specified as: + - One of the following enumeration values: + [True, False, 'legendonly'] + + Returns + ------- + Any + """ + return self["visible"] + + @visible.setter + def visible(self, val): + self["visible"] = val + + @property + def x(self): + """ + Sets the sample data to be binned on the x axis. + + The 'x' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["x"] + + @x.setter + def x(self, val): + self["x"] = val + + @property + def xaxis(self): + """ + Sets a reference between this trace's x coordinates and a 2D + cartesian x axis. If "x" (the default value), the x coordinates + refer to `layout.xaxis`. If "x2", the x coordinates refer to + `layout.xaxis2`, and so on. + + The 'xaxis' property is an identifier of a particular + subplot, of type 'x', that may be specified as: + - the string 'x' optionally followed by an integer >= 1 + (e.g. 'x', 'x1', 'x2', 'x3', etc.) + + Returns + ------- + str + """ + return self["xaxis"] + + @xaxis.setter + def xaxis(self, val): + self["xaxis"] = val + + @property + def xbingroup(self): + """ + Set a group of histogram traces which will have compatible + x-bin settings. Using `xbingroup`, histogram2d and + histogram2dcontour traces (on axes of the same axis type) can + have compatible x-bin settings. Note that the same `xbingroup` + value can be used to set (1D) histogram `bingroup` + + The 'xbingroup' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["xbingroup"] + + @xbingroup.setter + def xbingroup(self, val): + self["xbingroup"] = val + + @property + def xbins(self): + """ + The 'xbins' property is an instance of XBins + that may be specified as: + - An instance of :class:`plotly.graph_objs.histogram2dcontour.XBins` + - A dict of string/value properties that will be passed + to the XBins constructor + + Returns + ------- + plotly.graph_objs.histogram2dcontour.XBins + """ + return self["xbins"] + + @xbins.setter + def xbins(self, val): + self["xbins"] = val + + @property + def xcalendar(self): + """ + Sets the calendar system to use with `x` date data. + + The 'xcalendar' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['chinese', 'coptic', 'discworld', 'ethiopian', + 'gregorian', 'hebrew', 'islamic', 'jalali', 'julian', + 'mayan', 'nanakshahi', 'nepali', 'persian', 'taiwan', + 'thai', 'ummalqura'] + + Returns + ------- + Any + """ + return self["xcalendar"] + + @xcalendar.setter + def xcalendar(self, val): + self["xcalendar"] = val + + @property + def xhoverformat(self): + """ + Sets the hover text formatting rulefor `x` using d3 formatting + mini-languages which are very similar to those in Python. For + numbers, see: + https://github.com/d3/d3-format/tree/v1.4.5#d3-format. And for + dates see: https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format. We add two items to d3's date + formatter: "%h" for half of the year as a decimal number as + well as "%{n}f" for fractional seconds with n digits. For + example, *2016-10-13 09:15:23.456* with tickformat + "%H~%M~%S.%2f" would display *09~15~23.46*By default the values + are formatted using `xaxis.hoverformat`. + + The 'xhoverformat' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["xhoverformat"] + + @xhoverformat.setter + def xhoverformat(self, val): + self["xhoverformat"] = val + + @property + def xsrc(self): + """ + Sets the source reference on Chart Studio Cloud for `x`. + + The 'xsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["xsrc"] + + @xsrc.setter + def xsrc(self, val): + self["xsrc"] = val + + @property + def y(self): + """ + Sets the sample data to be binned on the y axis. + + The 'y' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["y"] + + @y.setter + def y(self, val): + self["y"] = val + + @property + def yaxis(self): + """ + Sets a reference between this trace's y coordinates and a 2D + cartesian y axis. If "y" (the default value), the y coordinates + refer to `layout.yaxis`. If "y2", the y coordinates refer to + `layout.yaxis2`, and so on. + + The 'yaxis' property is an identifier of a particular + subplot, of type 'y', that may be specified as: + - the string 'y' optionally followed by an integer >= 1 + (e.g. 'y', 'y1', 'y2', 'y3', etc.) + + Returns + ------- + str + """ + return self["yaxis"] + + @yaxis.setter + def yaxis(self, val): + self["yaxis"] = val + + @property + def ybingroup(self): + """ + Set a group of histogram traces which will have compatible + y-bin settings. Using `ybingroup`, histogram2d and + histogram2dcontour traces (on axes of the same axis type) can + have compatible y-bin settings. Note that the same `ybingroup` + value can be used to set (1D) histogram `bingroup` + + The 'ybingroup' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["ybingroup"] + + @ybingroup.setter + def ybingroup(self, val): + self["ybingroup"] = val + + @property + def ybins(self): + """ + The 'ybins' property is an instance of YBins + that may be specified as: + - An instance of :class:`plotly.graph_objs.histogram2dcontour.YBins` + - A dict of string/value properties that will be passed + to the YBins constructor + + Returns + ------- + plotly.graph_objs.histogram2dcontour.YBins + """ + return self["ybins"] + + @ybins.setter + def ybins(self, val): + self["ybins"] = val + + @property + def ycalendar(self): + """ + Sets the calendar system to use with `y` date data. + + The 'ycalendar' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['chinese', 'coptic', 'discworld', 'ethiopian', + 'gregorian', 'hebrew', 'islamic', 'jalali', 'julian', + 'mayan', 'nanakshahi', 'nepali', 'persian', 'taiwan', + 'thai', 'ummalqura'] + + Returns + ------- + Any + """ + return self["ycalendar"] + + @ycalendar.setter + def ycalendar(self, val): + self["ycalendar"] = val + + @property + def yhoverformat(self): + """ + Sets the hover text formatting rulefor `y` using d3 formatting + mini-languages which are very similar to those in Python. For + numbers, see: + https://github.com/d3/d3-format/tree/v1.4.5#d3-format. And for + dates see: https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format. We add two items to d3's date + formatter: "%h" for half of the year as a decimal number as + well as "%{n}f" for fractional seconds with n digits. For + example, *2016-10-13 09:15:23.456* with tickformat + "%H~%M~%S.%2f" would display *09~15~23.46*By default the values + are formatted using `yaxis.hoverformat`. + + The 'yhoverformat' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["yhoverformat"] + + @yhoverformat.setter + def yhoverformat(self, val): + self["yhoverformat"] = val + + @property + def ysrc(self): + """ + Sets the source reference on Chart Studio Cloud for `y`. + + The 'ysrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["ysrc"] + + @ysrc.setter + def ysrc(self, val): + self["ysrc"] = val + + @property + def z(self): + """ + Sets the aggregation data. + + The 'z' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["z"] + + @z.setter + def z(self, val): + self["z"] = val + + @property + def zauto(self): + """ + Determines whether or not the color domain is computed with + respect to the input data (here in `z`) or the bounds set in + `zmin` and `zmax` Defaults to `false` when `zmin` and `zmax` + are set by the user. + + The 'zauto' property is a boolean and must be specified as: + - A boolean value: True or False + + Returns + ------- + bool + """ + return self["zauto"] + + @zauto.setter + def zauto(self, val): + self["zauto"] = val + + @property + def zhoverformat(self): + """ + Sets the hover text formatting rulefor `z` using d3 formatting + mini-languages which are very similar to those in Python. For + numbers, see: + https://github.com/d3/d3-format/tree/v1.4.5#d3-format.By + default the values are formatted using generic number format. + + The 'zhoverformat' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["zhoverformat"] + + @zhoverformat.setter + def zhoverformat(self, val): + self["zhoverformat"] = val + + @property + def zmax(self): + """ + Sets the upper bound of the color domain. Value should have the + same units as in `z` and if set, `zmin` must be set as well. + + The 'zmax' property is a number and may be specified as: + - An int or float + + Returns + ------- + int|float + """ + return self["zmax"] + + @zmax.setter + def zmax(self, val): + self["zmax"] = val + + @property + def zmid(self): + """ + Sets the mid-point of the color domain by scaling `zmin` and/or + `zmax` to be equidistant to this point. Value should have the + same units as in `z`. Has no effect when `zauto` is `false`. + + The 'zmid' property is a number and may be specified as: + - An int or float + + Returns + ------- + int|float + """ + return self["zmid"] + + @zmid.setter + def zmid(self, val): + self["zmid"] = val + + @property + def zmin(self): + """ + Sets the lower bound of the color domain. Value should have the + same units as in `z` and if set, `zmax` must be set as well. + + The 'zmin' property is a number and may be specified as: + - An int or float + + Returns + ------- + int|float + """ + return self["zmin"] + + @zmin.setter + def zmin(self, val): + self["zmin"] = val + + @property + def zsrc(self): + """ + Sets the source reference on Chart Studio Cloud for `z`. + + The 'zsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["zsrc"] + + @zsrc.setter + def zsrc(self, val): + self["zsrc"] = val + + @property + def type(self): + return self._props["type"] + + @property + def _prop_descriptions(self): + return """\ + autobinx + Obsolete: since v1.42 each bin attribute is auto- + determined separately and `autobinx` is not needed. + However, we accept `autobinx: true` or `false` and will + update `xbins` accordingly before deleting `autobinx` + from the trace. + autobiny + Obsolete: since v1.42 each bin attribute is auto- + determined separately and `autobiny` is not needed. + However, we accept `autobiny: true` or `false` and will + update `ybins` accordingly before deleting `autobiny` + from the trace. + autocolorscale + Determines whether the colorscale is a default palette + (`autocolorscale: true`) or the palette determined by + `colorscale`. In case `colorscale` is unspecified or + `autocolorscale` is true, the default palette will be + chosen according to whether numbers in the `color` + array are all positive, all negative or mixed. + autocontour + Determines whether or not the contour level attributes + are picked by an algorithm. If True, the number of + contour levels can be set in `ncontours`. If False, set + the contour level attributes in `contours`. + bingroup + Set the `xbingroup` and `ybingroup` default prefix For + example, setting a `bingroup` of 1 on two histogram2d + traces will make them their x-bins and y-bins match + separately. + coloraxis + Sets a reference to a shared color axis. References to + these shared color axes are "coloraxis", "coloraxis2", + "coloraxis3", etc. Settings for these shared color axes + are set in the layout, under `layout.coloraxis`, + `layout.coloraxis2`, etc. Note that multiple color + scales can be linked to the same color axis. + colorbar + :class:`plotly.graph_objects.histogram2dcontour.ColorBa + r` instance or dict with compatible properties + colorscale + Sets the colorscale. The colorscale must be an array + containing arrays mapping a normalized value to an rgb, + rgba, hex, hsl, hsv, or named color string. At minimum, + a mapping for the lowest (0) and highest (1) values are + required. For example, `[[0, 'rgb(0,0,255)'], [1, + 'rgb(255,0,0)']]`. To control the bounds of the + colorscale in color space, use `zmin` and `zmax`. + Alternatively, `colorscale` may be a palette name + string of the following list: Blackbody,Bluered,Blues,C + ividis,Earth,Electric,Greens,Greys,Hot,Jet,Picnic,Portl + and,Rainbow,RdBu,Reds,Viridis,YlGnBu,YlOrRd. + contours + :class:`plotly.graph_objects.histogram2dcontour.Contour + s` instance or dict with compatible properties + customdata + Assigns extra data each datum. This may be useful when + listening to hover, click and selection events. Note + that, "scatter" traces also appends customdata items in + the markers DOM elements + customdatasrc + Sets the source reference on Chart Studio Cloud for + `customdata`. + histfunc + Specifies the binning function used for this histogram + trace. If "count", the histogram values are computed by + counting the number of values lying inside each bin. If + "sum", "avg", "min", "max", the histogram values are + computed using the sum, the average, the minimum or the + maximum of the values lying inside each bin + respectively. + histnorm + Specifies the type of normalization used for this + histogram trace. If "", the span of each bar + corresponds to the number of occurrences (i.e. the + number of data points lying inside the bins). If + "percent" / "probability", the span of each bar + corresponds to the percentage / fraction of occurrences + with respect to the total number of sample points + (here, the sum of all bin HEIGHTS equals 100% / 1). If + "density", the span of each bar corresponds to the + number of occurrences in a bin divided by the size of + the bin interval (here, the sum of all bin AREAS equals + the total number of sample points). If *probability + density*, the area of each bar corresponds to the + probability that an event will fall into the + corresponding bin (here, the sum of all bin AREAS + equals 1). + hoverinfo + Determines which trace information appear on hover. If + `none` or `skip` are set, no information is displayed + upon hovering. But, if `none` is set, click and hover + events are still fired. + hoverinfosrc + Sets the source reference on Chart Studio Cloud for + `hoverinfo`. + hoverlabel + :class:`plotly.graph_objects.histogram2dcontour.Hoverla + bel` instance or dict with compatible properties + hovertemplate + Template string used for rendering the information that + appear on hover box. Note that this will override + `hoverinfo`. Variables are inserted using %{variable}, + for example "y: %{y}" as well as %{xother}, {%_xother}, + {%_xother_}, {%xother_}. When showing info for several + points, "xother" will be added to those with different + x positions from the first point. An underscore before + or after "(x|y)other" will add a space on that side, + only when this field is shown. Numbers are formatted + using d3-format's syntax %{variable:d3-format}, for + example "Price: %{y:$.2f}". + https://github.com/d3/d3-format/tree/v1.4.5#d3-format + for details on the formatting syntax. Dates are + formatted using d3-time-format's syntax + %{variable|d3-time-format}, for example "Day: + %{2019-01-01|%A}". https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format for details on the + date formatting syntax. Variables that can't be found + will be replaced with the specifier. For example, a + template of "data: %{x}, %{y}" will result in a value + of "data: 1, %{y}" if x is 1 and y is missing. + Variables with an undefined value will be replaced with + the fallback value. The variables available in + `hovertemplate` are the ones emitted as event data + described at this link + https://plotly.com/javascript/plotlyjs-events/#event- + data. Additionally, all attributes that can be + specified per-point (the ones that are `arrayOk: true`) + are available. Finally, the template string has access + to variable `z` Anything contained in tag `` is + displayed in the secondary box, for example + `%{fullData.name}`. To hide the + secondary box completely, use an empty tag + ``. + hovertemplatefallback + Fallback string that's displayed when a variable + referenced in a template is missing. If the boolean + value 'false' is passed in, the specifier with the + missing variable will be displayed. + hovertemplatesrc + Sets the source reference on Chart Studio Cloud for + `hovertemplate`. + ids + Assigns id labels to each datum. These ids for object + constancy of data points during animation. Should be an + array of strings, not numbers or any other type. + idssrc + Sets the source reference on Chart Studio Cloud for + `ids`. + legend + Sets the reference to a legend to show this trace in. + References to these legends are "legend", "legend2", + "legend3", etc. Settings for these legends are set in + the layout, under `layout.legend`, `layout.legend2`, + etc. + legendgroup + Sets the legend group for this trace. Traces and shapes + part of the same legend group hide/show at the same + time when toggling legend items. + legendgrouptitle + :class:`plotly.graph_objects.histogram2dcontour.Legendg + rouptitle` instance or dict with compatible properties + legendrank + Sets the legend rank for this trace. Items and groups + with smaller ranks are presented on top/left side while + with "reversed" `legend.traceorder` they are on + bottom/right side. The default legendrank is 1000, so + that you can use ranks less than 1000 to place certain + items before all unranked items, and ranks greater than + 1000 to go after all unranked items. When having + unranked or equal rank items shapes would be displayed + after traces i.e. according to their order in data and + layout. + legendwidth + Sets the width (in px or fraction) of the legend for + this trace. + line + :class:`plotly.graph_objects.histogram2dcontour.Line` + instance or dict with compatible properties + marker + :class:`plotly.graph_objects.histogram2dcontour.Marker` + instance or dict with compatible properties + meta + Assigns extra meta information associated with this + trace that can be used in various text attributes. + Attributes such as trace `name`, graph, axis and + colorbar `title.text`, annotation `text` + `rangeselector`, `updatemenues` and `sliders` `label` + text all support `meta`. To access the trace `meta` + values in an attribute in the same trace, simply use + `%{meta[i]}` where `i` is the index or key of the + `meta` item in question. To access trace `meta` in + layout attributes, use `%{data[n[.meta[i]}` where `i` + is the index or key of the `meta` and `n` is the trace + index. + metasrc + Sets the source reference on Chart Studio Cloud for + `meta`. + name + Sets the trace name. The trace name appears as the + legend item and on hover. + nbinsx + Specifies the maximum number of desired bins. This + value will be used in an algorithm that will decide the + optimal bin size such that the histogram best + visualizes the distribution of the data. Ignored if + `xbins.size` is provided. + nbinsy + Specifies the maximum number of desired bins. This + value will be used in an algorithm that will decide the + optimal bin size such that the histogram best + visualizes the distribution of the data. Ignored if + `ybins.size` is provided. + ncontours + Sets the maximum number of contour levels. The actual + number of contours will be chosen automatically to be + less than or equal to the value of `ncontours`. Has an + effect only if `autocontour` is True or if + `contours.size` is missing. + opacity + Sets the opacity of the trace. + reversescale + Reverses the color mapping if true. If true, `zmin` + will correspond to the last color in the array and + `zmax` will correspond to the first color. + showlegend + Determines whether or not an item corresponding to this + trace is shown in the legend. + showscale + Determines whether or not a colorbar is displayed for + this trace. + stream + :class:`plotly.graph_objects.histogram2dcontour.Stream` + instance or dict with compatible properties + textfont + For this trace it only has an effect if `coloring` is + set to "heatmap". Sets the text font. + texttemplate + For this trace it only has an effect if `coloring` is + set to "heatmap". Template string used for rendering + the information text that appears on points. Note that + this will override `textinfo`. Variables are inserted + using %{variable}, for example "y: %{y}". Numbers are + formatted using d3-format's syntax + %{variable:d3-format}, for example "Price: %{y:$.2f}". + https://github.com/d3/d3-format/tree/v1.4.5#d3-format + for details on the formatting syntax. Dates are + formatted using d3-time-format's syntax + %{variable|d3-time-format}, for example "Day: + %{2019-01-01|%A}". https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format for details on the + date formatting syntax. Variables that can't be found + will be replaced with the specifier. For example, a + template of "data: %{x}, %{y}" will result in a value + of "data: 1, %{y}" if x is 1 and y is missing. + Variables with an undefined value will be replaced with + the fallback value. All attributes that can be + specified per-point (the ones that are `arrayOk: true`) + are available. Finally, the template string has access + to variables `x`, `y`, `z` and `text`. + texttemplatefallback + Fallback string that's displayed when a variable + referenced in a template is missing. If the boolean + value 'false' is passed in, the specifier with the + missing variable will be displayed. + uid + Assign an id to this trace, Use this to provide object + constancy between traces during animations and + transitions. + uirevision + Controls persistence of some user-driven changes to the + trace: `constraintrange` in `parcoords` traces, as well + as some `editable: true` modifications such as `name` + and `colorbar.title`. Defaults to `layout.uirevision`. + Note that other user-driven trace attribute changes are + controlled by `layout` attributes: `trace.visible` is + controlled by `layout.legend.uirevision`, + `selectedpoints` is controlled by + `layout.selectionrevision`, and `colorbar.(x|y)` + (accessible with `config: {editable: true}`) is + controlled by `layout.editrevision`. Trace changes are + tracked by `uid`, which only falls back on trace index + if no `uid` is provided. So if your app can add/remove + traces before the end of the `data` array, such that + the same trace has a different index, you can still + preserve user-driven changes if you give each trace a + `uid` that stays with it as it moves. + visible + Determines whether or not this trace is visible. If + "legendonly", the trace is not drawn, but can appear as + a legend item (provided that the legend itself is + visible). + x + Sets the sample data to be binned on the x axis. + xaxis + Sets a reference between this trace's x coordinates and + a 2D cartesian x axis. If "x" (the default value), the + x coordinates refer to `layout.xaxis`. If "x2", the x + coordinates refer to `layout.xaxis2`, and so on. + xbingroup + Set a group of histogram traces which will have + compatible x-bin settings. Using `xbingroup`, + histogram2d and histogram2dcontour traces (on axes of + the same axis type) can have compatible x-bin settings. + Note that the same `xbingroup` value can be used to set + (1D) histogram `bingroup` + xbins + :class:`plotly.graph_objects.histogram2dcontour.XBins` + instance or dict with compatible properties + xcalendar + Sets the calendar system to use with `x` date data. + xhoverformat + Sets the hover text formatting rulefor `x` using d3 + formatting mini-languages which are very similar to + those in Python. For numbers, see: + https://github.com/d3/d3-format/tree/v1.4.5#d3-format. + And for dates see: https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format. We add two items to + d3's date formatter: "%h" for half of the year as a + decimal number as well as "%{n}f" for fractional + seconds with n digits. For example, *2016-10-13 + 09:15:23.456* with tickformat "%H~%M~%S.%2f" would + display *09~15~23.46*By default the values are + formatted using `xaxis.hoverformat`. + xsrc + Sets the source reference on Chart Studio Cloud for + `x`. + y + Sets the sample data to be binned on the y axis. + yaxis + Sets a reference between this trace's y coordinates and + a 2D cartesian y axis. If "y" (the default value), the + y coordinates refer to `layout.yaxis`. If "y2", the y + coordinates refer to `layout.yaxis2`, and so on. + ybingroup + Set a group of histogram traces which will have + compatible y-bin settings. Using `ybingroup`, + histogram2d and histogram2dcontour traces (on axes of + the same axis type) can have compatible y-bin settings. + Note that the same `ybingroup` value can be used to set + (1D) histogram `bingroup` + ybins + :class:`plotly.graph_objects.histogram2dcontour.YBins` + instance or dict with compatible properties + ycalendar + Sets the calendar system to use with `y` date data. + yhoverformat + Sets the hover text formatting rulefor `y` using d3 + formatting mini-languages which are very similar to + those in Python. For numbers, see: + https://github.com/d3/d3-format/tree/v1.4.5#d3-format. + And for dates see: https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format. We add two items to + d3's date formatter: "%h" for half of the year as a + decimal number as well as "%{n}f" for fractional + seconds with n digits. For example, *2016-10-13 + 09:15:23.456* with tickformat "%H~%M~%S.%2f" would + display *09~15~23.46*By default the values are + formatted using `yaxis.hoverformat`. + ysrc + Sets the source reference on Chart Studio Cloud for + `y`. + z + Sets the aggregation data. + zauto + Determines whether or not the color domain is computed + with respect to the input data (here in `z`) or the + bounds set in `zmin` and `zmax` Defaults to `false` + when `zmin` and `zmax` are set by the user. + zhoverformat + Sets the hover text formatting rulefor `z` using d3 + formatting mini-languages which are very similar to + those in Python. For numbers, see: https://github.com/d + 3/d3-format/tree/v1.4.5#d3-format.By default the values + are formatted using generic number format. + zmax + Sets the upper bound of the color domain. Value should + have the same units as in `z` and if set, `zmin` must + be set as well. + zmid + Sets the mid-point of the color domain by scaling + `zmin` and/or `zmax` to be equidistant to this point. + Value should have the same units as in `z`. Has no + effect when `zauto` is `false`. + zmin + Sets the lower bound of the color domain. Value should + have the same units as in `z` and if set, `zmax` must + be set as well. + zsrc + Sets the source reference on Chart Studio Cloud for + `z`. + """ + + def __init__( + self, + arg=None, + autobinx=None, + autobiny=None, + autocolorscale=None, + autocontour=None, + bingroup=None, + coloraxis=None, + colorbar=None, + colorscale=None, + contours=None, + customdata=None, + customdatasrc=None, + histfunc=None, + histnorm=None, + hoverinfo=None, + hoverinfosrc=None, + hoverlabel=None, + hovertemplate=None, + hovertemplatefallback=None, + hovertemplatesrc=None, + ids=None, + idssrc=None, + legend=None, + legendgroup=None, + legendgrouptitle=None, + legendrank=None, + legendwidth=None, + line=None, + marker=None, + meta=None, + metasrc=None, + name=None, + nbinsx=None, + nbinsy=None, + ncontours=None, + opacity=None, + reversescale=None, + showlegend=None, + showscale=None, + stream=None, + textfont=None, + texttemplate=None, + texttemplatefallback=None, + uid=None, + uirevision=None, + visible=None, + x=None, + xaxis=None, + xbingroup=None, + xbins=None, + xcalendar=None, + xhoverformat=None, + xsrc=None, + y=None, + yaxis=None, + ybingroup=None, + ybins=None, + ycalendar=None, + yhoverformat=None, + ysrc=None, + z=None, + zauto=None, + zhoverformat=None, + zmax=None, + zmid=None, + zmin=None, + zsrc=None, + **kwargs, + ): + """ + Construct a new Histogram2dContour object + + The sample data from which statistics are computed is set in + `x` and `y` (where `x` and `y` represent marginal + distributions, binning is set in `xbins` and `ybins` in this + case) or `z` (where `z` represent the 2D distribution and + binning set, binning is set by `x` and `y` in this case). The + resulting distribution is visualized as a contour plot. + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.Histogram2dContour` + autobinx + Obsolete: since v1.42 each bin attribute is auto- + determined separately and `autobinx` is not needed. + However, we accept `autobinx: true` or `false` and will + update `xbins` accordingly before deleting `autobinx` + from the trace. + autobiny + Obsolete: since v1.42 each bin attribute is auto- + determined separately and `autobiny` is not needed. + However, we accept `autobiny: true` or `false` and will + update `ybins` accordingly before deleting `autobiny` + from the trace. + autocolorscale + Determines whether the colorscale is a default palette + (`autocolorscale: true`) or the palette determined by + `colorscale`. In case `colorscale` is unspecified or + `autocolorscale` is true, the default palette will be + chosen according to whether numbers in the `color` + array are all positive, all negative or mixed. + autocontour + Determines whether or not the contour level attributes + are picked by an algorithm. If True, the number of + contour levels can be set in `ncontours`. If False, set + the contour level attributes in `contours`. + bingroup + Set the `xbingroup` and `ybingroup` default prefix For + example, setting a `bingroup` of 1 on two histogram2d + traces will make them their x-bins and y-bins match + separately. + coloraxis + Sets a reference to a shared color axis. References to + these shared color axes are "coloraxis", "coloraxis2", + "coloraxis3", etc. Settings for these shared color axes + are set in the layout, under `layout.coloraxis`, + `layout.coloraxis2`, etc. Note that multiple color + scales can be linked to the same color axis. + colorbar + :class:`plotly.graph_objects.histogram2dcontour.ColorBa + r` instance or dict with compatible properties + colorscale + Sets the colorscale. The colorscale must be an array + containing arrays mapping a normalized value to an rgb, + rgba, hex, hsl, hsv, or named color string. At minimum, + a mapping for the lowest (0) and highest (1) values are + required. For example, `[[0, 'rgb(0,0,255)'], [1, + 'rgb(255,0,0)']]`. To control the bounds of the + colorscale in color space, use `zmin` and `zmax`. + Alternatively, `colorscale` may be a palette name + string of the following list: Blackbody,Bluered,Blues,C + ividis,Earth,Electric,Greens,Greys,Hot,Jet,Picnic,Portl + and,Rainbow,RdBu,Reds,Viridis,YlGnBu,YlOrRd. + contours + :class:`plotly.graph_objects.histogram2dcontour.Contour + s` instance or dict with compatible properties + customdata + Assigns extra data each datum. This may be useful when + listening to hover, click and selection events. Note + that, "scatter" traces also appends customdata items in + the markers DOM elements + customdatasrc + Sets the source reference on Chart Studio Cloud for + `customdata`. + histfunc + Specifies the binning function used for this histogram + trace. If "count", the histogram values are computed by + counting the number of values lying inside each bin. If + "sum", "avg", "min", "max", the histogram values are + computed using the sum, the average, the minimum or the + maximum of the values lying inside each bin + respectively. + histnorm + Specifies the type of normalization used for this + histogram trace. If "", the span of each bar + corresponds to the number of occurrences (i.e. the + number of data points lying inside the bins). If + "percent" / "probability", the span of each bar + corresponds to the percentage / fraction of occurrences + with respect to the total number of sample points + (here, the sum of all bin HEIGHTS equals 100% / 1). If + "density", the span of each bar corresponds to the + number of occurrences in a bin divided by the size of + the bin interval (here, the sum of all bin AREAS equals + the total number of sample points). If *probability + density*, the area of each bar corresponds to the + probability that an event will fall into the + corresponding bin (here, the sum of all bin AREAS + equals 1). + hoverinfo + Determines which trace information appear on hover. If + `none` or `skip` are set, no information is displayed + upon hovering. But, if `none` is set, click and hover + events are still fired. + hoverinfosrc + Sets the source reference on Chart Studio Cloud for + `hoverinfo`. + hoverlabel + :class:`plotly.graph_objects.histogram2dcontour.Hoverla + bel` instance or dict with compatible properties + hovertemplate + Template string used for rendering the information that + appear on hover box. Note that this will override + `hoverinfo`. Variables are inserted using %{variable}, + for example "y: %{y}" as well as %{xother}, {%_xother}, + {%_xother_}, {%xother_}. When showing info for several + points, "xother" will be added to those with different + x positions from the first point. An underscore before + or after "(x|y)other" will add a space on that side, + only when this field is shown. Numbers are formatted + using d3-format's syntax %{variable:d3-format}, for + example "Price: %{y:$.2f}". + https://github.com/d3/d3-format/tree/v1.4.5#d3-format + for details on the formatting syntax. Dates are + formatted using d3-time-format's syntax + %{variable|d3-time-format}, for example "Day: + %{2019-01-01|%A}". https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format for details on the + date formatting syntax. Variables that can't be found + will be replaced with the specifier. For example, a + template of "data: %{x}, %{y}" will result in a value + of "data: 1, %{y}" if x is 1 and y is missing. + Variables with an undefined value will be replaced with + the fallback value. The variables available in + `hovertemplate` are the ones emitted as event data + described at this link + https://plotly.com/javascript/plotlyjs-events/#event- + data. Additionally, all attributes that can be + specified per-point (the ones that are `arrayOk: true`) + are available. Finally, the template string has access + to variable `z` Anything contained in tag `` is + displayed in the secondary box, for example + `%{fullData.name}`. To hide the + secondary box completely, use an empty tag + ``. + hovertemplatefallback + Fallback string that's displayed when a variable + referenced in a template is missing. If the boolean + value 'false' is passed in, the specifier with the + missing variable will be displayed. + hovertemplatesrc + Sets the source reference on Chart Studio Cloud for + `hovertemplate`. + ids + Assigns id labels to each datum. These ids for object + constancy of data points during animation. Should be an + array of strings, not numbers or any other type. + idssrc + Sets the source reference on Chart Studio Cloud for + `ids`. + legend + Sets the reference to a legend to show this trace in. + References to these legends are "legend", "legend2", + "legend3", etc. Settings for these legends are set in + the layout, under `layout.legend`, `layout.legend2`, + etc. + legendgroup + Sets the legend group for this trace. Traces and shapes + part of the same legend group hide/show at the same + time when toggling legend items. + legendgrouptitle + :class:`plotly.graph_objects.histogram2dcontour.Legendg + rouptitle` instance or dict with compatible properties + legendrank + Sets the legend rank for this trace. Items and groups + with smaller ranks are presented on top/left side while + with "reversed" `legend.traceorder` they are on + bottom/right side. The default legendrank is 1000, so + that you can use ranks less than 1000 to place certain + items before all unranked items, and ranks greater than + 1000 to go after all unranked items. When having + unranked or equal rank items shapes would be displayed + after traces i.e. according to their order in data and + layout. + legendwidth + Sets the width (in px or fraction) of the legend for + this trace. + line + :class:`plotly.graph_objects.histogram2dcontour.Line` + instance or dict with compatible properties + marker + :class:`plotly.graph_objects.histogram2dcontour.Marker` + instance or dict with compatible properties + meta + Assigns extra meta information associated with this + trace that can be used in various text attributes. + Attributes such as trace `name`, graph, axis and + colorbar `title.text`, annotation `text` + `rangeselector`, `updatemenues` and `sliders` `label` + text all support `meta`. To access the trace `meta` + values in an attribute in the same trace, simply use + `%{meta[i]}` where `i` is the index or key of the + `meta` item in question. To access trace `meta` in + layout attributes, use `%{data[n[.meta[i]}` where `i` + is the index or key of the `meta` and `n` is the trace + index. + metasrc + Sets the source reference on Chart Studio Cloud for + `meta`. + name + Sets the trace name. The trace name appears as the + legend item and on hover. + nbinsx + Specifies the maximum number of desired bins. This + value will be used in an algorithm that will decide the + optimal bin size such that the histogram best + visualizes the distribution of the data. Ignored if + `xbins.size` is provided. + nbinsy + Specifies the maximum number of desired bins. This + value will be used in an algorithm that will decide the + optimal bin size such that the histogram best + visualizes the distribution of the data. Ignored if + `ybins.size` is provided. + ncontours + Sets the maximum number of contour levels. The actual + number of contours will be chosen automatically to be + less than or equal to the value of `ncontours`. Has an + effect only if `autocontour` is True or if + `contours.size` is missing. + opacity + Sets the opacity of the trace. + reversescale + Reverses the color mapping if true. If true, `zmin` + will correspond to the last color in the array and + `zmax` will correspond to the first color. + showlegend + Determines whether or not an item corresponding to this + trace is shown in the legend. + showscale + Determines whether or not a colorbar is displayed for + this trace. + stream + :class:`plotly.graph_objects.histogram2dcontour.Stream` + instance or dict with compatible properties + textfont + For this trace it only has an effect if `coloring` is + set to "heatmap". Sets the text font. + texttemplate + For this trace it only has an effect if `coloring` is + set to "heatmap". Template string used for rendering + the information text that appears on points. Note that + this will override `textinfo`. Variables are inserted + using %{variable}, for example "y: %{y}". Numbers are + formatted using d3-format's syntax + %{variable:d3-format}, for example "Price: %{y:$.2f}". + https://github.com/d3/d3-format/tree/v1.4.5#d3-format + for details on the formatting syntax. Dates are + formatted using d3-time-format's syntax + %{variable|d3-time-format}, for example "Day: + %{2019-01-01|%A}". https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format for details on the + date formatting syntax. Variables that can't be found + will be replaced with the specifier. For example, a + template of "data: %{x}, %{y}" will result in a value + of "data: 1, %{y}" if x is 1 and y is missing. + Variables with an undefined value will be replaced with + the fallback value. All attributes that can be + specified per-point (the ones that are `arrayOk: true`) + are available. Finally, the template string has access + to variables `x`, `y`, `z` and `text`. + texttemplatefallback + Fallback string that's displayed when a variable + referenced in a template is missing. If the boolean + value 'false' is passed in, the specifier with the + missing variable will be displayed. + uid + Assign an id to this trace, Use this to provide object + constancy between traces during animations and + transitions. + uirevision + Controls persistence of some user-driven changes to the + trace: `constraintrange` in `parcoords` traces, as well + as some `editable: true` modifications such as `name` + and `colorbar.title`. Defaults to `layout.uirevision`. + Note that other user-driven trace attribute changes are + controlled by `layout` attributes: `trace.visible` is + controlled by `layout.legend.uirevision`, + `selectedpoints` is controlled by + `layout.selectionrevision`, and `colorbar.(x|y)` + (accessible with `config: {editable: true}`) is + controlled by `layout.editrevision`. Trace changes are + tracked by `uid`, which only falls back on trace index + if no `uid` is provided. So if your app can add/remove + traces before the end of the `data` array, such that + the same trace has a different index, you can still + preserve user-driven changes if you give each trace a + `uid` that stays with it as it moves. + visible + Determines whether or not this trace is visible. If + "legendonly", the trace is not drawn, but can appear as + a legend item (provided that the legend itself is + visible). + x + Sets the sample data to be binned on the x axis. + xaxis + Sets a reference between this trace's x coordinates and + a 2D cartesian x axis. If "x" (the default value), the + x coordinates refer to `layout.xaxis`. If "x2", the x + coordinates refer to `layout.xaxis2`, and so on. + xbingroup + Set a group of histogram traces which will have + compatible x-bin settings. Using `xbingroup`, + histogram2d and histogram2dcontour traces (on axes of + the same axis type) can have compatible x-bin settings. + Note that the same `xbingroup` value can be used to set + (1D) histogram `bingroup` + xbins + :class:`plotly.graph_objects.histogram2dcontour.XBins` + instance or dict with compatible properties + xcalendar + Sets the calendar system to use with `x` date data. + xhoverformat + Sets the hover text formatting rulefor `x` using d3 + formatting mini-languages which are very similar to + those in Python. For numbers, see: + https://github.com/d3/d3-format/tree/v1.4.5#d3-format. + And for dates see: https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format. We add two items to + d3's date formatter: "%h" for half of the year as a + decimal number as well as "%{n}f" for fractional + seconds with n digits. For example, *2016-10-13 + 09:15:23.456* with tickformat "%H~%M~%S.%2f" would + display *09~15~23.46*By default the values are + formatted using `xaxis.hoverformat`. + xsrc + Sets the source reference on Chart Studio Cloud for + `x`. + y + Sets the sample data to be binned on the y axis. + yaxis + Sets a reference between this trace's y coordinates and + a 2D cartesian y axis. If "y" (the default value), the + y coordinates refer to `layout.yaxis`. If "y2", the y + coordinates refer to `layout.yaxis2`, and so on. + ybingroup + Set a group of histogram traces which will have + compatible y-bin settings. Using `ybingroup`, + histogram2d and histogram2dcontour traces (on axes of + the same axis type) can have compatible y-bin settings. + Note that the same `ybingroup` value can be used to set + (1D) histogram `bingroup` + ybins + :class:`plotly.graph_objects.histogram2dcontour.YBins` + instance or dict with compatible properties + ycalendar + Sets the calendar system to use with `y` date data. + yhoverformat + Sets the hover text formatting rulefor `y` using d3 + formatting mini-languages which are very similar to + those in Python. For numbers, see: + https://github.com/d3/d3-format/tree/v1.4.5#d3-format. + And for dates see: https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format. We add two items to + d3's date formatter: "%h" for half of the year as a + decimal number as well as "%{n}f" for fractional + seconds with n digits. For example, *2016-10-13 + 09:15:23.456* with tickformat "%H~%M~%S.%2f" would + display *09~15~23.46*By default the values are + formatted using `yaxis.hoverformat`. + ysrc + Sets the source reference on Chart Studio Cloud for + `y`. + z + Sets the aggregation data. + zauto + Determines whether or not the color domain is computed + with respect to the input data (here in `z`) or the + bounds set in `zmin` and `zmax` Defaults to `false` + when `zmin` and `zmax` are set by the user. + zhoverformat + Sets the hover text formatting rulefor `z` using d3 + formatting mini-languages which are very similar to + those in Python. For numbers, see: https://github.com/d + 3/d3-format/tree/v1.4.5#d3-format.By default the values + are formatted using generic number format. + zmax + Sets the upper bound of the color domain. Value should + have the same units as in `z` and if set, `zmin` must + be set as well. + zmid + Sets the mid-point of the color domain by scaling + `zmin` and/or `zmax` to be equidistant to this point. + Value should have the same units as in `z`. Has no + effect when `zauto` is `false`. + zmin + Sets the lower bound of the color domain. Value should + have the same units as in `z` and if set, `zmax` must + be set as well. + zsrc + Sets the source reference on Chart Studio Cloud for + `z`. + + Returns + ------- + Histogram2dContour + """ + super().__init__("histogram2dcontour") + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + if arg is None: + arg = {} + elif isinstance(arg, self.__class__): + arg = arg.to_plotly_json() + elif isinstance(arg, dict): + arg = _copy.copy(arg) + else: + raise ValueError("""\ +The first argument to the plotly.graph_objs.Histogram2dContour +constructor must be a dict or +an instance of :class:`plotly.graph_objs.Histogram2dContour`""") + + self._skip_invalid = kwargs.pop("skip_invalid", False) + self._validate = kwargs.pop("_validate", True) + + self._set_property("autobinx", arg, autobinx) + self._set_property("autobiny", arg, autobiny) + self._set_property("autocolorscale", arg, autocolorscale) + self._set_property("autocontour", arg, autocontour) + self._set_property("bingroup", arg, bingroup) + self._set_property("coloraxis", arg, coloraxis) + self._set_property("colorbar", arg, colorbar) + self._set_property("colorscale", arg, colorscale) + self._set_property("contours", arg, contours) + self._set_property("customdata", arg, customdata) + self._set_property("customdatasrc", arg, customdatasrc) + self._set_property("histfunc", arg, histfunc) + self._set_property("histnorm", arg, histnorm) + self._set_property("hoverinfo", arg, hoverinfo) + self._set_property("hoverinfosrc", arg, hoverinfosrc) + self._set_property("hoverlabel", arg, hoverlabel) + self._set_property("hovertemplate", arg, hovertemplate) + self._set_property("hovertemplatefallback", arg, hovertemplatefallback) + self._set_property("hovertemplatesrc", arg, hovertemplatesrc) + self._set_property("ids", arg, ids) + self._set_property("idssrc", arg, idssrc) + self._set_property("legend", arg, legend) + self._set_property("legendgroup", arg, legendgroup) + self._set_property("legendgrouptitle", arg, legendgrouptitle) + self._set_property("legendrank", arg, legendrank) + self._set_property("legendwidth", arg, legendwidth) + self._set_property("line", arg, line) + self._set_property("marker", arg, marker) + self._set_property("meta", arg, meta) + self._set_property("metasrc", arg, metasrc) + self._set_property("name", arg, name) + self._set_property("nbinsx", arg, nbinsx) + self._set_property("nbinsy", arg, nbinsy) + self._set_property("ncontours", arg, ncontours) + self._set_property("opacity", arg, opacity) + self._set_property("reversescale", arg, reversescale) + self._set_property("showlegend", arg, showlegend) + self._set_property("showscale", arg, showscale) + self._set_property("stream", arg, stream) + self._set_property("textfont", arg, textfont) + self._set_property("texttemplate", arg, texttemplate) + self._set_property("texttemplatefallback", arg, texttemplatefallback) + self._set_property("uid", arg, uid) + self._set_property("uirevision", arg, uirevision) + self._set_property("visible", arg, visible) + self._set_property("x", arg, x) + self._set_property("xaxis", arg, xaxis) + self._set_property("xbingroup", arg, xbingroup) + self._set_property("xbins", arg, xbins) + self._set_property("xcalendar", arg, xcalendar) + self._set_property("xhoverformat", arg, xhoverformat) + self._set_property("xsrc", arg, xsrc) + self._set_property("y", arg, y) + self._set_property("yaxis", arg, yaxis) + self._set_property("ybingroup", arg, ybingroup) + self._set_property("ybins", arg, ybins) + self._set_property("ycalendar", arg, ycalendar) + self._set_property("yhoverformat", arg, yhoverformat) + self._set_property("ysrc", arg, ysrc) + self._set_property("z", arg, z) + self._set_property("zauto", arg, zauto) + self._set_property("zhoverformat", arg, zhoverformat) + self._set_property("zmax", arg, zmax) + self._set_property("zmid", arg, zmid) + self._set_property("zmin", arg, zmin) + self._set_property("zsrc", arg, zsrc) + + self._props["type"] = "histogram2dcontour" + arg.pop("type", None) + self._process_kwargs(**dict(arg, **kwargs)) + self._skip_invalid = False diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/_icicle.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/_icicle.py new file mode 100644 index 0000000000000000000000000000000000000000..c1909cbe7e073b692e8fb5d4cc2c9f7c5cba3be1 --- /dev/null +++ b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/_icicle.py @@ -0,0 +1,1859 @@ +# --- THIS FILE IS AUTO-GENERATED --- +# Modifications will be overwitten the next time code generation run. + +from plotly.basedatatypes import BaseTraceType as _BaseTraceType +import copy as _copy + + +class Icicle(_BaseTraceType): + _parent_path_str = "" + _path_str = "icicle" + _valid_props = { + "branchvalues", + "count", + "customdata", + "customdatasrc", + "domain", + "hoverinfo", + "hoverinfosrc", + "hoverlabel", + "hovertemplate", + "hovertemplatefallback", + "hovertemplatesrc", + "hovertext", + "hovertextsrc", + "ids", + "idssrc", + "insidetextfont", + "labels", + "labelssrc", + "leaf", + "legend", + "legendgrouptitle", + "legendrank", + "legendwidth", + "level", + "marker", + "maxdepth", + "meta", + "metasrc", + "name", + "opacity", + "outsidetextfont", + "parents", + "parentssrc", + "pathbar", + "root", + "sort", + "stream", + "text", + "textfont", + "textinfo", + "textposition", + "textsrc", + "texttemplate", + "texttemplatefallback", + "texttemplatesrc", + "tiling", + "type", + "uid", + "uirevision", + "values", + "valuessrc", + "visible", + } + + @property + def branchvalues(self): + """ + Determines how the items in `values` are summed. When set to + "total", items in `values` are taken to be value of all its + descendants. When set to "remainder", items in `values` + corresponding to the root and the branches sectors are taken to + be the extra part not part of the sum of the values at their + leaves. + + The 'branchvalues' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['remainder', 'total'] + + Returns + ------- + Any + """ + return self["branchvalues"] + + @branchvalues.setter + def branchvalues(self, val): + self["branchvalues"] = val + + @property + def count(self): + """ + Determines default for `values` when it is not provided, by + inferring a 1 for each of the "leaves" and/or "branches", + otherwise 0. + + The 'count' property is a flaglist and may be specified + as a string containing: + - Any combination of ['branches', 'leaves'] joined with '+' characters + (e.g. 'branches+leaves') + + Returns + ------- + Any + """ + return self["count"] + + @count.setter + def count(self, val): + self["count"] = val + + @property + def customdata(self): + """ + Assigns extra data each datum. This may be useful when + listening to hover, click and selection events. Note that, + "scatter" traces also appends customdata items in the markers + DOM elements + + The 'customdata' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["customdata"] + + @customdata.setter + def customdata(self, val): + self["customdata"] = val + + @property + def customdatasrc(self): + """ + Sets the source reference on Chart Studio Cloud for + `customdata`. + + The 'customdatasrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["customdatasrc"] + + @customdatasrc.setter + def customdatasrc(self, val): + self["customdatasrc"] = val + + @property + def domain(self): + """ + The 'domain' property is an instance of Domain + that may be specified as: + - An instance of :class:`plotly.graph_objs.icicle.Domain` + - A dict of string/value properties that will be passed + to the Domain constructor + + Returns + ------- + plotly.graph_objs.icicle.Domain + """ + return self["domain"] + + @domain.setter + def domain(self, val): + self["domain"] = val + + @property + def hoverinfo(self): + """ + Determines which trace information appear on hover. If `none` + or `skip` are set, no information is displayed upon hovering. + But, if `none` is set, click and hover events are still fired. + + The 'hoverinfo' property is a flaglist and may be specified + as a string containing: + - Any combination of ['label', 'text', 'value', 'name', 'current path', 'percent root', 'percent entry', 'percent parent'] joined with '+' characters + (e.g. 'label+text') + OR exactly one of ['all', 'none', 'skip'] (e.g. 'skip') + - A list or array of the above + + Returns + ------- + Any|numpy.ndarray + """ + return self["hoverinfo"] + + @hoverinfo.setter + def hoverinfo(self, val): + self["hoverinfo"] = val + + @property + def hoverinfosrc(self): + """ + Sets the source reference on Chart Studio Cloud for + `hoverinfo`. + + The 'hoverinfosrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["hoverinfosrc"] + + @hoverinfosrc.setter + def hoverinfosrc(self, val): + self["hoverinfosrc"] = val + + @property + def hoverlabel(self): + """ + The 'hoverlabel' property is an instance of Hoverlabel + that may be specified as: + - An instance of :class:`plotly.graph_objs.icicle.Hoverlabel` + - A dict of string/value properties that will be passed + to the Hoverlabel constructor + + Returns + ------- + plotly.graph_objs.icicle.Hoverlabel + """ + return self["hoverlabel"] + + @hoverlabel.setter + def hoverlabel(self, val): + self["hoverlabel"] = val + + @property + def hovertemplate(self): + """ + Template string used for rendering the information that appear + on hover box. Note that this will override `hoverinfo`. + Variables are inserted using %{variable}, for example "y: %{y}" + as well as %{xother}, {%_xother}, {%_xother_}, {%xother_}. When + showing info for several points, "xother" will be added to + those with different x positions from the first point. An + underscore before or after "(x|y)other" will add a space on + that side, only when this field is shown. Numbers are formatted + using d3-format's syntax %{variable:d3-format}, for example + "Price: %{y:$.2f}". + https://github.com/d3/d3-format/tree/v1.4.5#d3-format for + details on the formatting syntax. Dates are formatted using + d3-time-format's syntax %{variable|d3-time-format}, for example + "Day: %{2019-01-01|%A}". https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format for details on the date + formatting syntax. Variables that can't be found will be + replaced with the specifier. For example, a template of "data: + %{x}, %{y}" will result in a value of "data: 1, %{y}" if x is 1 + and y is missing. Variables with an undefined value will be + replaced with the fallback value. The variables available in + `hovertemplate` are the ones emitted as event data described at + this link https://plotly.com/javascript/plotlyjs-events/#event- + data. Additionally, all attributes that can be specified per- + point (the ones that are `arrayOk: true`) are available. + Finally, the template string has access to variables + `currentPath`, `root`, `entry`, `percentRoot`, `percentEntry` + and `percentParent`. Anything contained in tag `` is + displayed in the secondary box, for example + `%{fullData.name}`. To hide the secondary box + completely, use an empty tag ``. + + The 'hovertemplate' property is a string and must be specified as: + - A string + - A number that will be converted to a string + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["hovertemplate"] + + @hovertemplate.setter + def hovertemplate(self, val): + self["hovertemplate"] = val + + @property + def hovertemplatefallback(self): + """ + Fallback string that's displayed when a variable referenced in + a template is missing. If the boolean value 'false' is passed + in, the specifier with the missing variable will be displayed. + + The 'hovertemplatefallback' property accepts values of any type + + Returns + ------- + Any + """ + return self["hovertemplatefallback"] + + @hovertemplatefallback.setter + def hovertemplatefallback(self, val): + self["hovertemplatefallback"] = val + + @property + def hovertemplatesrc(self): + """ + Sets the source reference on Chart Studio Cloud for + `hovertemplate`. + + The 'hovertemplatesrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["hovertemplatesrc"] + + @hovertemplatesrc.setter + def hovertemplatesrc(self, val): + self["hovertemplatesrc"] = val + + @property + def hovertext(self): + """ + Sets hover text elements associated with each sector. If a + single string, the same string appears for all data points. If + an array of string, the items are mapped in order of this + trace's sectors. To be seen, trace `hoverinfo` must contain a + "text" flag. + + The 'hovertext' property is a string and must be specified as: + - A string + - A number that will be converted to a string + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["hovertext"] + + @hovertext.setter + def hovertext(self, val): + self["hovertext"] = val + + @property + def hovertextsrc(self): + """ + Sets the source reference on Chart Studio Cloud for + `hovertext`. + + The 'hovertextsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["hovertextsrc"] + + @hovertextsrc.setter + def hovertextsrc(self, val): + self["hovertextsrc"] = val + + @property + def ids(self): + """ + Assigns id labels to each datum. These ids for object constancy + of data points during animation. Should be an array of strings, + not numbers or any other type. + + The 'ids' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["ids"] + + @ids.setter + def ids(self, val): + self["ids"] = val + + @property + def idssrc(self): + """ + Sets the source reference on Chart Studio Cloud for `ids`. + + The 'idssrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["idssrc"] + + @idssrc.setter + def idssrc(self, val): + self["idssrc"] = val + + @property + def insidetextfont(self): + """ + Sets the font used for `textinfo` lying inside the sector. + + The 'insidetextfont' property is an instance of Insidetextfont + that may be specified as: + - An instance of :class:`plotly.graph_objs.icicle.Insidetextfont` + - A dict of string/value properties that will be passed + to the Insidetextfont constructor + + Returns + ------- + plotly.graph_objs.icicle.Insidetextfont + """ + return self["insidetextfont"] + + @insidetextfont.setter + def insidetextfont(self, val): + self["insidetextfont"] = val + + @property + def labels(self): + """ + Sets the labels of each of the sectors. + + The 'labels' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["labels"] + + @labels.setter + def labels(self, val): + self["labels"] = val + + @property + def labelssrc(self): + """ + Sets the source reference on Chart Studio Cloud for `labels`. + + The 'labelssrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["labelssrc"] + + @labelssrc.setter + def labelssrc(self, val): + self["labelssrc"] = val + + @property + def leaf(self): + """ + The 'leaf' property is an instance of Leaf + that may be specified as: + - An instance of :class:`plotly.graph_objs.icicle.Leaf` + - A dict of string/value properties that will be passed + to the Leaf constructor + + Returns + ------- + plotly.graph_objs.icicle.Leaf + """ + return self["leaf"] + + @leaf.setter + def leaf(self, val): + self["leaf"] = val + + @property + def legend(self): + """ + Sets the reference to a legend to show this trace in. + References to these legends are "legend", "legend2", "legend3", + etc. Settings for these legends are set in the layout, under + `layout.legend`, `layout.legend2`, etc. + + The 'legend' property is an identifier of a particular + subplot, of type 'legend', that may be specified as: + - the string 'legend' optionally followed by an integer >= 1 + (e.g. 'legend', 'legend1', 'legend2', 'legend3', etc.) + + Returns + ------- + str + """ + return self["legend"] + + @legend.setter + def legend(self, val): + self["legend"] = val + + @property + def legendgrouptitle(self): + """ + The 'legendgrouptitle' property is an instance of Legendgrouptitle + that may be specified as: + - An instance of :class:`plotly.graph_objs.icicle.Legendgrouptitle` + - A dict of string/value properties that will be passed + to the Legendgrouptitle constructor + + Returns + ------- + plotly.graph_objs.icicle.Legendgrouptitle + """ + return self["legendgrouptitle"] + + @legendgrouptitle.setter + def legendgrouptitle(self, val): + self["legendgrouptitle"] = val + + @property + def legendrank(self): + """ + Sets the legend rank for this trace. Items and groups with + smaller ranks are presented on top/left side while with + "reversed" `legend.traceorder` they are on bottom/right side. + The default legendrank is 1000, so that you can use ranks less + than 1000 to place certain items before all unranked items, and + ranks greater than 1000 to go after all unranked items. When + having unranked or equal rank items shapes would be displayed + after traces i.e. according to their order in data and layout. + + The 'legendrank' property is a number and may be specified as: + - An int or float + + Returns + ------- + int|float + """ + return self["legendrank"] + + @legendrank.setter + def legendrank(self, val): + self["legendrank"] = val + + @property + def legendwidth(self): + """ + Sets the width (in px or fraction) of the legend for this + trace. + + The 'legendwidth' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["legendwidth"] + + @legendwidth.setter + def legendwidth(self, val): + self["legendwidth"] = val + + @property + def level(self): + """ + Sets the level from which this trace hierarchy is rendered. Set + `level` to `''` to start from the root node in the hierarchy. + Must be an "id" if `ids` is filled in, otherwise plotly + attempts to find a matching item in `labels`. + + The 'level' property accepts values of any type + + Returns + ------- + Any + """ + return self["level"] + + @level.setter + def level(self, val): + self["level"] = val + + @property + def marker(self): + """ + The 'marker' property is an instance of Marker + that may be specified as: + - An instance of :class:`plotly.graph_objs.icicle.Marker` + - A dict of string/value properties that will be passed + to the Marker constructor + + Returns + ------- + plotly.graph_objs.icicle.Marker + """ + return self["marker"] + + @marker.setter + def marker(self, val): + self["marker"] = val + + @property + def maxdepth(self): + """ + Sets the number of rendered sectors from any given `level`. Set + `maxdepth` to "-1" to render all the levels in the hierarchy. + + The 'maxdepth' property is a integer and may be specified as: + - An int (or float that will be cast to an int) + + Returns + ------- + int + """ + return self["maxdepth"] + + @maxdepth.setter + def maxdepth(self, val): + self["maxdepth"] = val + + @property + def meta(self): + """ + Assigns extra meta information associated with this trace that + can be used in various text attributes. Attributes such as + trace `name`, graph, axis and colorbar `title.text`, annotation + `text` `rangeselector`, `updatemenues` and `sliders` `label` + text all support `meta`. To access the trace `meta` values in + an attribute in the same trace, simply use `%{meta[i]}` where + `i` is the index or key of the `meta` item in question. To + access trace `meta` in layout attributes, use + `%{data[n[.meta[i]}` where `i` is the index or key of the + `meta` and `n` is the trace index. + + The 'meta' property accepts values of any type + + Returns + ------- + Any|numpy.ndarray + """ + return self["meta"] + + @meta.setter + def meta(self, val): + self["meta"] = val + + @property + def metasrc(self): + """ + Sets the source reference on Chart Studio Cloud for `meta`. + + The 'metasrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["metasrc"] + + @metasrc.setter + def metasrc(self, val): + self["metasrc"] = val + + @property + def name(self): + """ + Sets the trace name. The trace name appears as the legend item + and on hover. + + The 'name' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["name"] + + @name.setter + def name(self, val): + self["name"] = val + + @property + def opacity(self): + """ + Sets the opacity of the trace. + + The 'opacity' property is a number and may be specified as: + - An int or float in the interval [0, 1] + + Returns + ------- + int|float + """ + return self["opacity"] + + @opacity.setter + def opacity(self, val): + self["opacity"] = val + + @property + def outsidetextfont(self): + """ + Sets the font used for `textinfo` lying outside the sector. + This option refers to the root of the hierarchy presented on + top left corner of a treemap graph. Please note that if a + hierarchy has multiple root nodes, this option won't have any + effect and `insidetextfont` would be used. + + The 'outsidetextfont' property is an instance of Outsidetextfont + that may be specified as: + - An instance of :class:`plotly.graph_objs.icicle.Outsidetextfont` + - A dict of string/value properties that will be passed + to the Outsidetextfont constructor + + Returns + ------- + plotly.graph_objs.icicle.Outsidetextfont + """ + return self["outsidetextfont"] + + @outsidetextfont.setter + def outsidetextfont(self, val): + self["outsidetextfont"] = val + + @property + def parents(self): + """ + Sets the parent sectors for each of the sectors. Empty string + items '' are understood to reference the root node in the + hierarchy. If `ids` is filled, `parents` items are understood + to be "ids" themselves. When `ids` is not set, plotly attempts + to find matching items in `labels`, but beware they must be + unique. + + The 'parents' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["parents"] + + @parents.setter + def parents(self, val): + self["parents"] = val + + @property + def parentssrc(self): + """ + Sets the source reference on Chart Studio Cloud for `parents`. + + The 'parentssrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["parentssrc"] + + @parentssrc.setter + def parentssrc(self, val): + self["parentssrc"] = val + + @property + def pathbar(self): + """ + The 'pathbar' property is an instance of Pathbar + that may be specified as: + - An instance of :class:`plotly.graph_objs.icicle.Pathbar` + - A dict of string/value properties that will be passed + to the Pathbar constructor + + Returns + ------- + plotly.graph_objs.icicle.Pathbar + """ + return self["pathbar"] + + @pathbar.setter + def pathbar(self, val): + self["pathbar"] = val + + @property + def root(self): + """ + The 'root' property is an instance of Root + that may be specified as: + - An instance of :class:`plotly.graph_objs.icicle.Root` + - A dict of string/value properties that will be passed + to the Root constructor + + Returns + ------- + plotly.graph_objs.icicle.Root + """ + return self["root"] + + @root.setter + def root(self, val): + self["root"] = val + + @property + def sort(self): + """ + Determines whether or not the sectors are reordered from + largest to smallest. + + The 'sort' property is a boolean and must be specified as: + - A boolean value: True or False + + Returns + ------- + bool + """ + return self["sort"] + + @sort.setter + def sort(self, val): + self["sort"] = val + + @property + def stream(self): + """ + The 'stream' property is an instance of Stream + that may be specified as: + - An instance of :class:`plotly.graph_objs.icicle.Stream` + - A dict of string/value properties that will be passed + to the Stream constructor + + Returns + ------- + plotly.graph_objs.icicle.Stream + """ + return self["stream"] + + @stream.setter + def stream(self, val): + self["stream"] = val + + @property + def text(self): + """ + Sets text elements associated with each sector. If trace + `textinfo` contains a "text" flag, these elements will be seen + on the chart. If trace `hoverinfo` contains a "text" flag and + "hovertext" is not set, these elements will be seen in the + hover labels. + + The 'text' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["text"] + + @text.setter + def text(self, val): + self["text"] = val + + @property + def textfont(self): + """ + Sets the font used for `textinfo`. + + The 'textfont' property is an instance of Textfont + that may be specified as: + - An instance of :class:`plotly.graph_objs.icicle.Textfont` + - A dict of string/value properties that will be passed + to the Textfont constructor + + Returns + ------- + plotly.graph_objs.icicle.Textfont + """ + return self["textfont"] + + @textfont.setter + def textfont(self, val): + self["textfont"] = val + + @property + def textinfo(self): + """ + Determines which trace information appear on the graph. + + The 'textinfo' property is a flaglist and may be specified + as a string containing: + - Any combination of ['label', 'text', 'value', 'current path', 'percent root', 'percent entry', 'percent parent'] joined with '+' characters + (e.g. 'label+text') + OR exactly one of ['none'] (e.g. 'none') + + Returns + ------- + Any + """ + return self["textinfo"] + + @textinfo.setter + def textinfo(self, val): + self["textinfo"] = val + + @property + def textposition(self): + """ + Sets the positions of the `text` elements. + + The 'textposition' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['top left', 'top center', 'top right', 'middle left', + 'middle center', 'middle right', 'bottom left', 'bottom + center', 'bottom right'] + + Returns + ------- + Any + """ + return self["textposition"] + + @textposition.setter + def textposition(self, val): + self["textposition"] = val + + @property + def textsrc(self): + """ + Sets the source reference on Chart Studio Cloud for `text`. + + The 'textsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["textsrc"] + + @textsrc.setter + def textsrc(self, val): + self["textsrc"] = val + + @property + def texttemplate(self): + """ + Template string used for rendering the information text that + appears on points. Note that this will override `textinfo`. + Variables are inserted using %{variable}, for example "y: + %{y}". Numbers are formatted using d3-format's syntax + %{variable:d3-format}, for example "Price: %{y:$.2f}". + https://github.com/d3/d3-format/tree/v1.4.5#d3-format for + details on the formatting syntax. Dates are formatted using + d3-time-format's syntax %{variable|d3-time-format}, for example + "Day: %{2019-01-01|%A}". https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format for details on the date + formatting syntax. Variables that can't be found will be + replaced with the specifier. For example, a template of "data: + %{x}, %{y}" will result in a value of "data: 1, %{y}" if x is 1 + and y is missing. Variables with an undefined value will be + replaced with the fallback value. All attributes that can be + specified per-point (the ones that are `arrayOk: true`) are + available. Finally, the template string has access to variables + `currentPath`, `root`, `entry`, `percentRoot`, `percentEntry`, + `percentParent`, `label` and `value`. + + The 'texttemplate' property is a string and must be specified as: + - A string + - A number that will be converted to a string + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["texttemplate"] + + @texttemplate.setter + def texttemplate(self, val): + self["texttemplate"] = val + + @property + def texttemplatefallback(self): + """ + Fallback string that's displayed when a variable referenced in + a template is missing. If the boolean value 'false' is passed + in, the specifier with the missing variable will be displayed. + + The 'texttemplatefallback' property accepts values of any type + + Returns + ------- + Any + """ + return self["texttemplatefallback"] + + @texttemplatefallback.setter + def texttemplatefallback(self, val): + self["texttemplatefallback"] = val + + @property + def texttemplatesrc(self): + """ + Sets the source reference on Chart Studio Cloud for + `texttemplate`. + + The 'texttemplatesrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["texttemplatesrc"] + + @texttemplatesrc.setter + def texttemplatesrc(self, val): + self["texttemplatesrc"] = val + + @property + def tiling(self): + """ + The 'tiling' property is an instance of Tiling + that may be specified as: + - An instance of :class:`plotly.graph_objs.icicle.Tiling` + - A dict of string/value properties that will be passed + to the Tiling constructor + + Returns + ------- + plotly.graph_objs.icicle.Tiling + """ + return self["tiling"] + + @tiling.setter + def tiling(self, val): + self["tiling"] = val + + @property + def uid(self): + """ + Assign an id to this trace, Use this to provide object + constancy between traces during animations and transitions. + + The 'uid' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["uid"] + + @uid.setter + def uid(self, val): + self["uid"] = val + + @property + def uirevision(self): + """ + Controls persistence of some user-driven changes to the trace: + `constraintrange` in `parcoords` traces, as well as some + `editable: true` modifications such as `name` and + `colorbar.title`. Defaults to `layout.uirevision`. Note that + other user-driven trace attribute changes are controlled by + `layout` attributes: `trace.visible` is controlled by + `layout.legend.uirevision`, `selectedpoints` is controlled by + `layout.selectionrevision`, and `colorbar.(x|y)` (accessible + with `config: {editable: true}`) is controlled by + `layout.editrevision`. Trace changes are tracked by `uid`, + which only falls back on trace index if no `uid` is provided. + So if your app can add/remove traces before the end of the + `data` array, such that the same trace has a different index, + you can still preserve user-driven changes if you give each + trace a `uid` that stays with it as it moves. + + The 'uirevision' property accepts values of any type + + Returns + ------- + Any + """ + return self["uirevision"] + + @uirevision.setter + def uirevision(self, val): + self["uirevision"] = val + + @property + def values(self): + """ + Sets the values associated with each of the sectors. Use with + `branchvalues` to determine how the values are summed. + + The 'values' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["values"] + + @values.setter + def values(self, val): + self["values"] = val + + @property + def valuessrc(self): + """ + Sets the source reference on Chart Studio Cloud for `values`. + + The 'valuessrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["valuessrc"] + + @valuessrc.setter + def valuessrc(self, val): + self["valuessrc"] = val + + @property + def visible(self): + """ + Determines whether or not this trace is visible. If + "legendonly", the trace is not drawn, but can appear as a + legend item (provided that the legend itself is visible). + + The 'visible' property is an enumeration that may be specified as: + - One of the following enumeration values: + [True, False, 'legendonly'] + + Returns + ------- + Any + """ + return self["visible"] + + @visible.setter + def visible(self, val): + self["visible"] = val + + @property + def type(self): + return self._props["type"] + + @property + def _prop_descriptions(self): + return """\ + branchvalues + Determines how the items in `values` are summed. When + set to "total", items in `values` are taken to be value + of all its descendants. When set to "remainder", items + in `values` corresponding to the root and the branches + sectors are taken to be the extra part not part of the + sum of the values at their leaves. + count + Determines default for `values` when it is not + provided, by inferring a 1 for each of the "leaves" + and/or "branches", otherwise 0. + customdata + Assigns extra data each datum. This may be useful when + listening to hover, click and selection events. Note + that, "scatter" traces also appends customdata items in + the markers DOM elements + customdatasrc + Sets the source reference on Chart Studio Cloud for + `customdata`. + domain + :class:`plotly.graph_objects.icicle.Domain` instance or + dict with compatible properties + hoverinfo + Determines which trace information appear on hover. If + `none` or `skip` are set, no information is displayed + upon hovering. But, if `none` is set, click and hover + events are still fired. + hoverinfosrc + Sets the source reference on Chart Studio Cloud for + `hoverinfo`. + hoverlabel + :class:`plotly.graph_objects.icicle.Hoverlabel` + instance or dict with compatible properties + hovertemplate + Template string used for rendering the information that + appear on hover box. Note that this will override + `hoverinfo`. Variables are inserted using %{variable}, + for example "y: %{y}" as well as %{xother}, {%_xother}, + {%_xother_}, {%xother_}. When showing info for several + points, "xother" will be added to those with different + x positions from the first point. An underscore before + or after "(x|y)other" will add a space on that side, + only when this field is shown. Numbers are formatted + using d3-format's syntax %{variable:d3-format}, for + example "Price: %{y:$.2f}". + https://github.com/d3/d3-format/tree/v1.4.5#d3-format + for details on the formatting syntax. Dates are + formatted using d3-time-format's syntax + %{variable|d3-time-format}, for example "Day: + %{2019-01-01|%A}". https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format for details on the + date formatting syntax. Variables that can't be found + will be replaced with the specifier. For example, a + template of "data: %{x}, %{y}" will result in a value + of "data: 1, %{y}" if x is 1 and y is missing. + Variables with an undefined value will be replaced with + the fallback value. The variables available in + `hovertemplate` are the ones emitted as event data + described at this link + https://plotly.com/javascript/plotlyjs-events/#event- + data. Additionally, all attributes that can be + specified per-point (the ones that are `arrayOk: true`) + are available. Finally, the template string has access + to variables `currentPath`, `root`, `entry`, + `percentRoot`, `percentEntry` and `percentParent`. + Anything contained in tag `` is displayed in the + secondary box, for example + `%{fullData.name}`. To hide the + secondary box completely, use an empty tag + ``. + hovertemplatefallback + Fallback string that's displayed when a variable + referenced in a template is missing. If the boolean + value 'false' is passed in, the specifier with the + missing variable will be displayed. + hovertemplatesrc + Sets the source reference on Chart Studio Cloud for + `hovertemplate`. + hovertext + Sets hover text elements associated with each sector. + If a single string, the same string appears for all + data points. If an array of string, the items are + mapped in order of this trace's sectors. To be seen, + trace `hoverinfo` must contain a "text" flag. + hovertextsrc + Sets the source reference on Chart Studio Cloud for + `hovertext`. + ids + Assigns id labels to each datum. These ids for object + constancy of data points during animation. Should be an + array of strings, not numbers or any other type. + idssrc + Sets the source reference on Chart Studio Cloud for + `ids`. + insidetextfont + Sets the font used for `textinfo` lying inside the + sector. + labels + Sets the labels of each of the sectors. + labelssrc + Sets the source reference on Chart Studio Cloud for + `labels`. + leaf + :class:`plotly.graph_objects.icicle.Leaf` instance or + dict with compatible properties + legend + Sets the reference to a legend to show this trace in. + References to these legends are "legend", "legend2", + "legend3", etc. Settings for these legends are set in + the layout, under `layout.legend`, `layout.legend2`, + etc. + legendgrouptitle + :class:`plotly.graph_objects.icicle.Legendgrouptitle` + instance or dict with compatible properties + legendrank + Sets the legend rank for this trace. Items and groups + with smaller ranks are presented on top/left side while + with "reversed" `legend.traceorder` they are on + bottom/right side. The default legendrank is 1000, so + that you can use ranks less than 1000 to place certain + items before all unranked items, and ranks greater than + 1000 to go after all unranked items. When having + unranked or equal rank items shapes would be displayed + after traces i.e. according to their order in data and + layout. + legendwidth + Sets the width (in px or fraction) of the legend for + this trace. + level + Sets the level from which this trace hierarchy is + rendered. Set `level` to `''` to start from the root + node in the hierarchy. Must be an "id" if `ids` is + filled in, otherwise plotly attempts to find a matching + item in `labels`. + marker + :class:`plotly.graph_objects.icicle.Marker` instance or + dict with compatible properties + maxdepth + Sets the number of rendered sectors from any given + `level`. Set `maxdepth` to "-1" to render all the + levels in the hierarchy. + meta + Assigns extra meta information associated with this + trace that can be used in various text attributes. + Attributes such as trace `name`, graph, axis and + colorbar `title.text`, annotation `text` + `rangeselector`, `updatemenues` and `sliders` `label` + text all support `meta`. To access the trace `meta` + values in an attribute in the same trace, simply use + `%{meta[i]}` where `i` is the index or key of the + `meta` item in question. To access trace `meta` in + layout attributes, use `%{data[n[.meta[i]}` where `i` + is the index or key of the `meta` and `n` is the trace + index. + metasrc + Sets the source reference on Chart Studio Cloud for + `meta`. + name + Sets the trace name. The trace name appears as the + legend item and on hover. + opacity + Sets the opacity of the trace. + outsidetextfont + Sets the font used for `textinfo` lying outside the + sector. This option refers to the root of the hierarchy + presented on top left corner of a treemap graph. Please + note that if a hierarchy has multiple root nodes, this + option won't have any effect and `insidetextfont` would + be used. + parents + Sets the parent sectors for each of the sectors. Empty + string items '' are understood to reference the root + node in the hierarchy. If `ids` is filled, `parents` + items are understood to be "ids" themselves. When `ids` + is not set, plotly attempts to find matching items in + `labels`, but beware they must be unique. + parentssrc + Sets the source reference on Chart Studio Cloud for + `parents`. + pathbar + :class:`plotly.graph_objects.icicle.Pathbar` instance + or dict with compatible properties + root + :class:`plotly.graph_objects.icicle.Root` instance or + dict with compatible properties + sort + Determines whether or not the sectors are reordered + from largest to smallest. + stream + :class:`plotly.graph_objects.icicle.Stream` instance or + dict with compatible properties + text + Sets text elements associated with each sector. If + trace `textinfo` contains a "text" flag, these elements + will be seen on the chart. If trace `hoverinfo` + contains a "text" flag and "hovertext" is not set, + these elements will be seen in the hover labels. + textfont + Sets the font used for `textinfo`. + textinfo + Determines which trace information appear on the graph. + textposition + Sets the positions of the `text` elements. + textsrc + Sets the source reference on Chart Studio Cloud for + `text`. + texttemplate + Template string used for rendering the information text + that appears on points. Note that this will override + `textinfo`. Variables are inserted using %{variable}, + for example "y: %{y}". Numbers are formatted using + d3-format's syntax %{variable:d3-format}, for example + "Price: %{y:$.2f}". + https://github.com/d3/d3-format/tree/v1.4.5#d3-format + for details on the formatting syntax. Dates are + formatted using d3-time-format's syntax + %{variable|d3-time-format}, for example "Day: + %{2019-01-01|%A}". https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format for details on the + date formatting syntax. Variables that can't be found + will be replaced with the specifier. For example, a + template of "data: %{x}, %{y}" will result in a value + of "data: 1, %{y}" if x is 1 and y is missing. + Variables with an undefined value will be replaced with + the fallback value. All attributes that can be + specified per-point (the ones that are `arrayOk: true`) + are available. Finally, the template string has access + to variables `currentPath`, `root`, `entry`, + `percentRoot`, `percentEntry`, `percentParent`, `label` + and `value`. + texttemplatefallback + Fallback string that's displayed when a variable + referenced in a template is missing. If the boolean + value 'false' is passed in, the specifier with the + missing variable will be displayed. + texttemplatesrc + Sets the source reference on Chart Studio Cloud for + `texttemplate`. + tiling + :class:`plotly.graph_objects.icicle.Tiling` instance or + dict with compatible properties + uid + Assign an id to this trace, Use this to provide object + constancy between traces during animations and + transitions. + uirevision + Controls persistence of some user-driven changes to the + trace: `constraintrange` in `parcoords` traces, as well + as some `editable: true` modifications such as `name` + and `colorbar.title`. Defaults to `layout.uirevision`. + Note that other user-driven trace attribute changes are + controlled by `layout` attributes: `trace.visible` is + controlled by `layout.legend.uirevision`, + `selectedpoints` is controlled by + `layout.selectionrevision`, and `colorbar.(x|y)` + (accessible with `config: {editable: true}`) is + controlled by `layout.editrevision`. Trace changes are + tracked by `uid`, which only falls back on trace index + if no `uid` is provided. So if your app can add/remove + traces before the end of the `data` array, such that + the same trace has a different index, you can still + preserve user-driven changes if you give each trace a + `uid` that stays with it as it moves. + values + Sets the values associated with each of the sectors. + Use with `branchvalues` to determine how the values are + summed. + valuessrc + Sets the source reference on Chart Studio Cloud for + `values`. + visible + Determines whether or not this trace is visible. If + "legendonly", the trace is not drawn, but can appear as + a legend item (provided that the legend itself is + visible). + """ + + def __init__( + self, + arg=None, + branchvalues=None, + count=None, + customdata=None, + customdatasrc=None, + domain=None, + hoverinfo=None, + hoverinfosrc=None, + hoverlabel=None, + hovertemplate=None, + hovertemplatefallback=None, + hovertemplatesrc=None, + hovertext=None, + hovertextsrc=None, + ids=None, + idssrc=None, + insidetextfont=None, + labels=None, + labelssrc=None, + leaf=None, + legend=None, + legendgrouptitle=None, + legendrank=None, + legendwidth=None, + level=None, + marker=None, + maxdepth=None, + meta=None, + metasrc=None, + name=None, + opacity=None, + outsidetextfont=None, + parents=None, + parentssrc=None, + pathbar=None, + root=None, + sort=None, + stream=None, + text=None, + textfont=None, + textinfo=None, + textposition=None, + textsrc=None, + texttemplate=None, + texttemplatefallback=None, + texttemplatesrc=None, + tiling=None, + uid=None, + uirevision=None, + values=None, + valuessrc=None, + visible=None, + **kwargs, + ): + """ + Construct a new Icicle object + + Visualize hierarchal data from leaves (and/or outer branches) + towards root with rectangles. The icicle sectors are determined + by the entries in "labels" or "ids" and in "parents". + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of :class:`plotly.graph_objs.Icicle` + branchvalues + Determines how the items in `values` are summed. When + set to "total", items in `values` are taken to be value + of all its descendants. When set to "remainder", items + in `values` corresponding to the root and the branches + sectors are taken to be the extra part not part of the + sum of the values at their leaves. + count + Determines default for `values` when it is not + provided, by inferring a 1 for each of the "leaves" + and/or "branches", otherwise 0. + customdata + Assigns extra data each datum. This may be useful when + listening to hover, click and selection events. Note + that, "scatter" traces also appends customdata items in + the markers DOM elements + customdatasrc + Sets the source reference on Chart Studio Cloud for + `customdata`. + domain + :class:`plotly.graph_objects.icicle.Domain` instance or + dict with compatible properties + hoverinfo + Determines which trace information appear on hover. If + `none` or `skip` are set, no information is displayed + upon hovering. But, if `none` is set, click and hover + events are still fired. + hoverinfosrc + Sets the source reference on Chart Studio Cloud for + `hoverinfo`. + hoverlabel + :class:`plotly.graph_objects.icicle.Hoverlabel` + instance or dict with compatible properties + hovertemplate + Template string used for rendering the information that + appear on hover box. Note that this will override + `hoverinfo`. Variables are inserted using %{variable}, + for example "y: %{y}" as well as %{xother}, {%_xother}, + {%_xother_}, {%xother_}. When showing info for several + points, "xother" will be added to those with different + x positions from the first point. An underscore before + or after "(x|y)other" will add a space on that side, + only when this field is shown. Numbers are formatted + using d3-format's syntax %{variable:d3-format}, for + example "Price: %{y:$.2f}". + https://github.com/d3/d3-format/tree/v1.4.5#d3-format + for details on the formatting syntax. Dates are + formatted using d3-time-format's syntax + %{variable|d3-time-format}, for example "Day: + %{2019-01-01|%A}". https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format for details on the + date formatting syntax. Variables that can't be found + will be replaced with the specifier. For example, a + template of "data: %{x}, %{y}" will result in a value + of "data: 1, %{y}" if x is 1 and y is missing. + Variables with an undefined value will be replaced with + the fallback value. The variables available in + `hovertemplate` are the ones emitted as event data + described at this link + https://plotly.com/javascript/plotlyjs-events/#event- + data. Additionally, all attributes that can be + specified per-point (the ones that are `arrayOk: true`) + are available. Finally, the template string has access + to variables `currentPath`, `root`, `entry`, + `percentRoot`, `percentEntry` and `percentParent`. + Anything contained in tag `` is displayed in the + secondary box, for example + `%{fullData.name}`. To hide the + secondary box completely, use an empty tag + ``. + hovertemplatefallback + Fallback string that's displayed when a variable + referenced in a template is missing. If the boolean + value 'false' is passed in, the specifier with the + missing variable will be displayed. + hovertemplatesrc + Sets the source reference on Chart Studio Cloud for + `hovertemplate`. + hovertext + Sets hover text elements associated with each sector. + If a single string, the same string appears for all + data points. If an array of string, the items are + mapped in order of this trace's sectors. To be seen, + trace `hoverinfo` must contain a "text" flag. + hovertextsrc + Sets the source reference on Chart Studio Cloud for + `hovertext`. + ids + Assigns id labels to each datum. These ids for object + constancy of data points during animation. Should be an + array of strings, not numbers or any other type. + idssrc + Sets the source reference on Chart Studio Cloud for + `ids`. + insidetextfont + Sets the font used for `textinfo` lying inside the + sector. + labels + Sets the labels of each of the sectors. + labelssrc + Sets the source reference on Chart Studio Cloud for + `labels`. + leaf + :class:`plotly.graph_objects.icicle.Leaf` instance or + dict with compatible properties + legend + Sets the reference to a legend to show this trace in. + References to these legends are "legend", "legend2", + "legend3", etc. Settings for these legends are set in + the layout, under `layout.legend`, `layout.legend2`, + etc. + legendgrouptitle + :class:`plotly.graph_objects.icicle.Legendgrouptitle` + instance or dict with compatible properties + legendrank + Sets the legend rank for this trace. Items and groups + with smaller ranks are presented on top/left side while + with "reversed" `legend.traceorder` they are on + bottom/right side. The default legendrank is 1000, so + that you can use ranks less than 1000 to place certain + items before all unranked items, and ranks greater than + 1000 to go after all unranked items. When having + unranked or equal rank items shapes would be displayed + after traces i.e. according to their order in data and + layout. + legendwidth + Sets the width (in px or fraction) of the legend for + this trace. + level + Sets the level from which this trace hierarchy is + rendered. Set `level` to `''` to start from the root + node in the hierarchy. Must be an "id" if `ids` is + filled in, otherwise plotly attempts to find a matching + item in `labels`. + marker + :class:`plotly.graph_objects.icicle.Marker` instance or + dict with compatible properties + maxdepth + Sets the number of rendered sectors from any given + `level`. Set `maxdepth` to "-1" to render all the + levels in the hierarchy. + meta + Assigns extra meta information associated with this + trace that can be used in various text attributes. + Attributes such as trace `name`, graph, axis and + colorbar `title.text`, annotation `text` + `rangeselector`, `updatemenues` and `sliders` `label` + text all support `meta`. To access the trace `meta` + values in an attribute in the same trace, simply use + `%{meta[i]}` where `i` is the index or key of the + `meta` item in question. To access trace `meta` in + layout attributes, use `%{data[n[.meta[i]}` where `i` + is the index or key of the `meta` and `n` is the trace + index. + metasrc + Sets the source reference on Chart Studio Cloud for + `meta`. + name + Sets the trace name. The trace name appears as the + legend item and on hover. + opacity + Sets the opacity of the trace. + outsidetextfont + Sets the font used for `textinfo` lying outside the + sector. This option refers to the root of the hierarchy + presented on top left corner of a treemap graph. Please + note that if a hierarchy has multiple root nodes, this + option won't have any effect and `insidetextfont` would + be used. + parents + Sets the parent sectors for each of the sectors. Empty + string items '' are understood to reference the root + node in the hierarchy. If `ids` is filled, `parents` + items are understood to be "ids" themselves. When `ids` + is not set, plotly attempts to find matching items in + `labels`, but beware they must be unique. + parentssrc + Sets the source reference on Chart Studio Cloud for + `parents`. + pathbar + :class:`plotly.graph_objects.icicle.Pathbar` instance + or dict with compatible properties + root + :class:`plotly.graph_objects.icicle.Root` instance or + dict with compatible properties + sort + Determines whether or not the sectors are reordered + from largest to smallest. + stream + :class:`plotly.graph_objects.icicle.Stream` instance or + dict with compatible properties + text + Sets text elements associated with each sector. If + trace `textinfo` contains a "text" flag, these elements + will be seen on the chart. If trace `hoverinfo` + contains a "text" flag and "hovertext" is not set, + these elements will be seen in the hover labels. + textfont + Sets the font used for `textinfo`. + textinfo + Determines which trace information appear on the graph. + textposition + Sets the positions of the `text` elements. + textsrc + Sets the source reference on Chart Studio Cloud for + `text`. + texttemplate + Template string used for rendering the information text + that appears on points. Note that this will override + `textinfo`. Variables are inserted using %{variable}, + for example "y: %{y}". Numbers are formatted using + d3-format's syntax %{variable:d3-format}, for example + "Price: %{y:$.2f}". + https://github.com/d3/d3-format/tree/v1.4.5#d3-format + for details on the formatting syntax. Dates are + formatted using d3-time-format's syntax + %{variable|d3-time-format}, for example "Day: + %{2019-01-01|%A}". https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format for details on the + date formatting syntax. Variables that can't be found + will be replaced with the specifier. For example, a + template of "data: %{x}, %{y}" will result in a value + of "data: 1, %{y}" if x is 1 and y is missing. + Variables with an undefined value will be replaced with + the fallback value. All attributes that can be + specified per-point (the ones that are `arrayOk: true`) + are available. Finally, the template string has access + to variables `currentPath`, `root`, `entry`, + `percentRoot`, `percentEntry`, `percentParent`, `label` + and `value`. + texttemplatefallback + Fallback string that's displayed when a variable + referenced in a template is missing. If the boolean + value 'false' is passed in, the specifier with the + missing variable will be displayed. + texttemplatesrc + Sets the source reference on Chart Studio Cloud for + `texttemplate`. + tiling + :class:`plotly.graph_objects.icicle.Tiling` instance or + dict with compatible properties + uid + Assign an id to this trace, Use this to provide object + constancy between traces during animations and + transitions. + uirevision + Controls persistence of some user-driven changes to the + trace: `constraintrange` in `parcoords` traces, as well + as some `editable: true` modifications such as `name` + and `colorbar.title`. Defaults to `layout.uirevision`. + Note that other user-driven trace attribute changes are + controlled by `layout` attributes: `trace.visible` is + controlled by `layout.legend.uirevision`, + `selectedpoints` is controlled by + `layout.selectionrevision`, and `colorbar.(x|y)` + (accessible with `config: {editable: true}`) is + controlled by `layout.editrevision`. Trace changes are + tracked by `uid`, which only falls back on trace index + if no `uid` is provided. So if your app can add/remove + traces before the end of the `data` array, such that + the same trace has a different index, you can still + preserve user-driven changes if you give each trace a + `uid` that stays with it as it moves. + values + Sets the values associated with each of the sectors. + Use with `branchvalues` to determine how the values are + summed. + valuessrc + Sets the source reference on Chart Studio Cloud for + `values`. + visible + Determines whether or not this trace is visible. If + "legendonly", the trace is not drawn, but can appear as + a legend item (provided that the legend itself is + visible). + + Returns + ------- + Icicle + """ + super().__init__("icicle") + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + if arg is None: + arg = {} + elif isinstance(arg, self.__class__): + arg = arg.to_plotly_json() + elif isinstance(arg, dict): + arg = _copy.copy(arg) + else: + raise ValueError("""\ +The first argument to the plotly.graph_objs.Icicle +constructor must be a dict or +an instance of :class:`plotly.graph_objs.Icicle`""") + + self._skip_invalid = kwargs.pop("skip_invalid", False) + self._validate = kwargs.pop("_validate", True) + + self._set_property("branchvalues", arg, branchvalues) + self._set_property("count", arg, count) + self._set_property("customdata", arg, customdata) + self._set_property("customdatasrc", arg, customdatasrc) + self._set_property("domain", arg, domain) + self._set_property("hoverinfo", arg, hoverinfo) + self._set_property("hoverinfosrc", arg, hoverinfosrc) + self._set_property("hoverlabel", arg, hoverlabel) + self._set_property("hovertemplate", arg, hovertemplate) + self._set_property("hovertemplatefallback", arg, hovertemplatefallback) + self._set_property("hovertemplatesrc", arg, hovertemplatesrc) + self._set_property("hovertext", arg, hovertext) + self._set_property("hovertextsrc", arg, hovertextsrc) + self._set_property("ids", arg, ids) + self._set_property("idssrc", arg, idssrc) + self._set_property("insidetextfont", arg, insidetextfont) + self._set_property("labels", arg, labels) + self._set_property("labelssrc", arg, labelssrc) + self._set_property("leaf", arg, leaf) + self._set_property("legend", arg, legend) + self._set_property("legendgrouptitle", arg, legendgrouptitle) + self._set_property("legendrank", arg, legendrank) + self._set_property("legendwidth", arg, legendwidth) + self._set_property("level", arg, level) + self._set_property("marker", arg, marker) + self._set_property("maxdepth", arg, maxdepth) + self._set_property("meta", arg, meta) + self._set_property("metasrc", arg, metasrc) + self._set_property("name", arg, name) + self._set_property("opacity", arg, opacity) + self._set_property("outsidetextfont", arg, outsidetextfont) + self._set_property("parents", arg, parents) + self._set_property("parentssrc", arg, parentssrc) + self._set_property("pathbar", arg, pathbar) + self._set_property("root", arg, root) + self._set_property("sort", arg, sort) + self._set_property("stream", arg, stream) + self._set_property("text", arg, text) + self._set_property("textfont", arg, textfont) + self._set_property("textinfo", arg, textinfo) + self._set_property("textposition", arg, textposition) + self._set_property("textsrc", arg, textsrc) + self._set_property("texttemplate", arg, texttemplate) + self._set_property("texttemplatefallback", arg, texttemplatefallback) + self._set_property("texttemplatesrc", arg, texttemplatesrc) + self._set_property("tiling", arg, tiling) + self._set_property("uid", arg, uid) + self._set_property("uirevision", arg, uirevision) + self._set_property("values", arg, values) + self._set_property("valuessrc", arg, valuessrc) + self._set_property("visible", arg, visible) + + self._props["type"] = "icicle" + arg.pop("type", None) + self._process_kwargs(**dict(arg, **kwargs)) + self._skip_invalid = False diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/_image.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/_image.py new file mode 100644 index 0000000000000000000000000000000000000000..e1ebdbe36fe262e65765066bd2e9ac7e07fc9142 --- /dev/null +++ b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/_image.py @@ -0,0 +1,1503 @@ +# --- THIS FILE IS AUTO-GENERATED --- +# Modifications will be overwitten the next time code generation run. + +from plotly.basedatatypes import BaseTraceType as _BaseTraceType +import copy as _copy + + +class Image(_BaseTraceType): + _parent_path_str = "" + _path_str = "image" + _valid_props = { + "colormodel", + "customdata", + "customdatasrc", + "dx", + "dy", + "hoverinfo", + "hoverinfosrc", + "hoverlabel", + "hovertemplate", + "hovertemplatefallback", + "hovertemplatesrc", + "hovertext", + "hovertextsrc", + "ids", + "idssrc", + "legend", + "legendgrouptitle", + "legendrank", + "legendwidth", + "meta", + "metasrc", + "name", + "opacity", + "source", + "stream", + "text", + "textsrc", + "type", + "uid", + "uirevision", + "visible", + "x0", + "xaxis", + "y0", + "yaxis", + "z", + "zmax", + "zmin", + "zorder", + "zsmooth", + "zsrc", + } + + @property + def colormodel(self): + """ + Color model used to map the numerical color components + described in `z` into colors. If `source` is specified, this + attribute will be set to `rgba256` otherwise it defaults to + `rgb`. + + The 'colormodel' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['rgb', 'rgba', 'rgba256', 'hsl', 'hsla'] + + Returns + ------- + Any + """ + return self["colormodel"] + + @colormodel.setter + def colormodel(self, val): + self["colormodel"] = val + + @property + def customdata(self): + """ + Assigns extra data each datum. This may be useful when + listening to hover, click and selection events. Note that, + "scatter" traces also appends customdata items in the markers + DOM elements + + The 'customdata' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["customdata"] + + @customdata.setter + def customdata(self, val): + self["customdata"] = val + + @property + def customdatasrc(self): + """ + Sets the source reference on Chart Studio Cloud for + `customdata`. + + The 'customdatasrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["customdatasrc"] + + @customdatasrc.setter + def customdatasrc(self, val): + self["customdatasrc"] = val + + @property + def dx(self): + """ + Set the pixel's horizontal size. + + The 'dx' property is a number and may be specified as: + - An int or float + + Returns + ------- + int|float + """ + return self["dx"] + + @dx.setter + def dx(self, val): + self["dx"] = val + + @property + def dy(self): + """ + Set the pixel's vertical size + + The 'dy' property is a number and may be specified as: + - An int or float + + Returns + ------- + int|float + """ + return self["dy"] + + @dy.setter + def dy(self, val): + self["dy"] = val + + @property + def hoverinfo(self): + """ + Determines which trace information appear on hover. If `none` + or `skip` are set, no information is displayed upon hovering. + But, if `none` is set, click and hover events are still fired. + + The 'hoverinfo' property is a flaglist and may be specified + as a string containing: + - Any combination of ['x', 'y', 'z', 'color', 'name', 'text'] joined with '+' characters + (e.g. 'x+y') + OR exactly one of ['all', 'none', 'skip'] (e.g. 'skip') + - A list or array of the above + + Returns + ------- + Any|numpy.ndarray + """ + return self["hoverinfo"] + + @hoverinfo.setter + def hoverinfo(self, val): + self["hoverinfo"] = val + + @property + def hoverinfosrc(self): + """ + Sets the source reference on Chart Studio Cloud for + `hoverinfo`. + + The 'hoverinfosrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["hoverinfosrc"] + + @hoverinfosrc.setter + def hoverinfosrc(self, val): + self["hoverinfosrc"] = val + + @property + def hoverlabel(self): + """ + The 'hoverlabel' property is an instance of Hoverlabel + that may be specified as: + - An instance of :class:`plotly.graph_objs.image.Hoverlabel` + - A dict of string/value properties that will be passed + to the Hoverlabel constructor + + Returns + ------- + plotly.graph_objs.image.Hoverlabel + """ + return self["hoverlabel"] + + @hoverlabel.setter + def hoverlabel(self, val): + self["hoverlabel"] = val + + @property + def hovertemplate(self): + """ + Template string used for rendering the information that appear + on hover box. Note that this will override `hoverinfo`. + Variables are inserted using %{variable}, for example "y: %{y}" + as well as %{xother}, {%_xother}, {%_xother_}, {%xother_}. When + showing info for several points, "xother" will be added to + those with different x positions from the first point. An + underscore before or after "(x|y)other" will add a space on + that side, only when this field is shown. Numbers are formatted + using d3-format's syntax %{variable:d3-format}, for example + "Price: %{y:$.2f}". + https://github.com/d3/d3-format/tree/v1.4.5#d3-format for + details on the formatting syntax. Dates are formatted using + d3-time-format's syntax %{variable|d3-time-format}, for example + "Day: %{2019-01-01|%A}". https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format for details on the date + formatting syntax. Variables that can't be found will be + replaced with the specifier. For example, a template of "data: + %{x}, %{y}" will result in a value of "data: 1, %{y}" if x is 1 + and y is missing. Variables with an undefined value will be + replaced with the fallback value. The variables available in + `hovertemplate` are the ones emitted as event data described at + this link https://plotly.com/javascript/plotlyjs-events/#event- + data. Additionally, all attributes that can be specified per- + point (the ones that are `arrayOk: true`) are available. + Finally, the template string has access to variables `z`, + `color` and `colormodel`. Anything contained in tag `` + is displayed in the secondary box, for example + `%{fullData.name}`. To hide the secondary box + completely, use an empty tag ``. + + The 'hovertemplate' property is a string and must be specified as: + - A string + - A number that will be converted to a string + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["hovertemplate"] + + @hovertemplate.setter + def hovertemplate(self, val): + self["hovertemplate"] = val + + @property + def hovertemplatefallback(self): + """ + Fallback string that's displayed when a variable referenced in + a template is missing. If the boolean value 'false' is passed + in, the specifier with the missing variable will be displayed. + + The 'hovertemplatefallback' property accepts values of any type + + Returns + ------- + Any + """ + return self["hovertemplatefallback"] + + @hovertemplatefallback.setter + def hovertemplatefallback(self, val): + self["hovertemplatefallback"] = val + + @property + def hovertemplatesrc(self): + """ + Sets the source reference on Chart Studio Cloud for + `hovertemplate`. + + The 'hovertemplatesrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["hovertemplatesrc"] + + @hovertemplatesrc.setter + def hovertemplatesrc(self, val): + self["hovertemplatesrc"] = val + + @property + def hovertext(self): + """ + Same as `text`. + + The 'hovertext' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["hovertext"] + + @hovertext.setter + def hovertext(self, val): + self["hovertext"] = val + + @property + def hovertextsrc(self): + """ + Sets the source reference on Chart Studio Cloud for + `hovertext`. + + The 'hovertextsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["hovertextsrc"] + + @hovertextsrc.setter + def hovertextsrc(self, val): + self["hovertextsrc"] = val + + @property + def ids(self): + """ + Assigns id labels to each datum. These ids for object constancy + of data points during animation. Should be an array of strings, + not numbers or any other type. + + The 'ids' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["ids"] + + @ids.setter + def ids(self, val): + self["ids"] = val + + @property + def idssrc(self): + """ + Sets the source reference on Chart Studio Cloud for `ids`. + + The 'idssrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["idssrc"] + + @idssrc.setter + def idssrc(self, val): + self["idssrc"] = val + + @property + def legend(self): + """ + Sets the reference to a legend to show this trace in. + References to these legends are "legend", "legend2", "legend3", + etc. Settings for these legends are set in the layout, under + `layout.legend`, `layout.legend2`, etc. + + The 'legend' property is an identifier of a particular + subplot, of type 'legend', that may be specified as: + - the string 'legend' optionally followed by an integer >= 1 + (e.g. 'legend', 'legend1', 'legend2', 'legend3', etc.) + + Returns + ------- + str + """ + return self["legend"] + + @legend.setter + def legend(self, val): + self["legend"] = val + + @property + def legendgrouptitle(self): + """ + The 'legendgrouptitle' property is an instance of Legendgrouptitle + that may be specified as: + - An instance of :class:`plotly.graph_objs.image.Legendgrouptitle` + - A dict of string/value properties that will be passed + to the Legendgrouptitle constructor + + Returns + ------- + plotly.graph_objs.image.Legendgrouptitle + """ + return self["legendgrouptitle"] + + @legendgrouptitle.setter + def legendgrouptitle(self, val): + self["legendgrouptitle"] = val + + @property + def legendrank(self): + """ + Sets the legend rank for this trace. Items and groups with + smaller ranks are presented on top/left side while with + "reversed" `legend.traceorder` they are on bottom/right side. + The default legendrank is 1000, so that you can use ranks less + than 1000 to place certain items before all unranked items, and + ranks greater than 1000 to go after all unranked items. When + having unranked or equal rank items shapes would be displayed + after traces i.e. according to their order in data and layout. + + The 'legendrank' property is a number and may be specified as: + - An int or float + + Returns + ------- + int|float + """ + return self["legendrank"] + + @legendrank.setter + def legendrank(self, val): + self["legendrank"] = val + + @property + def legendwidth(self): + """ + Sets the width (in px or fraction) of the legend for this + trace. + + The 'legendwidth' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["legendwidth"] + + @legendwidth.setter + def legendwidth(self, val): + self["legendwidth"] = val + + @property + def meta(self): + """ + Assigns extra meta information associated with this trace that + can be used in various text attributes. Attributes such as + trace `name`, graph, axis and colorbar `title.text`, annotation + `text` `rangeselector`, `updatemenues` and `sliders` `label` + text all support `meta`. To access the trace `meta` values in + an attribute in the same trace, simply use `%{meta[i]}` where + `i` is the index or key of the `meta` item in question. To + access trace `meta` in layout attributes, use + `%{data[n[.meta[i]}` where `i` is the index or key of the + `meta` and `n` is the trace index. + + The 'meta' property accepts values of any type + + Returns + ------- + Any|numpy.ndarray + """ + return self["meta"] + + @meta.setter + def meta(self, val): + self["meta"] = val + + @property + def metasrc(self): + """ + Sets the source reference on Chart Studio Cloud for `meta`. + + The 'metasrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["metasrc"] + + @metasrc.setter + def metasrc(self, val): + self["metasrc"] = val + + @property + def name(self): + """ + Sets the trace name. The trace name appears as the legend item + and on hover. + + The 'name' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["name"] + + @name.setter + def name(self, val): + self["name"] = val + + @property + def opacity(self): + """ + Sets the opacity of the trace. + + The 'opacity' property is a number and may be specified as: + - An int or float in the interval [0, 1] + + Returns + ------- + int|float + """ + return self["opacity"] + + @opacity.setter + def opacity(self, val): + self["opacity"] = val + + @property + def source(self): + """ + Specifies the data URI of the image to be visualized. The URI + consists of "data:image/[][;base64\\]," + + The 'source' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["source"] + + @source.setter + def source(self, val): + self["source"] = val + + @property + def stream(self): + """ + The 'stream' property is an instance of Stream + that may be specified as: + - An instance of :class:`plotly.graph_objs.image.Stream` + - A dict of string/value properties that will be passed + to the Stream constructor + + Returns + ------- + plotly.graph_objs.image.Stream + """ + return self["stream"] + + @stream.setter + def stream(self, val): + self["stream"] = val + + @property + def text(self): + """ + Sets the text elements associated with each z value. + + The 'text' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["text"] + + @text.setter + def text(self, val): + self["text"] = val + + @property + def textsrc(self): + """ + Sets the source reference on Chart Studio Cloud for `text`. + + The 'textsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["textsrc"] + + @textsrc.setter + def textsrc(self, val): + self["textsrc"] = val + + @property + def uid(self): + """ + Assign an id to this trace, Use this to provide object + constancy between traces during animations and transitions. + + The 'uid' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["uid"] + + @uid.setter + def uid(self, val): + self["uid"] = val + + @property + def uirevision(self): + """ + Controls persistence of some user-driven changes to the trace: + `constraintrange` in `parcoords` traces, as well as some + `editable: true` modifications such as `name` and + `colorbar.title`. Defaults to `layout.uirevision`. Note that + other user-driven trace attribute changes are controlled by + `layout` attributes: `trace.visible` is controlled by + `layout.legend.uirevision`, `selectedpoints` is controlled by + `layout.selectionrevision`, and `colorbar.(x|y)` (accessible + with `config: {editable: true}`) is controlled by + `layout.editrevision`. Trace changes are tracked by `uid`, + which only falls back on trace index if no `uid` is provided. + So if your app can add/remove traces before the end of the + `data` array, such that the same trace has a different index, + you can still preserve user-driven changes if you give each + trace a `uid` that stays with it as it moves. + + The 'uirevision' property accepts values of any type + + Returns + ------- + Any + """ + return self["uirevision"] + + @uirevision.setter + def uirevision(self, val): + self["uirevision"] = val + + @property + def visible(self): + """ + Determines whether or not this trace is visible. If + "legendonly", the trace is not drawn, but can appear as a + legend item (provided that the legend itself is visible). + + The 'visible' property is an enumeration that may be specified as: + - One of the following enumeration values: + [True, False, 'legendonly'] + + Returns + ------- + Any + """ + return self["visible"] + + @visible.setter + def visible(self, val): + self["visible"] = val + + @property + def x0(self): + """ + Set the image's x position. The left edge of the image (or the + right edge if the x axis is reversed or dx is negative) will be + found at xmin=x0-dx/2 + + The 'x0' property accepts values of any type + + Returns + ------- + Any + """ + return self["x0"] + + @x0.setter + def x0(self, val): + self["x0"] = val + + @property + def xaxis(self): + """ + Sets a reference between this trace's x coordinates and a 2D + cartesian x axis. If "x" (the default value), the x coordinates + refer to `layout.xaxis`. If "x2", the x coordinates refer to + `layout.xaxis2`, and so on. + + The 'xaxis' property is an identifier of a particular + subplot, of type 'x', that may be specified as: + - the string 'x' optionally followed by an integer >= 1 + (e.g. 'x', 'x1', 'x2', 'x3', etc.) + + Returns + ------- + str + """ + return self["xaxis"] + + @xaxis.setter + def xaxis(self, val): + self["xaxis"] = val + + @property + def y0(self): + """ + Set the image's y position. The top edge of the image (or the + bottom edge if the y axis is NOT reversed or if dy is negative) + will be found at ymin=y0-dy/2. By default when an image trace + is included, the y axis will be reversed so that the image is + right-side-up, but you can disable this by setting + yaxis.autorange=true or by providing an explicit y axis range. + + The 'y0' property accepts values of any type + + Returns + ------- + Any + """ + return self["y0"] + + @y0.setter + def y0(self, val): + self["y0"] = val + + @property + def yaxis(self): + """ + Sets a reference between this trace's y coordinates and a 2D + cartesian y axis. If "y" (the default value), the y coordinates + refer to `layout.yaxis`. If "y2", the y coordinates refer to + `layout.yaxis2`, and so on. + + The 'yaxis' property is an identifier of a particular + subplot, of type 'y', that may be specified as: + - the string 'y' optionally followed by an integer >= 1 + (e.g. 'y', 'y1', 'y2', 'y3', etc.) + + Returns + ------- + str + """ + return self["yaxis"] + + @yaxis.setter + def yaxis(self, val): + self["yaxis"] = val + + @property + def z(self): + """ + A 2-dimensional array in which each element is an array of 3 or + 4 numbers representing a color. + + The 'z' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["z"] + + @z.setter + def z(self, val): + self["z"] = val + + @property + def zmax(self): + """ + Array defining the higher bound for each color component. Note + that the default value will depend on the colormodel. For the + `rgb` colormodel, it is [255, 255, 255]. For the `rgba` + colormodel, it is [255, 255, 255, 1]. For the `rgba256` + colormodel, it is [255, 255, 255, 255]. For the `hsl` + colormodel, it is [360, 100, 100]. For the `hsla` colormodel, + it is [360, 100, 100, 1]. + + The 'zmax' property is an info array that may be specified as: + + * a list or tuple of 4 elements where: + (0) The 'zmax[0]' property is a number and may be specified as: + - An int or float + (1) The 'zmax[1]' property is a number and may be specified as: + - An int or float + (2) The 'zmax[2]' property is a number and may be specified as: + - An int or float + (3) The 'zmax[3]' property is a number and may be specified as: + - An int or float + + Returns + ------- + list + """ + return self["zmax"] + + @zmax.setter + def zmax(self, val): + self["zmax"] = val + + @property + def zmin(self): + """ + Array defining the lower bound for each color component. Note + that the default value will depend on the colormodel. For the + `rgb` colormodel, it is [0, 0, 0]. For the `rgba` colormodel, + it is [0, 0, 0, 0]. For the `rgba256` colormodel, it is [0, 0, + 0, 0]. For the `hsl` colormodel, it is [0, 0, 0]. For the + `hsla` colormodel, it is [0, 0, 0, 0]. + + The 'zmin' property is an info array that may be specified as: + + * a list or tuple of 4 elements where: + (0) The 'zmin[0]' property is a number and may be specified as: + - An int or float + (1) The 'zmin[1]' property is a number and may be specified as: + - An int or float + (2) The 'zmin[2]' property is a number and may be specified as: + - An int or float + (3) The 'zmin[3]' property is a number and may be specified as: + - An int or float + + Returns + ------- + list + """ + return self["zmin"] + + @zmin.setter + def zmin(self, val): + self["zmin"] = val + + @property + def zorder(self): + """ + Sets the layer on which this trace is displayed, relative to + other SVG traces on the same subplot. SVG traces with higher + `zorder` appear in front of those with lower `zorder`. + + The 'zorder' property is a integer and may be specified as: + - An int (or float that will be cast to an int) + + Returns + ------- + int + """ + return self["zorder"] + + @zorder.setter + def zorder(self, val): + self["zorder"] = val + + @property + def zsmooth(self): + """ + Picks a smoothing algorithm used to smooth `z` data. This only + applies for image traces that use the `source` attribute. + + The 'zsmooth' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['fast', False] + + Returns + ------- + Any + """ + return self["zsmooth"] + + @zsmooth.setter + def zsmooth(self, val): + self["zsmooth"] = val + + @property + def zsrc(self): + """ + Sets the source reference on Chart Studio Cloud for `z`. + + The 'zsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["zsrc"] + + @zsrc.setter + def zsrc(self, val): + self["zsrc"] = val + + @property + def type(self): + return self._props["type"] + + @property + def _prop_descriptions(self): + return """\ + colormodel + Color model used to map the numerical color components + described in `z` into colors. If `source` is specified, + this attribute will be set to `rgba256` otherwise it + defaults to `rgb`. + customdata + Assigns extra data each datum. This may be useful when + listening to hover, click and selection events. Note + that, "scatter" traces also appends customdata items in + the markers DOM elements + customdatasrc + Sets the source reference on Chart Studio Cloud for + `customdata`. + dx + Set the pixel's horizontal size. + dy + Set the pixel's vertical size + hoverinfo + Determines which trace information appear on hover. If + `none` or `skip` are set, no information is displayed + upon hovering. But, if `none` is set, click and hover + events are still fired. + hoverinfosrc + Sets the source reference on Chart Studio Cloud for + `hoverinfo`. + hoverlabel + :class:`plotly.graph_objects.image.Hoverlabel` instance + or dict with compatible properties + hovertemplate + Template string used for rendering the information that + appear on hover box. Note that this will override + `hoverinfo`. Variables are inserted using %{variable}, + for example "y: %{y}" as well as %{xother}, {%_xother}, + {%_xother_}, {%xother_}. When showing info for several + points, "xother" will be added to those with different + x positions from the first point. An underscore before + or after "(x|y)other" will add a space on that side, + only when this field is shown. Numbers are formatted + using d3-format's syntax %{variable:d3-format}, for + example "Price: %{y:$.2f}". + https://github.com/d3/d3-format/tree/v1.4.5#d3-format + for details on the formatting syntax. Dates are + formatted using d3-time-format's syntax + %{variable|d3-time-format}, for example "Day: + %{2019-01-01|%A}". https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format for details on the + date formatting syntax. Variables that can't be found + will be replaced with the specifier. For example, a + template of "data: %{x}, %{y}" will result in a value + of "data: 1, %{y}" if x is 1 and y is missing. + Variables with an undefined value will be replaced with + the fallback value. The variables available in + `hovertemplate` are the ones emitted as event data + described at this link + https://plotly.com/javascript/plotlyjs-events/#event- + data. Additionally, all attributes that can be + specified per-point (the ones that are `arrayOk: true`) + are available. Finally, the template string has access + to variables `z`, `color` and `colormodel`. Anything + contained in tag `` is displayed in the + secondary box, for example + `%{fullData.name}`. To hide the + secondary box completely, use an empty tag + ``. + hovertemplatefallback + Fallback string that's displayed when a variable + referenced in a template is missing. If the boolean + value 'false' is passed in, the specifier with the + missing variable will be displayed. + hovertemplatesrc + Sets the source reference on Chart Studio Cloud for + `hovertemplate`. + hovertext + Same as `text`. + hovertextsrc + Sets the source reference on Chart Studio Cloud for + `hovertext`. + ids + Assigns id labels to each datum. These ids for object + constancy of data points during animation. Should be an + array of strings, not numbers or any other type. + idssrc + Sets the source reference on Chart Studio Cloud for + `ids`. + legend + Sets the reference to a legend to show this trace in. + References to these legends are "legend", "legend2", + "legend3", etc. Settings for these legends are set in + the layout, under `layout.legend`, `layout.legend2`, + etc. + legendgrouptitle + :class:`plotly.graph_objects.image.Legendgrouptitle` + instance or dict with compatible properties + legendrank + Sets the legend rank for this trace. Items and groups + with smaller ranks are presented on top/left side while + with "reversed" `legend.traceorder` they are on + bottom/right side. The default legendrank is 1000, so + that you can use ranks less than 1000 to place certain + items before all unranked items, and ranks greater than + 1000 to go after all unranked items. When having + unranked or equal rank items shapes would be displayed + after traces i.e. according to their order in data and + layout. + legendwidth + Sets the width (in px or fraction) of the legend for + this trace. + meta + Assigns extra meta information associated with this + trace that can be used in various text attributes. + Attributes such as trace `name`, graph, axis and + colorbar `title.text`, annotation `text` + `rangeselector`, `updatemenues` and `sliders` `label` + text all support `meta`. To access the trace `meta` + values in an attribute in the same trace, simply use + `%{meta[i]}` where `i` is the index or key of the + `meta` item in question. To access trace `meta` in + layout attributes, use `%{data[n[.meta[i]}` where `i` + is the index or key of the `meta` and `n` is the trace + index. + metasrc + Sets the source reference on Chart Studio Cloud for + `meta`. + name + Sets the trace name. The trace name appears as the + legend item and on hover. + opacity + Sets the opacity of the trace. + source + Specifies the data URI of the image to be visualized. + The URI consists of "data:image/[][;base64\\]," + stream + :class:`plotly.graph_objects.image.Stream` instance or + dict with compatible properties + text + Sets the text elements associated with each z value. + textsrc + Sets the source reference on Chart Studio Cloud for + `text`. + uid + Assign an id to this trace, Use this to provide object + constancy between traces during animations and + transitions. + uirevision + Controls persistence of some user-driven changes to the + trace: `constraintrange` in `parcoords` traces, as well + as some `editable: true` modifications such as `name` + and `colorbar.title`. Defaults to `layout.uirevision`. + Note that other user-driven trace attribute changes are + controlled by `layout` attributes: `trace.visible` is + controlled by `layout.legend.uirevision`, + `selectedpoints` is controlled by + `layout.selectionrevision`, and `colorbar.(x|y)` + (accessible with `config: {editable: true}`) is + controlled by `layout.editrevision`. Trace changes are + tracked by `uid`, which only falls back on trace index + if no `uid` is provided. So if your app can add/remove + traces before the end of the `data` array, such that + the same trace has a different index, you can still + preserve user-driven changes if you give each trace a + `uid` that stays with it as it moves. + visible + Determines whether or not this trace is visible. If + "legendonly", the trace is not drawn, but can appear as + a legend item (provided that the legend itself is + visible). + x0 + Set the image's x position. The left edge of the image + (or the right edge if the x axis is reversed or dx is + negative) will be found at xmin=x0-dx/2 + xaxis + Sets a reference between this trace's x coordinates and + a 2D cartesian x axis. If "x" (the default value), the + x coordinates refer to `layout.xaxis`. If "x2", the x + coordinates refer to `layout.xaxis2`, and so on. + y0 + Set the image's y position. The top edge of the image + (or the bottom edge if the y axis is NOT reversed or if + dy is negative) will be found at ymin=y0-dy/2. By + default when an image trace is included, the y axis + will be reversed so that the image is right-side-up, + but you can disable this by setting + yaxis.autorange=true or by providing an explicit y axis + range. + yaxis + Sets a reference between this trace's y coordinates and + a 2D cartesian y axis. If "y" (the default value), the + y coordinates refer to `layout.yaxis`. If "y2", the y + coordinates refer to `layout.yaxis2`, and so on. + z + A 2-dimensional array in which each element is an array + of 3 or 4 numbers representing a color. + zmax + Array defining the higher bound for each color + component. Note that the default value will depend on + the colormodel. For the `rgb` colormodel, it is [255, + 255, 255]. For the `rgba` colormodel, it is [255, 255, + 255, 1]. For the `rgba256` colormodel, it is [255, 255, + 255, 255]. For the `hsl` colormodel, it is [360, 100, + 100]. For the `hsla` colormodel, it is [360, 100, 100, + 1]. + zmin + Array defining the lower bound for each color + component. Note that the default value will depend on + the colormodel. For the `rgb` colormodel, it is [0, 0, + 0]. For the `rgba` colormodel, it is [0, 0, 0, 0]. For + the `rgba256` colormodel, it is [0, 0, 0, 0]. For the + `hsl` colormodel, it is [0, 0, 0]. For the `hsla` + colormodel, it is [0, 0, 0, 0]. + zorder + Sets the layer on which this trace is displayed, + relative to other SVG traces on the same subplot. SVG + traces with higher `zorder` appear in front of those + with lower `zorder`. + zsmooth + Picks a smoothing algorithm used to smooth `z` data. + This only applies for image traces that use the + `source` attribute. + zsrc + Sets the source reference on Chart Studio Cloud for + `z`. + """ + + def __init__( + self, + arg=None, + colormodel=None, + customdata=None, + customdatasrc=None, + dx=None, + dy=None, + hoverinfo=None, + hoverinfosrc=None, + hoverlabel=None, + hovertemplate=None, + hovertemplatefallback=None, + hovertemplatesrc=None, + hovertext=None, + hovertextsrc=None, + ids=None, + idssrc=None, + legend=None, + legendgrouptitle=None, + legendrank=None, + legendwidth=None, + meta=None, + metasrc=None, + name=None, + opacity=None, + source=None, + stream=None, + text=None, + textsrc=None, + uid=None, + uirevision=None, + visible=None, + x0=None, + xaxis=None, + y0=None, + yaxis=None, + z=None, + zmax=None, + zmin=None, + zorder=None, + zsmooth=None, + zsrc=None, + **kwargs, + ): + """ + Construct a new Image object + + Display an image, i.e. data on a 2D regular raster. By default, + when an image is displayed in a subplot, its y axis will be + reversed (ie. `autorange: 'reversed'`), constrained to the + domain (ie. `constrain: 'domain'`) and it will have the same + scale as its x axis (ie. `scaleanchor: 'x,`) in order for + pixels to be rendered as squares. + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of :class:`plotly.graph_objs.Image` + colormodel + Color model used to map the numerical color components + described in `z` into colors. If `source` is specified, + this attribute will be set to `rgba256` otherwise it + defaults to `rgb`. + customdata + Assigns extra data each datum. This may be useful when + listening to hover, click and selection events. Note + that, "scatter" traces also appends customdata items in + the markers DOM elements + customdatasrc + Sets the source reference on Chart Studio Cloud for + `customdata`. + dx + Set the pixel's horizontal size. + dy + Set the pixel's vertical size + hoverinfo + Determines which trace information appear on hover. If + `none` or `skip` are set, no information is displayed + upon hovering. But, if `none` is set, click and hover + events are still fired. + hoverinfosrc + Sets the source reference on Chart Studio Cloud for + `hoverinfo`. + hoverlabel + :class:`plotly.graph_objects.image.Hoverlabel` instance + or dict with compatible properties + hovertemplate + Template string used for rendering the information that + appear on hover box. Note that this will override + `hoverinfo`. Variables are inserted using %{variable}, + for example "y: %{y}" as well as %{xother}, {%_xother}, + {%_xother_}, {%xother_}. When showing info for several + points, "xother" will be added to those with different + x positions from the first point. An underscore before + or after "(x|y)other" will add a space on that side, + only when this field is shown. Numbers are formatted + using d3-format's syntax %{variable:d3-format}, for + example "Price: %{y:$.2f}". + https://github.com/d3/d3-format/tree/v1.4.5#d3-format + for details on the formatting syntax. Dates are + formatted using d3-time-format's syntax + %{variable|d3-time-format}, for example "Day: + %{2019-01-01|%A}". https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format for details on the + date formatting syntax. Variables that can't be found + will be replaced with the specifier. For example, a + template of "data: %{x}, %{y}" will result in a value + of "data: 1, %{y}" if x is 1 and y is missing. + Variables with an undefined value will be replaced with + the fallback value. The variables available in + `hovertemplate` are the ones emitted as event data + described at this link + https://plotly.com/javascript/plotlyjs-events/#event- + data. Additionally, all attributes that can be + specified per-point (the ones that are `arrayOk: true`) + are available. Finally, the template string has access + to variables `z`, `color` and `colormodel`. Anything + contained in tag `` is displayed in the + secondary box, for example + `%{fullData.name}`. To hide the + secondary box completely, use an empty tag + ``. + hovertemplatefallback + Fallback string that's displayed when a variable + referenced in a template is missing. If the boolean + value 'false' is passed in, the specifier with the + missing variable will be displayed. + hovertemplatesrc + Sets the source reference on Chart Studio Cloud for + `hovertemplate`. + hovertext + Same as `text`. + hovertextsrc + Sets the source reference on Chart Studio Cloud for + `hovertext`. + ids + Assigns id labels to each datum. These ids for object + constancy of data points during animation. Should be an + array of strings, not numbers or any other type. + idssrc + Sets the source reference on Chart Studio Cloud for + `ids`. + legend + Sets the reference to a legend to show this trace in. + References to these legends are "legend", "legend2", + "legend3", etc. Settings for these legends are set in + the layout, under `layout.legend`, `layout.legend2`, + etc. + legendgrouptitle + :class:`plotly.graph_objects.image.Legendgrouptitle` + instance or dict with compatible properties + legendrank + Sets the legend rank for this trace. Items and groups + with smaller ranks are presented on top/left side while + with "reversed" `legend.traceorder` they are on + bottom/right side. The default legendrank is 1000, so + that you can use ranks less than 1000 to place certain + items before all unranked items, and ranks greater than + 1000 to go after all unranked items. When having + unranked or equal rank items shapes would be displayed + after traces i.e. according to their order in data and + layout. + legendwidth + Sets the width (in px or fraction) of the legend for + this trace. + meta + Assigns extra meta information associated with this + trace that can be used in various text attributes. + Attributes such as trace `name`, graph, axis and + colorbar `title.text`, annotation `text` + `rangeselector`, `updatemenues` and `sliders` `label` + text all support `meta`. To access the trace `meta` + values in an attribute in the same trace, simply use + `%{meta[i]}` where `i` is the index or key of the + `meta` item in question. To access trace `meta` in + layout attributes, use `%{data[n[.meta[i]}` where `i` + is the index or key of the `meta` and `n` is the trace + index. + metasrc + Sets the source reference on Chart Studio Cloud for + `meta`. + name + Sets the trace name. The trace name appears as the + legend item and on hover. + opacity + Sets the opacity of the trace. + source + Specifies the data URI of the image to be visualized. + The URI consists of "data:image/[][;base64\\]," + stream + :class:`plotly.graph_objects.image.Stream` instance or + dict with compatible properties + text + Sets the text elements associated with each z value. + textsrc + Sets the source reference on Chart Studio Cloud for + `text`. + uid + Assign an id to this trace, Use this to provide object + constancy between traces during animations and + transitions. + uirevision + Controls persistence of some user-driven changes to the + trace: `constraintrange` in `parcoords` traces, as well + as some `editable: true` modifications such as `name` + and `colorbar.title`. Defaults to `layout.uirevision`. + Note that other user-driven trace attribute changes are + controlled by `layout` attributes: `trace.visible` is + controlled by `layout.legend.uirevision`, + `selectedpoints` is controlled by + `layout.selectionrevision`, and `colorbar.(x|y)` + (accessible with `config: {editable: true}`) is + controlled by `layout.editrevision`. Trace changes are + tracked by `uid`, which only falls back on trace index + if no `uid` is provided. So if your app can add/remove + traces before the end of the `data` array, such that + the same trace has a different index, you can still + preserve user-driven changes if you give each trace a + `uid` that stays with it as it moves. + visible + Determines whether or not this trace is visible. If + "legendonly", the trace is not drawn, but can appear as + a legend item (provided that the legend itself is + visible). + x0 + Set the image's x position. The left edge of the image + (or the right edge if the x axis is reversed or dx is + negative) will be found at xmin=x0-dx/2 + xaxis + Sets a reference between this trace's x coordinates and + a 2D cartesian x axis. If "x" (the default value), the + x coordinates refer to `layout.xaxis`. If "x2", the x + coordinates refer to `layout.xaxis2`, and so on. + y0 + Set the image's y position. The top edge of the image + (or the bottom edge if the y axis is NOT reversed or if + dy is negative) will be found at ymin=y0-dy/2. By + default when an image trace is included, the y axis + will be reversed so that the image is right-side-up, + but you can disable this by setting + yaxis.autorange=true or by providing an explicit y axis + range. + yaxis + Sets a reference between this trace's y coordinates and + a 2D cartesian y axis. If "y" (the default value), the + y coordinates refer to `layout.yaxis`. If "y2", the y + coordinates refer to `layout.yaxis2`, and so on. + z + A 2-dimensional array in which each element is an array + of 3 or 4 numbers representing a color. + zmax + Array defining the higher bound for each color + component. Note that the default value will depend on + the colormodel. For the `rgb` colormodel, it is [255, + 255, 255]. For the `rgba` colormodel, it is [255, 255, + 255, 1]. For the `rgba256` colormodel, it is [255, 255, + 255, 255]. For the `hsl` colormodel, it is [360, 100, + 100]. For the `hsla` colormodel, it is [360, 100, 100, + 1]. + zmin + Array defining the lower bound for each color + component. Note that the default value will depend on + the colormodel. For the `rgb` colormodel, it is [0, 0, + 0]. For the `rgba` colormodel, it is [0, 0, 0, 0]. For + the `rgba256` colormodel, it is [0, 0, 0, 0]. For the + `hsl` colormodel, it is [0, 0, 0]. For the `hsla` + colormodel, it is [0, 0, 0, 0]. + zorder + Sets the layer on which this trace is displayed, + relative to other SVG traces on the same subplot. SVG + traces with higher `zorder` appear in front of those + with lower `zorder`. + zsmooth + Picks a smoothing algorithm used to smooth `z` data. + This only applies for image traces that use the + `source` attribute. + zsrc + Sets the source reference on Chart Studio Cloud for + `z`. + + Returns + ------- + Image + """ + super().__init__("image") + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + if arg is None: + arg = {} + elif isinstance(arg, self.__class__): + arg = arg.to_plotly_json() + elif isinstance(arg, dict): + arg = _copy.copy(arg) + else: + raise ValueError("""\ +The first argument to the plotly.graph_objs.Image +constructor must be a dict or +an instance of :class:`plotly.graph_objs.Image`""") + + self._skip_invalid = kwargs.pop("skip_invalid", False) + self._validate = kwargs.pop("_validate", True) + + self._set_property("colormodel", arg, colormodel) + self._set_property("customdata", arg, customdata) + self._set_property("customdatasrc", arg, customdatasrc) + self._set_property("dx", arg, dx) + self._set_property("dy", arg, dy) + self._set_property("hoverinfo", arg, hoverinfo) + self._set_property("hoverinfosrc", arg, hoverinfosrc) + self._set_property("hoverlabel", arg, hoverlabel) + self._set_property("hovertemplate", arg, hovertemplate) + self._set_property("hovertemplatefallback", arg, hovertemplatefallback) + self._set_property("hovertemplatesrc", arg, hovertemplatesrc) + self._set_property("hovertext", arg, hovertext) + self._set_property("hovertextsrc", arg, hovertextsrc) + self._set_property("ids", arg, ids) + self._set_property("idssrc", arg, idssrc) + self._set_property("legend", arg, legend) + self._set_property("legendgrouptitle", arg, legendgrouptitle) + self._set_property("legendrank", arg, legendrank) + self._set_property("legendwidth", arg, legendwidth) + self._set_property("meta", arg, meta) + self._set_property("metasrc", arg, metasrc) + self._set_property("name", arg, name) + self._set_property("opacity", arg, opacity) + self._set_property("source", arg, source) + self._set_property("stream", arg, stream) + self._set_property("text", arg, text) + self._set_property("textsrc", arg, textsrc) + self._set_property("uid", arg, uid) + self._set_property("uirevision", arg, uirevision) + self._set_property("visible", arg, visible) + self._set_property("x0", arg, x0) + self._set_property("xaxis", arg, xaxis) + self._set_property("y0", arg, y0) + self._set_property("yaxis", arg, yaxis) + self._set_property("z", arg, z) + self._set_property("zmax", arg, zmax) + self._set_property("zmin", arg, zmin) + self._set_property("zorder", arg, zorder) + self._set_property("zsmooth", arg, zsmooth) + self._set_property("zsrc", arg, zsrc) + + self._props["type"] = "image" + arg.pop("type", None) + self._process_kwargs(**dict(arg, **kwargs)) + self._skip_invalid = False diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/_indicator.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/_indicator.py new file mode 100644 index 0000000000000000000000000000000000000000..e54f53442e7b21bd894d66164c31bb3a9ae9880f --- /dev/null +++ b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/_indicator.py @@ -0,0 +1,848 @@ +# --- THIS FILE IS AUTO-GENERATED --- +# Modifications will be overwitten the next time code generation run. + +from plotly.basedatatypes import BaseTraceType as _BaseTraceType +import copy as _copy + + +class Indicator(_BaseTraceType): + _parent_path_str = "" + _path_str = "indicator" + _valid_props = { + "align", + "customdata", + "customdatasrc", + "delta", + "domain", + "gauge", + "ids", + "idssrc", + "legend", + "legendgrouptitle", + "legendrank", + "legendwidth", + "meta", + "metasrc", + "mode", + "name", + "number", + "stream", + "title", + "type", + "uid", + "uirevision", + "value", + "visible", + } + + @property + def align(self): + """ + Sets the horizontal alignment of the `text` within the box. + Note that this attribute has no effect if an angular gauge is + displayed: in this case, it is always centered + + The 'align' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['left', 'center', 'right'] + + Returns + ------- + Any + """ + return self["align"] + + @align.setter + def align(self, val): + self["align"] = val + + @property + def customdata(self): + """ + Assigns extra data each datum. This may be useful when + listening to hover, click and selection events. Note that, + "scatter" traces also appends customdata items in the markers + DOM elements + + The 'customdata' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["customdata"] + + @customdata.setter + def customdata(self, val): + self["customdata"] = val + + @property + def customdatasrc(self): + """ + Sets the source reference on Chart Studio Cloud for + `customdata`. + + The 'customdatasrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["customdatasrc"] + + @customdatasrc.setter + def customdatasrc(self, val): + self["customdatasrc"] = val + + @property + def delta(self): + """ + The 'delta' property is an instance of Delta + that may be specified as: + - An instance of :class:`plotly.graph_objs.indicator.Delta` + - A dict of string/value properties that will be passed + to the Delta constructor + + Returns + ------- + plotly.graph_objs.indicator.Delta + """ + return self["delta"] + + @delta.setter + def delta(self, val): + self["delta"] = val + + @property + def domain(self): + """ + The 'domain' property is an instance of Domain + that may be specified as: + - An instance of :class:`plotly.graph_objs.indicator.Domain` + - A dict of string/value properties that will be passed + to the Domain constructor + + Returns + ------- + plotly.graph_objs.indicator.Domain + """ + return self["domain"] + + @domain.setter + def domain(self, val): + self["domain"] = val + + @property + def gauge(self): + """ + The gauge of the Indicator plot. + + The 'gauge' property is an instance of Gauge + that may be specified as: + - An instance of :class:`plotly.graph_objs.indicator.Gauge` + - A dict of string/value properties that will be passed + to the Gauge constructor + + Returns + ------- + plotly.graph_objs.indicator.Gauge + """ + return self["gauge"] + + @gauge.setter + def gauge(self, val): + self["gauge"] = val + + @property + def ids(self): + """ + Assigns id labels to each datum. These ids for object constancy + of data points during animation. Should be an array of strings, + not numbers or any other type. + + The 'ids' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["ids"] + + @ids.setter + def ids(self, val): + self["ids"] = val + + @property + def idssrc(self): + """ + Sets the source reference on Chart Studio Cloud for `ids`. + + The 'idssrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["idssrc"] + + @idssrc.setter + def idssrc(self, val): + self["idssrc"] = val + + @property + def legend(self): + """ + Sets the reference to a legend to show this trace in. + References to these legends are "legend", "legend2", "legend3", + etc. Settings for these legends are set in the layout, under + `layout.legend`, `layout.legend2`, etc. + + The 'legend' property is an identifier of a particular + subplot, of type 'legend', that may be specified as: + - the string 'legend' optionally followed by an integer >= 1 + (e.g. 'legend', 'legend1', 'legend2', 'legend3', etc.) + + Returns + ------- + str + """ + return self["legend"] + + @legend.setter + def legend(self, val): + self["legend"] = val + + @property + def legendgrouptitle(self): + """ + The 'legendgrouptitle' property is an instance of Legendgrouptitle + that may be specified as: + - An instance of :class:`plotly.graph_objs.indicator.Legendgrouptitle` + - A dict of string/value properties that will be passed + to the Legendgrouptitle constructor + + Returns + ------- + plotly.graph_objs.indicator.Legendgrouptitle + """ + return self["legendgrouptitle"] + + @legendgrouptitle.setter + def legendgrouptitle(self, val): + self["legendgrouptitle"] = val + + @property + def legendrank(self): + """ + Sets the legend rank for this trace. Items and groups with + smaller ranks are presented on top/left side while with + "reversed" `legend.traceorder` they are on bottom/right side. + The default legendrank is 1000, so that you can use ranks less + than 1000 to place certain items before all unranked items, and + ranks greater than 1000 to go after all unranked items. When + having unranked or equal rank items shapes would be displayed + after traces i.e. according to their order in data and layout. + + The 'legendrank' property is a number and may be specified as: + - An int or float + + Returns + ------- + int|float + """ + return self["legendrank"] + + @legendrank.setter + def legendrank(self, val): + self["legendrank"] = val + + @property + def legendwidth(self): + """ + Sets the width (in px or fraction) of the legend for this + trace. + + The 'legendwidth' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["legendwidth"] + + @legendwidth.setter + def legendwidth(self, val): + self["legendwidth"] = val + + @property + def meta(self): + """ + Assigns extra meta information associated with this trace that + can be used in various text attributes. Attributes such as + trace `name`, graph, axis and colorbar `title.text`, annotation + `text` `rangeselector`, `updatemenues` and `sliders` `label` + text all support `meta`. To access the trace `meta` values in + an attribute in the same trace, simply use `%{meta[i]}` where + `i` is the index or key of the `meta` item in question. To + access trace `meta` in layout attributes, use + `%{data[n[.meta[i]}` where `i` is the index or key of the + `meta` and `n` is the trace index. + + The 'meta' property accepts values of any type + + Returns + ------- + Any|numpy.ndarray + """ + return self["meta"] + + @meta.setter + def meta(self, val): + self["meta"] = val + + @property + def metasrc(self): + """ + Sets the source reference on Chart Studio Cloud for `meta`. + + The 'metasrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["metasrc"] + + @metasrc.setter + def metasrc(self, val): + self["metasrc"] = val + + @property + def mode(self): + """ + Determines how the value is displayed on the graph. `number` + displays the value numerically in text. `delta` displays the + difference to a reference value in text. Finally, `gauge` + displays the value graphically on an axis. + + The 'mode' property is a flaglist and may be specified + as a string containing: + - Any combination of ['number', 'delta', 'gauge'] joined with '+' characters + (e.g. 'number+delta') + + Returns + ------- + Any + """ + return self["mode"] + + @mode.setter + def mode(self, val): + self["mode"] = val + + @property + def name(self): + """ + Sets the trace name. The trace name appears as the legend item + and on hover. + + The 'name' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["name"] + + @name.setter + def name(self, val): + self["name"] = val + + @property + def number(self): + """ + The 'number' property is an instance of Number + that may be specified as: + - An instance of :class:`plotly.graph_objs.indicator.Number` + - A dict of string/value properties that will be passed + to the Number constructor + + Returns + ------- + plotly.graph_objs.indicator.Number + """ + return self["number"] + + @number.setter + def number(self, val): + self["number"] = val + + @property + def stream(self): + """ + The 'stream' property is an instance of Stream + that may be specified as: + - An instance of :class:`plotly.graph_objs.indicator.Stream` + - A dict of string/value properties that will be passed + to the Stream constructor + + Returns + ------- + plotly.graph_objs.indicator.Stream + """ + return self["stream"] + + @stream.setter + def stream(self, val): + self["stream"] = val + + @property + def title(self): + """ + The 'title' property is an instance of Title + that may be specified as: + - An instance of :class:`plotly.graph_objs.indicator.Title` + - A dict of string/value properties that will be passed + to the Title constructor + + Returns + ------- + plotly.graph_objs.indicator.Title + """ + return self["title"] + + @title.setter + def title(self, val): + self["title"] = val + + @property + def uid(self): + """ + Assign an id to this trace, Use this to provide object + constancy between traces during animations and transitions. + + The 'uid' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["uid"] + + @uid.setter + def uid(self, val): + self["uid"] = val + + @property + def uirevision(self): + """ + Controls persistence of some user-driven changes to the trace: + `constraintrange` in `parcoords` traces, as well as some + `editable: true` modifications such as `name` and + `colorbar.title`. Defaults to `layout.uirevision`. Note that + other user-driven trace attribute changes are controlled by + `layout` attributes: `trace.visible` is controlled by + `layout.legend.uirevision`, `selectedpoints` is controlled by + `layout.selectionrevision`, and `colorbar.(x|y)` (accessible + with `config: {editable: true}`) is controlled by + `layout.editrevision`. Trace changes are tracked by `uid`, + which only falls back on trace index if no `uid` is provided. + So if your app can add/remove traces before the end of the + `data` array, such that the same trace has a different index, + you can still preserve user-driven changes if you give each + trace a `uid` that stays with it as it moves. + + The 'uirevision' property accepts values of any type + + Returns + ------- + Any + """ + return self["uirevision"] + + @uirevision.setter + def uirevision(self, val): + self["uirevision"] = val + + @property + def value(self): + """ + Sets the number to be displayed. + + The 'value' property is a number and may be specified as: + - An int or float + + Returns + ------- + int|float + """ + return self["value"] + + @value.setter + def value(self, val): + self["value"] = val + + @property + def visible(self): + """ + Determines whether or not this trace is visible. If + "legendonly", the trace is not drawn, but can appear as a + legend item (provided that the legend itself is visible). + + The 'visible' property is an enumeration that may be specified as: + - One of the following enumeration values: + [True, False, 'legendonly'] + + Returns + ------- + Any + """ + return self["visible"] + + @visible.setter + def visible(self, val): + self["visible"] = val + + @property + def type(self): + return self._props["type"] + + @property + def _prop_descriptions(self): + return """\ + align + Sets the horizontal alignment of the `text` within the + box. Note that this attribute has no effect if an + angular gauge is displayed: in this case, it is always + centered + customdata + Assigns extra data each datum. This may be useful when + listening to hover, click and selection events. Note + that, "scatter" traces also appends customdata items in + the markers DOM elements + customdatasrc + Sets the source reference on Chart Studio Cloud for + `customdata`. + delta + :class:`plotly.graph_objects.indicator.Delta` instance + or dict with compatible properties + domain + :class:`plotly.graph_objects.indicator.Domain` instance + or dict with compatible properties + gauge + The gauge of the Indicator plot. + ids + Assigns id labels to each datum. These ids for object + constancy of data points during animation. Should be an + array of strings, not numbers or any other type. + idssrc + Sets the source reference on Chart Studio Cloud for + `ids`. + legend + Sets the reference to a legend to show this trace in. + References to these legends are "legend", "legend2", + "legend3", etc. Settings for these legends are set in + the layout, under `layout.legend`, `layout.legend2`, + etc. + legendgrouptitle + :class:`plotly.graph_objects.indicator.Legendgrouptitle + ` instance or dict with compatible properties + legendrank + Sets the legend rank for this trace. Items and groups + with smaller ranks are presented on top/left side while + with "reversed" `legend.traceorder` they are on + bottom/right side. The default legendrank is 1000, so + that you can use ranks less than 1000 to place certain + items before all unranked items, and ranks greater than + 1000 to go after all unranked items. When having + unranked or equal rank items shapes would be displayed + after traces i.e. according to their order in data and + layout. + legendwidth + Sets the width (in px or fraction) of the legend for + this trace. + meta + Assigns extra meta information associated with this + trace that can be used in various text attributes. + Attributes such as trace `name`, graph, axis and + colorbar `title.text`, annotation `text` + `rangeselector`, `updatemenues` and `sliders` `label` + text all support `meta`. To access the trace `meta` + values in an attribute in the same trace, simply use + `%{meta[i]}` where `i` is the index or key of the + `meta` item in question. To access trace `meta` in + layout attributes, use `%{data[n[.meta[i]}` where `i` + is the index or key of the `meta` and `n` is the trace + index. + metasrc + Sets the source reference on Chart Studio Cloud for + `meta`. + mode + Determines how the value is displayed on the graph. + `number` displays the value numerically in text. + `delta` displays the difference to a reference value in + text. Finally, `gauge` displays the value graphically + on an axis. + name + Sets the trace name. The trace name appears as the + legend item and on hover. + number + :class:`plotly.graph_objects.indicator.Number` instance + or dict with compatible properties + stream + :class:`plotly.graph_objects.indicator.Stream` instance + or dict with compatible properties + title + :class:`plotly.graph_objects.indicator.Title` instance + or dict with compatible properties + uid + Assign an id to this trace, Use this to provide object + constancy between traces during animations and + transitions. + uirevision + Controls persistence of some user-driven changes to the + trace: `constraintrange` in `parcoords` traces, as well + as some `editable: true` modifications such as `name` + and `colorbar.title`. Defaults to `layout.uirevision`. + Note that other user-driven trace attribute changes are + controlled by `layout` attributes: `trace.visible` is + controlled by `layout.legend.uirevision`, + `selectedpoints` is controlled by + `layout.selectionrevision`, and `colorbar.(x|y)` + (accessible with `config: {editable: true}`) is + controlled by `layout.editrevision`. Trace changes are + tracked by `uid`, which only falls back on trace index + if no `uid` is provided. So if your app can add/remove + traces before the end of the `data` array, such that + the same trace has a different index, you can still + preserve user-driven changes if you give each trace a + `uid` that stays with it as it moves. + value + Sets the number to be displayed. + visible + Determines whether or not this trace is visible. If + "legendonly", the trace is not drawn, but can appear as + a legend item (provided that the legend itself is + visible). + """ + + def __init__( + self, + arg=None, + align=None, + customdata=None, + customdatasrc=None, + delta=None, + domain=None, + gauge=None, + ids=None, + idssrc=None, + legend=None, + legendgrouptitle=None, + legendrank=None, + legendwidth=None, + meta=None, + metasrc=None, + mode=None, + name=None, + number=None, + stream=None, + title=None, + uid=None, + uirevision=None, + value=None, + visible=None, + **kwargs, + ): + """ + Construct a new Indicator object + + An indicator is used to visualize a single `value` along with + some contextual information such as `steps` or a `threshold`, + using a combination of three visual elements: a number, a + delta, and/or a gauge. Deltas are taken with respect to a + `reference`. Gauges can be either angular or bullet (aka + linear) gauges. + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of :class:`plotly.graph_objs.Indicator` + align + Sets the horizontal alignment of the `text` within the + box. Note that this attribute has no effect if an + angular gauge is displayed: in this case, it is always + centered + customdata + Assigns extra data each datum. This may be useful when + listening to hover, click and selection events. Note + that, "scatter" traces also appends customdata items in + the markers DOM elements + customdatasrc + Sets the source reference on Chart Studio Cloud for + `customdata`. + delta + :class:`plotly.graph_objects.indicator.Delta` instance + or dict with compatible properties + domain + :class:`plotly.graph_objects.indicator.Domain` instance + or dict with compatible properties + gauge + The gauge of the Indicator plot. + ids + Assigns id labels to each datum. These ids for object + constancy of data points during animation. Should be an + array of strings, not numbers or any other type. + idssrc + Sets the source reference on Chart Studio Cloud for + `ids`. + legend + Sets the reference to a legend to show this trace in. + References to these legends are "legend", "legend2", + "legend3", etc. Settings for these legends are set in + the layout, under `layout.legend`, `layout.legend2`, + etc. + legendgrouptitle + :class:`plotly.graph_objects.indicator.Legendgrouptitle + ` instance or dict with compatible properties + legendrank + Sets the legend rank for this trace. Items and groups + with smaller ranks are presented on top/left side while + with "reversed" `legend.traceorder` they are on + bottom/right side. The default legendrank is 1000, so + that you can use ranks less than 1000 to place certain + items before all unranked items, and ranks greater than + 1000 to go after all unranked items. When having + unranked or equal rank items shapes would be displayed + after traces i.e. according to their order in data and + layout. + legendwidth + Sets the width (in px or fraction) of the legend for + this trace. + meta + Assigns extra meta information associated with this + trace that can be used in various text attributes. + Attributes such as trace `name`, graph, axis and + colorbar `title.text`, annotation `text` + `rangeselector`, `updatemenues` and `sliders` `label` + text all support `meta`. To access the trace `meta` + values in an attribute in the same trace, simply use + `%{meta[i]}` where `i` is the index or key of the + `meta` item in question. To access trace `meta` in + layout attributes, use `%{data[n[.meta[i]}` where `i` + is the index or key of the `meta` and `n` is the trace + index. + metasrc + Sets the source reference on Chart Studio Cloud for + `meta`. + mode + Determines how the value is displayed on the graph. + `number` displays the value numerically in text. + `delta` displays the difference to a reference value in + text. Finally, `gauge` displays the value graphically + on an axis. + name + Sets the trace name. The trace name appears as the + legend item and on hover. + number + :class:`plotly.graph_objects.indicator.Number` instance + or dict with compatible properties + stream + :class:`plotly.graph_objects.indicator.Stream` instance + or dict with compatible properties + title + :class:`plotly.graph_objects.indicator.Title` instance + or dict with compatible properties + uid + Assign an id to this trace, Use this to provide object + constancy between traces during animations and + transitions. + uirevision + Controls persistence of some user-driven changes to the + trace: `constraintrange` in `parcoords` traces, as well + as some `editable: true` modifications such as `name` + and `colorbar.title`. Defaults to `layout.uirevision`. + Note that other user-driven trace attribute changes are + controlled by `layout` attributes: `trace.visible` is + controlled by `layout.legend.uirevision`, + `selectedpoints` is controlled by + `layout.selectionrevision`, and `colorbar.(x|y)` + (accessible with `config: {editable: true}`) is + controlled by `layout.editrevision`. Trace changes are + tracked by `uid`, which only falls back on trace index + if no `uid` is provided. So if your app can add/remove + traces before the end of the `data` array, such that + the same trace has a different index, you can still + preserve user-driven changes if you give each trace a + `uid` that stays with it as it moves. + value + Sets the number to be displayed. + visible + Determines whether or not this trace is visible. If + "legendonly", the trace is not drawn, but can appear as + a legend item (provided that the legend itself is + visible). + + Returns + ------- + Indicator + """ + super().__init__("indicator") + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + if arg is None: + arg = {} + elif isinstance(arg, self.__class__): + arg = arg.to_plotly_json() + elif isinstance(arg, dict): + arg = _copy.copy(arg) + else: + raise ValueError("""\ +The first argument to the plotly.graph_objs.Indicator +constructor must be a dict or +an instance of :class:`plotly.graph_objs.Indicator`""") + + self._skip_invalid = kwargs.pop("skip_invalid", False) + self._validate = kwargs.pop("_validate", True) + + self._set_property("align", arg, align) + self._set_property("customdata", arg, customdata) + self._set_property("customdatasrc", arg, customdatasrc) + self._set_property("delta", arg, delta) + self._set_property("domain", arg, domain) + self._set_property("gauge", arg, gauge) + self._set_property("ids", arg, ids) + self._set_property("idssrc", arg, idssrc) + self._set_property("legend", arg, legend) + self._set_property("legendgrouptitle", arg, legendgrouptitle) + self._set_property("legendrank", arg, legendrank) + self._set_property("legendwidth", arg, legendwidth) + self._set_property("meta", arg, meta) + self._set_property("metasrc", arg, metasrc) + self._set_property("mode", arg, mode) + self._set_property("name", arg, name) + self._set_property("number", arg, number) + self._set_property("stream", arg, stream) + self._set_property("title", arg, title) + self._set_property("uid", arg, uid) + self._set_property("uirevision", arg, uirevision) + self._set_property("value", arg, value) + self._set_property("visible", arg, visible) + + self._props["type"] = "indicator" + arg.pop("type", None) + self._process_kwargs(**dict(arg, **kwargs)) + self._skip_invalid = False diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/_isosurface.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/_isosurface.py new file mode 100644 index 0000000000000000000000000000000000000000..f68216dcfbd61aef34b272ecdc9deb2cb17d20ce --- /dev/null +++ b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/_isosurface.py @@ -0,0 +1,2210 @@ +# --- THIS FILE IS AUTO-GENERATED --- +# Modifications will be overwitten the next time code generation run. + +from plotly.basedatatypes import BaseTraceType as _BaseTraceType +import copy as _copy + + +class Isosurface(_BaseTraceType): + _parent_path_str = "" + _path_str = "isosurface" + _valid_props = { + "autocolorscale", + "caps", + "cauto", + "cmax", + "cmid", + "cmin", + "coloraxis", + "colorbar", + "colorscale", + "contour", + "customdata", + "customdatasrc", + "flatshading", + "hoverinfo", + "hoverinfosrc", + "hoverlabel", + "hovertemplate", + "hovertemplatefallback", + "hovertemplatesrc", + "hovertext", + "hovertextsrc", + "ids", + "idssrc", + "isomax", + "isomin", + "legend", + "legendgroup", + "legendgrouptitle", + "legendrank", + "legendwidth", + "lighting", + "lightposition", + "meta", + "metasrc", + "name", + "opacity", + "reversescale", + "scene", + "showlegend", + "showscale", + "slices", + "spaceframe", + "stream", + "surface", + "text", + "textsrc", + "type", + "uid", + "uirevision", + "value", + "valuehoverformat", + "valuesrc", + "visible", + "x", + "xhoverformat", + "xsrc", + "y", + "yhoverformat", + "ysrc", + "z", + "zhoverformat", + "zsrc", + } + + @property + def autocolorscale(self): + """ + Determines whether the colorscale is a default palette + (`autocolorscale: true`) or the palette determined by + `colorscale`. In case `colorscale` is unspecified or + `autocolorscale` is true, the default palette will be chosen + according to whether numbers in the `color` array are all + positive, all negative or mixed. + + The 'autocolorscale' property is a boolean and must be specified as: + - A boolean value: True or False + + Returns + ------- + bool + """ + return self["autocolorscale"] + + @autocolorscale.setter + def autocolorscale(self, val): + self["autocolorscale"] = val + + @property + def caps(self): + """ + The 'caps' property is an instance of Caps + that may be specified as: + - An instance of :class:`plotly.graph_objs.isosurface.Caps` + - A dict of string/value properties that will be passed + to the Caps constructor + + Returns + ------- + plotly.graph_objs.isosurface.Caps + """ + return self["caps"] + + @caps.setter + def caps(self, val): + self["caps"] = val + + @property + def cauto(self): + """ + Determines whether or not the color domain is computed with + respect to the input data (here `value`) or the bounds set in + `cmin` and `cmax` Defaults to `false` when `cmin` and `cmax` + are set by the user. + + The 'cauto' property is a boolean and must be specified as: + - A boolean value: True or False + + Returns + ------- + bool + """ + return self["cauto"] + + @cauto.setter + def cauto(self, val): + self["cauto"] = val + + @property + def cmax(self): + """ + Sets the upper bound of the color domain. Value should have the + same units as `value` and if set, `cmin` must be set as well. + + The 'cmax' property is a number and may be specified as: + - An int or float + + Returns + ------- + int|float + """ + return self["cmax"] + + @cmax.setter + def cmax(self, val): + self["cmax"] = val + + @property + def cmid(self): + """ + Sets the mid-point of the color domain by scaling `cmin` and/or + `cmax` to be equidistant to this point. Value should have the + same units as `value`. Has no effect when `cauto` is `false`. + + The 'cmid' property is a number and may be specified as: + - An int or float + + Returns + ------- + int|float + """ + return self["cmid"] + + @cmid.setter + def cmid(self, val): + self["cmid"] = val + + @property + def cmin(self): + """ + Sets the lower bound of the color domain. Value should have the + same units as `value` and if set, `cmax` must be set as well. + + The 'cmin' property is a number and may be specified as: + - An int or float + + Returns + ------- + int|float + """ + return self["cmin"] + + @cmin.setter + def cmin(self, val): + self["cmin"] = val + + @property + def coloraxis(self): + """ + Sets a reference to a shared color axis. References to these + shared color axes are "coloraxis", "coloraxis2", "coloraxis3", + etc. Settings for these shared color axes are set in the + layout, under `layout.coloraxis`, `layout.coloraxis2`, etc. + Note that multiple color scales can be linked to the same color + axis. + + The 'coloraxis' property is an identifier of a particular + subplot, of type 'coloraxis', that may be specified as: + - the string 'coloraxis' optionally followed by an integer >= 1 + (e.g. 'coloraxis', 'coloraxis1', 'coloraxis2', 'coloraxis3', etc.) + + Returns + ------- + str + """ + return self["coloraxis"] + + @coloraxis.setter + def coloraxis(self, val): + self["coloraxis"] = val + + @property + def colorbar(self): + """ + The 'colorbar' property is an instance of ColorBar + that may be specified as: + - An instance of :class:`plotly.graph_objs.isosurface.ColorBar` + - A dict of string/value properties that will be passed + to the ColorBar constructor + + Returns + ------- + plotly.graph_objs.isosurface.ColorBar + """ + return self["colorbar"] + + @colorbar.setter + def colorbar(self, val): + self["colorbar"] = val + + @property + def colorscale(self): + """ + Sets the colorscale. The colorscale must be an array containing + arrays mapping a normalized value to an rgb, rgba, hex, hsl, + hsv, or named color string. At minimum, a mapping for the + lowest (0) and highest (1) values are required. For example, + `[[0, 'rgb(0,0,255)'], [1, 'rgb(255,0,0)']]`. To control the + bounds of the colorscale in color space, use `cmin` and `cmax`. + Alternatively, `colorscale` may be a palette name string of the + following list: Blackbody,Bluered,Blues,Cividis,Earth,Electric, + Greens,Greys,Hot,Jet,Picnic,Portland,Rainbow,RdBu,Reds,Viridis, + YlGnBu,YlOrRd. + + The 'colorscale' property is a colorscale and may be + specified as: + - A list of colors that will be spaced evenly to create the colorscale. + Many predefined colorscale lists are included in the sequential, diverging, + and cyclical modules in the plotly.colors package. + - A list of 2-element lists where the first element is the + normalized color level value (starting at 0 and ending at 1), + and the second item is a valid color string. + (e.g. [[0, 'green'], [0.5, 'red'], [1.0, 'rgb(0, 0, 255)']]) + - One of the following named colorscales: + ['aggrnyl', 'agsunset', 'algae', 'amp', 'armyrose', 'balance', + 'blackbody', 'bluered', 'blues', 'blugrn', 'bluyl', 'brbg', + 'brwnyl', 'bugn', 'bupu', 'burg', 'burgyl', 'cividis', 'curl', + 'darkmint', 'deep', 'delta', 'dense', 'earth', 'edge', 'electric', + 'emrld', 'fall', 'geyser', 'gnbu', 'gray', 'greens', 'greys', + 'haline', 'hot', 'hsv', 'ice', 'icefire', 'inferno', 'jet', + 'magenta', 'magma', 'matter', 'mint', 'mrybm', 'mygbm', 'oranges', + 'orrd', 'oryel', 'oxy', 'peach', 'phase', 'picnic', 'pinkyl', + 'piyg', 'plasma', 'plotly3', 'portland', 'prgn', 'pubu', 'pubugn', + 'puor', 'purd', 'purp', 'purples', 'purpor', 'rainbow', 'rdbu', + 'rdgy', 'rdpu', 'rdylbu', 'rdylgn', 'redor', 'reds', 'solar', + 'spectral', 'speed', 'sunset', 'sunsetdark', 'teal', 'tealgrn', + 'tealrose', 'tempo', 'temps', 'thermal', 'tropic', 'turbid', + 'turbo', 'twilight', 'viridis', 'ylgn', 'ylgnbu', 'ylorbr', + 'ylorrd']. + Appending '_r' to a named colorscale reverses it. + + Returns + ------- + str + """ + return self["colorscale"] + + @colorscale.setter + def colorscale(self, val): + self["colorscale"] = val + + @property + def contour(self): + """ + The 'contour' property is an instance of Contour + that may be specified as: + - An instance of :class:`plotly.graph_objs.isosurface.Contour` + - A dict of string/value properties that will be passed + to the Contour constructor + + Returns + ------- + plotly.graph_objs.isosurface.Contour + """ + return self["contour"] + + @contour.setter + def contour(self, val): + self["contour"] = val + + @property + def customdata(self): + """ + Assigns extra data each datum. This may be useful when + listening to hover, click and selection events. Note that, + "scatter" traces also appends customdata items in the markers + DOM elements + + The 'customdata' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["customdata"] + + @customdata.setter + def customdata(self, val): + self["customdata"] = val + + @property + def customdatasrc(self): + """ + Sets the source reference on Chart Studio Cloud for + `customdata`. + + The 'customdatasrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["customdatasrc"] + + @customdatasrc.setter + def customdatasrc(self, val): + self["customdatasrc"] = val + + @property + def flatshading(self): + """ + Determines whether or not normal smoothing is applied to the + meshes, creating meshes with an angular, low-poly look via flat + reflections. + + The 'flatshading' property is a boolean and must be specified as: + - A boolean value: True or False + + Returns + ------- + bool + """ + return self["flatshading"] + + @flatshading.setter + def flatshading(self, val): + self["flatshading"] = val + + @property + def hoverinfo(self): + """ + Determines which trace information appear on hover. If `none` + or `skip` are set, no information is displayed upon hovering. + But, if `none` is set, click and hover events are still fired. + + The 'hoverinfo' property is a flaglist and may be specified + as a string containing: + - Any combination of ['x', 'y', 'z', 'text', 'name'] joined with '+' characters + (e.g. 'x+y') + OR exactly one of ['all', 'none', 'skip'] (e.g. 'skip') + - A list or array of the above + + Returns + ------- + Any|numpy.ndarray + """ + return self["hoverinfo"] + + @hoverinfo.setter + def hoverinfo(self, val): + self["hoverinfo"] = val + + @property + def hoverinfosrc(self): + """ + Sets the source reference on Chart Studio Cloud for + `hoverinfo`. + + The 'hoverinfosrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["hoverinfosrc"] + + @hoverinfosrc.setter + def hoverinfosrc(self, val): + self["hoverinfosrc"] = val + + @property + def hoverlabel(self): + """ + The 'hoverlabel' property is an instance of Hoverlabel + that may be specified as: + - An instance of :class:`plotly.graph_objs.isosurface.Hoverlabel` + - A dict of string/value properties that will be passed + to the Hoverlabel constructor + + Returns + ------- + plotly.graph_objs.isosurface.Hoverlabel + """ + return self["hoverlabel"] + + @hoverlabel.setter + def hoverlabel(self, val): + self["hoverlabel"] = val + + @property + def hovertemplate(self): + """ + Template string used for rendering the information that appear + on hover box. Note that this will override `hoverinfo`. + Variables are inserted using %{variable}, for example "y: %{y}" + as well as %{xother}, {%_xother}, {%_xother_}, {%xother_}. When + showing info for several points, "xother" will be added to + those with different x positions from the first point. An + underscore before or after "(x|y)other" will add a space on + that side, only when this field is shown. Numbers are formatted + using d3-format's syntax %{variable:d3-format}, for example + "Price: %{y:$.2f}". + https://github.com/d3/d3-format/tree/v1.4.5#d3-format for + details on the formatting syntax. Dates are formatted using + d3-time-format's syntax %{variable|d3-time-format}, for example + "Day: %{2019-01-01|%A}". https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format for details on the date + formatting syntax. Variables that can't be found will be + replaced with the specifier. For example, a template of "data: + %{x}, %{y}" will result in a value of "data: 1, %{y}" if x is 1 + and y is missing. Variables with an undefined value will be + replaced with the fallback value. The variables available in + `hovertemplate` are the ones emitted as event data described at + this link https://plotly.com/javascript/plotlyjs-events/#event- + data. Additionally, all attributes that can be specified per- + point (the ones that are `arrayOk: true`) are available. + Anything contained in tag `` is displayed in the + secondary box, for example `%{fullData.name}`. + To hide the secondary box completely, use an empty tag + ``. + + The 'hovertemplate' property is a string and must be specified as: + - A string + - A number that will be converted to a string + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["hovertemplate"] + + @hovertemplate.setter + def hovertemplate(self, val): + self["hovertemplate"] = val + + @property + def hovertemplatefallback(self): + """ + Fallback string that's displayed when a variable referenced in + a template is missing. If the boolean value 'false' is passed + in, the specifier with the missing variable will be displayed. + + The 'hovertemplatefallback' property accepts values of any type + + Returns + ------- + Any + """ + return self["hovertemplatefallback"] + + @hovertemplatefallback.setter + def hovertemplatefallback(self, val): + self["hovertemplatefallback"] = val + + @property + def hovertemplatesrc(self): + """ + Sets the source reference on Chart Studio Cloud for + `hovertemplate`. + + The 'hovertemplatesrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["hovertemplatesrc"] + + @hovertemplatesrc.setter + def hovertemplatesrc(self, val): + self["hovertemplatesrc"] = val + + @property + def hovertext(self): + """ + Same as `text`. + + The 'hovertext' property is a string and must be specified as: + - A string + - A number that will be converted to a string + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["hovertext"] + + @hovertext.setter + def hovertext(self, val): + self["hovertext"] = val + + @property + def hovertextsrc(self): + """ + Sets the source reference on Chart Studio Cloud for + `hovertext`. + + The 'hovertextsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["hovertextsrc"] + + @hovertextsrc.setter + def hovertextsrc(self, val): + self["hovertextsrc"] = val + + @property + def ids(self): + """ + Assigns id labels to each datum. These ids for object constancy + of data points during animation. Should be an array of strings, + not numbers or any other type. + + The 'ids' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["ids"] + + @ids.setter + def ids(self, val): + self["ids"] = val + + @property + def idssrc(self): + """ + Sets the source reference on Chart Studio Cloud for `ids`. + + The 'idssrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["idssrc"] + + @idssrc.setter + def idssrc(self, val): + self["idssrc"] = val + + @property + def isomax(self): + """ + Sets the maximum boundary for iso-surface plot. + + The 'isomax' property is a number and may be specified as: + - An int or float + + Returns + ------- + int|float + """ + return self["isomax"] + + @isomax.setter + def isomax(self, val): + self["isomax"] = val + + @property + def isomin(self): + """ + Sets the minimum boundary for iso-surface plot. + + The 'isomin' property is a number and may be specified as: + - An int or float + + Returns + ------- + int|float + """ + return self["isomin"] + + @isomin.setter + def isomin(self, val): + self["isomin"] = val + + @property + def legend(self): + """ + Sets the reference to a legend to show this trace in. + References to these legends are "legend", "legend2", "legend3", + etc. Settings for these legends are set in the layout, under + `layout.legend`, `layout.legend2`, etc. + + The 'legend' property is an identifier of a particular + subplot, of type 'legend', that may be specified as: + - the string 'legend' optionally followed by an integer >= 1 + (e.g. 'legend', 'legend1', 'legend2', 'legend3', etc.) + + Returns + ------- + str + """ + return self["legend"] + + @legend.setter + def legend(self, val): + self["legend"] = val + + @property + def legendgroup(self): + """ + Sets the legend group for this trace. Traces and shapes part of + the same legend group hide/show at the same time when toggling + legend items. + + The 'legendgroup' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["legendgroup"] + + @legendgroup.setter + def legendgroup(self, val): + self["legendgroup"] = val + + @property + def legendgrouptitle(self): + """ + The 'legendgrouptitle' property is an instance of Legendgrouptitle + that may be specified as: + - An instance of :class:`plotly.graph_objs.isosurface.Legendgrouptitle` + - A dict of string/value properties that will be passed + to the Legendgrouptitle constructor + + Returns + ------- + plotly.graph_objs.isosurface.Legendgrouptitle + """ + return self["legendgrouptitle"] + + @legendgrouptitle.setter + def legendgrouptitle(self, val): + self["legendgrouptitle"] = val + + @property + def legendrank(self): + """ + Sets the legend rank for this trace. Items and groups with + smaller ranks are presented on top/left side while with + "reversed" `legend.traceorder` they are on bottom/right side. + The default legendrank is 1000, so that you can use ranks less + than 1000 to place certain items before all unranked items, and + ranks greater than 1000 to go after all unranked items. When + having unranked or equal rank items shapes would be displayed + after traces i.e. according to their order in data and layout. + + The 'legendrank' property is a number and may be specified as: + - An int or float + + Returns + ------- + int|float + """ + return self["legendrank"] + + @legendrank.setter + def legendrank(self, val): + self["legendrank"] = val + + @property + def legendwidth(self): + """ + Sets the width (in px or fraction) of the legend for this + trace. + + The 'legendwidth' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["legendwidth"] + + @legendwidth.setter + def legendwidth(self, val): + self["legendwidth"] = val + + @property + def lighting(self): + """ + The 'lighting' property is an instance of Lighting + that may be specified as: + - An instance of :class:`plotly.graph_objs.isosurface.Lighting` + - A dict of string/value properties that will be passed + to the Lighting constructor + + Returns + ------- + plotly.graph_objs.isosurface.Lighting + """ + return self["lighting"] + + @lighting.setter + def lighting(self, val): + self["lighting"] = val + + @property + def lightposition(self): + """ + The 'lightposition' property is an instance of Lightposition + that may be specified as: + - An instance of :class:`plotly.graph_objs.isosurface.Lightposition` + - A dict of string/value properties that will be passed + to the Lightposition constructor + + Returns + ------- + plotly.graph_objs.isosurface.Lightposition + """ + return self["lightposition"] + + @lightposition.setter + def lightposition(self, val): + self["lightposition"] = val + + @property + def meta(self): + """ + Assigns extra meta information associated with this trace that + can be used in various text attributes. Attributes such as + trace `name`, graph, axis and colorbar `title.text`, annotation + `text` `rangeselector`, `updatemenues` and `sliders` `label` + text all support `meta`. To access the trace `meta` values in + an attribute in the same trace, simply use `%{meta[i]}` where + `i` is the index or key of the `meta` item in question. To + access trace `meta` in layout attributes, use + `%{data[n[.meta[i]}` where `i` is the index or key of the + `meta` and `n` is the trace index. + + The 'meta' property accepts values of any type + + Returns + ------- + Any|numpy.ndarray + """ + return self["meta"] + + @meta.setter + def meta(self, val): + self["meta"] = val + + @property + def metasrc(self): + """ + Sets the source reference on Chart Studio Cloud for `meta`. + + The 'metasrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["metasrc"] + + @metasrc.setter + def metasrc(self, val): + self["metasrc"] = val + + @property + def name(self): + """ + Sets the trace name. The trace name appears as the legend item + and on hover. + + The 'name' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["name"] + + @name.setter + def name(self, val): + self["name"] = val + + @property + def opacity(self): + """ + Sets the opacity of the surface. Please note that in the case + of using high `opacity` values for example a value greater than + or equal to 0.5 on two surfaces (and 0.25 with four surfaces), + an overlay of multiple transparent surfaces may not perfectly + be sorted in depth by the webgl API. This behavior may be + improved in the near future and is subject to change. + + The 'opacity' property is a number and may be specified as: + - An int or float in the interval [0, 1] + + Returns + ------- + int|float + """ + return self["opacity"] + + @opacity.setter + def opacity(self, val): + self["opacity"] = val + + @property + def reversescale(self): + """ + Reverses the color mapping if true. If true, `cmin` will + correspond to the last color in the array and `cmax` will + correspond to the first color. + + The 'reversescale' property is a boolean and must be specified as: + - A boolean value: True or False + + Returns + ------- + bool + """ + return self["reversescale"] + + @reversescale.setter + def reversescale(self, val): + self["reversescale"] = val + + @property + def scene(self): + """ + Sets a reference between this trace's 3D coordinate system and + a 3D scene. If "scene" (the default value), the (x,y,z) + coordinates refer to `layout.scene`. If "scene2", the (x,y,z) + coordinates refer to `layout.scene2`, and so on. + + The 'scene' property is an identifier of a particular + subplot, of type 'scene', that may be specified as: + - the string 'scene' optionally followed by an integer >= 1 + (e.g. 'scene', 'scene1', 'scene2', 'scene3', etc.) + + Returns + ------- + str + """ + return self["scene"] + + @scene.setter + def scene(self, val): + self["scene"] = val + + @property + def showlegend(self): + """ + Determines whether or not an item corresponding to this trace + is shown in the legend. + + The 'showlegend' property is a boolean and must be specified as: + - A boolean value: True or False + + Returns + ------- + bool + """ + return self["showlegend"] + + @showlegend.setter + def showlegend(self, val): + self["showlegend"] = val + + @property + def showscale(self): + """ + Determines whether or not a colorbar is displayed for this + trace. + + The 'showscale' property is a boolean and must be specified as: + - A boolean value: True or False + + Returns + ------- + bool + """ + return self["showscale"] + + @showscale.setter + def showscale(self, val): + self["showscale"] = val + + @property + def slices(self): + """ + The 'slices' property is an instance of Slices + that may be specified as: + - An instance of :class:`plotly.graph_objs.isosurface.Slices` + - A dict of string/value properties that will be passed + to the Slices constructor + + Returns + ------- + plotly.graph_objs.isosurface.Slices + """ + return self["slices"] + + @slices.setter + def slices(self, val): + self["slices"] = val + + @property + def spaceframe(self): + """ + The 'spaceframe' property is an instance of Spaceframe + that may be specified as: + - An instance of :class:`plotly.graph_objs.isosurface.Spaceframe` + - A dict of string/value properties that will be passed + to the Spaceframe constructor + + Returns + ------- + plotly.graph_objs.isosurface.Spaceframe + """ + return self["spaceframe"] + + @spaceframe.setter + def spaceframe(self, val): + self["spaceframe"] = val + + @property + def stream(self): + """ + The 'stream' property is an instance of Stream + that may be specified as: + - An instance of :class:`plotly.graph_objs.isosurface.Stream` + - A dict of string/value properties that will be passed + to the Stream constructor + + Returns + ------- + plotly.graph_objs.isosurface.Stream + """ + return self["stream"] + + @stream.setter + def stream(self, val): + self["stream"] = val + + @property + def surface(self): + """ + The 'surface' property is an instance of Surface + that may be specified as: + - An instance of :class:`plotly.graph_objs.isosurface.Surface` + - A dict of string/value properties that will be passed + to the Surface constructor + + Returns + ------- + plotly.graph_objs.isosurface.Surface + """ + return self["surface"] + + @surface.setter + def surface(self, val): + self["surface"] = val + + @property + def text(self): + """ + Sets the text elements associated with the vertices. If trace + `hoverinfo` contains a "text" flag and "hovertext" is not set, + these elements will be seen in the hover labels. + + The 'text' property is a string and must be specified as: + - A string + - A number that will be converted to a string + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["text"] + + @text.setter + def text(self, val): + self["text"] = val + + @property + def textsrc(self): + """ + Sets the source reference on Chart Studio Cloud for `text`. + + The 'textsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["textsrc"] + + @textsrc.setter + def textsrc(self, val): + self["textsrc"] = val + + @property + def uid(self): + """ + Assign an id to this trace, Use this to provide object + constancy between traces during animations and transitions. + + The 'uid' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["uid"] + + @uid.setter + def uid(self, val): + self["uid"] = val + + @property + def uirevision(self): + """ + Controls persistence of some user-driven changes to the trace: + `constraintrange` in `parcoords` traces, as well as some + `editable: true` modifications such as `name` and + `colorbar.title`. Defaults to `layout.uirevision`. Note that + other user-driven trace attribute changes are controlled by + `layout` attributes: `trace.visible` is controlled by + `layout.legend.uirevision`, `selectedpoints` is controlled by + `layout.selectionrevision`, and `colorbar.(x|y)` (accessible + with `config: {editable: true}`) is controlled by + `layout.editrevision`. Trace changes are tracked by `uid`, + which only falls back on trace index if no `uid` is provided. + So if your app can add/remove traces before the end of the + `data` array, such that the same trace has a different index, + you can still preserve user-driven changes if you give each + trace a `uid` that stays with it as it moves. + + The 'uirevision' property accepts values of any type + + Returns + ------- + Any + """ + return self["uirevision"] + + @uirevision.setter + def uirevision(self, val): + self["uirevision"] = val + + @property + def value(self): + """ + Sets the 4th dimension (value) of the vertices. + + The 'value' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["value"] + + @value.setter + def value(self, val): + self["value"] = val + + @property + def valuehoverformat(self): + """ + Sets the hover text formatting rulefor `value` using d3 + formatting mini-languages which are very similar to those in + Python. For numbers, see: + https://github.com/d3/d3-format/tree/v1.4.5#d3-format.By + default the values are formatted using generic number format. + + The 'valuehoverformat' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["valuehoverformat"] + + @valuehoverformat.setter + def valuehoverformat(self, val): + self["valuehoverformat"] = val + + @property + def valuesrc(self): + """ + Sets the source reference on Chart Studio Cloud for `value`. + + The 'valuesrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["valuesrc"] + + @valuesrc.setter + def valuesrc(self, val): + self["valuesrc"] = val + + @property + def visible(self): + """ + Determines whether or not this trace is visible. If + "legendonly", the trace is not drawn, but can appear as a + legend item (provided that the legend itself is visible). + + The 'visible' property is an enumeration that may be specified as: + - One of the following enumeration values: + [True, False, 'legendonly'] + + Returns + ------- + Any + """ + return self["visible"] + + @visible.setter + def visible(self, val): + self["visible"] = val + + @property + def x(self): + """ + Sets the X coordinates of the vertices on X axis. + + The 'x' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["x"] + + @x.setter + def x(self, val): + self["x"] = val + + @property + def xhoverformat(self): + """ + Sets the hover text formatting rulefor `x` using d3 formatting + mini-languages which are very similar to those in Python. For + numbers, see: + https://github.com/d3/d3-format/tree/v1.4.5#d3-format. And for + dates see: https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format. We add two items to d3's date + formatter: "%h" for half of the year as a decimal number as + well as "%{n}f" for fractional seconds with n digits. For + example, *2016-10-13 09:15:23.456* with tickformat + "%H~%M~%S.%2f" would display *09~15~23.46*By default the values + are formatted using `xaxis.hoverformat`. + + The 'xhoverformat' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["xhoverformat"] + + @xhoverformat.setter + def xhoverformat(self, val): + self["xhoverformat"] = val + + @property + def xsrc(self): + """ + Sets the source reference on Chart Studio Cloud for `x`. + + The 'xsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["xsrc"] + + @xsrc.setter + def xsrc(self, val): + self["xsrc"] = val + + @property + def y(self): + """ + Sets the Y coordinates of the vertices on Y axis. + + The 'y' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["y"] + + @y.setter + def y(self, val): + self["y"] = val + + @property + def yhoverformat(self): + """ + Sets the hover text formatting rulefor `y` using d3 formatting + mini-languages which are very similar to those in Python. For + numbers, see: + https://github.com/d3/d3-format/tree/v1.4.5#d3-format. And for + dates see: https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format. We add two items to d3's date + formatter: "%h" for half of the year as a decimal number as + well as "%{n}f" for fractional seconds with n digits. For + example, *2016-10-13 09:15:23.456* with tickformat + "%H~%M~%S.%2f" would display *09~15~23.46*By default the values + are formatted using `yaxis.hoverformat`. + + The 'yhoverformat' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["yhoverformat"] + + @yhoverformat.setter + def yhoverformat(self, val): + self["yhoverformat"] = val + + @property + def ysrc(self): + """ + Sets the source reference on Chart Studio Cloud for `y`. + + The 'ysrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["ysrc"] + + @ysrc.setter + def ysrc(self, val): + self["ysrc"] = val + + @property + def z(self): + """ + Sets the Z coordinates of the vertices on Z axis. + + The 'z' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["z"] + + @z.setter + def z(self, val): + self["z"] = val + + @property + def zhoverformat(self): + """ + Sets the hover text formatting rulefor `z` using d3 formatting + mini-languages which are very similar to those in Python. For + numbers, see: + https://github.com/d3/d3-format/tree/v1.4.5#d3-format. And for + dates see: https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format. We add two items to d3's date + formatter: "%h" for half of the year as a decimal number as + well as "%{n}f" for fractional seconds with n digits. For + example, *2016-10-13 09:15:23.456* with tickformat + "%H~%M~%S.%2f" would display *09~15~23.46*By default the values + are formatted using `zaxis.hoverformat`. + + The 'zhoverformat' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["zhoverformat"] + + @zhoverformat.setter + def zhoverformat(self, val): + self["zhoverformat"] = val + + @property + def zsrc(self): + """ + Sets the source reference on Chart Studio Cloud for `z`. + + The 'zsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["zsrc"] + + @zsrc.setter + def zsrc(self, val): + self["zsrc"] = val + + @property + def type(self): + return self._props["type"] + + @property + def _prop_descriptions(self): + return """\ + autocolorscale + Determines whether the colorscale is a default palette + (`autocolorscale: true`) or the palette determined by + `colorscale`. In case `colorscale` is unspecified or + `autocolorscale` is true, the default palette will be + chosen according to whether numbers in the `color` + array are all positive, all negative or mixed. + caps + :class:`plotly.graph_objects.isosurface.Caps` instance + or dict with compatible properties + cauto + Determines whether or not the color domain is computed + with respect to the input data (here `value`) or the + bounds set in `cmin` and `cmax` Defaults to `false` + when `cmin` and `cmax` are set by the user. + cmax + Sets the upper bound of the color domain. Value should + have the same units as `value` and if set, `cmin` must + be set as well. + cmid + Sets the mid-point of the color domain by scaling + `cmin` and/or `cmax` to be equidistant to this point. + Value should have the same units as `value`. Has no + effect when `cauto` is `false`. + cmin + Sets the lower bound of the color domain. Value should + have the same units as `value` and if set, `cmax` must + be set as well. + coloraxis + Sets a reference to a shared color axis. References to + these shared color axes are "coloraxis", "coloraxis2", + "coloraxis3", etc. Settings for these shared color axes + are set in the layout, under `layout.coloraxis`, + `layout.coloraxis2`, etc. Note that multiple color + scales can be linked to the same color axis. + colorbar + :class:`plotly.graph_objects.isosurface.ColorBar` + instance or dict with compatible properties + colorscale + Sets the colorscale. The colorscale must be an array + containing arrays mapping a normalized value to an rgb, + rgba, hex, hsl, hsv, or named color string. At minimum, + a mapping for the lowest (0) and highest (1) values are + required. For example, `[[0, 'rgb(0,0,255)'], [1, + 'rgb(255,0,0)']]`. To control the bounds of the + colorscale in color space, use `cmin` and `cmax`. + Alternatively, `colorscale` may be a palette name + string of the following list: Blackbody,Bluered,Blues,C + ividis,Earth,Electric,Greens,Greys,Hot,Jet,Picnic,Portl + and,Rainbow,RdBu,Reds,Viridis,YlGnBu,YlOrRd. + contour + :class:`plotly.graph_objects.isosurface.Contour` + instance or dict with compatible properties + customdata + Assigns extra data each datum. This may be useful when + listening to hover, click and selection events. Note + that, "scatter" traces also appends customdata items in + the markers DOM elements + customdatasrc + Sets the source reference on Chart Studio Cloud for + `customdata`. + flatshading + Determines whether or not normal smoothing is applied + to the meshes, creating meshes with an angular, low- + poly look via flat reflections. + hoverinfo + Determines which trace information appear on hover. If + `none` or `skip` are set, no information is displayed + upon hovering. But, if `none` is set, click and hover + events are still fired. + hoverinfosrc + Sets the source reference on Chart Studio Cloud for + `hoverinfo`. + hoverlabel + :class:`plotly.graph_objects.isosurface.Hoverlabel` + instance or dict with compatible properties + hovertemplate + Template string used for rendering the information that + appear on hover box. Note that this will override + `hoverinfo`. Variables are inserted using %{variable}, + for example "y: %{y}" as well as %{xother}, {%_xother}, + {%_xother_}, {%xother_}. When showing info for several + points, "xother" will be added to those with different + x positions from the first point. An underscore before + or after "(x|y)other" will add a space on that side, + only when this field is shown. Numbers are formatted + using d3-format's syntax %{variable:d3-format}, for + example "Price: %{y:$.2f}". + https://github.com/d3/d3-format/tree/v1.4.5#d3-format + for details on the formatting syntax. Dates are + formatted using d3-time-format's syntax + %{variable|d3-time-format}, for example "Day: + %{2019-01-01|%A}". https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format for details on the + date formatting syntax. Variables that can't be found + will be replaced with the specifier. For example, a + template of "data: %{x}, %{y}" will result in a value + of "data: 1, %{y}" if x is 1 and y is missing. + Variables with an undefined value will be replaced with + the fallback value. The variables available in + `hovertemplate` are the ones emitted as event data + described at this link + https://plotly.com/javascript/plotlyjs-events/#event- + data. Additionally, all attributes that can be + specified per-point (the ones that are `arrayOk: true`) + are available. Anything contained in tag `` is + displayed in the secondary box, for example + `%{fullData.name}`. To hide the + secondary box completely, use an empty tag + ``. + hovertemplatefallback + Fallback string that's displayed when a variable + referenced in a template is missing. If the boolean + value 'false' is passed in, the specifier with the + missing variable will be displayed. + hovertemplatesrc + Sets the source reference on Chart Studio Cloud for + `hovertemplate`. + hovertext + Same as `text`. + hovertextsrc + Sets the source reference on Chart Studio Cloud for + `hovertext`. + ids + Assigns id labels to each datum. These ids for object + constancy of data points during animation. Should be an + array of strings, not numbers or any other type. + idssrc + Sets the source reference on Chart Studio Cloud for + `ids`. + isomax + Sets the maximum boundary for iso-surface plot. + isomin + Sets the minimum boundary for iso-surface plot. + legend + Sets the reference to a legend to show this trace in. + References to these legends are "legend", "legend2", + "legend3", etc. Settings for these legends are set in + the layout, under `layout.legend`, `layout.legend2`, + etc. + legendgroup + Sets the legend group for this trace. Traces and shapes + part of the same legend group hide/show at the same + time when toggling legend items. + legendgrouptitle + :class:`plotly.graph_objects.isosurface.Legendgrouptitl + e` instance or dict with compatible properties + legendrank + Sets the legend rank for this trace. Items and groups + with smaller ranks are presented on top/left side while + with "reversed" `legend.traceorder` they are on + bottom/right side. The default legendrank is 1000, so + that you can use ranks less than 1000 to place certain + items before all unranked items, and ranks greater than + 1000 to go after all unranked items. When having + unranked or equal rank items shapes would be displayed + after traces i.e. according to their order in data and + layout. + legendwidth + Sets the width (in px or fraction) of the legend for + this trace. + lighting + :class:`plotly.graph_objects.isosurface.Lighting` + instance or dict with compatible properties + lightposition + :class:`plotly.graph_objects.isosurface.Lightposition` + instance or dict with compatible properties + meta + Assigns extra meta information associated with this + trace that can be used in various text attributes. + Attributes such as trace `name`, graph, axis and + colorbar `title.text`, annotation `text` + `rangeselector`, `updatemenues` and `sliders` `label` + text all support `meta`. To access the trace `meta` + values in an attribute in the same trace, simply use + `%{meta[i]}` where `i` is the index or key of the + `meta` item in question. To access trace `meta` in + layout attributes, use `%{data[n[.meta[i]}` where `i` + is the index or key of the `meta` and `n` is the trace + index. + metasrc + Sets the source reference on Chart Studio Cloud for + `meta`. + name + Sets the trace name. The trace name appears as the + legend item and on hover. + opacity + Sets the opacity of the surface. Please note that in + the case of using high `opacity` values for example a + value greater than or equal to 0.5 on two surfaces (and + 0.25 with four surfaces), an overlay of multiple + transparent surfaces may not perfectly be sorted in + depth by the webgl API. This behavior may be improved + in the near future and is subject to change. + reversescale + Reverses the color mapping if true. If true, `cmin` + will correspond to the last color in the array and + `cmax` will correspond to the first color. + scene + Sets a reference between this trace's 3D coordinate + system and a 3D scene. If "scene" (the default value), + the (x,y,z) coordinates refer to `layout.scene`. If + "scene2", the (x,y,z) coordinates refer to + `layout.scene2`, and so on. + showlegend + Determines whether or not an item corresponding to this + trace is shown in the legend. + showscale + Determines whether or not a colorbar is displayed for + this trace. + slices + :class:`plotly.graph_objects.isosurface.Slices` + instance or dict with compatible properties + spaceframe + :class:`plotly.graph_objects.isosurface.Spaceframe` + instance or dict with compatible properties + stream + :class:`plotly.graph_objects.isosurface.Stream` + instance or dict with compatible properties + surface + :class:`plotly.graph_objects.isosurface.Surface` + instance or dict with compatible properties + text + Sets the text elements associated with the vertices. If + trace `hoverinfo` contains a "text" flag and + "hovertext" is not set, these elements will be seen in + the hover labels. + textsrc + Sets the source reference on Chart Studio Cloud for + `text`. + uid + Assign an id to this trace, Use this to provide object + constancy between traces during animations and + transitions. + uirevision + Controls persistence of some user-driven changes to the + trace: `constraintrange` in `parcoords` traces, as well + as some `editable: true` modifications such as `name` + and `colorbar.title`. Defaults to `layout.uirevision`. + Note that other user-driven trace attribute changes are + controlled by `layout` attributes: `trace.visible` is + controlled by `layout.legend.uirevision`, + `selectedpoints` is controlled by + `layout.selectionrevision`, and `colorbar.(x|y)` + (accessible with `config: {editable: true}`) is + controlled by `layout.editrevision`. Trace changes are + tracked by `uid`, which only falls back on trace index + if no `uid` is provided. So if your app can add/remove + traces before the end of the `data` array, such that + the same trace has a different index, you can still + preserve user-driven changes if you give each trace a + `uid` that stays with it as it moves. + value + Sets the 4th dimension (value) of the vertices. + valuehoverformat + Sets the hover text formatting rulefor `value` using + d3 formatting mini-languages which are very similar to + those in Python. For numbers, see: https://github.com/d + 3/d3-format/tree/v1.4.5#d3-format.By default the values + are formatted using generic number format. + valuesrc + Sets the source reference on Chart Studio Cloud for + `value`. + visible + Determines whether or not this trace is visible. If + "legendonly", the trace is not drawn, but can appear as + a legend item (provided that the legend itself is + visible). + x + Sets the X coordinates of the vertices on X axis. + xhoverformat + Sets the hover text formatting rulefor `x` using d3 + formatting mini-languages which are very similar to + those in Python. For numbers, see: + https://github.com/d3/d3-format/tree/v1.4.5#d3-format. + And for dates see: https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format. We add two items to + d3's date formatter: "%h" for half of the year as a + decimal number as well as "%{n}f" for fractional + seconds with n digits. For example, *2016-10-13 + 09:15:23.456* with tickformat "%H~%M~%S.%2f" would + display *09~15~23.46*By default the values are + formatted using `xaxis.hoverformat`. + xsrc + Sets the source reference on Chart Studio Cloud for + `x`. + y + Sets the Y coordinates of the vertices on Y axis. + yhoverformat + Sets the hover text formatting rulefor `y` using d3 + formatting mini-languages which are very similar to + those in Python. For numbers, see: + https://github.com/d3/d3-format/tree/v1.4.5#d3-format. + And for dates see: https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format. We add two items to + d3's date formatter: "%h" for half of the year as a + decimal number as well as "%{n}f" for fractional + seconds with n digits. For example, *2016-10-13 + 09:15:23.456* with tickformat "%H~%M~%S.%2f" would + display *09~15~23.46*By default the values are + formatted using `yaxis.hoverformat`. + ysrc + Sets the source reference on Chart Studio Cloud for + `y`. + z + Sets the Z coordinates of the vertices on Z axis. + zhoverformat + Sets the hover text formatting rulefor `z` using d3 + formatting mini-languages which are very similar to + those in Python. For numbers, see: + https://github.com/d3/d3-format/tree/v1.4.5#d3-format. + And for dates see: https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format. We add two items to + d3's date formatter: "%h" for half of the year as a + decimal number as well as "%{n}f" for fractional + seconds with n digits. For example, *2016-10-13 + 09:15:23.456* with tickformat "%H~%M~%S.%2f" would + display *09~15~23.46*By default the values are + formatted using `zaxis.hoverformat`. + zsrc + Sets the source reference on Chart Studio Cloud for + `z`. + """ + + def __init__( + self, + arg=None, + autocolorscale=None, + caps=None, + cauto=None, + cmax=None, + cmid=None, + cmin=None, + coloraxis=None, + colorbar=None, + colorscale=None, + contour=None, + customdata=None, + customdatasrc=None, + flatshading=None, + hoverinfo=None, + hoverinfosrc=None, + hoverlabel=None, + hovertemplate=None, + hovertemplatefallback=None, + hovertemplatesrc=None, + hovertext=None, + hovertextsrc=None, + ids=None, + idssrc=None, + isomax=None, + isomin=None, + legend=None, + legendgroup=None, + legendgrouptitle=None, + legendrank=None, + legendwidth=None, + lighting=None, + lightposition=None, + meta=None, + metasrc=None, + name=None, + opacity=None, + reversescale=None, + scene=None, + showlegend=None, + showscale=None, + slices=None, + spaceframe=None, + stream=None, + surface=None, + text=None, + textsrc=None, + uid=None, + uirevision=None, + value=None, + valuehoverformat=None, + valuesrc=None, + visible=None, + x=None, + xhoverformat=None, + xsrc=None, + y=None, + yhoverformat=None, + ysrc=None, + z=None, + zhoverformat=None, + zsrc=None, + **kwargs, + ): + """ + Construct a new Isosurface object + + Draws isosurfaces between iso-min and iso-max values with + coordinates given by four 1-dimensional arrays containing the + `value`, `x`, `y` and `z` of every vertex of a uniform or non- + uniform 3-D grid. Horizontal or vertical slices, caps as well + as spaceframe between iso-min and iso-max values could also be + drawn using this trace. + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of :class:`plotly.graph_objs.Isosurface` + autocolorscale + Determines whether the colorscale is a default palette + (`autocolorscale: true`) or the palette determined by + `colorscale`. In case `colorscale` is unspecified or + `autocolorscale` is true, the default palette will be + chosen according to whether numbers in the `color` + array are all positive, all negative or mixed. + caps + :class:`plotly.graph_objects.isosurface.Caps` instance + or dict with compatible properties + cauto + Determines whether or not the color domain is computed + with respect to the input data (here `value`) or the + bounds set in `cmin` and `cmax` Defaults to `false` + when `cmin` and `cmax` are set by the user. + cmax + Sets the upper bound of the color domain. Value should + have the same units as `value` and if set, `cmin` must + be set as well. + cmid + Sets the mid-point of the color domain by scaling + `cmin` and/or `cmax` to be equidistant to this point. + Value should have the same units as `value`. Has no + effect when `cauto` is `false`. + cmin + Sets the lower bound of the color domain. Value should + have the same units as `value` and if set, `cmax` must + be set as well. + coloraxis + Sets a reference to a shared color axis. References to + these shared color axes are "coloraxis", "coloraxis2", + "coloraxis3", etc. Settings for these shared color axes + are set in the layout, under `layout.coloraxis`, + `layout.coloraxis2`, etc. Note that multiple color + scales can be linked to the same color axis. + colorbar + :class:`plotly.graph_objects.isosurface.ColorBar` + instance or dict with compatible properties + colorscale + Sets the colorscale. The colorscale must be an array + containing arrays mapping a normalized value to an rgb, + rgba, hex, hsl, hsv, or named color string. At minimum, + a mapping for the lowest (0) and highest (1) values are + required. For example, `[[0, 'rgb(0,0,255)'], [1, + 'rgb(255,0,0)']]`. To control the bounds of the + colorscale in color space, use `cmin` and `cmax`. + Alternatively, `colorscale` may be a palette name + string of the following list: Blackbody,Bluered,Blues,C + ividis,Earth,Electric,Greens,Greys,Hot,Jet,Picnic,Portl + and,Rainbow,RdBu,Reds,Viridis,YlGnBu,YlOrRd. + contour + :class:`plotly.graph_objects.isosurface.Contour` + instance or dict with compatible properties + customdata + Assigns extra data each datum. This may be useful when + listening to hover, click and selection events. Note + that, "scatter" traces also appends customdata items in + the markers DOM elements + customdatasrc + Sets the source reference on Chart Studio Cloud for + `customdata`. + flatshading + Determines whether or not normal smoothing is applied + to the meshes, creating meshes with an angular, low- + poly look via flat reflections. + hoverinfo + Determines which trace information appear on hover. If + `none` or `skip` are set, no information is displayed + upon hovering. But, if `none` is set, click and hover + events are still fired. + hoverinfosrc + Sets the source reference on Chart Studio Cloud for + `hoverinfo`. + hoverlabel + :class:`plotly.graph_objects.isosurface.Hoverlabel` + instance or dict with compatible properties + hovertemplate + Template string used for rendering the information that + appear on hover box. Note that this will override + `hoverinfo`. Variables are inserted using %{variable}, + for example "y: %{y}" as well as %{xother}, {%_xother}, + {%_xother_}, {%xother_}. When showing info for several + points, "xother" will be added to those with different + x positions from the first point. An underscore before + or after "(x|y)other" will add a space on that side, + only when this field is shown. Numbers are formatted + using d3-format's syntax %{variable:d3-format}, for + example "Price: %{y:$.2f}". + https://github.com/d3/d3-format/tree/v1.4.5#d3-format + for details on the formatting syntax. Dates are + formatted using d3-time-format's syntax + %{variable|d3-time-format}, for example "Day: + %{2019-01-01|%A}". https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format for details on the + date formatting syntax. Variables that can't be found + will be replaced with the specifier. For example, a + template of "data: %{x}, %{y}" will result in a value + of "data: 1, %{y}" if x is 1 and y is missing. + Variables with an undefined value will be replaced with + the fallback value. The variables available in + `hovertemplate` are the ones emitted as event data + described at this link + https://plotly.com/javascript/plotlyjs-events/#event- + data. Additionally, all attributes that can be + specified per-point (the ones that are `arrayOk: true`) + are available. Anything contained in tag `` is + displayed in the secondary box, for example + `%{fullData.name}`. To hide the + secondary box completely, use an empty tag + ``. + hovertemplatefallback + Fallback string that's displayed when a variable + referenced in a template is missing. If the boolean + value 'false' is passed in, the specifier with the + missing variable will be displayed. + hovertemplatesrc + Sets the source reference on Chart Studio Cloud for + `hovertemplate`. + hovertext + Same as `text`. + hovertextsrc + Sets the source reference on Chart Studio Cloud for + `hovertext`. + ids + Assigns id labels to each datum. These ids for object + constancy of data points during animation. Should be an + array of strings, not numbers or any other type. + idssrc + Sets the source reference on Chart Studio Cloud for + `ids`. + isomax + Sets the maximum boundary for iso-surface plot. + isomin + Sets the minimum boundary for iso-surface plot. + legend + Sets the reference to a legend to show this trace in. + References to these legends are "legend", "legend2", + "legend3", etc. Settings for these legends are set in + the layout, under `layout.legend`, `layout.legend2`, + etc. + legendgroup + Sets the legend group for this trace. Traces and shapes + part of the same legend group hide/show at the same + time when toggling legend items. + legendgrouptitle + :class:`plotly.graph_objects.isosurface.Legendgrouptitl + e` instance or dict with compatible properties + legendrank + Sets the legend rank for this trace. Items and groups + with smaller ranks are presented on top/left side while + with "reversed" `legend.traceorder` they are on + bottom/right side. The default legendrank is 1000, so + that you can use ranks less than 1000 to place certain + items before all unranked items, and ranks greater than + 1000 to go after all unranked items. When having + unranked or equal rank items shapes would be displayed + after traces i.e. according to their order in data and + layout. + legendwidth + Sets the width (in px or fraction) of the legend for + this trace. + lighting + :class:`plotly.graph_objects.isosurface.Lighting` + instance or dict with compatible properties + lightposition + :class:`plotly.graph_objects.isosurface.Lightposition` + instance or dict with compatible properties + meta + Assigns extra meta information associated with this + trace that can be used in various text attributes. + Attributes such as trace `name`, graph, axis and + colorbar `title.text`, annotation `text` + `rangeselector`, `updatemenues` and `sliders` `label` + text all support `meta`. To access the trace `meta` + values in an attribute in the same trace, simply use + `%{meta[i]}` where `i` is the index or key of the + `meta` item in question. To access trace `meta` in + layout attributes, use `%{data[n[.meta[i]}` where `i` + is the index or key of the `meta` and `n` is the trace + index. + metasrc + Sets the source reference on Chart Studio Cloud for + `meta`. + name + Sets the trace name. The trace name appears as the + legend item and on hover. + opacity + Sets the opacity of the surface. Please note that in + the case of using high `opacity` values for example a + value greater than or equal to 0.5 on two surfaces (and + 0.25 with four surfaces), an overlay of multiple + transparent surfaces may not perfectly be sorted in + depth by the webgl API. This behavior may be improved + in the near future and is subject to change. + reversescale + Reverses the color mapping if true. If true, `cmin` + will correspond to the last color in the array and + `cmax` will correspond to the first color. + scene + Sets a reference between this trace's 3D coordinate + system and a 3D scene. If "scene" (the default value), + the (x,y,z) coordinates refer to `layout.scene`. If + "scene2", the (x,y,z) coordinates refer to + `layout.scene2`, and so on. + showlegend + Determines whether or not an item corresponding to this + trace is shown in the legend. + showscale + Determines whether or not a colorbar is displayed for + this trace. + slices + :class:`plotly.graph_objects.isosurface.Slices` + instance or dict with compatible properties + spaceframe + :class:`plotly.graph_objects.isosurface.Spaceframe` + instance or dict with compatible properties + stream + :class:`plotly.graph_objects.isosurface.Stream` + instance or dict with compatible properties + surface + :class:`plotly.graph_objects.isosurface.Surface` + instance or dict with compatible properties + text + Sets the text elements associated with the vertices. If + trace `hoverinfo` contains a "text" flag and + "hovertext" is not set, these elements will be seen in + the hover labels. + textsrc + Sets the source reference on Chart Studio Cloud for + `text`. + uid + Assign an id to this trace, Use this to provide object + constancy between traces during animations and + transitions. + uirevision + Controls persistence of some user-driven changes to the + trace: `constraintrange` in `parcoords` traces, as well + as some `editable: true` modifications such as `name` + and `colorbar.title`. Defaults to `layout.uirevision`. + Note that other user-driven trace attribute changes are + controlled by `layout` attributes: `trace.visible` is + controlled by `layout.legend.uirevision`, + `selectedpoints` is controlled by + `layout.selectionrevision`, and `colorbar.(x|y)` + (accessible with `config: {editable: true}`) is + controlled by `layout.editrevision`. Trace changes are + tracked by `uid`, which only falls back on trace index + if no `uid` is provided. So if your app can add/remove + traces before the end of the `data` array, such that + the same trace has a different index, you can still + preserve user-driven changes if you give each trace a + `uid` that stays with it as it moves. + value + Sets the 4th dimension (value) of the vertices. + valuehoverformat + Sets the hover text formatting rulefor `value` using + d3 formatting mini-languages which are very similar to + those in Python. For numbers, see: https://github.com/d + 3/d3-format/tree/v1.4.5#d3-format.By default the values + are formatted using generic number format. + valuesrc + Sets the source reference on Chart Studio Cloud for + `value`. + visible + Determines whether or not this trace is visible. If + "legendonly", the trace is not drawn, but can appear as + a legend item (provided that the legend itself is + visible). + x + Sets the X coordinates of the vertices on X axis. + xhoverformat + Sets the hover text formatting rulefor `x` using d3 + formatting mini-languages which are very similar to + those in Python. For numbers, see: + https://github.com/d3/d3-format/tree/v1.4.5#d3-format. + And for dates see: https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format. We add two items to + d3's date formatter: "%h" for half of the year as a + decimal number as well as "%{n}f" for fractional + seconds with n digits. For example, *2016-10-13 + 09:15:23.456* with tickformat "%H~%M~%S.%2f" would + display *09~15~23.46*By default the values are + formatted using `xaxis.hoverformat`. + xsrc + Sets the source reference on Chart Studio Cloud for + `x`. + y + Sets the Y coordinates of the vertices on Y axis. + yhoverformat + Sets the hover text formatting rulefor `y` using d3 + formatting mini-languages which are very similar to + those in Python. For numbers, see: + https://github.com/d3/d3-format/tree/v1.4.5#d3-format. + And for dates see: https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format. We add two items to + d3's date formatter: "%h" for half of the year as a + decimal number as well as "%{n}f" for fractional + seconds with n digits. For example, *2016-10-13 + 09:15:23.456* with tickformat "%H~%M~%S.%2f" would + display *09~15~23.46*By default the values are + formatted using `yaxis.hoverformat`. + ysrc + Sets the source reference on Chart Studio Cloud for + `y`. + z + Sets the Z coordinates of the vertices on Z axis. + zhoverformat + Sets the hover text formatting rulefor `z` using d3 + formatting mini-languages which are very similar to + those in Python. For numbers, see: + https://github.com/d3/d3-format/tree/v1.4.5#d3-format. + And for dates see: https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format. We add two items to + d3's date formatter: "%h" for half of the year as a + decimal number as well as "%{n}f" for fractional + seconds with n digits. For example, *2016-10-13 + 09:15:23.456* with tickformat "%H~%M~%S.%2f" would + display *09~15~23.46*By default the values are + formatted using `zaxis.hoverformat`. + zsrc + Sets the source reference on Chart Studio Cloud for + `z`. + + Returns + ------- + Isosurface + """ + super().__init__("isosurface") + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + if arg is None: + arg = {} + elif isinstance(arg, self.__class__): + arg = arg.to_plotly_json() + elif isinstance(arg, dict): + arg = _copy.copy(arg) + else: + raise ValueError("""\ +The first argument to the plotly.graph_objs.Isosurface +constructor must be a dict or +an instance of :class:`plotly.graph_objs.Isosurface`""") + + self._skip_invalid = kwargs.pop("skip_invalid", False) + self._validate = kwargs.pop("_validate", True) + + self._set_property("autocolorscale", arg, autocolorscale) + self._set_property("caps", arg, caps) + self._set_property("cauto", arg, cauto) + self._set_property("cmax", arg, cmax) + self._set_property("cmid", arg, cmid) + self._set_property("cmin", arg, cmin) + self._set_property("coloraxis", arg, coloraxis) + self._set_property("colorbar", arg, colorbar) + self._set_property("colorscale", arg, colorscale) + self._set_property("contour", arg, contour) + self._set_property("customdata", arg, customdata) + self._set_property("customdatasrc", arg, customdatasrc) + self._set_property("flatshading", arg, flatshading) + self._set_property("hoverinfo", arg, hoverinfo) + self._set_property("hoverinfosrc", arg, hoverinfosrc) + self._set_property("hoverlabel", arg, hoverlabel) + self._set_property("hovertemplate", arg, hovertemplate) + self._set_property("hovertemplatefallback", arg, hovertemplatefallback) + self._set_property("hovertemplatesrc", arg, hovertemplatesrc) + self._set_property("hovertext", arg, hovertext) + self._set_property("hovertextsrc", arg, hovertextsrc) + self._set_property("ids", arg, ids) + self._set_property("idssrc", arg, idssrc) + self._set_property("isomax", arg, isomax) + self._set_property("isomin", arg, isomin) + self._set_property("legend", arg, legend) + self._set_property("legendgroup", arg, legendgroup) + self._set_property("legendgrouptitle", arg, legendgrouptitle) + self._set_property("legendrank", arg, legendrank) + self._set_property("legendwidth", arg, legendwidth) + self._set_property("lighting", arg, lighting) + self._set_property("lightposition", arg, lightposition) + self._set_property("meta", arg, meta) + self._set_property("metasrc", arg, metasrc) + self._set_property("name", arg, name) + self._set_property("opacity", arg, opacity) + self._set_property("reversescale", arg, reversescale) + self._set_property("scene", arg, scene) + self._set_property("showlegend", arg, showlegend) + self._set_property("showscale", arg, showscale) + self._set_property("slices", arg, slices) + self._set_property("spaceframe", arg, spaceframe) + self._set_property("stream", arg, stream) + self._set_property("surface", arg, surface) + self._set_property("text", arg, text) + self._set_property("textsrc", arg, textsrc) + self._set_property("uid", arg, uid) + self._set_property("uirevision", arg, uirevision) + self._set_property("value", arg, value) + self._set_property("valuehoverformat", arg, valuehoverformat) + self._set_property("valuesrc", arg, valuesrc) + self._set_property("visible", arg, visible) + self._set_property("x", arg, x) + self._set_property("xhoverformat", arg, xhoverformat) + self._set_property("xsrc", arg, xsrc) + self._set_property("y", arg, y) + self._set_property("yhoverformat", arg, yhoverformat) + self._set_property("ysrc", arg, ysrc) + self._set_property("z", arg, z) + self._set_property("zhoverformat", arg, zhoverformat) + self._set_property("zsrc", arg, zsrc) + + self._props["type"] = "isosurface" + arg.pop("type", None) + self._process_kwargs(**dict(arg, **kwargs)) + self._skip_invalid = False diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/_layout.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/_layout.py new file mode 100644 index 0000000000000000000000000000000000000000..5917d7d574cc672350dff2f9f25619cf294d7c08 --- /dev/null +++ b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/_layout.py @@ -0,0 +1,3507 @@ +# --- THIS FILE IS AUTO-GENERATED --- +# Modifications will be overwitten the next time code generation run. + +from plotly.basedatatypes import BaseLayoutType as _BaseLayoutType +import copy as _copy + + +class Layout(_BaseLayoutType): + _subplotid_prop_names = [ + "coloraxis", + "geo", + "legend", + "map", + "mapbox", + "polar", + "scene", + "smith", + "ternary", + "xaxis", + "yaxis", + ] + + import re + + _subplotid_prop_re = re.compile("^(" + "|".join(_subplotid_prop_names) + r")(\d+)$") + + @property + def _subplotid_validators(self): + """ + dict of validator classes for each subplot type + + Returns + ------- + dict + """ + from plotly.validator_cache import ValidatorCache + + return { + "coloraxis": ValidatorCache.get_validator("layout", "coloraxis"), + "geo": ValidatorCache.get_validator("layout", "geo"), + "legend": ValidatorCache.get_validator("layout", "legend"), + "map": ValidatorCache.get_validator("layout", "map"), + "mapbox": ValidatorCache.get_validator("layout", "mapbox"), + "polar": ValidatorCache.get_validator("layout", "polar"), + "scene": ValidatorCache.get_validator("layout", "scene"), + "smith": ValidatorCache.get_validator("layout", "smith"), + "ternary": ValidatorCache.get_validator("layout", "ternary"), + "xaxis": ValidatorCache.get_validator("layout", "xaxis"), + "yaxis": ValidatorCache.get_validator("layout", "yaxis"), + } + + def _subplot_re_match(self, prop): + return self._subplotid_prop_re.match(prop) + + _parent_path_str = "" + _path_str = "layout" + _valid_props = { + "activeselection", + "activeshape", + "annotationdefaults", + "annotations", + "autosize", + "autotypenumbers", + "barcornerradius", + "bargap", + "bargroupgap", + "barmode", + "barnorm", + "boxgap", + "boxgroupgap", + "boxmode", + "calendar", + "clickmode", + "coloraxis", + "colorscale", + "colorway", + "computed", + "datarevision", + "dragmode", + "editrevision", + "extendfunnelareacolors", + "extendiciclecolors", + "extendpiecolors", + "extendsunburstcolors", + "extendtreemapcolors", + "font", + "funnelareacolorway", + "funnelgap", + "funnelgroupgap", + "funnelmode", + "geo", + "grid", + "height", + "hiddenlabels", + "hiddenlabelssrc", + "hidesources", + "hoverdistance", + "hoverlabel", + "hovermode", + "hoversubplots", + "iciclecolorway", + "imagedefaults", + "images", + "legend", + "map", + "mapbox", + "margin", + "meta", + "metasrc", + "minreducedheight", + "minreducedwidth", + "modebar", + "newselection", + "newshape", + "paper_bgcolor", + "piecolorway", + "plot_bgcolor", + "polar", + "scattergap", + "scattermode", + "scene", + "selectdirection", + "selectiondefaults", + "selectionrevision", + "selections", + "separators", + "shapedefaults", + "shapes", + "showlegend", + "sliderdefaults", + "sliders", + "smith", + "spikedistance", + "sunburstcolorway", + "template", + "ternary", + "title", + "transition", + "treemapcolorway", + "uirevision", + "uniformtext", + "updatemenudefaults", + "updatemenus", + "violingap", + "violingroupgap", + "violinmode", + "waterfallgap", + "waterfallgroupgap", + "waterfallmode", + "width", + "xaxis", + "yaxis", + } + + @property + def activeselection(self): + """ + The 'activeselection' property is an instance of Activeselection + that may be specified as: + - An instance of :class:`plotly.graph_objs.layout.Activeselection` + - A dict of string/value properties that will be passed + to the Activeselection constructor + + Returns + ------- + plotly.graph_objs.layout.Activeselection + """ + return self["activeselection"] + + @activeselection.setter + def activeselection(self, val): + self["activeselection"] = val + + @property + def activeshape(self): + """ + The 'activeshape' property is an instance of Activeshape + that may be specified as: + - An instance of :class:`plotly.graph_objs.layout.Activeshape` + - A dict of string/value properties that will be passed + to the Activeshape constructor + + Returns + ------- + plotly.graph_objs.layout.Activeshape + """ + return self["activeshape"] + + @activeshape.setter + def activeshape(self, val): + self["activeshape"] = val + + @property + def annotations(self): + """ + The 'annotations' property is a tuple of instances of + Annotation that may be specified as: + - A list or tuple of instances of plotly.graph_objs.layout.Annotation + - A list or tuple of dicts of string/value properties that + will be passed to the Annotation constructor + + Returns + ------- + tuple[plotly.graph_objs.layout.Annotation] + """ + return self["annotations"] + + @annotations.setter + def annotations(self, val): + self["annotations"] = val + + @property + def annotationdefaults(self): + """ + When used in a template (as + layout.template.layout.annotationdefaults), sets the default + property values to use for elements of layout.annotations + + The 'annotationdefaults' property is an instance of Annotation + that may be specified as: + - An instance of :class:`plotly.graph_objs.layout.Annotation` + - A dict of string/value properties that will be passed + to the Annotation constructor + + Returns + ------- + plotly.graph_objs.layout.Annotation + """ + return self["annotationdefaults"] + + @annotationdefaults.setter + def annotationdefaults(self, val): + self["annotationdefaults"] = val + + @property + def autosize(self): + """ + Determines whether or not a layout width or height that has + been left undefined by the user is initialized on each + relayout. Note that, regardless of this attribute, an undefined + layout width or height is always initialized on the first call + to plot. + + The 'autosize' property is a boolean and must be specified as: + - A boolean value: True or False + + Returns + ------- + bool + """ + return self["autosize"] + + @autosize.setter + def autosize(self, val): + self["autosize"] = val + + @property + def autotypenumbers(self): + """ + Using "strict" a numeric string in trace data is not converted + to a number. Using *convert types* a numeric string in trace + data may be treated as a number during automatic axis `type` + detection. This is the default value; however it could be + overridden for individual axes. + + The 'autotypenumbers' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['convert types', 'strict'] + + Returns + ------- + Any + """ + return self["autotypenumbers"] + + @autotypenumbers.setter + def autotypenumbers(self, val): + self["autotypenumbers"] = val + + @property + def barcornerradius(self): + """ + Sets the rounding of bar corners. May be an integer number of + pixels, or a percentage of bar width (as a string ending in %). + + The 'barcornerradius' property accepts values of any type + + Returns + ------- + Any + """ + return self["barcornerradius"] + + @barcornerradius.setter + def barcornerradius(self, val): + self["barcornerradius"] = val + + @property + def bargap(self): + """ + Sets the gap (in plot fraction) between bars of adjacent + location coordinates. + + The 'bargap' property is a number and may be specified as: + - An int or float in the interval [0, 1] + + Returns + ------- + int|float + """ + return self["bargap"] + + @bargap.setter + def bargap(self, val): + self["bargap"] = val + + @property + def bargroupgap(self): + """ + Sets the gap (in plot fraction) between bars of the same + location coordinate. + + The 'bargroupgap' property is a number and may be specified as: + - An int or float in the interval [0, 1] + + Returns + ------- + int|float + """ + return self["bargroupgap"] + + @bargroupgap.setter + def bargroupgap(self, val): + self["bargroupgap"] = val + + @property + def barmode(self): + """ + Determines how bars at the same location coordinate are + displayed on the graph. With "stack", the bars are stacked on + top of one another With "relative", the bars are stacked on top + of one another, with negative values below the axis, positive + values above With "group", the bars are plotted next to one + another centered around the shared location. With "overlay", + the bars are plotted over one another, you might need to reduce + "opacity" to see multiple bars. + + The 'barmode' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['stack', 'group', 'overlay', 'relative'] + + Returns + ------- + Any + """ + return self["barmode"] + + @barmode.setter + def barmode(self, val): + self["barmode"] = val + + @property + def barnorm(self): + """ + Sets the normalization for bar traces on the graph. With + "fraction", the value of each bar is divided by the sum of all + values at that location coordinate. "percent" is the same but + multiplied by 100 to show percentages. + + The 'barnorm' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['', 'fraction', 'percent'] + + Returns + ------- + Any + """ + return self["barnorm"] + + @barnorm.setter + def barnorm(self, val): + self["barnorm"] = val + + @property + def boxgap(self): + """ + Sets the gap (in plot fraction) between boxes of adjacent + location coordinates. Has no effect on traces that have "width" + set. + + The 'boxgap' property is a number and may be specified as: + - An int or float in the interval [0, 1] + + Returns + ------- + int|float + """ + return self["boxgap"] + + @boxgap.setter + def boxgap(self, val): + self["boxgap"] = val + + @property + def boxgroupgap(self): + """ + Sets the gap (in plot fraction) between boxes of the same + location coordinate. Has no effect on traces that have "width" + set. + + The 'boxgroupgap' property is a number and may be specified as: + - An int or float in the interval [0, 1] + + Returns + ------- + int|float + """ + return self["boxgroupgap"] + + @boxgroupgap.setter + def boxgroupgap(self, val): + self["boxgroupgap"] = val + + @property + def boxmode(self): + """ + Determines how boxes at the same location coordinate are + displayed on the graph. If "group", the boxes are plotted next + to one another centered around the shared location. If + "overlay", the boxes are plotted over one another, you might + need to set "opacity" to see them multiple boxes. Has no effect + on traces that have "width" set. + + The 'boxmode' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['group', 'overlay'] + + Returns + ------- + Any + """ + return self["boxmode"] + + @boxmode.setter + def boxmode(self, val): + self["boxmode"] = val + + @property + def calendar(self): + """ + Sets the default calendar system to use for interpreting and + displaying dates throughout the plot. + + The 'calendar' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['chinese', 'coptic', 'discworld', 'ethiopian', + 'gregorian', 'hebrew', 'islamic', 'jalali', 'julian', + 'mayan', 'nanakshahi', 'nepali', 'persian', 'taiwan', + 'thai', 'ummalqura'] + + Returns + ------- + Any + """ + return self["calendar"] + + @calendar.setter + def calendar(self, val): + self["calendar"] = val + + @property + def clickmode(self): + """ + Determines the mode of single click interactions. "event" is + the default value and emits the `plotly_click` event. In + addition this mode emits the `plotly_selected` event in drag + modes "lasso" and "select", but with no event data attached + (kept for compatibility reasons). The "select" flag enables + selecting single data points via click. This mode also supports + persistent selections, meaning that pressing Shift while + clicking, adds to / subtracts from an existing selection. + "select" with `hovermode`: "x" can be confusing, consider + explicitly setting `hovermode`: "closest" when using this + feature. Selection events are sent accordingly as long as + "event" flag is set as well. When the "event" flag is missing, + `plotly_click` and `plotly_selected` events are not fired. + + The 'clickmode' property is a flaglist and may be specified + as a string containing: + - Any combination of ['event', 'select'] joined with '+' characters + (e.g. 'event+select') + OR exactly one of ['none'] (e.g. 'none') + + Returns + ------- + Any + """ + return self["clickmode"] + + @clickmode.setter + def clickmode(self, val): + self["clickmode"] = val + + @property + def coloraxis(self): + """ + The 'coloraxis' property is an instance of Coloraxis + that may be specified as: + - An instance of :class:`plotly.graph_objs.layout.Coloraxis` + - A dict of string/value properties that will be passed + to the Coloraxis constructor + + Returns + ------- + plotly.graph_objs.layout.Coloraxis + """ + return self["coloraxis"] + + @coloraxis.setter + def coloraxis(self, val): + self["coloraxis"] = val + + @property + def colorscale(self): + """ + The 'colorscale' property is an instance of Colorscale + that may be specified as: + - An instance of :class:`plotly.graph_objs.layout.Colorscale` + - A dict of string/value properties that will be passed + to the Colorscale constructor + + Returns + ------- + plotly.graph_objs.layout.Colorscale + """ + return self["colorscale"] + + @colorscale.setter + def colorscale(self, val): + self["colorscale"] = val + + @property + def colorway(self): + """ + Sets the default trace colors. + + The 'colorway' property is a colorlist that may be specified + as a tuple, list, one-dimensional numpy array, or pandas Series of valid + color strings + + Returns + ------- + list + """ + return self["colorway"] + + @colorway.setter + def colorway(self, val): + self["colorway"] = val + + @property + def computed(self): + """ + Placeholder for exporting automargin-impacting values namely + `margin.t`, `margin.b`, `margin.l` and `margin.r` in "full- + json" mode. + + The 'computed' property accepts values of any type + + Returns + ------- + Any + """ + return self["computed"] + + @computed.setter + def computed(self, val): + self["computed"] = val + + @property + def datarevision(self): + """ + If provided, a changed value tells `Plotly.react` that one or + more data arrays has changed. This way you can modify arrays + in-place rather than making a complete new copy for an + incremental change. If NOT provided, `Plotly.react` assumes + that data arrays are being treated as immutable, thus any data + array with a different identity from its predecessor contains + new data. + + The 'datarevision' property accepts values of any type + + Returns + ------- + Any + """ + return self["datarevision"] + + @datarevision.setter + def datarevision(self, val): + self["datarevision"] = val + + @property + def dragmode(self): + """ + Determines the mode of drag interactions. "select" and "lasso" + apply only to scatter traces with markers or text. "orbit" and + "turntable" apply only to 3D scenes. + + The 'dragmode' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['zoom', 'pan', 'select', 'lasso', 'drawclosedpath', + 'drawopenpath', 'drawline', 'drawrect', 'drawcircle', + 'orbit', 'turntable', False] + + Returns + ------- + Any + """ + return self["dragmode"] + + @dragmode.setter + def dragmode(self, val): + self["dragmode"] = val + + @property + def editrevision(self): + """ + Controls persistence of user-driven changes in `editable: true` + configuration, other than trace names and axis titles. Defaults + to `layout.uirevision`. + + The 'editrevision' property accepts values of any type + + Returns + ------- + Any + """ + return self["editrevision"] + + @editrevision.setter + def editrevision(self, val): + self["editrevision"] = val + + @property + def extendfunnelareacolors(self): + """ + If `true`, the funnelarea slice colors (whether given by + `funnelareacolorway` or inherited from `colorway`) will be + extended to three times its original length by first repeating + every color 20% lighter then each color 20% darker. This is + intended to reduce the likelihood of reusing the same color + when you have many slices, but you can set `false` to disable. + Colors provided in the trace, using `marker.colors`, are never + extended. + + The 'extendfunnelareacolors' property is a boolean and must be specified as: + - A boolean value: True or False + + Returns + ------- + bool + """ + return self["extendfunnelareacolors"] + + @extendfunnelareacolors.setter + def extendfunnelareacolors(self, val): + self["extendfunnelareacolors"] = val + + @property + def extendiciclecolors(self): + """ + If `true`, the icicle slice colors (whether given by + `iciclecolorway` or inherited from `colorway`) will be extended + to three times its original length by first repeating every + color 20% lighter then each color 20% darker. This is intended + to reduce the likelihood of reusing the same color when you + have many slices, but you can set `false` to disable. Colors + provided in the trace, using `marker.colors`, are never + extended. + + The 'extendiciclecolors' property is a boolean and must be specified as: + - A boolean value: True or False + + Returns + ------- + bool + """ + return self["extendiciclecolors"] + + @extendiciclecolors.setter + def extendiciclecolors(self, val): + self["extendiciclecolors"] = val + + @property + def extendpiecolors(self): + """ + If `true`, the pie slice colors (whether given by `piecolorway` + or inherited from `colorway`) will be extended to three times + its original length by first repeating every color 20% lighter + then each color 20% darker. This is intended to reduce the + likelihood of reusing the same color when you have many slices, + but you can set `false` to disable. Colors provided in the + trace, using `marker.colors`, are never extended. + + The 'extendpiecolors' property is a boolean and must be specified as: + - A boolean value: True or False + + Returns + ------- + bool + """ + return self["extendpiecolors"] + + @extendpiecolors.setter + def extendpiecolors(self, val): + self["extendpiecolors"] = val + + @property + def extendsunburstcolors(self): + """ + If `true`, the sunburst slice colors (whether given by + `sunburstcolorway` or inherited from `colorway`) will be + extended to three times its original length by first repeating + every color 20% lighter then each color 20% darker. This is + intended to reduce the likelihood of reusing the same color + when you have many slices, but you can set `false` to disable. + Colors provided in the trace, using `marker.colors`, are never + extended. + + The 'extendsunburstcolors' property is a boolean and must be specified as: + - A boolean value: True or False + + Returns + ------- + bool + """ + return self["extendsunburstcolors"] + + @extendsunburstcolors.setter + def extendsunburstcolors(self, val): + self["extendsunburstcolors"] = val + + @property + def extendtreemapcolors(self): + """ + If `true`, the treemap slice colors (whether given by + `treemapcolorway` or inherited from `colorway`) will be + extended to three times its original length by first repeating + every color 20% lighter then each color 20% darker. This is + intended to reduce the likelihood of reusing the same color + when you have many slices, but you can set `false` to disable. + Colors provided in the trace, using `marker.colors`, are never + extended. + + The 'extendtreemapcolors' property is a boolean and must be specified as: + - A boolean value: True or False + + Returns + ------- + bool + """ + return self["extendtreemapcolors"] + + @extendtreemapcolors.setter + def extendtreemapcolors(self, val): + self["extendtreemapcolors"] = val + + @property + def font(self): + """ + Sets the global font. Note that fonts used in traces and other + layout components inherit from the global font. + + The 'font' property is an instance of Font + that may be specified as: + - An instance of :class:`plotly.graph_objs.layout.Font` + - A dict of string/value properties that will be passed + to the Font constructor + + Returns + ------- + plotly.graph_objs.layout.Font + """ + return self["font"] + + @font.setter + def font(self, val): + self["font"] = val + + @property + def funnelareacolorway(self): + """ + Sets the default funnelarea slice colors. Defaults to the main + `colorway` used for trace colors. If you specify a new list + here it can still be extended with lighter and darker colors, + see `extendfunnelareacolors`. + + The 'funnelareacolorway' property is a colorlist that may be specified + as a tuple, list, one-dimensional numpy array, or pandas Series of valid + color strings + + Returns + ------- + list + """ + return self["funnelareacolorway"] + + @funnelareacolorway.setter + def funnelareacolorway(self, val): + self["funnelareacolorway"] = val + + @property + def funnelgap(self): + """ + Sets the gap (in plot fraction) between bars of adjacent + location coordinates. + + The 'funnelgap' property is a number and may be specified as: + - An int or float in the interval [0, 1] + + Returns + ------- + int|float + """ + return self["funnelgap"] + + @funnelgap.setter + def funnelgap(self, val): + self["funnelgap"] = val + + @property + def funnelgroupgap(self): + """ + Sets the gap (in plot fraction) between bars of the same + location coordinate. + + The 'funnelgroupgap' property is a number and may be specified as: + - An int or float in the interval [0, 1] + + Returns + ------- + int|float + """ + return self["funnelgroupgap"] + + @funnelgroupgap.setter + def funnelgroupgap(self, val): + self["funnelgroupgap"] = val + + @property + def funnelmode(self): + """ + Determines how bars at the same location coordinate are + displayed on the graph. With "stack", the bars are stacked on + top of one another With "group", the bars are plotted next to + one another centered around the shared location. With + "overlay", the bars are plotted over one another, you might + need to reduce "opacity" to see multiple bars. + + The 'funnelmode' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['stack', 'group', 'overlay'] + + Returns + ------- + Any + """ + return self["funnelmode"] + + @funnelmode.setter + def funnelmode(self, val): + self["funnelmode"] = val + + @property + def geo(self): + """ + The 'geo' property is an instance of Geo + that may be specified as: + - An instance of :class:`plotly.graph_objs.layout.Geo` + - A dict of string/value properties that will be passed + to the Geo constructor + + Returns + ------- + plotly.graph_objs.layout.Geo + """ + return self["geo"] + + @geo.setter + def geo(self, val): + self["geo"] = val + + @property + def grid(self): + """ + The 'grid' property is an instance of Grid + that may be specified as: + - An instance of :class:`plotly.graph_objs.layout.Grid` + - A dict of string/value properties that will be passed + to the Grid constructor + + Returns + ------- + plotly.graph_objs.layout.Grid + """ + return self["grid"] + + @grid.setter + def grid(self, val): + self["grid"] = val + + @property + def height(self): + """ + Sets the plot's height (in px). + + The 'height' property is a number and may be specified as: + - An int or float in the interval [10, inf] + + Returns + ------- + int|float + """ + return self["height"] + + @height.setter + def height(self, val): + self["height"] = val + + @property + def hiddenlabels(self): + """ + hiddenlabels is the funnelarea & pie chart analog of + visible:'legendonly' but it can contain many labels, and can + simultaneously hide slices from several pies/funnelarea charts + + The 'hiddenlabels' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["hiddenlabels"] + + @hiddenlabels.setter + def hiddenlabels(self, val): + self["hiddenlabels"] = val + + @property + def hiddenlabelssrc(self): + """ + Sets the source reference on Chart Studio Cloud for + `hiddenlabels`. + + The 'hiddenlabelssrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["hiddenlabelssrc"] + + @hiddenlabelssrc.setter + def hiddenlabelssrc(self, val): + self["hiddenlabelssrc"] = val + + @property + def hidesources(self): + """ + Determines whether or not a text link citing the data source is + placed at the bottom-right cored of the figure. Has only an + effect only on graphs that have been generated via forked + graphs from the Chart Studio Cloud (at https://chart- + studio.plotly.com or on-premise). + + The 'hidesources' property is a boolean and must be specified as: + - A boolean value: True or False + + Returns + ------- + bool + """ + return self["hidesources"] + + @hidesources.setter + def hidesources(self, val): + self["hidesources"] = val + + @property + def hoverdistance(self): + """ + Sets the default distance (in pixels) to look for data to add + hover labels (-1 means no cutoff, 0 means no looking for data). + This is only a real distance for hovering on point-like + objects, like scatter points. For area-like objects (bars, + scatter fills, etc) hovering is on inside the area and off + outside, but these objects will not supersede hover on point- + like objects in case of conflict. + + The 'hoverdistance' property is a integer and may be specified as: + - An int (or float that will be cast to an int) + in the interval [-1, 9223372036854775807] + + Returns + ------- + int + """ + return self["hoverdistance"] + + @hoverdistance.setter + def hoverdistance(self, val): + self["hoverdistance"] = val + + @property + def hoverlabel(self): + """ + The 'hoverlabel' property is an instance of Hoverlabel + that may be specified as: + - An instance of :class:`plotly.graph_objs.layout.Hoverlabel` + - A dict of string/value properties that will be passed + to the Hoverlabel constructor + + Returns + ------- + plotly.graph_objs.layout.Hoverlabel + """ + return self["hoverlabel"] + + @hoverlabel.setter + def hoverlabel(self, val): + self["hoverlabel"] = val + + @property + def hovermode(self): + """ + Determines the mode of hover interactions. If "closest", a + single hoverlabel will appear for the "closest" point within + the `hoverdistance`. If "x" (or "y"), multiple hoverlabels will + appear for multiple points at the "closest" x- (or y-) + coordinate within the `hoverdistance`, with the caveat that no + more than one hoverlabel will appear per trace. If *x unified* + (or *y unified*), a single hoverlabel will appear multiple + points at the closest x- (or y-) coordinate within the + `hoverdistance` with the caveat that no more than one + hoverlabel will appear per trace. In this mode, spikelines are + enabled by default perpendicular to the specified axis. If + false, hover interactions are disabled. + + The 'hovermode' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['x', 'y', 'closest', False, 'x unified', 'y unified'] + + Returns + ------- + Any + """ + return self["hovermode"] + + @hovermode.setter + def hovermode(self, val): + self["hovermode"] = val + + @property + def hoversubplots(self): + """ + Determines expansion of hover effects to other subplots If + "single" just the axis pair of the primary point is included + without overlaying subplots. If "overlaying" all subplots using + the main axis and occupying the same space are included. If + "axis", also include stacked subplots using the same axis when + `hovermode` is set to "x", *x unified*, "y" or *y unified*. + + The 'hoversubplots' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['single', 'overlaying', 'axis'] + + Returns + ------- + Any + """ + return self["hoversubplots"] + + @hoversubplots.setter + def hoversubplots(self, val): + self["hoversubplots"] = val + + @property + def iciclecolorway(self): + """ + Sets the default icicle slice colors. Defaults to the main + `colorway` used for trace colors. If you specify a new list + here it can still be extended with lighter and darker colors, + see `extendiciclecolors`. + + The 'iciclecolorway' property is a colorlist that may be specified + as a tuple, list, one-dimensional numpy array, or pandas Series of valid + color strings + + Returns + ------- + list + """ + return self["iciclecolorway"] + + @iciclecolorway.setter + def iciclecolorway(self, val): + self["iciclecolorway"] = val + + @property + def images(self): + """ + The 'images' property is a tuple of instances of + Image that may be specified as: + - A list or tuple of instances of plotly.graph_objs.layout.Image + - A list or tuple of dicts of string/value properties that + will be passed to the Image constructor + + Returns + ------- + tuple[plotly.graph_objs.layout.Image] + """ + return self["images"] + + @images.setter + def images(self, val): + self["images"] = val + + @property + def imagedefaults(self): + """ + When used in a template (as + layout.template.layout.imagedefaults), sets the default + property values to use for elements of layout.images + + The 'imagedefaults' property is an instance of Image + that may be specified as: + - An instance of :class:`plotly.graph_objs.layout.Image` + - A dict of string/value properties that will be passed + to the Image constructor + + Returns + ------- + plotly.graph_objs.layout.Image + """ + return self["imagedefaults"] + + @imagedefaults.setter + def imagedefaults(self, val): + self["imagedefaults"] = val + + @property + def legend(self): + """ + The 'legend' property is an instance of Legend + that may be specified as: + - An instance of :class:`plotly.graph_objs.layout.Legend` + - A dict of string/value properties that will be passed + to the Legend constructor + + Returns + ------- + plotly.graph_objs.layout.Legend + """ + return self["legend"] + + @legend.setter + def legend(self, val): + self["legend"] = val + + @property + def map(self): + """ + The 'map' property is an instance of Map + that may be specified as: + - An instance of :class:`plotly.graph_objs.layout.Map` + - A dict of string/value properties that will be passed + to the Map constructor + + Returns + ------- + plotly.graph_objs.layout.Map + """ + return self["map"] + + @map.setter + def map(self, val): + self["map"] = val + + @property + def mapbox(self): + """ + The 'mapbox' property is an instance of Mapbox + that may be specified as: + - An instance of :class:`plotly.graph_objs.layout.Mapbox` + - A dict of string/value properties that will be passed + to the Mapbox constructor + + Returns + ------- + plotly.graph_objs.layout.Mapbox + """ + return self["mapbox"] + + @mapbox.setter + def mapbox(self, val): + self["mapbox"] = val + + @property + def margin(self): + """ + The 'margin' property is an instance of Margin + that may be specified as: + - An instance of :class:`plotly.graph_objs.layout.Margin` + - A dict of string/value properties that will be passed + to the Margin constructor + + Returns + ------- + plotly.graph_objs.layout.Margin + """ + return self["margin"] + + @margin.setter + def margin(self, val): + self["margin"] = val + + @property + def meta(self): + """ + Assigns extra meta information that can be used in various + `text` attributes. Attributes such as the graph, axis and + colorbar `title.text`, annotation `text` `trace.name` in legend + items, `rangeselector`, `updatemenus` and `sliders` `label` + text all support `meta`. One can access `meta` fields using + template strings: `%{meta[i]}` where `i` is the index of the + `meta` item in question. `meta` can also be an object for + example `{key: value}` which can be accessed %{meta[key]}. + + The 'meta' property accepts values of any type + + Returns + ------- + Any|numpy.ndarray + """ + return self["meta"] + + @meta.setter + def meta(self, val): + self["meta"] = val + + @property + def metasrc(self): + """ + Sets the source reference on Chart Studio Cloud for `meta`. + + The 'metasrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["metasrc"] + + @metasrc.setter + def metasrc(self, val): + self["metasrc"] = val + + @property + def minreducedheight(self): + """ + Minimum height of the plot with margin.automargin applied (in + px) + + The 'minreducedheight' property is a number and may be specified as: + - An int or float in the interval [2, inf] + + Returns + ------- + int|float + """ + return self["minreducedheight"] + + @minreducedheight.setter + def minreducedheight(self, val): + self["minreducedheight"] = val + + @property + def minreducedwidth(self): + """ + Minimum width of the plot with margin.automargin applied (in + px) + + The 'minreducedwidth' property is a number and may be specified as: + - An int or float in the interval [2, inf] + + Returns + ------- + int|float + """ + return self["minreducedwidth"] + + @minreducedwidth.setter + def minreducedwidth(self, val): + self["minreducedwidth"] = val + + @property + def modebar(self): + """ + The 'modebar' property is an instance of Modebar + that may be specified as: + - An instance of :class:`plotly.graph_objs.layout.Modebar` + - A dict of string/value properties that will be passed + to the Modebar constructor + + Returns + ------- + plotly.graph_objs.layout.Modebar + """ + return self["modebar"] + + @modebar.setter + def modebar(self, val): + self["modebar"] = val + + @property + def newselection(self): + """ + The 'newselection' property is an instance of Newselection + that may be specified as: + - An instance of :class:`plotly.graph_objs.layout.Newselection` + - A dict of string/value properties that will be passed + to the Newselection constructor + + Returns + ------- + plotly.graph_objs.layout.Newselection + """ + return self["newselection"] + + @newselection.setter + def newselection(self, val): + self["newselection"] = val + + @property + def newshape(self): + """ + The 'newshape' property is an instance of Newshape + that may be specified as: + - An instance of :class:`plotly.graph_objs.layout.Newshape` + - A dict of string/value properties that will be passed + to the Newshape constructor + + Returns + ------- + plotly.graph_objs.layout.Newshape + """ + return self["newshape"] + + @newshape.setter + def newshape(self, val): + self["newshape"] = val + + @property + def paper_bgcolor(self): + """ + Sets the background color of the paper where the graph is + drawn. + + The 'paper_bgcolor' property is a color and may be specified as: + - A hex string (e.g. '#ff0000') + - An rgb/rgba string (e.g. 'rgb(255,0,0)') + - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') + - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') + - A named CSS color: see https://plotly.com/python/css-colors/ for a list + + Returns + ------- + str + """ + return self["paper_bgcolor"] + + @paper_bgcolor.setter + def paper_bgcolor(self, val): + self["paper_bgcolor"] = val + + @property + def piecolorway(self): + """ + Sets the default pie slice colors. Defaults to the main + `colorway` used for trace colors. If you specify a new list + here it can still be extended with lighter and darker colors, + see `extendpiecolors`. + + The 'piecolorway' property is a colorlist that may be specified + as a tuple, list, one-dimensional numpy array, or pandas Series of valid + color strings + + Returns + ------- + list + """ + return self["piecolorway"] + + @piecolorway.setter + def piecolorway(self, val): + self["piecolorway"] = val + + @property + def plot_bgcolor(self): + """ + Sets the background color of the plotting area in-between x and + y axes. + + The 'plot_bgcolor' property is a color and may be specified as: + - A hex string (e.g. '#ff0000') + - An rgb/rgba string (e.g. 'rgb(255,0,0)') + - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') + - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') + - A named CSS color: see https://plotly.com/python/css-colors/ for a list + + Returns + ------- + str + """ + return self["plot_bgcolor"] + + @plot_bgcolor.setter + def plot_bgcolor(self, val): + self["plot_bgcolor"] = val + + @property + def polar(self): + """ + The 'polar' property is an instance of Polar + that may be specified as: + - An instance of :class:`plotly.graph_objs.layout.Polar` + - A dict of string/value properties that will be passed + to the Polar constructor + + Returns + ------- + plotly.graph_objs.layout.Polar + """ + return self["polar"] + + @polar.setter + def polar(self, val): + self["polar"] = val + + @property + def scattergap(self): + """ + Sets the gap (in plot fraction) between scatter points of + adjacent location coordinates. Defaults to `bargap`. + + The 'scattergap' property is a number and may be specified as: + - An int or float in the interval [0, 1] + + Returns + ------- + int|float + """ + return self["scattergap"] + + @scattergap.setter + def scattergap(self, val): + self["scattergap"] = val + + @property + def scattermode(self): + """ + Determines how scatter points at the same location coordinate + are displayed on the graph. With "group", the scatter points + are plotted next to one another centered around the shared + location. With "overlay", the scatter points are plotted over + one another, you might need to reduce "opacity" to see multiple + scatter points. + + The 'scattermode' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['group', 'overlay'] + + Returns + ------- + Any + """ + return self["scattermode"] + + @scattermode.setter + def scattermode(self, val): + self["scattermode"] = val + + @property + def scene(self): + """ + The 'scene' property is an instance of Scene + that may be specified as: + - An instance of :class:`plotly.graph_objs.layout.Scene` + - A dict of string/value properties that will be passed + to the Scene constructor + + Returns + ------- + plotly.graph_objs.layout.Scene + """ + return self["scene"] + + @scene.setter + def scene(self, val): + self["scene"] = val + + @property + def selectdirection(self): + """ + When `dragmode` is set to "select", this limits the selection + of the drag to horizontal, vertical or diagonal. "h" only + allows horizontal selection, "v" only vertical, "d" only + diagonal and "any" sets no limit. + + The 'selectdirection' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['h', 'v', 'd', 'any'] + + Returns + ------- + Any + """ + return self["selectdirection"] + + @selectdirection.setter + def selectdirection(self, val): + self["selectdirection"] = val + + @property + def selectionrevision(self): + """ + Controls persistence of user-driven changes in selected points + from all traces. + + The 'selectionrevision' property accepts values of any type + + Returns + ------- + Any + """ + return self["selectionrevision"] + + @selectionrevision.setter + def selectionrevision(self, val): + self["selectionrevision"] = val + + @property + def selections(self): + """ + The 'selections' property is a tuple of instances of + Selection that may be specified as: + - A list or tuple of instances of plotly.graph_objs.layout.Selection + - A list or tuple of dicts of string/value properties that + will be passed to the Selection constructor + + Returns + ------- + tuple[plotly.graph_objs.layout.Selection] + """ + return self["selections"] + + @selections.setter + def selections(self, val): + self["selections"] = val + + @property + def selectiondefaults(self): + """ + When used in a template (as + layout.template.layout.selectiondefaults), sets the default + property values to use for elements of layout.selections + + The 'selectiondefaults' property is an instance of Selection + that may be specified as: + - An instance of :class:`plotly.graph_objs.layout.Selection` + - A dict of string/value properties that will be passed + to the Selection constructor + + Returns + ------- + plotly.graph_objs.layout.Selection + """ + return self["selectiondefaults"] + + @selectiondefaults.setter + def selectiondefaults(self, val): + self["selectiondefaults"] = val + + @property + def separators(self): + """ + Sets the decimal and thousand separators. For example, *. * + puts a '.' before decimals and a space between thousands. In + English locales, dflt is ".," but other locales may alter this + default. + + The 'separators' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["separators"] + + @separators.setter + def separators(self, val): + self["separators"] = val + + @property + def shapes(self): + """ + The 'shapes' property is a tuple of instances of + Shape that may be specified as: + - A list or tuple of instances of plotly.graph_objs.layout.Shape + - A list or tuple of dicts of string/value properties that + will be passed to the Shape constructor + + Returns + ------- + tuple[plotly.graph_objs.layout.Shape] + """ + return self["shapes"] + + @shapes.setter + def shapes(self, val): + self["shapes"] = val + + @property + def shapedefaults(self): + """ + When used in a template (as + layout.template.layout.shapedefaults), sets the default + property values to use for elements of layout.shapes + + The 'shapedefaults' property is an instance of Shape + that may be specified as: + - An instance of :class:`plotly.graph_objs.layout.Shape` + - A dict of string/value properties that will be passed + to the Shape constructor + + Returns + ------- + plotly.graph_objs.layout.Shape + """ + return self["shapedefaults"] + + @shapedefaults.setter + def shapedefaults(self, val): + self["shapedefaults"] = val + + @property + def showlegend(self): + """ + Determines whether or not a legend is drawn. Default is `true` + if there is a trace to show and any of these: a) Two or more + traces would by default be shown in the legend. b) One pie + trace is shown in the legend. c) One trace is explicitly given + with `showlegend: true`. + + The 'showlegend' property is a boolean and must be specified as: + - A boolean value: True or False + + Returns + ------- + bool + """ + return self["showlegend"] + + @showlegend.setter + def showlegend(self, val): + self["showlegend"] = val + + @property + def sliders(self): + """ + The 'sliders' property is a tuple of instances of + Slider that may be specified as: + - A list or tuple of instances of plotly.graph_objs.layout.Slider + - A list or tuple of dicts of string/value properties that + will be passed to the Slider constructor + + Returns + ------- + tuple[plotly.graph_objs.layout.Slider] + """ + return self["sliders"] + + @sliders.setter + def sliders(self, val): + self["sliders"] = val + + @property + def sliderdefaults(self): + """ + When used in a template (as + layout.template.layout.sliderdefaults), sets the default + property values to use for elements of layout.sliders + + The 'sliderdefaults' property is an instance of Slider + that may be specified as: + - An instance of :class:`plotly.graph_objs.layout.Slider` + - A dict of string/value properties that will be passed + to the Slider constructor + + Returns + ------- + plotly.graph_objs.layout.Slider + """ + return self["sliderdefaults"] + + @sliderdefaults.setter + def sliderdefaults(self, val): + self["sliderdefaults"] = val + + @property + def smith(self): + """ + The 'smith' property is an instance of Smith + that may be specified as: + - An instance of :class:`plotly.graph_objs.layout.Smith` + - A dict of string/value properties that will be passed + to the Smith constructor + + Returns + ------- + plotly.graph_objs.layout.Smith + """ + return self["smith"] + + @smith.setter + def smith(self, val): + self["smith"] = val + + @property + def spikedistance(self): + """ + Sets the default distance (in pixels) to look for data to draw + spikelines to (-1 means no cutoff, 0 means no looking for + data). As with hoverdistance, distance does not apply to area- + like objects. In addition, some objects can be hovered on but + will not generate spikelines, such as scatter fills. + + The 'spikedistance' property is a integer and may be specified as: + - An int (or float that will be cast to an int) + in the interval [-1, 9223372036854775807] + + Returns + ------- + int + """ + return self["spikedistance"] + + @spikedistance.setter + def spikedistance(self, val): + self["spikedistance"] = val + + @property + def sunburstcolorway(self): + """ + Sets the default sunburst slice colors. Defaults to the main + `colorway` used for trace colors. If you specify a new list + here it can still be extended with lighter and darker colors, + see `extendsunburstcolors`. + + The 'sunburstcolorway' property is a colorlist that may be specified + as a tuple, list, one-dimensional numpy array, or pandas Series of valid + color strings + + Returns + ------- + list + """ + return self["sunburstcolorway"] + + @sunburstcolorway.setter + def sunburstcolorway(self, val): + self["sunburstcolorway"] = val + + @property + def template(self): + """ + Default attributes to be applied to the plot. This should be a + dict with format: `{'layout': layoutTemplate, 'data': + {trace_type: [traceTemplate, ...], ...}}` where + `layoutTemplate` is a dict matching the structure of + `figure.layout` and `traceTemplate` is a dict matching the + structure of the trace with type `trace_type` (e.g. 'scatter'). + Alternatively, this may be specified as an instance of + plotly.graph_objs.layout.Template. Trace templates are applied + cyclically to traces of each type. Container arrays (eg + `annotations`) have special handling: An object ending in + `defaults` (eg `annotationdefaults`) is applied to each array + item. But if an item has a `templateitemname` key we look in + the template array for an item with matching `name` and apply + that instead. If no matching `name` is found we mark the item + invisible. Any named template item not referenced is appended + to the end of the array, so this can be used to add a watermark + annotation or a logo image, for example. To omit one of these + items on the plot, make an item with matching + `templateitemname` and `visible: false`. + + The 'template' property is an instance of Template + that may be specified as: + - An instance of :class:`plotly.graph_objs.layout.Template` + - A dict of string/value properties that will be passed + to the Template constructor + - The name of a registered template where current registered templates + are stored in the plotly.io.templates configuration object. The names + of all registered templates can be retrieved with: + >>> import plotly.io as pio + >>> list(pio.templates) # doctest: +ELLIPSIS + ['ggplot2', 'seaborn', 'simple_white', 'plotly', 'plotly_white', ...] + + - A string containing multiple registered template names, joined on '+' + characters (e.g. 'template1+template2'). In this case the resulting + template is computed by merging together the collection of registered + templates + + Returns + ------- + plotly.graph_objs.layout.Template + """ + return self["template"] + + @template.setter + def template(self, val): + self["template"] = val + + @property + def ternary(self): + """ + The 'ternary' property is an instance of Ternary + that may be specified as: + - An instance of :class:`plotly.graph_objs.layout.Ternary` + - A dict of string/value properties that will be passed + to the Ternary constructor + + Returns + ------- + plotly.graph_objs.layout.Ternary + """ + return self["ternary"] + + @ternary.setter + def ternary(self, val): + self["ternary"] = val + + @property + def title(self): + """ + The 'title' property is an instance of Title + that may be specified as: + - An instance of :class:`plotly.graph_objs.layout.Title` + - A dict of string/value properties that will be passed + to the Title constructor + + Returns + ------- + plotly.graph_objs.layout.Title + """ + return self["title"] + + @title.setter + def title(self, val): + self["title"] = val + + @property + def transition(self): + """ + Sets transition options used during Plotly.react updates. + + The 'transition' property is an instance of Transition + that may be specified as: + - An instance of :class:`plotly.graph_objs.layout.Transition` + - A dict of string/value properties that will be passed + to the Transition constructor + + Returns + ------- + plotly.graph_objs.layout.Transition + """ + return self["transition"] + + @transition.setter + def transition(self, val): + self["transition"] = val + + @property + def treemapcolorway(self): + """ + Sets the default treemap slice colors. Defaults to the main + `colorway` used for trace colors. If you specify a new list + here it can still be extended with lighter and darker colors, + see `extendtreemapcolors`. + + The 'treemapcolorway' property is a colorlist that may be specified + as a tuple, list, one-dimensional numpy array, or pandas Series of valid + color strings + + Returns + ------- + list + """ + return self["treemapcolorway"] + + @treemapcolorway.setter + def treemapcolorway(self, val): + self["treemapcolorway"] = val + + @property + def uirevision(self): + """ + Used to allow user interactions with the plot to persist after + `Plotly.react` calls that are unaware of these interactions. If + `uirevision` is omitted, or if it is given and it changed from + the previous `Plotly.react` call, the exact new figure is used. + If `uirevision` is truthy and did NOT change, any attribute + that has been affected by user interactions and did not receive + a different value in the new figure will keep the interaction + value. `layout.uirevision` attribute serves as the default for + `uirevision` attributes in various sub-containers. For finer + control you can set these sub-attributes directly. For example, + if your app separately controls the data on the x and y axes + you might set `xaxis.uirevision=*time*` and + `yaxis.uirevision=*cost*`. Then if only the y data is changed, + you can update `yaxis.uirevision=*quantity*` and the y axis + range will reset but the x axis range will retain any user- + driven zoom. + + The 'uirevision' property accepts values of any type + + Returns + ------- + Any + """ + return self["uirevision"] + + @uirevision.setter + def uirevision(self, val): + self["uirevision"] = val + + @property + def uniformtext(self): + """ + The 'uniformtext' property is an instance of Uniformtext + that may be specified as: + - An instance of :class:`plotly.graph_objs.layout.Uniformtext` + - A dict of string/value properties that will be passed + to the Uniformtext constructor + + Returns + ------- + plotly.graph_objs.layout.Uniformtext + """ + return self["uniformtext"] + + @uniformtext.setter + def uniformtext(self, val): + self["uniformtext"] = val + + @property + def updatemenus(self): + """ + The 'updatemenus' property is a tuple of instances of + Updatemenu that may be specified as: + - A list or tuple of instances of plotly.graph_objs.layout.Updatemenu + - A list or tuple of dicts of string/value properties that + will be passed to the Updatemenu constructor + + Returns + ------- + tuple[plotly.graph_objs.layout.Updatemenu] + """ + return self["updatemenus"] + + @updatemenus.setter + def updatemenus(self, val): + self["updatemenus"] = val + + @property + def updatemenudefaults(self): + """ + When used in a template (as + layout.template.layout.updatemenudefaults), sets the default + property values to use for elements of layout.updatemenus + + The 'updatemenudefaults' property is an instance of Updatemenu + that may be specified as: + - An instance of :class:`plotly.graph_objs.layout.Updatemenu` + - A dict of string/value properties that will be passed + to the Updatemenu constructor + + Returns + ------- + plotly.graph_objs.layout.Updatemenu + """ + return self["updatemenudefaults"] + + @updatemenudefaults.setter + def updatemenudefaults(self, val): + self["updatemenudefaults"] = val + + @property + def violingap(self): + """ + Sets the gap (in plot fraction) between violins of adjacent + location coordinates. Has no effect on traces that have "width" + set. + + The 'violingap' property is a number and may be specified as: + - An int or float in the interval [0, 1] + + Returns + ------- + int|float + """ + return self["violingap"] + + @violingap.setter + def violingap(self, val): + self["violingap"] = val + + @property + def violingroupgap(self): + """ + Sets the gap (in plot fraction) between violins of the same + location coordinate. Has no effect on traces that have "width" + set. + + The 'violingroupgap' property is a number and may be specified as: + - An int or float in the interval [0, 1] + + Returns + ------- + int|float + """ + return self["violingroupgap"] + + @violingroupgap.setter + def violingroupgap(self, val): + self["violingroupgap"] = val + + @property + def violinmode(self): + """ + Determines how violins at the same location coordinate are + displayed on the graph. If "group", the violins are plotted + next to one another centered around the shared location. If + "overlay", the violins are plotted over one another, you might + need to set "opacity" to see them multiple violins. Has no + effect on traces that have "width" set. + + The 'violinmode' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['group', 'overlay'] + + Returns + ------- + Any + """ + return self["violinmode"] + + @violinmode.setter + def violinmode(self, val): + self["violinmode"] = val + + @property + def waterfallgap(self): + """ + Sets the gap (in plot fraction) between bars of adjacent + location coordinates. + + The 'waterfallgap' property is a number and may be specified as: + - An int or float in the interval [0, 1] + + Returns + ------- + int|float + """ + return self["waterfallgap"] + + @waterfallgap.setter + def waterfallgap(self, val): + self["waterfallgap"] = val + + @property + def waterfallgroupgap(self): + """ + Sets the gap (in plot fraction) between bars of the same + location coordinate. + + The 'waterfallgroupgap' property is a number and may be specified as: + - An int or float in the interval [0, 1] + + Returns + ------- + int|float + """ + return self["waterfallgroupgap"] + + @waterfallgroupgap.setter + def waterfallgroupgap(self, val): + self["waterfallgroupgap"] = val + + @property + def waterfallmode(self): + """ + Determines how bars at the same location coordinate are + displayed on the graph. With "group", the bars are plotted next + to one another centered around the shared location. With + "overlay", the bars are plotted over one another, you might + need to reduce "opacity" to see multiple bars. + + The 'waterfallmode' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['group', 'overlay'] + + Returns + ------- + Any + """ + return self["waterfallmode"] + + @waterfallmode.setter + def waterfallmode(self, val): + self["waterfallmode"] = val + + @property + def width(self): + """ + Sets the plot's width (in px). + + The 'width' property is a number and may be specified as: + - An int or float in the interval [10, inf] + + Returns + ------- + int|float + """ + return self["width"] + + @width.setter + def width(self, val): + self["width"] = val + + @property + def xaxis(self): + """ + The 'xaxis' property is an instance of XAxis + that may be specified as: + - An instance of :class:`plotly.graph_objs.layout.XAxis` + - A dict of string/value properties that will be passed + to the XAxis constructor + + Returns + ------- + plotly.graph_objs.layout.XAxis + """ + return self["xaxis"] + + @xaxis.setter + def xaxis(self, val): + self["xaxis"] = val + + @property + def yaxis(self): + """ + The 'yaxis' property is an instance of YAxis + that may be specified as: + - An instance of :class:`plotly.graph_objs.layout.YAxis` + - A dict of string/value properties that will be passed + to the YAxis constructor + + Returns + ------- + plotly.graph_objs.layout.YAxis + """ + return self["yaxis"] + + @yaxis.setter + def yaxis(self, val): + self["yaxis"] = val + + @property + def _prop_descriptions(self): + return """\ + activeselection + :class:`plotly.graph_objects.layout.Activeselection` + instance or dict with compatible properties + activeshape + :class:`plotly.graph_objects.layout.Activeshape` + instance or dict with compatible properties + annotations + A tuple of + :class:`plotly.graph_objects.layout.Annotation` + instances or dicts with compatible properties + annotationdefaults + When used in a template (as + layout.template.layout.annotationdefaults), sets the + default property values to use for elements of + layout.annotations + autosize + Determines whether or not a layout width or height that + has been left undefined by the user is initialized on + each relayout. Note that, regardless of this attribute, + an undefined layout width or height is always + initialized on the first call to plot. + autotypenumbers + Using "strict" a numeric string in trace data is not + converted to a number. Using *convert types* a numeric + string in trace data may be treated as a number during + automatic axis `type` detection. This is the default + value; however it could be overridden for individual + axes. + barcornerradius + Sets the rounding of bar corners. May be an integer + number of pixels, or a percentage of bar width (as a + string ending in %). + bargap + Sets the gap (in plot fraction) between bars of + adjacent location coordinates. + bargroupgap + Sets the gap (in plot fraction) between bars of the + same location coordinate. + barmode + Determines how bars at the same location coordinate are + displayed on the graph. With "stack", the bars are + stacked on top of one another With "relative", the bars + are stacked on top of one another, with negative values + below the axis, positive values above With "group", the + bars are plotted next to one another centered around + the shared location. With "overlay", the bars are + plotted over one another, you might need to reduce + "opacity" to see multiple bars. + barnorm + Sets the normalization for bar traces on the graph. + With "fraction", the value of each bar is divided by + the sum of all values at that location coordinate. + "percent" is the same but multiplied by 100 to show + percentages. + boxgap + Sets the gap (in plot fraction) between boxes of + adjacent location coordinates. Has no effect on traces + that have "width" set. + boxgroupgap + Sets the gap (in plot fraction) between boxes of the + same location coordinate. Has no effect on traces that + have "width" set. + boxmode + Determines how boxes at the same location coordinate + are displayed on the graph. If "group", the boxes are + plotted next to one another centered around the shared + location. If "overlay", the boxes are plotted over one + another, you might need to set "opacity" to see them + multiple boxes. Has no effect on traces that have + "width" set. + calendar + Sets the default calendar system to use for + interpreting and displaying dates throughout the plot. + clickmode + Determines the mode of single click interactions. + "event" is the default value and emits the + `plotly_click` event. In addition this mode emits the + `plotly_selected` event in drag modes "lasso" and + "select", but with no event data attached (kept for + compatibility reasons). The "select" flag enables + selecting single data points via click. This mode also + supports persistent selections, meaning that pressing + Shift while clicking, adds to / subtracts from an + existing selection. "select" with `hovermode`: "x" can + be confusing, consider explicitly setting `hovermode`: + "closest" when using this feature. Selection events are + sent accordingly as long as "event" flag is set as + well. When the "event" flag is missing, `plotly_click` + and `plotly_selected` events are not fired. + coloraxis + :class:`plotly.graph_objects.layout.Coloraxis` instance + or dict with compatible properties + colorscale + :class:`plotly.graph_objects.layout.Colorscale` + instance or dict with compatible properties + colorway + Sets the default trace colors. + computed + Placeholder for exporting automargin-impacting values + namely `margin.t`, `margin.b`, `margin.l` and + `margin.r` in "full-json" mode. + datarevision + If provided, a changed value tells `Plotly.react` that + one or more data arrays has changed. This way you can + modify arrays in-place rather than making a complete + new copy for an incremental change. If NOT provided, + `Plotly.react` assumes that data arrays are being + treated as immutable, thus any data array with a + different identity from its predecessor contains new + data. + dragmode + Determines the mode of drag interactions. "select" and + "lasso" apply only to scatter traces with markers or + text. "orbit" and "turntable" apply only to 3D scenes. + editrevision + Controls persistence of user-driven changes in + `editable: true` configuration, other than trace names + and axis titles. Defaults to `layout.uirevision`. + extendfunnelareacolors + If `true`, the funnelarea slice colors (whether given + by `funnelareacolorway` or inherited from `colorway`) + will be extended to three times its original length by + first repeating every color 20% lighter then each color + 20% darker. This is intended to reduce the likelihood + of reusing the same color when you have many slices, + but you can set `false` to disable. Colors provided in + the trace, using `marker.colors`, are never extended. + extendiciclecolors + If `true`, the icicle slice colors (whether given by + `iciclecolorway` or inherited from `colorway`) will be + extended to three times its original length by first + repeating every color 20% lighter then each color 20% + darker. This is intended to reduce the likelihood of + reusing the same color when you have many slices, but + you can set `false` to disable. Colors provided in the + trace, using `marker.colors`, are never extended. + extendpiecolors + If `true`, the pie slice colors (whether given by + `piecolorway` or inherited from `colorway`) will be + extended to three times its original length by first + repeating every color 20% lighter then each color 20% + darker. This is intended to reduce the likelihood of + reusing the same color when you have many slices, but + you can set `false` to disable. Colors provided in the + trace, using `marker.colors`, are never extended. + extendsunburstcolors + If `true`, the sunburst slice colors (whether given by + `sunburstcolorway` or inherited from `colorway`) will + be extended to three times its original length by first + repeating every color 20% lighter then each color 20% + darker. This is intended to reduce the likelihood of + reusing the same color when you have many slices, but + you can set `false` to disable. Colors provided in the + trace, using `marker.colors`, are never extended. + extendtreemapcolors + If `true`, the treemap slice colors (whether given by + `treemapcolorway` or inherited from `colorway`) will be + extended to three times its original length by first + repeating every color 20% lighter then each color 20% + darker. This is intended to reduce the likelihood of + reusing the same color when you have many slices, but + you can set `false` to disable. Colors provided in the + trace, using `marker.colors`, are never extended. + font + Sets the global font. Note that fonts used in traces + and other layout components inherit from the global + font. + funnelareacolorway + Sets the default funnelarea slice colors. Defaults to + the main `colorway` used for trace colors. If you + specify a new list here it can still be extended with + lighter and darker colors, see + `extendfunnelareacolors`. + funnelgap + Sets the gap (in plot fraction) between bars of + adjacent location coordinates. + funnelgroupgap + Sets the gap (in plot fraction) between bars of the + same location coordinate. + funnelmode + Determines how bars at the same location coordinate are + displayed on the graph. With "stack", the bars are + stacked on top of one another With "group", the bars + are plotted next to one another centered around the + shared location. With "overlay", the bars are plotted + over one another, you might need to reduce "opacity" to + see multiple bars. + geo + :class:`plotly.graph_objects.layout.Geo` instance or + dict with compatible properties + grid + :class:`plotly.graph_objects.layout.Grid` instance or + dict with compatible properties + height + Sets the plot's height (in px). + hiddenlabels + hiddenlabels is the funnelarea & pie chart analog of + visible:'legendonly' but it can contain many labels, + and can simultaneously hide slices from several + pies/funnelarea charts + hiddenlabelssrc + Sets the source reference on Chart Studio Cloud for + `hiddenlabels`. + hidesources + Determines whether or not a text link citing the data + source is placed at the bottom-right cored of the + figure. Has only an effect only on graphs that have + been generated via forked graphs from the Chart Studio + Cloud (at https://chart-studio.plotly.com or on- + premise). + hoverdistance + Sets the default distance (in pixels) to look for data + to add hover labels (-1 means no cutoff, 0 means no + looking for data). This is only a real distance for + hovering on point-like objects, like scatter points. + For area-like objects (bars, scatter fills, etc) + hovering is on inside the area and off outside, but + these objects will not supersede hover on point-like + objects in case of conflict. + hoverlabel + :class:`plotly.graph_objects.layout.Hoverlabel` + instance or dict with compatible properties + hovermode + Determines the mode of hover interactions. If + "closest", a single hoverlabel will appear for the + "closest" point within the `hoverdistance`. If "x" (or + "y"), multiple hoverlabels will appear for multiple + points at the "closest" x- (or y-) coordinate within + the `hoverdistance`, with the caveat that no more than + one hoverlabel will appear per trace. If *x unified* + (or *y unified*), a single hoverlabel will appear + multiple points at the closest x- (or y-) coordinate + within the `hoverdistance` with the caveat that no more + than one hoverlabel will appear per trace. In this + mode, spikelines are enabled by default perpendicular + to the specified axis. If false, hover interactions are + disabled. + hoversubplots + Determines expansion of hover effects to other subplots + If "single" just the axis pair of the primary point is + included without overlaying subplots. If "overlaying" + all subplots using the main axis and occupying the same + space are included. If "axis", also include stacked + subplots using the same axis when `hovermode` is set to + "x", *x unified*, "y" or *y unified*. + iciclecolorway + Sets the default icicle slice colors. Defaults to the + main `colorway` used for trace colors. If you specify a + new list here it can still be extended with lighter and + darker colors, see `extendiciclecolors`. + images + A tuple of :class:`plotly.graph_objects.layout.Image` + instances or dicts with compatible properties + imagedefaults + When used in a template (as + layout.template.layout.imagedefaults), sets the default + property values to use for elements of layout.images + legend + :class:`plotly.graph_objects.layout.Legend` instance or + dict with compatible properties + map + :class:`plotly.graph_objects.layout.Map` instance or + dict with compatible properties + mapbox + :class:`plotly.graph_objects.layout.Mapbox` instance or + dict with compatible properties + margin + :class:`plotly.graph_objects.layout.Margin` instance or + dict with compatible properties + meta + Assigns extra meta information that can be used in + various `text` attributes. Attributes such as the + graph, axis and colorbar `title.text`, annotation + `text` `trace.name` in legend items, `rangeselector`, + `updatemenus` and `sliders` `label` text all support + `meta`. One can access `meta` fields using template + strings: `%{meta[i]}` where `i` is the index of the + `meta` item in question. `meta` can also be an object + for example `{key: value}` which can be accessed + %{meta[key]}. + metasrc + Sets the source reference on Chart Studio Cloud for + `meta`. + minreducedheight + Minimum height of the plot with margin.automargin + applied (in px) + minreducedwidth + Minimum width of the plot with margin.automargin + applied (in px) + modebar + :class:`plotly.graph_objects.layout.Modebar` instance + or dict with compatible properties + newselection + :class:`plotly.graph_objects.layout.Newselection` + instance or dict with compatible properties + newshape + :class:`plotly.graph_objects.layout.Newshape` instance + or dict with compatible properties + paper_bgcolor + Sets the background color of the paper where the graph + is drawn. + piecolorway + Sets the default pie slice colors. Defaults to the main + `colorway` used for trace colors. If you specify a new + list here it can still be extended with lighter and + darker colors, see `extendpiecolors`. + plot_bgcolor + Sets the background color of the plotting area in- + between x and y axes. + polar + :class:`plotly.graph_objects.layout.Polar` instance or + dict with compatible properties + scattergap + Sets the gap (in plot fraction) between scatter points + of adjacent location coordinates. Defaults to `bargap`. + scattermode + Determines how scatter points at the same location + coordinate are displayed on the graph. With "group", + the scatter points are plotted next to one another + centered around the shared location. With "overlay", + the scatter points are plotted over one another, you + might need to reduce "opacity" to see multiple scatter + points. + scene + :class:`plotly.graph_objects.layout.Scene` instance or + dict with compatible properties + selectdirection + When `dragmode` is set to "select", this limits the + selection of the drag to horizontal, vertical or + diagonal. "h" only allows horizontal selection, "v" + only vertical, "d" only diagonal and "any" sets no + limit. + selectionrevision + Controls persistence of user-driven changes in selected + points from all traces. + selections + A tuple of + :class:`plotly.graph_objects.layout.Selection` + instances or dicts with compatible properties + selectiondefaults + When used in a template (as + layout.template.layout.selectiondefaults), sets the + default property values to use for elements of + layout.selections + separators + Sets the decimal and thousand separators. For example, + *. * puts a '.' before decimals and a space between + thousands. In English locales, dflt is ".," but other + locales may alter this default. + shapes + A tuple of :class:`plotly.graph_objects.layout.Shape` + instances or dicts with compatible properties + shapedefaults + When used in a template (as + layout.template.layout.shapedefaults), sets the default + property values to use for elements of layout.shapes + showlegend + Determines whether or not a legend is drawn. Default is + `true` if there is a trace to show and any of these: a) + Two or more traces would by default be shown in the + legend. b) One pie trace is shown in the legend. c) One + trace is explicitly given with `showlegend: true`. + sliders + A tuple of :class:`plotly.graph_objects.layout.Slider` + instances or dicts with compatible properties + sliderdefaults + When used in a template (as + layout.template.layout.sliderdefaults), sets the + default property values to use for elements of + layout.sliders + smith + :class:`plotly.graph_objects.layout.Smith` instance or + dict with compatible properties + spikedistance + Sets the default distance (in pixels) to look for data + to draw spikelines to (-1 means no cutoff, 0 means no + looking for data). As with hoverdistance, distance does + not apply to area-like objects. In addition, some + objects can be hovered on but will not generate + spikelines, such as scatter fills. + sunburstcolorway + Sets the default sunburst slice colors. Defaults to the + main `colorway` used for trace colors. If you specify a + new list here it can still be extended with lighter and + darker colors, see `extendsunburstcolors`. + template + Default attributes to be applied to the plot. This + should be a dict with format: `{'layout': + layoutTemplate, 'data': {trace_type: [traceTemplate, + ...], ...}}` where `layoutTemplate` is a dict matching + the structure of `figure.layout` and `traceTemplate` is + a dict matching the structure of the trace with type + `trace_type` (e.g. 'scatter'). Alternatively, this may + be specified as an instance of + plotly.graph_objs.layout.Template. Trace templates are + applied cyclically to traces of each type. Container + arrays (eg `annotations`) have special handling: An + object ending in `defaults` (eg `annotationdefaults`) + is applied to each array item. But if an item has a + `templateitemname` key we look in the template array + for an item with matching `name` and apply that + instead. If no matching `name` is found we mark the + item invisible. Any named template item not referenced + is appended to the end of the array, so this can be + used to add a watermark annotation or a logo image, for + example. To omit one of these items on the plot, make + an item with matching `templateitemname` and `visible: + false`. + ternary + :class:`plotly.graph_objects.layout.Ternary` instance + or dict with compatible properties + title + :class:`plotly.graph_objects.layout.Title` instance or + dict with compatible properties + transition + Sets transition options used during Plotly.react + updates. + treemapcolorway + Sets the default treemap slice colors. Defaults to the + main `colorway` used for trace colors. If you specify a + new list here it can still be extended with lighter and + darker colors, see `extendtreemapcolors`. + uirevision + Used to allow user interactions with the plot to + persist after `Plotly.react` calls that are unaware of + these interactions. If `uirevision` is omitted, or if + it is given and it changed from the previous + `Plotly.react` call, the exact new figure is used. If + `uirevision` is truthy and did NOT change, any + attribute that has been affected by user interactions + and did not receive a different value in the new figure + will keep the interaction value. `layout.uirevision` + attribute serves as the default for `uirevision` + attributes in various sub-containers. For finer control + you can set these sub-attributes directly. For example, + if your app separately controls the data on the x and y + axes you might set `xaxis.uirevision=*time*` and + `yaxis.uirevision=*cost*`. Then if only the y data is + changed, you can update `yaxis.uirevision=*quantity*` + and the y axis range will reset but the x axis range + will retain any user-driven zoom. + uniformtext + :class:`plotly.graph_objects.layout.Uniformtext` + instance or dict with compatible properties + updatemenus + A tuple of + :class:`plotly.graph_objects.layout.Updatemenu` + instances or dicts with compatible properties + updatemenudefaults + When used in a template (as + layout.template.layout.updatemenudefaults), sets the + default property values to use for elements of + layout.updatemenus + violingap + Sets the gap (in plot fraction) between violins of + adjacent location coordinates. Has no effect on traces + that have "width" set. + violingroupgap + Sets the gap (in plot fraction) between violins of the + same location coordinate. Has no effect on traces that + have "width" set. + violinmode + Determines how violins at the same location coordinate + are displayed on the graph. If "group", the violins are + plotted next to one another centered around the shared + location. If "overlay", the violins are plotted over + one another, you might need to set "opacity" to see + them multiple violins. Has no effect on traces that + have "width" set. + waterfallgap + Sets the gap (in plot fraction) between bars of + adjacent location coordinates. + waterfallgroupgap + Sets the gap (in plot fraction) between bars of the + same location coordinate. + waterfallmode + Determines how bars at the same location coordinate are + displayed on the graph. With "group", the bars are + plotted next to one another centered around the shared + location. With "overlay", the bars are plotted over one + another, you might need to reduce "opacity" to see + multiple bars. + width + Sets the plot's width (in px). + xaxis + :class:`plotly.graph_objects.layout.XAxis` instance or + dict with compatible properties + yaxis + :class:`plotly.graph_objects.layout.YAxis` instance or + dict with compatible properties + """ + + def __init__( + self, + arg=None, + activeselection=None, + activeshape=None, + annotations=None, + annotationdefaults=None, + autosize=None, + autotypenumbers=None, + barcornerradius=None, + bargap=None, + bargroupgap=None, + barmode=None, + barnorm=None, + boxgap=None, + boxgroupgap=None, + boxmode=None, + calendar=None, + clickmode=None, + coloraxis=None, + colorscale=None, + colorway=None, + computed=None, + datarevision=None, + dragmode=None, + editrevision=None, + extendfunnelareacolors=None, + extendiciclecolors=None, + extendpiecolors=None, + extendsunburstcolors=None, + extendtreemapcolors=None, + font=None, + funnelareacolorway=None, + funnelgap=None, + funnelgroupgap=None, + funnelmode=None, + geo=None, + grid=None, + height=None, + hiddenlabels=None, + hiddenlabelssrc=None, + hidesources=None, + hoverdistance=None, + hoverlabel=None, + hovermode=None, + hoversubplots=None, + iciclecolorway=None, + images=None, + imagedefaults=None, + legend=None, + map=None, + mapbox=None, + margin=None, + meta=None, + metasrc=None, + minreducedheight=None, + minreducedwidth=None, + modebar=None, + newselection=None, + newshape=None, + paper_bgcolor=None, + piecolorway=None, + plot_bgcolor=None, + polar=None, + scattergap=None, + scattermode=None, + scene=None, + selectdirection=None, + selectionrevision=None, + selections=None, + selectiondefaults=None, + separators=None, + shapes=None, + shapedefaults=None, + showlegend=None, + sliders=None, + sliderdefaults=None, + smith=None, + spikedistance=None, + sunburstcolorway=None, + template=None, + ternary=None, + title=None, + transition=None, + treemapcolorway=None, + uirevision=None, + uniformtext=None, + updatemenus=None, + updatemenudefaults=None, + violingap=None, + violingroupgap=None, + violinmode=None, + waterfallgap=None, + waterfallgroupgap=None, + waterfallmode=None, + width=None, + xaxis=None, + yaxis=None, + **kwargs, + ): + """ + Construct a new Layout object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of :class:`plotly.graph_objs.Layout` + activeselection + :class:`plotly.graph_objects.layout.Activeselection` + instance or dict with compatible properties + activeshape + :class:`plotly.graph_objects.layout.Activeshape` + instance or dict with compatible properties + annotations + A tuple of + :class:`plotly.graph_objects.layout.Annotation` + instances or dicts with compatible properties + annotationdefaults + When used in a template (as + layout.template.layout.annotationdefaults), sets the + default property values to use for elements of + layout.annotations + autosize + Determines whether or not a layout width or height that + has been left undefined by the user is initialized on + each relayout. Note that, regardless of this attribute, + an undefined layout width or height is always + initialized on the first call to plot. + autotypenumbers + Using "strict" a numeric string in trace data is not + converted to a number. Using *convert types* a numeric + string in trace data may be treated as a number during + automatic axis `type` detection. This is the default + value; however it could be overridden for individual + axes. + barcornerradius + Sets the rounding of bar corners. May be an integer + number of pixels, or a percentage of bar width (as a + string ending in %). + bargap + Sets the gap (in plot fraction) between bars of + adjacent location coordinates. + bargroupgap + Sets the gap (in plot fraction) between bars of the + same location coordinate. + barmode + Determines how bars at the same location coordinate are + displayed on the graph. With "stack", the bars are + stacked on top of one another With "relative", the bars + are stacked on top of one another, with negative values + below the axis, positive values above With "group", the + bars are plotted next to one another centered around + the shared location. With "overlay", the bars are + plotted over one another, you might need to reduce + "opacity" to see multiple bars. + barnorm + Sets the normalization for bar traces on the graph. + With "fraction", the value of each bar is divided by + the sum of all values at that location coordinate. + "percent" is the same but multiplied by 100 to show + percentages. + boxgap + Sets the gap (in plot fraction) between boxes of + adjacent location coordinates. Has no effect on traces + that have "width" set. + boxgroupgap + Sets the gap (in plot fraction) between boxes of the + same location coordinate. Has no effect on traces that + have "width" set. + boxmode + Determines how boxes at the same location coordinate + are displayed on the graph. If "group", the boxes are + plotted next to one another centered around the shared + location. If "overlay", the boxes are plotted over one + another, you might need to set "opacity" to see them + multiple boxes. Has no effect on traces that have + "width" set. + calendar + Sets the default calendar system to use for + interpreting and displaying dates throughout the plot. + clickmode + Determines the mode of single click interactions. + "event" is the default value and emits the + `plotly_click` event. In addition this mode emits the + `plotly_selected` event in drag modes "lasso" and + "select", but with no event data attached (kept for + compatibility reasons). The "select" flag enables + selecting single data points via click. This mode also + supports persistent selections, meaning that pressing + Shift while clicking, adds to / subtracts from an + existing selection. "select" with `hovermode`: "x" can + be confusing, consider explicitly setting `hovermode`: + "closest" when using this feature. Selection events are + sent accordingly as long as "event" flag is set as + well. When the "event" flag is missing, `plotly_click` + and `plotly_selected` events are not fired. + coloraxis + :class:`plotly.graph_objects.layout.Coloraxis` instance + or dict with compatible properties + colorscale + :class:`plotly.graph_objects.layout.Colorscale` + instance or dict with compatible properties + colorway + Sets the default trace colors. + computed + Placeholder for exporting automargin-impacting values + namely `margin.t`, `margin.b`, `margin.l` and + `margin.r` in "full-json" mode. + datarevision + If provided, a changed value tells `Plotly.react` that + one or more data arrays has changed. This way you can + modify arrays in-place rather than making a complete + new copy for an incremental change. If NOT provided, + `Plotly.react` assumes that data arrays are being + treated as immutable, thus any data array with a + different identity from its predecessor contains new + data. + dragmode + Determines the mode of drag interactions. "select" and + "lasso" apply only to scatter traces with markers or + text. "orbit" and "turntable" apply only to 3D scenes. + editrevision + Controls persistence of user-driven changes in + `editable: true` configuration, other than trace names + and axis titles. Defaults to `layout.uirevision`. + extendfunnelareacolors + If `true`, the funnelarea slice colors (whether given + by `funnelareacolorway` or inherited from `colorway`) + will be extended to three times its original length by + first repeating every color 20% lighter then each color + 20% darker. This is intended to reduce the likelihood + of reusing the same color when you have many slices, + but you can set `false` to disable. Colors provided in + the trace, using `marker.colors`, are never extended. + extendiciclecolors + If `true`, the icicle slice colors (whether given by + `iciclecolorway` or inherited from `colorway`) will be + extended to three times its original length by first + repeating every color 20% lighter then each color 20% + darker. This is intended to reduce the likelihood of + reusing the same color when you have many slices, but + you can set `false` to disable. Colors provided in the + trace, using `marker.colors`, are never extended. + extendpiecolors + If `true`, the pie slice colors (whether given by + `piecolorway` or inherited from `colorway`) will be + extended to three times its original length by first + repeating every color 20% lighter then each color 20% + darker. This is intended to reduce the likelihood of + reusing the same color when you have many slices, but + you can set `false` to disable. Colors provided in the + trace, using `marker.colors`, are never extended. + extendsunburstcolors + If `true`, the sunburst slice colors (whether given by + `sunburstcolorway` or inherited from `colorway`) will + be extended to three times its original length by first + repeating every color 20% lighter then each color 20% + darker. This is intended to reduce the likelihood of + reusing the same color when you have many slices, but + you can set `false` to disable. Colors provided in the + trace, using `marker.colors`, are never extended. + extendtreemapcolors + If `true`, the treemap slice colors (whether given by + `treemapcolorway` or inherited from `colorway`) will be + extended to three times its original length by first + repeating every color 20% lighter then each color 20% + darker. This is intended to reduce the likelihood of + reusing the same color when you have many slices, but + you can set `false` to disable. Colors provided in the + trace, using `marker.colors`, are never extended. + font + Sets the global font. Note that fonts used in traces + and other layout components inherit from the global + font. + funnelareacolorway + Sets the default funnelarea slice colors. Defaults to + the main `colorway` used for trace colors. If you + specify a new list here it can still be extended with + lighter and darker colors, see + `extendfunnelareacolors`. + funnelgap + Sets the gap (in plot fraction) between bars of + adjacent location coordinates. + funnelgroupgap + Sets the gap (in plot fraction) between bars of the + same location coordinate. + funnelmode + Determines how bars at the same location coordinate are + displayed on the graph. With "stack", the bars are + stacked on top of one another With "group", the bars + are plotted next to one another centered around the + shared location. With "overlay", the bars are plotted + over one another, you might need to reduce "opacity" to + see multiple bars. + geo + :class:`plotly.graph_objects.layout.Geo` instance or + dict with compatible properties + grid + :class:`plotly.graph_objects.layout.Grid` instance or + dict with compatible properties + height + Sets the plot's height (in px). + hiddenlabels + hiddenlabels is the funnelarea & pie chart analog of + visible:'legendonly' but it can contain many labels, + and can simultaneously hide slices from several + pies/funnelarea charts + hiddenlabelssrc + Sets the source reference on Chart Studio Cloud for + `hiddenlabels`. + hidesources + Determines whether or not a text link citing the data + source is placed at the bottom-right cored of the + figure. Has only an effect only on graphs that have + been generated via forked graphs from the Chart Studio + Cloud (at https://chart-studio.plotly.com or on- + premise). + hoverdistance + Sets the default distance (in pixels) to look for data + to add hover labels (-1 means no cutoff, 0 means no + looking for data). This is only a real distance for + hovering on point-like objects, like scatter points. + For area-like objects (bars, scatter fills, etc) + hovering is on inside the area and off outside, but + these objects will not supersede hover on point-like + objects in case of conflict. + hoverlabel + :class:`plotly.graph_objects.layout.Hoverlabel` + instance or dict with compatible properties + hovermode + Determines the mode of hover interactions. If + "closest", a single hoverlabel will appear for the + "closest" point within the `hoverdistance`. If "x" (or + "y"), multiple hoverlabels will appear for multiple + points at the "closest" x- (or y-) coordinate within + the `hoverdistance`, with the caveat that no more than + one hoverlabel will appear per trace. If *x unified* + (or *y unified*), a single hoverlabel will appear + multiple points at the closest x- (or y-) coordinate + within the `hoverdistance` with the caveat that no more + than one hoverlabel will appear per trace. In this + mode, spikelines are enabled by default perpendicular + to the specified axis. If false, hover interactions are + disabled. + hoversubplots + Determines expansion of hover effects to other subplots + If "single" just the axis pair of the primary point is + included without overlaying subplots. If "overlaying" + all subplots using the main axis and occupying the same + space are included. If "axis", also include stacked + subplots using the same axis when `hovermode` is set to + "x", *x unified*, "y" or *y unified*. + iciclecolorway + Sets the default icicle slice colors. Defaults to the + main `colorway` used for trace colors. If you specify a + new list here it can still be extended with lighter and + darker colors, see `extendiciclecolors`. + images + A tuple of :class:`plotly.graph_objects.layout.Image` + instances or dicts with compatible properties + imagedefaults + When used in a template (as + layout.template.layout.imagedefaults), sets the default + property values to use for elements of layout.images + legend + :class:`plotly.graph_objects.layout.Legend` instance or + dict with compatible properties + map + :class:`plotly.graph_objects.layout.Map` instance or + dict with compatible properties + mapbox + :class:`plotly.graph_objects.layout.Mapbox` instance or + dict with compatible properties + margin + :class:`plotly.graph_objects.layout.Margin` instance or + dict with compatible properties + meta + Assigns extra meta information that can be used in + various `text` attributes. Attributes such as the + graph, axis and colorbar `title.text`, annotation + `text` `trace.name` in legend items, `rangeselector`, + `updatemenus` and `sliders` `label` text all support + `meta`. One can access `meta` fields using template + strings: `%{meta[i]}` where `i` is the index of the + `meta` item in question. `meta` can also be an object + for example `{key: value}` which can be accessed + %{meta[key]}. + metasrc + Sets the source reference on Chart Studio Cloud for + `meta`. + minreducedheight + Minimum height of the plot with margin.automargin + applied (in px) + minreducedwidth + Minimum width of the plot with margin.automargin + applied (in px) + modebar + :class:`plotly.graph_objects.layout.Modebar` instance + or dict with compatible properties + newselection + :class:`plotly.graph_objects.layout.Newselection` + instance or dict with compatible properties + newshape + :class:`plotly.graph_objects.layout.Newshape` instance + or dict with compatible properties + paper_bgcolor + Sets the background color of the paper where the graph + is drawn. + piecolorway + Sets the default pie slice colors. Defaults to the main + `colorway` used for trace colors. If you specify a new + list here it can still be extended with lighter and + darker colors, see `extendpiecolors`. + plot_bgcolor + Sets the background color of the plotting area in- + between x and y axes. + polar + :class:`plotly.graph_objects.layout.Polar` instance or + dict with compatible properties + scattergap + Sets the gap (in plot fraction) between scatter points + of adjacent location coordinates. Defaults to `bargap`. + scattermode + Determines how scatter points at the same location + coordinate are displayed on the graph. With "group", + the scatter points are plotted next to one another + centered around the shared location. With "overlay", + the scatter points are plotted over one another, you + might need to reduce "opacity" to see multiple scatter + points. + scene + :class:`plotly.graph_objects.layout.Scene` instance or + dict with compatible properties + selectdirection + When `dragmode` is set to "select", this limits the + selection of the drag to horizontal, vertical or + diagonal. "h" only allows horizontal selection, "v" + only vertical, "d" only diagonal and "any" sets no + limit. + selectionrevision + Controls persistence of user-driven changes in selected + points from all traces. + selections + A tuple of + :class:`plotly.graph_objects.layout.Selection` + instances or dicts with compatible properties + selectiondefaults + When used in a template (as + layout.template.layout.selectiondefaults), sets the + default property values to use for elements of + layout.selections + separators + Sets the decimal and thousand separators. For example, + *. * puts a '.' before decimals and a space between + thousands. In English locales, dflt is ".," but other + locales may alter this default. + shapes + A tuple of :class:`plotly.graph_objects.layout.Shape` + instances or dicts with compatible properties + shapedefaults + When used in a template (as + layout.template.layout.shapedefaults), sets the default + property values to use for elements of layout.shapes + showlegend + Determines whether or not a legend is drawn. Default is + `true` if there is a trace to show and any of these: a) + Two or more traces would by default be shown in the + legend. b) One pie trace is shown in the legend. c) One + trace is explicitly given with `showlegend: true`. + sliders + A tuple of :class:`plotly.graph_objects.layout.Slider` + instances or dicts with compatible properties + sliderdefaults + When used in a template (as + layout.template.layout.sliderdefaults), sets the + default property values to use for elements of + layout.sliders + smith + :class:`plotly.graph_objects.layout.Smith` instance or + dict with compatible properties + spikedistance + Sets the default distance (in pixels) to look for data + to draw spikelines to (-1 means no cutoff, 0 means no + looking for data). As with hoverdistance, distance does + not apply to area-like objects. In addition, some + objects can be hovered on but will not generate + spikelines, such as scatter fills. + sunburstcolorway + Sets the default sunburst slice colors. Defaults to the + main `colorway` used for trace colors. If you specify a + new list here it can still be extended with lighter and + darker colors, see `extendsunburstcolors`. + template + Default attributes to be applied to the plot. This + should be a dict with format: `{'layout': + layoutTemplate, 'data': {trace_type: [traceTemplate, + ...], ...}}` where `layoutTemplate` is a dict matching + the structure of `figure.layout` and `traceTemplate` is + a dict matching the structure of the trace with type + `trace_type` (e.g. 'scatter'). Alternatively, this may + be specified as an instance of + plotly.graph_objs.layout.Template. Trace templates are + applied cyclically to traces of each type. Container + arrays (eg `annotations`) have special handling: An + object ending in `defaults` (eg `annotationdefaults`) + is applied to each array item. But if an item has a + `templateitemname` key we look in the template array + for an item with matching `name` and apply that + instead. If no matching `name` is found we mark the + item invisible. Any named template item not referenced + is appended to the end of the array, so this can be + used to add a watermark annotation or a logo image, for + example. To omit one of these items on the plot, make + an item with matching `templateitemname` and `visible: + false`. + ternary + :class:`plotly.graph_objects.layout.Ternary` instance + or dict with compatible properties + title + :class:`plotly.graph_objects.layout.Title` instance or + dict with compatible properties + transition + Sets transition options used during Plotly.react + updates. + treemapcolorway + Sets the default treemap slice colors. Defaults to the + main `colorway` used for trace colors. If you specify a + new list here it can still be extended with lighter and + darker colors, see `extendtreemapcolors`. + uirevision + Used to allow user interactions with the plot to + persist after `Plotly.react` calls that are unaware of + these interactions. If `uirevision` is omitted, or if + it is given and it changed from the previous + `Plotly.react` call, the exact new figure is used. If + `uirevision` is truthy and did NOT change, any + attribute that has been affected by user interactions + and did not receive a different value in the new figure + will keep the interaction value. `layout.uirevision` + attribute serves as the default for `uirevision` + attributes in various sub-containers. For finer control + you can set these sub-attributes directly. For example, + if your app separately controls the data on the x and y + axes you might set `xaxis.uirevision=*time*` and + `yaxis.uirevision=*cost*`. Then if only the y data is + changed, you can update `yaxis.uirevision=*quantity*` + and the y axis range will reset but the x axis range + will retain any user-driven zoom. + uniformtext + :class:`plotly.graph_objects.layout.Uniformtext` + instance or dict with compatible properties + updatemenus + A tuple of + :class:`plotly.graph_objects.layout.Updatemenu` + instances or dicts with compatible properties + updatemenudefaults + When used in a template (as + layout.template.layout.updatemenudefaults), sets the + default property values to use for elements of + layout.updatemenus + violingap + Sets the gap (in plot fraction) between violins of + adjacent location coordinates. Has no effect on traces + that have "width" set. + violingroupgap + Sets the gap (in plot fraction) between violins of the + same location coordinate. Has no effect on traces that + have "width" set. + violinmode + Determines how violins at the same location coordinate + are displayed on the graph. If "group", the violins are + plotted next to one another centered around the shared + location. If "overlay", the violins are plotted over + one another, you might need to set "opacity" to see + them multiple violins. Has no effect on traces that + have "width" set. + waterfallgap + Sets the gap (in plot fraction) between bars of + adjacent location coordinates. + waterfallgroupgap + Sets the gap (in plot fraction) between bars of the + same location coordinate. + waterfallmode + Determines how bars at the same location coordinate are + displayed on the graph. With "group", the bars are + plotted next to one another centered around the shared + location. With "overlay", the bars are plotted over one + another, you might need to reduce "opacity" to see + multiple bars. + width + Sets the plot's width (in px). + xaxis + :class:`plotly.graph_objects.layout.XAxis` instance or + dict with compatible properties + yaxis + :class:`plotly.graph_objects.layout.YAxis` instance or + dict with compatible properties + + Returns + ------- + Layout + """ + super().__init__("layout") + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + self._valid_props = { + "activeselection", + "activeshape", + "annotationdefaults", + "annotations", + "autosize", + "autotypenumbers", + "barcornerradius", + "bargap", + "bargroupgap", + "barmode", + "barnorm", + "boxgap", + "boxgroupgap", + "boxmode", + "calendar", + "clickmode", + "coloraxis", + "colorscale", + "colorway", + "computed", + "datarevision", + "dragmode", + "editrevision", + "extendfunnelareacolors", + "extendiciclecolors", + "extendpiecolors", + "extendsunburstcolors", + "extendtreemapcolors", + "font", + "funnelareacolorway", + "funnelgap", + "funnelgroupgap", + "funnelmode", + "geo", + "grid", + "height", + "hiddenlabels", + "hiddenlabelssrc", + "hidesources", + "hoverdistance", + "hoverlabel", + "hovermode", + "hoversubplots", + "iciclecolorway", + "imagedefaults", + "images", + "legend", + "map", + "mapbox", + "margin", + "meta", + "metasrc", + "minreducedheight", + "minreducedwidth", + "modebar", + "newselection", + "newshape", + "paper_bgcolor", + "piecolorway", + "plot_bgcolor", + "polar", + "scattergap", + "scattermode", + "scene", + "selectdirection", + "selectiondefaults", + "selectionrevision", + "selections", + "separators", + "shapedefaults", + "shapes", + "showlegend", + "sliderdefaults", + "sliders", + "smith", + "spikedistance", + "sunburstcolorway", + "template", + "ternary", + "title", + "transition", + "treemapcolorway", + "uirevision", + "uniformtext", + "updatemenudefaults", + "updatemenus", + "violingap", + "violingroupgap", + "violinmode", + "waterfallgap", + "waterfallgroupgap", + "waterfallmode", + "width", + "xaxis", + "yaxis", + } + + if arg is None: + arg = {} + elif isinstance(arg, self.__class__): + arg = arg.to_plotly_json() + elif isinstance(arg, dict): + arg = _copy.copy(arg) + else: + raise ValueError("""\ +The first argument to the plotly.graph_objs.Layout +constructor must be a dict or +an instance of :class:`plotly.graph_objs.Layout`""") + + self._skip_invalid = kwargs.pop("skip_invalid", False) + self._validate = kwargs.pop("_validate", True) + + self._set_property("activeselection", arg, activeselection) + self._set_property("activeshape", arg, activeshape) + self._set_property("annotations", arg, annotations) + self._set_property("annotationdefaults", arg, annotationdefaults) + self._set_property("autosize", arg, autosize) + self._set_property("autotypenumbers", arg, autotypenumbers) + self._set_property("barcornerradius", arg, barcornerradius) + self._set_property("bargap", arg, bargap) + self._set_property("bargroupgap", arg, bargroupgap) + self._set_property("barmode", arg, barmode) + self._set_property("barnorm", arg, barnorm) + self._set_property("boxgap", arg, boxgap) + self._set_property("boxgroupgap", arg, boxgroupgap) + self._set_property("boxmode", arg, boxmode) + self._set_property("calendar", arg, calendar) + self._set_property("clickmode", arg, clickmode) + self._set_property("coloraxis", arg, coloraxis) + self._set_property("colorscale", arg, colorscale) + self._set_property("colorway", arg, colorway) + self._set_property("computed", arg, computed) + self._set_property("datarevision", arg, datarevision) + self._set_property("dragmode", arg, dragmode) + self._set_property("editrevision", arg, editrevision) + self._set_property("extendfunnelareacolors", arg, extendfunnelareacolors) + self._set_property("extendiciclecolors", arg, extendiciclecolors) + self._set_property("extendpiecolors", arg, extendpiecolors) + self._set_property("extendsunburstcolors", arg, extendsunburstcolors) + self._set_property("extendtreemapcolors", arg, extendtreemapcolors) + self._set_property("font", arg, font) + self._set_property("funnelareacolorway", arg, funnelareacolorway) + self._set_property("funnelgap", arg, funnelgap) + self._set_property("funnelgroupgap", arg, funnelgroupgap) + self._set_property("funnelmode", arg, funnelmode) + self._set_property("geo", arg, geo) + self._set_property("grid", arg, grid) + self._set_property("height", arg, height) + self._set_property("hiddenlabels", arg, hiddenlabels) + self._set_property("hiddenlabelssrc", arg, hiddenlabelssrc) + self._set_property("hidesources", arg, hidesources) + self._set_property("hoverdistance", arg, hoverdistance) + self._set_property("hoverlabel", arg, hoverlabel) + self._set_property("hovermode", arg, hovermode) + self._set_property("hoversubplots", arg, hoversubplots) + self._set_property("iciclecolorway", arg, iciclecolorway) + self._set_property("images", arg, images) + self._set_property("imagedefaults", arg, imagedefaults) + self._set_property("legend", arg, legend) + self._set_property("map", arg, map) + self._set_property("mapbox", arg, mapbox) + self._set_property("margin", arg, margin) + self._set_property("meta", arg, meta) + self._set_property("metasrc", arg, metasrc) + self._set_property("minreducedheight", arg, minreducedheight) + self._set_property("minreducedwidth", arg, minreducedwidth) + self._set_property("modebar", arg, modebar) + self._set_property("newselection", arg, newselection) + self._set_property("newshape", arg, newshape) + self._set_property("paper_bgcolor", arg, paper_bgcolor) + self._set_property("piecolorway", arg, piecolorway) + self._set_property("plot_bgcolor", arg, plot_bgcolor) + self._set_property("polar", arg, polar) + self._set_property("scattergap", arg, scattergap) + self._set_property("scattermode", arg, scattermode) + self._set_property("scene", arg, scene) + self._set_property("selectdirection", arg, selectdirection) + self._set_property("selectionrevision", arg, selectionrevision) + self._set_property("selections", arg, selections) + self._set_property("selectiondefaults", arg, selectiondefaults) + self._set_property("separators", arg, separators) + self._set_property("shapes", arg, shapes) + self._set_property("shapedefaults", arg, shapedefaults) + self._set_property("showlegend", arg, showlegend) + self._set_property("sliders", arg, sliders) + self._set_property("sliderdefaults", arg, sliderdefaults) + self._set_property("smith", arg, smith) + self._set_property("spikedistance", arg, spikedistance) + self._set_property("sunburstcolorway", arg, sunburstcolorway) + self._set_property("template", arg, template) + self._set_property("ternary", arg, ternary) + self._set_property("title", arg, title) + self._set_property("transition", arg, transition) + self._set_property("treemapcolorway", arg, treemapcolorway) + self._set_property("uirevision", arg, uirevision) + self._set_property("uniformtext", arg, uniformtext) + self._set_property("updatemenus", arg, updatemenus) + self._set_property("updatemenudefaults", arg, updatemenudefaults) + self._set_property("violingap", arg, violingap) + self._set_property("violingroupgap", arg, violingroupgap) + self._set_property("violinmode", arg, violinmode) + self._set_property("waterfallgap", arg, waterfallgap) + self._set_property("waterfallgroupgap", arg, waterfallgroupgap) + self._set_property("waterfallmode", arg, waterfallmode) + self._set_property("width", arg, width) + self._set_property("xaxis", arg, xaxis) + self._set_property("yaxis", arg, yaxis) + self._process_kwargs(**dict(arg, **kwargs)) + self._skip_invalid = False diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/_mesh3d.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/_mesh3d.py new file mode 100644 index 0000000000000000000000000000000000000000..231b7300a8563c856afa36b2777ded5d63a43e60 --- /dev/null +++ b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/_mesh3d.py @@ -0,0 +1,2626 @@ +# --- THIS FILE IS AUTO-GENERATED --- +# Modifications will be overwitten the next time code generation run. + +from plotly.basedatatypes import BaseTraceType as _BaseTraceType +import copy as _copy + + +class Mesh3d(_BaseTraceType): + _parent_path_str = "" + _path_str = "mesh3d" + _valid_props = { + "alphahull", + "autocolorscale", + "cauto", + "cmax", + "cmid", + "cmin", + "color", + "coloraxis", + "colorbar", + "colorscale", + "contour", + "customdata", + "customdatasrc", + "delaunayaxis", + "facecolor", + "facecolorsrc", + "flatshading", + "hoverinfo", + "hoverinfosrc", + "hoverlabel", + "hovertemplate", + "hovertemplatefallback", + "hovertemplatesrc", + "hovertext", + "hovertextsrc", + "i", + "ids", + "idssrc", + "intensity", + "intensitymode", + "intensitysrc", + "isrc", + "j", + "jsrc", + "k", + "ksrc", + "legend", + "legendgroup", + "legendgrouptitle", + "legendrank", + "legendwidth", + "lighting", + "lightposition", + "meta", + "metasrc", + "name", + "opacity", + "reversescale", + "scene", + "showlegend", + "showscale", + "stream", + "text", + "textsrc", + "type", + "uid", + "uirevision", + "vertexcolor", + "vertexcolorsrc", + "visible", + "x", + "xcalendar", + "xhoverformat", + "xsrc", + "y", + "ycalendar", + "yhoverformat", + "ysrc", + "z", + "zcalendar", + "zhoverformat", + "zsrc", + } + + @property + def alphahull(self): + """ + Determines how the mesh surface triangles are derived from the + set of vertices (points) represented by the `x`, `y` and `z` + arrays, if the `i`, `j`, `k` arrays are not supplied. For + general use of `mesh3d` it is preferred that `i`, `j`, `k` are + supplied. If "-1", Delaunay triangulation is used, which is + mainly suitable if the mesh is a single, more or less layer + surface that is perpendicular to `delaunayaxis`. In case the + `delaunayaxis` intersects the mesh surface at more than one + point it will result triangles that are very long in the + dimension of `delaunayaxis`. If ">0", the alpha-shape algorithm + is used. In this case, the positive `alphahull` value signals + the use of the alpha-shape algorithm, _and_ its value acts as + the parameter for the mesh fitting. If 0, the convex-hull + algorithm is used. It is suitable for convex bodies or if the + intention is to enclose the `x`, `y` and `z` point set into a + convex hull. + + The 'alphahull' property is a number and may be specified as: + - An int or float + + Returns + ------- + int|float + """ + return self["alphahull"] + + @alphahull.setter + def alphahull(self, val): + self["alphahull"] = val + + @property + def autocolorscale(self): + """ + Determines whether the colorscale is a default palette + (`autocolorscale: true`) or the palette determined by + `colorscale`. In case `colorscale` is unspecified or + `autocolorscale` is true, the default palette will be chosen + according to whether numbers in the `color` array are all + positive, all negative or mixed. + + The 'autocolorscale' property is a boolean and must be specified as: + - A boolean value: True or False + + Returns + ------- + bool + """ + return self["autocolorscale"] + + @autocolorscale.setter + def autocolorscale(self, val): + self["autocolorscale"] = val + + @property + def cauto(self): + """ + Determines whether or not the color domain is computed with + respect to the input data (here `intensity`) or the bounds set + in `cmin` and `cmax` Defaults to `false` when `cmin` and `cmax` + are set by the user. + + The 'cauto' property is a boolean and must be specified as: + - A boolean value: True or False + + Returns + ------- + bool + """ + return self["cauto"] + + @cauto.setter + def cauto(self, val): + self["cauto"] = val + + @property + def cmax(self): + """ + Sets the upper bound of the color domain. Value should have the + same units as `intensity` and if set, `cmin` must be set as + well. + + The 'cmax' property is a number and may be specified as: + - An int or float + + Returns + ------- + int|float + """ + return self["cmax"] + + @cmax.setter + def cmax(self, val): + self["cmax"] = val + + @property + def cmid(self): + """ + Sets the mid-point of the color domain by scaling `cmin` and/or + `cmax` to be equidistant to this point. Value should have the + same units as `intensity`. Has no effect when `cauto` is + `false`. + + The 'cmid' property is a number and may be specified as: + - An int or float + + Returns + ------- + int|float + """ + return self["cmid"] + + @cmid.setter + def cmid(self, val): + self["cmid"] = val + + @property + def cmin(self): + """ + Sets the lower bound of the color domain. Value should have the + same units as `intensity` and if set, `cmax` must be set as + well. + + The 'cmin' property is a number and may be specified as: + - An int or float + + Returns + ------- + int|float + """ + return self["cmin"] + + @cmin.setter + def cmin(self, val): + self["cmin"] = val + + @property + def color(self): + """ + Sets the color of the whole mesh + + The 'color' property is a color and may be specified as: + - A hex string (e.g. '#ff0000') + - An rgb/rgba string (e.g. 'rgb(255,0,0)') + - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') + - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') + - A named CSS color: see https://plotly.com/python/css-colors/ for a list + - A number that will be interpreted as a color + according to mesh3d.colorscale + + Returns + ------- + str + """ + return self["color"] + + @color.setter + def color(self, val): + self["color"] = val + + @property + def coloraxis(self): + """ + Sets a reference to a shared color axis. References to these + shared color axes are "coloraxis", "coloraxis2", "coloraxis3", + etc. Settings for these shared color axes are set in the + layout, under `layout.coloraxis`, `layout.coloraxis2`, etc. + Note that multiple color scales can be linked to the same color + axis. + + The 'coloraxis' property is an identifier of a particular + subplot, of type 'coloraxis', that may be specified as: + - the string 'coloraxis' optionally followed by an integer >= 1 + (e.g. 'coloraxis', 'coloraxis1', 'coloraxis2', 'coloraxis3', etc.) + + Returns + ------- + str + """ + return self["coloraxis"] + + @coloraxis.setter + def coloraxis(self, val): + self["coloraxis"] = val + + @property + def colorbar(self): + """ + The 'colorbar' property is an instance of ColorBar + that may be specified as: + - An instance of :class:`plotly.graph_objs.mesh3d.ColorBar` + - A dict of string/value properties that will be passed + to the ColorBar constructor + + Returns + ------- + plotly.graph_objs.mesh3d.ColorBar + """ + return self["colorbar"] + + @colorbar.setter + def colorbar(self, val): + self["colorbar"] = val + + @property + def colorscale(self): + """ + Sets the colorscale. The colorscale must be an array containing + arrays mapping a normalized value to an rgb, rgba, hex, hsl, + hsv, or named color string. At minimum, a mapping for the + lowest (0) and highest (1) values are required. For example, + `[[0, 'rgb(0,0,255)'], [1, 'rgb(255,0,0)']]`. To control the + bounds of the colorscale in color space, use `cmin` and `cmax`. + Alternatively, `colorscale` may be a palette name string of the + following list: Blackbody,Bluered,Blues,Cividis,Earth,Electric, + Greens,Greys,Hot,Jet,Picnic,Portland,Rainbow,RdBu,Reds,Viridis, + YlGnBu,YlOrRd. + + The 'colorscale' property is a colorscale and may be + specified as: + - A list of colors that will be spaced evenly to create the colorscale. + Many predefined colorscale lists are included in the sequential, diverging, + and cyclical modules in the plotly.colors package. + - A list of 2-element lists where the first element is the + normalized color level value (starting at 0 and ending at 1), + and the second item is a valid color string. + (e.g. [[0, 'green'], [0.5, 'red'], [1.0, 'rgb(0, 0, 255)']]) + - One of the following named colorscales: + ['aggrnyl', 'agsunset', 'algae', 'amp', 'armyrose', 'balance', + 'blackbody', 'bluered', 'blues', 'blugrn', 'bluyl', 'brbg', + 'brwnyl', 'bugn', 'bupu', 'burg', 'burgyl', 'cividis', 'curl', + 'darkmint', 'deep', 'delta', 'dense', 'earth', 'edge', 'electric', + 'emrld', 'fall', 'geyser', 'gnbu', 'gray', 'greens', 'greys', + 'haline', 'hot', 'hsv', 'ice', 'icefire', 'inferno', 'jet', + 'magenta', 'magma', 'matter', 'mint', 'mrybm', 'mygbm', 'oranges', + 'orrd', 'oryel', 'oxy', 'peach', 'phase', 'picnic', 'pinkyl', + 'piyg', 'plasma', 'plotly3', 'portland', 'prgn', 'pubu', 'pubugn', + 'puor', 'purd', 'purp', 'purples', 'purpor', 'rainbow', 'rdbu', + 'rdgy', 'rdpu', 'rdylbu', 'rdylgn', 'redor', 'reds', 'solar', + 'spectral', 'speed', 'sunset', 'sunsetdark', 'teal', 'tealgrn', + 'tealrose', 'tempo', 'temps', 'thermal', 'tropic', 'turbid', + 'turbo', 'twilight', 'viridis', 'ylgn', 'ylgnbu', 'ylorbr', + 'ylorrd']. + Appending '_r' to a named colorscale reverses it. + + Returns + ------- + str + """ + return self["colorscale"] + + @colorscale.setter + def colorscale(self, val): + self["colorscale"] = val + + @property + def contour(self): + """ + The 'contour' property is an instance of Contour + that may be specified as: + - An instance of :class:`plotly.graph_objs.mesh3d.Contour` + - A dict of string/value properties that will be passed + to the Contour constructor + + Returns + ------- + plotly.graph_objs.mesh3d.Contour + """ + return self["contour"] + + @contour.setter + def contour(self, val): + self["contour"] = val + + @property + def customdata(self): + """ + Assigns extra data each datum. This may be useful when + listening to hover, click and selection events. Note that, + "scatter" traces also appends customdata items in the markers + DOM elements + + The 'customdata' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["customdata"] + + @customdata.setter + def customdata(self, val): + self["customdata"] = val + + @property + def customdatasrc(self): + """ + Sets the source reference on Chart Studio Cloud for + `customdata`. + + The 'customdatasrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["customdatasrc"] + + @customdatasrc.setter + def customdatasrc(self, val): + self["customdatasrc"] = val + + @property + def delaunayaxis(self): + """ + Sets the Delaunay axis, which is the axis that is perpendicular + to the surface of the Delaunay triangulation. It has an effect + if `i`, `j`, `k` are not provided and `alphahull` is set to + indicate Delaunay triangulation. + + The 'delaunayaxis' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['x', 'y', 'z'] + + Returns + ------- + Any + """ + return self["delaunayaxis"] + + @delaunayaxis.setter + def delaunayaxis(self, val): + self["delaunayaxis"] = val + + @property + def facecolor(self): + """ + Sets the color of each face Overrides "color" and + "vertexcolor". + + The 'facecolor' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["facecolor"] + + @facecolor.setter + def facecolor(self, val): + self["facecolor"] = val + + @property + def facecolorsrc(self): + """ + Sets the source reference on Chart Studio Cloud for + `facecolor`. + + The 'facecolorsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["facecolorsrc"] + + @facecolorsrc.setter + def facecolorsrc(self, val): + self["facecolorsrc"] = val + + @property + def flatshading(self): + """ + Determines whether or not normal smoothing is applied to the + meshes, creating meshes with an angular, low-poly look via flat + reflections. + + The 'flatshading' property is a boolean and must be specified as: + - A boolean value: True or False + + Returns + ------- + bool + """ + return self["flatshading"] + + @flatshading.setter + def flatshading(self, val): + self["flatshading"] = val + + @property + def hoverinfo(self): + """ + Determines which trace information appear on hover. If `none` + or `skip` are set, no information is displayed upon hovering. + But, if `none` is set, click and hover events are still fired. + + The 'hoverinfo' property is a flaglist and may be specified + as a string containing: + - Any combination of ['x', 'y', 'z', 'text', 'name'] joined with '+' characters + (e.g. 'x+y') + OR exactly one of ['all', 'none', 'skip'] (e.g. 'skip') + - A list or array of the above + + Returns + ------- + Any|numpy.ndarray + """ + return self["hoverinfo"] + + @hoverinfo.setter + def hoverinfo(self, val): + self["hoverinfo"] = val + + @property + def hoverinfosrc(self): + """ + Sets the source reference on Chart Studio Cloud for + `hoverinfo`. + + The 'hoverinfosrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["hoverinfosrc"] + + @hoverinfosrc.setter + def hoverinfosrc(self, val): + self["hoverinfosrc"] = val + + @property + def hoverlabel(self): + """ + The 'hoverlabel' property is an instance of Hoverlabel + that may be specified as: + - An instance of :class:`plotly.graph_objs.mesh3d.Hoverlabel` + - A dict of string/value properties that will be passed + to the Hoverlabel constructor + + Returns + ------- + plotly.graph_objs.mesh3d.Hoverlabel + """ + return self["hoverlabel"] + + @hoverlabel.setter + def hoverlabel(self, val): + self["hoverlabel"] = val + + @property + def hovertemplate(self): + """ + Template string used for rendering the information that appear + on hover box. Note that this will override `hoverinfo`. + Variables are inserted using %{variable}, for example "y: %{y}" + as well as %{xother}, {%_xother}, {%_xother_}, {%xother_}. When + showing info for several points, "xother" will be added to + those with different x positions from the first point. An + underscore before or after "(x|y)other" will add a space on + that side, only when this field is shown. Numbers are formatted + using d3-format's syntax %{variable:d3-format}, for example + "Price: %{y:$.2f}". + https://github.com/d3/d3-format/tree/v1.4.5#d3-format for + details on the formatting syntax. Dates are formatted using + d3-time-format's syntax %{variable|d3-time-format}, for example + "Day: %{2019-01-01|%A}". https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format for details on the date + formatting syntax. Variables that can't be found will be + replaced with the specifier. For example, a template of "data: + %{x}, %{y}" will result in a value of "data: 1, %{y}" if x is 1 + and y is missing. Variables with an undefined value will be + replaced with the fallback value. The variables available in + `hovertemplate` are the ones emitted as event data described at + this link https://plotly.com/javascript/plotlyjs-events/#event- + data. Additionally, all attributes that can be specified per- + point (the ones that are `arrayOk: true`) are available. + Anything contained in tag `` is displayed in the + secondary box, for example `%{fullData.name}`. + To hide the secondary box completely, use an empty tag + ``. + + The 'hovertemplate' property is a string and must be specified as: + - A string + - A number that will be converted to a string + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["hovertemplate"] + + @hovertemplate.setter + def hovertemplate(self, val): + self["hovertemplate"] = val + + @property + def hovertemplatefallback(self): + """ + Fallback string that's displayed when a variable referenced in + a template is missing. If the boolean value 'false' is passed + in, the specifier with the missing variable will be displayed. + + The 'hovertemplatefallback' property accepts values of any type + + Returns + ------- + Any + """ + return self["hovertemplatefallback"] + + @hovertemplatefallback.setter + def hovertemplatefallback(self, val): + self["hovertemplatefallback"] = val + + @property + def hovertemplatesrc(self): + """ + Sets the source reference on Chart Studio Cloud for + `hovertemplate`. + + The 'hovertemplatesrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["hovertemplatesrc"] + + @hovertemplatesrc.setter + def hovertemplatesrc(self, val): + self["hovertemplatesrc"] = val + + @property + def hovertext(self): + """ + Same as `text`. + + The 'hovertext' property is a string and must be specified as: + - A string + - A number that will be converted to a string + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["hovertext"] + + @hovertext.setter + def hovertext(self, val): + self["hovertext"] = val + + @property + def hovertextsrc(self): + """ + Sets the source reference on Chart Studio Cloud for + `hovertext`. + + The 'hovertextsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["hovertextsrc"] + + @hovertextsrc.setter + def hovertextsrc(self, val): + self["hovertextsrc"] = val + + @property + def i(self): + """ + A vector of vertex indices, i.e. integer values between 0 and + the length of the vertex vectors, representing the "first" + vertex of a triangle. For example, `{i[m], j[m], k[m]}` + together represent face m (triangle m) in the mesh, where `i[m] + = n` points to the triplet `{x[n], y[n], z[n]}` in the vertex + arrays. Therefore, each element in `i` represents a point in + space, which is the first vertex of a triangle. + + The 'i' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["i"] + + @i.setter + def i(self, val): + self["i"] = val + + @property + def ids(self): + """ + Assigns id labels to each datum. These ids for object constancy + of data points during animation. Should be an array of strings, + not numbers or any other type. + + The 'ids' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["ids"] + + @ids.setter + def ids(self, val): + self["ids"] = val + + @property + def idssrc(self): + """ + Sets the source reference on Chart Studio Cloud for `ids`. + + The 'idssrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["idssrc"] + + @idssrc.setter + def idssrc(self, val): + self["idssrc"] = val + + @property + def intensity(self): + """ + Sets the intensity values for vertices or cells as defined by + `intensitymode`. It can be used for plotting fields on meshes. + + The 'intensity' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["intensity"] + + @intensity.setter + def intensity(self, val): + self["intensity"] = val + + @property + def intensitymode(self): + """ + Determines the source of `intensity` values. + + The 'intensitymode' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['vertex', 'cell'] + + Returns + ------- + Any + """ + return self["intensitymode"] + + @intensitymode.setter + def intensitymode(self, val): + self["intensitymode"] = val + + @property + def intensitysrc(self): + """ + Sets the source reference on Chart Studio Cloud for + `intensity`. + + The 'intensitysrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["intensitysrc"] + + @intensitysrc.setter + def intensitysrc(self, val): + self["intensitysrc"] = val + + @property + def isrc(self): + """ + Sets the source reference on Chart Studio Cloud for `i`. + + The 'isrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["isrc"] + + @isrc.setter + def isrc(self, val): + self["isrc"] = val + + @property + def j(self): + """ + A vector of vertex indices, i.e. integer values between 0 and + the length of the vertex vectors, representing the "second" + vertex of a triangle. For example, `{i[m], j[m], k[m]}` + together represent face m (triangle m) in the mesh, where `j[m] + = n` points to the triplet `{x[n], y[n], z[n]}` in the vertex + arrays. Therefore, each element in `j` represents a point in + space, which is the second vertex of a triangle. + + The 'j' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["j"] + + @j.setter + def j(self, val): + self["j"] = val + + @property + def jsrc(self): + """ + Sets the source reference on Chart Studio Cloud for `j`. + + The 'jsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["jsrc"] + + @jsrc.setter + def jsrc(self, val): + self["jsrc"] = val + + @property + def k(self): + """ + A vector of vertex indices, i.e. integer values between 0 and + the length of the vertex vectors, representing the "third" + vertex of a triangle. For example, `{i[m], j[m], k[m]}` + together represent face m (triangle m) in the mesh, where `k[m] + = n` points to the triplet `{x[n], y[n], z[n]}` in the vertex + arrays. Therefore, each element in `k` represents a point in + space, which is the third vertex of a triangle. + + The 'k' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["k"] + + @k.setter + def k(self, val): + self["k"] = val + + @property + def ksrc(self): + """ + Sets the source reference on Chart Studio Cloud for `k`. + + The 'ksrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["ksrc"] + + @ksrc.setter + def ksrc(self, val): + self["ksrc"] = val + + @property + def legend(self): + """ + Sets the reference to a legend to show this trace in. + References to these legends are "legend", "legend2", "legend3", + etc. Settings for these legends are set in the layout, under + `layout.legend`, `layout.legend2`, etc. + + The 'legend' property is an identifier of a particular + subplot, of type 'legend', that may be specified as: + - the string 'legend' optionally followed by an integer >= 1 + (e.g. 'legend', 'legend1', 'legend2', 'legend3', etc.) + + Returns + ------- + str + """ + return self["legend"] + + @legend.setter + def legend(self, val): + self["legend"] = val + + @property + def legendgroup(self): + """ + Sets the legend group for this trace. Traces and shapes part of + the same legend group hide/show at the same time when toggling + legend items. + + The 'legendgroup' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["legendgroup"] + + @legendgroup.setter + def legendgroup(self, val): + self["legendgroup"] = val + + @property + def legendgrouptitle(self): + """ + The 'legendgrouptitle' property is an instance of Legendgrouptitle + that may be specified as: + - An instance of :class:`plotly.graph_objs.mesh3d.Legendgrouptitle` + - A dict of string/value properties that will be passed + to the Legendgrouptitle constructor + + Returns + ------- + plotly.graph_objs.mesh3d.Legendgrouptitle + """ + return self["legendgrouptitle"] + + @legendgrouptitle.setter + def legendgrouptitle(self, val): + self["legendgrouptitle"] = val + + @property + def legendrank(self): + """ + Sets the legend rank for this trace. Items and groups with + smaller ranks are presented on top/left side while with + "reversed" `legend.traceorder` they are on bottom/right side. + The default legendrank is 1000, so that you can use ranks less + than 1000 to place certain items before all unranked items, and + ranks greater than 1000 to go after all unranked items. When + having unranked or equal rank items shapes would be displayed + after traces i.e. according to their order in data and layout. + + The 'legendrank' property is a number and may be specified as: + - An int or float + + Returns + ------- + int|float + """ + return self["legendrank"] + + @legendrank.setter + def legendrank(self, val): + self["legendrank"] = val + + @property + def legendwidth(self): + """ + Sets the width (in px or fraction) of the legend for this + trace. + + The 'legendwidth' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["legendwidth"] + + @legendwidth.setter + def legendwidth(self, val): + self["legendwidth"] = val + + @property + def lighting(self): + """ + The 'lighting' property is an instance of Lighting + that may be specified as: + - An instance of :class:`plotly.graph_objs.mesh3d.Lighting` + - A dict of string/value properties that will be passed + to the Lighting constructor + + Returns + ------- + plotly.graph_objs.mesh3d.Lighting + """ + return self["lighting"] + + @lighting.setter + def lighting(self, val): + self["lighting"] = val + + @property + def lightposition(self): + """ + The 'lightposition' property is an instance of Lightposition + that may be specified as: + - An instance of :class:`plotly.graph_objs.mesh3d.Lightposition` + - A dict of string/value properties that will be passed + to the Lightposition constructor + + Returns + ------- + plotly.graph_objs.mesh3d.Lightposition + """ + return self["lightposition"] + + @lightposition.setter + def lightposition(self, val): + self["lightposition"] = val + + @property + def meta(self): + """ + Assigns extra meta information associated with this trace that + can be used in various text attributes. Attributes such as + trace `name`, graph, axis and colorbar `title.text`, annotation + `text` `rangeselector`, `updatemenues` and `sliders` `label` + text all support `meta`. To access the trace `meta` values in + an attribute in the same trace, simply use `%{meta[i]}` where + `i` is the index or key of the `meta` item in question. To + access trace `meta` in layout attributes, use + `%{data[n[.meta[i]}` where `i` is the index or key of the + `meta` and `n` is the trace index. + + The 'meta' property accepts values of any type + + Returns + ------- + Any|numpy.ndarray + """ + return self["meta"] + + @meta.setter + def meta(self, val): + self["meta"] = val + + @property + def metasrc(self): + """ + Sets the source reference on Chart Studio Cloud for `meta`. + + The 'metasrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["metasrc"] + + @metasrc.setter + def metasrc(self, val): + self["metasrc"] = val + + @property + def name(self): + """ + Sets the trace name. The trace name appears as the legend item + and on hover. + + The 'name' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["name"] + + @name.setter + def name(self, val): + self["name"] = val + + @property + def opacity(self): + """ + Sets the opacity of the surface. Please note that in the case + of using high `opacity` values for example a value greater than + or equal to 0.5 on two surfaces (and 0.25 with four surfaces), + an overlay of multiple transparent surfaces may not perfectly + be sorted in depth by the webgl API. This behavior may be + improved in the near future and is subject to change. + + The 'opacity' property is a number and may be specified as: + - An int or float in the interval [0, 1] + + Returns + ------- + int|float + """ + return self["opacity"] + + @opacity.setter + def opacity(self, val): + self["opacity"] = val + + @property + def reversescale(self): + """ + Reverses the color mapping if true. If true, `cmin` will + correspond to the last color in the array and `cmax` will + correspond to the first color. + + The 'reversescale' property is a boolean and must be specified as: + - A boolean value: True or False + + Returns + ------- + bool + """ + return self["reversescale"] + + @reversescale.setter + def reversescale(self, val): + self["reversescale"] = val + + @property + def scene(self): + """ + Sets a reference between this trace's 3D coordinate system and + a 3D scene. If "scene" (the default value), the (x,y,z) + coordinates refer to `layout.scene`. If "scene2", the (x,y,z) + coordinates refer to `layout.scene2`, and so on. + + The 'scene' property is an identifier of a particular + subplot, of type 'scene', that may be specified as: + - the string 'scene' optionally followed by an integer >= 1 + (e.g. 'scene', 'scene1', 'scene2', 'scene3', etc.) + + Returns + ------- + str + """ + return self["scene"] + + @scene.setter + def scene(self, val): + self["scene"] = val + + @property + def showlegend(self): + """ + Determines whether or not an item corresponding to this trace + is shown in the legend. + + The 'showlegend' property is a boolean and must be specified as: + - A boolean value: True or False + + Returns + ------- + bool + """ + return self["showlegend"] + + @showlegend.setter + def showlegend(self, val): + self["showlegend"] = val + + @property + def showscale(self): + """ + Determines whether or not a colorbar is displayed for this + trace. + + The 'showscale' property is a boolean and must be specified as: + - A boolean value: True or False + + Returns + ------- + bool + """ + return self["showscale"] + + @showscale.setter + def showscale(self, val): + self["showscale"] = val + + @property + def stream(self): + """ + The 'stream' property is an instance of Stream + that may be specified as: + - An instance of :class:`plotly.graph_objs.mesh3d.Stream` + - A dict of string/value properties that will be passed + to the Stream constructor + + Returns + ------- + plotly.graph_objs.mesh3d.Stream + """ + return self["stream"] + + @stream.setter + def stream(self, val): + self["stream"] = val + + @property + def text(self): + """ + Sets the text elements associated with the vertices. If trace + `hoverinfo` contains a "text" flag and "hovertext" is not set, + these elements will be seen in the hover labels. + + The 'text' property is a string and must be specified as: + - A string + - A number that will be converted to a string + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["text"] + + @text.setter + def text(self, val): + self["text"] = val + + @property + def textsrc(self): + """ + Sets the source reference on Chart Studio Cloud for `text`. + + The 'textsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["textsrc"] + + @textsrc.setter + def textsrc(self, val): + self["textsrc"] = val + + @property + def uid(self): + """ + Assign an id to this trace, Use this to provide object + constancy between traces during animations and transitions. + + The 'uid' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["uid"] + + @uid.setter + def uid(self, val): + self["uid"] = val + + @property + def uirevision(self): + """ + Controls persistence of some user-driven changes to the trace: + `constraintrange` in `parcoords` traces, as well as some + `editable: true` modifications such as `name` and + `colorbar.title`. Defaults to `layout.uirevision`. Note that + other user-driven trace attribute changes are controlled by + `layout` attributes: `trace.visible` is controlled by + `layout.legend.uirevision`, `selectedpoints` is controlled by + `layout.selectionrevision`, and `colorbar.(x|y)` (accessible + with `config: {editable: true}`) is controlled by + `layout.editrevision`. Trace changes are tracked by `uid`, + which only falls back on trace index if no `uid` is provided. + So if your app can add/remove traces before the end of the + `data` array, such that the same trace has a different index, + you can still preserve user-driven changes if you give each + trace a `uid` that stays with it as it moves. + + The 'uirevision' property accepts values of any type + + Returns + ------- + Any + """ + return self["uirevision"] + + @uirevision.setter + def uirevision(self, val): + self["uirevision"] = val + + @property + def vertexcolor(self): + """ + Sets the color of each vertex Overrides "color". While Red, + green and blue colors are in the range of 0 and 255; in the + case of having vertex color data in RGBA format, the alpha + color should be normalized to be between 0 and 1. + + The 'vertexcolor' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["vertexcolor"] + + @vertexcolor.setter + def vertexcolor(self, val): + self["vertexcolor"] = val + + @property + def vertexcolorsrc(self): + """ + Sets the source reference on Chart Studio Cloud for + `vertexcolor`. + + The 'vertexcolorsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["vertexcolorsrc"] + + @vertexcolorsrc.setter + def vertexcolorsrc(self, val): + self["vertexcolorsrc"] = val + + @property + def visible(self): + """ + Determines whether or not this trace is visible. If + "legendonly", the trace is not drawn, but can appear as a + legend item (provided that the legend itself is visible). + + The 'visible' property is an enumeration that may be specified as: + - One of the following enumeration values: + [True, False, 'legendonly'] + + Returns + ------- + Any + """ + return self["visible"] + + @visible.setter + def visible(self, val): + self["visible"] = val + + @property + def x(self): + """ + Sets the X coordinates of the vertices. The nth element of + vectors `x`, `y` and `z` jointly represent the X, Y and Z + coordinates of the nth vertex. + + The 'x' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["x"] + + @x.setter + def x(self, val): + self["x"] = val + + @property + def xcalendar(self): + """ + Sets the calendar system to use with `x` date data. + + The 'xcalendar' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['chinese', 'coptic', 'discworld', 'ethiopian', + 'gregorian', 'hebrew', 'islamic', 'jalali', 'julian', + 'mayan', 'nanakshahi', 'nepali', 'persian', 'taiwan', + 'thai', 'ummalqura'] + + Returns + ------- + Any + """ + return self["xcalendar"] + + @xcalendar.setter + def xcalendar(self, val): + self["xcalendar"] = val + + @property + def xhoverformat(self): + """ + Sets the hover text formatting rulefor `x` using d3 formatting + mini-languages which are very similar to those in Python. For + numbers, see: + https://github.com/d3/d3-format/tree/v1.4.5#d3-format. And for + dates see: https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format. We add two items to d3's date + formatter: "%h" for half of the year as a decimal number as + well as "%{n}f" for fractional seconds with n digits. For + example, *2016-10-13 09:15:23.456* with tickformat + "%H~%M~%S.%2f" would display *09~15~23.46*By default the values + are formatted using `xaxis.hoverformat`. + + The 'xhoverformat' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["xhoverformat"] + + @xhoverformat.setter + def xhoverformat(self, val): + self["xhoverformat"] = val + + @property + def xsrc(self): + """ + Sets the source reference on Chart Studio Cloud for `x`. + + The 'xsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["xsrc"] + + @xsrc.setter + def xsrc(self, val): + self["xsrc"] = val + + @property + def y(self): + """ + Sets the Y coordinates of the vertices. The nth element of + vectors `x`, `y` and `z` jointly represent the X, Y and Z + coordinates of the nth vertex. + + The 'y' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["y"] + + @y.setter + def y(self, val): + self["y"] = val + + @property + def ycalendar(self): + """ + Sets the calendar system to use with `y` date data. + + The 'ycalendar' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['chinese', 'coptic', 'discworld', 'ethiopian', + 'gregorian', 'hebrew', 'islamic', 'jalali', 'julian', + 'mayan', 'nanakshahi', 'nepali', 'persian', 'taiwan', + 'thai', 'ummalqura'] + + Returns + ------- + Any + """ + return self["ycalendar"] + + @ycalendar.setter + def ycalendar(self, val): + self["ycalendar"] = val + + @property + def yhoverformat(self): + """ + Sets the hover text formatting rulefor `y` using d3 formatting + mini-languages which are very similar to those in Python. For + numbers, see: + https://github.com/d3/d3-format/tree/v1.4.5#d3-format. And for + dates see: https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format. We add two items to d3's date + formatter: "%h" for half of the year as a decimal number as + well as "%{n}f" for fractional seconds with n digits. For + example, *2016-10-13 09:15:23.456* with tickformat + "%H~%M~%S.%2f" would display *09~15~23.46*By default the values + are formatted using `yaxis.hoverformat`. + + The 'yhoverformat' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["yhoverformat"] + + @yhoverformat.setter + def yhoverformat(self, val): + self["yhoverformat"] = val + + @property + def ysrc(self): + """ + Sets the source reference on Chart Studio Cloud for `y`. + + The 'ysrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["ysrc"] + + @ysrc.setter + def ysrc(self, val): + self["ysrc"] = val + + @property + def z(self): + """ + Sets the Z coordinates of the vertices. The nth element of + vectors `x`, `y` and `z` jointly represent the X, Y and Z + coordinates of the nth vertex. + + The 'z' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["z"] + + @z.setter + def z(self, val): + self["z"] = val + + @property + def zcalendar(self): + """ + Sets the calendar system to use with `z` date data. + + The 'zcalendar' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['chinese', 'coptic', 'discworld', 'ethiopian', + 'gregorian', 'hebrew', 'islamic', 'jalali', 'julian', + 'mayan', 'nanakshahi', 'nepali', 'persian', 'taiwan', + 'thai', 'ummalqura'] + + Returns + ------- + Any + """ + return self["zcalendar"] + + @zcalendar.setter + def zcalendar(self, val): + self["zcalendar"] = val + + @property + def zhoverformat(self): + """ + Sets the hover text formatting rulefor `z` using d3 formatting + mini-languages which are very similar to those in Python. For + numbers, see: + https://github.com/d3/d3-format/tree/v1.4.5#d3-format. And for + dates see: https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format. We add two items to d3's date + formatter: "%h" for half of the year as a decimal number as + well as "%{n}f" for fractional seconds with n digits. For + example, *2016-10-13 09:15:23.456* with tickformat + "%H~%M~%S.%2f" would display *09~15~23.46*By default the values + are formatted using `zaxis.hoverformat`. + + The 'zhoverformat' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["zhoverformat"] + + @zhoverformat.setter + def zhoverformat(self, val): + self["zhoverformat"] = val + + @property + def zsrc(self): + """ + Sets the source reference on Chart Studio Cloud for `z`. + + The 'zsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["zsrc"] + + @zsrc.setter + def zsrc(self, val): + self["zsrc"] = val + + @property + def type(self): + return self._props["type"] + + @property + def _prop_descriptions(self): + return """\ + alphahull + Determines how the mesh surface triangles are derived + from the set of vertices (points) represented by the + `x`, `y` and `z` arrays, if the `i`, `j`, `k` arrays + are not supplied. For general use of `mesh3d` it is + preferred that `i`, `j`, `k` are supplied. If "-1", + Delaunay triangulation is used, which is mainly + suitable if the mesh is a single, more or less layer + surface that is perpendicular to `delaunayaxis`. In + case the `delaunayaxis` intersects the mesh surface at + more than one point it will result triangles that are + very long in the dimension of `delaunayaxis`. If ">0", + the alpha-shape algorithm is used. In this case, the + positive `alphahull` value signals the use of the + alpha-shape algorithm, _and_ its value acts as the + parameter for the mesh fitting. If 0, the convex-hull + algorithm is used. It is suitable for convex bodies or + if the intention is to enclose the `x`, `y` and `z` + point set into a convex hull. + autocolorscale + Determines whether the colorscale is a default palette + (`autocolorscale: true`) or the palette determined by + `colorscale`. In case `colorscale` is unspecified or + `autocolorscale` is true, the default palette will be + chosen according to whether numbers in the `color` + array are all positive, all negative or mixed. + cauto + Determines whether or not the color domain is computed + with respect to the input data (here `intensity`) or + the bounds set in `cmin` and `cmax` Defaults to `false` + when `cmin` and `cmax` are set by the user. + cmax + Sets the upper bound of the color domain. Value should + have the same units as `intensity` and if set, `cmin` + must be set as well. + cmid + Sets the mid-point of the color domain by scaling + `cmin` and/or `cmax` to be equidistant to this point. + Value should have the same units as `intensity`. Has no + effect when `cauto` is `false`. + cmin + Sets the lower bound of the color domain. Value should + have the same units as `intensity` and if set, `cmax` + must be set as well. + color + Sets the color of the whole mesh + coloraxis + Sets a reference to a shared color axis. References to + these shared color axes are "coloraxis", "coloraxis2", + "coloraxis3", etc. Settings for these shared color axes + are set in the layout, under `layout.coloraxis`, + `layout.coloraxis2`, etc. Note that multiple color + scales can be linked to the same color axis. + colorbar + :class:`plotly.graph_objects.mesh3d.ColorBar` instance + or dict with compatible properties + colorscale + Sets the colorscale. The colorscale must be an array + containing arrays mapping a normalized value to an rgb, + rgba, hex, hsl, hsv, or named color string. At minimum, + a mapping for the lowest (0) and highest (1) values are + required. For example, `[[0, 'rgb(0,0,255)'], [1, + 'rgb(255,0,0)']]`. To control the bounds of the + colorscale in color space, use `cmin` and `cmax`. + Alternatively, `colorscale` may be a palette name + string of the following list: Blackbody,Bluered,Blues,C + ividis,Earth,Electric,Greens,Greys,Hot,Jet,Picnic,Portl + and,Rainbow,RdBu,Reds,Viridis,YlGnBu,YlOrRd. + contour + :class:`plotly.graph_objects.mesh3d.Contour` instance + or dict with compatible properties + customdata + Assigns extra data each datum. This may be useful when + listening to hover, click and selection events. Note + that, "scatter" traces also appends customdata items in + the markers DOM elements + customdatasrc + Sets the source reference on Chart Studio Cloud for + `customdata`. + delaunayaxis + Sets the Delaunay axis, which is the axis that is + perpendicular to the surface of the Delaunay + triangulation. It has an effect if `i`, `j`, `k` are + not provided and `alphahull` is set to indicate + Delaunay triangulation. + facecolor + Sets the color of each face Overrides "color" and + "vertexcolor". + facecolorsrc + Sets the source reference on Chart Studio Cloud for + `facecolor`. + flatshading + Determines whether or not normal smoothing is applied + to the meshes, creating meshes with an angular, low- + poly look via flat reflections. + hoverinfo + Determines which trace information appear on hover. If + `none` or `skip` are set, no information is displayed + upon hovering. But, if `none` is set, click and hover + events are still fired. + hoverinfosrc + Sets the source reference on Chart Studio Cloud for + `hoverinfo`. + hoverlabel + :class:`plotly.graph_objects.mesh3d.Hoverlabel` + instance or dict with compatible properties + hovertemplate + Template string used for rendering the information that + appear on hover box. Note that this will override + `hoverinfo`. Variables are inserted using %{variable}, + for example "y: %{y}" as well as %{xother}, {%_xother}, + {%_xother_}, {%xother_}. When showing info for several + points, "xother" will be added to those with different + x positions from the first point. An underscore before + or after "(x|y)other" will add a space on that side, + only when this field is shown. Numbers are formatted + using d3-format's syntax %{variable:d3-format}, for + example "Price: %{y:$.2f}". + https://github.com/d3/d3-format/tree/v1.4.5#d3-format + for details on the formatting syntax. Dates are + formatted using d3-time-format's syntax + %{variable|d3-time-format}, for example "Day: + %{2019-01-01|%A}". https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format for details on the + date formatting syntax. Variables that can't be found + will be replaced with the specifier. For example, a + template of "data: %{x}, %{y}" will result in a value + of "data: 1, %{y}" if x is 1 and y is missing. + Variables with an undefined value will be replaced with + the fallback value. The variables available in + `hovertemplate` are the ones emitted as event data + described at this link + https://plotly.com/javascript/plotlyjs-events/#event- + data. Additionally, all attributes that can be + specified per-point (the ones that are `arrayOk: true`) + are available. Anything contained in tag `` is + displayed in the secondary box, for example + `%{fullData.name}`. To hide the + secondary box completely, use an empty tag + ``. + hovertemplatefallback + Fallback string that's displayed when a variable + referenced in a template is missing. If the boolean + value 'false' is passed in, the specifier with the + missing variable will be displayed. + hovertemplatesrc + Sets the source reference on Chart Studio Cloud for + `hovertemplate`. + hovertext + Same as `text`. + hovertextsrc + Sets the source reference on Chart Studio Cloud for + `hovertext`. + i + A vector of vertex indices, i.e. integer values between + 0 and the length of the vertex vectors, representing + the "first" vertex of a triangle. For example, `{i[m], + j[m], k[m]}` together represent face m (triangle m) in + the mesh, where `i[m] = n` points to the triplet + `{x[n], y[n], z[n]}` in the vertex arrays. Therefore, + each element in `i` represents a point in space, which + is the first vertex of a triangle. + ids + Assigns id labels to each datum. These ids for object + constancy of data points during animation. Should be an + array of strings, not numbers or any other type. + idssrc + Sets the source reference on Chart Studio Cloud for + `ids`. + intensity + Sets the intensity values for vertices or cells as + defined by `intensitymode`. It can be used for plotting + fields on meshes. + intensitymode + Determines the source of `intensity` values. + intensitysrc + Sets the source reference on Chart Studio Cloud for + `intensity`. + isrc + Sets the source reference on Chart Studio Cloud for + `i`. + j + A vector of vertex indices, i.e. integer values between + 0 and the length of the vertex vectors, representing + the "second" vertex of a triangle. For example, `{i[m], + j[m], k[m]}` together represent face m (triangle m) in + the mesh, where `j[m] = n` points to the triplet + `{x[n], y[n], z[n]}` in the vertex arrays. Therefore, + each element in `j` represents a point in space, which + is the second vertex of a triangle. + jsrc + Sets the source reference on Chart Studio Cloud for + `j`. + k + A vector of vertex indices, i.e. integer values between + 0 and the length of the vertex vectors, representing + the "third" vertex of a triangle. For example, `{i[m], + j[m], k[m]}` together represent face m (triangle m) in + the mesh, where `k[m] = n` points to the triplet + `{x[n], y[n], z[n]}` in the vertex arrays. Therefore, + each element in `k` represents a point in space, which + is the third vertex of a triangle. + ksrc + Sets the source reference on Chart Studio Cloud for + `k`. + legend + Sets the reference to a legend to show this trace in. + References to these legends are "legend", "legend2", + "legend3", etc. Settings for these legends are set in + the layout, under `layout.legend`, `layout.legend2`, + etc. + legendgroup + Sets the legend group for this trace. Traces and shapes + part of the same legend group hide/show at the same + time when toggling legend items. + legendgrouptitle + :class:`plotly.graph_objects.mesh3d.Legendgrouptitle` + instance or dict with compatible properties + legendrank + Sets the legend rank for this trace. Items and groups + with smaller ranks are presented on top/left side while + with "reversed" `legend.traceorder` they are on + bottom/right side. The default legendrank is 1000, so + that you can use ranks less than 1000 to place certain + items before all unranked items, and ranks greater than + 1000 to go after all unranked items. When having + unranked or equal rank items shapes would be displayed + after traces i.e. according to their order in data and + layout. + legendwidth + Sets the width (in px or fraction) of the legend for + this trace. + lighting + :class:`plotly.graph_objects.mesh3d.Lighting` instance + or dict with compatible properties + lightposition + :class:`plotly.graph_objects.mesh3d.Lightposition` + instance or dict with compatible properties + meta + Assigns extra meta information associated with this + trace that can be used in various text attributes. + Attributes such as trace `name`, graph, axis and + colorbar `title.text`, annotation `text` + `rangeselector`, `updatemenues` and `sliders` `label` + text all support `meta`. To access the trace `meta` + values in an attribute in the same trace, simply use + `%{meta[i]}` where `i` is the index or key of the + `meta` item in question. To access trace `meta` in + layout attributes, use `%{data[n[.meta[i]}` where `i` + is the index or key of the `meta` and `n` is the trace + index. + metasrc + Sets the source reference on Chart Studio Cloud for + `meta`. + name + Sets the trace name. The trace name appears as the + legend item and on hover. + opacity + Sets the opacity of the surface. Please note that in + the case of using high `opacity` values for example a + value greater than or equal to 0.5 on two surfaces (and + 0.25 with four surfaces), an overlay of multiple + transparent surfaces may not perfectly be sorted in + depth by the webgl API. This behavior may be improved + in the near future and is subject to change. + reversescale + Reverses the color mapping if true. If true, `cmin` + will correspond to the last color in the array and + `cmax` will correspond to the first color. + scene + Sets a reference between this trace's 3D coordinate + system and a 3D scene. If "scene" (the default value), + the (x,y,z) coordinates refer to `layout.scene`. If + "scene2", the (x,y,z) coordinates refer to + `layout.scene2`, and so on. + showlegend + Determines whether or not an item corresponding to this + trace is shown in the legend. + showscale + Determines whether or not a colorbar is displayed for + this trace. + stream + :class:`plotly.graph_objects.mesh3d.Stream` instance or + dict with compatible properties + text + Sets the text elements associated with the vertices. If + trace `hoverinfo` contains a "text" flag and + "hovertext" is not set, these elements will be seen in + the hover labels. + textsrc + Sets the source reference on Chart Studio Cloud for + `text`. + uid + Assign an id to this trace, Use this to provide object + constancy between traces during animations and + transitions. + uirevision + Controls persistence of some user-driven changes to the + trace: `constraintrange` in `parcoords` traces, as well + as some `editable: true` modifications such as `name` + and `colorbar.title`. Defaults to `layout.uirevision`. + Note that other user-driven trace attribute changes are + controlled by `layout` attributes: `trace.visible` is + controlled by `layout.legend.uirevision`, + `selectedpoints` is controlled by + `layout.selectionrevision`, and `colorbar.(x|y)` + (accessible with `config: {editable: true}`) is + controlled by `layout.editrevision`. Trace changes are + tracked by `uid`, which only falls back on trace index + if no `uid` is provided. So if your app can add/remove + traces before the end of the `data` array, such that + the same trace has a different index, you can still + preserve user-driven changes if you give each trace a + `uid` that stays with it as it moves. + vertexcolor + Sets the color of each vertex Overrides "color". While + Red, green and blue colors are in the range of 0 and + 255; in the case of having vertex color data in RGBA + format, the alpha color should be normalized to be + between 0 and 1. + vertexcolorsrc + Sets the source reference on Chart Studio Cloud for + `vertexcolor`. + visible + Determines whether or not this trace is visible. If + "legendonly", the trace is not drawn, but can appear as + a legend item (provided that the legend itself is + visible). + x + Sets the X coordinates of the vertices. The nth element + of vectors `x`, `y` and `z` jointly represent the X, Y + and Z coordinates of the nth vertex. + xcalendar + Sets the calendar system to use with `x` date data. + xhoverformat + Sets the hover text formatting rulefor `x` using d3 + formatting mini-languages which are very similar to + those in Python. For numbers, see: + https://github.com/d3/d3-format/tree/v1.4.5#d3-format. + And for dates see: https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format. We add two items to + d3's date formatter: "%h" for half of the year as a + decimal number as well as "%{n}f" for fractional + seconds with n digits. For example, *2016-10-13 + 09:15:23.456* with tickformat "%H~%M~%S.%2f" would + display *09~15~23.46*By default the values are + formatted using `xaxis.hoverformat`. + xsrc + Sets the source reference on Chart Studio Cloud for + `x`. + y + Sets the Y coordinates of the vertices. The nth element + of vectors `x`, `y` and `z` jointly represent the X, Y + and Z coordinates of the nth vertex. + ycalendar + Sets the calendar system to use with `y` date data. + yhoverformat + Sets the hover text formatting rulefor `y` using d3 + formatting mini-languages which are very similar to + those in Python. For numbers, see: + https://github.com/d3/d3-format/tree/v1.4.5#d3-format. + And for dates see: https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format. We add two items to + d3's date formatter: "%h" for half of the year as a + decimal number as well as "%{n}f" for fractional + seconds with n digits. For example, *2016-10-13 + 09:15:23.456* with tickformat "%H~%M~%S.%2f" would + display *09~15~23.46*By default the values are + formatted using `yaxis.hoverformat`. + ysrc + Sets the source reference on Chart Studio Cloud for + `y`. + z + Sets the Z coordinates of the vertices. The nth element + of vectors `x`, `y` and `z` jointly represent the X, Y + and Z coordinates of the nth vertex. + zcalendar + Sets the calendar system to use with `z` date data. + zhoverformat + Sets the hover text formatting rulefor `z` using d3 + formatting mini-languages which are very similar to + those in Python. For numbers, see: + https://github.com/d3/d3-format/tree/v1.4.5#d3-format. + And for dates see: https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format. We add two items to + d3's date formatter: "%h" for half of the year as a + decimal number as well as "%{n}f" for fractional + seconds with n digits. For example, *2016-10-13 + 09:15:23.456* with tickformat "%H~%M~%S.%2f" would + display *09~15~23.46*By default the values are + formatted using `zaxis.hoverformat`. + zsrc + Sets the source reference on Chart Studio Cloud for + `z`. + """ + + def __init__( + self, + arg=None, + alphahull=None, + autocolorscale=None, + cauto=None, + cmax=None, + cmid=None, + cmin=None, + color=None, + coloraxis=None, + colorbar=None, + colorscale=None, + contour=None, + customdata=None, + customdatasrc=None, + delaunayaxis=None, + facecolor=None, + facecolorsrc=None, + flatshading=None, + hoverinfo=None, + hoverinfosrc=None, + hoverlabel=None, + hovertemplate=None, + hovertemplatefallback=None, + hovertemplatesrc=None, + hovertext=None, + hovertextsrc=None, + i=None, + ids=None, + idssrc=None, + intensity=None, + intensitymode=None, + intensitysrc=None, + isrc=None, + j=None, + jsrc=None, + k=None, + ksrc=None, + legend=None, + legendgroup=None, + legendgrouptitle=None, + legendrank=None, + legendwidth=None, + lighting=None, + lightposition=None, + meta=None, + metasrc=None, + name=None, + opacity=None, + reversescale=None, + scene=None, + showlegend=None, + showscale=None, + stream=None, + text=None, + textsrc=None, + uid=None, + uirevision=None, + vertexcolor=None, + vertexcolorsrc=None, + visible=None, + x=None, + xcalendar=None, + xhoverformat=None, + xsrc=None, + y=None, + ycalendar=None, + yhoverformat=None, + ysrc=None, + z=None, + zcalendar=None, + zhoverformat=None, + zsrc=None, + **kwargs, + ): + """ + Construct a new Mesh3d object + + Draws sets of triangles with coordinates given by three + 1-dimensional arrays in `x`, `y`, `z` and (1) a sets of `i`, + `j`, `k` indices (2) Delaunay triangulation or (3) the Alpha- + shape algorithm or (4) the Convex-hull algorithm + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of :class:`plotly.graph_objs.Mesh3d` + alphahull + Determines how the mesh surface triangles are derived + from the set of vertices (points) represented by the + `x`, `y` and `z` arrays, if the `i`, `j`, `k` arrays + are not supplied. For general use of `mesh3d` it is + preferred that `i`, `j`, `k` are supplied. If "-1", + Delaunay triangulation is used, which is mainly + suitable if the mesh is a single, more or less layer + surface that is perpendicular to `delaunayaxis`. In + case the `delaunayaxis` intersects the mesh surface at + more than one point it will result triangles that are + very long in the dimension of `delaunayaxis`. If ">0", + the alpha-shape algorithm is used. In this case, the + positive `alphahull` value signals the use of the + alpha-shape algorithm, _and_ its value acts as the + parameter for the mesh fitting. If 0, the convex-hull + algorithm is used. It is suitable for convex bodies or + if the intention is to enclose the `x`, `y` and `z` + point set into a convex hull. + autocolorscale + Determines whether the colorscale is a default palette + (`autocolorscale: true`) or the palette determined by + `colorscale`. In case `colorscale` is unspecified or + `autocolorscale` is true, the default palette will be + chosen according to whether numbers in the `color` + array are all positive, all negative or mixed. + cauto + Determines whether or not the color domain is computed + with respect to the input data (here `intensity`) or + the bounds set in `cmin` and `cmax` Defaults to `false` + when `cmin` and `cmax` are set by the user. + cmax + Sets the upper bound of the color domain. Value should + have the same units as `intensity` and if set, `cmin` + must be set as well. + cmid + Sets the mid-point of the color domain by scaling + `cmin` and/or `cmax` to be equidistant to this point. + Value should have the same units as `intensity`. Has no + effect when `cauto` is `false`. + cmin + Sets the lower bound of the color domain. Value should + have the same units as `intensity` and if set, `cmax` + must be set as well. + color + Sets the color of the whole mesh + coloraxis + Sets a reference to a shared color axis. References to + these shared color axes are "coloraxis", "coloraxis2", + "coloraxis3", etc. Settings for these shared color axes + are set in the layout, under `layout.coloraxis`, + `layout.coloraxis2`, etc. Note that multiple color + scales can be linked to the same color axis. + colorbar + :class:`plotly.graph_objects.mesh3d.ColorBar` instance + or dict with compatible properties + colorscale + Sets the colorscale. The colorscale must be an array + containing arrays mapping a normalized value to an rgb, + rgba, hex, hsl, hsv, or named color string. At minimum, + a mapping for the lowest (0) and highest (1) values are + required. For example, `[[0, 'rgb(0,0,255)'], [1, + 'rgb(255,0,0)']]`. To control the bounds of the + colorscale in color space, use `cmin` and `cmax`. + Alternatively, `colorscale` may be a palette name + string of the following list: Blackbody,Bluered,Blues,C + ividis,Earth,Electric,Greens,Greys,Hot,Jet,Picnic,Portl + and,Rainbow,RdBu,Reds,Viridis,YlGnBu,YlOrRd. + contour + :class:`plotly.graph_objects.mesh3d.Contour` instance + or dict with compatible properties + customdata + Assigns extra data each datum. This may be useful when + listening to hover, click and selection events. Note + that, "scatter" traces also appends customdata items in + the markers DOM elements + customdatasrc + Sets the source reference on Chart Studio Cloud for + `customdata`. + delaunayaxis + Sets the Delaunay axis, which is the axis that is + perpendicular to the surface of the Delaunay + triangulation. It has an effect if `i`, `j`, `k` are + not provided and `alphahull` is set to indicate + Delaunay triangulation. + facecolor + Sets the color of each face Overrides "color" and + "vertexcolor". + facecolorsrc + Sets the source reference on Chart Studio Cloud for + `facecolor`. + flatshading + Determines whether or not normal smoothing is applied + to the meshes, creating meshes with an angular, low- + poly look via flat reflections. + hoverinfo + Determines which trace information appear on hover. If + `none` or `skip` are set, no information is displayed + upon hovering. But, if `none` is set, click and hover + events are still fired. + hoverinfosrc + Sets the source reference on Chart Studio Cloud for + `hoverinfo`. + hoverlabel + :class:`plotly.graph_objects.mesh3d.Hoverlabel` + instance or dict with compatible properties + hovertemplate + Template string used for rendering the information that + appear on hover box. Note that this will override + `hoverinfo`. Variables are inserted using %{variable}, + for example "y: %{y}" as well as %{xother}, {%_xother}, + {%_xother_}, {%xother_}. When showing info for several + points, "xother" will be added to those with different + x positions from the first point. An underscore before + or after "(x|y)other" will add a space on that side, + only when this field is shown. Numbers are formatted + using d3-format's syntax %{variable:d3-format}, for + example "Price: %{y:$.2f}". + https://github.com/d3/d3-format/tree/v1.4.5#d3-format + for details on the formatting syntax. Dates are + formatted using d3-time-format's syntax + %{variable|d3-time-format}, for example "Day: + %{2019-01-01|%A}". https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format for details on the + date formatting syntax. Variables that can't be found + will be replaced with the specifier. For example, a + template of "data: %{x}, %{y}" will result in a value + of "data: 1, %{y}" if x is 1 and y is missing. + Variables with an undefined value will be replaced with + the fallback value. The variables available in + `hovertemplate` are the ones emitted as event data + described at this link + https://plotly.com/javascript/plotlyjs-events/#event- + data. Additionally, all attributes that can be + specified per-point (the ones that are `arrayOk: true`) + are available. Anything contained in tag `` is + displayed in the secondary box, for example + `%{fullData.name}`. To hide the + secondary box completely, use an empty tag + ``. + hovertemplatefallback + Fallback string that's displayed when a variable + referenced in a template is missing. If the boolean + value 'false' is passed in, the specifier with the + missing variable will be displayed. + hovertemplatesrc + Sets the source reference on Chart Studio Cloud for + `hovertemplate`. + hovertext + Same as `text`. + hovertextsrc + Sets the source reference on Chart Studio Cloud for + `hovertext`. + i + A vector of vertex indices, i.e. integer values between + 0 and the length of the vertex vectors, representing + the "first" vertex of a triangle. For example, `{i[m], + j[m], k[m]}` together represent face m (triangle m) in + the mesh, where `i[m] = n` points to the triplet + `{x[n], y[n], z[n]}` in the vertex arrays. Therefore, + each element in `i` represents a point in space, which + is the first vertex of a triangle. + ids + Assigns id labels to each datum. These ids for object + constancy of data points during animation. Should be an + array of strings, not numbers or any other type. + idssrc + Sets the source reference on Chart Studio Cloud for + `ids`. + intensity + Sets the intensity values for vertices or cells as + defined by `intensitymode`. It can be used for plotting + fields on meshes. + intensitymode + Determines the source of `intensity` values. + intensitysrc + Sets the source reference on Chart Studio Cloud for + `intensity`. + isrc + Sets the source reference on Chart Studio Cloud for + `i`. + j + A vector of vertex indices, i.e. integer values between + 0 and the length of the vertex vectors, representing + the "second" vertex of a triangle. For example, `{i[m], + j[m], k[m]}` together represent face m (triangle m) in + the mesh, where `j[m] = n` points to the triplet + `{x[n], y[n], z[n]}` in the vertex arrays. Therefore, + each element in `j` represents a point in space, which + is the second vertex of a triangle. + jsrc + Sets the source reference on Chart Studio Cloud for + `j`. + k + A vector of vertex indices, i.e. integer values between + 0 and the length of the vertex vectors, representing + the "third" vertex of a triangle. For example, `{i[m], + j[m], k[m]}` together represent face m (triangle m) in + the mesh, where `k[m] = n` points to the triplet + `{x[n], y[n], z[n]}` in the vertex arrays. Therefore, + each element in `k` represents a point in space, which + is the third vertex of a triangle. + ksrc + Sets the source reference on Chart Studio Cloud for + `k`. + legend + Sets the reference to a legend to show this trace in. + References to these legends are "legend", "legend2", + "legend3", etc. Settings for these legends are set in + the layout, under `layout.legend`, `layout.legend2`, + etc. + legendgroup + Sets the legend group for this trace. Traces and shapes + part of the same legend group hide/show at the same + time when toggling legend items. + legendgrouptitle + :class:`plotly.graph_objects.mesh3d.Legendgrouptitle` + instance or dict with compatible properties + legendrank + Sets the legend rank for this trace. Items and groups + with smaller ranks are presented on top/left side while + with "reversed" `legend.traceorder` they are on + bottom/right side. The default legendrank is 1000, so + that you can use ranks less than 1000 to place certain + items before all unranked items, and ranks greater than + 1000 to go after all unranked items. When having + unranked or equal rank items shapes would be displayed + after traces i.e. according to their order in data and + layout. + legendwidth + Sets the width (in px or fraction) of the legend for + this trace. + lighting + :class:`plotly.graph_objects.mesh3d.Lighting` instance + or dict with compatible properties + lightposition + :class:`plotly.graph_objects.mesh3d.Lightposition` + instance or dict with compatible properties + meta + Assigns extra meta information associated with this + trace that can be used in various text attributes. + Attributes such as trace `name`, graph, axis and + colorbar `title.text`, annotation `text` + `rangeselector`, `updatemenues` and `sliders` `label` + text all support `meta`. To access the trace `meta` + values in an attribute in the same trace, simply use + `%{meta[i]}` where `i` is the index or key of the + `meta` item in question. To access trace `meta` in + layout attributes, use `%{data[n[.meta[i]}` where `i` + is the index or key of the `meta` and `n` is the trace + index. + metasrc + Sets the source reference on Chart Studio Cloud for + `meta`. + name + Sets the trace name. The trace name appears as the + legend item and on hover. + opacity + Sets the opacity of the surface. Please note that in + the case of using high `opacity` values for example a + value greater than or equal to 0.5 on two surfaces (and + 0.25 with four surfaces), an overlay of multiple + transparent surfaces may not perfectly be sorted in + depth by the webgl API. This behavior may be improved + in the near future and is subject to change. + reversescale + Reverses the color mapping if true. If true, `cmin` + will correspond to the last color in the array and + `cmax` will correspond to the first color. + scene + Sets a reference between this trace's 3D coordinate + system and a 3D scene. If "scene" (the default value), + the (x,y,z) coordinates refer to `layout.scene`. If + "scene2", the (x,y,z) coordinates refer to + `layout.scene2`, and so on. + showlegend + Determines whether or not an item corresponding to this + trace is shown in the legend. + showscale + Determines whether or not a colorbar is displayed for + this trace. + stream + :class:`plotly.graph_objects.mesh3d.Stream` instance or + dict with compatible properties + text + Sets the text elements associated with the vertices. If + trace `hoverinfo` contains a "text" flag and + "hovertext" is not set, these elements will be seen in + the hover labels. + textsrc + Sets the source reference on Chart Studio Cloud for + `text`. + uid + Assign an id to this trace, Use this to provide object + constancy between traces during animations and + transitions. + uirevision + Controls persistence of some user-driven changes to the + trace: `constraintrange` in `parcoords` traces, as well + as some `editable: true` modifications such as `name` + and `colorbar.title`. Defaults to `layout.uirevision`. + Note that other user-driven trace attribute changes are + controlled by `layout` attributes: `trace.visible` is + controlled by `layout.legend.uirevision`, + `selectedpoints` is controlled by + `layout.selectionrevision`, and `colorbar.(x|y)` + (accessible with `config: {editable: true}`) is + controlled by `layout.editrevision`. Trace changes are + tracked by `uid`, which only falls back on trace index + if no `uid` is provided. So if your app can add/remove + traces before the end of the `data` array, such that + the same trace has a different index, you can still + preserve user-driven changes if you give each trace a + `uid` that stays with it as it moves. + vertexcolor + Sets the color of each vertex Overrides "color". While + Red, green and blue colors are in the range of 0 and + 255; in the case of having vertex color data in RGBA + format, the alpha color should be normalized to be + between 0 and 1. + vertexcolorsrc + Sets the source reference on Chart Studio Cloud for + `vertexcolor`. + visible + Determines whether or not this trace is visible. If + "legendonly", the trace is not drawn, but can appear as + a legend item (provided that the legend itself is + visible). + x + Sets the X coordinates of the vertices. The nth element + of vectors `x`, `y` and `z` jointly represent the X, Y + and Z coordinates of the nth vertex. + xcalendar + Sets the calendar system to use with `x` date data. + xhoverformat + Sets the hover text formatting rulefor `x` using d3 + formatting mini-languages which are very similar to + those in Python. For numbers, see: + https://github.com/d3/d3-format/tree/v1.4.5#d3-format. + And for dates see: https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format. We add two items to + d3's date formatter: "%h" for half of the year as a + decimal number as well as "%{n}f" for fractional + seconds with n digits. For example, *2016-10-13 + 09:15:23.456* with tickformat "%H~%M~%S.%2f" would + display *09~15~23.46*By default the values are + formatted using `xaxis.hoverformat`. + xsrc + Sets the source reference on Chart Studio Cloud for + `x`. + y + Sets the Y coordinates of the vertices. The nth element + of vectors `x`, `y` and `z` jointly represent the X, Y + and Z coordinates of the nth vertex. + ycalendar + Sets the calendar system to use with `y` date data. + yhoverformat + Sets the hover text formatting rulefor `y` using d3 + formatting mini-languages which are very similar to + those in Python. For numbers, see: + https://github.com/d3/d3-format/tree/v1.4.5#d3-format. + And for dates see: https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format. We add two items to + d3's date formatter: "%h" for half of the year as a + decimal number as well as "%{n}f" for fractional + seconds with n digits. For example, *2016-10-13 + 09:15:23.456* with tickformat "%H~%M~%S.%2f" would + display *09~15~23.46*By default the values are + formatted using `yaxis.hoverformat`. + ysrc + Sets the source reference on Chart Studio Cloud for + `y`. + z + Sets the Z coordinates of the vertices. The nth element + of vectors `x`, `y` and `z` jointly represent the X, Y + and Z coordinates of the nth vertex. + zcalendar + Sets the calendar system to use with `z` date data. + zhoverformat + Sets the hover text formatting rulefor `z` using d3 + formatting mini-languages which are very similar to + those in Python. For numbers, see: + https://github.com/d3/d3-format/tree/v1.4.5#d3-format. + And for dates see: https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format. We add two items to + d3's date formatter: "%h" for half of the year as a + decimal number as well as "%{n}f" for fractional + seconds with n digits. For example, *2016-10-13 + 09:15:23.456* with tickformat "%H~%M~%S.%2f" would + display *09~15~23.46*By default the values are + formatted using `zaxis.hoverformat`. + zsrc + Sets the source reference on Chart Studio Cloud for + `z`. + + Returns + ------- + Mesh3d + """ + super().__init__("mesh3d") + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + if arg is None: + arg = {} + elif isinstance(arg, self.__class__): + arg = arg.to_plotly_json() + elif isinstance(arg, dict): + arg = _copy.copy(arg) + else: + raise ValueError("""\ +The first argument to the plotly.graph_objs.Mesh3d +constructor must be a dict or +an instance of :class:`plotly.graph_objs.Mesh3d`""") + + self._skip_invalid = kwargs.pop("skip_invalid", False) + self._validate = kwargs.pop("_validate", True) + + self._set_property("alphahull", arg, alphahull) + self._set_property("autocolorscale", arg, autocolorscale) + self._set_property("cauto", arg, cauto) + self._set_property("cmax", arg, cmax) + self._set_property("cmid", arg, cmid) + self._set_property("cmin", arg, cmin) + self._set_property("color", arg, color) + self._set_property("coloraxis", arg, coloraxis) + self._set_property("colorbar", arg, colorbar) + self._set_property("colorscale", arg, colorscale) + self._set_property("contour", arg, contour) + self._set_property("customdata", arg, customdata) + self._set_property("customdatasrc", arg, customdatasrc) + self._set_property("delaunayaxis", arg, delaunayaxis) + self._set_property("facecolor", arg, facecolor) + self._set_property("facecolorsrc", arg, facecolorsrc) + self._set_property("flatshading", arg, flatshading) + self._set_property("hoverinfo", arg, hoverinfo) + self._set_property("hoverinfosrc", arg, hoverinfosrc) + self._set_property("hoverlabel", arg, hoverlabel) + self._set_property("hovertemplate", arg, hovertemplate) + self._set_property("hovertemplatefallback", arg, hovertemplatefallback) + self._set_property("hovertemplatesrc", arg, hovertemplatesrc) + self._set_property("hovertext", arg, hovertext) + self._set_property("hovertextsrc", arg, hovertextsrc) + self._set_property("i", arg, i) + self._set_property("ids", arg, ids) + self._set_property("idssrc", arg, idssrc) + self._set_property("intensity", arg, intensity) + self._set_property("intensitymode", arg, intensitymode) + self._set_property("intensitysrc", arg, intensitysrc) + self._set_property("isrc", arg, isrc) + self._set_property("j", arg, j) + self._set_property("jsrc", arg, jsrc) + self._set_property("k", arg, k) + self._set_property("ksrc", arg, ksrc) + self._set_property("legend", arg, legend) + self._set_property("legendgroup", arg, legendgroup) + self._set_property("legendgrouptitle", arg, legendgrouptitle) + self._set_property("legendrank", arg, legendrank) + self._set_property("legendwidth", arg, legendwidth) + self._set_property("lighting", arg, lighting) + self._set_property("lightposition", arg, lightposition) + self._set_property("meta", arg, meta) + self._set_property("metasrc", arg, metasrc) + self._set_property("name", arg, name) + self._set_property("opacity", arg, opacity) + self._set_property("reversescale", arg, reversescale) + self._set_property("scene", arg, scene) + self._set_property("showlegend", arg, showlegend) + self._set_property("showscale", arg, showscale) + self._set_property("stream", arg, stream) + self._set_property("text", arg, text) + self._set_property("textsrc", arg, textsrc) + self._set_property("uid", arg, uid) + self._set_property("uirevision", arg, uirevision) + self._set_property("vertexcolor", arg, vertexcolor) + self._set_property("vertexcolorsrc", arg, vertexcolorsrc) + self._set_property("visible", arg, visible) + self._set_property("x", arg, x) + self._set_property("xcalendar", arg, xcalendar) + self._set_property("xhoverformat", arg, xhoverformat) + self._set_property("xsrc", arg, xsrc) + self._set_property("y", arg, y) + self._set_property("ycalendar", arg, ycalendar) + self._set_property("yhoverformat", arg, yhoverformat) + self._set_property("ysrc", arg, ysrc) + self._set_property("z", arg, z) + self._set_property("zcalendar", arg, zcalendar) + self._set_property("zhoverformat", arg, zhoverformat) + self._set_property("zsrc", arg, zsrc) + + self._props["type"] = "mesh3d" + arg.pop("type", None) + self._process_kwargs(**dict(arg, **kwargs)) + self._skip_invalid = False diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/_ohlc.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/_ohlc.py new file mode 100644 index 0000000000000000000000000000000000000000..d8376e8aae6405ce227b980d2d219fb1cac697a3 --- /dev/null +++ b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/_ohlc.py @@ -0,0 +1,1858 @@ +# --- THIS FILE IS AUTO-GENERATED --- +# Modifications will be overwitten the next time code generation run. + +from plotly.basedatatypes import BaseTraceType as _BaseTraceType +import copy as _copy + + +class Ohlc(_BaseTraceType): + _parent_path_str = "" + _path_str = "ohlc" + _valid_props = { + "close", + "closesrc", + "customdata", + "customdatasrc", + "decreasing", + "high", + "highsrc", + "hoverinfo", + "hoverinfosrc", + "hoverlabel", + "hovertemplate", + "hovertemplatefallback", + "hovertemplatesrc", + "hovertext", + "hovertextsrc", + "ids", + "idssrc", + "increasing", + "legend", + "legendgroup", + "legendgrouptitle", + "legendrank", + "legendwidth", + "line", + "low", + "lowsrc", + "meta", + "metasrc", + "name", + "opacity", + "open", + "opensrc", + "selectedpoints", + "showlegend", + "stream", + "text", + "textsrc", + "tickwidth", + "type", + "uid", + "uirevision", + "visible", + "x", + "xaxis", + "xcalendar", + "xhoverformat", + "xperiod", + "xperiod0", + "xperiodalignment", + "xsrc", + "yaxis", + "yhoverformat", + "zorder", + } + + @property + def close(self): + """ + Sets the close values. + + The 'close' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["close"] + + @close.setter + def close(self, val): + self["close"] = val + + @property + def closesrc(self): + """ + Sets the source reference on Chart Studio Cloud for `close`. + + The 'closesrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["closesrc"] + + @closesrc.setter + def closesrc(self, val): + self["closesrc"] = val + + @property + def customdata(self): + """ + Assigns extra data each datum. This may be useful when + listening to hover, click and selection events. Note that, + "scatter" traces also appends customdata items in the markers + DOM elements + + The 'customdata' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["customdata"] + + @customdata.setter + def customdata(self, val): + self["customdata"] = val + + @property + def customdatasrc(self): + """ + Sets the source reference on Chart Studio Cloud for + `customdata`. + + The 'customdatasrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["customdatasrc"] + + @customdatasrc.setter + def customdatasrc(self, val): + self["customdatasrc"] = val + + @property + def decreasing(self): + """ + The 'decreasing' property is an instance of Decreasing + that may be specified as: + - An instance of :class:`plotly.graph_objs.ohlc.Decreasing` + - A dict of string/value properties that will be passed + to the Decreasing constructor + + Returns + ------- + plotly.graph_objs.ohlc.Decreasing + """ + return self["decreasing"] + + @decreasing.setter + def decreasing(self, val): + self["decreasing"] = val + + @property + def high(self): + """ + Sets the high values. + + The 'high' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["high"] + + @high.setter + def high(self, val): + self["high"] = val + + @property + def highsrc(self): + """ + Sets the source reference on Chart Studio Cloud for `high`. + + The 'highsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["highsrc"] + + @highsrc.setter + def highsrc(self, val): + self["highsrc"] = val + + @property + def hoverinfo(self): + """ + Determines which trace information appear on hover. If `none` + or `skip` are set, no information is displayed upon hovering. + But, if `none` is set, click and hover events are still fired. + + The 'hoverinfo' property is a flaglist and may be specified + as a string containing: + - Any combination of ['x', 'y', 'z', 'text', 'name'] joined with '+' characters + (e.g. 'x+y') + OR exactly one of ['all', 'none', 'skip'] (e.g. 'skip') + - A list or array of the above + + Returns + ------- + Any|numpy.ndarray + """ + return self["hoverinfo"] + + @hoverinfo.setter + def hoverinfo(self, val): + self["hoverinfo"] = val + + @property + def hoverinfosrc(self): + """ + Sets the source reference on Chart Studio Cloud for + `hoverinfo`. + + The 'hoverinfosrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["hoverinfosrc"] + + @hoverinfosrc.setter + def hoverinfosrc(self, val): + self["hoverinfosrc"] = val + + @property + def hoverlabel(self): + """ + The 'hoverlabel' property is an instance of Hoverlabel + that may be specified as: + - An instance of :class:`plotly.graph_objs.ohlc.Hoverlabel` + - A dict of string/value properties that will be passed + to the Hoverlabel constructor + + Returns + ------- + plotly.graph_objs.ohlc.Hoverlabel + """ + return self["hoverlabel"] + + @hoverlabel.setter + def hoverlabel(self, val): + self["hoverlabel"] = val + + @property + def hovertemplate(self): + """ + Template string used for rendering the information that appear + on hover box. Note that this will override `hoverinfo`. + Variables are inserted using %{variable}, for example "y: %{y}" + as well as %{xother}, {%_xother}, {%_xother_}, {%xother_}. When + showing info for several points, "xother" will be added to + those with different x positions from the first point. An + underscore before or after "(x|y)other" will add a space on + that side, only when this field is shown. Numbers are formatted + using d3-format's syntax %{variable:d3-format}, for example + "Price: %{y:$.2f}". + https://github.com/d3/d3-format/tree/v1.4.5#d3-format for + details on the formatting syntax. Dates are formatted using + d3-time-format's syntax %{variable|d3-time-format}, for example + "Day: %{2019-01-01|%A}". https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format for details on the date + formatting syntax. Variables that can't be found will be + replaced with the specifier. For example, a template of "data: + %{x}, %{y}" will result in a value of "data: 1, %{y}" if x is 1 + and y is missing. Variables with an undefined value will be + replaced with the fallback value. The variables available in + `hovertemplate` are the ones emitted as event data described at + this link https://plotly.com/javascript/plotlyjs-events/#event- + data. Additionally, all attributes that can be specified per- + point (the ones that are `arrayOk: true`) are available. + Finally, the template string has access to variables `open`, + `high`, `low` and `close`. Anything contained in tag `` + is displayed in the secondary box, for example + `%{fullData.name}`. To hide the secondary box + completely, use an empty tag ``. + + The 'hovertemplate' property is a string and must be specified as: + - A string + - A number that will be converted to a string + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["hovertemplate"] + + @hovertemplate.setter + def hovertemplate(self, val): + self["hovertemplate"] = val + + @property + def hovertemplatefallback(self): + """ + Fallback string that's displayed when a variable referenced in + a template is missing. If the boolean value 'false' is passed + in, the specifier with the missing variable will be displayed. + + The 'hovertemplatefallback' property accepts values of any type + + Returns + ------- + Any + """ + return self["hovertemplatefallback"] + + @hovertemplatefallback.setter + def hovertemplatefallback(self, val): + self["hovertemplatefallback"] = val + + @property + def hovertemplatesrc(self): + """ + Sets the source reference on Chart Studio Cloud for + `hovertemplate`. + + The 'hovertemplatesrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["hovertemplatesrc"] + + @hovertemplatesrc.setter + def hovertemplatesrc(self, val): + self["hovertemplatesrc"] = val + + @property + def hovertext(self): + """ + Same as `text`. + + The 'hovertext' property is a string and must be specified as: + - A string + - A number that will be converted to a string + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["hovertext"] + + @hovertext.setter + def hovertext(self, val): + self["hovertext"] = val + + @property + def hovertextsrc(self): + """ + Sets the source reference on Chart Studio Cloud for + `hovertext`. + + The 'hovertextsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["hovertextsrc"] + + @hovertextsrc.setter + def hovertextsrc(self, val): + self["hovertextsrc"] = val + + @property + def ids(self): + """ + Assigns id labels to each datum. These ids for object constancy + of data points during animation. Should be an array of strings, + not numbers or any other type. + + The 'ids' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["ids"] + + @ids.setter + def ids(self, val): + self["ids"] = val + + @property + def idssrc(self): + """ + Sets the source reference on Chart Studio Cloud for `ids`. + + The 'idssrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["idssrc"] + + @idssrc.setter + def idssrc(self, val): + self["idssrc"] = val + + @property + def increasing(self): + """ + The 'increasing' property is an instance of Increasing + that may be specified as: + - An instance of :class:`plotly.graph_objs.ohlc.Increasing` + - A dict of string/value properties that will be passed + to the Increasing constructor + + Returns + ------- + plotly.graph_objs.ohlc.Increasing + """ + return self["increasing"] + + @increasing.setter + def increasing(self, val): + self["increasing"] = val + + @property + def legend(self): + """ + Sets the reference to a legend to show this trace in. + References to these legends are "legend", "legend2", "legend3", + etc. Settings for these legends are set in the layout, under + `layout.legend`, `layout.legend2`, etc. + + The 'legend' property is an identifier of a particular + subplot, of type 'legend', that may be specified as: + - the string 'legend' optionally followed by an integer >= 1 + (e.g. 'legend', 'legend1', 'legend2', 'legend3', etc.) + + Returns + ------- + str + """ + return self["legend"] + + @legend.setter + def legend(self, val): + self["legend"] = val + + @property + def legendgroup(self): + """ + Sets the legend group for this trace. Traces and shapes part of + the same legend group hide/show at the same time when toggling + legend items. + + The 'legendgroup' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["legendgroup"] + + @legendgroup.setter + def legendgroup(self, val): + self["legendgroup"] = val + + @property + def legendgrouptitle(self): + """ + The 'legendgrouptitle' property is an instance of Legendgrouptitle + that may be specified as: + - An instance of :class:`plotly.graph_objs.ohlc.Legendgrouptitle` + - A dict of string/value properties that will be passed + to the Legendgrouptitle constructor + + Returns + ------- + plotly.graph_objs.ohlc.Legendgrouptitle + """ + return self["legendgrouptitle"] + + @legendgrouptitle.setter + def legendgrouptitle(self, val): + self["legendgrouptitle"] = val + + @property + def legendrank(self): + """ + Sets the legend rank for this trace. Items and groups with + smaller ranks are presented on top/left side while with + "reversed" `legend.traceorder` they are on bottom/right side. + The default legendrank is 1000, so that you can use ranks less + than 1000 to place certain items before all unranked items, and + ranks greater than 1000 to go after all unranked items. When + having unranked or equal rank items shapes would be displayed + after traces i.e. according to their order in data and layout. + + The 'legendrank' property is a number and may be specified as: + - An int or float + + Returns + ------- + int|float + """ + return self["legendrank"] + + @legendrank.setter + def legendrank(self, val): + self["legendrank"] = val + + @property + def legendwidth(self): + """ + Sets the width (in px or fraction) of the legend for this + trace. + + The 'legendwidth' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["legendwidth"] + + @legendwidth.setter + def legendwidth(self, val): + self["legendwidth"] = val + + @property + def line(self): + """ + The 'line' property is an instance of Line + that may be specified as: + - An instance of :class:`plotly.graph_objs.ohlc.Line` + - A dict of string/value properties that will be passed + to the Line constructor + + Returns + ------- + plotly.graph_objs.ohlc.Line + """ + return self["line"] + + @line.setter + def line(self, val): + self["line"] = val + + @property + def low(self): + """ + Sets the low values. + + The 'low' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["low"] + + @low.setter + def low(self, val): + self["low"] = val + + @property + def lowsrc(self): + """ + Sets the source reference on Chart Studio Cloud for `low`. + + The 'lowsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["lowsrc"] + + @lowsrc.setter + def lowsrc(self, val): + self["lowsrc"] = val + + @property + def meta(self): + """ + Assigns extra meta information associated with this trace that + can be used in various text attributes. Attributes such as + trace `name`, graph, axis and colorbar `title.text`, annotation + `text` `rangeselector`, `updatemenues` and `sliders` `label` + text all support `meta`. To access the trace `meta` values in + an attribute in the same trace, simply use `%{meta[i]}` where + `i` is the index or key of the `meta` item in question. To + access trace `meta` in layout attributes, use + `%{data[n[.meta[i]}` where `i` is the index or key of the + `meta` and `n` is the trace index. + + The 'meta' property accepts values of any type + + Returns + ------- + Any|numpy.ndarray + """ + return self["meta"] + + @meta.setter + def meta(self, val): + self["meta"] = val + + @property + def metasrc(self): + """ + Sets the source reference on Chart Studio Cloud for `meta`. + + The 'metasrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["metasrc"] + + @metasrc.setter + def metasrc(self, val): + self["metasrc"] = val + + @property + def name(self): + """ + Sets the trace name. The trace name appears as the legend item + and on hover. + + The 'name' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["name"] + + @name.setter + def name(self, val): + self["name"] = val + + @property + def opacity(self): + """ + Sets the opacity of the trace. + + The 'opacity' property is a number and may be specified as: + - An int or float in the interval [0, 1] + + Returns + ------- + int|float + """ + return self["opacity"] + + @opacity.setter + def opacity(self, val): + self["opacity"] = val + + @property + def open(self): + """ + Sets the open values. + + The 'open' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["open"] + + @open.setter + def open(self, val): + self["open"] = val + + @property + def opensrc(self): + """ + Sets the source reference on Chart Studio Cloud for `open`. + + The 'opensrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["opensrc"] + + @opensrc.setter + def opensrc(self, val): + self["opensrc"] = val + + @property + def selectedpoints(self): + """ + Array containing integer indices of selected points. Has an + effect only for traces that support selections. Note that an + empty array means an empty selection where the `unselected` are + turned on for all points, whereas, any other non-array values + means no selection all where the `selected` and `unselected` + styles have no effect. + + The 'selectedpoints' property accepts values of any type + + Returns + ------- + Any + """ + return self["selectedpoints"] + + @selectedpoints.setter + def selectedpoints(self, val): + self["selectedpoints"] = val + + @property + def showlegend(self): + """ + Determines whether or not an item corresponding to this trace + is shown in the legend. + + The 'showlegend' property is a boolean and must be specified as: + - A boolean value: True or False + + Returns + ------- + bool + """ + return self["showlegend"] + + @showlegend.setter + def showlegend(self, val): + self["showlegend"] = val + + @property + def stream(self): + """ + The 'stream' property is an instance of Stream + that may be specified as: + - An instance of :class:`plotly.graph_objs.ohlc.Stream` + - A dict of string/value properties that will be passed + to the Stream constructor + + Returns + ------- + plotly.graph_objs.ohlc.Stream + """ + return self["stream"] + + @stream.setter + def stream(self, val): + self["stream"] = val + + @property + def text(self): + """ + Sets hover text elements associated with each sample point. If + a single string, the same string appears over all the data + points. If an array of string, the items are mapped in order to + this trace's sample points. + + The 'text' property is a string and must be specified as: + - A string + - A number that will be converted to a string + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["text"] + + @text.setter + def text(self, val): + self["text"] = val + + @property + def textsrc(self): + """ + Sets the source reference on Chart Studio Cloud for `text`. + + The 'textsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["textsrc"] + + @textsrc.setter + def textsrc(self, val): + self["textsrc"] = val + + @property + def tickwidth(self): + """ + Sets the width of the open/close tick marks relative to the "x" + minimal interval. + + The 'tickwidth' property is a number and may be specified as: + - An int or float in the interval [0, 0.5] + + Returns + ------- + int|float + """ + return self["tickwidth"] + + @tickwidth.setter + def tickwidth(self, val): + self["tickwidth"] = val + + @property + def uid(self): + """ + Assign an id to this trace, Use this to provide object + constancy between traces during animations and transitions. + + The 'uid' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["uid"] + + @uid.setter + def uid(self, val): + self["uid"] = val + + @property + def uirevision(self): + """ + Controls persistence of some user-driven changes to the trace: + `constraintrange` in `parcoords` traces, as well as some + `editable: true` modifications such as `name` and + `colorbar.title`. Defaults to `layout.uirevision`. Note that + other user-driven trace attribute changes are controlled by + `layout` attributes: `trace.visible` is controlled by + `layout.legend.uirevision`, `selectedpoints` is controlled by + `layout.selectionrevision`, and `colorbar.(x|y)` (accessible + with `config: {editable: true}`) is controlled by + `layout.editrevision`. Trace changes are tracked by `uid`, + which only falls back on trace index if no `uid` is provided. + So if your app can add/remove traces before the end of the + `data` array, such that the same trace has a different index, + you can still preserve user-driven changes if you give each + trace a `uid` that stays with it as it moves. + + The 'uirevision' property accepts values of any type + + Returns + ------- + Any + """ + return self["uirevision"] + + @uirevision.setter + def uirevision(self, val): + self["uirevision"] = val + + @property + def visible(self): + """ + Determines whether or not this trace is visible. If + "legendonly", the trace is not drawn, but can appear as a + legend item (provided that the legend itself is visible). + + The 'visible' property is an enumeration that may be specified as: + - One of the following enumeration values: + [True, False, 'legendonly'] + + Returns + ------- + Any + """ + return self["visible"] + + @visible.setter + def visible(self, val): + self["visible"] = val + + @property + def x(self): + """ + Sets the x coordinates. If absent, linear coordinate will be + generated. + + The 'x' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["x"] + + @x.setter + def x(self, val): + self["x"] = val + + @property + def xaxis(self): + """ + Sets a reference between this trace's x coordinates and a 2D + cartesian x axis. If "x" (the default value), the x coordinates + refer to `layout.xaxis`. If "x2", the x coordinates refer to + `layout.xaxis2`, and so on. + + The 'xaxis' property is an identifier of a particular + subplot, of type 'x', that may be specified as: + - the string 'x' optionally followed by an integer >= 1 + (e.g. 'x', 'x1', 'x2', 'x3', etc.) + + Returns + ------- + str + """ + return self["xaxis"] + + @xaxis.setter + def xaxis(self, val): + self["xaxis"] = val + + @property + def xcalendar(self): + """ + Sets the calendar system to use with `x` date data. + + The 'xcalendar' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['chinese', 'coptic', 'discworld', 'ethiopian', + 'gregorian', 'hebrew', 'islamic', 'jalali', 'julian', + 'mayan', 'nanakshahi', 'nepali', 'persian', 'taiwan', + 'thai', 'ummalqura'] + + Returns + ------- + Any + """ + return self["xcalendar"] + + @xcalendar.setter + def xcalendar(self, val): + self["xcalendar"] = val + + @property + def xhoverformat(self): + """ + Sets the hover text formatting rulefor `x` using d3 formatting + mini-languages which are very similar to those in Python. For + numbers, see: + https://github.com/d3/d3-format/tree/v1.4.5#d3-format. And for + dates see: https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format. We add two items to d3's date + formatter: "%h" for half of the year as a decimal number as + well as "%{n}f" for fractional seconds with n digits. For + example, *2016-10-13 09:15:23.456* with tickformat + "%H~%M~%S.%2f" would display *09~15~23.46*By default the values + are formatted using `xaxis.hoverformat`. + + The 'xhoverformat' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["xhoverformat"] + + @xhoverformat.setter + def xhoverformat(self, val): + self["xhoverformat"] = val + + @property + def xperiod(self): + """ + Only relevant when the axis `type` is "date". Sets the period + positioning in milliseconds or "M" on the x axis. Special + values in the form of "M" could be used to declare the + number of months. In this case `n` must be a positive integer. + + The 'xperiod' property accepts values of any type + + Returns + ------- + Any + """ + return self["xperiod"] + + @xperiod.setter + def xperiod(self, val): + self["xperiod"] = val + + @property + def xperiod0(self): + """ + Only relevant when the axis `type` is "date". Sets the base for + period positioning in milliseconds or date string on the x0 + axis. When `x0period` is round number of weeks, the `x0period0` + by default would be on a Sunday i.e. 2000-01-02, otherwise it + would be at 2000-01-01. + + The 'xperiod0' property accepts values of any type + + Returns + ------- + Any + """ + return self["xperiod0"] + + @xperiod0.setter + def xperiod0(self, val): + self["xperiod0"] = val + + @property + def xperiodalignment(self): + """ + Only relevant when the axis `type` is "date". Sets the + alignment of data points on the x axis. + + The 'xperiodalignment' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['start', 'middle', 'end'] + + Returns + ------- + Any + """ + return self["xperiodalignment"] + + @xperiodalignment.setter + def xperiodalignment(self, val): + self["xperiodalignment"] = val + + @property + def xsrc(self): + """ + Sets the source reference on Chart Studio Cloud for `x`. + + The 'xsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["xsrc"] + + @xsrc.setter + def xsrc(self, val): + self["xsrc"] = val + + @property + def yaxis(self): + """ + Sets a reference between this trace's y coordinates and a 2D + cartesian y axis. If "y" (the default value), the y coordinates + refer to `layout.yaxis`. If "y2", the y coordinates refer to + `layout.yaxis2`, and so on. + + The 'yaxis' property is an identifier of a particular + subplot, of type 'y', that may be specified as: + - the string 'y' optionally followed by an integer >= 1 + (e.g. 'y', 'y1', 'y2', 'y3', etc.) + + Returns + ------- + str + """ + return self["yaxis"] + + @yaxis.setter + def yaxis(self, val): + self["yaxis"] = val + + @property + def yhoverformat(self): + """ + Sets the hover text formatting rulefor `y` using d3 formatting + mini-languages which are very similar to those in Python. For + numbers, see: + https://github.com/d3/d3-format/tree/v1.4.5#d3-format. And for + dates see: https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format. We add two items to d3's date + formatter: "%h" for half of the year as a decimal number as + well as "%{n}f" for fractional seconds with n digits. For + example, *2016-10-13 09:15:23.456* with tickformat + "%H~%M~%S.%2f" would display *09~15~23.46*By default the values + are formatted using `yaxis.hoverformat`. + + The 'yhoverformat' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["yhoverformat"] + + @yhoverformat.setter + def yhoverformat(self, val): + self["yhoverformat"] = val + + @property + def zorder(self): + """ + Sets the layer on which this trace is displayed, relative to + other SVG traces on the same subplot. SVG traces with higher + `zorder` appear in front of those with lower `zorder`. + + The 'zorder' property is a integer and may be specified as: + - An int (or float that will be cast to an int) + + Returns + ------- + int + """ + return self["zorder"] + + @zorder.setter + def zorder(self, val): + self["zorder"] = val + + @property + def type(self): + return self._props["type"] + + @property + def _prop_descriptions(self): + return """\ + close + Sets the close values. + closesrc + Sets the source reference on Chart Studio Cloud for + `close`. + customdata + Assigns extra data each datum. This may be useful when + listening to hover, click and selection events. Note + that, "scatter" traces also appends customdata items in + the markers DOM elements + customdatasrc + Sets the source reference on Chart Studio Cloud for + `customdata`. + decreasing + :class:`plotly.graph_objects.ohlc.Decreasing` instance + or dict with compatible properties + high + Sets the high values. + highsrc + Sets the source reference on Chart Studio Cloud for + `high`. + hoverinfo + Determines which trace information appear on hover. If + `none` or `skip` are set, no information is displayed + upon hovering. But, if `none` is set, click and hover + events are still fired. + hoverinfosrc + Sets the source reference on Chart Studio Cloud for + `hoverinfo`. + hoverlabel + :class:`plotly.graph_objects.ohlc.Hoverlabel` instance + or dict with compatible properties + hovertemplate + Template string used for rendering the information that + appear on hover box. Note that this will override + `hoverinfo`. Variables are inserted using %{variable}, + for example "y: %{y}" as well as %{xother}, {%_xother}, + {%_xother_}, {%xother_}. When showing info for several + points, "xother" will be added to those with different + x positions from the first point. An underscore before + or after "(x|y)other" will add a space on that side, + only when this field is shown. Numbers are formatted + using d3-format's syntax %{variable:d3-format}, for + example "Price: %{y:$.2f}". + https://github.com/d3/d3-format/tree/v1.4.5#d3-format + for details on the formatting syntax. Dates are + formatted using d3-time-format's syntax + %{variable|d3-time-format}, for example "Day: + %{2019-01-01|%A}". https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format for details on the + date formatting syntax. Variables that can't be found + will be replaced with the specifier. For example, a + template of "data: %{x}, %{y}" will result in a value + of "data: 1, %{y}" if x is 1 and y is missing. + Variables with an undefined value will be replaced with + the fallback value. The variables available in + `hovertemplate` are the ones emitted as event data + described at this link + https://plotly.com/javascript/plotlyjs-events/#event- + data. Additionally, all attributes that can be + specified per-point (the ones that are `arrayOk: true`) + are available. Finally, the template string has access + to variables `open`, `high`, `low` and `close`. + Anything contained in tag `` is displayed in the + secondary box, for example + `%{fullData.name}`. To hide the + secondary box completely, use an empty tag + ``. + hovertemplatefallback + Fallback string that's displayed when a variable + referenced in a template is missing. If the boolean + value 'false' is passed in, the specifier with the + missing variable will be displayed. + hovertemplatesrc + Sets the source reference on Chart Studio Cloud for + `hovertemplate`. + hovertext + Same as `text`. + hovertextsrc + Sets the source reference on Chart Studio Cloud for + `hovertext`. + ids + Assigns id labels to each datum. These ids for object + constancy of data points during animation. Should be an + array of strings, not numbers or any other type. + idssrc + Sets the source reference on Chart Studio Cloud for + `ids`. + increasing + :class:`plotly.graph_objects.ohlc.Increasing` instance + or dict with compatible properties + legend + Sets the reference to a legend to show this trace in. + References to these legends are "legend", "legend2", + "legend3", etc. Settings for these legends are set in + the layout, under `layout.legend`, `layout.legend2`, + etc. + legendgroup + Sets the legend group for this trace. Traces and shapes + part of the same legend group hide/show at the same + time when toggling legend items. + legendgrouptitle + :class:`plotly.graph_objects.ohlc.Legendgrouptitle` + instance or dict with compatible properties + legendrank + Sets the legend rank for this trace. Items and groups + with smaller ranks are presented on top/left side while + with "reversed" `legend.traceorder` they are on + bottom/right side. The default legendrank is 1000, so + that you can use ranks less than 1000 to place certain + items before all unranked items, and ranks greater than + 1000 to go after all unranked items. When having + unranked or equal rank items shapes would be displayed + after traces i.e. according to their order in data and + layout. + legendwidth + Sets the width (in px or fraction) of the legend for + this trace. + line + :class:`plotly.graph_objects.ohlc.Line` instance or + dict with compatible properties + low + Sets the low values. + lowsrc + Sets the source reference on Chart Studio Cloud for + `low`. + meta + Assigns extra meta information associated with this + trace that can be used in various text attributes. + Attributes such as trace `name`, graph, axis and + colorbar `title.text`, annotation `text` + `rangeselector`, `updatemenues` and `sliders` `label` + text all support `meta`. To access the trace `meta` + values in an attribute in the same trace, simply use + `%{meta[i]}` where `i` is the index or key of the + `meta` item in question. To access trace `meta` in + layout attributes, use `%{data[n[.meta[i]}` where `i` + is the index or key of the `meta` and `n` is the trace + index. + metasrc + Sets the source reference on Chart Studio Cloud for + `meta`. + name + Sets the trace name. The trace name appears as the + legend item and on hover. + opacity + Sets the opacity of the trace. + open + Sets the open values. + opensrc + Sets the source reference on Chart Studio Cloud for + `open`. + selectedpoints + Array containing integer indices of selected points. + Has an effect only for traces that support selections. + Note that an empty array means an empty selection where + the `unselected` are turned on for all points, whereas, + any other non-array values means no selection all where + the `selected` and `unselected` styles have no effect. + showlegend + Determines whether or not an item corresponding to this + trace is shown in the legend. + stream + :class:`plotly.graph_objects.ohlc.Stream` instance or + dict with compatible properties + text + Sets hover text elements associated with each sample + point. If a single string, the same string appears over + all the data points. If an array of string, the items + are mapped in order to this trace's sample points. + textsrc + Sets the source reference on Chart Studio Cloud for + `text`. + tickwidth + Sets the width of the open/close tick marks relative to + the "x" minimal interval. + uid + Assign an id to this trace, Use this to provide object + constancy between traces during animations and + transitions. + uirevision + Controls persistence of some user-driven changes to the + trace: `constraintrange` in `parcoords` traces, as well + as some `editable: true` modifications such as `name` + and `colorbar.title`. Defaults to `layout.uirevision`. + Note that other user-driven trace attribute changes are + controlled by `layout` attributes: `trace.visible` is + controlled by `layout.legend.uirevision`, + `selectedpoints` is controlled by + `layout.selectionrevision`, and `colorbar.(x|y)` + (accessible with `config: {editable: true}`) is + controlled by `layout.editrevision`. Trace changes are + tracked by `uid`, which only falls back on trace index + if no `uid` is provided. So if your app can add/remove + traces before the end of the `data` array, such that + the same trace has a different index, you can still + preserve user-driven changes if you give each trace a + `uid` that stays with it as it moves. + visible + Determines whether or not this trace is visible. If + "legendonly", the trace is not drawn, but can appear as + a legend item (provided that the legend itself is + visible). + x + Sets the x coordinates. If absent, linear coordinate + will be generated. + xaxis + Sets a reference between this trace's x coordinates and + a 2D cartesian x axis. If "x" (the default value), the + x coordinates refer to `layout.xaxis`. If "x2", the x + coordinates refer to `layout.xaxis2`, and so on. + xcalendar + Sets the calendar system to use with `x` date data. + xhoverformat + Sets the hover text formatting rulefor `x` using d3 + formatting mini-languages which are very similar to + those in Python. For numbers, see: + https://github.com/d3/d3-format/tree/v1.4.5#d3-format. + And for dates see: https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format. We add two items to + d3's date formatter: "%h" for half of the year as a + decimal number as well as "%{n}f" for fractional + seconds with n digits. For example, *2016-10-13 + 09:15:23.456* with tickformat "%H~%M~%S.%2f" would + display *09~15~23.46*By default the values are + formatted using `xaxis.hoverformat`. + xperiod + Only relevant when the axis `type` is "date". Sets the + period positioning in milliseconds or "M" on the x + axis. Special values in the form of "M" could be + used to declare the number of months. In this case `n` + must be a positive integer. + xperiod0 + Only relevant when the axis `type` is "date". Sets the + base for period positioning in milliseconds or date + string on the x0 axis. When `x0period` is round number + of weeks, the `x0period0` by default would be on a + Sunday i.e. 2000-01-02, otherwise it would be at + 2000-01-01. + xperiodalignment + Only relevant when the axis `type` is "date". Sets the + alignment of data points on the x axis. + xsrc + Sets the source reference on Chart Studio Cloud for + `x`. + yaxis + Sets a reference between this trace's y coordinates and + a 2D cartesian y axis. If "y" (the default value), the + y coordinates refer to `layout.yaxis`. If "y2", the y + coordinates refer to `layout.yaxis2`, and so on. + yhoverformat + Sets the hover text formatting rulefor `y` using d3 + formatting mini-languages which are very similar to + those in Python. For numbers, see: + https://github.com/d3/d3-format/tree/v1.4.5#d3-format. + And for dates see: https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format. We add two items to + d3's date formatter: "%h" for half of the year as a + decimal number as well as "%{n}f" for fractional + seconds with n digits. For example, *2016-10-13 + 09:15:23.456* with tickformat "%H~%M~%S.%2f" would + display *09~15~23.46*By default the values are + formatted using `yaxis.hoverformat`. + zorder + Sets the layer on which this trace is displayed, + relative to other SVG traces on the same subplot. SVG + traces with higher `zorder` appear in front of those + with lower `zorder`. + """ + + def __init__( + self, + arg=None, + close=None, + closesrc=None, + customdata=None, + customdatasrc=None, + decreasing=None, + high=None, + highsrc=None, + hoverinfo=None, + hoverinfosrc=None, + hoverlabel=None, + hovertemplate=None, + hovertemplatefallback=None, + hovertemplatesrc=None, + hovertext=None, + hovertextsrc=None, + ids=None, + idssrc=None, + increasing=None, + legend=None, + legendgroup=None, + legendgrouptitle=None, + legendrank=None, + legendwidth=None, + line=None, + low=None, + lowsrc=None, + meta=None, + metasrc=None, + name=None, + opacity=None, + open=None, + opensrc=None, + selectedpoints=None, + showlegend=None, + stream=None, + text=None, + textsrc=None, + tickwidth=None, + uid=None, + uirevision=None, + visible=None, + x=None, + xaxis=None, + xcalendar=None, + xhoverformat=None, + xperiod=None, + xperiod0=None, + xperiodalignment=None, + xsrc=None, + yaxis=None, + yhoverformat=None, + zorder=None, + **kwargs, + ): + """ + Construct a new Ohlc object + + The ohlc (short for Open-High-Low-Close) is a style of + financial chart describing open, high, low and close for a + given `x` coordinate (most likely time). The tip of the lines + represent the `low` and `high` values and the horizontal + segments represent the `open` and `close` values. Sample points + where the close value is higher (lower) then the open value are + called increasing (decreasing). By default, increasing items + are drawn in green whereas decreasing are drawn in red. + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of :class:`plotly.graph_objs.Ohlc` + close + Sets the close values. + closesrc + Sets the source reference on Chart Studio Cloud for + `close`. + customdata + Assigns extra data each datum. This may be useful when + listening to hover, click and selection events. Note + that, "scatter" traces also appends customdata items in + the markers DOM elements + customdatasrc + Sets the source reference on Chart Studio Cloud for + `customdata`. + decreasing + :class:`plotly.graph_objects.ohlc.Decreasing` instance + or dict with compatible properties + high + Sets the high values. + highsrc + Sets the source reference on Chart Studio Cloud for + `high`. + hoverinfo + Determines which trace information appear on hover. If + `none` or `skip` are set, no information is displayed + upon hovering. But, if `none` is set, click and hover + events are still fired. + hoverinfosrc + Sets the source reference on Chart Studio Cloud for + `hoverinfo`. + hoverlabel + :class:`plotly.graph_objects.ohlc.Hoverlabel` instance + or dict with compatible properties + hovertemplate + Template string used for rendering the information that + appear on hover box. Note that this will override + `hoverinfo`. Variables are inserted using %{variable}, + for example "y: %{y}" as well as %{xother}, {%_xother}, + {%_xother_}, {%xother_}. When showing info for several + points, "xother" will be added to those with different + x positions from the first point. An underscore before + or after "(x|y)other" will add a space on that side, + only when this field is shown. Numbers are formatted + using d3-format's syntax %{variable:d3-format}, for + example "Price: %{y:$.2f}". + https://github.com/d3/d3-format/tree/v1.4.5#d3-format + for details on the formatting syntax. Dates are + formatted using d3-time-format's syntax + %{variable|d3-time-format}, for example "Day: + %{2019-01-01|%A}". https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format for details on the + date formatting syntax. Variables that can't be found + will be replaced with the specifier. For example, a + template of "data: %{x}, %{y}" will result in a value + of "data: 1, %{y}" if x is 1 and y is missing. + Variables with an undefined value will be replaced with + the fallback value. The variables available in + `hovertemplate` are the ones emitted as event data + described at this link + https://plotly.com/javascript/plotlyjs-events/#event- + data. Additionally, all attributes that can be + specified per-point (the ones that are `arrayOk: true`) + are available. Finally, the template string has access + to variables `open`, `high`, `low` and `close`. + Anything contained in tag `` is displayed in the + secondary box, for example + `%{fullData.name}`. To hide the + secondary box completely, use an empty tag + ``. + hovertemplatefallback + Fallback string that's displayed when a variable + referenced in a template is missing. If the boolean + value 'false' is passed in, the specifier with the + missing variable will be displayed. + hovertemplatesrc + Sets the source reference on Chart Studio Cloud for + `hovertemplate`. + hovertext + Same as `text`. + hovertextsrc + Sets the source reference on Chart Studio Cloud for + `hovertext`. + ids + Assigns id labels to each datum. These ids for object + constancy of data points during animation. Should be an + array of strings, not numbers or any other type. + idssrc + Sets the source reference on Chart Studio Cloud for + `ids`. + increasing + :class:`plotly.graph_objects.ohlc.Increasing` instance + or dict with compatible properties + legend + Sets the reference to a legend to show this trace in. + References to these legends are "legend", "legend2", + "legend3", etc. Settings for these legends are set in + the layout, under `layout.legend`, `layout.legend2`, + etc. + legendgroup + Sets the legend group for this trace. Traces and shapes + part of the same legend group hide/show at the same + time when toggling legend items. + legendgrouptitle + :class:`plotly.graph_objects.ohlc.Legendgrouptitle` + instance or dict with compatible properties + legendrank + Sets the legend rank for this trace. Items and groups + with smaller ranks are presented on top/left side while + with "reversed" `legend.traceorder` they are on + bottom/right side. The default legendrank is 1000, so + that you can use ranks less than 1000 to place certain + items before all unranked items, and ranks greater than + 1000 to go after all unranked items. When having + unranked or equal rank items shapes would be displayed + after traces i.e. according to their order in data and + layout. + legendwidth + Sets the width (in px or fraction) of the legend for + this trace. + line + :class:`plotly.graph_objects.ohlc.Line` instance or + dict with compatible properties + low + Sets the low values. + lowsrc + Sets the source reference on Chart Studio Cloud for + `low`. + meta + Assigns extra meta information associated with this + trace that can be used in various text attributes. + Attributes such as trace `name`, graph, axis and + colorbar `title.text`, annotation `text` + `rangeselector`, `updatemenues` and `sliders` `label` + text all support `meta`. To access the trace `meta` + values in an attribute in the same trace, simply use + `%{meta[i]}` where `i` is the index or key of the + `meta` item in question. To access trace `meta` in + layout attributes, use `%{data[n[.meta[i]}` where `i` + is the index or key of the `meta` and `n` is the trace + index. + metasrc + Sets the source reference on Chart Studio Cloud for + `meta`. + name + Sets the trace name. The trace name appears as the + legend item and on hover. + opacity + Sets the opacity of the trace. + open + Sets the open values. + opensrc + Sets the source reference on Chart Studio Cloud for + `open`. + selectedpoints + Array containing integer indices of selected points. + Has an effect only for traces that support selections. + Note that an empty array means an empty selection where + the `unselected` are turned on for all points, whereas, + any other non-array values means no selection all where + the `selected` and `unselected` styles have no effect. + showlegend + Determines whether or not an item corresponding to this + trace is shown in the legend. + stream + :class:`plotly.graph_objects.ohlc.Stream` instance or + dict with compatible properties + text + Sets hover text elements associated with each sample + point. If a single string, the same string appears over + all the data points. If an array of string, the items + are mapped in order to this trace's sample points. + textsrc + Sets the source reference on Chart Studio Cloud for + `text`. + tickwidth + Sets the width of the open/close tick marks relative to + the "x" minimal interval. + uid + Assign an id to this trace, Use this to provide object + constancy between traces during animations and + transitions. + uirevision + Controls persistence of some user-driven changes to the + trace: `constraintrange` in `parcoords` traces, as well + as some `editable: true` modifications such as `name` + and `colorbar.title`. Defaults to `layout.uirevision`. + Note that other user-driven trace attribute changes are + controlled by `layout` attributes: `trace.visible` is + controlled by `layout.legend.uirevision`, + `selectedpoints` is controlled by + `layout.selectionrevision`, and `colorbar.(x|y)` + (accessible with `config: {editable: true}`) is + controlled by `layout.editrevision`. Trace changes are + tracked by `uid`, which only falls back on trace index + if no `uid` is provided. So if your app can add/remove + traces before the end of the `data` array, such that + the same trace has a different index, you can still + preserve user-driven changes if you give each trace a + `uid` that stays with it as it moves. + visible + Determines whether or not this trace is visible. If + "legendonly", the trace is not drawn, but can appear as + a legend item (provided that the legend itself is + visible). + x + Sets the x coordinates. If absent, linear coordinate + will be generated. + xaxis + Sets a reference between this trace's x coordinates and + a 2D cartesian x axis. If "x" (the default value), the + x coordinates refer to `layout.xaxis`. If "x2", the x + coordinates refer to `layout.xaxis2`, and so on. + xcalendar + Sets the calendar system to use with `x` date data. + xhoverformat + Sets the hover text formatting rulefor `x` using d3 + formatting mini-languages which are very similar to + those in Python. For numbers, see: + https://github.com/d3/d3-format/tree/v1.4.5#d3-format. + And for dates see: https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format. We add two items to + d3's date formatter: "%h" for half of the year as a + decimal number as well as "%{n}f" for fractional + seconds with n digits. For example, *2016-10-13 + 09:15:23.456* with tickformat "%H~%M~%S.%2f" would + display *09~15~23.46*By default the values are + formatted using `xaxis.hoverformat`. + xperiod + Only relevant when the axis `type` is "date". Sets the + period positioning in milliseconds or "M" on the x + axis. Special values in the form of "M" could be + used to declare the number of months. In this case `n` + must be a positive integer. + xperiod0 + Only relevant when the axis `type` is "date". Sets the + base for period positioning in milliseconds or date + string on the x0 axis. When `x0period` is round number + of weeks, the `x0period0` by default would be on a + Sunday i.e. 2000-01-02, otherwise it would be at + 2000-01-01. + xperiodalignment + Only relevant when the axis `type` is "date". Sets the + alignment of data points on the x axis. + xsrc + Sets the source reference on Chart Studio Cloud for + `x`. + yaxis + Sets a reference between this trace's y coordinates and + a 2D cartesian y axis. If "y" (the default value), the + y coordinates refer to `layout.yaxis`. If "y2", the y + coordinates refer to `layout.yaxis2`, and so on. + yhoverformat + Sets the hover text formatting rulefor `y` using d3 + formatting mini-languages which are very similar to + those in Python. For numbers, see: + https://github.com/d3/d3-format/tree/v1.4.5#d3-format. + And for dates see: https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format. We add two items to + d3's date formatter: "%h" for half of the year as a + decimal number as well as "%{n}f" for fractional + seconds with n digits. For example, *2016-10-13 + 09:15:23.456* with tickformat "%H~%M~%S.%2f" would + display *09~15~23.46*By default the values are + formatted using `yaxis.hoverformat`. + zorder + Sets the layer on which this trace is displayed, + relative to other SVG traces on the same subplot. SVG + traces with higher `zorder` appear in front of those + with lower `zorder`. + + Returns + ------- + Ohlc + """ + super().__init__("ohlc") + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + if arg is None: + arg = {} + elif isinstance(arg, self.__class__): + arg = arg.to_plotly_json() + elif isinstance(arg, dict): + arg = _copy.copy(arg) + else: + raise ValueError("""\ +The first argument to the plotly.graph_objs.Ohlc +constructor must be a dict or +an instance of :class:`plotly.graph_objs.Ohlc`""") + + self._skip_invalid = kwargs.pop("skip_invalid", False) + self._validate = kwargs.pop("_validate", True) + + self._set_property("close", arg, close) + self._set_property("closesrc", arg, closesrc) + self._set_property("customdata", arg, customdata) + self._set_property("customdatasrc", arg, customdatasrc) + self._set_property("decreasing", arg, decreasing) + self._set_property("high", arg, high) + self._set_property("highsrc", arg, highsrc) + self._set_property("hoverinfo", arg, hoverinfo) + self._set_property("hoverinfosrc", arg, hoverinfosrc) + self._set_property("hoverlabel", arg, hoverlabel) + self._set_property("hovertemplate", arg, hovertemplate) + self._set_property("hovertemplatefallback", arg, hovertemplatefallback) + self._set_property("hovertemplatesrc", arg, hovertemplatesrc) + self._set_property("hovertext", arg, hovertext) + self._set_property("hovertextsrc", arg, hovertextsrc) + self._set_property("ids", arg, ids) + self._set_property("idssrc", arg, idssrc) + self._set_property("increasing", arg, increasing) + self._set_property("legend", arg, legend) + self._set_property("legendgroup", arg, legendgroup) + self._set_property("legendgrouptitle", arg, legendgrouptitle) + self._set_property("legendrank", arg, legendrank) + self._set_property("legendwidth", arg, legendwidth) + self._set_property("line", arg, line) + self._set_property("low", arg, low) + self._set_property("lowsrc", arg, lowsrc) + self._set_property("meta", arg, meta) + self._set_property("metasrc", arg, metasrc) + self._set_property("name", arg, name) + self._set_property("opacity", arg, opacity) + self._set_property("open", arg, open) + self._set_property("opensrc", arg, opensrc) + self._set_property("selectedpoints", arg, selectedpoints) + self._set_property("showlegend", arg, showlegend) + self._set_property("stream", arg, stream) + self._set_property("text", arg, text) + self._set_property("textsrc", arg, textsrc) + self._set_property("tickwidth", arg, tickwidth) + self._set_property("uid", arg, uid) + self._set_property("uirevision", arg, uirevision) + self._set_property("visible", arg, visible) + self._set_property("x", arg, x) + self._set_property("xaxis", arg, xaxis) + self._set_property("xcalendar", arg, xcalendar) + self._set_property("xhoverformat", arg, xhoverformat) + self._set_property("xperiod", arg, xperiod) + self._set_property("xperiod0", arg, xperiod0) + self._set_property("xperiodalignment", arg, xperiodalignment) + self._set_property("xsrc", arg, xsrc) + self._set_property("yaxis", arg, yaxis) + self._set_property("yhoverformat", arg, yhoverformat) + self._set_property("zorder", arg, zorder) + + self._props["type"] = "ohlc" + arg.pop("type", None) + self._process_kwargs(**dict(arg, **kwargs)) + self._skip_invalid = False diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/_parcats.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/_parcats.py new file mode 100644 index 0000000000000000000000000000000000000000..2c444dd54ebc7b72e8ece941d03c8efb21682633 --- /dev/null +++ b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/_parcats.py @@ -0,0 +1,971 @@ +# --- THIS FILE IS AUTO-GENERATED --- +# Modifications will be overwitten the next time code generation run. + +from plotly.basedatatypes import BaseTraceType as _BaseTraceType +import copy as _copy + + +class Parcats(_BaseTraceType): + _parent_path_str = "" + _path_str = "parcats" + _valid_props = { + "arrangement", + "bundlecolors", + "counts", + "countssrc", + "dimensiondefaults", + "dimensions", + "domain", + "hoverinfo", + "hoveron", + "hovertemplate", + "hovertemplatefallback", + "labelfont", + "legendgrouptitle", + "legendwidth", + "line", + "meta", + "metasrc", + "name", + "sortpaths", + "stream", + "tickfont", + "type", + "uid", + "uirevision", + "visible", + } + + @property + def arrangement(self): + """ + Sets the drag interaction mode for categories and dimensions. + If `perpendicular`, the categories can only move along a line + perpendicular to the paths. If `freeform`, the categories can + freely move on the plane. If `fixed`, the categories and + dimensions are stationary. + + The 'arrangement' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['perpendicular', 'freeform', 'fixed'] + + Returns + ------- + Any + """ + return self["arrangement"] + + @arrangement.setter + def arrangement(self, val): + self["arrangement"] = val + + @property + def bundlecolors(self): + """ + Sort paths so that like colors are bundled together within each + category. + + The 'bundlecolors' property is a boolean and must be specified as: + - A boolean value: True or False + + Returns + ------- + bool + """ + return self["bundlecolors"] + + @bundlecolors.setter + def bundlecolors(self, val): + self["bundlecolors"] = val + + @property + def counts(self): + """ + The number of observations represented by each state. Defaults + to 1 so that each state represents one observation + + The 'counts' property is a number and may be specified as: + - An int or float in the interval [0, inf] + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + int|float|numpy.ndarray + """ + return self["counts"] + + @counts.setter + def counts(self, val): + self["counts"] = val + + @property + def countssrc(self): + """ + Sets the source reference on Chart Studio Cloud for `counts`. + + The 'countssrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["countssrc"] + + @countssrc.setter + def countssrc(self, val): + self["countssrc"] = val + + @property + def dimensions(self): + """ + The dimensions (variables) of the parallel categories diagram. + + The 'dimensions' property is a tuple of instances of + Dimension that may be specified as: + - A list or tuple of instances of plotly.graph_objs.parcats.Dimension + - A list or tuple of dicts of string/value properties that + will be passed to the Dimension constructor + + Returns + ------- + tuple[plotly.graph_objs.parcats.Dimension] + """ + return self["dimensions"] + + @dimensions.setter + def dimensions(self, val): + self["dimensions"] = val + + @property + def dimensiondefaults(self): + """ + When used in a template (as + layout.template.data.parcats.dimensiondefaults), sets the + default property values to use for elements of + parcats.dimensions + + The 'dimensiondefaults' property is an instance of Dimension + that may be specified as: + - An instance of :class:`plotly.graph_objs.parcats.Dimension` + - A dict of string/value properties that will be passed + to the Dimension constructor + + Returns + ------- + plotly.graph_objs.parcats.Dimension + """ + return self["dimensiondefaults"] + + @dimensiondefaults.setter + def dimensiondefaults(self, val): + self["dimensiondefaults"] = val + + @property + def domain(self): + """ + The 'domain' property is an instance of Domain + that may be specified as: + - An instance of :class:`plotly.graph_objs.parcats.Domain` + - A dict of string/value properties that will be passed + to the Domain constructor + + Returns + ------- + plotly.graph_objs.parcats.Domain + """ + return self["domain"] + + @domain.setter + def domain(self, val): + self["domain"] = val + + @property + def hoverinfo(self): + """ + Determines which trace information appear on hover. If `none` + or `skip` are set, no information is displayed upon hovering. + But, if `none` is set, click and hover events are still fired. + + The 'hoverinfo' property is a flaglist and may be specified + as a string containing: + - Any combination of ['count', 'probability'] joined with '+' characters + (e.g. 'count+probability') + OR exactly one of ['all', 'none', 'skip'] (e.g. 'skip') + + Returns + ------- + Any + """ + return self["hoverinfo"] + + @hoverinfo.setter + def hoverinfo(self, val): + self["hoverinfo"] = val + + @property + def hoveron(self): + """ + Sets the hover interaction mode for the parcats diagram. If + `category`, hover interaction take place per category. If + `color`, hover interactions take place per color per category. + If `dimension`, hover interactions take place across all + categories per dimension. + + The 'hoveron' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['category', 'color', 'dimension'] + + Returns + ------- + Any + """ + return self["hoveron"] + + @hoveron.setter + def hoveron(self, val): + self["hoveron"] = val + + @property + def hovertemplate(self): + """ + Template string used for rendering the information that appear + on hover box. Note that this will override `hoverinfo`. + Variables are inserted using %{variable}, for example "y: %{y}" + as well as %{xother}, {%_xother}, {%_xother_}, {%xother_}. When + showing info for several points, "xother" will be added to + those with different x positions from the first point. An + underscore before or after "(x|y)other" will add a space on + that side, only when this field is shown. Numbers are formatted + using d3-format's syntax %{variable:d3-format}, for example + "Price: %{y:$.2f}". + https://github.com/d3/d3-format/tree/v1.4.5#d3-format for + details on the formatting syntax. Dates are formatted using + d3-time-format's syntax %{variable|d3-time-format}, for example + "Day: %{2019-01-01|%A}". https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format for details on the date + formatting syntax. Variables that can't be found will be + replaced with the specifier. For example, a template of "data: + %{x}, %{y}" will result in a value of "data: 1, %{y}" if x is 1 + and y is missing. Variables with an undefined value will be + replaced with the fallback value. The variables available in + `hovertemplate` are the ones emitted as event data described at + this link https://plotly.com/javascript/plotlyjs-events/#event- + data. Additionally, all attributes that can be specified per- + point (the ones that are `arrayOk: true`) are available. + Finally, the template string has access to variables `count`, + `probability`, `category`, `categorycount`, `colorcount` and + `bandcolorcount`. Anything contained in tag `` is + displayed in the secondary box, for example + `%{fullData.name}`. To hide the secondary box + completely, use an empty tag ``. + + The 'hovertemplate' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["hovertemplate"] + + @hovertemplate.setter + def hovertemplate(self, val): + self["hovertemplate"] = val + + @property + def hovertemplatefallback(self): + """ + Fallback string that's displayed when a variable referenced in + a template is missing. If the boolean value 'false' is passed + in, the specifier with the missing variable will be displayed. + + The 'hovertemplatefallback' property accepts values of any type + + Returns + ------- + Any + """ + return self["hovertemplatefallback"] + + @hovertemplatefallback.setter + def hovertemplatefallback(self, val): + self["hovertemplatefallback"] = val + + @property + def labelfont(self): + """ + Sets the font for the `dimension` labels. + + The 'labelfont' property is an instance of Labelfont + that may be specified as: + - An instance of :class:`plotly.graph_objs.parcats.Labelfont` + - A dict of string/value properties that will be passed + to the Labelfont constructor + + Returns + ------- + plotly.graph_objs.parcats.Labelfont + """ + return self["labelfont"] + + @labelfont.setter + def labelfont(self, val): + self["labelfont"] = val + + @property + def legendgrouptitle(self): + """ + The 'legendgrouptitle' property is an instance of Legendgrouptitle + that may be specified as: + - An instance of :class:`plotly.graph_objs.parcats.Legendgrouptitle` + - A dict of string/value properties that will be passed + to the Legendgrouptitle constructor + + Returns + ------- + plotly.graph_objs.parcats.Legendgrouptitle + """ + return self["legendgrouptitle"] + + @legendgrouptitle.setter + def legendgrouptitle(self, val): + self["legendgrouptitle"] = val + + @property + def legendwidth(self): + """ + Sets the width (in px or fraction) of the legend for this + trace. + + The 'legendwidth' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["legendwidth"] + + @legendwidth.setter + def legendwidth(self, val): + self["legendwidth"] = val + + @property + def line(self): + """ + The 'line' property is an instance of Line + that may be specified as: + - An instance of :class:`plotly.graph_objs.parcats.Line` + - A dict of string/value properties that will be passed + to the Line constructor + + Returns + ------- + plotly.graph_objs.parcats.Line + """ + return self["line"] + + @line.setter + def line(self, val): + self["line"] = val + + @property + def meta(self): + """ + Assigns extra meta information associated with this trace that + can be used in various text attributes. Attributes such as + trace `name`, graph, axis and colorbar `title.text`, annotation + `text` `rangeselector`, `updatemenues` and `sliders` `label` + text all support `meta`. To access the trace `meta` values in + an attribute in the same trace, simply use `%{meta[i]}` where + `i` is the index or key of the `meta` item in question. To + access trace `meta` in layout attributes, use + `%{data[n[.meta[i]}` where `i` is the index or key of the + `meta` and `n` is the trace index. + + The 'meta' property accepts values of any type + + Returns + ------- + Any|numpy.ndarray + """ + return self["meta"] + + @meta.setter + def meta(self, val): + self["meta"] = val + + @property + def metasrc(self): + """ + Sets the source reference on Chart Studio Cloud for `meta`. + + The 'metasrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["metasrc"] + + @metasrc.setter + def metasrc(self, val): + self["metasrc"] = val + + @property + def name(self): + """ + Sets the trace name. The trace name appears as the legend item + and on hover. + + The 'name' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["name"] + + @name.setter + def name(self, val): + self["name"] = val + + @property + def sortpaths(self): + """ + Sets the path sorting algorithm. If `forward`, sort paths based + on dimension categories from left to right. If `backward`, sort + paths based on dimensions categories from right to left. + + The 'sortpaths' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['forward', 'backward'] + + Returns + ------- + Any + """ + return self["sortpaths"] + + @sortpaths.setter + def sortpaths(self, val): + self["sortpaths"] = val + + @property + def stream(self): + """ + The 'stream' property is an instance of Stream + that may be specified as: + - An instance of :class:`plotly.graph_objs.parcats.Stream` + - A dict of string/value properties that will be passed + to the Stream constructor + + Returns + ------- + plotly.graph_objs.parcats.Stream + """ + return self["stream"] + + @stream.setter + def stream(self, val): + self["stream"] = val + + @property + def tickfont(self): + """ + Sets the font for the `category` labels. + + The 'tickfont' property is an instance of Tickfont + that may be specified as: + - An instance of :class:`plotly.graph_objs.parcats.Tickfont` + - A dict of string/value properties that will be passed + to the Tickfont constructor + + Returns + ------- + plotly.graph_objs.parcats.Tickfont + """ + return self["tickfont"] + + @tickfont.setter + def tickfont(self, val): + self["tickfont"] = val + + @property + def uid(self): + """ + Assign an id to this trace, Use this to provide object + constancy between traces during animations and transitions. + + The 'uid' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["uid"] + + @uid.setter + def uid(self, val): + self["uid"] = val + + @property + def uirevision(self): + """ + Controls persistence of some user-driven changes to the trace: + `constraintrange` in `parcoords` traces, as well as some + `editable: true` modifications such as `name` and + `colorbar.title`. Defaults to `layout.uirevision`. Note that + other user-driven trace attribute changes are controlled by + `layout` attributes: `trace.visible` is controlled by + `layout.legend.uirevision`, `selectedpoints` is controlled by + `layout.selectionrevision`, and `colorbar.(x|y)` (accessible + with `config: {editable: true}`) is controlled by + `layout.editrevision`. Trace changes are tracked by `uid`, + which only falls back on trace index if no `uid` is provided. + So if your app can add/remove traces before the end of the + `data` array, such that the same trace has a different index, + you can still preserve user-driven changes if you give each + trace a `uid` that stays with it as it moves. + + The 'uirevision' property accepts values of any type + + Returns + ------- + Any + """ + return self["uirevision"] + + @uirevision.setter + def uirevision(self, val): + self["uirevision"] = val + + @property + def visible(self): + """ + Determines whether or not this trace is visible. If + "legendonly", the trace is not drawn, but can appear as a + legend item (provided that the legend itself is visible). + + The 'visible' property is an enumeration that may be specified as: + - One of the following enumeration values: + [True, False, 'legendonly'] + + Returns + ------- + Any + """ + return self["visible"] + + @visible.setter + def visible(self, val): + self["visible"] = val + + @property + def type(self): + return self._props["type"] + + @property + def _prop_descriptions(self): + return """\ + arrangement + Sets the drag interaction mode for categories and + dimensions. If `perpendicular`, the categories can only + move along a line perpendicular to the paths. If + `freeform`, the categories can freely move on the + plane. If `fixed`, the categories and dimensions are + stationary. + bundlecolors + Sort paths so that like colors are bundled together + within each category. + counts + The number of observations represented by each state. + Defaults to 1 so that each state represents one + observation + countssrc + Sets the source reference on Chart Studio Cloud for + `counts`. + dimensions + The dimensions (variables) of the parallel categories + diagram. + dimensiondefaults + When used in a template (as + layout.template.data.parcats.dimensiondefaults), sets + the default property values to use for elements of + parcats.dimensions + domain + :class:`plotly.graph_objects.parcats.Domain` instance + or dict with compatible properties + hoverinfo + Determines which trace information appear on hover. If + `none` or `skip` are set, no information is displayed + upon hovering. But, if `none` is set, click and hover + events are still fired. + hoveron + Sets the hover interaction mode for the parcats + diagram. If `category`, hover interaction take place + per category. If `color`, hover interactions take place + per color per category. If `dimension`, hover + interactions take place across all categories per + dimension. + hovertemplate + Template string used for rendering the information that + appear on hover box. Note that this will override + `hoverinfo`. Variables are inserted using %{variable}, + for example "y: %{y}" as well as %{xother}, {%_xother}, + {%_xother_}, {%xother_}. When showing info for several + points, "xother" will be added to those with different + x positions from the first point. An underscore before + or after "(x|y)other" will add a space on that side, + only when this field is shown. Numbers are formatted + using d3-format's syntax %{variable:d3-format}, for + example "Price: %{y:$.2f}". + https://github.com/d3/d3-format/tree/v1.4.5#d3-format + for details on the formatting syntax. Dates are + formatted using d3-time-format's syntax + %{variable|d3-time-format}, for example "Day: + %{2019-01-01|%A}". https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format for details on the + date formatting syntax. Variables that can't be found + will be replaced with the specifier. For example, a + template of "data: %{x}, %{y}" will result in a value + of "data: 1, %{y}" if x is 1 and y is missing. + Variables with an undefined value will be replaced with + the fallback value. The variables available in + `hovertemplate` are the ones emitted as event data + described at this link + https://plotly.com/javascript/plotlyjs-events/#event- + data. Additionally, all attributes that can be + specified per-point (the ones that are `arrayOk: true`) + are available. Finally, the template string has access + to variables `count`, `probability`, `category`, + `categorycount`, `colorcount` and `bandcolorcount`. + Anything contained in tag `` is displayed in the + secondary box, for example + `%{fullData.name}`. To hide the + secondary box completely, use an empty tag + ``. + hovertemplatefallback + Fallback string that's displayed when a variable + referenced in a template is missing. If the boolean + value 'false' is passed in, the specifier with the + missing variable will be displayed. + labelfont + Sets the font for the `dimension` labels. + legendgrouptitle + :class:`plotly.graph_objects.parcats.Legendgrouptitle` + instance or dict with compatible properties + legendwidth + Sets the width (in px or fraction) of the legend for + this trace. + line + :class:`plotly.graph_objects.parcats.Line` instance or + dict with compatible properties + meta + Assigns extra meta information associated with this + trace that can be used in various text attributes. + Attributes such as trace `name`, graph, axis and + colorbar `title.text`, annotation `text` + `rangeselector`, `updatemenues` and `sliders` `label` + text all support `meta`. To access the trace `meta` + values in an attribute in the same trace, simply use + `%{meta[i]}` where `i` is the index or key of the + `meta` item in question. To access trace `meta` in + layout attributes, use `%{data[n[.meta[i]}` where `i` + is the index or key of the `meta` and `n` is the trace + index. + metasrc + Sets the source reference on Chart Studio Cloud for + `meta`. + name + Sets the trace name. The trace name appears as the + legend item and on hover. + sortpaths + Sets the path sorting algorithm. If `forward`, sort + paths based on dimension categories from left to right. + If `backward`, sort paths based on dimensions + categories from right to left. + stream + :class:`plotly.graph_objects.parcats.Stream` instance + or dict with compatible properties + tickfont + Sets the font for the `category` labels. + uid + Assign an id to this trace, Use this to provide object + constancy between traces during animations and + transitions. + uirevision + Controls persistence of some user-driven changes to the + trace: `constraintrange` in `parcoords` traces, as well + as some `editable: true` modifications such as `name` + and `colorbar.title`. Defaults to `layout.uirevision`. + Note that other user-driven trace attribute changes are + controlled by `layout` attributes: `trace.visible` is + controlled by `layout.legend.uirevision`, + `selectedpoints` is controlled by + `layout.selectionrevision`, and `colorbar.(x|y)` + (accessible with `config: {editable: true}`) is + controlled by `layout.editrevision`. Trace changes are + tracked by `uid`, which only falls back on trace index + if no `uid` is provided. So if your app can add/remove + traces before the end of the `data` array, such that + the same trace has a different index, you can still + preserve user-driven changes if you give each trace a + `uid` that stays with it as it moves. + visible + Determines whether or not this trace is visible. If + "legendonly", the trace is not drawn, but can appear as + a legend item (provided that the legend itself is + visible). + """ + + def __init__( + self, + arg=None, + arrangement=None, + bundlecolors=None, + counts=None, + countssrc=None, + dimensions=None, + dimensiondefaults=None, + domain=None, + hoverinfo=None, + hoveron=None, + hovertemplate=None, + hovertemplatefallback=None, + labelfont=None, + legendgrouptitle=None, + legendwidth=None, + line=None, + meta=None, + metasrc=None, + name=None, + sortpaths=None, + stream=None, + tickfont=None, + uid=None, + uirevision=None, + visible=None, + **kwargs, + ): + """ + Construct a new Parcats object + + Parallel categories diagram for multidimensional categorical + data. + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of :class:`plotly.graph_objs.Parcats` + arrangement + Sets the drag interaction mode for categories and + dimensions. If `perpendicular`, the categories can only + move along a line perpendicular to the paths. If + `freeform`, the categories can freely move on the + plane. If `fixed`, the categories and dimensions are + stationary. + bundlecolors + Sort paths so that like colors are bundled together + within each category. + counts + The number of observations represented by each state. + Defaults to 1 so that each state represents one + observation + countssrc + Sets the source reference on Chart Studio Cloud for + `counts`. + dimensions + The dimensions (variables) of the parallel categories + diagram. + dimensiondefaults + When used in a template (as + layout.template.data.parcats.dimensiondefaults), sets + the default property values to use for elements of + parcats.dimensions + domain + :class:`plotly.graph_objects.parcats.Domain` instance + or dict with compatible properties + hoverinfo + Determines which trace information appear on hover. If + `none` or `skip` are set, no information is displayed + upon hovering. But, if `none` is set, click and hover + events are still fired. + hoveron + Sets the hover interaction mode for the parcats + diagram. If `category`, hover interaction take place + per category. If `color`, hover interactions take place + per color per category. If `dimension`, hover + interactions take place across all categories per + dimension. + hovertemplate + Template string used for rendering the information that + appear on hover box. Note that this will override + `hoverinfo`. Variables are inserted using %{variable}, + for example "y: %{y}" as well as %{xother}, {%_xother}, + {%_xother_}, {%xother_}. When showing info for several + points, "xother" will be added to those with different + x positions from the first point. An underscore before + or after "(x|y)other" will add a space on that side, + only when this field is shown. Numbers are formatted + using d3-format's syntax %{variable:d3-format}, for + example "Price: %{y:$.2f}". + https://github.com/d3/d3-format/tree/v1.4.5#d3-format + for details on the formatting syntax. Dates are + formatted using d3-time-format's syntax + %{variable|d3-time-format}, for example "Day: + %{2019-01-01|%A}". https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format for details on the + date formatting syntax. Variables that can't be found + will be replaced with the specifier. For example, a + template of "data: %{x}, %{y}" will result in a value + of "data: 1, %{y}" if x is 1 and y is missing. + Variables with an undefined value will be replaced with + the fallback value. The variables available in + `hovertemplate` are the ones emitted as event data + described at this link + https://plotly.com/javascript/plotlyjs-events/#event- + data. Additionally, all attributes that can be + specified per-point (the ones that are `arrayOk: true`) + are available. Finally, the template string has access + to variables `count`, `probability`, `category`, + `categorycount`, `colorcount` and `bandcolorcount`. + Anything contained in tag `` is displayed in the + secondary box, for example + `%{fullData.name}`. To hide the + secondary box completely, use an empty tag + ``. + hovertemplatefallback + Fallback string that's displayed when a variable + referenced in a template is missing. If the boolean + value 'false' is passed in, the specifier with the + missing variable will be displayed. + labelfont + Sets the font for the `dimension` labels. + legendgrouptitle + :class:`plotly.graph_objects.parcats.Legendgrouptitle` + instance or dict with compatible properties + legendwidth + Sets the width (in px or fraction) of the legend for + this trace. + line + :class:`plotly.graph_objects.parcats.Line` instance or + dict with compatible properties + meta + Assigns extra meta information associated with this + trace that can be used in various text attributes. + Attributes such as trace `name`, graph, axis and + colorbar `title.text`, annotation `text` + `rangeselector`, `updatemenues` and `sliders` `label` + text all support `meta`. To access the trace `meta` + values in an attribute in the same trace, simply use + `%{meta[i]}` where `i` is the index or key of the + `meta` item in question. To access trace `meta` in + layout attributes, use `%{data[n[.meta[i]}` where `i` + is the index or key of the `meta` and `n` is the trace + index. + metasrc + Sets the source reference on Chart Studio Cloud for + `meta`. + name + Sets the trace name. The trace name appears as the + legend item and on hover. + sortpaths + Sets the path sorting algorithm. If `forward`, sort + paths based on dimension categories from left to right. + If `backward`, sort paths based on dimensions + categories from right to left. + stream + :class:`plotly.graph_objects.parcats.Stream` instance + or dict with compatible properties + tickfont + Sets the font for the `category` labels. + uid + Assign an id to this trace, Use this to provide object + constancy between traces during animations and + transitions. + uirevision + Controls persistence of some user-driven changes to the + trace: `constraintrange` in `parcoords` traces, as well + as some `editable: true` modifications such as `name` + and `colorbar.title`. Defaults to `layout.uirevision`. + Note that other user-driven trace attribute changes are + controlled by `layout` attributes: `trace.visible` is + controlled by `layout.legend.uirevision`, + `selectedpoints` is controlled by + `layout.selectionrevision`, and `colorbar.(x|y)` + (accessible with `config: {editable: true}`) is + controlled by `layout.editrevision`. Trace changes are + tracked by `uid`, which only falls back on trace index + if no `uid` is provided. So if your app can add/remove + traces before the end of the `data` array, such that + the same trace has a different index, you can still + preserve user-driven changes if you give each trace a + `uid` that stays with it as it moves. + visible + Determines whether or not this trace is visible. If + "legendonly", the trace is not drawn, but can appear as + a legend item (provided that the legend itself is + visible). + + Returns + ------- + Parcats + """ + super().__init__("parcats") + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + if arg is None: + arg = {} + elif isinstance(arg, self.__class__): + arg = arg.to_plotly_json() + elif isinstance(arg, dict): + arg = _copy.copy(arg) + else: + raise ValueError("""\ +The first argument to the plotly.graph_objs.Parcats +constructor must be a dict or +an instance of :class:`plotly.graph_objs.Parcats`""") + + self._skip_invalid = kwargs.pop("skip_invalid", False) + self._validate = kwargs.pop("_validate", True) + + self._set_property("arrangement", arg, arrangement) + self._set_property("bundlecolors", arg, bundlecolors) + self._set_property("counts", arg, counts) + self._set_property("countssrc", arg, countssrc) + self._set_property("dimensions", arg, dimensions) + self._set_property("dimensiondefaults", arg, dimensiondefaults) + self._set_property("domain", arg, domain) + self._set_property("hoverinfo", arg, hoverinfo) + self._set_property("hoveron", arg, hoveron) + self._set_property("hovertemplate", arg, hovertemplate) + self._set_property("hovertemplatefallback", arg, hovertemplatefallback) + self._set_property("labelfont", arg, labelfont) + self._set_property("legendgrouptitle", arg, legendgrouptitle) + self._set_property("legendwidth", arg, legendwidth) + self._set_property("line", arg, line) + self._set_property("meta", arg, meta) + self._set_property("metasrc", arg, metasrc) + self._set_property("name", arg, name) + self._set_property("sortpaths", arg, sortpaths) + self._set_property("stream", arg, stream) + self._set_property("tickfont", arg, tickfont) + self._set_property("uid", arg, uid) + self._set_property("uirevision", arg, uirevision) + self._set_property("visible", arg, visible) + + self._props["type"] = "parcats" + arg.pop("type", None) + self._process_kwargs(**dict(arg, **kwargs)) + self._skip_invalid = False diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/_parcoords.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/_parcoords.py new file mode 100644 index 0000000000000000000000000000000000000000..b2ab85ef2b77b26b0422437b3c4ece9cc16d249d --- /dev/null +++ b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/_parcoords.py @@ -0,0 +1,919 @@ +# --- THIS FILE IS AUTO-GENERATED --- +# Modifications will be overwitten the next time code generation run. + +from plotly.basedatatypes import BaseTraceType as _BaseTraceType +import copy as _copy + + +class Parcoords(_BaseTraceType): + _parent_path_str = "" + _path_str = "parcoords" + _valid_props = { + "customdata", + "customdatasrc", + "dimensiondefaults", + "dimensions", + "domain", + "ids", + "idssrc", + "labelangle", + "labelfont", + "labelside", + "legend", + "legendgrouptitle", + "legendrank", + "legendwidth", + "line", + "meta", + "metasrc", + "name", + "rangefont", + "stream", + "tickfont", + "type", + "uid", + "uirevision", + "unselected", + "visible", + } + + @property + def customdata(self): + """ + Assigns extra data each datum. This may be useful when + listening to hover, click and selection events. Note that, + "scatter" traces also appends customdata items in the markers + DOM elements + + The 'customdata' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["customdata"] + + @customdata.setter + def customdata(self, val): + self["customdata"] = val + + @property + def customdatasrc(self): + """ + Sets the source reference on Chart Studio Cloud for + `customdata`. + + The 'customdatasrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["customdatasrc"] + + @customdatasrc.setter + def customdatasrc(self, val): + self["customdatasrc"] = val + + @property + def dimensions(self): + """ + The dimensions (variables) of the parallel coordinates chart. + 2..60 dimensions are supported. + + The 'dimensions' property is a tuple of instances of + Dimension that may be specified as: + - A list or tuple of instances of plotly.graph_objs.parcoords.Dimension + - A list or tuple of dicts of string/value properties that + will be passed to the Dimension constructor + + Returns + ------- + tuple[plotly.graph_objs.parcoords.Dimension] + """ + return self["dimensions"] + + @dimensions.setter + def dimensions(self, val): + self["dimensions"] = val + + @property + def dimensiondefaults(self): + """ + When used in a template (as + layout.template.data.parcoords.dimensiondefaults), sets the + default property values to use for elements of + parcoords.dimensions + + The 'dimensiondefaults' property is an instance of Dimension + that may be specified as: + - An instance of :class:`plotly.graph_objs.parcoords.Dimension` + - A dict of string/value properties that will be passed + to the Dimension constructor + + Returns + ------- + plotly.graph_objs.parcoords.Dimension + """ + return self["dimensiondefaults"] + + @dimensiondefaults.setter + def dimensiondefaults(self, val): + self["dimensiondefaults"] = val + + @property + def domain(self): + """ + The 'domain' property is an instance of Domain + that may be specified as: + - An instance of :class:`plotly.graph_objs.parcoords.Domain` + - A dict of string/value properties that will be passed + to the Domain constructor + + Returns + ------- + plotly.graph_objs.parcoords.Domain + """ + return self["domain"] + + @domain.setter + def domain(self, val): + self["domain"] = val + + @property + def ids(self): + """ + Assigns id labels to each datum. These ids for object constancy + of data points during animation. Should be an array of strings, + not numbers or any other type. + + The 'ids' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["ids"] + + @ids.setter + def ids(self, val): + self["ids"] = val + + @property + def idssrc(self): + """ + Sets the source reference on Chart Studio Cloud for `ids`. + + The 'idssrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["idssrc"] + + @idssrc.setter + def idssrc(self, val): + self["idssrc"] = val + + @property + def labelangle(self): + """ + Sets the angle of the labels with respect to the horizontal. + For example, a `tickangle` of -90 draws the labels vertically. + Tilted labels with "labelangle" may be positioned better inside + margins when `labelposition` is set to "bottom". + + The 'labelangle' property is a angle (in degrees) that may be + specified as a number between -180 and 180. + Numeric values outside this range are converted to the equivalent value + (e.g. 270 is converted to -90). + + Returns + ------- + int|float + """ + return self["labelangle"] + + @labelangle.setter + def labelangle(self, val): + self["labelangle"] = val + + @property + def labelfont(self): + """ + Sets the font for the `dimension` labels. + + The 'labelfont' property is an instance of Labelfont + that may be specified as: + - An instance of :class:`plotly.graph_objs.parcoords.Labelfont` + - A dict of string/value properties that will be passed + to the Labelfont constructor + + Returns + ------- + plotly.graph_objs.parcoords.Labelfont + """ + return self["labelfont"] + + @labelfont.setter + def labelfont(self, val): + self["labelfont"] = val + + @property + def labelside(self): + """ + Specifies the location of the `label`. "top" positions labels + above, next to the title "bottom" positions labels below the + graph Tilted labels with "labelangle" may be positioned better + inside margins when `labelposition` is set to "bottom". + + The 'labelside' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['top', 'bottom'] + + Returns + ------- + Any + """ + return self["labelside"] + + @labelside.setter + def labelside(self, val): + self["labelside"] = val + + @property + def legend(self): + """ + Sets the reference to a legend to show this trace in. + References to these legends are "legend", "legend2", "legend3", + etc. Settings for these legends are set in the layout, under + `layout.legend`, `layout.legend2`, etc. + + The 'legend' property is an identifier of a particular + subplot, of type 'legend', that may be specified as: + - the string 'legend' optionally followed by an integer >= 1 + (e.g. 'legend', 'legend1', 'legend2', 'legend3', etc.) + + Returns + ------- + str + """ + return self["legend"] + + @legend.setter + def legend(self, val): + self["legend"] = val + + @property + def legendgrouptitle(self): + """ + The 'legendgrouptitle' property is an instance of Legendgrouptitle + that may be specified as: + - An instance of :class:`plotly.graph_objs.parcoords.Legendgrouptitle` + - A dict of string/value properties that will be passed + to the Legendgrouptitle constructor + + Returns + ------- + plotly.graph_objs.parcoords.Legendgrouptitle + """ + return self["legendgrouptitle"] + + @legendgrouptitle.setter + def legendgrouptitle(self, val): + self["legendgrouptitle"] = val + + @property + def legendrank(self): + """ + Sets the legend rank for this trace. Items and groups with + smaller ranks are presented on top/left side while with + "reversed" `legend.traceorder` they are on bottom/right side. + The default legendrank is 1000, so that you can use ranks less + than 1000 to place certain items before all unranked items, and + ranks greater than 1000 to go after all unranked items. When + having unranked or equal rank items shapes would be displayed + after traces i.e. according to their order in data and layout. + + The 'legendrank' property is a number and may be specified as: + - An int or float + + Returns + ------- + int|float + """ + return self["legendrank"] + + @legendrank.setter + def legendrank(self, val): + self["legendrank"] = val + + @property + def legendwidth(self): + """ + Sets the width (in px or fraction) of the legend for this + trace. + + The 'legendwidth' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["legendwidth"] + + @legendwidth.setter + def legendwidth(self, val): + self["legendwidth"] = val + + @property + def line(self): + """ + The 'line' property is an instance of Line + that may be specified as: + - An instance of :class:`plotly.graph_objs.parcoords.Line` + - A dict of string/value properties that will be passed + to the Line constructor + + Returns + ------- + plotly.graph_objs.parcoords.Line + """ + return self["line"] + + @line.setter + def line(self, val): + self["line"] = val + + @property + def meta(self): + """ + Assigns extra meta information associated with this trace that + can be used in various text attributes. Attributes such as + trace `name`, graph, axis and colorbar `title.text`, annotation + `text` `rangeselector`, `updatemenues` and `sliders` `label` + text all support `meta`. To access the trace `meta` values in + an attribute in the same trace, simply use `%{meta[i]}` where + `i` is the index or key of the `meta` item in question. To + access trace `meta` in layout attributes, use + `%{data[n[.meta[i]}` where `i` is the index or key of the + `meta` and `n` is the trace index. + + The 'meta' property accepts values of any type + + Returns + ------- + Any|numpy.ndarray + """ + return self["meta"] + + @meta.setter + def meta(self, val): + self["meta"] = val + + @property + def metasrc(self): + """ + Sets the source reference on Chart Studio Cloud for `meta`. + + The 'metasrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["metasrc"] + + @metasrc.setter + def metasrc(self, val): + self["metasrc"] = val + + @property + def name(self): + """ + Sets the trace name. The trace name appears as the legend item + and on hover. + + The 'name' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["name"] + + @name.setter + def name(self, val): + self["name"] = val + + @property + def rangefont(self): + """ + Sets the font for the `dimension` range values. + + The 'rangefont' property is an instance of Rangefont + that may be specified as: + - An instance of :class:`plotly.graph_objs.parcoords.Rangefont` + - A dict of string/value properties that will be passed + to the Rangefont constructor + + Returns + ------- + plotly.graph_objs.parcoords.Rangefont + """ + return self["rangefont"] + + @rangefont.setter + def rangefont(self, val): + self["rangefont"] = val + + @property + def stream(self): + """ + The 'stream' property is an instance of Stream + that may be specified as: + - An instance of :class:`plotly.graph_objs.parcoords.Stream` + - A dict of string/value properties that will be passed + to the Stream constructor + + Returns + ------- + plotly.graph_objs.parcoords.Stream + """ + return self["stream"] + + @stream.setter + def stream(self, val): + self["stream"] = val + + @property + def tickfont(self): + """ + Sets the font for the `dimension` tick values. + + The 'tickfont' property is an instance of Tickfont + that may be specified as: + - An instance of :class:`plotly.graph_objs.parcoords.Tickfont` + - A dict of string/value properties that will be passed + to the Tickfont constructor + + Returns + ------- + plotly.graph_objs.parcoords.Tickfont + """ + return self["tickfont"] + + @tickfont.setter + def tickfont(self, val): + self["tickfont"] = val + + @property + def uid(self): + """ + Assign an id to this trace, Use this to provide object + constancy between traces during animations and transitions. + + The 'uid' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["uid"] + + @uid.setter + def uid(self, val): + self["uid"] = val + + @property + def uirevision(self): + """ + Controls persistence of some user-driven changes to the trace: + `constraintrange` in `parcoords` traces, as well as some + `editable: true` modifications such as `name` and + `colorbar.title`. Defaults to `layout.uirevision`. Note that + other user-driven trace attribute changes are controlled by + `layout` attributes: `trace.visible` is controlled by + `layout.legend.uirevision`, `selectedpoints` is controlled by + `layout.selectionrevision`, and `colorbar.(x|y)` (accessible + with `config: {editable: true}`) is controlled by + `layout.editrevision`. Trace changes are tracked by `uid`, + which only falls back on trace index if no `uid` is provided. + So if your app can add/remove traces before the end of the + `data` array, such that the same trace has a different index, + you can still preserve user-driven changes if you give each + trace a `uid` that stays with it as it moves. + + The 'uirevision' property accepts values of any type + + Returns + ------- + Any + """ + return self["uirevision"] + + @uirevision.setter + def uirevision(self, val): + self["uirevision"] = val + + @property + def unselected(self): + """ + The 'unselected' property is an instance of Unselected + that may be specified as: + - An instance of :class:`plotly.graph_objs.parcoords.Unselected` + - A dict of string/value properties that will be passed + to the Unselected constructor + + Returns + ------- + plotly.graph_objs.parcoords.Unselected + """ + return self["unselected"] + + @unselected.setter + def unselected(self, val): + self["unselected"] = val + + @property + def visible(self): + """ + Determines whether or not this trace is visible. If + "legendonly", the trace is not drawn, but can appear as a + legend item (provided that the legend itself is visible). + + The 'visible' property is an enumeration that may be specified as: + - One of the following enumeration values: + [True, False, 'legendonly'] + + Returns + ------- + Any + """ + return self["visible"] + + @visible.setter + def visible(self, val): + self["visible"] = val + + @property + def type(self): + return self._props["type"] + + @property + def _prop_descriptions(self): + return """\ + customdata + Assigns extra data each datum. This may be useful when + listening to hover, click and selection events. Note + that, "scatter" traces also appends customdata items in + the markers DOM elements + customdatasrc + Sets the source reference on Chart Studio Cloud for + `customdata`. + dimensions + The dimensions (variables) of the parallel coordinates + chart. 2..60 dimensions are supported. + dimensiondefaults + When used in a template (as + layout.template.data.parcoords.dimensiondefaults), sets + the default property values to use for elements of + parcoords.dimensions + domain + :class:`plotly.graph_objects.parcoords.Domain` instance + or dict with compatible properties + ids + Assigns id labels to each datum. These ids for object + constancy of data points during animation. Should be an + array of strings, not numbers or any other type. + idssrc + Sets the source reference on Chart Studio Cloud for + `ids`. + labelangle + Sets the angle of the labels with respect to the + horizontal. For example, a `tickangle` of -90 draws the + labels vertically. Tilted labels with "labelangle" may + be positioned better inside margins when + `labelposition` is set to "bottom". + labelfont + Sets the font for the `dimension` labels. + labelside + Specifies the location of the `label`. "top" positions + labels above, next to the title "bottom" positions + labels below the graph Tilted labels with "labelangle" + may be positioned better inside margins when + `labelposition` is set to "bottom". + legend + Sets the reference to a legend to show this trace in. + References to these legends are "legend", "legend2", + "legend3", etc. Settings for these legends are set in + the layout, under `layout.legend`, `layout.legend2`, + etc. + legendgrouptitle + :class:`plotly.graph_objects.parcoords.Legendgrouptitle + ` instance or dict with compatible properties + legendrank + Sets the legend rank for this trace. Items and groups + with smaller ranks are presented on top/left side while + with "reversed" `legend.traceorder` they are on + bottom/right side. The default legendrank is 1000, so + that you can use ranks less than 1000 to place certain + items before all unranked items, and ranks greater than + 1000 to go after all unranked items. When having + unranked or equal rank items shapes would be displayed + after traces i.e. according to their order in data and + layout. + legendwidth + Sets the width (in px or fraction) of the legend for + this trace. + line + :class:`plotly.graph_objects.parcoords.Line` instance + or dict with compatible properties + meta + Assigns extra meta information associated with this + trace that can be used in various text attributes. + Attributes such as trace `name`, graph, axis and + colorbar `title.text`, annotation `text` + `rangeselector`, `updatemenues` and `sliders` `label` + text all support `meta`. To access the trace `meta` + values in an attribute in the same trace, simply use + `%{meta[i]}` where `i` is the index or key of the + `meta` item in question. To access trace `meta` in + layout attributes, use `%{data[n[.meta[i]}` where `i` + is the index or key of the `meta` and `n` is the trace + index. + metasrc + Sets the source reference on Chart Studio Cloud for + `meta`. + name + Sets the trace name. The trace name appears as the + legend item and on hover. + rangefont + Sets the font for the `dimension` range values. + stream + :class:`plotly.graph_objects.parcoords.Stream` instance + or dict with compatible properties + tickfont + Sets the font for the `dimension` tick values. + uid + Assign an id to this trace, Use this to provide object + constancy between traces during animations and + transitions. + uirevision + Controls persistence of some user-driven changes to the + trace: `constraintrange` in `parcoords` traces, as well + as some `editable: true` modifications such as `name` + and `colorbar.title`. Defaults to `layout.uirevision`. + Note that other user-driven trace attribute changes are + controlled by `layout` attributes: `trace.visible` is + controlled by `layout.legend.uirevision`, + `selectedpoints` is controlled by + `layout.selectionrevision`, and `colorbar.(x|y)` + (accessible with `config: {editable: true}`) is + controlled by `layout.editrevision`. Trace changes are + tracked by `uid`, which only falls back on trace index + if no `uid` is provided. So if your app can add/remove + traces before the end of the `data` array, such that + the same trace has a different index, you can still + preserve user-driven changes if you give each trace a + `uid` that stays with it as it moves. + unselected + :class:`plotly.graph_objects.parcoords.Unselected` + instance or dict with compatible properties + visible + Determines whether or not this trace is visible. If + "legendonly", the trace is not drawn, but can appear as + a legend item (provided that the legend itself is + visible). + """ + + def __init__( + self, + arg=None, + customdata=None, + customdatasrc=None, + dimensions=None, + dimensiondefaults=None, + domain=None, + ids=None, + idssrc=None, + labelangle=None, + labelfont=None, + labelside=None, + legend=None, + legendgrouptitle=None, + legendrank=None, + legendwidth=None, + line=None, + meta=None, + metasrc=None, + name=None, + rangefont=None, + stream=None, + tickfont=None, + uid=None, + uirevision=None, + unselected=None, + visible=None, + **kwargs, + ): + """ + Construct a new Parcoords object + + Parallel coordinates for multidimensional exploratory data + analysis. The samples are specified in `dimensions`. The colors + are set in `line.color`. + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of :class:`plotly.graph_objs.Parcoords` + customdata + Assigns extra data each datum. This may be useful when + listening to hover, click and selection events. Note + that, "scatter" traces also appends customdata items in + the markers DOM elements + customdatasrc + Sets the source reference on Chart Studio Cloud for + `customdata`. + dimensions + The dimensions (variables) of the parallel coordinates + chart. 2..60 dimensions are supported. + dimensiondefaults + When used in a template (as + layout.template.data.parcoords.dimensiondefaults), sets + the default property values to use for elements of + parcoords.dimensions + domain + :class:`plotly.graph_objects.parcoords.Domain` instance + or dict with compatible properties + ids + Assigns id labels to each datum. These ids for object + constancy of data points during animation. Should be an + array of strings, not numbers or any other type. + idssrc + Sets the source reference on Chart Studio Cloud for + `ids`. + labelangle + Sets the angle of the labels with respect to the + horizontal. For example, a `tickangle` of -90 draws the + labels vertically. Tilted labels with "labelangle" may + be positioned better inside margins when + `labelposition` is set to "bottom". + labelfont + Sets the font for the `dimension` labels. + labelside + Specifies the location of the `label`. "top" positions + labels above, next to the title "bottom" positions + labels below the graph Tilted labels with "labelangle" + may be positioned better inside margins when + `labelposition` is set to "bottom". + legend + Sets the reference to a legend to show this trace in. + References to these legends are "legend", "legend2", + "legend3", etc. Settings for these legends are set in + the layout, under `layout.legend`, `layout.legend2`, + etc. + legendgrouptitle + :class:`plotly.graph_objects.parcoords.Legendgrouptitle + ` instance or dict with compatible properties + legendrank + Sets the legend rank for this trace. Items and groups + with smaller ranks are presented on top/left side while + with "reversed" `legend.traceorder` they are on + bottom/right side. The default legendrank is 1000, so + that you can use ranks less than 1000 to place certain + items before all unranked items, and ranks greater than + 1000 to go after all unranked items. When having + unranked or equal rank items shapes would be displayed + after traces i.e. according to their order in data and + layout. + legendwidth + Sets the width (in px or fraction) of the legend for + this trace. + line + :class:`plotly.graph_objects.parcoords.Line` instance + or dict with compatible properties + meta + Assigns extra meta information associated with this + trace that can be used in various text attributes. + Attributes such as trace `name`, graph, axis and + colorbar `title.text`, annotation `text` + `rangeselector`, `updatemenues` and `sliders` `label` + text all support `meta`. To access the trace `meta` + values in an attribute in the same trace, simply use + `%{meta[i]}` where `i` is the index or key of the + `meta` item in question. To access trace `meta` in + layout attributes, use `%{data[n[.meta[i]}` where `i` + is the index or key of the `meta` and `n` is the trace + index. + metasrc + Sets the source reference on Chart Studio Cloud for + `meta`. + name + Sets the trace name. The trace name appears as the + legend item and on hover. + rangefont + Sets the font for the `dimension` range values. + stream + :class:`plotly.graph_objects.parcoords.Stream` instance + or dict with compatible properties + tickfont + Sets the font for the `dimension` tick values. + uid + Assign an id to this trace, Use this to provide object + constancy between traces during animations and + transitions. + uirevision + Controls persistence of some user-driven changes to the + trace: `constraintrange` in `parcoords` traces, as well + as some `editable: true` modifications such as `name` + and `colorbar.title`. Defaults to `layout.uirevision`. + Note that other user-driven trace attribute changes are + controlled by `layout` attributes: `trace.visible` is + controlled by `layout.legend.uirevision`, + `selectedpoints` is controlled by + `layout.selectionrevision`, and `colorbar.(x|y)` + (accessible with `config: {editable: true}`) is + controlled by `layout.editrevision`. Trace changes are + tracked by `uid`, which only falls back on trace index + if no `uid` is provided. So if your app can add/remove + traces before the end of the `data` array, such that + the same trace has a different index, you can still + preserve user-driven changes if you give each trace a + `uid` that stays with it as it moves. + unselected + :class:`plotly.graph_objects.parcoords.Unselected` + instance or dict with compatible properties + visible + Determines whether or not this trace is visible. If + "legendonly", the trace is not drawn, but can appear as + a legend item (provided that the legend itself is + visible). + + Returns + ------- + Parcoords + """ + super().__init__("parcoords") + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + if arg is None: + arg = {} + elif isinstance(arg, self.__class__): + arg = arg.to_plotly_json() + elif isinstance(arg, dict): + arg = _copy.copy(arg) + else: + raise ValueError("""\ +The first argument to the plotly.graph_objs.Parcoords +constructor must be a dict or +an instance of :class:`plotly.graph_objs.Parcoords`""") + + self._skip_invalid = kwargs.pop("skip_invalid", False) + self._validate = kwargs.pop("_validate", True) + + self._set_property("customdata", arg, customdata) + self._set_property("customdatasrc", arg, customdatasrc) + self._set_property("dimensions", arg, dimensions) + self._set_property("dimensiondefaults", arg, dimensiondefaults) + self._set_property("domain", arg, domain) + self._set_property("ids", arg, ids) + self._set_property("idssrc", arg, idssrc) + self._set_property("labelangle", arg, labelangle) + self._set_property("labelfont", arg, labelfont) + self._set_property("labelside", arg, labelside) + self._set_property("legend", arg, legend) + self._set_property("legendgrouptitle", arg, legendgrouptitle) + self._set_property("legendrank", arg, legendrank) + self._set_property("legendwidth", arg, legendwidth) + self._set_property("line", arg, line) + self._set_property("meta", arg, meta) + self._set_property("metasrc", arg, metasrc) + self._set_property("name", arg, name) + self._set_property("rangefont", arg, rangefont) + self._set_property("stream", arg, stream) + self._set_property("tickfont", arg, tickfont) + self._set_property("uid", arg, uid) + self._set_property("uirevision", arg, uirevision) + self._set_property("unselected", arg, unselected) + self._set_property("visible", arg, visible) + + self._props["type"] = "parcoords" + arg.pop("type", None) + self._process_kwargs(**dict(arg, **kwargs)) + self._skip_invalid = False diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/_pie.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/_pie.py new file mode 100644 index 0000000000000000000000000000000000000000..b18aad3e2df889dda419921fed6ceee7a30e3695 --- /dev/null +++ b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/_pie.py @@ -0,0 +1,2032 @@ +# --- THIS FILE IS AUTO-GENERATED --- +# Modifications will be overwitten the next time code generation run. + +from plotly.basedatatypes import BaseTraceType as _BaseTraceType +import copy as _copy + + +class Pie(_BaseTraceType): + _parent_path_str = "" + _path_str = "pie" + _valid_props = { + "automargin", + "customdata", + "customdatasrc", + "direction", + "dlabel", + "domain", + "hole", + "hoverinfo", + "hoverinfosrc", + "hoverlabel", + "hovertemplate", + "hovertemplatefallback", + "hovertemplatesrc", + "hovertext", + "hovertextsrc", + "ids", + "idssrc", + "insidetextfont", + "insidetextorientation", + "label0", + "labels", + "labelssrc", + "legend", + "legendgroup", + "legendgrouptitle", + "legendrank", + "legendsrc", + "legendwidth", + "marker", + "meta", + "metasrc", + "name", + "opacity", + "outsidetextfont", + "pull", + "pullsrc", + "rotation", + "scalegroup", + "showlegend", + "showlegendsrc", + "sort", + "stream", + "text", + "textfont", + "textinfo", + "textposition", + "textpositionsrc", + "textsrc", + "texttemplate", + "texttemplatefallback", + "texttemplatesrc", + "title", + "type", + "uid", + "uirevision", + "values", + "valuessrc", + "visible", + } + + @property + def automargin(self): + """ + Determines whether outside text labels can push the margins. + + The 'automargin' property is a boolean and must be specified as: + - A boolean value: True or False + + Returns + ------- + bool + """ + return self["automargin"] + + @automargin.setter + def automargin(self, val): + self["automargin"] = val + + @property + def customdata(self): + """ + Assigns extra data each datum. This may be useful when + listening to hover, click and selection events. Note that, + "scatter" traces also appends customdata items in the markers + DOM elements + + The 'customdata' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["customdata"] + + @customdata.setter + def customdata(self, val): + self["customdata"] = val + + @property + def customdatasrc(self): + """ + Sets the source reference on Chart Studio Cloud for + `customdata`. + + The 'customdatasrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["customdatasrc"] + + @customdatasrc.setter + def customdatasrc(self, val): + self["customdatasrc"] = val + + @property + def direction(self): + """ + Specifies the direction at which succeeding sectors follow one + another. + + The 'direction' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['clockwise', 'counterclockwise'] + + Returns + ------- + Any + """ + return self["direction"] + + @direction.setter + def direction(self, val): + self["direction"] = val + + @property + def dlabel(self): + """ + Sets the label step. See `label0` for more info. + + The 'dlabel' property is a number and may be specified as: + - An int or float + + Returns + ------- + int|float + """ + return self["dlabel"] + + @dlabel.setter + def dlabel(self, val): + self["dlabel"] = val + + @property + def domain(self): + """ + The 'domain' property is an instance of Domain + that may be specified as: + - An instance of :class:`plotly.graph_objs.pie.Domain` + - A dict of string/value properties that will be passed + to the Domain constructor + + Returns + ------- + plotly.graph_objs.pie.Domain + """ + return self["domain"] + + @domain.setter + def domain(self, val): + self["domain"] = val + + @property + def hole(self): + """ + Sets the fraction of the radius to cut out of the pie. Use this + to make a donut chart. + + The 'hole' property is a number and may be specified as: + - An int or float in the interval [0, 1] + + Returns + ------- + int|float + """ + return self["hole"] + + @hole.setter + def hole(self, val): + self["hole"] = val + + @property + def hoverinfo(self): + """ + Determines which trace information appear on hover. If `none` + or `skip` are set, no information is displayed upon hovering. + But, if `none` is set, click and hover events are still fired. + + The 'hoverinfo' property is a flaglist and may be specified + as a string containing: + - Any combination of ['label', 'text', 'value', 'percent', 'name'] joined with '+' characters + (e.g. 'label+text') + OR exactly one of ['all', 'none', 'skip'] (e.g. 'skip') + - A list or array of the above + + Returns + ------- + Any|numpy.ndarray + """ + return self["hoverinfo"] + + @hoverinfo.setter + def hoverinfo(self, val): + self["hoverinfo"] = val + + @property + def hoverinfosrc(self): + """ + Sets the source reference on Chart Studio Cloud for + `hoverinfo`. + + The 'hoverinfosrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["hoverinfosrc"] + + @hoverinfosrc.setter + def hoverinfosrc(self, val): + self["hoverinfosrc"] = val + + @property + def hoverlabel(self): + """ + The 'hoverlabel' property is an instance of Hoverlabel + that may be specified as: + - An instance of :class:`plotly.graph_objs.pie.Hoverlabel` + - A dict of string/value properties that will be passed + to the Hoverlabel constructor + + Returns + ------- + plotly.graph_objs.pie.Hoverlabel + """ + return self["hoverlabel"] + + @hoverlabel.setter + def hoverlabel(self, val): + self["hoverlabel"] = val + + @property + def hovertemplate(self): + """ + Template string used for rendering the information that appear + on hover box. Note that this will override `hoverinfo`. + Variables are inserted using %{variable}, for example "y: %{y}" + as well as %{xother}, {%_xother}, {%_xother_}, {%xother_}. When + showing info for several points, "xother" will be added to + those with different x positions from the first point. An + underscore before or after "(x|y)other" will add a space on + that side, only when this field is shown. Numbers are formatted + using d3-format's syntax %{variable:d3-format}, for example + "Price: %{y:$.2f}". + https://github.com/d3/d3-format/tree/v1.4.5#d3-format for + details on the formatting syntax. Dates are formatted using + d3-time-format's syntax %{variable|d3-time-format}, for example + "Day: %{2019-01-01|%A}". https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format for details on the date + formatting syntax. Variables that can't be found will be + replaced with the specifier. For example, a template of "data: + %{x}, %{y}" will result in a value of "data: 1, %{y}" if x is 1 + and y is missing. Variables with an undefined value will be + replaced with the fallback value. The variables available in + `hovertemplate` are the ones emitted as event data described at + this link https://plotly.com/javascript/plotlyjs-events/#event- + data. Additionally, all attributes that can be specified per- + point (the ones that are `arrayOk: true`) are available. + Finally, the template string has access to variables `label`, + `color`, `value`, `percent` and `text`. Anything contained in + tag `` is displayed in the secondary box, for example + `%{fullData.name}`. To hide the secondary box + completely, use an empty tag ``. + + The 'hovertemplate' property is a string and must be specified as: + - A string + - A number that will be converted to a string + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["hovertemplate"] + + @hovertemplate.setter + def hovertemplate(self, val): + self["hovertemplate"] = val + + @property + def hovertemplatefallback(self): + """ + Fallback string that's displayed when a variable referenced in + a template is missing. If the boolean value 'false' is passed + in, the specifier with the missing variable will be displayed. + + The 'hovertemplatefallback' property accepts values of any type + + Returns + ------- + Any + """ + return self["hovertemplatefallback"] + + @hovertemplatefallback.setter + def hovertemplatefallback(self, val): + self["hovertemplatefallback"] = val + + @property + def hovertemplatesrc(self): + """ + Sets the source reference on Chart Studio Cloud for + `hovertemplate`. + + The 'hovertemplatesrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["hovertemplatesrc"] + + @hovertemplatesrc.setter + def hovertemplatesrc(self, val): + self["hovertemplatesrc"] = val + + @property + def hovertext(self): + """ + Sets hover text elements associated with each sector. If a + single string, the same string appears for all data points. If + an array of string, the items are mapped in order of this + trace's sectors. To be seen, trace `hoverinfo` must contain a + "text" flag. + + The 'hovertext' property is a string and must be specified as: + - A string + - A number that will be converted to a string + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["hovertext"] + + @hovertext.setter + def hovertext(self, val): + self["hovertext"] = val + + @property + def hovertextsrc(self): + """ + Sets the source reference on Chart Studio Cloud for + `hovertext`. + + The 'hovertextsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["hovertextsrc"] + + @hovertextsrc.setter + def hovertextsrc(self, val): + self["hovertextsrc"] = val + + @property + def ids(self): + """ + Assigns id labels to each datum. These ids for object constancy + of data points during animation. Should be an array of strings, + not numbers or any other type. + + The 'ids' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["ids"] + + @ids.setter + def ids(self, val): + self["ids"] = val + + @property + def idssrc(self): + """ + Sets the source reference on Chart Studio Cloud for `ids`. + + The 'idssrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["idssrc"] + + @idssrc.setter + def idssrc(self, val): + self["idssrc"] = val + + @property + def insidetextfont(self): + """ + Sets the font used for `textinfo` lying inside the sector. + + The 'insidetextfont' property is an instance of Insidetextfont + that may be specified as: + - An instance of :class:`plotly.graph_objs.pie.Insidetextfont` + - A dict of string/value properties that will be passed + to the Insidetextfont constructor + + Returns + ------- + plotly.graph_objs.pie.Insidetextfont + """ + return self["insidetextfont"] + + @insidetextfont.setter + def insidetextfont(self, val): + self["insidetextfont"] = val + + @property + def insidetextorientation(self): + """ + Controls the orientation of the text inside chart sectors. When + set to "auto", text may be oriented in any direction in order + to be as big as possible in the middle of a sector. The + "horizontal" option orients text to be parallel with the bottom + of the chart, and may make text smaller in order to achieve + that goal. The "radial" option orients text along the radius of + the sector. The "tangential" option orients text perpendicular + to the radius of the sector. + + The 'insidetextorientation' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['horizontal', 'radial', 'tangential', 'auto'] + + Returns + ------- + Any + """ + return self["insidetextorientation"] + + @insidetextorientation.setter + def insidetextorientation(self, val): + self["insidetextorientation"] = val + + @property + def label0(self): + """ + Alternate to `labels`. Builds a numeric set of labels. Use with + `dlabel` where `label0` is the starting label and `dlabel` the + step. + + The 'label0' property is a number and may be specified as: + - An int or float + + Returns + ------- + int|float + """ + return self["label0"] + + @label0.setter + def label0(self, val): + self["label0"] = val + + @property + def labels(self): + """ + Sets the sector labels. If `labels` entries are duplicated, we + sum associated `values` or simply count occurrences if `values` + is not provided. For other array attributes (including color) + we use the first non-empty entry among all occurrences of the + label. + + The 'labels' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["labels"] + + @labels.setter + def labels(self, val): + self["labels"] = val + + @property + def labelssrc(self): + """ + Sets the source reference on Chart Studio Cloud for `labels`. + + The 'labelssrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["labelssrc"] + + @labelssrc.setter + def labelssrc(self, val): + self["labelssrc"] = val + + @property + def legend(self): + """ + Sets the reference to a legend to show the pie slices in. Can + be an array if `values` is set. In that case, each entry + specifies the legend reference for one slice. References to + these legends are "legend", "legend2", "legend3", etc. Settings + for these legends are set in the layout, under `layout.legend`, + `layout.legend2`, etc. + + The 'legend' property is an identifier of a particular + subplot, of type 'legend', that may be specified as: + - the string 'legend' optionally followed by an integer >= 1 + (e.g. 'legend', 'legend1', 'legend2', 'legend3', etc.) + - A tuple or list of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["legend"] + + @legend.setter + def legend(self, val): + self["legend"] = val + + @property + def legendgroup(self): + """ + Sets the legend group for this trace. Traces and shapes part of + the same legend group hide/show at the same time when toggling + legend items. + + The 'legendgroup' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["legendgroup"] + + @legendgroup.setter + def legendgroup(self, val): + self["legendgroup"] = val + + @property + def legendgrouptitle(self): + """ + The 'legendgrouptitle' property is an instance of Legendgrouptitle + that may be specified as: + - An instance of :class:`plotly.graph_objs.pie.Legendgrouptitle` + - A dict of string/value properties that will be passed + to the Legendgrouptitle constructor + + Returns + ------- + plotly.graph_objs.pie.Legendgrouptitle + """ + return self["legendgrouptitle"] + + @legendgrouptitle.setter + def legendgrouptitle(self, val): + self["legendgrouptitle"] = val + + @property + def legendrank(self): + """ + Sets the legend rank for this trace. Items and groups with + smaller ranks are presented on top/left side while with + "reversed" `legend.traceorder` they are on bottom/right side. + The default legendrank is 1000, so that you can use ranks less + than 1000 to place certain items before all unranked items, and + ranks greater than 1000 to go after all unranked items. When + having unranked or equal rank items shapes would be displayed + after traces i.e. according to their order in data and layout. + + The 'legendrank' property is a number and may be specified as: + - An int or float + + Returns + ------- + int|float + """ + return self["legendrank"] + + @legendrank.setter + def legendrank(self, val): + self["legendrank"] = val + + @property + def legendsrc(self): + """ + Sets the source reference on Chart Studio Cloud for `legend`. + + The 'legendsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["legendsrc"] + + @legendsrc.setter + def legendsrc(self, val): + self["legendsrc"] = val + + @property + def legendwidth(self): + """ + Sets the width (in px or fraction) of the legend for this + trace. + + The 'legendwidth' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["legendwidth"] + + @legendwidth.setter + def legendwidth(self, val): + self["legendwidth"] = val + + @property + def marker(self): + """ + The 'marker' property is an instance of Marker + that may be specified as: + - An instance of :class:`plotly.graph_objs.pie.Marker` + - A dict of string/value properties that will be passed + to the Marker constructor + + Returns + ------- + plotly.graph_objs.pie.Marker + """ + return self["marker"] + + @marker.setter + def marker(self, val): + self["marker"] = val + + @property + def meta(self): + """ + Assigns extra meta information associated with this trace that + can be used in various text attributes. Attributes such as + trace `name`, graph, axis and colorbar `title.text`, annotation + `text` `rangeselector`, `updatemenues` and `sliders` `label` + text all support `meta`. To access the trace `meta` values in + an attribute in the same trace, simply use `%{meta[i]}` where + `i` is the index or key of the `meta` item in question. To + access trace `meta` in layout attributes, use + `%{data[n[.meta[i]}` where `i` is the index or key of the + `meta` and `n` is the trace index. + + The 'meta' property accepts values of any type + + Returns + ------- + Any|numpy.ndarray + """ + return self["meta"] + + @meta.setter + def meta(self, val): + self["meta"] = val + + @property + def metasrc(self): + """ + Sets the source reference on Chart Studio Cloud for `meta`. + + The 'metasrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["metasrc"] + + @metasrc.setter + def metasrc(self, val): + self["metasrc"] = val + + @property + def name(self): + """ + Sets the trace name. The trace name appears as the legend item + and on hover. + + The 'name' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["name"] + + @name.setter + def name(self, val): + self["name"] = val + + @property + def opacity(self): + """ + Sets the opacity of the trace. + + The 'opacity' property is a number and may be specified as: + - An int or float in the interval [0, 1] + + Returns + ------- + int|float + """ + return self["opacity"] + + @opacity.setter + def opacity(self, val): + self["opacity"] = val + + @property + def outsidetextfont(self): + """ + Sets the font used for `textinfo` lying outside the sector. + + The 'outsidetextfont' property is an instance of Outsidetextfont + that may be specified as: + - An instance of :class:`plotly.graph_objs.pie.Outsidetextfont` + - A dict of string/value properties that will be passed + to the Outsidetextfont constructor + + Returns + ------- + plotly.graph_objs.pie.Outsidetextfont + """ + return self["outsidetextfont"] + + @outsidetextfont.setter + def outsidetextfont(self, val): + self["outsidetextfont"] = val + + @property + def pull(self): + """ + Sets the fraction of larger radius to pull the sectors out from + the center. This can be a constant to pull all slices apart + from each other equally or an array to highlight one or more + slices. + + The 'pull' property is a number and may be specified as: + - An int or float in the interval [0, 1] + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + int|float|numpy.ndarray + """ + return self["pull"] + + @pull.setter + def pull(self, val): + self["pull"] = val + + @property + def pullsrc(self): + """ + Sets the source reference on Chart Studio Cloud for `pull`. + + The 'pullsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["pullsrc"] + + @pullsrc.setter + def pullsrc(self, val): + self["pullsrc"] = val + + @property + def rotation(self): + """ + Instead of the first slice starting at 12 o'clock, rotate to + some other angle. + + The 'rotation' property is a angle (in degrees) that may be + specified as a number between -180 and 180. + Numeric values outside this range are converted to the equivalent value + (e.g. 270 is converted to -90). + + Returns + ------- + int|float + """ + return self["rotation"] + + @rotation.setter + def rotation(self, val): + self["rotation"] = val + + @property + def scalegroup(self): + """ + If there are multiple pie charts that should be sized according + to their totals, link them by providing a non-empty group id + here shared by every trace in the same group. + + The 'scalegroup' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["scalegroup"] + + @scalegroup.setter + def scalegroup(self, val): + self["scalegroup"] = val + + @property + def showlegend(self): + """ + Determines whether or not items corresponding to the pie slices + are shown in the legend. Can be an array if `values` is set. In + that case, each entry specifies appearance in the legend for + one slice. + + The 'showlegend' property is a boolean and must be specified as: + - A boolean value: True or False + - A tuple or list of the above + + Returns + ------- + bool|numpy.ndarray + """ + return self["showlegend"] + + @showlegend.setter + def showlegend(self, val): + self["showlegend"] = val + + @property + def showlegendsrc(self): + """ + Sets the source reference on Chart Studio Cloud for + `showlegend`. + + The 'showlegendsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["showlegendsrc"] + + @showlegendsrc.setter + def showlegendsrc(self, val): + self["showlegendsrc"] = val + + @property + def sort(self): + """ + Determines whether or not the sectors are reordered from + largest to smallest. + + The 'sort' property is a boolean and must be specified as: + - A boolean value: True or False + + Returns + ------- + bool + """ + return self["sort"] + + @sort.setter + def sort(self, val): + self["sort"] = val + + @property + def stream(self): + """ + The 'stream' property is an instance of Stream + that may be specified as: + - An instance of :class:`plotly.graph_objs.pie.Stream` + - A dict of string/value properties that will be passed + to the Stream constructor + + Returns + ------- + plotly.graph_objs.pie.Stream + """ + return self["stream"] + + @stream.setter + def stream(self, val): + self["stream"] = val + + @property + def text(self): + """ + Sets text elements associated with each sector. If trace + `textinfo` contains a "text" flag, these elements will be seen + on the chart. If trace `hoverinfo` contains a "text" flag and + "hovertext" is not set, these elements will be seen in the + hover labels. + + The 'text' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["text"] + + @text.setter + def text(self, val): + self["text"] = val + + @property + def textfont(self): + """ + Sets the font used for `textinfo`. + + The 'textfont' property is an instance of Textfont + that may be specified as: + - An instance of :class:`plotly.graph_objs.pie.Textfont` + - A dict of string/value properties that will be passed + to the Textfont constructor + + Returns + ------- + plotly.graph_objs.pie.Textfont + """ + return self["textfont"] + + @textfont.setter + def textfont(self, val): + self["textfont"] = val + + @property + def textinfo(self): + """ + Determines which trace information appear on the graph. + + The 'textinfo' property is a flaglist and may be specified + as a string containing: + - Any combination of ['label', 'text', 'value', 'percent'] joined with '+' characters + (e.g. 'label+text') + OR exactly one of ['none'] (e.g. 'none') + + Returns + ------- + Any + """ + return self["textinfo"] + + @textinfo.setter + def textinfo(self, val): + self["textinfo"] = val + + @property + def textposition(self): + """ + Specifies the location of the `textinfo`. + + The 'textposition' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['inside', 'outside', 'auto', 'none'] + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + Any|numpy.ndarray + """ + return self["textposition"] + + @textposition.setter + def textposition(self, val): + self["textposition"] = val + + @property + def textpositionsrc(self): + """ + Sets the source reference on Chart Studio Cloud for + `textposition`. + + The 'textpositionsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["textpositionsrc"] + + @textpositionsrc.setter + def textpositionsrc(self, val): + self["textpositionsrc"] = val + + @property + def textsrc(self): + """ + Sets the source reference on Chart Studio Cloud for `text`. + + The 'textsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["textsrc"] + + @textsrc.setter + def textsrc(self, val): + self["textsrc"] = val + + @property + def texttemplate(self): + """ + Template string used for rendering the information text that + appears on points. Note that this will override `textinfo`. + Variables are inserted using %{variable}, for example "y: + %{y}". Numbers are formatted using d3-format's syntax + %{variable:d3-format}, for example "Price: %{y:$.2f}". + https://github.com/d3/d3-format/tree/v1.4.5#d3-format for + details on the formatting syntax. Dates are formatted using + d3-time-format's syntax %{variable|d3-time-format}, for example + "Day: %{2019-01-01|%A}". https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format for details on the date + formatting syntax. Variables that can't be found will be + replaced with the specifier. For example, a template of "data: + %{x}, %{y}" will result in a value of "data: 1, %{y}" if x is 1 + and y is missing. Variables with an undefined value will be + replaced with the fallback value. All attributes that can be + specified per-point (the ones that are `arrayOk: true`) are + available. Finally, the template string has access to variables + `label`, `color`, `value`, `percent` and `text`. + + The 'texttemplate' property is a string and must be specified as: + - A string + - A number that will be converted to a string + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["texttemplate"] + + @texttemplate.setter + def texttemplate(self, val): + self["texttemplate"] = val + + @property + def texttemplatefallback(self): + """ + Fallback string that's displayed when a variable referenced in + a template is missing. If the boolean value 'false' is passed + in, the specifier with the missing variable will be displayed. + + The 'texttemplatefallback' property accepts values of any type + + Returns + ------- + Any + """ + return self["texttemplatefallback"] + + @texttemplatefallback.setter + def texttemplatefallback(self, val): + self["texttemplatefallback"] = val + + @property + def texttemplatesrc(self): + """ + Sets the source reference on Chart Studio Cloud for + `texttemplate`. + + The 'texttemplatesrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["texttemplatesrc"] + + @texttemplatesrc.setter + def texttemplatesrc(self, val): + self["texttemplatesrc"] = val + + @property + def title(self): + """ + The 'title' property is an instance of Title + that may be specified as: + - An instance of :class:`plotly.graph_objs.pie.Title` + - A dict of string/value properties that will be passed + to the Title constructor + + Returns + ------- + plotly.graph_objs.pie.Title + """ + return self["title"] + + @title.setter + def title(self, val): + self["title"] = val + + @property + def uid(self): + """ + Assign an id to this trace, Use this to provide object + constancy between traces during animations and transitions. + + The 'uid' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["uid"] + + @uid.setter + def uid(self, val): + self["uid"] = val + + @property + def uirevision(self): + """ + Controls persistence of some user-driven changes to the trace: + `constraintrange` in `parcoords` traces, as well as some + `editable: true` modifications such as `name` and + `colorbar.title`. Defaults to `layout.uirevision`. Note that + other user-driven trace attribute changes are controlled by + `layout` attributes: `trace.visible` is controlled by + `layout.legend.uirevision`, `selectedpoints` is controlled by + `layout.selectionrevision`, and `colorbar.(x|y)` (accessible + with `config: {editable: true}`) is controlled by + `layout.editrevision`. Trace changes are tracked by `uid`, + which only falls back on trace index if no `uid` is provided. + So if your app can add/remove traces before the end of the + `data` array, such that the same trace has a different index, + you can still preserve user-driven changes if you give each + trace a `uid` that stays with it as it moves. + + The 'uirevision' property accepts values of any type + + Returns + ------- + Any + """ + return self["uirevision"] + + @uirevision.setter + def uirevision(self, val): + self["uirevision"] = val + + @property + def values(self): + """ + Sets the values of the sectors. If omitted, we count + occurrences of each label. + + The 'values' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["values"] + + @values.setter + def values(self, val): + self["values"] = val + + @property + def valuessrc(self): + """ + Sets the source reference on Chart Studio Cloud for `values`. + + The 'valuessrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["valuessrc"] + + @valuessrc.setter + def valuessrc(self, val): + self["valuessrc"] = val + + @property + def visible(self): + """ + Determines whether or not this trace is visible. If + "legendonly", the trace is not drawn, but can appear as a + legend item (provided that the legend itself is visible). + + The 'visible' property is an enumeration that may be specified as: + - One of the following enumeration values: + [True, False, 'legendonly'] + + Returns + ------- + Any + """ + return self["visible"] + + @visible.setter + def visible(self, val): + self["visible"] = val + + @property + def type(self): + return self._props["type"] + + @property + def _prop_descriptions(self): + return """\ + automargin + Determines whether outside text labels can push the + margins. + customdata + Assigns extra data each datum. This may be useful when + listening to hover, click and selection events. Note + that, "scatter" traces also appends customdata items in + the markers DOM elements + customdatasrc + Sets the source reference on Chart Studio Cloud for + `customdata`. + direction + Specifies the direction at which succeeding sectors + follow one another. + dlabel + Sets the label step. See `label0` for more info. + domain + :class:`plotly.graph_objects.pie.Domain` instance or + dict with compatible properties + hole + Sets the fraction of the radius to cut out of the pie. + Use this to make a donut chart. + hoverinfo + Determines which trace information appear on hover. If + `none` or `skip` are set, no information is displayed + upon hovering. But, if `none` is set, click and hover + events are still fired. + hoverinfosrc + Sets the source reference on Chart Studio Cloud for + `hoverinfo`. + hoverlabel + :class:`plotly.graph_objects.pie.Hoverlabel` instance + or dict with compatible properties + hovertemplate + Template string used for rendering the information that + appear on hover box. Note that this will override + `hoverinfo`. Variables are inserted using %{variable}, + for example "y: %{y}" as well as %{xother}, {%_xother}, + {%_xother_}, {%xother_}. When showing info for several + points, "xother" will be added to those with different + x positions from the first point. An underscore before + or after "(x|y)other" will add a space on that side, + only when this field is shown. Numbers are formatted + using d3-format's syntax %{variable:d3-format}, for + example "Price: %{y:$.2f}". + https://github.com/d3/d3-format/tree/v1.4.5#d3-format + for details on the formatting syntax. Dates are + formatted using d3-time-format's syntax + %{variable|d3-time-format}, for example "Day: + %{2019-01-01|%A}". https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format for details on the + date formatting syntax. Variables that can't be found + will be replaced with the specifier. For example, a + template of "data: %{x}, %{y}" will result in a value + of "data: 1, %{y}" if x is 1 and y is missing. + Variables with an undefined value will be replaced with + the fallback value. The variables available in + `hovertemplate` are the ones emitted as event data + described at this link + https://plotly.com/javascript/plotlyjs-events/#event- + data. Additionally, all attributes that can be + specified per-point (the ones that are `arrayOk: true`) + are available. Finally, the template string has access + to variables `label`, `color`, `value`, `percent` and + `text`. Anything contained in tag `` is + displayed in the secondary box, for example + `%{fullData.name}`. To hide the + secondary box completely, use an empty tag + ``. + hovertemplatefallback + Fallback string that's displayed when a variable + referenced in a template is missing. If the boolean + value 'false' is passed in, the specifier with the + missing variable will be displayed. + hovertemplatesrc + Sets the source reference on Chart Studio Cloud for + `hovertemplate`. + hovertext + Sets hover text elements associated with each sector. + If a single string, the same string appears for all + data points. If an array of string, the items are + mapped in order of this trace's sectors. To be seen, + trace `hoverinfo` must contain a "text" flag. + hovertextsrc + Sets the source reference on Chart Studio Cloud for + `hovertext`. + ids + Assigns id labels to each datum. These ids for object + constancy of data points during animation. Should be an + array of strings, not numbers or any other type. + idssrc + Sets the source reference on Chart Studio Cloud for + `ids`. + insidetextfont + Sets the font used for `textinfo` lying inside the + sector. + insidetextorientation + Controls the orientation of the text inside chart + sectors. When set to "auto", text may be oriented in + any direction in order to be as big as possible in the + middle of a sector. The "horizontal" option orients + text to be parallel with the bottom of the chart, and + may make text smaller in order to achieve that goal. + The "radial" option orients text along the radius of + the sector. The "tangential" option orients text + perpendicular to the radius of the sector. + label0 + Alternate to `labels`. Builds a numeric set of labels. + Use with `dlabel` where `label0` is the starting label + and `dlabel` the step. + labels + Sets the sector labels. If `labels` entries are + duplicated, we sum associated `values` or simply count + occurrences if `values` is not provided. For other + array attributes (including color) we use the first + non-empty entry among all occurrences of the label. + labelssrc + Sets the source reference on Chart Studio Cloud for + `labels`. + legend + Sets the reference to a legend to show the pie slices + in. Can be an array if `values` is set. In that case, + each entry specifies the legend reference for one + slice. References to these legends are "legend", + "legend2", "legend3", etc. Settings for these legends + are set in the layout, under `layout.legend`, + `layout.legend2`, etc. + legendgroup + Sets the legend group for this trace. Traces and shapes + part of the same legend group hide/show at the same + time when toggling legend items. + legendgrouptitle + :class:`plotly.graph_objects.pie.Legendgrouptitle` + instance or dict with compatible properties + legendrank + Sets the legend rank for this trace. Items and groups + with smaller ranks are presented on top/left side while + with "reversed" `legend.traceorder` they are on + bottom/right side. The default legendrank is 1000, so + that you can use ranks less than 1000 to place certain + items before all unranked items, and ranks greater than + 1000 to go after all unranked items. When having + unranked or equal rank items shapes would be displayed + after traces i.e. according to their order in data and + layout. + legendsrc + Sets the source reference on Chart Studio Cloud for + `legend`. + legendwidth + Sets the width (in px or fraction) of the legend for + this trace. + marker + :class:`plotly.graph_objects.pie.Marker` instance or + dict with compatible properties + meta + Assigns extra meta information associated with this + trace that can be used in various text attributes. + Attributes such as trace `name`, graph, axis and + colorbar `title.text`, annotation `text` + `rangeselector`, `updatemenues` and `sliders` `label` + text all support `meta`. To access the trace `meta` + values in an attribute in the same trace, simply use + `%{meta[i]}` where `i` is the index or key of the + `meta` item in question. To access trace `meta` in + layout attributes, use `%{data[n[.meta[i]}` where `i` + is the index or key of the `meta` and `n` is the trace + index. + metasrc + Sets the source reference on Chart Studio Cloud for + `meta`. + name + Sets the trace name. The trace name appears as the + legend item and on hover. + opacity + Sets the opacity of the trace. + outsidetextfont + Sets the font used for `textinfo` lying outside the + sector. + pull + Sets the fraction of larger radius to pull the sectors + out from the center. This can be a constant to pull all + slices apart from each other equally or an array to + highlight one or more slices. + pullsrc + Sets the source reference on Chart Studio Cloud for + `pull`. + rotation + Instead of the first slice starting at 12 o'clock, + rotate to some other angle. + scalegroup + If there are multiple pie charts that should be sized + according to their totals, link them by providing a + non-empty group id here shared by every trace in the + same group. + showlegend + Determines whether or not items corresponding to the + pie slices are shown in the legend. Can be an array if + `values` is set. In that case, each entry specifies + appearance in the legend for one slice. + showlegendsrc + Sets the source reference on Chart Studio Cloud for + `showlegend`. + sort + Determines whether or not the sectors are reordered + from largest to smallest. + stream + :class:`plotly.graph_objects.pie.Stream` instance or + dict with compatible properties + text + Sets text elements associated with each sector. If + trace `textinfo` contains a "text" flag, these elements + will be seen on the chart. If trace `hoverinfo` + contains a "text" flag and "hovertext" is not set, + these elements will be seen in the hover labels. + textfont + Sets the font used for `textinfo`. + textinfo + Determines which trace information appear on the graph. + textposition + Specifies the location of the `textinfo`. + textpositionsrc + Sets the source reference on Chart Studio Cloud for + `textposition`. + textsrc + Sets the source reference on Chart Studio Cloud for + `text`. + texttemplate + Template string used for rendering the information text + that appears on points. Note that this will override + `textinfo`. Variables are inserted using %{variable}, + for example "y: %{y}". Numbers are formatted using + d3-format's syntax %{variable:d3-format}, for example + "Price: %{y:$.2f}". + https://github.com/d3/d3-format/tree/v1.4.5#d3-format + for details on the formatting syntax. Dates are + formatted using d3-time-format's syntax + %{variable|d3-time-format}, for example "Day: + %{2019-01-01|%A}". https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format for details on the + date formatting syntax. Variables that can't be found + will be replaced with the specifier. For example, a + template of "data: %{x}, %{y}" will result in a value + of "data: 1, %{y}" if x is 1 and y is missing. + Variables with an undefined value will be replaced with + the fallback value. All attributes that can be + specified per-point (the ones that are `arrayOk: true`) + are available. Finally, the template string has access + to variables `label`, `color`, `value`, `percent` and + `text`. + texttemplatefallback + Fallback string that's displayed when a variable + referenced in a template is missing. If the boolean + value 'false' is passed in, the specifier with the + missing variable will be displayed. + texttemplatesrc + Sets the source reference on Chart Studio Cloud for + `texttemplate`. + title + :class:`plotly.graph_objects.pie.Title` instance or + dict with compatible properties + uid + Assign an id to this trace, Use this to provide object + constancy between traces during animations and + transitions. + uirevision + Controls persistence of some user-driven changes to the + trace: `constraintrange` in `parcoords` traces, as well + as some `editable: true` modifications such as `name` + and `colorbar.title`. Defaults to `layout.uirevision`. + Note that other user-driven trace attribute changes are + controlled by `layout` attributes: `trace.visible` is + controlled by `layout.legend.uirevision`, + `selectedpoints` is controlled by + `layout.selectionrevision`, and `colorbar.(x|y)` + (accessible with `config: {editable: true}`) is + controlled by `layout.editrevision`. Trace changes are + tracked by `uid`, which only falls back on trace index + if no `uid` is provided. So if your app can add/remove + traces before the end of the `data` array, such that + the same trace has a different index, you can still + preserve user-driven changes if you give each trace a + `uid` that stays with it as it moves. + values + Sets the values of the sectors. If omitted, we count + occurrences of each label. + valuessrc + Sets the source reference on Chart Studio Cloud for + `values`. + visible + Determines whether or not this trace is visible. If + "legendonly", the trace is not drawn, but can appear as + a legend item (provided that the legend itself is + visible). + """ + + def __init__( + self, + arg=None, + automargin=None, + customdata=None, + customdatasrc=None, + direction=None, + dlabel=None, + domain=None, + hole=None, + hoverinfo=None, + hoverinfosrc=None, + hoverlabel=None, + hovertemplate=None, + hovertemplatefallback=None, + hovertemplatesrc=None, + hovertext=None, + hovertextsrc=None, + ids=None, + idssrc=None, + insidetextfont=None, + insidetextorientation=None, + label0=None, + labels=None, + labelssrc=None, + legend=None, + legendgroup=None, + legendgrouptitle=None, + legendrank=None, + legendsrc=None, + legendwidth=None, + marker=None, + meta=None, + metasrc=None, + name=None, + opacity=None, + outsidetextfont=None, + pull=None, + pullsrc=None, + rotation=None, + scalegroup=None, + showlegend=None, + showlegendsrc=None, + sort=None, + stream=None, + text=None, + textfont=None, + textinfo=None, + textposition=None, + textpositionsrc=None, + textsrc=None, + texttemplate=None, + texttemplatefallback=None, + texttemplatesrc=None, + title=None, + uid=None, + uirevision=None, + values=None, + valuessrc=None, + visible=None, + **kwargs, + ): + """ + Construct a new Pie object + + A data visualized by the sectors of the pie is set in `values`. + The sector labels are set in `labels`. The sector colors are + set in `marker.colors` + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of :class:`plotly.graph_objs.Pie` + automargin + Determines whether outside text labels can push the + margins. + customdata + Assigns extra data each datum. This may be useful when + listening to hover, click and selection events. Note + that, "scatter" traces also appends customdata items in + the markers DOM elements + customdatasrc + Sets the source reference on Chart Studio Cloud for + `customdata`. + direction + Specifies the direction at which succeeding sectors + follow one another. + dlabel + Sets the label step. See `label0` for more info. + domain + :class:`plotly.graph_objects.pie.Domain` instance or + dict with compatible properties + hole + Sets the fraction of the radius to cut out of the pie. + Use this to make a donut chart. + hoverinfo + Determines which trace information appear on hover. If + `none` or `skip` are set, no information is displayed + upon hovering. But, if `none` is set, click and hover + events are still fired. + hoverinfosrc + Sets the source reference on Chart Studio Cloud for + `hoverinfo`. + hoverlabel + :class:`plotly.graph_objects.pie.Hoverlabel` instance + or dict with compatible properties + hovertemplate + Template string used for rendering the information that + appear on hover box. Note that this will override + `hoverinfo`. Variables are inserted using %{variable}, + for example "y: %{y}" as well as %{xother}, {%_xother}, + {%_xother_}, {%xother_}. When showing info for several + points, "xother" will be added to those with different + x positions from the first point. An underscore before + or after "(x|y)other" will add a space on that side, + only when this field is shown. Numbers are formatted + using d3-format's syntax %{variable:d3-format}, for + example "Price: %{y:$.2f}". + https://github.com/d3/d3-format/tree/v1.4.5#d3-format + for details on the formatting syntax. Dates are + formatted using d3-time-format's syntax + %{variable|d3-time-format}, for example "Day: + %{2019-01-01|%A}". https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format for details on the + date formatting syntax. Variables that can't be found + will be replaced with the specifier. For example, a + template of "data: %{x}, %{y}" will result in a value + of "data: 1, %{y}" if x is 1 and y is missing. + Variables with an undefined value will be replaced with + the fallback value. The variables available in + `hovertemplate` are the ones emitted as event data + described at this link + https://plotly.com/javascript/plotlyjs-events/#event- + data. Additionally, all attributes that can be + specified per-point (the ones that are `arrayOk: true`) + are available. Finally, the template string has access + to variables `label`, `color`, `value`, `percent` and + `text`. Anything contained in tag `` is + displayed in the secondary box, for example + `%{fullData.name}`. To hide the + secondary box completely, use an empty tag + ``. + hovertemplatefallback + Fallback string that's displayed when a variable + referenced in a template is missing. If the boolean + value 'false' is passed in, the specifier with the + missing variable will be displayed. + hovertemplatesrc + Sets the source reference on Chart Studio Cloud for + `hovertemplate`. + hovertext + Sets hover text elements associated with each sector. + If a single string, the same string appears for all + data points. If an array of string, the items are + mapped in order of this trace's sectors. To be seen, + trace `hoverinfo` must contain a "text" flag. + hovertextsrc + Sets the source reference on Chart Studio Cloud for + `hovertext`. + ids + Assigns id labels to each datum. These ids for object + constancy of data points during animation. Should be an + array of strings, not numbers or any other type. + idssrc + Sets the source reference on Chart Studio Cloud for + `ids`. + insidetextfont + Sets the font used for `textinfo` lying inside the + sector. + insidetextorientation + Controls the orientation of the text inside chart + sectors. When set to "auto", text may be oriented in + any direction in order to be as big as possible in the + middle of a sector. The "horizontal" option orients + text to be parallel with the bottom of the chart, and + may make text smaller in order to achieve that goal. + The "radial" option orients text along the radius of + the sector. The "tangential" option orients text + perpendicular to the radius of the sector. + label0 + Alternate to `labels`. Builds a numeric set of labels. + Use with `dlabel` where `label0` is the starting label + and `dlabel` the step. + labels + Sets the sector labels. If `labels` entries are + duplicated, we sum associated `values` or simply count + occurrences if `values` is not provided. For other + array attributes (including color) we use the first + non-empty entry among all occurrences of the label. + labelssrc + Sets the source reference on Chart Studio Cloud for + `labels`. + legend + Sets the reference to a legend to show the pie slices + in. Can be an array if `values` is set. In that case, + each entry specifies the legend reference for one + slice. References to these legends are "legend", + "legend2", "legend3", etc. Settings for these legends + are set in the layout, under `layout.legend`, + `layout.legend2`, etc. + legendgroup + Sets the legend group for this trace. Traces and shapes + part of the same legend group hide/show at the same + time when toggling legend items. + legendgrouptitle + :class:`plotly.graph_objects.pie.Legendgrouptitle` + instance or dict with compatible properties + legendrank + Sets the legend rank for this trace. Items and groups + with smaller ranks are presented on top/left side while + with "reversed" `legend.traceorder` they are on + bottom/right side. The default legendrank is 1000, so + that you can use ranks less than 1000 to place certain + items before all unranked items, and ranks greater than + 1000 to go after all unranked items. When having + unranked or equal rank items shapes would be displayed + after traces i.e. according to their order in data and + layout. + legendsrc + Sets the source reference on Chart Studio Cloud for + `legend`. + legendwidth + Sets the width (in px or fraction) of the legend for + this trace. + marker + :class:`plotly.graph_objects.pie.Marker` instance or + dict with compatible properties + meta + Assigns extra meta information associated with this + trace that can be used in various text attributes. + Attributes such as trace `name`, graph, axis and + colorbar `title.text`, annotation `text` + `rangeselector`, `updatemenues` and `sliders` `label` + text all support `meta`. To access the trace `meta` + values in an attribute in the same trace, simply use + `%{meta[i]}` where `i` is the index or key of the + `meta` item in question. To access trace `meta` in + layout attributes, use `%{data[n[.meta[i]}` where `i` + is the index or key of the `meta` and `n` is the trace + index. + metasrc + Sets the source reference on Chart Studio Cloud for + `meta`. + name + Sets the trace name. The trace name appears as the + legend item and on hover. + opacity + Sets the opacity of the trace. + outsidetextfont + Sets the font used for `textinfo` lying outside the + sector. + pull + Sets the fraction of larger radius to pull the sectors + out from the center. This can be a constant to pull all + slices apart from each other equally or an array to + highlight one or more slices. + pullsrc + Sets the source reference on Chart Studio Cloud for + `pull`. + rotation + Instead of the first slice starting at 12 o'clock, + rotate to some other angle. + scalegroup + If there are multiple pie charts that should be sized + according to their totals, link them by providing a + non-empty group id here shared by every trace in the + same group. + showlegend + Determines whether or not items corresponding to the + pie slices are shown in the legend. Can be an array if + `values` is set. In that case, each entry specifies + appearance in the legend for one slice. + showlegendsrc + Sets the source reference on Chart Studio Cloud for + `showlegend`. + sort + Determines whether or not the sectors are reordered + from largest to smallest. + stream + :class:`plotly.graph_objects.pie.Stream` instance or + dict with compatible properties + text + Sets text elements associated with each sector. If + trace `textinfo` contains a "text" flag, these elements + will be seen on the chart. If trace `hoverinfo` + contains a "text" flag and "hovertext" is not set, + these elements will be seen in the hover labels. + textfont + Sets the font used for `textinfo`. + textinfo + Determines which trace information appear on the graph. + textposition + Specifies the location of the `textinfo`. + textpositionsrc + Sets the source reference on Chart Studio Cloud for + `textposition`. + textsrc + Sets the source reference on Chart Studio Cloud for + `text`. + texttemplate + Template string used for rendering the information text + that appears on points. Note that this will override + `textinfo`. Variables are inserted using %{variable}, + for example "y: %{y}". Numbers are formatted using + d3-format's syntax %{variable:d3-format}, for example + "Price: %{y:$.2f}". + https://github.com/d3/d3-format/tree/v1.4.5#d3-format + for details on the formatting syntax. Dates are + formatted using d3-time-format's syntax + %{variable|d3-time-format}, for example "Day: + %{2019-01-01|%A}". https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format for details on the + date formatting syntax. Variables that can't be found + will be replaced with the specifier. For example, a + template of "data: %{x}, %{y}" will result in a value + of "data: 1, %{y}" if x is 1 and y is missing. + Variables with an undefined value will be replaced with + the fallback value. All attributes that can be + specified per-point (the ones that are `arrayOk: true`) + are available. Finally, the template string has access + to variables `label`, `color`, `value`, `percent` and + `text`. + texttemplatefallback + Fallback string that's displayed when a variable + referenced in a template is missing. If the boolean + value 'false' is passed in, the specifier with the + missing variable will be displayed. + texttemplatesrc + Sets the source reference on Chart Studio Cloud for + `texttemplate`. + title + :class:`plotly.graph_objects.pie.Title` instance or + dict with compatible properties + uid + Assign an id to this trace, Use this to provide object + constancy between traces during animations and + transitions. + uirevision + Controls persistence of some user-driven changes to the + trace: `constraintrange` in `parcoords` traces, as well + as some `editable: true` modifications such as `name` + and `colorbar.title`. Defaults to `layout.uirevision`. + Note that other user-driven trace attribute changes are + controlled by `layout` attributes: `trace.visible` is + controlled by `layout.legend.uirevision`, + `selectedpoints` is controlled by + `layout.selectionrevision`, and `colorbar.(x|y)` + (accessible with `config: {editable: true}`) is + controlled by `layout.editrevision`. Trace changes are + tracked by `uid`, which only falls back on trace index + if no `uid` is provided. So if your app can add/remove + traces before the end of the `data` array, such that + the same trace has a different index, you can still + preserve user-driven changes if you give each trace a + `uid` that stays with it as it moves. + values + Sets the values of the sectors. If omitted, we count + occurrences of each label. + valuessrc + Sets the source reference on Chart Studio Cloud for + `values`. + visible + Determines whether or not this trace is visible. If + "legendonly", the trace is not drawn, but can appear as + a legend item (provided that the legend itself is + visible). + + Returns + ------- + Pie + """ + super().__init__("pie") + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + if arg is None: + arg = {} + elif isinstance(arg, self.__class__): + arg = arg.to_plotly_json() + elif isinstance(arg, dict): + arg = _copy.copy(arg) + else: + raise ValueError("""\ +The first argument to the plotly.graph_objs.Pie +constructor must be a dict or +an instance of :class:`plotly.graph_objs.Pie`""") + + self._skip_invalid = kwargs.pop("skip_invalid", False) + self._validate = kwargs.pop("_validate", True) + + self._set_property("automargin", arg, automargin) + self._set_property("customdata", arg, customdata) + self._set_property("customdatasrc", arg, customdatasrc) + self._set_property("direction", arg, direction) + self._set_property("dlabel", arg, dlabel) + self._set_property("domain", arg, domain) + self._set_property("hole", arg, hole) + self._set_property("hoverinfo", arg, hoverinfo) + self._set_property("hoverinfosrc", arg, hoverinfosrc) + self._set_property("hoverlabel", arg, hoverlabel) + self._set_property("hovertemplate", arg, hovertemplate) + self._set_property("hovertemplatefallback", arg, hovertemplatefallback) + self._set_property("hovertemplatesrc", arg, hovertemplatesrc) + self._set_property("hovertext", arg, hovertext) + self._set_property("hovertextsrc", arg, hovertextsrc) + self._set_property("ids", arg, ids) + self._set_property("idssrc", arg, idssrc) + self._set_property("insidetextfont", arg, insidetextfont) + self._set_property("insidetextorientation", arg, insidetextorientation) + self._set_property("label0", arg, label0) + self._set_property("labels", arg, labels) + self._set_property("labelssrc", arg, labelssrc) + self._set_property("legend", arg, legend) + self._set_property("legendgroup", arg, legendgroup) + self._set_property("legendgrouptitle", arg, legendgrouptitle) + self._set_property("legendrank", arg, legendrank) + self._set_property("legendsrc", arg, legendsrc) + self._set_property("legendwidth", arg, legendwidth) + self._set_property("marker", arg, marker) + self._set_property("meta", arg, meta) + self._set_property("metasrc", arg, metasrc) + self._set_property("name", arg, name) + self._set_property("opacity", arg, opacity) + self._set_property("outsidetextfont", arg, outsidetextfont) + self._set_property("pull", arg, pull) + self._set_property("pullsrc", arg, pullsrc) + self._set_property("rotation", arg, rotation) + self._set_property("scalegroup", arg, scalegroup) + self._set_property("showlegend", arg, showlegend) + self._set_property("showlegendsrc", arg, showlegendsrc) + self._set_property("sort", arg, sort) + self._set_property("stream", arg, stream) + self._set_property("text", arg, text) + self._set_property("textfont", arg, textfont) + self._set_property("textinfo", arg, textinfo) + self._set_property("textposition", arg, textposition) + self._set_property("textpositionsrc", arg, textpositionsrc) + self._set_property("textsrc", arg, textsrc) + self._set_property("texttemplate", arg, texttemplate) + self._set_property("texttemplatefallback", arg, texttemplatefallback) + self._set_property("texttemplatesrc", arg, texttemplatesrc) + self._set_property("title", arg, title) + self._set_property("uid", arg, uid) + self._set_property("uirevision", arg, uirevision) + self._set_property("values", arg, values) + self._set_property("valuessrc", arg, valuessrc) + self._set_property("visible", arg, visible) + + self._props["type"] = "pie" + arg.pop("type", None) + self._process_kwargs(**dict(arg, **kwargs)) + self._skip_invalid = False diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/_sankey.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/_sankey.py new file mode 100644 index 0000000000000000000000000000000000000000..f32d44f6fdd2979235f5f961de1f02c6123ec00f --- /dev/null +++ b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/_sankey.py @@ -0,0 +1,966 @@ +# --- THIS FILE IS AUTO-GENERATED --- +# Modifications will be overwitten the next time code generation run. + +from plotly.basedatatypes import BaseTraceType as _BaseTraceType +import copy as _copy + + +class Sankey(_BaseTraceType): + _parent_path_str = "" + _path_str = "sankey" + _valid_props = { + "arrangement", + "customdata", + "customdatasrc", + "domain", + "hoverinfo", + "hoverlabel", + "ids", + "idssrc", + "legend", + "legendgrouptitle", + "legendrank", + "legendwidth", + "link", + "meta", + "metasrc", + "name", + "node", + "orientation", + "selectedpoints", + "stream", + "textfont", + "type", + "uid", + "uirevision", + "valueformat", + "valuesuffix", + "visible", + } + + @property + def arrangement(self): + """ + If value is `snap` (the default), the node arrangement is + assisted by automatic snapping of elements to preserve space + between nodes specified via `nodepad`. If value is + `perpendicular`, the nodes can only move along a line + perpendicular to the flow. If value is `freeform`, the nodes + can freely move on the plane. If value is `fixed`, the nodes + are stationary. + + The 'arrangement' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['snap', 'perpendicular', 'freeform', 'fixed'] + + Returns + ------- + Any + """ + return self["arrangement"] + + @arrangement.setter + def arrangement(self, val): + self["arrangement"] = val + + @property + def customdata(self): + """ + Assigns extra data each datum. This may be useful when + listening to hover, click and selection events. Note that, + "scatter" traces also appends customdata items in the markers + DOM elements + + The 'customdata' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["customdata"] + + @customdata.setter + def customdata(self, val): + self["customdata"] = val + + @property + def customdatasrc(self): + """ + Sets the source reference on Chart Studio Cloud for + `customdata`. + + The 'customdatasrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["customdatasrc"] + + @customdatasrc.setter + def customdatasrc(self, val): + self["customdatasrc"] = val + + @property + def domain(self): + """ + The 'domain' property is an instance of Domain + that may be specified as: + - An instance of :class:`plotly.graph_objs.sankey.Domain` + - A dict of string/value properties that will be passed + to the Domain constructor + + Returns + ------- + plotly.graph_objs.sankey.Domain + """ + return self["domain"] + + @domain.setter + def domain(self, val): + self["domain"] = val + + @property + def hoverinfo(self): + """ + Determines which trace information appear on hover. If `none` + or `skip` are set, no information is displayed upon hovering. + But, if `none` is set, click and hover events are still fired. + Note that this attribute is superseded by `node.hoverinfo` and + `node.hoverinfo` for nodes and links respectively. + + The 'hoverinfo' property is a flaglist and may be specified + as a string containing: + - Any combination of [] joined with '+' characters + (e.g. '') + OR exactly one of ['all', 'none', 'skip'] (e.g. 'skip') + + Returns + ------- + Any + """ + return self["hoverinfo"] + + @hoverinfo.setter + def hoverinfo(self, val): + self["hoverinfo"] = val + + @property + def hoverlabel(self): + """ + The 'hoverlabel' property is an instance of Hoverlabel + that may be specified as: + - An instance of :class:`plotly.graph_objs.sankey.Hoverlabel` + - A dict of string/value properties that will be passed + to the Hoverlabel constructor + + Returns + ------- + plotly.graph_objs.sankey.Hoverlabel + """ + return self["hoverlabel"] + + @hoverlabel.setter + def hoverlabel(self, val): + self["hoverlabel"] = val + + @property + def ids(self): + """ + Assigns id labels to each datum. These ids for object constancy + of data points during animation. Should be an array of strings, + not numbers or any other type. + + The 'ids' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["ids"] + + @ids.setter + def ids(self, val): + self["ids"] = val + + @property + def idssrc(self): + """ + Sets the source reference on Chart Studio Cloud for `ids`. + + The 'idssrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["idssrc"] + + @idssrc.setter + def idssrc(self, val): + self["idssrc"] = val + + @property + def legend(self): + """ + Sets the reference to a legend to show this trace in. + References to these legends are "legend", "legend2", "legend3", + etc. Settings for these legends are set in the layout, under + `layout.legend`, `layout.legend2`, etc. + + The 'legend' property is an identifier of a particular + subplot, of type 'legend', that may be specified as: + - the string 'legend' optionally followed by an integer >= 1 + (e.g. 'legend', 'legend1', 'legend2', 'legend3', etc.) + + Returns + ------- + str + """ + return self["legend"] + + @legend.setter + def legend(self, val): + self["legend"] = val + + @property + def legendgrouptitle(self): + """ + The 'legendgrouptitle' property is an instance of Legendgrouptitle + that may be specified as: + - An instance of :class:`plotly.graph_objs.sankey.Legendgrouptitle` + - A dict of string/value properties that will be passed + to the Legendgrouptitle constructor + + Returns + ------- + plotly.graph_objs.sankey.Legendgrouptitle + """ + return self["legendgrouptitle"] + + @legendgrouptitle.setter + def legendgrouptitle(self, val): + self["legendgrouptitle"] = val + + @property + def legendrank(self): + """ + Sets the legend rank for this trace. Items and groups with + smaller ranks are presented on top/left side while with + "reversed" `legend.traceorder` they are on bottom/right side. + The default legendrank is 1000, so that you can use ranks less + than 1000 to place certain items before all unranked items, and + ranks greater than 1000 to go after all unranked items. When + having unranked or equal rank items shapes would be displayed + after traces i.e. according to their order in data and layout. + + The 'legendrank' property is a number and may be specified as: + - An int or float + + Returns + ------- + int|float + """ + return self["legendrank"] + + @legendrank.setter + def legendrank(self, val): + self["legendrank"] = val + + @property + def legendwidth(self): + """ + Sets the width (in px or fraction) of the legend for this + trace. + + The 'legendwidth' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["legendwidth"] + + @legendwidth.setter + def legendwidth(self, val): + self["legendwidth"] = val + + @property + def link(self): + """ + The links of the Sankey plot. + + The 'link' property is an instance of Link + that may be specified as: + - An instance of :class:`plotly.graph_objs.sankey.Link` + - A dict of string/value properties that will be passed + to the Link constructor + + Returns + ------- + plotly.graph_objs.sankey.Link + """ + return self["link"] + + @link.setter + def link(self, val): + self["link"] = val + + @property + def meta(self): + """ + Assigns extra meta information associated with this trace that + can be used in various text attributes. Attributes such as + trace `name`, graph, axis and colorbar `title.text`, annotation + `text` `rangeselector`, `updatemenues` and `sliders` `label` + text all support `meta`. To access the trace `meta` values in + an attribute in the same trace, simply use `%{meta[i]}` where + `i` is the index or key of the `meta` item in question. To + access trace `meta` in layout attributes, use + `%{data[n[.meta[i]}` where `i` is the index or key of the + `meta` and `n` is the trace index. + + The 'meta' property accepts values of any type + + Returns + ------- + Any|numpy.ndarray + """ + return self["meta"] + + @meta.setter + def meta(self, val): + self["meta"] = val + + @property + def metasrc(self): + """ + Sets the source reference on Chart Studio Cloud for `meta`. + + The 'metasrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["metasrc"] + + @metasrc.setter + def metasrc(self, val): + self["metasrc"] = val + + @property + def name(self): + """ + Sets the trace name. The trace name appears as the legend item + and on hover. + + The 'name' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["name"] + + @name.setter + def name(self, val): + self["name"] = val + + @property + def node(self): + """ + The nodes of the Sankey plot. + + The 'node' property is an instance of Node + that may be specified as: + - An instance of :class:`plotly.graph_objs.sankey.Node` + - A dict of string/value properties that will be passed + to the Node constructor + + Returns + ------- + plotly.graph_objs.sankey.Node + """ + return self["node"] + + @node.setter + def node(self, val): + self["node"] = val + + @property + def orientation(self): + """ + Sets the orientation of the Sankey diagram. + + The 'orientation' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['v', 'h'] + + Returns + ------- + Any + """ + return self["orientation"] + + @orientation.setter + def orientation(self, val): + self["orientation"] = val + + @property + def selectedpoints(self): + """ + Array containing integer indices of selected points. Has an + effect only for traces that support selections. Note that an + empty array means an empty selection where the `unselected` are + turned on for all points, whereas, any other non-array values + means no selection all where the `selected` and `unselected` + styles have no effect. + + The 'selectedpoints' property accepts values of any type + + Returns + ------- + Any + """ + return self["selectedpoints"] + + @selectedpoints.setter + def selectedpoints(self, val): + self["selectedpoints"] = val + + @property + def stream(self): + """ + The 'stream' property is an instance of Stream + that may be specified as: + - An instance of :class:`plotly.graph_objs.sankey.Stream` + - A dict of string/value properties that will be passed + to the Stream constructor + + Returns + ------- + plotly.graph_objs.sankey.Stream + """ + return self["stream"] + + @stream.setter + def stream(self, val): + self["stream"] = val + + @property + def textfont(self): + """ + Sets the font for node labels + + The 'textfont' property is an instance of Textfont + that may be specified as: + - An instance of :class:`plotly.graph_objs.sankey.Textfont` + - A dict of string/value properties that will be passed + to the Textfont constructor + + Returns + ------- + plotly.graph_objs.sankey.Textfont + """ + return self["textfont"] + + @textfont.setter + def textfont(self, val): + self["textfont"] = val + + @property + def uid(self): + """ + Assign an id to this trace, Use this to provide object + constancy between traces during animations and transitions. + + The 'uid' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["uid"] + + @uid.setter + def uid(self, val): + self["uid"] = val + + @property + def uirevision(self): + """ + Controls persistence of some user-driven changes to the trace: + `constraintrange` in `parcoords` traces, as well as some + `editable: true` modifications such as `name` and + `colorbar.title`. Defaults to `layout.uirevision`. Note that + other user-driven trace attribute changes are controlled by + `layout` attributes: `trace.visible` is controlled by + `layout.legend.uirevision`, `selectedpoints` is controlled by + `layout.selectionrevision`, and `colorbar.(x|y)` (accessible + with `config: {editable: true}`) is controlled by + `layout.editrevision`. Trace changes are tracked by `uid`, + which only falls back on trace index if no `uid` is provided. + So if your app can add/remove traces before the end of the + `data` array, such that the same trace has a different index, + you can still preserve user-driven changes if you give each + trace a `uid` that stays with it as it moves. + + The 'uirevision' property accepts values of any type + + Returns + ------- + Any + """ + return self["uirevision"] + + @uirevision.setter + def uirevision(self, val): + self["uirevision"] = val + + @property + def valueformat(self): + """ + Sets the value formatting rule using d3 formatting mini- + languages which are very similar to those in Python. For + numbers, see: + https://github.com/d3/d3-format/tree/v1.4.5#d3-format. + + The 'valueformat' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["valueformat"] + + @valueformat.setter + def valueformat(self, val): + self["valueformat"] = val + + @property + def valuesuffix(self): + """ + Adds a unit to follow the value in the hover tooltip. Add a + space if a separation is necessary from the value. + + The 'valuesuffix' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["valuesuffix"] + + @valuesuffix.setter + def valuesuffix(self, val): + self["valuesuffix"] = val + + @property + def visible(self): + """ + Determines whether or not this trace is visible. If + "legendonly", the trace is not drawn, but can appear as a + legend item (provided that the legend itself is visible). + + The 'visible' property is an enumeration that may be specified as: + - One of the following enumeration values: + [True, False, 'legendonly'] + + Returns + ------- + Any + """ + return self["visible"] + + @visible.setter + def visible(self, val): + self["visible"] = val + + @property + def type(self): + return self._props["type"] + + @property + def _prop_descriptions(self): + return """\ + arrangement + If value is `snap` (the default), the node arrangement + is assisted by automatic snapping of elements to + preserve space between nodes specified via `nodepad`. + If value is `perpendicular`, the nodes can only move + along a line perpendicular to the flow. If value is + `freeform`, the nodes can freely move on the plane. If + value is `fixed`, the nodes are stationary. + customdata + Assigns extra data each datum. This may be useful when + listening to hover, click and selection events. Note + that, "scatter" traces also appends customdata items in + the markers DOM elements + customdatasrc + Sets the source reference on Chart Studio Cloud for + `customdata`. + domain + :class:`plotly.graph_objects.sankey.Domain` instance or + dict with compatible properties + hoverinfo + Determines which trace information appear on hover. If + `none` or `skip` are set, no information is displayed + upon hovering. But, if `none` is set, click and hover + events are still fired. Note that this attribute is + superseded by `node.hoverinfo` and `node.hoverinfo` for + nodes and links respectively. + hoverlabel + :class:`plotly.graph_objects.sankey.Hoverlabel` + instance or dict with compatible properties + ids + Assigns id labels to each datum. These ids for object + constancy of data points during animation. Should be an + array of strings, not numbers or any other type. + idssrc + Sets the source reference on Chart Studio Cloud for + `ids`. + legend + Sets the reference to a legend to show this trace in. + References to these legends are "legend", "legend2", + "legend3", etc. Settings for these legends are set in + the layout, under `layout.legend`, `layout.legend2`, + etc. + legendgrouptitle + :class:`plotly.graph_objects.sankey.Legendgrouptitle` + instance or dict with compatible properties + legendrank + Sets the legend rank for this trace. Items and groups + with smaller ranks are presented on top/left side while + with "reversed" `legend.traceorder` they are on + bottom/right side. The default legendrank is 1000, so + that you can use ranks less than 1000 to place certain + items before all unranked items, and ranks greater than + 1000 to go after all unranked items. When having + unranked or equal rank items shapes would be displayed + after traces i.e. according to their order in data and + layout. + legendwidth + Sets the width (in px or fraction) of the legend for + this trace. + link + The links of the Sankey plot. + meta + Assigns extra meta information associated with this + trace that can be used in various text attributes. + Attributes such as trace `name`, graph, axis and + colorbar `title.text`, annotation `text` + `rangeselector`, `updatemenues` and `sliders` `label` + text all support `meta`. To access the trace `meta` + values in an attribute in the same trace, simply use + `%{meta[i]}` where `i` is the index or key of the + `meta` item in question. To access trace `meta` in + layout attributes, use `%{data[n[.meta[i]}` where `i` + is the index or key of the `meta` and `n` is the trace + index. + metasrc + Sets the source reference on Chart Studio Cloud for + `meta`. + name + Sets the trace name. The trace name appears as the + legend item and on hover. + node + The nodes of the Sankey plot. + orientation + Sets the orientation of the Sankey diagram. + selectedpoints + Array containing integer indices of selected points. + Has an effect only for traces that support selections. + Note that an empty array means an empty selection where + the `unselected` are turned on for all points, whereas, + any other non-array values means no selection all where + the `selected` and `unselected` styles have no effect. + stream + :class:`plotly.graph_objects.sankey.Stream` instance or + dict with compatible properties + textfont + Sets the font for node labels + uid + Assign an id to this trace, Use this to provide object + constancy between traces during animations and + transitions. + uirevision + Controls persistence of some user-driven changes to the + trace: `constraintrange` in `parcoords` traces, as well + as some `editable: true` modifications such as `name` + and `colorbar.title`. Defaults to `layout.uirevision`. + Note that other user-driven trace attribute changes are + controlled by `layout` attributes: `trace.visible` is + controlled by `layout.legend.uirevision`, + `selectedpoints` is controlled by + `layout.selectionrevision`, and `colorbar.(x|y)` + (accessible with `config: {editable: true}`) is + controlled by `layout.editrevision`. Trace changes are + tracked by `uid`, which only falls back on trace index + if no `uid` is provided. So if your app can add/remove + traces before the end of the `data` array, such that + the same trace has a different index, you can still + preserve user-driven changes if you give each trace a + `uid` that stays with it as it moves. + valueformat + Sets the value formatting rule using d3 formatting + mini-languages which are very similar to those in + Python. For numbers, see: + https://github.com/d3/d3-format/tree/v1.4.5#d3-format. + valuesuffix + Adds a unit to follow the value in the hover tooltip. + Add a space if a separation is necessary from the + value. + visible + Determines whether or not this trace is visible. If + "legendonly", the trace is not drawn, but can appear as + a legend item (provided that the legend itself is + visible). + """ + + def __init__( + self, + arg=None, + arrangement=None, + customdata=None, + customdatasrc=None, + domain=None, + hoverinfo=None, + hoverlabel=None, + ids=None, + idssrc=None, + legend=None, + legendgrouptitle=None, + legendrank=None, + legendwidth=None, + link=None, + meta=None, + metasrc=None, + name=None, + node=None, + orientation=None, + selectedpoints=None, + stream=None, + textfont=None, + uid=None, + uirevision=None, + valueformat=None, + valuesuffix=None, + visible=None, + **kwargs, + ): + """ + Construct a new Sankey object + + Sankey plots for network flow data analysis. The nodes are + specified in `nodes` and the links between sources and targets + in `links`. The colors are set in `nodes[i].color` and + `links[i].color`, otherwise defaults are used. + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of :class:`plotly.graph_objs.Sankey` + arrangement + If value is `snap` (the default), the node arrangement + is assisted by automatic snapping of elements to + preserve space between nodes specified via `nodepad`. + If value is `perpendicular`, the nodes can only move + along a line perpendicular to the flow. If value is + `freeform`, the nodes can freely move on the plane. If + value is `fixed`, the nodes are stationary. + customdata + Assigns extra data each datum. This may be useful when + listening to hover, click and selection events. Note + that, "scatter" traces also appends customdata items in + the markers DOM elements + customdatasrc + Sets the source reference on Chart Studio Cloud for + `customdata`. + domain + :class:`plotly.graph_objects.sankey.Domain` instance or + dict with compatible properties + hoverinfo + Determines which trace information appear on hover. If + `none` or `skip` are set, no information is displayed + upon hovering. But, if `none` is set, click and hover + events are still fired. Note that this attribute is + superseded by `node.hoverinfo` and `node.hoverinfo` for + nodes and links respectively. + hoverlabel + :class:`plotly.graph_objects.sankey.Hoverlabel` + instance or dict with compatible properties + ids + Assigns id labels to each datum. These ids for object + constancy of data points during animation. Should be an + array of strings, not numbers or any other type. + idssrc + Sets the source reference on Chart Studio Cloud for + `ids`. + legend + Sets the reference to a legend to show this trace in. + References to these legends are "legend", "legend2", + "legend3", etc. Settings for these legends are set in + the layout, under `layout.legend`, `layout.legend2`, + etc. + legendgrouptitle + :class:`plotly.graph_objects.sankey.Legendgrouptitle` + instance or dict with compatible properties + legendrank + Sets the legend rank for this trace. Items and groups + with smaller ranks are presented on top/left side while + with "reversed" `legend.traceorder` they are on + bottom/right side. The default legendrank is 1000, so + that you can use ranks less than 1000 to place certain + items before all unranked items, and ranks greater than + 1000 to go after all unranked items. When having + unranked or equal rank items shapes would be displayed + after traces i.e. according to their order in data and + layout. + legendwidth + Sets the width (in px or fraction) of the legend for + this trace. + link + The links of the Sankey plot. + meta + Assigns extra meta information associated with this + trace that can be used in various text attributes. + Attributes such as trace `name`, graph, axis and + colorbar `title.text`, annotation `text` + `rangeselector`, `updatemenues` and `sliders` `label` + text all support `meta`. To access the trace `meta` + values in an attribute in the same trace, simply use + `%{meta[i]}` where `i` is the index or key of the + `meta` item in question. To access trace `meta` in + layout attributes, use `%{data[n[.meta[i]}` where `i` + is the index or key of the `meta` and `n` is the trace + index. + metasrc + Sets the source reference on Chart Studio Cloud for + `meta`. + name + Sets the trace name. The trace name appears as the + legend item and on hover. + node + The nodes of the Sankey plot. + orientation + Sets the orientation of the Sankey diagram. + selectedpoints + Array containing integer indices of selected points. + Has an effect only for traces that support selections. + Note that an empty array means an empty selection where + the `unselected` are turned on for all points, whereas, + any other non-array values means no selection all where + the `selected` and `unselected` styles have no effect. + stream + :class:`plotly.graph_objects.sankey.Stream` instance or + dict with compatible properties + textfont + Sets the font for node labels + uid + Assign an id to this trace, Use this to provide object + constancy between traces during animations and + transitions. + uirevision + Controls persistence of some user-driven changes to the + trace: `constraintrange` in `parcoords` traces, as well + as some `editable: true` modifications such as `name` + and `colorbar.title`. Defaults to `layout.uirevision`. + Note that other user-driven trace attribute changes are + controlled by `layout` attributes: `trace.visible` is + controlled by `layout.legend.uirevision`, + `selectedpoints` is controlled by + `layout.selectionrevision`, and `colorbar.(x|y)` + (accessible with `config: {editable: true}`) is + controlled by `layout.editrevision`. Trace changes are + tracked by `uid`, which only falls back on trace index + if no `uid` is provided. So if your app can add/remove + traces before the end of the `data` array, such that + the same trace has a different index, you can still + preserve user-driven changes if you give each trace a + `uid` that stays with it as it moves. + valueformat + Sets the value formatting rule using d3 formatting + mini-languages which are very similar to those in + Python. For numbers, see: + https://github.com/d3/d3-format/tree/v1.4.5#d3-format. + valuesuffix + Adds a unit to follow the value in the hover tooltip. + Add a space if a separation is necessary from the + value. + visible + Determines whether or not this trace is visible. If + "legendonly", the trace is not drawn, but can appear as + a legend item (provided that the legend itself is + visible). + + Returns + ------- + Sankey + """ + super().__init__("sankey") + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + if arg is None: + arg = {} + elif isinstance(arg, self.__class__): + arg = arg.to_plotly_json() + elif isinstance(arg, dict): + arg = _copy.copy(arg) + else: + raise ValueError("""\ +The first argument to the plotly.graph_objs.Sankey +constructor must be a dict or +an instance of :class:`plotly.graph_objs.Sankey`""") + + self._skip_invalid = kwargs.pop("skip_invalid", False) + self._validate = kwargs.pop("_validate", True) + + self._set_property("arrangement", arg, arrangement) + self._set_property("customdata", arg, customdata) + self._set_property("customdatasrc", arg, customdatasrc) + self._set_property("domain", arg, domain) + self._set_property("hoverinfo", arg, hoverinfo) + self._set_property("hoverlabel", arg, hoverlabel) + self._set_property("ids", arg, ids) + self._set_property("idssrc", arg, idssrc) + self._set_property("legend", arg, legend) + self._set_property("legendgrouptitle", arg, legendgrouptitle) + self._set_property("legendrank", arg, legendrank) + self._set_property("legendwidth", arg, legendwidth) + self._set_property("link", arg, link) + self._set_property("meta", arg, meta) + self._set_property("metasrc", arg, metasrc) + self._set_property("name", arg, name) + self._set_property("node", arg, node) + self._set_property("orientation", arg, orientation) + self._set_property("selectedpoints", arg, selectedpoints) + self._set_property("stream", arg, stream) + self._set_property("textfont", arg, textfont) + self._set_property("uid", arg, uid) + self._set_property("uirevision", arg, uirevision) + self._set_property("valueformat", arg, valueformat) + self._set_property("valuesuffix", arg, valuesuffix) + self._set_property("visible", arg, visible) + + self._props["type"] = "sankey" + arg.pop("type", None) + self._process_kwargs(**dict(arg, **kwargs)) + self._skip_invalid = False diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/_scatter.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/_scatter.py new file mode 100644 index 0000000000000000000000000000000000000000..ad5ab6b624f7a339f8206cfcb8d1c03049285603 --- /dev/null +++ b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/_scatter.py @@ -0,0 +1,2846 @@ +# --- THIS FILE IS AUTO-GENERATED --- +# Modifications will be overwitten the next time code generation run. + +from plotly.basedatatypes import BaseTraceType as _BaseTraceType +import copy as _copy + + +class Scatter(_BaseTraceType): + _parent_path_str = "" + _path_str = "scatter" + _valid_props = { + "alignmentgroup", + "cliponaxis", + "connectgaps", + "customdata", + "customdatasrc", + "dx", + "dy", + "error_x", + "error_y", + "fill", + "fillcolor", + "fillgradient", + "fillpattern", + "groupnorm", + "hoverinfo", + "hoverinfosrc", + "hoverlabel", + "hoveron", + "hovertemplate", + "hovertemplatefallback", + "hovertemplatesrc", + "hovertext", + "hovertextsrc", + "ids", + "idssrc", + "legend", + "legendgroup", + "legendgrouptitle", + "legendrank", + "legendwidth", + "line", + "marker", + "meta", + "metasrc", + "mode", + "name", + "offsetgroup", + "opacity", + "orientation", + "selected", + "selectedpoints", + "showlegend", + "stackgaps", + "stackgroup", + "stream", + "text", + "textfont", + "textposition", + "textpositionsrc", + "textsrc", + "texttemplate", + "texttemplatefallback", + "texttemplatesrc", + "type", + "uid", + "uirevision", + "unselected", + "visible", + "x", + "x0", + "xaxis", + "xcalendar", + "xhoverformat", + "xperiod", + "xperiod0", + "xperiodalignment", + "xsrc", + "y", + "y0", + "yaxis", + "ycalendar", + "yhoverformat", + "yperiod", + "yperiod0", + "yperiodalignment", + "ysrc", + "zorder", + } + + @property + def alignmentgroup(self): + """ + Set several traces linked to the same position axis or matching + axes to the same alignmentgroup. This controls whether bars + compute their positional range dependently or independently. + + The 'alignmentgroup' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["alignmentgroup"] + + @alignmentgroup.setter + def alignmentgroup(self, val): + self["alignmentgroup"] = val + + @property + def cliponaxis(self): + """ + Determines whether or not markers and text nodes are clipped + about the subplot axes. To show markers and text nodes above + axis lines and tick labels, make sure to set `xaxis.layer` and + `yaxis.layer` to *below traces*. + + The 'cliponaxis' property is a boolean and must be specified as: + - A boolean value: True or False + + Returns + ------- + bool + """ + return self["cliponaxis"] + + @cliponaxis.setter + def cliponaxis(self, val): + self["cliponaxis"] = val + + @property + def connectgaps(self): + """ + Determines whether or not gaps (i.e. {nan} or missing values) + in the provided data arrays are connected. + + The 'connectgaps' property is a boolean and must be specified as: + - A boolean value: True or False + + Returns + ------- + bool + """ + return self["connectgaps"] + + @connectgaps.setter + def connectgaps(self, val): + self["connectgaps"] = val + + @property + def customdata(self): + """ + Assigns extra data each datum. This may be useful when + listening to hover, click and selection events. Note that, + "scatter" traces also appends customdata items in the markers + DOM elements + + The 'customdata' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["customdata"] + + @customdata.setter + def customdata(self, val): + self["customdata"] = val + + @property + def customdatasrc(self): + """ + Sets the source reference on Chart Studio Cloud for + `customdata`. + + The 'customdatasrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["customdatasrc"] + + @customdatasrc.setter + def customdatasrc(self, val): + self["customdatasrc"] = val + + @property + def dx(self): + """ + Sets the x coordinate step. See `x0` for more info. + + The 'dx' property is a number and may be specified as: + - An int or float + + Returns + ------- + int|float + """ + return self["dx"] + + @dx.setter + def dx(self, val): + self["dx"] = val + + @property + def dy(self): + """ + Sets the y coordinate step. See `y0` for more info. + + The 'dy' property is a number and may be specified as: + - An int or float + + Returns + ------- + int|float + """ + return self["dy"] + + @dy.setter + def dy(self, val): + self["dy"] = val + + @property + def error_x(self): + """ + The 'error_x' property is an instance of ErrorX + that may be specified as: + - An instance of :class:`plotly.graph_objs.scatter.ErrorX` + - A dict of string/value properties that will be passed + to the ErrorX constructor + + Returns + ------- + plotly.graph_objs.scatter.ErrorX + """ + return self["error_x"] + + @error_x.setter + def error_x(self, val): + self["error_x"] = val + + @property + def error_y(self): + """ + The 'error_y' property is an instance of ErrorY + that may be specified as: + - An instance of :class:`plotly.graph_objs.scatter.ErrorY` + - A dict of string/value properties that will be passed + to the ErrorY constructor + + Returns + ------- + plotly.graph_objs.scatter.ErrorY + """ + return self["error_y"] + + @error_y.setter + def error_y(self, val): + self["error_y"] = val + + @property + def fill(self): + """ + Sets the area to fill with a solid color. Defaults to "none" + unless this trace is stacked, then it gets "tonexty" + ("tonextx") if `orientation` is "v" ("h") Use with `fillcolor` + if not "none". "tozerox" and "tozeroy" fill to x=0 and y=0 + respectively. "tonextx" and "tonexty" fill between the + endpoints of this trace and the endpoints of the trace before + it, connecting those endpoints with straight lines (to make a + stacked area graph); if there is no trace before it, they + behave like "tozerox" and "tozeroy". "toself" connects the + endpoints of the trace (or each segment of the trace if it has + gaps) into a closed shape. "tonext" fills the space between two + traces if one completely encloses the other (eg consecutive + contour lines), and behaves like "toself" if there is no trace + before it. "tonext" should not be used if one trace does not + enclose the other. Traces in a `stackgroup` will only fill to + (or be filled to) other traces in the same group. With multiple + `stackgroup`s or some traces stacked and some not, if fill- + linked traces are not already consecutive, the later ones will + be pushed down in the drawing order. + + The 'fill' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['none', 'tozeroy', 'tozerox', 'tonexty', 'tonextx', + 'toself', 'tonext'] + + Returns + ------- + Any + """ + return self["fill"] + + @fill.setter + def fill(self, val): + self["fill"] = val + + @property + def fillcolor(self): + """ + Sets the fill color. Defaults to a half-transparent variant of + the line color, marker color, or marker line color, whichever + is available. If fillgradient is specified, fillcolor is + ignored except for setting the background color of the hover + label, if any. + + The 'fillcolor' property is a color and may be specified as: + - A hex string (e.g. '#ff0000') + - An rgb/rgba string (e.g. 'rgb(255,0,0)') + - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') + - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') + - A named CSS color: see https://plotly.com/python/css-colors/ for a list + + Returns + ------- + str + """ + return self["fillcolor"] + + @fillcolor.setter + def fillcolor(self, val): + self["fillcolor"] = val + + @property + def fillgradient(self): + """ + Sets a fill gradient. If not specified, the fillcolor is used + instead. + + The 'fillgradient' property is an instance of Fillgradient + that may be specified as: + - An instance of :class:`plotly.graph_objs.scatter.Fillgradient` + - A dict of string/value properties that will be passed + to the Fillgradient constructor + + Returns + ------- + plotly.graph_objs.scatter.Fillgradient + """ + return self["fillgradient"] + + @fillgradient.setter + def fillgradient(self, val): + self["fillgradient"] = val + + @property + def fillpattern(self): + """ + Sets the pattern within the marker. + + The 'fillpattern' property is an instance of Fillpattern + that may be specified as: + - An instance of :class:`plotly.graph_objs.scatter.Fillpattern` + - A dict of string/value properties that will be passed + to the Fillpattern constructor + + Returns + ------- + plotly.graph_objs.scatter.Fillpattern + """ + return self["fillpattern"] + + @fillpattern.setter + def fillpattern(self, val): + self["fillpattern"] = val + + @property + def groupnorm(self): + """ + Only relevant when `stackgroup` is used, and only the first + `groupnorm` found in the `stackgroup` will be used - including + if `visible` is "legendonly" but not if it is `false`. Sets the + normalization for the sum of this `stackgroup`. With + "fraction", the value of each trace at each location is divided + by the sum of all trace values at that location. "percent" is + the same but multiplied by 100 to show percentages. If there + are multiple subplots, or multiple `stackgroup`s on one + subplot, each will be normalized within its own set. + + The 'groupnorm' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['', 'fraction', 'percent'] + + Returns + ------- + Any + """ + return self["groupnorm"] + + @groupnorm.setter + def groupnorm(self, val): + self["groupnorm"] = val + + @property + def hoverinfo(self): + """ + Determines which trace information appear on hover. If `none` + or `skip` are set, no information is displayed upon hovering. + But, if `none` is set, click and hover events are still fired. + + The 'hoverinfo' property is a flaglist and may be specified + as a string containing: + - Any combination of ['x', 'y', 'z', 'text', 'name'] joined with '+' characters + (e.g. 'x+y') + OR exactly one of ['all', 'none', 'skip'] (e.g. 'skip') + - A list or array of the above + + Returns + ------- + Any|numpy.ndarray + """ + return self["hoverinfo"] + + @hoverinfo.setter + def hoverinfo(self, val): + self["hoverinfo"] = val + + @property + def hoverinfosrc(self): + """ + Sets the source reference on Chart Studio Cloud for + `hoverinfo`. + + The 'hoverinfosrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["hoverinfosrc"] + + @hoverinfosrc.setter + def hoverinfosrc(self, val): + self["hoverinfosrc"] = val + + @property + def hoverlabel(self): + """ + The 'hoverlabel' property is an instance of Hoverlabel + that may be specified as: + - An instance of :class:`plotly.graph_objs.scatter.Hoverlabel` + - A dict of string/value properties that will be passed + to the Hoverlabel constructor + + Returns + ------- + plotly.graph_objs.scatter.Hoverlabel + """ + return self["hoverlabel"] + + @hoverlabel.setter + def hoverlabel(self, val): + self["hoverlabel"] = val + + @property + def hoveron(self): + """ + Do the hover effects highlight individual points (markers or + line points) or do they highlight filled regions? If the fill + is "toself" or "tonext" and there are no markers or text, then + the default is "fills", otherwise it is "points". + + The 'hoveron' property is a flaglist and may be specified + as a string containing: + - Any combination of ['points', 'fills'] joined with '+' characters + (e.g. 'points+fills') + + Returns + ------- + Any + """ + return self["hoveron"] + + @hoveron.setter + def hoveron(self, val): + self["hoveron"] = val + + @property + def hovertemplate(self): + """ + Template string used for rendering the information that appear + on hover box. Note that this will override `hoverinfo`. + Variables are inserted using %{variable}, for example "y: %{y}" + as well as %{xother}, {%_xother}, {%_xother_}, {%xother_}. When + showing info for several points, "xother" will be added to + those with different x positions from the first point. An + underscore before or after "(x|y)other" will add a space on + that side, only when this field is shown. Numbers are formatted + using d3-format's syntax %{variable:d3-format}, for example + "Price: %{y:$.2f}". + https://github.com/d3/d3-format/tree/v1.4.5#d3-format for + details on the formatting syntax. Dates are formatted using + d3-time-format's syntax %{variable|d3-time-format}, for example + "Day: %{2019-01-01|%A}". https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format for details on the date + formatting syntax. Variables that can't be found will be + replaced with the specifier. For example, a template of "data: + %{x}, %{y}" will result in a value of "data: 1, %{y}" if x is 1 + and y is missing. Variables with an undefined value will be + replaced with the fallback value. The variables available in + `hovertemplate` are the ones emitted as event data described at + this link https://plotly.com/javascript/plotlyjs-events/#event- + data. Additionally, all attributes that can be specified per- + point (the ones that are `arrayOk: true`) are available. + Anything contained in tag `` is displayed in the + secondary box, for example `%{fullData.name}`. + To hide the secondary box completely, use an empty tag + ``. + + The 'hovertemplate' property is a string and must be specified as: + - A string + - A number that will be converted to a string + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["hovertemplate"] + + @hovertemplate.setter + def hovertemplate(self, val): + self["hovertemplate"] = val + + @property + def hovertemplatefallback(self): + """ + Fallback string that's displayed when a variable referenced in + a template is missing. If the boolean value 'false' is passed + in, the specifier with the missing variable will be displayed. + + The 'hovertemplatefallback' property accepts values of any type + + Returns + ------- + Any + """ + return self["hovertemplatefallback"] + + @hovertemplatefallback.setter + def hovertemplatefallback(self, val): + self["hovertemplatefallback"] = val + + @property + def hovertemplatesrc(self): + """ + Sets the source reference on Chart Studio Cloud for + `hovertemplate`. + + The 'hovertemplatesrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["hovertemplatesrc"] + + @hovertemplatesrc.setter + def hovertemplatesrc(self, val): + self["hovertemplatesrc"] = val + + @property + def hovertext(self): + """ + Sets hover text elements associated with each (x,y) pair. If a + single string, the same string appears over all the data + points. If an array of string, the items are mapped in order to + the this trace's (x,y) coordinates. To be seen, trace + `hoverinfo` must contain a "text" flag. + + The 'hovertext' property is a string and must be specified as: + - A string + - A number that will be converted to a string + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["hovertext"] + + @hovertext.setter + def hovertext(self, val): + self["hovertext"] = val + + @property + def hovertextsrc(self): + """ + Sets the source reference on Chart Studio Cloud for + `hovertext`. + + The 'hovertextsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["hovertextsrc"] + + @hovertextsrc.setter + def hovertextsrc(self, val): + self["hovertextsrc"] = val + + @property + def ids(self): + """ + Assigns id labels to each datum. These ids for object constancy + of data points during animation. Should be an array of strings, + not numbers or any other type. + + The 'ids' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["ids"] + + @ids.setter + def ids(self, val): + self["ids"] = val + + @property + def idssrc(self): + """ + Sets the source reference on Chart Studio Cloud for `ids`. + + The 'idssrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["idssrc"] + + @idssrc.setter + def idssrc(self, val): + self["idssrc"] = val + + @property + def legend(self): + """ + Sets the reference to a legend to show this trace in. + References to these legends are "legend", "legend2", "legend3", + etc. Settings for these legends are set in the layout, under + `layout.legend`, `layout.legend2`, etc. + + The 'legend' property is an identifier of a particular + subplot, of type 'legend', that may be specified as: + - the string 'legend' optionally followed by an integer >= 1 + (e.g. 'legend', 'legend1', 'legend2', 'legend3', etc.) + + Returns + ------- + str + """ + return self["legend"] + + @legend.setter + def legend(self, val): + self["legend"] = val + + @property + def legendgroup(self): + """ + Sets the legend group for this trace. Traces and shapes part of + the same legend group hide/show at the same time when toggling + legend items. + + The 'legendgroup' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["legendgroup"] + + @legendgroup.setter + def legendgroup(self, val): + self["legendgroup"] = val + + @property + def legendgrouptitle(self): + """ + The 'legendgrouptitle' property is an instance of Legendgrouptitle + that may be specified as: + - An instance of :class:`plotly.graph_objs.scatter.Legendgrouptitle` + - A dict of string/value properties that will be passed + to the Legendgrouptitle constructor + + Returns + ------- + plotly.graph_objs.scatter.Legendgrouptitle + """ + return self["legendgrouptitle"] + + @legendgrouptitle.setter + def legendgrouptitle(self, val): + self["legendgrouptitle"] = val + + @property + def legendrank(self): + """ + Sets the legend rank for this trace. Items and groups with + smaller ranks are presented on top/left side while with + "reversed" `legend.traceorder` they are on bottom/right side. + The default legendrank is 1000, so that you can use ranks less + than 1000 to place certain items before all unranked items, and + ranks greater than 1000 to go after all unranked items. When + having unranked or equal rank items shapes would be displayed + after traces i.e. according to their order in data and layout. + + The 'legendrank' property is a number and may be specified as: + - An int or float + + Returns + ------- + int|float + """ + return self["legendrank"] + + @legendrank.setter + def legendrank(self, val): + self["legendrank"] = val + + @property + def legendwidth(self): + """ + Sets the width (in px or fraction) of the legend for this + trace. + + The 'legendwidth' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["legendwidth"] + + @legendwidth.setter + def legendwidth(self, val): + self["legendwidth"] = val + + @property + def line(self): + """ + The 'line' property is an instance of Line + that may be specified as: + - An instance of :class:`plotly.graph_objs.scatter.Line` + - A dict of string/value properties that will be passed + to the Line constructor + + Returns + ------- + plotly.graph_objs.scatter.Line + """ + return self["line"] + + @line.setter + def line(self, val): + self["line"] = val + + @property + def marker(self): + """ + The 'marker' property is an instance of Marker + that may be specified as: + - An instance of :class:`plotly.graph_objs.scatter.Marker` + - A dict of string/value properties that will be passed + to the Marker constructor + + Returns + ------- + plotly.graph_objs.scatter.Marker + """ + return self["marker"] + + @marker.setter + def marker(self, val): + self["marker"] = val + + @property + def meta(self): + """ + Assigns extra meta information associated with this trace that + can be used in various text attributes. Attributes such as + trace `name`, graph, axis and colorbar `title.text`, annotation + `text` `rangeselector`, `updatemenues` and `sliders` `label` + text all support `meta`. To access the trace `meta` values in + an attribute in the same trace, simply use `%{meta[i]}` where + `i` is the index or key of the `meta` item in question. To + access trace `meta` in layout attributes, use + `%{data[n[.meta[i]}` where `i` is the index or key of the + `meta` and `n` is the trace index. + + The 'meta' property accepts values of any type + + Returns + ------- + Any|numpy.ndarray + """ + return self["meta"] + + @meta.setter + def meta(self, val): + self["meta"] = val + + @property + def metasrc(self): + """ + Sets the source reference on Chart Studio Cloud for `meta`. + + The 'metasrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["metasrc"] + + @metasrc.setter + def metasrc(self, val): + self["metasrc"] = val + + @property + def mode(self): + """ + Determines the drawing mode for this scatter trace. If the + provided `mode` includes "text" then the `text` elements appear + at the coordinates. Otherwise, the `text` elements appear on + hover. If there are less than 20 points and the trace is not + stacked then the default is "lines+markers". Otherwise, + "lines". + + The 'mode' property is a flaglist and may be specified + as a string containing: + - Any combination of ['lines', 'markers', 'text'] joined with '+' characters + (e.g. 'lines+markers') + OR exactly one of ['none'] (e.g. 'none') + + Returns + ------- + Any + """ + return self["mode"] + + @mode.setter + def mode(self, val): + self["mode"] = val + + @property + def name(self): + """ + Sets the trace name. The trace name appears as the legend item + and on hover. + + The 'name' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["name"] + + @name.setter + def name(self, val): + self["name"] = val + + @property + def offsetgroup(self): + """ + Set several traces linked to the same position axis or matching + axes to the same offsetgroup where bars of the same position + coordinate will line up. + + The 'offsetgroup' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["offsetgroup"] + + @offsetgroup.setter + def offsetgroup(self, val): + self["offsetgroup"] = val + + @property + def opacity(self): + """ + Sets the opacity of the trace. + + The 'opacity' property is a number and may be specified as: + - An int or float in the interval [0, 1] + + Returns + ------- + int|float + """ + return self["opacity"] + + @opacity.setter + def opacity(self, val): + self["opacity"] = val + + @property + def orientation(self): + """ + Only relevant in the following cases: 1. when `scattermode` is + set to "group". 2. when `stackgroup` is used, and only the + first `orientation` found in the `stackgroup` will be used - + including if `visible` is "legendonly" but not if it is + `false`. Sets the stacking direction. With "v" ("h"), the y (x) + values of subsequent traces are added. Also affects the default + value of `fill`. + + The 'orientation' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['v', 'h'] + + Returns + ------- + Any + """ + return self["orientation"] + + @orientation.setter + def orientation(self, val): + self["orientation"] = val + + @property + def selected(self): + """ + The 'selected' property is an instance of Selected + that may be specified as: + - An instance of :class:`plotly.graph_objs.scatter.Selected` + - A dict of string/value properties that will be passed + to the Selected constructor + + Returns + ------- + plotly.graph_objs.scatter.Selected + """ + return self["selected"] + + @selected.setter + def selected(self, val): + self["selected"] = val + + @property + def selectedpoints(self): + """ + Array containing integer indices of selected points. Has an + effect only for traces that support selections. Note that an + empty array means an empty selection where the `unselected` are + turned on for all points, whereas, any other non-array values + means no selection all where the `selected` and `unselected` + styles have no effect. + + The 'selectedpoints' property accepts values of any type + + Returns + ------- + Any + """ + return self["selectedpoints"] + + @selectedpoints.setter + def selectedpoints(self, val): + self["selectedpoints"] = val + + @property + def showlegend(self): + """ + Determines whether or not an item corresponding to this trace + is shown in the legend. + + The 'showlegend' property is a boolean and must be specified as: + - A boolean value: True or False + + Returns + ------- + bool + """ + return self["showlegend"] + + @showlegend.setter + def showlegend(self, val): + self["showlegend"] = val + + @property + def stackgaps(self): + """ + Only relevant when `stackgroup` is used, and only the first + `stackgaps` found in the `stackgroup` will be used - including + if `visible` is "legendonly" but not if it is `false`. + Determines how we handle locations at which other traces in + this group have data but this one does not. With *infer zero* + we insert a zero at these locations. With "interpolate" we + linearly interpolate between existing values, and extrapolate a + constant beyond the existing values. + + The 'stackgaps' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['infer zero', 'interpolate'] + + Returns + ------- + Any + """ + return self["stackgaps"] + + @stackgaps.setter + def stackgaps(self, val): + self["stackgaps"] = val + + @property + def stackgroup(self): + """ + Set several scatter traces (on the same subplot) to the same + stackgroup in order to add their y values (or their x values if + `orientation` is "h"). If blank or omitted this trace will not + be stacked. Stacking also turns `fill` on by default, using + "tonexty" ("tonextx") if `orientation` is "h" ("v") and sets + the default `mode` to "lines" irrespective of point count. You + can only stack on a numeric (linear or log) axis. Traces in a + `stackgroup` will only fill to (or be filled to) other traces + in the same group. With multiple `stackgroup`s or some traces + stacked and some not, if fill-linked traces are not already + consecutive, the later ones will be pushed down in the drawing + order. + + The 'stackgroup' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["stackgroup"] + + @stackgroup.setter + def stackgroup(self, val): + self["stackgroup"] = val + + @property + def stream(self): + """ + The 'stream' property is an instance of Stream + that may be specified as: + - An instance of :class:`plotly.graph_objs.scatter.Stream` + - A dict of string/value properties that will be passed + to the Stream constructor + + Returns + ------- + plotly.graph_objs.scatter.Stream + """ + return self["stream"] + + @stream.setter + def stream(self, val): + self["stream"] = val + + @property + def text(self): + """ + Sets text elements associated with each (x,y) pair. If a single + string, the same string appears over all the data points. If an + array of string, the items are mapped in order to the this + trace's (x,y) coordinates. If trace `hoverinfo` contains a + "text" flag and "hovertext" is not set, these elements will be + seen in the hover labels. + + The 'text' property is a string and must be specified as: + - A string + - A number that will be converted to a string + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["text"] + + @text.setter + def text(self, val): + self["text"] = val + + @property + def textfont(self): + """ + Sets the text font. + + The 'textfont' property is an instance of Textfont + that may be specified as: + - An instance of :class:`plotly.graph_objs.scatter.Textfont` + - A dict of string/value properties that will be passed + to the Textfont constructor + + Returns + ------- + plotly.graph_objs.scatter.Textfont + """ + return self["textfont"] + + @textfont.setter + def textfont(self, val): + self["textfont"] = val + + @property + def textposition(self): + """ + Sets the positions of the `text` elements with respects to the + (x,y) coordinates. + + The 'textposition' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['top left', 'top center', 'top right', 'middle left', + 'middle center', 'middle right', 'bottom left', 'bottom + center', 'bottom right'] + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + Any|numpy.ndarray + """ + return self["textposition"] + + @textposition.setter + def textposition(self, val): + self["textposition"] = val + + @property + def textpositionsrc(self): + """ + Sets the source reference on Chart Studio Cloud for + `textposition`. + + The 'textpositionsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["textpositionsrc"] + + @textpositionsrc.setter + def textpositionsrc(self, val): + self["textpositionsrc"] = val + + @property + def textsrc(self): + """ + Sets the source reference on Chart Studio Cloud for `text`. + + The 'textsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["textsrc"] + + @textsrc.setter + def textsrc(self, val): + self["textsrc"] = val + + @property + def texttemplate(self): + """ + Template string used for rendering the information text that + appears on points. Note that this will override `textinfo`. + Variables are inserted using %{variable}, for example "y: + %{y}". Numbers are formatted using d3-format's syntax + %{variable:d3-format}, for example "Price: %{y:$.2f}". + https://github.com/d3/d3-format/tree/v1.4.5#d3-format for + details on the formatting syntax. Dates are formatted using + d3-time-format's syntax %{variable|d3-time-format}, for example + "Day: %{2019-01-01|%A}". https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format for details on the date + formatting syntax. Variables that can't be found will be + replaced with the specifier. For example, a template of "data: + %{x}, %{y}" will result in a value of "data: 1, %{y}" if x is 1 + and y is missing. Variables with an undefined value will be + replaced with the fallback value. All attributes that can be + specified per-point (the ones that are `arrayOk: true`) are + available. + + The 'texttemplate' property is a string and must be specified as: + - A string + - A number that will be converted to a string + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["texttemplate"] + + @texttemplate.setter + def texttemplate(self, val): + self["texttemplate"] = val + + @property + def texttemplatefallback(self): + """ + Fallback string that's displayed when a variable referenced in + a template is missing. If the boolean value 'false' is passed + in, the specifier with the missing variable will be displayed. + + The 'texttemplatefallback' property accepts values of any type + + Returns + ------- + Any + """ + return self["texttemplatefallback"] + + @texttemplatefallback.setter + def texttemplatefallback(self, val): + self["texttemplatefallback"] = val + + @property + def texttemplatesrc(self): + """ + Sets the source reference on Chart Studio Cloud for + `texttemplate`. + + The 'texttemplatesrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["texttemplatesrc"] + + @texttemplatesrc.setter + def texttemplatesrc(self, val): + self["texttemplatesrc"] = val + + @property + def uid(self): + """ + Assign an id to this trace, Use this to provide object + constancy between traces during animations and transitions. + + The 'uid' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["uid"] + + @uid.setter + def uid(self, val): + self["uid"] = val + + @property + def uirevision(self): + """ + Controls persistence of some user-driven changes to the trace: + `constraintrange` in `parcoords` traces, as well as some + `editable: true` modifications such as `name` and + `colorbar.title`. Defaults to `layout.uirevision`. Note that + other user-driven trace attribute changes are controlled by + `layout` attributes: `trace.visible` is controlled by + `layout.legend.uirevision`, `selectedpoints` is controlled by + `layout.selectionrevision`, and `colorbar.(x|y)` (accessible + with `config: {editable: true}`) is controlled by + `layout.editrevision`. Trace changes are tracked by `uid`, + which only falls back on trace index if no `uid` is provided. + So if your app can add/remove traces before the end of the + `data` array, such that the same trace has a different index, + you can still preserve user-driven changes if you give each + trace a `uid` that stays with it as it moves. + + The 'uirevision' property accepts values of any type + + Returns + ------- + Any + """ + return self["uirevision"] + + @uirevision.setter + def uirevision(self, val): + self["uirevision"] = val + + @property + def unselected(self): + """ + The 'unselected' property is an instance of Unselected + that may be specified as: + - An instance of :class:`plotly.graph_objs.scatter.Unselected` + - A dict of string/value properties that will be passed + to the Unselected constructor + + Returns + ------- + plotly.graph_objs.scatter.Unselected + """ + return self["unselected"] + + @unselected.setter + def unselected(self, val): + self["unselected"] = val + + @property + def visible(self): + """ + Determines whether or not this trace is visible. If + "legendonly", the trace is not drawn, but can appear as a + legend item (provided that the legend itself is visible). + + The 'visible' property is an enumeration that may be specified as: + - One of the following enumeration values: + [True, False, 'legendonly'] + + Returns + ------- + Any + """ + return self["visible"] + + @visible.setter + def visible(self, val): + self["visible"] = val + + @property + def x(self): + """ + Sets the x coordinates. + + The 'x' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["x"] + + @x.setter + def x(self, val): + self["x"] = val + + @property + def x0(self): + """ + Alternate to `x`. Builds a linear space of x coordinates. Use + with `dx` where `x0` is the starting coordinate and `dx` the + step. + + The 'x0' property accepts values of any type + + Returns + ------- + Any + """ + return self["x0"] + + @x0.setter + def x0(self, val): + self["x0"] = val + + @property + def xaxis(self): + """ + Sets a reference between this trace's x coordinates and a 2D + cartesian x axis. If "x" (the default value), the x coordinates + refer to `layout.xaxis`. If "x2", the x coordinates refer to + `layout.xaxis2`, and so on. + + The 'xaxis' property is an identifier of a particular + subplot, of type 'x', that may be specified as: + - the string 'x' optionally followed by an integer >= 1 + (e.g. 'x', 'x1', 'x2', 'x3', etc.) + + Returns + ------- + str + """ + return self["xaxis"] + + @xaxis.setter + def xaxis(self, val): + self["xaxis"] = val + + @property + def xcalendar(self): + """ + Sets the calendar system to use with `x` date data. + + The 'xcalendar' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['chinese', 'coptic', 'discworld', 'ethiopian', + 'gregorian', 'hebrew', 'islamic', 'jalali', 'julian', + 'mayan', 'nanakshahi', 'nepali', 'persian', 'taiwan', + 'thai', 'ummalqura'] + + Returns + ------- + Any + """ + return self["xcalendar"] + + @xcalendar.setter + def xcalendar(self, val): + self["xcalendar"] = val + + @property + def xhoverformat(self): + """ + Sets the hover text formatting rulefor `x` using d3 formatting + mini-languages which are very similar to those in Python. For + numbers, see: + https://github.com/d3/d3-format/tree/v1.4.5#d3-format. And for + dates see: https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format. We add two items to d3's date + formatter: "%h" for half of the year as a decimal number as + well as "%{n}f" for fractional seconds with n digits. For + example, *2016-10-13 09:15:23.456* with tickformat + "%H~%M~%S.%2f" would display *09~15~23.46*By default the values + are formatted using `xaxis.hoverformat`. + + The 'xhoverformat' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["xhoverformat"] + + @xhoverformat.setter + def xhoverformat(self, val): + self["xhoverformat"] = val + + @property + def xperiod(self): + """ + Only relevant when the axis `type` is "date". Sets the period + positioning in milliseconds or "M" on the x axis. Special + values in the form of "M" could be used to declare the + number of months. In this case `n` must be a positive integer. + + The 'xperiod' property accepts values of any type + + Returns + ------- + Any + """ + return self["xperiod"] + + @xperiod.setter + def xperiod(self, val): + self["xperiod"] = val + + @property + def xperiod0(self): + """ + Only relevant when the axis `type` is "date". Sets the base for + period positioning in milliseconds or date string on the x0 + axis. When `x0period` is round number of weeks, the `x0period0` + by default would be on a Sunday i.e. 2000-01-02, otherwise it + would be at 2000-01-01. + + The 'xperiod0' property accepts values of any type + + Returns + ------- + Any + """ + return self["xperiod0"] + + @xperiod0.setter + def xperiod0(self, val): + self["xperiod0"] = val + + @property + def xperiodalignment(self): + """ + Only relevant when the axis `type` is "date". Sets the + alignment of data points on the x axis. + + The 'xperiodalignment' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['start', 'middle', 'end'] + + Returns + ------- + Any + """ + return self["xperiodalignment"] + + @xperiodalignment.setter + def xperiodalignment(self, val): + self["xperiodalignment"] = val + + @property + def xsrc(self): + """ + Sets the source reference on Chart Studio Cloud for `x`. + + The 'xsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["xsrc"] + + @xsrc.setter + def xsrc(self, val): + self["xsrc"] = val + + @property + def y(self): + """ + Sets the y coordinates. + + The 'y' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["y"] + + @y.setter + def y(self, val): + self["y"] = val + + @property + def y0(self): + """ + Alternate to `y`. Builds a linear space of y coordinates. Use + with `dy` where `y0` is the starting coordinate and `dy` the + step. + + The 'y0' property accepts values of any type + + Returns + ------- + Any + """ + return self["y0"] + + @y0.setter + def y0(self, val): + self["y0"] = val + + @property + def yaxis(self): + """ + Sets a reference between this trace's y coordinates and a 2D + cartesian y axis. If "y" (the default value), the y coordinates + refer to `layout.yaxis`. If "y2", the y coordinates refer to + `layout.yaxis2`, and so on. + + The 'yaxis' property is an identifier of a particular + subplot, of type 'y', that may be specified as: + - the string 'y' optionally followed by an integer >= 1 + (e.g. 'y', 'y1', 'y2', 'y3', etc.) + + Returns + ------- + str + """ + return self["yaxis"] + + @yaxis.setter + def yaxis(self, val): + self["yaxis"] = val + + @property + def ycalendar(self): + """ + Sets the calendar system to use with `y` date data. + + The 'ycalendar' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['chinese', 'coptic', 'discworld', 'ethiopian', + 'gregorian', 'hebrew', 'islamic', 'jalali', 'julian', + 'mayan', 'nanakshahi', 'nepali', 'persian', 'taiwan', + 'thai', 'ummalqura'] + + Returns + ------- + Any + """ + return self["ycalendar"] + + @ycalendar.setter + def ycalendar(self, val): + self["ycalendar"] = val + + @property + def yhoverformat(self): + """ + Sets the hover text formatting rulefor `y` using d3 formatting + mini-languages which are very similar to those in Python. For + numbers, see: + https://github.com/d3/d3-format/tree/v1.4.5#d3-format. And for + dates see: https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format. We add two items to d3's date + formatter: "%h" for half of the year as a decimal number as + well as "%{n}f" for fractional seconds with n digits. For + example, *2016-10-13 09:15:23.456* with tickformat + "%H~%M~%S.%2f" would display *09~15~23.46*By default the values + are formatted using `yaxis.hoverformat`. + + The 'yhoverformat' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["yhoverformat"] + + @yhoverformat.setter + def yhoverformat(self, val): + self["yhoverformat"] = val + + @property + def yperiod(self): + """ + Only relevant when the axis `type` is "date". Sets the period + positioning in milliseconds or "M" on the y axis. Special + values in the form of "M" could be used to declare the + number of months. In this case `n` must be a positive integer. + + The 'yperiod' property accepts values of any type + + Returns + ------- + Any + """ + return self["yperiod"] + + @yperiod.setter + def yperiod(self, val): + self["yperiod"] = val + + @property + def yperiod0(self): + """ + Only relevant when the axis `type` is "date". Sets the base for + period positioning in milliseconds or date string on the y0 + axis. When `y0period` is round number of weeks, the `y0period0` + by default would be on a Sunday i.e. 2000-01-02, otherwise it + would be at 2000-01-01. + + The 'yperiod0' property accepts values of any type + + Returns + ------- + Any + """ + return self["yperiod0"] + + @yperiod0.setter + def yperiod0(self, val): + self["yperiod0"] = val + + @property + def yperiodalignment(self): + """ + Only relevant when the axis `type` is "date". Sets the + alignment of data points on the y axis. + + The 'yperiodalignment' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['start', 'middle', 'end'] + + Returns + ------- + Any + """ + return self["yperiodalignment"] + + @yperiodalignment.setter + def yperiodalignment(self, val): + self["yperiodalignment"] = val + + @property + def ysrc(self): + """ + Sets the source reference on Chart Studio Cloud for `y`. + + The 'ysrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["ysrc"] + + @ysrc.setter + def ysrc(self, val): + self["ysrc"] = val + + @property + def zorder(self): + """ + Sets the layer on which this trace is displayed, relative to + other SVG traces on the same subplot. SVG traces with higher + `zorder` appear in front of those with lower `zorder`. + + The 'zorder' property is a integer and may be specified as: + - An int (or float that will be cast to an int) + + Returns + ------- + int + """ + return self["zorder"] + + @zorder.setter + def zorder(self, val): + self["zorder"] = val + + @property + def type(self): + return self._props["type"] + + @property + def _prop_descriptions(self): + return """\ + alignmentgroup + Set several traces linked to the same position axis or + matching axes to the same alignmentgroup. This controls + whether bars compute their positional range dependently + or independently. + cliponaxis + Determines whether or not markers and text nodes are + clipped about the subplot axes. To show markers and + text nodes above axis lines and tick labels, make sure + to set `xaxis.layer` and `yaxis.layer` to *below + traces*. + connectgaps + Determines whether or not gaps (i.e. {nan} or missing + values) in the provided data arrays are connected. + customdata + Assigns extra data each datum. This may be useful when + listening to hover, click and selection events. Note + that, "scatter" traces also appends customdata items in + the markers DOM elements + customdatasrc + Sets the source reference on Chart Studio Cloud for + `customdata`. + dx + Sets the x coordinate step. See `x0` for more info. + dy + Sets the y coordinate step. See `y0` for more info. + error_x + :class:`plotly.graph_objects.scatter.ErrorX` instance + or dict with compatible properties + error_y + :class:`plotly.graph_objects.scatter.ErrorY` instance + or dict with compatible properties + fill + Sets the area to fill with a solid color. Defaults to + "none" unless this trace is stacked, then it gets + "tonexty" ("tonextx") if `orientation` is "v" ("h") Use + with `fillcolor` if not "none". "tozerox" and "tozeroy" + fill to x=0 and y=0 respectively. "tonextx" and + "tonexty" fill between the endpoints of this trace and + the endpoints of the trace before it, connecting those + endpoints with straight lines (to make a stacked area + graph); if there is no trace before it, they behave + like "tozerox" and "tozeroy". "toself" connects the + endpoints of the trace (or each segment of the trace if + it has gaps) into a closed shape. "tonext" fills the + space between two traces if one completely encloses the + other (eg consecutive contour lines), and behaves like + "toself" if there is no trace before it. "tonext" + should not be used if one trace does not enclose the + other. Traces in a `stackgroup` will only fill to (or + be filled to) other traces in the same group. With + multiple `stackgroup`s or some traces stacked and some + not, if fill-linked traces are not already consecutive, + the later ones will be pushed down in the drawing + order. + fillcolor + Sets the fill color. Defaults to a half-transparent + variant of the line color, marker color, or marker line + color, whichever is available. If fillgradient is + specified, fillcolor is ignored except for setting the + background color of the hover label, if any. + fillgradient + Sets a fill gradient. If not specified, the fillcolor + is used instead. + fillpattern + Sets the pattern within the marker. + groupnorm + Only relevant when `stackgroup` is used, and only the + first `groupnorm` found in the `stackgroup` will be + used - including if `visible` is "legendonly" but not + if it is `false`. Sets the normalization for the sum of + this `stackgroup`. With "fraction", the value of each + trace at each location is divided by the sum of all + trace values at that location. "percent" is the same + but multiplied by 100 to show percentages. If there are + multiple subplots, or multiple `stackgroup`s on one + subplot, each will be normalized within its own set. + hoverinfo + Determines which trace information appear on hover. If + `none` or `skip` are set, no information is displayed + upon hovering. But, if `none` is set, click and hover + events are still fired. + hoverinfosrc + Sets the source reference on Chart Studio Cloud for + `hoverinfo`. + hoverlabel + :class:`plotly.graph_objects.scatter.Hoverlabel` + instance or dict with compatible properties + hoveron + Do the hover effects highlight individual points + (markers or line points) or do they highlight filled + regions? If the fill is "toself" or "tonext" and there + are no markers or text, then the default is "fills", + otherwise it is "points". + hovertemplate + Template string used for rendering the information that + appear on hover box. Note that this will override + `hoverinfo`. Variables are inserted using %{variable}, + for example "y: %{y}" as well as %{xother}, {%_xother}, + {%_xother_}, {%xother_}. When showing info for several + points, "xother" will be added to those with different + x positions from the first point. An underscore before + or after "(x|y)other" will add a space on that side, + only when this field is shown. Numbers are formatted + using d3-format's syntax %{variable:d3-format}, for + example "Price: %{y:$.2f}". + https://github.com/d3/d3-format/tree/v1.4.5#d3-format + for details on the formatting syntax. Dates are + formatted using d3-time-format's syntax + %{variable|d3-time-format}, for example "Day: + %{2019-01-01|%A}". https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format for details on the + date formatting syntax. Variables that can't be found + will be replaced with the specifier. For example, a + template of "data: %{x}, %{y}" will result in a value + of "data: 1, %{y}" if x is 1 and y is missing. + Variables with an undefined value will be replaced with + the fallback value. The variables available in + `hovertemplate` are the ones emitted as event data + described at this link + https://plotly.com/javascript/plotlyjs-events/#event- + data. Additionally, all attributes that can be + specified per-point (the ones that are `arrayOk: true`) + are available. Anything contained in tag `` is + displayed in the secondary box, for example + `%{fullData.name}`. To hide the + secondary box completely, use an empty tag + ``. + hovertemplatefallback + Fallback string that's displayed when a variable + referenced in a template is missing. If the boolean + value 'false' is passed in, the specifier with the + missing variable will be displayed. + hovertemplatesrc + Sets the source reference on Chart Studio Cloud for + `hovertemplate`. + hovertext + Sets hover text elements associated with each (x,y) + pair. If a single string, the same string appears over + all the data points. If an array of string, the items + are mapped in order to the this trace's (x,y) + coordinates. To be seen, trace `hoverinfo` must contain + a "text" flag. + hovertextsrc + Sets the source reference on Chart Studio Cloud for + `hovertext`. + ids + Assigns id labels to each datum. These ids for object + constancy of data points during animation. Should be an + array of strings, not numbers or any other type. + idssrc + Sets the source reference on Chart Studio Cloud for + `ids`. + legend + Sets the reference to a legend to show this trace in. + References to these legends are "legend", "legend2", + "legend3", etc. Settings for these legends are set in + the layout, under `layout.legend`, `layout.legend2`, + etc. + legendgroup + Sets the legend group for this trace. Traces and shapes + part of the same legend group hide/show at the same + time when toggling legend items. + legendgrouptitle + :class:`plotly.graph_objects.scatter.Legendgrouptitle` + instance or dict with compatible properties + legendrank + Sets the legend rank for this trace. Items and groups + with smaller ranks are presented on top/left side while + with "reversed" `legend.traceorder` they are on + bottom/right side. The default legendrank is 1000, so + that you can use ranks less than 1000 to place certain + items before all unranked items, and ranks greater than + 1000 to go after all unranked items. When having + unranked or equal rank items shapes would be displayed + after traces i.e. according to their order in data and + layout. + legendwidth + Sets the width (in px or fraction) of the legend for + this trace. + line + :class:`plotly.graph_objects.scatter.Line` instance or + dict with compatible properties + marker + :class:`plotly.graph_objects.scatter.Marker` instance + or dict with compatible properties + meta + Assigns extra meta information associated with this + trace that can be used in various text attributes. + Attributes such as trace `name`, graph, axis and + colorbar `title.text`, annotation `text` + `rangeselector`, `updatemenues` and `sliders` `label` + text all support `meta`. To access the trace `meta` + values in an attribute in the same trace, simply use + `%{meta[i]}` where `i` is the index or key of the + `meta` item in question. To access trace `meta` in + layout attributes, use `%{data[n[.meta[i]}` where `i` + is the index or key of the `meta` and `n` is the trace + index. + metasrc + Sets the source reference on Chart Studio Cloud for + `meta`. + mode + Determines the drawing mode for this scatter trace. If + the provided `mode` includes "text" then the `text` + elements appear at the coordinates. Otherwise, the + `text` elements appear on hover. If there are less than + 20 points and the trace is not stacked then the default + is "lines+markers". Otherwise, "lines". + name + Sets the trace name. The trace name appears as the + legend item and on hover. + offsetgroup + Set several traces linked to the same position axis or + matching axes to the same offsetgroup where bars of the + same position coordinate will line up. + opacity + Sets the opacity of the trace. + orientation + Only relevant in the following cases: 1. when + `scattermode` is set to "group". 2. when `stackgroup` + is used, and only the first `orientation` found in the + `stackgroup` will be used - including if `visible` is + "legendonly" but not if it is `false`. Sets the + stacking direction. With "v" ("h"), the y (x) values of + subsequent traces are added. Also affects the default + value of `fill`. + selected + :class:`plotly.graph_objects.scatter.Selected` instance + or dict with compatible properties + selectedpoints + Array containing integer indices of selected points. + Has an effect only for traces that support selections. + Note that an empty array means an empty selection where + the `unselected` are turned on for all points, whereas, + any other non-array values means no selection all where + the `selected` and `unselected` styles have no effect. + showlegend + Determines whether or not an item corresponding to this + trace is shown in the legend. + stackgaps + Only relevant when `stackgroup` is used, and only the + first `stackgaps` found in the `stackgroup` will be + used - including if `visible` is "legendonly" but not + if it is `false`. Determines how we handle locations at + which other traces in this group have data but this one + does not. With *infer zero* we insert a zero at these + locations. With "interpolate" we linearly interpolate + between existing values, and extrapolate a constant + beyond the existing values. + stackgroup + Set several scatter traces (on the same subplot) to the + same stackgroup in order to add their y values (or + their x values if `orientation` is "h"). If blank or + omitted this trace will not be stacked. Stacking also + turns `fill` on by default, using "tonexty" ("tonextx") + if `orientation` is "h" ("v") and sets the default + `mode` to "lines" irrespective of point count. You can + only stack on a numeric (linear or log) axis. Traces in + a `stackgroup` will only fill to (or be filled to) + other traces in the same group. With multiple + `stackgroup`s or some traces stacked and some not, if + fill-linked traces are not already consecutive, the + later ones will be pushed down in the drawing order. + stream + :class:`plotly.graph_objects.scatter.Stream` instance + or dict with compatible properties + text + Sets text elements associated with each (x,y) pair. If + a single string, the same string appears over all the + data points. If an array of string, the items are + mapped in order to the this trace's (x,y) coordinates. + If trace `hoverinfo` contains a "text" flag and + "hovertext" is not set, these elements will be seen in + the hover labels. + textfont + Sets the text font. + textposition + Sets the positions of the `text` elements with respects + to the (x,y) coordinates. + textpositionsrc + Sets the source reference on Chart Studio Cloud for + `textposition`. + textsrc + Sets the source reference on Chart Studio Cloud for + `text`. + texttemplate + Template string used for rendering the information text + that appears on points. Note that this will override + `textinfo`. Variables are inserted using %{variable}, + for example "y: %{y}". Numbers are formatted using + d3-format's syntax %{variable:d3-format}, for example + "Price: %{y:$.2f}". + https://github.com/d3/d3-format/tree/v1.4.5#d3-format + for details on the formatting syntax. Dates are + formatted using d3-time-format's syntax + %{variable|d3-time-format}, for example "Day: + %{2019-01-01|%A}". https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format for details on the + date formatting syntax. Variables that can't be found + will be replaced with the specifier. For example, a + template of "data: %{x}, %{y}" will result in a value + of "data: 1, %{y}" if x is 1 and y is missing. + Variables with an undefined value will be replaced with + the fallback value. All attributes that can be + specified per-point (the ones that are `arrayOk: true`) + are available. + texttemplatefallback + Fallback string that's displayed when a variable + referenced in a template is missing. If the boolean + value 'false' is passed in, the specifier with the + missing variable will be displayed. + texttemplatesrc + Sets the source reference on Chart Studio Cloud for + `texttemplate`. + uid + Assign an id to this trace, Use this to provide object + constancy between traces during animations and + transitions. + uirevision + Controls persistence of some user-driven changes to the + trace: `constraintrange` in `parcoords` traces, as well + as some `editable: true` modifications such as `name` + and `colorbar.title`. Defaults to `layout.uirevision`. + Note that other user-driven trace attribute changes are + controlled by `layout` attributes: `trace.visible` is + controlled by `layout.legend.uirevision`, + `selectedpoints` is controlled by + `layout.selectionrevision`, and `colorbar.(x|y)` + (accessible with `config: {editable: true}`) is + controlled by `layout.editrevision`. Trace changes are + tracked by `uid`, which only falls back on trace index + if no `uid` is provided. So if your app can add/remove + traces before the end of the `data` array, such that + the same trace has a different index, you can still + preserve user-driven changes if you give each trace a + `uid` that stays with it as it moves. + unselected + :class:`plotly.graph_objects.scatter.Unselected` + instance or dict with compatible properties + visible + Determines whether or not this trace is visible. If + "legendonly", the trace is not drawn, but can appear as + a legend item (provided that the legend itself is + visible). + x + Sets the x coordinates. + x0 + Alternate to `x`. Builds a linear space of x + coordinates. Use with `dx` where `x0` is the starting + coordinate and `dx` the step. + xaxis + Sets a reference between this trace's x coordinates and + a 2D cartesian x axis. If "x" (the default value), the + x coordinates refer to `layout.xaxis`. If "x2", the x + coordinates refer to `layout.xaxis2`, and so on. + xcalendar + Sets the calendar system to use with `x` date data. + xhoverformat + Sets the hover text formatting rulefor `x` using d3 + formatting mini-languages which are very similar to + those in Python. For numbers, see: + https://github.com/d3/d3-format/tree/v1.4.5#d3-format. + And for dates see: https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format. We add two items to + d3's date formatter: "%h" for half of the year as a + decimal number as well as "%{n}f" for fractional + seconds with n digits. For example, *2016-10-13 + 09:15:23.456* with tickformat "%H~%M~%S.%2f" would + display *09~15~23.46*By default the values are + formatted using `xaxis.hoverformat`. + xperiod + Only relevant when the axis `type` is "date". Sets the + period positioning in milliseconds or "M" on the x + axis. Special values in the form of "M" could be + used to declare the number of months. In this case `n` + must be a positive integer. + xperiod0 + Only relevant when the axis `type` is "date". Sets the + base for period positioning in milliseconds or date + string on the x0 axis. When `x0period` is round number + of weeks, the `x0period0` by default would be on a + Sunday i.e. 2000-01-02, otherwise it would be at + 2000-01-01. + xperiodalignment + Only relevant when the axis `type` is "date". Sets the + alignment of data points on the x axis. + xsrc + Sets the source reference on Chart Studio Cloud for + `x`. + y + Sets the y coordinates. + y0 + Alternate to `y`. Builds a linear space of y + coordinates. Use with `dy` where `y0` is the starting + coordinate and `dy` the step. + yaxis + Sets a reference between this trace's y coordinates and + a 2D cartesian y axis. If "y" (the default value), the + y coordinates refer to `layout.yaxis`. If "y2", the y + coordinates refer to `layout.yaxis2`, and so on. + ycalendar + Sets the calendar system to use with `y` date data. + yhoverformat + Sets the hover text formatting rulefor `y` using d3 + formatting mini-languages which are very similar to + those in Python. For numbers, see: + https://github.com/d3/d3-format/tree/v1.4.5#d3-format. + And for dates see: https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format. We add two items to + d3's date formatter: "%h" for half of the year as a + decimal number as well as "%{n}f" for fractional + seconds with n digits. For example, *2016-10-13 + 09:15:23.456* with tickformat "%H~%M~%S.%2f" would + display *09~15~23.46*By default the values are + formatted using `yaxis.hoverformat`. + yperiod + Only relevant when the axis `type` is "date". Sets the + period positioning in milliseconds or "M" on the y + axis. Special values in the form of "M" could be + used to declare the number of months. In this case `n` + must be a positive integer. + yperiod0 + Only relevant when the axis `type` is "date". Sets the + base for period positioning in milliseconds or date + string on the y0 axis. When `y0period` is round number + of weeks, the `y0period0` by default would be on a + Sunday i.e. 2000-01-02, otherwise it would be at + 2000-01-01. + yperiodalignment + Only relevant when the axis `type` is "date". Sets the + alignment of data points on the y axis. + ysrc + Sets the source reference on Chart Studio Cloud for + `y`. + zorder + Sets the layer on which this trace is displayed, + relative to other SVG traces on the same subplot. SVG + traces with higher `zorder` appear in front of those + with lower `zorder`. + """ + + def __init__( + self, + arg=None, + alignmentgroup=None, + cliponaxis=None, + connectgaps=None, + customdata=None, + customdatasrc=None, + dx=None, + dy=None, + error_x=None, + error_y=None, + fill=None, + fillcolor=None, + fillgradient=None, + fillpattern=None, + groupnorm=None, + hoverinfo=None, + hoverinfosrc=None, + hoverlabel=None, + hoveron=None, + hovertemplate=None, + hovertemplatefallback=None, + hovertemplatesrc=None, + hovertext=None, + hovertextsrc=None, + ids=None, + idssrc=None, + legend=None, + legendgroup=None, + legendgrouptitle=None, + legendrank=None, + legendwidth=None, + line=None, + marker=None, + meta=None, + metasrc=None, + mode=None, + name=None, + offsetgroup=None, + opacity=None, + orientation=None, + selected=None, + selectedpoints=None, + showlegend=None, + stackgaps=None, + stackgroup=None, + stream=None, + text=None, + textfont=None, + textposition=None, + textpositionsrc=None, + textsrc=None, + texttemplate=None, + texttemplatefallback=None, + texttemplatesrc=None, + uid=None, + uirevision=None, + unselected=None, + visible=None, + x=None, + x0=None, + xaxis=None, + xcalendar=None, + xhoverformat=None, + xperiod=None, + xperiod0=None, + xperiodalignment=None, + xsrc=None, + y=None, + y0=None, + yaxis=None, + ycalendar=None, + yhoverformat=None, + yperiod=None, + yperiod0=None, + yperiodalignment=None, + ysrc=None, + zorder=None, + **kwargs, + ): + """ + Construct a new Scatter object + + The scatter trace type encompasses line charts, scatter charts, + text charts, and bubble charts. The data visualized as scatter + point or lines is set in `x` and `y`. Text (appearing either on + the chart or on hover only) is via `text`. Bubble charts are + achieved by setting `marker.size` and/or `marker.color` to + numerical arrays. + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of :class:`plotly.graph_objs.Scatter` + alignmentgroup + Set several traces linked to the same position axis or + matching axes to the same alignmentgroup. This controls + whether bars compute their positional range dependently + or independently. + cliponaxis + Determines whether or not markers and text nodes are + clipped about the subplot axes. To show markers and + text nodes above axis lines and tick labels, make sure + to set `xaxis.layer` and `yaxis.layer` to *below + traces*. + connectgaps + Determines whether or not gaps (i.e. {nan} or missing + values) in the provided data arrays are connected. + customdata + Assigns extra data each datum. This may be useful when + listening to hover, click and selection events. Note + that, "scatter" traces also appends customdata items in + the markers DOM elements + customdatasrc + Sets the source reference on Chart Studio Cloud for + `customdata`. + dx + Sets the x coordinate step. See `x0` for more info. + dy + Sets the y coordinate step. See `y0` for more info. + error_x + :class:`plotly.graph_objects.scatter.ErrorX` instance + or dict with compatible properties + error_y + :class:`plotly.graph_objects.scatter.ErrorY` instance + or dict with compatible properties + fill + Sets the area to fill with a solid color. Defaults to + "none" unless this trace is stacked, then it gets + "tonexty" ("tonextx") if `orientation` is "v" ("h") Use + with `fillcolor` if not "none". "tozerox" and "tozeroy" + fill to x=0 and y=0 respectively. "tonextx" and + "tonexty" fill between the endpoints of this trace and + the endpoints of the trace before it, connecting those + endpoints with straight lines (to make a stacked area + graph); if there is no trace before it, they behave + like "tozerox" and "tozeroy". "toself" connects the + endpoints of the trace (or each segment of the trace if + it has gaps) into a closed shape. "tonext" fills the + space between two traces if one completely encloses the + other (eg consecutive contour lines), and behaves like + "toself" if there is no trace before it. "tonext" + should not be used if one trace does not enclose the + other. Traces in a `stackgroup` will only fill to (or + be filled to) other traces in the same group. With + multiple `stackgroup`s or some traces stacked and some + not, if fill-linked traces are not already consecutive, + the later ones will be pushed down in the drawing + order. + fillcolor + Sets the fill color. Defaults to a half-transparent + variant of the line color, marker color, or marker line + color, whichever is available. If fillgradient is + specified, fillcolor is ignored except for setting the + background color of the hover label, if any. + fillgradient + Sets a fill gradient. If not specified, the fillcolor + is used instead. + fillpattern + Sets the pattern within the marker. + groupnorm + Only relevant when `stackgroup` is used, and only the + first `groupnorm` found in the `stackgroup` will be + used - including if `visible` is "legendonly" but not + if it is `false`. Sets the normalization for the sum of + this `stackgroup`. With "fraction", the value of each + trace at each location is divided by the sum of all + trace values at that location. "percent" is the same + but multiplied by 100 to show percentages. If there are + multiple subplots, or multiple `stackgroup`s on one + subplot, each will be normalized within its own set. + hoverinfo + Determines which trace information appear on hover. If + `none` or `skip` are set, no information is displayed + upon hovering. But, if `none` is set, click and hover + events are still fired. + hoverinfosrc + Sets the source reference on Chart Studio Cloud for + `hoverinfo`. + hoverlabel + :class:`plotly.graph_objects.scatter.Hoverlabel` + instance or dict with compatible properties + hoveron + Do the hover effects highlight individual points + (markers or line points) or do they highlight filled + regions? If the fill is "toself" or "tonext" and there + are no markers or text, then the default is "fills", + otherwise it is "points". + hovertemplate + Template string used for rendering the information that + appear on hover box. Note that this will override + `hoverinfo`. Variables are inserted using %{variable}, + for example "y: %{y}" as well as %{xother}, {%_xother}, + {%_xother_}, {%xother_}. When showing info for several + points, "xother" will be added to those with different + x positions from the first point. An underscore before + or after "(x|y)other" will add a space on that side, + only when this field is shown. Numbers are formatted + using d3-format's syntax %{variable:d3-format}, for + example "Price: %{y:$.2f}". + https://github.com/d3/d3-format/tree/v1.4.5#d3-format + for details on the formatting syntax. Dates are + formatted using d3-time-format's syntax + %{variable|d3-time-format}, for example "Day: + %{2019-01-01|%A}". https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format for details on the + date formatting syntax. Variables that can't be found + will be replaced with the specifier. For example, a + template of "data: %{x}, %{y}" will result in a value + of "data: 1, %{y}" if x is 1 and y is missing. + Variables with an undefined value will be replaced with + the fallback value. The variables available in + `hovertemplate` are the ones emitted as event data + described at this link + https://plotly.com/javascript/plotlyjs-events/#event- + data. Additionally, all attributes that can be + specified per-point (the ones that are `arrayOk: true`) + are available. Anything contained in tag `` is + displayed in the secondary box, for example + `%{fullData.name}`. To hide the + secondary box completely, use an empty tag + ``. + hovertemplatefallback + Fallback string that's displayed when a variable + referenced in a template is missing. If the boolean + value 'false' is passed in, the specifier with the + missing variable will be displayed. + hovertemplatesrc + Sets the source reference on Chart Studio Cloud for + `hovertemplate`. + hovertext + Sets hover text elements associated with each (x,y) + pair. If a single string, the same string appears over + all the data points. If an array of string, the items + are mapped in order to the this trace's (x,y) + coordinates. To be seen, trace `hoverinfo` must contain + a "text" flag. + hovertextsrc + Sets the source reference on Chart Studio Cloud for + `hovertext`. + ids + Assigns id labels to each datum. These ids for object + constancy of data points during animation. Should be an + array of strings, not numbers or any other type. + idssrc + Sets the source reference on Chart Studio Cloud for + `ids`. + legend + Sets the reference to a legend to show this trace in. + References to these legends are "legend", "legend2", + "legend3", etc. Settings for these legends are set in + the layout, under `layout.legend`, `layout.legend2`, + etc. + legendgroup + Sets the legend group for this trace. Traces and shapes + part of the same legend group hide/show at the same + time when toggling legend items. + legendgrouptitle + :class:`plotly.graph_objects.scatter.Legendgrouptitle` + instance or dict with compatible properties + legendrank + Sets the legend rank for this trace. Items and groups + with smaller ranks are presented on top/left side while + with "reversed" `legend.traceorder` they are on + bottom/right side. The default legendrank is 1000, so + that you can use ranks less than 1000 to place certain + items before all unranked items, and ranks greater than + 1000 to go after all unranked items. When having + unranked or equal rank items shapes would be displayed + after traces i.e. according to their order in data and + layout. + legendwidth + Sets the width (in px or fraction) of the legend for + this trace. + line + :class:`plotly.graph_objects.scatter.Line` instance or + dict with compatible properties + marker + :class:`plotly.graph_objects.scatter.Marker` instance + or dict with compatible properties + meta + Assigns extra meta information associated with this + trace that can be used in various text attributes. + Attributes such as trace `name`, graph, axis and + colorbar `title.text`, annotation `text` + `rangeselector`, `updatemenues` and `sliders` `label` + text all support `meta`. To access the trace `meta` + values in an attribute in the same trace, simply use + `%{meta[i]}` where `i` is the index or key of the + `meta` item in question. To access trace `meta` in + layout attributes, use `%{data[n[.meta[i]}` where `i` + is the index or key of the `meta` and `n` is the trace + index. + metasrc + Sets the source reference on Chart Studio Cloud for + `meta`. + mode + Determines the drawing mode for this scatter trace. If + the provided `mode` includes "text" then the `text` + elements appear at the coordinates. Otherwise, the + `text` elements appear on hover. If there are less than + 20 points and the trace is not stacked then the default + is "lines+markers". Otherwise, "lines". + name + Sets the trace name. The trace name appears as the + legend item and on hover. + offsetgroup + Set several traces linked to the same position axis or + matching axes to the same offsetgroup where bars of the + same position coordinate will line up. + opacity + Sets the opacity of the trace. + orientation + Only relevant in the following cases: 1. when + `scattermode` is set to "group". 2. when `stackgroup` + is used, and only the first `orientation` found in the + `stackgroup` will be used - including if `visible` is + "legendonly" but not if it is `false`. Sets the + stacking direction. With "v" ("h"), the y (x) values of + subsequent traces are added. Also affects the default + value of `fill`. + selected + :class:`plotly.graph_objects.scatter.Selected` instance + or dict with compatible properties + selectedpoints + Array containing integer indices of selected points. + Has an effect only for traces that support selections. + Note that an empty array means an empty selection where + the `unselected` are turned on for all points, whereas, + any other non-array values means no selection all where + the `selected` and `unselected` styles have no effect. + showlegend + Determines whether or not an item corresponding to this + trace is shown in the legend. + stackgaps + Only relevant when `stackgroup` is used, and only the + first `stackgaps` found in the `stackgroup` will be + used - including if `visible` is "legendonly" but not + if it is `false`. Determines how we handle locations at + which other traces in this group have data but this one + does not. With *infer zero* we insert a zero at these + locations. With "interpolate" we linearly interpolate + between existing values, and extrapolate a constant + beyond the existing values. + stackgroup + Set several scatter traces (on the same subplot) to the + same stackgroup in order to add their y values (or + their x values if `orientation` is "h"). If blank or + omitted this trace will not be stacked. Stacking also + turns `fill` on by default, using "tonexty" ("tonextx") + if `orientation` is "h" ("v") and sets the default + `mode` to "lines" irrespective of point count. You can + only stack on a numeric (linear or log) axis. Traces in + a `stackgroup` will only fill to (or be filled to) + other traces in the same group. With multiple + `stackgroup`s or some traces stacked and some not, if + fill-linked traces are not already consecutive, the + later ones will be pushed down in the drawing order. + stream + :class:`plotly.graph_objects.scatter.Stream` instance + or dict with compatible properties + text + Sets text elements associated with each (x,y) pair. If + a single string, the same string appears over all the + data points. If an array of string, the items are + mapped in order to the this trace's (x,y) coordinates. + If trace `hoverinfo` contains a "text" flag and + "hovertext" is not set, these elements will be seen in + the hover labels. + textfont + Sets the text font. + textposition + Sets the positions of the `text` elements with respects + to the (x,y) coordinates. + textpositionsrc + Sets the source reference on Chart Studio Cloud for + `textposition`. + textsrc + Sets the source reference on Chart Studio Cloud for + `text`. + texttemplate + Template string used for rendering the information text + that appears on points. Note that this will override + `textinfo`. Variables are inserted using %{variable}, + for example "y: %{y}". Numbers are formatted using + d3-format's syntax %{variable:d3-format}, for example + "Price: %{y:$.2f}". + https://github.com/d3/d3-format/tree/v1.4.5#d3-format + for details on the formatting syntax. Dates are + formatted using d3-time-format's syntax + %{variable|d3-time-format}, for example "Day: + %{2019-01-01|%A}". https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format for details on the + date formatting syntax. Variables that can't be found + will be replaced with the specifier. For example, a + template of "data: %{x}, %{y}" will result in a value + of "data: 1, %{y}" if x is 1 and y is missing. + Variables with an undefined value will be replaced with + the fallback value. All attributes that can be + specified per-point (the ones that are `arrayOk: true`) + are available. + texttemplatefallback + Fallback string that's displayed when a variable + referenced in a template is missing. If the boolean + value 'false' is passed in, the specifier with the + missing variable will be displayed. + texttemplatesrc + Sets the source reference on Chart Studio Cloud for + `texttemplate`. + uid + Assign an id to this trace, Use this to provide object + constancy between traces during animations and + transitions. + uirevision + Controls persistence of some user-driven changes to the + trace: `constraintrange` in `parcoords` traces, as well + as some `editable: true` modifications such as `name` + and `colorbar.title`. Defaults to `layout.uirevision`. + Note that other user-driven trace attribute changes are + controlled by `layout` attributes: `trace.visible` is + controlled by `layout.legend.uirevision`, + `selectedpoints` is controlled by + `layout.selectionrevision`, and `colorbar.(x|y)` + (accessible with `config: {editable: true}`) is + controlled by `layout.editrevision`. Trace changes are + tracked by `uid`, which only falls back on trace index + if no `uid` is provided. So if your app can add/remove + traces before the end of the `data` array, such that + the same trace has a different index, you can still + preserve user-driven changes if you give each trace a + `uid` that stays with it as it moves. + unselected + :class:`plotly.graph_objects.scatter.Unselected` + instance or dict with compatible properties + visible + Determines whether or not this trace is visible. If + "legendonly", the trace is not drawn, but can appear as + a legend item (provided that the legend itself is + visible). + x + Sets the x coordinates. + x0 + Alternate to `x`. Builds a linear space of x + coordinates. Use with `dx` where `x0` is the starting + coordinate and `dx` the step. + xaxis + Sets a reference between this trace's x coordinates and + a 2D cartesian x axis. If "x" (the default value), the + x coordinates refer to `layout.xaxis`. If "x2", the x + coordinates refer to `layout.xaxis2`, and so on. + xcalendar + Sets the calendar system to use with `x` date data. + xhoverformat + Sets the hover text formatting rulefor `x` using d3 + formatting mini-languages which are very similar to + those in Python. For numbers, see: + https://github.com/d3/d3-format/tree/v1.4.5#d3-format. + And for dates see: https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format. We add two items to + d3's date formatter: "%h" for half of the year as a + decimal number as well as "%{n}f" for fractional + seconds with n digits. For example, *2016-10-13 + 09:15:23.456* with tickformat "%H~%M~%S.%2f" would + display *09~15~23.46*By default the values are + formatted using `xaxis.hoverformat`. + xperiod + Only relevant when the axis `type` is "date". Sets the + period positioning in milliseconds or "M" on the x + axis. Special values in the form of "M" could be + used to declare the number of months. In this case `n` + must be a positive integer. + xperiod0 + Only relevant when the axis `type` is "date". Sets the + base for period positioning in milliseconds or date + string on the x0 axis. When `x0period` is round number + of weeks, the `x0period0` by default would be on a + Sunday i.e. 2000-01-02, otherwise it would be at + 2000-01-01. + xperiodalignment + Only relevant when the axis `type` is "date". Sets the + alignment of data points on the x axis. + xsrc + Sets the source reference on Chart Studio Cloud for + `x`. + y + Sets the y coordinates. + y0 + Alternate to `y`. Builds a linear space of y + coordinates. Use with `dy` where `y0` is the starting + coordinate and `dy` the step. + yaxis + Sets a reference between this trace's y coordinates and + a 2D cartesian y axis. If "y" (the default value), the + y coordinates refer to `layout.yaxis`. If "y2", the y + coordinates refer to `layout.yaxis2`, and so on. + ycalendar + Sets the calendar system to use with `y` date data. + yhoverformat + Sets the hover text formatting rulefor `y` using d3 + formatting mini-languages which are very similar to + those in Python. For numbers, see: + https://github.com/d3/d3-format/tree/v1.4.5#d3-format. + And for dates see: https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format. We add two items to + d3's date formatter: "%h" for half of the year as a + decimal number as well as "%{n}f" for fractional + seconds with n digits. For example, *2016-10-13 + 09:15:23.456* with tickformat "%H~%M~%S.%2f" would + display *09~15~23.46*By default the values are + formatted using `yaxis.hoverformat`. + yperiod + Only relevant when the axis `type` is "date". Sets the + period positioning in milliseconds or "M" on the y + axis. Special values in the form of "M" could be + used to declare the number of months. In this case `n` + must be a positive integer. + yperiod0 + Only relevant when the axis `type` is "date". Sets the + base for period positioning in milliseconds or date + string on the y0 axis. When `y0period` is round number + of weeks, the `y0period0` by default would be on a + Sunday i.e. 2000-01-02, otherwise it would be at + 2000-01-01. + yperiodalignment + Only relevant when the axis `type` is "date". Sets the + alignment of data points on the y axis. + ysrc + Sets the source reference on Chart Studio Cloud for + `y`. + zorder + Sets the layer on which this trace is displayed, + relative to other SVG traces on the same subplot. SVG + traces with higher `zorder` appear in front of those + with lower `zorder`. + + Returns + ------- + Scatter + """ + super().__init__("scatter") + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + if arg is None: + arg = {} + elif isinstance(arg, self.__class__): + arg = arg.to_plotly_json() + elif isinstance(arg, dict): + arg = _copy.copy(arg) + else: + raise ValueError("""\ +The first argument to the plotly.graph_objs.Scatter +constructor must be a dict or +an instance of :class:`plotly.graph_objs.Scatter`""") + + self._skip_invalid = kwargs.pop("skip_invalid", False) + self._validate = kwargs.pop("_validate", True) + + self._set_property("alignmentgroup", arg, alignmentgroup) + self._set_property("cliponaxis", arg, cliponaxis) + self._set_property("connectgaps", arg, connectgaps) + self._set_property("customdata", arg, customdata) + self._set_property("customdatasrc", arg, customdatasrc) + self._set_property("dx", arg, dx) + self._set_property("dy", arg, dy) + self._set_property("error_x", arg, error_x) + self._set_property("error_y", arg, error_y) + self._set_property("fill", arg, fill) + self._set_property("fillcolor", arg, fillcolor) + self._set_property("fillgradient", arg, fillgradient) + self._set_property("fillpattern", arg, fillpattern) + self._set_property("groupnorm", arg, groupnorm) + self._set_property("hoverinfo", arg, hoverinfo) + self._set_property("hoverinfosrc", arg, hoverinfosrc) + self._set_property("hoverlabel", arg, hoverlabel) + self._set_property("hoveron", arg, hoveron) + self._set_property("hovertemplate", arg, hovertemplate) + self._set_property("hovertemplatefallback", arg, hovertemplatefallback) + self._set_property("hovertemplatesrc", arg, hovertemplatesrc) + self._set_property("hovertext", arg, hovertext) + self._set_property("hovertextsrc", arg, hovertextsrc) + self._set_property("ids", arg, ids) + self._set_property("idssrc", arg, idssrc) + self._set_property("legend", arg, legend) + self._set_property("legendgroup", arg, legendgroup) + self._set_property("legendgrouptitle", arg, legendgrouptitle) + self._set_property("legendrank", arg, legendrank) + self._set_property("legendwidth", arg, legendwidth) + self._set_property("line", arg, line) + self._set_property("marker", arg, marker) + self._set_property("meta", arg, meta) + self._set_property("metasrc", arg, metasrc) + self._set_property("mode", arg, mode) + self._set_property("name", arg, name) + self._set_property("offsetgroup", arg, offsetgroup) + self._set_property("opacity", arg, opacity) + self._set_property("orientation", arg, orientation) + self._set_property("selected", arg, selected) + self._set_property("selectedpoints", arg, selectedpoints) + self._set_property("showlegend", arg, showlegend) + self._set_property("stackgaps", arg, stackgaps) + self._set_property("stackgroup", arg, stackgroup) + self._set_property("stream", arg, stream) + self._set_property("text", arg, text) + self._set_property("textfont", arg, textfont) + self._set_property("textposition", arg, textposition) + self._set_property("textpositionsrc", arg, textpositionsrc) + self._set_property("textsrc", arg, textsrc) + self._set_property("texttemplate", arg, texttemplate) + self._set_property("texttemplatefallback", arg, texttemplatefallback) + self._set_property("texttemplatesrc", arg, texttemplatesrc) + self._set_property("uid", arg, uid) + self._set_property("uirevision", arg, uirevision) + self._set_property("unselected", arg, unselected) + self._set_property("visible", arg, visible) + self._set_property("x", arg, x) + self._set_property("x0", arg, x0) + self._set_property("xaxis", arg, xaxis) + self._set_property("xcalendar", arg, xcalendar) + self._set_property("xhoverformat", arg, xhoverformat) + self._set_property("xperiod", arg, xperiod) + self._set_property("xperiod0", arg, xperiod0) + self._set_property("xperiodalignment", arg, xperiodalignment) + self._set_property("xsrc", arg, xsrc) + self._set_property("y", arg, y) + self._set_property("y0", arg, y0) + self._set_property("yaxis", arg, yaxis) + self._set_property("ycalendar", arg, ycalendar) + self._set_property("yhoverformat", arg, yhoverformat) + self._set_property("yperiod", arg, yperiod) + self._set_property("yperiod0", arg, yperiod0) + self._set_property("yperiodalignment", arg, yperiodalignment) + self._set_property("ysrc", arg, ysrc) + self._set_property("zorder", arg, zorder) + + self._props["type"] = "scatter" + arg.pop("type", None) + self._process_kwargs(**dict(arg, **kwargs)) + self._skip_invalid = False diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/_scatter3d.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/_scatter3d.py new file mode 100644 index 0000000000000000000000000000000000000000..8247116c7da0299523110e9927242214a0163f24 --- /dev/null +++ b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/_scatter3d.py @@ -0,0 +1,2091 @@ +# --- THIS FILE IS AUTO-GENERATED --- +# Modifications will be overwitten the next time code generation run. + +from plotly.basedatatypes import BaseTraceType as _BaseTraceType +import copy as _copy + + +class Scatter3d(_BaseTraceType): + _parent_path_str = "" + _path_str = "scatter3d" + _valid_props = { + "connectgaps", + "customdata", + "customdatasrc", + "error_x", + "error_y", + "error_z", + "hoverinfo", + "hoverinfosrc", + "hoverlabel", + "hovertemplate", + "hovertemplatefallback", + "hovertemplatesrc", + "hovertext", + "hovertextsrc", + "ids", + "idssrc", + "legend", + "legendgroup", + "legendgrouptitle", + "legendrank", + "legendwidth", + "line", + "marker", + "meta", + "metasrc", + "mode", + "name", + "opacity", + "projection", + "scene", + "showlegend", + "stream", + "surfaceaxis", + "surfacecolor", + "text", + "textfont", + "textposition", + "textpositionsrc", + "textsrc", + "texttemplate", + "texttemplatefallback", + "texttemplatesrc", + "type", + "uid", + "uirevision", + "visible", + "x", + "xcalendar", + "xhoverformat", + "xsrc", + "y", + "ycalendar", + "yhoverformat", + "ysrc", + "z", + "zcalendar", + "zhoverformat", + "zsrc", + } + + @property + def connectgaps(self): + """ + Determines whether or not gaps (i.e. {nan} or missing values) + in the provided data arrays are connected. + + The 'connectgaps' property is a boolean and must be specified as: + - A boolean value: True or False + + Returns + ------- + bool + """ + return self["connectgaps"] + + @connectgaps.setter + def connectgaps(self, val): + self["connectgaps"] = val + + @property + def customdata(self): + """ + Assigns extra data each datum. This may be useful when + listening to hover, click and selection events. Note that, + "scatter" traces also appends customdata items in the markers + DOM elements + + The 'customdata' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["customdata"] + + @customdata.setter + def customdata(self, val): + self["customdata"] = val + + @property + def customdatasrc(self): + """ + Sets the source reference on Chart Studio Cloud for + `customdata`. + + The 'customdatasrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["customdatasrc"] + + @customdatasrc.setter + def customdatasrc(self, val): + self["customdatasrc"] = val + + @property + def error_x(self): + """ + The 'error_x' property is an instance of ErrorX + that may be specified as: + - An instance of :class:`plotly.graph_objs.scatter3d.ErrorX` + - A dict of string/value properties that will be passed + to the ErrorX constructor + + Returns + ------- + plotly.graph_objs.scatter3d.ErrorX + """ + return self["error_x"] + + @error_x.setter + def error_x(self, val): + self["error_x"] = val + + @property + def error_y(self): + """ + The 'error_y' property is an instance of ErrorY + that may be specified as: + - An instance of :class:`plotly.graph_objs.scatter3d.ErrorY` + - A dict of string/value properties that will be passed + to the ErrorY constructor + + Returns + ------- + plotly.graph_objs.scatter3d.ErrorY + """ + return self["error_y"] + + @error_y.setter + def error_y(self, val): + self["error_y"] = val + + @property + def error_z(self): + """ + The 'error_z' property is an instance of ErrorZ + that may be specified as: + - An instance of :class:`plotly.graph_objs.scatter3d.ErrorZ` + - A dict of string/value properties that will be passed + to the ErrorZ constructor + + Returns + ------- + plotly.graph_objs.scatter3d.ErrorZ + """ + return self["error_z"] + + @error_z.setter + def error_z(self, val): + self["error_z"] = val + + @property + def hoverinfo(self): + """ + Determines which trace information appear on hover. If `none` + or `skip` are set, no information is displayed upon hovering. + But, if `none` is set, click and hover events are still fired. + + The 'hoverinfo' property is a flaglist and may be specified + as a string containing: + - Any combination of ['x', 'y', 'z', 'text', 'name'] joined with '+' characters + (e.g. 'x+y') + OR exactly one of ['all', 'none', 'skip'] (e.g. 'skip') + - A list or array of the above + + Returns + ------- + Any|numpy.ndarray + """ + return self["hoverinfo"] + + @hoverinfo.setter + def hoverinfo(self, val): + self["hoverinfo"] = val + + @property + def hoverinfosrc(self): + """ + Sets the source reference on Chart Studio Cloud for + `hoverinfo`. + + The 'hoverinfosrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["hoverinfosrc"] + + @hoverinfosrc.setter + def hoverinfosrc(self, val): + self["hoverinfosrc"] = val + + @property + def hoverlabel(self): + """ + The 'hoverlabel' property is an instance of Hoverlabel + that may be specified as: + - An instance of :class:`plotly.graph_objs.scatter3d.Hoverlabel` + - A dict of string/value properties that will be passed + to the Hoverlabel constructor + + Returns + ------- + plotly.graph_objs.scatter3d.Hoverlabel + """ + return self["hoverlabel"] + + @hoverlabel.setter + def hoverlabel(self, val): + self["hoverlabel"] = val + + @property + def hovertemplate(self): + """ + Template string used for rendering the information that appear + on hover box. Note that this will override `hoverinfo`. + Variables are inserted using %{variable}, for example "y: %{y}" + as well as %{xother}, {%_xother}, {%_xother_}, {%xother_}. When + showing info for several points, "xother" will be added to + those with different x positions from the first point. An + underscore before or after "(x|y)other" will add a space on + that side, only when this field is shown. Numbers are formatted + using d3-format's syntax %{variable:d3-format}, for example + "Price: %{y:$.2f}". + https://github.com/d3/d3-format/tree/v1.4.5#d3-format for + details on the formatting syntax. Dates are formatted using + d3-time-format's syntax %{variable|d3-time-format}, for example + "Day: %{2019-01-01|%A}". https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format for details on the date + formatting syntax. Variables that can't be found will be + replaced with the specifier. For example, a template of "data: + %{x}, %{y}" will result in a value of "data: 1, %{y}" if x is 1 + and y is missing. Variables with an undefined value will be + replaced with the fallback value. The variables available in + `hovertemplate` are the ones emitted as event data described at + this link https://plotly.com/javascript/plotlyjs-events/#event- + data. Additionally, all attributes that can be specified per- + point (the ones that are `arrayOk: true`) are available. + Anything contained in tag `` is displayed in the + secondary box, for example `%{fullData.name}`. + To hide the secondary box completely, use an empty tag + ``. + + The 'hovertemplate' property is a string and must be specified as: + - A string + - A number that will be converted to a string + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["hovertemplate"] + + @hovertemplate.setter + def hovertemplate(self, val): + self["hovertemplate"] = val + + @property + def hovertemplatefallback(self): + """ + Fallback string that's displayed when a variable referenced in + a template is missing. If the boolean value 'false' is passed + in, the specifier with the missing variable will be displayed. + + The 'hovertemplatefallback' property accepts values of any type + + Returns + ------- + Any + """ + return self["hovertemplatefallback"] + + @hovertemplatefallback.setter + def hovertemplatefallback(self, val): + self["hovertemplatefallback"] = val + + @property + def hovertemplatesrc(self): + """ + Sets the source reference on Chart Studio Cloud for + `hovertemplate`. + + The 'hovertemplatesrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["hovertemplatesrc"] + + @hovertemplatesrc.setter + def hovertemplatesrc(self, val): + self["hovertemplatesrc"] = val + + @property + def hovertext(self): + """ + Sets text elements associated with each (x,y,z) triplet. If a + single string, the same string appears over all the data + points. If an array of string, the items are mapped in order to + the this trace's (x,y,z) coordinates. To be seen, trace + `hoverinfo` must contain a "text" flag. + + The 'hovertext' property is a string and must be specified as: + - A string + - A number that will be converted to a string + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["hovertext"] + + @hovertext.setter + def hovertext(self, val): + self["hovertext"] = val + + @property + def hovertextsrc(self): + """ + Sets the source reference on Chart Studio Cloud for + `hovertext`. + + The 'hovertextsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["hovertextsrc"] + + @hovertextsrc.setter + def hovertextsrc(self, val): + self["hovertextsrc"] = val + + @property + def ids(self): + """ + Assigns id labels to each datum. These ids for object constancy + of data points during animation. Should be an array of strings, + not numbers or any other type. + + The 'ids' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["ids"] + + @ids.setter + def ids(self, val): + self["ids"] = val + + @property + def idssrc(self): + """ + Sets the source reference on Chart Studio Cloud for `ids`. + + The 'idssrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["idssrc"] + + @idssrc.setter + def idssrc(self, val): + self["idssrc"] = val + + @property + def legend(self): + """ + Sets the reference to a legend to show this trace in. + References to these legends are "legend", "legend2", "legend3", + etc. Settings for these legends are set in the layout, under + `layout.legend`, `layout.legend2`, etc. + + The 'legend' property is an identifier of a particular + subplot, of type 'legend', that may be specified as: + - the string 'legend' optionally followed by an integer >= 1 + (e.g. 'legend', 'legend1', 'legend2', 'legend3', etc.) + + Returns + ------- + str + """ + return self["legend"] + + @legend.setter + def legend(self, val): + self["legend"] = val + + @property + def legendgroup(self): + """ + Sets the legend group for this trace. Traces and shapes part of + the same legend group hide/show at the same time when toggling + legend items. + + The 'legendgroup' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["legendgroup"] + + @legendgroup.setter + def legendgroup(self, val): + self["legendgroup"] = val + + @property + def legendgrouptitle(self): + """ + The 'legendgrouptitle' property is an instance of Legendgrouptitle + that may be specified as: + - An instance of :class:`plotly.graph_objs.scatter3d.Legendgrouptitle` + - A dict of string/value properties that will be passed + to the Legendgrouptitle constructor + + Returns + ------- + plotly.graph_objs.scatter3d.Legendgrouptitle + """ + return self["legendgrouptitle"] + + @legendgrouptitle.setter + def legendgrouptitle(self, val): + self["legendgrouptitle"] = val + + @property + def legendrank(self): + """ + Sets the legend rank for this trace. Items and groups with + smaller ranks are presented on top/left side while with + "reversed" `legend.traceorder` they are on bottom/right side. + The default legendrank is 1000, so that you can use ranks less + than 1000 to place certain items before all unranked items, and + ranks greater than 1000 to go after all unranked items. When + having unranked or equal rank items shapes would be displayed + after traces i.e. according to their order in data and layout. + + The 'legendrank' property is a number and may be specified as: + - An int or float + + Returns + ------- + int|float + """ + return self["legendrank"] + + @legendrank.setter + def legendrank(self, val): + self["legendrank"] = val + + @property + def legendwidth(self): + """ + Sets the width (in px or fraction) of the legend for this + trace. + + The 'legendwidth' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["legendwidth"] + + @legendwidth.setter + def legendwidth(self, val): + self["legendwidth"] = val + + @property + def line(self): + """ + The 'line' property is an instance of Line + that may be specified as: + - An instance of :class:`plotly.graph_objs.scatter3d.Line` + - A dict of string/value properties that will be passed + to the Line constructor + + Returns + ------- + plotly.graph_objs.scatter3d.Line + """ + return self["line"] + + @line.setter + def line(self, val): + self["line"] = val + + @property + def marker(self): + """ + The 'marker' property is an instance of Marker + that may be specified as: + - An instance of :class:`plotly.graph_objs.scatter3d.Marker` + - A dict of string/value properties that will be passed + to the Marker constructor + + Returns + ------- + plotly.graph_objs.scatter3d.Marker + """ + return self["marker"] + + @marker.setter + def marker(self, val): + self["marker"] = val + + @property + def meta(self): + """ + Assigns extra meta information associated with this trace that + can be used in various text attributes. Attributes such as + trace `name`, graph, axis and colorbar `title.text`, annotation + `text` `rangeselector`, `updatemenues` and `sliders` `label` + text all support `meta`. To access the trace `meta` values in + an attribute in the same trace, simply use `%{meta[i]}` where + `i` is the index or key of the `meta` item in question. To + access trace `meta` in layout attributes, use + `%{data[n[.meta[i]}` where `i` is the index or key of the + `meta` and `n` is the trace index. + + The 'meta' property accepts values of any type + + Returns + ------- + Any|numpy.ndarray + """ + return self["meta"] + + @meta.setter + def meta(self, val): + self["meta"] = val + + @property + def metasrc(self): + """ + Sets the source reference on Chart Studio Cloud for `meta`. + + The 'metasrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["metasrc"] + + @metasrc.setter + def metasrc(self, val): + self["metasrc"] = val + + @property + def mode(self): + """ + Determines the drawing mode for this scatter trace. If the + provided `mode` includes "text" then the `text` elements appear + at the coordinates. Otherwise, the `text` elements appear on + hover. If there are less than 20 points and the trace is not + stacked then the default is "lines+markers". Otherwise, + "lines". + + The 'mode' property is a flaglist and may be specified + as a string containing: + - Any combination of ['lines', 'markers', 'text'] joined with '+' characters + (e.g. 'lines+markers') + OR exactly one of ['none'] (e.g. 'none') + + Returns + ------- + Any + """ + return self["mode"] + + @mode.setter + def mode(self, val): + self["mode"] = val + + @property + def name(self): + """ + Sets the trace name. The trace name appears as the legend item + and on hover. + + The 'name' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["name"] + + @name.setter + def name(self, val): + self["name"] = val + + @property + def opacity(self): + """ + Sets the opacity of the trace. + + The 'opacity' property is a number and may be specified as: + - An int or float in the interval [0, 1] + + Returns + ------- + int|float + """ + return self["opacity"] + + @opacity.setter + def opacity(self, val): + self["opacity"] = val + + @property + def projection(self): + """ + The 'projection' property is an instance of Projection + that may be specified as: + - An instance of :class:`plotly.graph_objs.scatter3d.Projection` + - A dict of string/value properties that will be passed + to the Projection constructor + + Returns + ------- + plotly.graph_objs.scatter3d.Projection + """ + return self["projection"] + + @projection.setter + def projection(self, val): + self["projection"] = val + + @property + def scene(self): + """ + Sets a reference between this trace's 3D coordinate system and + a 3D scene. If "scene" (the default value), the (x,y,z) + coordinates refer to `layout.scene`. If "scene2", the (x,y,z) + coordinates refer to `layout.scene2`, and so on. + + The 'scene' property is an identifier of a particular + subplot, of type 'scene', that may be specified as: + - the string 'scene' optionally followed by an integer >= 1 + (e.g. 'scene', 'scene1', 'scene2', 'scene3', etc.) + + Returns + ------- + str + """ + return self["scene"] + + @scene.setter + def scene(self, val): + self["scene"] = val + + @property + def showlegend(self): + """ + Determines whether or not an item corresponding to this trace + is shown in the legend. + + The 'showlegend' property is a boolean and must be specified as: + - A boolean value: True or False + + Returns + ------- + bool + """ + return self["showlegend"] + + @showlegend.setter + def showlegend(self, val): + self["showlegend"] = val + + @property + def stream(self): + """ + The 'stream' property is an instance of Stream + that may be specified as: + - An instance of :class:`plotly.graph_objs.scatter3d.Stream` + - A dict of string/value properties that will be passed + to the Stream constructor + + Returns + ------- + plotly.graph_objs.scatter3d.Stream + """ + return self["stream"] + + @stream.setter + def stream(self, val): + self["stream"] = val + + @property + def surfaceaxis(self): + """ + If "-1", the scatter points are not fill with a surface If 0, + 1, 2, the scatter points are filled with a Delaunay surface + about the x, y, z respectively. + + The 'surfaceaxis' property is an enumeration that may be specified as: + - One of the following enumeration values: + [-1, 0, 1, 2] + + Returns + ------- + Any + """ + return self["surfaceaxis"] + + @surfaceaxis.setter + def surfaceaxis(self, val): + self["surfaceaxis"] = val + + @property + def surfacecolor(self): + """ + Sets the surface fill color. + + The 'surfacecolor' property is a color and may be specified as: + - A hex string (e.g. '#ff0000') + - An rgb/rgba string (e.g. 'rgb(255,0,0)') + - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') + - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') + - A named CSS color: see https://plotly.com/python/css-colors/ for a list + + Returns + ------- + str + """ + return self["surfacecolor"] + + @surfacecolor.setter + def surfacecolor(self, val): + self["surfacecolor"] = val + + @property + def text(self): + """ + Sets text elements associated with each (x,y,z) triplet. If a + single string, the same string appears over all the data + points. If an array of string, the items are mapped in order to + the this trace's (x,y,z) coordinates. If trace `hoverinfo` + contains a "text" flag and "hovertext" is not set, these + elements will be seen in the hover labels. + + The 'text' property is a string and must be specified as: + - A string + - A number that will be converted to a string + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["text"] + + @text.setter + def text(self, val): + self["text"] = val + + @property + def textfont(self): + """ + Sets the text font. + + The 'textfont' property is an instance of Textfont + that may be specified as: + - An instance of :class:`plotly.graph_objs.scatter3d.Textfont` + - A dict of string/value properties that will be passed + to the Textfont constructor + + Returns + ------- + plotly.graph_objs.scatter3d.Textfont + """ + return self["textfont"] + + @textfont.setter + def textfont(self, val): + self["textfont"] = val + + @property + def textposition(self): + """ + Sets the positions of the `text` elements with respects to the + (x,y) coordinates. + + The 'textposition' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['top left', 'top center', 'top right', 'middle left', + 'middle center', 'middle right', 'bottom left', 'bottom + center', 'bottom right'] + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + Any|numpy.ndarray + """ + return self["textposition"] + + @textposition.setter + def textposition(self, val): + self["textposition"] = val + + @property + def textpositionsrc(self): + """ + Sets the source reference on Chart Studio Cloud for + `textposition`. + + The 'textpositionsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["textpositionsrc"] + + @textpositionsrc.setter + def textpositionsrc(self, val): + self["textpositionsrc"] = val + + @property + def textsrc(self): + """ + Sets the source reference on Chart Studio Cloud for `text`. + + The 'textsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["textsrc"] + + @textsrc.setter + def textsrc(self, val): + self["textsrc"] = val + + @property + def texttemplate(self): + """ + Template string used for rendering the information text that + appears on points. Note that this will override `textinfo`. + Variables are inserted using %{variable}, for example "y: + %{y}". Numbers are formatted using d3-format's syntax + %{variable:d3-format}, for example "Price: %{y:$.2f}". + https://github.com/d3/d3-format/tree/v1.4.5#d3-format for + details on the formatting syntax. Dates are formatted using + d3-time-format's syntax %{variable|d3-time-format}, for example + "Day: %{2019-01-01|%A}". https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format for details on the date + formatting syntax. Variables that can't be found will be + replaced with the specifier. For example, a template of "data: + %{x}, %{y}" will result in a value of "data: 1, %{y}" if x is 1 + and y is missing. Variables with an undefined value will be + replaced with the fallback value. All attributes that can be + specified per-point (the ones that are `arrayOk: true`) are + available. + + The 'texttemplate' property is a string and must be specified as: + - A string + - A number that will be converted to a string + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["texttemplate"] + + @texttemplate.setter + def texttemplate(self, val): + self["texttemplate"] = val + + @property + def texttemplatefallback(self): + """ + Fallback string that's displayed when a variable referenced in + a template is missing. If the boolean value 'false' is passed + in, the specifier with the missing variable will be displayed. + + The 'texttemplatefallback' property accepts values of any type + + Returns + ------- + Any + """ + return self["texttemplatefallback"] + + @texttemplatefallback.setter + def texttemplatefallback(self, val): + self["texttemplatefallback"] = val + + @property + def texttemplatesrc(self): + """ + Sets the source reference on Chart Studio Cloud for + `texttemplate`. + + The 'texttemplatesrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["texttemplatesrc"] + + @texttemplatesrc.setter + def texttemplatesrc(self, val): + self["texttemplatesrc"] = val + + @property + def uid(self): + """ + Assign an id to this trace, Use this to provide object + constancy between traces during animations and transitions. + + The 'uid' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["uid"] + + @uid.setter + def uid(self, val): + self["uid"] = val + + @property + def uirevision(self): + """ + Controls persistence of some user-driven changes to the trace: + `constraintrange` in `parcoords` traces, as well as some + `editable: true` modifications such as `name` and + `colorbar.title`. Defaults to `layout.uirevision`. Note that + other user-driven trace attribute changes are controlled by + `layout` attributes: `trace.visible` is controlled by + `layout.legend.uirevision`, `selectedpoints` is controlled by + `layout.selectionrevision`, and `colorbar.(x|y)` (accessible + with `config: {editable: true}`) is controlled by + `layout.editrevision`. Trace changes are tracked by `uid`, + which only falls back on trace index if no `uid` is provided. + So if your app can add/remove traces before the end of the + `data` array, such that the same trace has a different index, + you can still preserve user-driven changes if you give each + trace a `uid` that stays with it as it moves. + + The 'uirevision' property accepts values of any type + + Returns + ------- + Any + """ + return self["uirevision"] + + @uirevision.setter + def uirevision(self, val): + self["uirevision"] = val + + @property + def visible(self): + """ + Determines whether or not this trace is visible. If + "legendonly", the trace is not drawn, but can appear as a + legend item (provided that the legend itself is visible). + + The 'visible' property is an enumeration that may be specified as: + - One of the following enumeration values: + [True, False, 'legendonly'] + + Returns + ------- + Any + """ + return self["visible"] + + @visible.setter + def visible(self, val): + self["visible"] = val + + @property + def x(self): + """ + Sets the x coordinates. + + The 'x' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["x"] + + @x.setter + def x(self, val): + self["x"] = val + + @property + def xcalendar(self): + """ + Sets the calendar system to use with `x` date data. + + The 'xcalendar' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['chinese', 'coptic', 'discworld', 'ethiopian', + 'gregorian', 'hebrew', 'islamic', 'jalali', 'julian', + 'mayan', 'nanakshahi', 'nepali', 'persian', 'taiwan', + 'thai', 'ummalqura'] + + Returns + ------- + Any + """ + return self["xcalendar"] + + @xcalendar.setter + def xcalendar(self, val): + self["xcalendar"] = val + + @property + def xhoverformat(self): + """ + Sets the hover text formatting rulefor `x` using d3 formatting + mini-languages which are very similar to those in Python. For + numbers, see: + https://github.com/d3/d3-format/tree/v1.4.5#d3-format. And for + dates see: https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format. We add two items to d3's date + formatter: "%h" for half of the year as a decimal number as + well as "%{n}f" for fractional seconds with n digits. For + example, *2016-10-13 09:15:23.456* with tickformat + "%H~%M~%S.%2f" would display *09~15~23.46*By default the values + are formatted using `xaxis.hoverformat`. + + The 'xhoverformat' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["xhoverformat"] + + @xhoverformat.setter + def xhoverformat(self, val): + self["xhoverformat"] = val + + @property + def xsrc(self): + """ + Sets the source reference on Chart Studio Cloud for `x`. + + The 'xsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["xsrc"] + + @xsrc.setter + def xsrc(self, val): + self["xsrc"] = val + + @property + def y(self): + """ + Sets the y coordinates. + + The 'y' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["y"] + + @y.setter + def y(self, val): + self["y"] = val + + @property + def ycalendar(self): + """ + Sets the calendar system to use with `y` date data. + + The 'ycalendar' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['chinese', 'coptic', 'discworld', 'ethiopian', + 'gregorian', 'hebrew', 'islamic', 'jalali', 'julian', + 'mayan', 'nanakshahi', 'nepali', 'persian', 'taiwan', + 'thai', 'ummalqura'] + + Returns + ------- + Any + """ + return self["ycalendar"] + + @ycalendar.setter + def ycalendar(self, val): + self["ycalendar"] = val + + @property + def yhoverformat(self): + """ + Sets the hover text formatting rulefor `y` using d3 formatting + mini-languages which are very similar to those in Python. For + numbers, see: + https://github.com/d3/d3-format/tree/v1.4.5#d3-format. And for + dates see: https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format. We add two items to d3's date + formatter: "%h" for half of the year as a decimal number as + well as "%{n}f" for fractional seconds with n digits. For + example, *2016-10-13 09:15:23.456* with tickformat + "%H~%M~%S.%2f" would display *09~15~23.46*By default the values + are formatted using `yaxis.hoverformat`. + + The 'yhoverformat' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["yhoverformat"] + + @yhoverformat.setter + def yhoverformat(self, val): + self["yhoverformat"] = val + + @property + def ysrc(self): + """ + Sets the source reference on Chart Studio Cloud for `y`. + + The 'ysrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["ysrc"] + + @ysrc.setter + def ysrc(self, val): + self["ysrc"] = val + + @property + def z(self): + """ + Sets the z coordinates. + + The 'z' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["z"] + + @z.setter + def z(self, val): + self["z"] = val + + @property + def zcalendar(self): + """ + Sets the calendar system to use with `z` date data. + + The 'zcalendar' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['chinese', 'coptic', 'discworld', 'ethiopian', + 'gregorian', 'hebrew', 'islamic', 'jalali', 'julian', + 'mayan', 'nanakshahi', 'nepali', 'persian', 'taiwan', + 'thai', 'ummalqura'] + + Returns + ------- + Any + """ + return self["zcalendar"] + + @zcalendar.setter + def zcalendar(self, val): + self["zcalendar"] = val + + @property + def zhoverformat(self): + """ + Sets the hover text formatting rulefor `z` using d3 formatting + mini-languages which are very similar to those in Python. For + numbers, see: + https://github.com/d3/d3-format/tree/v1.4.5#d3-format. And for + dates see: https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format. We add two items to d3's date + formatter: "%h" for half of the year as a decimal number as + well as "%{n}f" for fractional seconds with n digits. For + example, *2016-10-13 09:15:23.456* with tickformat + "%H~%M~%S.%2f" would display *09~15~23.46*By default the values + are formatted using `zaxis.hoverformat`. + + The 'zhoverformat' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["zhoverformat"] + + @zhoverformat.setter + def zhoverformat(self, val): + self["zhoverformat"] = val + + @property + def zsrc(self): + """ + Sets the source reference on Chart Studio Cloud for `z`. + + The 'zsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["zsrc"] + + @zsrc.setter + def zsrc(self, val): + self["zsrc"] = val + + @property + def type(self): + return self._props["type"] + + @property + def _prop_descriptions(self): + return """\ + connectgaps + Determines whether or not gaps (i.e. {nan} or missing + values) in the provided data arrays are connected. + customdata + Assigns extra data each datum. This may be useful when + listening to hover, click and selection events. Note + that, "scatter" traces also appends customdata items in + the markers DOM elements + customdatasrc + Sets the source reference on Chart Studio Cloud for + `customdata`. + error_x + :class:`plotly.graph_objects.scatter3d.ErrorX` instance + or dict with compatible properties + error_y + :class:`plotly.graph_objects.scatter3d.ErrorY` instance + or dict with compatible properties + error_z + :class:`plotly.graph_objects.scatter3d.ErrorZ` instance + or dict with compatible properties + hoverinfo + Determines which trace information appear on hover. If + `none` or `skip` are set, no information is displayed + upon hovering. But, if `none` is set, click and hover + events are still fired. + hoverinfosrc + Sets the source reference on Chart Studio Cloud for + `hoverinfo`. + hoverlabel + :class:`plotly.graph_objects.scatter3d.Hoverlabel` + instance or dict with compatible properties + hovertemplate + Template string used for rendering the information that + appear on hover box. Note that this will override + `hoverinfo`. Variables are inserted using %{variable}, + for example "y: %{y}" as well as %{xother}, {%_xother}, + {%_xother_}, {%xother_}. When showing info for several + points, "xother" will be added to those with different + x positions from the first point. An underscore before + or after "(x|y)other" will add a space on that side, + only when this field is shown. Numbers are formatted + using d3-format's syntax %{variable:d3-format}, for + example "Price: %{y:$.2f}". + https://github.com/d3/d3-format/tree/v1.4.5#d3-format + for details on the formatting syntax. Dates are + formatted using d3-time-format's syntax + %{variable|d3-time-format}, for example "Day: + %{2019-01-01|%A}". https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format for details on the + date formatting syntax. Variables that can't be found + will be replaced with the specifier. For example, a + template of "data: %{x}, %{y}" will result in a value + of "data: 1, %{y}" if x is 1 and y is missing. + Variables with an undefined value will be replaced with + the fallback value. The variables available in + `hovertemplate` are the ones emitted as event data + described at this link + https://plotly.com/javascript/plotlyjs-events/#event- + data. Additionally, all attributes that can be + specified per-point (the ones that are `arrayOk: true`) + are available. Anything contained in tag `` is + displayed in the secondary box, for example + `%{fullData.name}`. To hide the + secondary box completely, use an empty tag + ``. + hovertemplatefallback + Fallback string that's displayed when a variable + referenced in a template is missing. If the boolean + value 'false' is passed in, the specifier with the + missing variable will be displayed. + hovertemplatesrc + Sets the source reference on Chart Studio Cloud for + `hovertemplate`. + hovertext + Sets text elements associated with each (x,y,z) + triplet. If a single string, the same string appears + over all the data points. If an array of string, the + items are mapped in order to the this trace's (x,y,z) + coordinates. To be seen, trace `hoverinfo` must contain + a "text" flag. + hovertextsrc + Sets the source reference on Chart Studio Cloud for + `hovertext`. + ids + Assigns id labels to each datum. These ids for object + constancy of data points during animation. Should be an + array of strings, not numbers or any other type. + idssrc + Sets the source reference on Chart Studio Cloud for + `ids`. + legend + Sets the reference to a legend to show this trace in. + References to these legends are "legend", "legend2", + "legend3", etc. Settings for these legends are set in + the layout, under `layout.legend`, `layout.legend2`, + etc. + legendgroup + Sets the legend group for this trace. Traces and shapes + part of the same legend group hide/show at the same + time when toggling legend items. + legendgrouptitle + :class:`plotly.graph_objects.scatter3d.Legendgrouptitle + ` instance or dict with compatible properties + legendrank + Sets the legend rank for this trace. Items and groups + with smaller ranks are presented on top/left side while + with "reversed" `legend.traceorder` they are on + bottom/right side. The default legendrank is 1000, so + that you can use ranks less than 1000 to place certain + items before all unranked items, and ranks greater than + 1000 to go after all unranked items. When having + unranked or equal rank items shapes would be displayed + after traces i.e. according to their order in data and + layout. + legendwidth + Sets the width (in px or fraction) of the legend for + this trace. + line + :class:`plotly.graph_objects.scatter3d.Line` instance + or dict with compatible properties + marker + :class:`plotly.graph_objects.scatter3d.Marker` instance + or dict with compatible properties + meta + Assigns extra meta information associated with this + trace that can be used in various text attributes. + Attributes such as trace `name`, graph, axis and + colorbar `title.text`, annotation `text` + `rangeselector`, `updatemenues` and `sliders` `label` + text all support `meta`. To access the trace `meta` + values in an attribute in the same trace, simply use + `%{meta[i]}` where `i` is the index or key of the + `meta` item in question. To access trace `meta` in + layout attributes, use `%{data[n[.meta[i]}` where `i` + is the index or key of the `meta` and `n` is the trace + index. + metasrc + Sets the source reference on Chart Studio Cloud for + `meta`. + mode + Determines the drawing mode for this scatter trace. If + the provided `mode` includes "text" then the `text` + elements appear at the coordinates. Otherwise, the + `text` elements appear on hover. If there are less than + 20 points and the trace is not stacked then the default + is "lines+markers". Otherwise, "lines". + name + Sets the trace name. The trace name appears as the + legend item and on hover. + opacity + Sets the opacity of the trace. + projection + :class:`plotly.graph_objects.scatter3d.Projection` + instance or dict with compatible properties + scene + Sets a reference between this trace's 3D coordinate + system and a 3D scene. If "scene" (the default value), + the (x,y,z) coordinates refer to `layout.scene`. If + "scene2", the (x,y,z) coordinates refer to + `layout.scene2`, and so on. + showlegend + Determines whether or not an item corresponding to this + trace is shown in the legend. + stream + :class:`plotly.graph_objects.scatter3d.Stream` instance + or dict with compatible properties + surfaceaxis + If "-1", the scatter points are not fill with a surface + If 0, 1, 2, the scatter points are filled with a + Delaunay surface about the x, y, z respectively. + surfacecolor + Sets the surface fill color. + text + Sets text elements associated with each (x,y,z) + triplet. If a single string, the same string appears + over all the data points. If an array of string, the + items are mapped in order to the this trace's (x,y,z) + coordinates. If trace `hoverinfo` contains a "text" + flag and "hovertext" is not set, these elements will be + seen in the hover labels. + textfont + Sets the text font. + textposition + Sets the positions of the `text` elements with respects + to the (x,y) coordinates. + textpositionsrc + Sets the source reference on Chart Studio Cloud for + `textposition`. + textsrc + Sets the source reference on Chart Studio Cloud for + `text`. + texttemplate + Template string used for rendering the information text + that appears on points. Note that this will override + `textinfo`. Variables are inserted using %{variable}, + for example "y: %{y}". Numbers are formatted using + d3-format's syntax %{variable:d3-format}, for example + "Price: %{y:$.2f}". + https://github.com/d3/d3-format/tree/v1.4.5#d3-format + for details on the formatting syntax. Dates are + formatted using d3-time-format's syntax + %{variable|d3-time-format}, for example "Day: + %{2019-01-01|%A}". https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format for details on the + date formatting syntax. Variables that can't be found + will be replaced with the specifier. For example, a + template of "data: %{x}, %{y}" will result in a value + of "data: 1, %{y}" if x is 1 and y is missing. + Variables with an undefined value will be replaced with + the fallback value. All attributes that can be + specified per-point (the ones that are `arrayOk: true`) + are available. + texttemplatefallback + Fallback string that's displayed when a variable + referenced in a template is missing. If the boolean + value 'false' is passed in, the specifier with the + missing variable will be displayed. + texttemplatesrc + Sets the source reference on Chart Studio Cloud for + `texttemplate`. + uid + Assign an id to this trace, Use this to provide object + constancy between traces during animations and + transitions. + uirevision + Controls persistence of some user-driven changes to the + trace: `constraintrange` in `parcoords` traces, as well + as some `editable: true` modifications such as `name` + and `colorbar.title`. Defaults to `layout.uirevision`. + Note that other user-driven trace attribute changes are + controlled by `layout` attributes: `trace.visible` is + controlled by `layout.legend.uirevision`, + `selectedpoints` is controlled by + `layout.selectionrevision`, and `colorbar.(x|y)` + (accessible with `config: {editable: true}`) is + controlled by `layout.editrevision`. Trace changes are + tracked by `uid`, which only falls back on trace index + if no `uid` is provided. So if your app can add/remove + traces before the end of the `data` array, such that + the same trace has a different index, you can still + preserve user-driven changes if you give each trace a + `uid` that stays with it as it moves. + visible + Determines whether or not this trace is visible. If + "legendonly", the trace is not drawn, but can appear as + a legend item (provided that the legend itself is + visible). + x + Sets the x coordinates. + xcalendar + Sets the calendar system to use with `x` date data. + xhoverformat + Sets the hover text formatting rulefor `x` using d3 + formatting mini-languages which are very similar to + those in Python. For numbers, see: + https://github.com/d3/d3-format/tree/v1.4.5#d3-format. + And for dates see: https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format. We add two items to + d3's date formatter: "%h" for half of the year as a + decimal number as well as "%{n}f" for fractional + seconds with n digits. For example, *2016-10-13 + 09:15:23.456* with tickformat "%H~%M~%S.%2f" would + display *09~15~23.46*By default the values are + formatted using `xaxis.hoverformat`. + xsrc + Sets the source reference on Chart Studio Cloud for + `x`. + y + Sets the y coordinates. + ycalendar + Sets the calendar system to use with `y` date data. + yhoverformat + Sets the hover text formatting rulefor `y` using d3 + formatting mini-languages which are very similar to + those in Python. For numbers, see: + https://github.com/d3/d3-format/tree/v1.4.5#d3-format. + And for dates see: https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format. We add two items to + d3's date formatter: "%h" for half of the year as a + decimal number as well as "%{n}f" for fractional + seconds with n digits. For example, *2016-10-13 + 09:15:23.456* with tickformat "%H~%M~%S.%2f" would + display *09~15~23.46*By default the values are + formatted using `yaxis.hoverformat`. + ysrc + Sets the source reference on Chart Studio Cloud for + `y`. + z + Sets the z coordinates. + zcalendar + Sets the calendar system to use with `z` date data. + zhoverformat + Sets the hover text formatting rulefor `z` using d3 + formatting mini-languages which are very similar to + those in Python. For numbers, see: + https://github.com/d3/d3-format/tree/v1.4.5#d3-format. + And for dates see: https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format. We add two items to + d3's date formatter: "%h" for half of the year as a + decimal number as well as "%{n}f" for fractional + seconds with n digits. For example, *2016-10-13 + 09:15:23.456* with tickformat "%H~%M~%S.%2f" would + display *09~15~23.46*By default the values are + formatted using `zaxis.hoverformat`. + zsrc + Sets the source reference on Chart Studio Cloud for + `z`. + """ + + def __init__( + self, + arg=None, + connectgaps=None, + customdata=None, + customdatasrc=None, + error_x=None, + error_y=None, + error_z=None, + hoverinfo=None, + hoverinfosrc=None, + hoverlabel=None, + hovertemplate=None, + hovertemplatefallback=None, + hovertemplatesrc=None, + hovertext=None, + hovertextsrc=None, + ids=None, + idssrc=None, + legend=None, + legendgroup=None, + legendgrouptitle=None, + legendrank=None, + legendwidth=None, + line=None, + marker=None, + meta=None, + metasrc=None, + mode=None, + name=None, + opacity=None, + projection=None, + scene=None, + showlegend=None, + stream=None, + surfaceaxis=None, + surfacecolor=None, + text=None, + textfont=None, + textposition=None, + textpositionsrc=None, + textsrc=None, + texttemplate=None, + texttemplatefallback=None, + texttemplatesrc=None, + uid=None, + uirevision=None, + visible=None, + x=None, + xcalendar=None, + xhoverformat=None, + xsrc=None, + y=None, + ycalendar=None, + yhoverformat=None, + ysrc=None, + z=None, + zcalendar=None, + zhoverformat=None, + zsrc=None, + **kwargs, + ): + """ + Construct a new Scatter3d object + + The data visualized as scatter point or lines in 3D dimension + is set in `x`, `y`, `z`. Text (appearing either on the chart or + on hover only) is via `text`. Bubble charts are achieved by + setting `marker.size` and/or `marker.color` Projections are + achieved via `projection`. Surface fills are achieved via + `surfaceaxis`. + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of :class:`plotly.graph_objs.Scatter3d` + connectgaps + Determines whether or not gaps (i.e. {nan} or missing + values) in the provided data arrays are connected. + customdata + Assigns extra data each datum. This may be useful when + listening to hover, click and selection events. Note + that, "scatter" traces also appends customdata items in + the markers DOM elements + customdatasrc + Sets the source reference on Chart Studio Cloud for + `customdata`. + error_x + :class:`plotly.graph_objects.scatter3d.ErrorX` instance + or dict with compatible properties + error_y + :class:`plotly.graph_objects.scatter3d.ErrorY` instance + or dict with compatible properties + error_z + :class:`plotly.graph_objects.scatter3d.ErrorZ` instance + or dict with compatible properties + hoverinfo + Determines which trace information appear on hover. If + `none` or `skip` are set, no information is displayed + upon hovering. But, if `none` is set, click and hover + events are still fired. + hoverinfosrc + Sets the source reference on Chart Studio Cloud for + `hoverinfo`. + hoverlabel + :class:`plotly.graph_objects.scatter3d.Hoverlabel` + instance or dict with compatible properties + hovertemplate + Template string used for rendering the information that + appear on hover box. Note that this will override + `hoverinfo`. Variables are inserted using %{variable}, + for example "y: %{y}" as well as %{xother}, {%_xother}, + {%_xother_}, {%xother_}. When showing info for several + points, "xother" will be added to those with different + x positions from the first point. An underscore before + or after "(x|y)other" will add a space on that side, + only when this field is shown. Numbers are formatted + using d3-format's syntax %{variable:d3-format}, for + example "Price: %{y:$.2f}". + https://github.com/d3/d3-format/tree/v1.4.5#d3-format + for details on the formatting syntax. Dates are + formatted using d3-time-format's syntax + %{variable|d3-time-format}, for example "Day: + %{2019-01-01|%A}". https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format for details on the + date formatting syntax. Variables that can't be found + will be replaced with the specifier. For example, a + template of "data: %{x}, %{y}" will result in a value + of "data: 1, %{y}" if x is 1 and y is missing. + Variables with an undefined value will be replaced with + the fallback value. The variables available in + `hovertemplate` are the ones emitted as event data + described at this link + https://plotly.com/javascript/plotlyjs-events/#event- + data. Additionally, all attributes that can be + specified per-point (the ones that are `arrayOk: true`) + are available. Anything contained in tag `` is + displayed in the secondary box, for example + `%{fullData.name}`. To hide the + secondary box completely, use an empty tag + ``. + hovertemplatefallback + Fallback string that's displayed when a variable + referenced in a template is missing. If the boolean + value 'false' is passed in, the specifier with the + missing variable will be displayed. + hovertemplatesrc + Sets the source reference on Chart Studio Cloud for + `hovertemplate`. + hovertext + Sets text elements associated with each (x,y,z) + triplet. If a single string, the same string appears + over all the data points. If an array of string, the + items are mapped in order to the this trace's (x,y,z) + coordinates. To be seen, trace `hoverinfo` must contain + a "text" flag. + hovertextsrc + Sets the source reference on Chart Studio Cloud for + `hovertext`. + ids + Assigns id labels to each datum. These ids for object + constancy of data points during animation. Should be an + array of strings, not numbers or any other type. + idssrc + Sets the source reference on Chart Studio Cloud for + `ids`. + legend + Sets the reference to a legend to show this trace in. + References to these legends are "legend", "legend2", + "legend3", etc. Settings for these legends are set in + the layout, under `layout.legend`, `layout.legend2`, + etc. + legendgroup + Sets the legend group for this trace. Traces and shapes + part of the same legend group hide/show at the same + time when toggling legend items. + legendgrouptitle + :class:`plotly.graph_objects.scatter3d.Legendgrouptitle + ` instance or dict with compatible properties + legendrank + Sets the legend rank for this trace. Items and groups + with smaller ranks are presented on top/left side while + with "reversed" `legend.traceorder` they are on + bottom/right side. The default legendrank is 1000, so + that you can use ranks less than 1000 to place certain + items before all unranked items, and ranks greater than + 1000 to go after all unranked items. When having + unranked or equal rank items shapes would be displayed + after traces i.e. according to their order in data and + layout. + legendwidth + Sets the width (in px or fraction) of the legend for + this trace. + line + :class:`plotly.graph_objects.scatter3d.Line` instance + or dict with compatible properties + marker + :class:`plotly.graph_objects.scatter3d.Marker` instance + or dict with compatible properties + meta + Assigns extra meta information associated with this + trace that can be used in various text attributes. + Attributes such as trace `name`, graph, axis and + colorbar `title.text`, annotation `text` + `rangeselector`, `updatemenues` and `sliders` `label` + text all support `meta`. To access the trace `meta` + values in an attribute in the same trace, simply use + `%{meta[i]}` where `i` is the index or key of the + `meta` item in question. To access trace `meta` in + layout attributes, use `%{data[n[.meta[i]}` where `i` + is the index or key of the `meta` and `n` is the trace + index. + metasrc + Sets the source reference on Chart Studio Cloud for + `meta`. + mode + Determines the drawing mode for this scatter trace. If + the provided `mode` includes "text" then the `text` + elements appear at the coordinates. Otherwise, the + `text` elements appear on hover. If there are less than + 20 points and the trace is not stacked then the default + is "lines+markers". Otherwise, "lines". + name + Sets the trace name. The trace name appears as the + legend item and on hover. + opacity + Sets the opacity of the trace. + projection + :class:`plotly.graph_objects.scatter3d.Projection` + instance or dict with compatible properties + scene + Sets a reference between this trace's 3D coordinate + system and a 3D scene. If "scene" (the default value), + the (x,y,z) coordinates refer to `layout.scene`. If + "scene2", the (x,y,z) coordinates refer to + `layout.scene2`, and so on. + showlegend + Determines whether or not an item corresponding to this + trace is shown in the legend. + stream + :class:`plotly.graph_objects.scatter3d.Stream` instance + or dict with compatible properties + surfaceaxis + If "-1", the scatter points are not fill with a surface + If 0, 1, 2, the scatter points are filled with a + Delaunay surface about the x, y, z respectively. + surfacecolor + Sets the surface fill color. + text + Sets text elements associated with each (x,y,z) + triplet. If a single string, the same string appears + over all the data points. If an array of string, the + items are mapped in order to the this trace's (x,y,z) + coordinates. If trace `hoverinfo` contains a "text" + flag and "hovertext" is not set, these elements will be + seen in the hover labels. + textfont + Sets the text font. + textposition + Sets the positions of the `text` elements with respects + to the (x,y) coordinates. + textpositionsrc + Sets the source reference on Chart Studio Cloud for + `textposition`. + textsrc + Sets the source reference on Chart Studio Cloud for + `text`. + texttemplate + Template string used for rendering the information text + that appears on points. Note that this will override + `textinfo`. Variables are inserted using %{variable}, + for example "y: %{y}". Numbers are formatted using + d3-format's syntax %{variable:d3-format}, for example + "Price: %{y:$.2f}". + https://github.com/d3/d3-format/tree/v1.4.5#d3-format + for details on the formatting syntax. Dates are + formatted using d3-time-format's syntax + %{variable|d3-time-format}, for example "Day: + %{2019-01-01|%A}". https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format for details on the + date formatting syntax. Variables that can't be found + will be replaced with the specifier. For example, a + template of "data: %{x}, %{y}" will result in a value + of "data: 1, %{y}" if x is 1 and y is missing. + Variables with an undefined value will be replaced with + the fallback value. All attributes that can be + specified per-point (the ones that are `arrayOk: true`) + are available. + texttemplatefallback + Fallback string that's displayed when a variable + referenced in a template is missing. If the boolean + value 'false' is passed in, the specifier with the + missing variable will be displayed. + texttemplatesrc + Sets the source reference on Chart Studio Cloud for + `texttemplate`. + uid + Assign an id to this trace, Use this to provide object + constancy between traces during animations and + transitions. + uirevision + Controls persistence of some user-driven changes to the + trace: `constraintrange` in `parcoords` traces, as well + as some `editable: true` modifications such as `name` + and `colorbar.title`. Defaults to `layout.uirevision`. + Note that other user-driven trace attribute changes are + controlled by `layout` attributes: `trace.visible` is + controlled by `layout.legend.uirevision`, + `selectedpoints` is controlled by + `layout.selectionrevision`, and `colorbar.(x|y)` + (accessible with `config: {editable: true}`) is + controlled by `layout.editrevision`. Trace changes are + tracked by `uid`, which only falls back on trace index + if no `uid` is provided. So if your app can add/remove + traces before the end of the `data` array, such that + the same trace has a different index, you can still + preserve user-driven changes if you give each trace a + `uid` that stays with it as it moves. + visible + Determines whether or not this trace is visible. If + "legendonly", the trace is not drawn, but can appear as + a legend item (provided that the legend itself is + visible). + x + Sets the x coordinates. + xcalendar + Sets the calendar system to use with `x` date data. + xhoverformat + Sets the hover text formatting rulefor `x` using d3 + formatting mini-languages which are very similar to + those in Python. For numbers, see: + https://github.com/d3/d3-format/tree/v1.4.5#d3-format. + And for dates see: https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format. We add two items to + d3's date formatter: "%h" for half of the year as a + decimal number as well as "%{n}f" for fractional + seconds with n digits. For example, *2016-10-13 + 09:15:23.456* with tickformat "%H~%M~%S.%2f" would + display *09~15~23.46*By default the values are + formatted using `xaxis.hoverformat`. + xsrc + Sets the source reference on Chart Studio Cloud for + `x`. + y + Sets the y coordinates. + ycalendar + Sets the calendar system to use with `y` date data. + yhoverformat + Sets the hover text formatting rulefor `y` using d3 + formatting mini-languages which are very similar to + those in Python. For numbers, see: + https://github.com/d3/d3-format/tree/v1.4.5#d3-format. + And for dates see: https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format. We add two items to + d3's date formatter: "%h" for half of the year as a + decimal number as well as "%{n}f" for fractional + seconds with n digits. For example, *2016-10-13 + 09:15:23.456* with tickformat "%H~%M~%S.%2f" would + display *09~15~23.46*By default the values are + formatted using `yaxis.hoverformat`. + ysrc + Sets the source reference on Chart Studio Cloud for + `y`. + z + Sets the z coordinates. + zcalendar + Sets the calendar system to use with `z` date data. + zhoverformat + Sets the hover text formatting rulefor `z` using d3 + formatting mini-languages which are very similar to + those in Python. For numbers, see: + https://github.com/d3/d3-format/tree/v1.4.5#d3-format. + And for dates see: https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format. We add two items to + d3's date formatter: "%h" for half of the year as a + decimal number as well as "%{n}f" for fractional + seconds with n digits. For example, *2016-10-13 + 09:15:23.456* with tickformat "%H~%M~%S.%2f" would + display *09~15~23.46*By default the values are + formatted using `zaxis.hoverformat`. + zsrc + Sets the source reference on Chart Studio Cloud for + `z`. + + Returns + ------- + Scatter3d + """ + super().__init__("scatter3d") + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + if arg is None: + arg = {} + elif isinstance(arg, self.__class__): + arg = arg.to_plotly_json() + elif isinstance(arg, dict): + arg = _copy.copy(arg) + else: + raise ValueError("""\ +The first argument to the plotly.graph_objs.Scatter3d +constructor must be a dict or +an instance of :class:`plotly.graph_objs.Scatter3d`""") + + self._skip_invalid = kwargs.pop("skip_invalid", False) + self._validate = kwargs.pop("_validate", True) + + self._set_property("connectgaps", arg, connectgaps) + self._set_property("customdata", arg, customdata) + self._set_property("customdatasrc", arg, customdatasrc) + self._set_property("error_x", arg, error_x) + self._set_property("error_y", arg, error_y) + self._set_property("error_z", arg, error_z) + self._set_property("hoverinfo", arg, hoverinfo) + self._set_property("hoverinfosrc", arg, hoverinfosrc) + self._set_property("hoverlabel", arg, hoverlabel) + self._set_property("hovertemplate", arg, hovertemplate) + self._set_property("hovertemplatefallback", arg, hovertemplatefallback) + self._set_property("hovertemplatesrc", arg, hovertemplatesrc) + self._set_property("hovertext", arg, hovertext) + self._set_property("hovertextsrc", arg, hovertextsrc) + self._set_property("ids", arg, ids) + self._set_property("idssrc", arg, idssrc) + self._set_property("legend", arg, legend) + self._set_property("legendgroup", arg, legendgroup) + self._set_property("legendgrouptitle", arg, legendgrouptitle) + self._set_property("legendrank", arg, legendrank) + self._set_property("legendwidth", arg, legendwidth) + self._set_property("line", arg, line) + self._set_property("marker", arg, marker) + self._set_property("meta", arg, meta) + self._set_property("metasrc", arg, metasrc) + self._set_property("mode", arg, mode) + self._set_property("name", arg, name) + self._set_property("opacity", arg, opacity) + self._set_property("projection", arg, projection) + self._set_property("scene", arg, scene) + self._set_property("showlegend", arg, showlegend) + self._set_property("stream", arg, stream) + self._set_property("surfaceaxis", arg, surfaceaxis) + self._set_property("surfacecolor", arg, surfacecolor) + self._set_property("text", arg, text) + self._set_property("textfont", arg, textfont) + self._set_property("textposition", arg, textposition) + self._set_property("textpositionsrc", arg, textpositionsrc) + self._set_property("textsrc", arg, textsrc) + self._set_property("texttemplate", arg, texttemplate) + self._set_property("texttemplatefallback", arg, texttemplatefallback) + self._set_property("texttemplatesrc", arg, texttemplatesrc) + self._set_property("uid", arg, uid) + self._set_property("uirevision", arg, uirevision) + self._set_property("visible", arg, visible) + self._set_property("x", arg, x) + self._set_property("xcalendar", arg, xcalendar) + self._set_property("xhoverformat", arg, xhoverformat) + self._set_property("xsrc", arg, xsrc) + self._set_property("y", arg, y) + self._set_property("ycalendar", arg, ycalendar) + self._set_property("yhoverformat", arg, yhoverformat) + self._set_property("ysrc", arg, ysrc) + self._set_property("z", arg, z) + self._set_property("zcalendar", arg, zcalendar) + self._set_property("zhoverformat", arg, zhoverformat) + self._set_property("zsrc", arg, zsrc) + + self._props["type"] = "scatter3d" + arg.pop("type", None) + self._process_kwargs(**dict(arg, **kwargs)) + self._skip_invalid = False diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/_scattercarpet.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/_scattercarpet.py new file mode 100644 index 0000000000000000000000000000000000000000..769556f1fb2f367d8256d8817b26b7492a6a5df5 --- /dev/null +++ b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/_scattercarpet.py @@ -0,0 +1,1921 @@ +# --- THIS FILE IS AUTO-GENERATED --- +# Modifications will be overwitten the next time code generation run. + +from plotly.basedatatypes import BaseTraceType as _BaseTraceType +import copy as _copy + + +class Scattercarpet(_BaseTraceType): + _parent_path_str = "" + _path_str = "scattercarpet" + _valid_props = { + "a", + "asrc", + "b", + "bsrc", + "carpet", + "connectgaps", + "customdata", + "customdatasrc", + "fill", + "fillcolor", + "hoverinfo", + "hoverinfosrc", + "hoverlabel", + "hoveron", + "hovertemplate", + "hovertemplatefallback", + "hovertemplatesrc", + "hovertext", + "hovertextsrc", + "ids", + "idssrc", + "legend", + "legendgroup", + "legendgrouptitle", + "legendrank", + "legendwidth", + "line", + "marker", + "meta", + "metasrc", + "mode", + "name", + "opacity", + "selected", + "selectedpoints", + "showlegend", + "stream", + "text", + "textfont", + "textposition", + "textpositionsrc", + "textsrc", + "texttemplate", + "texttemplatefallback", + "texttemplatesrc", + "type", + "uid", + "uirevision", + "unselected", + "visible", + "xaxis", + "yaxis", + "zorder", + } + + @property + def a(self): + """ + Sets the a-axis coordinates. + + The 'a' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["a"] + + @a.setter + def a(self, val): + self["a"] = val + + @property + def asrc(self): + """ + Sets the source reference on Chart Studio Cloud for `a`. + + The 'asrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["asrc"] + + @asrc.setter + def asrc(self, val): + self["asrc"] = val + + @property + def b(self): + """ + Sets the b-axis coordinates. + + The 'b' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["b"] + + @b.setter + def b(self, val): + self["b"] = val + + @property + def bsrc(self): + """ + Sets the source reference on Chart Studio Cloud for `b`. + + The 'bsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["bsrc"] + + @bsrc.setter + def bsrc(self, val): + self["bsrc"] = val + + @property + def carpet(self): + """ + An identifier for this carpet, so that `scattercarpet` and + `contourcarpet` traces can specify a carpet plot on which they + lie + + The 'carpet' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["carpet"] + + @carpet.setter + def carpet(self, val): + self["carpet"] = val + + @property + def connectgaps(self): + """ + Determines whether or not gaps (i.e. {nan} or missing values) + in the provided data arrays are connected. + + The 'connectgaps' property is a boolean and must be specified as: + - A boolean value: True or False + + Returns + ------- + bool + """ + return self["connectgaps"] + + @connectgaps.setter + def connectgaps(self, val): + self["connectgaps"] = val + + @property + def customdata(self): + """ + Assigns extra data each datum. This may be useful when + listening to hover, click and selection events. Note that, + "scatter" traces also appends customdata items in the markers + DOM elements + + The 'customdata' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["customdata"] + + @customdata.setter + def customdata(self, val): + self["customdata"] = val + + @property + def customdatasrc(self): + """ + Sets the source reference on Chart Studio Cloud for + `customdata`. + + The 'customdatasrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["customdatasrc"] + + @customdatasrc.setter + def customdatasrc(self, val): + self["customdatasrc"] = val + + @property + def fill(self): + """ + Sets the area to fill with a solid color. Use with `fillcolor` + if not "none". scatterternary has a subset of the options + available to scatter. "toself" connects the endpoints of the + trace (or each segment of the trace if it has gaps) into a + closed shape. "tonext" fills the space between two traces if + one completely encloses the other (eg consecutive contour + lines), and behaves like "toself" if there is no trace before + it. "tonext" should not be used if one trace does not enclose + the other. + + The 'fill' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['none', 'toself', 'tonext'] + + Returns + ------- + Any + """ + return self["fill"] + + @fill.setter + def fill(self, val): + self["fill"] = val + + @property + def fillcolor(self): + """ + Sets the fill color. Defaults to a half-transparent variant of + the line color, marker color, or marker line color, whichever + is available. + + The 'fillcolor' property is a color and may be specified as: + - A hex string (e.g. '#ff0000') + - An rgb/rgba string (e.g. 'rgb(255,0,0)') + - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') + - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') + - A named CSS color: see https://plotly.com/python/css-colors/ for a list + + Returns + ------- + str + """ + return self["fillcolor"] + + @fillcolor.setter + def fillcolor(self, val): + self["fillcolor"] = val + + @property + def hoverinfo(self): + """ + Determines which trace information appear on hover. If `none` + or `skip` are set, no information is displayed upon hovering. + But, if `none` is set, click and hover events are still fired. + + The 'hoverinfo' property is a flaglist and may be specified + as a string containing: + - Any combination of ['a', 'b', 'text', 'name'] joined with '+' characters + (e.g. 'a+b') + OR exactly one of ['all', 'none', 'skip'] (e.g. 'skip') + - A list or array of the above + + Returns + ------- + Any|numpy.ndarray + """ + return self["hoverinfo"] + + @hoverinfo.setter + def hoverinfo(self, val): + self["hoverinfo"] = val + + @property + def hoverinfosrc(self): + """ + Sets the source reference on Chart Studio Cloud for + `hoverinfo`. + + The 'hoverinfosrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["hoverinfosrc"] + + @hoverinfosrc.setter + def hoverinfosrc(self, val): + self["hoverinfosrc"] = val + + @property + def hoverlabel(self): + """ + The 'hoverlabel' property is an instance of Hoverlabel + that may be specified as: + - An instance of :class:`plotly.graph_objs.scattercarpet.Hoverlabel` + - A dict of string/value properties that will be passed + to the Hoverlabel constructor + + Returns + ------- + plotly.graph_objs.scattercarpet.Hoverlabel + """ + return self["hoverlabel"] + + @hoverlabel.setter + def hoverlabel(self, val): + self["hoverlabel"] = val + + @property + def hoveron(self): + """ + Do the hover effects highlight individual points (markers or + line points) or do they highlight filled regions? If the fill + is "toself" or "tonext" and there are no markers or text, then + the default is "fills", otherwise it is "points". + + The 'hoveron' property is a flaglist and may be specified + as a string containing: + - Any combination of ['points', 'fills'] joined with '+' characters + (e.g. 'points+fills') + + Returns + ------- + Any + """ + return self["hoveron"] + + @hoveron.setter + def hoveron(self, val): + self["hoveron"] = val + + @property + def hovertemplate(self): + """ + Template string used for rendering the information that appear + on hover box. Note that this will override `hoverinfo`. + Variables are inserted using %{variable}, for example "y: %{y}" + as well as %{xother}, {%_xother}, {%_xother_}, {%xother_}. When + showing info for several points, "xother" will be added to + those with different x positions from the first point. An + underscore before or after "(x|y)other" will add a space on + that side, only when this field is shown. Numbers are formatted + using d3-format's syntax %{variable:d3-format}, for example + "Price: %{y:$.2f}". + https://github.com/d3/d3-format/tree/v1.4.5#d3-format for + details on the formatting syntax. Dates are formatted using + d3-time-format's syntax %{variable|d3-time-format}, for example + "Day: %{2019-01-01|%A}". https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format for details on the date + formatting syntax. Variables that can't be found will be + replaced with the specifier. For example, a template of "data: + %{x}, %{y}" will result in a value of "data: 1, %{y}" if x is 1 + and y is missing. Variables with an undefined value will be + replaced with the fallback value. The variables available in + `hovertemplate` are the ones emitted as event data described at + this link https://plotly.com/javascript/plotlyjs-events/#event- + data. Additionally, all attributes that can be specified per- + point (the ones that are `arrayOk: true`) are available. + Anything contained in tag `` is displayed in the + secondary box, for example `%{fullData.name}`. + To hide the secondary box completely, use an empty tag + ``. + + The 'hovertemplate' property is a string and must be specified as: + - A string + - A number that will be converted to a string + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["hovertemplate"] + + @hovertemplate.setter + def hovertemplate(self, val): + self["hovertemplate"] = val + + @property + def hovertemplatefallback(self): + """ + Fallback string that's displayed when a variable referenced in + a template is missing. If the boolean value 'false' is passed + in, the specifier with the missing variable will be displayed. + + The 'hovertemplatefallback' property accepts values of any type + + Returns + ------- + Any + """ + return self["hovertemplatefallback"] + + @hovertemplatefallback.setter + def hovertemplatefallback(self, val): + self["hovertemplatefallback"] = val + + @property + def hovertemplatesrc(self): + """ + Sets the source reference on Chart Studio Cloud for + `hovertemplate`. + + The 'hovertemplatesrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["hovertemplatesrc"] + + @hovertemplatesrc.setter + def hovertemplatesrc(self, val): + self["hovertemplatesrc"] = val + + @property + def hovertext(self): + """ + Sets hover text elements associated with each (a,b) point. If a + single string, the same string appears over all the data + points. If an array of strings, the items are mapped in order + to the the data points in (a,b). To be seen, trace `hoverinfo` + must contain a "text" flag. + + The 'hovertext' property is a string and must be specified as: + - A string + - A number that will be converted to a string + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["hovertext"] + + @hovertext.setter + def hovertext(self, val): + self["hovertext"] = val + + @property + def hovertextsrc(self): + """ + Sets the source reference on Chart Studio Cloud for + `hovertext`. + + The 'hovertextsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["hovertextsrc"] + + @hovertextsrc.setter + def hovertextsrc(self, val): + self["hovertextsrc"] = val + + @property + def ids(self): + """ + Assigns id labels to each datum. These ids for object constancy + of data points during animation. Should be an array of strings, + not numbers or any other type. + + The 'ids' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["ids"] + + @ids.setter + def ids(self, val): + self["ids"] = val + + @property + def idssrc(self): + """ + Sets the source reference on Chart Studio Cloud for `ids`. + + The 'idssrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["idssrc"] + + @idssrc.setter + def idssrc(self, val): + self["idssrc"] = val + + @property + def legend(self): + """ + Sets the reference to a legend to show this trace in. + References to these legends are "legend", "legend2", "legend3", + etc. Settings for these legends are set in the layout, under + `layout.legend`, `layout.legend2`, etc. + + The 'legend' property is an identifier of a particular + subplot, of type 'legend', that may be specified as: + - the string 'legend' optionally followed by an integer >= 1 + (e.g. 'legend', 'legend1', 'legend2', 'legend3', etc.) + + Returns + ------- + str + """ + return self["legend"] + + @legend.setter + def legend(self, val): + self["legend"] = val + + @property + def legendgroup(self): + """ + Sets the legend group for this trace. Traces and shapes part of + the same legend group hide/show at the same time when toggling + legend items. + + The 'legendgroup' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["legendgroup"] + + @legendgroup.setter + def legendgroup(self, val): + self["legendgroup"] = val + + @property + def legendgrouptitle(self): + """ + The 'legendgrouptitle' property is an instance of Legendgrouptitle + that may be specified as: + - An instance of :class:`plotly.graph_objs.scattercarpet.Legendgrouptitle` + - A dict of string/value properties that will be passed + to the Legendgrouptitle constructor + + Returns + ------- + plotly.graph_objs.scattercarpet.Legendgrouptitle + """ + return self["legendgrouptitle"] + + @legendgrouptitle.setter + def legendgrouptitle(self, val): + self["legendgrouptitle"] = val + + @property + def legendrank(self): + """ + Sets the legend rank for this trace. Items and groups with + smaller ranks are presented on top/left side while with + "reversed" `legend.traceorder` they are on bottom/right side. + The default legendrank is 1000, so that you can use ranks less + than 1000 to place certain items before all unranked items, and + ranks greater than 1000 to go after all unranked items. When + having unranked or equal rank items shapes would be displayed + after traces i.e. according to their order in data and layout. + + The 'legendrank' property is a number and may be specified as: + - An int or float + + Returns + ------- + int|float + """ + return self["legendrank"] + + @legendrank.setter + def legendrank(self, val): + self["legendrank"] = val + + @property + def legendwidth(self): + """ + Sets the width (in px or fraction) of the legend for this + trace. + + The 'legendwidth' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["legendwidth"] + + @legendwidth.setter + def legendwidth(self, val): + self["legendwidth"] = val + + @property + def line(self): + """ + The 'line' property is an instance of Line + that may be specified as: + - An instance of :class:`plotly.graph_objs.scattercarpet.Line` + - A dict of string/value properties that will be passed + to the Line constructor + + Returns + ------- + plotly.graph_objs.scattercarpet.Line + """ + return self["line"] + + @line.setter + def line(self, val): + self["line"] = val + + @property + def marker(self): + """ + The 'marker' property is an instance of Marker + that may be specified as: + - An instance of :class:`plotly.graph_objs.scattercarpet.Marker` + - A dict of string/value properties that will be passed + to the Marker constructor + + Returns + ------- + plotly.graph_objs.scattercarpet.Marker + """ + return self["marker"] + + @marker.setter + def marker(self, val): + self["marker"] = val + + @property + def meta(self): + """ + Assigns extra meta information associated with this trace that + can be used in various text attributes. Attributes such as + trace `name`, graph, axis and colorbar `title.text`, annotation + `text` `rangeselector`, `updatemenues` and `sliders` `label` + text all support `meta`. To access the trace `meta` values in + an attribute in the same trace, simply use `%{meta[i]}` where + `i` is the index or key of the `meta` item in question. To + access trace `meta` in layout attributes, use + `%{data[n[.meta[i]}` where `i` is the index or key of the + `meta` and `n` is the trace index. + + The 'meta' property accepts values of any type + + Returns + ------- + Any|numpy.ndarray + """ + return self["meta"] + + @meta.setter + def meta(self, val): + self["meta"] = val + + @property + def metasrc(self): + """ + Sets the source reference on Chart Studio Cloud for `meta`. + + The 'metasrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["metasrc"] + + @metasrc.setter + def metasrc(self, val): + self["metasrc"] = val + + @property + def mode(self): + """ + Determines the drawing mode for this scatter trace. If the + provided `mode` includes "text" then the `text` elements appear + at the coordinates. Otherwise, the `text` elements appear on + hover. If there are less than 20 points and the trace is not + stacked then the default is "lines+markers". Otherwise, + "lines". + + The 'mode' property is a flaglist and may be specified + as a string containing: + - Any combination of ['lines', 'markers', 'text'] joined with '+' characters + (e.g. 'lines+markers') + OR exactly one of ['none'] (e.g. 'none') + + Returns + ------- + Any + """ + return self["mode"] + + @mode.setter + def mode(self, val): + self["mode"] = val + + @property + def name(self): + """ + Sets the trace name. The trace name appears as the legend item + and on hover. + + The 'name' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["name"] + + @name.setter + def name(self, val): + self["name"] = val + + @property + def opacity(self): + """ + Sets the opacity of the trace. + + The 'opacity' property is a number and may be specified as: + - An int or float in the interval [0, 1] + + Returns + ------- + int|float + """ + return self["opacity"] + + @opacity.setter + def opacity(self, val): + self["opacity"] = val + + @property + def selected(self): + """ + The 'selected' property is an instance of Selected + that may be specified as: + - An instance of :class:`plotly.graph_objs.scattercarpet.Selected` + - A dict of string/value properties that will be passed + to the Selected constructor + + Returns + ------- + plotly.graph_objs.scattercarpet.Selected + """ + return self["selected"] + + @selected.setter + def selected(self, val): + self["selected"] = val + + @property + def selectedpoints(self): + """ + Array containing integer indices of selected points. Has an + effect only for traces that support selections. Note that an + empty array means an empty selection where the `unselected` are + turned on for all points, whereas, any other non-array values + means no selection all where the `selected` and `unselected` + styles have no effect. + + The 'selectedpoints' property accepts values of any type + + Returns + ------- + Any + """ + return self["selectedpoints"] + + @selectedpoints.setter + def selectedpoints(self, val): + self["selectedpoints"] = val + + @property + def showlegend(self): + """ + Determines whether or not an item corresponding to this trace + is shown in the legend. + + The 'showlegend' property is a boolean and must be specified as: + - A boolean value: True or False + + Returns + ------- + bool + """ + return self["showlegend"] + + @showlegend.setter + def showlegend(self, val): + self["showlegend"] = val + + @property + def stream(self): + """ + The 'stream' property is an instance of Stream + that may be specified as: + - An instance of :class:`plotly.graph_objs.scattercarpet.Stream` + - A dict of string/value properties that will be passed + to the Stream constructor + + Returns + ------- + plotly.graph_objs.scattercarpet.Stream + """ + return self["stream"] + + @stream.setter + def stream(self, val): + self["stream"] = val + + @property + def text(self): + """ + Sets text elements associated with each (a,b) point. If a + single string, the same string appears over all the data + points. If an array of strings, the items are mapped in order + to the the data points in (a,b). If trace `hoverinfo` contains + a "text" flag and "hovertext" is not set, these elements will + be seen in the hover labels. + + The 'text' property is a string and must be specified as: + - A string + - A number that will be converted to a string + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["text"] + + @text.setter + def text(self, val): + self["text"] = val + + @property + def textfont(self): + """ + Sets the text font. + + The 'textfont' property is an instance of Textfont + that may be specified as: + - An instance of :class:`plotly.graph_objs.scattercarpet.Textfont` + - A dict of string/value properties that will be passed + to the Textfont constructor + + Returns + ------- + plotly.graph_objs.scattercarpet.Textfont + """ + return self["textfont"] + + @textfont.setter + def textfont(self, val): + self["textfont"] = val + + @property + def textposition(self): + """ + Sets the positions of the `text` elements with respects to the + (x,y) coordinates. + + The 'textposition' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['top left', 'top center', 'top right', 'middle left', + 'middle center', 'middle right', 'bottom left', 'bottom + center', 'bottom right'] + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + Any|numpy.ndarray + """ + return self["textposition"] + + @textposition.setter + def textposition(self, val): + self["textposition"] = val + + @property + def textpositionsrc(self): + """ + Sets the source reference on Chart Studio Cloud for + `textposition`. + + The 'textpositionsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["textpositionsrc"] + + @textpositionsrc.setter + def textpositionsrc(self, val): + self["textpositionsrc"] = val + + @property + def textsrc(self): + """ + Sets the source reference on Chart Studio Cloud for `text`. + + The 'textsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["textsrc"] + + @textsrc.setter + def textsrc(self, val): + self["textsrc"] = val + + @property + def texttemplate(self): + """ + Template string used for rendering the information text that + appears on points. Note that this will override `textinfo`. + Variables are inserted using %{variable}, for example "y: + %{y}". Numbers are formatted using d3-format's syntax + %{variable:d3-format}, for example "Price: %{y:$.2f}". + https://github.com/d3/d3-format/tree/v1.4.5#d3-format for + details on the formatting syntax. Dates are formatted using + d3-time-format's syntax %{variable|d3-time-format}, for example + "Day: %{2019-01-01|%A}". https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format for details on the date + formatting syntax. Variables that can't be found will be + replaced with the specifier. For example, a template of "data: + %{x}, %{y}" will result in a value of "data: 1, %{y}" if x is 1 + and y is missing. Variables with an undefined value will be + replaced with the fallback value. All attributes that can be + specified per-point (the ones that are `arrayOk: true`) are + available. Finally, the template string has access to variables + `a`, `b` and `text`. + + The 'texttemplate' property is a string and must be specified as: + - A string + - A number that will be converted to a string + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["texttemplate"] + + @texttemplate.setter + def texttemplate(self, val): + self["texttemplate"] = val + + @property + def texttemplatefallback(self): + """ + Fallback string that's displayed when a variable referenced in + a template is missing. If the boolean value 'false' is passed + in, the specifier with the missing variable will be displayed. + + The 'texttemplatefallback' property accepts values of any type + + Returns + ------- + Any + """ + return self["texttemplatefallback"] + + @texttemplatefallback.setter + def texttemplatefallback(self, val): + self["texttemplatefallback"] = val + + @property + def texttemplatesrc(self): + """ + Sets the source reference on Chart Studio Cloud for + `texttemplate`. + + The 'texttemplatesrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["texttemplatesrc"] + + @texttemplatesrc.setter + def texttemplatesrc(self, val): + self["texttemplatesrc"] = val + + @property + def uid(self): + """ + Assign an id to this trace, Use this to provide object + constancy between traces during animations and transitions. + + The 'uid' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["uid"] + + @uid.setter + def uid(self, val): + self["uid"] = val + + @property + def uirevision(self): + """ + Controls persistence of some user-driven changes to the trace: + `constraintrange` in `parcoords` traces, as well as some + `editable: true` modifications such as `name` and + `colorbar.title`. Defaults to `layout.uirevision`. Note that + other user-driven trace attribute changes are controlled by + `layout` attributes: `trace.visible` is controlled by + `layout.legend.uirevision`, `selectedpoints` is controlled by + `layout.selectionrevision`, and `colorbar.(x|y)` (accessible + with `config: {editable: true}`) is controlled by + `layout.editrevision`. Trace changes are tracked by `uid`, + which only falls back on trace index if no `uid` is provided. + So if your app can add/remove traces before the end of the + `data` array, such that the same trace has a different index, + you can still preserve user-driven changes if you give each + trace a `uid` that stays with it as it moves. + + The 'uirevision' property accepts values of any type + + Returns + ------- + Any + """ + return self["uirevision"] + + @uirevision.setter + def uirevision(self, val): + self["uirevision"] = val + + @property + def unselected(self): + """ + The 'unselected' property is an instance of Unselected + that may be specified as: + - An instance of :class:`plotly.graph_objs.scattercarpet.Unselected` + - A dict of string/value properties that will be passed + to the Unselected constructor + + Returns + ------- + plotly.graph_objs.scattercarpet.Unselected + """ + return self["unselected"] + + @unselected.setter + def unselected(self, val): + self["unselected"] = val + + @property + def visible(self): + """ + Determines whether or not this trace is visible. If + "legendonly", the trace is not drawn, but can appear as a + legend item (provided that the legend itself is visible). + + The 'visible' property is an enumeration that may be specified as: + - One of the following enumeration values: + [True, False, 'legendonly'] + + Returns + ------- + Any + """ + return self["visible"] + + @visible.setter + def visible(self, val): + self["visible"] = val + + @property + def xaxis(self): + """ + Sets a reference between this trace's x coordinates and a 2D + cartesian x axis. If "x" (the default value), the x coordinates + refer to `layout.xaxis`. If "x2", the x coordinates refer to + `layout.xaxis2`, and so on. + + The 'xaxis' property is an identifier of a particular + subplot, of type 'x', that may be specified as: + - the string 'x' optionally followed by an integer >= 1 + (e.g. 'x', 'x1', 'x2', 'x3', etc.) + + Returns + ------- + str + """ + return self["xaxis"] + + @xaxis.setter + def xaxis(self, val): + self["xaxis"] = val + + @property + def yaxis(self): + """ + Sets a reference between this trace's y coordinates and a 2D + cartesian y axis. If "y" (the default value), the y coordinates + refer to `layout.yaxis`. If "y2", the y coordinates refer to + `layout.yaxis2`, and so on. + + The 'yaxis' property is an identifier of a particular + subplot, of type 'y', that may be specified as: + - the string 'y' optionally followed by an integer >= 1 + (e.g. 'y', 'y1', 'y2', 'y3', etc.) + + Returns + ------- + str + """ + return self["yaxis"] + + @yaxis.setter + def yaxis(self, val): + self["yaxis"] = val + + @property + def zorder(self): + """ + Sets the layer on which this trace is displayed, relative to + other SVG traces on the same subplot. SVG traces with higher + `zorder` appear in front of those with lower `zorder`. + + The 'zorder' property is a integer and may be specified as: + - An int (or float that will be cast to an int) + + Returns + ------- + int + """ + return self["zorder"] + + @zorder.setter + def zorder(self, val): + self["zorder"] = val + + @property + def type(self): + return self._props["type"] + + @property + def _prop_descriptions(self): + return """\ + a + Sets the a-axis coordinates. + asrc + Sets the source reference on Chart Studio Cloud for + `a`. + b + Sets the b-axis coordinates. + bsrc + Sets the source reference on Chart Studio Cloud for + `b`. + carpet + An identifier for this carpet, so that `scattercarpet` + and `contourcarpet` traces can specify a carpet plot on + which they lie + connectgaps + Determines whether or not gaps (i.e. {nan} or missing + values) in the provided data arrays are connected. + customdata + Assigns extra data each datum. This may be useful when + listening to hover, click and selection events. Note + that, "scatter" traces also appends customdata items in + the markers DOM elements + customdatasrc + Sets the source reference on Chart Studio Cloud for + `customdata`. + fill + Sets the area to fill with a solid color. Use with + `fillcolor` if not "none". scatterternary has a subset + of the options available to scatter. "toself" connects + the endpoints of the trace (or each segment of the + trace if it has gaps) into a closed shape. "tonext" + fills the space between two traces if one completely + encloses the other (eg consecutive contour lines), and + behaves like "toself" if there is no trace before it. + "tonext" should not be used if one trace does not + enclose the other. + fillcolor + Sets the fill color. Defaults to a half-transparent + variant of the line color, marker color, or marker line + color, whichever is available. + hoverinfo + Determines which trace information appear on hover. If + `none` or `skip` are set, no information is displayed + upon hovering. But, if `none` is set, click and hover + events are still fired. + hoverinfosrc + Sets the source reference on Chart Studio Cloud for + `hoverinfo`. + hoverlabel + :class:`plotly.graph_objects.scattercarpet.Hoverlabel` + instance or dict with compatible properties + hoveron + Do the hover effects highlight individual points + (markers or line points) or do they highlight filled + regions? If the fill is "toself" or "tonext" and there + are no markers or text, then the default is "fills", + otherwise it is "points". + hovertemplate + Template string used for rendering the information that + appear on hover box. Note that this will override + `hoverinfo`. Variables are inserted using %{variable}, + for example "y: %{y}" as well as %{xother}, {%_xother}, + {%_xother_}, {%xother_}. When showing info for several + points, "xother" will be added to those with different + x positions from the first point. An underscore before + or after "(x|y)other" will add a space on that side, + only when this field is shown. Numbers are formatted + using d3-format's syntax %{variable:d3-format}, for + example "Price: %{y:$.2f}". + https://github.com/d3/d3-format/tree/v1.4.5#d3-format + for details on the formatting syntax. Dates are + formatted using d3-time-format's syntax + %{variable|d3-time-format}, for example "Day: + %{2019-01-01|%A}". https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format for details on the + date formatting syntax. Variables that can't be found + will be replaced with the specifier. For example, a + template of "data: %{x}, %{y}" will result in a value + of "data: 1, %{y}" if x is 1 and y is missing. + Variables with an undefined value will be replaced with + the fallback value. The variables available in + `hovertemplate` are the ones emitted as event data + described at this link + https://plotly.com/javascript/plotlyjs-events/#event- + data. Additionally, all attributes that can be + specified per-point (the ones that are `arrayOk: true`) + are available. Anything contained in tag `` is + displayed in the secondary box, for example + `%{fullData.name}`. To hide the + secondary box completely, use an empty tag + ``. + hovertemplatefallback + Fallback string that's displayed when a variable + referenced in a template is missing. If the boolean + value 'false' is passed in, the specifier with the + missing variable will be displayed. + hovertemplatesrc + Sets the source reference on Chart Studio Cloud for + `hovertemplate`. + hovertext + Sets hover text elements associated with each (a,b) + point. If a single string, the same string appears over + all the data points. If an array of strings, the items + are mapped in order to the the data points in (a,b). To + be seen, trace `hoverinfo` must contain a "text" flag. + hovertextsrc + Sets the source reference on Chart Studio Cloud for + `hovertext`. + ids + Assigns id labels to each datum. These ids for object + constancy of data points during animation. Should be an + array of strings, not numbers or any other type. + idssrc + Sets the source reference on Chart Studio Cloud for + `ids`. + legend + Sets the reference to a legend to show this trace in. + References to these legends are "legend", "legend2", + "legend3", etc. Settings for these legends are set in + the layout, under `layout.legend`, `layout.legend2`, + etc. + legendgroup + Sets the legend group for this trace. Traces and shapes + part of the same legend group hide/show at the same + time when toggling legend items. + legendgrouptitle + :class:`plotly.graph_objects.scattercarpet.Legendgroupt + itle` instance or dict with compatible properties + legendrank + Sets the legend rank for this trace. Items and groups + with smaller ranks are presented on top/left side while + with "reversed" `legend.traceorder` they are on + bottom/right side. The default legendrank is 1000, so + that you can use ranks less than 1000 to place certain + items before all unranked items, and ranks greater than + 1000 to go after all unranked items. When having + unranked or equal rank items shapes would be displayed + after traces i.e. according to their order in data and + layout. + legendwidth + Sets the width (in px or fraction) of the legend for + this trace. + line + :class:`plotly.graph_objects.scattercarpet.Line` + instance or dict with compatible properties + marker + :class:`plotly.graph_objects.scattercarpet.Marker` + instance or dict with compatible properties + meta + Assigns extra meta information associated with this + trace that can be used in various text attributes. + Attributes such as trace `name`, graph, axis and + colorbar `title.text`, annotation `text` + `rangeselector`, `updatemenues` and `sliders` `label` + text all support `meta`. To access the trace `meta` + values in an attribute in the same trace, simply use + `%{meta[i]}` where `i` is the index or key of the + `meta` item in question. To access trace `meta` in + layout attributes, use `%{data[n[.meta[i]}` where `i` + is the index or key of the `meta` and `n` is the trace + index. + metasrc + Sets the source reference on Chart Studio Cloud for + `meta`. + mode + Determines the drawing mode for this scatter trace. If + the provided `mode` includes "text" then the `text` + elements appear at the coordinates. Otherwise, the + `text` elements appear on hover. If there are less than + 20 points and the trace is not stacked then the default + is "lines+markers". Otherwise, "lines". + name + Sets the trace name. The trace name appears as the + legend item and on hover. + opacity + Sets the opacity of the trace. + selected + :class:`plotly.graph_objects.scattercarpet.Selected` + instance or dict with compatible properties + selectedpoints + Array containing integer indices of selected points. + Has an effect only for traces that support selections. + Note that an empty array means an empty selection where + the `unselected` are turned on for all points, whereas, + any other non-array values means no selection all where + the `selected` and `unselected` styles have no effect. + showlegend + Determines whether or not an item corresponding to this + trace is shown in the legend. + stream + :class:`plotly.graph_objects.scattercarpet.Stream` + instance or dict with compatible properties + text + Sets text elements associated with each (a,b) point. If + a single string, the same string appears over all the + data points. If an array of strings, the items are + mapped in order to the the data points in (a,b). If + trace `hoverinfo` contains a "text" flag and + "hovertext" is not set, these elements will be seen in + the hover labels. + textfont + Sets the text font. + textposition + Sets the positions of the `text` elements with respects + to the (x,y) coordinates. + textpositionsrc + Sets the source reference on Chart Studio Cloud for + `textposition`. + textsrc + Sets the source reference on Chart Studio Cloud for + `text`. + texttemplate + Template string used for rendering the information text + that appears on points. Note that this will override + `textinfo`. Variables are inserted using %{variable}, + for example "y: %{y}". Numbers are formatted using + d3-format's syntax %{variable:d3-format}, for example + "Price: %{y:$.2f}". + https://github.com/d3/d3-format/tree/v1.4.5#d3-format + for details on the formatting syntax. Dates are + formatted using d3-time-format's syntax + %{variable|d3-time-format}, for example "Day: + %{2019-01-01|%A}". https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format for details on the + date formatting syntax. Variables that can't be found + will be replaced with the specifier. For example, a + template of "data: %{x}, %{y}" will result in a value + of "data: 1, %{y}" if x is 1 and y is missing. + Variables with an undefined value will be replaced with + the fallback value. All attributes that can be + specified per-point (the ones that are `arrayOk: true`) + are available. Finally, the template string has access + to variables `a`, `b` and `text`. + texttemplatefallback + Fallback string that's displayed when a variable + referenced in a template is missing. If the boolean + value 'false' is passed in, the specifier with the + missing variable will be displayed. + texttemplatesrc + Sets the source reference on Chart Studio Cloud for + `texttemplate`. + uid + Assign an id to this trace, Use this to provide object + constancy between traces during animations and + transitions. + uirevision + Controls persistence of some user-driven changes to the + trace: `constraintrange` in `parcoords` traces, as well + as some `editable: true` modifications such as `name` + and `colorbar.title`. Defaults to `layout.uirevision`. + Note that other user-driven trace attribute changes are + controlled by `layout` attributes: `trace.visible` is + controlled by `layout.legend.uirevision`, + `selectedpoints` is controlled by + `layout.selectionrevision`, and `colorbar.(x|y)` + (accessible with `config: {editable: true}`) is + controlled by `layout.editrevision`. Trace changes are + tracked by `uid`, which only falls back on trace index + if no `uid` is provided. So if your app can add/remove + traces before the end of the `data` array, such that + the same trace has a different index, you can still + preserve user-driven changes if you give each trace a + `uid` that stays with it as it moves. + unselected + :class:`plotly.graph_objects.scattercarpet.Unselected` + instance or dict with compatible properties + visible + Determines whether or not this trace is visible. If + "legendonly", the trace is not drawn, but can appear as + a legend item (provided that the legend itself is + visible). + xaxis + Sets a reference between this trace's x coordinates and + a 2D cartesian x axis. If "x" (the default value), the + x coordinates refer to `layout.xaxis`. If "x2", the x + coordinates refer to `layout.xaxis2`, and so on. + yaxis + Sets a reference between this trace's y coordinates and + a 2D cartesian y axis. If "y" (the default value), the + y coordinates refer to `layout.yaxis`. If "y2", the y + coordinates refer to `layout.yaxis2`, and so on. + zorder + Sets the layer on which this trace is displayed, + relative to other SVG traces on the same subplot. SVG + traces with higher `zorder` appear in front of those + with lower `zorder`. + """ + + def __init__( + self, + arg=None, + a=None, + asrc=None, + b=None, + bsrc=None, + carpet=None, + connectgaps=None, + customdata=None, + customdatasrc=None, + fill=None, + fillcolor=None, + hoverinfo=None, + hoverinfosrc=None, + hoverlabel=None, + hoveron=None, + hovertemplate=None, + hovertemplatefallback=None, + hovertemplatesrc=None, + hovertext=None, + hovertextsrc=None, + ids=None, + idssrc=None, + legend=None, + legendgroup=None, + legendgrouptitle=None, + legendrank=None, + legendwidth=None, + line=None, + marker=None, + meta=None, + metasrc=None, + mode=None, + name=None, + opacity=None, + selected=None, + selectedpoints=None, + showlegend=None, + stream=None, + text=None, + textfont=None, + textposition=None, + textpositionsrc=None, + textsrc=None, + texttemplate=None, + texttemplatefallback=None, + texttemplatesrc=None, + uid=None, + uirevision=None, + unselected=None, + visible=None, + xaxis=None, + yaxis=None, + zorder=None, + **kwargs, + ): + """ + Construct a new Scattercarpet object + + Plots a scatter trace on either the first carpet axis or the + carpet axis with a matching `carpet` attribute. + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of :class:`plotly.graph_objs.Scattercarpet` + a + Sets the a-axis coordinates. + asrc + Sets the source reference on Chart Studio Cloud for + `a`. + b + Sets the b-axis coordinates. + bsrc + Sets the source reference on Chart Studio Cloud for + `b`. + carpet + An identifier for this carpet, so that `scattercarpet` + and `contourcarpet` traces can specify a carpet plot on + which they lie + connectgaps + Determines whether or not gaps (i.e. {nan} or missing + values) in the provided data arrays are connected. + customdata + Assigns extra data each datum. This may be useful when + listening to hover, click and selection events. Note + that, "scatter" traces also appends customdata items in + the markers DOM elements + customdatasrc + Sets the source reference on Chart Studio Cloud for + `customdata`. + fill + Sets the area to fill with a solid color. Use with + `fillcolor` if not "none". scatterternary has a subset + of the options available to scatter. "toself" connects + the endpoints of the trace (or each segment of the + trace if it has gaps) into a closed shape. "tonext" + fills the space between two traces if one completely + encloses the other (eg consecutive contour lines), and + behaves like "toself" if there is no trace before it. + "tonext" should not be used if one trace does not + enclose the other. + fillcolor + Sets the fill color. Defaults to a half-transparent + variant of the line color, marker color, or marker line + color, whichever is available. + hoverinfo + Determines which trace information appear on hover. If + `none` or `skip` are set, no information is displayed + upon hovering. But, if `none` is set, click and hover + events are still fired. + hoverinfosrc + Sets the source reference on Chart Studio Cloud for + `hoverinfo`. + hoverlabel + :class:`plotly.graph_objects.scattercarpet.Hoverlabel` + instance or dict with compatible properties + hoveron + Do the hover effects highlight individual points + (markers or line points) or do they highlight filled + regions? If the fill is "toself" or "tonext" and there + are no markers or text, then the default is "fills", + otherwise it is "points". + hovertemplate + Template string used for rendering the information that + appear on hover box. Note that this will override + `hoverinfo`. Variables are inserted using %{variable}, + for example "y: %{y}" as well as %{xother}, {%_xother}, + {%_xother_}, {%xother_}. When showing info for several + points, "xother" will be added to those with different + x positions from the first point. An underscore before + or after "(x|y)other" will add a space on that side, + only when this field is shown. Numbers are formatted + using d3-format's syntax %{variable:d3-format}, for + example "Price: %{y:$.2f}". + https://github.com/d3/d3-format/tree/v1.4.5#d3-format + for details on the formatting syntax. Dates are + formatted using d3-time-format's syntax + %{variable|d3-time-format}, for example "Day: + %{2019-01-01|%A}". https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format for details on the + date formatting syntax. Variables that can't be found + will be replaced with the specifier. For example, a + template of "data: %{x}, %{y}" will result in a value + of "data: 1, %{y}" if x is 1 and y is missing. + Variables with an undefined value will be replaced with + the fallback value. The variables available in + `hovertemplate` are the ones emitted as event data + described at this link + https://plotly.com/javascript/plotlyjs-events/#event- + data. Additionally, all attributes that can be + specified per-point (the ones that are `arrayOk: true`) + are available. Anything contained in tag `` is + displayed in the secondary box, for example + `%{fullData.name}`. To hide the + secondary box completely, use an empty tag + ``. + hovertemplatefallback + Fallback string that's displayed when a variable + referenced in a template is missing. If the boolean + value 'false' is passed in, the specifier with the + missing variable will be displayed. + hovertemplatesrc + Sets the source reference on Chart Studio Cloud for + `hovertemplate`. + hovertext + Sets hover text elements associated with each (a,b) + point. If a single string, the same string appears over + all the data points. If an array of strings, the items + are mapped in order to the the data points in (a,b). To + be seen, trace `hoverinfo` must contain a "text" flag. + hovertextsrc + Sets the source reference on Chart Studio Cloud for + `hovertext`. + ids + Assigns id labels to each datum. These ids for object + constancy of data points during animation. Should be an + array of strings, not numbers or any other type. + idssrc + Sets the source reference on Chart Studio Cloud for + `ids`. + legend + Sets the reference to a legend to show this trace in. + References to these legends are "legend", "legend2", + "legend3", etc. Settings for these legends are set in + the layout, under `layout.legend`, `layout.legend2`, + etc. + legendgroup + Sets the legend group for this trace. Traces and shapes + part of the same legend group hide/show at the same + time when toggling legend items. + legendgrouptitle + :class:`plotly.graph_objects.scattercarpet.Legendgroupt + itle` instance or dict with compatible properties + legendrank + Sets the legend rank for this trace. Items and groups + with smaller ranks are presented on top/left side while + with "reversed" `legend.traceorder` they are on + bottom/right side. The default legendrank is 1000, so + that you can use ranks less than 1000 to place certain + items before all unranked items, and ranks greater than + 1000 to go after all unranked items. When having + unranked or equal rank items shapes would be displayed + after traces i.e. according to their order in data and + layout. + legendwidth + Sets the width (in px or fraction) of the legend for + this trace. + line + :class:`plotly.graph_objects.scattercarpet.Line` + instance or dict with compatible properties + marker + :class:`plotly.graph_objects.scattercarpet.Marker` + instance or dict with compatible properties + meta + Assigns extra meta information associated with this + trace that can be used in various text attributes. + Attributes such as trace `name`, graph, axis and + colorbar `title.text`, annotation `text` + `rangeselector`, `updatemenues` and `sliders` `label` + text all support `meta`. To access the trace `meta` + values in an attribute in the same trace, simply use + `%{meta[i]}` where `i` is the index or key of the + `meta` item in question. To access trace `meta` in + layout attributes, use `%{data[n[.meta[i]}` where `i` + is the index or key of the `meta` and `n` is the trace + index. + metasrc + Sets the source reference on Chart Studio Cloud for + `meta`. + mode + Determines the drawing mode for this scatter trace. If + the provided `mode` includes "text" then the `text` + elements appear at the coordinates. Otherwise, the + `text` elements appear on hover. If there are less than + 20 points and the trace is not stacked then the default + is "lines+markers". Otherwise, "lines". + name + Sets the trace name. The trace name appears as the + legend item and on hover. + opacity + Sets the opacity of the trace. + selected + :class:`plotly.graph_objects.scattercarpet.Selected` + instance or dict with compatible properties + selectedpoints + Array containing integer indices of selected points. + Has an effect only for traces that support selections. + Note that an empty array means an empty selection where + the `unselected` are turned on for all points, whereas, + any other non-array values means no selection all where + the `selected` and `unselected` styles have no effect. + showlegend + Determines whether or not an item corresponding to this + trace is shown in the legend. + stream + :class:`plotly.graph_objects.scattercarpet.Stream` + instance or dict with compatible properties + text + Sets text elements associated with each (a,b) point. If + a single string, the same string appears over all the + data points. If an array of strings, the items are + mapped in order to the the data points in (a,b). If + trace `hoverinfo` contains a "text" flag and + "hovertext" is not set, these elements will be seen in + the hover labels. + textfont + Sets the text font. + textposition + Sets the positions of the `text` elements with respects + to the (x,y) coordinates. + textpositionsrc + Sets the source reference on Chart Studio Cloud for + `textposition`. + textsrc + Sets the source reference on Chart Studio Cloud for + `text`. + texttemplate + Template string used for rendering the information text + that appears on points. Note that this will override + `textinfo`. Variables are inserted using %{variable}, + for example "y: %{y}". Numbers are formatted using + d3-format's syntax %{variable:d3-format}, for example + "Price: %{y:$.2f}". + https://github.com/d3/d3-format/tree/v1.4.5#d3-format + for details on the formatting syntax. Dates are + formatted using d3-time-format's syntax + %{variable|d3-time-format}, for example "Day: + %{2019-01-01|%A}". https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format for details on the + date formatting syntax. Variables that can't be found + will be replaced with the specifier. For example, a + template of "data: %{x}, %{y}" will result in a value + of "data: 1, %{y}" if x is 1 and y is missing. + Variables with an undefined value will be replaced with + the fallback value. All attributes that can be + specified per-point (the ones that are `arrayOk: true`) + are available. Finally, the template string has access + to variables `a`, `b` and `text`. + texttemplatefallback + Fallback string that's displayed when a variable + referenced in a template is missing. If the boolean + value 'false' is passed in, the specifier with the + missing variable will be displayed. + texttemplatesrc + Sets the source reference on Chart Studio Cloud for + `texttemplate`. + uid + Assign an id to this trace, Use this to provide object + constancy between traces during animations and + transitions. + uirevision + Controls persistence of some user-driven changes to the + trace: `constraintrange` in `parcoords` traces, as well + as some `editable: true` modifications such as `name` + and `colorbar.title`. Defaults to `layout.uirevision`. + Note that other user-driven trace attribute changes are + controlled by `layout` attributes: `trace.visible` is + controlled by `layout.legend.uirevision`, + `selectedpoints` is controlled by + `layout.selectionrevision`, and `colorbar.(x|y)` + (accessible with `config: {editable: true}`) is + controlled by `layout.editrevision`. Trace changes are + tracked by `uid`, which only falls back on trace index + if no `uid` is provided. So if your app can add/remove + traces before the end of the `data` array, such that + the same trace has a different index, you can still + preserve user-driven changes if you give each trace a + `uid` that stays with it as it moves. + unselected + :class:`plotly.graph_objects.scattercarpet.Unselected` + instance or dict with compatible properties + visible + Determines whether or not this trace is visible. If + "legendonly", the trace is not drawn, but can appear as + a legend item (provided that the legend itself is + visible). + xaxis + Sets a reference between this trace's x coordinates and + a 2D cartesian x axis. If "x" (the default value), the + x coordinates refer to `layout.xaxis`. If "x2", the x + coordinates refer to `layout.xaxis2`, and so on. + yaxis + Sets a reference between this trace's y coordinates and + a 2D cartesian y axis. If "y" (the default value), the + y coordinates refer to `layout.yaxis`. If "y2", the y + coordinates refer to `layout.yaxis2`, and so on. + zorder + Sets the layer on which this trace is displayed, + relative to other SVG traces on the same subplot. SVG + traces with higher `zorder` appear in front of those + with lower `zorder`. + + Returns + ------- + Scattercarpet + """ + super().__init__("scattercarpet") + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + if arg is None: + arg = {} + elif isinstance(arg, self.__class__): + arg = arg.to_plotly_json() + elif isinstance(arg, dict): + arg = _copy.copy(arg) + else: + raise ValueError("""\ +The first argument to the plotly.graph_objs.Scattercarpet +constructor must be a dict or +an instance of :class:`plotly.graph_objs.Scattercarpet`""") + + self._skip_invalid = kwargs.pop("skip_invalid", False) + self._validate = kwargs.pop("_validate", True) + + self._set_property("a", arg, a) + self._set_property("asrc", arg, asrc) + self._set_property("b", arg, b) + self._set_property("bsrc", arg, bsrc) + self._set_property("carpet", arg, carpet) + self._set_property("connectgaps", arg, connectgaps) + self._set_property("customdata", arg, customdata) + self._set_property("customdatasrc", arg, customdatasrc) + self._set_property("fill", arg, fill) + self._set_property("fillcolor", arg, fillcolor) + self._set_property("hoverinfo", arg, hoverinfo) + self._set_property("hoverinfosrc", arg, hoverinfosrc) + self._set_property("hoverlabel", arg, hoverlabel) + self._set_property("hoveron", arg, hoveron) + self._set_property("hovertemplate", arg, hovertemplate) + self._set_property("hovertemplatefallback", arg, hovertemplatefallback) + self._set_property("hovertemplatesrc", arg, hovertemplatesrc) + self._set_property("hovertext", arg, hovertext) + self._set_property("hovertextsrc", arg, hovertextsrc) + self._set_property("ids", arg, ids) + self._set_property("idssrc", arg, idssrc) + self._set_property("legend", arg, legend) + self._set_property("legendgroup", arg, legendgroup) + self._set_property("legendgrouptitle", arg, legendgrouptitle) + self._set_property("legendrank", arg, legendrank) + self._set_property("legendwidth", arg, legendwidth) + self._set_property("line", arg, line) + self._set_property("marker", arg, marker) + self._set_property("meta", arg, meta) + self._set_property("metasrc", arg, metasrc) + self._set_property("mode", arg, mode) + self._set_property("name", arg, name) + self._set_property("opacity", arg, opacity) + self._set_property("selected", arg, selected) + self._set_property("selectedpoints", arg, selectedpoints) + self._set_property("showlegend", arg, showlegend) + self._set_property("stream", arg, stream) + self._set_property("text", arg, text) + self._set_property("textfont", arg, textfont) + self._set_property("textposition", arg, textposition) + self._set_property("textpositionsrc", arg, textpositionsrc) + self._set_property("textsrc", arg, textsrc) + self._set_property("texttemplate", arg, texttemplate) + self._set_property("texttemplatefallback", arg, texttemplatefallback) + self._set_property("texttemplatesrc", arg, texttemplatesrc) + self._set_property("uid", arg, uid) + self._set_property("uirevision", arg, uirevision) + self._set_property("unselected", arg, unselected) + self._set_property("visible", arg, visible) + self._set_property("xaxis", arg, xaxis) + self._set_property("yaxis", arg, yaxis) + self._set_property("zorder", arg, zorder) + + self._props["type"] = "scattercarpet" + arg.pop("type", None) + self._process_kwargs(**dict(arg, **kwargs)) + self._skip_invalid = False diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/_scattergeo.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/_scattergeo.py new file mode 100644 index 0000000000000000000000000000000000000000..dc45749a6ec9ed3de419e1736b55cb55aba27154 --- /dev/null +++ b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/_scattergeo.py @@ -0,0 +1,1968 @@ +# --- THIS FILE IS AUTO-GENERATED --- +# Modifications will be overwitten the next time code generation run. + +from plotly.basedatatypes import BaseTraceType as _BaseTraceType +import copy as _copy +import warnings + + +class Scattergeo(_BaseTraceType): + _parent_path_str = "" + _path_str = "scattergeo" + _valid_props = { + "connectgaps", + "customdata", + "customdatasrc", + "featureidkey", + "fill", + "fillcolor", + "geo", + "geojson", + "hoverinfo", + "hoverinfosrc", + "hoverlabel", + "hovertemplate", + "hovertemplatefallback", + "hovertemplatesrc", + "hovertext", + "hovertextsrc", + "ids", + "idssrc", + "lat", + "latsrc", + "legend", + "legendgroup", + "legendgrouptitle", + "legendrank", + "legendwidth", + "line", + "locationmode", + "locations", + "locationssrc", + "lon", + "lonsrc", + "marker", + "meta", + "metasrc", + "mode", + "name", + "opacity", + "selected", + "selectedpoints", + "showlegend", + "stream", + "text", + "textfont", + "textposition", + "textpositionsrc", + "textsrc", + "texttemplate", + "texttemplatefallback", + "texttemplatesrc", + "type", + "uid", + "uirevision", + "unselected", + "visible", + } + + @property + def connectgaps(self): + """ + Determines whether or not gaps (i.e. {nan} or missing values) + in the provided data arrays are connected. + + The 'connectgaps' property is a boolean and must be specified as: + - A boolean value: True or False + + Returns + ------- + bool + """ + return self["connectgaps"] + + @connectgaps.setter + def connectgaps(self, val): + self["connectgaps"] = val + + @property + def customdata(self): + """ + Assigns extra data each datum. This may be useful when + listening to hover, click and selection events. Note that, + "scatter" traces also appends customdata items in the markers + DOM elements + + The 'customdata' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["customdata"] + + @customdata.setter + def customdata(self, val): + self["customdata"] = val + + @property + def customdatasrc(self): + """ + Sets the source reference on Chart Studio Cloud for + `customdata`. + + The 'customdatasrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["customdatasrc"] + + @customdatasrc.setter + def customdatasrc(self, val): + self["customdatasrc"] = val + + @property + def featureidkey(self): + """ + Sets the key in GeoJSON features which is used as id to match + the items included in the `locations` array. Only has an effect + when `geojson` is set. Support nested property, for example + "properties.name". + + The 'featureidkey' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["featureidkey"] + + @featureidkey.setter + def featureidkey(self, val): + self["featureidkey"] = val + + @property + def fill(self): + """ + Sets the area to fill with a solid color. Use with `fillcolor` + if not "none". "toself" connects the endpoints of the trace (or + each segment of the trace if it has gaps) into a closed shape. + + The 'fill' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['none', 'toself'] + + Returns + ------- + Any + """ + return self["fill"] + + @fill.setter + def fill(self, val): + self["fill"] = val + + @property + def fillcolor(self): + """ + Sets the fill color. Defaults to a half-transparent variant of + the line color, marker color, or marker line color, whichever + is available. + + The 'fillcolor' property is a color and may be specified as: + - A hex string (e.g. '#ff0000') + - An rgb/rgba string (e.g. 'rgb(255,0,0)') + - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') + - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') + - A named CSS color: see https://plotly.com/python/css-colors/ for a list + + Returns + ------- + str + """ + return self["fillcolor"] + + @fillcolor.setter + def fillcolor(self, val): + self["fillcolor"] = val + + @property + def geo(self): + """ + Sets a reference between this trace's geospatial coordinates + and a geographic map. If "geo" (the default value), the + geospatial coordinates refer to `layout.geo`. If "geo2", the + geospatial coordinates refer to `layout.geo2`, and so on. + + The 'geo' property is an identifier of a particular + subplot, of type 'geo', that may be specified as: + - the string 'geo' optionally followed by an integer >= 1 + (e.g. 'geo', 'geo1', 'geo2', 'geo3', etc.) + + Returns + ------- + str + """ + return self["geo"] + + @geo.setter + def geo(self, val): + self["geo"] = val + + @property + def geojson(self): + """ + Sets optional GeoJSON data associated with this trace. If not + given, the features on the base map are used when `locations` + is set. It can be set as a valid GeoJSON object or as a URL + string. Note that we only accept GeoJSONs of type + "FeatureCollection" or "Feature" with geometries of type + "Polygon" or "MultiPolygon". + + The 'geojson' property accepts values of any type + + Returns + ------- + Any + """ + return self["geojson"] + + @geojson.setter + def geojson(self, val): + self["geojson"] = val + + @property + def hoverinfo(self): + """ + Determines which trace information appear on hover. If `none` + or `skip` are set, no information is displayed upon hovering. + But, if `none` is set, click and hover events are still fired. + + The 'hoverinfo' property is a flaglist and may be specified + as a string containing: + - Any combination of ['lon', 'lat', 'location', 'text', 'name'] joined with '+' characters + (e.g. 'lon+lat') + OR exactly one of ['all', 'none', 'skip'] (e.g. 'skip') + - A list or array of the above + + Returns + ------- + Any|numpy.ndarray + """ + return self["hoverinfo"] + + @hoverinfo.setter + def hoverinfo(self, val): + self["hoverinfo"] = val + + @property + def hoverinfosrc(self): + """ + Sets the source reference on Chart Studio Cloud for + `hoverinfo`. + + The 'hoverinfosrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["hoverinfosrc"] + + @hoverinfosrc.setter + def hoverinfosrc(self, val): + self["hoverinfosrc"] = val + + @property + def hoverlabel(self): + """ + The 'hoverlabel' property is an instance of Hoverlabel + that may be specified as: + - An instance of :class:`plotly.graph_objs.scattergeo.Hoverlabel` + - A dict of string/value properties that will be passed + to the Hoverlabel constructor + + Returns + ------- + plotly.graph_objs.scattergeo.Hoverlabel + """ + return self["hoverlabel"] + + @hoverlabel.setter + def hoverlabel(self, val): + self["hoverlabel"] = val + + @property + def hovertemplate(self): + """ + Template string used for rendering the information that appear + on hover box. Note that this will override `hoverinfo`. + Variables are inserted using %{variable}, for example "y: %{y}" + as well as %{xother}, {%_xother}, {%_xother_}, {%xother_}. When + showing info for several points, "xother" will be added to + those with different x positions from the first point. An + underscore before or after "(x|y)other" will add a space on + that side, only when this field is shown. Numbers are formatted + using d3-format's syntax %{variable:d3-format}, for example + "Price: %{y:$.2f}". + https://github.com/d3/d3-format/tree/v1.4.5#d3-format for + details on the formatting syntax. Dates are formatted using + d3-time-format's syntax %{variable|d3-time-format}, for example + "Day: %{2019-01-01|%A}". https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format for details on the date + formatting syntax. Variables that can't be found will be + replaced with the specifier. For example, a template of "data: + %{x}, %{y}" will result in a value of "data: 1, %{y}" if x is 1 + and y is missing. Variables with an undefined value will be + replaced with the fallback value. The variables available in + `hovertemplate` are the ones emitted as event data described at + this link https://plotly.com/javascript/plotlyjs-events/#event- + data. Additionally, all attributes that can be specified per- + point (the ones that are `arrayOk: true`) are available. + Anything contained in tag `` is displayed in the + secondary box, for example `%{fullData.name}`. + To hide the secondary box completely, use an empty tag + ``. + + The 'hovertemplate' property is a string and must be specified as: + - A string + - A number that will be converted to a string + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["hovertemplate"] + + @hovertemplate.setter + def hovertemplate(self, val): + self["hovertemplate"] = val + + @property + def hovertemplatefallback(self): + """ + Fallback string that's displayed when a variable referenced in + a template is missing. If the boolean value 'false' is passed + in, the specifier with the missing variable will be displayed. + + The 'hovertemplatefallback' property accepts values of any type + + Returns + ------- + Any + """ + return self["hovertemplatefallback"] + + @hovertemplatefallback.setter + def hovertemplatefallback(self, val): + self["hovertemplatefallback"] = val + + @property + def hovertemplatesrc(self): + """ + Sets the source reference on Chart Studio Cloud for + `hovertemplate`. + + The 'hovertemplatesrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["hovertemplatesrc"] + + @hovertemplatesrc.setter + def hovertemplatesrc(self, val): + self["hovertemplatesrc"] = val + + @property + def hovertext(self): + """ + Sets hover text elements associated with each (lon,lat) pair or + item in `locations`. If a single string, the same string + appears over all the data points. If an array of string, the + items are mapped in order to the this trace's (lon,lat) or + `locations` coordinates. To be seen, trace `hoverinfo` must + contain a "text" flag. + + The 'hovertext' property is a string and must be specified as: + - A string + - A number that will be converted to a string + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["hovertext"] + + @hovertext.setter + def hovertext(self, val): + self["hovertext"] = val + + @property + def hovertextsrc(self): + """ + Sets the source reference on Chart Studio Cloud for + `hovertext`. + + The 'hovertextsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["hovertextsrc"] + + @hovertextsrc.setter + def hovertextsrc(self, val): + self["hovertextsrc"] = val + + @property + def ids(self): + """ + Assigns id labels to each datum. These ids for object constancy + of data points during animation. Should be an array of strings, + not numbers or any other type. + + The 'ids' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["ids"] + + @ids.setter + def ids(self, val): + self["ids"] = val + + @property + def idssrc(self): + """ + Sets the source reference on Chart Studio Cloud for `ids`. + + The 'idssrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["idssrc"] + + @idssrc.setter + def idssrc(self, val): + self["idssrc"] = val + + @property + def lat(self): + """ + Sets the latitude coordinates (in degrees North). + + The 'lat' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["lat"] + + @lat.setter + def lat(self, val): + self["lat"] = val + + @property + def latsrc(self): + """ + Sets the source reference on Chart Studio Cloud for `lat`. + + The 'latsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["latsrc"] + + @latsrc.setter + def latsrc(self, val): + self["latsrc"] = val + + @property + def legend(self): + """ + Sets the reference to a legend to show this trace in. + References to these legends are "legend", "legend2", "legend3", + etc. Settings for these legends are set in the layout, under + `layout.legend`, `layout.legend2`, etc. + + The 'legend' property is an identifier of a particular + subplot, of type 'legend', that may be specified as: + - the string 'legend' optionally followed by an integer >= 1 + (e.g. 'legend', 'legend1', 'legend2', 'legend3', etc.) + + Returns + ------- + str + """ + return self["legend"] + + @legend.setter + def legend(self, val): + self["legend"] = val + + @property + def legendgroup(self): + """ + Sets the legend group for this trace. Traces and shapes part of + the same legend group hide/show at the same time when toggling + legend items. + + The 'legendgroup' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["legendgroup"] + + @legendgroup.setter + def legendgroup(self, val): + self["legendgroup"] = val + + @property + def legendgrouptitle(self): + """ + The 'legendgrouptitle' property is an instance of Legendgrouptitle + that may be specified as: + - An instance of :class:`plotly.graph_objs.scattergeo.Legendgrouptitle` + - A dict of string/value properties that will be passed + to the Legendgrouptitle constructor + + Returns + ------- + plotly.graph_objs.scattergeo.Legendgrouptitle + """ + return self["legendgrouptitle"] + + @legendgrouptitle.setter + def legendgrouptitle(self, val): + self["legendgrouptitle"] = val + + @property + def legendrank(self): + """ + Sets the legend rank for this trace. Items and groups with + smaller ranks are presented on top/left side while with + "reversed" `legend.traceorder` they are on bottom/right side. + The default legendrank is 1000, so that you can use ranks less + than 1000 to place certain items before all unranked items, and + ranks greater than 1000 to go after all unranked items. When + having unranked or equal rank items shapes would be displayed + after traces i.e. according to their order in data and layout. + + The 'legendrank' property is a number and may be specified as: + - An int or float + + Returns + ------- + int|float + """ + return self["legendrank"] + + @legendrank.setter + def legendrank(self, val): + self["legendrank"] = val + + @property + def legendwidth(self): + """ + Sets the width (in px or fraction) of the legend for this + trace. + + The 'legendwidth' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["legendwidth"] + + @legendwidth.setter + def legendwidth(self, val): + self["legendwidth"] = val + + @property + def line(self): + """ + The 'line' property is an instance of Line + that may be specified as: + - An instance of :class:`plotly.graph_objs.scattergeo.Line` + - A dict of string/value properties that will be passed + to the Line constructor + + Returns + ------- + plotly.graph_objs.scattergeo.Line + """ + return self["line"] + + @line.setter + def line(self, val): + self["line"] = val + + @property + def locationmode(self): + """ + The library used by the *country names* `locationmode` option + is changing in an upcoming version. Country names in existing + plots may not work in the new version. Determines the set of + locations used to match entries in `locations` to regions on + the map. Values "ISO-3", "USA-states", *country names* + correspond to features on the base map and value "geojson-id" + corresponds to features from a custom GeoJSON linked to the + `geojson` attribute. + + The 'locationmode' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['ISO-3', 'USA-states', 'country names', 'geojson-id'] + + Returns + ------- + Any + """ + return self["locationmode"] + + @locationmode.setter + def locationmode(self, val): + self["locationmode"] = val + + @property + def locations(self): + """ + Sets the coordinates via location IDs or names. Coordinates + correspond to the centroid of each location given. See + `locationmode` for more info. + + The 'locations' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["locations"] + + @locations.setter + def locations(self, val): + self["locations"] = val + + @property + def locationssrc(self): + """ + Sets the source reference on Chart Studio Cloud for + `locations`. + + The 'locationssrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["locationssrc"] + + @locationssrc.setter + def locationssrc(self, val): + self["locationssrc"] = val + + @property + def lon(self): + """ + Sets the longitude coordinates (in degrees East). + + The 'lon' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["lon"] + + @lon.setter + def lon(self, val): + self["lon"] = val + + @property + def lonsrc(self): + """ + Sets the source reference on Chart Studio Cloud for `lon`. + + The 'lonsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["lonsrc"] + + @lonsrc.setter + def lonsrc(self, val): + self["lonsrc"] = val + + @property + def marker(self): + """ + The 'marker' property is an instance of Marker + that may be specified as: + - An instance of :class:`plotly.graph_objs.scattergeo.Marker` + - A dict of string/value properties that will be passed + to the Marker constructor + + Returns + ------- + plotly.graph_objs.scattergeo.Marker + """ + return self["marker"] + + @marker.setter + def marker(self, val): + self["marker"] = val + + @property + def meta(self): + """ + Assigns extra meta information associated with this trace that + can be used in various text attributes. Attributes such as + trace `name`, graph, axis and colorbar `title.text`, annotation + `text` `rangeselector`, `updatemenues` and `sliders` `label` + text all support `meta`. To access the trace `meta` values in + an attribute in the same trace, simply use `%{meta[i]}` where + `i` is the index or key of the `meta` item in question. To + access trace `meta` in layout attributes, use + `%{data[n[.meta[i]}` where `i` is the index or key of the + `meta` and `n` is the trace index. + + The 'meta' property accepts values of any type + + Returns + ------- + Any|numpy.ndarray + """ + return self["meta"] + + @meta.setter + def meta(self, val): + self["meta"] = val + + @property + def metasrc(self): + """ + Sets the source reference on Chart Studio Cloud for `meta`. + + The 'metasrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["metasrc"] + + @metasrc.setter + def metasrc(self, val): + self["metasrc"] = val + + @property + def mode(self): + """ + Determines the drawing mode for this scatter trace. If the + provided `mode` includes "text" then the `text` elements appear + at the coordinates. Otherwise, the `text` elements appear on + hover. If there are less than 20 points and the trace is not + stacked then the default is "lines+markers". Otherwise, + "lines". + + The 'mode' property is a flaglist and may be specified + as a string containing: + - Any combination of ['lines', 'markers', 'text'] joined with '+' characters + (e.g. 'lines+markers') + OR exactly one of ['none'] (e.g. 'none') + + Returns + ------- + Any + """ + return self["mode"] + + @mode.setter + def mode(self, val): + self["mode"] = val + + @property + def name(self): + """ + Sets the trace name. The trace name appears as the legend item + and on hover. + + The 'name' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["name"] + + @name.setter + def name(self, val): + self["name"] = val + + @property + def opacity(self): + """ + Sets the opacity of the trace. + + The 'opacity' property is a number and may be specified as: + - An int or float in the interval [0, 1] + + Returns + ------- + int|float + """ + return self["opacity"] + + @opacity.setter + def opacity(self, val): + self["opacity"] = val + + @property + def selected(self): + """ + The 'selected' property is an instance of Selected + that may be specified as: + - An instance of :class:`plotly.graph_objs.scattergeo.Selected` + - A dict of string/value properties that will be passed + to the Selected constructor + + Returns + ------- + plotly.graph_objs.scattergeo.Selected + """ + return self["selected"] + + @selected.setter + def selected(self, val): + self["selected"] = val + + @property + def selectedpoints(self): + """ + Array containing integer indices of selected points. Has an + effect only for traces that support selections. Note that an + empty array means an empty selection where the `unselected` are + turned on for all points, whereas, any other non-array values + means no selection all where the `selected` and `unselected` + styles have no effect. + + The 'selectedpoints' property accepts values of any type + + Returns + ------- + Any + """ + return self["selectedpoints"] + + @selectedpoints.setter + def selectedpoints(self, val): + self["selectedpoints"] = val + + @property + def showlegend(self): + """ + Determines whether or not an item corresponding to this trace + is shown in the legend. + + The 'showlegend' property is a boolean and must be specified as: + - A boolean value: True or False + + Returns + ------- + bool + """ + return self["showlegend"] + + @showlegend.setter + def showlegend(self, val): + self["showlegend"] = val + + @property + def stream(self): + """ + The 'stream' property is an instance of Stream + that may be specified as: + - An instance of :class:`plotly.graph_objs.scattergeo.Stream` + - A dict of string/value properties that will be passed + to the Stream constructor + + Returns + ------- + plotly.graph_objs.scattergeo.Stream + """ + return self["stream"] + + @stream.setter + def stream(self, val): + self["stream"] = val + + @property + def text(self): + """ + Sets text elements associated with each (lon,lat) pair or item + in `locations`. If a single string, the same string appears + over all the data points. If an array of string, the items are + mapped in order to the this trace's (lon,lat) or `locations` + coordinates. If trace `hoverinfo` contains a "text" flag and + "hovertext" is not set, these elements will be seen in the + hover labels. + + The 'text' property is a string and must be specified as: + - A string + - A number that will be converted to a string + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["text"] + + @text.setter + def text(self, val): + self["text"] = val + + @property + def textfont(self): + """ + Sets the text font. + + The 'textfont' property is an instance of Textfont + that may be specified as: + - An instance of :class:`plotly.graph_objs.scattergeo.Textfont` + - A dict of string/value properties that will be passed + to the Textfont constructor + + Returns + ------- + plotly.graph_objs.scattergeo.Textfont + """ + return self["textfont"] + + @textfont.setter + def textfont(self, val): + self["textfont"] = val + + @property + def textposition(self): + """ + Sets the positions of the `text` elements with respects to the + (x,y) coordinates. + + The 'textposition' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['top left', 'top center', 'top right', 'middle left', + 'middle center', 'middle right', 'bottom left', 'bottom + center', 'bottom right'] + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + Any|numpy.ndarray + """ + return self["textposition"] + + @textposition.setter + def textposition(self, val): + self["textposition"] = val + + @property + def textpositionsrc(self): + """ + Sets the source reference on Chart Studio Cloud for + `textposition`. + + The 'textpositionsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["textpositionsrc"] + + @textpositionsrc.setter + def textpositionsrc(self, val): + self["textpositionsrc"] = val + + @property + def textsrc(self): + """ + Sets the source reference on Chart Studio Cloud for `text`. + + The 'textsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["textsrc"] + + @textsrc.setter + def textsrc(self, val): + self["textsrc"] = val + + @property + def texttemplate(self): + """ + Template string used for rendering the information text that + appears on points. Note that this will override `textinfo`. + Variables are inserted using %{variable}, for example "y: + %{y}". Numbers are formatted using d3-format's syntax + %{variable:d3-format}, for example "Price: %{y:$.2f}". + https://github.com/d3/d3-format/tree/v1.4.5#d3-format for + details on the formatting syntax. Dates are formatted using + d3-time-format's syntax %{variable|d3-time-format}, for example + "Day: %{2019-01-01|%A}". https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format for details on the date + formatting syntax. Variables that can't be found will be + replaced with the specifier. For example, a template of "data: + %{x}, %{y}" will result in a value of "data: 1, %{y}" if x is 1 + and y is missing. Variables with an undefined value will be + replaced with the fallback value. All attributes that can be + specified per-point (the ones that are `arrayOk: true`) are + available. Finally, the template string has access to variables + `lat`, `lon`, `location` and `text`. + + The 'texttemplate' property is a string and must be specified as: + - A string + - A number that will be converted to a string + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["texttemplate"] + + @texttemplate.setter + def texttemplate(self, val): + self["texttemplate"] = val + + @property + def texttemplatefallback(self): + """ + Fallback string that's displayed when a variable referenced in + a template is missing. If the boolean value 'false' is passed + in, the specifier with the missing variable will be displayed. + + The 'texttemplatefallback' property accepts values of any type + + Returns + ------- + Any + """ + return self["texttemplatefallback"] + + @texttemplatefallback.setter + def texttemplatefallback(self, val): + self["texttemplatefallback"] = val + + @property + def texttemplatesrc(self): + """ + Sets the source reference on Chart Studio Cloud for + `texttemplate`. + + The 'texttemplatesrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["texttemplatesrc"] + + @texttemplatesrc.setter + def texttemplatesrc(self, val): + self["texttemplatesrc"] = val + + @property + def uid(self): + """ + Assign an id to this trace, Use this to provide object + constancy between traces during animations and transitions. + + The 'uid' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["uid"] + + @uid.setter + def uid(self, val): + self["uid"] = val + + @property + def uirevision(self): + """ + Controls persistence of some user-driven changes to the trace: + `constraintrange` in `parcoords` traces, as well as some + `editable: true` modifications such as `name` and + `colorbar.title`. Defaults to `layout.uirevision`. Note that + other user-driven trace attribute changes are controlled by + `layout` attributes: `trace.visible` is controlled by + `layout.legend.uirevision`, `selectedpoints` is controlled by + `layout.selectionrevision`, and `colorbar.(x|y)` (accessible + with `config: {editable: true}`) is controlled by + `layout.editrevision`. Trace changes are tracked by `uid`, + which only falls back on trace index if no `uid` is provided. + So if your app can add/remove traces before the end of the + `data` array, such that the same trace has a different index, + you can still preserve user-driven changes if you give each + trace a `uid` that stays with it as it moves. + + The 'uirevision' property accepts values of any type + + Returns + ------- + Any + """ + return self["uirevision"] + + @uirevision.setter + def uirevision(self, val): + self["uirevision"] = val + + @property + def unselected(self): + """ + The 'unselected' property is an instance of Unselected + that may be specified as: + - An instance of :class:`plotly.graph_objs.scattergeo.Unselected` + - A dict of string/value properties that will be passed + to the Unselected constructor + + Returns + ------- + plotly.graph_objs.scattergeo.Unselected + """ + return self["unselected"] + + @unselected.setter + def unselected(self, val): + self["unselected"] = val + + @property + def visible(self): + """ + Determines whether or not this trace is visible. If + "legendonly", the trace is not drawn, but can appear as a + legend item (provided that the legend itself is visible). + + The 'visible' property is an enumeration that may be specified as: + - One of the following enumeration values: + [True, False, 'legendonly'] + + Returns + ------- + Any + """ + return self["visible"] + + @visible.setter + def visible(self, val): + self["visible"] = val + + @property + def type(self): + return self._props["type"] + + @property + def _prop_descriptions(self): + return """\ + connectgaps + Determines whether or not gaps (i.e. {nan} or missing + values) in the provided data arrays are connected. + customdata + Assigns extra data each datum. This may be useful when + listening to hover, click and selection events. Note + that, "scatter" traces also appends customdata items in + the markers DOM elements + customdatasrc + Sets the source reference on Chart Studio Cloud for + `customdata`. + featureidkey + Sets the key in GeoJSON features which is used as id to + match the items included in the `locations` array. Only + has an effect when `geojson` is set. Support nested + property, for example "properties.name". + fill + Sets the area to fill with a solid color. Use with + `fillcolor` if not "none". "toself" connects the + endpoints of the trace (or each segment of the trace if + it has gaps) into a closed shape. + fillcolor + Sets the fill color. Defaults to a half-transparent + variant of the line color, marker color, or marker line + color, whichever is available. + geo + Sets a reference between this trace's geospatial + coordinates and a geographic map. If "geo" (the default + value), the geospatial coordinates refer to + `layout.geo`. If "geo2", the geospatial coordinates + refer to `layout.geo2`, and so on. + geojson + Sets optional GeoJSON data associated with this trace. + If not given, the features on the base map are used + when `locations` is set. It can be set as a valid + GeoJSON object or as a URL string. Note that we only + accept GeoJSONs of type "FeatureCollection" or + "Feature" with geometries of type "Polygon" or + "MultiPolygon". + hoverinfo + Determines which trace information appear on hover. If + `none` or `skip` are set, no information is displayed + upon hovering. But, if `none` is set, click and hover + events are still fired. + hoverinfosrc + Sets the source reference on Chart Studio Cloud for + `hoverinfo`. + hoverlabel + :class:`plotly.graph_objects.scattergeo.Hoverlabel` + instance or dict with compatible properties + hovertemplate + Template string used for rendering the information that + appear on hover box. Note that this will override + `hoverinfo`. Variables are inserted using %{variable}, + for example "y: %{y}" as well as %{xother}, {%_xother}, + {%_xother_}, {%xother_}. When showing info for several + points, "xother" will be added to those with different + x positions from the first point. An underscore before + or after "(x|y)other" will add a space on that side, + only when this field is shown. Numbers are formatted + using d3-format's syntax %{variable:d3-format}, for + example "Price: %{y:$.2f}". + https://github.com/d3/d3-format/tree/v1.4.5#d3-format + for details on the formatting syntax. Dates are + formatted using d3-time-format's syntax + %{variable|d3-time-format}, for example "Day: + %{2019-01-01|%A}". https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format for details on the + date formatting syntax. Variables that can't be found + will be replaced with the specifier. For example, a + template of "data: %{x}, %{y}" will result in a value + of "data: 1, %{y}" if x is 1 and y is missing. + Variables with an undefined value will be replaced with + the fallback value. The variables available in + `hovertemplate` are the ones emitted as event data + described at this link + https://plotly.com/javascript/plotlyjs-events/#event- + data. Additionally, all attributes that can be + specified per-point (the ones that are `arrayOk: true`) + are available. Anything contained in tag `` is + displayed in the secondary box, for example + `%{fullData.name}`. To hide the + secondary box completely, use an empty tag + ``. + hovertemplatefallback + Fallback string that's displayed when a variable + referenced in a template is missing. If the boolean + value 'false' is passed in, the specifier with the + missing variable will be displayed. + hovertemplatesrc + Sets the source reference on Chart Studio Cloud for + `hovertemplate`. + hovertext + Sets hover text elements associated with each (lon,lat) + pair or item in `locations`. If a single string, the + same string appears over all the data points. If an + array of string, the items are mapped in order to the + this trace's (lon,lat) or `locations` coordinates. To + be seen, trace `hoverinfo` must contain a "text" flag. + hovertextsrc + Sets the source reference on Chart Studio Cloud for + `hovertext`. + ids + Assigns id labels to each datum. These ids for object + constancy of data points during animation. Should be an + array of strings, not numbers or any other type. + idssrc + Sets the source reference on Chart Studio Cloud for + `ids`. + lat + Sets the latitude coordinates (in degrees North). + latsrc + Sets the source reference on Chart Studio Cloud for + `lat`. + legend + Sets the reference to a legend to show this trace in. + References to these legends are "legend", "legend2", + "legend3", etc. Settings for these legends are set in + the layout, under `layout.legend`, `layout.legend2`, + etc. + legendgroup + Sets the legend group for this trace. Traces and shapes + part of the same legend group hide/show at the same + time when toggling legend items. + legendgrouptitle + :class:`plotly.graph_objects.scattergeo.Legendgrouptitl + e` instance or dict with compatible properties + legendrank + Sets the legend rank for this trace. Items and groups + with smaller ranks are presented on top/left side while + with "reversed" `legend.traceorder` they are on + bottom/right side. The default legendrank is 1000, so + that you can use ranks less than 1000 to place certain + items before all unranked items, and ranks greater than + 1000 to go after all unranked items. When having + unranked or equal rank items shapes would be displayed + after traces i.e. according to their order in data and + layout. + legendwidth + Sets the width (in px or fraction) of the legend for + this trace. + line + :class:`plotly.graph_objects.scattergeo.Line` instance + or dict with compatible properties + locationmode + The library used by the *country names* `locationmode` + option is changing in an upcoming version. Country + names in existing plots may not work in the new + version. Determines the set of locations used to match + entries in `locations` to regions on the map. Values + "ISO-3", "USA-states", *country names* correspond to + features on the base map and value "geojson-id" + corresponds to features from a custom GeoJSON linked to + the `geojson` attribute. + locations + Sets the coordinates via location IDs or names. + Coordinates correspond to the centroid of each location + given. See `locationmode` for more info. + locationssrc + Sets the source reference on Chart Studio Cloud for + `locations`. + lon + Sets the longitude coordinates (in degrees East). + lonsrc + Sets the source reference on Chart Studio Cloud for + `lon`. + marker + :class:`plotly.graph_objects.scattergeo.Marker` + instance or dict with compatible properties + meta + Assigns extra meta information associated with this + trace that can be used in various text attributes. + Attributes such as trace `name`, graph, axis and + colorbar `title.text`, annotation `text` + `rangeselector`, `updatemenues` and `sliders` `label` + text all support `meta`. To access the trace `meta` + values in an attribute in the same trace, simply use + `%{meta[i]}` where `i` is the index or key of the + `meta` item in question. To access trace `meta` in + layout attributes, use `%{data[n[.meta[i]}` where `i` + is the index or key of the `meta` and `n` is the trace + index. + metasrc + Sets the source reference on Chart Studio Cloud for + `meta`. + mode + Determines the drawing mode for this scatter trace. If + the provided `mode` includes "text" then the `text` + elements appear at the coordinates. Otherwise, the + `text` elements appear on hover. If there are less than + 20 points and the trace is not stacked then the default + is "lines+markers". Otherwise, "lines". + name + Sets the trace name. The trace name appears as the + legend item and on hover. + opacity + Sets the opacity of the trace. + selected + :class:`plotly.graph_objects.scattergeo.Selected` + instance or dict with compatible properties + selectedpoints + Array containing integer indices of selected points. + Has an effect only for traces that support selections. + Note that an empty array means an empty selection where + the `unselected` are turned on for all points, whereas, + any other non-array values means no selection all where + the `selected` and `unselected` styles have no effect. + showlegend + Determines whether or not an item corresponding to this + trace is shown in the legend. + stream + :class:`plotly.graph_objects.scattergeo.Stream` + instance or dict with compatible properties + text + Sets text elements associated with each (lon,lat) pair + or item in `locations`. If a single string, the same + string appears over all the data points. If an array of + string, the items are mapped in order to the this + trace's (lon,lat) or `locations` coordinates. If trace + `hoverinfo` contains a "text" flag and "hovertext" is + not set, these elements will be seen in the hover + labels. + textfont + Sets the text font. + textposition + Sets the positions of the `text` elements with respects + to the (x,y) coordinates. + textpositionsrc + Sets the source reference on Chart Studio Cloud for + `textposition`. + textsrc + Sets the source reference on Chart Studio Cloud for + `text`. + texttemplate + Template string used for rendering the information text + that appears on points. Note that this will override + `textinfo`. Variables are inserted using %{variable}, + for example "y: %{y}". Numbers are formatted using + d3-format's syntax %{variable:d3-format}, for example + "Price: %{y:$.2f}". + https://github.com/d3/d3-format/tree/v1.4.5#d3-format + for details on the formatting syntax. Dates are + formatted using d3-time-format's syntax + %{variable|d3-time-format}, for example "Day: + %{2019-01-01|%A}". https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format for details on the + date formatting syntax. Variables that can't be found + will be replaced with the specifier. For example, a + template of "data: %{x}, %{y}" will result in a value + of "data: 1, %{y}" if x is 1 and y is missing. + Variables with an undefined value will be replaced with + the fallback value. All attributes that can be + specified per-point (the ones that are `arrayOk: true`) + are available. Finally, the template string has access + to variables `lat`, `lon`, `location` and `text`. + texttemplatefallback + Fallback string that's displayed when a variable + referenced in a template is missing. If the boolean + value 'false' is passed in, the specifier with the + missing variable will be displayed. + texttemplatesrc + Sets the source reference on Chart Studio Cloud for + `texttemplate`. + uid + Assign an id to this trace, Use this to provide object + constancy between traces during animations and + transitions. + uirevision + Controls persistence of some user-driven changes to the + trace: `constraintrange` in `parcoords` traces, as well + as some `editable: true` modifications such as `name` + and `colorbar.title`. Defaults to `layout.uirevision`. + Note that other user-driven trace attribute changes are + controlled by `layout` attributes: `trace.visible` is + controlled by `layout.legend.uirevision`, + `selectedpoints` is controlled by + `layout.selectionrevision`, and `colorbar.(x|y)` + (accessible with `config: {editable: true}`) is + controlled by `layout.editrevision`. Trace changes are + tracked by `uid`, which only falls back on trace index + if no `uid` is provided. So if your app can add/remove + traces before the end of the `data` array, such that + the same trace has a different index, you can still + preserve user-driven changes if you give each trace a + `uid` that stays with it as it moves. + unselected + :class:`plotly.graph_objects.scattergeo.Unselected` + instance or dict with compatible properties + visible + Determines whether or not this trace is visible. If + "legendonly", the trace is not drawn, but can appear as + a legend item (provided that the legend itself is + visible). + """ + + def __init__( + self, + arg=None, + connectgaps=None, + customdata=None, + customdatasrc=None, + featureidkey=None, + fill=None, + fillcolor=None, + geo=None, + geojson=None, + hoverinfo=None, + hoverinfosrc=None, + hoverlabel=None, + hovertemplate=None, + hovertemplatefallback=None, + hovertemplatesrc=None, + hovertext=None, + hovertextsrc=None, + ids=None, + idssrc=None, + lat=None, + latsrc=None, + legend=None, + legendgroup=None, + legendgrouptitle=None, + legendrank=None, + legendwidth=None, + line=None, + locationmode=None, + locations=None, + locationssrc=None, + lon=None, + lonsrc=None, + marker=None, + meta=None, + metasrc=None, + mode=None, + name=None, + opacity=None, + selected=None, + selectedpoints=None, + showlegend=None, + stream=None, + text=None, + textfont=None, + textposition=None, + textpositionsrc=None, + textsrc=None, + texttemplate=None, + texttemplatefallback=None, + texttemplatesrc=None, + uid=None, + uirevision=None, + unselected=None, + visible=None, + **kwargs, + ): + """ + Construct a new Scattergeo object + + The data visualized as scatter point or lines on a geographic + map is provided either by longitude/latitude pairs in `lon` and + `lat` respectively or by geographic location IDs or names in + `locations`. + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of :class:`plotly.graph_objs.Scattergeo` + connectgaps + Determines whether or not gaps (i.e. {nan} or missing + values) in the provided data arrays are connected. + customdata + Assigns extra data each datum. This may be useful when + listening to hover, click and selection events. Note + that, "scatter" traces also appends customdata items in + the markers DOM elements + customdatasrc + Sets the source reference on Chart Studio Cloud for + `customdata`. + featureidkey + Sets the key in GeoJSON features which is used as id to + match the items included in the `locations` array. Only + has an effect when `geojson` is set. Support nested + property, for example "properties.name". + fill + Sets the area to fill with a solid color. Use with + `fillcolor` if not "none". "toself" connects the + endpoints of the trace (or each segment of the trace if + it has gaps) into a closed shape. + fillcolor + Sets the fill color. Defaults to a half-transparent + variant of the line color, marker color, or marker line + color, whichever is available. + geo + Sets a reference between this trace's geospatial + coordinates and a geographic map. If "geo" (the default + value), the geospatial coordinates refer to + `layout.geo`. If "geo2", the geospatial coordinates + refer to `layout.geo2`, and so on. + geojson + Sets optional GeoJSON data associated with this trace. + If not given, the features on the base map are used + when `locations` is set. It can be set as a valid + GeoJSON object or as a URL string. Note that we only + accept GeoJSONs of type "FeatureCollection" or + "Feature" with geometries of type "Polygon" or + "MultiPolygon". + hoverinfo + Determines which trace information appear on hover. If + `none` or `skip` are set, no information is displayed + upon hovering. But, if `none` is set, click and hover + events are still fired. + hoverinfosrc + Sets the source reference on Chart Studio Cloud for + `hoverinfo`. + hoverlabel + :class:`plotly.graph_objects.scattergeo.Hoverlabel` + instance or dict with compatible properties + hovertemplate + Template string used for rendering the information that + appear on hover box. Note that this will override + `hoverinfo`. Variables are inserted using %{variable}, + for example "y: %{y}" as well as %{xother}, {%_xother}, + {%_xother_}, {%xother_}. When showing info for several + points, "xother" will be added to those with different + x positions from the first point. An underscore before + or after "(x|y)other" will add a space on that side, + only when this field is shown. Numbers are formatted + using d3-format's syntax %{variable:d3-format}, for + example "Price: %{y:$.2f}". + https://github.com/d3/d3-format/tree/v1.4.5#d3-format + for details on the formatting syntax. Dates are + formatted using d3-time-format's syntax + %{variable|d3-time-format}, for example "Day: + %{2019-01-01|%A}". https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format for details on the + date formatting syntax. Variables that can't be found + will be replaced with the specifier. For example, a + template of "data: %{x}, %{y}" will result in a value + of "data: 1, %{y}" if x is 1 and y is missing. + Variables with an undefined value will be replaced with + the fallback value. The variables available in + `hovertemplate` are the ones emitted as event data + described at this link + https://plotly.com/javascript/plotlyjs-events/#event- + data. Additionally, all attributes that can be + specified per-point (the ones that are `arrayOk: true`) + are available. Anything contained in tag `` is + displayed in the secondary box, for example + `%{fullData.name}`. To hide the + secondary box completely, use an empty tag + ``. + hovertemplatefallback + Fallback string that's displayed when a variable + referenced in a template is missing. If the boolean + value 'false' is passed in, the specifier with the + missing variable will be displayed. + hovertemplatesrc + Sets the source reference on Chart Studio Cloud for + `hovertemplate`. + hovertext + Sets hover text elements associated with each (lon,lat) + pair or item in `locations`. If a single string, the + same string appears over all the data points. If an + array of string, the items are mapped in order to the + this trace's (lon,lat) or `locations` coordinates. To + be seen, trace `hoverinfo` must contain a "text" flag. + hovertextsrc + Sets the source reference on Chart Studio Cloud for + `hovertext`. + ids + Assigns id labels to each datum. These ids for object + constancy of data points during animation. Should be an + array of strings, not numbers or any other type. + idssrc + Sets the source reference on Chart Studio Cloud for + `ids`. + lat + Sets the latitude coordinates (in degrees North). + latsrc + Sets the source reference on Chart Studio Cloud for + `lat`. + legend + Sets the reference to a legend to show this trace in. + References to these legends are "legend", "legend2", + "legend3", etc. Settings for these legends are set in + the layout, under `layout.legend`, `layout.legend2`, + etc. + legendgroup + Sets the legend group for this trace. Traces and shapes + part of the same legend group hide/show at the same + time when toggling legend items. + legendgrouptitle + :class:`plotly.graph_objects.scattergeo.Legendgrouptitl + e` instance or dict with compatible properties + legendrank + Sets the legend rank for this trace. Items and groups + with smaller ranks are presented on top/left side while + with "reversed" `legend.traceorder` they are on + bottom/right side. The default legendrank is 1000, so + that you can use ranks less than 1000 to place certain + items before all unranked items, and ranks greater than + 1000 to go after all unranked items. When having + unranked or equal rank items shapes would be displayed + after traces i.e. according to their order in data and + layout. + legendwidth + Sets the width (in px or fraction) of the legend for + this trace. + line + :class:`plotly.graph_objects.scattergeo.Line` instance + or dict with compatible properties + locationmode + The library used by the *country names* `locationmode` + option is changing in an upcoming version. Country + names in existing plots may not work in the new + version. Determines the set of locations used to match + entries in `locations` to regions on the map. Values + "ISO-3", "USA-states", *country names* correspond to + features on the base map and value "geojson-id" + corresponds to features from a custom GeoJSON linked to + the `geojson` attribute. + locations + Sets the coordinates via location IDs or names. + Coordinates correspond to the centroid of each location + given. See `locationmode` for more info. + locationssrc + Sets the source reference on Chart Studio Cloud for + `locations`. + lon + Sets the longitude coordinates (in degrees East). + lonsrc + Sets the source reference on Chart Studio Cloud for + `lon`. + marker + :class:`plotly.graph_objects.scattergeo.Marker` + instance or dict with compatible properties + meta + Assigns extra meta information associated with this + trace that can be used in various text attributes. + Attributes such as trace `name`, graph, axis and + colorbar `title.text`, annotation `text` + `rangeselector`, `updatemenues` and `sliders` `label` + text all support `meta`. To access the trace `meta` + values in an attribute in the same trace, simply use + `%{meta[i]}` where `i` is the index or key of the + `meta` item in question. To access trace `meta` in + layout attributes, use `%{data[n[.meta[i]}` where `i` + is the index or key of the `meta` and `n` is the trace + index. + metasrc + Sets the source reference on Chart Studio Cloud for + `meta`. + mode + Determines the drawing mode for this scatter trace. If + the provided `mode` includes "text" then the `text` + elements appear at the coordinates. Otherwise, the + `text` elements appear on hover. If there are less than + 20 points and the trace is not stacked then the default + is "lines+markers". Otherwise, "lines". + name + Sets the trace name. The trace name appears as the + legend item and on hover. + opacity + Sets the opacity of the trace. + selected + :class:`plotly.graph_objects.scattergeo.Selected` + instance or dict with compatible properties + selectedpoints + Array containing integer indices of selected points. + Has an effect only for traces that support selections. + Note that an empty array means an empty selection where + the `unselected` are turned on for all points, whereas, + any other non-array values means no selection all where + the `selected` and `unselected` styles have no effect. + showlegend + Determines whether or not an item corresponding to this + trace is shown in the legend. + stream + :class:`plotly.graph_objects.scattergeo.Stream` + instance or dict with compatible properties + text + Sets text elements associated with each (lon,lat) pair + or item in `locations`. If a single string, the same + string appears over all the data points. If an array of + string, the items are mapped in order to the this + trace's (lon,lat) or `locations` coordinates. If trace + `hoverinfo` contains a "text" flag and "hovertext" is + not set, these elements will be seen in the hover + labels. + textfont + Sets the text font. + textposition + Sets the positions of the `text` elements with respects + to the (x,y) coordinates. + textpositionsrc + Sets the source reference on Chart Studio Cloud for + `textposition`. + textsrc + Sets the source reference on Chart Studio Cloud for + `text`. + texttemplate + Template string used for rendering the information text + that appears on points. Note that this will override + `textinfo`. Variables are inserted using %{variable}, + for example "y: %{y}". Numbers are formatted using + d3-format's syntax %{variable:d3-format}, for example + "Price: %{y:$.2f}". + https://github.com/d3/d3-format/tree/v1.4.5#d3-format + for details on the formatting syntax. Dates are + formatted using d3-time-format's syntax + %{variable|d3-time-format}, for example "Day: + %{2019-01-01|%A}". https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format for details on the + date formatting syntax. Variables that can't be found + will be replaced with the specifier. For example, a + template of "data: %{x}, %{y}" will result in a value + of "data: 1, %{y}" if x is 1 and y is missing. + Variables with an undefined value will be replaced with + the fallback value. All attributes that can be + specified per-point (the ones that are `arrayOk: true`) + are available. Finally, the template string has access + to variables `lat`, `lon`, `location` and `text`. + texttemplatefallback + Fallback string that's displayed when a variable + referenced in a template is missing. If the boolean + value 'false' is passed in, the specifier with the + missing variable will be displayed. + texttemplatesrc + Sets the source reference on Chart Studio Cloud for + `texttemplate`. + uid + Assign an id to this trace, Use this to provide object + constancy between traces during animations and + transitions. + uirevision + Controls persistence of some user-driven changes to the + trace: `constraintrange` in `parcoords` traces, as well + as some `editable: true` modifications such as `name` + and `colorbar.title`. Defaults to `layout.uirevision`. + Note that other user-driven trace attribute changes are + controlled by `layout` attributes: `trace.visible` is + controlled by `layout.legend.uirevision`, + `selectedpoints` is controlled by + `layout.selectionrevision`, and `colorbar.(x|y)` + (accessible with `config: {editable: true}`) is + controlled by `layout.editrevision`. Trace changes are + tracked by `uid`, which only falls back on trace index + if no `uid` is provided. So if your app can add/remove + traces before the end of the `data` array, such that + the same trace has a different index, you can still + preserve user-driven changes if you give each trace a + `uid` that stays with it as it moves. + unselected + :class:`plotly.graph_objects.scattergeo.Unselected` + instance or dict with compatible properties + visible + Determines whether or not this trace is visible. If + "legendonly", the trace is not drawn, but can appear as + a legend item (provided that the legend itself is + visible). + + Returns + ------- + Scattergeo + """ + super().__init__("scattergeo") + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + if arg is None: + arg = {} + elif isinstance(arg, self.__class__): + arg = arg.to_plotly_json() + elif isinstance(arg, dict): + arg = _copy.copy(arg) + else: + raise ValueError("""\ +The first argument to the plotly.graph_objs.Scattergeo +constructor must be a dict or +an instance of :class:`plotly.graph_objs.Scattergeo`""") + + if locationmode == "country names" and kwargs.get("_validate"): + warnings.warn( + "The library used by the *country names* `locationmode` option is changing in an upcoming version. " + "Country names in existing plots may not work in the new version. " + "To ensure consistent behavior, consider setting `locationmode` to *ISO-3*.", + DeprecationWarning, + stacklevel=5, + ) + + self._skip_invalid = kwargs.pop("skip_invalid", False) + self._validate = kwargs.pop("_validate", True) + + self._set_property("connectgaps", arg, connectgaps) + self._set_property("customdata", arg, customdata) + self._set_property("customdatasrc", arg, customdatasrc) + self._set_property("featureidkey", arg, featureidkey) + self._set_property("fill", arg, fill) + self._set_property("fillcolor", arg, fillcolor) + self._set_property("geo", arg, geo) + self._set_property("geojson", arg, geojson) + self._set_property("hoverinfo", arg, hoverinfo) + self._set_property("hoverinfosrc", arg, hoverinfosrc) + self._set_property("hoverlabel", arg, hoverlabel) + self._set_property("hovertemplate", arg, hovertemplate) + self._set_property("hovertemplatefallback", arg, hovertemplatefallback) + self._set_property("hovertemplatesrc", arg, hovertemplatesrc) + self._set_property("hovertext", arg, hovertext) + self._set_property("hovertextsrc", arg, hovertextsrc) + self._set_property("ids", arg, ids) + self._set_property("idssrc", arg, idssrc) + self._set_property("lat", arg, lat) + self._set_property("latsrc", arg, latsrc) + self._set_property("legend", arg, legend) + self._set_property("legendgroup", arg, legendgroup) + self._set_property("legendgrouptitle", arg, legendgrouptitle) + self._set_property("legendrank", arg, legendrank) + self._set_property("legendwidth", arg, legendwidth) + self._set_property("line", arg, line) + self._set_property("locationmode", arg, locationmode) + self._set_property("locations", arg, locations) + self._set_property("locationssrc", arg, locationssrc) + self._set_property("lon", arg, lon) + self._set_property("lonsrc", arg, lonsrc) + self._set_property("marker", arg, marker) + self._set_property("meta", arg, meta) + self._set_property("metasrc", arg, metasrc) + self._set_property("mode", arg, mode) + self._set_property("name", arg, name) + self._set_property("opacity", arg, opacity) + self._set_property("selected", arg, selected) + self._set_property("selectedpoints", arg, selectedpoints) + self._set_property("showlegend", arg, showlegend) + self._set_property("stream", arg, stream) + self._set_property("text", arg, text) + self._set_property("textfont", arg, textfont) + self._set_property("textposition", arg, textposition) + self._set_property("textpositionsrc", arg, textpositionsrc) + self._set_property("textsrc", arg, textsrc) + self._set_property("texttemplate", arg, texttemplate) + self._set_property("texttemplatefallback", arg, texttemplatefallback) + self._set_property("texttemplatesrc", arg, texttemplatesrc) + self._set_property("uid", arg, uid) + self._set_property("uirevision", arg, uirevision) + self._set_property("unselected", arg, unselected) + self._set_property("visible", arg, visible) + + self._props["type"] = "scattergeo" + arg.pop("type", None) + self._process_kwargs(**dict(arg, **kwargs)) + self._skip_invalid = False diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/_scattergl.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/_scattergl.py new file mode 100644 index 0000000000000000000000000000000000000000..e2054bc71ca7b51d94482acbc1ac56ec82ea9b74 --- /dev/null +++ b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/_scattergl.py @@ -0,0 +1,2383 @@ +# --- THIS FILE IS AUTO-GENERATED --- +# Modifications will be overwitten the next time code generation run. + +from plotly.basedatatypes import BaseTraceType as _BaseTraceType +import copy as _copy + + +class Scattergl(_BaseTraceType): + _parent_path_str = "" + _path_str = "scattergl" + _valid_props = { + "connectgaps", + "customdata", + "customdatasrc", + "dx", + "dy", + "error_x", + "error_y", + "fill", + "fillcolor", + "hoverinfo", + "hoverinfosrc", + "hoverlabel", + "hovertemplate", + "hovertemplatefallback", + "hovertemplatesrc", + "hovertext", + "hovertextsrc", + "ids", + "idssrc", + "legend", + "legendgroup", + "legendgrouptitle", + "legendrank", + "legendwidth", + "line", + "marker", + "meta", + "metasrc", + "mode", + "name", + "opacity", + "selected", + "selectedpoints", + "showlegend", + "stream", + "text", + "textfont", + "textposition", + "textpositionsrc", + "textsrc", + "texttemplate", + "texttemplatefallback", + "texttemplatesrc", + "type", + "uid", + "uirevision", + "unselected", + "visible", + "x", + "x0", + "xaxis", + "xcalendar", + "xhoverformat", + "xperiod", + "xperiod0", + "xperiodalignment", + "xsrc", + "y", + "y0", + "yaxis", + "ycalendar", + "yhoverformat", + "yperiod", + "yperiod0", + "yperiodalignment", + "ysrc", + } + + @property + def connectgaps(self): + """ + Determines whether or not gaps (i.e. {nan} or missing values) + in the provided data arrays are connected. + + The 'connectgaps' property is a boolean and must be specified as: + - A boolean value: True or False + + Returns + ------- + bool + """ + return self["connectgaps"] + + @connectgaps.setter + def connectgaps(self, val): + self["connectgaps"] = val + + @property + def customdata(self): + """ + Assigns extra data each datum. This may be useful when + listening to hover, click and selection events. Note that, + "scatter" traces also appends customdata items in the markers + DOM elements + + The 'customdata' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["customdata"] + + @customdata.setter + def customdata(self, val): + self["customdata"] = val + + @property + def customdatasrc(self): + """ + Sets the source reference on Chart Studio Cloud for + `customdata`. + + The 'customdatasrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["customdatasrc"] + + @customdatasrc.setter + def customdatasrc(self, val): + self["customdatasrc"] = val + + @property + def dx(self): + """ + Sets the x coordinate step. See `x0` for more info. + + The 'dx' property is a number and may be specified as: + - An int or float + + Returns + ------- + int|float + """ + return self["dx"] + + @dx.setter + def dx(self, val): + self["dx"] = val + + @property + def dy(self): + """ + Sets the y coordinate step. See `y0` for more info. + + The 'dy' property is a number and may be specified as: + - An int or float + + Returns + ------- + int|float + """ + return self["dy"] + + @dy.setter + def dy(self, val): + self["dy"] = val + + @property + def error_x(self): + """ + The 'error_x' property is an instance of ErrorX + that may be specified as: + - An instance of :class:`plotly.graph_objs.scattergl.ErrorX` + - A dict of string/value properties that will be passed + to the ErrorX constructor + + Returns + ------- + plotly.graph_objs.scattergl.ErrorX + """ + return self["error_x"] + + @error_x.setter + def error_x(self, val): + self["error_x"] = val + + @property + def error_y(self): + """ + The 'error_y' property is an instance of ErrorY + that may be specified as: + - An instance of :class:`plotly.graph_objs.scattergl.ErrorY` + - A dict of string/value properties that will be passed + to the ErrorY constructor + + Returns + ------- + plotly.graph_objs.scattergl.ErrorY + """ + return self["error_y"] + + @error_y.setter + def error_y(self, val): + self["error_y"] = val + + @property + def fill(self): + """ + Sets the area to fill with a solid color. Defaults to "none" + unless this trace is stacked, then it gets "tonexty" + ("tonextx") if `orientation` is "v" ("h") Use with `fillcolor` + if not "none". "tozerox" and "tozeroy" fill to x=0 and y=0 + respectively. "tonextx" and "tonexty" fill between the + endpoints of this trace and the endpoints of the trace before + it, connecting those endpoints with straight lines (to make a + stacked area graph); if there is no trace before it, they + behave like "tozerox" and "tozeroy". "toself" connects the + endpoints of the trace (or each segment of the trace if it has + gaps) into a closed shape. "tonext" fills the space between two + traces if one completely encloses the other (eg consecutive + contour lines), and behaves like "toself" if there is no trace + before it. "tonext" should not be used if one trace does not + enclose the other. Traces in a `stackgroup` will only fill to + (or be filled to) other traces in the same group. With multiple + `stackgroup`s or some traces stacked and some not, if fill- + linked traces are not already consecutive, the later ones will + be pushed down in the drawing order. + + The 'fill' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['none', 'tozeroy', 'tozerox', 'tonexty', 'tonextx', + 'toself', 'tonext'] + + Returns + ------- + Any + """ + return self["fill"] + + @fill.setter + def fill(self, val): + self["fill"] = val + + @property + def fillcolor(self): + """ + Sets the fill color. Defaults to a half-transparent variant of + the line color, marker color, or marker line color, whichever + is available. + + The 'fillcolor' property is a color and may be specified as: + - A hex string (e.g. '#ff0000') + - An rgb/rgba string (e.g. 'rgb(255,0,0)') + - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') + - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') + - A named CSS color: see https://plotly.com/python/css-colors/ for a list + + Returns + ------- + str + """ + return self["fillcolor"] + + @fillcolor.setter + def fillcolor(self, val): + self["fillcolor"] = val + + @property + def hoverinfo(self): + """ + Determines which trace information appear on hover. If `none` + or `skip` are set, no information is displayed upon hovering. + But, if `none` is set, click and hover events are still fired. + + The 'hoverinfo' property is a flaglist and may be specified + as a string containing: + - Any combination of ['x', 'y', 'z', 'text', 'name'] joined with '+' characters + (e.g. 'x+y') + OR exactly one of ['all', 'none', 'skip'] (e.g. 'skip') + - A list or array of the above + + Returns + ------- + Any|numpy.ndarray + """ + return self["hoverinfo"] + + @hoverinfo.setter + def hoverinfo(self, val): + self["hoverinfo"] = val + + @property + def hoverinfosrc(self): + """ + Sets the source reference on Chart Studio Cloud for + `hoverinfo`. + + The 'hoverinfosrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["hoverinfosrc"] + + @hoverinfosrc.setter + def hoverinfosrc(self, val): + self["hoverinfosrc"] = val + + @property + def hoverlabel(self): + """ + The 'hoverlabel' property is an instance of Hoverlabel + that may be specified as: + - An instance of :class:`plotly.graph_objs.scattergl.Hoverlabel` + - A dict of string/value properties that will be passed + to the Hoverlabel constructor + + Returns + ------- + plotly.graph_objs.scattergl.Hoverlabel + """ + return self["hoverlabel"] + + @hoverlabel.setter + def hoverlabel(self, val): + self["hoverlabel"] = val + + @property + def hovertemplate(self): + """ + Template string used for rendering the information that appear + on hover box. Note that this will override `hoverinfo`. + Variables are inserted using %{variable}, for example "y: %{y}" + as well as %{xother}, {%_xother}, {%_xother_}, {%xother_}. When + showing info for several points, "xother" will be added to + those with different x positions from the first point. An + underscore before or after "(x|y)other" will add a space on + that side, only when this field is shown. Numbers are formatted + using d3-format's syntax %{variable:d3-format}, for example + "Price: %{y:$.2f}". + https://github.com/d3/d3-format/tree/v1.4.5#d3-format for + details on the formatting syntax. Dates are formatted using + d3-time-format's syntax %{variable|d3-time-format}, for example + "Day: %{2019-01-01|%A}". https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format for details on the date + formatting syntax. Variables that can't be found will be + replaced with the specifier. For example, a template of "data: + %{x}, %{y}" will result in a value of "data: 1, %{y}" if x is 1 + and y is missing. Variables with an undefined value will be + replaced with the fallback value. The variables available in + `hovertemplate` are the ones emitted as event data described at + this link https://plotly.com/javascript/plotlyjs-events/#event- + data. Additionally, all attributes that can be specified per- + point (the ones that are `arrayOk: true`) are available. + Anything contained in tag `` is displayed in the + secondary box, for example `%{fullData.name}`. + To hide the secondary box completely, use an empty tag + ``. + + The 'hovertemplate' property is a string and must be specified as: + - A string + - A number that will be converted to a string + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["hovertemplate"] + + @hovertemplate.setter + def hovertemplate(self, val): + self["hovertemplate"] = val + + @property + def hovertemplatefallback(self): + """ + Fallback string that's displayed when a variable referenced in + a template is missing. If the boolean value 'false' is passed + in, the specifier with the missing variable will be displayed. + + The 'hovertemplatefallback' property accepts values of any type + + Returns + ------- + Any + """ + return self["hovertemplatefallback"] + + @hovertemplatefallback.setter + def hovertemplatefallback(self, val): + self["hovertemplatefallback"] = val + + @property + def hovertemplatesrc(self): + """ + Sets the source reference on Chart Studio Cloud for + `hovertemplate`. + + The 'hovertemplatesrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["hovertemplatesrc"] + + @hovertemplatesrc.setter + def hovertemplatesrc(self, val): + self["hovertemplatesrc"] = val + + @property + def hovertext(self): + """ + Sets hover text elements associated with each (x,y) pair. If a + single string, the same string appears over all the data + points. If an array of string, the items are mapped in order to + the this trace's (x,y) coordinates. To be seen, trace + `hoverinfo` must contain a "text" flag. + + The 'hovertext' property is a string and must be specified as: + - A string + - A number that will be converted to a string + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["hovertext"] + + @hovertext.setter + def hovertext(self, val): + self["hovertext"] = val + + @property + def hovertextsrc(self): + """ + Sets the source reference on Chart Studio Cloud for + `hovertext`. + + The 'hovertextsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["hovertextsrc"] + + @hovertextsrc.setter + def hovertextsrc(self, val): + self["hovertextsrc"] = val + + @property + def ids(self): + """ + Assigns id labels to each datum. These ids for object constancy + of data points during animation. Should be an array of strings, + not numbers or any other type. + + The 'ids' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["ids"] + + @ids.setter + def ids(self, val): + self["ids"] = val + + @property + def idssrc(self): + """ + Sets the source reference on Chart Studio Cloud for `ids`. + + The 'idssrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["idssrc"] + + @idssrc.setter + def idssrc(self, val): + self["idssrc"] = val + + @property + def legend(self): + """ + Sets the reference to a legend to show this trace in. + References to these legends are "legend", "legend2", "legend3", + etc. Settings for these legends are set in the layout, under + `layout.legend`, `layout.legend2`, etc. + + The 'legend' property is an identifier of a particular + subplot, of type 'legend', that may be specified as: + - the string 'legend' optionally followed by an integer >= 1 + (e.g. 'legend', 'legend1', 'legend2', 'legend3', etc.) + + Returns + ------- + str + """ + return self["legend"] + + @legend.setter + def legend(self, val): + self["legend"] = val + + @property + def legendgroup(self): + """ + Sets the legend group for this trace. Traces and shapes part of + the same legend group hide/show at the same time when toggling + legend items. + + The 'legendgroup' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["legendgroup"] + + @legendgroup.setter + def legendgroup(self, val): + self["legendgroup"] = val + + @property + def legendgrouptitle(self): + """ + The 'legendgrouptitle' property is an instance of Legendgrouptitle + that may be specified as: + - An instance of :class:`plotly.graph_objs.scattergl.Legendgrouptitle` + - A dict of string/value properties that will be passed + to the Legendgrouptitle constructor + + Returns + ------- + plotly.graph_objs.scattergl.Legendgrouptitle + """ + return self["legendgrouptitle"] + + @legendgrouptitle.setter + def legendgrouptitle(self, val): + self["legendgrouptitle"] = val + + @property + def legendrank(self): + """ + Sets the legend rank for this trace. Items and groups with + smaller ranks are presented on top/left side while with + "reversed" `legend.traceorder` they are on bottom/right side. + The default legendrank is 1000, so that you can use ranks less + than 1000 to place certain items before all unranked items, and + ranks greater than 1000 to go after all unranked items. When + having unranked or equal rank items shapes would be displayed + after traces i.e. according to their order in data and layout. + + The 'legendrank' property is a number and may be specified as: + - An int or float + + Returns + ------- + int|float + """ + return self["legendrank"] + + @legendrank.setter + def legendrank(self, val): + self["legendrank"] = val + + @property + def legendwidth(self): + """ + Sets the width (in px or fraction) of the legend for this + trace. + + The 'legendwidth' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["legendwidth"] + + @legendwidth.setter + def legendwidth(self, val): + self["legendwidth"] = val + + @property + def line(self): + """ + The 'line' property is an instance of Line + that may be specified as: + - An instance of :class:`plotly.graph_objs.scattergl.Line` + - A dict of string/value properties that will be passed + to the Line constructor + + Returns + ------- + plotly.graph_objs.scattergl.Line + """ + return self["line"] + + @line.setter + def line(self, val): + self["line"] = val + + @property + def marker(self): + """ + The 'marker' property is an instance of Marker + that may be specified as: + - An instance of :class:`plotly.graph_objs.scattergl.Marker` + - A dict of string/value properties that will be passed + to the Marker constructor + + Returns + ------- + plotly.graph_objs.scattergl.Marker + """ + return self["marker"] + + @marker.setter + def marker(self, val): + self["marker"] = val + + @property + def meta(self): + """ + Assigns extra meta information associated with this trace that + can be used in various text attributes. Attributes such as + trace `name`, graph, axis and colorbar `title.text`, annotation + `text` `rangeselector`, `updatemenues` and `sliders` `label` + text all support `meta`. To access the trace `meta` values in + an attribute in the same trace, simply use `%{meta[i]}` where + `i` is the index or key of the `meta` item in question. To + access trace `meta` in layout attributes, use + `%{data[n[.meta[i]}` where `i` is the index or key of the + `meta` and `n` is the trace index. + + The 'meta' property accepts values of any type + + Returns + ------- + Any|numpy.ndarray + """ + return self["meta"] + + @meta.setter + def meta(self, val): + self["meta"] = val + + @property + def metasrc(self): + """ + Sets the source reference on Chart Studio Cloud for `meta`. + + The 'metasrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["metasrc"] + + @metasrc.setter + def metasrc(self, val): + self["metasrc"] = val + + @property + def mode(self): + """ + Determines the drawing mode for this scatter trace. + + The 'mode' property is a flaglist and may be specified + as a string containing: + - Any combination of ['lines', 'markers', 'text'] joined with '+' characters + (e.g. 'lines+markers') + OR exactly one of ['none'] (e.g. 'none') + + Returns + ------- + Any + """ + return self["mode"] + + @mode.setter + def mode(self, val): + self["mode"] = val + + @property + def name(self): + """ + Sets the trace name. The trace name appears as the legend item + and on hover. + + The 'name' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["name"] + + @name.setter + def name(self, val): + self["name"] = val + + @property + def opacity(self): + """ + Sets the opacity of the trace. + + The 'opacity' property is a number and may be specified as: + - An int or float in the interval [0, 1] + + Returns + ------- + int|float + """ + return self["opacity"] + + @opacity.setter + def opacity(self, val): + self["opacity"] = val + + @property + def selected(self): + """ + The 'selected' property is an instance of Selected + that may be specified as: + - An instance of :class:`plotly.graph_objs.scattergl.Selected` + - A dict of string/value properties that will be passed + to the Selected constructor + + Returns + ------- + plotly.graph_objs.scattergl.Selected + """ + return self["selected"] + + @selected.setter + def selected(self, val): + self["selected"] = val + + @property + def selectedpoints(self): + """ + Array containing integer indices of selected points. Has an + effect only for traces that support selections. Note that an + empty array means an empty selection where the `unselected` are + turned on for all points, whereas, any other non-array values + means no selection all where the `selected` and `unselected` + styles have no effect. + + The 'selectedpoints' property accepts values of any type + + Returns + ------- + Any + """ + return self["selectedpoints"] + + @selectedpoints.setter + def selectedpoints(self, val): + self["selectedpoints"] = val + + @property + def showlegend(self): + """ + Determines whether or not an item corresponding to this trace + is shown in the legend. + + The 'showlegend' property is a boolean and must be specified as: + - A boolean value: True or False + + Returns + ------- + bool + """ + return self["showlegend"] + + @showlegend.setter + def showlegend(self, val): + self["showlegend"] = val + + @property + def stream(self): + """ + The 'stream' property is an instance of Stream + that may be specified as: + - An instance of :class:`plotly.graph_objs.scattergl.Stream` + - A dict of string/value properties that will be passed + to the Stream constructor + + Returns + ------- + plotly.graph_objs.scattergl.Stream + """ + return self["stream"] + + @stream.setter + def stream(self, val): + self["stream"] = val + + @property + def text(self): + """ + Sets text elements associated with each (x,y) pair. If a single + string, the same string appears over all the data points. If an + array of string, the items are mapped in order to the this + trace's (x,y) coordinates. If trace `hoverinfo` contains a + "text" flag and "hovertext" is not set, these elements will be + seen in the hover labels. + + The 'text' property is a string and must be specified as: + - A string + - A number that will be converted to a string + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["text"] + + @text.setter + def text(self, val): + self["text"] = val + + @property + def textfont(self): + """ + Sets the text font. + + The 'textfont' property is an instance of Textfont + that may be specified as: + - An instance of :class:`plotly.graph_objs.scattergl.Textfont` + - A dict of string/value properties that will be passed + to the Textfont constructor + + Returns + ------- + plotly.graph_objs.scattergl.Textfont + """ + return self["textfont"] + + @textfont.setter + def textfont(self, val): + self["textfont"] = val + + @property + def textposition(self): + """ + Sets the positions of the `text` elements with respects to the + (x,y) coordinates. + + The 'textposition' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['top left', 'top center', 'top right', 'middle left', + 'middle center', 'middle right', 'bottom left', 'bottom + center', 'bottom right'] + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + Any|numpy.ndarray + """ + return self["textposition"] + + @textposition.setter + def textposition(self, val): + self["textposition"] = val + + @property + def textpositionsrc(self): + """ + Sets the source reference on Chart Studio Cloud for + `textposition`. + + The 'textpositionsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["textpositionsrc"] + + @textpositionsrc.setter + def textpositionsrc(self, val): + self["textpositionsrc"] = val + + @property + def textsrc(self): + """ + Sets the source reference on Chart Studio Cloud for `text`. + + The 'textsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["textsrc"] + + @textsrc.setter + def textsrc(self, val): + self["textsrc"] = val + + @property + def texttemplate(self): + """ + Template string used for rendering the information text that + appears on points. Note that this will override `textinfo`. + Variables are inserted using %{variable}, for example "y: + %{y}". Numbers are formatted using d3-format's syntax + %{variable:d3-format}, for example "Price: %{y:$.2f}". + https://github.com/d3/d3-format/tree/v1.4.5#d3-format for + details on the formatting syntax. Dates are formatted using + d3-time-format's syntax %{variable|d3-time-format}, for example + "Day: %{2019-01-01|%A}". https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format for details on the date + formatting syntax. Variables that can't be found will be + replaced with the specifier. For example, a template of "data: + %{x}, %{y}" will result in a value of "data: 1, %{y}" if x is 1 + and y is missing. Variables with an undefined value will be + replaced with the fallback value. All attributes that can be + specified per-point (the ones that are `arrayOk: true`) are + available. + + The 'texttemplate' property is a string and must be specified as: + - A string + - A number that will be converted to a string + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["texttemplate"] + + @texttemplate.setter + def texttemplate(self, val): + self["texttemplate"] = val + + @property + def texttemplatefallback(self): + """ + Fallback string that's displayed when a variable referenced in + a template is missing. If the boolean value 'false' is passed + in, the specifier with the missing variable will be displayed. + + The 'texttemplatefallback' property accepts values of any type + + Returns + ------- + Any + """ + return self["texttemplatefallback"] + + @texttemplatefallback.setter + def texttemplatefallback(self, val): + self["texttemplatefallback"] = val + + @property + def texttemplatesrc(self): + """ + Sets the source reference on Chart Studio Cloud for + `texttemplate`. + + The 'texttemplatesrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["texttemplatesrc"] + + @texttemplatesrc.setter + def texttemplatesrc(self, val): + self["texttemplatesrc"] = val + + @property + def uid(self): + """ + Assign an id to this trace, Use this to provide object + constancy between traces during animations and transitions. + + The 'uid' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["uid"] + + @uid.setter + def uid(self, val): + self["uid"] = val + + @property + def uirevision(self): + """ + Controls persistence of some user-driven changes to the trace: + `constraintrange` in `parcoords` traces, as well as some + `editable: true` modifications such as `name` and + `colorbar.title`. Defaults to `layout.uirevision`. Note that + other user-driven trace attribute changes are controlled by + `layout` attributes: `trace.visible` is controlled by + `layout.legend.uirevision`, `selectedpoints` is controlled by + `layout.selectionrevision`, and `colorbar.(x|y)` (accessible + with `config: {editable: true}`) is controlled by + `layout.editrevision`. Trace changes are tracked by `uid`, + which only falls back on trace index if no `uid` is provided. + So if your app can add/remove traces before the end of the + `data` array, such that the same trace has a different index, + you can still preserve user-driven changes if you give each + trace a `uid` that stays with it as it moves. + + The 'uirevision' property accepts values of any type + + Returns + ------- + Any + """ + return self["uirevision"] + + @uirevision.setter + def uirevision(self, val): + self["uirevision"] = val + + @property + def unselected(self): + """ + The 'unselected' property is an instance of Unselected + that may be specified as: + - An instance of :class:`plotly.graph_objs.scattergl.Unselected` + - A dict of string/value properties that will be passed + to the Unselected constructor + + Returns + ------- + plotly.graph_objs.scattergl.Unselected + """ + return self["unselected"] + + @unselected.setter + def unselected(self, val): + self["unselected"] = val + + @property + def visible(self): + """ + Determines whether or not this trace is visible. If + "legendonly", the trace is not drawn, but can appear as a + legend item (provided that the legend itself is visible). + + The 'visible' property is an enumeration that may be specified as: + - One of the following enumeration values: + [True, False, 'legendonly'] + + Returns + ------- + Any + """ + return self["visible"] + + @visible.setter + def visible(self, val): + self["visible"] = val + + @property + def x(self): + """ + Sets the x coordinates. + + The 'x' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["x"] + + @x.setter + def x(self, val): + self["x"] = val + + @property + def x0(self): + """ + Alternate to `x`. Builds a linear space of x coordinates. Use + with `dx` where `x0` is the starting coordinate and `dx` the + step. + + The 'x0' property accepts values of any type + + Returns + ------- + Any + """ + return self["x0"] + + @x0.setter + def x0(self, val): + self["x0"] = val + + @property + def xaxis(self): + """ + Sets a reference between this trace's x coordinates and a 2D + cartesian x axis. If "x" (the default value), the x coordinates + refer to `layout.xaxis`. If "x2", the x coordinates refer to + `layout.xaxis2`, and so on. + + The 'xaxis' property is an identifier of a particular + subplot, of type 'x', that may be specified as: + - the string 'x' optionally followed by an integer >= 1 + (e.g. 'x', 'x1', 'x2', 'x3', etc.) + + Returns + ------- + str + """ + return self["xaxis"] + + @xaxis.setter + def xaxis(self, val): + self["xaxis"] = val + + @property + def xcalendar(self): + """ + Sets the calendar system to use with `x` date data. + + The 'xcalendar' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['chinese', 'coptic', 'discworld', 'ethiopian', + 'gregorian', 'hebrew', 'islamic', 'jalali', 'julian', + 'mayan', 'nanakshahi', 'nepali', 'persian', 'taiwan', + 'thai', 'ummalqura'] + + Returns + ------- + Any + """ + return self["xcalendar"] + + @xcalendar.setter + def xcalendar(self, val): + self["xcalendar"] = val + + @property + def xhoverformat(self): + """ + Sets the hover text formatting rulefor `x` using d3 formatting + mini-languages which are very similar to those in Python. For + numbers, see: + https://github.com/d3/d3-format/tree/v1.4.5#d3-format. And for + dates see: https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format. We add two items to d3's date + formatter: "%h" for half of the year as a decimal number as + well as "%{n}f" for fractional seconds with n digits. For + example, *2016-10-13 09:15:23.456* with tickformat + "%H~%M~%S.%2f" would display *09~15~23.46*By default the values + are formatted using `xaxis.hoverformat`. + + The 'xhoverformat' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["xhoverformat"] + + @xhoverformat.setter + def xhoverformat(self, val): + self["xhoverformat"] = val + + @property + def xperiod(self): + """ + Only relevant when the axis `type` is "date". Sets the period + positioning in milliseconds or "M" on the x axis. Special + values in the form of "M" could be used to declare the + number of months. In this case `n` must be a positive integer. + + The 'xperiod' property accepts values of any type + + Returns + ------- + Any + """ + return self["xperiod"] + + @xperiod.setter + def xperiod(self, val): + self["xperiod"] = val + + @property + def xperiod0(self): + """ + Only relevant when the axis `type` is "date". Sets the base for + period positioning in milliseconds or date string on the x0 + axis. When `x0period` is round number of weeks, the `x0period0` + by default would be on a Sunday i.e. 2000-01-02, otherwise it + would be at 2000-01-01. + + The 'xperiod0' property accepts values of any type + + Returns + ------- + Any + """ + return self["xperiod0"] + + @xperiod0.setter + def xperiod0(self, val): + self["xperiod0"] = val + + @property + def xperiodalignment(self): + """ + Only relevant when the axis `type` is "date". Sets the + alignment of data points on the x axis. + + The 'xperiodalignment' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['start', 'middle', 'end'] + + Returns + ------- + Any + """ + return self["xperiodalignment"] + + @xperiodalignment.setter + def xperiodalignment(self, val): + self["xperiodalignment"] = val + + @property + def xsrc(self): + """ + Sets the source reference on Chart Studio Cloud for `x`. + + The 'xsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["xsrc"] + + @xsrc.setter + def xsrc(self, val): + self["xsrc"] = val + + @property + def y(self): + """ + Sets the y coordinates. + + The 'y' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["y"] + + @y.setter + def y(self, val): + self["y"] = val + + @property + def y0(self): + """ + Alternate to `y`. Builds a linear space of y coordinates. Use + with `dy` where `y0` is the starting coordinate and `dy` the + step. + + The 'y0' property accepts values of any type + + Returns + ------- + Any + """ + return self["y0"] + + @y0.setter + def y0(self, val): + self["y0"] = val + + @property + def yaxis(self): + """ + Sets a reference between this trace's y coordinates and a 2D + cartesian y axis. If "y" (the default value), the y coordinates + refer to `layout.yaxis`. If "y2", the y coordinates refer to + `layout.yaxis2`, and so on. + + The 'yaxis' property is an identifier of a particular + subplot, of type 'y', that may be specified as: + - the string 'y' optionally followed by an integer >= 1 + (e.g. 'y', 'y1', 'y2', 'y3', etc.) + + Returns + ------- + str + """ + return self["yaxis"] + + @yaxis.setter + def yaxis(self, val): + self["yaxis"] = val + + @property + def ycalendar(self): + """ + Sets the calendar system to use with `y` date data. + + The 'ycalendar' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['chinese', 'coptic', 'discworld', 'ethiopian', + 'gregorian', 'hebrew', 'islamic', 'jalali', 'julian', + 'mayan', 'nanakshahi', 'nepali', 'persian', 'taiwan', + 'thai', 'ummalqura'] + + Returns + ------- + Any + """ + return self["ycalendar"] + + @ycalendar.setter + def ycalendar(self, val): + self["ycalendar"] = val + + @property + def yhoverformat(self): + """ + Sets the hover text formatting rulefor `y` using d3 formatting + mini-languages which are very similar to those in Python. For + numbers, see: + https://github.com/d3/d3-format/tree/v1.4.5#d3-format. And for + dates see: https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format. We add two items to d3's date + formatter: "%h" for half of the year as a decimal number as + well as "%{n}f" for fractional seconds with n digits. For + example, *2016-10-13 09:15:23.456* with tickformat + "%H~%M~%S.%2f" would display *09~15~23.46*By default the values + are formatted using `yaxis.hoverformat`. + + The 'yhoverformat' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["yhoverformat"] + + @yhoverformat.setter + def yhoverformat(self, val): + self["yhoverformat"] = val + + @property + def yperiod(self): + """ + Only relevant when the axis `type` is "date". Sets the period + positioning in milliseconds or "M" on the y axis. Special + values in the form of "M" could be used to declare the + number of months. In this case `n` must be a positive integer. + + The 'yperiod' property accepts values of any type + + Returns + ------- + Any + """ + return self["yperiod"] + + @yperiod.setter + def yperiod(self, val): + self["yperiod"] = val + + @property + def yperiod0(self): + """ + Only relevant when the axis `type` is "date". Sets the base for + period positioning in milliseconds or date string on the y0 + axis. When `y0period` is round number of weeks, the `y0period0` + by default would be on a Sunday i.e. 2000-01-02, otherwise it + would be at 2000-01-01. + + The 'yperiod0' property accepts values of any type + + Returns + ------- + Any + """ + return self["yperiod0"] + + @yperiod0.setter + def yperiod0(self, val): + self["yperiod0"] = val + + @property + def yperiodalignment(self): + """ + Only relevant when the axis `type` is "date". Sets the + alignment of data points on the y axis. + + The 'yperiodalignment' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['start', 'middle', 'end'] + + Returns + ------- + Any + """ + return self["yperiodalignment"] + + @yperiodalignment.setter + def yperiodalignment(self, val): + self["yperiodalignment"] = val + + @property + def ysrc(self): + """ + Sets the source reference on Chart Studio Cloud for `y`. + + The 'ysrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["ysrc"] + + @ysrc.setter + def ysrc(self, val): + self["ysrc"] = val + + @property + def type(self): + return self._props["type"] + + @property + def _prop_descriptions(self): + return """\ + connectgaps + Determines whether or not gaps (i.e. {nan} or missing + values) in the provided data arrays are connected. + customdata + Assigns extra data each datum. This may be useful when + listening to hover, click and selection events. Note + that, "scatter" traces also appends customdata items in + the markers DOM elements + customdatasrc + Sets the source reference on Chart Studio Cloud for + `customdata`. + dx + Sets the x coordinate step. See `x0` for more info. + dy + Sets the y coordinate step. See `y0` for more info. + error_x + :class:`plotly.graph_objects.scattergl.ErrorX` instance + or dict with compatible properties + error_y + :class:`plotly.graph_objects.scattergl.ErrorY` instance + or dict with compatible properties + fill + Sets the area to fill with a solid color. Defaults to + "none" unless this trace is stacked, then it gets + "tonexty" ("tonextx") if `orientation` is "v" ("h") Use + with `fillcolor` if not "none". "tozerox" and "tozeroy" + fill to x=0 and y=0 respectively. "tonextx" and + "tonexty" fill between the endpoints of this trace and + the endpoints of the trace before it, connecting those + endpoints with straight lines (to make a stacked area + graph); if there is no trace before it, they behave + like "tozerox" and "tozeroy". "toself" connects the + endpoints of the trace (or each segment of the trace if + it has gaps) into a closed shape. "tonext" fills the + space between two traces if one completely encloses the + other (eg consecutive contour lines), and behaves like + "toself" if there is no trace before it. "tonext" + should not be used if one trace does not enclose the + other. Traces in a `stackgroup` will only fill to (or + be filled to) other traces in the same group. With + multiple `stackgroup`s or some traces stacked and some + not, if fill-linked traces are not already consecutive, + the later ones will be pushed down in the drawing + order. + fillcolor + Sets the fill color. Defaults to a half-transparent + variant of the line color, marker color, or marker line + color, whichever is available. + hoverinfo + Determines which trace information appear on hover. If + `none` or `skip` are set, no information is displayed + upon hovering. But, if `none` is set, click and hover + events are still fired. + hoverinfosrc + Sets the source reference on Chart Studio Cloud for + `hoverinfo`. + hoverlabel + :class:`plotly.graph_objects.scattergl.Hoverlabel` + instance or dict with compatible properties + hovertemplate + Template string used for rendering the information that + appear on hover box. Note that this will override + `hoverinfo`. Variables are inserted using %{variable}, + for example "y: %{y}" as well as %{xother}, {%_xother}, + {%_xother_}, {%xother_}. When showing info for several + points, "xother" will be added to those with different + x positions from the first point. An underscore before + or after "(x|y)other" will add a space on that side, + only when this field is shown. Numbers are formatted + using d3-format's syntax %{variable:d3-format}, for + example "Price: %{y:$.2f}". + https://github.com/d3/d3-format/tree/v1.4.5#d3-format + for details on the formatting syntax. Dates are + formatted using d3-time-format's syntax + %{variable|d3-time-format}, for example "Day: + %{2019-01-01|%A}". https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format for details on the + date formatting syntax. Variables that can't be found + will be replaced with the specifier. For example, a + template of "data: %{x}, %{y}" will result in a value + of "data: 1, %{y}" if x is 1 and y is missing. + Variables with an undefined value will be replaced with + the fallback value. The variables available in + `hovertemplate` are the ones emitted as event data + described at this link + https://plotly.com/javascript/plotlyjs-events/#event- + data. Additionally, all attributes that can be + specified per-point (the ones that are `arrayOk: true`) + are available. Anything contained in tag `` is + displayed in the secondary box, for example + `%{fullData.name}`. To hide the + secondary box completely, use an empty tag + ``. + hovertemplatefallback + Fallback string that's displayed when a variable + referenced in a template is missing. If the boolean + value 'false' is passed in, the specifier with the + missing variable will be displayed. + hovertemplatesrc + Sets the source reference on Chart Studio Cloud for + `hovertemplate`. + hovertext + Sets hover text elements associated with each (x,y) + pair. If a single string, the same string appears over + all the data points. If an array of string, the items + are mapped in order to the this trace's (x,y) + coordinates. To be seen, trace `hoverinfo` must contain + a "text" flag. + hovertextsrc + Sets the source reference on Chart Studio Cloud for + `hovertext`. + ids + Assigns id labels to each datum. These ids for object + constancy of data points during animation. Should be an + array of strings, not numbers or any other type. + idssrc + Sets the source reference on Chart Studio Cloud for + `ids`. + legend + Sets the reference to a legend to show this trace in. + References to these legends are "legend", "legend2", + "legend3", etc. Settings for these legends are set in + the layout, under `layout.legend`, `layout.legend2`, + etc. + legendgroup + Sets the legend group for this trace. Traces and shapes + part of the same legend group hide/show at the same + time when toggling legend items. + legendgrouptitle + :class:`plotly.graph_objects.scattergl.Legendgrouptitle + ` instance or dict with compatible properties + legendrank + Sets the legend rank for this trace. Items and groups + with smaller ranks are presented on top/left side while + with "reversed" `legend.traceorder` they are on + bottom/right side. The default legendrank is 1000, so + that you can use ranks less than 1000 to place certain + items before all unranked items, and ranks greater than + 1000 to go after all unranked items. When having + unranked or equal rank items shapes would be displayed + after traces i.e. according to their order in data and + layout. + legendwidth + Sets the width (in px or fraction) of the legend for + this trace. + line + :class:`plotly.graph_objects.scattergl.Line` instance + or dict with compatible properties + marker + :class:`plotly.graph_objects.scattergl.Marker` instance + or dict with compatible properties + meta + Assigns extra meta information associated with this + trace that can be used in various text attributes. + Attributes such as trace `name`, graph, axis and + colorbar `title.text`, annotation `text` + `rangeselector`, `updatemenues` and `sliders` `label` + text all support `meta`. To access the trace `meta` + values in an attribute in the same trace, simply use + `%{meta[i]}` where `i` is the index or key of the + `meta` item in question. To access trace `meta` in + layout attributes, use `%{data[n[.meta[i]}` where `i` + is the index or key of the `meta` and `n` is the trace + index. + metasrc + Sets the source reference on Chart Studio Cloud for + `meta`. + mode + Determines the drawing mode for this scatter trace. + name + Sets the trace name. The trace name appears as the + legend item and on hover. + opacity + Sets the opacity of the trace. + selected + :class:`plotly.graph_objects.scattergl.Selected` + instance or dict with compatible properties + selectedpoints + Array containing integer indices of selected points. + Has an effect only for traces that support selections. + Note that an empty array means an empty selection where + the `unselected` are turned on for all points, whereas, + any other non-array values means no selection all where + the `selected` and `unselected` styles have no effect. + showlegend + Determines whether or not an item corresponding to this + trace is shown in the legend. + stream + :class:`plotly.graph_objects.scattergl.Stream` instance + or dict with compatible properties + text + Sets text elements associated with each (x,y) pair. If + a single string, the same string appears over all the + data points. If an array of string, the items are + mapped in order to the this trace's (x,y) coordinates. + If trace `hoverinfo` contains a "text" flag and + "hovertext" is not set, these elements will be seen in + the hover labels. + textfont + Sets the text font. + textposition + Sets the positions of the `text` elements with respects + to the (x,y) coordinates. + textpositionsrc + Sets the source reference on Chart Studio Cloud for + `textposition`. + textsrc + Sets the source reference on Chart Studio Cloud for + `text`. + texttemplate + Template string used for rendering the information text + that appears on points. Note that this will override + `textinfo`. Variables are inserted using %{variable}, + for example "y: %{y}". Numbers are formatted using + d3-format's syntax %{variable:d3-format}, for example + "Price: %{y:$.2f}". + https://github.com/d3/d3-format/tree/v1.4.5#d3-format + for details on the formatting syntax. Dates are + formatted using d3-time-format's syntax + %{variable|d3-time-format}, for example "Day: + %{2019-01-01|%A}". https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format for details on the + date formatting syntax. Variables that can't be found + will be replaced with the specifier. For example, a + template of "data: %{x}, %{y}" will result in a value + of "data: 1, %{y}" if x is 1 and y is missing. + Variables with an undefined value will be replaced with + the fallback value. All attributes that can be + specified per-point (the ones that are `arrayOk: true`) + are available. + texttemplatefallback + Fallback string that's displayed when a variable + referenced in a template is missing. If the boolean + value 'false' is passed in, the specifier with the + missing variable will be displayed. + texttemplatesrc + Sets the source reference on Chart Studio Cloud for + `texttemplate`. + uid + Assign an id to this trace, Use this to provide object + constancy between traces during animations and + transitions. + uirevision + Controls persistence of some user-driven changes to the + trace: `constraintrange` in `parcoords` traces, as well + as some `editable: true` modifications such as `name` + and `colorbar.title`. Defaults to `layout.uirevision`. + Note that other user-driven trace attribute changes are + controlled by `layout` attributes: `trace.visible` is + controlled by `layout.legend.uirevision`, + `selectedpoints` is controlled by + `layout.selectionrevision`, and `colorbar.(x|y)` + (accessible with `config: {editable: true}`) is + controlled by `layout.editrevision`. Trace changes are + tracked by `uid`, which only falls back on trace index + if no `uid` is provided. So if your app can add/remove + traces before the end of the `data` array, such that + the same trace has a different index, you can still + preserve user-driven changes if you give each trace a + `uid` that stays with it as it moves. + unselected + :class:`plotly.graph_objects.scattergl.Unselected` + instance or dict with compatible properties + visible + Determines whether or not this trace is visible. If + "legendonly", the trace is not drawn, but can appear as + a legend item (provided that the legend itself is + visible). + x + Sets the x coordinates. + x0 + Alternate to `x`. Builds a linear space of x + coordinates. Use with `dx` where `x0` is the starting + coordinate and `dx` the step. + xaxis + Sets a reference between this trace's x coordinates and + a 2D cartesian x axis. If "x" (the default value), the + x coordinates refer to `layout.xaxis`. If "x2", the x + coordinates refer to `layout.xaxis2`, and so on. + xcalendar + Sets the calendar system to use with `x` date data. + xhoverformat + Sets the hover text formatting rulefor `x` using d3 + formatting mini-languages which are very similar to + those in Python. For numbers, see: + https://github.com/d3/d3-format/tree/v1.4.5#d3-format. + And for dates see: https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format. We add two items to + d3's date formatter: "%h" for half of the year as a + decimal number as well as "%{n}f" for fractional + seconds with n digits. For example, *2016-10-13 + 09:15:23.456* with tickformat "%H~%M~%S.%2f" would + display *09~15~23.46*By default the values are + formatted using `xaxis.hoverformat`. + xperiod + Only relevant when the axis `type` is "date". Sets the + period positioning in milliseconds or "M" on the x + axis. Special values in the form of "M" could be + used to declare the number of months. In this case `n` + must be a positive integer. + xperiod0 + Only relevant when the axis `type` is "date". Sets the + base for period positioning in milliseconds or date + string on the x0 axis. When `x0period` is round number + of weeks, the `x0period0` by default would be on a + Sunday i.e. 2000-01-02, otherwise it would be at + 2000-01-01. + xperiodalignment + Only relevant when the axis `type` is "date". Sets the + alignment of data points on the x axis. + xsrc + Sets the source reference on Chart Studio Cloud for + `x`. + y + Sets the y coordinates. + y0 + Alternate to `y`. Builds a linear space of y + coordinates. Use with `dy` where `y0` is the starting + coordinate and `dy` the step. + yaxis + Sets a reference between this trace's y coordinates and + a 2D cartesian y axis. If "y" (the default value), the + y coordinates refer to `layout.yaxis`. If "y2", the y + coordinates refer to `layout.yaxis2`, and so on. + ycalendar + Sets the calendar system to use with `y` date data. + yhoverformat + Sets the hover text formatting rulefor `y` using d3 + formatting mini-languages which are very similar to + those in Python. For numbers, see: + https://github.com/d3/d3-format/tree/v1.4.5#d3-format. + And for dates see: https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format. We add two items to + d3's date formatter: "%h" for half of the year as a + decimal number as well as "%{n}f" for fractional + seconds with n digits. For example, *2016-10-13 + 09:15:23.456* with tickformat "%H~%M~%S.%2f" would + display *09~15~23.46*By default the values are + formatted using `yaxis.hoverformat`. + yperiod + Only relevant when the axis `type` is "date". Sets the + period positioning in milliseconds or "M" on the y + axis. Special values in the form of "M" could be + used to declare the number of months. In this case `n` + must be a positive integer. + yperiod0 + Only relevant when the axis `type` is "date". Sets the + base for period positioning in milliseconds or date + string on the y0 axis. When `y0period` is round number + of weeks, the `y0period0` by default would be on a + Sunday i.e. 2000-01-02, otherwise it would be at + 2000-01-01. + yperiodalignment + Only relevant when the axis `type` is "date". Sets the + alignment of data points on the y axis. + ysrc + Sets the source reference on Chart Studio Cloud for + `y`. + """ + + def __init__( + self, + arg=None, + connectgaps=None, + customdata=None, + customdatasrc=None, + dx=None, + dy=None, + error_x=None, + error_y=None, + fill=None, + fillcolor=None, + hoverinfo=None, + hoverinfosrc=None, + hoverlabel=None, + hovertemplate=None, + hovertemplatefallback=None, + hovertemplatesrc=None, + hovertext=None, + hovertextsrc=None, + ids=None, + idssrc=None, + legend=None, + legendgroup=None, + legendgrouptitle=None, + legendrank=None, + legendwidth=None, + line=None, + marker=None, + meta=None, + metasrc=None, + mode=None, + name=None, + opacity=None, + selected=None, + selectedpoints=None, + showlegend=None, + stream=None, + text=None, + textfont=None, + textposition=None, + textpositionsrc=None, + textsrc=None, + texttemplate=None, + texttemplatefallback=None, + texttemplatesrc=None, + uid=None, + uirevision=None, + unselected=None, + visible=None, + x=None, + x0=None, + xaxis=None, + xcalendar=None, + xhoverformat=None, + xperiod=None, + xperiod0=None, + xperiodalignment=None, + xsrc=None, + y=None, + y0=None, + yaxis=None, + ycalendar=None, + yhoverformat=None, + yperiod=None, + yperiod0=None, + yperiodalignment=None, + ysrc=None, + **kwargs, + ): + """ + Construct a new Scattergl object + + The data visualized as scatter point or lines is set in `x` and + `y` using the WebGL plotting engine. Bubble charts are achieved + by setting `marker.size` and/or `marker.color` to a numerical + arrays. + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of :class:`plotly.graph_objs.Scattergl` + connectgaps + Determines whether or not gaps (i.e. {nan} or missing + values) in the provided data arrays are connected. + customdata + Assigns extra data each datum. This may be useful when + listening to hover, click and selection events. Note + that, "scatter" traces also appends customdata items in + the markers DOM elements + customdatasrc + Sets the source reference on Chart Studio Cloud for + `customdata`. + dx + Sets the x coordinate step. See `x0` for more info. + dy + Sets the y coordinate step. See `y0` for more info. + error_x + :class:`plotly.graph_objects.scattergl.ErrorX` instance + or dict with compatible properties + error_y + :class:`plotly.graph_objects.scattergl.ErrorY` instance + or dict with compatible properties + fill + Sets the area to fill with a solid color. Defaults to + "none" unless this trace is stacked, then it gets + "tonexty" ("tonextx") if `orientation` is "v" ("h") Use + with `fillcolor` if not "none". "tozerox" and "tozeroy" + fill to x=0 and y=0 respectively. "tonextx" and + "tonexty" fill between the endpoints of this trace and + the endpoints of the trace before it, connecting those + endpoints with straight lines (to make a stacked area + graph); if there is no trace before it, they behave + like "tozerox" and "tozeroy". "toself" connects the + endpoints of the trace (or each segment of the trace if + it has gaps) into a closed shape. "tonext" fills the + space between two traces if one completely encloses the + other (eg consecutive contour lines), and behaves like + "toself" if there is no trace before it. "tonext" + should not be used if one trace does not enclose the + other. Traces in a `stackgroup` will only fill to (or + be filled to) other traces in the same group. With + multiple `stackgroup`s or some traces stacked and some + not, if fill-linked traces are not already consecutive, + the later ones will be pushed down in the drawing + order. + fillcolor + Sets the fill color. Defaults to a half-transparent + variant of the line color, marker color, or marker line + color, whichever is available. + hoverinfo + Determines which trace information appear on hover. If + `none` or `skip` are set, no information is displayed + upon hovering. But, if `none` is set, click and hover + events are still fired. + hoverinfosrc + Sets the source reference on Chart Studio Cloud for + `hoverinfo`. + hoverlabel + :class:`plotly.graph_objects.scattergl.Hoverlabel` + instance or dict with compatible properties + hovertemplate + Template string used for rendering the information that + appear on hover box. Note that this will override + `hoverinfo`. Variables are inserted using %{variable}, + for example "y: %{y}" as well as %{xother}, {%_xother}, + {%_xother_}, {%xother_}. When showing info for several + points, "xother" will be added to those with different + x positions from the first point. An underscore before + or after "(x|y)other" will add a space on that side, + only when this field is shown. Numbers are formatted + using d3-format's syntax %{variable:d3-format}, for + example "Price: %{y:$.2f}". + https://github.com/d3/d3-format/tree/v1.4.5#d3-format + for details on the formatting syntax. Dates are + formatted using d3-time-format's syntax + %{variable|d3-time-format}, for example "Day: + %{2019-01-01|%A}". https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format for details on the + date formatting syntax. Variables that can't be found + will be replaced with the specifier. For example, a + template of "data: %{x}, %{y}" will result in a value + of "data: 1, %{y}" if x is 1 and y is missing. + Variables with an undefined value will be replaced with + the fallback value. The variables available in + `hovertemplate` are the ones emitted as event data + described at this link + https://plotly.com/javascript/plotlyjs-events/#event- + data. Additionally, all attributes that can be + specified per-point (the ones that are `arrayOk: true`) + are available. Anything contained in tag `` is + displayed in the secondary box, for example + `%{fullData.name}`. To hide the + secondary box completely, use an empty tag + ``. + hovertemplatefallback + Fallback string that's displayed when a variable + referenced in a template is missing. If the boolean + value 'false' is passed in, the specifier with the + missing variable will be displayed. + hovertemplatesrc + Sets the source reference on Chart Studio Cloud for + `hovertemplate`. + hovertext + Sets hover text elements associated with each (x,y) + pair. If a single string, the same string appears over + all the data points. If an array of string, the items + are mapped in order to the this trace's (x,y) + coordinates. To be seen, trace `hoverinfo` must contain + a "text" flag. + hovertextsrc + Sets the source reference on Chart Studio Cloud for + `hovertext`. + ids + Assigns id labels to each datum. These ids for object + constancy of data points during animation. Should be an + array of strings, not numbers or any other type. + idssrc + Sets the source reference on Chart Studio Cloud for + `ids`. + legend + Sets the reference to a legend to show this trace in. + References to these legends are "legend", "legend2", + "legend3", etc. Settings for these legends are set in + the layout, under `layout.legend`, `layout.legend2`, + etc. + legendgroup + Sets the legend group for this trace. Traces and shapes + part of the same legend group hide/show at the same + time when toggling legend items. + legendgrouptitle + :class:`plotly.graph_objects.scattergl.Legendgrouptitle + ` instance or dict with compatible properties + legendrank + Sets the legend rank for this trace. Items and groups + with smaller ranks are presented on top/left side while + with "reversed" `legend.traceorder` they are on + bottom/right side. The default legendrank is 1000, so + that you can use ranks less than 1000 to place certain + items before all unranked items, and ranks greater than + 1000 to go after all unranked items. When having + unranked or equal rank items shapes would be displayed + after traces i.e. according to their order in data and + layout. + legendwidth + Sets the width (in px or fraction) of the legend for + this trace. + line + :class:`plotly.graph_objects.scattergl.Line` instance + or dict with compatible properties + marker + :class:`plotly.graph_objects.scattergl.Marker` instance + or dict with compatible properties + meta + Assigns extra meta information associated with this + trace that can be used in various text attributes. + Attributes such as trace `name`, graph, axis and + colorbar `title.text`, annotation `text` + `rangeselector`, `updatemenues` and `sliders` `label` + text all support `meta`. To access the trace `meta` + values in an attribute in the same trace, simply use + `%{meta[i]}` where `i` is the index or key of the + `meta` item in question. To access trace `meta` in + layout attributes, use `%{data[n[.meta[i]}` where `i` + is the index or key of the `meta` and `n` is the trace + index. + metasrc + Sets the source reference on Chart Studio Cloud for + `meta`. + mode + Determines the drawing mode for this scatter trace. + name + Sets the trace name. The trace name appears as the + legend item and on hover. + opacity + Sets the opacity of the trace. + selected + :class:`plotly.graph_objects.scattergl.Selected` + instance or dict with compatible properties + selectedpoints + Array containing integer indices of selected points. + Has an effect only for traces that support selections. + Note that an empty array means an empty selection where + the `unselected` are turned on for all points, whereas, + any other non-array values means no selection all where + the `selected` and `unselected` styles have no effect. + showlegend + Determines whether or not an item corresponding to this + trace is shown in the legend. + stream + :class:`plotly.graph_objects.scattergl.Stream` instance + or dict with compatible properties + text + Sets text elements associated with each (x,y) pair. If + a single string, the same string appears over all the + data points. If an array of string, the items are + mapped in order to the this trace's (x,y) coordinates. + If trace `hoverinfo` contains a "text" flag and + "hovertext" is not set, these elements will be seen in + the hover labels. + textfont + Sets the text font. + textposition + Sets the positions of the `text` elements with respects + to the (x,y) coordinates. + textpositionsrc + Sets the source reference on Chart Studio Cloud for + `textposition`. + textsrc + Sets the source reference on Chart Studio Cloud for + `text`. + texttemplate + Template string used for rendering the information text + that appears on points. Note that this will override + `textinfo`. Variables are inserted using %{variable}, + for example "y: %{y}". Numbers are formatted using + d3-format's syntax %{variable:d3-format}, for example + "Price: %{y:$.2f}". + https://github.com/d3/d3-format/tree/v1.4.5#d3-format + for details on the formatting syntax. Dates are + formatted using d3-time-format's syntax + %{variable|d3-time-format}, for example "Day: + %{2019-01-01|%A}". https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format for details on the + date formatting syntax. Variables that can't be found + will be replaced with the specifier. For example, a + template of "data: %{x}, %{y}" will result in a value + of "data: 1, %{y}" if x is 1 and y is missing. + Variables with an undefined value will be replaced with + the fallback value. All attributes that can be + specified per-point (the ones that are `arrayOk: true`) + are available. + texttemplatefallback + Fallback string that's displayed when a variable + referenced in a template is missing. If the boolean + value 'false' is passed in, the specifier with the + missing variable will be displayed. + texttemplatesrc + Sets the source reference on Chart Studio Cloud for + `texttemplate`. + uid + Assign an id to this trace, Use this to provide object + constancy between traces during animations and + transitions. + uirevision + Controls persistence of some user-driven changes to the + trace: `constraintrange` in `parcoords` traces, as well + as some `editable: true` modifications such as `name` + and `colorbar.title`. Defaults to `layout.uirevision`. + Note that other user-driven trace attribute changes are + controlled by `layout` attributes: `trace.visible` is + controlled by `layout.legend.uirevision`, + `selectedpoints` is controlled by + `layout.selectionrevision`, and `colorbar.(x|y)` + (accessible with `config: {editable: true}`) is + controlled by `layout.editrevision`. Trace changes are + tracked by `uid`, which only falls back on trace index + if no `uid` is provided. So if your app can add/remove + traces before the end of the `data` array, such that + the same trace has a different index, you can still + preserve user-driven changes if you give each trace a + `uid` that stays with it as it moves. + unselected + :class:`plotly.graph_objects.scattergl.Unselected` + instance or dict with compatible properties + visible + Determines whether or not this trace is visible. If + "legendonly", the trace is not drawn, but can appear as + a legend item (provided that the legend itself is + visible). + x + Sets the x coordinates. + x0 + Alternate to `x`. Builds a linear space of x + coordinates. Use with `dx` where `x0` is the starting + coordinate and `dx` the step. + xaxis + Sets a reference between this trace's x coordinates and + a 2D cartesian x axis. If "x" (the default value), the + x coordinates refer to `layout.xaxis`. If "x2", the x + coordinates refer to `layout.xaxis2`, and so on. + xcalendar + Sets the calendar system to use with `x` date data. + xhoverformat + Sets the hover text formatting rulefor `x` using d3 + formatting mini-languages which are very similar to + those in Python. For numbers, see: + https://github.com/d3/d3-format/tree/v1.4.5#d3-format. + And for dates see: https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format. We add two items to + d3's date formatter: "%h" for half of the year as a + decimal number as well as "%{n}f" for fractional + seconds with n digits. For example, *2016-10-13 + 09:15:23.456* with tickformat "%H~%M~%S.%2f" would + display *09~15~23.46*By default the values are + formatted using `xaxis.hoverformat`. + xperiod + Only relevant when the axis `type` is "date". Sets the + period positioning in milliseconds or "M" on the x + axis. Special values in the form of "M" could be + used to declare the number of months. In this case `n` + must be a positive integer. + xperiod0 + Only relevant when the axis `type` is "date". Sets the + base for period positioning in milliseconds or date + string on the x0 axis. When `x0period` is round number + of weeks, the `x0period0` by default would be on a + Sunday i.e. 2000-01-02, otherwise it would be at + 2000-01-01. + xperiodalignment + Only relevant when the axis `type` is "date". Sets the + alignment of data points on the x axis. + xsrc + Sets the source reference on Chart Studio Cloud for + `x`. + y + Sets the y coordinates. + y0 + Alternate to `y`. Builds a linear space of y + coordinates. Use with `dy` where `y0` is the starting + coordinate and `dy` the step. + yaxis + Sets a reference between this trace's y coordinates and + a 2D cartesian y axis. If "y" (the default value), the + y coordinates refer to `layout.yaxis`. If "y2", the y + coordinates refer to `layout.yaxis2`, and so on. + ycalendar + Sets the calendar system to use with `y` date data. + yhoverformat + Sets the hover text formatting rulefor `y` using d3 + formatting mini-languages which are very similar to + those in Python. For numbers, see: + https://github.com/d3/d3-format/tree/v1.4.5#d3-format. + And for dates see: https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format. We add two items to + d3's date formatter: "%h" for half of the year as a + decimal number as well as "%{n}f" for fractional + seconds with n digits. For example, *2016-10-13 + 09:15:23.456* with tickformat "%H~%M~%S.%2f" would + display *09~15~23.46*By default the values are + formatted using `yaxis.hoverformat`. + yperiod + Only relevant when the axis `type` is "date". Sets the + period positioning in milliseconds or "M" on the y + axis. Special values in the form of "M" could be + used to declare the number of months. In this case `n` + must be a positive integer. + yperiod0 + Only relevant when the axis `type` is "date". Sets the + base for period positioning in milliseconds or date + string on the y0 axis. When `y0period` is round number + of weeks, the `y0period0` by default would be on a + Sunday i.e. 2000-01-02, otherwise it would be at + 2000-01-01. + yperiodalignment + Only relevant when the axis `type` is "date". Sets the + alignment of data points on the y axis. + ysrc + Sets the source reference on Chart Studio Cloud for + `y`. + + Returns + ------- + Scattergl + """ + super().__init__("scattergl") + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + if arg is None: + arg = {} + elif isinstance(arg, self.__class__): + arg = arg.to_plotly_json() + elif isinstance(arg, dict): + arg = _copy.copy(arg) + else: + raise ValueError("""\ +The first argument to the plotly.graph_objs.Scattergl +constructor must be a dict or +an instance of :class:`plotly.graph_objs.Scattergl`""") + + self._skip_invalid = kwargs.pop("skip_invalid", False) + self._validate = kwargs.pop("_validate", True) + + self._set_property("connectgaps", arg, connectgaps) + self._set_property("customdata", arg, customdata) + self._set_property("customdatasrc", arg, customdatasrc) + self._set_property("dx", arg, dx) + self._set_property("dy", arg, dy) + self._set_property("error_x", arg, error_x) + self._set_property("error_y", arg, error_y) + self._set_property("fill", arg, fill) + self._set_property("fillcolor", arg, fillcolor) + self._set_property("hoverinfo", arg, hoverinfo) + self._set_property("hoverinfosrc", arg, hoverinfosrc) + self._set_property("hoverlabel", arg, hoverlabel) + self._set_property("hovertemplate", arg, hovertemplate) + self._set_property("hovertemplatefallback", arg, hovertemplatefallback) + self._set_property("hovertemplatesrc", arg, hovertemplatesrc) + self._set_property("hovertext", arg, hovertext) + self._set_property("hovertextsrc", arg, hovertextsrc) + self._set_property("ids", arg, ids) + self._set_property("idssrc", arg, idssrc) + self._set_property("legend", arg, legend) + self._set_property("legendgroup", arg, legendgroup) + self._set_property("legendgrouptitle", arg, legendgrouptitle) + self._set_property("legendrank", arg, legendrank) + self._set_property("legendwidth", arg, legendwidth) + self._set_property("line", arg, line) + self._set_property("marker", arg, marker) + self._set_property("meta", arg, meta) + self._set_property("metasrc", arg, metasrc) + self._set_property("mode", arg, mode) + self._set_property("name", arg, name) + self._set_property("opacity", arg, opacity) + self._set_property("selected", arg, selected) + self._set_property("selectedpoints", arg, selectedpoints) + self._set_property("showlegend", arg, showlegend) + self._set_property("stream", arg, stream) + self._set_property("text", arg, text) + self._set_property("textfont", arg, textfont) + self._set_property("textposition", arg, textposition) + self._set_property("textpositionsrc", arg, textpositionsrc) + self._set_property("textsrc", arg, textsrc) + self._set_property("texttemplate", arg, texttemplate) + self._set_property("texttemplatefallback", arg, texttemplatefallback) + self._set_property("texttemplatesrc", arg, texttemplatesrc) + self._set_property("uid", arg, uid) + self._set_property("uirevision", arg, uirevision) + self._set_property("unselected", arg, unselected) + self._set_property("visible", arg, visible) + self._set_property("x", arg, x) + self._set_property("x0", arg, x0) + self._set_property("xaxis", arg, xaxis) + self._set_property("xcalendar", arg, xcalendar) + self._set_property("xhoverformat", arg, xhoverformat) + self._set_property("xperiod", arg, xperiod) + self._set_property("xperiod0", arg, xperiod0) + self._set_property("xperiodalignment", arg, xperiodalignment) + self._set_property("xsrc", arg, xsrc) + self._set_property("y", arg, y) + self._set_property("y0", arg, y0) + self._set_property("yaxis", arg, yaxis) + self._set_property("ycalendar", arg, ycalendar) + self._set_property("yhoverformat", arg, yhoverformat) + self._set_property("yperiod", arg, yperiod) + self._set_property("yperiod0", arg, yperiod0) + self._set_property("yperiodalignment", arg, yperiodalignment) + self._set_property("ysrc", arg, ysrc) + + self._props["type"] = "scattergl" + arg.pop("type", None) + self._process_kwargs(**dict(arg, **kwargs)) + self._skip_invalid = False diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/_scattermap.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/_scattermap.py new file mode 100644 index 0000000000000000000000000000000000000000..9d55304bacaf4cc762ffa5e7c3abf6b065000041 --- /dev/null +++ b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/_scattermap.py @@ -0,0 +1,1803 @@ +# --- THIS FILE IS AUTO-GENERATED --- +# Modifications will be overwitten the next time code generation run. + +from plotly.basedatatypes import BaseTraceType as _BaseTraceType +import copy as _copy + + +class Scattermap(_BaseTraceType): + _parent_path_str = "" + _path_str = "scattermap" + _valid_props = { + "below", + "cluster", + "connectgaps", + "customdata", + "customdatasrc", + "fill", + "fillcolor", + "hoverinfo", + "hoverinfosrc", + "hoverlabel", + "hovertemplate", + "hovertemplatefallback", + "hovertemplatesrc", + "hovertext", + "hovertextsrc", + "ids", + "idssrc", + "lat", + "latsrc", + "legend", + "legendgroup", + "legendgrouptitle", + "legendrank", + "legendwidth", + "line", + "lon", + "lonsrc", + "marker", + "meta", + "metasrc", + "mode", + "name", + "opacity", + "selected", + "selectedpoints", + "showlegend", + "stream", + "subplot", + "text", + "textfont", + "textposition", + "textsrc", + "texttemplate", + "texttemplatefallback", + "texttemplatesrc", + "type", + "uid", + "uirevision", + "unselected", + "visible", + } + + @property + def below(self): + """ + Determines if this scattermap trace's layers are to be inserted + before the layer with the specified ID. By default, scattermap + layers are inserted above all the base layers. To place the + scattermap layers above every other layer, set `below` to "''". + + The 'below' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["below"] + + @below.setter + def below(self, val): + self["below"] = val + + @property + def cluster(self): + """ + The 'cluster' property is an instance of Cluster + that may be specified as: + - An instance of :class:`plotly.graph_objs.scattermap.Cluster` + - A dict of string/value properties that will be passed + to the Cluster constructor + + Returns + ------- + plotly.graph_objs.scattermap.Cluster + """ + return self["cluster"] + + @cluster.setter + def cluster(self, val): + self["cluster"] = val + + @property + def connectgaps(self): + """ + Determines whether or not gaps (i.e. {nan} or missing values) + in the provided data arrays are connected. + + The 'connectgaps' property is a boolean and must be specified as: + - A boolean value: True or False + + Returns + ------- + bool + """ + return self["connectgaps"] + + @connectgaps.setter + def connectgaps(self, val): + self["connectgaps"] = val + + @property + def customdata(self): + """ + Assigns extra data each datum. This may be useful when + listening to hover, click and selection events. Note that, + "scatter" traces also appends customdata items in the markers + DOM elements + + The 'customdata' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["customdata"] + + @customdata.setter + def customdata(self, val): + self["customdata"] = val + + @property + def customdatasrc(self): + """ + Sets the source reference on Chart Studio Cloud for + `customdata`. + + The 'customdatasrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["customdatasrc"] + + @customdatasrc.setter + def customdatasrc(self, val): + self["customdatasrc"] = val + + @property + def fill(self): + """ + Sets the area to fill with a solid color. Use with `fillcolor` + if not "none". "toself" connects the endpoints of the trace (or + each segment of the trace if it has gaps) into a closed shape. + + The 'fill' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['none', 'toself'] + + Returns + ------- + Any + """ + return self["fill"] + + @fill.setter + def fill(self, val): + self["fill"] = val + + @property + def fillcolor(self): + """ + Sets the fill color. Defaults to a half-transparent variant of + the line color, marker color, or marker line color, whichever + is available. + + The 'fillcolor' property is a color and may be specified as: + - A hex string (e.g. '#ff0000') + - An rgb/rgba string (e.g. 'rgb(255,0,0)') + - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') + - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') + - A named CSS color: see https://plotly.com/python/css-colors/ for a list + + Returns + ------- + str + """ + return self["fillcolor"] + + @fillcolor.setter + def fillcolor(self, val): + self["fillcolor"] = val + + @property + def hoverinfo(self): + """ + Determines which trace information appear on hover. If `none` + or `skip` are set, no information is displayed upon hovering. + But, if `none` is set, click and hover events are still fired. + + The 'hoverinfo' property is a flaglist and may be specified + as a string containing: + - Any combination of ['lon', 'lat', 'text', 'name'] joined with '+' characters + (e.g. 'lon+lat') + OR exactly one of ['all', 'none', 'skip'] (e.g. 'skip') + - A list or array of the above + + Returns + ------- + Any|numpy.ndarray + """ + return self["hoverinfo"] + + @hoverinfo.setter + def hoverinfo(self, val): + self["hoverinfo"] = val + + @property + def hoverinfosrc(self): + """ + Sets the source reference on Chart Studio Cloud for + `hoverinfo`. + + The 'hoverinfosrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["hoverinfosrc"] + + @hoverinfosrc.setter + def hoverinfosrc(self, val): + self["hoverinfosrc"] = val + + @property + def hoverlabel(self): + """ + The 'hoverlabel' property is an instance of Hoverlabel + that may be specified as: + - An instance of :class:`plotly.graph_objs.scattermap.Hoverlabel` + - A dict of string/value properties that will be passed + to the Hoverlabel constructor + + Returns + ------- + plotly.graph_objs.scattermap.Hoverlabel + """ + return self["hoverlabel"] + + @hoverlabel.setter + def hoverlabel(self, val): + self["hoverlabel"] = val + + @property + def hovertemplate(self): + """ + Template string used for rendering the information that appear + on hover box. Note that this will override `hoverinfo`. + Variables are inserted using %{variable}, for example "y: %{y}" + as well as %{xother}, {%_xother}, {%_xother_}, {%xother_}. When + showing info for several points, "xother" will be added to + those with different x positions from the first point. An + underscore before or after "(x|y)other" will add a space on + that side, only when this field is shown. Numbers are formatted + using d3-format's syntax %{variable:d3-format}, for example + "Price: %{y:$.2f}". + https://github.com/d3/d3-format/tree/v1.4.5#d3-format for + details on the formatting syntax. Dates are formatted using + d3-time-format's syntax %{variable|d3-time-format}, for example + "Day: %{2019-01-01|%A}". https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format for details on the date + formatting syntax. Variables that can't be found will be + replaced with the specifier. For example, a template of "data: + %{x}, %{y}" will result in a value of "data: 1, %{y}" if x is 1 + and y is missing. Variables with an undefined value will be + replaced with the fallback value. The variables available in + `hovertemplate` are the ones emitted as event data described at + this link https://plotly.com/javascript/plotlyjs-events/#event- + data. Additionally, all attributes that can be specified per- + point (the ones that are `arrayOk: true`) are available. + Anything contained in tag `` is displayed in the + secondary box, for example `%{fullData.name}`. + To hide the secondary box completely, use an empty tag + ``. + + The 'hovertemplate' property is a string and must be specified as: + - A string + - A number that will be converted to a string + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["hovertemplate"] + + @hovertemplate.setter + def hovertemplate(self, val): + self["hovertemplate"] = val + + @property + def hovertemplatefallback(self): + """ + Fallback string that's displayed when a variable referenced in + a template is missing. If the boolean value 'false' is passed + in, the specifier with the missing variable will be displayed. + + The 'hovertemplatefallback' property accepts values of any type + + Returns + ------- + Any + """ + return self["hovertemplatefallback"] + + @hovertemplatefallback.setter + def hovertemplatefallback(self, val): + self["hovertemplatefallback"] = val + + @property + def hovertemplatesrc(self): + """ + Sets the source reference on Chart Studio Cloud for + `hovertemplate`. + + The 'hovertemplatesrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["hovertemplatesrc"] + + @hovertemplatesrc.setter + def hovertemplatesrc(self, val): + self["hovertemplatesrc"] = val + + @property + def hovertext(self): + """ + Sets hover text elements associated with each (lon,lat) pair If + a single string, the same string appears over all the data + points. If an array of string, the items are mapped in order to + the this trace's (lon,lat) coordinates. To be seen, trace + `hoverinfo` must contain a "text" flag. + + The 'hovertext' property is a string and must be specified as: + - A string + - A number that will be converted to a string + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["hovertext"] + + @hovertext.setter + def hovertext(self, val): + self["hovertext"] = val + + @property + def hovertextsrc(self): + """ + Sets the source reference on Chart Studio Cloud for + `hovertext`. + + The 'hovertextsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["hovertextsrc"] + + @hovertextsrc.setter + def hovertextsrc(self, val): + self["hovertextsrc"] = val + + @property + def ids(self): + """ + Assigns id labels to each datum. These ids for object constancy + of data points during animation. Should be an array of strings, + not numbers or any other type. + + The 'ids' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["ids"] + + @ids.setter + def ids(self, val): + self["ids"] = val + + @property + def idssrc(self): + """ + Sets the source reference on Chart Studio Cloud for `ids`. + + The 'idssrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["idssrc"] + + @idssrc.setter + def idssrc(self, val): + self["idssrc"] = val + + @property + def lat(self): + """ + Sets the latitude coordinates (in degrees North). + + The 'lat' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["lat"] + + @lat.setter + def lat(self, val): + self["lat"] = val + + @property + def latsrc(self): + """ + Sets the source reference on Chart Studio Cloud for `lat`. + + The 'latsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["latsrc"] + + @latsrc.setter + def latsrc(self, val): + self["latsrc"] = val + + @property + def legend(self): + """ + Sets the reference to a legend to show this trace in. + References to these legends are "legend", "legend2", "legend3", + etc. Settings for these legends are set in the layout, under + `layout.legend`, `layout.legend2`, etc. + + The 'legend' property is an identifier of a particular + subplot, of type 'legend', that may be specified as: + - the string 'legend' optionally followed by an integer >= 1 + (e.g. 'legend', 'legend1', 'legend2', 'legend3', etc.) + + Returns + ------- + str + """ + return self["legend"] + + @legend.setter + def legend(self, val): + self["legend"] = val + + @property + def legendgroup(self): + """ + Sets the legend group for this trace. Traces and shapes part of + the same legend group hide/show at the same time when toggling + legend items. + + The 'legendgroup' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["legendgroup"] + + @legendgroup.setter + def legendgroup(self, val): + self["legendgroup"] = val + + @property + def legendgrouptitle(self): + """ + The 'legendgrouptitle' property is an instance of Legendgrouptitle + that may be specified as: + - An instance of :class:`plotly.graph_objs.scattermap.Legendgrouptitle` + - A dict of string/value properties that will be passed + to the Legendgrouptitle constructor + + Returns + ------- + plotly.graph_objs.scattermap.Legendgrouptitle + """ + return self["legendgrouptitle"] + + @legendgrouptitle.setter + def legendgrouptitle(self, val): + self["legendgrouptitle"] = val + + @property + def legendrank(self): + """ + Sets the legend rank for this trace. Items and groups with + smaller ranks are presented on top/left side while with + "reversed" `legend.traceorder` they are on bottom/right side. + The default legendrank is 1000, so that you can use ranks less + than 1000 to place certain items before all unranked items, and + ranks greater than 1000 to go after all unranked items. When + having unranked or equal rank items shapes would be displayed + after traces i.e. according to their order in data and layout. + + The 'legendrank' property is a number and may be specified as: + - An int or float + + Returns + ------- + int|float + """ + return self["legendrank"] + + @legendrank.setter + def legendrank(self, val): + self["legendrank"] = val + + @property + def legendwidth(self): + """ + Sets the width (in px or fraction) of the legend for this + trace. + + The 'legendwidth' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["legendwidth"] + + @legendwidth.setter + def legendwidth(self, val): + self["legendwidth"] = val + + @property + def line(self): + """ + The 'line' property is an instance of Line + that may be specified as: + - An instance of :class:`plotly.graph_objs.scattermap.Line` + - A dict of string/value properties that will be passed + to the Line constructor + + Returns + ------- + plotly.graph_objs.scattermap.Line + """ + return self["line"] + + @line.setter + def line(self, val): + self["line"] = val + + @property + def lon(self): + """ + Sets the longitude coordinates (in degrees East). + + The 'lon' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["lon"] + + @lon.setter + def lon(self, val): + self["lon"] = val + + @property + def lonsrc(self): + """ + Sets the source reference on Chart Studio Cloud for `lon`. + + The 'lonsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["lonsrc"] + + @lonsrc.setter + def lonsrc(self, val): + self["lonsrc"] = val + + @property + def marker(self): + """ + The 'marker' property is an instance of Marker + that may be specified as: + - An instance of :class:`plotly.graph_objs.scattermap.Marker` + - A dict of string/value properties that will be passed + to the Marker constructor + + Returns + ------- + plotly.graph_objs.scattermap.Marker + """ + return self["marker"] + + @marker.setter + def marker(self, val): + self["marker"] = val + + @property + def meta(self): + """ + Assigns extra meta information associated with this trace that + can be used in various text attributes. Attributes such as + trace `name`, graph, axis and colorbar `title.text`, annotation + `text` `rangeselector`, `updatemenues` and `sliders` `label` + text all support `meta`. To access the trace `meta` values in + an attribute in the same trace, simply use `%{meta[i]}` where + `i` is the index or key of the `meta` item in question. To + access trace `meta` in layout attributes, use + `%{data[n[.meta[i]}` where `i` is the index or key of the + `meta` and `n` is the trace index. + + The 'meta' property accepts values of any type + + Returns + ------- + Any|numpy.ndarray + """ + return self["meta"] + + @meta.setter + def meta(self, val): + self["meta"] = val + + @property + def metasrc(self): + """ + Sets the source reference on Chart Studio Cloud for `meta`. + + The 'metasrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["metasrc"] + + @metasrc.setter + def metasrc(self, val): + self["metasrc"] = val + + @property + def mode(self): + """ + Determines the drawing mode for this scatter trace. If the + provided `mode` includes "text" then the `text` elements appear + at the coordinates. Otherwise, the `text` elements appear on + hover. + + The 'mode' property is a flaglist and may be specified + as a string containing: + - Any combination of ['lines', 'markers', 'text'] joined with '+' characters + (e.g. 'lines+markers') + OR exactly one of ['none'] (e.g. 'none') + + Returns + ------- + Any + """ + return self["mode"] + + @mode.setter + def mode(self, val): + self["mode"] = val + + @property + def name(self): + """ + Sets the trace name. The trace name appears as the legend item + and on hover. + + The 'name' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["name"] + + @name.setter + def name(self, val): + self["name"] = val + + @property + def opacity(self): + """ + Sets the opacity of the trace. + + The 'opacity' property is a number and may be specified as: + - An int or float in the interval [0, 1] + + Returns + ------- + int|float + """ + return self["opacity"] + + @opacity.setter + def opacity(self, val): + self["opacity"] = val + + @property + def selected(self): + """ + The 'selected' property is an instance of Selected + that may be specified as: + - An instance of :class:`plotly.graph_objs.scattermap.Selected` + - A dict of string/value properties that will be passed + to the Selected constructor + + Returns + ------- + plotly.graph_objs.scattermap.Selected + """ + return self["selected"] + + @selected.setter + def selected(self, val): + self["selected"] = val + + @property + def selectedpoints(self): + """ + Array containing integer indices of selected points. Has an + effect only for traces that support selections. Note that an + empty array means an empty selection where the `unselected` are + turned on for all points, whereas, any other non-array values + means no selection all where the `selected` and `unselected` + styles have no effect. + + The 'selectedpoints' property accepts values of any type + + Returns + ------- + Any + """ + return self["selectedpoints"] + + @selectedpoints.setter + def selectedpoints(self, val): + self["selectedpoints"] = val + + @property + def showlegend(self): + """ + Determines whether or not an item corresponding to this trace + is shown in the legend. + + The 'showlegend' property is a boolean and must be specified as: + - A boolean value: True or False + + Returns + ------- + bool + """ + return self["showlegend"] + + @showlegend.setter + def showlegend(self, val): + self["showlegend"] = val + + @property + def stream(self): + """ + The 'stream' property is an instance of Stream + that may be specified as: + - An instance of :class:`plotly.graph_objs.scattermap.Stream` + - A dict of string/value properties that will be passed + to the Stream constructor + + Returns + ------- + plotly.graph_objs.scattermap.Stream + """ + return self["stream"] + + @stream.setter + def stream(self, val): + self["stream"] = val + + @property + def subplot(self): + """ + Sets a reference between this trace's data coordinates and a + map subplot. If "map" (the default value), the data refer to + `layout.map`. If "map2", the data refer to `layout.map2`, and + so on. + + The 'subplot' property is an identifier of a particular + subplot, of type 'map', that may be specified as: + - the string 'map' optionally followed by an integer >= 1 + (e.g. 'map', 'map1', 'map2', 'map3', etc.) + + Returns + ------- + str + """ + return self["subplot"] + + @subplot.setter + def subplot(self, val): + self["subplot"] = val + + @property + def text(self): + """ + Sets text elements associated with each (lon,lat) pair If a + single string, the same string appears over all the data + points. If an array of string, the items are mapped in order to + the this trace's (lon,lat) coordinates. If trace `hoverinfo` + contains a "text" flag and "hovertext" is not set, these + elements will be seen in the hover labels. + + The 'text' property is a string and must be specified as: + - A string + - A number that will be converted to a string + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["text"] + + @text.setter + def text(self, val): + self["text"] = val + + @property + def textfont(self): + """ + Sets the icon text font (color=map.layer.paint.text-color, + size=map.layer.layout.text-size). Has an effect only when + `type` is set to "symbol". + + The 'textfont' property is an instance of Textfont + that may be specified as: + - An instance of :class:`plotly.graph_objs.scattermap.Textfont` + - A dict of string/value properties that will be passed + to the Textfont constructor + + Returns + ------- + plotly.graph_objs.scattermap.Textfont + """ + return self["textfont"] + + @textfont.setter + def textfont(self, val): + self["textfont"] = val + + @property + def textposition(self): + """ + Sets the positions of the `text` elements with respects to the + (x,y) coordinates. + + The 'textposition' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['top left', 'top center', 'top right', 'middle left', + 'middle center', 'middle right', 'bottom left', 'bottom + center', 'bottom right'] + + Returns + ------- + Any + """ + return self["textposition"] + + @textposition.setter + def textposition(self, val): + self["textposition"] = val + + @property + def textsrc(self): + """ + Sets the source reference on Chart Studio Cloud for `text`. + + The 'textsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["textsrc"] + + @textsrc.setter + def textsrc(self, val): + self["textsrc"] = val + + @property + def texttemplate(self): + """ + Template string used for rendering the information text that + appears on points. Note that this will override `textinfo`. + Variables are inserted using %{variable}, for example "y: + %{y}". Numbers are formatted using d3-format's syntax + %{variable:d3-format}, for example "Price: %{y:$.2f}". + https://github.com/d3/d3-format/tree/v1.4.5#d3-format for + details on the formatting syntax. Dates are formatted using + d3-time-format's syntax %{variable|d3-time-format}, for example + "Day: %{2019-01-01|%A}". https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format for details on the date + formatting syntax. Variables that can't be found will be + replaced with the specifier. For example, a template of "data: + %{x}, %{y}" will result in a value of "data: 1, %{y}" if x is 1 + and y is missing. Variables with an undefined value will be + replaced with the fallback value. All attributes that can be + specified per-point (the ones that are `arrayOk: true`) are + available. Finally, the template string has access to variables + `lat`, `lon` and `text`. + + The 'texttemplate' property is a string and must be specified as: + - A string + - A number that will be converted to a string + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["texttemplate"] + + @texttemplate.setter + def texttemplate(self, val): + self["texttemplate"] = val + + @property + def texttemplatefallback(self): + """ + Fallback string that's displayed when a variable referenced in + a template is missing. If the boolean value 'false' is passed + in, the specifier with the missing variable will be displayed. + + The 'texttemplatefallback' property accepts values of any type + + Returns + ------- + Any + """ + return self["texttemplatefallback"] + + @texttemplatefallback.setter + def texttemplatefallback(self, val): + self["texttemplatefallback"] = val + + @property + def texttemplatesrc(self): + """ + Sets the source reference on Chart Studio Cloud for + `texttemplate`. + + The 'texttemplatesrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["texttemplatesrc"] + + @texttemplatesrc.setter + def texttemplatesrc(self, val): + self["texttemplatesrc"] = val + + @property + def uid(self): + """ + Assign an id to this trace, Use this to provide object + constancy between traces during animations and transitions. + + The 'uid' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["uid"] + + @uid.setter + def uid(self, val): + self["uid"] = val + + @property + def uirevision(self): + """ + Controls persistence of some user-driven changes to the trace: + `constraintrange` in `parcoords` traces, as well as some + `editable: true` modifications such as `name` and + `colorbar.title`. Defaults to `layout.uirevision`. Note that + other user-driven trace attribute changes are controlled by + `layout` attributes: `trace.visible` is controlled by + `layout.legend.uirevision`, `selectedpoints` is controlled by + `layout.selectionrevision`, and `colorbar.(x|y)` (accessible + with `config: {editable: true}`) is controlled by + `layout.editrevision`. Trace changes are tracked by `uid`, + which only falls back on trace index if no `uid` is provided. + So if your app can add/remove traces before the end of the + `data` array, such that the same trace has a different index, + you can still preserve user-driven changes if you give each + trace a `uid` that stays with it as it moves. + + The 'uirevision' property accepts values of any type + + Returns + ------- + Any + """ + return self["uirevision"] + + @uirevision.setter + def uirevision(self, val): + self["uirevision"] = val + + @property + def unselected(self): + """ + The 'unselected' property is an instance of Unselected + that may be specified as: + - An instance of :class:`plotly.graph_objs.scattermap.Unselected` + - A dict of string/value properties that will be passed + to the Unselected constructor + + Returns + ------- + plotly.graph_objs.scattermap.Unselected + """ + return self["unselected"] + + @unselected.setter + def unselected(self, val): + self["unselected"] = val + + @property + def visible(self): + """ + Determines whether or not this trace is visible. If + "legendonly", the trace is not drawn, but can appear as a + legend item (provided that the legend itself is visible). + + The 'visible' property is an enumeration that may be specified as: + - One of the following enumeration values: + [True, False, 'legendonly'] + + Returns + ------- + Any + """ + return self["visible"] + + @visible.setter + def visible(self, val): + self["visible"] = val + + @property + def type(self): + return self._props["type"] + + @property + def _prop_descriptions(self): + return """\ + below + Determines if this scattermap trace's layers are to be + inserted before the layer with the specified ID. By + default, scattermap layers are inserted above all the + base layers. To place the scattermap layers above every + other layer, set `below` to "''". + cluster + :class:`plotly.graph_objects.scattermap.Cluster` + instance or dict with compatible properties + connectgaps + Determines whether or not gaps (i.e. {nan} or missing + values) in the provided data arrays are connected. + customdata + Assigns extra data each datum. This may be useful when + listening to hover, click and selection events. Note + that, "scatter" traces also appends customdata items in + the markers DOM elements + customdatasrc + Sets the source reference on Chart Studio Cloud for + `customdata`. + fill + Sets the area to fill with a solid color. Use with + `fillcolor` if not "none". "toself" connects the + endpoints of the trace (or each segment of the trace if + it has gaps) into a closed shape. + fillcolor + Sets the fill color. Defaults to a half-transparent + variant of the line color, marker color, or marker line + color, whichever is available. + hoverinfo + Determines which trace information appear on hover. If + `none` or `skip` are set, no information is displayed + upon hovering. But, if `none` is set, click and hover + events are still fired. + hoverinfosrc + Sets the source reference on Chart Studio Cloud for + `hoverinfo`. + hoverlabel + :class:`plotly.graph_objects.scattermap.Hoverlabel` + instance or dict with compatible properties + hovertemplate + Template string used for rendering the information that + appear on hover box. Note that this will override + `hoverinfo`. Variables are inserted using %{variable}, + for example "y: %{y}" as well as %{xother}, {%_xother}, + {%_xother_}, {%xother_}. When showing info for several + points, "xother" will be added to those with different + x positions from the first point. An underscore before + or after "(x|y)other" will add a space on that side, + only when this field is shown. Numbers are formatted + using d3-format's syntax %{variable:d3-format}, for + example "Price: %{y:$.2f}". + https://github.com/d3/d3-format/tree/v1.4.5#d3-format + for details on the formatting syntax. Dates are + formatted using d3-time-format's syntax + %{variable|d3-time-format}, for example "Day: + %{2019-01-01|%A}". https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format for details on the + date formatting syntax. Variables that can't be found + will be replaced with the specifier. For example, a + template of "data: %{x}, %{y}" will result in a value + of "data: 1, %{y}" if x is 1 and y is missing. + Variables with an undefined value will be replaced with + the fallback value. The variables available in + `hovertemplate` are the ones emitted as event data + described at this link + https://plotly.com/javascript/plotlyjs-events/#event- + data. Additionally, all attributes that can be + specified per-point (the ones that are `arrayOk: true`) + are available. Anything contained in tag `` is + displayed in the secondary box, for example + `%{fullData.name}`. To hide the + secondary box completely, use an empty tag + ``. + hovertemplatefallback + Fallback string that's displayed when a variable + referenced in a template is missing. If the boolean + value 'false' is passed in, the specifier with the + missing variable will be displayed. + hovertemplatesrc + Sets the source reference on Chart Studio Cloud for + `hovertemplate`. + hovertext + Sets hover text elements associated with each (lon,lat) + pair If a single string, the same string appears over + all the data points. If an array of string, the items + are mapped in order to the this trace's (lon,lat) + coordinates. To be seen, trace `hoverinfo` must contain + a "text" flag. + hovertextsrc + Sets the source reference on Chart Studio Cloud for + `hovertext`. + ids + Assigns id labels to each datum. These ids for object + constancy of data points during animation. Should be an + array of strings, not numbers or any other type. + idssrc + Sets the source reference on Chart Studio Cloud for + `ids`. + lat + Sets the latitude coordinates (in degrees North). + latsrc + Sets the source reference on Chart Studio Cloud for + `lat`. + legend + Sets the reference to a legend to show this trace in. + References to these legends are "legend", "legend2", + "legend3", etc. Settings for these legends are set in + the layout, under `layout.legend`, `layout.legend2`, + etc. + legendgroup + Sets the legend group for this trace. Traces and shapes + part of the same legend group hide/show at the same + time when toggling legend items. + legendgrouptitle + :class:`plotly.graph_objects.scattermap.Legendgrouptitl + e` instance or dict with compatible properties + legendrank + Sets the legend rank for this trace. Items and groups + with smaller ranks are presented on top/left side while + with "reversed" `legend.traceorder` they are on + bottom/right side. The default legendrank is 1000, so + that you can use ranks less than 1000 to place certain + items before all unranked items, and ranks greater than + 1000 to go after all unranked items. When having + unranked or equal rank items shapes would be displayed + after traces i.e. according to their order in data and + layout. + legendwidth + Sets the width (in px or fraction) of the legend for + this trace. + line + :class:`plotly.graph_objects.scattermap.Line` instance + or dict with compatible properties + lon + Sets the longitude coordinates (in degrees East). + lonsrc + Sets the source reference on Chart Studio Cloud for + `lon`. + marker + :class:`plotly.graph_objects.scattermap.Marker` + instance or dict with compatible properties + meta + Assigns extra meta information associated with this + trace that can be used in various text attributes. + Attributes such as trace `name`, graph, axis and + colorbar `title.text`, annotation `text` + `rangeselector`, `updatemenues` and `sliders` `label` + text all support `meta`. To access the trace `meta` + values in an attribute in the same trace, simply use + `%{meta[i]}` where `i` is the index or key of the + `meta` item in question. To access trace `meta` in + layout attributes, use `%{data[n[.meta[i]}` where `i` + is the index or key of the `meta` and `n` is the trace + index. + metasrc + Sets the source reference on Chart Studio Cloud for + `meta`. + mode + Determines the drawing mode for this scatter trace. If + the provided `mode` includes "text" then the `text` + elements appear at the coordinates. Otherwise, the + `text` elements appear on hover. + name + Sets the trace name. The trace name appears as the + legend item and on hover. + opacity + Sets the opacity of the trace. + selected + :class:`plotly.graph_objects.scattermap.Selected` + instance or dict with compatible properties + selectedpoints + Array containing integer indices of selected points. + Has an effect only for traces that support selections. + Note that an empty array means an empty selection where + the `unselected` are turned on for all points, whereas, + any other non-array values means no selection all where + the `selected` and `unselected` styles have no effect. + showlegend + Determines whether or not an item corresponding to this + trace is shown in the legend. + stream + :class:`plotly.graph_objects.scattermap.Stream` + instance or dict with compatible properties + subplot + Sets a reference between this trace's data coordinates + and a map subplot. If "map" (the default value), the + data refer to `layout.map`. If "map2", the data refer + to `layout.map2`, and so on. + text + Sets text elements associated with each (lon,lat) pair + If a single string, the same string appears over all + the data points. If an array of string, the items are + mapped in order to the this trace's (lon,lat) + coordinates. If trace `hoverinfo` contains a "text" + flag and "hovertext" is not set, these elements will be + seen in the hover labels. + textfont + Sets the icon text font (color=map.layer.paint.text- + color, size=map.layer.layout.text-size). Has an effect + only when `type` is set to "symbol". + textposition + Sets the positions of the `text` elements with respects + to the (x,y) coordinates. + textsrc + Sets the source reference on Chart Studio Cloud for + `text`. + texttemplate + Template string used for rendering the information text + that appears on points. Note that this will override + `textinfo`. Variables are inserted using %{variable}, + for example "y: %{y}". Numbers are formatted using + d3-format's syntax %{variable:d3-format}, for example + "Price: %{y:$.2f}". + https://github.com/d3/d3-format/tree/v1.4.5#d3-format + for details on the formatting syntax. Dates are + formatted using d3-time-format's syntax + %{variable|d3-time-format}, for example "Day: + %{2019-01-01|%A}". https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format for details on the + date formatting syntax. Variables that can't be found + will be replaced with the specifier. For example, a + template of "data: %{x}, %{y}" will result in a value + of "data: 1, %{y}" if x is 1 and y is missing. + Variables with an undefined value will be replaced with + the fallback value. All attributes that can be + specified per-point (the ones that are `arrayOk: true`) + are available. Finally, the template string has access + to variables `lat`, `lon` and `text`. + texttemplatefallback + Fallback string that's displayed when a variable + referenced in a template is missing. If the boolean + value 'false' is passed in, the specifier with the + missing variable will be displayed. + texttemplatesrc + Sets the source reference on Chart Studio Cloud for + `texttemplate`. + uid + Assign an id to this trace, Use this to provide object + constancy between traces during animations and + transitions. + uirevision + Controls persistence of some user-driven changes to the + trace: `constraintrange` in `parcoords` traces, as well + as some `editable: true` modifications such as `name` + and `colorbar.title`. Defaults to `layout.uirevision`. + Note that other user-driven trace attribute changes are + controlled by `layout` attributes: `trace.visible` is + controlled by `layout.legend.uirevision`, + `selectedpoints` is controlled by + `layout.selectionrevision`, and `colorbar.(x|y)` + (accessible with `config: {editable: true}`) is + controlled by `layout.editrevision`. Trace changes are + tracked by `uid`, which only falls back on trace index + if no `uid` is provided. So if your app can add/remove + traces before the end of the `data` array, such that + the same trace has a different index, you can still + preserve user-driven changes if you give each trace a + `uid` that stays with it as it moves. + unselected + :class:`plotly.graph_objects.scattermap.Unselected` + instance or dict with compatible properties + visible + Determines whether or not this trace is visible. If + "legendonly", the trace is not drawn, but can appear as + a legend item (provided that the legend itself is + visible). + """ + + def __init__( + self, + arg=None, + below=None, + cluster=None, + connectgaps=None, + customdata=None, + customdatasrc=None, + fill=None, + fillcolor=None, + hoverinfo=None, + hoverinfosrc=None, + hoverlabel=None, + hovertemplate=None, + hovertemplatefallback=None, + hovertemplatesrc=None, + hovertext=None, + hovertextsrc=None, + ids=None, + idssrc=None, + lat=None, + latsrc=None, + legend=None, + legendgroup=None, + legendgrouptitle=None, + legendrank=None, + legendwidth=None, + line=None, + lon=None, + lonsrc=None, + marker=None, + meta=None, + metasrc=None, + mode=None, + name=None, + opacity=None, + selected=None, + selectedpoints=None, + showlegend=None, + stream=None, + subplot=None, + text=None, + textfont=None, + textposition=None, + textsrc=None, + texttemplate=None, + texttemplatefallback=None, + texttemplatesrc=None, + uid=None, + uirevision=None, + unselected=None, + visible=None, + **kwargs, + ): + """ + Construct a new Scattermap object + + The data visualized as scatter point, lines or marker symbols + on a MapLibre GL geographic map is provided by + longitude/latitude pairs in `lon` and `lat`. + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of :class:`plotly.graph_objs.Scattermap` + below + Determines if this scattermap trace's layers are to be + inserted before the layer with the specified ID. By + default, scattermap layers are inserted above all the + base layers. To place the scattermap layers above every + other layer, set `below` to "''". + cluster + :class:`plotly.graph_objects.scattermap.Cluster` + instance or dict with compatible properties + connectgaps + Determines whether or not gaps (i.e. {nan} or missing + values) in the provided data arrays are connected. + customdata + Assigns extra data each datum. This may be useful when + listening to hover, click and selection events. Note + that, "scatter" traces also appends customdata items in + the markers DOM elements + customdatasrc + Sets the source reference on Chart Studio Cloud for + `customdata`. + fill + Sets the area to fill with a solid color. Use with + `fillcolor` if not "none". "toself" connects the + endpoints of the trace (or each segment of the trace if + it has gaps) into a closed shape. + fillcolor + Sets the fill color. Defaults to a half-transparent + variant of the line color, marker color, or marker line + color, whichever is available. + hoverinfo + Determines which trace information appear on hover. If + `none` or `skip` are set, no information is displayed + upon hovering. But, if `none` is set, click and hover + events are still fired. + hoverinfosrc + Sets the source reference on Chart Studio Cloud for + `hoverinfo`. + hoverlabel + :class:`plotly.graph_objects.scattermap.Hoverlabel` + instance or dict with compatible properties + hovertemplate + Template string used for rendering the information that + appear on hover box. Note that this will override + `hoverinfo`. Variables are inserted using %{variable}, + for example "y: %{y}" as well as %{xother}, {%_xother}, + {%_xother_}, {%xother_}. When showing info for several + points, "xother" will be added to those with different + x positions from the first point. An underscore before + or after "(x|y)other" will add a space on that side, + only when this field is shown. Numbers are formatted + using d3-format's syntax %{variable:d3-format}, for + example "Price: %{y:$.2f}". + https://github.com/d3/d3-format/tree/v1.4.5#d3-format + for details on the formatting syntax. Dates are + formatted using d3-time-format's syntax + %{variable|d3-time-format}, for example "Day: + %{2019-01-01|%A}". https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format for details on the + date formatting syntax. Variables that can't be found + will be replaced with the specifier. For example, a + template of "data: %{x}, %{y}" will result in a value + of "data: 1, %{y}" if x is 1 and y is missing. + Variables with an undefined value will be replaced with + the fallback value. The variables available in + `hovertemplate` are the ones emitted as event data + described at this link + https://plotly.com/javascript/plotlyjs-events/#event- + data. Additionally, all attributes that can be + specified per-point (the ones that are `arrayOk: true`) + are available. Anything contained in tag `` is + displayed in the secondary box, for example + `%{fullData.name}`. To hide the + secondary box completely, use an empty tag + ``. + hovertemplatefallback + Fallback string that's displayed when a variable + referenced in a template is missing. If the boolean + value 'false' is passed in, the specifier with the + missing variable will be displayed. + hovertemplatesrc + Sets the source reference on Chart Studio Cloud for + `hovertemplate`. + hovertext + Sets hover text elements associated with each (lon,lat) + pair If a single string, the same string appears over + all the data points. If an array of string, the items + are mapped in order to the this trace's (lon,lat) + coordinates. To be seen, trace `hoverinfo` must contain + a "text" flag. + hovertextsrc + Sets the source reference on Chart Studio Cloud for + `hovertext`. + ids + Assigns id labels to each datum. These ids for object + constancy of data points during animation. Should be an + array of strings, not numbers or any other type. + idssrc + Sets the source reference on Chart Studio Cloud for + `ids`. + lat + Sets the latitude coordinates (in degrees North). + latsrc + Sets the source reference on Chart Studio Cloud for + `lat`. + legend + Sets the reference to a legend to show this trace in. + References to these legends are "legend", "legend2", + "legend3", etc. Settings for these legends are set in + the layout, under `layout.legend`, `layout.legend2`, + etc. + legendgroup + Sets the legend group for this trace. Traces and shapes + part of the same legend group hide/show at the same + time when toggling legend items. + legendgrouptitle + :class:`plotly.graph_objects.scattermap.Legendgrouptitl + e` instance or dict with compatible properties + legendrank + Sets the legend rank for this trace. Items and groups + with smaller ranks are presented on top/left side while + with "reversed" `legend.traceorder` they are on + bottom/right side. The default legendrank is 1000, so + that you can use ranks less than 1000 to place certain + items before all unranked items, and ranks greater than + 1000 to go after all unranked items. When having + unranked or equal rank items shapes would be displayed + after traces i.e. according to their order in data and + layout. + legendwidth + Sets the width (in px or fraction) of the legend for + this trace. + line + :class:`plotly.graph_objects.scattermap.Line` instance + or dict with compatible properties + lon + Sets the longitude coordinates (in degrees East). + lonsrc + Sets the source reference on Chart Studio Cloud for + `lon`. + marker + :class:`plotly.graph_objects.scattermap.Marker` + instance or dict with compatible properties + meta + Assigns extra meta information associated with this + trace that can be used in various text attributes. + Attributes such as trace `name`, graph, axis and + colorbar `title.text`, annotation `text` + `rangeselector`, `updatemenues` and `sliders` `label` + text all support `meta`. To access the trace `meta` + values in an attribute in the same trace, simply use + `%{meta[i]}` where `i` is the index or key of the + `meta` item in question. To access trace `meta` in + layout attributes, use `%{data[n[.meta[i]}` where `i` + is the index or key of the `meta` and `n` is the trace + index. + metasrc + Sets the source reference on Chart Studio Cloud for + `meta`. + mode + Determines the drawing mode for this scatter trace. If + the provided `mode` includes "text" then the `text` + elements appear at the coordinates. Otherwise, the + `text` elements appear on hover. + name + Sets the trace name. The trace name appears as the + legend item and on hover. + opacity + Sets the opacity of the trace. + selected + :class:`plotly.graph_objects.scattermap.Selected` + instance or dict with compatible properties + selectedpoints + Array containing integer indices of selected points. + Has an effect only for traces that support selections. + Note that an empty array means an empty selection where + the `unselected` are turned on for all points, whereas, + any other non-array values means no selection all where + the `selected` and `unselected` styles have no effect. + showlegend + Determines whether or not an item corresponding to this + trace is shown in the legend. + stream + :class:`plotly.graph_objects.scattermap.Stream` + instance or dict with compatible properties + subplot + Sets a reference between this trace's data coordinates + and a map subplot. If "map" (the default value), the + data refer to `layout.map`. If "map2", the data refer + to `layout.map2`, and so on. + text + Sets text elements associated with each (lon,lat) pair + If a single string, the same string appears over all + the data points. If an array of string, the items are + mapped in order to the this trace's (lon,lat) + coordinates. If trace `hoverinfo` contains a "text" + flag and "hovertext" is not set, these elements will be + seen in the hover labels. + textfont + Sets the icon text font (color=map.layer.paint.text- + color, size=map.layer.layout.text-size). Has an effect + only when `type` is set to "symbol". + textposition + Sets the positions of the `text` elements with respects + to the (x,y) coordinates. + textsrc + Sets the source reference on Chart Studio Cloud for + `text`. + texttemplate + Template string used for rendering the information text + that appears on points. Note that this will override + `textinfo`. Variables are inserted using %{variable}, + for example "y: %{y}". Numbers are formatted using + d3-format's syntax %{variable:d3-format}, for example + "Price: %{y:$.2f}". + https://github.com/d3/d3-format/tree/v1.4.5#d3-format + for details on the formatting syntax. Dates are + formatted using d3-time-format's syntax + %{variable|d3-time-format}, for example "Day: + %{2019-01-01|%A}". https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format for details on the + date formatting syntax. Variables that can't be found + will be replaced with the specifier. For example, a + template of "data: %{x}, %{y}" will result in a value + of "data: 1, %{y}" if x is 1 and y is missing. + Variables with an undefined value will be replaced with + the fallback value. All attributes that can be + specified per-point (the ones that are `arrayOk: true`) + are available. Finally, the template string has access + to variables `lat`, `lon` and `text`. + texttemplatefallback + Fallback string that's displayed when a variable + referenced in a template is missing. If the boolean + value 'false' is passed in, the specifier with the + missing variable will be displayed. + texttemplatesrc + Sets the source reference on Chart Studio Cloud for + `texttemplate`. + uid + Assign an id to this trace, Use this to provide object + constancy between traces during animations and + transitions. + uirevision + Controls persistence of some user-driven changes to the + trace: `constraintrange` in `parcoords` traces, as well + as some `editable: true` modifications such as `name` + and `colorbar.title`. Defaults to `layout.uirevision`. + Note that other user-driven trace attribute changes are + controlled by `layout` attributes: `trace.visible` is + controlled by `layout.legend.uirevision`, + `selectedpoints` is controlled by + `layout.selectionrevision`, and `colorbar.(x|y)` + (accessible with `config: {editable: true}`) is + controlled by `layout.editrevision`. Trace changes are + tracked by `uid`, which only falls back on trace index + if no `uid` is provided. So if your app can add/remove + traces before the end of the `data` array, such that + the same trace has a different index, you can still + preserve user-driven changes if you give each trace a + `uid` that stays with it as it moves. + unselected + :class:`plotly.graph_objects.scattermap.Unselected` + instance or dict with compatible properties + visible + Determines whether or not this trace is visible. If + "legendonly", the trace is not drawn, but can appear as + a legend item (provided that the legend itself is + visible). + + Returns + ------- + Scattermap + """ + super().__init__("scattermap") + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + if arg is None: + arg = {} + elif isinstance(arg, self.__class__): + arg = arg.to_plotly_json() + elif isinstance(arg, dict): + arg = _copy.copy(arg) + else: + raise ValueError("""\ +The first argument to the plotly.graph_objs.Scattermap +constructor must be a dict or +an instance of :class:`plotly.graph_objs.Scattermap`""") + + self._skip_invalid = kwargs.pop("skip_invalid", False) + self._validate = kwargs.pop("_validate", True) + + self._set_property("below", arg, below) + self._set_property("cluster", arg, cluster) + self._set_property("connectgaps", arg, connectgaps) + self._set_property("customdata", arg, customdata) + self._set_property("customdatasrc", arg, customdatasrc) + self._set_property("fill", arg, fill) + self._set_property("fillcolor", arg, fillcolor) + self._set_property("hoverinfo", arg, hoverinfo) + self._set_property("hoverinfosrc", arg, hoverinfosrc) + self._set_property("hoverlabel", arg, hoverlabel) + self._set_property("hovertemplate", arg, hovertemplate) + self._set_property("hovertemplatefallback", arg, hovertemplatefallback) + self._set_property("hovertemplatesrc", arg, hovertemplatesrc) + self._set_property("hovertext", arg, hovertext) + self._set_property("hovertextsrc", arg, hovertextsrc) + self._set_property("ids", arg, ids) + self._set_property("idssrc", arg, idssrc) + self._set_property("lat", arg, lat) + self._set_property("latsrc", arg, latsrc) + self._set_property("legend", arg, legend) + self._set_property("legendgroup", arg, legendgroup) + self._set_property("legendgrouptitle", arg, legendgrouptitle) + self._set_property("legendrank", arg, legendrank) + self._set_property("legendwidth", arg, legendwidth) + self._set_property("line", arg, line) + self._set_property("lon", arg, lon) + self._set_property("lonsrc", arg, lonsrc) + self._set_property("marker", arg, marker) + self._set_property("meta", arg, meta) + self._set_property("metasrc", arg, metasrc) + self._set_property("mode", arg, mode) + self._set_property("name", arg, name) + self._set_property("opacity", arg, opacity) + self._set_property("selected", arg, selected) + self._set_property("selectedpoints", arg, selectedpoints) + self._set_property("showlegend", arg, showlegend) + self._set_property("stream", arg, stream) + self._set_property("subplot", arg, subplot) + self._set_property("text", arg, text) + self._set_property("textfont", arg, textfont) + self._set_property("textposition", arg, textposition) + self._set_property("textsrc", arg, textsrc) + self._set_property("texttemplate", arg, texttemplate) + self._set_property("texttemplatefallback", arg, texttemplatefallback) + self._set_property("texttemplatesrc", arg, texttemplatesrc) + self._set_property("uid", arg, uid) + self._set_property("uirevision", arg, uirevision) + self._set_property("unselected", arg, unselected) + self._set_property("visible", arg, visible) + + self._props["type"] = "scattermap" + arg.pop("type", None) + self._process_kwargs(**dict(arg, **kwargs)) + self._skip_invalid = False diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/_scattermapbox.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/_scattermapbox.py new file mode 100644 index 0000000000000000000000000000000000000000..e6fe0cef217d377f0da9debb7f776ccf7b6687ac --- /dev/null +++ b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/_scattermapbox.py @@ -0,0 +1,1831 @@ +# --- THIS FILE IS AUTO-GENERATED --- +# Modifications will be overwitten the next time code generation run. + +from plotly.basedatatypes import BaseTraceType as _BaseTraceType +import copy as _copy +import warnings + + +class Scattermapbox(_BaseTraceType): + _parent_path_str = "" + _path_str = "scattermapbox" + _valid_props = { + "below", + "cluster", + "connectgaps", + "customdata", + "customdatasrc", + "fill", + "fillcolor", + "hoverinfo", + "hoverinfosrc", + "hoverlabel", + "hovertemplate", + "hovertemplatefallback", + "hovertemplatesrc", + "hovertext", + "hovertextsrc", + "ids", + "idssrc", + "lat", + "latsrc", + "legend", + "legendgroup", + "legendgrouptitle", + "legendrank", + "legendwidth", + "line", + "lon", + "lonsrc", + "marker", + "meta", + "metasrc", + "mode", + "name", + "opacity", + "selected", + "selectedpoints", + "showlegend", + "stream", + "subplot", + "text", + "textfont", + "textposition", + "textsrc", + "texttemplate", + "texttemplatefallback", + "texttemplatesrc", + "type", + "uid", + "uirevision", + "unselected", + "visible", + } + + @property + def below(self): + """ + Determines if this scattermapbox trace's layers are to be + inserted before the layer with the specified ID. By default, + scattermapbox layers are inserted above all the base layers. To + place the scattermapbox layers above every other layer, set + `below` to "''". + + The 'below' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["below"] + + @below.setter + def below(self, val): + self["below"] = val + + @property + def cluster(self): + """ + The 'cluster' property is an instance of Cluster + that may be specified as: + - An instance of :class:`plotly.graph_objs.scattermapbox.Cluster` + - A dict of string/value properties that will be passed + to the Cluster constructor + + Returns + ------- + plotly.graph_objs.scattermapbox.Cluster + """ + return self["cluster"] + + @cluster.setter + def cluster(self, val): + self["cluster"] = val + + @property + def connectgaps(self): + """ + Determines whether or not gaps (i.e. {nan} or missing values) + in the provided data arrays are connected. + + The 'connectgaps' property is a boolean and must be specified as: + - A boolean value: True or False + + Returns + ------- + bool + """ + return self["connectgaps"] + + @connectgaps.setter + def connectgaps(self, val): + self["connectgaps"] = val + + @property + def customdata(self): + """ + Assigns extra data each datum. This may be useful when + listening to hover, click and selection events. Note that, + "scatter" traces also appends customdata items in the markers + DOM elements + + The 'customdata' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["customdata"] + + @customdata.setter + def customdata(self, val): + self["customdata"] = val + + @property + def customdatasrc(self): + """ + Sets the source reference on Chart Studio Cloud for + `customdata`. + + The 'customdatasrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["customdatasrc"] + + @customdatasrc.setter + def customdatasrc(self, val): + self["customdatasrc"] = val + + @property + def fill(self): + """ + Sets the area to fill with a solid color. Use with `fillcolor` + if not "none". "toself" connects the endpoints of the trace (or + each segment of the trace if it has gaps) into a closed shape. + + The 'fill' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['none', 'toself'] + + Returns + ------- + Any + """ + return self["fill"] + + @fill.setter + def fill(self, val): + self["fill"] = val + + @property + def fillcolor(self): + """ + Sets the fill color. Defaults to a half-transparent variant of + the line color, marker color, or marker line color, whichever + is available. + + The 'fillcolor' property is a color and may be specified as: + - A hex string (e.g. '#ff0000') + - An rgb/rgba string (e.g. 'rgb(255,0,0)') + - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') + - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') + - A named CSS color: see https://plotly.com/python/css-colors/ for a list + + Returns + ------- + str + """ + return self["fillcolor"] + + @fillcolor.setter + def fillcolor(self, val): + self["fillcolor"] = val + + @property + def hoverinfo(self): + """ + Determines which trace information appear on hover. If `none` + or `skip` are set, no information is displayed upon hovering. + But, if `none` is set, click and hover events are still fired. + + The 'hoverinfo' property is a flaglist and may be specified + as a string containing: + - Any combination of ['lon', 'lat', 'text', 'name'] joined with '+' characters + (e.g. 'lon+lat') + OR exactly one of ['all', 'none', 'skip'] (e.g. 'skip') + - A list or array of the above + + Returns + ------- + Any|numpy.ndarray + """ + return self["hoverinfo"] + + @hoverinfo.setter + def hoverinfo(self, val): + self["hoverinfo"] = val + + @property + def hoverinfosrc(self): + """ + Sets the source reference on Chart Studio Cloud for + `hoverinfo`. + + The 'hoverinfosrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["hoverinfosrc"] + + @hoverinfosrc.setter + def hoverinfosrc(self, val): + self["hoverinfosrc"] = val + + @property + def hoverlabel(self): + """ + The 'hoverlabel' property is an instance of Hoverlabel + that may be specified as: + - An instance of :class:`plotly.graph_objs.scattermapbox.Hoverlabel` + - A dict of string/value properties that will be passed + to the Hoverlabel constructor + + Returns + ------- + plotly.graph_objs.scattermapbox.Hoverlabel + """ + return self["hoverlabel"] + + @hoverlabel.setter + def hoverlabel(self, val): + self["hoverlabel"] = val + + @property + def hovertemplate(self): + """ + Template string used for rendering the information that appear + on hover box. Note that this will override `hoverinfo`. + Variables are inserted using %{variable}, for example "y: %{y}" + as well as %{xother}, {%_xother}, {%_xother_}, {%xother_}. When + showing info for several points, "xother" will be added to + those with different x positions from the first point. An + underscore before or after "(x|y)other" will add a space on + that side, only when this field is shown. Numbers are formatted + using d3-format's syntax %{variable:d3-format}, for example + "Price: %{y:$.2f}". + https://github.com/d3/d3-format/tree/v1.4.5#d3-format for + details on the formatting syntax. Dates are formatted using + d3-time-format's syntax %{variable|d3-time-format}, for example + "Day: %{2019-01-01|%A}". https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format for details on the date + formatting syntax. Variables that can't be found will be + replaced with the specifier. For example, a template of "data: + %{x}, %{y}" will result in a value of "data: 1, %{y}" if x is 1 + and y is missing. Variables with an undefined value will be + replaced with the fallback value. The variables available in + `hovertemplate` are the ones emitted as event data described at + this link https://plotly.com/javascript/plotlyjs-events/#event- + data. Additionally, all attributes that can be specified per- + point (the ones that are `arrayOk: true`) are available. + Anything contained in tag `` is displayed in the + secondary box, for example `%{fullData.name}`. + To hide the secondary box completely, use an empty tag + ``. + + The 'hovertemplate' property is a string and must be specified as: + - A string + - A number that will be converted to a string + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["hovertemplate"] + + @hovertemplate.setter + def hovertemplate(self, val): + self["hovertemplate"] = val + + @property + def hovertemplatefallback(self): + """ + Fallback string that's displayed when a variable referenced in + a template is missing. If the boolean value 'false' is passed + in, the specifier with the missing variable will be displayed. + + The 'hovertemplatefallback' property accepts values of any type + + Returns + ------- + Any + """ + return self["hovertemplatefallback"] + + @hovertemplatefallback.setter + def hovertemplatefallback(self, val): + self["hovertemplatefallback"] = val + + @property + def hovertemplatesrc(self): + """ + Sets the source reference on Chart Studio Cloud for + `hovertemplate`. + + The 'hovertemplatesrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["hovertemplatesrc"] + + @hovertemplatesrc.setter + def hovertemplatesrc(self, val): + self["hovertemplatesrc"] = val + + @property + def hovertext(self): + """ + Sets hover text elements associated with each (lon,lat) pair If + a single string, the same string appears over all the data + points. If an array of string, the items are mapped in order to + the this trace's (lon,lat) coordinates. To be seen, trace + `hoverinfo` must contain a "text" flag. + + The 'hovertext' property is a string and must be specified as: + - A string + - A number that will be converted to a string + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["hovertext"] + + @hovertext.setter + def hovertext(self, val): + self["hovertext"] = val + + @property + def hovertextsrc(self): + """ + Sets the source reference on Chart Studio Cloud for + `hovertext`. + + The 'hovertextsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["hovertextsrc"] + + @hovertextsrc.setter + def hovertextsrc(self, val): + self["hovertextsrc"] = val + + @property + def ids(self): + """ + Assigns id labels to each datum. These ids for object constancy + of data points during animation. Should be an array of strings, + not numbers or any other type. + + The 'ids' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["ids"] + + @ids.setter + def ids(self, val): + self["ids"] = val + + @property + def idssrc(self): + """ + Sets the source reference on Chart Studio Cloud for `ids`. + + The 'idssrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["idssrc"] + + @idssrc.setter + def idssrc(self, val): + self["idssrc"] = val + + @property + def lat(self): + """ + Sets the latitude coordinates (in degrees North). + + The 'lat' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["lat"] + + @lat.setter + def lat(self, val): + self["lat"] = val + + @property + def latsrc(self): + """ + Sets the source reference on Chart Studio Cloud for `lat`. + + The 'latsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["latsrc"] + + @latsrc.setter + def latsrc(self, val): + self["latsrc"] = val + + @property + def legend(self): + """ + Sets the reference to a legend to show this trace in. + References to these legends are "legend", "legend2", "legend3", + etc. Settings for these legends are set in the layout, under + `layout.legend`, `layout.legend2`, etc. + + The 'legend' property is an identifier of a particular + subplot, of type 'legend', that may be specified as: + - the string 'legend' optionally followed by an integer >= 1 + (e.g. 'legend', 'legend1', 'legend2', 'legend3', etc.) + + Returns + ------- + str + """ + return self["legend"] + + @legend.setter + def legend(self, val): + self["legend"] = val + + @property + def legendgroup(self): + """ + Sets the legend group for this trace. Traces and shapes part of + the same legend group hide/show at the same time when toggling + legend items. + + The 'legendgroup' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["legendgroup"] + + @legendgroup.setter + def legendgroup(self, val): + self["legendgroup"] = val + + @property + def legendgrouptitle(self): + """ + The 'legendgrouptitle' property is an instance of Legendgrouptitle + that may be specified as: + - An instance of :class:`plotly.graph_objs.scattermapbox.Legendgrouptitle` + - A dict of string/value properties that will be passed + to the Legendgrouptitle constructor + + Returns + ------- + plotly.graph_objs.scattermapbox.Legendgrouptitle + """ + return self["legendgrouptitle"] + + @legendgrouptitle.setter + def legendgrouptitle(self, val): + self["legendgrouptitle"] = val + + @property + def legendrank(self): + """ + Sets the legend rank for this trace. Items and groups with + smaller ranks are presented on top/left side while with + "reversed" `legend.traceorder` they are on bottom/right side. + The default legendrank is 1000, so that you can use ranks less + than 1000 to place certain items before all unranked items, and + ranks greater than 1000 to go after all unranked items. When + having unranked or equal rank items shapes would be displayed + after traces i.e. according to their order in data and layout. + + The 'legendrank' property is a number and may be specified as: + - An int or float + + Returns + ------- + int|float + """ + return self["legendrank"] + + @legendrank.setter + def legendrank(self, val): + self["legendrank"] = val + + @property + def legendwidth(self): + """ + Sets the width (in px or fraction) of the legend for this + trace. + + The 'legendwidth' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["legendwidth"] + + @legendwidth.setter + def legendwidth(self, val): + self["legendwidth"] = val + + @property + def line(self): + """ + The 'line' property is an instance of Line + that may be specified as: + - An instance of :class:`plotly.graph_objs.scattermapbox.Line` + - A dict of string/value properties that will be passed + to the Line constructor + + Returns + ------- + plotly.graph_objs.scattermapbox.Line + """ + return self["line"] + + @line.setter + def line(self, val): + self["line"] = val + + @property + def lon(self): + """ + Sets the longitude coordinates (in degrees East). + + The 'lon' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["lon"] + + @lon.setter + def lon(self, val): + self["lon"] = val + + @property + def lonsrc(self): + """ + Sets the source reference on Chart Studio Cloud for `lon`. + + The 'lonsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["lonsrc"] + + @lonsrc.setter + def lonsrc(self, val): + self["lonsrc"] = val + + @property + def marker(self): + """ + The 'marker' property is an instance of Marker + that may be specified as: + - An instance of :class:`plotly.graph_objs.scattermapbox.Marker` + - A dict of string/value properties that will be passed + to the Marker constructor + + Returns + ------- + plotly.graph_objs.scattermapbox.Marker + """ + return self["marker"] + + @marker.setter + def marker(self, val): + self["marker"] = val + + @property + def meta(self): + """ + Assigns extra meta information associated with this trace that + can be used in various text attributes. Attributes such as + trace `name`, graph, axis and colorbar `title.text`, annotation + `text` `rangeselector`, `updatemenues` and `sliders` `label` + text all support `meta`. To access the trace `meta` values in + an attribute in the same trace, simply use `%{meta[i]}` where + `i` is the index or key of the `meta` item in question. To + access trace `meta` in layout attributes, use + `%{data[n[.meta[i]}` where `i` is the index or key of the + `meta` and `n` is the trace index. + + The 'meta' property accepts values of any type + + Returns + ------- + Any|numpy.ndarray + """ + return self["meta"] + + @meta.setter + def meta(self, val): + self["meta"] = val + + @property + def metasrc(self): + """ + Sets the source reference on Chart Studio Cloud for `meta`. + + The 'metasrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["metasrc"] + + @metasrc.setter + def metasrc(self, val): + self["metasrc"] = val + + @property + def mode(self): + """ + Determines the drawing mode for this scatter trace. If the + provided `mode` includes "text" then the `text` elements appear + at the coordinates. Otherwise, the `text` elements appear on + hover. + + The 'mode' property is a flaglist and may be specified + as a string containing: + - Any combination of ['lines', 'markers', 'text'] joined with '+' characters + (e.g. 'lines+markers') + OR exactly one of ['none'] (e.g. 'none') + + Returns + ------- + Any + """ + return self["mode"] + + @mode.setter + def mode(self, val): + self["mode"] = val + + @property + def name(self): + """ + Sets the trace name. The trace name appears as the legend item + and on hover. + + The 'name' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["name"] + + @name.setter + def name(self, val): + self["name"] = val + + @property + def opacity(self): + """ + Sets the opacity of the trace. + + The 'opacity' property is a number and may be specified as: + - An int or float in the interval [0, 1] + + Returns + ------- + int|float + """ + return self["opacity"] + + @opacity.setter + def opacity(self, val): + self["opacity"] = val + + @property + def selected(self): + """ + The 'selected' property is an instance of Selected + that may be specified as: + - An instance of :class:`plotly.graph_objs.scattermapbox.Selected` + - A dict of string/value properties that will be passed + to the Selected constructor + + Returns + ------- + plotly.graph_objs.scattermapbox.Selected + """ + return self["selected"] + + @selected.setter + def selected(self, val): + self["selected"] = val + + @property + def selectedpoints(self): + """ + Array containing integer indices of selected points. Has an + effect only for traces that support selections. Note that an + empty array means an empty selection where the `unselected` are + turned on for all points, whereas, any other non-array values + means no selection all where the `selected` and `unselected` + styles have no effect. + + The 'selectedpoints' property accepts values of any type + + Returns + ------- + Any + """ + return self["selectedpoints"] + + @selectedpoints.setter + def selectedpoints(self, val): + self["selectedpoints"] = val + + @property + def showlegend(self): + """ + Determines whether or not an item corresponding to this trace + is shown in the legend. + + The 'showlegend' property is a boolean and must be specified as: + - A boolean value: True or False + + Returns + ------- + bool + """ + return self["showlegend"] + + @showlegend.setter + def showlegend(self, val): + self["showlegend"] = val + + @property + def stream(self): + """ + The 'stream' property is an instance of Stream + that may be specified as: + - An instance of :class:`plotly.graph_objs.scattermapbox.Stream` + - A dict of string/value properties that will be passed + to the Stream constructor + + Returns + ------- + plotly.graph_objs.scattermapbox.Stream + """ + return self["stream"] + + @stream.setter + def stream(self, val): + self["stream"] = val + + @property + def subplot(self): + """ + mapbox subplots and traces are deprecated! Please consider + switching to `map` subplots and traces. Learn more at: + https://plotly.com/python/maplibre-migration/ as well as + https://plotly.com/javascript/maplibre-migration/ Sets a + reference between this trace's data coordinates and a mapbox + subplot. If "mapbox" (the default value), the data refer to + `layout.mapbox`. If "mapbox2", the data refer to + `layout.mapbox2`, and so on. + + The 'subplot' property is an identifier of a particular + subplot, of type 'mapbox', that may be specified as: + - the string 'mapbox' optionally followed by an integer >= 1 + (e.g. 'mapbox', 'mapbox1', 'mapbox2', 'mapbox3', etc.) + + Returns + ------- + str + """ + return self["subplot"] + + @subplot.setter + def subplot(self, val): + self["subplot"] = val + + @property + def text(self): + """ + Sets text elements associated with each (lon,lat) pair If a + single string, the same string appears over all the data + points. If an array of string, the items are mapped in order to + the this trace's (lon,lat) coordinates. If trace `hoverinfo` + contains a "text" flag and "hovertext" is not set, these + elements will be seen in the hover labels. + + The 'text' property is a string and must be specified as: + - A string + - A number that will be converted to a string + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["text"] + + @text.setter + def text(self, val): + self["text"] = val + + @property + def textfont(self): + """ + Sets the icon text font (color=mapbox.layer.paint.text-color, + size=mapbox.layer.layout.text-size). Has an effect only when + `type` is set to "symbol". + + The 'textfont' property is an instance of Textfont + that may be specified as: + - An instance of :class:`plotly.graph_objs.scattermapbox.Textfont` + - A dict of string/value properties that will be passed + to the Textfont constructor + + Returns + ------- + plotly.graph_objs.scattermapbox.Textfont + """ + return self["textfont"] + + @textfont.setter + def textfont(self, val): + self["textfont"] = val + + @property + def textposition(self): + """ + Sets the positions of the `text` elements with respects to the + (x,y) coordinates. + + The 'textposition' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['top left', 'top center', 'top right', 'middle left', + 'middle center', 'middle right', 'bottom left', 'bottom + center', 'bottom right'] + + Returns + ------- + Any + """ + return self["textposition"] + + @textposition.setter + def textposition(self, val): + self["textposition"] = val + + @property + def textsrc(self): + """ + Sets the source reference on Chart Studio Cloud for `text`. + + The 'textsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["textsrc"] + + @textsrc.setter + def textsrc(self, val): + self["textsrc"] = val + + @property + def texttemplate(self): + """ + Template string used for rendering the information text that + appears on points. Note that this will override `textinfo`. + Variables are inserted using %{variable}, for example "y: + %{y}". Numbers are formatted using d3-format's syntax + %{variable:d3-format}, for example "Price: %{y:$.2f}". + https://github.com/d3/d3-format/tree/v1.4.5#d3-format for + details on the formatting syntax. Dates are formatted using + d3-time-format's syntax %{variable|d3-time-format}, for example + "Day: %{2019-01-01|%A}". https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format for details on the date + formatting syntax. Variables that can't be found will be + replaced with the specifier. For example, a template of "data: + %{x}, %{y}" will result in a value of "data: 1, %{y}" if x is 1 + and y is missing. Variables with an undefined value will be + replaced with the fallback value. All attributes that can be + specified per-point (the ones that are `arrayOk: true`) are + available. Finally, the template string has access to variables + `lat`, `lon` and `text`. + + The 'texttemplate' property is a string and must be specified as: + - A string + - A number that will be converted to a string + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["texttemplate"] + + @texttemplate.setter + def texttemplate(self, val): + self["texttemplate"] = val + + @property + def texttemplatefallback(self): + """ + Fallback string that's displayed when a variable referenced in + a template is missing. If the boolean value 'false' is passed + in, the specifier with the missing variable will be displayed. + + The 'texttemplatefallback' property accepts values of any type + + Returns + ------- + Any + """ + return self["texttemplatefallback"] + + @texttemplatefallback.setter + def texttemplatefallback(self, val): + self["texttemplatefallback"] = val + + @property + def texttemplatesrc(self): + """ + Sets the source reference on Chart Studio Cloud for + `texttemplate`. + + The 'texttemplatesrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["texttemplatesrc"] + + @texttemplatesrc.setter + def texttemplatesrc(self, val): + self["texttemplatesrc"] = val + + @property + def uid(self): + """ + Assign an id to this trace, Use this to provide object + constancy between traces during animations and transitions. + + The 'uid' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["uid"] + + @uid.setter + def uid(self, val): + self["uid"] = val + + @property + def uirevision(self): + """ + Controls persistence of some user-driven changes to the trace: + `constraintrange` in `parcoords` traces, as well as some + `editable: true` modifications such as `name` and + `colorbar.title`. Defaults to `layout.uirevision`. Note that + other user-driven trace attribute changes are controlled by + `layout` attributes: `trace.visible` is controlled by + `layout.legend.uirevision`, `selectedpoints` is controlled by + `layout.selectionrevision`, and `colorbar.(x|y)` (accessible + with `config: {editable: true}`) is controlled by + `layout.editrevision`. Trace changes are tracked by `uid`, + which only falls back on trace index if no `uid` is provided. + So if your app can add/remove traces before the end of the + `data` array, such that the same trace has a different index, + you can still preserve user-driven changes if you give each + trace a `uid` that stays with it as it moves. + + The 'uirevision' property accepts values of any type + + Returns + ------- + Any + """ + return self["uirevision"] + + @uirevision.setter + def uirevision(self, val): + self["uirevision"] = val + + @property + def unselected(self): + """ + The 'unselected' property is an instance of Unselected + that may be specified as: + - An instance of :class:`plotly.graph_objs.scattermapbox.Unselected` + - A dict of string/value properties that will be passed + to the Unselected constructor + + Returns + ------- + plotly.graph_objs.scattermapbox.Unselected + """ + return self["unselected"] + + @unselected.setter + def unselected(self, val): + self["unselected"] = val + + @property + def visible(self): + """ + Determines whether or not this trace is visible. If + "legendonly", the trace is not drawn, but can appear as a + legend item (provided that the legend itself is visible). + + The 'visible' property is an enumeration that may be specified as: + - One of the following enumeration values: + [True, False, 'legendonly'] + + Returns + ------- + Any + """ + return self["visible"] + + @visible.setter + def visible(self, val): + self["visible"] = val + + @property + def type(self): + return self._props["type"] + + @property + def _prop_descriptions(self): + return """\ + below + Determines if this scattermapbox trace's layers are to + be inserted before the layer with the specified ID. By + default, scattermapbox layers are inserted above all + the base layers. To place the scattermapbox layers + above every other layer, set `below` to "''". + cluster + :class:`plotly.graph_objects.scattermapbox.Cluster` + instance or dict with compatible properties + connectgaps + Determines whether or not gaps (i.e. {nan} or missing + values) in the provided data arrays are connected. + customdata + Assigns extra data each datum. This may be useful when + listening to hover, click and selection events. Note + that, "scatter" traces also appends customdata items in + the markers DOM elements + customdatasrc + Sets the source reference on Chart Studio Cloud for + `customdata`. + fill + Sets the area to fill with a solid color. Use with + `fillcolor` if not "none". "toself" connects the + endpoints of the trace (or each segment of the trace if + it has gaps) into a closed shape. + fillcolor + Sets the fill color. Defaults to a half-transparent + variant of the line color, marker color, or marker line + color, whichever is available. + hoverinfo + Determines which trace information appear on hover. If + `none` or `skip` are set, no information is displayed + upon hovering. But, if `none` is set, click and hover + events are still fired. + hoverinfosrc + Sets the source reference on Chart Studio Cloud for + `hoverinfo`. + hoverlabel + :class:`plotly.graph_objects.scattermapbox.Hoverlabel` + instance or dict with compatible properties + hovertemplate + Template string used for rendering the information that + appear on hover box. Note that this will override + `hoverinfo`. Variables are inserted using %{variable}, + for example "y: %{y}" as well as %{xother}, {%_xother}, + {%_xother_}, {%xother_}. When showing info for several + points, "xother" will be added to those with different + x positions from the first point. An underscore before + or after "(x|y)other" will add a space on that side, + only when this field is shown. Numbers are formatted + using d3-format's syntax %{variable:d3-format}, for + example "Price: %{y:$.2f}". + https://github.com/d3/d3-format/tree/v1.4.5#d3-format + for details on the formatting syntax. Dates are + formatted using d3-time-format's syntax + %{variable|d3-time-format}, for example "Day: + %{2019-01-01|%A}". https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format for details on the + date formatting syntax. Variables that can't be found + will be replaced with the specifier. For example, a + template of "data: %{x}, %{y}" will result in a value + of "data: 1, %{y}" if x is 1 and y is missing. + Variables with an undefined value will be replaced with + the fallback value. The variables available in + `hovertemplate` are the ones emitted as event data + described at this link + https://plotly.com/javascript/plotlyjs-events/#event- + data. Additionally, all attributes that can be + specified per-point (the ones that are `arrayOk: true`) + are available. Anything contained in tag `` is + displayed in the secondary box, for example + `%{fullData.name}`. To hide the + secondary box completely, use an empty tag + ``. + hovertemplatefallback + Fallback string that's displayed when a variable + referenced in a template is missing. If the boolean + value 'false' is passed in, the specifier with the + missing variable will be displayed. + hovertemplatesrc + Sets the source reference on Chart Studio Cloud for + `hovertemplate`. + hovertext + Sets hover text elements associated with each (lon,lat) + pair If a single string, the same string appears over + all the data points. If an array of string, the items + are mapped in order to the this trace's (lon,lat) + coordinates. To be seen, trace `hoverinfo` must contain + a "text" flag. + hovertextsrc + Sets the source reference on Chart Studio Cloud for + `hovertext`. + ids + Assigns id labels to each datum. These ids for object + constancy of data points during animation. Should be an + array of strings, not numbers or any other type. + idssrc + Sets the source reference on Chart Studio Cloud for + `ids`. + lat + Sets the latitude coordinates (in degrees North). + latsrc + Sets the source reference on Chart Studio Cloud for + `lat`. + legend + Sets the reference to a legend to show this trace in. + References to these legends are "legend", "legend2", + "legend3", etc. Settings for these legends are set in + the layout, under `layout.legend`, `layout.legend2`, + etc. + legendgroup + Sets the legend group for this trace. Traces and shapes + part of the same legend group hide/show at the same + time when toggling legend items. + legendgrouptitle + :class:`plotly.graph_objects.scattermapbox.Legendgroupt + itle` instance or dict with compatible properties + legendrank + Sets the legend rank for this trace. Items and groups + with smaller ranks are presented on top/left side while + with "reversed" `legend.traceorder` they are on + bottom/right side. The default legendrank is 1000, so + that you can use ranks less than 1000 to place certain + items before all unranked items, and ranks greater than + 1000 to go after all unranked items. When having + unranked or equal rank items shapes would be displayed + after traces i.e. according to their order in data and + layout. + legendwidth + Sets the width (in px or fraction) of the legend for + this trace. + line + :class:`plotly.graph_objects.scattermapbox.Line` + instance or dict with compatible properties + lon + Sets the longitude coordinates (in degrees East). + lonsrc + Sets the source reference on Chart Studio Cloud for + `lon`. + marker + :class:`plotly.graph_objects.scattermapbox.Marker` + instance or dict with compatible properties + meta + Assigns extra meta information associated with this + trace that can be used in various text attributes. + Attributes such as trace `name`, graph, axis and + colorbar `title.text`, annotation `text` + `rangeselector`, `updatemenues` and `sliders` `label` + text all support `meta`. To access the trace `meta` + values in an attribute in the same trace, simply use + `%{meta[i]}` where `i` is the index or key of the + `meta` item in question. To access trace `meta` in + layout attributes, use `%{data[n[.meta[i]}` where `i` + is the index or key of the `meta` and `n` is the trace + index. + metasrc + Sets the source reference on Chart Studio Cloud for + `meta`. + mode + Determines the drawing mode for this scatter trace. If + the provided `mode` includes "text" then the `text` + elements appear at the coordinates. Otherwise, the + `text` elements appear on hover. + name + Sets the trace name. The trace name appears as the + legend item and on hover. + opacity + Sets the opacity of the trace. + selected + :class:`plotly.graph_objects.scattermapbox.Selected` + instance or dict with compatible properties + selectedpoints + Array containing integer indices of selected points. + Has an effect only for traces that support selections. + Note that an empty array means an empty selection where + the `unselected` are turned on for all points, whereas, + any other non-array values means no selection all where + the `selected` and `unselected` styles have no effect. + showlegend + Determines whether or not an item corresponding to this + trace is shown in the legend. + stream + :class:`plotly.graph_objects.scattermapbox.Stream` + instance or dict with compatible properties + subplot + mapbox subplots and traces are deprecated! Please + consider switching to `map` subplots and traces. Learn + more at: https://plotly.com/python/maplibre-migration/ + as well as https://plotly.com/javascript/maplibre- + migration/ Sets a reference between this trace's data + coordinates and a mapbox subplot. If "mapbox" (the + default value), the data refer to `layout.mapbox`. If + "mapbox2", the data refer to `layout.mapbox2`, and so + on. + text + Sets text elements associated with each (lon,lat) pair + If a single string, the same string appears over all + the data points. If an array of string, the items are + mapped in order to the this trace's (lon,lat) + coordinates. If trace `hoverinfo` contains a "text" + flag and "hovertext" is not set, these elements will be + seen in the hover labels. + textfont + Sets the icon text font (color=mapbox.layer.paint.text- + color, size=mapbox.layer.layout.text-size). Has an + effect only when `type` is set to "symbol". + textposition + Sets the positions of the `text` elements with respects + to the (x,y) coordinates. + textsrc + Sets the source reference on Chart Studio Cloud for + `text`. + texttemplate + Template string used for rendering the information text + that appears on points. Note that this will override + `textinfo`. Variables are inserted using %{variable}, + for example "y: %{y}". Numbers are formatted using + d3-format's syntax %{variable:d3-format}, for example + "Price: %{y:$.2f}". + https://github.com/d3/d3-format/tree/v1.4.5#d3-format + for details on the formatting syntax. Dates are + formatted using d3-time-format's syntax + %{variable|d3-time-format}, for example "Day: + %{2019-01-01|%A}". https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format for details on the + date formatting syntax. Variables that can't be found + will be replaced with the specifier. For example, a + template of "data: %{x}, %{y}" will result in a value + of "data: 1, %{y}" if x is 1 and y is missing. + Variables with an undefined value will be replaced with + the fallback value. All attributes that can be + specified per-point (the ones that are `arrayOk: true`) + are available. Finally, the template string has access + to variables `lat`, `lon` and `text`. + texttemplatefallback + Fallback string that's displayed when a variable + referenced in a template is missing. If the boolean + value 'false' is passed in, the specifier with the + missing variable will be displayed. + texttemplatesrc + Sets the source reference on Chart Studio Cloud for + `texttemplate`. + uid + Assign an id to this trace, Use this to provide object + constancy between traces during animations and + transitions. + uirevision + Controls persistence of some user-driven changes to the + trace: `constraintrange` in `parcoords` traces, as well + as some `editable: true` modifications such as `name` + and `colorbar.title`. Defaults to `layout.uirevision`. + Note that other user-driven trace attribute changes are + controlled by `layout` attributes: `trace.visible` is + controlled by `layout.legend.uirevision`, + `selectedpoints` is controlled by + `layout.selectionrevision`, and `colorbar.(x|y)` + (accessible with `config: {editable: true}`) is + controlled by `layout.editrevision`. Trace changes are + tracked by `uid`, which only falls back on trace index + if no `uid` is provided. So if your app can add/remove + traces before the end of the `data` array, such that + the same trace has a different index, you can still + preserve user-driven changes if you give each trace a + `uid` that stays with it as it moves. + unselected + :class:`plotly.graph_objects.scattermapbox.Unselected` + instance or dict with compatible properties + visible + Determines whether or not this trace is visible. If + "legendonly", the trace is not drawn, but can appear as + a legend item (provided that the legend itself is + visible). + """ + + def __init__( + self, + arg=None, + below=None, + cluster=None, + connectgaps=None, + customdata=None, + customdatasrc=None, + fill=None, + fillcolor=None, + hoverinfo=None, + hoverinfosrc=None, + hoverlabel=None, + hovertemplate=None, + hovertemplatefallback=None, + hovertemplatesrc=None, + hovertext=None, + hovertextsrc=None, + ids=None, + idssrc=None, + lat=None, + latsrc=None, + legend=None, + legendgroup=None, + legendgrouptitle=None, + legendrank=None, + legendwidth=None, + line=None, + lon=None, + lonsrc=None, + marker=None, + meta=None, + metasrc=None, + mode=None, + name=None, + opacity=None, + selected=None, + selectedpoints=None, + showlegend=None, + stream=None, + subplot=None, + text=None, + textfont=None, + textposition=None, + textsrc=None, + texttemplate=None, + texttemplatefallback=None, + texttemplatesrc=None, + uid=None, + uirevision=None, + unselected=None, + visible=None, + **kwargs, + ): + """ + Construct a new Scattermapbox object + + "scattermapbox" trace is deprecated! Please consider switching + to the "scattermap" trace type and `map` subplots. Learn more + at: https://plotly.com/python/maplibre-migration/ as well as + https://plotly.com/javascript/maplibre-migration/ The data + visualized as scatter point, lines or marker symbols on a + Mapbox GL geographic map is provided by longitude/latitude + pairs in `lon` and `lat`. + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of :class:`plotly.graph_objs.Scattermapbox` + below + Determines if this scattermapbox trace's layers are to + be inserted before the layer with the specified ID. By + default, scattermapbox layers are inserted above all + the base layers. To place the scattermapbox layers + above every other layer, set `below` to "''". + cluster + :class:`plotly.graph_objects.scattermapbox.Cluster` + instance or dict with compatible properties + connectgaps + Determines whether or not gaps (i.e. {nan} or missing + values) in the provided data arrays are connected. + customdata + Assigns extra data each datum. This may be useful when + listening to hover, click and selection events. Note + that, "scatter" traces also appends customdata items in + the markers DOM elements + customdatasrc + Sets the source reference on Chart Studio Cloud for + `customdata`. + fill + Sets the area to fill with a solid color. Use with + `fillcolor` if not "none". "toself" connects the + endpoints of the trace (or each segment of the trace if + it has gaps) into a closed shape. + fillcolor + Sets the fill color. Defaults to a half-transparent + variant of the line color, marker color, or marker line + color, whichever is available. + hoverinfo + Determines which trace information appear on hover. If + `none` or `skip` are set, no information is displayed + upon hovering. But, if `none` is set, click and hover + events are still fired. + hoverinfosrc + Sets the source reference on Chart Studio Cloud for + `hoverinfo`. + hoverlabel + :class:`plotly.graph_objects.scattermapbox.Hoverlabel` + instance or dict with compatible properties + hovertemplate + Template string used for rendering the information that + appear on hover box. Note that this will override + `hoverinfo`. Variables are inserted using %{variable}, + for example "y: %{y}" as well as %{xother}, {%_xother}, + {%_xother_}, {%xother_}. When showing info for several + points, "xother" will be added to those with different + x positions from the first point. An underscore before + or after "(x|y)other" will add a space on that side, + only when this field is shown. Numbers are formatted + using d3-format's syntax %{variable:d3-format}, for + example "Price: %{y:$.2f}". + https://github.com/d3/d3-format/tree/v1.4.5#d3-format + for details on the formatting syntax. Dates are + formatted using d3-time-format's syntax + %{variable|d3-time-format}, for example "Day: + %{2019-01-01|%A}". https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format for details on the + date formatting syntax. Variables that can't be found + will be replaced with the specifier. For example, a + template of "data: %{x}, %{y}" will result in a value + of "data: 1, %{y}" if x is 1 and y is missing. + Variables with an undefined value will be replaced with + the fallback value. The variables available in + `hovertemplate` are the ones emitted as event data + described at this link + https://plotly.com/javascript/plotlyjs-events/#event- + data. Additionally, all attributes that can be + specified per-point (the ones that are `arrayOk: true`) + are available. Anything contained in tag `` is + displayed in the secondary box, for example + `%{fullData.name}`. To hide the + secondary box completely, use an empty tag + ``. + hovertemplatefallback + Fallback string that's displayed when a variable + referenced in a template is missing. If the boolean + value 'false' is passed in, the specifier with the + missing variable will be displayed. + hovertemplatesrc + Sets the source reference on Chart Studio Cloud for + `hovertemplate`. + hovertext + Sets hover text elements associated with each (lon,lat) + pair If a single string, the same string appears over + all the data points. If an array of string, the items + are mapped in order to the this trace's (lon,lat) + coordinates. To be seen, trace `hoverinfo` must contain + a "text" flag. + hovertextsrc + Sets the source reference on Chart Studio Cloud for + `hovertext`. + ids + Assigns id labels to each datum. These ids for object + constancy of data points during animation. Should be an + array of strings, not numbers or any other type. + idssrc + Sets the source reference on Chart Studio Cloud for + `ids`. + lat + Sets the latitude coordinates (in degrees North). + latsrc + Sets the source reference on Chart Studio Cloud for + `lat`. + legend + Sets the reference to a legend to show this trace in. + References to these legends are "legend", "legend2", + "legend3", etc. Settings for these legends are set in + the layout, under `layout.legend`, `layout.legend2`, + etc. + legendgroup + Sets the legend group for this trace. Traces and shapes + part of the same legend group hide/show at the same + time when toggling legend items. + legendgrouptitle + :class:`plotly.graph_objects.scattermapbox.Legendgroupt + itle` instance or dict with compatible properties + legendrank + Sets the legend rank for this trace. Items and groups + with smaller ranks are presented on top/left side while + with "reversed" `legend.traceorder` they are on + bottom/right side. The default legendrank is 1000, so + that you can use ranks less than 1000 to place certain + items before all unranked items, and ranks greater than + 1000 to go after all unranked items. When having + unranked or equal rank items shapes would be displayed + after traces i.e. according to their order in data and + layout. + legendwidth + Sets the width (in px or fraction) of the legend for + this trace. + line + :class:`plotly.graph_objects.scattermapbox.Line` + instance or dict with compatible properties + lon + Sets the longitude coordinates (in degrees East). + lonsrc + Sets the source reference on Chart Studio Cloud for + `lon`. + marker + :class:`plotly.graph_objects.scattermapbox.Marker` + instance or dict with compatible properties + meta + Assigns extra meta information associated with this + trace that can be used in various text attributes. + Attributes such as trace `name`, graph, axis and + colorbar `title.text`, annotation `text` + `rangeselector`, `updatemenues` and `sliders` `label` + text all support `meta`. To access the trace `meta` + values in an attribute in the same trace, simply use + `%{meta[i]}` where `i` is the index or key of the + `meta` item in question. To access trace `meta` in + layout attributes, use `%{data[n[.meta[i]}` where `i` + is the index or key of the `meta` and `n` is the trace + index. + metasrc + Sets the source reference on Chart Studio Cloud for + `meta`. + mode + Determines the drawing mode for this scatter trace. If + the provided `mode` includes "text" then the `text` + elements appear at the coordinates. Otherwise, the + `text` elements appear on hover. + name + Sets the trace name. The trace name appears as the + legend item and on hover. + opacity + Sets the opacity of the trace. + selected + :class:`plotly.graph_objects.scattermapbox.Selected` + instance or dict with compatible properties + selectedpoints + Array containing integer indices of selected points. + Has an effect only for traces that support selections. + Note that an empty array means an empty selection where + the `unselected` are turned on for all points, whereas, + any other non-array values means no selection all where + the `selected` and `unselected` styles have no effect. + showlegend + Determines whether or not an item corresponding to this + trace is shown in the legend. + stream + :class:`plotly.graph_objects.scattermapbox.Stream` + instance or dict with compatible properties + subplot + mapbox subplots and traces are deprecated! Please + consider switching to `map` subplots and traces. Learn + more at: https://plotly.com/python/maplibre-migration/ + as well as https://plotly.com/javascript/maplibre- + migration/ Sets a reference between this trace's data + coordinates and a mapbox subplot. If "mapbox" (the + default value), the data refer to `layout.mapbox`. If + "mapbox2", the data refer to `layout.mapbox2`, and so + on. + text + Sets text elements associated with each (lon,lat) pair + If a single string, the same string appears over all + the data points. If an array of string, the items are + mapped in order to the this trace's (lon,lat) + coordinates. If trace `hoverinfo` contains a "text" + flag and "hovertext" is not set, these elements will be + seen in the hover labels. + textfont + Sets the icon text font (color=mapbox.layer.paint.text- + color, size=mapbox.layer.layout.text-size). Has an + effect only when `type` is set to "symbol". + textposition + Sets the positions of the `text` elements with respects + to the (x,y) coordinates. + textsrc + Sets the source reference on Chart Studio Cloud for + `text`. + texttemplate + Template string used for rendering the information text + that appears on points. Note that this will override + `textinfo`. Variables are inserted using %{variable}, + for example "y: %{y}". Numbers are formatted using + d3-format's syntax %{variable:d3-format}, for example + "Price: %{y:$.2f}". + https://github.com/d3/d3-format/tree/v1.4.5#d3-format + for details on the formatting syntax. Dates are + formatted using d3-time-format's syntax + %{variable|d3-time-format}, for example "Day: + %{2019-01-01|%A}". https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format for details on the + date formatting syntax. Variables that can't be found + will be replaced with the specifier. For example, a + template of "data: %{x}, %{y}" will result in a value + of "data: 1, %{y}" if x is 1 and y is missing. + Variables with an undefined value will be replaced with + the fallback value. All attributes that can be + specified per-point (the ones that are `arrayOk: true`) + are available. Finally, the template string has access + to variables `lat`, `lon` and `text`. + texttemplatefallback + Fallback string that's displayed when a variable + referenced in a template is missing. If the boolean + value 'false' is passed in, the specifier with the + missing variable will be displayed. + texttemplatesrc + Sets the source reference on Chart Studio Cloud for + `texttemplate`. + uid + Assign an id to this trace, Use this to provide object + constancy between traces during animations and + transitions. + uirevision + Controls persistence of some user-driven changes to the + trace: `constraintrange` in `parcoords` traces, as well + as some `editable: true` modifications such as `name` + and `colorbar.title`. Defaults to `layout.uirevision`. + Note that other user-driven trace attribute changes are + controlled by `layout` attributes: `trace.visible` is + controlled by `layout.legend.uirevision`, + `selectedpoints` is controlled by + `layout.selectionrevision`, and `colorbar.(x|y)` + (accessible with `config: {editable: true}`) is + controlled by `layout.editrevision`. Trace changes are + tracked by `uid`, which only falls back on trace index + if no `uid` is provided. So if your app can add/remove + traces before the end of the `data` array, such that + the same trace has a different index, you can still + preserve user-driven changes if you give each trace a + `uid` that stays with it as it moves. + unselected + :class:`plotly.graph_objects.scattermapbox.Unselected` + instance or dict with compatible properties + visible + Determines whether or not this trace is visible. If + "legendonly", the trace is not drawn, but can appear as + a legend item (provided that the legend itself is + visible). + + Returns + ------- + Scattermapbox + """ + super().__init__("scattermapbox") + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + if arg is None: + arg = {} + elif isinstance(arg, self.__class__): + arg = arg.to_plotly_json() + elif isinstance(arg, dict): + arg = _copy.copy(arg) + else: + raise ValueError("""\ +The first argument to the plotly.graph_objs.Scattermapbox +constructor must be a dict or +an instance of :class:`plotly.graph_objs.Scattermapbox`""") + + self._skip_invalid = kwargs.pop("skip_invalid", False) + self._validate = kwargs.pop("_validate", True) + + self._set_property("below", arg, below) + self._set_property("cluster", arg, cluster) + self._set_property("connectgaps", arg, connectgaps) + self._set_property("customdata", arg, customdata) + self._set_property("customdatasrc", arg, customdatasrc) + self._set_property("fill", arg, fill) + self._set_property("fillcolor", arg, fillcolor) + self._set_property("hoverinfo", arg, hoverinfo) + self._set_property("hoverinfosrc", arg, hoverinfosrc) + self._set_property("hoverlabel", arg, hoverlabel) + self._set_property("hovertemplate", arg, hovertemplate) + self._set_property("hovertemplatefallback", arg, hovertemplatefallback) + self._set_property("hovertemplatesrc", arg, hovertemplatesrc) + self._set_property("hovertext", arg, hovertext) + self._set_property("hovertextsrc", arg, hovertextsrc) + self._set_property("ids", arg, ids) + self._set_property("idssrc", arg, idssrc) + self._set_property("lat", arg, lat) + self._set_property("latsrc", arg, latsrc) + self._set_property("legend", arg, legend) + self._set_property("legendgroup", arg, legendgroup) + self._set_property("legendgrouptitle", arg, legendgrouptitle) + self._set_property("legendrank", arg, legendrank) + self._set_property("legendwidth", arg, legendwidth) + self._set_property("line", arg, line) + self._set_property("lon", arg, lon) + self._set_property("lonsrc", arg, lonsrc) + self._set_property("marker", arg, marker) + self._set_property("meta", arg, meta) + self._set_property("metasrc", arg, metasrc) + self._set_property("mode", arg, mode) + self._set_property("name", arg, name) + self._set_property("opacity", arg, opacity) + self._set_property("selected", arg, selected) + self._set_property("selectedpoints", arg, selectedpoints) + self._set_property("showlegend", arg, showlegend) + self._set_property("stream", arg, stream) + self._set_property("subplot", arg, subplot) + self._set_property("text", arg, text) + self._set_property("textfont", arg, textfont) + self._set_property("textposition", arg, textposition) + self._set_property("textsrc", arg, textsrc) + self._set_property("texttemplate", arg, texttemplate) + self._set_property("texttemplatefallback", arg, texttemplatefallback) + self._set_property("texttemplatesrc", arg, texttemplatesrc) + self._set_property("uid", arg, uid) + self._set_property("uirevision", arg, uirevision) + self._set_property("unselected", arg, unselected) + self._set_property("visible", arg, visible) + + self._props["type"] = "scattermapbox" + arg.pop("type", None) + self._process_kwargs(**dict(arg, **kwargs)) + self._skip_invalid = False + + warnings.warn( + "*scattermapbox* is deprecated!" + + " Use *scattermap* instead." + + " Learn more at: https://plotly.com/python/mapbox-to-maplibre/", + stacklevel=2, + category=DeprecationWarning, + ) diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/_scatterpolar.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/_scatterpolar.py new file mode 100644 index 0000000000000000000000000000000000000000..f982f73965935198068e0bd4c776272d2fff5939 --- /dev/null +++ b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/_scatterpolar.py @@ -0,0 +1,2008 @@ +# --- THIS FILE IS AUTO-GENERATED --- +# Modifications will be overwitten the next time code generation run. + +from plotly.basedatatypes import BaseTraceType as _BaseTraceType +import copy as _copy + + +class Scatterpolar(_BaseTraceType): + _parent_path_str = "" + _path_str = "scatterpolar" + _valid_props = { + "cliponaxis", + "connectgaps", + "customdata", + "customdatasrc", + "dr", + "dtheta", + "fill", + "fillcolor", + "hoverinfo", + "hoverinfosrc", + "hoverlabel", + "hoveron", + "hovertemplate", + "hovertemplatefallback", + "hovertemplatesrc", + "hovertext", + "hovertextsrc", + "ids", + "idssrc", + "legend", + "legendgroup", + "legendgrouptitle", + "legendrank", + "legendwidth", + "line", + "marker", + "meta", + "metasrc", + "mode", + "name", + "opacity", + "r", + "r0", + "rsrc", + "selected", + "selectedpoints", + "showlegend", + "stream", + "subplot", + "text", + "textfont", + "textposition", + "textpositionsrc", + "textsrc", + "texttemplate", + "texttemplatefallback", + "texttemplatesrc", + "theta", + "theta0", + "thetasrc", + "thetaunit", + "type", + "uid", + "uirevision", + "unselected", + "visible", + } + + @property + def cliponaxis(self): + """ + Determines whether or not markers and text nodes are clipped + about the subplot axes. To show markers and text nodes above + axis lines and tick labels, make sure to set `xaxis.layer` and + `yaxis.layer` to *below traces*. + + The 'cliponaxis' property is a boolean and must be specified as: + - A boolean value: True or False + + Returns + ------- + bool + """ + return self["cliponaxis"] + + @cliponaxis.setter + def cliponaxis(self, val): + self["cliponaxis"] = val + + @property + def connectgaps(self): + """ + Determines whether or not gaps (i.e. {nan} or missing values) + in the provided data arrays are connected. + + The 'connectgaps' property is a boolean and must be specified as: + - A boolean value: True or False + + Returns + ------- + bool + """ + return self["connectgaps"] + + @connectgaps.setter + def connectgaps(self, val): + self["connectgaps"] = val + + @property + def customdata(self): + """ + Assigns extra data each datum. This may be useful when + listening to hover, click and selection events. Note that, + "scatter" traces also appends customdata items in the markers + DOM elements + + The 'customdata' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["customdata"] + + @customdata.setter + def customdata(self, val): + self["customdata"] = val + + @property + def customdatasrc(self): + """ + Sets the source reference on Chart Studio Cloud for + `customdata`. + + The 'customdatasrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["customdatasrc"] + + @customdatasrc.setter + def customdatasrc(self, val): + self["customdatasrc"] = val + + @property + def dr(self): + """ + Sets the r coordinate step. + + The 'dr' property is a number and may be specified as: + - An int or float + + Returns + ------- + int|float + """ + return self["dr"] + + @dr.setter + def dr(self, val): + self["dr"] = val + + @property + def dtheta(self): + """ + Sets the theta coordinate step. By default, the `dtheta` step + equals the subplot's period divided by the length of the `r` + coordinates. + + The 'dtheta' property is a number and may be specified as: + - An int or float + + Returns + ------- + int|float + """ + return self["dtheta"] + + @dtheta.setter + def dtheta(self, val): + self["dtheta"] = val + + @property + def fill(self): + """ + Sets the area to fill with a solid color. Use with `fillcolor` + if not "none". scatterpolar has a subset of the options + available to scatter. "toself" connects the endpoints of the + trace (or each segment of the trace if it has gaps) into a + closed shape. "tonext" fills the space between two traces if + one completely encloses the other (eg consecutive contour + lines), and behaves like "toself" if there is no trace before + it. "tonext" should not be used if one trace does not enclose + the other. + + The 'fill' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['none', 'toself', 'tonext'] + + Returns + ------- + Any + """ + return self["fill"] + + @fill.setter + def fill(self, val): + self["fill"] = val + + @property + def fillcolor(self): + """ + Sets the fill color. Defaults to a half-transparent variant of + the line color, marker color, or marker line color, whichever + is available. + + The 'fillcolor' property is a color and may be specified as: + - A hex string (e.g. '#ff0000') + - An rgb/rgba string (e.g. 'rgb(255,0,0)') + - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') + - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') + - A named CSS color: see https://plotly.com/python/css-colors/ for a list + + Returns + ------- + str + """ + return self["fillcolor"] + + @fillcolor.setter + def fillcolor(self, val): + self["fillcolor"] = val + + @property + def hoverinfo(self): + """ + Determines which trace information appear on hover. If `none` + or `skip` are set, no information is displayed upon hovering. + But, if `none` is set, click and hover events are still fired. + + The 'hoverinfo' property is a flaglist and may be specified + as a string containing: + - Any combination of ['r', 'theta', 'text', 'name'] joined with '+' characters + (e.g. 'r+theta') + OR exactly one of ['all', 'none', 'skip'] (e.g. 'skip') + - A list or array of the above + + Returns + ------- + Any|numpy.ndarray + """ + return self["hoverinfo"] + + @hoverinfo.setter + def hoverinfo(self, val): + self["hoverinfo"] = val + + @property + def hoverinfosrc(self): + """ + Sets the source reference on Chart Studio Cloud for + `hoverinfo`. + + The 'hoverinfosrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["hoverinfosrc"] + + @hoverinfosrc.setter + def hoverinfosrc(self, val): + self["hoverinfosrc"] = val + + @property + def hoverlabel(self): + """ + The 'hoverlabel' property is an instance of Hoverlabel + that may be specified as: + - An instance of :class:`plotly.graph_objs.scatterpolar.Hoverlabel` + - A dict of string/value properties that will be passed + to the Hoverlabel constructor + + Returns + ------- + plotly.graph_objs.scatterpolar.Hoverlabel + """ + return self["hoverlabel"] + + @hoverlabel.setter + def hoverlabel(self, val): + self["hoverlabel"] = val + + @property + def hoveron(self): + """ + Do the hover effects highlight individual points (markers or + line points) or do they highlight filled regions? If the fill + is "toself" or "tonext" and there are no markers or text, then + the default is "fills", otherwise it is "points". + + The 'hoveron' property is a flaglist and may be specified + as a string containing: + - Any combination of ['points', 'fills'] joined with '+' characters + (e.g. 'points+fills') + + Returns + ------- + Any + """ + return self["hoveron"] + + @hoveron.setter + def hoveron(self, val): + self["hoveron"] = val + + @property + def hovertemplate(self): + """ + Template string used for rendering the information that appear + on hover box. Note that this will override `hoverinfo`. + Variables are inserted using %{variable}, for example "y: %{y}" + as well as %{xother}, {%_xother}, {%_xother_}, {%xother_}. When + showing info for several points, "xother" will be added to + those with different x positions from the first point. An + underscore before or after "(x|y)other" will add a space on + that side, only when this field is shown. Numbers are formatted + using d3-format's syntax %{variable:d3-format}, for example + "Price: %{y:$.2f}". + https://github.com/d3/d3-format/tree/v1.4.5#d3-format for + details on the formatting syntax. Dates are formatted using + d3-time-format's syntax %{variable|d3-time-format}, for example + "Day: %{2019-01-01|%A}". https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format for details on the date + formatting syntax. Variables that can't be found will be + replaced with the specifier. For example, a template of "data: + %{x}, %{y}" will result in a value of "data: 1, %{y}" if x is 1 + and y is missing. Variables with an undefined value will be + replaced with the fallback value. The variables available in + `hovertemplate` are the ones emitted as event data described at + this link https://plotly.com/javascript/plotlyjs-events/#event- + data. Additionally, all attributes that can be specified per- + point (the ones that are `arrayOk: true`) are available. + Anything contained in tag `` is displayed in the + secondary box, for example `%{fullData.name}`. + To hide the secondary box completely, use an empty tag + ``. + + The 'hovertemplate' property is a string and must be specified as: + - A string + - A number that will be converted to a string + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["hovertemplate"] + + @hovertemplate.setter + def hovertemplate(self, val): + self["hovertemplate"] = val + + @property + def hovertemplatefallback(self): + """ + Fallback string that's displayed when a variable referenced in + a template is missing. If the boolean value 'false' is passed + in, the specifier with the missing variable will be displayed. + + The 'hovertemplatefallback' property accepts values of any type + + Returns + ------- + Any + """ + return self["hovertemplatefallback"] + + @hovertemplatefallback.setter + def hovertemplatefallback(self, val): + self["hovertemplatefallback"] = val + + @property + def hovertemplatesrc(self): + """ + Sets the source reference on Chart Studio Cloud for + `hovertemplate`. + + The 'hovertemplatesrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["hovertemplatesrc"] + + @hovertemplatesrc.setter + def hovertemplatesrc(self, val): + self["hovertemplatesrc"] = val + + @property + def hovertext(self): + """ + Sets hover text elements associated with each (x,y) pair. If a + single string, the same string appears over all the data + points. If an array of string, the items are mapped in order to + the this trace's (x,y) coordinates. To be seen, trace + `hoverinfo` must contain a "text" flag. + + The 'hovertext' property is a string and must be specified as: + - A string + - A number that will be converted to a string + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["hovertext"] + + @hovertext.setter + def hovertext(self, val): + self["hovertext"] = val + + @property + def hovertextsrc(self): + """ + Sets the source reference on Chart Studio Cloud for + `hovertext`. + + The 'hovertextsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["hovertextsrc"] + + @hovertextsrc.setter + def hovertextsrc(self, val): + self["hovertextsrc"] = val + + @property + def ids(self): + """ + Assigns id labels to each datum. These ids for object constancy + of data points during animation. Should be an array of strings, + not numbers or any other type. + + The 'ids' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["ids"] + + @ids.setter + def ids(self, val): + self["ids"] = val + + @property + def idssrc(self): + """ + Sets the source reference on Chart Studio Cloud for `ids`. + + The 'idssrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["idssrc"] + + @idssrc.setter + def idssrc(self, val): + self["idssrc"] = val + + @property + def legend(self): + """ + Sets the reference to a legend to show this trace in. + References to these legends are "legend", "legend2", "legend3", + etc. Settings for these legends are set in the layout, under + `layout.legend`, `layout.legend2`, etc. + + The 'legend' property is an identifier of a particular + subplot, of type 'legend', that may be specified as: + - the string 'legend' optionally followed by an integer >= 1 + (e.g. 'legend', 'legend1', 'legend2', 'legend3', etc.) + + Returns + ------- + str + """ + return self["legend"] + + @legend.setter + def legend(self, val): + self["legend"] = val + + @property + def legendgroup(self): + """ + Sets the legend group for this trace. Traces and shapes part of + the same legend group hide/show at the same time when toggling + legend items. + + The 'legendgroup' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["legendgroup"] + + @legendgroup.setter + def legendgroup(self, val): + self["legendgroup"] = val + + @property + def legendgrouptitle(self): + """ + The 'legendgrouptitle' property is an instance of Legendgrouptitle + that may be specified as: + - An instance of :class:`plotly.graph_objs.scatterpolar.Legendgrouptitle` + - A dict of string/value properties that will be passed + to the Legendgrouptitle constructor + + Returns + ------- + plotly.graph_objs.scatterpolar.Legendgrouptitle + """ + return self["legendgrouptitle"] + + @legendgrouptitle.setter + def legendgrouptitle(self, val): + self["legendgrouptitle"] = val + + @property + def legendrank(self): + """ + Sets the legend rank for this trace. Items and groups with + smaller ranks are presented on top/left side while with + "reversed" `legend.traceorder` they are on bottom/right side. + The default legendrank is 1000, so that you can use ranks less + than 1000 to place certain items before all unranked items, and + ranks greater than 1000 to go after all unranked items. When + having unranked or equal rank items shapes would be displayed + after traces i.e. according to their order in data and layout. + + The 'legendrank' property is a number and may be specified as: + - An int or float + + Returns + ------- + int|float + """ + return self["legendrank"] + + @legendrank.setter + def legendrank(self, val): + self["legendrank"] = val + + @property + def legendwidth(self): + """ + Sets the width (in px or fraction) of the legend for this + trace. + + The 'legendwidth' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["legendwidth"] + + @legendwidth.setter + def legendwidth(self, val): + self["legendwidth"] = val + + @property + def line(self): + """ + The 'line' property is an instance of Line + that may be specified as: + - An instance of :class:`plotly.graph_objs.scatterpolar.Line` + - A dict of string/value properties that will be passed + to the Line constructor + + Returns + ------- + plotly.graph_objs.scatterpolar.Line + """ + return self["line"] + + @line.setter + def line(self, val): + self["line"] = val + + @property + def marker(self): + """ + The 'marker' property is an instance of Marker + that may be specified as: + - An instance of :class:`plotly.graph_objs.scatterpolar.Marker` + - A dict of string/value properties that will be passed + to the Marker constructor + + Returns + ------- + plotly.graph_objs.scatterpolar.Marker + """ + return self["marker"] + + @marker.setter + def marker(self, val): + self["marker"] = val + + @property + def meta(self): + """ + Assigns extra meta information associated with this trace that + can be used in various text attributes. Attributes such as + trace `name`, graph, axis and colorbar `title.text`, annotation + `text` `rangeselector`, `updatemenues` and `sliders` `label` + text all support `meta`. To access the trace `meta` values in + an attribute in the same trace, simply use `%{meta[i]}` where + `i` is the index or key of the `meta` item in question. To + access trace `meta` in layout attributes, use + `%{data[n[.meta[i]}` where `i` is the index or key of the + `meta` and `n` is the trace index. + + The 'meta' property accepts values of any type + + Returns + ------- + Any|numpy.ndarray + """ + return self["meta"] + + @meta.setter + def meta(self, val): + self["meta"] = val + + @property + def metasrc(self): + """ + Sets the source reference on Chart Studio Cloud for `meta`. + + The 'metasrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["metasrc"] + + @metasrc.setter + def metasrc(self, val): + self["metasrc"] = val + + @property + def mode(self): + """ + Determines the drawing mode for this scatter trace. If the + provided `mode` includes "text" then the `text` elements appear + at the coordinates. Otherwise, the `text` elements appear on + hover. If there are less than 20 points and the trace is not + stacked then the default is "lines+markers". Otherwise, + "lines". + + The 'mode' property is a flaglist and may be specified + as a string containing: + - Any combination of ['lines', 'markers', 'text'] joined with '+' characters + (e.g. 'lines+markers') + OR exactly one of ['none'] (e.g. 'none') + + Returns + ------- + Any + """ + return self["mode"] + + @mode.setter + def mode(self, val): + self["mode"] = val + + @property + def name(self): + """ + Sets the trace name. The trace name appears as the legend item + and on hover. + + The 'name' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["name"] + + @name.setter + def name(self, val): + self["name"] = val + + @property + def opacity(self): + """ + Sets the opacity of the trace. + + The 'opacity' property is a number and may be specified as: + - An int or float in the interval [0, 1] + + Returns + ------- + int|float + """ + return self["opacity"] + + @opacity.setter + def opacity(self, val): + self["opacity"] = val + + @property + def r(self): + """ + Sets the radial coordinates + + The 'r' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["r"] + + @r.setter + def r(self, val): + self["r"] = val + + @property + def r0(self): + """ + Alternate to `r`. Builds a linear space of r coordinates. Use + with `dr` where `r0` is the starting coordinate and `dr` the + step. + + The 'r0' property accepts values of any type + + Returns + ------- + Any + """ + return self["r0"] + + @r0.setter + def r0(self, val): + self["r0"] = val + + @property + def rsrc(self): + """ + Sets the source reference on Chart Studio Cloud for `r`. + + The 'rsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["rsrc"] + + @rsrc.setter + def rsrc(self, val): + self["rsrc"] = val + + @property + def selected(self): + """ + The 'selected' property is an instance of Selected + that may be specified as: + - An instance of :class:`plotly.graph_objs.scatterpolar.Selected` + - A dict of string/value properties that will be passed + to the Selected constructor + + Returns + ------- + plotly.graph_objs.scatterpolar.Selected + """ + return self["selected"] + + @selected.setter + def selected(self, val): + self["selected"] = val + + @property + def selectedpoints(self): + """ + Array containing integer indices of selected points. Has an + effect only for traces that support selections. Note that an + empty array means an empty selection where the `unselected` are + turned on for all points, whereas, any other non-array values + means no selection all where the `selected` and `unselected` + styles have no effect. + + The 'selectedpoints' property accepts values of any type + + Returns + ------- + Any + """ + return self["selectedpoints"] + + @selectedpoints.setter + def selectedpoints(self, val): + self["selectedpoints"] = val + + @property + def showlegend(self): + """ + Determines whether or not an item corresponding to this trace + is shown in the legend. + + The 'showlegend' property is a boolean and must be specified as: + - A boolean value: True or False + + Returns + ------- + bool + """ + return self["showlegend"] + + @showlegend.setter + def showlegend(self, val): + self["showlegend"] = val + + @property + def stream(self): + """ + The 'stream' property is an instance of Stream + that may be specified as: + - An instance of :class:`plotly.graph_objs.scatterpolar.Stream` + - A dict of string/value properties that will be passed + to the Stream constructor + + Returns + ------- + plotly.graph_objs.scatterpolar.Stream + """ + return self["stream"] + + @stream.setter + def stream(self, val): + self["stream"] = val + + @property + def subplot(self): + """ + Sets a reference between this trace's data coordinates and a + polar subplot. If "polar" (the default value), the data refer + to `layout.polar`. If "polar2", the data refer to + `layout.polar2`, and so on. + + The 'subplot' property is an identifier of a particular + subplot, of type 'polar', that may be specified as: + - the string 'polar' optionally followed by an integer >= 1 + (e.g. 'polar', 'polar1', 'polar2', 'polar3', etc.) + + Returns + ------- + str + """ + return self["subplot"] + + @subplot.setter + def subplot(self, val): + self["subplot"] = val + + @property + def text(self): + """ + Sets text elements associated with each (x,y) pair. If a single + string, the same string appears over all the data points. If an + array of string, the items are mapped in order to the this + trace's (x,y) coordinates. If trace `hoverinfo` contains a + "text" flag and "hovertext" is not set, these elements will be + seen in the hover labels. + + The 'text' property is a string and must be specified as: + - A string + - A number that will be converted to a string + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["text"] + + @text.setter + def text(self, val): + self["text"] = val + + @property + def textfont(self): + """ + Sets the text font. + + The 'textfont' property is an instance of Textfont + that may be specified as: + - An instance of :class:`plotly.graph_objs.scatterpolar.Textfont` + - A dict of string/value properties that will be passed + to the Textfont constructor + + Returns + ------- + plotly.graph_objs.scatterpolar.Textfont + """ + return self["textfont"] + + @textfont.setter + def textfont(self, val): + self["textfont"] = val + + @property + def textposition(self): + """ + Sets the positions of the `text` elements with respects to the + (x,y) coordinates. + + The 'textposition' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['top left', 'top center', 'top right', 'middle left', + 'middle center', 'middle right', 'bottom left', 'bottom + center', 'bottom right'] + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + Any|numpy.ndarray + """ + return self["textposition"] + + @textposition.setter + def textposition(self, val): + self["textposition"] = val + + @property + def textpositionsrc(self): + """ + Sets the source reference on Chart Studio Cloud for + `textposition`. + + The 'textpositionsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["textpositionsrc"] + + @textpositionsrc.setter + def textpositionsrc(self, val): + self["textpositionsrc"] = val + + @property + def textsrc(self): + """ + Sets the source reference on Chart Studio Cloud for `text`. + + The 'textsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["textsrc"] + + @textsrc.setter + def textsrc(self, val): + self["textsrc"] = val + + @property + def texttemplate(self): + """ + Template string used for rendering the information text that + appears on points. Note that this will override `textinfo`. + Variables are inserted using %{variable}, for example "y: + %{y}". Numbers are formatted using d3-format's syntax + %{variable:d3-format}, for example "Price: %{y:$.2f}". + https://github.com/d3/d3-format/tree/v1.4.5#d3-format for + details on the formatting syntax. Dates are formatted using + d3-time-format's syntax %{variable|d3-time-format}, for example + "Day: %{2019-01-01|%A}". https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format for details on the date + formatting syntax. Variables that can't be found will be + replaced with the specifier. For example, a template of "data: + %{x}, %{y}" will result in a value of "data: 1, %{y}" if x is 1 + and y is missing. Variables with an undefined value will be + replaced with the fallback value. All attributes that can be + specified per-point (the ones that are `arrayOk: true`) are + available. Finally, the template string has access to variables + `r`, `theta` and `text`. + + The 'texttemplate' property is a string and must be specified as: + - A string + - A number that will be converted to a string + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["texttemplate"] + + @texttemplate.setter + def texttemplate(self, val): + self["texttemplate"] = val + + @property + def texttemplatefallback(self): + """ + Fallback string that's displayed when a variable referenced in + a template is missing. If the boolean value 'false' is passed + in, the specifier with the missing variable will be displayed. + + The 'texttemplatefallback' property accepts values of any type + + Returns + ------- + Any + """ + return self["texttemplatefallback"] + + @texttemplatefallback.setter + def texttemplatefallback(self, val): + self["texttemplatefallback"] = val + + @property + def texttemplatesrc(self): + """ + Sets the source reference on Chart Studio Cloud for + `texttemplate`. + + The 'texttemplatesrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["texttemplatesrc"] + + @texttemplatesrc.setter + def texttemplatesrc(self, val): + self["texttemplatesrc"] = val + + @property + def theta(self): + """ + Sets the angular coordinates + + The 'theta' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["theta"] + + @theta.setter + def theta(self, val): + self["theta"] = val + + @property + def theta0(self): + """ + Alternate to `theta`. Builds a linear space of theta + coordinates. Use with `dtheta` where `theta0` is the starting + coordinate and `dtheta` the step. + + The 'theta0' property accepts values of any type + + Returns + ------- + Any + """ + return self["theta0"] + + @theta0.setter + def theta0(self, val): + self["theta0"] = val + + @property + def thetasrc(self): + """ + Sets the source reference on Chart Studio Cloud for `theta`. + + The 'thetasrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["thetasrc"] + + @thetasrc.setter + def thetasrc(self, val): + self["thetasrc"] = val + + @property + def thetaunit(self): + """ + Sets the unit of input "theta" values. Has an effect only when + on "linear" angular axes. + + The 'thetaunit' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['radians', 'degrees', 'gradians'] + + Returns + ------- + Any + """ + return self["thetaunit"] + + @thetaunit.setter + def thetaunit(self, val): + self["thetaunit"] = val + + @property + def uid(self): + """ + Assign an id to this trace, Use this to provide object + constancy between traces during animations and transitions. + + The 'uid' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["uid"] + + @uid.setter + def uid(self, val): + self["uid"] = val + + @property + def uirevision(self): + """ + Controls persistence of some user-driven changes to the trace: + `constraintrange` in `parcoords` traces, as well as some + `editable: true` modifications such as `name` and + `colorbar.title`. Defaults to `layout.uirevision`. Note that + other user-driven trace attribute changes are controlled by + `layout` attributes: `trace.visible` is controlled by + `layout.legend.uirevision`, `selectedpoints` is controlled by + `layout.selectionrevision`, and `colorbar.(x|y)` (accessible + with `config: {editable: true}`) is controlled by + `layout.editrevision`. Trace changes are tracked by `uid`, + which only falls back on trace index if no `uid` is provided. + So if your app can add/remove traces before the end of the + `data` array, such that the same trace has a different index, + you can still preserve user-driven changes if you give each + trace a `uid` that stays with it as it moves. + + The 'uirevision' property accepts values of any type + + Returns + ------- + Any + """ + return self["uirevision"] + + @uirevision.setter + def uirevision(self, val): + self["uirevision"] = val + + @property + def unselected(self): + """ + The 'unselected' property is an instance of Unselected + that may be specified as: + - An instance of :class:`plotly.graph_objs.scatterpolar.Unselected` + - A dict of string/value properties that will be passed + to the Unselected constructor + + Returns + ------- + plotly.graph_objs.scatterpolar.Unselected + """ + return self["unselected"] + + @unselected.setter + def unselected(self, val): + self["unselected"] = val + + @property + def visible(self): + """ + Determines whether or not this trace is visible. If + "legendonly", the trace is not drawn, but can appear as a + legend item (provided that the legend itself is visible). + + The 'visible' property is an enumeration that may be specified as: + - One of the following enumeration values: + [True, False, 'legendonly'] + + Returns + ------- + Any + """ + return self["visible"] + + @visible.setter + def visible(self, val): + self["visible"] = val + + @property + def type(self): + return self._props["type"] + + @property + def _prop_descriptions(self): + return """\ + cliponaxis + Determines whether or not markers and text nodes are + clipped about the subplot axes. To show markers and + text nodes above axis lines and tick labels, make sure + to set `xaxis.layer` and `yaxis.layer` to *below + traces*. + connectgaps + Determines whether or not gaps (i.e. {nan} or missing + values) in the provided data arrays are connected. + customdata + Assigns extra data each datum. This may be useful when + listening to hover, click and selection events. Note + that, "scatter" traces also appends customdata items in + the markers DOM elements + customdatasrc + Sets the source reference on Chart Studio Cloud for + `customdata`. + dr + Sets the r coordinate step. + dtheta + Sets the theta coordinate step. By default, the + `dtheta` step equals the subplot's period divided by + the length of the `r` coordinates. + fill + Sets the area to fill with a solid color. Use with + `fillcolor` if not "none". scatterpolar has a subset of + the options available to scatter. "toself" connects the + endpoints of the trace (or each segment of the trace if + it has gaps) into a closed shape. "tonext" fills the + space between two traces if one completely encloses the + other (eg consecutive contour lines), and behaves like + "toself" if there is no trace before it. "tonext" + should not be used if one trace does not enclose the + other. + fillcolor + Sets the fill color. Defaults to a half-transparent + variant of the line color, marker color, or marker line + color, whichever is available. + hoverinfo + Determines which trace information appear on hover. If + `none` or `skip` are set, no information is displayed + upon hovering. But, if `none` is set, click and hover + events are still fired. + hoverinfosrc + Sets the source reference on Chart Studio Cloud for + `hoverinfo`. + hoverlabel + :class:`plotly.graph_objects.scatterpolar.Hoverlabel` + instance or dict with compatible properties + hoveron + Do the hover effects highlight individual points + (markers or line points) or do they highlight filled + regions? If the fill is "toself" or "tonext" and there + are no markers or text, then the default is "fills", + otherwise it is "points". + hovertemplate + Template string used for rendering the information that + appear on hover box. Note that this will override + `hoverinfo`. Variables are inserted using %{variable}, + for example "y: %{y}" as well as %{xother}, {%_xother}, + {%_xother_}, {%xother_}. When showing info for several + points, "xother" will be added to those with different + x positions from the first point. An underscore before + or after "(x|y)other" will add a space on that side, + only when this field is shown. Numbers are formatted + using d3-format's syntax %{variable:d3-format}, for + example "Price: %{y:$.2f}". + https://github.com/d3/d3-format/tree/v1.4.5#d3-format + for details on the formatting syntax. Dates are + formatted using d3-time-format's syntax + %{variable|d3-time-format}, for example "Day: + %{2019-01-01|%A}". https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format for details on the + date formatting syntax. Variables that can't be found + will be replaced with the specifier. For example, a + template of "data: %{x}, %{y}" will result in a value + of "data: 1, %{y}" if x is 1 and y is missing. + Variables with an undefined value will be replaced with + the fallback value. The variables available in + `hovertemplate` are the ones emitted as event data + described at this link + https://plotly.com/javascript/plotlyjs-events/#event- + data. Additionally, all attributes that can be + specified per-point (the ones that are `arrayOk: true`) + are available. Anything contained in tag `` is + displayed in the secondary box, for example + `%{fullData.name}`. To hide the + secondary box completely, use an empty tag + ``. + hovertemplatefallback + Fallback string that's displayed when a variable + referenced in a template is missing. If the boolean + value 'false' is passed in, the specifier with the + missing variable will be displayed. + hovertemplatesrc + Sets the source reference on Chart Studio Cloud for + `hovertemplate`. + hovertext + Sets hover text elements associated with each (x,y) + pair. If a single string, the same string appears over + all the data points. If an array of string, the items + are mapped in order to the this trace's (x,y) + coordinates. To be seen, trace `hoverinfo` must contain + a "text" flag. + hovertextsrc + Sets the source reference on Chart Studio Cloud for + `hovertext`. + ids + Assigns id labels to each datum. These ids for object + constancy of data points during animation. Should be an + array of strings, not numbers or any other type. + idssrc + Sets the source reference on Chart Studio Cloud for + `ids`. + legend + Sets the reference to a legend to show this trace in. + References to these legends are "legend", "legend2", + "legend3", etc. Settings for these legends are set in + the layout, under `layout.legend`, `layout.legend2`, + etc. + legendgroup + Sets the legend group for this trace. Traces and shapes + part of the same legend group hide/show at the same + time when toggling legend items. + legendgrouptitle + :class:`plotly.graph_objects.scatterpolar.Legendgroupti + tle` instance or dict with compatible properties + legendrank + Sets the legend rank for this trace. Items and groups + with smaller ranks are presented on top/left side while + with "reversed" `legend.traceorder` they are on + bottom/right side. The default legendrank is 1000, so + that you can use ranks less than 1000 to place certain + items before all unranked items, and ranks greater than + 1000 to go after all unranked items. When having + unranked or equal rank items shapes would be displayed + after traces i.e. according to their order in data and + layout. + legendwidth + Sets the width (in px or fraction) of the legend for + this trace. + line + :class:`plotly.graph_objects.scatterpolar.Line` + instance or dict with compatible properties + marker + :class:`plotly.graph_objects.scatterpolar.Marker` + instance or dict with compatible properties + meta + Assigns extra meta information associated with this + trace that can be used in various text attributes. + Attributes such as trace `name`, graph, axis and + colorbar `title.text`, annotation `text` + `rangeselector`, `updatemenues` and `sliders` `label` + text all support `meta`. To access the trace `meta` + values in an attribute in the same trace, simply use + `%{meta[i]}` where `i` is the index or key of the + `meta` item in question. To access trace `meta` in + layout attributes, use `%{data[n[.meta[i]}` where `i` + is the index or key of the `meta` and `n` is the trace + index. + metasrc + Sets the source reference on Chart Studio Cloud for + `meta`. + mode + Determines the drawing mode for this scatter trace. If + the provided `mode` includes "text" then the `text` + elements appear at the coordinates. Otherwise, the + `text` elements appear on hover. If there are less than + 20 points and the trace is not stacked then the default + is "lines+markers". Otherwise, "lines". + name + Sets the trace name. The trace name appears as the + legend item and on hover. + opacity + Sets the opacity of the trace. + r + Sets the radial coordinates + r0 + Alternate to `r`. Builds a linear space of r + coordinates. Use with `dr` where `r0` is the starting + coordinate and `dr` the step. + rsrc + Sets the source reference on Chart Studio Cloud for + `r`. + selected + :class:`plotly.graph_objects.scatterpolar.Selected` + instance or dict with compatible properties + selectedpoints + Array containing integer indices of selected points. + Has an effect only for traces that support selections. + Note that an empty array means an empty selection where + the `unselected` are turned on for all points, whereas, + any other non-array values means no selection all where + the `selected` and `unselected` styles have no effect. + showlegend + Determines whether or not an item corresponding to this + trace is shown in the legend. + stream + :class:`plotly.graph_objects.scatterpolar.Stream` + instance or dict with compatible properties + subplot + Sets a reference between this trace's data coordinates + and a polar subplot. If "polar" (the default value), + the data refer to `layout.polar`. If "polar2", the data + refer to `layout.polar2`, and so on. + text + Sets text elements associated with each (x,y) pair. If + a single string, the same string appears over all the + data points. If an array of string, the items are + mapped in order to the this trace's (x,y) coordinates. + If trace `hoverinfo` contains a "text" flag and + "hovertext" is not set, these elements will be seen in + the hover labels. + textfont + Sets the text font. + textposition + Sets the positions of the `text` elements with respects + to the (x,y) coordinates. + textpositionsrc + Sets the source reference on Chart Studio Cloud for + `textposition`. + textsrc + Sets the source reference on Chart Studio Cloud for + `text`. + texttemplate + Template string used for rendering the information text + that appears on points. Note that this will override + `textinfo`. Variables are inserted using %{variable}, + for example "y: %{y}". Numbers are formatted using + d3-format's syntax %{variable:d3-format}, for example + "Price: %{y:$.2f}". + https://github.com/d3/d3-format/tree/v1.4.5#d3-format + for details on the formatting syntax. Dates are + formatted using d3-time-format's syntax + %{variable|d3-time-format}, for example "Day: + %{2019-01-01|%A}". https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format for details on the + date formatting syntax. Variables that can't be found + will be replaced with the specifier. For example, a + template of "data: %{x}, %{y}" will result in a value + of "data: 1, %{y}" if x is 1 and y is missing. + Variables with an undefined value will be replaced with + the fallback value. All attributes that can be + specified per-point (the ones that are `arrayOk: true`) + are available. Finally, the template string has access + to variables `r`, `theta` and `text`. + texttemplatefallback + Fallback string that's displayed when a variable + referenced in a template is missing. If the boolean + value 'false' is passed in, the specifier with the + missing variable will be displayed. + texttemplatesrc + Sets the source reference on Chart Studio Cloud for + `texttemplate`. + theta + Sets the angular coordinates + theta0 + Alternate to `theta`. Builds a linear space of theta + coordinates. Use with `dtheta` where `theta0` is the + starting coordinate and `dtheta` the step. + thetasrc + Sets the source reference on Chart Studio Cloud for + `theta`. + thetaunit + Sets the unit of input "theta" values. Has an effect + only when on "linear" angular axes. + uid + Assign an id to this trace, Use this to provide object + constancy between traces during animations and + transitions. + uirevision + Controls persistence of some user-driven changes to the + trace: `constraintrange` in `parcoords` traces, as well + as some `editable: true` modifications such as `name` + and `colorbar.title`. Defaults to `layout.uirevision`. + Note that other user-driven trace attribute changes are + controlled by `layout` attributes: `trace.visible` is + controlled by `layout.legend.uirevision`, + `selectedpoints` is controlled by + `layout.selectionrevision`, and `colorbar.(x|y)` + (accessible with `config: {editable: true}`) is + controlled by `layout.editrevision`. Trace changes are + tracked by `uid`, which only falls back on trace index + if no `uid` is provided. So if your app can add/remove + traces before the end of the `data` array, such that + the same trace has a different index, you can still + preserve user-driven changes if you give each trace a + `uid` that stays with it as it moves. + unselected + :class:`plotly.graph_objects.scatterpolar.Unselected` + instance or dict with compatible properties + visible + Determines whether or not this trace is visible. If + "legendonly", the trace is not drawn, but can appear as + a legend item (provided that the legend itself is + visible). + """ + + def __init__( + self, + arg=None, + cliponaxis=None, + connectgaps=None, + customdata=None, + customdatasrc=None, + dr=None, + dtheta=None, + fill=None, + fillcolor=None, + hoverinfo=None, + hoverinfosrc=None, + hoverlabel=None, + hoveron=None, + hovertemplate=None, + hovertemplatefallback=None, + hovertemplatesrc=None, + hovertext=None, + hovertextsrc=None, + ids=None, + idssrc=None, + legend=None, + legendgroup=None, + legendgrouptitle=None, + legendrank=None, + legendwidth=None, + line=None, + marker=None, + meta=None, + metasrc=None, + mode=None, + name=None, + opacity=None, + r=None, + r0=None, + rsrc=None, + selected=None, + selectedpoints=None, + showlegend=None, + stream=None, + subplot=None, + text=None, + textfont=None, + textposition=None, + textpositionsrc=None, + textsrc=None, + texttemplate=None, + texttemplatefallback=None, + texttemplatesrc=None, + theta=None, + theta0=None, + thetasrc=None, + thetaunit=None, + uid=None, + uirevision=None, + unselected=None, + visible=None, + **kwargs, + ): + """ + Construct a new Scatterpolar object + + The scatterpolar trace type encompasses line charts, scatter + charts, text charts, and bubble charts in polar coordinates. + The data visualized as scatter point or lines is set in `r` + (radial) and `theta` (angular) coordinates Text (appearing + either on the chart or on hover only) is via `text`. Bubble + charts are achieved by setting `marker.size` and/or + `marker.color` to numerical arrays. + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of :class:`plotly.graph_objs.Scatterpolar` + cliponaxis + Determines whether or not markers and text nodes are + clipped about the subplot axes. To show markers and + text nodes above axis lines and tick labels, make sure + to set `xaxis.layer` and `yaxis.layer` to *below + traces*. + connectgaps + Determines whether or not gaps (i.e. {nan} or missing + values) in the provided data arrays are connected. + customdata + Assigns extra data each datum. This may be useful when + listening to hover, click and selection events. Note + that, "scatter" traces also appends customdata items in + the markers DOM elements + customdatasrc + Sets the source reference on Chart Studio Cloud for + `customdata`. + dr + Sets the r coordinate step. + dtheta + Sets the theta coordinate step. By default, the + `dtheta` step equals the subplot's period divided by + the length of the `r` coordinates. + fill + Sets the area to fill with a solid color. Use with + `fillcolor` if not "none". scatterpolar has a subset of + the options available to scatter. "toself" connects the + endpoints of the trace (or each segment of the trace if + it has gaps) into a closed shape. "tonext" fills the + space between two traces if one completely encloses the + other (eg consecutive contour lines), and behaves like + "toself" if there is no trace before it. "tonext" + should not be used if one trace does not enclose the + other. + fillcolor + Sets the fill color. Defaults to a half-transparent + variant of the line color, marker color, or marker line + color, whichever is available. + hoverinfo + Determines which trace information appear on hover. If + `none` or `skip` are set, no information is displayed + upon hovering. But, if `none` is set, click and hover + events are still fired. + hoverinfosrc + Sets the source reference on Chart Studio Cloud for + `hoverinfo`. + hoverlabel + :class:`plotly.graph_objects.scatterpolar.Hoverlabel` + instance or dict with compatible properties + hoveron + Do the hover effects highlight individual points + (markers or line points) or do they highlight filled + regions? If the fill is "toself" or "tonext" and there + are no markers or text, then the default is "fills", + otherwise it is "points". + hovertemplate + Template string used for rendering the information that + appear on hover box. Note that this will override + `hoverinfo`. Variables are inserted using %{variable}, + for example "y: %{y}" as well as %{xother}, {%_xother}, + {%_xother_}, {%xother_}. When showing info for several + points, "xother" will be added to those with different + x positions from the first point. An underscore before + or after "(x|y)other" will add a space on that side, + only when this field is shown. Numbers are formatted + using d3-format's syntax %{variable:d3-format}, for + example "Price: %{y:$.2f}". + https://github.com/d3/d3-format/tree/v1.4.5#d3-format + for details on the formatting syntax. Dates are + formatted using d3-time-format's syntax + %{variable|d3-time-format}, for example "Day: + %{2019-01-01|%A}". https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format for details on the + date formatting syntax. Variables that can't be found + will be replaced with the specifier. For example, a + template of "data: %{x}, %{y}" will result in a value + of "data: 1, %{y}" if x is 1 and y is missing. + Variables with an undefined value will be replaced with + the fallback value. The variables available in + `hovertemplate` are the ones emitted as event data + described at this link + https://plotly.com/javascript/plotlyjs-events/#event- + data. Additionally, all attributes that can be + specified per-point (the ones that are `arrayOk: true`) + are available. Anything contained in tag `` is + displayed in the secondary box, for example + `%{fullData.name}`. To hide the + secondary box completely, use an empty tag + ``. + hovertemplatefallback + Fallback string that's displayed when a variable + referenced in a template is missing. If the boolean + value 'false' is passed in, the specifier with the + missing variable will be displayed. + hovertemplatesrc + Sets the source reference on Chart Studio Cloud for + `hovertemplate`. + hovertext + Sets hover text elements associated with each (x,y) + pair. If a single string, the same string appears over + all the data points. If an array of string, the items + are mapped in order to the this trace's (x,y) + coordinates. To be seen, trace `hoverinfo` must contain + a "text" flag. + hovertextsrc + Sets the source reference on Chart Studio Cloud for + `hovertext`. + ids + Assigns id labels to each datum. These ids for object + constancy of data points during animation. Should be an + array of strings, not numbers or any other type. + idssrc + Sets the source reference on Chart Studio Cloud for + `ids`. + legend + Sets the reference to a legend to show this trace in. + References to these legends are "legend", "legend2", + "legend3", etc. Settings for these legends are set in + the layout, under `layout.legend`, `layout.legend2`, + etc. + legendgroup + Sets the legend group for this trace. Traces and shapes + part of the same legend group hide/show at the same + time when toggling legend items. + legendgrouptitle + :class:`plotly.graph_objects.scatterpolar.Legendgroupti + tle` instance or dict with compatible properties + legendrank + Sets the legend rank for this trace. Items and groups + with smaller ranks are presented on top/left side while + with "reversed" `legend.traceorder` they are on + bottom/right side. The default legendrank is 1000, so + that you can use ranks less than 1000 to place certain + items before all unranked items, and ranks greater than + 1000 to go after all unranked items. When having + unranked or equal rank items shapes would be displayed + after traces i.e. according to their order in data and + layout. + legendwidth + Sets the width (in px or fraction) of the legend for + this trace. + line + :class:`plotly.graph_objects.scatterpolar.Line` + instance or dict with compatible properties + marker + :class:`plotly.graph_objects.scatterpolar.Marker` + instance or dict with compatible properties + meta + Assigns extra meta information associated with this + trace that can be used in various text attributes. + Attributes such as trace `name`, graph, axis and + colorbar `title.text`, annotation `text` + `rangeselector`, `updatemenues` and `sliders` `label` + text all support `meta`. To access the trace `meta` + values in an attribute in the same trace, simply use + `%{meta[i]}` where `i` is the index or key of the + `meta` item in question. To access trace `meta` in + layout attributes, use `%{data[n[.meta[i]}` where `i` + is the index or key of the `meta` and `n` is the trace + index. + metasrc + Sets the source reference on Chart Studio Cloud for + `meta`. + mode + Determines the drawing mode for this scatter trace. If + the provided `mode` includes "text" then the `text` + elements appear at the coordinates. Otherwise, the + `text` elements appear on hover. If there are less than + 20 points and the trace is not stacked then the default + is "lines+markers". Otherwise, "lines". + name + Sets the trace name. The trace name appears as the + legend item and on hover. + opacity + Sets the opacity of the trace. + r + Sets the radial coordinates + r0 + Alternate to `r`. Builds a linear space of r + coordinates. Use with `dr` where `r0` is the starting + coordinate and `dr` the step. + rsrc + Sets the source reference on Chart Studio Cloud for + `r`. + selected + :class:`plotly.graph_objects.scatterpolar.Selected` + instance or dict with compatible properties + selectedpoints + Array containing integer indices of selected points. + Has an effect only for traces that support selections. + Note that an empty array means an empty selection where + the `unselected` are turned on for all points, whereas, + any other non-array values means no selection all where + the `selected` and `unselected` styles have no effect. + showlegend + Determines whether or not an item corresponding to this + trace is shown in the legend. + stream + :class:`plotly.graph_objects.scatterpolar.Stream` + instance or dict with compatible properties + subplot + Sets a reference between this trace's data coordinates + and a polar subplot. If "polar" (the default value), + the data refer to `layout.polar`. If "polar2", the data + refer to `layout.polar2`, and so on. + text + Sets text elements associated with each (x,y) pair. If + a single string, the same string appears over all the + data points. If an array of string, the items are + mapped in order to the this trace's (x,y) coordinates. + If trace `hoverinfo` contains a "text" flag and + "hovertext" is not set, these elements will be seen in + the hover labels. + textfont + Sets the text font. + textposition + Sets the positions of the `text` elements with respects + to the (x,y) coordinates. + textpositionsrc + Sets the source reference on Chart Studio Cloud for + `textposition`. + textsrc + Sets the source reference on Chart Studio Cloud for + `text`. + texttemplate + Template string used for rendering the information text + that appears on points. Note that this will override + `textinfo`. Variables are inserted using %{variable}, + for example "y: %{y}". Numbers are formatted using + d3-format's syntax %{variable:d3-format}, for example + "Price: %{y:$.2f}". + https://github.com/d3/d3-format/tree/v1.4.5#d3-format + for details on the formatting syntax. Dates are + formatted using d3-time-format's syntax + %{variable|d3-time-format}, for example "Day: + %{2019-01-01|%A}". https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format for details on the + date formatting syntax. Variables that can't be found + will be replaced with the specifier. For example, a + template of "data: %{x}, %{y}" will result in a value + of "data: 1, %{y}" if x is 1 and y is missing. + Variables with an undefined value will be replaced with + the fallback value. All attributes that can be + specified per-point (the ones that are `arrayOk: true`) + are available. Finally, the template string has access + to variables `r`, `theta` and `text`. + texttemplatefallback + Fallback string that's displayed when a variable + referenced in a template is missing. If the boolean + value 'false' is passed in, the specifier with the + missing variable will be displayed. + texttemplatesrc + Sets the source reference on Chart Studio Cloud for + `texttemplate`. + theta + Sets the angular coordinates + theta0 + Alternate to `theta`. Builds a linear space of theta + coordinates. Use with `dtheta` where `theta0` is the + starting coordinate and `dtheta` the step. + thetasrc + Sets the source reference on Chart Studio Cloud for + `theta`. + thetaunit + Sets the unit of input "theta" values. Has an effect + only when on "linear" angular axes. + uid + Assign an id to this trace, Use this to provide object + constancy between traces during animations and + transitions. + uirevision + Controls persistence of some user-driven changes to the + trace: `constraintrange` in `parcoords` traces, as well + as some `editable: true` modifications such as `name` + and `colorbar.title`. Defaults to `layout.uirevision`. + Note that other user-driven trace attribute changes are + controlled by `layout` attributes: `trace.visible` is + controlled by `layout.legend.uirevision`, + `selectedpoints` is controlled by + `layout.selectionrevision`, and `colorbar.(x|y)` + (accessible with `config: {editable: true}`) is + controlled by `layout.editrevision`. Trace changes are + tracked by `uid`, which only falls back on trace index + if no `uid` is provided. So if your app can add/remove + traces before the end of the `data` array, such that + the same trace has a different index, you can still + preserve user-driven changes if you give each trace a + `uid` that stays with it as it moves. + unselected + :class:`plotly.graph_objects.scatterpolar.Unselected` + instance or dict with compatible properties + visible + Determines whether or not this trace is visible. If + "legendonly", the trace is not drawn, but can appear as + a legend item (provided that the legend itself is + visible). + + Returns + ------- + Scatterpolar + """ + super().__init__("scatterpolar") + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + if arg is None: + arg = {} + elif isinstance(arg, self.__class__): + arg = arg.to_plotly_json() + elif isinstance(arg, dict): + arg = _copy.copy(arg) + else: + raise ValueError("""\ +The first argument to the plotly.graph_objs.Scatterpolar +constructor must be a dict or +an instance of :class:`plotly.graph_objs.Scatterpolar`""") + + self._skip_invalid = kwargs.pop("skip_invalid", False) + self._validate = kwargs.pop("_validate", True) + + self._set_property("cliponaxis", arg, cliponaxis) + self._set_property("connectgaps", arg, connectgaps) + self._set_property("customdata", arg, customdata) + self._set_property("customdatasrc", arg, customdatasrc) + self._set_property("dr", arg, dr) + self._set_property("dtheta", arg, dtheta) + self._set_property("fill", arg, fill) + self._set_property("fillcolor", arg, fillcolor) + self._set_property("hoverinfo", arg, hoverinfo) + self._set_property("hoverinfosrc", arg, hoverinfosrc) + self._set_property("hoverlabel", arg, hoverlabel) + self._set_property("hoveron", arg, hoveron) + self._set_property("hovertemplate", arg, hovertemplate) + self._set_property("hovertemplatefallback", arg, hovertemplatefallback) + self._set_property("hovertemplatesrc", arg, hovertemplatesrc) + self._set_property("hovertext", arg, hovertext) + self._set_property("hovertextsrc", arg, hovertextsrc) + self._set_property("ids", arg, ids) + self._set_property("idssrc", arg, idssrc) + self._set_property("legend", arg, legend) + self._set_property("legendgroup", arg, legendgroup) + self._set_property("legendgrouptitle", arg, legendgrouptitle) + self._set_property("legendrank", arg, legendrank) + self._set_property("legendwidth", arg, legendwidth) + self._set_property("line", arg, line) + self._set_property("marker", arg, marker) + self._set_property("meta", arg, meta) + self._set_property("metasrc", arg, metasrc) + self._set_property("mode", arg, mode) + self._set_property("name", arg, name) + self._set_property("opacity", arg, opacity) + self._set_property("r", arg, r) + self._set_property("r0", arg, r0) + self._set_property("rsrc", arg, rsrc) + self._set_property("selected", arg, selected) + self._set_property("selectedpoints", arg, selectedpoints) + self._set_property("showlegend", arg, showlegend) + self._set_property("stream", arg, stream) + self._set_property("subplot", arg, subplot) + self._set_property("text", arg, text) + self._set_property("textfont", arg, textfont) + self._set_property("textposition", arg, textposition) + self._set_property("textpositionsrc", arg, textpositionsrc) + self._set_property("textsrc", arg, textsrc) + self._set_property("texttemplate", arg, texttemplate) + self._set_property("texttemplatefallback", arg, texttemplatefallback) + self._set_property("texttemplatesrc", arg, texttemplatesrc) + self._set_property("theta", arg, theta) + self._set_property("theta0", arg, theta0) + self._set_property("thetasrc", arg, thetasrc) + self._set_property("thetaunit", arg, thetaunit) + self._set_property("uid", arg, uid) + self._set_property("uirevision", arg, uirevision) + self._set_property("unselected", arg, unselected) + self._set_property("visible", arg, visible) + + self._props["type"] = "scatterpolar" + arg.pop("type", None) + self._process_kwargs(**dict(arg, **kwargs)) + self._skip_invalid = False diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/_scatterpolargl.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/_scatterpolargl.py new file mode 100644 index 0000000000000000000000000000000000000000..0205d08dbcf0aebc24705253f8ad99e20a23f8ea --- /dev/null +++ b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/_scatterpolargl.py @@ -0,0 +1,1969 @@ +# --- THIS FILE IS AUTO-GENERATED --- +# Modifications will be overwitten the next time code generation run. + +from plotly.basedatatypes import BaseTraceType as _BaseTraceType +import copy as _copy + + +class Scatterpolargl(_BaseTraceType): + _parent_path_str = "" + _path_str = "scatterpolargl" + _valid_props = { + "connectgaps", + "customdata", + "customdatasrc", + "dr", + "dtheta", + "fill", + "fillcolor", + "hoverinfo", + "hoverinfosrc", + "hoverlabel", + "hovertemplate", + "hovertemplatefallback", + "hovertemplatesrc", + "hovertext", + "hovertextsrc", + "ids", + "idssrc", + "legend", + "legendgroup", + "legendgrouptitle", + "legendrank", + "legendwidth", + "line", + "marker", + "meta", + "metasrc", + "mode", + "name", + "opacity", + "r", + "r0", + "rsrc", + "selected", + "selectedpoints", + "showlegend", + "stream", + "subplot", + "text", + "textfont", + "textposition", + "textpositionsrc", + "textsrc", + "texttemplate", + "texttemplatefallback", + "texttemplatesrc", + "theta", + "theta0", + "thetasrc", + "thetaunit", + "type", + "uid", + "uirevision", + "unselected", + "visible", + } + + @property + def connectgaps(self): + """ + Determines whether or not gaps (i.e. {nan} or missing values) + in the provided data arrays are connected. + + The 'connectgaps' property is a boolean and must be specified as: + - A boolean value: True or False + + Returns + ------- + bool + """ + return self["connectgaps"] + + @connectgaps.setter + def connectgaps(self, val): + self["connectgaps"] = val + + @property + def customdata(self): + """ + Assigns extra data each datum. This may be useful when + listening to hover, click and selection events. Note that, + "scatter" traces also appends customdata items in the markers + DOM elements + + The 'customdata' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["customdata"] + + @customdata.setter + def customdata(self, val): + self["customdata"] = val + + @property + def customdatasrc(self): + """ + Sets the source reference on Chart Studio Cloud for + `customdata`. + + The 'customdatasrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["customdatasrc"] + + @customdatasrc.setter + def customdatasrc(self, val): + self["customdatasrc"] = val + + @property + def dr(self): + """ + Sets the r coordinate step. + + The 'dr' property is a number and may be specified as: + - An int or float + + Returns + ------- + int|float + """ + return self["dr"] + + @dr.setter + def dr(self, val): + self["dr"] = val + + @property + def dtheta(self): + """ + Sets the theta coordinate step. By default, the `dtheta` step + equals the subplot's period divided by the length of the `r` + coordinates. + + The 'dtheta' property is a number and may be specified as: + - An int or float + + Returns + ------- + int|float + """ + return self["dtheta"] + + @dtheta.setter + def dtheta(self, val): + self["dtheta"] = val + + @property + def fill(self): + """ + Sets the area to fill with a solid color. Defaults to "none" + unless this trace is stacked, then it gets "tonexty" + ("tonextx") if `orientation` is "v" ("h") Use with `fillcolor` + if not "none". "tozerox" and "tozeroy" fill to x=0 and y=0 + respectively. "tonextx" and "tonexty" fill between the + endpoints of this trace and the endpoints of the trace before + it, connecting those endpoints with straight lines (to make a + stacked area graph); if there is no trace before it, they + behave like "tozerox" and "tozeroy". "toself" connects the + endpoints of the trace (or each segment of the trace if it has + gaps) into a closed shape. "tonext" fills the space between two + traces if one completely encloses the other (eg consecutive + contour lines), and behaves like "toself" if there is no trace + before it. "tonext" should not be used if one trace does not + enclose the other. Traces in a `stackgroup` will only fill to + (or be filled to) other traces in the same group. With multiple + `stackgroup`s or some traces stacked and some not, if fill- + linked traces are not already consecutive, the later ones will + be pushed down in the drawing order. + + The 'fill' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['none', 'tozeroy', 'tozerox', 'tonexty', 'tonextx', + 'toself', 'tonext'] + + Returns + ------- + Any + """ + return self["fill"] + + @fill.setter + def fill(self, val): + self["fill"] = val + + @property + def fillcolor(self): + """ + Sets the fill color. Defaults to a half-transparent variant of + the line color, marker color, or marker line color, whichever + is available. + + The 'fillcolor' property is a color and may be specified as: + - A hex string (e.g. '#ff0000') + - An rgb/rgba string (e.g. 'rgb(255,0,0)') + - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') + - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') + - A named CSS color: see https://plotly.com/python/css-colors/ for a list + + Returns + ------- + str + """ + return self["fillcolor"] + + @fillcolor.setter + def fillcolor(self, val): + self["fillcolor"] = val + + @property + def hoverinfo(self): + """ + Determines which trace information appear on hover. If `none` + or `skip` are set, no information is displayed upon hovering. + But, if `none` is set, click and hover events are still fired. + + The 'hoverinfo' property is a flaglist and may be specified + as a string containing: + - Any combination of ['r', 'theta', 'text', 'name'] joined with '+' characters + (e.g. 'r+theta') + OR exactly one of ['all', 'none', 'skip'] (e.g. 'skip') + - A list or array of the above + + Returns + ------- + Any|numpy.ndarray + """ + return self["hoverinfo"] + + @hoverinfo.setter + def hoverinfo(self, val): + self["hoverinfo"] = val + + @property + def hoverinfosrc(self): + """ + Sets the source reference on Chart Studio Cloud for + `hoverinfo`. + + The 'hoverinfosrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["hoverinfosrc"] + + @hoverinfosrc.setter + def hoverinfosrc(self, val): + self["hoverinfosrc"] = val + + @property + def hoverlabel(self): + """ + The 'hoverlabel' property is an instance of Hoverlabel + that may be specified as: + - An instance of :class:`plotly.graph_objs.scatterpolargl.Hoverlabel` + - A dict of string/value properties that will be passed + to the Hoverlabel constructor + + Returns + ------- + plotly.graph_objs.scatterpolargl.Hoverlabel + """ + return self["hoverlabel"] + + @hoverlabel.setter + def hoverlabel(self, val): + self["hoverlabel"] = val + + @property + def hovertemplate(self): + """ + Template string used for rendering the information that appear + on hover box. Note that this will override `hoverinfo`. + Variables are inserted using %{variable}, for example "y: %{y}" + as well as %{xother}, {%_xother}, {%_xother_}, {%xother_}. When + showing info for several points, "xother" will be added to + those with different x positions from the first point. An + underscore before or after "(x|y)other" will add a space on + that side, only when this field is shown. Numbers are formatted + using d3-format's syntax %{variable:d3-format}, for example + "Price: %{y:$.2f}". + https://github.com/d3/d3-format/tree/v1.4.5#d3-format for + details on the formatting syntax. Dates are formatted using + d3-time-format's syntax %{variable|d3-time-format}, for example + "Day: %{2019-01-01|%A}". https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format for details on the date + formatting syntax. Variables that can't be found will be + replaced with the specifier. For example, a template of "data: + %{x}, %{y}" will result in a value of "data: 1, %{y}" if x is 1 + and y is missing. Variables with an undefined value will be + replaced with the fallback value. The variables available in + `hovertemplate` are the ones emitted as event data described at + this link https://plotly.com/javascript/plotlyjs-events/#event- + data. Additionally, all attributes that can be specified per- + point (the ones that are `arrayOk: true`) are available. + Anything contained in tag `` is displayed in the + secondary box, for example `%{fullData.name}`. + To hide the secondary box completely, use an empty tag + ``. + + The 'hovertemplate' property is a string and must be specified as: + - A string + - A number that will be converted to a string + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["hovertemplate"] + + @hovertemplate.setter + def hovertemplate(self, val): + self["hovertemplate"] = val + + @property + def hovertemplatefallback(self): + """ + Fallback string that's displayed when a variable referenced in + a template is missing. If the boolean value 'false' is passed + in, the specifier with the missing variable will be displayed. + + The 'hovertemplatefallback' property accepts values of any type + + Returns + ------- + Any + """ + return self["hovertemplatefallback"] + + @hovertemplatefallback.setter + def hovertemplatefallback(self, val): + self["hovertemplatefallback"] = val + + @property + def hovertemplatesrc(self): + """ + Sets the source reference on Chart Studio Cloud for + `hovertemplate`. + + The 'hovertemplatesrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["hovertemplatesrc"] + + @hovertemplatesrc.setter + def hovertemplatesrc(self, val): + self["hovertemplatesrc"] = val + + @property + def hovertext(self): + """ + Sets hover text elements associated with each (x,y) pair. If a + single string, the same string appears over all the data + points. If an array of string, the items are mapped in order to + the this trace's (x,y) coordinates. To be seen, trace + `hoverinfo` must contain a "text" flag. + + The 'hovertext' property is a string and must be specified as: + - A string + - A number that will be converted to a string + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["hovertext"] + + @hovertext.setter + def hovertext(self, val): + self["hovertext"] = val + + @property + def hovertextsrc(self): + """ + Sets the source reference on Chart Studio Cloud for + `hovertext`. + + The 'hovertextsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["hovertextsrc"] + + @hovertextsrc.setter + def hovertextsrc(self, val): + self["hovertextsrc"] = val + + @property + def ids(self): + """ + Assigns id labels to each datum. These ids for object constancy + of data points during animation. Should be an array of strings, + not numbers or any other type. + + The 'ids' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["ids"] + + @ids.setter + def ids(self, val): + self["ids"] = val + + @property + def idssrc(self): + """ + Sets the source reference on Chart Studio Cloud for `ids`. + + The 'idssrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["idssrc"] + + @idssrc.setter + def idssrc(self, val): + self["idssrc"] = val + + @property + def legend(self): + """ + Sets the reference to a legend to show this trace in. + References to these legends are "legend", "legend2", "legend3", + etc. Settings for these legends are set in the layout, under + `layout.legend`, `layout.legend2`, etc. + + The 'legend' property is an identifier of a particular + subplot, of type 'legend', that may be specified as: + - the string 'legend' optionally followed by an integer >= 1 + (e.g. 'legend', 'legend1', 'legend2', 'legend3', etc.) + + Returns + ------- + str + """ + return self["legend"] + + @legend.setter + def legend(self, val): + self["legend"] = val + + @property + def legendgroup(self): + """ + Sets the legend group for this trace. Traces and shapes part of + the same legend group hide/show at the same time when toggling + legend items. + + The 'legendgroup' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["legendgroup"] + + @legendgroup.setter + def legendgroup(self, val): + self["legendgroup"] = val + + @property + def legendgrouptitle(self): + """ + The 'legendgrouptitle' property is an instance of Legendgrouptitle + that may be specified as: + - An instance of :class:`plotly.graph_objs.scatterpolargl.Legendgrouptitle` + - A dict of string/value properties that will be passed + to the Legendgrouptitle constructor + + Returns + ------- + plotly.graph_objs.scatterpolargl.Legendgrouptitle + """ + return self["legendgrouptitle"] + + @legendgrouptitle.setter + def legendgrouptitle(self, val): + self["legendgrouptitle"] = val + + @property + def legendrank(self): + """ + Sets the legend rank for this trace. Items and groups with + smaller ranks are presented on top/left side while with + "reversed" `legend.traceorder` they are on bottom/right side. + The default legendrank is 1000, so that you can use ranks less + than 1000 to place certain items before all unranked items, and + ranks greater than 1000 to go after all unranked items. When + having unranked or equal rank items shapes would be displayed + after traces i.e. according to their order in data and layout. + + The 'legendrank' property is a number and may be specified as: + - An int or float + + Returns + ------- + int|float + """ + return self["legendrank"] + + @legendrank.setter + def legendrank(self, val): + self["legendrank"] = val + + @property + def legendwidth(self): + """ + Sets the width (in px or fraction) of the legend for this + trace. + + The 'legendwidth' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["legendwidth"] + + @legendwidth.setter + def legendwidth(self, val): + self["legendwidth"] = val + + @property + def line(self): + """ + The 'line' property is an instance of Line + that may be specified as: + - An instance of :class:`plotly.graph_objs.scatterpolargl.Line` + - A dict of string/value properties that will be passed + to the Line constructor + + Returns + ------- + plotly.graph_objs.scatterpolargl.Line + """ + return self["line"] + + @line.setter + def line(self, val): + self["line"] = val + + @property + def marker(self): + """ + The 'marker' property is an instance of Marker + that may be specified as: + - An instance of :class:`plotly.graph_objs.scatterpolargl.Marker` + - A dict of string/value properties that will be passed + to the Marker constructor + + Returns + ------- + plotly.graph_objs.scatterpolargl.Marker + """ + return self["marker"] + + @marker.setter + def marker(self, val): + self["marker"] = val + + @property + def meta(self): + """ + Assigns extra meta information associated with this trace that + can be used in various text attributes. Attributes such as + trace `name`, graph, axis and colorbar `title.text`, annotation + `text` `rangeselector`, `updatemenues` and `sliders` `label` + text all support `meta`. To access the trace `meta` values in + an attribute in the same trace, simply use `%{meta[i]}` where + `i` is the index or key of the `meta` item in question. To + access trace `meta` in layout attributes, use + `%{data[n[.meta[i]}` where `i` is the index or key of the + `meta` and `n` is the trace index. + + The 'meta' property accepts values of any type + + Returns + ------- + Any|numpy.ndarray + """ + return self["meta"] + + @meta.setter + def meta(self, val): + self["meta"] = val + + @property + def metasrc(self): + """ + Sets the source reference on Chart Studio Cloud for `meta`. + + The 'metasrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["metasrc"] + + @metasrc.setter + def metasrc(self, val): + self["metasrc"] = val + + @property + def mode(self): + """ + Determines the drawing mode for this scatter trace. If the + provided `mode` includes "text" then the `text` elements appear + at the coordinates. Otherwise, the `text` elements appear on + hover. If there are less than 20 points and the trace is not + stacked then the default is "lines+markers". Otherwise, + "lines". + + The 'mode' property is a flaglist and may be specified + as a string containing: + - Any combination of ['lines', 'markers', 'text'] joined with '+' characters + (e.g. 'lines+markers') + OR exactly one of ['none'] (e.g. 'none') + + Returns + ------- + Any + """ + return self["mode"] + + @mode.setter + def mode(self, val): + self["mode"] = val + + @property + def name(self): + """ + Sets the trace name. The trace name appears as the legend item + and on hover. + + The 'name' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["name"] + + @name.setter + def name(self, val): + self["name"] = val + + @property + def opacity(self): + """ + Sets the opacity of the trace. + + The 'opacity' property is a number and may be specified as: + - An int or float in the interval [0, 1] + + Returns + ------- + int|float + """ + return self["opacity"] + + @opacity.setter + def opacity(self, val): + self["opacity"] = val + + @property + def r(self): + """ + Sets the radial coordinates + + The 'r' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["r"] + + @r.setter + def r(self, val): + self["r"] = val + + @property + def r0(self): + """ + Alternate to `r`. Builds a linear space of r coordinates. Use + with `dr` where `r0` is the starting coordinate and `dr` the + step. + + The 'r0' property accepts values of any type + + Returns + ------- + Any + """ + return self["r0"] + + @r0.setter + def r0(self, val): + self["r0"] = val + + @property + def rsrc(self): + """ + Sets the source reference on Chart Studio Cloud for `r`. + + The 'rsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["rsrc"] + + @rsrc.setter + def rsrc(self, val): + self["rsrc"] = val + + @property + def selected(self): + """ + The 'selected' property is an instance of Selected + that may be specified as: + - An instance of :class:`plotly.graph_objs.scatterpolargl.Selected` + - A dict of string/value properties that will be passed + to the Selected constructor + + Returns + ------- + plotly.graph_objs.scatterpolargl.Selected + """ + return self["selected"] + + @selected.setter + def selected(self, val): + self["selected"] = val + + @property + def selectedpoints(self): + """ + Array containing integer indices of selected points. Has an + effect only for traces that support selections. Note that an + empty array means an empty selection where the `unselected` are + turned on for all points, whereas, any other non-array values + means no selection all where the `selected` and `unselected` + styles have no effect. + + The 'selectedpoints' property accepts values of any type + + Returns + ------- + Any + """ + return self["selectedpoints"] + + @selectedpoints.setter + def selectedpoints(self, val): + self["selectedpoints"] = val + + @property + def showlegend(self): + """ + Determines whether or not an item corresponding to this trace + is shown in the legend. + + The 'showlegend' property is a boolean and must be specified as: + - A boolean value: True or False + + Returns + ------- + bool + """ + return self["showlegend"] + + @showlegend.setter + def showlegend(self, val): + self["showlegend"] = val + + @property + def stream(self): + """ + The 'stream' property is an instance of Stream + that may be specified as: + - An instance of :class:`plotly.graph_objs.scatterpolargl.Stream` + - A dict of string/value properties that will be passed + to the Stream constructor + + Returns + ------- + plotly.graph_objs.scatterpolargl.Stream + """ + return self["stream"] + + @stream.setter + def stream(self, val): + self["stream"] = val + + @property + def subplot(self): + """ + Sets a reference between this trace's data coordinates and a + polar subplot. If "polar" (the default value), the data refer + to `layout.polar`. If "polar2", the data refer to + `layout.polar2`, and so on. + + The 'subplot' property is an identifier of a particular + subplot, of type 'polar', that may be specified as: + - the string 'polar' optionally followed by an integer >= 1 + (e.g. 'polar', 'polar1', 'polar2', 'polar3', etc.) + + Returns + ------- + str + """ + return self["subplot"] + + @subplot.setter + def subplot(self, val): + self["subplot"] = val + + @property + def text(self): + """ + Sets text elements associated with each (x,y) pair. If a single + string, the same string appears over all the data points. If an + array of string, the items are mapped in order to the this + trace's (x,y) coordinates. If trace `hoverinfo` contains a + "text" flag and "hovertext" is not set, these elements will be + seen in the hover labels. + + The 'text' property is a string and must be specified as: + - A string + - A number that will be converted to a string + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["text"] + + @text.setter + def text(self, val): + self["text"] = val + + @property + def textfont(self): + """ + Sets the text font. + + The 'textfont' property is an instance of Textfont + that may be specified as: + - An instance of :class:`plotly.graph_objs.scatterpolargl.Textfont` + - A dict of string/value properties that will be passed + to the Textfont constructor + + Returns + ------- + plotly.graph_objs.scatterpolargl.Textfont + """ + return self["textfont"] + + @textfont.setter + def textfont(self, val): + self["textfont"] = val + + @property + def textposition(self): + """ + Sets the positions of the `text` elements with respects to the + (x,y) coordinates. + + The 'textposition' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['top left', 'top center', 'top right', 'middle left', + 'middle center', 'middle right', 'bottom left', 'bottom + center', 'bottom right'] + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + Any|numpy.ndarray + """ + return self["textposition"] + + @textposition.setter + def textposition(self, val): + self["textposition"] = val + + @property + def textpositionsrc(self): + """ + Sets the source reference on Chart Studio Cloud for + `textposition`. + + The 'textpositionsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["textpositionsrc"] + + @textpositionsrc.setter + def textpositionsrc(self, val): + self["textpositionsrc"] = val + + @property + def textsrc(self): + """ + Sets the source reference on Chart Studio Cloud for `text`. + + The 'textsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["textsrc"] + + @textsrc.setter + def textsrc(self, val): + self["textsrc"] = val + + @property + def texttemplate(self): + """ + Template string used for rendering the information text that + appears on points. Note that this will override `textinfo`. + Variables are inserted using %{variable}, for example "y: + %{y}". Numbers are formatted using d3-format's syntax + %{variable:d3-format}, for example "Price: %{y:$.2f}". + https://github.com/d3/d3-format/tree/v1.4.5#d3-format for + details on the formatting syntax. Dates are formatted using + d3-time-format's syntax %{variable|d3-time-format}, for example + "Day: %{2019-01-01|%A}". https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format for details on the date + formatting syntax. Variables that can't be found will be + replaced with the specifier. For example, a template of "data: + %{x}, %{y}" will result in a value of "data: 1, %{y}" if x is 1 + and y is missing. Variables with an undefined value will be + replaced with the fallback value. All attributes that can be + specified per-point (the ones that are `arrayOk: true`) are + available. Finally, the template string has access to variables + `r`, `theta` and `text`. + + The 'texttemplate' property is a string and must be specified as: + - A string + - A number that will be converted to a string + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["texttemplate"] + + @texttemplate.setter + def texttemplate(self, val): + self["texttemplate"] = val + + @property + def texttemplatefallback(self): + """ + Fallback string that's displayed when a variable referenced in + a template is missing. If the boolean value 'false' is passed + in, the specifier with the missing variable will be displayed. + + The 'texttemplatefallback' property accepts values of any type + + Returns + ------- + Any + """ + return self["texttemplatefallback"] + + @texttemplatefallback.setter + def texttemplatefallback(self, val): + self["texttemplatefallback"] = val + + @property + def texttemplatesrc(self): + """ + Sets the source reference on Chart Studio Cloud for + `texttemplate`. + + The 'texttemplatesrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["texttemplatesrc"] + + @texttemplatesrc.setter + def texttemplatesrc(self, val): + self["texttemplatesrc"] = val + + @property + def theta(self): + """ + Sets the angular coordinates + + The 'theta' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["theta"] + + @theta.setter + def theta(self, val): + self["theta"] = val + + @property + def theta0(self): + """ + Alternate to `theta`. Builds a linear space of theta + coordinates. Use with `dtheta` where `theta0` is the starting + coordinate and `dtheta` the step. + + The 'theta0' property accepts values of any type + + Returns + ------- + Any + """ + return self["theta0"] + + @theta0.setter + def theta0(self, val): + self["theta0"] = val + + @property + def thetasrc(self): + """ + Sets the source reference on Chart Studio Cloud for `theta`. + + The 'thetasrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["thetasrc"] + + @thetasrc.setter + def thetasrc(self, val): + self["thetasrc"] = val + + @property + def thetaunit(self): + """ + Sets the unit of input "theta" values. Has an effect only when + on "linear" angular axes. + + The 'thetaunit' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['radians', 'degrees', 'gradians'] + + Returns + ------- + Any + """ + return self["thetaunit"] + + @thetaunit.setter + def thetaunit(self, val): + self["thetaunit"] = val + + @property + def uid(self): + """ + Assign an id to this trace, Use this to provide object + constancy between traces during animations and transitions. + + The 'uid' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["uid"] + + @uid.setter + def uid(self, val): + self["uid"] = val + + @property + def uirevision(self): + """ + Controls persistence of some user-driven changes to the trace: + `constraintrange` in `parcoords` traces, as well as some + `editable: true` modifications such as `name` and + `colorbar.title`. Defaults to `layout.uirevision`. Note that + other user-driven trace attribute changes are controlled by + `layout` attributes: `trace.visible` is controlled by + `layout.legend.uirevision`, `selectedpoints` is controlled by + `layout.selectionrevision`, and `colorbar.(x|y)` (accessible + with `config: {editable: true}`) is controlled by + `layout.editrevision`. Trace changes are tracked by `uid`, + which only falls back on trace index if no `uid` is provided. + So if your app can add/remove traces before the end of the + `data` array, such that the same trace has a different index, + you can still preserve user-driven changes if you give each + trace a `uid` that stays with it as it moves. + + The 'uirevision' property accepts values of any type + + Returns + ------- + Any + """ + return self["uirevision"] + + @uirevision.setter + def uirevision(self, val): + self["uirevision"] = val + + @property + def unselected(self): + """ + The 'unselected' property is an instance of Unselected + that may be specified as: + - An instance of :class:`plotly.graph_objs.scatterpolargl.Unselected` + - A dict of string/value properties that will be passed + to the Unselected constructor + + Returns + ------- + plotly.graph_objs.scatterpolargl.Unselected + """ + return self["unselected"] + + @unselected.setter + def unselected(self, val): + self["unselected"] = val + + @property + def visible(self): + """ + Determines whether or not this trace is visible. If + "legendonly", the trace is not drawn, but can appear as a + legend item (provided that the legend itself is visible). + + The 'visible' property is an enumeration that may be specified as: + - One of the following enumeration values: + [True, False, 'legendonly'] + + Returns + ------- + Any + """ + return self["visible"] + + @visible.setter + def visible(self, val): + self["visible"] = val + + @property + def type(self): + return self._props["type"] + + @property + def _prop_descriptions(self): + return """\ + connectgaps + Determines whether or not gaps (i.e. {nan} or missing + values) in the provided data arrays are connected. + customdata + Assigns extra data each datum. This may be useful when + listening to hover, click and selection events. Note + that, "scatter" traces also appends customdata items in + the markers DOM elements + customdatasrc + Sets the source reference on Chart Studio Cloud for + `customdata`. + dr + Sets the r coordinate step. + dtheta + Sets the theta coordinate step. By default, the + `dtheta` step equals the subplot's period divided by + the length of the `r` coordinates. + fill + Sets the area to fill with a solid color. Defaults to + "none" unless this trace is stacked, then it gets + "tonexty" ("tonextx") if `orientation` is "v" ("h") Use + with `fillcolor` if not "none". "tozerox" and "tozeroy" + fill to x=0 and y=0 respectively. "tonextx" and + "tonexty" fill between the endpoints of this trace and + the endpoints of the trace before it, connecting those + endpoints with straight lines (to make a stacked area + graph); if there is no trace before it, they behave + like "tozerox" and "tozeroy". "toself" connects the + endpoints of the trace (or each segment of the trace if + it has gaps) into a closed shape. "tonext" fills the + space between two traces if one completely encloses the + other (eg consecutive contour lines), and behaves like + "toself" if there is no trace before it. "tonext" + should not be used if one trace does not enclose the + other. Traces in a `stackgroup` will only fill to (or + be filled to) other traces in the same group. With + multiple `stackgroup`s or some traces stacked and some + not, if fill-linked traces are not already consecutive, + the later ones will be pushed down in the drawing + order. + fillcolor + Sets the fill color. Defaults to a half-transparent + variant of the line color, marker color, or marker line + color, whichever is available. + hoverinfo + Determines which trace information appear on hover. If + `none` or `skip` are set, no information is displayed + upon hovering. But, if `none` is set, click and hover + events are still fired. + hoverinfosrc + Sets the source reference on Chart Studio Cloud for + `hoverinfo`. + hoverlabel + :class:`plotly.graph_objects.scatterpolargl.Hoverlabel` + instance or dict with compatible properties + hovertemplate + Template string used for rendering the information that + appear on hover box. Note that this will override + `hoverinfo`. Variables are inserted using %{variable}, + for example "y: %{y}" as well as %{xother}, {%_xother}, + {%_xother_}, {%xother_}. When showing info for several + points, "xother" will be added to those with different + x positions from the first point. An underscore before + or after "(x|y)other" will add a space on that side, + only when this field is shown. Numbers are formatted + using d3-format's syntax %{variable:d3-format}, for + example "Price: %{y:$.2f}". + https://github.com/d3/d3-format/tree/v1.4.5#d3-format + for details on the formatting syntax. Dates are + formatted using d3-time-format's syntax + %{variable|d3-time-format}, for example "Day: + %{2019-01-01|%A}". https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format for details on the + date formatting syntax. Variables that can't be found + will be replaced with the specifier. For example, a + template of "data: %{x}, %{y}" will result in a value + of "data: 1, %{y}" if x is 1 and y is missing. + Variables with an undefined value will be replaced with + the fallback value. The variables available in + `hovertemplate` are the ones emitted as event data + described at this link + https://plotly.com/javascript/plotlyjs-events/#event- + data. Additionally, all attributes that can be + specified per-point (the ones that are `arrayOk: true`) + are available. Anything contained in tag `` is + displayed in the secondary box, for example + `%{fullData.name}`. To hide the + secondary box completely, use an empty tag + ``. + hovertemplatefallback + Fallback string that's displayed when a variable + referenced in a template is missing. If the boolean + value 'false' is passed in, the specifier with the + missing variable will be displayed. + hovertemplatesrc + Sets the source reference on Chart Studio Cloud for + `hovertemplate`. + hovertext + Sets hover text elements associated with each (x,y) + pair. If a single string, the same string appears over + all the data points. If an array of string, the items + are mapped in order to the this trace's (x,y) + coordinates. To be seen, trace `hoverinfo` must contain + a "text" flag. + hovertextsrc + Sets the source reference on Chart Studio Cloud for + `hovertext`. + ids + Assigns id labels to each datum. These ids for object + constancy of data points during animation. Should be an + array of strings, not numbers or any other type. + idssrc + Sets the source reference on Chart Studio Cloud for + `ids`. + legend + Sets the reference to a legend to show this trace in. + References to these legends are "legend", "legend2", + "legend3", etc. Settings for these legends are set in + the layout, under `layout.legend`, `layout.legend2`, + etc. + legendgroup + Sets the legend group for this trace. Traces and shapes + part of the same legend group hide/show at the same + time when toggling legend items. + legendgrouptitle + :class:`plotly.graph_objects.scatterpolargl.Legendgroup + title` instance or dict with compatible properties + legendrank + Sets the legend rank for this trace. Items and groups + with smaller ranks are presented on top/left side while + with "reversed" `legend.traceorder` they are on + bottom/right side. The default legendrank is 1000, so + that you can use ranks less than 1000 to place certain + items before all unranked items, and ranks greater than + 1000 to go after all unranked items. When having + unranked or equal rank items shapes would be displayed + after traces i.e. according to their order in data and + layout. + legendwidth + Sets the width (in px or fraction) of the legend for + this trace. + line + :class:`plotly.graph_objects.scatterpolargl.Line` + instance or dict with compatible properties + marker + :class:`plotly.graph_objects.scatterpolargl.Marker` + instance or dict with compatible properties + meta + Assigns extra meta information associated with this + trace that can be used in various text attributes. + Attributes such as trace `name`, graph, axis and + colorbar `title.text`, annotation `text` + `rangeselector`, `updatemenues` and `sliders` `label` + text all support `meta`. To access the trace `meta` + values in an attribute in the same trace, simply use + `%{meta[i]}` where `i` is the index or key of the + `meta` item in question. To access trace `meta` in + layout attributes, use `%{data[n[.meta[i]}` where `i` + is the index or key of the `meta` and `n` is the trace + index. + metasrc + Sets the source reference on Chart Studio Cloud for + `meta`. + mode + Determines the drawing mode for this scatter trace. If + the provided `mode` includes "text" then the `text` + elements appear at the coordinates. Otherwise, the + `text` elements appear on hover. If there are less than + 20 points and the trace is not stacked then the default + is "lines+markers". Otherwise, "lines". + name + Sets the trace name. The trace name appears as the + legend item and on hover. + opacity + Sets the opacity of the trace. + r + Sets the radial coordinates + r0 + Alternate to `r`. Builds a linear space of r + coordinates. Use with `dr` where `r0` is the starting + coordinate and `dr` the step. + rsrc + Sets the source reference on Chart Studio Cloud for + `r`. + selected + :class:`plotly.graph_objects.scatterpolargl.Selected` + instance or dict with compatible properties + selectedpoints + Array containing integer indices of selected points. + Has an effect only for traces that support selections. + Note that an empty array means an empty selection where + the `unselected` are turned on for all points, whereas, + any other non-array values means no selection all where + the `selected` and `unselected` styles have no effect. + showlegend + Determines whether or not an item corresponding to this + trace is shown in the legend. + stream + :class:`plotly.graph_objects.scatterpolargl.Stream` + instance or dict with compatible properties + subplot + Sets a reference between this trace's data coordinates + and a polar subplot. If "polar" (the default value), + the data refer to `layout.polar`. If "polar2", the data + refer to `layout.polar2`, and so on. + text + Sets text elements associated with each (x,y) pair. If + a single string, the same string appears over all the + data points. If an array of string, the items are + mapped in order to the this trace's (x,y) coordinates. + If trace `hoverinfo` contains a "text" flag and + "hovertext" is not set, these elements will be seen in + the hover labels. + textfont + Sets the text font. + textposition + Sets the positions of the `text` elements with respects + to the (x,y) coordinates. + textpositionsrc + Sets the source reference on Chart Studio Cloud for + `textposition`. + textsrc + Sets the source reference on Chart Studio Cloud for + `text`. + texttemplate + Template string used for rendering the information text + that appears on points. Note that this will override + `textinfo`. Variables are inserted using %{variable}, + for example "y: %{y}". Numbers are formatted using + d3-format's syntax %{variable:d3-format}, for example + "Price: %{y:$.2f}". + https://github.com/d3/d3-format/tree/v1.4.5#d3-format + for details on the formatting syntax. Dates are + formatted using d3-time-format's syntax + %{variable|d3-time-format}, for example "Day: + %{2019-01-01|%A}". https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format for details on the + date formatting syntax. Variables that can't be found + will be replaced with the specifier. For example, a + template of "data: %{x}, %{y}" will result in a value + of "data: 1, %{y}" if x is 1 and y is missing. + Variables with an undefined value will be replaced with + the fallback value. All attributes that can be + specified per-point (the ones that are `arrayOk: true`) + are available. Finally, the template string has access + to variables `r`, `theta` and `text`. + texttemplatefallback + Fallback string that's displayed when a variable + referenced in a template is missing. If the boolean + value 'false' is passed in, the specifier with the + missing variable will be displayed. + texttemplatesrc + Sets the source reference on Chart Studio Cloud for + `texttemplate`. + theta + Sets the angular coordinates + theta0 + Alternate to `theta`. Builds a linear space of theta + coordinates. Use with `dtheta` where `theta0` is the + starting coordinate and `dtheta` the step. + thetasrc + Sets the source reference on Chart Studio Cloud for + `theta`. + thetaunit + Sets the unit of input "theta" values. Has an effect + only when on "linear" angular axes. + uid + Assign an id to this trace, Use this to provide object + constancy between traces during animations and + transitions. + uirevision + Controls persistence of some user-driven changes to the + trace: `constraintrange` in `parcoords` traces, as well + as some `editable: true` modifications such as `name` + and `colorbar.title`. Defaults to `layout.uirevision`. + Note that other user-driven trace attribute changes are + controlled by `layout` attributes: `trace.visible` is + controlled by `layout.legend.uirevision`, + `selectedpoints` is controlled by + `layout.selectionrevision`, and `colorbar.(x|y)` + (accessible with `config: {editable: true}`) is + controlled by `layout.editrevision`. Trace changes are + tracked by `uid`, which only falls back on trace index + if no `uid` is provided. So if your app can add/remove + traces before the end of the `data` array, such that + the same trace has a different index, you can still + preserve user-driven changes if you give each trace a + `uid` that stays with it as it moves. + unselected + :class:`plotly.graph_objects.scatterpolargl.Unselected` + instance or dict with compatible properties + visible + Determines whether or not this trace is visible. If + "legendonly", the trace is not drawn, but can appear as + a legend item (provided that the legend itself is + visible). + """ + + def __init__( + self, + arg=None, + connectgaps=None, + customdata=None, + customdatasrc=None, + dr=None, + dtheta=None, + fill=None, + fillcolor=None, + hoverinfo=None, + hoverinfosrc=None, + hoverlabel=None, + hovertemplate=None, + hovertemplatefallback=None, + hovertemplatesrc=None, + hovertext=None, + hovertextsrc=None, + ids=None, + idssrc=None, + legend=None, + legendgroup=None, + legendgrouptitle=None, + legendrank=None, + legendwidth=None, + line=None, + marker=None, + meta=None, + metasrc=None, + mode=None, + name=None, + opacity=None, + r=None, + r0=None, + rsrc=None, + selected=None, + selectedpoints=None, + showlegend=None, + stream=None, + subplot=None, + text=None, + textfont=None, + textposition=None, + textpositionsrc=None, + textsrc=None, + texttemplate=None, + texttemplatefallback=None, + texttemplatesrc=None, + theta=None, + theta0=None, + thetasrc=None, + thetaunit=None, + uid=None, + uirevision=None, + unselected=None, + visible=None, + **kwargs, + ): + """ + Construct a new Scatterpolargl object + + The scatterpolargl trace type encompasses line charts, scatter + charts, and bubble charts in polar coordinates using the WebGL + plotting engine. The data visualized as scatter point or lines + is set in `r` (radial) and `theta` (angular) coordinates Bubble + charts are achieved by setting `marker.size` and/or + `marker.color` to numerical arrays. + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.Scatterpolargl` + connectgaps + Determines whether or not gaps (i.e. {nan} or missing + values) in the provided data arrays are connected. + customdata + Assigns extra data each datum. This may be useful when + listening to hover, click and selection events. Note + that, "scatter" traces also appends customdata items in + the markers DOM elements + customdatasrc + Sets the source reference on Chart Studio Cloud for + `customdata`. + dr + Sets the r coordinate step. + dtheta + Sets the theta coordinate step. By default, the + `dtheta` step equals the subplot's period divided by + the length of the `r` coordinates. + fill + Sets the area to fill with a solid color. Defaults to + "none" unless this trace is stacked, then it gets + "tonexty" ("tonextx") if `orientation` is "v" ("h") Use + with `fillcolor` if not "none". "tozerox" and "tozeroy" + fill to x=0 and y=0 respectively. "tonextx" and + "tonexty" fill between the endpoints of this trace and + the endpoints of the trace before it, connecting those + endpoints with straight lines (to make a stacked area + graph); if there is no trace before it, they behave + like "tozerox" and "tozeroy". "toself" connects the + endpoints of the trace (or each segment of the trace if + it has gaps) into a closed shape. "tonext" fills the + space between two traces if one completely encloses the + other (eg consecutive contour lines), and behaves like + "toself" if there is no trace before it. "tonext" + should not be used if one trace does not enclose the + other. Traces in a `stackgroup` will only fill to (or + be filled to) other traces in the same group. With + multiple `stackgroup`s or some traces stacked and some + not, if fill-linked traces are not already consecutive, + the later ones will be pushed down in the drawing + order. + fillcolor + Sets the fill color. Defaults to a half-transparent + variant of the line color, marker color, or marker line + color, whichever is available. + hoverinfo + Determines which trace information appear on hover. If + `none` or `skip` are set, no information is displayed + upon hovering. But, if `none` is set, click and hover + events are still fired. + hoverinfosrc + Sets the source reference on Chart Studio Cloud for + `hoverinfo`. + hoverlabel + :class:`plotly.graph_objects.scatterpolargl.Hoverlabel` + instance or dict with compatible properties + hovertemplate + Template string used for rendering the information that + appear on hover box. Note that this will override + `hoverinfo`. Variables are inserted using %{variable}, + for example "y: %{y}" as well as %{xother}, {%_xother}, + {%_xother_}, {%xother_}. When showing info for several + points, "xother" will be added to those with different + x positions from the first point. An underscore before + or after "(x|y)other" will add a space on that side, + only when this field is shown. Numbers are formatted + using d3-format's syntax %{variable:d3-format}, for + example "Price: %{y:$.2f}". + https://github.com/d3/d3-format/tree/v1.4.5#d3-format + for details on the formatting syntax. Dates are + formatted using d3-time-format's syntax + %{variable|d3-time-format}, for example "Day: + %{2019-01-01|%A}". https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format for details on the + date formatting syntax. Variables that can't be found + will be replaced with the specifier. For example, a + template of "data: %{x}, %{y}" will result in a value + of "data: 1, %{y}" if x is 1 and y is missing. + Variables with an undefined value will be replaced with + the fallback value. The variables available in + `hovertemplate` are the ones emitted as event data + described at this link + https://plotly.com/javascript/plotlyjs-events/#event- + data. Additionally, all attributes that can be + specified per-point (the ones that are `arrayOk: true`) + are available. Anything contained in tag `` is + displayed in the secondary box, for example + `%{fullData.name}`. To hide the + secondary box completely, use an empty tag + ``. + hovertemplatefallback + Fallback string that's displayed when a variable + referenced in a template is missing. If the boolean + value 'false' is passed in, the specifier with the + missing variable will be displayed. + hovertemplatesrc + Sets the source reference on Chart Studio Cloud for + `hovertemplate`. + hovertext + Sets hover text elements associated with each (x,y) + pair. If a single string, the same string appears over + all the data points. If an array of string, the items + are mapped in order to the this trace's (x,y) + coordinates. To be seen, trace `hoverinfo` must contain + a "text" flag. + hovertextsrc + Sets the source reference on Chart Studio Cloud for + `hovertext`. + ids + Assigns id labels to each datum. These ids for object + constancy of data points during animation. Should be an + array of strings, not numbers or any other type. + idssrc + Sets the source reference on Chart Studio Cloud for + `ids`. + legend + Sets the reference to a legend to show this trace in. + References to these legends are "legend", "legend2", + "legend3", etc. Settings for these legends are set in + the layout, under `layout.legend`, `layout.legend2`, + etc. + legendgroup + Sets the legend group for this trace. Traces and shapes + part of the same legend group hide/show at the same + time when toggling legend items. + legendgrouptitle + :class:`plotly.graph_objects.scatterpolargl.Legendgroup + title` instance or dict with compatible properties + legendrank + Sets the legend rank for this trace. Items and groups + with smaller ranks are presented on top/left side while + with "reversed" `legend.traceorder` they are on + bottom/right side. The default legendrank is 1000, so + that you can use ranks less than 1000 to place certain + items before all unranked items, and ranks greater than + 1000 to go after all unranked items. When having + unranked or equal rank items shapes would be displayed + after traces i.e. according to their order in data and + layout. + legendwidth + Sets the width (in px or fraction) of the legend for + this trace. + line + :class:`plotly.graph_objects.scatterpolargl.Line` + instance or dict with compatible properties + marker + :class:`plotly.graph_objects.scatterpolargl.Marker` + instance or dict with compatible properties + meta + Assigns extra meta information associated with this + trace that can be used in various text attributes. + Attributes such as trace `name`, graph, axis and + colorbar `title.text`, annotation `text` + `rangeselector`, `updatemenues` and `sliders` `label` + text all support `meta`. To access the trace `meta` + values in an attribute in the same trace, simply use + `%{meta[i]}` where `i` is the index or key of the + `meta` item in question. To access trace `meta` in + layout attributes, use `%{data[n[.meta[i]}` where `i` + is the index or key of the `meta` and `n` is the trace + index. + metasrc + Sets the source reference on Chart Studio Cloud for + `meta`. + mode + Determines the drawing mode for this scatter trace. If + the provided `mode` includes "text" then the `text` + elements appear at the coordinates. Otherwise, the + `text` elements appear on hover. If there are less than + 20 points and the trace is not stacked then the default + is "lines+markers". Otherwise, "lines". + name + Sets the trace name. The trace name appears as the + legend item and on hover. + opacity + Sets the opacity of the trace. + r + Sets the radial coordinates + r0 + Alternate to `r`. Builds a linear space of r + coordinates. Use with `dr` where `r0` is the starting + coordinate and `dr` the step. + rsrc + Sets the source reference on Chart Studio Cloud for + `r`. + selected + :class:`plotly.graph_objects.scatterpolargl.Selected` + instance or dict with compatible properties + selectedpoints + Array containing integer indices of selected points. + Has an effect only for traces that support selections. + Note that an empty array means an empty selection where + the `unselected` are turned on for all points, whereas, + any other non-array values means no selection all where + the `selected` and `unselected` styles have no effect. + showlegend + Determines whether or not an item corresponding to this + trace is shown in the legend. + stream + :class:`plotly.graph_objects.scatterpolargl.Stream` + instance or dict with compatible properties + subplot + Sets a reference between this trace's data coordinates + and a polar subplot. If "polar" (the default value), + the data refer to `layout.polar`. If "polar2", the data + refer to `layout.polar2`, and so on. + text + Sets text elements associated with each (x,y) pair. If + a single string, the same string appears over all the + data points. If an array of string, the items are + mapped in order to the this trace's (x,y) coordinates. + If trace `hoverinfo` contains a "text" flag and + "hovertext" is not set, these elements will be seen in + the hover labels. + textfont + Sets the text font. + textposition + Sets the positions of the `text` elements with respects + to the (x,y) coordinates. + textpositionsrc + Sets the source reference on Chart Studio Cloud for + `textposition`. + textsrc + Sets the source reference on Chart Studio Cloud for + `text`. + texttemplate + Template string used for rendering the information text + that appears on points. Note that this will override + `textinfo`. Variables are inserted using %{variable}, + for example "y: %{y}". Numbers are formatted using + d3-format's syntax %{variable:d3-format}, for example + "Price: %{y:$.2f}". + https://github.com/d3/d3-format/tree/v1.4.5#d3-format + for details on the formatting syntax. Dates are + formatted using d3-time-format's syntax + %{variable|d3-time-format}, for example "Day: + %{2019-01-01|%A}". https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format for details on the + date formatting syntax. Variables that can't be found + will be replaced with the specifier. For example, a + template of "data: %{x}, %{y}" will result in a value + of "data: 1, %{y}" if x is 1 and y is missing. + Variables with an undefined value will be replaced with + the fallback value. All attributes that can be + specified per-point (the ones that are `arrayOk: true`) + are available. Finally, the template string has access + to variables `r`, `theta` and `text`. + texttemplatefallback + Fallback string that's displayed when a variable + referenced in a template is missing. If the boolean + value 'false' is passed in, the specifier with the + missing variable will be displayed. + texttemplatesrc + Sets the source reference on Chart Studio Cloud for + `texttemplate`. + theta + Sets the angular coordinates + theta0 + Alternate to `theta`. Builds a linear space of theta + coordinates. Use with `dtheta` where `theta0` is the + starting coordinate and `dtheta` the step. + thetasrc + Sets the source reference on Chart Studio Cloud for + `theta`. + thetaunit + Sets the unit of input "theta" values. Has an effect + only when on "linear" angular axes. + uid + Assign an id to this trace, Use this to provide object + constancy between traces during animations and + transitions. + uirevision + Controls persistence of some user-driven changes to the + trace: `constraintrange` in `parcoords` traces, as well + as some `editable: true` modifications such as `name` + and `colorbar.title`. Defaults to `layout.uirevision`. + Note that other user-driven trace attribute changes are + controlled by `layout` attributes: `trace.visible` is + controlled by `layout.legend.uirevision`, + `selectedpoints` is controlled by + `layout.selectionrevision`, and `colorbar.(x|y)` + (accessible with `config: {editable: true}`) is + controlled by `layout.editrevision`. Trace changes are + tracked by `uid`, which only falls back on trace index + if no `uid` is provided. So if your app can add/remove + traces before the end of the `data` array, such that + the same trace has a different index, you can still + preserve user-driven changes if you give each trace a + `uid` that stays with it as it moves. + unselected + :class:`plotly.graph_objects.scatterpolargl.Unselected` + instance or dict with compatible properties + visible + Determines whether or not this trace is visible. If + "legendonly", the trace is not drawn, but can appear as + a legend item (provided that the legend itself is + visible). + + Returns + ------- + Scatterpolargl + """ + super().__init__("scatterpolargl") + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + if arg is None: + arg = {} + elif isinstance(arg, self.__class__): + arg = arg.to_plotly_json() + elif isinstance(arg, dict): + arg = _copy.copy(arg) + else: + raise ValueError("""\ +The first argument to the plotly.graph_objs.Scatterpolargl +constructor must be a dict or +an instance of :class:`plotly.graph_objs.Scatterpolargl`""") + + self._skip_invalid = kwargs.pop("skip_invalid", False) + self._validate = kwargs.pop("_validate", True) + + self._set_property("connectgaps", arg, connectgaps) + self._set_property("customdata", arg, customdata) + self._set_property("customdatasrc", arg, customdatasrc) + self._set_property("dr", arg, dr) + self._set_property("dtheta", arg, dtheta) + self._set_property("fill", arg, fill) + self._set_property("fillcolor", arg, fillcolor) + self._set_property("hoverinfo", arg, hoverinfo) + self._set_property("hoverinfosrc", arg, hoverinfosrc) + self._set_property("hoverlabel", arg, hoverlabel) + self._set_property("hovertemplate", arg, hovertemplate) + self._set_property("hovertemplatefallback", arg, hovertemplatefallback) + self._set_property("hovertemplatesrc", arg, hovertemplatesrc) + self._set_property("hovertext", arg, hovertext) + self._set_property("hovertextsrc", arg, hovertextsrc) + self._set_property("ids", arg, ids) + self._set_property("idssrc", arg, idssrc) + self._set_property("legend", arg, legend) + self._set_property("legendgroup", arg, legendgroup) + self._set_property("legendgrouptitle", arg, legendgrouptitle) + self._set_property("legendrank", arg, legendrank) + self._set_property("legendwidth", arg, legendwidth) + self._set_property("line", arg, line) + self._set_property("marker", arg, marker) + self._set_property("meta", arg, meta) + self._set_property("metasrc", arg, metasrc) + self._set_property("mode", arg, mode) + self._set_property("name", arg, name) + self._set_property("opacity", arg, opacity) + self._set_property("r", arg, r) + self._set_property("r0", arg, r0) + self._set_property("rsrc", arg, rsrc) + self._set_property("selected", arg, selected) + self._set_property("selectedpoints", arg, selectedpoints) + self._set_property("showlegend", arg, showlegend) + self._set_property("stream", arg, stream) + self._set_property("subplot", arg, subplot) + self._set_property("text", arg, text) + self._set_property("textfont", arg, textfont) + self._set_property("textposition", arg, textposition) + self._set_property("textpositionsrc", arg, textpositionsrc) + self._set_property("textsrc", arg, textsrc) + self._set_property("texttemplate", arg, texttemplate) + self._set_property("texttemplatefallback", arg, texttemplatefallback) + self._set_property("texttemplatesrc", arg, texttemplatesrc) + self._set_property("theta", arg, theta) + self._set_property("theta0", arg, theta0) + self._set_property("thetasrc", arg, thetasrc) + self._set_property("thetaunit", arg, thetaunit) + self._set_property("uid", arg, uid) + self._set_property("uirevision", arg, uirevision) + self._set_property("unselected", arg, unselected) + self._set_property("visible", arg, visible) + + self._props["type"] = "scatterpolargl" + arg.pop("type", None) + self._process_kwargs(**dict(arg, **kwargs)) + self._skip_invalid = False diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/_scattersmith.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/_scattersmith.py new file mode 100644 index 0000000000000000000000000000000000000000..7d9fa8e76a1353369a35ac10ce5084100aa328bf --- /dev/null +++ b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/_scattersmith.py @@ -0,0 +1,1874 @@ +# --- THIS FILE IS AUTO-GENERATED --- +# Modifications will be overwitten the next time code generation run. + +from plotly.basedatatypes import BaseTraceType as _BaseTraceType +import copy as _copy + + +class Scattersmith(_BaseTraceType): + _parent_path_str = "" + _path_str = "scattersmith" + _valid_props = { + "cliponaxis", + "connectgaps", + "customdata", + "customdatasrc", + "fill", + "fillcolor", + "hoverinfo", + "hoverinfosrc", + "hoverlabel", + "hoveron", + "hovertemplate", + "hovertemplatefallback", + "hovertemplatesrc", + "hovertext", + "hovertextsrc", + "ids", + "idssrc", + "imag", + "imagsrc", + "legend", + "legendgroup", + "legendgrouptitle", + "legendrank", + "legendwidth", + "line", + "marker", + "meta", + "metasrc", + "mode", + "name", + "opacity", + "real", + "realsrc", + "selected", + "selectedpoints", + "showlegend", + "stream", + "subplot", + "text", + "textfont", + "textposition", + "textpositionsrc", + "textsrc", + "texttemplate", + "texttemplatefallback", + "texttemplatesrc", + "type", + "uid", + "uirevision", + "unselected", + "visible", + } + + @property + def cliponaxis(self): + """ + Determines whether or not markers and text nodes are clipped + about the subplot axes. To show markers and text nodes above + axis lines and tick labels, make sure to set `xaxis.layer` and + `yaxis.layer` to *below traces*. + + The 'cliponaxis' property is a boolean and must be specified as: + - A boolean value: True or False + + Returns + ------- + bool + """ + return self["cliponaxis"] + + @cliponaxis.setter + def cliponaxis(self, val): + self["cliponaxis"] = val + + @property + def connectgaps(self): + """ + Determines whether or not gaps (i.e. {nan} or missing values) + in the provided data arrays are connected. + + The 'connectgaps' property is a boolean and must be specified as: + - A boolean value: True or False + + Returns + ------- + bool + """ + return self["connectgaps"] + + @connectgaps.setter + def connectgaps(self, val): + self["connectgaps"] = val + + @property + def customdata(self): + """ + Assigns extra data each datum. This may be useful when + listening to hover, click and selection events. Note that, + "scatter" traces also appends customdata items in the markers + DOM elements + + The 'customdata' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["customdata"] + + @customdata.setter + def customdata(self, val): + self["customdata"] = val + + @property + def customdatasrc(self): + """ + Sets the source reference on Chart Studio Cloud for + `customdata`. + + The 'customdatasrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["customdatasrc"] + + @customdatasrc.setter + def customdatasrc(self, val): + self["customdatasrc"] = val + + @property + def fill(self): + """ + Sets the area to fill with a solid color. Use with `fillcolor` + if not "none". scattersmith has a subset of the options + available to scatter. "toself" connects the endpoints of the + trace (or each segment of the trace if it has gaps) into a + closed shape. "tonext" fills the space between two traces if + one completely encloses the other (eg consecutive contour + lines), and behaves like "toself" if there is no trace before + it. "tonext" should not be used if one trace does not enclose + the other. + + The 'fill' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['none', 'toself', 'tonext'] + + Returns + ------- + Any + """ + return self["fill"] + + @fill.setter + def fill(self, val): + self["fill"] = val + + @property + def fillcolor(self): + """ + Sets the fill color. Defaults to a half-transparent variant of + the line color, marker color, or marker line color, whichever + is available. + + The 'fillcolor' property is a color and may be specified as: + - A hex string (e.g. '#ff0000') + - An rgb/rgba string (e.g. 'rgb(255,0,0)') + - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') + - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') + - A named CSS color: see https://plotly.com/python/css-colors/ for a list + + Returns + ------- + str + """ + return self["fillcolor"] + + @fillcolor.setter + def fillcolor(self, val): + self["fillcolor"] = val + + @property + def hoverinfo(self): + """ + Determines which trace information appear on hover. If `none` + or `skip` are set, no information is displayed upon hovering. + But, if `none` is set, click and hover events are still fired. + + The 'hoverinfo' property is a flaglist and may be specified + as a string containing: + - Any combination of ['real', 'imag', 'text', 'name'] joined with '+' characters + (e.g. 'real+imag') + OR exactly one of ['all', 'none', 'skip'] (e.g. 'skip') + - A list or array of the above + + Returns + ------- + Any|numpy.ndarray + """ + return self["hoverinfo"] + + @hoverinfo.setter + def hoverinfo(self, val): + self["hoverinfo"] = val + + @property + def hoverinfosrc(self): + """ + Sets the source reference on Chart Studio Cloud for + `hoverinfo`. + + The 'hoverinfosrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["hoverinfosrc"] + + @hoverinfosrc.setter + def hoverinfosrc(self, val): + self["hoverinfosrc"] = val + + @property + def hoverlabel(self): + """ + The 'hoverlabel' property is an instance of Hoverlabel + that may be specified as: + - An instance of :class:`plotly.graph_objs.scattersmith.Hoverlabel` + - A dict of string/value properties that will be passed + to the Hoverlabel constructor + + Returns + ------- + plotly.graph_objs.scattersmith.Hoverlabel + """ + return self["hoverlabel"] + + @hoverlabel.setter + def hoverlabel(self, val): + self["hoverlabel"] = val + + @property + def hoveron(self): + """ + Do the hover effects highlight individual points (markers or + line points) or do they highlight filled regions? If the fill + is "toself" or "tonext" and there are no markers or text, then + the default is "fills", otherwise it is "points". + + The 'hoveron' property is a flaglist and may be specified + as a string containing: + - Any combination of ['points', 'fills'] joined with '+' characters + (e.g. 'points+fills') + + Returns + ------- + Any + """ + return self["hoveron"] + + @hoveron.setter + def hoveron(self, val): + self["hoveron"] = val + + @property + def hovertemplate(self): + """ + Template string used for rendering the information that appear + on hover box. Note that this will override `hoverinfo`. + Variables are inserted using %{variable}, for example "y: %{y}" + as well as %{xother}, {%_xother}, {%_xother_}, {%xother_}. When + showing info for several points, "xother" will be added to + those with different x positions from the first point. An + underscore before or after "(x|y)other" will add a space on + that side, only when this field is shown. Numbers are formatted + using d3-format's syntax %{variable:d3-format}, for example + "Price: %{y:$.2f}". + https://github.com/d3/d3-format/tree/v1.4.5#d3-format for + details on the formatting syntax. Dates are formatted using + d3-time-format's syntax %{variable|d3-time-format}, for example + "Day: %{2019-01-01|%A}". https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format for details on the date + formatting syntax. Variables that can't be found will be + replaced with the specifier. For example, a template of "data: + %{x}, %{y}" will result in a value of "data: 1, %{y}" if x is 1 + and y is missing. Variables with an undefined value will be + replaced with the fallback value. The variables available in + `hovertemplate` are the ones emitted as event data described at + this link https://plotly.com/javascript/plotlyjs-events/#event- + data. Additionally, all attributes that can be specified per- + point (the ones that are `arrayOk: true`) are available. + Anything contained in tag `` is displayed in the + secondary box, for example `%{fullData.name}`. + To hide the secondary box completely, use an empty tag + ``. + + The 'hovertemplate' property is a string and must be specified as: + - A string + - A number that will be converted to a string + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["hovertemplate"] + + @hovertemplate.setter + def hovertemplate(self, val): + self["hovertemplate"] = val + + @property + def hovertemplatefallback(self): + """ + Fallback string that's displayed when a variable referenced in + a template is missing. If the boolean value 'false' is passed + in, the specifier with the missing variable will be displayed. + + The 'hovertemplatefallback' property accepts values of any type + + Returns + ------- + Any + """ + return self["hovertemplatefallback"] + + @hovertemplatefallback.setter + def hovertemplatefallback(self, val): + self["hovertemplatefallback"] = val + + @property + def hovertemplatesrc(self): + """ + Sets the source reference on Chart Studio Cloud for + `hovertemplate`. + + The 'hovertemplatesrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["hovertemplatesrc"] + + @hovertemplatesrc.setter + def hovertemplatesrc(self, val): + self["hovertemplatesrc"] = val + + @property + def hovertext(self): + """ + Sets hover text elements associated with each (x,y) pair. If a + single string, the same string appears over all the data + points. If an array of string, the items are mapped in order to + the this trace's (x,y) coordinates. To be seen, trace + `hoverinfo` must contain a "text" flag. + + The 'hovertext' property is a string and must be specified as: + - A string + - A number that will be converted to a string + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["hovertext"] + + @hovertext.setter + def hovertext(self, val): + self["hovertext"] = val + + @property + def hovertextsrc(self): + """ + Sets the source reference on Chart Studio Cloud for + `hovertext`. + + The 'hovertextsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["hovertextsrc"] + + @hovertextsrc.setter + def hovertextsrc(self, val): + self["hovertextsrc"] = val + + @property + def ids(self): + """ + Assigns id labels to each datum. These ids for object constancy + of data points during animation. Should be an array of strings, + not numbers or any other type. + + The 'ids' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["ids"] + + @ids.setter + def ids(self, val): + self["ids"] = val + + @property + def idssrc(self): + """ + Sets the source reference on Chart Studio Cloud for `ids`. + + The 'idssrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["idssrc"] + + @idssrc.setter + def idssrc(self, val): + self["idssrc"] = val + + @property + def imag(self): + """ + Sets the imaginary component of the data, in units of + normalized impedance such that real=1, imag=0 is the center of + the chart. + + The 'imag' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["imag"] + + @imag.setter + def imag(self, val): + self["imag"] = val + + @property + def imagsrc(self): + """ + Sets the source reference on Chart Studio Cloud for `imag`. + + The 'imagsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["imagsrc"] + + @imagsrc.setter + def imagsrc(self, val): + self["imagsrc"] = val + + @property + def legend(self): + """ + Sets the reference to a legend to show this trace in. + References to these legends are "legend", "legend2", "legend3", + etc. Settings for these legends are set in the layout, under + `layout.legend`, `layout.legend2`, etc. + + The 'legend' property is an identifier of a particular + subplot, of type 'legend', that may be specified as: + - the string 'legend' optionally followed by an integer >= 1 + (e.g. 'legend', 'legend1', 'legend2', 'legend3', etc.) + + Returns + ------- + str + """ + return self["legend"] + + @legend.setter + def legend(self, val): + self["legend"] = val + + @property + def legendgroup(self): + """ + Sets the legend group for this trace. Traces and shapes part of + the same legend group hide/show at the same time when toggling + legend items. + + The 'legendgroup' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["legendgroup"] + + @legendgroup.setter + def legendgroup(self, val): + self["legendgroup"] = val + + @property + def legendgrouptitle(self): + """ + The 'legendgrouptitle' property is an instance of Legendgrouptitle + that may be specified as: + - An instance of :class:`plotly.graph_objs.scattersmith.Legendgrouptitle` + - A dict of string/value properties that will be passed + to the Legendgrouptitle constructor + + Returns + ------- + plotly.graph_objs.scattersmith.Legendgrouptitle + """ + return self["legendgrouptitle"] + + @legendgrouptitle.setter + def legendgrouptitle(self, val): + self["legendgrouptitle"] = val + + @property + def legendrank(self): + """ + Sets the legend rank for this trace. Items and groups with + smaller ranks are presented on top/left side while with + "reversed" `legend.traceorder` they are on bottom/right side. + The default legendrank is 1000, so that you can use ranks less + than 1000 to place certain items before all unranked items, and + ranks greater than 1000 to go after all unranked items. When + having unranked or equal rank items shapes would be displayed + after traces i.e. according to their order in data and layout. + + The 'legendrank' property is a number and may be specified as: + - An int or float + + Returns + ------- + int|float + """ + return self["legendrank"] + + @legendrank.setter + def legendrank(self, val): + self["legendrank"] = val + + @property + def legendwidth(self): + """ + Sets the width (in px or fraction) of the legend for this + trace. + + The 'legendwidth' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["legendwidth"] + + @legendwidth.setter + def legendwidth(self, val): + self["legendwidth"] = val + + @property + def line(self): + """ + The 'line' property is an instance of Line + that may be specified as: + - An instance of :class:`plotly.graph_objs.scattersmith.Line` + - A dict of string/value properties that will be passed + to the Line constructor + + Returns + ------- + plotly.graph_objs.scattersmith.Line + """ + return self["line"] + + @line.setter + def line(self, val): + self["line"] = val + + @property + def marker(self): + """ + The 'marker' property is an instance of Marker + that may be specified as: + - An instance of :class:`plotly.graph_objs.scattersmith.Marker` + - A dict of string/value properties that will be passed + to the Marker constructor + + Returns + ------- + plotly.graph_objs.scattersmith.Marker + """ + return self["marker"] + + @marker.setter + def marker(self, val): + self["marker"] = val + + @property + def meta(self): + """ + Assigns extra meta information associated with this trace that + can be used in various text attributes. Attributes such as + trace `name`, graph, axis and colorbar `title.text`, annotation + `text` `rangeselector`, `updatemenues` and `sliders` `label` + text all support `meta`. To access the trace `meta` values in + an attribute in the same trace, simply use `%{meta[i]}` where + `i` is the index or key of the `meta` item in question. To + access trace `meta` in layout attributes, use + `%{data[n[.meta[i]}` where `i` is the index or key of the + `meta` and `n` is the trace index. + + The 'meta' property accepts values of any type + + Returns + ------- + Any|numpy.ndarray + """ + return self["meta"] + + @meta.setter + def meta(self, val): + self["meta"] = val + + @property + def metasrc(self): + """ + Sets the source reference on Chart Studio Cloud for `meta`. + + The 'metasrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["metasrc"] + + @metasrc.setter + def metasrc(self, val): + self["metasrc"] = val + + @property + def mode(self): + """ + Determines the drawing mode for this scatter trace. If the + provided `mode` includes "text" then the `text` elements appear + at the coordinates. Otherwise, the `text` elements appear on + hover. If there are less than 20 points and the trace is not + stacked then the default is "lines+markers". Otherwise, + "lines". + + The 'mode' property is a flaglist and may be specified + as a string containing: + - Any combination of ['lines', 'markers', 'text'] joined with '+' characters + (e.g. 'lines+markers') + OR exactly one of ['none'] (e.g. 'none') + + Returns + ------- + Any + """ + return self["mode"] + + @mode.setter + def mode(self, val): + self["mode"] = val + + @property + def name(self): + """ + Sets the trace name. The trace name appears as the legend item + and on hover. + + The 'name' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["name"] + + @name.setter + def name(self, val): + self["name"] = val + + @property + def opacity(self): + """ + Sets the opacity of the trace. + + The 'opacity' property is a number and may be specified as: + - An int or float in the interval [0, 1] + + Returns + ------- + int|float + """ + return self["opacity"] + + @opacity.setter + def opacity(self, val): + self["opacity"] = val + + @property + def real(self): + """ + Sets the real component of the data, in units of normalized + impedance such that real=1, imag=0 is the center of the chart. + + The 'real' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["real"] + + @real.setter + def real(self, val): + self["real"] = val + + @property + def realsrc(self): + """ + Sets the source reference on Chart Studio Cloud for `real`. + + The 'realsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["realsrc"] + + @realsrc.setter + def realsrc(self, val): + self["realsrc"] = val + + @property + def selected(self): + """ + The 'selected' property is an instance of Selected + that may be specified as: + - An instance of :class:`plotly.graph_objs.scattersmith.Selected` + - A dict of string/value properties that will be passed + to the Selected constructor + + Returns + ------- + plotly.graph_objs.scattersmith.Selected + """ + return self["selected"] + + @selected.setter + def selected(self, val): + self["selected"] = val + + @property + def selectedpoints(self): + """ + Array containing integer indices of selected points. Has an + effect only for traces that support selections. Note that an + empty array means an empty selection where the `unselected` are + turned on for all points, whereas, any other non-array values + means no selection all where the `selected` and `unselected` + styles have no effect. + + The 'selectedpoints' property accepts values of any type + + Returns + ------- + Any + """ + return self["selectedpoints"] + + @selectedpoints.setter + def selectedpoints(self, val): + self["selectedpoints"] = val + + @property + def showlegend(self): + """ + Determines whether or not an item corresponding to this trace + is shown in the legend. + + The 'showlegend' property is a boolean and must be specified as: + - A boolean value: True or False + + Returns + ------- + bool + """ + return self["showlegend"] + + @showlegend.setter + def showlegend(self, val): + self["showlegend"] = val + + @property + def stream(self): + """ + The 'stream' property is an instance of Stream + that may be specified as: + - An instance of :class:`plotly.graph_objs.scattersmith.Stream` + - A dict of string/value properties that will be passed + to the Stream constructor + + Returns + ------- + plotly.graph_objs.scattersmith.Stream + """ + return self["stream"] + + @stream.setter + def stream(self, val): + self["stream"] = val + + @property + def subplot(self): + """ + Sets a reference between this trace's data coordinates and a + smith subplot. If "smith" (the default value), the data refer + to `layout.smith`. If "smith2", the data refer to + `layout.smith2`, and so on. + + The 'subplot' property is an identifier of a particular + subplot, of type 'smith', that may be specified as: + - the string 'smith' optionally followed by an integer >= 1 + (e.g. 'smith', 'smith1', 'smith2', 'smith3', etc.) + + Returns + ------- + str + """ + return self["subplot"] + + @subplot.setter + def subplot(self, val): + self["subplot"] = val + + @property + def text(self): + """ + Sets text elements associated with each (x,y) pair. If a single + string, the same string appears over all the data points. If an + array of string, the items are mapped in order to the this + trace's (x,y) coordinates. If trace `hoverinfo` contains a + "text" flag and "hovertext" is not set, these elements will be + seen in the hover labels. + + The 'text' property is a string and must be specified as: + - A string + - A number that will be converted to a string + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["text"] + + @text.setter + def text(self, val): + self["text"] = val + + @property + def textfont(self): + """ + Sets the text font. + + The 'textfont' property is an instance of Textfont + that may be specified as: + - An instance of :class:`plotly.graph_objs.scattersmith.Textfont` + - A dict of string/value properties that will be passed + to the Textfont constructor + + Returns + ------- + plotly.graph_objs.scattersmith.Textfont + """ + return self["textfont"] + + @textfont.setter + def textfont(self, val): + self["textfont"] = val + + @property + def textposition(self): + """ + Sets the positions of the `text` elements with respects to the + (x,y) coordinates. + + The 'textposition' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['top left', 'top center', 'top right', 'middle left', + 'middle center', 'middle right', 'bottom left', 'bottom + center', 'bottom right'] + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + Any|numpy.ndarray + """ + return self["textposition"] + + @textposition.setter + def textposition(self, val): + self["textposition"] = val + + @property + def textpositionsrc(self): + """ + Sets the source reference on Chart Studio Cloud for + `textposition`. + + The 'textpositionsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["textpositionsrc"] + + @textpositionsrc.setter + def textpositionsrc(self, val): + self["textpositionsrc"] = val + + @property + def textsrc(self): + """ + Sets the source reference on Chart Studio Cloud for `text`. + + The 'textsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["textsrc"] + + @textsrc.setter + def textsrc(self, val): + self["textsrc"] = val + + @property + def texttemplate(self): + """ + Template string used for rendering the information text that + appears on points. Note that this will override `textinfo`. + Variables are inserted using %{variable}, for example "y: + %{y}". Numbers are formatted using d3-format's syntax + %{variable:d3-format}, for example "Price: %{y:$.2f}". + https://github.com/d3/d3-format/tree/v1.4.5#d3-format for + details on the formatting syntax. Dates are formatted using + d3-time-format's syntax %{variable|d3-time-format}, for example + "Day: %{2019-01-01|%A}". https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format for details on the date + formatting syntax. Variables that can't be found will be + replaced with the specifier. For example, a template of "data: + %{x}, %{y}" will result in a value of "data: 1, %{y}" if x is 1 + and y is missing. Variables with an undefined value will be + replaced with the fallback value. All attributes that can be + specified per-point (the ones that are `arrayOk: true`) are + available. Finally, the template string has access to variables + `real`, `imag` and `text`. + + The 'texttemplate' property is a string and must be specified as: + - A string + - A number that will be converted to a string + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["texttemplate"] + + @texttemplate.setter + def texttemplate(self, val): + self["texttemplate"] = val + + @property + def texttemplatefallback(self): + """ + Fallback string that's displayed when a variable referenced in + a template is missing. If the boolean value 'false' is passed + in, the specifier with the missing variable will be displayed. + + The 'texttemplatefallback' property accepts values of any type + + Returns + ------- + Any + """ + return self["texttemplatefallback"] + + @texttemplatefallback.setter + def texttemplatefallback(self, val): + self["texttemplatefallback"] = val + + @property + def texttemplatesrc(self): + """ + Sets the source reference on Chart Studio Cloud for + `texttemplate`. + + The 'texttemplatesrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["texttemplatesrc"] + + @texttemplatesrc.setter + def texttemplatesrc(self, val): + self["texttemplatesrc"] = val + + @property + def uid(self): + """ + Assign an id to this trace, Use this to provide object + constancy between traces during animations and transitions. + + The 'uid' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["uid"] + + @uid.setter + def uid(self, val): + self["uid"] = val + + @property + def uirevision(self): + """ + Controls persistence of some user-driven changes to the trace: + `constraintrange` in `parcoords` traces, as well as some + `editable: true` modifications such as `name` and + `colorbar.title`. Defaults to `layout.uirevision`. Note that + other user-driven trace attribute changes are controlled by + `layout` attributes: `trace.visible` is controlled by + `layout.legend.uirevision`, `selectedpoints` is controlled by + `layout.selectionrevision`, and `colorbar.(x|y)` (accessible + with `config: {editable: true}`) is controlled by + `layout.editrevision`. Trace changes are tracked by `uid`, + which only falls back on trace index if no `uid` is provided. + So if your app can add/remove traces before the end of the + `data` array, such that the same trace has a different index, + you can still preserve user-driven changes if you give each + trace a `uid` that stays with it as it moves. + + The 'uirevision' property accepts values of any type + + Returns + ------- + Any + """ + return self["uirevision"] + + @uirevision.setter + def uirevision(self, val): + self["uirevision"] = val + + @property + def unselected(self): + """ + The 'unselected' property is an instance of Unselected + that may be specified as: + - An instance of :class:`plotly.graph_objs.scattersmith.Unselected` + - A dict of string/value properties that will be passed + to the Unselected constructor + + Returns + ------- + plotly.graph_objs.scattersmith.Unselected + """ + return self["unselected"] + + @unselected.setter + def unselected(self, val): + self["unselected"] = val + + @property + def visible(self): + """ + Determines whether or not this trace is visible. If + "legendonly", the trace is not drawn, but can appear as a + legend item (provided that the legend itself is visible). + + The 'visible' property is an enumeration that may be specified as: + - One of the following enumeration values: + [True, False, 'legendonly'] + + Returns + ------- + Any + """ + return self["visible"] + + @visible.setter + def visible(self, val): + self["visible"] = val + + @property + def type(self): + return self._props["type"] + + @property + def _prop_descriptions(self): + return """\ + cliponaxis + Determines whether or not markers and text nodes are + clipped about the subplot axes. To show markers and + text nodes above axis lines and tick labels, make sure + to set `xaxis.layer` and `yaxis.layer` to *below + traces*. + connectgaps + Determines whether or not gaps (i.e. {nan} or missing + values) in the provided data arrays are connected. + customdata + Assigns extra data each datum. This may be useful when + listening to hover, click and selection events. Note + that, "scatter" traces also appends customdata items in + the markers DOM elements + customdatasrc + Sets the source reference on Chart Studio Cloud for + `customdata`. + fill + Sets the area to fill with a solid color. Use with + `fillcolor` if not "none". scattersmith has a subset of + the options available to scatter. "toself" connects the + endpoints of the trace (or each segment of the trace if + it has gaps) into a closed shape. "tonext" fills the + space between two traces if one completely encloses the + other (eg consecutive contour lines), and behaves like + "toself" if there is no trace before it. "tonext" + should not be used if one trace does not enclose the + other. + fillcolor + Sets the fill color. Defaults to a half-transparent + variant of the line color, marker color, or marker line + color, whichever is available. + hoverinfo + Determines which trace information appear on hover. If + `none` or `skip` are set, no information is displayed + upon hovering. But, if `none` is set, click and hover + events are still fired. + hoverinfosrc + Sets the source reference on Chart Studio Cloud for + `hoverinfo`. + hoverlabel + :class:`plotly.graph_objects.scattersmith.Hoverlabel` + instance or dict with compatible properties + hoveron + Do the hover effects highlight individual points + (markers or line points) or do they highlight filled + regions? If the fill is "toself" or "tonext" and there + are no markers or text, then the default is "fills", + otherwise it is "points". + hovertemplate + Template string used for rendering the information that + appear on hover box. Note that this will override + `hoverinfo`. Variables are inserted using %{variable}, + for example "y: %{y}" as well as %{xother}, {%_xother}, + {%_xother_}, {%xother_}. When showing info for several + points, "xother" will be added to those with different + x positions from the first point. An underscore before + or after "(x|y)other" will add a space on that side, + only when this field is shown. Numbers are formatted + using d3-format's syntax %{variable:d3-format}, for + example "Price: %{y:$.2f}". + https://github.com/d3/d3-format/tree/v1.4.5#d3-format + for details on the formatting syntax. Dates are + formatted using d3-time-format's syntax + %{variable|d3-time-format}, for example "Day: + %{2019-01-01|%A}". https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format for details on the + date formatting syntax. Variables that can't be found + will be replaced with the specifier. For example, a + template of "data: %{x}, %{y}" will result in a value + of "data: 1, %{y}" if x is 1 and y is missing. + Variables with an undefined value will be replaced with + the fallback value. The variables available in + `hovertemplate` are the ones emitted as event data + described at this link + https://plotly.com/javascript/plotlyjs-events/#event- + data. Additionally, all attributes that can be + specified per-point (the ones that are `arrayOk: true`) + are available. Anything contained in tag `` is + displayed in the secondary box, for example + `%{fullData.name}`. To hide the + secondary box completely, use an empty tag + ``. + hovertemplatefallback + Fallback string that's displayed when a variable + referenced in a template is missing. If the boolean + value 'false' is passed in, the specifier with the + missing variable will be displayed. + hovertemplatesrc + Sets the source reference on Chart Studio Cloud for + `hovertemplate`. + hovertext + Sets hover text elements associated with each (x,y) + pair. If a single string, the same string appears over + all the data points. If an array of string, the items + are mapped in order to the this trace's (x,y) + coordinates. To be seen, trace `hoverinfo` must contain + a "text" flag. + hovertextsrc + Sets the source reference on Chart Studio Cloud for + `hovertext`. + ids + Assigns id labels to each datum. These ids for object + constancy of data points during animation. Should be an + array of strings, not numbers or any other type. + idssrc + Sets the source reference on Chart Studio Cloud for + `ids`. + imag + Sets the imaginary component of the data, in units of + normalized impedance such that real=1, imag=0 is the + center of the chart. + imagsrc + Sets the source reference on Chart Studio Cloud for + `imag`. + legend + Sets the reference to a legend to show this trace in. + References to these legends are "legend", "legend2", + "legend3", etc. Settings for these legends are set in + the layout, under `layout.legend`, `layout.legend2`, + etc. + legendgroup + Sets the legend group for this trace. Traces and shapes + part of the same legend group hide/show at the same + time when toggling legend items. + legendgrouptitle + :class:`plotly.graph_objects.scattersmith.Legendgroupti + tle` instance or dict with compatible properties + legendrank + Sets the legend rank for this trace. Items and groups + with smaller ranks are presented on top/left side while + with "reversed" `legend.traceorder` they are on + bottom/right side. The default legendrank is 1000, so + that you can use ranks less than 1000 to place certain + items before all unranked items, and ranks greater than + 1000 to go after all unranked items. When having + unranked or equal rank items shapes would be displayed + after traces i.e. according to their order in data and + layout. + legendwidth + Sets the width (in px or fraction) of the legend for + this trace. + line + :class:`plotly.graph_objects.scattersmith.Line` + instance or dict with compatible properties + marker + :class:`plotly.graph_objects.scattersmith.Marker` + instance or dict with compatible properties + meta + Assigns extra meta information associated with this + trace that can be used in various text attributes. + Attributes such as trace `name`, graph, axis and + colorbar `title.text`, annotation `text` + `rangeselector`, `updatemenues` and `sliders` `label` + text all support `meta`. To access the trace `meta` + values in an attribute in the same trace, simply use + `%{meta[i]}` where `i` is the index or key of the + `meta` item in question. To access trace `meta` in + layout attributes, use `%{data[n[.meta[i]}` where `i` + is the index or key of the `meta` and `n` is the trace + index. + metasrc + Sets the source reference on Chart Studio Cloud for + `meta`. + mode + Determines the drawing mode for this scatter trace. If + the provided `mode` includes "text" then the `text` + elements appear at the coordinates. Otherwise, the + `text` elements appear on hover. If there are less than + 20 points and the trace is not stacked then the default + is "lines+markers". Otherwise, "lines". + name + Sets the trace name. The trace name appears as the + legend item and on hover. + opacity + Sets the opacity of the trace. + real + Sets the real component of the data, in units of + normalized impedance such that real=1, imag=0 is the + center of the chart. + realsrc + Sets the source reference on Chart Studio Cloud for + `real`. + selected + :class:`plotly.graph_objects.scattersmith.Selected` + instance or dict with compatible properties + selectedpoints + Array containing integer indices of selected points. + Has an effect only for traces that support selections. + Note that an empty array means an empty selection where + the `unselected` are turned on for all points, whereas, + any other non-array values means no selection all where + the `selected` and `unselected` styles have no effect. + showlegend + Determines whether or not an item corresponding to this + trace is shown in the legend. + stream + :class:`plotly.graph_objects.scattersmith.Stream` + instance or dict with compatible properties + subplot + Sets a reference between this trace's data coordinates + and a smith subplot. If "smith" (the default value), + the data refer to `layout.smith`. If "smith2", the data + refer to `layout.smith2`, and so on. + text + Sets text elements associated with each (x,y) pair. If + a single string, the same string appears over all the + data points. If an array of string, the items are + mapped in order to the this trace's (x,y) coordinates. + If trace `hoverinfo` contains a "text" flag and + "hovertext" is not set, these elements will be seen in + the hover labels. + textfont + Sets the text font. + textposition + Sets the positions of the `text` elements with respects + to the (x,y) coordinates. + textpositionsrc + Sets the source reference on Chart Studio Cloud for + `textposition`. + textsrc + Sets the source reference on Chart Studio Cloud for + `text`. + texttemplate + Template string used for rendering the information text + that appears on points. Note that this will override + `textinfo`. Variables are inserted using %{variable}, + for example "y: %{y}". Numbers are formatted using + d3-format's syntax %{variable:d3-format}, for example + "Price: %{y:$.2f}". + https://github.com/d3/d3-format/tree/v1.4.5#d3-format + for details on the formatting syntax. Dates are + formatted using d3-time-format's syntax + %{variable|d3-time-format}, for example "Day: + %{2019-01-01|%A}". https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format for details on the + date formatting syntax. Variables that can't be found + will be replaced with the specifier. For example, a + template of "data: %{x}, %{y}" will result in a value + of "data: 1, %{y}" if x is 1 and y is missing. + Variables with an undefined value will be replaced with + the fallback value. All attributes that can be + specified per-point (the ones that are `arrayOk: true`) + are available. Finally, the template string has access + to variables `real`, `imag` and `text`. + texttemplatefallback + Fallback string that's displayed when a variable + referenced in a template is missing. If the boolean + value 'false' is passed in, the specifier with the + missing variable will be displayed. + texttemplatesrc + Sets the source reference on Chart Studio Cloud for + `texttemplate`. + uid + Assign an id to this trace, Use this to provide object + constancy between traces during animations and + transitions. + uirevision + Controls persistence of some user-driven changes to the + trace: `constraintrange` in `parcoords` traces, as well + as some `editable: true` modifications such as `name` + and `colorbar.title`. Defaults to `layout.uirevision`. + Note that other user-driven trace attribute changes are + controlled by `layout` attributes: `trace.visible` is + controlled by `layout.legend.uirevision`, + `selectedpoints` is controlled by + `layout.selectionrevision`, and `colorbar.(x|y)` + (accessible with `config: {editable: true}`) is + controlled by `layout.editrevision`. Trace changes are + tracked by `uid`, which only falls back on trace index + if no `uid` is provided. So if your app can add/remove + traces before the end of the `data` array, such that + the same trace has a different index, you can still + preserve user-driven changes if you give each trace a + `uid` that stays with it as it moves. + unselected + :class:`plotly.graph_objects.scattersmith.Unselected` + instance or dict with compatible properties + visible + Determines whether or not this trace is visible. If + "legendonly", the trace is not drawn, but can appear as + a legend item (provided that the legend itself is + visible). + """ + + def __init__( + self, + arg=None, + cliponaxis=None, + connectgaps=None, + customdata=None, + customdatasrc=None, + fill=None, + fillcolor=None, + hoverinfo=None, + hoverinfosrc=None, + hoverlabel=None, + hoveron=None, + hovertemplate=None, + hovertemplatefallback=None, + hovertemplatesrc=None, + hovertext=None, + hovertextsrc=None, + ids=None, + idssrc=None, + imag=None, + imagsrc=None, + legend=None, + legendgroup=None, + legendgrouptitle=None, + legendrank=None, + legendwidth=None, + line=None, + marker=None, + meta=None, + metasrc=None, + mode=None, + name=None, + opacity=None, + real=None, + realsrc=None, + selected=None, + selectedpoints=None, + showlegend=None, + stream=None, + subplot=None, + text=None, + textfont=None, + textposition=None, + textpositionsrc=None, + textsrc=None, + texttemplate=None, + texttemplatefallback=None, + texttemplatesrc=None, + uid=None, + uirevision=None, + unselected=None, + visible=None, + **kwargs, + ): + """ + Construct a new Scattersmith object + + The scattersmith trace type encompasses line charts, scatter + charts, text charts, and bubble charts in smith coordinates. + The data visualized as scatter point or lines is set in `real` + and `imag` (imaginary) coordinates Text (appearing either on + the chart or on hover only) is via `text`. Bubble charts are + achieved by setting `marker.size` and/or `marker.color` to + numerical arrays. + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of :class:`plotly.graph_objs.Scattersmith` + cliponaxis + Determines whether or not markers and text nodes are + clipped about the subplot axes. To show markers and + text nodes above axis lines and tick labels, make sure + to set `xaxis.layer` and `yaxis.layer` to *below + traces*. + connectgaps + Determines whether or not gaps (i.e. {nan} or missing + values) in the provided data arrays are connected. + customdata + Assigns extra data each datum. This may be useful when + listening to hover, click and selection events. Note + that, "scatter" traces also appends customdata items in + the markers DOM elements + customdatasrc + Sets the source reference on Chart Studio Cloud for + `customdata`. + fill + Sets the area to fill with a solid color. Use with + `fillcolor` if not "none". scattersmith has a subset of + the options available to scatter. "toself" connects the + endpoints of the trace (or each segment of the trace if + it has gaps) into a closed shape. "tonext" fills the + space between two traces if one completely encloses the + other (eg consecutive contour lines), and behaves like + "toself" if there is no trace before it. "tonext" + should not be used if one trace does not enclose the + other. + fillcolor + Sets the fill color. Defaults to a half-transparent + variant of the line color, marker color, or marker line + color, whichever is available. + hoverinfo + Determines which trace information appear on hover. If + `none` or `skip` are set, no information is displayed + upon hovering. But, if `none` is set, click and hover + events are still fired. + hoverinfosrc + Sets the source reference on Chart Studio Cloud for + `hoverinfo`. + hoverlabel + :class:`plotly.graph_objects.scattersmith.Hoverlabel` + instance or dict with compatible properties + hoveron + Do the hover effects highlight individual points + (markers or line points) or do they highlight filled + regions? If the fill is "toself" or "tonext" and there + are no markers or text, then the default is "fills", + otherwise it is "points". + hovertemplate + Template string used for rendering the information that + appear on hover box. Note that this will override + `hoverinfo`. Variables are inserted using %{variable}, + for example "y: %{y}" as well as %{xother}, {%_xother}, + {%_xother_}, {%xother_}. When showing info for several + points, "xother" will be added to those with different + x positions from the first point. An underscore before + or after "(x|y)other" will add a space on that side, + only when this field is shown. Numbers are formatted + using d3-format's syntax %{variable:d3-format}, for + example "Price: %{y:$.2f}". + https://github.com/d3/d3-format/tree/v1.4.5#d3-format + for details on the formatting syntax. Dates are + formatted using d3-time-format's syntax + %{variable|d3-time-format}, for example "Day: + %{2019-01-01|%A}". https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format for details on the + date formatting syntax. Variables that can't be found + will be replaced with the specifier. For example, a + template of "data: %{x}, %{y}" will result in a value + of "data: 1, %{y}" if x is 1 and y is missing. + Variables with an undefined value will be replaced with + the fallback value. The variables available in + `hovertemplate` are the ones emitted as event data + described at this link + https://plotly.com/javascript/plotlyjs-events/#event- + data. Additionally, all attributes that can be + specified per-point (the ones that are `arrayOk: true`) + are available. Anything contained in tag `` is + displayed in the secondary box, for example + `%{fullData.name}`. To hide the + secondary box completely, use an empty tag + ``. + hovertemplatefallback + Fallback string that's displayed when a variable + referenced in a template is missing. If the boolean + value 'false' is passed in, the specifier with the + missing variable will be displayed. + hovertemplatesrc + Sets the source reference on Chart Studio Cloud for + `hovertemplate`. + hovertext + Sets hover text elements associated with each (x,y) + pair. If a single string, the same string appears over + all the data points. If an array of string, the items + are mapped in order to the this trace's (x,y) + coordinates. To be seen, trace `hoverinfo` must contain + a "text" flag. + hovertextsrc + Sets the source reference on Chart Studio Cloud for + `hovertext`. + ids + Assigns id labels to each datum. These ids for object + constancy of data points during animation. Should be an + array of strings, not numbers or any other type. + idssrc + Sets the source reference on Chart Studio Cloud for + `ids`. + imag + Sets the imaginary component of the data, in units of + normalized impedance such that real=1, imag=0 is the + center of the chart. + imagsrc + Sets the source reference on Chart Studio Cloud for + `imag`. + legend + Sets the reference to a legend to show this trace in. + References to these legends are "legend", "legend2", + "legend3", etc. Settings for these legends are set in + the layout, under `layout.legend`, `layout.legend2`, + etc. + legendgroup + Sets the legend group for this trace. Traces and shapes + part of the same legend group hide/show at the same + time when toggling legend items. + legendgrouptitle + :class:`plotly.graph_objects.scattersmith.Legendgroupti + tle` instance or dict with compatible properties + legendrank + Sets the legend rank for this trace. Items and groups + with smaller ranks are presented on top/left side while + with "reversed" `legend.traceorder` they are on + bottom/right side. The default legendrank is 1000, so + that you can use ranks less than 1000 to place certain + items before all unranked items, and ranks greater than + 1000 to go after all unranked items. When having + unranked or equal rank items shapes would be displayed + after traces i.e. according to their order in data and + layout. + legendwidth + Sets the width (in px or fraction) of the legend for + this trace. + line + :class:`plotly.graph_objects.scattersmith.Line` + instance or dict with compatible properties + marker + :class:`plotly.graph_objects.scattersmith.Marker` + instance or dict with compatible properties + meta + Assigns extra meta information associated with this + trace that can be used in various text attributes. + Attributes such as trace `name`, graph, axis and + colorbar `title.text`, annotation `text` + `rangeselector`, `updatemenues` and `sliders` `label` + text all support `meta`. To access the trace `meta` + values in an attribute in the same trace, simply use + `%{meta[i]}` where `i` is the index or key of the + `meta` item in question. To access trace `meta` in + layout attributes, use `%{data[n[.meta[i]}` where `i` + is the index or key of the `meta` and `n` is the trace + index. + metasrc + Sets the source reference on Chart Studio Cloud for + `meta`. + mode + Determines the drawing mode for this scatter trace. If + the provided `mode` includes "text" then the `text` + elements appear at the coordinates. Otherwise, the + `text` elements appear on hover. If there are less than + 20 points and the trace is not stacked then the default + is "lines+markers". Otherwise, "lines". + name + Sets the trace name. The trace name appears as the + legend item and on hover. + opacity + Sets the opacity of the trace. + real + Sets the real component of the data, in units of + normalized impedance such that real=1, imag=0 is the + center of the chart. + realsrc + Sets the source reference on Chart Studio Cloud for + `real`. + selected + :class:`plotly.graph_objects.scattersmith.Selected` + instance or dict with compatible properties + selectedpoints + Array containing integer indices of selected points. + Has an effect only for traces that support selections. + Note that an empty array means an empty selection where + the `unselected` are turned on for all points, whereas, + any other non-array values means no selection all where + the `selected` and `unselected` styles have no effect. + showlegend + Determines whether or not an item corresponding to this + trace is shown in the legend. + stream + :class:`plotly.graph_objects.scattersmith.Stream` + instance or dict with compatible properties + subplot + Sets a reference between this trace's data coordinates + and a smith subplot. If "smith" (the default value), + the data refer to `layout.smith`. If "smith2", the data + refer to `layout.smith2`, and so on. + text + Sets text elements associated with each (x,y) pair. If + a single string, the same string appears over all the + data points. If an array of string, the items are + mapped in order to the this trace's (x,y) coordinates. + If trace `hoverinfo` contains a "text" flag and + "hovertext" is not set, these elements will be seen in + the hover labels. + textfont + Sets the text font. + textposition + Sets the positions of the `text` elements with respects + to the (x,y) coordinates. + textpositionsrc + Sets the source reference on Chart Studio Cloud for + `textposition`. + textsrc + Sets the source reference on Chart Studio Cloud for + `text`. + texttemplate + Template string used for rendering the information text + that appears on points. Note that this will override + `textinfo`. Variables are inserted using %{variable}, + for example "y: %{y}". Numbers are formatted using + d3-format's syntax %{variable:d3-format}, for example + "Price: %{y:$.2f}". + https://github.com/d3/d3-format/tree/v1.4.5#d3-format + for details on the formatting syntax. Dates are + formatted using d3-time-format's syntax + %{variable|d3-time-format}, for example "Day: + %{2019-01-01|%A}". https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format for details on the + date formatting syntax. Variables that can't be found + will be replaced with the specifier. For example, a + template of "data: %{x}, %{y}" will result in a value + of "data: 1, %{y}" if x is 1 and y is missing. + Variables with an undefined value will be replaced with + the fallback value. All attributes that can be + specified per-point (the ones that are `arrayOk: true`) + are available. Finally, the template string has access + to variables `real`, `imag` and `text`. + texttemplatefallback + Fallback string that's displayed when a variable + referenced in a template is missing. If the boolean + value 'false' is passed in, the specifier with the + missing variable will be displayed. + texttemplatesrc + Sets the source reference on Chart Studio Cloud for + `texttemplate`. + uid + Assign an id to this trace, Use this to provide object + constancy between traces during animations and + transitions. + uirevision + Controls persistence of some user-driven changes to the + trace: `constraintrange` in `parcoords` traces, as well + as some `editable: true` modifications such as `name` + and `colorbar.title`. Defaults to `layout.uirevision`. + Note that other user-driven trace attribute changes are + controlled by `layout` attributes: `trace.visible` is + controlled by `layout.legend.uirevision`, + `selectedpoints` is controlled by + `layout.selectionrevision`, and `colorbar.(x|y)` + (accessible with `config: {editable: true}`) is + controlled by `layout.editrevision`. Trace changes are + tracked by `uid`, which only falls back on trace index + if no `uid` is provided. So if your app can add/remove + traces before the end of the `data` array, such that + the same trace has a different index, you can still + preserve user-driven changes if you give each trace a + `uid` that stays with it as it moves. + unselected + :class:`plotly.graph_objects.scattersmith.Unselected` + instance or dict with compatible properties + visible + Determines whether or not this trace is visible. If + "legendonly", the trace is not drawn, but can appear as + a legend item (provided that the legend itself is + visible). + + Returns + ------- + Scattersmith + """ + super().__init__("scattersmith") + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + if arg is None: + arg = {} + elif isinstance(arg, self.__class__): + arg = arg.to_plotly_json() + elif isinstance(arg, dict): + arg = _copy.copy(arg) + else: + raise ValueError("""\ +The first argument to the plotly.graph_objs.Scattersmith +constructor must be a dict or +an instance of :class:`plotly.graph_objs.Scattersmith`""") + + self._skip_invalid = kwargs.pop("skip_invalid", False) + self._validate = kwargs.pop("_validate", True) + + self._set_property("cliponaxis", arg, cliponaxis) + self._set_property("connectgaps", arg, connectgaps) + self._set_property("customdata", arg, customdata) + self._set_property("customdatasrc", arg, customdatasrc) + self._set_property("fill", arg, fill) + self._set_property("fillcolor", arg, fillcolor) + self._set_property("hoverinfo", arg, hoverinfo) + self._set_property("hoverinfosrc", arg, hoverinfosrc) + self._set_property("hoverlabel", arg, hoverlabel) + self._set_property("hoveron", arg, hoveron) + self._set_property("hovertemplate", arg, hovertemplate) + self._set_property("hovertemplatefallback", arg, hovertemplatefallback) + self._set_property("hovertemplatesrc", arg, hovertemplatesrc) + self._set_property("hovertext", arg, hovertext) + self._set_property("hovertextsrc", arg, hovertextsrc) + self._set_property("ids", arg, ids) + self._set_property("idssrc", arg, idssrc) + self._set_property("imag", arg, imag) + self._set_property("imagsrc", arg, imagsrc) + self._set_property("legend", arg, legend) + self._set_property("legendgroup", arg, legendgroup) + self._set_property("legendgrouptitle", arg, legendgrouptitle) + self._set_property("legendrank", arg, legendrank) + self._set_property("legendwidth", arg, legendwidth) + self._set_property("line", arg, line) + self._set_property("marker", arg, marker) + self._set_property("meta", arg, meta) + self._set_property("metasrc", arg, metasrc) + self._set_property("mode", arg, mode) + self._set_property("name", arg, name) + self._set_property("opacity", arg, opacity) + self._set_property("real", arg, real) + self._set_property("realsrc", arg, realsrc) + self._set_property("selected", arg, selected) + self._set_property("selectedpoints", arg, selectedpoints) + self._set_property("showlegend", arg, showlegend) + self._set_property("stream", arg, stream) + self._set_property("subplot", arg, subplot) + self._set_property("text", arg, text) + self._set_property("textfont", arg, textfont) + self._set_property("textposition", arg, textposition) + self._set_property("textpositionsrc", arg, textpositionsrc) + self._set_property("textsrc", arg, textsrc) + self._set_property("texttemplate", arg, texttemplate) + self._set_property("texttemplatefallback", arg, texttemplatefallback) + self._set_property("texttemplatesrc", arg, texttemplatesrc) + self._set_property("uid", arg, uid) + self._set_property("uirevision", arg, uirevision) + self._set_property("unselected", arg, unselected) + self._set_property("visible", arg, visible) + + self._props["type"] = "scattersmith" + arg.pop("type", None) + self._process_kwargs(**dict(arg, **kwargs)) + self._skip_invalid = False diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/_scatterternary.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/_scatterternary.py new file mode 100644 index 0000000000000000000000000000000000000000..2e80db08384619e8c4081973456ee7b444159e83 --- /dev/null +++ b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/_scatterternary.py @@ -0,0 +1,1984 @@ +# --- THIS FILE IS AUTO-GENERATED --- +# Modifications will be overwitten the next time code generation run. + +from plotly.basedatatypes import BaseTraceType as _BaseTraceType +import copy as _copy + + +class Scatterternary(_BaseTraceType): + _parent_path_str = "" + _path_str = "scatterternary" + _valid_props = { + "a", + "asrc", + "b", + "bsrc", + "c", + "cliponaxis", + "connectgaps", + "csrc", + "customdata", + "customdatasrc", + "fill", + "fillcolor", + "hoverinfo", + "hoverinfosrc", + "hoverlabel", + "hoveron", + "hovertemplate", + "hovertemplatefallback", + "hovertemplatesrc", + "hovertext", + "hovertextsrc", + "ids", + "idssrc", + "legend", + "legendgroup", + "legendgrouptitle", + "legendrank", + "legendwidth", + "line", + "marker", + "meta", + "metasrc", + "mode", + "name", + "opacity", + "selected", + "selectedpoints", + "showlegend", + "stream", + "subplot", + "sum", + "text", + "textfont", + "textposition", + "textpositionsrc", + "textsrc", + "texttemplate", + "texttemplatefallback", + "texttemplatesrc", + "type", + "uid", + "uirevision", + "unselected", + "visible", + } + + @property + def a(self): + """ + Sets the quantity of component `a` in each data point. If `a`, + `b`, and `c` are all provided, they need not be normalized, + only the relative values matter. If only two arrays are + provided they must be normalized to match `ternary.sum`. + + The 'a' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["a"] + + @a.setter + def a(self, val): + self["a"] = val + + @property + def asrc(self): + """ + Sets the source reference on Chart Studio Cloud for `a`. + + The 'asrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["asrc"] + + @asrc.setter + def asrc(self, val): + self["asrc"] = val + + @property + def b(self): + """ + Sets the quantity of component `a` in each data point. If `a`, + `b`, and `c` are all provided, they need not be normalized, + only the relative values matter. If only two arrays are + provided they must be normalized to match `ternary.sum`. + + The 'b' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["b"] + + @b.setter + def b(self, val): + self["b"] = val + + @property + def bsrc(self): + """ + Sets the source reference on Chart Studio Cloud for `b`. + + The 'bsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["bsrc"] + + @bsrc.setter + def bsrc(self, val): + self["bsrc"] = val + + @property + def c(self): + """ + Sets the quantity of component `a` in each data point. If `a`, + `b`, and `c` are all provided, they need not be normalized, + only the relative values matter. If only two arrays are + provided they must be normalized to match `ternary.sum`. + + The 'c' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["c"] + + @c.setter + def c(self, val): + self["c"] = val + + @property + def cliponaxis(self): + """ + Determines whether or not markers and text nodes are clipped + about the subplot axes. To show markers and text nodes above + axis lines and tick labels, make sure to set `xaxis.layer` and + `yaxis.layer` to *below traces*. + + The 'cliponaxis' property is a boolean and must be specified as: + - A boolean value: True or False + + Returns + ------- + bool + """ + return self["cliponaxis"] + + @cliponaxis.setter + def cliponaxis(self, val): + self["cliponaxis"] = val + + @property + def connectgaps(self): + """ + Determines whether or not gaps (i.e. {nan} or missing values) + in the provided data arrays are connected. + + The 'connectgaps' property is a boolean and must be specified as: + - A boolean value: True or False + + Returns + ------- + bool + """ + return self["connectgaps"] + + @connectgaps.setter + def connectgaps(self, val): + self["connectgaps"] = val + + @property + def csrc(self): + """ + Sets the source reference on Chart Studio Cloud for `c`. + + The 'csrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["csrc"] + + @csrc.setter + def csrc(self, val): + self["csrc"] = val + + @property + def customdata(self): + """ + Assigns extra data each datum. This may be useful when + listening to hover, click and selection events. Note that, + "scatter" traces also appends customdata items in the markers + DOM elements + + The 'customdata' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["customdata"] + + @customdata.setter + def customdata(self, val): + self["customdata"] = val + + @property + def customdatasrc(self): + """ + Sets the source reference on Chart Studio Cloud for + `customdata`. + + The 'customdatasrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["customdatasrc"] + + @customdatasrc.setter + def customdatasrc(self, val): + self["customdatasrc"] = val + + @property + def fill(self): + """ + Sets the area to fill with a solid color. Use with `fillcolor` + if not "none". scatterternary has a subset of the options + available to scatter. "toself" connects the endpoints of the + trace (or each segment of the trace if it has gaps) into a + closed shape. "tonext" fills the space between two traces if + one completely encloses the other (eg consecutive contour + lines), and behaves like "toself" if there is no trace before + it. "tonext" should not be used if one trace does not enclose + the other. + + The 'fill' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['none', 'toself', 'tonext'] + + Returns + ------- + Any + """ + return self["fill"] + + @fill.setter + def fill(self, val): + self["fill"] = val + + @property + def fillcolor(self): + """ + Sets the fill color. Defaults to a half-transparent variant of + the line color, marker color, or marker line color, whichever + is available. + + The 'fillcolor' property is a color and may be specified as: + - A hex string (e.g. '#ff0000') + - An rgb/rgba string (e.g. 'rgb(255,0,0)') + - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') + - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') + - A named CSS color: see https://plotly.com/python/css-colors/ for a list + + Returns + ------- + str + """ + return self["fillcolor"] + + @fillcolor.setter + def fillcolor(self, val): + self["fillcolor"] = val + + @property + def hoverinfo(self): + """ + Determines which trace information appear on hover. If `none` + or `skip` are set, no information is displayed upon hovering. + But, if `none` is set, click and hover events are still fired. + + The 'hoverinfo' property is a flaglist and may be specified + as a string containing: + - Any combination of ['a', 'b', 'c', 'text', 'name'] joined with '+' characters + (e.g. 'a+b') + OR exactly one of ['all', 'none', 'skip'] (e.g. 'skip') + - A list or array of the above + + Returns + ------- + Any|numpy.ndarray + """ + return self["hoverinfo"] + + @hoverinfo.setter + def hoverinfo(self, val): + self["hoverinfo"] = val + + @property + def hoverinfosrc(self): + """ + Sets the source reference on Chart Studio Cloud for + `hoverinfo`. + + The 'hoverinfosrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["hoverinfosrc"] + + @hoverinfosrc.setter + def hoverinfosrc(self, val): + self["hoverinfosrc"] = val + + @property + def hoverlabel(self): + """ + The 'hoverlabel' property is an instance of Hoverlabel + that may be specified as: + - An instance of :class:`plotly.graph_objs.scatterternary.Hoverlabel` + - A dict of string/value properties that will be passed + to the Hoverlabel constructor + + Returns + ------- + plotly.graph_objs.scatterternary.Hoverlabel + """ + return self["hoverlabel"] + + @hoverlabel.setter + def hoverlabel(self, val): + self["hoverlabel"] = val + + @property + def hoveron(self): + """ + Do the hover effects highlight individual points (markers or + line points) or do they highlight filled regions? If the fill + is "toself" or "tonext" and there are no markers or text, then + the default is "fills", otherwise it is "points". + + The 'hoveron' property is a flaglist and may be specified + as a string containing: + - Any combination of ['points', 'fills'] joined with '+' characters + (e.g. 'points+fills') + + Returns + ------- + Any + """ + return self["hoveron"] + + @hoveron.setter + def hoveron(self, val): + self["hoveron"] = val + + @property + def hovertemplate(self): + """ + Template string used for rendering the information that appear + on hover box. Note that this will override `hoverinfo`. + Variables are inserted using %{variable}, for example "y: %{y}" + as well as %{xother}, {%_xother}, {%_xother_}, {%xother_}. When + showing info for several points, "xother" will be added to + those with different x positions from the first point. An + underscore before or after "(x|y)other" will add a space on + that side, only when this field is shown. Numbers are formatted + using d3-format's syntax %{variable:d3-format}, for example + "Price: %{y:$.2f}". + https://github.com/d3/d3-format/tree/v1.4.5#d3-format for + details on the formatting syntax. Dates are formatted using + d3-time-format's syntax %{variable|d3-time-format}, for example + "Day: %{2019-01-01|%A}". https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format for details on the date + formatting syntax. Variables that can't be found will be + replaced with the specifier. For example, a template of "data: + %{x}, %{y}" will result in a value of "data: 1, %{y}" if x is 1 + and y is missing. Variables with an undefined value will be + replaced with the fallback value. The variables available in + `hovertemplate` are the ones emitted as event data described at + this link https://plotly.com/javascript/plotlyjs-events/#event- + data. Additionally, all attributes that can be specified per- + point (the ones that are `arrayOk: true`) are available. + Anything contained in tag `` is displayed in the + secondary box, for example `%{fullData.name}`. + To hide the secondary box completely, use an empty tag + ``. + + The 'hovertemplate' property is a string and must be specified as: + - A string + - A number that will be converted to a string + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["hovertemplate"] + + @hovertemplate.setter + def hovertemplate(self, val): + self["hovertemplate"] = val + + @property + def hovertemplatefallback(self): + """ + Fallback string that's displayed when a variable referenced in + a template is missing. If the boolean value 'false' is passed + in, the specifier with the missing variable will be displayed. + + The 'hovertemplatefallback' property accepts values of any type + + Returns + ------- + Any + """ + return self["hovertemplatefallback"] + + @hovertemplatefallback.setter + def hovertemplatefallback(self, val): + self["hovertemplatefallback"] = val + + @property + def hovertemplatesrc(self): + """ + Sets the source reference on Chart Studio Cloud for + `hovertemplate`. + + The 'hovertemplatesrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["hovertemplatesrc"] + + @hovertemplatesrc.setter + def hovertemplatesrc(self, val): + self["hovertemplatesrc"] = val + + @property + def hovertext(self): + """ + Sets hover text elements associated with each (a,b,c) point. If + a single string, the same string appears over all the data + points. If an array of strings, the items are mapped in order + to the the data points in (a,b,c). To be seen, trace + `hoverinfo` must contain a "text" flag. + + The 'hovertext' property is a string and must be specified as: + - A string + - A number that will be converted to a string + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["hovertext"] + + @hovertext.setter + def hovertext(self, val): + self["hovertext"] = val + + @property + def hovertextsrc(self): + """ + Sets the source reference on Chart Studio Cloud for + `hovertext`. + + The 'hovertextsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["hovertextsrc"] + + @hovertextsrc.setter + def hovertextsrc(self, val): + self["hovertextsrc"] = val + + @property + def ids(self): + """ + Assigns id labels to each datum. These ids for object constancy + of data points during animation. Should be an array of strings, + not numbers or any other type. + + The 'ids' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["ids"] + + @ids.setter + def ids(self, val): + self["ids"] = val + + @property + def idssrc(self): + """ + Sets the source reference on Chart Studio Cloud for `ids`. + + The 'idssrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["idssrc"] + + @idssrc.setter + def idssrc(self, val): + self["idssrc"] = val + + @property + def legend(self): + """ + Sets the reference to a legend to show this trace in. + References to these legends are "legend", "legend2", "legend3", + etc. Settings for these legends are set in the layout, under + `layout.legend`, `layout.legend2`, etc. + + The 'legend' property is an identifier of a particular + subplot, of type 'legend', that may be specified as: + - the string 'legend' optionally followed by an integer >= 1 + (e.g. 'legend', 'legend1', 'legend2', 'legend3', etc.) + + Returns + ------- + str + """ + return self["legend"] + + @legend.setter + def legend(self, val): + self["legend"] = val + + @property + def legendgroup(self): + """ + Sets the legend group for this trace. Traces and shapes part of + the same legend group hide/show at the same time when toggling + legend items. + + The 'legendgroup' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["legendgroup"] + + @legendgroup.setter + def legendgroup(self, val): + self["legendgroup"] = val + + @property + def legendgrouptitle(self): + """ + The 'legendgrouptitle' property is an instance of Legendgrouptitle + that may be specified as: + - An instance of :class:`plotly.graph_objs.scatterternary.Legendgrouptitle` + - A dict of string/value properties that will be passed + to the Legendgrouptitle constructor + + Returns + ------- + plotly.graph_objs.scatterternary.Legendgrouptitle + """ + return self["legendgrouptitle"] + + @legendgrouptitle.setter + def legendgrouptitle(self, val): + self["legendgrouptitle"] = val + + @property + def legendrank(self): + """ + Sets the legend rank for this trace. Items and groups with + smaller ranks are presented on top/left side while with + "reversed" `legend.traceorder` they are on bottom/right side. + The default legendrank is 1000, so that you can use ranks less + than 1000 to place certain items before all unranked items, and + ranks greater than 1000 to go after all unranked items. When + having unranked or equal rank items shapes would be displayed + after traces i.e. according to their order in data and layout. + + The 'legendrank' property is a number and may be specified as: + - An int or float + + Returns + ------- + int|float + """ + return self["legendrank"] + + @legendrank.setter + def legendrank(self, val): + self["legendrank"] = val + + @property + def legendwidth(self): + """ + Sets the width (in px or fraction) of the legend for this + trace. + + The 'legendwidth' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["legendwidth"] + + @legendwidth.setter + def legendwidth(self, val): + self["legendwidth"] = val + + @property + def line(self): + """ + The 'line' property is an instance of Line + that may be specified as: + - An instance of :class:`plotly.graph_objs.scatterternary.Line` + - A dict of string/value properties that will be passed + to the Line constructor + + Returns + ------- + plotly.graph_objs.scatterternary.Line + """ + return self["line"] + + @line.setter + def line(self, val): + self["line"] = val + + @property + def marker(self): + """ + The 'marker' property is an instance of Marker + that may be specified as: + - An instance of :class:`plotly.graph_objs.scatterternary.Marker` + - A dict of string/value properties that will be passed + to the Marker constructor + + Returns + ------- + plotly.graph_objs.scatterternary.Marker + """ + return self["marker"] + + @marker.setter + def marker(self, val): + self["marker"] = val + + @property + def meta(self): + """ + Assigns extra meta information associated with this trace that + can be used in various text attributes. Attributes such as + trace `name`, graph, axis and colorbar `title.text`, annotation + `text` `rangeselector`, `updatemenues` and `sliders` `label` + text all support `meta`. To access the trace `meta` values in + an attribute in the same trace, simply use `%{meta[i]}` where + `i` is the index or key of the `meta` item in question. To + access trace `meta` in layout attributes, use + `%{data[n[.meta[i]}` where `i` is the index or key of the + `meta` and `n` is the trace index. + + The 'meta' property accepts values of any type + + Returns + ------- + Any|numpy.ndarray + """ + return self["meta"] + + @meta.setter + def meta(self, val): + self["meta"] = val + + @property + def metasrc(self): + """ + Sets the source reference on Chart Studio Cloud for `meta`. + + The 'metasrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["metasrc"] + + @metasrc.setter + def metasrc(self, val): + self["metasrc"] = val + + @property + def mode(self): + """ + Determines the drawing mode for this scatter trace. If the + provided `mode` includes "text" then the `text` elements appear + at the coordinates. Otherwise, the `text` elements appear on + hover. If there are less than 20 points and the trace is not + stacked then the default is "lines+markers". Otherwise, + "lines". + + The 'mode' property is a flaglist and may be specified + as a string containing: + - Any combination of ['lines', 'markers', 'text'] joined with '+' characters + (e.g. 'lines+markers') + OR exactly one of ['none'] (e.g. 'none') + + Returns + ------- + Any + """ + return self["mode"] + + @mode.setter + def mode(self, val): + self["mode"] = val + + @property + def name(self): + """ + Sets the trace name. The trace name appears as the legend item + and on hover. + + The 'name' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["name"] + + @name.setter + def name(self, val): + self["name"] = val + + @property + def opacity(self): + """ + Sets the opacity of the trace. + + The 'opacity' property is a number and may be specified as: + - An int or float in the interval [0, 1] + + Returns + ------- + int|float + """ + return self["opacity"] + + @opacity.setter + def opacity(self, val): + self["opacity"] = val + + @property + def selected(self): + """ + The 'selected' property is an instance of Selected + that may be specified as: + - An instance of :class:`plotly.graph_objs.scatterternary.Selected` + - A dict of string/value properties that will be passed + to the Selected constructor + + Returns + ------- + plotly.graph_objs.scatterternary.Selected + """ + return self["selected"] + + @selected.setter + def selected(self, val): + self["selected"] = val + + @property + def selectedpoints(self): + """ + Array containing integer indices of selected points. Has an + effect only for traces that support selections. Note that an + empty array means an empty selection where the `unselected` are + turned on for all points, whereas, any other non-array values + means no selection all where the `selected` and `unselected` + styles have no effect. + + The 'selectedpoints' property accepts values of any type + + Returns + ------- + Any + """ + return self["selectedpoints"] + + @selectedpoints.setter + def selectedpoints(self, val): + self["selectedpoints"] = val + + @property + def showlegend(self): + """ + Determines whether or not an item corresponding to this trace + is shown in the legend. + + The 'showlegend' property is a boolean and must be specified as: + - A boolean value: True or False + + Returns + ------- + bool + """ + return self["showlegend"] + + @showlegend.setter + def showlegend(self, val): + self["showlegend"] = val + + @property + def stream(self): + """ + The 'stream' property is an instance of Stream + that may be specified as: + - An instance of :class:`plotly.graph_objs.scatterternary.Stream` + - A dict of string/value properties that will be passed + to the Stream constructor + + Returns + ------- + plotly.graph_objs.scatterternary.Stream + """ + return self["stream"] + + @stream.setter + def stream(self, val): + self["stream"] = val + + @property + def subplot(self): + """ + Sets a reference between this trace's data coordinates and a + ternary subplot. If "ternary" (the default value), the data + refer to `layout.ternary`. If "ternary2", the data refer to + `layout.ternary2`, and so on. + + The 'subplot' property is an identifier of a particular + subplot, of type 'ternary', that may be specified as: + - the string 'ternary' optionally followed by an integer >= 1 + (e.g. 'ternary', 'ternary1', 'ternary2', 'ternary3', etc.) + + Returns + ------- + str + """ + return self["subplot"] + + @subplot.setter + def subplot(self, val): + self["subplot"] = val + + @property + def sum(self): + """ + The number each triplet should sum to, if only two of `a`, `b`, + and `c` are provided. This overrides `ternary.sum` to + normalize this specific trace, but does not affect the values + displayed on the axes. 0 (or missing) means to use + ternary.sum + + The 'sum' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["sum"] + + @sum.setter + def sum(self, val): + self["sum"] = val + + @property + def text(self): + """ + Sets text elements associated with each (a,b,c) point. If a + single string, the same string appears over all the data + points. If an array of strings, the items are mapped in order + to the the data points in (a,b,c). If trace `hoverinfo` + contains a "text" flag and "hovertext" is not set, these + elements will be seen in the hover labels. + + The 'text' property is a string and must be specified as: + - A string + - A number that will be converted to a string + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["text"] + + @text.setter + def text(self, val): + self["text"] = val + + @property + def textfont(self): + """ + Sets the text font. + + The 'textfont' property is an instance of Textfont + that may be specified as: + - An instance of :class:`plotly.graph_objs.scatterternary.Textfont` + - A dict of string/value properties that will be passed + to the Textfont constructor + + Returns + ------- + plotly.graph_objs.scatterternary.Textfont + """ + return self["textfont"] + + @textfont.setter + def textfont(self, val): + self["textfont"] = val + + @property + def textposition(self): + """ + Sets the positions of the `text` elements with respects to the + (x,y) coordinates. + + The 'textposition' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['top left', 'top center', 'top right', 'middle left', + 'middle center', 'middle right', 'bottom left', 'bottom + center', 'bottom right'] + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + Any|numpy.ndarray + """ + return self["textposition"] + + @textposition.setter + def textposition(self, val): + self["textposition"] = val + + @property + def textpositionsrc(self): + """ + Sets the source reference on Chart Studio Cloud for + `textposition`. + + The 'textpositionsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["textpositionsrc"] + + @textpositionsrc.setter + def textpositionsrc(self, val): + self["textpositionsrc"] = val + + @property + def textsrc(self): + """ + Sets the source reference on Chart Studio Cloud for `text`. + + The 'textsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["textsrc"] + + @textsrc.setter + def textsrc(self, val): + self["textsrc"] = val + + @property + def texttemplate(self): + """ + Template string used for rendering the information text that + appears on points. Note that this will override `textinfo`. + Variables are inserted using %{variable}, for example "y: + %{y}". Numbers are formatted using d3-format's syntax + %{variable:d3-format}, for example "Price: %{y:$.2f}". + https://github.com/d3/d3-format/tree/v1.4.5#d3-format for + details on the formatting syntax. Dates are formatted using + d3-time-format's syntax %{variable|d3-time-format}, for example + "Day: %{2019-01-01|%A}". https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format for details on the date + formatting syntax. Variables that can't be found will be + replaced with the specifier. For example, a template of "data: + %{x}, %{y}" will result in a value of "data: 1, %{y}" if x is 1 + and y is missing. Variables with an undefined value will be + replaced with the fallback value. All attributes that can be + specified per-point (the ones that are `arrayOk: true`) are + available. Finally, the template string has access to variables + `a`, `b`, `c` and `text`. + + The 'texttemplate' property is a string and must be specified as: + - A string + - A number that will be converted to a string + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["texttemplate"] + + @texttemplate.setter + def texttemplate(self, val): + self["texttemplate"] = val + + @property + def texttemplatefallback(self): + """ + Fallback string that's displayed when a variable referenced in + a template is missing. If the boolean value 'false' is passed + in, the specifier with the missing variable will be displayed. + + The 'texttemplatefallback' property accepts values of any type + + Returns + ------- + Any + """ + return self["texttemplatefallback"] + + @texttemplatefallback.setter + def texttemplatefallback(self, val): + self["texttemplatefallback"] = val + + @property + def texttemplatesrc(self): + """ + Sets the source reference on Chart Studio Cloud for + `texttemplate`. + + The 'texttemplatesrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["texttemplatesrc"] + + @texttemplatesrc.setter + def texttemplatesrc(self, val): + self["texttemplatesrc"] = val + + @property + def uid(self): + """ + Assign an id to this trace, Use this to provide object + constancy between traces during animations and transitions. + + The 'uid' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["uid"] + + @uid.setter + def uid(self, val): + self["uid"] = val + + @property + def uirevision(self): + """ + Controls persistence of some user-driven changes to the trace: + `constraintrange` in `parcoords` traces, as well as some + `editable: true` modifications such as `name` and + `colorbar.title`. Defaults to `layout.uirevision`. Note that + other user-driven trace attribute changes are controlled by + `layout` attributes: `trace.visible` is controlled by + `layout.legend.uirevision`, `selectedpoints` is controlled by + `layout.selectionrevision`, and `colorbar.(x|y)` (accessible + with `config: {editable: true}`) is controlled by + `layout.editrevision`. Trace changes are tracked by `uid`, + which only falls back on trace index if no `uid` is provided. + So if your app can add/remove traces before the end of the + `data` array, such that the same trace has a different index, + you can still preserve user-driven changes if you give each + trace a `uid` that stays with it as it moves. + + The 'uirevision' property accepts values of any type + + Returns + ------- + Any + """ + return self["uirevision"] + + @uirevision.setter + def uirevision(self, val): + self["uirevision"] = val + + @property + def unselected(self): + """ + The 'unselected' property is an instance of Unselected + that may be specified as: + - An instance of :class:`plotly.graph_objs.scatterternary.Unselected` + - A dict of string/value properties that will be passed + to the Unselected constructor + + Returns + ------- + plotly.graph_objs.scatterternary.Unselected + """ + return self["unselected"] + + @unselected.setter + def unselected(self, val): + self["unselected"] = val + + @property + def visible(self): + """ + Determines whether or not this trace is visible. If + "legendonly", the trace is not drawn, but can appear as a + legend item (provided that the legend itself is visible). + + The 'visible' property is an enumeration that may be specified as: + - One of the following enumeration values: + [True, False, 'legendonly'] + + Returns + ------- + Any + """ + return self["visible"] + + @visible.setter + def visible(self, val): + self["visible"] = val + + @property + def type(self): + return self._props["type"] + + @property + def _prop_descriptions(self): + return """\ + a + Sets the quantity of component `a` in each data point. + If `a`, `b`, and `c` are all provided, they need not be + normalized, only the relative values matter. If only + two arrays are provided they must be normalized to + match `ternary.sum`. + asrc + Sets the source reference on Chart Studio Cloud for + `a`. + b + Sets the quantity of component `a` in each data point. + If `a`, `b`, and `c` are all provided, they need not be + normalized, only the relative values matter. If only + two arrays are provided they must be normalized to + match `ternary.sum`. + bsrc + Sets the source reference on Chart Studio Cloud for + `b`. + c + Sets the quantity of component `a` in each data point. + If `a`, `b`, and `c` are all provided, they need not be + normalized, only the relative values matter. If only + two arrays are provided they must be normalized to + match `ternary.sum`. + cliponaxis + Determines whether or not markers and text nodes are + clipped about the subplot axes. To show markers and + text nodes above axis lines and tick labels, make sure + to set `xaxis.layer` and `yaxis.layer` to *below + traces*. + connectgaps + Determines whether or not gaps (i.e. {nan} or missing + values) in the provided data arrays are connected. + csrc + Sets the source reference on Chart Studio Cloud for + `c`. + customdata + Assigns extra data each datum. This may be useful when + listening to hover, click and selection events. Note + that, "scatter" traces also appends customdata items in + the markers DOM elements + customdatasrc + Sets the source reference on Chart Studio Cloud for + `customdata`. + fill + Sets the area to fill with a solid color. Use with + `fillcolor` if not "none". scatterternary has a subset + of the options available to scatter. "toself" connects + the endpoints of the trace (or each segment of the + trace if it has gaps) into a closed shape. "tonext" + fills the space between two traces if one completely + encloses the other (eg consecutive contour lines), and + behaves like "toself" if there is no trace before it. + "tonext" should not be used if one trace does not + enclose the other. + fillcolor + Sets the fill color. Defaults to a half-transparent + variant of the line color, marker color, or marker line + color, whichever is available. + hoverinfo + Determines which trace information appear on hover. If + `none` or `skip` are set, no information is displayed + upon hovering. But, if `none` is set, click and hover + events are still fired. + hoverinfosrc + Sets the source reference on Chart Studio Cloud for + `hoverinfo`. + hoverlabel + :class:`plotly.graph_objects.scatterternary.Hoverlabel` + instance or dict with compatible properties + hoveron + Do the hover effects highlight individual points + (markers or line points) or do they highlight filled + regions? If the fill is "toself" or "tonext" and there + are no markers or text, then the default is "fills", + otherwise it is "points". + hovertemplate + Template string used for rendering the information that + appear on hover box. Note that this will override + `hoverinfo`. Variables are inserted using %{variable}, + for example "y: %{y}" as well as %{xother}, {%_xother}, + {%_xother_}, {%xother_}. When showing info for several + points, "xother" will be added to those with different + x positions from the first point. An underscore before + or after "(x|y)other" will add a space on that side, + only when this field is shown. Numbers are formatted + using d3-format's syntax %{variable:d3-format}, for + example "Price: %{y:$.2f}". + https://github.com/d3/d3-format/tree/v1.4.5#d3-format + for details on the formatting syntax. Dates are + formatted using d3-time-format's syntax + %{variable|d3-time-format}, for example "Day: + %{2019-01-01|%A}". https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format for details on the + date formatting syntax. Variables that can't be found + will be replaced with the specifier. For example, a + template of "data: %{x}, %{y}" will result in a value + of "data: 1, %{y}" if x is 1 and y is missing. + Variables with an undefined value will be replaced with + the fallback value. The variables available in + `hovertemplate` are the ones emitted as event data + described at this link + https://plotly.com/javascript/plotlyjs-events/#event- + data. Additionally, all attributes that can be + specified per-point (the ones that are `arrayOk: true`) + are available. Anything contained in tag `` is + displayed in the secondary box, for example + `%{fullData.name}`. To hide the + secondary box completely, use an empty tag + ``. + hovertemplatefallback + Fallback string that's displayed when a variable + referenced in a template is missing. If the boolean + value 'false' is passed in, the specifier with the + missing variable will be displayed. + hovertemplatesrc + Sets the source reference on Chart Studio Cloud for + `hovertemplate`. + hovertext + Sets hover text elements associated with each (a,b,c) + point. If a single string, the same string appears over + all the data points. If an array of strings, the items + are mapped in order to the the data points in (a,b,c). + To be seen, trace `hoverinfo` must contain a "text" + flag. + hovertextsrc + Sets the source reference on Chart Studio Cloud for + `hovertext`. + ids + Assigns id labels to each datum. These ids for object + constancy of data points during animation. Should be an + array of strings, not numbers or any other type. + idssrc + Sets the source reference on Chart Studio Cloud for + `ids`. + legend + Sets the reference to a legend to show this trace in. + References to these legends are "legend", "legend2", + "legend3", etc. Settings for these legends are set in + the layout, under `layout.legend`, `layout.legend2`, + etc. + legendgroup + Sets the legend group for this trace. Traces and shapes + part of the same legend group hide/show at the same + time when toggling legend items. + legendgrouptitle + :class:`plotly.graph_objects.scatterternary.Legendgroup + title` instance or dict with compatible properties + legendrank + Sets the legend rank for this trace. Items and groups + with smaller ranks are presented on top/left side while + with "reversed" `legend.traceorder` they are on + bottom/right side. The default legendrank is 1000, so + that you can use ranks less than 1000 to place certain + items before all unranked items, and ranks greater than + 1000 to go after all unranked items. When having + unranked or equal rank items shapes would be displayed + after traces i.e. according to their order in data and + layout. + legendwidth + Sets the width (in px or fraction) of the legend for + this trace. + line + :class:`plotly.graph_objects.scatterternary.Line` + instance or dict with compatible properties + marker + :class:`plotly.graph_objects.scatterternary.Marker` + instance or dict with compatible properties + meta + Assigns extra meta information associated with this + trace that can be used in various text attributes. + Attributes such as trace `name`, graph, axis and + colorbar `title.text`, annotation `text` + `rangeselector`, `updatemenues` and `sliders` `label` + text all support `meta`. To access the trace `meta` + values in an attribute in the same trace, simply use + `%{meta[i]}` where `i` is the index or key of the + `meta` item in question. To access trace `meta` in + layout attributes, use `%{data[n[.meta[i]}` where `i` + is the index or key of the `meta` and `n` is the trace + index. + metasrc + Sets the source reference on Chart Studio Cloud for + `meta`. + mode + Determines the drawing mode for this scatter trace. If + the provided `mode` includes "text" then the `text` + elements appear at the coordinates. Otherwise, the + `text` elements appear on hover. If there are less than + 20 points and the trace is not stacked then the default + is "lines+markers". Otherwise, "lines". + name + Sets the trace name. The trace name appears as the + legend item and on hover. + opacity + Sets the opacity of the trace. + selected + :class:`plotly.graph_objects.scatterternary.Selected` + instance or dict with compatible properties + selectedpoints + Array containing integer indices of selected points. + Has an effect only for traces that support selections. + Note that an empty array means an empty selection where + the `unselected` are turned on for all points, whereas, + any other non-array values means no selection all where + the `selected` and `unselected` styles have no effect. + showlegend + Determines whether or not an item corresponding to this + trace is shown in the legend. + stream + :class:`plotly.graph_objects.scatterternary.Stream` + instance or dict with compatible properties + subplot + Sets a reference between this trace's data coordinates + and a ternary subplot. If "ternary" (the default + value), the data refer to `layout.ternary`. If + "ternary2", the data refer to `layout.ternary2`, and so + on. + sum + The number each triplet should sum to, if only two of + `a`, `b`, and `c` are provided. This overrides + `ternary.sum` to normalize this specific trace, but + does not affect the values displayed on the axes. 0 (or + missing) means to use ternary.sum + text + Sets text elements associated with each (a,b,c) point. + If a single string, the same string appears over all + the data points. If an array of strings, the items are + mapped in order to the the data points in (a,b,c). If + trace `hoverinfo` contains a "text" flag and + "hovertext" is not set, these elements will be seen in + the hover labels. + textfont + Sets the text font. + textposition + Sets the positions of the `text` elements with respects + to the (x,y) coordinates. + textpositionsrc + Sets the source reference on Chart Studio Cloud for + `textposition`. + textsrc + Sets the source reference on Chart Studio Cloud for + `text`. + texttemplate + Template string used for rendering the information text + that appears on points. Note that this will override + `textinfo`. Variables are inserted using %{variable}, + for example "y: %{y}". Numbers are formatted using + d3-format's syntax %{variable:d3-format}, for example + "Price: %{y:$.2f}". + https://github.com/d3/d3-format/tree/v1.4.5#d3-format + for details on the formatting syntax. Dates are + formatted using d3-time-format's syntax + %{variable|d3-time-format}, for example "Day: + %{2019-01-01|%A}". https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format for details on the + date formatting syntax. Variables that can't be found + will be replaced with the specifier. For example, a + template of "data: %{x}, %{y}" will result in a value + of "data: 1, %{y}" if x is 1 and y is missing. + Variables with an undefined value will be replaced with + the fallback value. All attributes that can be + specified per-point (the ones that are `arrayOk: true`) + are available. Finally, the template string has access + to variables `a`, `b`, `c` and `text`. + texttemplatefallback + Fallback string that's displayed when a variable + referenced in a template is missing. If the boolean + value 'false' is passed in, the specifier with the + missing variable will be displayed. + texttemplatesrc + Sets the source reference on Chart Studio Cloud for + `texttemplate`. + uid + Assign an id to this trace, Use this to provide object + constancy between traces during animations and + transitions. + uirevision + Controls persistence of some user-driven changes to the + trace: `constraintrange` in `parcoords` traces, as well + as some `editable: true` modifications such as `name` + and `colorbar.title`. Defaults to `layout.uirevision`. + Note that other user-driven trace attribute changes are + controlled by `layout` attributes: `trace.visible` is + controlled by `layout.legend.uirevision`, + `selectedpoints` is controlled by + `layout.selectionrevision`, and `colorbar.(x|y)` + (accessible with `config: {editable: true}`) is + controlled by `layout.editrevision`. Trace changes are + tracked by `uid`, which only falls back on trace index + if no `uid` is provided. So if your app can add/remove + traces before the end of the `data` array, such that + the same trace has a different index, you can still + preserve user-driven changes if you give each trace a + `uid` that stays with it as it moves. + unselected + :class:`plotly.graph_objects.scatterternary.Unselected` + instance or dict with compatible properties + visible + Determines whether or not this trace is visible. If + "legendonly", the trace is not drawn, but can appear as + a legend item (provided that the legend itself is + visible). + """ + + def __init__( + self, + arg=None, + a=None, + asrc=None, + b=None, + bsrc=None, + c=None, + cliponaxis=None, + connectgaps=None, + csrc=None, + customdata=None, + customdatasrc=None, + fill=None, + fillcolor=None, + hoverinfo=None, + hoverinfosrc=None, + hoverlabel=None, + hoveron=None, + hovertemplate=None, + hovertemplatefallback=None, + hovertemplatesrc=None, + hovertext=None, + hovertextsrc=None, + ids=None, + idssrc=None, + legend=None, + legendgroup=None, + legendgrouptitle=None, + legendrank=None, + legendwidth=None, + line=None, + marker=None, + meta=None, + metasrc=None, + mode=None, + name=None, + opacity=None, + selected=None, + selectedpoints=None, + showlegend=None, + stream=None, + subplot=None, + sum=None, + text=None, + textfont=None, + textposition=None, + textpositionsrc=None, + textsrc=None, + texttemplate=None, + texttemplatefallback=None, + texttemplatesrc=None, + uid=None, + uirevision=None, + unselected=None, + visible=None, + **kwargs, + ): + """ + Construct a new Scatterternary object + + Provides similar functionality to the "scatter" type but on a + ternary phase diagram. The data is provided by at least two + arrays out of `a`, `b`, `c` triplets. + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.Scatterternary` + a + Sets the quantity of component `a` in each data point. + If `a`, `b`, and `c` are all provided, they need not be + normalized, only the relative values matter. If only + two arrays are provided they must be normalized to + match `ternary.sum`. + asrc + Sets the source reference on Chart Studio Cloud for + `a`. + b + Sets the quantity of component `a` in each data point. + If `a`, `b`, and `c` are all provided, they need not be + normalized, only the relative values matter. If only + two arrays are provided they must be normalized to + match `ternary.sum`. + bsrc + Sets the source reference on Chart Studio Cloud for + `b`. + c + Sets the quantity of component `a` in each data point. + If `a`, `b`, and `c` are all provided, they need not be + normalized, only the relative values matter. If only + two arrays are provided they must be normalized to + match `ternary.sum`. + cliponaxis + Determines whether or not markers and text nodes are + clipped about the subplot axes. To show markers and + text nodes above axis lines and tick labels, make sure + to set `xaxis.layer` and `yaxis.layer` to *below + traces*. + connectgaps + Determines whether or not gaps (i.e. {nan} or missing + values) in the provided data arrays are connected. + csrc + Sets the source reference on Chart Studio Cloud for + `c`. + customdata + Assigns extra data each datum. This may be useful when + listening to hover, click and selection events. Note + that, "scatter" traces also appends customdata items in + the markers DOM elements + customdatasrc + Sets the source reference on Chart Studio Cloud for + `customdata`. + fill + Sets the area to fill with a solid color. Use with + `fillcolor` if not "none". scatterternary has a subset + of the options available to scatter. "toself" connects + the endpoints of the trace (or each segment of the + trace if it has gaps) into a closed shape. "tonext" + fills the space between two traces if one completely + encloses the other (eg consecutive contour lines), and + behaves like "toself" if there is no trace before it. + "tonext" should not be used if one trace does not + enclose the other. + fillcolor + Sets the fill color. Defaults to a half-transparent + variant of the line color, marker color, or marker line + color, whichever is available. + hoverinfo + Determines which trace information appear on hover. If + `none` or `skip` are set, no information is displayed + upon hovering. But, if `none` is set, click and hover + events are still fired. + hoverinfosrc + Sets the source reference on Chart Studio Cloud for + `hoverinfo`. + hoverlabel + :class:`plotly.graph_objects.scatterternary.Hoverlabel` + instance or dict with compatible properties + hoveron + Do the hover effects highlight individual points + (markers or line points) or do they highlight filled + regions? If the fill is "toself" or "tonext" and there + are no markers or text, then the default is "fills", + otherwise it is "points". + hovertemplate + Template string used for rendering the information that + appear on hover box. Note that this will override + `hoverinfo`. Variables are inserted using %{variable}, + for example "y: %{y}" as well as %{xother}, {%_xother}, + {%_xother_}, {%xother_}. When showing info for several + points, "xother" will be added to those with different + x positions from the first point. An underscore before + or after "(x|y)other" will add a space on that side, + only when this field is shown. Numbers are formatted + using d3-format's syntax %{variable:d3-format}, for + example "Price: %{y:$.2f}". + https://github.com/d3/d3-format/tree/v1.4.5#d3-format + for details on the formatting syntax. Dates are + formatted using d3-time-format's syntax + %{variable|d3-time-format}, for example "Day: + %{2019-01-01|%A}". https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format for details on the + date formatting syntax. Variables that can't be found + will be replaced with the specifier. For example, a + template of "data: %{x}, %{y}" will result in a value + of "data: 1, %{y}" if x is 1 and y is missing. + Variables with an undefined value will be replaced with + the fallback value. The variables available in + `hovertemplate` are the ones emitted as event data + described at this link + https://plotly.com/javascript/plotlyjs-events/#event- + data. Additionally, all attributes that can be + specified per-point (the ones that are `arrayOk: true`) + are available. Anything contained in tag `` is + displayed in the secondary box, for example + `%{fullData.name}`. To hide the + secondary box completely, use an empty tag + ``. + hovertemplatefallback + Fallback string that's displayed when a variable + referenced in a template is missing. If the boolean + value 'false' is passed in, the specifier with the + missing variable will be displayed. + hovertemplatesrc + Sets the source reference on Chart Studio Cloud for + `hovertemplate`. + hovertext + Sets hover text elements associated with each (a,b,c) + point. If a single string, the same string appears over + all the data points. If an array of strings, the items + are mapped in order to the the data points in (a,b,c). + To be seen, trace `hoverinfo` must contain a "text" + flag. + hovertextsrc + Sets the source reference on Chart Studio Cloud for + `hovertext`. + ids + Assigns id labels to each datum. These ids for object + constancy of data points during animation. Should be an + array of strings, not numbers or any other type. + idssrc + Sets the source reference on Chart Studio Cloud for + `ids`. + legend + Sets the reference to a legend to show this trace in. + References to these legends are "legend", "legend2", + "legend3", etc. Settings for these legends are set in + the layout, under `layout.legend`, `layout.legend2`, + etc. + legendgroup + Sets the legend group for this trace. Traces and shapes + part of the same legend group hide/show at the same + time when toggling legend items. + legendgrouptitle + :class:`plotly.graph_objects.scatterternary.Legendgroup + title` instance or dict with compatible properties + legendrank + Sets the legend rank for this trace. Items and groups + with smaller ranks are presented on top/left side while + with "reversed" `legend.traceorder` they are on + bottom/right side. The default legendrank is 1000, so + that you can use ranks less than 1000 to place certain + items before all unranked items, and ranks greater than + 1000 to go after all unranked items. When having + unranked or equal rank items shapes would be displayed + after traces i.e. according to their order in data and + layout. + legendwidth + Sets the width (in px or fraction) of the legend for + this trace. + line + :class:`plotly.graph_objects.scatterternary.Line` + instance or dict with compatible properties + marker + :class:`plotly.graph_objects.scatterternary.Marker` + instance or dict with compatible properties + meta + Assigns extra meta information associated with this + trace that can be used in various text attributes. + Attributes such as trace `name`, graph, axis and + colorbar `title.text`, annotation `text` + `rangeselector`, `updatemenues` and `sliders` `label` + text all support `meta`. To access the trace `meta` + values in an attribute in the same trace, simply use + `%{meta[i]}` where `i` is the index or key of the + `meta` item in question. To access trace `meta` in + layout attributes, use `%{data[n[.meta[i]}` where `i` + is the index or key of the `meta` and `n` is the trace + index. + metasrc + Sets the source reference on Chart Studio Cloud for + `meta`. + mode + Determines the drawing mode for this scatter trace. If + the provided `mode` includes "text" then the `text` + elements appear at the coordinates. Otherwise, the + `text` elements appear on hover. If there are less than + 20 points and the trace is not stacked then the default + is "lines+markers". Otherwise, "lines". + name + Sets the trace name. The trace name appears as the + legend item and on hover. + opacity + Sets the opacity of the trace. + selected + :class:`plotly.graph_objects.scatterternary.Selected` + instance or dict with compatible properties + selectedpoints + Array containing integer indices of selected points. + Has an effect only for traces that support selections. + Note that an empty array means an empty selection where + the `unselected` are turned on for all points, whereas, + any other non-array values means no selection all where + the `selected` and `unselected` styles have no effect. + showlegend + Determines whether or not an item corresponding to this + trace is shown in the legend. + stream + :class:`plotly.graph_objects.scatterternary.Stream` + instance or dict with compatible properties + subplot + Sets a reference between this trace's data coordinates + and a ternary subplot. If "ternary" (the default + value), the data refer to `layout.ternary`. If + "ternary2", the data refer to `layout.ternary2`, and so + on. + sum + The number each triplet should sum to, if only two of + `a`, `b`, and `c` are provided. This overrides + `ternary.sum` to normalize this specific trace, but + does not affect the values displayed on the axes. 0 (or + missing) means to use ternary.sum + text + Sets text elements associated with each (a,b,c) point. + If a single string, the same string appears over all + the data points. If an array of strings, the items are + mapped in order to the the data points in (a,b,c). If + trace `hoverinfo` contains a "text" flag and + "hovertext" is not set, these elements will be seen in + the hover labels. + textfont + Sets the text font. + textposition + Sets the positions of the `text` elements with respects + to the (x,y) coordinates. + textpositionsrc + Sets the source reference on Chart Studio Cloud for + `textposition`. + textsrc + Sets the source reference on Chart Studio Cloud for + `text`. + texttemplate + Template string used for rendering the information text + that appears on points. Note that this will override + `textinfo`. Variables are inserted using %{variable}, + for example "y: %{y}". Numbers are formatted using + d3-format's syntax %{variable:d3-format}, for example + "Price: %{y:$.2f}". + https://github.com/d3/d3-format/tree/v1.4.5#d3-format + for details on the formatting syntax. Dates are + formatted using d3-time-format's syntax + %{variable|d3-time-format}, for example "Day: + %{2019-01-01|%A}". https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format for details on the + date formatting syntax. Variables that can't be found + will be replaced with the specifier. For example, a + template of "data: %{x}, %{y}" will result in a value + of "data: 1, %{y}" if x is 1 and y is missing. + Variables with an undefined value will be replaced with + the fallback value. All attributes that can be + specified per-point (the ones that are `arrayOk: true`) + are available. Finally, the template string has access + to variables `a`, `b`, `c` and `text`. + texttemplatefallback + Fallback string that's displayed when a variable + referenced in a template is missing. If the boolean + value 'false' is passed in, the specifier with the + missing variable will be displayed. + texttemplatesrc + Sets the source reference on Chart Studio Cloud for + `texttemplate`. + uid + Assign an id to this trace, Use this to provide object + constancy between traces during animations and + transitions. + uirevision + Controls persistence of some user-driven changes to the + trace: `constraintrange` in `parcoords` traces, as well + as some `editable: true` modifications such as `name` + and `colorbar.title`. Defaults to `layout.uirevision`. + Note that other user-driven trace attribute changes are + controlled by `layout` attributes: `trace.visible` is + controlled by `layout.legend.uirevision`, + `selectedpoints` is controlled by + `layout.selectionrevision`, and `colorbar.(x|y)` + (accessible with `config: {editable: true}`) is + controlled by `layout.editrevision`. Trace changes are + tracked by `uid`, which only falls back on trace index + if no `uid` is provided. So if your app can add/remove + traces before the end of the `data` array, such that + the same trace has a different index, you can still + preserve user-driven changes if you give each trace a + `uid` that stays with it as it moves. + unselected + :class:`plotly.graph_objects.scatterternary.Unselected` + instance or dict with compatible properties + visible + Determines whether or not this trace is visible. If + "legendonly", the trace is not drawn, but can appear as + a legend item (provided that the legend itself is + visible). + + Returns + ------- + Scatterternary + """ + super().__init__("scatterternary") + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + if arg is None: + arg = {} + elif isinstance(arg, self.__class__): + arg = arg.to_plotly_json() + elif isinstance(arg, dict): + arg = _copy.copy(arg) + else: + raise ValueError("""\ +The first argument to the plotly.graph_objs.Scatterternary +constructor must be a dict or +an instance of :class:`plotly.graph_objs.Scatterternary`""") + + self._skip_invalid = kwargs.pop("skip_invalid", False) + self._validate = kwargs.pop("_validate", True) + + self._set_property("a", arg, a) + self._set_property("asrc", arg, asrc) + self._set_property("b", arg, b) + self._set_property("bsrc", arg, bsrc) + self._set_property("c", arg, c) + self._set_property("cliponaxis", arg, cliponaxis) + self._set_property("connectgaps", arg, connectgaps) + self._set_property("csrc", arg, csrc) + self._set_property("customdata", arg, customdata) + self._set_property("customdatasrc", arg, customdatasrc) + self._set_property("fill", arg, fill) + self._set_property("fillcolor", arg, fillcolor) + self._set_property("hoverinfo", arg, hoverinfo) + self._set_property("hoverinfosrc", arg, hoverinfosrc) + self._set_property("hoverlabel", arg, hoverlabel) + self._set_property("hoveron", arg, hoveron) + self._set_property("hovertemplate", arg, hovertemplate) + self._set_property("hovertemplatefallback", arg, hovertemplatefallback) + self._set_property("hovertemplatesrc", arg, hovertemplatesrc) + self._set_property("hovertext", arg, hovertext) + self._set_property("hovertextsrc", arg, hovertextsrc) + self._set_property("ids", arg, ids) + self._set_property("idssrc", arg, idssrc) + self._set_property("legend", arg, legend) + self._set_property("legendgroup", arg, legendgroup) + self._set_property("legendgrouptitle", arg, legendgrouptitle) + self._set_property("legendrank", arg, legendrank) + self._set_property("legendwidth", arg, legendwidth) + self._set_property("line", arg, line) + self._set_property("marker", arg, marker) + self._set_property("meta", arg, meta) + self._set_property("metasrc", arg, metasrc) + self._set_property("mode", arg, mode) + self._set_property("name", arg, name) + self._set_property("opacity", arg, opacity) + self._set_property("selected", arg, selected) + self._set_property("selectedpoints", arg, selectedpoints) + self._set_property("showlegend", arg, showlegend) + self._set_property("stream", arg, stream) + self._set_property("subplot", arg, subplot) + self._set_property("sum", arg, sum) + self._set_property("text", arg, text) + self._set_property("textfont", arg, textfont) + self._set_property("textposition", arg, textposition) + self._set_property("textpositionsrc", arg, textpositionsrc) + self._set_property("textsrc", arg, textsrc) + self._set_property("texttemplate", arg, texttemplate) + self._set_property("texttemplatefallback", arg, texttemplatefallback) + self._set_property("texttemplatesrc", arg, texttemplatesrc) + self._set_property("uid", arg, uid) + self._set_property("uirevision", arg, uirevision) + self._set_property("unselected", arg, unselected) + self._set_property("visible", arg, visible) + + self._props["type"] = "scatterternary" + arg.pop("type", None) + self._process_kwargs(**dict(arg, **kwargs)) + self._skip_invalid = False diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/_splom.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/_splom.py new file mode 100644 index 0000000000000000000000000000000000000000..c80229a70446a866eefea5ee5a7b4b83c6c05f43 --- /dev/null +++ b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/_splom.py @@ -0,0 +1,1569 @@ +# --- THIS FILE IS AUTO-GENERATED --- +# Modifications will be overwitten the next time code generation run. + +from plotly.basedatatypes import BaseTraceType as _BaseTraceType +import copy as _copy + + +class Splom(_BaseTraceType): + _parent_path_str = "" + _path_str = "splom" + _valid_props = { + "customdata", + "customdatasrc", + "diagonal", + "dimensiondefaults", + "dimensions", + "hoverinfo", + "hoverinfosrc", + "hoverlabel", + "hovertemplate", + "hovertemplatefallback", + "hovertemplatesrc", + "hovertext", + "hovertextsrc", + "ids", + "idssrc", + "legend", + "legendgroup", + "legendgrouptitle", + "legendrank", + "legendwidth", + "marker", + "meta", + "metasrc", + "name", + "opacity", + "selected", + "selectedpoints", + "showlegend", + "showlowerhalf", + "showupperhalf", + "stream", + "text", + "textsrc", + "type", + "uid", + "uirevision", + "unselected", + "visible", + "xaxes", + "xhoverformat", + "yaxes", + "yhoverformat", + } + + @property + def customdata(self): + """ + Assigns extra data each datum. This may be useful when + listening to hover, click and selection events. Note that, + "scatter" traces also appends customdata items in the markers + DOM elements + + The 'customdata' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["customdata"] + + @customdata.setter + def customdata(self, val): + self["customdata"] = val + + @property + def customdatasrc(self): + """ + Sets the source reference on Chart Studio Cloud for + `customdata`. + + The 'customdatasrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["customdatasrc"] + + @customdatasrc.setter + def customdatasrc(self, val): + self["customdatasrc"] = val + + @property + def diagonal(self): + """ + The 'diagonal' property is an instance of Diagonal + that may be specified as: + - An instance of :class:`plotly.graph_objs.splom.Diagonal` + - A dict of string/value properties that will be passed + to the Diagonal constructor + + Returns + ------- + plotly.graph_objs.splom.Diagonal + """ + return self["diagonal"] + + @diagonal.setter + def diagonal(self, val): + self["diagonal"] = val + + @property + def dimensions(self): + """ + The 'dimensions' property is a tuple of instances of + Dimension that may be specified as: + - A list or tuple of instances of plotly.graph_objs.splom.Dimension + - A list or tuple of dicts of string/value properties that + will be passed to the Dimension constructor + + Returns + ------- + tuple[plotly.graph_objs.splom.Dimension] + """ + return self["dimensions"] + + @dimensions.setter + def dimensions(self, val): + self["dimensions"] = val + + @property + def dimensiondefaults(self): + """ + When used in a template (as + layout.template.data.splom.dimensiondefaults), sets the default + property values to use for elements of splom.dimensions + + The 'dimensiondefaults' property is an instance of Dimension + that may be specified as: + - An instance of :class:`plotly.graph_objs.splom.Dimension` + - A dict of string/value properties that will be passed + to the Dimension constructor + + Returns + ------- + plotly.graph_objs.splom.Dimension + """ + return self["dimensiondefaults"] + + @dimensiondefaults.setter + def dimensiondefaults(self, val): + self["dimensiondefaults"] = val + + @property + def hoverinfo(self): + """ + Determines which trace information appear on hover. If `none` + or `skip` are set, no information is displayed upon hovering. + But, if `none` is set, click and hover events are still fired. + + The 'hoverinfo' property is a flaglist and may be specified + as a string containing: + - Any combination of ['x', 'y', 'z', 'text', 'name'] joined with '+' characters + (e.g. 'x+y') + OR exactly one of ['all', 'none', 'skip'] (e.g. 'skip') + - A list or array of the above + + Returns + ------- + Any|numpy.ndarray + """ + return self["hoverinfo"] + + @hoverinfo.setter + def hoverinfo(self, val): + self["hoverinfo"] = val + + @property + def hoverinfosrc(self): + """ + Sets the source reference on Chart Studio Cloud for + `hoverinfo`. + + The 'hoverinfosrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["hoverinfosrc"] + + @hoverinfosrc.setter + def hoverinfosrc(self, val): + self["hoverinfosrc"] = val + + @property + def hoverlabel(self): + """ + The 'hoverlabel' property is an instance of Hoverlabel + that may be specified as: + - An instance of :class:`plotly.graph_objs.splom.Hoverlabel` + - A dict of string/value properties that will be passed + to the Hoverlabel constructor + + Returns + ------- + plotly.graph_objs.splom.Hoverlabel + """ + return self["hoverlabel"] + + @hoverlabel.setter + def hoverlabel(self, val): + self["hoverlabel"] = val + + @property + def hovertemplate(self): + """ + Template string used for rendering the information that appear + on hover box. Note that this will override `hoverinfo`. + Variables are inserted using %{variable}, for example "y: %{y}" + as well as %{xother}, {%_xother}, {%_xother_}, {%xother_}. When + showing info for several points, "xother" will be added to + those with different x positions from the first point. An + underscore before or after "(x|y)other" will add a space on + that side, only when this field is shown. Numbers are formatted + using d3-format's syntax %{variable:d3-format}, for example + "Price: %{y:$.2f}". + https://github.com/d3/d3-format/tree/v1.4.5#d3-format for + details on the formatting syntax. Dates are formatted using + d3-time-format's syntax %{variable|d3-time-format}, for example + "Day: %{2019-01-01|%A}". https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format for details on the date + formatting syntax. Variables that can't be found will be + replaced with the specifier. For example, a template of "data: + %{x}, %{y}" will result in a value of "data: 1, %{y}" if x is 1 + and y is missing. Variables with an undefined value will be + replaced with the fallback value. The variables available in + `hovertemplate` are the ones emitted as event data described at + this link https://plotly.com/javascript/plotlyjs-events/#event- + data. Additionally, all attributes that can be specified per- + point (the ones that are `arrayOk: true`) are available. + Anything contained in tag `` is displayed in the + secondary box, for example `%{fullData.name}`. + To hide the secondary box completely, use an empty tag + ``. + + The 'hovertemplate' property is a string and must be specified as: + - A string + - A number that will be converted to a string + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["hovertemplate"] + + @hovertemplate.setter + def hovertemplate(self, val): + self["hovertemplate"] = val + + @property + def hovertemplatefallback(self): + """ + Fallback string that's displayed when a variable referenced in + a template is missing. If the boolean value 'false' is passed + in, the specifier with the missing variable will be displayed. + + The 'hovertemplatefallback' property accepts values of any type + + Returns + ------- + Any + """ + return self["hovertemplatefallback"] + + @hovertemplatefallback.setter + def hovertemplatefallback(self, val): + self["hovertemplatefallback"] = val + + @property + def hovertemplatesrc(self): + """ + Sets the source reference on Chart Studio Cloud for + `hovertemplate`. + + The 'hovertemplatesrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["hovertemplatesrc"] + + @hovertemplatesrc.setter + def hovertemplatesrc(self, val): + self["hovertemplatesrc"] = val + + @property + def hovertext(self): + """ + Same as `text`. + + The 'hovertext' property is a string and must be specified as: + - A string + - A number that will be converted to a string + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["hovertext"] + + @hovertext.setter + def hovertext(self, val): + self["hovertext"] = val + + @property + def hovertextsrc(self): + """ + Sets the source reference on Chart Studio Cloud for + `hovertext`. + + The 'hovertextsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["hovertextsrc"] + + @hovertextsrc.setter + def hovertextsrc(self, val): + self["hovertextsrc"] = val + + @property + def ids(self): + """ + Assigns id labels to each datum. These ids for object constancy + of data points during animation. Should be an array of strings, + not numbers or any other type. + + The 'ids' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["ids"] + + @ids.setter + def ids(self, val): + self["ids"] = val + + @property + def idssrc(self): + """ + Sets the source reference on Chart Studio Cloud for `ids`. + + The 'idssrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["idssrc"] + + @idssrc.setter + def idssrc(self, val): + self["idssrc"] = val + + @property + def legend(self): + """ + Sets the reference to a legend to show this trace in. + References to these legends are "legend", "legend2", "legend3", + etc. Settings for these legends are set in the layout, under + `layout.legend`, `layout.legend2`, etc. + + The 'legend' property is an identifier of a particular + subplot, of type 'legend', that may be specified as: + - the string 'legend' optionally followed by an integer >= 1 + (e.g. 'legend', 'legend1', 'legend2', 'legend3', etc.) + + Returns + ------- + str + """ + return self["legend"] + + @legend.setter + def legend(self, val): + self["legend"] = val + + @property + def legendgroup(self): + """ + Sets the legend group for this trace. Traces and shapes part of + the same legend group hide/show at the same time when toggling + legend items. + + The 'legendgroup' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["legendgroup"] + + @legendgroup.setter + def legendgroup(self, val): + self["legendgroup"] = val + + @property + def legendgrouptitle(self): + """ + The 'legendgrouptitle' property is an instance of Legendgrouptitle + that may be specified as: + - An instance of :class:`plotly.graph_objs.splom.Legendgrouptitle` + - A dict of string/value properties that will be passed + to the Legendgrouptitle constructor + + Returns + ------- + plotly.graph_objs.splom.Legendgrouptitle + """ + return self["legendgrouptitle"] + + @legendgrouptitle.setter + def legendgrouptitle(self, val): + self["legendgrouptitle"] = val + + @property + def legendrank(self): + """ + Sets the legend rank for this trace. Items and groups with + smaller ranks are presented on top/left side while with + "reversed" `legend.traceorder` they are on bottom/right side. + The default legendrank is 1000, so that you can use ranks less + than 1000 to place certain items before all unranked items, and + ranks greater than 1000 to go after all unranked items. When + having unranked or equal rank items shapes would be displayed + after traces i.e. according to their order in data and layout. + + The 'legendrank' property is a number and may be specified as: + - An int or float + + Returns + ------- + int|float + """ + return self["legendrank"] + + @legendrank.setter + def legendrank(self, val): + self["legendrank"] = val + + @property + def legendwidth(self): + """ + Sets the width (in px or fraction) of the legend for this + trace. + + The 'legendwidth' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["legendwidth"] + + @legendwidth.setter + def legendwidth(self, val): + self["legendwidth"] = val + + @property + def marker(self): + """ + The 'marker' property is an instance of Marker + that may be specified as: + - An instance of :class:`plotly.graph_objs.splom.Marker` + - A dict of string/value properties that will be passed + to the Marker constructor + + Returns + ------- + plotly.graph_objs.splom.Marker + """ + return self["marker"] + + @marker.setter + def marker(self, val): + self["marker"] = val + + @property + def meta(self): + """ + Assigns extra meta information associated with this trace that + can be used in various text attributes. Attributes such as + trace `name`, graph, axis and colorbar `title.text`, annotation + `text` `rangeselector`, `updatemenues` and `sliders` `label` + text all support `meta`. To access the trace `meta` values in + an attribute in the same trace, simply use `%{meta[i]}` where + `i` is the index or key of the `meta` item in question. To + access trace `meta` in layout attributes, use + `%{data[n[.meta[i]}` where `i` is the index or key of the + `meta` and `n` is the trace index. + + The 'meta' property accepts values of any type + + Returns + ------- + Any|numpy.ndarray + """ + return self["meta"] + + @meta.setter + def meta(self, val): + self["meta"] = val + + @property + def metasrc(self): + """ + Sets the source reference on Chart Studio Cloud for `meta`. + + The 'metasrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["metasrc"] + + @metasrc.setter + def metasrc(self, val): + self["metasrc"] = val + + @property + def name(self): + """ + Sets the trace name. The trace name appears as the legend item + and on hover. + + The 'name' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["name"] + + @name.setter + def name(self, val): + self["name"] = val + + @property + def opacity(self): + """ + Sets the opacity of the trace. + + The 'opacity' property is a number and may be specified as: + - An int or float in the interval [0, 1] + + Returns + ------- + int|float + """ + return self["opacity"] + + @opacity.setter + def opacity(self, val): + self["opacity"] = val + + @property + def selected(self): + """ + The 'selected' property is an instance of Selected + that may be specified as: + - An instance of :class:`plotly.graph_objs.splom.Selected` + - A dict of string/value properties that will be passed + to the Selected constructor + + Returns + ------- + plotly.graph_objs.splom.Selected + """ + return self["selected"] + + @selected.setter + def selected(self, val): + self["selected"] = val + + @property + def selectedpoints(self): + """ + Array containing integer indices of selected points. Has an + effect only for traces that support selections. Note that an + empty array means an empty selection where the `unselected` are + turned on for all points, whereas, any other non-array values + means no selection all where the `selected` and `unselected` + styles have no effect. + + The 'selectedpoints' property accepts values of any type + + Returns + ------- + Any + """ + return self["selectedpoints"] + + @selectedpoints.setter + def selectedpoints(self, val): + self["selectedpoints"] = val + + @property + def showlegend(self): + """ + Determines whether or not an item corresponding to this trace + is shown in the legend. + + The 'showlegend' property is a boolean and must be specified as: + - A boolean value: True or False + + Returns + ------- + bool + """ + return self["showlegend"] + + @showlegend.setter + def showlegend(self, val): + self["showlegend"] = val + + @property + def showlowerhalf(self): + """ + Determines whether or not subplots on the lower half from the + diagonal are displayed. + + The 'showlowerhalf' property is a boolean and must be specified as: + - A boolean value: True or False + + Returns + ------- + bool + """ + return self["showlowerhalf"] + + @showlowerhalf.setter + def showlowerhalf(self, val): + self["showlowerhalf"] = val + + @property + def showupperhalf(self): + """ + Determines whether or not subplots on the upper half from the + diagonal are displayed. + + The 'showupperhalf' property is a boolean and must be specified as: + - A boolean value: True or False + + Returns + ------- + bool + """ + return self["showupperhalf"] + + @showupperhalf.setter + def showupperhalf(self, val): + self["showupperhalf"] = val + + @property + def stream(self): + """ + The 'stream' property is an instance of Stream + that may be specified as: + - An instance of :class:`plotly.graph_objs.splom.Stream` + - A dict of string/value properties that will be passed + to the Stream constructor + + Returns + ------- + plotly.graph_objs.splom.Stream + """ + return self["stream"] + + @stream.setter + def stream(self, val): + self["stream"] = val + + @property + def text(self): + """ + Sets text elements associated with each (x,y) pair to appear on + hover. If a single string, the same string appears over all the + data points. If an array of string, the items are mapped in + order to the this trace's (x,y) coordinates. + + The 'text' property is a string and must be specified as: + - A string + - A number that will be converted to a string + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["text"] + + @text.setter + def text(self, val): + self["text"] = val + + @property + def textsrc(self): + """ + Sets the source reference on Chart Studio Cloud for `text`. + + The 'textsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["textsrc"] + + @textsrc.setter + def textsrc(self, val): + self["textsrc"] = val + + @property + def uid(self): + """ + Assign an id to this trace, Use this to provide object + constancy between traces during animations and transitions. + + The 'uid' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["uid"] + + @uid.setter + def uid(self, val): + self["uid"] = val + + @property + def uirevision(self): + """ + Controls persistence of some user-driven changes to the trace: + `constraintrange` in `parcoords` traces, as well as some + `editable: true` modifications such as `name` and + `colorbar.title`. Defaults to `layout.uirevision`. Note that + other user-driven trace attribute changes are controlled by + `layout` attributes: `trace.visible` is controlled by + `layout.legend.uirevision`, `selectedpoints` is controlled by + `layout.selectionrevision`, and `colorbar.(x|y)` (accessible + with `config: {editable: true}`) is controlled by + `layout.editrevision`. Trace changes are tracked by `uid`, + which only falls back on trace index if no `uid` is provided. + So if your app can add/remove traces before the end of the + `data` array, such that the same trace has a different index, + you can still preserve user-driven changes if you give each + trace a `uid` that stays with it as it moves. + + The 'uirevision' property accepts values of any type + + Returns + ------- + Any + """ + return self["uirevision"] + + @uirevision.setter + def uirevision(self, val): + self["uirevision"] = val + + @property + def unselected(self): + """ + The 'unselected' property is an instance of Unselected + that may be specified as: + - An instance of :class:`plotly.graph_objs.splom.Unselected` + - A dict of string/value properties that will be passed + to the Unselected constructor + + Returns + ------- + plotly.graph_objs.splom.Unselected + """ + return self["unselected"] + + @unselected.setter + def unselected(self, val): + self["unselected"] = val + + @property + def visible(self): + """ + Determines whether or not this trace is visible. If + "legendonly", the trace is not drawn, but can appear as a + legend item (provided that the legend itself is visible). + + The 'visible' property is an enumeration that may be specified as: + - One of the following enumeration values: + [True, False, 'legendonly'] + + Returns + ------- + Any + """ + return self["visible"] + + @visible.setter + def visible(self, val): + self["visible"] = val + + @property + def xaxes(self): + """ + Sets the list of x axes corresponding to dimensions of this + splom trace. By default, a splom will match the first N xaxes + where N is the number of input dimensions. Note that, in case + where `diagonal.visible` is false and `showupperhalf` or + `showlowerhalf` is false, this splom trace will generate one + less x-axis and one less y-axis. + + The 'xaxes' property is an info array that may be specified as: + * a list of elements where: + The 'xaxes[i]' property is an identifier of a particular + subplot, of type 'x', that may be specified as: + - the string 'x' optionally followed by an integer >= 1 + (e.g. 'x', 'x1', 'x2', 'x3', etc.) + + Returns + ------- + list + """ + return self["xaxes"] + + @xaxes.setter + def xaxes(self, val): + self["xaxes"] = val + + @property + def xhoverformat(self): + """ + Sets the hover text formatting rulefor `x` using d3 formatting + mini-languages which are very similar to those in Python. For + numbers, see: + https://github.com/d3/d3-format/tree/v1.4.5#d3-format. And for + dates see: https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format. We add two items to d3's date + formatter: "%h" for half of the year as a decimal number as + well as "%{n}f" for fractional seconds with n digits. For + example, *2016-10-13 09:15:23.456* with tickformat + "%H~%M~%S.%2f" would display *09~15~23.46*By default the values + are formatted using `xaxis.hoverformat`. + + The 'xhoverformat' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["xhoverformat"] + + @xhoverformat.setter + def xhoverformat(self, val): + self["xhoverformat"] = val + + @property + def yaxes(self): + """ + Sets the list of y axes corresponding to dimensions of this + splom trace. By default, a splom will match the first N yaxes + where N is the number of input dimensions. Note that, in case + where `diagonal.visible` is false and `showupperhalf` or + `showlowerhalf` is false, this splom trace will generate one + less x-axis and one less y-axis. + + The 'yaxes' property is an info array that may be specified as: + * a list of elements where: + The 'yaxes[i]' property is an identifier of a particular + subplot, of type 'y', that may be specified as: + - the string 'y' optionally followed by an integer >= 1 + (e.g. 'y', 'y1', 'y2', 'y3', etc.) + + Returns + ------- + list + """ + return self["yaxes"] + + @yaxes.setter + def yaxes(self, val): + self["yaxes"] = val + + @property + def yhoverformat(self): + """ + Sets the hover text formatting rulefor `y` using d3 formatting + mini-languages which are very similar to those in Python. For + numbers, see: + https://github.com/d3/d3-format/tree/v1.4.5#d3-format. And for + dates see: https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format. We add two items to d3's date + formatter: "%h" for half of the year as a decimal number as + well as "%{n}f" for fractional seconds with n digits. For + example, *2016-10-13 09:15:23.456* with tickformat + "%H~%M~%S.%2f" would display *09~15~23.46*By default the values + are formatted using `yaxis.hoverformat`. + + The 'yhoverformat' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["yhoverformat"] + + @yhoverformat.setter + def yhoverformat(self, val): + self["yhoverformat"] = val + + @property + def type(self): + return self._props["type"] + + @property + def _prop_descriptions(self): + return """\ + customdata + Assigns extra data each datum. This may be useful when + listening to hover, click and selection events. Note + that, "scatter" traces also appends customdata items in + the markers DOM elements + customdatasrc + Sets the source reference on Chart Studio Cloud for + `customdata`. + diagonal + :class:`plotly.graph_objects.splom.Diagonal` instance + or dict with compatible properties + dimensions + A tuple of + :class:`plotly.graph_objects.splom.Dimension` instances + or dicts with compatible properties + dimensiondefaults + When used in a template (as + layout.template.data.splom.dimensiondefaults), sets the + default property values to use for elements of + splom.dimensions + hoverinfo + Determines which trace information appear on hover. If + `none` or `skip` are set, no information is displayed + upon hovering. But, if `none` is set, click and hover + events are still fired. + hoverinfosrc + Sets the source reference on Chart Studio Cloud for + `hoverinfo`. + hoverlabel + :class:`plotly.graph_objects.splom.Hoverlabel` instance + or dict with compatible properties + hovertemplate + Template string used for rendering the information that + appear on hover box. Note that this will override + `hoverinfo`. Variables are inserted using %{variable}, + for example "y: %{y}" as well as %{xother}, {%_xother}, + {%_xother_}, {%xother_}. When showing info for several + points, "xother" will be added to those with different + x positions from the first point. An underscore before + or after "(x|y)other" will add a space on that side, + only when this field is shown. Numbers are formatted + using d3-format's syntax %{variable:d3-format}, for + example "Price: %{y:$.2f}". + https://github.com/d3/d3-format/tree/v1.4.5#d3-format + for details on the formatting syntax. Dates are + formatted using d3-time-format's syntax + %{variable|d3-time-format}, for example "Day: + %{2019-01-01|%A}". https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format for details on the + date formatting syntax. Variables that can't be found + will be replaced with the specifier. For example, a + template of "data: %{x}, %{y}" will result in a value + of "data: 1, %{y}" if x is 1 and y is missing. + Variables with an undefined value will be replaced with + the fallback value. The variables available in + `hovertemplate` are the ones emitted as event data + described at this link + https://plotly.com/javascript/plotlyjs-events/#event- + data. Additionally, all attributes that can be + specified per-point (the ones that are `arrayOk: true`) + are available. Anything contained in tag `` is + displayed in the secondary box, for example + `%{fullData.name}`. To hide the + secondary box completely, use an empty tag + ``. + hovertemplatefallback + Fallback string that's displayed when a variable + referenced in a template is missing. If the boolean + value 'false' is passed in, the specifier with the + missing variable will be displayed. + hovertemplatesrc + Sets the source reference on Chart Studio Cloud for + `hovertemplate`. + hovertext + Same as `text`. + hovertextsrc + Sets the source reference on Chart Studio Cloud for + `hovertext`. + ids + Assigns id labels to each datum. These ids for object + constancy of data points during animation. Should be an + array of strings, not numbers or any other type. + idssrc + Sets the source reference on Chart Studio Cloud for + `ids`. + legend + Sets the reference to a legend to show this trace in. + References to these legends are "legend", "legend2", + "legend3", etc. Settings for these legends are set in + the layout, under `layout.legend`, `layout.legend2`, + etc. + legendgroup + Sets the legend group for this trace. Traces and shapes + part of the same legend group hide/show at the same + time when toggling legend items. + legendgrouptitle + :class:`plotly.graph_objects.splom.Legendgrouptitle` + instance or dict with compatible properties + legendrank + Sets the legend rank for this trace. Items and groups + with smaller ranks are presented on top/left side while + with "reversed" `legend.traceorder` they are on + bottom/right side. The default legendrank is 1000, so + that you can use ranks less than 1000 to place certain + items before all unranked items, and ranks greater than + 1000 to go after all unranked items. When having + unranked or equal rank items shapes would be displayed + after traces i.e. according to their order in data and + layout. + legendwidth + Sets the width (in px or fraction) of the legend for + this trace. + marker + :class:`plotly.graph_objects.splom.Marker` instance or + dict with compatible properties + meta + Assigns extra meta information associated with this + trace that can be used in various text attributes. + Attributes such as trace `name`, graph, axis and + colorbar `title.text`, annotation `text` + `rangeselector`, `updatemenues` and `sliders` `label` + text all support `meta`. To access the trace `meta` + values in an attribute in the same trace, simply use + `%{meta[i]}` where `i` is the index or key of the + `meta` item in question. To access trace `meta` in + layout attributes, use `%{data[n[.meta[i]}` where `i` + is the index or key of the `meta` and `n` is the trace + index. + metasrc + Sets the source reference on Chart Studio Cloud for + `meta`. + name + Sets the trace name. The trace name appears as the + legend item and on hover. + opacity + Sets the opacity of the trace. + selected + :class:`plotly.graph_objects.splom.Selected` instance + or dict with compatible properties + selectedpoints + Array containing integer indices of selected points. + Has an effect only for traces that support selections. + Note that an empty array means an empty selection where + the `unselected` are turned on for all points, whereas, + any other non-array values means no selection all where + the `selected` and `unselected` styles have no effect. + showlegend + Determines whether or not an item corresponding to this + trace is shown in the legend. + showlowerhalf + Determines whether or not subplots on the lower half + from the diagonal are displayed. + showupperhalf + Determines whether or not subplots on the upper half + from the diagonal are displayed. + stream + :class:`plotly.graph_objects.splom.Stream` instance or + dict with compatible properties + text + Sets text elements associated with each (x,y) pair to + appear on hover. If a single string, the same string + appears over all the data points. If an array of + string, the items are mapped in order to the this + trace's (x,y) coordinates. + textsrc + Sets the source reference on Chart Studio Cloud for + `text`. + uid + Assign an id to this trace, Use this to provide object + constancy between traces during animations and + transitions. + uirevision + Controls persistence of some user-driven changes to the + trace: `constraintrange` in `parcoords` traces, as well + as some `editable: true` modifications such as `name` + and `colorbar.title`. Defaults to `layout.uirevision`. + Note that other user-driven trace attribute changes are + controlled by `layout` attributes: `trace.visible` is + controlled by `layout.legend.uirevision`, + `selectedpoints` is controlled by + `layout.selectionrevision`, and `colorbar.(x|y)` + (accessible with `config: {editable: true}`) is + controlled by `layout.editrevision`. Trace changes are + tracked by `uid`, which only falls back on trace index + if no `uid` is provided. So if your app can add/remove + traces before the end of the `data` array, such that + the same trace has a different index, you can still + preserve user-driven changes if you give each trace a + `uid` that stays with it as it moves. + unselected + :class:`plotly.graph_objects.splom.Unselected` instance + or dict with compatible properties + visible + Determines whether or not this trace is visible. If + "legendonly", the trace is not drawn, but can appear as + a legend item (provided that the legend itself is + visible). + xaxes + Sets the list of x axes corresponding to dimensions of + this splom trace. By default, a splom will match the + first N xaxes where N is the number of input + dimensions. Note that, in case where `diagonal.visible` + is false and `showupperhalf` or `showlowerhalf` is + false, this splom trace will generate one less x-axis + and one less y-axis. + xhoverformat + Sets the hover text formatting rulefor `x` using d3 + formatting mini-languages which are very similar to + those in Python. For numbers, see: + https://github.com/d3/d3-format/tree/v1.4.5#d3-format. + And for dates see: https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format. We add two items to + d3's date formatter: "%h" for half of the year as a + decimal number as well as "%{n}f" for fractional + seconds with n digits. For example, *2016-10-13 + 09:15:23.456* with tickformat "%H~%M~%S.%2f" would + display *09~15~23.46*By default the values are + formatted using `xaxis.hoverformat`. + yaxes + Sets the list of y axes corresponding to dimensions of + this splom trace. By default, a splom will match the + first N yaxes where N is the number of input + dimensions. Note that, in case where `diagonal.visible` + is false and `showupperhalf` or `showlowerhalf` is + false, this splom trace will generate one less x-axis + and one less y-axis. + yhoverformat + Sets the hover text formatting rulefor `y` using d3 + formatting mini-languages which are very similar to + those in Python. For numbers, see: + https://github.com/d3/d3-format/tree/v1.4.5#d3-format. + And for dates see: https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format. We add two items to + d3's date formatter: "%h" for half of the year as a + decimal number as well as "%{n}f" for fractional + seconds with n digits. For example, *2016-10-13 + 09:15:23.456* with tickformat "%H~%M~%S.%2f" would + display *09~15~23.46*By default the values are + formatted using `yaxis.hoverformat`. + """ + + def __init__( + self, + arg=None, + customdata=None, + customdatasrc=None, + diagonal=None, + dimensions=None, + dimensiondefaults=None, + hoverinfo=None, + hoverinfosrc=None, + hoverlabel=None, + hovertemplate=None, + hovertemplatefallback=None, + hovertemplatesrc=None, + hovertext=None, + hovertextsrc=None, + ids=None, + idssrc=None, + legend=None, + legendgroup=None, + legendgrouptitle=None, + legendrank=None, + legendwidth=None, + marker=None, + meta=None, + metasrc=None, + name=None, + opacity=None, + selected=None, + selectedpoints=None, + showlegend=None, + showlowerhalf=None, + showupperhalf=None, + stream=None, + text=None, + textsrc=None, + uid=None, + uirevision=None, + unselected=None, + visible=None, + xaxes=None, + xhoverformat=None, + yaxes=None, + yhoverformat=None, + **kwargs, + ): + """ + Construct a new Splom object + + Splom traces generate scatter plot matrix visualizations. Each + splom `dimensions` items correspond to a generated axis. Values + for each of those dimensions are set in `dimensions[i].values`. + Splom traces support all `scattergl` marker style attributes. + Specify `layout.grid` attributes and/or layout x-axis and + y-axis attributes for more control over the axis positioning + and style. + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of :class:`plotly.graph_objs.Splom` + customdata + Assigns extra data each datum. This may be useful when + listening to hover, click and selection events. Note + that, "scatter" traces also appends customdata items in + the markers DOM elements + customdatasrc + Sets the source reference on Chart Studio Cloud for + `customdata`. + diagonal + :class:`plotly.graph_objects.splom.Diagonal` instance + or dict with compatible properties + dimensions + A tuple of + :class:`plotly.graph_objects.splom.Dimension` instances + or dicts with compatible properties + dimensiondefaults + When used in a template (as + layout.template.data.splom.dimensiondefaults), sets the + default property values to use for elements of + splom.dimensions + hoverinfo + Determines which trace information appear on hover. If + `none` or `skip` are set, no information is displayed + upon hovering. But, if `none` is set, click and hover + events are still fired. + hoverinfosrc + Sets the source reference on Chart Studio Cloud for + `hoverinfo`. + hoverlabel + :class:`plotly.graph_objects.splom.Hoverlabel` instance + or dict with compatible properties + hovertemplate + Template string used for rendering the information that + appear on hover box. Note that this will override + `hoverinfo`. Variables are inserted using %{variable}, + for example "y: %{y}" as well as %{xother}, {%_xother}, + {%_xother_}, {%xother_}. When showing info for several + points, "xother" will be added to those with different + x positions from the first point. An underscore before + or after "(x|y)other" will add a space on that side, + only when this field is shown. Numbers are formatted + using d3-format's syntax %{variable:d3-format}, for + example "Price: %{y:$.2f}". + https://github.com/d3/d3-format/tree/v1.4.5#d3-format + for details on the formatting syntax. Dates are + formatted using d3-time-format's syntax + %{variable|d3-time-format}, for example "Day: + %{2019-01-01|%A}". https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format for details on the + date formatting syntax. Variables that can't be found + will be replaced with the specifier. For example, a + template of "data: %{x}, %{y}" will result in a value + of "data: 1, %{y}" if x is 1 and y is missing. + Variables with an undefined value will be replaced with + the fallback value. The variables available in + `hovertemplate` are the ones emitted as event data + described at this link + https://plotly.com/javascript/plotlyjs-events/#event- + data. Additionally, all attributes that can be + specified per-point (the ones that are `arrayOk: true`) + are available. Anything contained in tag `` is + displayed in the secondary box, for example + `%{fullData.name}`. To hide the + secondary box completely, use an empty tag + ``. + hovertemplatefallback + Fallback string that's displayed when a variable + referenced in a template is missing. If the boolean + value 'false' is passed in, the specifier with the + missing variable will be displayed. + hovertemplatesrc + Sets the source reference on Chart Studio Cloud for + `hovertemplate`. + hovertext + Same as `text`. + hovertextsrc + Sets the source reference on Chart Studio Cloud for + `hovertext`. + ids + Assigns id labels to each datum. These ids for object + constancy of data points during animation. Should be an + array of strings, not numbers or any other type. + idssrc + Sets the source reference on Chart Studio Cloud for + `ids`. + legend + Sets the reference to a legend to show this trace in. + References to these legends are "legend", "legend2", + "legend3", etc. Settings for these legends are set in + the layout, under `layout.legend`, `layout.legend2`, + etc. + legendgroup + Sets the legend group for this trace. Traces and shapes + part of the same legend group hide/show at the same + time when toggling legend items. + legendgrouptitle + :class:`plotly.graph_objects.splom.Legendgrouptitle` + instance or dict with compatible properties + legendrank + Sets the legend rank for this trace. Items and groups + with smaller ranks are presented on top/left side while + with "reversed" `legend.traceorder` they are on + bottom/right side. The default legendrank is 1000, so + that you can use ranks less than 1000 to place certain + items before all unranked items, and ranks greater than + 1000 to go after all unranked items. When having + unranked or equal rank items shapes would be displayed + after traces i.e. according to their order in data and + layout. + legendwidth + Sets the width (in px or fraction) of the legend for + this trace. + marker + :class:`plotly.graph_objects.splom.Marker` instance or + dict with compatible properties + meta + Assigns extra meta information associated with this + trace that can be used in various text attributes. + Attributes such as trace `name`, graph, axis and + colorbar `title.text`, annotation `text` + `rangeselector`, `updatemenues` and `sliders` `label` + text all support `meta`. To access the trace `meta` + values in an attribute in the same trace, simply use + `%{meta[i]}` where `i` is the index or key of the + `meta` item in question. To access trace `meta` in + layout attributes, use `%{data[n[.meta[i]}` where `i` + is the index or key of the `meta` and `n` is the trace + index. + metasrc + Sets the source reference on Chart Studio Cloud for + `meta`. + name + Sets the trace name. The trace name appears as the + legend item and on hover. + opacity + Sets the opacity of the trace. + selected + :class:`plotly.graph_objects.splom.Selected` instance + or dict with compatible properties + selectedpoints + Array containing integer indices of selected points. + Has an effect only for traces that support selections. + Note that an empty array means an empty selection where + the `unselected` are turned on for all points, whereas, + any other non-array values means no selection all where + the `selected` and `unselected` styles have no effect. + showlegend + Determines whether or not an item corresponding to this + trace is shown in the legend. + showlowerhalf + Determines whether or not subplots on the lower half + from the diagonal are displayed. + showupperhalf + Determines whether or not subplots on the upper half + from the diagonal are displayed. + stream + :class:`plotly.graph_objects.splom.Stream` instance or + dict with compatible properties + text + Sets text elements associated with each (x,y) pair to + appear on hover. If a single string, the same string + appears over all the data points. If an array of + string, the items are mapped in order to the this + trace's (x,y) coordinates. + textsrc + Sets the source reference on Chart Studio Cloud for + `text`. + uid + Assign an id to this trace, Use this to provide object + constancy between traces during animations and + transitions. + uirevision + Controls persistence of some user-driven changes to the + trace: `constraintrange` in `parcoords` traces, as well + as some `editable: true` modifications such as `name` + and `colorbar.title`. Defaults to `layout.uirevision`. + Note that other user-driven trace attribute changes are + controlled by `layout` attributes: `trace.visible` is + controlled by `layout.legend.uirevision`, + `selectedpoints` is controlled by + `layout.selectionrevision`, and `colorbar.(x|y)` + (accessible with `config: {editable: true}`) is + controlled by `layout.editrevision`. Trace changes are + tracked by `uid`, which only falls back on trace index + if no `uid` is provided. So if your app can add/remove + traces before the end of the `data` array, such that + the same trace has a different index, you can still + preserve user-driven changes if you give each trace a + `uid` that stays with it as it moves. + unselected + :class:`plotly.graph_objects.splom.Unselected` instance + or dict with compatible properties + visible + Determines whether or not this trace is visible. If + "legendonly", the trace is not drawn, but can appear as + a legend item (provided that the legend itself is + visible). + xaxes + Sets the list of x axes corresponding to dimensions of + this splom trace. By default, a splom will match the + first N xaxes where N is the number of input + dimensions. Note that, in case where `diagonal.visible` + is false and `showupperhalf` or `showlowerhalf` is + false, this splom trace will generate one less x-axis + and one less y-axis. + xhoverformat + Sets the hover text formatting rulefor `x` using d3 + formatting mini-languages which are very similar to + those in Python. For numbers, see: + https://github.com/d3/d3-format/tree/v1.4.5#d3-format. + And for dates see: https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format. We add two items to + d3's date formatter: "%h" for half of the year as a + decimal number as well as "%{n}f" for fractional + seconds with n digits. For example, *2016-10-13 + 09:15:23.456* with tickformat "%H~%M~%S.%2f" would + display *09~15~23.46*By default the values are + formatted using `xaxis.hoverformat`. + yaxes + Sets the list of y axes corresponding to dimensions of + this splom trace. By default, a splom will match the + first N yaxes where N is the number of input + dimensions. Note that, in case where `diagonal.visible` + is false and `showupperhalf` or `showlowerhalf` is + false, this splom trace will generate one less x-axis + and one less y-axis. + yhoverformat + Sets the hover text formatting rulefor `y` using d3 + formatting mini-languages which are very similar to + those in Python. For numbers, see: + https://github.com/d3/d3-format/tree/v1.4.5#d3-format. + And for dates see: https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format. We add two items to + d3's date formatter: "%h" for half of the year as a + decimal number as well as "%{n}f" for fractional + seconds with n digits. For example, *2016-10-13 + 09:15:23.456* with tickformat "%H~%M~%S.%2f" would + display *09~15~23.46*By default the values are + formatted using `yaxis.hoverformat`. + + Returns + ------- + Splom + """ + super().__init__("splom") + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + if arg is None: + arg = {} + elif isinstance(arg, self.__class__): + arg = arg.to_plotly_json() + elif isinstance(arg, dict): + arg = _copy.copy(arg) + else: + raise ValueError("""\ +The first argument to the plotly.graph_objs.Splom +constructor must be a dict or +an instance of :class:`plotly.graph_objs.Splom`""") + + self._skip_invalid = kwargs.pop("skip_invalid", False) + self._validate = kwargs.pop("_validate", True) + + self._set_property("customdata", arg, customdata) + self._set_property("customdatasrc", arg, customdatasrc) + self._set_property("diagonal", arg, diagonal) + self._set_property("dimensions", arg, dimensions) + self._set_property("dimensiondefaults", arg, dimensiondefaults) + self._set_property("hoverinfo", arg, hoverinfo) + self._set_property("hoverinfosrc", arg, hoverinfosrc) + self._set_property("hoverlabel", arg, hoverlabel) + self._set_property("hovertemplate", arg, hovertemplate) + self._set_property("hovertemplatefallback", arg, hovertemplatefallback) + self._set_property("hovertemplatesrc", arg, hovertemplatesrc) + self._set_property("hovertext", arg, hovertext) + self._set_property("hovertextsrc", arg, hovertextsrc) + self._set_property("ids", arg, ids) + self._set_property("idssrc", arg, idssrc) + self._set_property("legend", arg, legend) + self._set_property("legendgroup", arg, legendgroup) + self._set_property("legendgrouptitle", arg, legendgrouptitle) + self._set_property("legendrank", arg, legendrank) + self._set_property("legendwidth", arg, legendwidth) + self._set_property("marker", arg, marker) + self._set_property("meta", arg, meta) + self._set_property("metasrc", arg, metasrc) + self._set_property("name", arg, name) + self._set_property("opacity", arg, opacity) + self._set_property("selected", arg, selected) + self._set_property("selectedpoints", arg, selectedpoints) + self._set_property("showlegend", arg, showlegend) + self._set_property("showlowerhalf", arg, showlowerhalf) + self._set_property("showupperhalf", arg, showupperhalf) + self._set_property("stream", arg, stream) + self._set_property("text", arg, text) + self._set_property("textsrc", arg, textsrc) + self._set_property("uid", arg, uid) + self._set_property("uirevision", arg, uirevision) + self._set_property("unselected", arg, unselected) + self._set_property("visible", arg, visible) + self._set_property("xaxes", arg, xaxes) + self._set_property("xhoverformat", arg, xhoverformat) + self._set_property("yaxes", arg, yaxes) + self._set_property("yhoverformat", arg, yhoverformat) + + self._props["type"] = "splom" + arg.pop("type", None) + self._process_kwargs(**dict(arg, **kwargs)) + self._skip_invalid = False diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/_streamtube.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/_streamtube.py new file mode 100644 index 0000000000000000000000000000000000000000..fe6bd78ffd7228dd187b109051ddc8274ea1a7ed --- /dev/null +++ b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/_streamtube.py @@ -0,0 +1,2214 @@ +# --- THIS FILE IS AUTO-GENERATED --- +# Modifications will be overwitten the next time code generation run. + +from plotly.basedatatypes import BaseTraceType as _BaseTraceType +import copy as _copy + + +class Streamtube(_BaseTraceType): + _parent_path_str = "" + _path_str = "streamtube" + _valid_props = { + "autocolorscale", + "cauto", + "cmax", + "cmid", + "cmin", + "coloraxis", + "colorbar", + "colorscale", + "customdata", + "customdatasrc", + "hoverinfo", + "hoverinfosrc", + "hoverlabel", + "hovertemplate", + "hovertemplatefallback", + "hovertemplatesrc", + "hovertext", + "ids", + "idssrc", + "legend", + "legendgroup", + "legendgrouptitle", + "legendrank", + "legendwidth", + "lighting", + "lightposition", + "maxdisplayed", + "meta", + "metasrc", + "name", + "opacity", + "reversescale", + "scene", + "showlegend", + "showscale", + "sizeref", + "starts", + "stream", + "text", + "type", + "u", + "uhoverformat", + "uid", + "uirevision", + "usrc", + "v", + "vhoverformat", + "visible", + "vsrc", + "w", + "whoverformat", + "wsrc", + "x", + "xhoverformat", + "xsrc", + "y", + "yhoverformat", + "ysrc", + "z", + "zhoverformat", + "zsrc", + } + + @property + def autocolorscale(self): + """ + Determines whether the colorscale is a default palette + (`autocolorscale: true`) or the palette determined by + `colorscale`. In case `colorscale` is unspecified or + `autocolorscale` is true, the default palette will be chosen + according to whether numbers in the `color` array are all + positive, all negative or mixed. + + The 'autocolorscale' property is a boolean and must be specified as: + - A boolean value: True or False + + Returns + ------- + bool + """ + return self["autocolorscale"] + + @autocolorscale.setter + def autocolorscale(self, val): + self["autocolorscale"] = val + + @property + def cauto(self): + """ + Determines whether or not the color domain is computed with + respect to the input data (here u/v/w norm) or the bounds set + in `cmin` and `cmax` Defaults to `false` when `cmin` and `cmax` + are set by the user. + + The 'cauto' property is a boolean and must be specified as: + - A boolean value: True or False + + Returns + ------- + bool + """ + return self["cauto"] + + @cauto.setter + def cauto(self, val): + self["cauto"] = val + + @property + def cmax(self): + """ + Sets the upper bound of the color domain. Value should have the + same units as u/v/w norm and if set, `cmin` must be set as + well. + + The 'cmax' property is a number and may be specified as: + - An int or float + + Returns + ------- + int|float + """ + return self["cmax"] + + @cmax.setter + def cmax(self, val): + self["cmax"] = val + + @property + def cmid(self): + """ + Sets the mid-point of the color domain by scaling `cmin` and/or + `cmax` to be equidistant to this point. Value should have the + same units as u/v/w norm. Has no effect when `cauto` is + `false`. + + The 'cmid' property is a number and may be specified as: + - An int or float + + Returns + ------- + int|float + """ + return self["cmid"] + + @cmid.setter + def cmid(self, val): + self["cmid"] = val + + @property + def cmin(self): + """ + Sets the lower bound of the color domain. Value should have the + same units as u/v/w norm and if set, `cmax` must be set as + well. + + The 'cmin' property is a number and may be specified as: + - An int or float + + Returns + ------- + int|float + """ + return self["cmin"] + + @cmin.setter + def cmin(self, val): + self["cmin"] = val + + @property + def coloraxis(self): + """ + Sets a reference to a shared color axis. References to these + shared color axes are "coloraxis", "coloraxis2", "coloraxis3", + etc. Settings for these shared color axes are set in the + layout, under `layout.coloraxis`, `layout.coloraxis2`, etc. + Note that multiple color scales can be linked to the same color + axis. + + The 'coloraxis' property is an identifier of a particular + subplot, of type 'coloraxis', that may be specified as: + - the string 'coloraxis' optionally followed by an integer >= 1 + (e.g. 'coloraxis', 'coloraxis1', 'coloraxis2', 'coloraxis3', etc.) + + Returns + ------- + str + """ + return self["coloraxis"] + + @coloraxis.setter + def coloraxis(self, val): + self["coloraxis"] = val + + @property + def colorbar(self): + """ + The 'colorbar' property is an instance of ColorBar + that may be specified as: + - An instance of :class:`plotly.graph_objs.streamtube.ColorBar` + - A dict of string/value properties that will be passed + to the ColorBar constructor + + Returns + ------- + plotly.graph_objs.streamtube.ColorBar + """ + return self["colorbar"] + + @colorbar.setter + def colorbar(self, val): + self["colorbar"] = val + + @property + def colorscale(self): + """ + Sets the colorscale. The colorscale must be an array containing + arrays mapping a normalized value to an rgb, rgba, hex, hsl, + hsv, or named color string. At minimum, a mapping for the + lowest (0) and highest (1) values are required. For example, + `[[0, 'rgb(0,0,255)'], [1, 'rgb(255,0,0)']]`. To control the + bounds of the colorscale in color space, use `cmin` and `cmax`. + Alternatively, `colorscale` may be a palette name string of the + following list: Blackbody,Bluered,Blues,Cividis,Earth,Electric, + Greens,Greys,Hot,Jet,Picnic,Portland,Rainbow,RdBu,Reds,Viridis, + YlGnBu,YlOrRd. + + The 'colorscale' property is a colorscale and may be + specified as: + - A list of colors that will be spaced evenly to create the colorscale. + Many predefined colorscale lists are included in the sequential, diverging, + and cyclical modules in the plotly.colors package. + - A list of 2-element lists where the first element is the + normalized color level value (starting at 0 and ending at 1), + and the second item is a valid color string. + (e.g. [[0, 'green'], [0.5, 'red'], [1.0, 'rgb(0, 0, 255)']]) + - One of the following named colorscales: + ['aggrnyl', 'agsunset', 'algae', 'amp', 'armyrose', 'balance', + 'blackbody', 'bluered', 'blues', 'blugrn', 'bluyl', 'brbg', + 'brwnyl', 'bugn', 'bupu', 'burg', 'burgyl', 'cividis', 'curl', + 'darkmint', 'deep', 'delta', 'dense', 'earth', 'edge', 'electric', + 'emrld', 'fall', 'geyser', 'gnbu', 'gray', 'greens', 'greys', + 'haline', 'hot', 'hsv', 'ice', 'icefire', 'inferno', 'jet', + 'magenta', 'magma', 'matter', 'mint', 'mrybm', 'mygbm', 'oranges', + 'orrd', 'oryel', 'oxy', 'peach', 'phase', 'picnic', 'pinkyl', + 'piyg', 'plasma', 'plotly3', 'portland', 'prgn', 'pubu', 'pubugn', + 'puor', 'purd', 'purp', 'purples', 'purpor', 'rainbow', 'rdbu', + 'rdgy', 'rdpu', 'rdylbu', 'rdylgn', 'redor', 'reds', 'solar', + 'spectral', 'speed', 'sunset', 'sunsetdark', 'teal', 'tealgrn', + 'tealrose', 'tempo', 'temps', 'thermal', 'tropic', 'turbid', + 'turbo', 'twilight', 'viridis', 'ylgn', 'ylgnbu', 'ylorbr', + 'ylorrd']. + Appending '_r' to a named colorscale reverses it. + + Returns + ------- + str + """ + return self["colorscale"] + + @colorscale.setter + def colorscale(self, val): + self["colorscale"] = val + + @property + def customdata(self): + """ + Assigns extra data each datum. This may be useful when + listening to hover, click and selection events. Note that, + "scatter" traces also appends customdata items in the markers + DOM elements + + The 'customdata' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["customdata"] + + @customdata.setter + def customdata(self, val): + self["customdata"] = val + + @property + def customdatasrc(self): + """ + Sets the source reference on Chart Studio Cloud for + `customdata`. + + The 'customdatasrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["customdatasrc"] + + @customdatasrc.setter + def customdatasrc(self, val): + self["customdatasrc"] = val + + @property + def hoverinfo(self): + """ + Determines which trace information appear on hover. If `none` + or `skip` are set, no information is displayed upon hovering. + But, if `none` is set, click and hover events are still fired. + + The 'hoverinfo' property is a flaglist and may be specified + as a string containing: + - Any combination of ['x', 'y', 'z', 'u', 'v', 'w', 'norm', 'divergence', 'text', 'name'] joined with '+' characters + (e.g. 'x+y') + OR exactly one of ['all', 'none', 'skip'] (e.g. 'skip') + - A list or array of the above + + Returns + ------- + Any|numpy.ndarray + """ + return self["hoverinfo"] + + @hoverinfo.setter + def hoverinfo(self, val): + self["hoverinfo"] = val + + @property + def hoverinfosrc(self): + """ + Sets the source reference on Chart Studio Cloud for + `hoverinfo`. + + The 'hoverinfosrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["hoverinfosrc"] + + @hoverinfosrc.setter + def hoverinfosrc(self, val): + self["hoverinfosrc"] = val + + @property + def hoverlabel(self): + """ + The 'hoverlabel' property is an instance of Hoverlabel + that may be specified as: + - An instance of :class:`plotly.graph_objs.streamtube.Hoverlabel` + - A dict of string/value properties that will be passed + to the Hoverlabel constructor + + Returns + ------- + plotly.graph_objs.streamtube.Hoverlabel + """ + return self["hoverlabel"] + + @hoverlabel.setter + def hoverlabel(self, val): + self["hoverlabel"] = val + + @property + def hovertemplate(self): + """ + Template string used for rendering the information that appear + on hover box. Note that this will override `hoverinfo`. + Variables are inserted using %{variable}, for example "y: %{y}" + as well as %{xother}, {%_xother}, {%_xother_}, {%xother_}. When + showing info for several points, "xother" will be added to + those with different x positions from the first point. An + underscore before or after "(x|y)other" will add a space on + that side, only when this field is shown. Numbers are formatted + using d3-format's syntax %{variable:d3-format}, for example + "Price: %{y:$.2f}". + https://github.com/d3/d3-format/tree/v1.4.5#d3-format for + details on the formatting syntax. Dates are formatted using + d3-time-format's syntax %{variable|d3-time-format}, for example + "Day: %{2019-01-01|%A}". https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format for details on the date + formatting syntax. Variables that can't be found will be + replaced with the specifier. For example, a template of "data: + %{x}, %{y}" will result in a value of "data: 1, %{y}" if x is 1 + and y is missing. Variables with an undefined value will be + replaced with the fallback value. The variables available in + `hovertemplate` are the ones emitted as event data described at + this link https://plotly.com/javascript/plotlyjs-events/#event- + data. Additionally, all attributes that can be specified per- + point (the ones that are `arrayOk: true`) are available. + Finally, the template string has access to variables `tubex`, + `tubey`, `tubez`, `tubeu`, `tubev`, `tubew`, `norm` and + `divergence`. Anything contained in tag `` is displayed + in the secondary box, for example + `%{fullData.name}`. To hide the secondary box + completely, use an empty tag ``. + + The 'hovertemplate' property is a string and must be specified as: + - A string + - A number that will be converted to a string + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["hovertemplate"] + + @hovertemplate.setter + def hovertemplate(self, val): + self["hovertemplate"] = val + + @property + def hovertemplatefallback(self): + """ + Fallback string that's displayed when a variable referenced in + a template is missing. If the boolean value 'false' is passed + in, the specifier with the missing variable will be displayed. + + The 'hovertemplatefallback' property accepts values of any type + + Returns + ------- + Any + """ + return self["hovertemplatefallback"] + + @hovertemplatefallback.setter + def hovertemplatefallback(self, val): + self["hovertemplatefallback"] = val + + @property + def hovertemplatesrc(self): + """ + Sets the source reference on Chart Studio Cloud for + `hovertemplate`. + + The 'hovertemplatesrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["hovertemplatesrc"] + + @hovertemplatesrc.setter + def hovertemplatesrc(self, val): + self["hovertemplatesrc"] = val + + @property + def hovertext(self): + """ + Same as `text`. + + The 'hovertext' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["hovertext"] + + @hovertext.setter + def hovertext(self, val): + self["hovertext"] = val + + @property + def ids(self): + """ + Assigns id labels to each datum. These ids for object constancy + of data points during animation. Should be an array of strings, + not numbers or any other type. + + The 'ids' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["ids"] + + @ids.setter + def ids(self, val): + self["ids"] = val + + @property + def idssrc(self): + """ + Sets the source reference on Chart Studio Cloud for `ids`. + + The 'idssrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["idssrc"] + + @idssrc.setter + def idssrc(self, val): + self["idssrc"] = val + + @property + def legend(self): + """ + Sets the reference to a legend to show this trace in. + References to these legends are "legend", "legend2", "legend3", + etc. Settings for these legends are set in the layout, under + `layout.legend`, `layout.legend2`, etc. + + The 'legend' property is an identifier of a particular + subplot, of type 'legend', that may be specified as: + - the string 'legend' optionally followed by an integer >= 1 + (e.g. 'legend', 'legend1', 'legend2', 'legend3', etc.) + + Returns + ------- + str + """ + return self["legend"] + + @legend.setter + def legend(self, val): + self["legend"] = val + + @property + def legendgroup(self): + """ + Sets the legend group for this trace. Traces and shapes part of + the same legend group hide/show at the same time when toggling + legend items. + + The 'legendgroup' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["legendgroup"] + + @legendgroup.setter + def legendgroup(self, val): + self["legendgroup"] = val + + @property + def legendgrouptitle(self): + """ + The 'legendgrouptitle' property is an instance of Legendgrouptitle + that may be specified as: + - An instance of :class:`plotly.graph_objs.streamtube.Legendgrouptitle` + - A dict of string/value properties that will be passed + to the Legendgrouptitle constructor + + Returns + ------- + plotly.graph_objs.streamtube.Legendgrouptitle + """ + return self["legendgrouptitle"] + + @legendgrouptitle.setter + def legendgrouptitle(self, val): + self["legendgrouptitle"] = val + + @property + def legendrank(self): + """ + Sets the legend rank for this trace. Items and groups with + smaller ranks are presented on top/left side while with + "reversed" `legend.traceorder` they are on bottom/right side. + The default legendrank is 1000, so that you can use ranks less + than 1000 to place certain items before all unranked items, and + ranks greater than 1000 to go after all unranked items. When + having unranked or equal rank items shapes would be displayed + after traces i.e. according to their order in data and layout. + + The 'legendrank' property is a number and may be specified as: + - An int or float + + Returns + ------- + int|float + """ + return self["legendrank"] + + @legendrank.setter + def legendrank(self, val): + self["legendrank"] = val + + @property + def legendwidth(self): + """ + Sets the width (in px or fraction) of the legend for this + trace. + + The 'legendwidth' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["legendwidth"] + + @legendwidth.setter + def legendwidth(self, val): + self["legendwidth"] = val + + @property + def lighting(self): + """ + The 'lighting' property is an instance of Lighting + that may be specified as: + - An instance of :class:`plotly.graph_objs.streamtube.Lighting` + - A dict of string/value properties that will be passed + to the Lighting constructor + + Returns + ------- + plotly.graph_objs.streamtube.Lighting + """ + return self["lighting"] + + @lighting.setter + def lighting(self, val): + self["lighting"] = val + + @property + def lightposition(self): + """ + The 'lightposition' property is an instance of Lightposition + that may be specified as: + - An instance of :class:`plotly.graph_objs.streamtube.Lightposition` + - A dict of string/value properties that will be passed + to the Lightposition constructor + + Returns + ------- + plotly.graph_objs.streamtube.Lightposition + """ + return self["lightposition"] + + @lightposition.setter + def lightposition(self, val): + self["lightposition"] = val + + @property + def maxdisplayed(self): + """ + The maximum number of displayed segments in a streamtube. + + The 'maxdisplayed' property is a integer and may be specified as: + - An int (or float that will be cast to an int) + in the interval [0, 9223372036854775807] + + Returns + ------- + int + """ + return self["maxdisplayed"] + + @maxdisplayed.setter + def maxdisplayed(self, val): + self["maxdisplayed"] = val + + @property + def meta(self): + """ + Assigns extra meta information associated with this trace that + can be used in various text attributes. Attributes such as + trace `name`, graph, axis and colorbar `title.text`, annotation + `text` `rangeselector`, `updatemenues` and `sliders` `label` + text all support `meta`. To access the trace `meta` values in + an attribute in the same trace, simply use `%{meta[i]}` where + `i` is the index or key of the `meta` item in question. To + access trace `meta` in layout attributes, use + `%{data[n[.meta[i]}` where `i` is the index or key of the + `meta` and `n` is the trace index. + + The 'meta' property accepts values of any type + + Returns + ------- + Any|numpy.ndarray + """ + return self["meta"] + + @meta.setter + def meta(self, val): + self["meta"] = val + + @property + def metasrc(self): + """ + Sets the source reference on Chart Studio Cloud for `meta`. + + The 'metasrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["metasrc"] + + @metasrc.setter + def metasrc(self, val): + self["metasrc"] = val + + @property + def name(self): + """ + Sets the trace name. The trace name appears as the legend item + and on hover. + + The 'name' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["name"] + + @name.setter + def name(self, val): + self["name"] = val + + @property + def opacity(self): + """ + Sets the opacity of the surface. Please note that in the case + of using high `opacity` values for example a value greater than + or equal to 0.5 on two surfaces (and 0.25 with four surfaces), + an overlay of multiple transparent surfaces may not perfectly + be sorted in depth by the webgl API. This behavior may be + improved in the near future and is subject to change. + + The 'opacity' property is a number and may be specified as: + - An int or float in the interval [0, 1] + + Returns + ------- + int|float + """ + return self["opacity"] + + @opacity.setter + def opacity(self, val): + self["opacity"] = val + + @property + def reversescale(self): + """ + Reverses the color mapping if true. If true, `cmin` will + correspond to the last color in the array and `cmax` will + correspond to the first color. + + The 'reversescale' property is a boolean and must be specified as: + - A boolean value: True or False + + Returns + ------- + bool + """ + return self["reversescale"] + + @reversescale.setter + def reversescale(self, val): + self["reversescale"] = val + + @property + def scene(self): + """ + Sets a reference between this trace's 3D coordinate system and + a 3D scene. If "scene" (the default value), the (x,y,z) + coordinates refer to `layout.scene`. If "scene2", the (x,y,z) + coordinates refer to `layout.scene2`, and so on. + + The 'scene' property is an identifier of a particular + subplot, of type 'scene', that may be specified as: + - the string 'scene' optionally followed by an integer >= 1 + (e.g. 'scene', 'scene1', 'scene2', 'scene3', etc.) + + Returns + ------- + str + """ + return self["scene"] + + @scene.setter + def scene(self, val): + self["scene"] = val + + @property + def showlegend(self): + """ + Determines whether or not an item corresponding to this trace + is shown in the legend. + + The 'showlegend' property is a boolean and must be specified as: + - A boolean value: True or False + + Returns + ------- + bool + """ + return self["showlegend"] + + @showlegend.setter + def showlegend(self, val): + self["showlegend"] = val + + @property + def showscale(self): + """ + Determines whether or not a colorbar is displayed for this + trace. + + The 'showscale' property is a boolean and must be specified as: + - A boolean value: True or False + + Returns + ------- + bool + """ + return self["showscale"] + + @showscale.setter + def showscale(self, val): + self["showscale"] = val + + @property + def sizeref(self): + """ + The scaling factor for the streamtubes. The default is 1, which + avoids two max divergence tubes from touching at adjacent + starting positions. + + The 'sizeref' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["sizeref"] + + @sizeref.setter + def sizeref(self, val): + self["sizeref"] = val + + @property + def starts(self): + """ + The 'starts' property is an instance of Starts + that may be specified as: + - An instance of :class:`plotly.graph_objs.streamtube.Starts` + - A dict of string/value properties that will be passed + to the Starts constructor + + Returns + ------- + plotly.graph_objs.streamtube.Starts + """ + return self["starts"] + + @starts.setter + def starts(self, val): + self["starts"] = val + + @property + def stream(self): + """ + The 'stream' property is an instance of Stream + that may be specified as: + - An instance of :class:`plotly.graph_objs.streamtube.Stream` + - A dict of string/value properties that will be passed + to the Stream constructor + + Returns + ------- + plotly.graph_objs.streamtube.Stream + """ + return self["stream"] + + @stream.setter + def stream(self, val): + self["stream"] = val + + @property + def text(self): + """ + Sets a text element associated with this trace. If trace + `hoverinfo` contains a "text" flag, this text element will be + seen in all hover labels. Note that streamtube traces do not + support array `text` values. + + The 'text' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["text"] + + @text.setter + def text(self, val): + self["text"] = val + + @property + def u(self): + """ + Sets the x components of the vector field. + + The 'u' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["u"] + + @u.setter + def u(self, val): + self["u"] = val + + @property + def uhoverformat(self): + """ + Sets the hover text formatting rulefor `u` using d3 formatting + mini-languages which are very similar to those in Python. For + numbers, see: + https://github.com/d3/d3-format/tree/v1.4.5#d3-format.By + default the values are formatted using generic number format. + + The 'uhoverformat' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["uhoverformat"] + + @uhoverformat.setter + def uhoverformat(self, val): + self["uhoverformat"] = val + + @property + def uid(self): + """ + Assign an id to this trace, Use this to provide object + constancy between traces during animations and transitions. + + The 'uid' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["uid"] + + @uid.setter + def uid(self, val): + self["uid"] = val + + @property + def uirevision(self): + """ + Controls persistence of some user-driven changes to the trace: + `constraintrange` in `parcoords` traces, as well as some + `editable: true` modifications such as `name` and + `colorbar.title`. Defaults to `layout.uirevision`. Note that + other user-driven trace attribute changes are controlled by + `layout` attributes: `trace.visible` is controlled by + `layout.legend.uirevision`, `selectedpoints` is controlled by + `layout.selectionrevision`, and `colorbar.(x|y)` (accessible + with `config: {editable: true}`) is controlled by + `layout.editrevision`. Trace changes are tracked by `uid`, + which only falls back on trace index if no `uid` is provided. + So if your app can add/remove traces before the end of the + `data` array, such that the same trace has a different index, + you can still preserve user-driven changes if you give each + trace a `uid` that stays with it as it moves. + + The 'uirevision' property accepts values of any type + + Returns + ------- + Any + """ + return self["uirevision"] + + @uirevision.setter + def uirevision(self, val): + self["uirevision"] = val + + @property + def usrc(self): + """ + Sets the source reference on Chart Studio Cloud for `u`. + + The 'usrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["usrc"] + + @usrc.setter + def usrc(self, val): + self["usrc"] = val + + @property + def v(self): + """ + Sets the y components of the vector field. + + The 'v' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["v"] + + @v.setter + def v(self, val): + self["v"] = val + + @property + def vhoverformat(self): + """ + Sets the hover text formatting rulefor `v` using d3 formatting + mini-languages which are very similar to those in Python. For + numbers, see: + https://github.com/d3/d3-format/tree/v1.4.5#d3-format.By + default the values are formatted using generic number format. + + The 'vhoverformat' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["vhoverformat"] + + @vhoverformat.setter + def vhoverformat(self, val): + self["vhoverformat"] = val + + @property + def visible(self): + """ + Determines whether or not this trace is visible. If + "legendonly", the trace is not drawn, but can appear as a + legend item (provided that the legend itself is visible). + + The 'visible' property is an enumeration that may be specified as: + - One of the following enumeration values: + [True, False, 'legendonly'] + + Returns + ------- + Any + """ + return self["visible"] + + @visible.setter + def visible(self, val): + self["visible"] = val + + @property + def vsrc(self): + """ + Sets the source reference on Chart Studio Cloud for `v`. + + The 'vsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["vsrc"] + + @vsrc.setter + def vsrc(self, val): + self["vsrc"] = val + + @property + def w(self): + """ + Sets the z components of the vector field. + + The 'w' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["w"] + + @w.setter + def w(self, val): + self["w"] = val + + @property + def whoverformat(self): + """ + Sets the hover text formatting rulefor `w` using d3 formatting + mini-languages which are very similar to those in Python. For + numbers, see: + https://github.com/d3/d3-format/tree/v1.4.5#d3-format.By + default the values are formatted using generic number format. + + The 'whoverformat' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["whoverformat"] + + @whoverformat.setter + def whoverformat(self, val): + self["whoverformat"] = val + + @property + def wsrc(self): + """ + Sets the source reference on Chart Studio Cloud for `w`. + + The 'wsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["wsrc"] + + @wsrc.setter + def wsrc(self, val): + self["wsrc"] = val + + @property + def x(self): + """ + Sets the x coordinates of the vector field. + + The 'x' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["x"] + + @x.setter + def x(self, val): + self["x"] = val + + @property + def xhoverformat(self): + """ + Sets the hover text formatting rulefor `x` using d3 formatting + mini-languages which are very similar to those in Python. For + numbers, see: + https://github.com/d3/d3-format/tree/v1.4.5#d3-format. And for + dates see: https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format. We add two items to d3's date + formatter: "%h" for half of the year as a decimal number as + well as "%{n}f" for fractional seconds with n digits. For + example, *2016-10-13 09:15:23.456* with tickformat + "%H~%M~%S.%2f" would display *09~15~23.46*By default the values + are formatted using `xaxis.hoverformat`. + + The 'xhoverformat' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["xhoverformat"] + + @xhoverformat.setter + def xhoverformat(self, val): + self["xhoverformat"] = val + + @property + def xsrc(self): + """ + Sets the source reference on Chart Studio Cloud for `x`. + + The 'xsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["xsrc"] + + @xsrc.setter + def xsrc(self, val): + self["xsrc"] = val + + @property + def y(self): + """ + Sets the y coordinates of the vector field. + + The 'y' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["y"] + + @y.setter + def y(self, val): + self["y"] = val + + @property + def yhoverformat(self): + """ + Sets the hover text formatting rulefor `y` using d3 formatting + mini-languages which are very similar to those in Python. For + numbers, see: + https://github.com/d3/d3-format/tree/v1.4.5#d3-format. And for + dates see: https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format. We add two items to d3's date + formatter: "%h" for half of the year as a decimal number as + well as "%{n}f" for fractional seconds with n digits. For + example, *2016-10-13 09:15:23.456* with tickformat + "%H~%M~%S.%2f" would display *09~15~23.46*By default the values + are formatted using `yaxis.hoverformat`. + + The 'yhoverformat' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["yhoverformat"] + + @yhoverformat.setter + def yhoverformat(self, val): + self["yhoverformat"] = val + + @property + def ysrc(self): + """ + Sets the source reference on Chart Studio Cloud for `y`. + + The 'ysrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["ysrc"] + + @ysrc.setter + def ysrc(self, val): + self["ysrc"] = val + + @property + def z(self): + """ + Sets the z coordinates of the vector field. + + The 'z' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["z"] + + @z.setter + def z(self, val): + self["z"] = val + + @property + def zhoverformat(self): + """ + Sets the hover text formatting rulefor `z` using d3 formatting + mini-languages which are very similar to those in Python. For + numbers, see: + https://github.com/d3/d3-format/tree/v1.4.5#d3-format. And for + dates see: https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format. We add two items to d3's date + formatter: "%h" for half of the year as a decimal number as + well as "%{n}f" for fractional seconds with n digits. For + example, *2016-10-13 09:15:23.456* with tickformat + "%H~%M~%S.%2f" would display *09~15~23.46*By default the values + are formatted using `zaxis.hoverformat`. + + The 'zhoverformat' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["zhoverformat"] + + @zhoverformat.setter + def zhoverformat(self, val): + self["zhoverformat"] = val + + @property + def zsrc(self): + """ + Sets the source reference on Chart Studio Cloud for `z`. + + The 'zsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["zsrc"] + + @zsrc.setter + def zsrc(self, val): + self["zsrc"] = val + + @property + def type(self): + return self._props["type"] + + @property + def _prop_descriptions(self): + return """\ + autocolorscale + Determines whether the colorscale is a default palette + (`autocolorscale: true`) or the palette determined by + `colorscale`. In case `colorscale` is unspecified or + `autocolorscale` is true, the default palette will be + chosen according to whether numbers in the `color` + array are all positive, all negative or mixed. + cauto + Determines whether or not the color domain is computed + with respect to the input data (here u/v/w norm) or the + bounds set in `cmin` and `cmax` Defaults to `false` + when `cmin` and `cmax` are set by the user. + cmax + Sets the upper bound of the color domain. Value should + have the same units as u/v/w norm and if set, `cmin` + must be set as well. + cmid + Sets the mid-point of the color domain by scaling + `cmin` and/or `cmax` to be equidistant to this point. + Value should have the same units as u/v/w norm. Has no + effect when `cauto` is `false`. + cmin + Sets the lower bound of the color domain. Value should + have the same units as u/v/w norm and if set, `cmax` + must be set as well. + coloraxis + Sets a reference to a shared color axis. References to + these shared color axes are "coloraxis", "coloraxis2", + "coloraxis3", etc. Settings for these shared color axes + are set in the layout, under `layout.coloraxis`, + `layout.coloraxis2`, etc. Note that multiple color + scales can be linked to the same color axis. + colorbar + :class:`plotly.graph_objects.streamtube.ColorBar` + instance or dict with compatible properties + colorscale + Sets the colorscale. The colorscale must be an array + containing arrays mapping a normalized value to an rgb, + rgba, hex, hsl, hsv, or named color string. At minimum, + a mapping for the lowest (0) and highest (1) values are + required. For example, `[[0, 'rgb(0,0,255)'], [1, + 'rgb(255,0,0)']]`. To control the bounds of the + colorscale in color space, use `cmin` and `cmax`. + Alternatively, `colorscale` may be a palette name + string of the following list: Blackbody,Bluered,Blues,C + ividis,Earth,Electric,Greens,Greys,Hot,Jet,Picnic,Portl + and,Rainbow,RdBu,Reds,Viridis,YlGnBu,YlOrRd. + customdata + Assigns extra data each datum. This may be useful when + listening to hover, click and selection events. Note + that, "scatter" traces also appends customdata items in + the markers DOM elements + customdatasrc + Sets the source reference on Chart Studio Cloud for + `customdata`. + hoverinfo + Determines which trace information appear on hover. If + `none` or `skip` are set, no information is displayed + upon hovering. But, if `none` is set, click and hover + events are still fired. + hoverinfosrc + Sets the source reference on Chart Studio Cloud for + `hoverinfo`. + hoverlabel + :class:`plotly.graph_objects.streamtube.Hoverlabel` + instance or dict with compatible properties + hovertemplate + Template string used for rendering the information that + appear on hover box. Note that this will override + `hoverinfo`. Variables are inserted using %{variable}, + for example "y: %{y}" as well as %{xother}, {%_xother}, + {%_xother_}, {%xother_}. When showing info for several + points, "xother" will be added to those with different + x positions from the first point. An underscore before + or after "(x|y)other" will add a space on that side, + only when this field is shown. Numbers are formatted + using d3-format's syntax %{variable:d3-format}, for + example "Price: %{y:$.2f}". + https://github.com/d3/d3-format/tree/v1.4.5#d3-format + for details on the formatting syntax. Dates are + formatted using d3-time-format's syntax + %{variable|d3-time-format}, for example "Day: + %{2019-01-01|%A}". https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format for details on the + date formatting syntax. Variables that can't be found + will be replaced with the specifier. For example, a + template of "data: %{x}, %{y}" will result in a value + of "data: 1, %{y}" if x is 1 and y is missing. + Variables with an undefined value will be replaced with + the fallback value. The variables available in + `hovertemplate` are the ones emitted as event data + described at this link + https://plotly.com/javascript/plotlyjs-events/#event- + data. Additionally, all attributes that can be + specified per-point (the ones that are `arrayOk: true`) + are available. Finally, the template string has access + to variables `tubex`, `tubey`, `tubez`, `tubeu`, + `tubev`, `tubew`, `norm` and `divergence`. Anything + contained in tag `` is displayed in the + secondary box, for example + `%{fullData.name}`. To hide the + secondary box completely, use an empty tag + ``. + hovertemplatefallback + Fallback string that's displayed when a variable + referenced in a template is missing. If the boolean + value 'false' is passed in, the specifier with the + missing variable will be displayed. + hovertemplatesrc + Sets the source reference on Chart Studio Cloud for + `hovertemplate`. + hovertext + Same as `text`. + ids + Assigns id labels to each datum. These ids for object + constancy of data points during animation. Should be an + array of strings, not numbers or any other type. + idssrc + Sets the source reference on Chart Studio Cloud for + `ids`. + legend + Sets the reference to a legend to show this trace in. + References to these legends are "legend", "legend2", + "legend3", etc. Settings for these legends are set in + the layout, under `layout.legend`, `layout.legend2`, + etc. + legendgroup + Sets the legend group for this trace. Traces and shapes + part of the same legend group hide/show at the same + time when toggling legend items. + legendgrouptitle + :class:`plotly.graph_objects.streamtube.Legendgrouptitl + e` instance or dict with compatible properties + legendrank + Sets the legend rank for this trace. Items and groups + with smaller ranks are presented on top/left side while + with "reversed" `legend.traceorder` they are on + bottom/right side. The default legendrank is 1000, so + that you can use ranks less than 1000 to place certain + items before all unranked items, and ranks greater than + 1000 to go after all unranked items. When having + unranked or equal rank items shapes would be displayed + after traces i.e. according to their order in data and + layout. + legendwidth + Sets the width (in px or fraction) of the legend for + this trace. + lighting + :class:`plotly.graph_objects.streamtube.Lighting` + instance or dict with compatible properties + lightposition + :class:`plotly.graph_objects.streamtube.Lightposition` + instance or dict with compatible properties + maxdisplayed + The maximum number of displayed segments in a + streamtube. + meta + Assigns extra meta information associated with this + trace that can be used in various text attributes. + Attributes such as trace `name`, graph, axis and + colorbar `title.text`, annotation `text` + `rangeselector`, `updatemenues` and `sliders` `label` + text all support `meta`. To access the trace `meta` + values in an attribute in the same trace, simply use + `%{meta[i]}` where `i` is the index or key of the + `meta` item in question. To access trace `meta` in + layout attributes, use `%{data[n[.meta[i]}` where `i` + is the index or key of the `meta` and `n` is the trace + index. + metasrc + Sets the source reference on Chart Studio Cloud for + `meta`. + name + Sets the trace name. The trace name appears as the + legend item and on hover. + opacity + Sets the opacity of the surface. Please note that in + the case of using high `opacity` values for example a + value greater than or equal to 0.5 on two surfaces (and + 0.25 with four surfaces), an overlay of multiple + transparent surfaces may not perfectly be sorted in + depth by the webgl API. This behavior may be improved + in the near future and is subject to change. + reversescale + Reverses the color mapping if true. If true, `cmin` + will correspond to the last color in the array and + `cmax` will correspond to the first color. + scene + Sets a reference between this trace's 3D coordinate + system and a 3D scene. If "scene" (the default value), + the (x,y,z) coordinates refer to `layout.scene`. If + "scene2", the (x,y,z) coordinates refer to + `layout.scene2`, and so on. + showlegend + Determines whether or not an item corresponding to this + trace is shown in the legend. + showscale + Determines whether or not a colorbar is displayed for + this trace. + sizeref + The scaling factor for the streamtubes. The default is + 1, which avoids two max divergence tubes from touching + at adjacent starting positions. + starts + :class:`plotly.graph_objects.streamtube.Starts` + instance or dict with compatible properties + stream + :class:`plotly.graph_objects.streamtube.Stream` + instance or dict with compatible properties + text + Sets a text element associated with this trace. If + trace `hoverinfo` contains a "text" flag, this text + element will be seen in all hover labels. Note that + streamtube traces do not support array `text` values. + u + Sets the x components of the vector field. + uhoverformat + Sets the hover text formatting rulefor `u` using d3 + formatting mini-languages which are very similar to + those in Python. For numbers, see: https://github.com/d + 3/d3-format/tree/v1.4.5#d3-format.By default the values + are formatted using generic number format. + uid + Assign an id to this trace, Use this to provide object + constancy between traces during animations and + transitions. + uirevision + Controls persistence of some user-driven changes to the + trace: `constraintrange` in `parcoords` traces, as well + as some `editable: true` modifications such as `name` + and `colorbar.title`. Defaults to `layout.uirevision`. + Note that other user-driven trace attribute changes are + controlled by `layout` attributes: `trace.visible` is + controlled by `layout.legend.uirevision`, + `selectedpoints` is controlled by + `layout.selectionrevision`, and `colorbar.(x|y)` + (accessible with `config: {editable: true}`) is + controlled by `layout.editrevision`. Trace changes are + tracked by `uid`, which only falls back on trace index + if no `uid` is provided. So if your app can add/remove + traces before the end of the `data` array, such that + the same trace has a different index, you can still + preserve user-driven changes if you give each trace a + `uid` that stays with it as it moves. + usrc + Sets the source reference on Chart Studio Cloud for + `u`. + v + Sets the y components of the vector field. + vhoverformat + Sets the hover text formatting rulefor `v` using d3 + formatting mini-languages which are very similar to + those in Python. For numbers, see: https://github.com/d + 3/d3-format/tree/v1.4.5#d3-format.By default the values + are formatted using generic number format. + visible + Determines whether or not this trace is visible. If + "legendonly", the trace is not drawn, but can appear as + a legend item (provided that the legend itself is + visible). + vsrc + Sets the source reference on Chart Studio Cloud for + `v`. + w + Sets the z components of the vector field. + whoverformat + Sets the hover text formatting rulefor `w` using d3 + formatting mini-languages which are very similar to + those in Python. For numbers, see: https://github.com/d + 3/d3-format/tree/v1.4.5#d3-format.By default the values + are formatted using generic number format. + wsrc + Sets the source reference on Chart Studio Cloud for + `w`. + x + Sets the x coordinates of the vector field. + xhoverformat + Sets the hover text formatting rulefor `x` using d3 + formatting mini-languages which are very similar to + those in Python. For numbers, see: + https://github.com/d3/d3-format/tree/v1.4.5#d3-format. + And for dates see: https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format. We add two items to + d3's date formatter: "%h" for half of the year as a + decimal number as well as "%{n}f" for fractional + seconds with n digits. For example, *2016-10-13 + 09:15:23.456* with tickformat "%H~%M~%S.%2f" would + display *09~15~23.46*By default the values are + formatted using `xaxis.hoverformat`. + xsrc + Sets the source reference on Chart Studio Cloud for + `x`. + y + Sets the y coordinates of the vector field. + yhoverformat + Sets the hover text formatting rulefor `y` using d3 + formatting mini-languages which are very similar to + those in Python. For numbers, see: + https://github.com/d3/d3-format/tree/v1.4.5#d3-format. + And for dates see: https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format. We add two items to + d3's date formatter: "%h" for half of the year as a + decimal number as well as "%{n}f" for fractional + seconds with n digits. For example, *2016-10-13 + 09:15:23.456* with tickformat "%H~%M~%S.%2f" would + display *09~15~23.46*By default the values are + formatted using `yaxis.hoverformat`. + ysrc + Sets the source reference on Chart Studio Cloud for + `y`. + z + Sets the z coordinates of the vector field. + zhoverformat + Sets the hover text formatting rulefor `z` using d3 + formatting mini-languages which are very similar to + those in Python. For numbers, see: + https://github.com/d3/d3-format/tree/v1.4.5#d3-format. + And for dates see: https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format. We add two items to + d3's date formatter: "%h" for half of the year as a + decimal number as well as "%{n}f" for fractional + seconds with n digits. For example, *2016-10-13 + 09:15:23.456* with tickformat "%H~%M~%S.%2f" would + display *09~15~23.46*By default the values are + formatted using `zaxis.hoverformat`. + zsrc + Sets the source reference on Chart Studio Cloud for + `z`. + """ + + def __init__( + self, + arg=None, + autocolorscale=None, + cauto=None, + cmax=None, + cmid=None, + cmin=None, + coloraxis=None, + colorbar=None, + colorscale=None, + customdata=None, + customdatasrc=None, + hoverinfo=None, + hoverinfosrc=None, + hoverlabel=None, + hovertemplate=None, + hovertemplatefallback=None, + hovertemplatesrc=None, + hovertext=None, + ids=None, + idssrc=None, + legend=None, + legendgroup=None, + legendgrouptitle=None, + legendrank=None, + legendwidth=None, + lighting=None, + lightposition=None, + maxdisplayed=None, + meta=None, + metasrc=None, + name=None, + opacity=None, + reversescale=None, + scene=None, + showlegend=None, + showscale=None, + sizeref=None, + starts=None, + stream=None, + text=None, + u=None, + uhoverformat=None, + uid=None, + uirevision=None, + usrc=None, + v=None, + vhoverformat=None, + visible=None, + vsrc=None, + w=None, + whoverformat=None, + wsrc=None, + x=None, + xhoverformat=None, + xsrc=None, + y=None, + yhoverformat=None, + ysrc=None, + z=None, + zhoverformat=None, + zsrc=None, + **kwargs, + ): + """ + Construct a new Streamtube object + + Use a streamtube trace to visualize flow in a vector field. + Specify a vector field using 6 1D arrays of equal length, 3 + position arrays `x`, `y` and `z` and 3 vector component arrays + `u`, `v`, and `w`. By default, the tubes' starting positions + will be cut from the vector field's x-z plane at its minimum y + value. To specify your own starting position, use attributes + `starts.x`, `starts.y` and `starts.z`. The color is encoded by + the norm of (u, v, w), and the local radius by the divergence + of (u, v, w). + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of :class:`plotly.graph_objs.Streamtube` + autocolorscale + Determines whether the colorscale is a default palette + (`autocolorscale: true`) or the palette determined by + `colorscale`. In case `colorscale` is unspecified or + `autocolorscale` is true, the default palette will be + chosen according to whether numbers in the `color` + array are all positive, all negative or mixed. + cauto + Determines whether or not the color domain is computed + with respect to the input data (here u/v/w norm) or the + bounds set in `cmin` and `cmax` Defaults to `false` + when `cmin` and `cmax` are set by the user. + cmax + Sets the upper bound of the color domain. Value should + have the same units as u/v/w norm and if set, `cmin` + must be set as well. + cmid + Sets the mid-point of the color domain by scaling + `cmin` and/or `cmax` to be equidistant to this point. + Value should have the same units as u/v/w norm. Has no + effect when `cauto` is `false`. + cmin + Sets the lower bound of the color domain. Value should + have the same units as u/v/w norm and if set, `cmax` + must be set as well. + coloraxis + Sets a reference to a shared color axis. References to + these shared color axes are "coloraxis", "coloraxis2", + "coloraxis3", etc. Settings for these shared color axes + are set in the layout, under `layout.coloraxis`, + `layout.coloraxis2`, etc. Note that multiple color + scales can be linked to the same color axis. + colorbar + :class:`plotly.graph_objects.streamtube.ColorBar` + instance or dict with compatible properties + colorscale + Sets the colorscale. The colorscale must be an array + containing arrays mapping a normalized value to an rgb, + rgba, hex, hsl, hsv, or named color string. At minimum, + a mapping for the lowest (0) and highest (1) values are + required. For example, `[[0, 'rgb(0,0,255)'], [1, + 'rgb(255,0,0)']]`. To control the bounds of the + colorscale in color space, use `cmin` and `cmax`. + Alternatively, `colorscale` may be a palette name + string of the following list: Blackbody,Bluered,Blues,C + ividis,Earth,Electric,Greens,Greys,Hot,Jet,Picnic,Portl + and,Rainbow,RdBu,Reds,Viridis,YlGnBu,YlOrRd. + customdata + Assigns extra data each datum. This may be useful when + listening to hover, click and selection events. Note + that, "scatter" traces also appends customdata items in + the markers DOM elements + customdatasrc + Sets the source reference on Chart Studio Cloud for + `customdata`. + hoverinfo + Determines which trace information appear on hover. If + `none` or `skip` are set, no information is displayed + upon hovering. But, if `none` is set, click and hover + events are still fired. + hoverinfosrc + Sets the source reference on Chart Studio Cloud for + `hoverinfo`. + hoverlabel + :class:`plotly.graph_objects.streamtube.Hoverlabel` + instance or dict with compatible properties + hovertemplate + Template string used for rendering the information that + appear on hover box. Note that this will override + `hoverinfo`. Variables are inserted using %{variable}, + for example "y: %{y}" as well as %{xother}, {%_xother}, + {%_xother_}, {%xother_}. When showing info for several + points, "xother" will be added to those with different + x positions from the first point. An underscore before + or after "(x|y)other" will add a space on that side, + only when this field is shown. Numbers are formatted + using d3-format's syntax %{variable:d3-format}, for + example "Price: %{y:$.2f}". + https://github.com/d3/d3-format/tree/v1.4.5#d3-format + for details on the formatting syntax. Dates are + formatted using d3-time-format's syntax + %{variable|d3-time-format}, for example "Day: + %{2019-01-01|%A}". https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format for details on the + date formatting syntax. Variables that can't be found + will be replaced with the specifier. For example, a + template of "data: %{x}, %{y}" will result in a value + of "data: 1, %{y}" if x is 1 and y is missing. + Variables with an undefined value will be replaced with + the fallback value. The variables available in + `hovertemplate` are the ones emitted as event data + described at this link + https://plotly.com/javascript/plotlyjs-events/#event- + data. Additionally, all attributes that can be + specified per-point (the ones that are `arrayOk: true`) + are available. Finally, the template string has access + to variables `tubex`, `tubey`, `tubez`, `tubeu`, + `tubev`, `tubew`, `norm` and `divergence`. Anything + contained in tag `` is displayed in the + secondary box, for example + `%{fullData.name}`. To hide the + secondary box completely, use an empty tag + ``. + hovertemplatefallback + Fallback string that's displayed when a variable + referenced in a template is missing. If the boolean + value 'false' is passed in, the specifier with the + missing variable will be displayed. + hovertemplatesrc + Sets the source reference on Chart Studio Cloud for + `hovertemplate`. + hovertext + Same as `text`. + ids + Assigns id labels to each datum. These ids for object + constancy of data points during animation. Should be an + array of strings, not numbers or any other type. + idssrc + Sets the source reference on Chart Studio Cloud for + `ids`. + legend + Sets the reference to a legend to show this trace in. + References to these legends are "legend", "legend2", + "legend3", etc. Settings for these legends are set in + the layout, under `layout.legend`, `layout.legend2`, + etc. + legendgroup + Sets the legend group for this trace. Traces and shapes + part of the same legend group hide/show at the same + time when toggling legend items. + legendgrouptitle + :class:`plotly.graph_objects.streamtube.Legendgrouptitl + e` instance or dict with compatible properties + legendrank + Sets the legend rank for this trace. Items and groups + with smaller ranks are presented on top/left side while + with "reversed" `legend.traceorder` they are on + bottom/right side. The default legendrank is 1000, so + that you can use ranks less than 1000 to place certain + items before all unranked items, and ranks greater than + 1000 to go after all unranked items. When having + unranked or equal rank items shapes would be displayed + after traces i.e. according to their order in data and + layout. + legendwidth + Sets the width (in px or fraction) of the legend for + this trace. + lighting + :class:`plotly.graph_objects.streamtube.Lighting` + instance or dict with compatible properties + lightposition + :class:`plotly.graph_objects.streamtube.Lightposition` + instance or dict with compatible properties + maxdisplayed + The maximum number of displayed segments in a + streamtube. + meta + Assigns extra meta information associated with this + trace that can be used in various text attributes. + Attributes such as trace `name`, graph, axis and + colorbar `title.text`, annotation `text` + `rangeselector`, `updatemenues` and `sliders` `label` + text all support `meta`. To access the trace `meta` + values in an attribute in the same trace, simply use + `%{meta[i]}` where `i` is the index or key of the + `meta` item in question. To access trace `meta` in + layout attributes, use `%{data[n[.meta[i]}` where `i` + is the index or key of the `meta` and `n` is the trace + index. + metasrc + Sets the source reference on Chart Studio Cloud for + `meta`. + name + Sets the trace name. The trace name appears as the + legend item and on hover. + opacity + Sets the opacity of the surface. Please note that in + the case of using high `opacity` values for example a + value greater than or equal to 0.5 on two surfaces (and + 0.25 with four surfaces), an overlay of multiple + transparent surfaces may not perfectly be sorted in + depth by the webgl API. This behavior may be improved + in the near future and is subject to change. + reversescale + Reverses the color mapping if true. If true, `cmin` + will correspond to the last color in the array and + `cmax` will correspond to the first color. + scene + Sets a reference between this trace's 3D coordinate + system and a 3D scene. If "scene" (the default value), + the (x,y,z) coordinates refer to `layout.scene`. If + "scene2", the (x,y,z) coordinates refer to + `layout.scene2`, and so on. + showlegend + Determines whether or not an item corresponding to this + trace is shown in the legend. + showscale + Determines whether or not a colorbar is displayed for + this trace. + sizeref + The scaling factor for the streamtubes. The default is + 1, which avoids two max divergence tubes from touching + at adjacent starting positions. + starts + :class:`plotly.graph_objects.streamtube.Starts` + instance or dict with compatible properties + stream + :class:`plotly.graph_objects.streamtube.Stream` + instance or dict with compatible properties + text + Sets a text element associated with this trace. If + trace `hoverinfo` contains a "text" flag, this text + element will be seen in all hover labels. Note that + streamtube traces do not support array `text` values. + u + Sets the x components of the vector field. + uhoverformat + Sets the hover text formatting rulefor `u` using d3 + formatting mini-languages which are very similar to + those in Python. For numbers, see: https://github.com/d + 3/d3-format/tree/v1.4.5#d3-format.By default the values + are formatted using generic number format. + uid + Assign an id to this trace, Use this to provide object + constancy between traces during animations and + transitions. + uirevision + Controls persistence of some user-driven changes to the + trace: `constraintrange` in `parcoords` traces, as well + as some `editable: true` modifications such as `name` + and `colorbar.title`. Defaults to `layout.uirevision`. + Note that other user-driven trace attribute changes are + controlled by `layout` attributes: `trace.visible` is + controlled by `layout.legend.uirevision`, + `selectedpoints` is controlled by + `layout.selectionrevision`, and `colorbar.(x|y)` + (accessible with `config: {editable: true}`) is + controlled by `layout.editrevision`. Trace changes are + tracked by `uid`, which only falls back on trace index + if no `uid` is provided. So if your app can add/remove + traces before the end of the `data` array, such that + the same trace has a different index, you can still + preserve user-driven changes if you give each trace a + `uid` that stays with it as it moves. + usrc + Sets the source reference on Chart Studio Cloud for + `u`. + v + Sets the y components of the vector field. + vhoverformat + Sets the hover text formatting rulefor `v` using d3 + formatting mini-languages which are very similar to + those in Python. For numbers, see: https://github.com/d + 3/d3-format/tree/v1.4.5#d3-format.By default the values + are formatted using generic number format. + visible + Determines whether or not this trace is visible. If + "legendonly", the trace is not drawn, but can appear as + a legend item (provided that the legend itself is + visible). + vsrc + Sets the source reference on Chart Studio Cloud for + `v`. + w + Sets the z components of the vector field. + whoverformat + Sets the hover text formatting rulefor `w` using d3 + formatting mini-languages which are very similar to + those in Python. For numbers, see: https://github.com/d + 3/d3-format/tree/v1.4.5#d3-format.By default the values + are formatted using generic number format. + wsrc + Sets the source reference on Chart Studio Cloud for + `w`. + x + Sets the x coordinates of the vector field. + xhoverformat + Sets the hover text formatting rulefor `x` using d3 + formatting mini-languages which are very similar to + those in Python. For numbers, see: + https://github.com/d3/d3-format/tree/v1.4.5#d3-format. + And for dates see: https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format. We add two items to + d3's date formatter: "%h" for half of the year as a + decimal number as well as "%{n}f" for fractional + seconds with n digits. For example, *2016-10-13 + 09:15:23.456* with tickformat "%H~%M~%S.%2f" would + display *09~15~23.46*By default the values are + formatted using `xaxis.hoverformat`. + xsrc + Sets the source reference on Chart Studio Cloud for + `x`. + y + Sets the y coordinates of the vector field. + yhoverformat + Sets the hover text formatting rulefor `y` using d3 + formatting mini-languages which are very similar to + those in Python. For numbers, see: + https://github.com/d3/d3-format/tree/v1.4.5#d3-format. + And for dates see: https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format. We add two items to + d3's date formatter: "%h" for half of the year as a + decimal number as well as "%{n}f" for fractional + seconds with n digits. For example, *2016-10-13 + 09:15:23.456* with tickformat "%H~%M~%S.%2f" would + display *09~15~23.46*By default the values are + formatted using `yaxis.hoverformat`. + ysrc + Sets the source reference on Chart Studio Cloud for + `y`. + z + Sets the z coordinates of the vector field. + zhoverformat + Sets the hover text formatting rulefor `z` using d3 + formatting mini-languages which are very similar to + those in Python. For numbers, see: + https://github.com/d3/d3-format/tree/v1.4.5#d3-format. + And for dates see: https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format. We add two items to + d3's date formatter: "%h" for half of the year as a + decimal number as well as "%{n}f" for fractional + seconds with n digits. For example, *2016-10-13 + 09:15:23.456* with tickformat "%H~%M~%S.%2f" would + display *09~15~23.46*By default the values are + formatted using `zaxis.hoverformat`. + zsrc + Sets the source reference on Chart Studio Cloud for + `z`. + + Returns + ------- + Streamtube + """ + super().__init__("streamtube") + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + if arg is None: + arg = {} + elif isinstance(arg, self.__class__): + arg = arg.to_plotly_json() + elif isinstance(arg, dict): + arg = _copy.copy(arg) + else: + raise ValueError("""\ +The first argument to the plotly.graph_objs.Streamtube +constructor must be a dict or +an instance of :class:`plotly.graph_objs.Streamtube`""") + + self._skip_invalid = kwargs.pop("skip_invalid", False) + self._validate = kwargs.pop("_validate", True) + + self._set_property("autocolorscale", arg, autocolorscale) + self._set_property("cauto", arg, cauto) + self._set_property("cmax", arg, cmax) + self._set_property("cmid", arg, cmid) + self._set_property("cmin", arg, cmin) + self._set_property("coloraxis", arg, coloraxis) + self._set_property("colorbar", arg, colorbar) + self._set_property("colorscale", arg, colorscale) + self._set_property("customdata", arg, customdata) + self._set_property("customdatasrc", arg, customdatasrc) + self._set_property("hoverinfo", arg, hoverinfo) + self._set_property("hoverinfosrc", arg, hoverinfosrc) + self._set_property("hoverlabel", arg, hoverlabel) + self._set_property("hovertemplate", arg, hovertemplate) + self._set_property("hovertemplatefallback", arg, hovertemplatefallback) + self._set_property("hovertemplatesrc", arg, hovertemplatesrc) + self._set_property("hovertext", arg, hovertext) + self._set_property("ids", arg, ids) + self._set_property("idssrc", arg, idssrc) + self._set_property("legend", arg, legend) + self._set_property("legendgroup", arg, legendgroup) + self._set_property("legendgrouptitle", arg, legendgrouptitle) + self._set_property("legendrank", arg, legendrank) + self._set_property("legendwidth", arg, legendwidth) + self._set_property("lighting", arg, lighting) + self._set_property("lightposition", arg, lightposition) + self._set_property("maxdisplayed", arg, maxdisplayed) + self._set_property("meta", arg, meta) + self._set_property("metasrc", arg, metasrc) + self._set_property("name", arg, name) + self._set_property("opacity", arg, opacity) + self._set_property("reversescale", arg, reversescale) + self._set_property("scene", arg, scene) + self._set_property("showlegend", arg, showlegend) + self._set_property("showscale", arg, showscale) + self._set_property("sizeref", arg, sizeref) + self._set_property("starts", arg, starts) + self._set_property("stream", arg, stream) + self._set_property("text", arg, text) + self._set_property("u", arg, u) + self._set_property("uhoverformat", arg, uhoverformat) + self._set_property("uid", arg, uid) + self._set_property("uirevision", arg, uirevision) + self._set_property("usrc", arg, usrc) + self._set_property("v", arg, v) + self._set_property("vhoverformat", arg, vhoverformat) + self._set_property("visible", arg, visible) + self._set_property("vsrc", arg, vsrc) + self._set_property("w", arg, w) + self._set_property("whoverformat", arg, whoverformat) + self._set_property("wsrc", arg, wsrc) + self._set_property("x", arg, x) + self._set_property("xhoverformat", arg, xhoverformat) + self._set_property("xsrc", arg, xsrc) + self._set_property("y", arg, y) + self._set_property("yhoverformat", arg, yhoverformat) + self._set_property("ysrc", arg, ysrc) + self._set_property("z", arg, z) + self._set_property("zhoverformat", arg, zhoverformat) + self._set_property("zsrc", arg, zsrc) + + self._props["type"] = "streamtube" + arg.pop("type", None) + self._process_kwargs(**dict(arg, **kwargs)) + self._skip_invalid = False diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/_sunburst.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/_sunburst.py new file mode 100644 index 0000000000000000000000000000000000000000..b7df56bfa016a9f715129a40f01442701d6dc39a --- /dev/null +++ b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/_sunburst.py @@ -0,0 +1,1854 @@ +# --- THIS FILE IS AUTO-GENERATED --- +# Modifications will be overwitten the next time code generation run. + +from plotly.basedatatypes import BaseTraceType as _BaseTraceType +import copy as _copy + + +class Sunburst(_BaseTraceType): + _parent_path_str = "" + _path_str = "sunburst" + _valid_props = { + "branchvalues", + "count", + "customdata", + "customdatasrc", + "domain", + "hoverinfo", + "hoverinfosrc", + "hoverlabel", + "hovertemplate", + "hovertemplatefallback", + "hovertemplatesrc", + "hovertext", + "hovertextsrc", + "ids", + "idssrc", + "insidetextfont", + "insidetextorientation", + "labels", + "labelssrc", + "leaf", + "legend", + "legendgrouptitle", + "legendrank", + "legendwidth", + "level", + "marker", + "maxdepth", + "meta", + "metasrc", + "name", + "opacity", + "outsidetextfont", + "parents", + "parentssrc", + "root", + "rotation", + "sort", + "stream", + "text", + "textfont", + "textinfo", + "textsrc", + "texttemplate", + "texttemplatefallback", + "texttemplatesrc", + "type", + "uid", + "uirevision", + "values", + "valuessrc", + "visible", + } + + @property + def branchvalues(self): + """ + Determines how the items in `values` are summed. When set to + "total", items in `values` are taken to be value of all its + descendants. When set to "remainder", items in `values` + corresponding to the root and the branches sectors are taken to + be the extra part not part of the sum of the values at their + leaves. + + The 'branchvalues' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['remainder', 'total'] + + Returns + ------- + Any + """ + return self["branchvalues"] + + @branchvalues.setter + def branchvalues(self, val): + self["branchvalues"] = val + + @property + def count(self): + """ + Determines default for `values` when it is not provided, by + inferring a 1 for each of the "leaves" and/or "branches", + otherwise 0. + + The 'count' property is a flaglist and may be specified + as a string containing: + - Any combination of ['branches', 'leaves'] joined with '+' characters + (e.g. 'branches+leaves') + + Returns + ------- + Any + """ + return self["count"] + + @count.setter + def count(self, val): + self["count"] = val + + @property + def customdata(self): + """ + Assigns extra data each datum. This may be useful when + listening to hover, click and selection events. Note that, + "scatter" traces also appends customdata items in the markers + DOM elements + + The 'customdata' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["customdata"] + + @customdata.setter + def customdata(self, val): + self["customdata"] = val + + @property + def customdatasrc(self): + """ + Sets the source reference on Chart Studio Cloud for + `customdata`. + + The 'customdatasrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["customdatasrc"] + + @customdatasrc.setter + def customdatasrc(self, val): + self["customdatasrc"] = val + + @property + def domain(self): + """ + The 'domain' property is an instance of Domain + that may be specified as: + - An instance of :class:`plotly.graph_objs.sunburst.Domain` + - A dict of string/value properties that will be passed + to the Domain constructor + + Returns + ------- + plotly.graph_objs.sunburst.Domain + """ + return self["domain"] + + @domain.setter + def domain(self, val): + self["domain"] = val + + @property + def hoverinfo(self): + """ + Determines which trace information appear on hover. If `none` + or `skip` are set, no information is displayed upon hovering. + But, if `none` is set, click and hover events are still fired. + + The 'hoverinfo' property is a flaglist and may be specified + as a string containing: + - Any combination of ['label', 'text', 'value', 'name', 'current path', 'percent root', 'percent entry', 'percent parent'] joined with '+' characters + (e.g. 'label+text') + OR exactly one of ['all', 'none', 'skip'] (e.g. 'skip') + - A list or array of the above + + Returns + ------- + Any|numpy.ndarray + """ + return self["hoverinfo"] + + @hoverinfo.setter + def hoverinfo(self, val): + self["hoverinfo"] = val + + @property + def hoverinfosrc(self): + """ + Sets the source reference on Chart Studio Cloud for + `hoverinfo`. + + The 'hoverinfosrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["hoverinfosrc"] + + @hoverinfosrc.setter + def hoverinfosrc(self, val): + self["hoverinfosrc"] = val + + @property + def hoverlabel(self): + """ + The 'hoverlabel' property is an instance of Hoverlabel + that may be specified as: + - An instance of :class:`plotly.graph_objs.sunburst.Hoverlabel` + - A dict of string/value properties that will be passed + to the Hoverlabel constructor + + Returns + ------- + plotly.graph_objs.sunburst.Hoverlabel + """ + return self["hoverlabel"] + + @hoverlabel.setter + def hoverlabel(self, val): + self["hoverlabel"] = val + + @property + def hovertemplate(self): + """ + Template string used for rendering the information that appear + on hover box. Note that this will override `hoverinfo`. + Variables are inserted using %{variable}, for example "y: %{y}" + as well as %{xother}, {%_xother}, {%_xother_}, {%xother_}. When + showing info for several points, "xother" will be added to + those with different x positions from the first point. An + underscore before or after "(x|y)other" will add a space on + that side, only when this field is shown. Numbers are formatted + using d3-format's syntax %{variable:d3-format}, for example + "Price: %{y:$.2f}". + https://github.com/d3/d3-format/tree/v1.4.5#d3-format for + details on the formatting syntax. Dates are formatted using + d3-time-format's syntax %{variable|d3-time-format}, for example + "Day: %{2019-01-01|%A}". https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format for details on the date + formatting syntax. Variables that can't be found will be + replaced with the specifier. For example, a template of "data: + %{x}, %{y}" will result in a value of "data: 1, %{y}" if x is 1 + and y is missing. Variables with an undefined value will be + replaced with the fallback value. The variables available in + `hovertemplate` are the ones emitted as event data described at + this link https://plotly.com/javascript/plotlyjs-events/#event- + data. Additionally, all attributes that can be specified per- + point (the ones that are `arrayOk: true`) are available. + Finally, the template string has access to variables + `currentPath`, `root`, `entry`, `percentRoot`, `percentEntry` + and `percentParent`. Anything contained in tag `` is + displayed in the secondary box, for example + `%{fullData.name}`. To hide the secondary box + completely, use an empty tag ``. + + The 'hovertemplate' property is a string and must be specified as: + - A string + - A number that will be converted to a string + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["hovertemplate"] + + @hovertemplate.setter + def hovertemplate(self, val): + self["hovertemplate"] = val + + @property + def hovertemplatefallback(self): + """ + Fallback string that's displayed when a variable referenced in + a template is missing. If the boolean value 'false' is passed + in, the specifier with the missing variable will be displayed. + + The 'hovertemplatefallback' property accepts values of any type + + Returns + ------- + Any + """ + return self["hovertemplatefallback"] + + @hovertemplatefallback.setter + def hovertemplatefallback(self, val): + self["hovertemplatefallback"] = val + + @property + def hovertemplatesrc(self): + """ + Sets the source reference on Chart Studio Cloud for + `hovertemplate`. + + The 'hovertemplatesrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["hovertemplatesrc"] + + @hovertemplatesrc.setter + def hovertemplatesrc(self, val): + self["hovertemplatesrc"] = val + + @property + def hovertext(self): + """ + Sets hover text elements associated with each sector. If a + single string, the same string appears for all data points. If + an array of string, the items are mapped in order of this + trace's sectors. To be seen, trace `hoverinfo` must contain a + "text" flag. + + The 'hovertext' property is a string and must be specified as: + - A string + - A number that will be converted to a string + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["hovertext"] + + @hovertext.setter + def hovertext(self, val): + self["hovertext"] = val + + @property + def hovertextsrc(self): + """ + Sets the source reference on Chart Studio Cloud for + `hovertext`. + + The 'hovertextsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["hovertextsrc"] + + @hovertextsrc.setter + def hovertextsrc(self, val): + self["hovertextsrc"] = val + + @property + def ids(self): + """ + Assigns id labels to each datum. These ids for object constancy + of data points during animation. Should be an array of strings, + not numbers or any other type. + + The 'ids' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["ids"] + + @ids.setter + def ids(self, val): + self["ids"] = val + + @property + def idssrc(self): + """ + Sets the source reference on Chart Studio Cloud for `ids`. + + The 'idssrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["idssrc"] + + @idssrc.setter + def idssrc(self, val): + self["idssrc"] = val + + @property + def insidetextfont(self): + """ + Sets the font used for `textinfo` lying inside the sector. + + The 'insidetextfont' property is an instance of Insidetextfont + that may be specified as: + - An instance of :class:`plotly.graph_objs.sunburst.Insidetextfont` + - A dict of string/value properties that will be passed + to the Insidetextfont constructor + + Returns + ------- + plotly.graph_objs.sunburst.Insidetextfont + """ + return self["insidetextfont"] + + @insidetextfont.setter + def insidetextfont(self, val): + self["insidetextfont"] = val + + @property + def insidetextorientation(self): + """ + Controls the orientation of the text inside chart sectors. When + set to "auto", text may be oriented in any direction in order + to be as big as possible in the middle of a sector. The + "horizontal" option orients text to be parallel with the bottom + of the chart, and may make text smaller in order to achieve + that goal. The "radial" option orients text along the radius of + the sector. The "tangential" option orients text perpendicular + to the radius of the sector. + + The 'insidetextorientation' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['horizontal', 'radial', 'tangential', 'auto'] + + Returns + ------- + Any + """ + return self["insidetextorientation"] + + @insidetextorientation.setter + def insidetextorientation(self, val): + self["insidetextorientation"] = val + + @property + def labels(self): + """ + Sets the labels of each of the sectors. + + The 'labels' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["labels"] + + @labels.setter + def labels(self, val): + self["labels"] = val + + @property + def labelssrc(self): + """ + Sets the source reference on Chart Studio Cloud for `labels`. + + The 'labelssrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["labelssrc"] + + @labelssrc.setter + def labelssrc(self, val): + self["labelssrc"] = val + + @property + def leaf(self): + """ + The 'leaf' property is an instance of Leaf + that may be specified as: + - An instance of :class:`plotly.graph_objs.sunburst.Leaf` + - A dict of string/value properties that will be passed + to the Leaf constructor + + Returns + ------- + plotly.graph_objs.sunburst.Leaf + """ + return self["leaf"] + + @leaf.setter + def leaf(self, val): + self["leaf"] = val + + @property + def legend(self): + """ + Sets the reference to a legend to show this trace in. + References to these legends are "legend", "legend2", "legend3", + etc. Settings for these legends are set in the layout, under + `layout.legend`, `layout.legend2`, etc. + + The 'legend' property is an identifier of a particular + subplot, of type 'legend', that may be specified as: + - the string 'legend' optionally followed by an integer >= 1 + (e.g. 'legend', 'legend1', 'legend2', 'legend3', etc.) + + Returns + ------- + str + """ + return self["legend"] + + @legend.setter + def legend(self, val): + self["legend"] = val + + @property + def legendgrouptitle(self): + """ + The 'legendgrouptitle' property is an instance of Legendgrouptitle + that may be specified as: + - An instance of :class:`plotly.graph_objs.sunburst.Legendgrouptitle` + - A dict of string/value properties that will be passed + to the Legendgrouptitle constructor + + Returns + ------- + plotly.graph_objs.sunburst.Legendgrouptitle + """ + return self["legendgrouptitle"] + + @legendgrouptitle.setter + def legendgrouptitle(self, val): + self["legendgrouptitle"] = val + + @property + def legendrank(self): + """ + Sets the legend rank for this trace. Items and groups with + smaller ranks are presented on top/left side while with + "reversed" `legend.traceorder` they are on bottom/right side. + The default legendrank is 1000, so that you can use ranks less + than 1000 to place certain items before all unranked items, and + ranks greater than 1000 to go after all unranked items. When + having unranked or equal rank items shapes would be displayed + after traces i.e. according to their order in data and layout. + + The 'legendrank' property is a number and may be specified as: + - An int or float + + Returns + ------- + int|float + """ + return self["legendrank"] + + @legendrank.setter + def legendrank(self, val): + self["legendrank"] = val + + @property + def legendwidth(self): + """ + Sets the width (in px or fraction) of the legend for this + trace. + + The 'legendwidth' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["legendwidth"] + + @legendwidth.setter + def legendwidth(self, val): + self["legendwidth"] = val + + @property + def level(self): + """ + Sets the level from which this trace hierarchy is rendered. Set + `level` to `''` to start from the root node in the hierarchy. + Must be an "id" if `ids` is filled in, otherwise plotly + attempts to find a matching item in `labels`. + + The 'level' property accepts values of any type + + Returns + ------- + Any + """ + return self["level"] + + @level.setter + def level(self, val): + self["level"] = val + + @property + def marker(self): + """ + The 'marker' property is an instance of Marker + that may be specified as: + - An instance of :class:`plotly.graph_objs.sunburst.Marker` + - A dict of string/value properties that will be passed + to the Marker constructor + + Returns + ------- + plotly.graph_objs.sunburst.Marker + """ + return self["marker"] + + @marker.setter + def marker(self, val): + self["marker"] = val + + @property + def maxdepth(self): + """ + Sets the number of rendered sectors from any given `level`. Set + `maxdepth` to "-1" to render all the levels in the hierarchy. + + The 'maxdepth' property is a integer and may be specified as: + - An int (or float that will be cast to an int) + + Returns + ------- + int + """ + return self["maxdepth"] + + @maxdepth.setter + def maxdepth(self, val): + self["maxdepth"] = val + + @property + def meta(self): + """ + Assigns extra meta information associated with this trace that + can be used in various text attributes. Attributes such as + trace `name`, graph, axis and colorbar `title.text`, annotation + `text` `rangeselector`, `updatemenues` and `sliders` `label` + text all support `meta`. To access the trace `meta` values in + an attribute in the same trace, simply use `%{meta[i]}` where + `i` is the index or key of the `meta` item in question. To + access trace `meta` in layout attributes, use + `%{data[n[.meta[i]}` where `i` is the index or key of the + `meta` and `n` is the trace index. + + The 'meta' property accepts values of any type + + Returns + ------- + Any|numpy.ndarray + """ + return self["meta"] + + @meta.setter + def meta(self, val): + self["meta"] = val + + @property + def metasrc(self): + """ + Sets the source reference on Chart Studio Cloud for `meta`. + + The 'metasrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["metasrc"] + + @metasrc.setter + def metasrc(self, val): + self["metasrc"] = val + + @property + def name(self): + """ + Sets the trace name. The trace name appears as the legend item + and on hover. + + The 'name' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["name"] + + @name.setter + def name(self, val): + self["name"] = val + + @property + def opacity(self): + """ + Sets the opacity of the trace. + + The 'opacity' property is a number and may be specified as: + - An int or float in the interval [0, 1] + + Returns + ------- + int|float + """ + return self["opacity"] + + @opacity.setter + def opacity(self, val): + self["opacity"] = val + + @property + def outsidetextfont(self): + """ + Sets the font used for `textinfo` lying outside the sector. + This option refers to the root of the hierarchy presented at + the center of a sunburst graph. Please note that if a hierarchy + has multiple root nodes, this option won't have any effect and + `insidetextfont` would be used. + + The 'outsidetextfont' property is an instance of Outsidetextfont + that may be specified as: + - An instance of :class:`plotly.graph_objs.sunburst.Outsidetextfont` + - A dict of string/value properties that will be passed + to the Outsidetextfont constructor + + Returns + ------- + plotly.graph_objs.sunburst.Outsidetextfont + """ + return self["outsidetextfont"] + + @outsidetextfont.setter + def outsidetextfont(self, val): + self["outsidetextfont"] = val + + @property + def parents(self): + """ + Sets the parent sectors for each of the sectors. Empty string + items '' are understood to reference the root node in the + hierarchy. If `ids` is filled, `parents` items are understood + to be "ids" themselves. When `ids` is not set, plotly attempts + to find matching items in `labels`, but beware they must be + unique. + + The 'parents' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["parents"] + + @parents.setter + def parents(self, val): + self["parents"] = val + + @property + def parentssrc(self): + """ + Sets the source reference on Chart Studio Cloud for `parents`. + + The 'parentssrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["parentssrc"] + + @parentssrc.setter + def parentssrc(self, val): + self["parentssrc"] = val + + @property + def root(self): + """ + The 'root' property is an instance of Root + that may be specified as: + - An instance of :class:`plotly.graph_objs.sunburst.Root` + - A dict of string/value properties that will be passed + to the Root constructor + + Returns + ------- + plotly.graph_objs.sunburst.Root + """ + return self["root"] + + @root.setter + def root(self, val): + self["root"] = val + + @property + def rotation(self): + """ + Rotates the whole diagram counterclockwise by some angle. By + default the first slice starts at 3 o'clock. + + The 'rotation' property is a angle (in degrees) that may be + specified as a number between -180 and 180. + Numeric values outside this range are converted to the equivalent value + (e.g. 270 is converted to -90). + + Returns + ------- + int|float + """ + return self["rotation"] + + @rotation.setter + def rotation(self, val): + self["rotation"] = val + + @property + def sort(self): + """ + Determines whether or not the sectors are reordered from + largest to smallest. + + The 'sort' property is a boolean and must be specified as: + - A boolean value: True or False + + Returns + ------- + bool + """ + return self["sort"] + + @sort.setter + def sort(self, val): + self["sort"] = val + + @property + def stream(self): + """ + The 'stream' property is an instance of Stream + that may be specified as: + - An instance of :class:`plotly.graph_objs.sunburst.Stream` + - A dict of string/value properties that will be passed + to the Stream constructor + + Returns + ------- + plotly.graph_objs.sunburst.Stream + """ + return self["stream"] + + @stream.setter + def stream(self, val): + self["stream"] = val + + @property + def text(self): + """ + Sets text elements associated with each sector. If trace + `textinfo` contains a "text" flag, these elements will be seen + on the chart. If trace `hoverinfo` contains a "text" flag and + "hovertext" is not set, these elements will be seen in the + hover labels. + + The 'text' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["text"] + + @text.setter + def text(self, val): + self["text"] = val + + @property + def textfont(self): + """ + Sets the font used for `textinfo`. + + The 'textfont' property is an instance of Textfont + that may be specified as: + - An instance of :class:`plotly.graph_objs.sunburst.Textfont` + - A dict of string/value properties that will be passed + to the Textfont constructor + + Returns + ------- + plotly.graph_objs.sunburst.Textfont + """ + return self["textfont"] + + @textfont.setter + def textfont(self, val): + self["textfont"] = val + + @property + def textinfo(self): + """ + Determines which trace information appear on the graph. + + The 'textinfo' property is a flaglist and may be specified + as a string containing: + - Any combination of ['label', 'text', 'value', 'current path', 'percent root', 'percent entry', 'percent parent'] joined with '+' characters + (e.g. 'label+text') + OR exactly one of ['none'] (e.g. 'none') + + Returns + ------- + Any + """ + return self["textinfo"] + + @textinfo.setter + def textinfo(self, val): + self["textinfo"] = val + + @property + def textsrc(self): + """ + Sets the source reference on Chart Studio Cloud for `text`. + + The 'textsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["textsrc"] + + @textsrc.setter + def textsrc(self, val): + self["textsrc"] = val + + @property + def texttemplate(self): + """ + Template string used for rendering the information text that + appears on points. Note that this will override `textinfo`. + Variables are inserted using %{variable}, for example "y: + %{y}". Numbers are formatted using d3-format's syntax + %{variable:d3-format}, for example "Price: %{y:$.2f}". + https://github.com/d3/d3-format/tree/v1.4.5#d3-format for + details on the formatting syntax. Dates are formatted using + d3-time-format's syntax %{variable|d3-time-format}, for example + "Day: %{2019-01-01|%A}". https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format for details on the date + formatting syntax. Variables that can't be found will be + replaced with the specifier. For example, a template of "data: + %{x}, %{y}" will result in a value of "data: 1, %{y}" if x is 1 + and y is missing. Variables with an undefined value will be + replaced with the fallback value. All attributes that can be + specified per-point (the ones that are `arrayOk: true`) are + available. Finally, the template string has access to variables + `currentPath`, `root`, `entry`, `percentRoot`, `percentEntry`, + `percentParent`, `label` and `value`. + + The 'texttemplate' property is a string and must be specified as: + - A string + - A number that will be converted to a string + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["texttemplate"] + + @texttemplate.setter + def texttemplate(self, val): + self["texttemplate"] = val + + @property + def texttemplatefallback(self): + """ + Fallback string that's displayed when a variable referenced in + a template is missing. If the boolean value 'false' is passed + in, the specifier with the missing variable will be displayed. + + The 'texttemplatefallback' property accepts values of any type + + Returns + ------- + Any + """ + return self["texttemplatefallback"] + + @texttemplatefallback.setter + def texttemplatefallback(self, val): + self["texttemplatefallback"] = val + + @property + def texttemplatesrc(self): + """ + Sets the source reference on Chart Studio Cloud for + `texttemplate`. + + The 'texttemplatesrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["texttemplatesrc"] + + @texttemplatesrc.setter + def texttemplatesrc(self, val): + self["texttemplatesrc"] = val + + @property + def uid(self): + """ + Assign an id to this trace, Use this to provide object + constancy between traces during animations and transitions. + + The 'uid' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["uid"] + + @uid.setter + def uid(self, val): + self["uid"] = val + + @property + def uirevision(self): + """ + Controls persistence of some user-driven changes to the trace: + `constraintrange` in `parcoords` traces, as well as some + `editable: true` modifications such as `name` and + `colorbar.title`. Defaults to `layout.uirevision`. Note that + other user-driven trace attribute changes are controlled by + `layout` attributes: `trace.visible` is controlled by + `layout.legend.uirevision`, `selectedpoints` is controlled by + `layout.selectionrevision`, and `colorbar.(x|y)` (accessible + with `config: {editable: true}`) is controlled by + `layout.editrevision`. Trace changes are tracked by `uid`, + which only falls back on trace index if no `uid` is provided. + So if your app can add/remove traces before the end of the + `data` array, such that the same trace has a different index, + you can still preserve user-driven changes if you give each + trace a `uid` that stays with it as it moves. + + The 'uirevision' property accepts values of any type + + Returns + ------- + Any + """ + return self["uirevision"] + + @uirevision.setter + def uirevision(self, val): + self["uirevision"] = val + + @property + def values(self): + """ + Sets the values associated with each of the sectors. Use with + `branchvalues` to determine how the values are summed. + + The 'values' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["values"] + + @values.setter + def values(self, val): + self["values"] = val + + @property + def valuessrc(self): + """ + Sets the source reference on Chart Studio Cloud for `values`. + + The 'valuessrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["valuessrc"] + + @valuessrc.setter + def valuessrc(self, val): + self["valuessrc"] = val + + @property + def visible(self): + """ + Determines whether or not this trace is visible. If + "legendonly", the trace is not drawn, but can appear as a + legend item (provided that the legend itself is visible). + + The 'visible' property is an enumeration that may be specified as: + - One of the following enumeration values: + [True, False, 'legendonly'] + + Returns + ------- + Any + """ + return self["visible"] + + @visible.setter + def visible(self, val): + self["visible"] = val + + @property + def type(self): + return self._props["type"] + + @property + def _prop_descriptions(self): + return """\ + branchvalues + Determines how the items in `values` are summed. When + set to "total", items in `values` are taken to be value + of all its descendants. When set to "remainder", items + in `values` corresponding to the root and the branches + sectors are taken to be the extra part not part of the + sum of the values at their leaves. + count + Determines default for `values` when it is not + provided, by inferring a 1 for each of the "leaves" + and/or "branches", otherwise 0. + customdata + Assigns extra data each datum. This may be useful when + listening to hover, click and selection events. Note + that, "scatter" traces also appends customdata items in + the markers DOM elements + customdatasrc + Sets the source reference on Chart Studio Cloud for + `customdata`. + domain + :class:`plotly.graph_objects.sunburst.Domain` instance + or dict with compatible properties + hoverinfo + Determines which trace information appear on hover. If + `none` or `skip` are set, no information is displayed + upon hovering. But, if `none` is set, click and hover + events are still fired. + hoverinfosrc + Sets the source reference on Chart Studio Cloud for + `hoverinfo`. + hoverlabel + :class:`plotly.graph_objects.sunburst.Hoverlabel` + instance or dict with compatible properties + hovertemplate + Template string used for rendering the information that + appear on hover box. Note that this will override + `hoverinfo`. Variables are inserted using %{variable}, + for example "y: %{y}" as well as %{xother}, {%_xother}, + {%_xother_}, {%xother_}. When showing info for several + points, "xother" will be added to those with different + x positions from the first point. An underscore before + or after "(x|y)other" will add a space on that side, + only when this field is shown. Numbers are formatted + using d3-format's syntax %{variable:d3-format}, for + example "Price: %{y:$.2f}". + https://github.com/d3/d3-format/tree/v1.4.5#d3-format + for details on the formatting syntax. Dates are + formatted using d3-time-format's syntax + %{variable|d3-time-format}, for example "Day: + %{2019-01-01|%A}". https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format for details on the + date formatting syntax. Variables that can't be found + will be replaced with the specifier. For example, a + template of "data: %{x}, %{y}" will result in a value + of "data: 1, %{y}" if x is 1 and y is missing. + Variables with an undefined value will be replaced with + the fallback value. The variables available in + `hovertemplate` are the ones emitted as event data + described at this link + https://plotly.com/javascript/plotlyjs-events/#event- + data. Additionally, all attributes that can be + specified per-point (the ones that are `arrayOk: true`) + are available. Finally, the template string has access + to variables `currentPath`, `root`, `entry`, + `percentRoot`, `percentEntry` and `percentParent`. + Anything contained in tag `` is displayed in the + secondary box, for example + `%{fullData.name}`. To hide the + secondary box completely, use an empty tag + ``. + hovertemplatefallback + Fallback string that's displayed when a variable + referenced in a template is missing. If the boolean + value 'false' is passed in, the specifier with the + missing variable will be displayed. + hovertemplatesrc + Sets the source reference on Chart Studio Cloud for + `hovertemplate`. + hovertext + Sets hover text elements associated with each sector. + If a single string, the same string appears for all + data points. If an array of string, the items are + mapped in order of this trace's sectors. To be seen, + trace `hoverinfo` must contain a "text" flag. + hovertextsrc + Sets the source reference on Chart Studio Cloud for + `hovertext`. + ids + Assigns id labels to each datum. These ids for object + constancy of data points during animation. Should be an + array of strings, not numbers or any other type. + idssrc + Sets the source reference on Chart Studio Cloud for + `ids`. + insidetextfont + Sets the font used for `textinfo` lying inside the + sector. + insidetextorientation + Controls the orientation of the text inside chart + sectors. When set to "auto", text may be oriented in + any direction in order to be as big as possible in the + middle of a sector. The "horizontal" option orients + text to be parallel with the bottom of the chart, and + may make text smaller in order to achieve that goal. + The "radial" option orients text along the radius of + the sector. The "tangential" option orients text + perpendicular to the radius of the sector. + labels + Sets the labels of each of the sectors. + labelssrc + Sets the source reference on Chart Studio Cloud for + `labels`. + leaf + :class:`plotly.graph_objects.sunburst.Leaf` instance or + dict with compatible properties + legend + Sets the reference to a legend to show this trace in. + References to these legends are "legend", "legend2", + "legend3", etc. Settings for these legends are set in + the layout, under `layout.legend`, `layout.legend2`, + etc. + legendgrouptitle + :class:`plotly.graph_objects.sunburst.Legendgrouptitle` + instance or dict with compatible properties + legendrank + Sets the legend rank for this trace. Items and groups + with smaller ranks are presented on top/left side while + with "reversed" `legend.traceorder` they are on + bottom/right side. The default legendrank is 1000, so + that you can use ranks less than 1000 to place certain + items before all unranked items, and ranks greater than + 1000 to go after all unranked items. When having + unranked or equal rank items shapes would be displayed + after traces i.e. according to their order in data and + layout. + legendwidth + Sets the width (in px or fraction) of the legend for + this trace. + level + Sets the level from which this trace hierarchy is + rendered. Set `level` to `''` to start from the root + node in the hierarchy. Must be an "id" if `ids` is + filled in, otherwise plotly attempts to find a matching + item in `labels`. + marker + :class:`plotly.graph_objects.sunburst.Marker` instance + or dict with compatible properties + maxdepth + Sets the number of rendered sectors from any given + `level`. Set `maxdepth` to "-1" to render all the + levels in the hierarchy. + meta + Assigns extra meta information associated with this + trace that can be used in various text attributes. + Attributes such as trace `name`, graph, axis and + colorbar `title.text`, annotation `text` + `rangeselector`, `updatemenues` and `sliders` `label` + text all support `meta`. To access the trace `meta` + values in an attribute in the same trace, simply use + `%{meta[i]}` where `i` is the index or key of the + `meta` item in question. To access trace `meta` in + layout attributes, use `%{data[n[.meta[i]}` where `i` + is the index or key of the `meta` and `n` is the trace + index. + metasrc + Sets the source reference on Chart Studio Cloud for + `meta`. + name + Sets the trace name. The trace name appears as the + legend item and on hover. + opacity + Sets the opacity of the trace. + outsidetextfont + Sets the font used for `textinfo` lying outside the + sector. This option refers to the root of the hierarchy + presented at the center of a sunburst graph. Please + note that if a hierarchy has multiple root nodes, this + option won't have any effect and `insidetextfont` would + be used. + parents + Sets the parent sectors for each of the sectors. Empty + string items '' are understood to reference the root + node in the hierarchy. If `ids` is filled, `parents` + items are understood to be "ids" themselves. When `ids` + is not set, plotly attempts to find matching items in + `labels`, but beware they must be unique. + parentssrc + Sets the source reference on Chart Studio Cloud for + `parents`. + root + :class:`plotly.graph_objects.sunburst.Root` instance or + dict with compatible properties + rotation + Rotates the whole diagram counterclockwise by some + angle. By default the first slice starts at 3 o'clock. + sort + Determines whether or not the sectors are reordered + from largest to smallest. + stream + :class:`plotly.graph_objects.sunburst.Stream` instance + or dict with compatible properties + text + Sets text elements associated with each sector. If + trace `textinfo` contains a "text" flag, these elements + will be seen on the chart. If trace `hoverinfo` + contains a "text" flag and "hovertext" is not set, + these elements will be seen in the hover labels. + textfont + Sets the font used for `textinfo`. + textinfo + Determines which trace information appear on the graph. + textsrc + Sets the source reference on Chart Studio Cloud for + `text`. + texttemplate + Template string used for rendering the information text + that appears on points. Note that this will override + `textinfo`. Variables are inserted using %{variable}, + for example "y: %{y}". Numbers are formatted using + d3-format's syntax %{variable:d3-format}, for example + "Price: %{y:$.2f}". + https://github.com/d3/d3-format/tree/v1.4.5#d3-format + for details on the formatting syntax. Dates are + formatted using d3-time-format's syntax + %{variable|d3-time-format}, for example "Day: + %{2019-01-01|%A}". https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format for details on the + date formatting syntax. Variables that can't be found + will be replaced with the specifier. For example, a + template of "data: %{x}, %{y}" will result in a value + of "data: 1, %{y}" if x is 1 and y is missing. + Variables with an undefined value will be replaced with + the fallback value. All attributes that can be + specified per-point (the ones that are `arrayOk: true`) + are available. Finally, the template string has access + to variables `currentPath`, `root`, `entry`, + `percentRoot`, `percentEntry`, `percentParent`, `label` + and `value`. + texttemplatefallback + Fallback string that's displayed when a variable + referenced in a template is missing. If the boolean + value 'false' is passed in, the specifier with the + missing variable will be displayed. + texttemplatesrc + Sets the source reference on Chart Studio Cloud for + `texttemplate`. + uid + Assign an id to this trace, Use this to provide object + constancy between traces during animations and + transitions. + uirevision + Controls persistence of some user-driven changes to the + trace: `constraintrange` in `parcoords` traces, as well + as some `editable: true` modifications such as `name` + and `colorbar.title`. Defaults to `layout.uirevision`. + Note that other user-driven trace attribute changes are + controlled by `layout` attributes: `trace.visible` is + controlled by `layout.legend.uirevision`, + `selectedpoints` is controlled by + `layout.selectionrevision`, and `colorbar.(x|y)` + (accessible with `config: {editable: true}`) is + controlled by `layout.editrevision`. Trace changes are + tracked by `uid`, which only falls back on trace index + if no `uid` is provided. So if your app can add/remove + traces before the end of the `data` array, such that + the same trace has a different index, you can still + preserve user-driven changes if you give each trace a + `uid` that stays with it as it moves. + values + Sets the values associated with each of the sectors. + Use with `branchvalues` to determine how the values are + summed. + valuessrc + Sets the source reference on Chart Studio Cloud for + `values`. + visible + Determines whether or not this trace is visible. If + "legendonly", the trace is not drawn, but can appear as + a legend item (provided that the legend itself is + visible). + """ + + def __init__( + self, + arg=None, + branchvalues=None, + count=None, + customdata=None, + customdatasrc=None, + domain=None, + hoverinfo=None, + hoverinfosrc=None, + hoverlabel=None, + hovertemplate=None, + hovertemplatefallback=None, + hovertemplatesrc=None, + hovertext=None, + hovertextsrc=None, + ids=None, + idssrc=None, + insidetextfont=None, + insidetextorientation=None, + labels=None, + labelssrc=None, + leaf=None, + legend=None, + legendgrouptitle=None, + legendrank=None, + legendwidth=None, + level=None, + marker=None, + maxdepth=None, + meta=None, + metasrc=None, + name=None, + opacity=None, + outsidetextfont=None, + parents=None, + parentssrc=None, + root=None, + rotation=None, + sort=None, + stream=None, + text=None, + textfont=None, + textinfo=None, + textsrc=None, + texttemplate=None, + texttemplatefallback=None, + texttemplatesrc=None, + uid=None, + uirevision=None, + values=None, + valuessrc=None, + visible=None, + **kwargs, + ): + """ + Construct a new Sunburst object + + Visualize hierarchal data spanning outward radially from root + to leaves. The sunburst sectors are determined by the entries + in "labels" or "ids" and in "parents". + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of :class:`plotly.graph_objs.Sunburst` + branchvalues + Determines how the items in `values` are summed. When + set to "total", items in `values` are taken to be value + of all its descendants. When set to "remainder", items + in `values` corresponding to the root and the branches + sectors are taken to be the extra part not part of the + sum of the values at their leaves. + count + Determines default for `values` when it is not + provided, by inferring a 1 for each of the "leaves" + and/or "branches", otherwise 0. + customdata + Assigns extra data each datum. This may be useful when + listening to hover, click and selection events. Note + that, "scatter" traces also appends customdata items in + the markers DOM elements + customdatasrc + Sets the source reference on Chart Studio Cloud for + `customdata`. + domain + :class:`plotly.graph_objects.sunburst.Domain` instance + or dict with compatible properties + hoverinfo + Determines which trace information appear on hover. If + `none` or `skip` are set, no information is displayed + upon hovering. But, if `none` is set, click and hover + events are still fired. + hoverinfosrc + Sets the source reference on Chart Studio Cloud for + `hoverinfo`. + hoverlabel + :class:`plotly.graph_objects.sunburst.Hoverlabel` + instance or dict with compatible properties + hovertemplate + Template string used for rendering the information that + appear on hover box. Note that this will override + `hoverinfo`. Variables are inserted using %{variable}, + for example "y: %{y}" as well as %{xother}, {%_xother}, + {%_xother_}, {%xother_}. When showing info for several + points, "xother" will be added to those with different + x positions from the first point. An underscore before + or after "(x|y)other" will add a space on that side, + only when this field is shown. Numbers are formatted + using d3-format's syntax %{variable:d3-format}, for + example "Price: %{y:$.2f}". + https://github.com/d3/d3-format/tree/v1.4.5#d3-format + for details on the formatting syntax. Dates are + formatted using d3-time-format's syntax + %{variable|d3-time-format}, for example "Day: + %{2019-01-01|%A}". https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format for details on the + date formatting syntax. Variables that can't be found + will be replaced with the specifier. For example, a + template of "data: %{x}, %{y}" will result in a value + of "data: 1, %{y}" if x is 1 and y is missing. + Variables with an undefined value will be replaced with + the fallback value. The variables available in + `hovertemplate` are the ones emitted as event data + described at this link + https://plotly.com/javascript/plotlyjs-events/#event- + data. Additionally, all attributes that can be + specified per-point (the ones that are `arrayOk: true`) + are available. Finally, the template string has access + to variables `currentPath`, `root`, `entry`, + `percentRoot`, `percentEntry` and `percentParent`. + Anything contained in tag `` is displayed in the + secondary box, for example + `%{fullData.name}`. To hide the + secondary box completely, use an empty tag + ``. + hovertemplatefallback + Fallback string that's displayed when a variable + referenced in a template is missing. If the boolean + value 'false' is passed in, the specifier with the + missing variable will be displayed. + hovertemplatesrc + Sets the source reference on Chart Studio Cloud for + `hovertemplate`. + hovertext + Sets hover text elements associated with each sector. + If a single string, the same string appears for all + data points. If an array of string, the items are + mapped in order of this trace's sectors. To be seen, + trace `hoverinfo` must contain a "text" flag. + hovertextsrc + Sets the source reference on Chart Studio Cloud for + `hovertext`. + ids + Assigns id labels to each datum. These ids for object + constancy of data points during animation. Should be an + array of strings, not numbers or any other type. + idssrc + Sets the source reference on Chart Studio Cloud for + `ids`. + insidetextfont + Sets the font used for `textinfo` lying inside the + sector. + insidetextorientation + Controls the orientation of the text inside chart + sectors. When set to "auto", text may be oriented in + any direction in order to be as big as possible in the + middle of a sector. The "horizontal" option orients + text to be parallel with the bottom of the chart, and + may make text smaller in order to achieve that goal. + The "radial" option orients text along the radius of + the sector. The "tangential" option orients text + perpendicular to the radius of the sector. + labels + Sets the labels of each of the sectors. + labelssrc + Sets the source reference on Chart Studio Cloud for + `labels`. + leaf + :class:`plotly.graph_objects.sunburst.Leaf` instance or + dict with compatible properties + legend + Sets the reference to a legend to show this trace in. + References to these legends are "legend", "legend2", + "legend3", etc. Settings for these legends are set in + the layout, under `layout.legend`, `layout.legend2`, + etc. + legendgrouptitle + :class:`plotly.graph_objects.sunburst.Legendgrouptitle` + instance or dict with compatible properties + legendrank + Sets the legend rank for this trace. Items and groups + with smaller ranks are presented on top/left side while + with "reversed" `legend.traceorder` they are on + bottom/right side. The default legendrank is 1000, so + that you can use ranks less than 1000 to place certain + items before all unranked items, and ranks greater than + 1000 to go after all unranked items. When having + unranked or equal rank items shapes would be displayed + after traces i.e. according to their order in data and + layout. + legendwidth + Sets the width (in px or fraction) of the legend for + this trace. + level + Sets the level from which this trace hierarchy is + rendered. Set `level` to `''` to start from the root + node in the hierarchy. Must be an "id" if `ids` is + filled in, otherwise plotly attempts to find a matching + item in `labels`. + marker + :class:`plotly.graph_objects.sunburst.Marker` instance + or dict with compatible properties + maxdepth + Sets the number of rendered sectors from any given + `level`. Set `maxdepth` to "-1" to render all the + levels in the hierarchy. + meta + Assigns extra meta information associated with this + trace that can be used in various text attributes. + Attributes such as trace `name`, graph, axis and + colorbar `title.text`, annotation `text` + `rangeselector`, `updatemenues` and `sliders` `label` + text all support `meta`. To access the trace `meta` + values in an attribute in the same trace, simply use + `%{meta[i]}` where `i` is the index or key of the + `meta` item in question. To access trace `meta` in + layout attributes, use `%{data[n[.meta[i]}` where `i` + is the index or key of the `meta` and `n` is the trace + index. + metasrc + Sets the source reference on Chart Studio Cloud for + `meta`. + name + Sets the trace name. The trace name appears as the + legend item and on hover. + opacity + Sets the opacity of the trace. + outsidetextfont + Sets the font used for `textinfo` lying outside the + sector. This option refers to the root of the hierarchy + presented at the center of a sunburst graph. Please + note that if a hierarchy has multiple root nodes, this + option won't have any effect and `insidetextfont` would + be used. + parents + Sets the parent sectors for each of the sectors. Empty + string items '' are understood to reference the root + node in the hierarchy. If `ids` is filled, `parents` + items are understood to be "ids" themselves. When `ids` + is not set, plotly attempts to find matching items in + `labels`, but beware they must be unique. + parentssrc + Sets the source reference on Chart Studio Cloud for + `parents`. + root + :class:`plotly.graph_objects.sunburst.Root` instance or + dict with compatible properties + rotation + Rotates the whole diagram counterclockwise by some + angle. By default the first slice starts at 3 o'clock. + sort + Determines whether or not the sectors are reordered + from largest to smallest. + stream + :class:`plotly.graph_objects.sunburst.Stream` instance + or dict with compatible properties + text + Sets text elements associated with each sector. If + trace `textinfo` contains a "text" flag, these elements + will be seen on the chart. If trace `hoverinfo` + contains a "text" flag and "hovertext" is not set, + these elements will be seen in the hover labels. + textfont + Sets the font used for `textinfo`. + textinfo + Determines which trace information appear on the graph. + textsrc + Sets the source reference on Chart Studio Cloud for + `text`. + texttemplate + Template string used for rendering the information text + that appears on points. Note that this will override + `textinfo`. Variables are inserted using %{variable}, + for example "y: %{y}". Numbers are formatted using + d3-format's syntax %{variable:d3-format}, for example + "Price: %{y:$.2f}". + https://github.com/d3/d3-format/tree/v1.4.5#d3-format + for details on the formatting syntax. Dates are + formatted using d3-time-format's syntax + %{variable|d3-time-format}, for example "Day: + %{2019-01-01|%A}". https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format for details on the + date formatting syntax. Variables that can't be found + will be replaced with the specifier. For example, a + template of "data: %{x}, %{y}" will result in a value + of "data: 1, %{y}" if x is 1 and y is missing. + Variables with an undefined value will be replaced with + the fallback value. All attributes that can be + specified per-point (the ones that are `arrayOk: true`) + are available. Finally, the template string has access + to variables `currentPath`, `root`, `entry`, + `percentRoot`, `percentEntry`, `percentParent`, `label` + and `value`. + texttemplatefallback + Fallback string that's displayed when a variable + referenced in a template is missing. If the boolean + value 'false' is passed in, the specifier with the + missing variable will be displayed. + texttemplatesrc + Sets the source reference on Chart Studio Cloud for + `texttemplate`. + uid + Assign an id to this trace, Use this to provide object + constancy between traces during animations and + transitions. + uirevision + Controls persistence of some user-driven changes to the + trace: `constraintrange` in `parcoords` traces, as well + as some `editable: true` modifications such as `name` + and `colorbar.title`. Defaults to `layout.uirevision`. + Note that other user-driven trace attribute changes are + controlled by `layout` attributes: `trace.visible` is + controlled by `layout.legend.uirevision`, + `selectedpoints` is controlled by + `layout.selectionrevision`, and `colorbar.(x|y)` + (accessible with `config: {editable: true}`) is + controlled by `layout.editrevision`. Trace changes are + tracked by `uid`, which only falls back on trace index + if no `uid` is provided. So if your app can add/remove + traces before the end of the `data` array, such that + the same trace has a different index, you can still + preserve user-driven changes if you give each trace a + `uid` that stays with it as it moves. + values + Sets the values associated with each of the sectors. + Use with `branchvalues` to determine how the values are + summed. + valuessrc + Sets the source reference on Chart Studio Cloud for + `values`. + visible + Determines whether or not this trace is visible. If + "legendonly", the trace is not drawn, but can appear as + a legend item (provided that the legend itself is + visible). + + Returns + ------- + Sunburst + """ + super().__init__("sunburst") + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + if arg is None: + arg = {} + elif isinstance(arg, self.__class__): + arg = arg.to_plotly_json() + elif isinstance(arg, dict): + arg = _copy.copy(arg) + else: + raise ValueError("""\ +The first argument to the plotly.graph_objs.Sunburst +constructor must be a dict or +an instance of :class:`plotly.graph_objs.Sunburst`""") + + self._skip_invalid = kwargs.pop("skip_invalid", False) + self._validate = kwargs.pop("_validate", True) + + self._set_property("branchvalues", arg, branchvalues) + self._set_property("count", arg, count) + self._set_property("customdata", arg, customdata) + self._set_property("customdatasrc", arg, customdatasrc) + self._set_property("domain", arg, domain) + self._set_property("hoverinfo", arg, hoverinfo) + self._set_property("hoverinfosrc", arg, hoverinfosrc) + self._set_property("hoverlabel", arg, hoverlabel) + self._set_property("hovertemplate", arg, hovertemplate) + self._set_property("hovertemplatefallback", arg, hovertemplatefallback) + self._set_property("hovertemplatesrc", arg, hovertemplatesrc) + self._set_property("hovertext", arg, hovertext) + self._set_property("hovertextsrc", arg, hovertextsrc) + self._set_property("ids", arg, ids) + self._set_property("idssrc", arg, idssrc) + self._set_property("insidetextfont", arg, insidetextfont) + self._set_property("insidetextorientation", arg, insidetextorientation) + self._set_property("labels", arg, labels) + self._set_property("labelssrc", arg, labelssrc) + self._set_property("leaf", arg, leaf) + self._set_property("legend", arg, legend) + self._set_property("legendgrouptitle", arg, legendgrouptitle) + self._set_property("legendrank", arg, legendrank) + self._set_property("legendwidth", arg, legendwidth) + self._set_property("level", arg, level) + self._set_property("marker", arg, marker) + self._set_property("maxdepth", arg, maxdepth) + self._set_property("meta", arg, meta) + self._set_property("metasrc", arg, metasrc) + self._set_property("name", arg, name) + self._set_property("opacity", arg, opacity) + self._set_property("outsidetextfont", arg, outsidetextfont) + self._set_property("parents", arg, parents) + self._set_property("parentssrc", arg, parentssrc) + self._set_property("root", arg, root) + self._set_property("rotation", arg, rotation) + self._set_property("sort", arg, sort) + self._set_property("stream", arg, stream) + self._set_property("text", arg, text) + self._set_property("textfont", arg, textfont) + self._set_property("textinfo", arg, textinfo) + self._set_property("textsrc", arg, textsrc) + self._set_property("texttemplate", arg, texttemplate) + self._set_property("texttemplatefallback", arg, texttemplatefallback) + self._set_property("texttemplatesrc", arg, texttemplatesrc) + self._set_property("uid", arg, uid) + self._set_property("uirevision", arg, uirevision) + self._set_property("values", arg, values) + self._set_property("valuessrc", arg, valuessrc) + self._set_property("visible", arg, visible) + + self._props["type"] = "sunburst" + arg.pop("type", None) + self._process_kwargs(**dict(arg, **kwargs)) + self._skip_invalid = False diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/_surface.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/_surface.py new file mode 100644 index 0000000000000000000000000000000000000000..8a1dddc8b7193a3016e3e04c2bd12e9d314738af --- /dev/null +++ b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/_surface.py @@ -0,0 +1,2187 @@ +# --- THIS FILE IS AUTO-GENERATED --- +# Modifications will be overwitten the next time code generation run. + +from plotly.basedatatypes import BaseTraceType as _BaseTraceType +import copy as _copy + + +class Surface(_BaseTraceType): + _parent_path_str = "" + _path_str = "surface" + _valid_props = { + "autocolorscale", + "cauto", + "cmax", + "cmid", + "cmin", + "coloraxis", + "colorbar", + "colorscale", + "connectgaps", + "contours", + "customdata", + "customdatasrc", + "hidesurface", + "hoverinfo", + "hoverinfosrc", + "hoverlabel", + "hovertemplate", + "hovertemplatefallback", + "hovertemplatesrc", + "hovertext", + "hovertextsrc", + "ids", + "idssrc", + "legend", + "legendgroup", + "legendgrouptitle", + "legendrank", + "legendwidth", + "lighting", + "lightposition", + "meta", + "metasrc", + "name", + "opacity", + "opacityscale", + "reversescale", + "scene", + "showlegend", + "showscale", + "stream", + "surfacecolor", + "surfacecolorsrc", + "text", + "textsrc", + "type", + "uid", + "uirevision", + "visible", + "x", + "xcalendar", + "xhoverformat", + "xsrc", + "y", + "ycalendar", + "yhoverformat", + "ysrc", + "z", + "zcalendar", + "zhoverformat", + "zsrc", + } + + @property + def autocolorscale(self): + """ + Determines whether the colorscale is a default palette + (`autocolorscale: true`) or the palette determined by + `colorscale`. In case `colorscale` is unspecified or + `autocolorscale` is true, the default palette will be chosen + according to whether numbers in the `color` array are all + positive, all negative or mixed. + + The 'autocolorscale' property is a boolean and must be specified as: + - A boolean value: True or False + + Returns + ------- + bool + """ + return self["autocolorscale"] + + @autocolorscale.setter + def autocolorscale(self, val): + self["autocolorscale"] = val + + @property + def cauto(self): + """ + Determines whether or not the color domain is computed with + respect to the input data (here z or surfacecolor) or the + bounds set in `cmin` and `cmax` Defaults to `false` when `cmin` + and `cmax` are set by the user. + + The 'cauto' property is a boolean and must be specified as: + - A boolean value: True or False + + Returns + ------- + bool + """ + return self["cauto"] + + @cauto.setter + def cauto(self, val): + self["cauto"] = val + + @property + def cmax(self): + """ + Sets the upper bound of the color domain. Value should have the + same units as z or surfacecolor and if set, `cmin` must be set + as well. + + The 'cmax' property is a number and may be specified as: + - An int or float + + Returns + ------- + int|float + """ + return self["cmax"] + + @cmax.setter + def cmax(self, val): + self["cmax"] = val + + @property + def cmid(self): + """ + Sets the mid-point of the color domain by scaling `cmin` and/or + `cmax` to be equidistant to this point. Value should have the + same units as z or surfacecolor. Has no effect when `cauto` is + `false`. + + The 'cmid' property is a number and may be specified as: + - An int or float + + Returns + ------- + int|float + """ + return self["cmid"] + + @cmid.setter + def cmid(self, val): + self["cmid"] = val + + @property + def cmin(self): + """ + Sets the lower bound of the color domain. Value should have the + same units as z or surfacecolor and if set, `cmax` must be set + as well. + + The 'cmin' property is a number and may be specified as: + - An int or float + + Returns + ------- + int|float + """ + return self["cmin"] + + @cmin.setter + def cmin(self, val): + self["cmin"] = val + + @property + def coloraxis(self): + """ + Sets a reference to a shared color axis. References to these + shared color axes are "coloraxis", "coloraxis2", "coloraxis3", + etc. Settings for these shared color axes are set in the + layout, under `layout.coloraxis`, `layout.coloraxis2`, etc. + Note that multiple color scales can be linked to the same color + axis. + + The 'coloraxis' property is an identifier of a particular + subplot, of type 'coloraxis', that may be specified as: + - the string 'coloraxis' optionally followed by an integer >= 1 + (e.g. 'coloraxis', 'coloraxis1', 'coloraxis2', 'coloraxis3', etc.) + + Returns + ------- + str + """ + return self["coloraxis"] + + @coloraxis.setter + def coloraxis(self, val): + self["coloraxis"] = val + + @property + def colorbar(self): + """ + The 'colorbar' property is an instance of ColorBar + that may be specified as: + - An instance of :class:`plotly.graph_objs.surface.ColorBar` + - A dict of string/value properties that will be passed + to the ColorBar constructor + + Returns + ------- + plotly.graph_objs.surface.ColorBar + """ + return self["colorbar"] + + @colorbar.setter + def colorbar(self, val): + self["colorbar"] = val + + @property + def colorscale(self): + """ + Sets the colorscale. The colorscale must be an array containing + arrays mapping a normalized value to an rgb, rgba, hex, hsl, + hsv, or named color string. At minimum, a mapping for the + lowest (0) and highest (1) values are required. For example, + `[[0, 'rgb(0,0,255)'], [1, 'rgb(255,0,0)']]`. To control the + bounds of the colorscale in color space, use `cmin` and `cmax`. + Alternatively, `colorscale` may be a palette name string of the + following list: Blackbody,Bluered,Blues,Cividis,Earth,Electric, + Greens,Greys,Hot,Jet,Picnic,Portland,Rainbow,RdBu,Reds,Viridis, + YlGnBu,YlOrRd. + + The 'colorscale' property is a colorscale and may be + specified as: + - A list of colors that will be spaced evenly to create the colorscale. + Many predefined colorscale lists are included in the sequential, diverging, + and cyclical modules in the plotly.colors package. + - A list of 2-element lists where the first element is the + normalized color level value (starting at 0 and ending at 1), + and the second item is a valid color string. + (e.g. [[0, 'green'], [0.5, 'red'], [1.0, 'rgb(0, 0, 255)']]) + - One of the following named colorscales: + ['aggrnyl', 'agsunset', 'algae', 'amp', 'armyrose', 'balance', + 'blackbody', 'bluered', 'blues', 'blugrn', 'bluyl', 'brbg', + 'brwnyl', 'bugn', 'bupu', 'burg', 'burgyl', 'cividis', 'curl', + 'darkmint', 'deep', 'delta', 'dense', 'earth', 'edge', 'electric', + 'emrld', 'fall', 'geyser', 'gnbu', 'gray', 'greens', 'greys', + 'haline', 'hot', 'hsv', 'ice', 'icefire', 'inferno', 'jet', + 'magenta', 'magma', 'matter', 'mint', 'mrybm', 'mygbm', 'oranges', + 'orrd', 'oryel', 'oxy', 'peach', 'phase', 'picnic', 'pinkyl', + 'piyg', 'plasma', 'plotly3', 'portland', 'prgn', 'pubu', 'pubugn', + 'puor', 'purd', 'purp', 'purples', 'purpor', 'rainbow', 'rdbu', + 'rdgy', 'rdpu', 'rdylbu', 'rdylgn', 'redor', 'reds', 'solar', + 'spectral', 'speed', 'sunset', 'sunsetdark', 'teal', 'tealgrn', + 'tealrose', 'tempo', 'temps', 'thermal', 'tropic', 'turbid', + 'turbo', 'twilight', 'viridis', 'ylgn', 'ylgnbu', 'ylorbr', + 'ylorrd']. + Appending '_r' to a named colorscale reverses it. + + Returns + ------- + str + """ + return self["colorscale"] + + @colorscale.setter + def colorscale(self, val): + self["colorscale"] = val + + @property + def connectgaps(self): + """ + Determines whether or not gaps (i.e. {nan} or missing values) + in the `z` data are filled in. + + The 'connectgaps' property is a boolean and must be specified as: + - A boolean value: True or False + + Returns + ------- + bool + """ + return self["connectgaps"] + + @connectgaps.setter + def connectgaps(self, val): + self["connectgaps"] = val + + @property + def contours(self): + """ + The 'contours' property is an instance of Contours + that may be specified as: + - An instance of :class:`plotly.graph_objs.surface.Contours` + - A dict of string/value properties that will be passed + to the Contours constructor + + Returns + ------- + plotly.graph_objs.surface.Contours + """ + return self["contours"] + + @contours.setter + def contours(self, val): + self["contours"] = val + + @property + def customdata(self): + """ + Assigns extra data each datum. This may be useful when + listening to hover, click and selection events. Note that, + "scatter" traces also appends customdata items in the markers + DOM elements + + The 'customdata' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["customdata"] + + @customdata.setter + def customdata(self, val): + self["customdata"] = val + + @property + def customdatasrc(self): + """ + Sets the source reference on Chart Studio Cloud for + `customdata`. + + The 'customdatasrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["customdatasrc"] + + @customdatasrc.setter + def customdatasrc(self, val): + self["customdatasrc"] = val + + @property + def hidesurface(self): + """ + Determines whether or not a surface is drawn. For example, set + `hidesurface` to False `contours.x.show` to True and + `contours.y.show` to True to draw a wire frame plot. + + The 'hidesurface' property is a boolean and must be specified as: + - A boolean value: True or False + + Returns + ------- + bool + """ + return self["hidesurface"] + + @hidesurface.setter + def hidesurface(self, val): + self["hidesurface"] = val + + @property + def hoverinfo(self): + """ + Determines which trace information appear on hover. If `none` + or `skip` are set, no information is displayed upon hovering. + But, if `none` is set, click and hover events are still fired. + + The 'hoverinfo' property is a flaglist and may be specified + as a string containing: + - Any combination of ['x', 'y', 'z', 'text', 'name'] joined with '+' characters + (e.g. 'x+y') + OR exactly one of ['all', 'none', 'skip'] (e.g. 'skip') + - A list or array of the above + + Returns + ------- + Any|numpy.ndarray + """ + return self["hoverinfo"] + + @hoverinfo.setter + def hoverinfo(self, val): + self["hoverinfo"] = val + + @property + def hoverinfosrc(self): + """ + Sets the source reference on Chart Studio Cloud for + `hoverinfo`. + + The 'hoverinfosrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["hoverinfosrc"] + + @hoverinfosrc.setter + def hoverinfosrc(self, val): + self["hoverinfosrc"] = val + + @property + def hoverlabel(self): + """ + The 'hoverlabel' property is an instance of Hoverlabel + that may be specified as: + - An instance of :class:`plotly.graph_objs.surface.Hoverlabel` + - A dict of string/value properties that will be passed + to the Hoverlabel constructor + + Returns + ------- + plotly.graph_objs.surface.Hoverlabel + """ + return self["hoverlabel"] + + @hoverlabel.setter + def hoverlabel(self, val): + self["hoverlabel"] = val + + @property + def hovertemplate(self): + """ + Template string used for rendering the information that appear + on hover box. Note that this will override `hoverinfo`. + Variables are inserted using %{variable}, for example "y: %{y}" + as well as %{xother}, {%_xother}, {%_xother_}, {%xother_}. When + showing info for several points, "xother" will be added to + those with different x positions from the first point. An + underscore before or after "(x|y)other" will add a space on + that side, only when this field is shown. Numbers are formatted + using d3-format's syntax %{variable:d3-format}, for example + "Price: %{y:$.2f}". + https://github.com/d3/d3-format/tree/v1.4.5#d3-format for + details on the formatting syntax. Dates are formatted using + d3-time-format's syntax %{variable|d3-time-format}, for example + "Day: %{2019-01-01|%A}". https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format for details on the date + formatting syntax. Variables that can't be found will be + replaced with the specifier. For example, a template of "data: + %{x}, %{y}" will result in a value of "data: 1, %{y}" if x is 1 + and y is missing. Variables with an undefined value will be + replaced with the fallback value. The variables available in + `hovertemplate` are the ones emitted as event data described at + this link https://plotly.com/javascript/plotlyjs-events/#event- + data. Additionally, all attributes that can be specified per- + point (the ones that are `arrayOk: true`) are available. + Anything contained in tag `` is displayed in the + secondary box, for example `%{fullData.name}`. + To hide the secondary box completely, use an empty tag + ``. + + The 'hovertemplate' property is a string and must be specified as: + - A string + - A number that will be converted to a string + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["hovertemplate"] + + @hovertemplate.setter + def hovertemplate(self, val): + self["hovertemplate"] = val + + @property + def hovertemplatefallback(self): + """ + Fallback string that's displayed when a variable referenced in + a template is missing. If the boolean value 'false' is passed + in, the specifier with the missing variable will be displayed. + + The 'hovertemplatefallback' property accepts values of any type + + Returns + ------- + Any + """ + return self["hovertemplatefallback"] + + @hovertemplatefallback.setter + def hovertemplatefallback(self, val): + self["hovertemplatefallback"] = val + + @property + def hovertemplatesrc(self): + """ + Sets the source reference on Chart Studio Cloud for + `hovertemplate`. + + The 'hovertemplatesrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["hovertemplatesrc"] + + @hovertemplatesrc.setter + def hovertemplatesrc(self, val): + self["hovertemplatesrc"] = val + + @property + def hovertext(self): + """ + Same as `text`. + + The 'hovertext' property is a string and must be specified as: + - A string + - A number that will be converted to a string + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["hovertext"] + + @hovertext.setter + def hovertext(self, val): + self["hovertext"] = val + + @property + def hovertextsrc(self): + """ + Sets the source reference on Chart Studio Cloud for + `hovertext`. + + The 'hovertextsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["hovertextsrc"] + + @hovertextsrc.setter + def hovertextsrc(self, val): + self["hovertextsrc"] = val + + @property + def ids(self): + """ + Assigns id labels to each datum. These ids for object constancy + of data points during animation. Should be an array of strings, + not numbers or any other type. + + The 'ids' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["ids"] + + @ids.setter + def ids(self, val): + self["ids"] = val + + @property + def idssrc(self): + """ + Sets the source reference on Chart Studio Cloud for `ids`. + + The 'idssrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["idssrc"] + + @idssrc.setter + def idssrc(self, val): + self["idssrc"] = val + + @property + def legend(self): + """ + Sets the reference to a legend to show this trace in. + References to these legends are "legend", "legend2", "legend3", + etc. Settings for these legends are set in the layout, under + `layout.legend`, `layout.legend2`, etc. + + The 'legend' property is an identifier of a particular + subplot, of type 'legend', that may be specified as: + - the string 'legend' optionally followed by an integer >= 1 + (e.g. 'legend', 'legend1', 'legend2', 'legend3', etc.) + + Returns + ------- + str + """ + return self["legend"] + + @legend.setter + def legend(self, val): + self["legend"] = val + + @property + def legendgroup(self): + """ + Sets the legend group for this trace. Traces and shapes part of + the same legend group hide/show at the same time when toggling + legend items. + + The 'legendgroup' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["legendgroup"] + + @legendgroup.setter + def legendgroup(self, val): + self["legendgroup"] = val + + @property + def legendgrouptitle(self): + """ + The 'legendgrouptitle' property is an instance of Legendgrouptitle + that may be specified as: + - An instance of :class:`plotly.graph_objs.surface.Legendgrouptitle` + - A dict of string/value properties that will be passed + to the Legendgrouptitle constructor + + Returns + ------- + plotly.graph_objs.surface.Legendgrouptitle + """ + return self["legendgrouptitle"] + + @legendgrouptitle.setter + def legendgrouptitle(self, val): + self["legendgrouptitle"] = val + + @property + def legendrank(self): + """ + Sets the legend rank for this trace. Items and groups with + smaller ranks are presented on top/left side while with + "reversed" `legend.traceorder` they are on bottom/right side. + The default legendrank is 1000, so that you can use ranks less + than 1000 to place certain items before all unranked items, and + ranks greater than 1000 to go after all unranked items. When + having unranked or equal rank items shapes would be displayed + after traces i.e. according to their order in data and layout. + + The 'legendrank' property is a number and may be specified as: + - An int or float + + Returns + ------- + int|float + """ + return self["legendrank"] + + @legendrank.setter + def legendrank(self, val): + self["legendrank"] = val + + @property + def legendwidth(self): + """ + Sets the width (in px or fraction) of the legend for this + trace. + + The 'legendwidth' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["legendwidth"] + + @legendwidth.setter + def legendwidth(self, val): + self["legendwidth"] = val + + @property + def lighting(self): + """ + The 'lighting' property is an instance of Lighting + that may be specified as: + - An instance of :class:`plotly.graph_objs.surface.Lighting` + - A dict of string/value properties that will be passed + to the Lighting constructor + + Returns + ------- + plotly.graph_objs.surface.Lighting + """ + return self["lighting"] + + @lighting.setter + def lighting(self, val): + self["lighting"] = val + + @property + def lightposition(self): + """ + The 'lightposition' property is an instance of Lightposition + that may be specified as: + - An instance of :class:`plotly.graph_objs.surface.Lightposition` + - A dict of string/value properties that will be passed + to the Lightposition constructor + + Returns + ------- + plotly.graph_objs.surface.Lightposition + """ + return self["lightposition"] + + @lightposition.setter + def lightposition(self, val): + self["lightposition"] = val + + @property + def meta(self): + """ + Assigns extra meta information associated with this trace that + can be used in various text attributes. Attributes such as + trace `name`, graph, axis and colorbar `title.text`, annotation + `text` `rangeselector`, `updatemenues` and `sliders` `label` + text all support `meta`. To access the trace `meta` values in + an attribute in the same trace, simply use `%{meta[i]}` where + `i` is the index or key of the `meta` item in question. To + access trace `meta` in layout attributes, use + `%{data[n[.meta[i]}` where `i` is the index or key of the + `meta` and `n` is the trace index. + + The 'meta' property accepts values of any type + + Returns + ------- + Any|numpy.ndarray + """ + return self["meta"] + + @meta.setter + def meta(self, val): + self["meta"] = val + + @property + def metasrc(self): + """ + Sets the source reference on Chart Studio Cloud for `meta`. + + The 'metasrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["metasrc"] + + @metasrc.setter + def metasrc(self, val): + self["metasrc"] = val + + @property + def name(self): + """ + Sets the trace name. The trace name appears as the legend item + and on hover. + + The 'name' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["name"] + + @name.setter + def name(self, val): + self["name"] = val + + @property + def opacity(self): + """ + Sets the opacity of the surface. Please note that in the case + of using high `opacity` values for example a value greater than + or equal to 0.5 on two surfaces (and 0.25 with four surfaces), + an overlay of multiple transparent surfaces may not perfectly + be sorted in depth by the webgl API. This behavior may be + improved in the near future and is subject to change. + + The 'opacity' property is a number and may be specified as: + - An int or float in the interval [0, 1] + + Returns + ------- + int|float + """ + return self["opacity"] + + @opacity.setter + def opacity(self, val): + self["opacity"] = val + + @property + def opacityscale(self): + """ + Sets the opacityscale. The opacityscale must be an array + containing arrays mapping a normalized value to an opacity + value. At minimum, a mapping for the lowest (0) and highest (1) + values are required. For example, `[[0, 1], [0.5, 0.2], [1, + 1]]` means that higher/lower values would have higher opacity + values and those in the middle would be more transparent + Alternatively, `opacityscale` may be a palette name string of + the following list: 'min', 'max', 'extremes' and 'uniform'. The + default is 'uniform'. + + The 'opacityscale' property accepts values of any type + + Returns + ------- + Any + """ + return self["opacityscale"] + + @opacityscale.setter + def opacityscale(self, val): + self["opacityscale"] = val + + @property + def reversescale(self): + """ + Reverses the color mapping if true. If true, `cmin` will + correspond to the last color in the array and `cmax` will + correspond to the first color. + + The 'reversescale' property is a boolean and must be specified as: + - A boolean value: True or False + + Returns + ------- + bool + """ + return self["reversescale"] + + @reversescale.setter + def reversescale(self, val): + self["reversescale"] = val + + @property + def scene(self): + """ + Sets a reference between this trace's 3D coordinate system and + a 3D scene. If "scene" (the default value), the (x,y,z) + coordinates refer to `layout.scene`. If "scene2", the (x,y,z) + coordinates refer to `layout.scene2`, and so on. + + The 'scene' property is an identifier of a particular + subplot, of type 'scene', that may be specified as: + - the string 'scene' optionally followed by an integer >= 1 + (e.g. 'scene', 'scene1', 'scene2', 'scene3', etc.) + + Returns + ------- + str + """ + return self["scene"] + + @scene.setter + def scene(self, val): + self["scene"] = val + + @property + def showlegend(self): + """ + Determines whether or not an item corresponding to this trace + is shown in the legend. + + The 'showlegend' property is a boolean and must be specified as: + - A boolean value: True or False + + Returns + ------- + bool + """ + return self["showlegend"] + + @showlegend.setter + def showlegend(self, val): + self["showlegend"] = val + + @property + def showscale(self): + """ + Determines whether or not a colorbar is displayed for this + trace. + + The 'showscale' property is a boolean and must be specified as: + - A boolean value: True or False + + Returns + ------- + bool + """ + return self["showscale"] + + @showscale.setter + def showscale(self, val): + self["showscale"] = val + + @property + def stream(self): + """ + The 'stream' property is an instance of Stream + that may be specified as: + - An instance of :class:`plotly.graph_objs.surface.Stream` + - A dict of string/value properties that will be passed + to the Stream constructor + + Returns + ------- + plotly.graph_objs.surface.Stream + """ + return self["stream"] + + @stream.setter + def stream(self, val): + self["stream"] = val + + @property + def surfacecolor(self): + """ + Sets the surface color values, used for setting a color scale + independent of `z`. + + The 'surfacecolor' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["surfacecolor"] + + @surfacecolor.setter + def surfacecolor(self, val): + self["surfacecolor"] = val + + @property + def surfacecolorsrc(self): + """ + Sets the source reference on Chart Studio Cloud for + `surfacecolor`. + + The 'surfacecolorsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["surfacecolorsrc"] + + @surfacecolorsrc.setter + def surfacecolorsrc(self, val): + self["surfacecolorsrc"] = val + + @property + def text(self): + """ + Sets the text elements associated with each z value. If trace + `hoverinfo` contains a "text" flag and "hovertext" is not set, + these elements will be seen in the hover labels. + + The 'text' property is a string and must be specified as: + - A string + - A number that will be converted to a string + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["text"] + + @text.setter + def text(self, val): + self["text"] = val + + @property + def textsrc(self): + """ + Sets the source reference on Chart Studio Cloud for `text`. + + The 'textsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["textsrc"] + + @textsrc.setter + def textsrc(self, val): + self["textsrc"] = val + + @property + def uid(self): + """ + Assign an id to this trace, Use this to provide object + constancy between traces during animations and transitions. + + The 'uid' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["uid"] + + @uid.setter + def uid(self, val): + self["uid"] = val + + @property + def uirevision(self): + """ + Controls persistence of some user-driven changes to the trace: + `constraintrange` in `parcoords` traces, as well as some + `editable: true` modifications such as `name` and + `colorbar.title`. Defaults to `layout.uirevision`. Note that + other user-driven trace attribute changes are controlled by + `layout` attributes: `trace.visible` is controlled by + `layout.legend.uirevision`, `selectedpoints` is controlled by + `layout.selectionrevision`, and `colorbar.(x|y)` (accessible + with `config: {editable: true}`) is controlled by + `layout.editrevision`. Trace changes are tracked by `uid`, + which only falls back on trace index if no `uid` is provided. + So if your app can add/remove traces before the end of the + `data` array, such that the same trace has a different index, + you can still preserve user-driven changes if you give each + trace a `uid` that stays with it as it moves. + + The 'uirevision' property accepts values of any type + + Returns + ------- + Any + """ + return self["uirevision"] + + @uirevision.setter + def uirevision(self, val): + self["uirevision"] = val + + @property + def visible(self): + """ + Determines whether or not this trace is visible. If + "legendonly", the trace is not drawn, but can appear as a + legend item (provided that the legend itself is visible). + + The 'visible' property is an enumeration that may be specified as: + - One of the following enumeration values: + [True, False, 'legendonly'] + + Returns + ------- + Any + """ + return self["visible"] + + @visible.setter + def visible(self, val): + self["visible"] = val + + @property + def x(self): + """ + Sets the x coordinates. + + The 'x' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["x"] + + @x.setter + def x(self, val): + self["x"] = val + + @property + def xcalendar(self): + """ + Sets the calendar system to use with `x` date data. + + The 'xcalendar' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['chinese', 'coptic', 'discworld', 'ethiopian', + 'gregorian', 'hebrew', 'islamic', 'jalali', 'julian', + 'mayan', 'nanakshahi', 'nepali', 'persian', 'taiwan', + 'thai', 'ummalqura'] + + Returns + ------- + Any + """ + return self["xcalendar"] + + @xcalendar.setter + def xcalendar(self, val): + self["xcalendar"] = val + + @property + def xhoverformat(self): + """ + Sets the hover text formatting rulefor `x` using d3 formatting + mini-languages which are very similar to those in Python. For + numbers, see: + https://github.com/d3/d3-format/tree/v1.4.5#d3-format. And for + dates see: https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format. We add two items to d3's date + formatter: "%h" for half of the year as a decimal number as + well as "%{n}f" for fractional seconds with n digits. For + example, *2016-10-13 09:15:23.456* with tickformat + "%H~%M~%S.%2f" would display *09~15~23.46*By default the values + are formatted using `xaxis.hoverformat`. + + The 'xhoverformat' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["xhoverformat"] + + @xhoverformat.setter + def xhoverformat(self, val): + self["xhoverformat"] = val + + @property + def xsrc(self): + """ + Sets the source reference on Chart Studio Cloud for `x`. + + The 'xsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["xsrc"] + + @xsrc.setter + def xsrc(self, val): + self["xsrc"] = val + + @property + def y(self): + """ + Sets the y coordinates. + + The 'y' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["y"] + + @y.setter + def y(self, val): + self["y"] = val + + @property + def ycalendar(self): + """ + Sets the calendar system to use with `y` date data. + + The 'ycalendar' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['chinese', 'coptic', 'discworld', 'ethiopian', + 'gregorian', 'hebrew', 'islamic', 'jalali', 'julian', + 'mayan', 'nanakshahi', 'nepali', 'persian', 'taiwan', + 'thai', 'ummalqura'] + + Returns + ------- + Any + """ + return self["ycalendar"] + + @ycalendar.setter + def ycalendar(self, val): + self["ycalendar"] = val + + @property + def yhoverformat(self): + """ + Sets the hover text formatting rulefor `y` using d3 formatting + mini-languages which are very similar to those in Python. For + numbers, see: + https://github.com/d3/d3-format/tree/v1.4.5#d3-format. And for + dates see: https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format. We add two items to d3's date + formatter: "%h" for half of the year as a decimal number as + well as "%{n}f" for fractional seconds with n digits. For + example, *2016-10-13 09:15:23.456* with tickformat + "%H~%M~%S.%2f" would display *09~15~23.46*By default the values + are formatted using `yaxis.hoverformat`. + + The 'yhoverformat' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["yhoverformat"] + + @yhoverformat.setter + def yhoverformat(self, val): + self["yhoverformat"] = val + + @property + def ysrc(self): + """ + Sets the source reference on Chart Studio Cloud for `y`. + + The 'ysrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["ysrc"] + + @ysrc.setter + def ysrc(self, val): + self["ysrc"] = val + + @property + def z(self): + """ + Sets the z coordinates. + + The 'z' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["z"] + + @z.setter + def z(self, val): + self["z"] = val + + @property + def zcalendar(self): + """ + Sets the calendar system to use with `z` date data. + + The 'zcalendar' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['chinese', 'coptic', 'discworld', 'ethiopian', + 'gregorian', 'hebrew', 'islamic', 'jalali', 'julian', + 'mayan', 'nanakshahi', 'nepali', 'persian', 'taiwan', + 'thai', 'ummalqura'] + + Returns + ------- + Any + """ + return self["zcalendar"] + + @zcalendar.setter + def zcalendar(self, val): + self["zcalendar"] = val + + @property + def zhoverformat(self): + """ + Sets the hover text formatting rulefor `z` using d3 formatting + mini-languages which are very similar to those in Python. For + numbers, see: + https://github.com/d3/d3-format/tree/v1.4.5#d3-format. And for + dates see: https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format. We add two items to d3's date + formatter: "%h" for half of the year as a decimal number as + well as "%{n}f" for fractional seconds with n digits. For + example, *2016-10-13 09:15:23.456* with tickformat + "%H~%M~%S.%2f" would display *09~15~23.46*By default the values + are formatted using `zaxis.hoverformat`. + + The 'zhoverformat' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["zhoverformat"] + + @zhoverformat.setter + def zhoverformat(self, val): + self["zhoverformat"] = val + + @property + def zsrc(self): + """ + Sets the source reference on Chart Studio Cloud for `z`. + + The 'zsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["zsrc"] + + @zsrc.setter + def zsrc(self, val): + self["zsrc"] = val + + @property + def type(self): + return self._props["type"] + + @property + def _prop_descriptions(self): + return """\ + autocolorscale + Determines whether the colorscale is a default palette + (`autocolorscale: true`) or the palette determined by + `colorscale`. In case `colorscale` is unspecified or + `autocolorscale` is true, the default palette will be + chosen according to whether numbers in the `color` + array are all positive, all negative or mixed. + cauto + Determines whether or not the color domain is computed + with respect to the input data (here z or surfacecolor) + or the bounds set in `cmin` and `cmax` Defaults to + `false` when `cmin` and `cmax` are set by the user. + cmax + Sets the upper bound of the color domain. Value should + have the same units as z or surfacecolor and if set, + `cmin` must be set as well. + cmid + Sets the mid-point of the color domain by scaling + `cmin` and/or `cmax` to be equidistant to this point. + Value should have the same units as z or surfacecolor. + Has no effect when `cauto` is `false`. + cmin + Sets the lower bound of the color domain. Value should + have the same units as z or surfacecolor and if set, + `cmax` must be set as well. + coloraxis + Sets a reference to a shared color axis. References to + these shared color axes are "coloraxis", "coloraxis2", + "coloraxis3", etc. Settings for these shared color axes + are set in the layout, under `layout.coloraxis`, + `layout.coloraxis2`, etc. Note that multiple color + scales can be linked to the same color axis. + colorbar + :class:`plotly.graph_objects.surface.ColorBar` instance + or dict with compatible properties + colorscale + Sets the colorscale. The colorscale must be an array + containing arrays mapping a normalized value to an rgb, + rgba, hex, hsl, hsv, or named color string. At minimum, + a mapping for the lowest (0) and highest (1) values are + required. For example, `[[0, 'rgb(0,0,255)'], [1, + 'rgb(255,0,0)']]`. To control the bounds of the + colorscale in color space, use `cmin` and `cmax`. + Alternatively, `colorscale` may be a palette name + string of the following list: Blackbody,Bluered,Blues,C + ividis,Earth,Electric,Greens,Greys,Hot,Jet,Picnic,Portl + and,Rainbow,RdBu,Reds,Viridis,YlGnBu,YlOrRd. + connectgaps + Determines whether or not gaps (i.e. {nan} or missing + values) in the `z` data are filled in. + contours + :class:`plotly.graph_objects.surface.Contours` instance + or dict with compatible properties + customdata + Assigns extra data each datum. This may be useful when + listening to hover, click and selection events. Note + that, "scatter" traces also appends customdata items in + the markers DOM elements + customdatasrc + Sets the source reference on Chart Studio Cloud for + `customdata`. + hidesurface + Determines whether or not a surface is drawn. For + example, set `hidesurface` to False `contours.x.show` + to True and `contours.y.show` to True to draw a wire + frame plot. + hoverinfo + Determines which trace information appear on hover. If + `none` or `skip` are set, no information is displayed + upon hovering. But, if `none` is set, click and hover + events are still fired. + hoverinfosrc + Sets the source reference on Chart Studio Cloud for + `hoverinfo`. + hoverlabel + :class:`plotly.graph_objects.surface.Hoverlabel` + instance or dict with compatible properties + hovertemplate + Template string used for rendering the information that + appear on hover box. Note that this will override + `hoverinfo`. Variables are inserted using %{variable}, + for example "y: %{y}" as well as %{xother}, {%_xother}, + {%_xother_}, {%xother_}. When showing info for several + points, "xother" will be added to those with different + x positions from the first point. An underscore before + or after "(x|y)other" will add a space on that side, + only when this field is shown. Numbers are formatted + using d3-format's syntax %{variable:d3-format}, for + example "Price: %{y:$.2f}". + https://github.com/d3/d3-format/tree/v1.4.5#d3-format + for details on the formatting syntax. Dates are + formatted using d3-time-format's syntax + %{variable|d3-time-format}, for example "Day: + %{2019-01-01|%A}". https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format for details on the + date formatting syntax. Variables that can't be found + will be replaced with the specifier. For example, a + template of "data: %{x}, %{y}" will result in a value + of "data: 1, %{y}" if x is 1 and y is missing. + Variables with an undefined value will be replaced with + the fallback value. The variables available in + `hovertemplate` are the ones emitted as event data + described at this link + https://plotly.com/javascript/plotlyjs-events/#event- + data. Additionally, all attributes that can be + specified per-point (the ones that are `arrayOk: true`) + are available. Anything contained in tag `` is + displayed in the secondary box, for example + `%{fullData.name}`. To hide the + secondary box completely, use an empty tag + ``. + hovertemplatefallback + Fallback string that's displayed when a variable + referenced in a template is missing. If the boolean + value 'false' is passed in, the specifier with the + missing variable will be displayed. + hovertemplatesrc + Sets the source reference on Chart Studio Cloud for + `hovertemplate`. + hovertext + Same as `text`. + hovertextsrc + Sets the source reference on Chart Studio Cloud for + `hovertext`. + ids + Assigns id labels to each datum. These ids for object + constancy of data points during animation. Should be an + array of strings, not numbers or any other type. + idssrc + Sets the source reference on Chart Studio Cloud for + `ids`. + legend + Sets the reference to a legend to show this trace in. + References to these legends are "legend", "legend2", + "legend3", etc. Settings for these legends are set in + the layout, under `layout.legend`, `layout.legend2`, + etc. + legendgroup + Sets the legend group for this trace. Traces and shapes + part of the same legend group hide/show at the same + time when toggling legend items. + legendgrouptitle + :class:`plotly.graph_objects.surface.Legendgrouptitle` + instance or dict with compatible properties + legendrank + Sets the legend rank for this trace. Items and groups + with smaller ranks are presented on top/left side while + with "reversed" `legend.traceorder` they are on + bottom/right side. The default legendrank is 1000, so + that you can use ranks less than 1000 to place certain + items before all unranked items, and ranks greater than + 1000 to go after all unranked items. When having + unranked or equal rank items shapes would be displayed + after traces i.e. according to their order in data and + layout. + legendwidth + Sets the width (in px or fraction) of the legend for + this trace. + lighting + :class:`plotly.graph_objects.surface.Lighting` instance + or dict with compatible properties + lightposition + :class:`plotly.graph_objects.surface.Lightposition` + instance or dict with compatible properties + meta + Assigns extra meta information associated with this + trace that can be used in various text attributes. + Attributes such as trace `name`, graph, axis and + colorbar `title.text`, annotation `text` + `rangeselector`, `updatemenues` and `sliders` `label` + text all support `meta`. To access the trace `meta` + values in an attribute in the same trace, simply use + `%{meta[i]}` where `i` is the index or key of the + `meta` item in question. To access trace `meta` in + layout attributes, use `%{data[n[.meta[i]}` where `i` + is the index or key of the `meta` and `n` is the trace + index. + metasrc + Sets the source reference on Chart Studio Cloud for + `meta`. + name + Sets the trace name. The trace name appears as the + legend item and on hover. + opacity + Sets the opacity of the surface. Please note that in + the case of using high `opacity` values for example a + value greater than or equal to 0.5 on two surfaces (and + 0.25 with four surfaces), an overlay of multiple + transparent surfaces may not perfectly be sorted in + depth by the webgl API. This behavior may be improved + in the near future and is subject to change. + opacityscale + Sets the opacityscale. The opacityscale must be an + array containing arrays mapping a normalized value to + an opacity value. At minimum, a mapping for the lowest + (0) and highest (1) values are required. For example, + `[[0, 1], [0.5, 0.2], [1, 1]]` means that higher/lower + values would have higher opacity values and those in + the middle would be more transparent Alternatively, + `opacityscale` may be a palette name string of the + following list: 'min', 'max', 'extremes' and 'uniform'. + The default is 'uniform'. + reversescale + Reverses the color mapping if true. If true, `cmin` + will correspond to the last color in the array and + `cmax` will correspond to the first color. + scene + Sets a reference between this trace's 3D coordinate + system and a 3D scene. If "scene" (the default value), + the (x,y,z) coordinates refer to `layout.scene`. If + "scene2", the (x,y,z) coordinates refer to + `layout.scene2`, and so on. + showlegend + Determines whether or not an item corresponding to this + trace is shown in the legend. + showscale + Determines whether or not a colorbar is displayed for + this trace. + stream + :class:`plotly.graph_objects.surface.Stream` instance + or dict with compatible properties + surfacecolor + Sets the surface color values, used for setting a color + scale independent of `z`. + surfacecolorsrc + Sets the source reference on Chart Studio Cloud for + `surfacecolor`. + text + Sets the text elements associated with each z value. If + trace `hoverinfo` contains a "text" flag and + "hovertext" is not set, these elements will be seen in + the hover labels. + textsrc + Sets the source reference on Chart Studio Cloud for + `text`. + uid + Assign an id to this trace, Use this to provide object + constancy between traces during animations and + transitions. + uirevision + Controls persistence of some user-driven changes to the + trace: `constraintrange` in `parcoords` traces, as well + as some `editable: true` modifications such as `name` + and `colorbar.title`. Defaults to `layout.uirevision`. + Note that other user-driven trace attribute changes are + controlled by `layout` attributes: `trace.visible` is + controlled by `layout.legend.uirevision`, + `selectedpoints` is controlled by + `layout.selectionrevision`, and `colorbar.(x|y)` + (accessible with `config: {editable: true}`) is + controlled by `layout.editrevision`. Trace changes are + tracked by `uid`, which only falls back on trace index + if no `uid` is provided. So if your app can add/remove + traces before the end of the `data` array, such that + the same trace has a different index, you can still + preserve user-driven changes if you give each trace a + `uid` that stays with it as it moves. + visible + Determines whether or not this trace is visible. If + "legendonly", the trace is not drawn, but can appear as + a legend item (provided that the legend itself is + visible). + x + Sets the x coordinates. + xcalendar + Sets the calendar system to use with `x` date data. + xhoverformat + Sets the hover text formatting rulefor `x` using d3 + formatting mini-languages which are very similar to + those in Python. For numbers, see: + https://github.com/d3/d3-format/tree/v1.4.5#d3-format. + And for dates see: https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format. We add two items to + d3's date formatter: "%h" for half of the year as a + decimal number as well as "%{n}f" for fractional + seconds with n digits. For example, *2016-10-13 + 09:15:23.456* with tickformat "%H~%M~%S.%2f" would + display *09~15~23.46*By default the values are + formatted using `xaxis.hoverformat`. + xsrc + Sets the source reference on Chart Studio Cloud for + `x`. + y + Sets the y coordinates. + ycalendar + Sets the calendar system to use with `y` date data. + yhoverformat + Sets the hover text formatting rulefor `y` using d3 + formatting mini-languages which are very similar to + those in Python. For numbers, see: + https://github.com/d3/d3-format/tree/v1.4.5#d3-format. + And for dates see: https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format. We add two items to + d3's date formatter: "%h" for half of the year as a + decimal number as well as "%{n}f" for fractional + seconds with n digits. For example, *2016-10-13 + 09:15:23.456* with tickformat "%H~%M~%S.%2f" would + display *09~15~23.46*By default the values are + formatted using `yaxis.hoverformat`. + ysrc + Sets the source reference on Chart Studio Cloud for + `y`. + z + Sets the z coordinates. + zcalendar + Sets the calendar system to use with `z` date data. + zhoverformat + Sets the hover text formatting rulefor `z` using d3 + formatting mini-languages which are very similar to + those in Python. For numbers, see: + https://github.com/d3/d3-format/tree/v1.4.5#d3-format. + And for dates see: https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format. We add two items to + d3's date formatter: "%h" for half of the year as a + decimal number as well as "%{n}f" for fractional + seconds with n digits. For example, *2016-10-13 + 09:15:23.456* with tickformat "%H~%M~%S.%2f" would + display *09~15~23.46*By default the values are + formatted using `zaxis.hoverformat`. + zsrc + Sets the source reference on Chart Studio Cloud for + `z`. + """ + + def __init__( + self, + arg=None, + autocolorscale=None, + cauto=None, + cmax=None, + cmid=None, + cmin=None, + coloraxis=None, + colorbar=None, + colorscale=None, + connectgaps=None, + contours=None, + customdata=None, + customdatasrc=None, + hidesurface=None, + hoverinfo=None, + hoverinfosrc=None, + hoverlabel=None, + hovertemplate=None, + hovertemplatefallback=None, + hovertemplatesrc=None, + hovertext=None, + hovertextsrc=None, + ids=None, + idssrc=None, + legend=None, + legendgroup=None, + legendgrouptitle=None, + legendrank=None, + legendwidth=None, + lighting=None, + lightposition=None, + meta=None, + metasrc=None, + name=None, + opacity=None, + opacityscale=None, + reversescale=None, + scene=None, + showlegend=None, + showscale=None, + stream=None, + surfacecolor=None, + surfacecolorsrc=None, + text=None, + textsrc=None, + uid=None, + uirevision=None, + visible=None, + x=None, + xcalendar=None, + xhoverformat=None, + xsrc=None, + y=None, + ycalendar=None, + yhoverformat=None, + ysrc=None, + z=None, + zcalendar=None, + zhoverformat=None, + zsrc=None, + **kwargs, + ): + """ + Construct a new Surface object + + The data the describes the coordinates of the surface is set in + `z`. Data in `z` should be a 2D list. Coordinates in `x` and + `y` can either be 1D lists or 2D lists (e.g. to graph + parametric surfaces). If not provided in `x` and `y`, the x and + y coordinates are assumed to be linear starting at 0 with a + unit step. The color scale corresponds to the `z` values by + default. For custom color scales, use `surfacecolor` which + should be a 2D list, where its bounds can be controlled using + `cmin` and `cmax`. + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of :class:`plotly.graph_objs.Surface` + autocolorscale + Determines whether the colorscale is a default palette + (`autocolorscale: true`) or the palette determined by + `colorscale`. In case `colorscale` is unspecified or + `autocolorscale` is true, the default palette will be + chosen according to whether numbers in the `color` + array are all positive, all negative or mixed. + cauto + Determines whether or not the color domain is computed + with respect to the input data (here z or surfacecolor) + or the bounds set in `cmin` and `cmax` Defaults to + `false` when `cmin` and `cmax` are set by the user. + cmax + Sets the upper bound of the color domain. Value should + have the same units as z or surfacecolor and if set, + `cmin` must be set as well. + cmid + Sets the mid-point of the color domain by scaling + `cmin` and/or `cmax` to be equidistant to this point. + Value should have the same units as z or surfacecolor. + Has no effect when `cauto` is `false`. + cmin + Sets the lower bound of the color domain. Value should + have the same units as z or surfacecolor and if set, + `cmax` must be set as well. + coloraxis + Sets a reference to a shared color axis. References to + these shared color axes are "coloraxis", "coloraxis2", + "coloraxis3", etc. Settings for these shared color axes + are set in the layout, under `layout.coloraxis`, + `layout.coloraxis2`, etc. Note that multiple color + scales can be linked to the same color axis. + colorbar + :class:`plotly.graph_objects.surface.ColorBar` instance + or dict with compatible properties + colorscale + Sets the colorscale. The colorscale must be an array + containing arrays mapping a normalized value to an rgb, + rgba, hex, hsl, hsv, or named color string. At minimum, + a mapping for the lowest (0) and highest (1) values are + required. For example, `[[0, 'rgb(0,0,255)'], [1, + 'rgb(255,0,0)']]`. To control the bounds of the + colorscale in color space, use `cmin` and `cmax`. + Alternatively, `colorscale` may be a palette name + string of the following list: Blackbody,Bluered,Blues,C + ividis,Earth,Electric,Greens,Greys,Hot,Jet,Picnic,Portl + and,Rainbow,RdBu,Reds,Viridis,YlGnBu,YlOrRd. + connectgaps + Determines whether or not gaps (i.e. {nan} or missing + values) in the `z` data are filled in. + contours + :class:`plotly.graph_objects.surface.Contours` instance + or dict with compatible properties + customdata + Assigns extra data each datum. This may be useful when + listening to hover, click and selection events. Note + that, "scatter" traces also appends customdata items in + the markers DOM elements + customdatasrc + Sets the source reference on Chart Studio Cloud for + `customdata`. + hidesurface + Determines whether or not a surface is drawn. For + example, set `hidesurface` to False `contours.x.show` + to True and `contours.y.show` to True to draw a wire + frame plot. + hoverinfo + Determines which trace information appear on hover. If + `none` or `skip` are set, no information is displayed + upon hovering. But, if `none` is set, click and hover + events are still fired. + hoverinfosrc + Sets the source reference on Chart Studio Cloud for + `hoverinfo`. + hoverlabel + :class:`plotly.graph_objects.surface.Hoverlabel` + instance or dict with compatible properties + hovertemplate + Template string used for rendering the information that + appear on hover box. Note that this will override + `hoverinfo`. Variables are inserted using %{variable}, + for example "y: %{y}" as well as %{xother}, {%_xother}, + {%_xother_}, {%xother_}. When showing info for several + points, "xother" will be added to those with different + x positions from the first point. An underscore before + or after "(x|y)other" will add a space on that side, + only when this field is shown. Numbers are formatted + using d3-format's syntax %{variable:d3-format}, for + example "Price: %{y:$.2f}". + https://github.com/d3/d3-format/tree/v1.4.5#d3-format + for details on the formatting syntax. Dates are + formatted using d3-time-format's syntax + %{variable|d3-time-format}, for example "Day: + %{2019-01-01|%A}". https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format for details on the + date formatting syntax. Variables that can't be found + will be replaced with the specifier. For example, a + template of "data: %{x}, %{y}" will result in a value + of "data: 1, %{y}" if x is 1 and y is missing. + Variables with an undefined value will be replaced with + the fallback value. The variables available in + `hovertemplate` are the ones emitted as event data + described at this link + https://plotly.com/javascript/plotlyjs-events/#event- + data. Additionally, all attributes that can be + specified per-point (the ones that are `arrayOk: true`) + are available. Anything contained in tag `` is + displayed in the secondary box, for example + `%{fullData.name}`. To hide the + secondary box completely, use an empty tag + ``. + hovertemplatefallback + Fallback string that's displayed when a variable + referenced in a template is missing. If the boolean + value 'false' is passed in, the specifier with the + missing variable will be displayed. + hovertemplatesrc + Sets the source reference on Chart Studio Cloud for + `hovertemplate`. + hovertext + Same as `text`. + hovertextsrc + Sets the source reference on Chart Studio Cloud for + `hovertext`. + ids + Assigns id labels to each datum. These ids for object + constancy of data points during animation. Should be an + array of strings, not numbers or any other type. + idssrc + Sets the source reference on Chart Studio Cloud for + `ids`. + legend + Sets the reference to a legend to show this trace in. + References to these legends are "legend", "legend2", + "legend3", etc. Settings for these legends are set in + the layout, under `layout.legend`, `layout.legend2`, + etc. + legendgroup + Sets the legend group for this trace. Traces and shapes + part of the same legend group hide/show at the same + time when toggling legend items. + legendgrouptitle + :class:`plotly.graph_objects.surface.Legendgrouptitle` + instance or dict with compatible properties + legendrank + Sets the legend rank for this trace. Items and groups + with smaller ranks are presented on top/left side while + with "reversed" `legend.traceorder` they are on + bottom/right side. The default legendrank is 1000, so + that you can use ranks less than 1000 to place certain + items before all unranked items, and ranks greater than + 1000 to go after all unranked items. When having + unranked or equal rank items shapes would be displayed + after traces i.e. according to their order in data and + layout. + legendwidth + Sets the width (in px or fraction) of the legend for + this trace. + lighting + :class:`plotly.graph_objects.surface.Lighting` instance + or dict with compatible properties + lightposition + :class:`plotly.graph_objects.surface.Lightposition` + instance or dict with compatible properties + meta + Assigns extra meta information associated with this + trace that can be used in various text attributes. + Attributes such as trace `name`, graph, axis and + colorbar `title.text`, annotation `text` + `rangeselector`, `updatemenues` and `sliders` `label` + text all support `meta`. To access the trace `meta` + values in an attribute in the same trace, simply use + `%{meta[i]}` where `i` is the index or key of the + `meta` item in question. To access trace `meta` in + layout attributes, use `%{data[n[.meta[i]}` where `i` + is the index or key of the `meta` and `n` is the trace + index. + metasrc + Sets the source reference on Chart Studio Cloud for + `meta`. + name + Sets the trace name. The trace name appears as the + legend item and on hover. + opacity + Sets the opacity of the surface. Please note that in + the case of using high `opacity` values for example a + value greater than or equal to 0.5 on two surfaces (and + 0.25 with four surfaces), an overlay of multiple + transparent surfaces may not perfectly be sorted in + depth by the webgl API. This behavior may be improved + in the near future and is subject to change. + opacityscale + Sets the opacityscale. The opacityscale must be an + array containing arrays mapping a normalized value to + an opacity value. At minimum, a mapping for the lowest + (0) and highest (1) values are required. For example, + `[[0, 1], [0.5, 0.2], [1, 1]]` means that higher/lower + values would have higher opacity values and those in + the middle would be more transparent Alternatively, + `opacityscale` may be a palette name string of the + following list: 'min', 'max', 'extremes' and 'uniform'. + The default is 'uniform'. + reversescale + Reverses the color mapping if true. If true, `cmin` + will correspond to the last color in the array and + `cmax` will correspond to the first color. + scene + Sets a reference between this trace's 3D coordinate + system and a 3D scene. If "scene" (the default value), + the (x,y,z) coordinates refer to `layout.scene`. If + "scene2", the (x,y,z) coordinates refer to + `layout.scene2`, and so on. + showlegend + Determines whether or not an item corresponding to this + trace is shown in the legend. + showscale + Determines whether or not a colorbar is displayed for + this trace. + stream + :class:`plotly.graph_objects.surface.Stream` instance + or dict with compatible properties + surfacecolor + Sets the surface color values, used for setting a color + scale independent of `z`. + surfacecolorsrc + Sets the source reference on Chart Studio Cloud for + `surfacecolor`. + text + Sets the text elements associated with each z value. If + trace `hoverinfo` contains a "text" flag and + "hovertext" is not set, these elements will be seen in + the hover labels. + textsrc + Sets the source reference on Chart Studio Cloud for + `text`. + uid + Assign an id to this trace, Use this to provide object + constancy between traces during animations and + transitions. + uirevision + Controls persistence of some user-driven changes to the + trace: `constraintrange` in `parcoords` traces, as well + as some `editable: true` modifications such as `name` + and `colorbar.title`. Defaults to `layout.uirevision`. + Note that other user-driven trace attribute changes are + controlled by `layout` attributes: `trace.visible` is + controlled by `layout.legend.uirevision`, + `selectedpoints` is controlled by + `layout.selectionrevision`, and `colorbar.(x|y)` + (accessible with `config: {editable: true}`) is + controlled by `layout.editrevision`. Trace changes are + tracked by `uid`, which only falls back on trace index + if no `uid` is provided. So if your app can add/remove + traces before the end of the `data` array, such that + the same trace has a different index, you can still + preserve user-driven changes if you give each trace a + `uid` that stays with it as it moves. + visible + Determines whether or not this trace is visible. If + "legendonly", the trace is not drawn, but can appear as + a legend item (provided that the legend itself is + visible). + x + Sets the x coordinates. + xcalendar + Sets the calendar system to use with `x` date data. + xhoverformat + Sets the hover text formatting rulefor `x` using d3 + formatting mini-languages which are very similar to + those in Python. For numbers, see: + https://github.com/d3/d3-format/tree/v1.4.5#d3-format. + And for dates see: https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format. We add two items to + d3's date formatter: "%h" for half of the year as a + decimal number as well as "%{n}f" for fractional + seconds with n digits. For example, *2016-10-13 + 09:15:23.456* with tickformat "%H~%M~%S.%2f" would + display *09~15~23.46*By default the values are + formatted using `xaxis.hoverformat`. + xsrc + Sets the source reference on Chart Studio Cloud for + `x`. + y + Sets the y coordinates. + ycalendar + Sets the calendar system to use with `y` date data. + yhoverformat + Sets the hover text formatting rulefor `y` using d3 + formatting mini-languages which are very similar to + those in Python. For numbers, see: + https://github.com/d3/d3-format/tree/v1.4.5#d3-format. + And for dates see: https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format. We add two items to + d3's date formatter: "%h" for half of the year as a + decimal number as well as "%{n}f" for fractional + seconds with n digits. For example, *2016-10-13 + 09:15:23.456* with tickformat "%H~%M~%S.%2f" would + display *09~15~23.46*By default the values are + formatted using `yaxis.hoverformat`. + ysrc + Sets the source reference on Chart Studio Cloud for + `y`. + z + Sets the z coordinates. + zcalendar + Sets the calendar system to use with `z` date data. + zhoverformat + Sets the hover text formatting rulefor `z` using d3 + formatting mini-languages which are very similar to + those in Python. For numbers, see: + https://github.com/d3/d3-format/tree/v1.4.5#d3-format. + And for dates see: https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format. We add two items to + d3's date formatter: "%h" for half of the year as a + decimal number as well as "%{n}f" for fractional + seconds with n digits. For example, *2016-10-13 + 09:15:23.456* with tickformat "%H~%M~%S.%2f" would + display *09~15~23.46*By default the values are + formatted using `zaxis.hoverformat`. + zsrc + Sets the source reference on Chart Studio Cloud for + `z`. + + Returns + ------- + Surface + """ + super().__init__("surface") + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + if arg is None: + arg = {} + elif isinstance(arg, self.__class__): + arg = arg.to_plotly_json() + elif isinstance(arg, dict): + arg = _copy.copy(arg) + else: + raise ValueError("""\ +The first argument to the plotly.graph_objs.Surface +constructor must be a dict or +an instance of :class:`plotly.graph_objs.Surface`""") + + self._skip_invalid = kwargs.pop("skip_invalid", False) + self._validate = kwargs.pop("_validate", True) + + self._set_property("autocolorscale", arg, autocolorscale) + self._set_property("cauto", arg, cauto) + self._set_property("cmax", arg, cmax) + self._set_property("cmid", arg, cmid) + self._set_property("cmin", arg, cmin) + self._set_property("coloraxis", arg, coloraxis) + self._set_property("colorbar", arg, colorbar) + self._set_property("colorscale", arg, colorscale) + self._set_property("connectgaps", arg, connectgaps) + self._set_property("contours", arg, contours) + self._set_property("customdata", arg, customdata) + self._set_property("customdatasrc", arg, customdatasrc) + self._set_property("hidesurface", arg, hidesurface) + self._set_property("hoverinfo", arg, hoverinfo) + self._set_property("hoverinfosrc", arg, hoverinfosrc) + self._set_property("hoverlabel", arg, hoverlabel) + self._set_property("hovertemplate", arg, hovertemplate) + self._set_property("hovertemplatefallback", arg, hovertemplatefallback) + self._set_property("hovertemplatesrc", arg, hovertemplatesrc) + self._set_property("hovertext", arg, hovertext) + self._set_property("hovertextsrc", arg, hovertextsrc) + self._set_property("ids", arg, ids) + self._set_property("idssrc", arg, idssrc) + self._set_property("legend", arg, legend) + self._set_property("legendgroup", arg, legendgroup) + self._set_property("legendgrouptitle", arg, legendgrouptitle) + self._set_property("legendrank", arg, legendrank) + self._set_property("legendwidth", arg, legendwidth) + self._set_property("lighting", arg, lighting) + self._set_property("lightposition", arg, lightposition) + self._set_property("meta", arg, meta) + self._set_property("metasrc", arg, metasrc) + self._set_property("name", arg, name) + self._set_property("opacity", arg, opacity) + self._set_property("opacityscale", arg, opacityscale) + self._set_property("reversescale", arg, reversescale) + self._set_property("scene", arg, scene) + self._set_property("showlegend", arg, showlegend) + self._set_property("showscale", arg, showscale) + self._set_property("stream", arg, stream) + self._set_property("surfacecolor", arg, surfacecolor) + self._set_property("surfacecolorsrc", arg, surfacecolorsrc) + self._set_property("text", arg, text) + self._set_property("textsrc", arg, textsrc) + self._set_property("uid", arg, uid) + self._set_property("uirevision", arg, uirevision) + self._set_property("visible", arg, visible) + self._set_property("x", arg, x) + self._set_property("xcalendar", arg, xcalendar) + self._set_property("xhoverformat", arg, xhoverformat) + self._set_property("xsrc", arg, xsrc) + self._set_property("y", arg, y) + self._set_property("ycalendar", arg, ycalendar) + self._set_property("yhoverformat", arg, yhoverformat) + self._set_property("ysrc", arg, ysrc) + self._set_property("z", arg, z) + self._set_property("zcalendar", arg, zcalendar) + self._set_property("zhoverformat", arg, zhoverformat) + self._set_property("zsrc", arg, zsrc) + + self._props["type"] = "surface" + arg.pop("type", None) + self._process_kwargs(**dict(arg, **kwargs)) + self._skip_invalid = False diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/_table.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/_table.py new file mode 100644 index 0000000000000000000000000000000000000000..e58ec78d7d56dd784a30cdda735459e13b7d0b2a --- /dev/null +++ b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/_table.py @@ -0,0 +1,908 @@ +# --- THIS FILE IS AUTO-GENERATED --- +# Modifications will be overwitten the next time code generation run. + +from plotly.basedatatypes import BaseTraceType as _BaseTraceType +import copy as _copy + + +class Table(_BaseTraceType): + _parent_path_str = "" + _path_str = "table" + _valid_props = { + "cells", + "columnorder", + "columnordersrc", + "columnwidth", + "columnwidthsrc", + "customdata", + "customdatasrc", + "domain", + "header", + "hoverinfo", + "hoverinfosrc", + "hoverlabel", + "ids", + "idssrc", + "legend", + "legendgrouptitle", + "legendrank", + "legendwidth", + "meta", + "metasrc", + "name", + "stream", + "type", + "uid", + "uirevision", + "visible", + } + + @property + def cells(self): + """ + The 'cells' property is an instance of Cells + that may be specified as: + - An instance of :class:`plotly.graph_objs.table.Cells` + - A dict of string/value properties that will be passed + to the Cells constructor + + Returns + ------- + plotly.graph_objs.table.Cells + """ + return self["cells"] + + @cells.setter + def cells(self, val): + self["cells"] = val + + @property + def columnorder(self): + """ + Specifies the rendered order of the data columns; for example, + a value `2` at position `0` means that column index `0` in the + data will be rendered as the third column, as columns have an + index base of zero. + + The 'columnorder' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["columnorder"] + + @columnorder.setter + def columnorder(self, val): + self["columnorder"] = val + + @property + def columnordersrc(self): + """ + Sets the source reference on Chart Studio Cloud for + `columnorder`. + + The 'columnordersrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["columnordersrc"] + + @columnordersrc.setter + def columnordersrc(self, val): + self["columnordersrc"] = val + + @property + def columnwidth(self): + """ + The width of columns expressed as a ratio. Columns fill the + available width in proportion of their specified column widths. + + The 'columnwidth' property is a number and may be specified as: + - An int or float + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + int|float|numpy.ndarray + """ + return self["columnwidth"] + + @columnwidth.setter + def columnwidth(self, val): + self["columnwidth"] = val + + @property + def columnwidthsrc(self): + """ + Sets the source reference on Chart Studio Cloud for + `columnwidth`. + + The 'columnwidthsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["columnwidthsrc"] + + @columnwidthsrc.setter + def columnwidthsrc(self, val): + self["columnwidthsrc"] = val + + @property + def customdata(self): + """ + Assigns extra data each datum. This may be useful when + listening to hover, click and selection events. Note that, + "scatter" traces also appends customdata items in the markers + DOM elements + + The 'customdata' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["customdata"] + + @customdata.setter + def customdata(self, val): + self["customdata"] = val + + @property + def customdatasrc(self): + """ + Sets the source reference on Chart Studio Cloud for + `customdata`. + + The 'customdatasrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["customdatasrc"] + + @customdatasrc.setter + def customdatasrc(self, val): + self["customdatasrc"] = val + + @property + def domain(self): + """ + The 'domain' property is an instance of Domain + that may be specified as: + - An instance of :class:`plotly.graph_objs.table.Domain` + - A dict of string/value properties that will be passed + to the Domain constructor + + Returns + ------- + plotly.graph_objs.table.Domain + """ + return self["domain"] + + @domain.setter + def domain(self, val): + self["domain"] = val + + @property + def header(self): + """ + The 'header' property is an instance of Header + that may be specified as: + - An instance of :class:`plotly.graph_objs.table.Header` + - A dict of string/value properties that will be passed + to the Header constructor + + Returns + ------- + plotly.graph_objs.table.Header + """ + return self["header"] + + @header.setter + def header(self, val): + self["header"] = val + + @property + def hoverinfo(self): + """ + Determines which trace information appear on hover. If `none` + or `skip` are set, no information is displayed upon hovering. + But, if `none` is set, click and hover events are still fired. + + The 'hoverinfo' property is a flaglist and may be specified + as a string containing: + - Any combination of ['x', 'y', 'z', 'text', 'name'] joined with '+' characters + (e.g. 'x+y') + OR exactly one of ['all', 'none', 'skip'] (e.g. 'skip') + - A list or array of the above + + Returns + ------- + Any|numpy.ndarray + """ + return self["hoverinfo"] + + @hoverinfo.setter + def hoverinfo(self, val): + self["hoverinfo"] = val + + @property + def hoverinfosrc(self): + """ + Sets the source reference on Chart Studio Cloud for + `hoverinfo`. + + The 'hoverinfosrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["hoverinfosrc"] + + @hoverinfosrc.setter + def hoverinfosrc(self, val): + self["hoverinfosrc"] = val + + @property + def hoverlabel(self): + """ + The 'hoverlabel' property is an instance of Hoverlabel + that may be specified as: + - An instance of :class:`plotly.graph_objs.table.Hoverlabel` + - A dict of string/value properties that will be passed + to the Hoverlabel constructor + + Returns + ------- + plotly.graph_objs.table.Hoverlabel + """ + return self["hoverlabel"] + + @hoverlabel.setter + def hoverlabel(self, val): + self["hoverlabel"] = val + + @property + def ids(self): + """ + Assigns id labels to each datum. These ids for object constancy + of data points during animation. Should be an array of strings, + not numbers or any other type. + + The 'ids' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["ids"] + + @ids.setter + def ids(self, val): + self["ids"] = val + + @property + def idssrc(self): + """ + Sets the source reference on Chart Studio Cloud for `ids`. + + The 'idssrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["idssrc"] + + @idssrc.setter + def idssrc(self, val): + self["idssrc"] = val + + @property + def legend(self): + """ + Sets the reference to a legend to show this trace in. + References to these legends are "legend", "legend2", "legend3", + etc. Settings for these legends are set in the layout, under + `layout.legend`, `layout.legend2`, etc. + + The 'legend' property is an identifier of a particular + subplot, of type 'legend', that may be specified as: + - the string 'legend' optionally followed by an integer >= 1 + (e.g. 'legend', 'legend1', 'legend2', 'legend3', etc.) + + Returns + ------- + str + """ + return self["legend"] + + @legend.setter + def legend(self, val): + self["legend"] = val + + @property + def legendgrouptitle(self): + """ + The 'legendgrouptitle' property is an instance of Legendgrouptitle + that may be specified as: + - An instance of :class:`plotly.graph_objs.table.Legendgrouptitle` + - A dict of string/value properties that will be passed + to the Legendgrouptitle constructor + + Returns + ------- + plotly.graph_objs.table.Legendgrouptitle + """ + return self["legendgrouptitle"] + + @legendgrouptitle.setter + def legendgrouptitle(self, val): + self["legendgrouptitle"] = val + + @property + def legendrank(self): + """ + Sets the legend rank for this trace. Items and groups with + smaller ranks are presented on top/left side while with + "reversed" `legend.traceorder` they are on bottom/right side. + The default legendrank is 1000, so that you can use ranks less + than 1000 to place certain items before all unranked items, and + ranks greater than 1000 to go after all unranked items. When + having unranked or equal rank items shapes would be displayed + after traces i.e. according to their order in data and layout. + + The 'legendrank' property is a number and may be specified as: + - An int or float + + Returns + ------- + int|float + """ + return self["legendrank"] + + @legendrank.setter + def legendrank(self, val): + self["legendrank"] = val + + @property + def legendwidth(self): + """ + Sets the width (in px or fraction) of the legend for this + trace. + + The 'legendwidth' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["legendwidth"] + + @legendwidth.setter + def legendwidth(self, val): + self["legendwidth"] = val + + @property + def meta(self): + """ + Assigns extra meta information associated with this trace that + can be used in various text attributes. Attributes such as + trace `name`, graph, axis and colorbar `title.text`, annotation + `text` `rangeselector`, `updatemenues` and `sliders` `label` + text all support `meta`. To access the trace `meta` values in + an attribute in the same trace, simply use `%{meta[i]}` where + `i` is the index or key of the `meta` item in question. To + access trace `meta` in layout attributes, use + `%{data[n[.meta[i]}` where `i` is the index or key of the + `meta` and `n` is the trace index. + + The 'meta' property accepts values of any type + + Returns + ------- + Any|numpy.ndarray + """ + return self["meta"] + + @meta.setter + def meta(self, val): + self["meta"] = val + + @property + def metasrc(self): + """ + Sets the source reference on Chart Studio Cloud for `meta`. + + The 'metasrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["metasrc"] + + @metasrc.setter + def metasrc(self, val): + self["metasrc"] = val + + @property + def name(self): + """ + Sets the trace name. The trace name appears as the legend item + and on hover. + + The 'name' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["name"] + + @name.setter + def name(self, val): + self["name"] = val + + @property + def stream(self): + """ + The 'stream' property is an instance of Stream + that may be specified as: + - An instance of :class:`plotly.graph_objs.table.Stream` + - A dict of string/value properties that will be passed + to the Stream constructor + + Returns + ------- + plotly.graph_objs.table.Stream + """ + return self["stream"] + + @stream.setter + def stream(self, val): + self["stream"] = val + + @property + def uid(self): + """ + Assign an id to this trace, Use this to provide object + constancy between traces during animations and transitions. + + The 'uid' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["uid"] + + @uid.setter + def uid(self, val): + self["uid"] = val + + @property + def uirevision(self): + """ + Controls persistence of some user-driven changes to the trace: + `constraintrange` in `parcoords` traces, as well as some + `editable: true` modifications such as `name` and + `colorbar.title`. Defaults to `layout.uirevision`. Note that + other user-driven trace attribute changes are controlled by + `layout` attributes: `trace.visible` is controlled by + `layout.legend.uirevision`, `selectedpoints` is controlled by + `layout.selectionrevision`, and `colorbar.(x|y)` (accessible + with `config: {editable: true}`) is controlled by + `layout.editrevision`. Trace changes are tracked by `uid`, + which only falls back on trace index if no `uid` is provided. + So if your app can add/remove traces before the end of the + `data` array, such that the same trace has a different index, + you can still preserve user-driven changes if you give each + trace a `uid` that stays with it as it moves. + + The 'uirevision' property accepts values of any type + + Returns + ------- + Any + """ + return self["uirevision"] + + @uirevision.setter + def uirevision(self, val): + self["uirevision"] = val + + @property + def visible(self): + """ + Determines whether or not this trace is visible. If + "legendonly", the trace is not drawn, but can appear as a + legend item (provided that the legend itself is visible). + + The 'visible' property is an enumeration that may be specified as: + - One of the following enumeration values: + [True, False, 'legendonly'] + + Returns + ------- + Any + """ + return self["visible"] + + @visible.setter + def visible(self, val): + self["visible"] = val + + @property + def type(self): + return self._props["type"] + + @property + def _prop_descriptions(self): + return """\ + cells + :class:`plotly.graph_objects.table.Cells` instance or + dict with compatible properties + columnorder + Specifies the rendered order of the data columns; for + example, a value `2` at position `0` means that column + index `0` in the data will be rendered as the third + column, as columns have an index base of zero. + columnordersrc + Sets the source reference on Chart Studio Cloud for + `columnorder`. + columnwidth + The width of columns expressed as a ratio. Columns fill + the available width in proportion of their specified + column widths. + columnwidthsrc + Sets the source reference on Chart Studio Cloud for + `columnwidth`. + customdata + Assigns extra data each datum. This may be useful when + listening to hover, click and selection events. Note + that, "scatter" traces also appends customdata items in + the markers DOM elements + customdatasrc + Sets the source reference on Chart Studio Cloud for + `customdata`. + domain + :class:`plotly.graph_objects.table.Domain` instance or + dict with compatible properties + header + :class:`plotly.graph_objects.table.Header` instance or + dict with compatible properties + hoverinfo + Determines which trace information appear on hover. If + `none` or `skip` are set, no information is displayed + upon hovering. But, if `none` is set, click and hover + events are still fired. + hoverinfosrc + Sets the source reference on Chart Studio Cloud for + `hoverinfo`. + hoverlabel + :class:`plotly.graph_objects.table.Hoverlabel` instance + or dict with compatible properties + ids + Assigns id labels to each datum. These ids for object + constancy of data points during animation. Should be an + array of strings, not numbers or any other type. + idssrc + Sets the source reference on Chart Studio Cloud for + `ids`. + legend + Sets the reference to a legend to show this trace in. + References to these legends are "legend", "legend2", + "legend3", etc. Settings for these legends are set in + the layout, under `layout.legend`, `layout.legend2`, + etc. + legendgrouptitle + :class:`plotly.graph_objects.table.Legendgrouptitle` + instance or dict with compatible properties + legendrank + Sets the legend rank for this trace. Items and groups + with smaller ranks are presented on top/left side while + with "reversed" `legend.traceorder` they are on + bottom/right side. The default legendrank is 1000, so + that you can use ranks less than 1000 to place certain + items before all unranked items, and ranks greater than + 1000 to go after all unranked items. When having + unranked or equal rank items shapes would be displayed + after traces i.e. according to their order in data and + layout. + legendwidth + Sets the width (in px or fraction) of the legend for + this trace. + meta + Assigns extra meta information associated with this + trace that can be used in various text attributes. + Attributes such as trace `name`, graph, axis and + colorbar `title.text`, annotation `text` + `rangeselector`, `updatemenues` and `sliders` `label` + text all support `meta`. To access the trace `meta` + values in an attribute in the same trace, simply use + `%{meta[i]}` where `i` is the index or key of the + `meta` item in question. To access trace `meta` in + layout attributes, use `%{data[n[.meta[i]}` where `i` + is the index or key of the `meta` and `n` is the trace + index. + metasrc + Sets the source reference on Chart Studio Cloud for + `meta`. + name + Sets the trace name. The trace name appears as the + legend item and on hover. + stream + :class:`plotly.graph_objects.table.Stream` instance or + dict with compatible properties + uid + Assign an id to this trace, Use this to provide object + constancy between traces during animations and + transitions. + uirevision + Controls persistence of some user-driven changes to the + trace: `constraintrange` in `parcoords` traces, as well + as some `editable: true` modifications such as `name` + and `colorbar.title`. Defaults to `layout.uirevision`. + Note that other user-driven trace attribute changes are + controlled by `layout` attributes: `trace.visible` is + controlled by `layout.legend.uirevision`, + `selectedpoints` is controlled by + `layout.selectionrevision`, and `colorbar.(x|y)` + (accessible with `config: {editable: true}`) is + controlled by `layout.editrevision`. Trace changes are + tracked by `uid`, which only falls back on trace index + if no `uid` is provided. So if your app can add/remove + traces before the end of the `data` array, such that + the same trace has a different index, you can still + preserve user-driven changes if you give each trace a + `uid` that stays with it as it moves. + visible + Determines whether or not this trace is visible. If + "legendonly", the trace is not drawn, but can appear as + a legend item (provided that the legend itself is + visible). + """ + + def __init__( + self, + arg=None, + cells=None, + columnorder=None, + columnordersrc=None, + columnwidth=None, + columnwidthsrc=None, + customdata=None, + customdatasrc=None, + domain=None, + header=None, + hoverinfo=None, + hoverinfosrc=None, + hoverlabel=None, + ids=None, + idssrc=None, + legend=None, + legendgrouptitle=None, + legendrank=None, + legendwidth=None, + meta=None, + metasrc=None, + name=None, + stream=None, + uid=None, + uirevision=None, + visible=None, + **kwargs, + ): + """ + Construct a new Table object + + Table view for detailed data viewing. The data are arranged in + a grid of rows and columns. Most styling can be specified for + columns, rows or individual cells. Table is using a column- + major order, ie. the grid is represented as a vector of column + vectors. + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of :class:`plotly.graph_objs.Table` + cells + :class:`plotly.graph_objects.table.Cells` instance or + dict with compatible properties + columnorder + Specifies the rendered order of the data columns; for + example, a value `2` at position `0` means that column + index `0` in the data will be rendered as the third + column, as columns have an index base of zero. + columnordersrc + Sets the source reference on Chart Studio Cloud for + `columnorder`. + columnwidth + The width of columns expressed as a ratio. Columns fill + the available width in proportion of their specified + column widths. + columnwidthsrc + Sets the source reference on Chart Studio Cloud for + `columnwidth`. + customdata + Assigns extra data each datum. This may be useful when + listening to hover, click and selection events. Note + that, "scatter" traces also appends customdata items in + the markers DOM elements + customdatasrc + Sets the source reference on Chart Studio Cloud for + `customdata`. + domain + :class:`plotly.graph_objects.table.Domain` instance or + dict with compatible properties + header + :class:`plotly.graph_objects.table.Header` instance or + dict with compatible properties + hoverinfo + Determines which trace information appear on hover. If + `none` or `skip` are set, no information is displayed + upon hovering. But, if `none` is set, click and hover + events are still fired. + hoverinfosrc + Sets the source reference on Chart Studio Cloud for + `hoverinfo`. + hoverlabel + :class:`plotly.graph_objects.table.Hoverlabel` instance + or dict with compatible properties + ids + Assigns id labels to each datum. These ids for object + constancy of data points during animation. Should be an + array of strings, not numbers or any other type. + idssrc + Sets the source reference on Chart Studio Cloud for + `ids`. + legend + Sets the reference to a legend to show this trace in. + References to these legends are "legend", "legend2", + "legend3", etc. Settings for these legends are set in + the layout, under `layout.legend`, `layout.legend2`, + etc. + legendgrouptitle + :class:`plotly.graph_objects.table.Legendgrouptitle` + instance or dict with compatible properties + legendrank + Sets the legend rank for this trace. Items and groups + with smaller ranks are presented on top/left side while + with "reversed" `legend.traceorder` they are on + bottom/right side. The default legendrank is 1000, so + that you can use ranks less than 1000 to place certain + items before all unranked items, and ranks greater than + 1000 to go after all unranked items. When having + unranked or equal rank items shapes would be displayed + after traces i.e. according to their order in data and + layout. + legendwidth + Sets the width (in px or fraction) of the legend for + this trace. + meta + Assigns extra meta information associated with this + trace that can be used in various text attributes. + Attributes such as trace `name`, graph, axis and + colorbar `title.text`, annotation `text` + `rangeselector`, `updatemenues` and `sliders` `label` + text all support `meta`. To access the trace `meta` + values in an attribute in the same trace, simply use + `%{meta[i]}` where `i` is the index or key of the + `meta` item in question. To access trace `meta` in + layout attributes, use `%{data[n[.meta[i]}` where `i` + is the index or key of the `meta` and `n` is the trace + index. + metasrc + Sets the source reference on Chart Studio Cloud for + `meta`. + name + Sets the trace name. The trace name appears as the + legend item and on hover. + stream + :class:`plotly.graph_objects.table.Stream` instance or + dict with compatible properties + uid + Assign an id to this trace, Use this to provide object + constancy between traces during animations and + transitions. + uirevision + Controls persistence of some user-driven changes to the + trace: `constraintrange` in `parcoords` traces, as well + as some `editable: true` modifications such as `name` + and `colorbar.title`. Defaults to `layout.uirevision`. + Note that other user-driven trace attribute changes are + controlled by `layout` attributes: `trace.visible` is + controlled by `layout.legend.uirevision`, + `selectedpoints` is controlled by + `layout.selectionrevision`, and `colorbar.(x|y)` + (accessible with `config: {editable: true}`) is + controlled by `layout.editrevision`. Trace changes are + tracked by `uid`, which only falls back on trace index + if no `uid` is provided. So if your app can add/remove + traces before the end of the `data` array, such that + the same trace has a different index, you can still + preserve user-driven changes if you give each trace a + `uid` that stays with it as it moves. + visible + Determines whether or not this trace is visible. If + "legendonly", the trace is not drawn, but can appear as + a legend item (provided that the legend itself is + visible). + + Returns + ------- + Table + """ + super().__init__("table") + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + if arg is None: + arg = {} + elif isinstance(arg, self.__class__): + arg = arg.to_plotly_json() + elif isinstance(arg, dict): + arg = _copy.copy(arg) + else: + raise ValueError("""\ +The first argument to the plotly.graph_objs.Table +constructor must be a dict or +an instance of :class:`plotly.graph_objs.Table`""") + + self._skip_invalid = kwargs.pop("skip_invalid", False) + self._validate = kwargs.pop("_validate", True) + + self._set_property("cells", arg, cells) + self._set_property("columnorder", arg, columnorder) + self._set_property("columnordersrc", arg, columnordersrc) + self._set_property("columnwidth", arg, columnwidth) + self._set_property("columnwidthsrc", arg, columnwidthsrc) + self._set_property("customdata", arg, customdata) + self._set_property("customdatasrc", arg, customdatasrc) + self._set_property("domain", arg, domain) + self._set_property("header", arg, header) + self._set_property("hoverinfo", arg, hoverinfo) + self._set_property("hoverinfosrc", arg, hoverinfosrc) + self._set_property("hoverlabel", arg, hoverlabel) + self._set_property("ids", arg, ids) + self._set_property("idssrc", arg, idssrc) + self._set_property("legend", arg, legend) + self._set_property("legendgrouptitle", arg, legendgrouptitle) + self._set_property("legendrank", arg, legendrank) + self._set_property("legendwidth", arg, legendwidth) + self._set_property("meta", arg, meta) + self._set_property("metasrc", arg, metasrc) + self._set_property("name", arg, name) + self._set_property("stream", arg, stream) + self._set_property("uid", arg, uid) + self._set_property("uirevision", arg, uirevision) + self._set_property("visible", arg, visible) + + self._props["type"] = "table" + arg.pop("type", None) + self._process_kwargs(**dict(arg, **kwargs)) + self._skip_invalid = False diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/_treemap.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/_treemap.py new file mode 100644 index 0000000000000000000000000000000000000000..4cced036174cfa39f2cc7a89facd809b24884379 --- /dev/null +++ b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/_treemap.py @@ -0,0 +1,1832 @@ +# --- THIS FILE IS AUTO-GENERATED --- +# Modifications will be overwitten the next time code generation run. + +from plotly.basedatatypes import BaseTraceType as _BaseTraceType +import copy as _copy + + +class Treemap(_BaseTraceType): + _parent_path_str = "" + _path_str = "treemap" + _valid_props = { + "branchvalues", + "count", + "customdata", + "customdatasrc", + "domain", + "hoverinfo", + "hoverinfosrc", + "hoverlabel", + "hovertemplate", + "hovertemplatefallback", + "hovertemplatesrc", + "hovertext", + "hovertextsrc", + "ids", + "idssrc", + "insidetextfont", + "labels", + "labelssrc", + "legend", + "legendgrouptitle", + "legendrank", + "legendwidth", + "level", + "marker", + "maxdepth", + "meta", + "metasrc", + "name", + "opacity", + "outsidetextfont", + "parents", + "parentssrc", + "pathbar", + "root", + "sort", + "stream", + "text", + "textfont", + "textinfo", + "textposition", + "textsrc", + "texttemplate", + "texttemplatefallback", + "texttemplatesrc", + "tiling", + "type", + "uid", + "uirevision", + "values", + "valuessrc", + "visible", + } + + @property + def branchvalues(self): + """ + Determines how the items in `values` are summed. When set to + "total", items in `values` are taken to be value of all its + descendants. When set to "remainder", items in `values` + corresponding to the root and the branches sectors are taken to + be the extra part not part of the sum of the values at their + leaves. + + The 'branchvalues' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['remainder', 'total'] + + Returns + ------- + Any + """ + return self["branchvalues"] + + @branchvalues.setter + def branchvalues(self, val): + self["branchvalues"] = val + + @property + def count(self): + """ + Determines default for `values` when it is not provided, by + inferring a 1 for each of the "leaves" and/or "branches", + otherwise 0. + + The 'count' property is a flaglist and may be specified + as a string containing: + - Any combination of ['branches', 'leaves'] joined with '+' characters + (e.g. 'branches+leaves') + + Returns + ------- + Any + """ + return self["count"] + + @count.setter + def count(self, val): + self["count"] = val + + @property + def customdata(self): + """ + Assigns extra data each datum. This may be useful when + listening to hover, click and selection events. Note that, + "scatter" traces also appends customdata items in the markers + DOM elements + + The 'customdata' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["customdata"] + + @customdata.setter + def customdata(self, val): + self["customdata"] = val + + @property + def customdatasrc(self): + """ + Sets the source reference on Chart Studio Cloud for + `customdata`. + + The 'customdatasrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["customdatasrc"] + + @customdatasrc.setter + def customdatasrc(self, val): + self["customdatasrc"] = val + + @property + def domain(self): + """ + The 'domain' property is an instance of Domain + that may be specified as: + - An instance of :class:`plotly.graph_objs.treemap.Domain` + - A dict of string/value properties that will be passed + to the Domain constructor + + Returns + ------- + plotly.graph_objs.treemap.Domain + """ + return self["domain"] + + @domain.setter + def domain(self, val): + self["domain"] = val + + @property + def hoverinfo(self): + """ + Determines which trace information appear on hover. If `none` + or `skip` are set, no information is displayed upon hovering. + But, if `none` is set, click and hover events are still fired. + + The 'hoverinfo' property is a flaglist and may be specified + as a string containing: + - Any combination of ['label', 'text', 'value', 'name', 'current path', 'percent root', 'percent entry', 'percent parent'] joined with '+' characters + (e.g. 'label+text') + OR exactly one of ['all', 'none', 'skip'] (e.g. 'skip') + - A list or array of the above + + Returns + ------- + Any|numpy.ndarray + """ + return self["hoverinfo"] + + @hoverinfo.setter + def hoverinfo(self, val): + self["hoverinfo"] = val + + @property + def hoverinfosrc(self): + """ + Sets the source reference on Chart Studio Cloud for + `hoverinfo`. + + The 'hoverinfosrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["hoverinfosrc"] + + @hoverinfosrc.setter + def hoverinfosrc(self, val): + self["hoverinfosrc"] = val + + @property + def hoverlabel(self): + """ + The 'hoverlabel' property is an instance of Hoverlabel + that may be specified as: + - An instance of :class:`plotly.graph_objs.treemap.Hoverlabel` + - A dict of string/value properties that will be passed + to the Hoverlabel constructor + + Returns + ------- + plotly.graph_objs.treemap.Hoverlabel + """ + return self["hoverlabel"] + + @hoverlabel.setter + def hoverlabel(self, val): + self["hoverlabel"] = val + + @property + def hovertemplate(self): + """ + Template string used for rendering the information that appear + on hover box. Note that this will override `hoverinfo`. + Variables are inserted using %{variable}, for example "y: %{y}" + as well as %{xother}, {%_xother}, {%_xother_}, {%xother_}. When + showing info for several points, "xother" will be added to + those with different x positions from the first point. An + underscore before or after "(x|y)other" will add a space on + that side, only when this field is shown. Numbers are formatted + using d3-format's syntax %{variable:d3-format}, for example + "Price: %{y:$.2f}". + https://github.com/d3/d3-format/tree/v1.4.5#d3-format for + details on the formatting syntax. Dates are formatted using + d3-time-format's syntax %{variable|d3-time-format}, for example + "Day: %{2019-01-01|%A}". https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format for details on the date + formatting syntax. Variables that can't be found will be + replaced with the specifier. For example, a template of "data: + %{x}, %{y}" will result in a value of "data: 1, %{y}" if x is 1 + and y is missing. Variables with an undefined value will be + replaced with the fallback value. The variables available in + `hovertemplate` are the ones emitted as event data described at + this link https://plotly.com/javascript/plotlyjs-events/#event- + data. Additionally, all attributes that can be specified per- + point (the ones that are `arrayOk: true`) are available. + Finally, the template string has access to variables + `currentPath`, `root`, `entry`, `percentRoot`, `percentEntry` + and `percentParent`. Anything contained in tag `` is + displayed in the secondary box, for example + `%{fullData.name}`. To hide the secondary box + completely, use an empty tag ``. + + The 'hovertemplate' property is a string and must be specified as: + - A string + - A number that will be converted to a string + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["hovertemplate"] + + @hovertemplate.setter + def hovertemplate(self, val): + self["hovertemplate"] = val + + @property + def hovertemplatefallback(self): + """ + Fallback string that's displayed when a variable referenced in + a template is missing. If the boolean value 'false' is passed + in, the specifier with the missing variable will be displayed. + + The 'hovertemplatefallback' property accepts values of any type + + Returns + ------- + Any + """ + return self["hovertemplatefallback"] + + @hovertemplatefallback.setter + def hovertemplatefallback(self, val): + self["hovertemplatefallback"] = val + + @property + def hovertemplatesrc(self): + """ + Sets the source reference on Chart Studio Cloud for + `hovertemplate`. + + The 'hovertemplatesrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["hovertemplatesrc"] + + @hovertemplatesrc.setter + def hovertemplatesrc(self, val): + self["hovertemplatesrc"] = val + + @property + def hovertext(self): + """ + Sets hover text elements associated with each sector. If a + single string, the same string appears for all data points. If + an array of string, the items are mapped in order of this + trace's sectors. To be seen, trace `hoverinfo` must contain a + "text" flag. + + The 'hovertext' property is a string and must be specified as: + - A string + - A number that will be converted to a string + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["hovertext"] + + @hovertext.setter + def hovertext(self, val): + self["hovertext"] = val + + @property + def hovertextsrc(self): + """ + Sets the source reference on Chart Studio Cloud for + `hovertext`. + + The 'hovertextsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["hovertextsrc"] + + @hovertextsrc.setter + def hovertextsrc(self, val): + self["hovertextsrc"] = val + + @property + def ids(self): + """ + Assigns id labels to each datum. These ids for object constancy + of data points during animation. Should be an array of strings, + not numbers or any other type. + + The 'ids' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["ids"] + + @ids.setter + def ids(self, val): + self["ids"] = val + + @property + def idssrc(self): + """ + Sets the source reference on Chart Studio Cloud for `ids`. + + The 'idssrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["idssrc"] + + @idssrc.setter + def idssrc(self, val): + self["idssrc"] = val + + @property + def insidetextfont(self): + """ + Sets the font used for `textinfo` lying inside the sector. + + The 'insidetextfont' property is an instance of Insidetextfont + that may be specified as: + - An instance of :class:`plotly.graph_objs.treemap.Insidetextfont` + - A dict of string/value properties that will be passed + to the Insidetextfont constructor + + Returns + ------- + plotly.graph_objs.treemap.Insidetextfont + """ + return self["insidetextfont"] + + @insidetextfont.setter + def insidetextfont(self, val): + self["insidetextfont"] = val + + @property + def labels(self): + """ + Sets the labels of each of the sectors. + + The 'labels' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["labels"] + + @labels.setter + def labels(self, val): + self["labels"] = val + + @property + def labelssrc(self): + """ + Sets the source reference on Chart Studio Cloud for `labels`. + + The 'labelssrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["labelssrc"] + + @labelssrc.setter + def labelssrc(self, val): + self["labelssrc"] = val + + @property + def legend(self): + """ + Sets the reference to a legend to show this trace in. + References to these legends are "legend", "legend2", "legend3", + etc. Settings for these legends are set in the layout, under + `layout.legend`, `layout.legend2`, etc. + + The 'legend' property is an identifier of a particular + subplot, of type 'legend', that may be specified as: + - the string 'legend' optionally followed by an integer >= 1 + (e.g. 'legend', 'legend1', 'legend2', 'legend3', etc.) + + Returns + ------- + str + """ + return self["legend"] + + @legend.setter + def legend(self, val): + self["legend"] = val + + @property + def legendgrouptitle(self): + """ + The 'legendgrouptitle' property is an instance of Legendgrouptitle + that may be specified as: + - An instance of :class:`plotly.graph_objs.treemap.Legendgrouptitle` + - A dict of string/value properties that will be passed + to the Legendgrouptitle constructor + + Returns + ------- + plotly.graph_objs.treemap.Legendgrouptitle + """ + return self["legendgrouptitle"] + + @legendgrouptitle.setter + def legendgrouptitle(self, val): + self["legendgrouptitle"] = val + + @property + def legendrank(self): + """ + Sets the legend rank for this trace. Items and groups with + smaller ranks are presented on top/left side while with + "reversed" `legend.traceorder` they are on bottom/right side. + The default legendrank is 1000, so that you can use ranks less + than 1000 to place certain items before all unranked items, and + ranks greater than 1000 to go after all unranked items. When + having unranked or equal rank items shapes would be displayed + after traces i.e. according to their order in data and layout. + + The 'legendrank' property is a number and may be specified as: + - An int or float + + Returns + ------- + int|float + """ + return self["legendrank"] + + @legendrank.setter + def legendrank(self, val): + self["legendrank"] = val + + @property + def legendwidth(self): + """ + Sets the width (in px or fraction) of the legend for this + trace. + + The 'legendwidth' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["legendwidth"] + + @legendwidth.setter + def legendwidth(self, val): + self["legendwidth"] = val + + @property + def level(self): + """ + Sets the level from which this trace hierarchy is rendered. Set + `level` to `''` to start from the root node in the hierarchy. + Must be an "id" if `ids` is filled in, otherwise plotly + attempts to find a matching item in `labels`. + + The 'level' property accepts values of any type + + Returns + ------- + Any + """ + return self["level"] + + @level.setter + def level(self, val): + self["level"] = val + + @property + def marker(self): + """ + The 'marker' property is an instance of Marker + that may be specified as: + - An instance of :class:`plotly.graph_objs.treemap.Marker` + - A dict of string/value properties that will be passed + to the Marker constructor + + Returns + ------- + plotly.graph_objs.treemap.Marker + """ + return self["marker"] + + @marker.setter + def marker(self, val): + self["marker"] = val + + @property + def maxdepth(self): + """ + Sets the number of rendered sectors from any given `level`. Set + `maxdepth` to "-1" to render all the levels in the hierarchy. + + The 'maxdepth' property is a integer and may be specified as: + - An int (or float that will be cast to an int) + + Returns + ------- + int + """ + return self["maxdepth"] + + @maxdepth.setter + def maxdepth(self, val): + self["maxdepth"] = val + + @property + def meta(self): + """ + Assigns extra meta information associated with this trace that + can be used in various text attributes. Attributes such as + trace `name`, graph, axis and colorbar `title.text`, annotation + `text` `rangeselector`, `updatemenues` and `sliders` `label` + text all support `meta`. To access the trace `meta` values in + an attribute in the same trace, simply use `%{meta[i]}` where + `i` is the index or key of the `meta` item in question. To + access trace `meta` in layout attributes, use + `%{data[n[.meta[i]}` where `i` is the index or key of the + `meta` and `n` is the trace index. + + The 'meta' property accepts values of any type + + Returns + ------- + Any|numpy.ndarray + """ + return self["meta"] + + @meta.setter + def meta(self, val): + self["meta"] = val + + @property + def metasrc(self): + """ + Sets the source reference on Chart Studio Cloud for `meta`. + + The 'metasrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["metasrc"] + + @metasrc.setter + def metasrc(self, val): + self["metasrc"] = val + + @property + def name(self): + """ + Sets the trace name. The trace name appears as the legend item + and on hover. + + The 'name' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["name"] + + @name.setter + def name(self, val): + self["name"] = val + + @property + def opacity(self): + """ + Sets the opacity of the trace. + + The 'opacity' property is a number and may be specified as: + - An int or float in the interval [0, 1] + + Returns + ------- + int|float + """ + return self["opacity"] + + @opacity.setter + def opacity(self, val): + self["opacity"] = val + + @property + def outsidetextfont(self): + """ + Sets the font used for `textinfo` lying outside the sector. + This option refers to the root of the hierarchy presented on + top left corner of a treemap graph. Please note that if a + hierarchy has multiple root nodes, this option won't have any + effect and `insidetextfont` would be used. + + The 'outsidetextfont' property is an instance of Outsidetextfont + that may be specified as: + - An instance of :class:`plotly.graph_objs.treemap.Outsidetextfont` + - A dict of string/value properties that will be passed + to the Outsidetextfont constructor + + Returns + ------- + plotly.graph_objs.treemap.Outsidetextfont + """ + return self["outsidetextfont"] + + @outsidetextfont.setter + def outsidetextfont(self, val): + self["outsidetextfont"] = val + + @property + def parents(self): + """ + Sets the parent sectors for each of the sectors. Empty string + items '' are understood to reference the root node in the + hierarchy. If `ids` is filled, `parents` items are understood + to be "ids" themselves. When `ids` is not set, plotly attempts + to find matching items in `labels`, but beware they must be + unique. + + The 'parents' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["parents"] + + @parents.setter + def parents(self, val): + self["parents"] = val + + @property + def parentssrc(self): + """ + Sets the source reference on Chart Studio Cloud for `parents`. + + The 'parentssrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["parentssrc"] + + @parentssrc.setter + def parentssrc(self, val): + self["parentssrc"] = val + + @property + def pathbar(self): + """ + The 'pathbar' property is an instance of Pathbar + that may be specified as: + - An instance of :class:`plotly.graph_objs.treemap.Pathbar` + - A dict of string/value properties that will be passed + to the Pathbar constructor + + Returns + ------- + plotly.graph_objs.treemap.Pathbar + """ + return self["pathbar"] + + @pathbar.setter + def pathbar(self, val): + self["pathbar"] = val + + @property + def root(self): + """ + The 'root' property is an instance of Root + that may be specified as: + - An instance of :class:`plotly.graph_objs.treemap.Root` + - A dict of string/value properties that will be passed + to the Root constructor + + Returns + ------- + plotly.graph_objs.treemap.Root + """ + return self["root"] + + @root.setter + def root(self, val): + self["root"] = val + + @property + def sort(self): + """ + Determines whether or not the sectors are reordered from + largest to smallest. + + The 'sort' property is a boolean and must be specified as: + - A boolean value: True or False + + Returns + ------- + bool + """ + return self["sort"] + + @sort.setter + def sort(self, val): + self["sort"] = val + + @property + def stream(self): + """ + The 'stream' property is an instance of Stream + that may be specified as: + - An instance of :class:`plotly.graph_objs.treemap.Stream` + - A dict of string/value properties that will be passed + to the Stream constructor + + Returns + ------- + plotly.graph_objs.treemap.Stream + """ + return self["stream"] + + @stream.setter + def stream(self, val): + self["stream"] = val + + @property + def text(self): + """ + Sets text elements associated with each sector. If trace + `textinfo` contains a "text" flag, these elements will be seen + on the chart. If trace `hoverinfo` contains a "text" flag and + "hovertext" is not set, these elements will be seen in the + hover labels. + + The 'text' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["text"] + + @text.setter + def text(self, val): + self["text"] = val + + @property + def textfont(self): + """ + Sets the font used for `textinfo`. + + The 'textfont' property is an instance of Textfont + that may be specified as: + - An instance of :class:`plotly.graph_objs.treemap.Textfont` + - A dict of string/value properties that will be passed + to the Textfont constructor + + Returns + ------- + plotly.graph_objs.treemap.Textfont + """ + return self["textfont"] + + @textfont.setter + def textfont(self, val): + self["textfont"] = val + + @property + def textinfo(self): + """ + Determines which trace information appear on the graph. + + The 'textinfo' property is a flaglist and may be specified + as a string containing: + - Any combination of ['label', 'text', 'value', 'current path', 'percent root', 'percent entry', 'percent parent'] joined with '+' characters + (e.g. 'label+text') + OR exactly one of ['none'] (e.g. 'none') + + Returns + ------- + Any + """ + return self["textinfo"] + + @textinfo.setter + def textinfo(self, val): + self["textinfo"] = val + + @property + def textposition(self): + """ + Sets the positions of the `text` elements. + + The 'textposition' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['top left', 'top center', 'top right', 'middle left', + 'middle center', 'middle right', 'bottom left', 'bottom + center', 'bottom right'] + + Returns + ------- + Any + """ + return self["textposition"] + + @textposition.setter + def textposition(self, val): + self["textposition"] = val + + @property + def textsrc(self): + """ + Sets the source reference on Chart Studio Cloud for `text`. + + The 'textsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["textsrc"] + + @textsrc.setter + def textsrc(self, val): + self["textsrc"] = val + + @property + def texttemplate(self): + """ + Template string used for rendering the information text that + appears on points. Note that this will override `textinfo`. + Variables are inserted using %{variable}, for example "y: + %{y}". Numbers are formatted using d3-format's syntax + %{variable:d3-format}, for example "Price: %{y:$.2f}". + https://github.com/d3/d3-format/tree/v1.4.5#d3-format for + details on the formatting syntax. Dates are formatted using + d3-time-format's syntax %{variable|d3-time-format}, for example + "Day: %{2019-01-01|%A}". https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format for details on the date + formatting syntax. Variables that can't be found will be + replaced with the specifier. For example, a template of "data: + %{x}, %{y}" will result in a value of "data: 1, %{y}" if x is 1 + and y is missing. Variables with an undefined value will be + replaced with the fallback value. All attributes that can be + specified per-point (the ones that are `arrayOk: true`) are + available. Finally, the template string has access to variables + `currentPath`, `root`, `entry`, `percentRoot`, `percentEntry`, + `percentParent`, `label` and `value`. + + The 'texttemplate' property is a string and must be specified as: + - A string + - A number that will be converted to a string + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["texttemplate"] + + @texttemplate.setter + def texttemplate(self, val): + self["texttemplate"] = val + + @property + def texttemplatefallback(self): + """ + Fallback string that's displayed when a variable referenced in + a template is missing. If the boolean value 'false' is passed + in, the specifier with the missing variable will be displayed. + + The 'texttemplatefallback' property accepts values of any type + + Returns + ------- + Any + """ + return self["texttemplatefallback"] + + @texttemplatefallback.setter + def texttemplatefallback(self, val): + self["texttemplatefallback"] = val + + @property + def texttemplatesrc(self): + """ + Sets the source reference on Chart Studio Cloud for + `texttemplate`. + + The 'texttemplatesrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["texttemplatesrc"] + + @texttemplatesrc.setter + def texttemplatesrc(self, val): + self["texttemplatesrc"] = val + + @property + def tiling(self): + """ + The 'tiling' property is an instance of Tiling + that may be specified as: + - An instance of :class:`plotly.graph_objs.treemap.Tiling` + - A dict of string/value properties that will be passed + to the Tiling constructor + + Returns + ------- + plotly.graph_objs.treemap.Tiling + """ + return self["tiling"] + + @tiling.setter + def tiling(self, val): + self["tiling"] = val + + @property + def uid(self): + """ + Assign an id to this trace, Use this to provide object + constancy between traces during animations and transitions. + + The 'uid' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["uid"] + + @uid.setter + def uid(self, val): + self["uid"] = val + + @property + def uirevision(self): + """ + Controls persistence of some user-driven changes to the trace: + `constraintrange` in `parcoords` traces, as well as some + `editable: true` modifications such as `name` and + `colorbar.title`. Defaults to `layout.uirevision`. Note that + other user-driven trace attribute changes are controlled by + `layout` attributes: `trace.visible` is controlled by + `layout.legend.uirevision`, `selectedpoints` is controlled by + `layout.selectionrevision`, and `colorbar.(x|y)` (accessible + with `config: {editable: true}`) is controlled by + `layout.editrevision`. Trace changes are tracked by `uid`, + which only falls back on trace index if no `uid` is provided. + So if your app can add/remove traces before the end of the + `data` array, such that the same trace has a different index, + you can still preserve user-driven changes if you give each + trace a `uid` that stays with it as it moves. + + The 'uirevision' property accepts values of any type + + Returns + ------- + Any + """ + return self["uirevision"] + + @uirevision.setter + def uirevision(self, val): + self["uirevision"] = val + + @property + def values(self): + """ + Sets the values associated with each of the sectors. Use with + `branchvalues` to determine how the values are summed. + + The 'values' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["values"] + + @values.setter + def values(self, val): + self["values"] = val + + @property + def valuessrc(self): + """ + Sets the source reference on Chart Studio Cloud for `values`. + + The 'valuessrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["valuessrc"] + + @valuessrc.setter + def valuessrc(self, val): + self["valuessrc"] = val + + @property + def visible(self): + """ + Determines whether or not this trace is visible. If + "legendonly", the trace is not drawn, but can appear as a + legend item (provided that the legend itself is visible). + + The 'visible' property is an enumeration that may be specified as: + - One of the following enumeration values: + [True, False, 'legendonly'] + + Returns + ------- + Any + """ + return self["visible"] + + @visible.setter + def visible(self, val): + self["visible"] = val + + @property + def type(self): + return self._props["type"] + + @property + def _prop_descriptions(self): + return """\ + branchvalues + Determines how the items in `values` are summed. When + set to "total", items in `values` are taken to be value + of all its descendants. When set to "remainder", items + in `values` corresponding to the root and the branches + sectors are taken to be the extra part not part of the + sum of the values at their leaves. + count + Determines default for `values` when it is not + provided, by inferring a 1 for each of the "leaves" + and/or "branches", otherwise 0. + customdata + Assigns extra data each datum. This may be useful when + listening to hover, click and selection events. Note + that, "scatter" traces also appends customdata items in + the markers DOM elements + customdatasrc + Sets the source reference on Chart Studio Cloud for + `customdata`. + domain + :class:`plotly.graph_objects.treemap.Domain` instance + or dict with compatible properties + hoverinfo + Determines which trace information appear on hover. If + `none` or `skip` are set, no information is displayed + upon hovering. But, if `none` is set, click and hover + events are still fired. + hoverinfosrc + Sets the source reference on Chart Studio Cloud for + `hoverinfo`. + hoverlabel + :class:`plotly.graph_objects.treemap.Hoverlabel` + instance or dict with compatible properties + hovertemplate + Template string used for rendering the information that + appear on hover box. Note that this will override + `hoverinfo`. Variables are inserted using %{variable}, + for example "y: %{y}" as well as %{xother}, {%_xother}, + {%_xother_}, {%xother_}. When showing info for several + points, "xother" will be added to those with different + x positions from the first point. An underscore before + or after "(x|y)other" will add a space on that side, + only when this field is shown. Numbers are formatted + using d3-format's syntax %{variable:d3-format}, for + example "Price: %{y:$.2f}". + https://github.com/d3/d3-format/tree/v1.4.5#d3-format + for details on the formatting syntax. Dates are + formatted using d3-time-format's syntax + %{variable|d3-time-format}, for example "Day: + %{2019-01-01|%A}". https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format for details on the + date formatting syntax. Variables that can't be found + will be replaced with the specifier. For example, a + template of "data: %{x}, %{y}" will result in a value + of "data: 1, %{y}" if x is 1 and y is missing. + Variables with an undefined value will be replaced with + the fallback value. The variables available in + `hovertemplate` are the ones emitted as event data + described at this link + https://plotly.com/javascript/plotlyjs-events/#event- + data. Additionally, all attributes that can be + specified per-point (the ones that are `arrayOk: true`) + are available. Finally, the template string has access + to variables `currentPath`, `root`, `entry`, + `percentRoot`, `percentEntry` and `percentParent`. + Anything contained in tag `` is displayed in the + secondary box, for example + `%{fullData.name}`. To hide the + secondary box completely, use an empty tag + ``. + hovertemplatefallback + Fallback string that's displayed when a variable + referenced in a template is missing. If the boolean + value 'false' is passed in, the specifier with the + missing variable will be displayed. + hovertemplatesrc + Sets the source reference on Chart Studio Cloud for + `hovertemplate`. + hovertext + Sets hover text elements associated with each sector. + If a single string, the same string appears for all + data points. If an array of string, the items are + mapped in order of this trace's sectors. To be seen, + trace `hoverinfo` must contain a "text" flag. + hovertextsrc + Sets the source reference on Chart Studio Cloud for + `hovertext`. + ids + Assigns id labels to each datum. These ids for object + constancy of data points during animation. Should be an + array of strings, not numbers or any other type. + idssrc + Sets the source reference on Chart Studio Cloud for + `ids`. + insidetextfont + Sets the font used for `textinfo` lying inside the + sector. + labels + Sets the labels of each of the sectors. + labelssrc + Sets the source reference on Chart Studio Cloud for + `labels`. + legend + Sets the reference to a legend to show this trace in. + References to these legends are "legend", "legend2", + "legend3", etc. Settings for these legends are set in + the layout, under `layout.legend`, `layout.legend2`, + etc. + legendgrouptitle + :class:`plotly.graph_objects.treemap.Legendgrouptitle` + instance or dict with compatible properties + legendrank + Sets the legend rank for this trace. Items and groups + with smaller ranks are presented on top/left side while + with "reversed" `legend.traceorder` they are on + bottom/right side. The default legendrank is 1000, so + that you can use ranks less than 1000 to place certain + items before all unranked items, and ranks greater than + 1000 to go after all unranked items. When having + unranked or equal rank items shapes would be displayed + after traces i.e. according to their order in data and + layout. + legendwidth + Sets the width (in px or fraction) of the legend for + this trace. + level + Sets the level from which this trace hierarchy is + rendered. Set `level` to `''` to start from the root + node in the hierarchy. Must be an "id" if `ids` is + filled in, otherwise plotly attempts to find a matching + item in `labels`. + marker + :class:`plotly.graph_objects.treemap.Marker` instance + or dict with compatible properties + maxdepth + Sets the number of rendered sectors from any given + `level`. Set `maxdepth` to "-1" to render all the + levels in the hierarchy. + meta + Assigns extra meta information associated with this + trace that can be used in various text attributes. + Attributes such as trace `name`, graph, axis and + colorbar `title.text`, annotation `text` + `rangeselector`, `updatemenues` and `sliders` `label` + text all support `meta`. To access the trace `meta` + values in an attribute in the same trace, simply use + `%{meta[i]}` where `i` is the index or key of the + `meta` item in question. To access trace `meta` in + layout attributes, use `%{data[n[.meta[i]}` where `i` + is the index or key of the `meta` and `n` is the trace + index. + metasrc + Sets the source reference on Chart Studio Cloud for + `meta`. + name + Sets the trace name. The trace name appears as the + legend item and on hover. + opacity + Sets the opacity of the trace. + outsidetextfont + Sets the font used for `textinfo` lying outside the + sector. This option refers to the root of the hierarchy + presented on top left corner of a treemap graph. Please + note that if a hierarchy has multiple root nodes, this + option won't have any effect and `insidetextfont` would + be used. + parents + Sets the parent sectors for each of the sectors. Empty + string items '' are understood to reference the root + node in the hierarchy. If `ids` is filled, `parents` + items are understood to be "ids" themselves. When `ids` + is not set, plotly attempts to find matching items in + `labels`, but beware they must be unique. + parentssrc + Sets the source reference on Chart Studio Cloud for + `parents`. + pathbar + :class:`plotly.graph_objects.treemap.Pathbar` instance + or dict with compatible properties + root + :class:`plotly.graph_objects.treemap.Root` instance or + dict with compatible properties + sort + Determines whether or not the sectors are reordered + from largest to smallest. + stream + :class:`plotly.graph_objects.treemap.Stream` instance + or dict with compatible properties + text + Sets text elements associated with each sector. If + trace `textinfo` contains a "text" flag, these elements + will be seen on the chart. If trace `hoverinfo` + contains a "text" flag and "hovertext" is not set, + these elements will be seen in the hover labels. + textfont + Sets the font used for `textinfo`. + textinfo + Determines which trace information appear on the graph. + textposition + Sets the positions of the `text` elements. + textsrc + Sets the source reference on Chart Studio Cloud for + `text`. + texttemplate + Template string used for rendering the information text + that appears on points. Note that this will override + `textinfo`. Variables are inserted using %{variable}, + for example "y: %{y}". Numbers are formatted using + d3-format's syntax %{variable:d3-format}, for example + "Price: %{y:$.2f}". + https://github.com/d3/d3-format/tree/v1.4.5#d3-format + for details on the formatting syntax. Dates are + formatted using d3-time-format's syntax + %{variable|d3-time-format}, for example "Day: + %{2019-01-01|%A}". https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format for details on the + date formatting syntax. Variables that can't be found + will be replaced with the specifier. For example, a + template of "data: %{x}, %{y}" will result in a value + of "data: 1, %{y}" if x is 1 and y is missing. + Variables with an undefined value will be replaced with + the fallback value. All attributes that can be + specified per-point (the ones that are `arrayOk: true`) + are available. Finally, the template string has access + to variables `currentPath`, `root`, `entry`, + `percentRoot`, `percentEntry`, `percentParent`, `label` + and `value`. + texttemplatefallback + Fallback string that's displayed when a variable + referenced in a template is missing. If the boolean + value 'false' is passed in, the specifier with the + missing variable will be displayed. + texttemplatesrc + Sets the source reference on Chart Studio Cloud for + `texttemplate`. + tiling + :class:`plotly.graph_objects.treemap.Tiling` instance + or dict with compatible properties + uid + Assign an id to this trace, Use this to provide object + constancy between traces during animations and + transitions. + uirevision + Controls persistence of some user-driven changes to the + trace: `constraintrange` in `parcoords` traces, as well + as some `editable: true` modifications such as `name` + and `colorbar.title`. Defaults to `layout.uirevision`. + Note that other user-driven trace attribute changes are + controlled by `layout` attributes: `trace.visible` is + controlled by `layout.legend.uirevision`, + `selectedpoints` is controlled by + `layout.selectionrevision`, and `colorbar.(x|y)` + (accessible with `config: {editable: true}`) is + controlled by `layout.editrevision`. Trace changes are + tracked by `uid`, which only falls back on trace index + if no `uid` is provided. So if your app can add/remove + traces before the end of the `data` array, such that + the same trace has a different index, you can still + preserve user-driven changes if you give each trace a + `uid` that stays with it as it moves. + values + Sets the values associated with each of the sectors. + Use with `branchvalues` to determine how the values are + summed. + valuessrc + Sets the source reference on Chart Studio Cloud for + `values`. + visible + Determines whether or not this trace is visible. If + "legendonly", the trace is not drawn, but can appear as + a legend item (provided that the legend itself is + visible). + """ + + def __init__( + self, + arg=None, + branchvalues=None, + count=None, + customdata=None, + customdatasrc=None, + domain=None, + hoverinfo=None, + hoverinfosrc=None, + hoverlabel=None, + hovertemplate=None, + hovertemplatefallback=None, + hovertemplatesrc=None, + hovertext=None, + hovertextsrc=None, + ids=None, + idssrc=None, + insidetextfont=None, + labels=None, + labelssrc=None, + legend=None, + legendgrouptitle=None, + legendrank=None, + legendwidth=None, + level=None, + marker=None, + maxdepth=None, + meta=None, + metasrc=None, + name=None, + opacity=None, + outsidetextfont=None, + parents=None, + parentssrc=None, + pathbar=None, + root=None, + sort=None, + stream=None, + text=None, + textfont=None, + textinfo=None, + textposition=None, + textsrc=None, + texttemplate=None, + texttemplatefallback=None, + texttemplatesrc=None, + tiling=None, + uid=None, + uirevision=None, + values=None, + valuessrc=None, + visible=None, + **kwargs, + ): + """ + Construct a new Treemap object + + Visualize hierarchal data from leaves (and/or outer branches) + towards root with rectangles. The treemap sectors are + determined by the entries in "labels" or "ids" and in + "parents". + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of :class:`plotly.graph_objs.Treemap` + branchvalues + Determines how the items in `values` are summed. When + set to "total", items in `values` are taken to be value + of all its descendants. When set to "remainder", items + in `values` corresponding to the root and the branches + sectors are taken to be the extra part not part of the + sum of the values at their leaves. + count + Determines default for `values` when it is not + provided, by inferring a 1 for each of the "leaves" + and/or "branches", otherwise 0. + customdata + Assigns extra data each datum. This may be useful when + listening to hover, click and selection events. Note + that, "scatter" traces also appends customdata items in + the markers DOM elements + customdatasrc + Sets the source reference on Chart Studio Cloud for + `customdata`. + domain + :class:`plotly.graph_objects.treemap.Domain` instance + or dict with compatible properties + hoverinfo + Determines which trace information appear on hover. If + `none` or `skip` are set, no information is displayed + upon hovering. But, if `none` is set, click and hover + events are still fired. + hoverinfosrc + Sets the source reference on Chart Studio Cloud for + `hoverinfo`. + hoverlabel + :class:`plotly.graph_objects.treemap.Hoverlabel` + instance or dict with compatible properties + hovertemplate + Template string used for rendering the information that + appear on hover box. Note that this will override + `hoverinfo`. Variables are inserted using %{variable}, + for example "y: %{y}" as well as %{xother}, {%_xother}, + {%_xother_}, {%xother_}. When showing info for several + points, "xother" will be added to those with different + x positions from the first point. An underscore before + or after "(x|y)other" will add a space on that side, + only when this field is shown. Numbers are formatted + using d3-format's syntax %{variable:d3-format}, for + example "Price: %{y:$.2f}". + https://github.com/d3/d3-format/tree/v1.4.5#d3-format + for details on the formatting syntax. Dates are + formatted using d3-time-format's syntax + %{variable|d3-time-format}, for example "Day: + %{2019-01-01|%A}". https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format for details on the + date formatting syntax. Variables that can't be found + will be replaced with the specifier. For example, a + template of "data: %{x}, %{y}" will result in a value + of "data: 1, %{y}" if x is 1 and y is missing. + Variables with an undefined value will be replaced with + the fallback value. The variables available in + `hovertemplate` are the ones emitted as event data + described at this link + https://plotly.com/javascript/plotlyjs-events/#event- + data. Additionally, all attributes that can be + specified per-point (the ones that are `arrayOk: true`) + are available. Finally, the template string has access + to variables `currentPath`, `root`, `entry`, + `percentRoot`, `percentEntry` and `percentParent`. + Anything contained in tag `` is displayed in the + secondary box, for example + `%{fullData.name}`. To hide the + secondary box completely, use an empty tag + ``. + hovertemplatefallback + Fallback string that's displayed when a variable + referenced in a template is missing. If the boolean + value 'false' is passed in, the specifier with the + missing variable will be displayed. + hovertemplatesrc + Sets the source reference on Chart Studio Cloud for + `hovertemplate`. + hovertext + Sets hover text elements associated with each sector. + If a single string, the same string appears for all + data points. If an array of string, the items are + mapped in order of this trace's sectors. To be seen, + trace `hoverinfo` must contain a "text" flag. + hovertextsrc + Sets the source reference on Chart Studio Cloud for + `hovertext`. + ids + Assigns id labels to each datum. These ids for object + constancy of data points during animation. Should be an + array of strings, not numbers or any other type. + idssrc + Sets the source reference on Chart Studio Cloud for + `ids`. + insidetextfont + Sets the font used for `textinfo` lying inside the + sector. + labels + Sets the labels of each of the sectors. + labelssrc + Sets the source reference on Chart Studio Cloud for + `labels`. + legend + Sets the reference to a legend to show this trace in. + References to these legends are "legend", "legend2", + "legend3", etc. Settings for these legends are set in + the layout, under `layout.legend`, `layout.legend2`, + etc. + legendgrouptitle + :class:`plotly.graph_objects.treemap.Legendgrouptitle` + instance or dict with compatible properties + legendrank + Sets the legend rank for this trace. Items and groups + with smaller ranks are presented on top/left side while + with "reversed" `legend.traceorder` they are on + bottom/right side. The default legendrank is 1000, so + that you can use ranks less than 1000 to place certain + items before all unranked items, and ranks greater than + 1000 to go after all unranked items. When having + unranked or equal rank items shapes would be displayed + after traces i.e. according to their order in data and + layout. + legendwidth + Sets the width (in px or fraction) of the legend for + this trace. + level + Sets the level from which this trace hierarchy is + rendered. Set `level` to `''` to start from the root + node in the hierarchy. Must be an "id" if `ids` is + filled in, otherwise plotly attempts to find a matching + item in `labels`. + marker + :class:`plotly.graph_objects.treemap.Marker` instance + or dict with compatible properties + maxdepth + Sets the number of rendered sectors from any given + `level`. Set `maxdepth` to "-1" to render all the + levels in the hierarchy. + meta + Assigns extra meta information associated with this + trace that can be used in various text attributes. + Attributes such as trace `name`, graph, axis and + colorbar `title.text`, annotation `text` + `rangeselector`, `updatemenues` and `sliders` `label` + text all support `meta`. To access the trace `meta` + values in an attribute in the same trace, simply use + `%{meta[i]}` where `i` is the index or key of the + `meta` item in question. To access trace `meta` in + layout attributes, use `%{data[n[.meta[i]}` where `i` + is the index or key of the `meta` and `n` is the trace + index. + metasrc + Sets the source reference on Chart Studio Cloud for + `meta`. + name + Sets the trace name. The trace name appears as the + legend item and on hover. + opacity + Sets the opacity of the trace. + outsidetextfont + Sets the font used for `textinfo` lying outside the + sector. This option refers to the root of the hierarchy + presented on top left corner of a treemap graph. Please + note that if a hierarchy has multiple root nodes, this + option won't have any effect and `insidetextfont` would + be used. + parents + Sets the parent sectors for each of the sectors. Empty + string items '' are understood to reference the root + node in the hierarchy. If `ids` is filled, `parents` + items are understood to be "ids" themselves. When `ids` + is not set, plotly attempts to find matching items in + `labels`, but beware they must be unique. + parentssrc + Sets the source reference on Chart Studio Cloud for + `parents`. + pathbar + :class:`plotly.graph_objects.treemap.Pathbar` instance + or dict with compatible properties + root + :class:`plotly.graph_objects.treemap.Root` instance or + dict with compatible properties + sort + Determines whether or not the sectors are reordered + from largest to smallest. + stream + :class:`plotly.graph_objects.treemap.Stream` instance + or dict with compatible properties + text + Sets text elements associated with each sector. If + trace `textinfo` contains a "text" flag, these elements + will be seen on the chart. If trace `hoverinfo` + contains a "text" flag and "hovertext" is not set, + these elements will be seen in the hover labels. + textfont + Sets the font used for `textinfo`. + textinfo + Determines which trace information appear on the graph. + textposition + Sets the positions of the `text` elements. + textsrc + Sets the source reference on Chart Studio Cloud for + `text`. + texttemplate + Template string used for rendering the information text + that appears on points. Note that this will override + `textinfo`. Variables are inserted using %{variable}, + for example "y: %{y}". Numbers are formatted using + d3-format's syntax %{variable:d3-format}, for example + "Price: %{y:$.2f}". + https://github.com/d3/d3-format/tree/v1.4.5#d3-format + for details on the formatting syntax. Dates are + formatted using d3-time-format's syntax + %{variable|d3-time-format}, for example "Day: + %{2019-01-01|%A}". https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format for details on the + date formatting syntax. Variables that can't be found + will be replaced with the specifier. For example, a + template of "data: %{x}, %{y}" will result in a value + of "data: 1, %{y}" if x is 1 and y is missing. + Variables with an undefined value will be replaced with + the fallback value. All attributes that can be + specified per-point (the ones that are `arrayOk: true`) + are available. Finally, the template string has access + to variables `currentPath`, `root`, `entry`, + `percentRoot`, `percentEntry`, `percentParent`, `label` + and `value`. + texttemplatefallback + Fallback string that's displayed when a variable + referenced in a template is missing. If the boolean + value 'false' is passed in, the specifier with the + missing variable will be displayed. + texttemplatesrc + Sets the source reference on Chart Studio Cloud for + `texttemplate`. + tiling + :class:`plotly.graph_objects.treemap.Tiling` instance + or dict with compatible properties + uid + Assign an id to this trace, Use this to provide object + constancy between traces during animations and + transitions. + uirevision + Controls persistence of some user-driven changes to the + trace: `constraintrange` in `parcoords` traces, as well + as some `editable: true` modifications such as `name` + and `colorbar.title`. Defaults to `layout.uirevision`. + Note that other user-driven trace attribute changes are + controlled by `layout` attributes: `trace.visible` is + controlled by `layout.legend.uirevision`, + `selectedpoints` is controlled by + `layout.selectionrevision`, and `colorbar.(x|y)` + (accessible with `config: {editable: true}`) is + controlled by `layout.editrevision`. Trace changes are + tracked by `uid`, which only falls back on trace index + if no `uid` is provided. So if your app can add/remove + traces before the end of the `data` array, such that + the same trace has a different index, you can still + preserve user-driven changes if you give each trace a + `uid` that stays with it as it moves. + values + Sets the values associated with each of the sectors. + Use with `branchvalues` to determine how the values are + summed. + valuessrc + Sets the source reference on Chart Studio Cloud for + `values`. + visible + Determines whether or not this trace is visible. If + "legendonly", the trace is not drawn, but can appear as + a legend item (provided that the legend itself is + visible). + + Returns + ------- + Treemap + """ + super().__init__("treemap") + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + if arg is None: + arg = {} + elif isinstance(arg, self.__class__): + arg = arg.to_plotly_json() + elif isinstance(arg, dict): + arg = _copy.copy(arg) + else: + raise ValueError("""\ +The first argument to the plotly.graph_objs.Treemap +constructor must be a dict or +an instance of :class:`plotly.graph_objs.Treemap`""") + + self._skip_invalid = kwargs.pop("skip_invalid", False) + self._validate = kwargs.pop("_validate", True) + + self._set_property("branchvalues", arg, branchvalues) + self._set_property("count", arg, count) + self._set_property("customdata", arg, customdata) + self._set_property("customdatasrc", arg, customdatasrc) + self._set_property("domain", arg, domain) + self._set_property("hoverinfo", arg, hoverinfo) + self._set_property("hoverinfosrc", arg, hoverinfosrc) + self._set_property("hoverlabel", arg, hoverlabel) + self._set_property("hovertemplate", arg, hovertemplate) + self._set_property("hovertemplatefallback", arg, hovertemplatefallback) + self._set_property("hovertemplatesrc", arg, hovertemplatesrc) + self._set_property("hovertext", arg, hovertext) + self._set_property("hovertextsrc", arg, hovertextsrc) + self._set_property("ids", arg, ids) + self._set_property("idssrc", arg, idssrc) + self._set_property("insidetextfont", arg, insidetextfont) + self._set_property("labels", arg, labels) + self._set_property("labelssrc", arg, labelssrc) + self._set_property("legend", arg, legend) + self._set_property("legendgrouptitle", arg, legendgrouptitle) + self._set_property("legendrank", arg, legendrank) + self._set_property("legendwidth", arg, legendwidth) + self._set_property("level", arg, level) + self._set_property("marker", arg, marker) + self._set_property("maxdepth", arg, maxdepth) + self._set_property("meta", arg, meta) + self._set_property("metasrc", arg, metasrc) + self._set_property("name", arg, name) + self._set_property("opacity", arg, opacity) + self._set_property("outsidetextfont", arg, outsidetextfont) + self._set_property("parents", arg, parents) + self._set_property("parentssrc", arg, parentssrc) + self._set_property("pathbar", arg, pathbar) + self._set_property("root", arg, root) + self._set_property("sort", arg, sort) + self._set_property("stream", arg, stream) + self._set_property("text", arg, text) + self._set_property("textfont", arg, textfont) + self._set_property("textinfo", arg, textinfo) + self._set_property("textposition", arg, textposition) + self._set_property("textsrc", arg, textsrc) + self._set_property("texttemplate", arg, texttemplate) + self._set_property("texttemplatefallback", arg, texttemplatefallback) + self._set_property("texttemplatesrc", arg, texttemplatesrc) + self._set_property("tiling", arg, tiling) + self._set_property("uid", arg, uid) + self._set_property("uirevision", arg, uirevision) + self._set_property("values", arg, values) + self._set_property("valuessrc", arg, valuessrc) + self._set_property("visible", arg, visible) + + self._props["type"] = "treemap" + arg.pop("type", None) + self._process_kwargs(**dict(arg, **kwargs)) + self._skip_invalid = False diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/_violin.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/_violin.py new file mode 100644 index 0000000000000000000000000000000000000000..ca03026d6756cc60fa47aa78c636329b655eca81 --- /dev/null +++ b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/_violin.py @@ -0,0 +1,2313 @@ +# --- THIS FILE IS AUTO-GENERATED --- +# Modifications will be overwitten the next time code generation run. + +from plotly.basedatatypes import BaseTraceType as _BaseTraceType +import copy as _copy + + +class Violin(_BaseTraceType): + _parent_path_str = "" + _path_str = "violin" + _valid_props = { + "alignmentgroup", + "bandwidth", + "box", + "customdata", + "customdatasrc", + "fillcolor", + "hoverinfo", + "hoverinfosrc", + "hoverlabel", + "hoveron", + "hovertemplate", + "hovertemplatefallback", + "hovertemplatesrc", + "hovertext", + "hovertextsrc", + "ids", + "idssrc", + "jitter", + "legend", + "legendgroup", + "legendgrouptitle", + "legendrank", + "legendwidth", + "line", + "marker", + "meanline", + "meta", + "metasrc", + "name", + "offsetgroup", + "opacity", + "orientation", + "pointpos", + "points", + "quartilemethod", + "scalegroup", + "scalemode", + "selected", + "selectedpoints", + "showlegend", + "side", + "span", + "spanmode", + "stream", + "text", + "textsrc", + "type", + "uid", + "uirevision", + "unselected", + "visible", + "width", + "x", + "x0", + "xaxis", + "xhoverformat", + "xsrc", + "y", + "y0", + "yaxis", + "yhoverformat", + "ysrc", + "zorder", + } + + @property + def alignmentgroup(self): + """ + Set several traces linked to the same position axis or matching + axes to the same alignmentgroup. This controls whether bars + compute their positional range dependently or independently. + + The 'alignmentgroup' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["alignmentgroup"] + + @alignmentgroup.setter + def alignmentgroup(self, val): + self["alignmentgroup"] = val + + @property + def bandwidth(self): + """ + Sets the bandwidth used to compute the kernel density estimate. + By default, the bandwidth is determined by Silverman's rule of + thumb. + + The 'bandwidth' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["bandwidth"] + + @bandwidth.setter + def bandwidth(self, val): + self["bandwidth"] = val + + @property + def box(self): + """ + The 'box' property is an instance of Box + that may be specified as: + - An instance of :class:`plotly.graph_objs.violin.Box` + - A dict of string/value properties that will be passed + to the Box constructor + + Returns + ------- + plotly.graph_objs.violin.Box + """ + return self["box"] + + @box.setter + def box(self, val): + self["box"] = val + + @property + def customdata(self): + """ + Assigns extra data each datum. This may be useful when + listening to hover, click and selection events. Note that, + "scatter" traces also appends customdata items in the markers + DOM elements + + The 'customdata' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["customdata"] + + @customdata.setter + def customdata(self, val): + self["customdata"] = val + + @property + def customdatasrc(self): + """ + Sets the source reference on Chart Studio Cloud for + `customdata`. + + The 'customdatasrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["customdatasrc"] + + @customdatasrc.setter + def customdatasrc(self, val): + self["customdatasrc"] = val + + @property + def fillcolor(self): + """ + Sets the fill color. Defaults to a half-transparent variant of + the line color, marker color, or marker line color, whichever + is available. + + The 'fillcolor' property is a color and may be specified as: + - A hex string (e.g. '#ff0000') + - An rgb/rgba string (e.g. 'rgb(255,0,0)') + - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') + - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') + - A named CSS color: see https://plotly.com/python/css-colors/ for a list + + Returns + ------- + str + """ + return self["fillcolor"] + + @fillcolor.setter + def fillcolor(self, val): + self["fillcolor"] = val + + @property + def hoverinfo(self): + """ + Determines which trace information appear on hover. If `none` + or `skip` are set, no information is displayed upon hovering. + But, if `none` is set, click and hover events are still fired. + + The 'hoverinfo' property is a flaglist and may be specified + as a string containing: + - Any combination of ['x', 'y', 'z', 'text', 'name'] joined with '+' characters + (e.g. 'x+y') + OR exactly one of ['all', 'none', 'skip'] (e.g. 'skip') + - A list or array of the above + + Returns + ------- + Any|numpy.ndarray + """ + return self["hoverinfo"] + + @hoverinfo.setter + def hoverinfo(self, val): + self["hoverinfo"] = val + + @property + def hoverinfosrc(self): + """ + Sets the source reference on Chart Studio Cloud for + `hoverinfo`. + + The 'hoverinfosrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["hoverinfosrc"] + + @hoverinfosrc.setter + def hoverinfosrc(self, val): + self["hoverinfosrc"] = val + + @property + def hoverlabel(self): + """ + The 'hoverlabel' property is an instance of Hoverlabel + that may be specified as: + - An instance of :class:`plotly.graph_objs.violin.Hoverlabel` + - A dict of string/value properties that will be passed + to the Hoverlabel constructor + + Returns + ------- + plotly.graph_objs.violin.Hoverlabel + """ + return self["hoverlabel"] + + @hoverlabel.setter + def hoverlabel(self, val): + self["hoverlabel"] = val + + @property + def hoveron(self): + """ + Do the hover effects highlight individual violins or sample + points or the kernel density estimate or any combination of + them? + + The 'hoveron' property is a flaglist and may be specified + as a string containing: + - Any combination of ['violins', 'points', 'kde'] joined with '+' characters + (e.g. 'violins+points') + OR exactly one of ['all'] (e.g. 'all') + + Returns + ------- + Any + """ + return self["hoveron"] + + @hoveron.setter + def hoveron(self, val): + self["hoveron"] = val + + @property + def hovertemplate(self): + """ + Template string used for rendering the information that appear + on hover box. Note that this will override `hoverinfo`. + Variables are inserted using %{variable}, for example "y: %{y}" + as well as %{xother}, {%_xother}, {%_xother_}, {%xother_}. When + showing info for several points, "xother" will be added to + those with different x positions from the first point. An + underscore before or after "(x|y)other" will add a space on + that side, only when this field is shown. Numbers are formatted + using d3-format's syntax %{variable:d3-format}, for example + "Price: %{y:$.2f}". + https://github.com/d3/d3-format/tree/v1.4.5#d3-format for + details on the formatting syntax. Dates are formatted using + d3-time-format's syntax %{variable|d3-time-format}, for example + "Day: %{2019-01-01|%A}". https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format for details on the date + formatting syntax. Variables that can't be found will be + replaced with the specifier. For example, a template of "data: + %{x}, %{y}" will result in a value of "data: 1, %{y}" if x is 1 + and y is missing. Variables with an undefined value will be + replaced with the fallback value. The variables available in + `hovertemplate` are the ones emitted as event data described at + this link https://plotly.com/javascript/plotlyjs-events/#event- + data. Additionally, all attributes that can be specified per- + point (the ones that are `arrayOk: true`) are available. + Anything contained in tag `` is displayed in the + secondary box, for example `%{fullData.name}`. + To hide the secondary box completely, use an empty tag + ``. + + The 'hovertemplate' property is a string and must be specified as: + - A string + - A number that will be converted to a string + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["hovertemplate"] + + @hovertemplate.setter + def hovertemplate(self, val): + self["hovertemplate"] = val + + @property + def hovertemplatefallback(self): + """ + Fallback string that's displayed when a variable referenced in + a template is missing. If the boolean value 'false' is passed + in, the specifier with the missing variable will be displayed. + + The 'hovertemplatefallback' property accepts values of any type + + Returns + ------- + Any + """ + return self["hovertemplatefallback"] + + @hovertemplatefallback.setter + def hovertemplatefallback(self, val): + self["hovertemplatefallback"] = val + + @property + def hovertemplatesrc(self): + """ + Sets the source reference on Chart Studio Cloud for + `hovertemplate`. + + The 'hovertemplatesrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["hovertemplatesrc"] + + @hovertemplatesrc.setter + def hovertemplatesrc(self, val): + self["hovertemplatesrc"] = val + + @property + def hovertext(self): + """ + Same as `text`. + + The 'hovertext' property is a string and must be specified as: + - A string + - A number that will be converted to a string + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["hovertext"] + + @hovertext.setter + def hovertext(self, val): + self["hovertext"] = val + + @property + def hovertextsrc(self): + """ + Sets the source reference on Chart Studio Cloud for + `hovertext`. + + The 'hovertextsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["hovertextsrc"] + + @hovertextsrc.setter + def hovertextsrc(self, val): + self["hovertextsrc"] = val + + @property + def ids(self): + """ + Assigns id labels to each datum. These ids for object constancy + of data points during animation. Should be an array of strings, + not numbers or any other type. + + The 'ids' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["ids"] + + @ids.setter + def ids(self, val): + self["ids"] = val + + @property + def idssrc(self): + """ + Sets the source reference on Chart Studio Cloud for `ids`. + + The 'idssrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["idssrc"] + + @idssrc.setter + def idssrc(self, val): + self["idssrc"] = val + + @property + def jitter(self): + """ + Sets the amount of jitter in the sample points drawn. If 0, the + sample points align along the distribution axis. If 1, the + sample points are drawn in a random jitter of width equal to + the width of the violins. + + The 'jitter' property is a number and may be specified as: + - An int or float in the interval [0, 1] + + Returns + ------- + int|float + """ + return self["jitter"] + + @jitter.setter + def jitter(self, val): + self["jitter"] = val + + @property + def legend(self): + """ + Sets the reference to a legend to show this trace in. + References to these legends are "legend", "legend2", "legend3", + etc. Settings for these legends are set in the layout, under + `layout.legend`, `layout.legend2`, etc. + + The 'legend' property is an identifier of a particular + subplot, of type 'legend', that may be specified as: + - the string 'legend' optionally followed by an integer >= 1 + (e.g. 'legend', 'legend1', 'legend2', 'legend3', etc.) + + Returns + ------- + str + """ + return self["legend"] + + @legend.setter + def legend(self, val): + self["legend"] = val + + @property + def legendgroup(self): + """ + Sets the legend group for this trace. Traces and shapes part of + the same legend group hide/show at the same time when toggling + legend items. + + The 'legendgroup' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["legendgroup"] + + @legendgroup.setter + def legendgroup(self, val): + self["legendgroup"] = val + + @property + def legendgrouptitle(self): + """ + The 'legendgrouptitle' property is an instance of Legendgrouptitle + that may be specified as: + - An instance of :class:`plotly.graph_objs.violin.Legendgrouptitle` + - A dict of string/value properties that will be passed + to the Legendgrouptitle constructor + + Returns + ------- + plotly.graph_objs.violin.Legendgrouptitle + """ + return self["legendgrouptitle"] + + @legendgrouptitle.setter + def legendgrouptitle(self, val): + self["legendgrouptitle"] = val + + @property + def legendrank(self): + """ + Sets the legend rank for this trace. Items and groups with + smaller ranks are presented on top/left side while with + "reversed" `legend.traceorder` they are on bottom/right side. + The default legendrank is 1000, so that you can use ranks less + than 1000 to place certain items before all unranked items, and + ranks greater than 1000 to go after all unranked items. When + having unranked or equal rank items shapes would be displayed + after traces i.e. according to their order in data and layout. + + The 'legendrank' property is a number and may be specified as: + - An int or float + + Returns + ------- + int|float + """ + return self["legendrank"] + + @legendrank.setter + def legendrank(self, val): + self["legendrank"] = val + + @property + def legendwidth(self): + """ + Sets the width (in px or fraction) of the legend for this + trace. + + The 'legendwidth' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["legendwidth"] + + @legendwidth.setter + def legendwidth(self, val): + self["legendwidth"] = val + + @property + def line(self): + """ + The 'line' property is an instance of Line + that may be specified as: + - An instance of :class:`plotly.graph_objs.violin.Line` + - A dict of string/value properties that will be passed + to the Line constructor + + Returns + ------- + plotly.graph_objs.violin.Line + """ + return self["line"] + + @line.setter + def line(self, val): + self["line"] = val + + @property + def marker(self): + """ + The 'marker' property is an instance of Marker + that may be specified as: + - An instance of :class:`plotly.graph_objs.violin.Marker` + - A dict of string/value properties that will be passed + to the Marker constructor + + Returns + ------- + plotly.graph_objs.violin.Marker + """ + return self["marker"] + + @marker.setter + def marker(self, val): + self["marker"] = val + + @property + def meanline(self): + """ + The 'meanline' property is an instance of Meanline + that may be specified as: + - An instance of :class:`plotly.graph_objs.violin.Meanline` + - A dict of string/value properties that will be passed + to the Meanline constructor + + Returns + ------- + plotly.graph_objs.violin.Meanline + """ + return self["meanline"] + + @meanline.setter + def meanline(self, val): + self["meanline"] = val + + @property + def meta(self): + """ + Assigns extra meta information associated with this trace that + can be used in various text attributes. Attributes such as + trace `name`, graph, axis and colorbar `title.text`, annotation + `text` `rangeselector`, `updatemenues` and `sliders` `label` + text all support `meta`. To access the trace `meta` values in + an attribute in the same trace, simply use `%{meta[i]}` where + `i` is the index or key of the `meta` item in question. To + access trace `meta` in layout attributes, use + `%{data[n[.meta[i]}` where `i` is the index or key of the + `meta` and `n` is the trace index. + + The 'meta' property accepts values of any type + + Returns + ------- + Any|numpy.ndarray + """ + return self["meta"] + + @meta.setter + def meta(self, val): + self["meta"] = val + + @property + def metasrc(self): + """ + Sets the source reference on Chart Studio Cloud for `meta`. + + The 'metasrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["metasrc"] + + @metasrc.setter + def metasrc(self, val): + self["metasrc"] = val + + @property + def name(self): + """ + Sets the trace name. The trace name appears as the legend item + and on hover. For violin traces, the name will also be used for + the position coordinate, if `x` and `x0` (`y` and `y0` if + horizontal) are missing and the position axis is categorical. + Note that the trace name is also used as a default value for + attribute `scalegroup` (please see its description for + details). + + The 'name' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["name"] + + @name.setter + def name(self, val): + self["name"] = val + + @property + def offsetgroup(self): + """ + Set several traces linked to the same position axis or matching + axes to the same offsetgroup where bars of the same position + coordinate will line up. + + The 'offsetgroup' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["offsetgroup"] + + @offsetgroup.setter + def offsetgroup(self, val): + self["offsetgroup"] = val + + @property + def opacity(self): + """ + Sets the opacity of the trace. + + The 'opacity' property is a number and may be specified as: + - An int or float in the interval [0, 1] + + Returns + ------- + int|float + """ + return self["opacity"] + + @opacity.setter + def opacity(self, val): + self["opacity"] = val + + @property + def orientation(self): + """ + Sets the orientation of the violin(s). If "v" ("h"), the + distribution is visualized along the vertical (horizontal). + + The 'orientation' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['v', 'h'] + + Returns + ------- + Any + """ + return self["orientation"] + + @orientation.setter + def orientation(self, val): + self["orientation"] = val + + @property + def pointpos(self): + """ + Sets the position of the sample points in relation to the + violins. If 0, the sample points are places over the center of + the violins. Positive (negative) values correspond to positions + to the right (left) for vertical violins and above (below) for + horizontal violins. + + The 'pointpos' property is a number and may be specified as: + - An int or float in the interval [-2, 2] + + Returns + ------- + int|float + """ + return self["pointpos"] + + @pointpos.setter + def pointpos(self, val): + self["pointpos"] = val + + @property + def points(self): + """ + If "outliers", only the sample points lying outside the + whiskers are shown If "suspectedoutliers", the outlier points + are shown and points either less than 4*Q1-3*Q3 or greater than + 4*Q3-3*Q1 are highlighted (see `outliercolor`) If "all", all + sample points are shown If False, only the violins are shown + with no sample points. Defaults to "suspectedoutliers" when + `marker.outliercolor` or `marker.line.outliercolor` is set, + otherwise defaults to "outliers". + + The 'points' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['all', 'outliers', 'suspectedoutliers', False] + + Returns + ------- + Any + """ + return self["points"] + + @points.setter + def points(self, val): + self["points"] = val + + @property + def quartilemethod(self): + """ + Sets the method used to compute the sample's Q1 and Q3 + quartiles. The "linear" method uses the 25th percentile for Q1 + and 75th percentile for Q3 as computed using method #10 (listed + on http://jse.amstat.org/v14n3/langford.html). The "exclusive" + method uses the median to divide the ordered dataset into two + halves if the sample is odd, it does not include the median in + either half - Q1 is then the median of the lower half and Q3 + the median of the upper half. The "inclusive" method also uses + the median to divide the ordered dataset into two halves but if + the sample is odd, it includes the median in both halves - Q1 + is then the median of the lower half and Q3 the median of the + upper half. + + The 'quartilemethod' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['linear', 'exclusive', 'inclusive'] + + Returns + ------- + Any + """ + return self["quartilemethod"] + + @quartilemethod.setter + def quartilemethod(self, val): + self["quartilemethod"] = val + + @property + def scalegroup(self): + """ + If there are multiple violins that should be sized according to + to some metric (see `scalemode`), link them by providing a non- + empty group id here shared by every trace in the same group. If + a violin's `width` is undefined, `scalegroup` will default to + the trace's name. In this case, violins with the same names + will be linked together + + The 'scalegroup' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["scalegroup"] + + @scalegroup.setter + def scalegroup(self, val): + self["scalegroup"] = val + + @property + def scalemode(self): + """ + Sets the metric by which the width of each violin is + determined. "width" means each violin has the same (max) width + "count" means the violins are scaled by the number of sample + points making up each violin. + + The 'scalemode' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['width', 'count'] + + Returns + ------- + Any + """ + return self["scalemode"] + + @scalemode.setter + def scalemode(self, val): + self["scalemode"] = val + + @property + def selected(self): + """ + The 'selected' property is an instance of Selected + that may be specified as: + - An instance of :class:`plotly.graph_objs.violin.Selected` + - A dict of string/value properties that will be passed + to the Selected constructor + + Returns + ------- + plotly.graph_objs.violin.Selected + """ + return self["selected"] + + @selected.setter + def selected(self, val): + self["selected"] = val + + @property + def selectedpoints(self): + """ + Array containing integer indices of selected points. Has an + effect only for traces that support selections. Note that an + empty array means an empty selection where the `unselected` are + turned on for all points, whereas, any other non-array values + means no selection all where the `selected` and `unselected` + styles have no effect. + + The 'selectedpoints' property accepts values of any type + + Returns + ------- + Any + """ + return self["selectedpoints"] + + @selectedpoints.setter + def selectedpoints(self, val): + self["selectedpoints"] = val + + @property + def showlegend(self): + """ + Determines whether or not an item corresponding to this trace + is shown in the legend. + + The 'showlegend' property is a boolean and must be specified as: + - A boolean value: True or False + + Returns + ------- + bool + """ + return self["showlegend"] + + @showlegend.setter + def showlegend(self, val): + self["showlegend"] = val + + @property + def side(self): + """ + Determines on which side of the position value the density + function making up one half of a violin is plotted. Useful when + comparing two violin traces under "overlay" mode, where one + trace has `side` set to "positive" and the other to "negative". + + The 'side' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['both', 'positive', 'negative'] + + Returns + ------- + Any + """ + return self["side"] + + @side.setter + def side(self, val): + self["side"] = val + + @property + def span(self): + """ + Sets the span in data space for which the density function will + be computed. Has an effect only when `spanmode` is set to + "manual". + + The 'span' property is an info array that may be specified as: + + * a list or tuple of 2 elements where: + (0) The 'span[0]' property accepts values of any type + (1) The 'span[1]' property accepts values of any type + + Returns + ------- + list + """ + return self["span"] + + @span.setter + def span(self, val): + self["span"] = val + + @property + def spanmode(self): + """ + Sets the method by which the span in data space where the + density function will be computed. "soft" means the span goes + from the sample's minimum value minus two bandwidths to the + sample's maximum value plus two bandwidths. "hard" means the + span goes from the sample's minimum to its maximum value. For + custom span settings, use mode "manual" and fill in the `span` + attribute. + + The 'spanmode' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['soft', 'hard', 'manual'] + + Returns + ------- + Any + """ + return self["spanmode"] + + @spanmode.setter + def spanmode(self, val): + self["spanmode"] = val + + @property + def stream(self): + """ + The 'stream' property is an instance of Stream + that may be specified as: + - An instance of :class:`plotly.graph_objs.violin.Stream` + - A dict of string/value properties that will be passed + to the Stream constructor + + Returns + ------- + plotly.graph_objs.violin.Stream + """ + return self["stream"] + + @stream.setter + def stream(self, val): + self["stream"] = val + + @property + def text(self): + """ + Sets the text elements associated with each sample value. If a + single string, the same string appears over all the data + points. If an array of string, the items are mapped in order to + the this trace's (x,y) coordinates. To be seen, trace + `hoverinfo` must contain a "text" flag. + + The 'text' property is a string and must be specified as: + - A string + - A number that will be converted to a string + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["text"] + + @text.setter + def text(self, val): + self["text"] = val + + @property + def textsrc(self): + """ + Sets the source reference on Chart Studio Cloud for `text`. + + The 'textsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["textsrc"] + + @textsrc.setter + def textsrc(self, val): + self["textsrc"] = val + + @property + def uid(self): + """ + Assign an id to this trace, Use this to provide object + constancy between traces during animations and transitions. + + The 'uid' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["uid"] + + @uid.setter + def uid(self, val): + self["uid"] = val + + @property + def uirevision(self): + """ + Controls persistence of some user-driven changes to the trace: + `constraintrange` in `parcoords` traces, as well as some + `editable: true` modifications such as `name` and + `colorbar.title`. Defaults to `layout.uirevision`. Note that + other user-driven trace attribute changes are controlled by + `layout` attributes: `trace.visible` is controlled by + `layout.legend.uirevision`, `selectedpoints` is controlled by + `layout.selectionrevision`, and `colorbar.(x|y)` (accessible + with `config: {editable: true}`) is controlled by + `layout.editrevision`. Trace changes are tracked by `uid`, + which only falls back on trace index if no `uid` is provided. + So if your app can add/remove traces before the end of the + `data` array, such that the same trace has a different index, + you can still preserve user-driven changes if you give each + trace a `uid` that stays with it as it moves. + + The 'uirevision' property accepts values of any type + + Returns + ------- + Any + """ + return self["uirevision"] + + @uirevision.setter + def uirevision(self, val): + self["uirevision"] = val + + @property + def unselected(self): + """ + The 'unselected' property is an instance of Unselected + that may be specified as: + - An instance of :class:`plotly.graph_objs.violin.Unselected` + - A dict of string/value properties that will be passed + to the Unselected constructor + + Returns + ------- + plotly.graph_objs.violin.Unselected + """ + return self["unselected"] + + @unselected.setter + def unselected(self, val): + self["unselected"] = val + + @property + def visible(self): + """ + Determines whether or not this trace is visible. If + "legendonly", the trace is not drawn, but can appear as a + legend item (provided that the legend itself is visible). + + The 'visible' property is an enumeration that may be specified as: + - One of the following enumeration values: + [True, False, 'legendonly'] + + Returns + ------- + Any + """ + return self["visible"] + + @visible.setter + def visible(self, val): + self["visible"] = val + + @property + def width(self): + """ + Sets the width of the violin in data coordinates. If 0 (default + value) the width is automatically selected based on the + positions of other violin traces in the same subplot. + + The 'width' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["width"] + + @width.setter + def width(self, val): + self["width"] = val + + @property + def x(self): + """ + Sets the x sample data or coordinates. See overview for more + info. + + The 'x' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["x"] + + @x.setter + def x(self, val): + self["x"] = val + + @property + def x0(self): + """ + Sets the x coordinate for single-box traces or the starting + coordinate for multi-box traces set using q1/median/q3. See + overview for more info. + + The 'x0' property accepts values of any type + + Returns + ------- + Any + """ + return self["x0"] + + @x0.setter + def x0(self, val): + self["x0"] = val + + @property + def xaxis(self): + """ + Sets a reference between this trace's x coordinates and a 2D + cartesian x axis. If "x" (the default value), the x coordinates + refer to `layout.xaxis`. If "x2", the x coordinates refer to + `layout.xaxis2`, and so on. + + The 'xaxis' property is an identifier of a particular + subplot, of type 'x', that may be specified as: + - the string 'x' optionally followed by an integer >= 1 + (e.g. 'x', 'x1', 'x2', 'x3', etc.) + + Returns + ------- + str + """ + return self["xaxis"] + + @xaxis.setter + def xaxis(self, val): + self["xaxis"] = val + + @property + def xhoverformat(self): + """ + Sets the hover text formatting rulefor `x` using d3 formatting + mini-languages which are very similar to those in Python. For + numbers, see: + https://github.com/d3/d3-format/tree/v1.4.5#d3-format. And for + dates see: https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format. We add two items to d3's date + formatter: "%h" for half of the year as a decimal number as + well as "%{n}f" for fractional seconds with n digits. For + example, *2016-10-13 09:15:23.456* with tickformat + "%H~%M~%S.%2f" would display *09~15~23.46*By default the values + are formatted using `xaxis.hoverformat`. + + The 'xhoverformat' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["xhoverformat"] + + @xhoverformat.setter + def xhoverformat(self, val): + self["xhoverformat"] = val + + @property + def xsrc(self): + """ + Sets the source reference on Chart Studio Cloud for `x`. + + The 'xsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["xsrc"] + + @xsrc.setter + def xsrc(self, val): + self["xsrc"] = val + + @property + def y(self): + """ + Sets the y sample data or coordinates. See overview for more + info. + + The 'y' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["y"] + + @y.setter + def y(self, val): + self["y"] = val + + @property + def y0(self): + """ + Sets the y coordinate for single-box traces or the starting + coordinate for multi-box traces set using q1/median/q3. See + overview for more info. + + The 'y0' property accepts values of any type + + Returns + ------- + Any + """ + return self["y0"] + + @y0.setter + def y0(self, val): + self["y0"] = val + + @property + def yaxis(self): + """ + Sets a reference between this trace's y coordinates and a 2D + cartesian y axis. If "y" (the default value), the y coordinates + refer to `layout.yaxis`. If "y2", the y coordinates refer to + `layout.yaxis2`, and so on. + + The 'yaxis' property is an identifier of a particular + subplot, of type 'y', that may be specified as: + - the string 'y' optionally followed by an integer >= 1 + (e.g. 'y', 'y1', 'y2', 'y3', etc.) + + Returns + ------- + str + """ + return self["yaxis"] + + @yaxis.setter + def yaxis(self, val): + self["yaxis"] = val + + @property + def yhoverformat(self): + """ + Sets the hover text formatting rulefor `y` using d3 formatting + mini-languages which are very similar to those in Python. For + numbers, see: + https://github.com/d3/d3-format/tree/v1.4.5#d3-format. And for + dates see: https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format. We add two items to d3's date + formatter: "%h" for half of the year as a decimal number as + well as "%{n}f" for fractional seconds with n digits. For + example, *2016-10-13 09:15:23.456* with tickformat + "%H~%M~%S.%2f" would display *09~15~23.46*By default the values + are formatted using `yaxis.hoverformat`. + + The 'yhoverformat' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["yhoverformat"] + + @yhoverformat.setter + def yhoverformat(self, val): + self["yhoverformat"] = val + + @property + def ysrc(self): + """ + Sets the source reference on Chart Studio Cloud for `y`. + + The 'ysrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["ysrc"] + + @ysrc.setter + def ysrc(self, val): + self["ysrc"] = val + + @property + def zorder(self): + """ + Sets the layer on which this trace is displayed, relative to + other SVG traces on the same subplot. SVG traces with higher + `zorder` appear in front of those with lower `zorder`. + + The 'zorder' property is a integer and may be specified as: + - An int (or float that will be cast to an int) + + Returns + ------- + int + """ + return self["zorder"] + + @zorder.setter + def zorder(self, val): + self["zorder"] = val + + @property + def type(self): + return self._props["type"] + + @property + def _prop_descriptions(self): + return """\ + alignmentgroup + Set several traces linked to the same position axis or + matching axes to the same alignmentgroup. This controls + whether bars compute their positional range dependently + or independently. + bandwidth + Sets the bandwidth used to compute the kernel density + estimate. By default, the bandwidth is determined by + Silverman's rule of thumb. + box + :class:`plotly.graph_objects.violin.Box` instance or + dict with compatible properties + customdata + Assigns extra data each datum. This may be useful when + listening to hover, click and selection events. Note + that, "scatter" traces also appends customdata items in + the markers DOM elements + customdatasrc + Sets the source reference on Chart Studio Cloud for + `customdata`. + fillcolor + Sets the fill color. Defaults to a half-transparent + variant of the line color, marker color, or marker line + color, whichever is available. + hoverinfo + Determines which trace information appear on hover. If + `none` or `skip` are set, no information is displayed + upon hovering. But, if `none` is set, click and hover + events are still fired. + hoverinfosrc + Sets the source reference on Chart Studio Cloud for + `hoverinfo`. + hoverlabel + :class:`plotly.graph_objects.violin.Hoverlabel` + instance or dict with compatible properties + hoveron + Do the hover effects highlight individual violins or + sample points or the kernel density estimate or any + combination of them? + hovertemplate + Template string used for rendering the information that + appear on hover box. Note that this will override + `hoverinfo`. Variables are inserted using %{variable}, + for example "y: %{y}" as well as %{xother}, {%_xother}, + {%_xother_}, {%xother_}. When showing info for several + points, "xother" will be added to those with different + x positions from the first point. An underscore before + or after "(x|y)other" will add a space on that side, + only when this field is shown. Numbers are formatted + using d3-format's syntax %{variable:d3-format}, for + example "Price: %{y:$.2f}". + https://github.com/d3/d3-format/tree/v1.4.5#d3-format + for details on the formatting syntax. Dates are + formatted using d3-time-format's syntax + %{variable|d3-time-format}, for example "Day: + %{2019-01-01|%A}". https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format for details on the + date formatting syntax. Variables that can't be found + will be replaced with the specifier. For example, a + template of "data: %{x}, %{y}" will result in a value + of "data: 1, %{y}" if x is 1 and y is missing. + Variables with an undefined value will be replaced with + the fallback value. The variables available in + `hovertemplate` are the ones emitted as event data + described at this link + https://plotly.com/javascript/plotlyjs-events/#event- + data. Additionally, all attributes that can be + specified per-point (the ones that are `arrayOk: true`) + are available. Anything contained in tag `` is + displayed in the secondary box, for example + `%{fullData.name}`. To hide the + secondary box completely, use an empty tag + ``. + hovertemplatefallback + Fallback string that's displayed when a variable + referenced in a template is missing. If the boolean + value 'false' is passed in, the specifier with the + missing variable will be displayed. + hovertemplatesrc + Sets the source reference on Chart Studio Cloud for + `hovertemplate`. + hovertext + Same as `text`. + hovertextsrc + Sets the source reference on Chart Studio Cloud for + `hovertext`. + ids + Assigns id labels to each datum. These ids for object + constancy of data points during animation. Should be an + array of strings, not numbers or any other type. + idssrc + Sets the source reference on Chart Studio Cloud for + `ids`. + jitter + Sets the amount of jitter in the sample points drawn. + If 0, the sample points align along the distribution + axis. If 1, the sample points are drawn in a random + jitter of width equal to the width of the violins. + legend + Sets the reference to a legend to show this trace in. + References to these legends are "legend", "legend2", + "legend3", etc. Settings for these legends are set in + the layout, under `layout.legend`, `layout.legend2`, + etc. + legendgroup + Sets the legend group for this trace. Traces and shapes + part of the same legend group hide/show at the same + time when toggling legend items. + legendgrouptitle + :class:`plotly.graph_objects.violin.Legendgrouptitle` + instance or dict with compatible properties + legendrank + Sets the legend rank for this trace. Items and groups + with smaller ranks are presented on top/left side while + with "reversed" `legend.traceorder` they are on + bottom/right side. The default legendrank is 1000, so + that you can use ranks less than 1000 to place certain + items before all unranked items, and ranks greater than + 1000 to go after all unranked items. When having + unranked or equal rank items shapes would be displayed + after traces i.e. according to their order in data and + layout. + legendwidth + Sets the width (in px or fraction) of the legend for + this trace. + line + :class:`plotly.graph_objects.violin.Line` instance or + dict with compatible properties + marker + :class:`plotly.graph_objects.violin.Marker` instance or + dict with compatible properties + meanline + :class:`plotly.graph_objects.violin.Meanline` instance + or dict with compatible properties + meta + Assigns extra meta information associated with this + trace that can be used in various text attributes. + Attributes such as trace `name`, graph, axis and + colorbar `title.text`, annotation `text` + `rangeselector`, `updatemenues` and `sliders` `label` + text all support `meta`. To access the trace `meta` + values in an attribute in the same trace, simply use + `%{meta[i]}` where `i` is the index or key of the + `meta` item in question. To access trace `meta` in + layout attributes, use `%{data[n[.meta[i]}` where `i` + is the index or key of the `meta` and `n` is the trace + index. + metasrc + Sets the source reference on Chart Studio Cloud for + `meta`. + name + Sets the trace name. The trace name appears as the + legend item and on hover. For violin traces, the name + will also be used for the position coordinate, if `x` + and `x0` (`y` and `y0` if horizontal) are missing and + the position axis is categorical. Note that the trace + name is also used as a default value for attribute + `scalegroup` (please see its description for details). + offsetgroup + Set several traces linked to the same position axis or + matching axes to the same offsetgroup where bars of the + same position coordinate will line up. + opacity + Sets the opacity of the trace. + orientation + Sets the orientation of the violin(s). If "v" ("h"), + the distribution is visualized along the vertical + (horizontal). + pointpos + Sets the position of the sample points in relation to + the violins. If 0, the sample points are places over + the center of the violins. Positive (negative) values + correspond to positions to the right (left) for + vertical violins and above (below) for horizontal + violins. + points + If "outliers", only the sample points lying outside the + whiskers are shown If "suspectedoutliers", the outlier + points are shown and points either less than 4*Q1-3*Q3 + or greater than 4*Q3-3*Q1 are highlighted (see + `outliercolor`) If "all", all sample points are shown + If False, only the violins are shown with no sample + points. Defaults to "suspectedoutliers" when + `marker.outliercolor` or `marker.line.outliercolor` is + set, otherwise defaults to "outliers". + quartilemethod + Sets the method used to compute the sample's Q1 and Q3 + quartiles. The "linear" method uses the 25th percentile + for Q1 and 75th percentile for Q3 as computed using + method #10 (listed on + http://jse.amstat.org/v14n3/langford.html). The + "exclusive" method uses the median to divide the + ordered dataset into two halves if the sample is odd, + it does not include the median in either half - Q1 is + then the median of the lower half and Q3 the median of + the upper half. The "inclusive" method also uses the + median to divide the ordered dataset into two halves + but if the sample is odd, it includes the median in + both halves - Q1 is then the median of the lower half + and Q3 the median of the upper half. + scalegroup + If there are multiple violins that should be sized + according to to some metric (see `scalemode`), link + them by providing a non-empty group id here shared by + every trace in the same group. If a violin's `width` is + undefined, `scalegroup` will default to the trace's + name. In this case, violins with the same names will be + linked together + scalemode + Sets the metric by which the width of each violin is + determined. "width" means each violin has the same + (max) width "count" means the violins are scaled by the + number of sample points making up each violin. + selected + :class:`plotly.graph_objects.violin.Selected` instance + or dict with compatible properties + selectedpoints + Array containing integer indices of selected points. + Has an effect only for traces that support selections. + Note that an empty array means an empty selection where + the `unselected` are turned on for all points, whereas, + any other non-array values means no selection all where + the `selected` and `unselected` styles have no effect. + showlegend + Determines whether or not an item corresponding to this + trace is shown in the legend. + side + Determines on which side of the position value the + density function making up one half of a violin is + plotted. Useful when comparing two violin traces under + "overlay" mode, where one trace has `side` set to + "positive" and the other to "negative". + span + Sets the span in data space for which the density + function will be computed. Has an effect only when + `spanmode` is set to "manual". + spanmode + Sets the method by which the span in data space where + the density function will be computed. "soft" means the + span goes from the sample's minimum value minus two + bandwidths to the sample's maximum value plus two + bandwidths. "hard" means the span goes from the + sample's minimum to its maximum value. For custom span + settings, use mode "manual" and fill in the `span` + attribute. + stream + :class:`plotly.graph_objects.violin.Stream` instance or + dict with compatible properties + text + Sets the text elements associated with each sample + value. If a single string, the same string appears over + all the data points. If an array of string, the items + are mapped in order to the this trace's (x,y) + coordinates. To be seen, trace `hoverinfo` must contain + a "text" flag. + textsrc + Sets the source reference on Chart Studio Cloud for + `text`. + uid + Assign an id to this trace, Use this to provide object + constancy between traces during animations and + transitions. + uirevision + Controls persistence of some user-driven changes to the + trace: `constraintrange` in `parcoords` traces, as well + as some `editable: true` modifications such as `name` + and `colorbar.title`. Defaults to `layout.uirevision`. + Note that other user-driven trace attribute changes are + controlled by `layout` attributes: `trace.visible` is + controlled by `layout.legend.uirevision`, + `selectedpoints` is controlled by + `layout.selectionrevision`, and `colorbar.(x|y)` + (accessible with `config: {editable: true}`) is + controlled by `layout.editrevision`. Trace changes are + tracked by `uid`, which only falls back on trace index + if no `uid` is provided. So if your app can add/remove + traces before the end of the `data` array, such that + the same trace has a different index, you can still + preserve user-driven changes if you give each trace a + `uid` that stays with it as it moves. + unselected + :class:`plotly.graph_objects.violin.Unselected` + instance or dict with compatible properties + visible + Determines whether or not this trace is visible. If + "legendonly", the trace is not drawn, but can appear as + a legend item (provided that the legend itself is + visible). + width + Sets the width of the violin in data coordinates. If 0 + (default value) the width is automatically selected + based on the positions of other violin traces in the + same subplot. + x + Sets the x sample data or coordinates. See overview for + more info. + x0 + Sets the x coordinate for single-box traces or the + starting coordinate for multi-box traces set using + q1/median/q3. See overview for more info. + xaxis + Sets a reference between this trace's x coordinates and + a 2D cartesian x axis. If "x" (the default value), the + x coordinates refer to `layout.xaxis`. If "x2", the x + coordinates refer to `layout.xaxis2`, and so on. + xhoverformat + Sets the hover text formatting rulefor `x` using d3 + formatting mini-languages which are very similar to + those in Python. For numbers, see: + https://github.com/d3/d3-format/tree/v1.4.5#d3-format. + And for dates see: https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format. We add two items to + d3's date formatter: "%h" for half of the year as a + decimal number as well as "%{n}f" for fractional + seconds with n digits. For example, *2016-10-13 + 09:15:23.456* with tickformat "%H~%M~%S.%2f" would + display *09~15~23.46*By default the values are + formatted using `xaxis.hoverformat`. + xsrc + Sets the source reference on Chart Studio Cloud for + `x`. + y + Sets the y sample data or coordinates. See overview for + more info. + y0 + Sets the y coordinate for single-box traces or the + starting coordinate for multi-box traces set using + q1/median/q3. See overview for more info. + yaxis + Sets a reference between this trace's y coordinates and + a 2D cartesian y axis. If "y" (the default value), the + y coordinates refer to `layout.yaxis`. If "y2", the y + coordinates refer to `layout.yaxis2`, and so on. + yhoverformat + Sets the hover text formatting rulefor `y` using d3 + formatting mini-languages which are very similar to + those in Python. For numbers, see: + https://github.com/d3/d3-format/tree/v1.4.5#d3-format. + And for dates see: https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format. We add two items to + d3's date formatter: "%h" for half of the year as a + decimal number as well as "%{n}f" for fractional + seconds with n digits. For example, *2016-10-13 + 09:15:23.456* with tickformat "%H~%M~%S.%2f" would + display *09~15~23.46*By default the values are + formatted using `yaxis.hoverformat`. + ysrc + Sets the source reference on Chart Studio Cloud for + `y`. + zorder + Sets the layer on which this trace is displayed, + relative to other SVG traces on the same subplot. SVG + traces with higher `zorder` appear in front of those + with lower `zorder`. + """ + + def __init__( + self, + arg=None, + alignmentgroup=None, + bandwidth=None, + box=None, + customdata=None, + customdatasrc=None, + fillcolor=None, + hoverinfo=None, + hoverinfosrc=None, + hoverlabel=None, + hoveron=None, + hovertemplate=None, + hovertemplatefallback=None, + hovertemplatesrc=None, + hovertext=None, + hovertextsrc=None, + ids=None, + idssrc=None, + jitter=None, + legend=None, + legendgroup=None, + legendgrouptitle=None, + legendrank=None, + legendwidth=None, + line=None, + marker=None, + meanline=None, + meta=None, + metasrc=None, + name=None, + offsetgroup=None, + opacity=None, + orientation=None, + pointpos=None, + points=None, + quartilemethod=None, + scalegroup=None, + scalemode=None, + selected=None, + selectedpoints=None, + showlegend=None, + side=None, + span=None, + spanmode=None, + stream=None, + text=None, + textsrc=None, + uid=None, + uirevision=None, + unselected=None, + visible=None, + width=None, + x=None, + x0=None, + xaxis=None, + xhoverformat=None, + xsrc=None, + y=None, + y0=None, + yaxis=None, + yhoverformat=None, + ysrc=None, + zorder=None, + **kwargs, + ): + """ + Construct a new Violin object + + In vertical (horizontal) violin plots, statistics are computed + using `y` (`x`) values. By supplying an `x` (`y`) array, one + violin per distinct x (y) value is drawn If no `x` (`y`) list + is provided, a single violin is drawn. That violin position is + then positioned with with `name` or with `x0` (`y0`) if + provided. + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of :class:`plotly.graph_objs.Violin` + alignmentgroup + Set several traces linked to the same position axis or + matching axes to the same alignmentgroup. This controls + whether bars compute their positional range dependently + or independently. + bandwidth + Sets the bandwidth used to compute the kernel density + estimate. By default, the bandwidth is determined by + Silverman's rule of thumb. + box + :class:`plotly.graph_objects.violin.Box` instance or + dict with compatible properties + customdata + Assigns extra data each datum. This may be useful when + listening to hover, click and selection events. Note + that, "scatter" traces also appends customdata items in + the markers DOM elements + customdatasrc + Sets the source reference on Chart Studio Cloud for + `customdata`. + fillcolor + Sets the fill color. Defaults to a half-transparent + variant of the line color, marker color, or marker line + color, whichever is available. + hoverinfo + Determines which trace information appear on hover. If + `none` or `skip` are set, no information is displayed + upon hovering. But, if `none` is set, click and hover + events are still fired. + hoverinfosrc + Sets the source reference on Chart Studio Cloud for + `hoverinfo`. + hoverlabel + :class:`plotly.graph_objects.violin.Hoverlabel` + instance or dict with compatible properties + hoveron + Do the hover effects highlight individual violins or + sample points or the kernel density estimate or any + combination of them? + hovertemplate + Template string used for rendering the information that + appear on hover box. Note that this will override + `hoverinfo`. Variables are inserted using %{variable}, + for example "y: %{y}" as well as %{xother}, {%_xother}, + {%_xother_}, {%xother_}. When showing info for several + points, "xother" will be added to those with different + x positions from the first point. An underscore before + or after "(x|y)other" will add a space on that side, + only when this field is shown. Numbers are formatted + using d3-format's syntax %{variable:d3-format}, for + example "Price: %{y:$.2f}". + https://github.com/d3/d3-format/tree/v1.4.5#d3-format + for details on the formatting syntax. Dates are + formatted using d3-time-format's syntax + %{variable|d3-time-format}, for example "Day: + %{2019-01-01|%A}". https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format for details on the + date formatting syntax. Variables that can't be found + will be replaced with the specifier. For example, a + template of "data: %{x}, %{y}" will result in a value + of "data: 1, %{y}" if x is 1 and y is missing. + Variables with an undefined value will be replaced with + the fallback value. The variables available in + `hovertemplate` are the ones emitted as event data + described at this link + https://plotly.com/javascript/plotlyjs-events/#event- + data. Additionally, all attributes that can be + specified per-point (the ones that are `arrayOk: true`) + are available. Anything contained in tag `` is + displayed in the secondary box, for example + `%{fullData.name}`. To hide the + secondary box completely, use an empty tag + ``. + hovertemplatefallback + Fallback string that's displayed when a variable + referenced in a template is missing. If the boolean + value 'false' is passed in, the specifier with the + missing variable will be displayed. + hovertemplatesrc + Sets the source reference on Chart Studio Cloud for + `hovertemplate`. + hovertext + Same as `text`. + hovertextsrc + Sets the source reference on Chart Studio Cloud for + `hovertext`. + ids + Assigns id labels to each datum. These ids for object + constancy of data points during animation. Should be an + array of strings, not numbers or any other type. + idssrc + Sets the source reference on Chart Studio Cloud for + `ids`. + jitter + Sets the amount of jitter in the sample points drawn. + If 0, the sample points align along the distribution + axis. If 1, the sample points are drawn in a random + jitter of width equal to the width of the violins. + legend + Sets the reference to a legend to show this trace in. + References to these legends are "legend", "legend2", + "legend3", etc. Settings for these legends are set in + the layout, under `layout.legend`, `layout.legend2`, + etc. + legendgroup + Sets the legend group for this trace. Traces and shapes + part of the same legend group hide/show at the same + time when toggling legend items. + legendgrouptitle + :class:`plotly.graph_objects.violin.Legendgrouptitle` + instance or dict with compatible properties + legendrank + Sets the legend rank for this trace. Items and groups + with smaller ranks are presented on top/left side while + with "reversed" `legend.traceorder` they are on + bottom/right side. The default legendrank is 1000, so + that you can use ranks less than 1000 to place certain + items before all unranked items, and ranks greater than + 1000 to go after all unranked items. When having + unranked or equal rank items shapes would be displayed + after traces i.e. according to their order in data and + layout. + legendwidth + Sets the width (in px or fraction) of the legend for + this trace. + line + :class:`plotly.graph_objects.violin.Line` instance or + dict with compatible properties + marker + :class:`plotly.graph_objects.violin.Marker` instance or + dict with compatible properties + meanline + :class:`plotly.graph_objects.violin.Meanline` instance + or dict with compatible properties + meta + Assigns extra meta information associated with this + trace that can be used in various text attributes. + Attributes such as trace `name`, graph, axis and + colorbar `title.text`, annotation `text` + `rangeselector`, `updatemenues` and `sliders` `label` + text all support `meta`. To access the trace `meta` + values in an attribute in the same trace, simply use + `%{meta[i]}` where `i` is the index or key of the + `meta` item in question. To access trace `meta` in + layout attributes, use `%{data[n[.meta[i]}` where `i` + is the index or key of the `meta` and `n` is the trace + index. + metasrc + Sets the source reference on Chart Studio Cloud for + `meta`. + name + Sets the trace name. The trace name appears as the + legend item and on hover. For violin traces, the name + will also be used for the position coordinate, if `x` + and `x0` (`y` and `y0` if horizontal) are missing and + the position axis is categorical. Note that the trace + name is also used as a default value for attribute + `scalegroup` (please see its description for details). + offsetgroup + Set several traces linked to the same position axis or + matching axes to the same offsetgroup where bars of the + same position coordinate will line up. + opacity + Sets the opacity of the trace. + orientation + Sets the orientation of the violin(s). If "v" ("h"), + the distribution is visualized along the vertical + (horizontal). + pointpos + Sets the position of the sample points in relation to + the violins. If 0, the sample points are places over + the center of the violins. Positive (negative) values + correspond to positions to the right (left) for + vertical violins and above (below) for horizontal + violins. + points + If "outliers", only the sample points lying outside the + whiskers are shown If "suspectedoutliers", the outlier + points are shown and points either less than 4*Q1-3*Q3 + or greater than 4*Q3-3*Q1 are highlighted (see + `outliercolor`) If "all", all sample points are shown + If False, only the violins are shown with no sample + points. Defaults to "suspectedoutliers" when + `marker.outliercolor` or `marker.line.outliercolor` is + set, otherwise defaults to "outliers". + quartilemethod + Sets the method used to compute the sample's Q1 and Q3 + quartiles. The "linear" method uses the 25th percentile + for Q1 and 75th percentile for Q3 as computed using + method #10 (listed on + http://jse.amstat.org/v14n3/langford.html). The + "exclusive" method uses the median to divide the + ordered dataset into two halves if the sample is odd, + it does not include the median in either half - Q1 is + then the median of the lower half and Q3 the median of + the upper half. The "inclusive" method also uses the + median to divide the ordered dataset into two halves + but if the sample is odd, it includes the median in + both halves - Q1 is then the median of the lower half + and Q3 the median of the upper half. + scalegroup + If there are multiple violins that should be sized + according to to some metric (see `scalemode`), link + them by providing a non-empty group id here shared by + every trace in the same group. If a violin's `width` is + undefined, `scalegroup` will default to the trace's + name. In this case, violins with the same names will be + linked together + scalemode + Sets the metric by which the width of each violin is + determined. "width" means each violin has the same + (max) width "count" means the violins are scaled by the + number of sample points making up each violin. + selected + :class:`plotly.graph_objects.violin.Selected` instance + or dict with compatible properties + selectedpoints + Array containing integer indices of selected points. + Has an effect only for traces that support selections. + Note that an empty array means an empty selection where + the `unselected` are turned on for all points, whereas, + any other non-array values means no selection all where + the `selected` and `unselected` styles have no effect. + showlegend + Determines whether or not an item corresponding to this + trace is shown in the legend. + side + Determines on which side of the position value the + density function making up one half of a violin is + plotted. Useful when comparing two violin traces under + "overlay" mode, where one trace has `side` set to + "positive" and the other to "negative". + span + Sets the span in data space for which the density + function will be computed. Has an effect only when + `spanmode` is set to "manual". + spanmode + Sets the method by which the span in data space where + the density function will be computed. "soft" means the + span goes from the sample's minimum value minus two + bandwidths to the sample's maximum value plus two + bandwidths. "hard" means the span goes from the + sample's minimum to its maximum value. For custom span + settings, use mode "manual" and fill in the `span` + attribute. + stream + :class:`plotly.graph_objects.violin.Stream` instance or + dict with compatible properties + text + Sets the text elements associated with each sample + value. If a single string, the same string appears over + all the data points. If an array of string, the items + are mapped in order to the this trace's (x,y) + coordinates. To be seen, trace `hoverinfo` must contain + a "text" flag. + textsrc + Sets the source reference on Chart Studio Cloud for + `text`. + uid + Assign an id to this trace, Use this to provide object + constancy between traces during animations and + transitions. + uirevision + Controls persistence of some user-driven changes to the + trace: `constraintrange` in `parcoords` traces, as well + as some `editable: true` modifications such as `name` + and `colorbar.title`. Defaults to `layout.uirevision`. + Note that other user-driven trace attribute changes are + controlled by `layout` attributes: `trace.visible` is + controlled by `layout.legend.uirevision`, + `selectedpoints` is controlled by + `layout.selectionrevision`, and `colorbar.(x|y)` + (accessible with `config: {editable: true}`) is + controlled by `layout.editrevision`. Trace changes are + tracked by `uid`, which only falls back on trace index + if no `uid` is provided. So if your app can add/remove + traces before the end of the `data` array, such that + the same trace has a different index, you can still + preserve user-driven changes if you give each trace a + `uid` that stays with it as it moves. + unselected + :class:`plotly.graph_objects.violin.Unselected` + instance or dict with compatible properties + visible + Determines whether or not this trace is visible. If + "legendonly", the trace is not drawn, but can appear as + a legend item (provided that the legend itself is + visible). + width + Sets the width of the violin in data coordinates. If 0 + (default value) the width is automatically selected + based on the positions of other violin traces in the + same subplot. + x + Sets the x sample data or coordinates. See overview for + more info. + x0 + Sets the x coordinate for single-box traces or the + starting coordinate for multi-box traces set using + q1/median/q3. See overview for more info. + xaxis + Sets a reference between this trace's x coordinates and + a 2D cartesian x axis. If "x" (the default value), the + x coordinates refer to `layout.xaxis`. If "x2", the x + coordinates refer to `layout.xaxis2`, and so on. + xhoverformat + Sets the hover text formatting rulefor `x` using d3 + formatting mini-languages which are very similar to + those in Python. For numbers, see: + https://github.com/d3/d3-format/tree/v1.4.5#d3-format. + And for dates see: https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format. We add two items to + d3's date formatter: "%h" for half of the year as a + decimal number as well as "%{n}f" for fractional + seconds with n digits. For example, *2016-10-13 + 09:15:23.456* with tickformat "%H~%M~%S.%2f" would + display *09~15~23.46*By default the values are + formatted using `xaxis.hoverformat`. + xsrc + Sets the source reference on Chart Studio Cloud for + `x`. + y + Sets the y sample data or coordinates. See overview for + more info. + y0 + Sets the y coordinate for single-box traces or the + starting coordinate for multi-box traces set using + q1/median/q3. See overview for more info. + yaxis + Sets a reference between this trace's y coordinates and + a 2D cartesian y axis. If "y" (the default value), the + y coordinates refer to `layout.yaxis`. If "y2", the y + coordinates refer to `layout.yaxis2`, and so on. + yhoverformat + Sets the hover text formatting rulefor `y` using d3 + formatting mini-languages which are very similar to + those in Python. For numbers, see: + https://github.com/d3/d3-format/tree/v1.4.5#d3-format. + And for dates see: https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format. We add two items to + d3's date formatter: "%h" for half of the year as a + decimal number as well as "%{n}f" for fractional + seconds with n digits. For example, *2016-10-13 + 09:15:23.456* with tickformat "%H~%M~%S.%2f" would + display *09~15~23.46*By default the values are + formatted using `yaxis.hoverformat`. + ysrc + Sets the source reference on Chart Studio Cloud for + `y`. + zorder + Sets the layer on which this trace is displayed, + relative to other SVG traces on the same subplot. SVG + traces with higher `zorder` appear in front of those + with lower `zorder`. + + Returns + ------- + Violin + """ + super().__init__("violin") + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + if arg is None: + arg = {} + elif isinstance(arg, self.__class__): + arg = arg.to_plotly_json() + elif isinstance(arg, dict): + arg = _copy.copy(arg) + else: + raise ValueError("""\ +The first argument to the plotly.graph_objs.Violin +constructor must be a dict or +an instance of :class:`plotly.graph_objs.Violin`""") + + self._skip_invalid = kwargs.pop("skip_invalid", False) + self._validate = kwargs.pop("_validate", True) + + self._set_property("alignmentgroup", arg, alignmentgroup) + self._set_property("bandwidth", arg, bandwidth) + self._set_property("box", arg, box) + self._set_property("customdata", arg, customdata) + self._set_property("customdatasrc", arg, customdatasrc) + self._set_property("fillcolor", arg, fillcolor) + self._set_property("hoverinfo", arg, hoverinfo) + self._set_property("hoverinfosrc", arg, hoverinfosrc) + self._set_property("hoverlabel", arg, hoverlabel) + self._set_property("hoveron", arg, hoveron) + self._set_property("hovertemplate", arg, hovertemplate) + self._set_property("hovertemplatefallback", arg, hovertemplatefallback) + self._set_property("hovertemplatesrc", arg, hovertemplatesrc) + self._set_property("hovertext", arg, hovertext) + self._set_property("hovertextsrc", arg, hovertextsrc) + self._set_property("ids", arg, ids) + self._set_property("idssrc", arg, idssrc) + self._set_property("jitter", arg, jitter) + self._set_property("legend", arg, legend) + self._set_property("legendgroup", arg, legendgroup) + self._set_property("legendgrouptitle", arg, legendgrouptitle) + self._set_property("legendrank", arg, legendrank) + self._set_property("legendwidth", arg, legendwidth) + self._set_property("line", arg, line) + self._set_property("marker", arg, marker) + self._set_property("meanline", arg, meanline) + self._set_property("meta", arg, meta) + self._set_property("metasrc", arg, metasrc) + self._set_property("name", arg, name) + self._set_property("offsetgroup", arg, offsetgroup) + self._set_property("opacity", arg, opacity) + self._set_property("orientation", arg, orientation) + self._set_property("pointpos", arg, pointpos) + self._set_property("points", arg, points) + self._set_property("quartilemethod", arg, quartilemethod) + self._set_property("scalegroup", arg, scalegroup) + self._set_property("scalemode", arg, scalemode) + self._set_property("selected", arg, selected) + self._set_property("selectedpoints", arg, selectedpoints) + self._set_property("showlegend", arg, showlegend) + self._set_property("side", arg, side) + self._set_property("span", arg, span) + self._set_property("spanmode", arg, spanmode) + self._set_property("stream", arg, stream) + self._set_property("text", arg, text) + self._set_property("textsrc", arg, textsrc) + self._set_property("uid", arg, uid) + self._set_property("uirevision", arg, uirevision) + self._set_property("unselected", arg, unselected) + self._set_property("visible", arg, visible) + self._set_property("width", arg, width) + self._set_property("x", arg, x) + self._set_property("x0", arg, x0) + self._set_property("xaxis", arg, xaxis) + self._set_property("xhoverformat", arg, xhoverformat) + self._set_property("xsrc", arg, xsrc) + self._set_property("y", arg, y) + self._set_property("y0", arg, y0) + self._set_property("yaxis", arg, yaxis) + self._set_property("yhoverformat", arg, yhoverformat) + self._set_property("ysrc", arg, ysrc) + self._set_property("zorder", arg, zorder) + + self._props["type"] = "violin" + arg.pop("type", None) + self._process_kwargs(**dict(arg, **kwargs)) + self._skip_invalid = False diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/_volume.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/_volume.py new file mode 100644 index 0000000000000000000000000000000000000000..28edde3a074ff6b14f79c6388c8ca9f17ee230a5 --- /dev/null +++ b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/_volume.py @@ -0,0 +1,2260 @@ +# --- THIS FILE IS AUTO-GENERATED --- +# Modifications will be overwitten the next time code generation run. + +from plotly.basedatatypes import BaseTraceType as _BaseTraceType +import copy as _copy + + +class Volume(_BaseTraceType): + _parent_path_str = "" + _path_str = "volume" + _valid_props = { + "autocolorscale", + "caps", + "cauto", + "cmax", + "cmid", + "cmin", + "coloraxis", + "colorbar", + "colorscale", + "contour", + "customdata", + "customdatasrc", + "flatshading", + "hoverinfo", + "hoverinfosrc", + "hoverlabel", + "hovertemplate", + "hovertemplatefallback", + "hovertemplatesrc", + "hovertext", + "hovertextsrc", + "ids", + "idssrc", + "isomax", + "isomin", + "legend", + "legendgroup", + "legendgrouptitle", + "legendrank", + "legendwidth", + "lighting", + "lightposition", + "meta", + "metasrc", + "name", + "opacity", + "opacityscale", + "reversescale", + "scene", + "showlegend", + "showscale", + "slices", + "spaceframe", + "stream", + "surface", + "text", + "textsrc", + "type", + "uid", + "uirevision", + "value", + "valuehoverformat", + "valuesrc", + "visible", + "x", + "xhoverformat", + "xsrc", + "y", + "yhoverformat", + "ysrc", + "z", + "zhoverformat", + "zsrc", + } + + @property + def autocolorscale(self): + """ + Determines whether the colorscale is a default palette + (`autocolorscale: true`) or the palette determined by + `colorscale`. In case `colorscale` is unspecified or + `autocolorscale` is true, the default palette will be chosen + according to whether numbers in the `color` array are all + positive, all negative or mixed. + + The 'autocolorscale' property is a boolean and must be specified as: + - A boolean value: True or False + + Returns + ------- + bool + """ + return self["autocolorscale"] + + @autocolorscale.setter + def autocolorscale(self, val): + self["autocolorscale"] = val + + @property + def caps(self): + """ + The 'caps' property is an instance of Caps + that may be specified as: + - An instance of :class:`plotly.graph_objs.volume.Caps` + - A dict of string/value properties that will be passed + to the Caps constructor + + Returns + ------- + plotly.graph_objs.volume.Caps + """ + return self["caps"] + + @caps.setter + def caps(self, val): + self["caps"] = val + + @property + def cauto(self): + """ + Determines whether or not the color domain is computed with + respect to the input data (here `value`) or the bounds set in + `cmin` and `cmax` Defaults to `false` when `cmin` and `cmax` + are set by the user. + + The 'cauto' property is a boolean and must be specified as: + - A boolean value: True or False + + Returns + ------- + bool + """ + return self["cauto"] + + @cauto.setter + def cauto(self, val): + self["cauto"] = val + + @property + def cmax(self): + """ + Sets the upper bound of the color domain. Value should have the + same units as `value` and if set, `cmin` must be set as well. + + The 'cmax' property is a number and may be specified as: + - An int or float + + Returns + ------- + int|float + """ + return self["cmax"] + + @cmax.setter + def cmax(self, val): + self["cmax"] = val + + @property + def cmid(self): + """ + Sets the mid-point of the color domain by scaling `cmin` and/or + `cmax` to be equidistant to this point. Value should have the + same units as `value`. Has no effect when `cauto` is `false`. + + The 'cmid' property is a number and may be specified as: + - An int or float + + Returns + ------- + int|float + """ + return self["cmid"] + + @cmid.setter + def cmid(self, val): + self["cmid"] = val + + @property + def cmin(self): + """ + Sets the lower bound of the color domain. Value should have the + same units as `value` and if set, `cmax` must be set as well. + + The 'cmin' property is a number and may be specified as: + - An int or float + + Returns + ------- + int|float + """ + return self["cmin"] + + @cmin.setter + def cmin(self, val): + self["cmin"] = val + + @property + def coloraxis(self): + """ + Sets a reference to a shared color axis. References to these + shared color axes are "coloraxis", "coloraxis2", "coloraxis3", + etc. Settings for these shared color axes are set in the + layout, under `layout.coloraxis`, `layout.coloraxis2`, etc. + Note that multiple color scales can be linked to the same color + axis. + + The 'coloraxis' property is an identifier of a particular + subplot, of type 'coloraxis', that may be specified as: + - the string 'coloraxis' optionally followed by an integer >= 1 + (e.g. 'coloraxis', 'coloraxis1', 'coloraxis2', 'coloraxis3', etc.) + + Returns + ------- + str + """ + return self["coloraxis"] + + @coloraxis.setter + def coloraxis(self, val): + self["coloraxis"] = val + + @property + def colorbar(self): + """ + The 'colorbar' property is an instance of ColorBar + that may be specified as: + - An instance of :class:`plotly.graph_objs.volume.ColorBar` + - A dict of string/value properties that will be passed + to the ColorBar constructor + + Returns + ------- + plotly.graph_objs.volume.ColorBar + """ + return self["colorbar"] + + @colorbar.setter + def colorbar(self, val): + self["colorbar"] = val + + @property + def colorscale(self): + """ + Sets the colorscale. The colorscale must be an array containing + arrays mapping a normalized value to an rgb, rgba, hex, hsl, + hsv, or named color string. At minimum, a mapping for the + lowest (0) and highest (1) values are required. For example, + `[[0, 'rgb(0,0,255)'], [1, 'rgb(255,0,0)']]`. To control the + bounds of the colorscale in color space, use `cmin` and `cmax`. + Alternatively, `colorscale` may be a palette name string of the + following list: Blackbody,Bluered,Blues,Cividis,Earth,Electric, + Greens,Greys,Hot,Jet,Picnic,Portland,Rainbow,RdBu,Reds,Viridis, + YlGnBu,YlOrRd. + + The 'colorscale' property is a colorscale and may be + specified as: + - A list of colors that will be spaced evenly to create the colorscale. + Many predefined colorscale lists are included in the sequential, diverging, + and cyclical modules in the plotly.colors package. + - A list of 2-element lists where the first element is the + normalized color level value (starting at 0 and ending at 1), + and the second item is a valid color string. + (e.g. [[0, 'green'], [0.5, 'red'], [1.0, 'rgb(0, 0, 255)']]) + - One of the following named colorscales: + ['aggrnyl', 'agsunset', 'algae', 'amp', 'armyrose', 'balance', + 'blackbody', 'bluered', 'blues', 'blugrn', 'bluyl', 'brbg', + 'brwnyl', 'bugn', 'bupu', 'burg', 'burgyl', 'cividis', 'curl', + 'darkmint', 'deep', 'delta', 'dense', 'earth', 'edge', 'electric', + 'emrld', 'fall', 'geyser', 'gnbu', 'gray', 'greens', 'greys', + 'haline', 'hot', 'hsv', 'ice', 'icefire', 'inferno', 'jet', + 'magenta', 'magma', 'matter', 'mint', 'mrybm', 'mygbm', 'oranges', + 'orrd', 'oryel', 'oxy', 'peach', 'phase', 'picnic', 'pinkyl', + 'piyg', 'plasma', 'plotly3', 'portland', 'prgn', 'pubu', 'pubugn', + 'puor', 'purd', 'purp', 'purples', 'purpor', 'rainbow', 'rdbu', + 'rdgy', 'rdpu', 'rdylbu', 'rdylgn', 'redor', 'reds', 'solar', + 'spectral', 'speed', 'sunset', 'sunsetdark', 'teal', 'tealgrn', + 'tealrose', 'tempo', 'temps', 'thermal', 'tropic', 'turbid', + 'turbo', 'twilight', 'viridis', 'ylgn', 'ylgnbu', 'ylorbr', + 'ylorrd']. + Appending '_r' to a named colorscale reverses it. + + Returns + ------- + str + """ + return self["colorscale"] + + @colorscale.setter + def colorscale(self, val): + self["colorscale"] = val + + @property + def contour(self): + """ + The 'contour' property is an instance of Contour + that may be specified as: + - An instance of :class:`plotly.graph_objs.volume.Contour` + - A dict of string/value properties that will be passed + to the Contour constructor + + Returns + ------- + plotly.graph_objs.volume.Contour + """ + return self["contour"] + + @contour.setter + def contour(self, val): + self["contour"] = val + + @property + def customdata(self): + """ + Assigns extra data each datum. This may be useful when + listening to hover, click and selection events. Note that, + "scatter" traces also appends customdata items in the markers + DOM elements + + The 'customdata' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["customdata"] + + @customdata.setter + def customdata(self, val): + self["customdata"] = val + + @property + def customdatasrc(self): + """ + Sets the source reference on Chart Studio Cloud for + `customdata`. + + The 'customdatasrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["customdatasrc"] + + @customdatasrc.setter + def customdatasrc(self, val): + self["customdatasrc"] = val + + @property + def flatshading(self): + """ + Determines whether or not normal smoothing is applied to the + meshes, creating meshes with an angular, low-poly look via flat + reflections. + + The 'flatshading' property is a boolean and must be specified as: + - A boolean value: True or False + + Returns + ------- + bool + """ + return self["flatshading"] + + @flatshading.setter + def flatshading(self, val): + self["flatshading"] = val + + @property + def hoverinfo(self): + """ + Determines which trace information appear on hover. If `none` + or `skip` are set, no information is displayed upon hovering. + But, if `none` is set, click and hover events are still fired. + + The 'hoverinfo' property is a flaglist and may be specified + as a string containing: + - Any combination of ['x', 'y', 'z', 'text', 'name'] joined with '+' characters + (e.g. 'x+y') + OR exactly one of ['all', 'none', 'skip'] (e.g. 'skip') + - A list or array of the above + + Returns + ------- + Any|numpy.ndarray + """ + return self["hoverinfo"] + + @hoverinfo.setter + def hoverinfo(self, val): + self["hoverinfo"] = val + + @property + def hoverinfosrc(self): + """ + Sets the source reference on Chart Studio Cloud for + `hoverinfo`. + + The 'hoverinfosrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["hoverinfosrc"] + + @hoverinfosrc.setter + def hoverinfosrc(self, val): + self["hoverinfosrc"] = val + + @property + def hoverlabel(self): + """ + The 'hoverlabel' property is an instance of Hoverlabel + that may be specified as: + - An instance of :class:`plotly.graph_objs.volume.Hoverlabel` + - A dict of string/value properties that will be passed + to the Hoverlabel constructor + + Returns + ------- + plotly.graph_objs.volume.Hoverlabel + """ + return self["hoverlabel"] + + @hoverlabel.setter + def hoverlabel(self, val): + self["hoverlabel"] = val + + @property + def hovertemplate(self): + """ + Template string used for rendering the information that appear + on hover box. Note that this will override `hoverinfo`. + Variables are inserted using %{variable}, for example "y: %{y}" + as well as %{xother}, {%_xother}, {%_xother_}, {%xother_}. When + showing info for several points, "xother" will be added to + those with different x positions from the first point. An + underscore before or after "(x|y)other" will add a space on + that side, only when this field is shown. Numbers are formatted + using d3-format's syntax %{variable:d3-format}, for example + "Price: %{y:$.2f}". + https://github.com/d3/d3-format/tree/v1.4.5#d3-format for + details on the formatting syntax. Dates are formatted using + d3-time-format's syntax %{variable|d3-time-format}, for example + "Day: %{2019-01-01|%A}". https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format for details on the date + formatting syntax. Variables that can't be found will be + replaced with the specifier. For example, a template of "data: + %{x}, %{y}" will result in a value of "data: 1, %{y}" if x is 1 + and y is missing. Variables with an undefined value will be + replaced with the fallback value. The variables available in + `hovertemplate` are the ones emitted as event data described at + this link https://plotly.com/javascript/plotlyjs-events/#event- + data. Additionally, all attributes that can be specified per- + point (the ones that are `arrayOk: true`) are available. + Anything contained in tag `` is displayed in the + secondary box, for example `%{fullData.name}`. + To hide the secondary box completely, use an empty tag + ``. + + The 'hovertemplate' property is a string and must be specified as: + - A string + - A number that will be converted to a string + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["hovertemplate"] + + @hovertemplate.setter + def hovertemplate(self, val): + self["hovertemplate"] = val + + @property + def hovertemplatefallback(self): + """ + Fallback string that's displayed when a variable referenced in + a template is missing. If the boolean value 'false' is passed + in, the specifier with the missing variable will be displayed. + + The 'hovertemplatefallback' property accepts values of any type + + Returns + ------- + Any + """ + return self["hovertemplatefallback"] + + @hovertemplatefallback.setter + def hovertemplatefallback(self, val): + self["hovertemplatefallback"] = val + + @property + def hovertemplatesrc(self): + """ + Sets the source reference on Chart Studio Cloud for + `hovertemplate`. + + The 'hovertemplatesrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["hovertemplatesrc"] + + @hovertemplatesrc.setter + def hovertemplatesrc(self, val): + self["hovertemplatesrc"] = val + + @property + def hovertext(self): + """ + Same as `text`. + + The 'hovertext' property is a string and must be specified as: + - A string + - A number that will be converted to a string + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["hovertext"] + + @hovertext.setter + def hovertext(self, val): + self["hovertext"] = val + + @property + def hovertextsrc(self): + """ + Sets the source reference on Chart Studio Cloud for + `hovertext`. + + The 'hovertextsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["hovertextsrc"] + + @hovertextsrc.setter + def hovertextsrc(self, val): + self["hovertextsrc"] = val + + @property + def ids(self): + """ + Assigns id labels to each datum. These ids for object constancy + of data points during animation. Should be an array of strings, + not numbers or any other type. + + The 'ids' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["ids"] + + @ids.setter + def ids(self, val): + self["ids"] = val + + @property + def idssrc(self): + """ + Sets the source reference on Chart Studio Cloud for `ids`. + + The 'idssrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["idssrc"] + + @idssrc.setter + def idssrc(self, val): + self["idssrc"] = val + + @property + def isomax(self): + """ + Sets the maximum boundary for iso-surface plot. + + The 'isomax' property is a number and may be specified as: + - An int or float + + Returns + ------- + int|float + """ + return self["isomax"] + + @isomax.setter + def isomax(self, val): + self["isomax"] = val + + @property + def isomin(self): + """ + Sets the minimum boundary for iso-surface plot. + + The 'isomin' property is a number and may be specified as: + - An int or float + + Returns + ------- + int|float + """ + return self["isomin"] + + @isomin.setter + def isomin(self, val): + self["isomin"] = val + + @property + def legend(self): + """ + Sets the reference to a legend to show this trace in. + References to these legends are "legend", "legend2", "legend3", + etc. Settings for these legends are set in the layout, under + `layout.legend`, `layout.legend2`, etc. + + The 'legend' property is an identifier of a particular + subplot, of type 'legend', that may be specified as: + - the string 'legend' optionally followed by an integer >= 1 + (e.g. 'legend', 'legend1', 'legend2', 'legend3', etc.) + + Returns + ------- + str + """ + return self["legend"] + + @legend.setter + def legend(self, val): + self["legend"] = val + + @property + def legendgroup(self): + """ + Sets the legend group for this trace. Traces and shapes part of + the same legend group hide/show at the same time when toggling + legend items. + + The 'legendgroup' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["legendgroup"] + + @legendgroup.setter + def legendgroup(self, val): + self["legendgroup"] = val + + @property + def legendgrouptitle(self): + """ + The 'legendgrouptitle' property is an instance of Legendgrouptitle + that may be specified as: + - An instance of :class:`plotly.graph_objs.volume.Legendgrouptitle` + - A dict of string/value properties that will be passed + to the Legendgrouptitle constructor + + Returns + ------- + plotly.graph_objs.volume.Legendgrouptitle + """ + return self["legendgrouptitle"] + + @legendgrouptitle.setter + def legendgrouptitle(self, val): + self["legendgrouptitle"] = val + + @property + def legendrank(self): + """ + Sets the legend rank for this trace. Items and groups with + smaller ranks are presented on top/left side while with + "reversed" `legend.traceorder` they are on bottom/right side. + The default legendrank is 1000, so that you can use ranks less + than 1000 to place certain items before all unranked items, and + ranks greater than 1000 to go after all unranked items. When + having unranked or equal rank items shapes would be displayed + after traces i.e. according to their order in data and layout. + + The 'legendrank' property is a number and may be specified as: + - An int or float + + Returns + ------- + int|float + """ + return self["legendrank"] + + @legendrank.setter + def legendrank(self, val): + self["legendrank"] = val + + @property + def legendwidth(self): + """ + Sets the width (in px or fraction) of the legend for this + trace. + + The 'legendwidth' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["legendwidth"] + + @legendwidth.setter + def legendwidth(self, val): + self["legendwidth"] = val + + @property + def lighting(self): + """ + The 'lighting' property is an instance of Lighting + that may be specified as: + - An instance of :class:`plotly.graph_objs.volume.Lighting` + - A dict of string/value properties that will be passed + to the Lighting constructor + + Returns + ------- + plotly.graph_objs.volume.Lighting + """ + return self["lighting"] + + @lighting.setter + def lighting(self, val): + self["lighting"] = val + + @property + def lightposition(self): + """ + The 'lightposition' property is an instance of Lightposition + that may be specified as: + - An instance of :class:`plotly.graph_objs.volume.Lightposition` + - A dict of string/value properties that will be passed + to the Lightposition constructor + + Returns + ------- + plotly.graph_objs.volume.Lightposition + """ + return self["lightposition"] + + @lightposition.setter + def lightposition(self, val): + self["lightposition"] = val + + @property + def meta(self): + """ + Assigns extra meta information associated with this trace that + can be used in various text attributes. Attributes such as + trace `name`, graph, axis and colorbar `title.text`, annotation + `text` `rangeselector`, `updatemenues` and `sliders` `label` + text all support `meta`. To access the trace `meta` values in + an attribute in the same trace, simply use `%{meta[i]}` where + `i` is the index or key of the `meta` item in question. To + access trace `meta` in layout attributes, use + `%{data[n[.meta[i]}` where `i` is the index or key of the + `meta` and `n` is the trace index. + + The 'meta' property accepts values of any type + + Returns + ------- + Any|numpy.ndarray + """ + return self["meta"] + + @meta.setter + def meta(self, val): + self["meta"] = val + + @property + def metasrc(self): + """ + Sets the source reference on Chart Studio Cloud for `meta`. + + The 'metasrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["metasrc"] + + @metasrc.setter + def metasrc(self, val): + self["metasrc"] = val + + @property + def name(self): + """ + Sets the trace name. The trace name appears as the legend item + and on hover. + + The 'name' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["name"] + + @name.setter + def name(self, val): + self["name"] = val + + @property + def opacity(self): + """ + Sets the opacity of the surface. Please note that in the case + of using high `opacity` values for example a value greater than + or equal to 0.5 on two surfaces (and 0.25 with four surfaces), + an overlay of multiple transparent surfaces may not perfectly + be sorted in depth by the webgl API. This behavior may be + improved in the near future and is subject to change. + + The 'opacity' property is a number and may be specified as: + - An int or float in the interval [0, 1] + + Returns + ------- + int|float + """ + return self["opacity"] + + @opacity.setter + def opacity(self, val): + self["opacity"] = val + + @property + def opacityscale(self): + """ + Sets the opacityscale. The opacityscale must be an array + containing arrays mapping a normalized value to an opacity + value. At minimum, a mapping for the lowest (0) and highest (1) + values are required. For example, `[[0, 1], [0.5, 0.2], [1, + 1]]` means that higher/lower values would have higher opacity + values and those in the middle would be more transparent + Alternatively, `opacityscale` may be a palette name string of + the following list: 'min', 'max', 'extremes' and 'uniform'. The + default is 'uniform'. + + The 'opacityscale' property accepts values of any type + + Returns + ------- + Any + """ + return self["opacityscale"] + + @opacityscale.setter + def opacityscale(self, val): + self["opacityscale"] = val + + @property + def reversescale(self): + """ + Reverses the color mapping if true. If true, `cmin` will + correspond to the last color in the array and `cmax` will + correspond to the first color. + + The 'reversescale' property is a boolean and must be specified as: + - A boolean value: True or False + + Returns + ------- + bool + """ + return self["reversescale"] + + @reversescale.setter + def reversescale(self, val): + self["reversescale"] = val + + @property + def scene(self): + """ + Sets a reference between this trace's 3D coordinate system and + a 3D scene. If "scene" (the default value), the (x,y,z) + coordinates refer to `layout.scene`. If "scene2", the (x,y,z) + coordinates refer to `layout.scene2`, and so on. + + The 'scene' property is an identifier of a particular + subplot, of type 'scene', that may be specified as: + - the string 'scene' optionally followed by an integer >= 1 + (e.g. 'scene', 'scene1', 'scene2', 'scene3', etc.) + + Returns + ------- + str + """ + return self["scene"] + + @scene.setter + def scene(self, val): + self["scene"] = val + + @property + def showlegend(self): + """ + Determines whether or not an item corresponding to this trace + is shown in the legend. + + The 'showlegend' property is a boolean and must be specified as: + - A boolean value: True or False + + Returns + ------- + bool + """ + return self["showlegend"] + + @showlegend.setter + def showlegend(self, val): + self["showlegend"] = val + + @property + def showscale(self): + """ + Determines whether or not a colorbar is displayed for this + trace. + + The 'showscale' property is a boolean and must be specified as: + - A boolean value: True or False + + Returns + ------- + bool + """ + return self["showscale"] + + @showscale.setter + def showscale(self, val): + self["showscale"] = val + + @property + def slices(self): + """ + The 'slices' property is an instance of Slices + that may be specified as: + - An instance of :class:`plotly.graph_objs.volume.Slices` + - A dict of string/value properties that will be passed + to the Slices constructor + + Returns + ------- + plotly.graph_objs.volume.Slices + """ + return self["slices"] + + @slices.setter + def slices(self, val): + self["slices"] = val + + @property + def spaceframe(self): + """ + The 'spaceframe' property is an instance of Spaceframe + that may be specified as: + - An instance of :class:`plotly.graph_objs.volume.Spaceframe` + - A dict of string/value properties that will be passed + to the Spaceframe constructor + + Returns + ------- + plotly.graph_objs.volume.Spaceframe + """ + return self["spaceframe"] + + @spaceframe.setter + def spaceframe(self, val): + self["spaceframe"] = val + + @property + def stream(self): + """ + The 'stream' property is an instance of Stream + that may be specified as: + - An instance of :class:`plotly.graph_objs.volume.Stream` + - A dict of string/value properties that will be passed + to the Stream constructor + + Returns + ------- + plotly.graph_objs.volume.Stream + """ + return self["stream"] + + @stream.setter + def stream(self, val): + self["stream"] = val + + @property + def surface(self): + """ + The 'surface' property is an instance of Surface + that may be specified as: + - An instance of :class:`plotly.graph_objs.volume.Surface` + - A dict of string/value properties that will be passed + to the Surface constructor + + Returns + ------- + plotly.graph_objs.volume.Surface + """ + return self["surface"] + + @surface.setter + def surface(self, val): + self["surface"] = val + + @property + def text(self): + """ + Sets the text elements associated with the vertices. If trace + `hoverinfo` contains a "text" flag and "hovertext" is not set, + these elements will be seen in the hover labels. + + The 'text' property is a string and must be specified as: + - A string + - A number that will be converted to a string + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["text"] + + @text.setter + def text(self, val): + self["text"] = val + + @property + def textsrc(self): + """ + Sets the source reference on Chart Studio Cloud for `text`. + + The 'textsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["textsrc"] + + @textsrc.setter + def textsrc(self, val): + self["textsrc"] = val + + @property + def uid(self): + """ + Assign an id to this trace, Use this to provide object + constancy between traces during animations and transitions. + + The 'uid' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["uid"] + + @uid.setter + def uid(self, val): + self["uid"] = val + + @property + def uirevision(self): + """ + Controls persistence of some user-driven changes to the trace: + `constraintrange` in `parcoords` traces, as well as some + `editable: true` modifications such as `name` and + `colorbar.title`. Defaults to `layout.uirevision`. Note that + other user-driven trace attribute changes are controlled by + `layout` attributes: `trace.visible` is controlled by + `layout.legend.uirevision`, `selectedpoints` is controlled by + `layout.selectionrevision`, and `colorbar.(x|y)` (accessible + with `config: {editable: true}`) is controlled by + `layout.editrevision`. Trace changes are tracked by `uid`, + which only falls back on trace index if no `uid` is provided. + So if your app can add/remove traces before the end of the + `data` array, such that the same trace has a different index, + you can still preserve user-driven changes if you give each + trace a `uid` that stays with it as it moves. + + The 'uirevision' property accepts values of any type + + Returns + ------- + Any + """ + return self["uirevision"] + + @uirevision.setter + def uirevision(self, val): + self["uirevision"] = val + + @property + def value(self): + """ + Sets the 4th dimension (value) of the vertices. + + The 'value' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["value"] + + @value.setter + def value(self, val): + self["value"] = val + + @property + def valuehoverformat(self): + """ + Sets the hover text formatting rulefor `value` using d3 + formatting mini-languages which are very similar to those in + Python. For numbers, see: + https://github.com/d3/d3-format/tree/v1.4.5#d3-format.By + default the values are formatted using generic number format. + + The 'valuehoverformat' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["valuehoverformat"] + + @valuehoverformat.setter + def valuehoverformat(self, val): + self["valuehoverformat"] = val + + @property + def valuesrc(self): + """ + Sets the source reference on Chart Studio Cloud for `value`. + + The 'valuesrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["valuesrc"] + + @valuesrc.setter + def valuesrc(self, val): + self["valuesrc"] = val + + @property + def visible(self): + """ + Determines whether or not this trace is visible. If + "legendonly", the trace is not drawn, but can appear as a + legend item (provided that the legend itself is visible). + + The 'visible' property is an enumeration that may be specified as: + - One of the following enumeration values: + [True, False, 'legendonly'] + + Returns + ------- + Any + """ + return self["visible"] + + @visible.setter + def visible(self, val): + self["visible"] = val + + @property + def x(self): + """ + Sets the X coordinates of the vertices on X axis. + + The 'x' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["x"] + + @x.setter + def x(self, val): + self["x"] = val + + @property + def xhoverformat(self): + """ + Sets the hover text formatting rulefor `x` using d3 formatting + mini-languages which are very similar to those in Python. For + numbers, see: + https://github.com/d3/d3-format/tree/v1.4.5#d3-format. And for + dates see: https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format. We add two items to d3's date + formatter: "%h" for half of the year as a decimal number as + well as "%{n}f" for fractional seconds with n digits. For + example, *2016-10-13 09:15:23.456* with tickformat + "%H~%M~%S.%2f" would display *09~15~23.46*By default the values + are formatted using `xaxis.hoverformat`. + + The 'xhoverformat' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["xhoverformat"] + + @xhoverformat.setter + def xhoverformat(self, val): + self["xhoverformat"] = val + + @property + def xsrc(self): + """ + Sets the source reference on Chart Studio Cloud for `x`. + + The 'xsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["xsrc"] + + @xsrc.setter + def xsrc(self, val): + self["xsrc"] = val + + @property + def y(self): + """ + Sets the Y coordinates of the vertices on Y axis. + + The 'y' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["y"] + + @y.setter + def y(self, val): + self["y"] = val + + @property + def yhoverformat(self): + """ + Sets the hover text formatting rulefor `y` using d3 formatting + mini-languages which are very similar to those in Python. For + numbers, see: + https://github.com/d3/d3-format/tree/v1.4.5#d3-format. And for + dates see: https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format. We add two items to d3's date + formatter: "%h" for half of the year as a decimal number as + well as "%{n}f" for fractional seconds with n digits. For + example, *2016-10-13 09:15:23.456* with tickformat + "%H~%M~%S.%2f" would display *09~15~23.46*By default the values + are formatted using `yaxis.hoverformat`. + + The 'yhoverformat' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["yhoverformat"] + + @yhoverformat.setter + def yhoverformat(self, val): + self["yhoverformat"] = val + + @property + def ysrc(self): + """ + Sets the source reference on Chart Studio Cloud for `y`. + + The 'ysrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["ysrc"] + + @ysrc.setter + def ysrc(self, val): + self["ysrc"] = val + + @property + def z(self): + """ + Sets the Z coordinates of the vertices on Z axis. + + The 'z' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["z"] + + @z.setter + def z(self, val): + self["z"] = val + + @property + def zhoverformat(self): + """ + Sets the hover text formatting rulefor `z` using d3 formatting + mini-languages which are very similar to those in Python. For + numbers, see: + https://github.com/d3/d3-format/tree/v1.4.5#d3-format. And for + dates see: https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format. We add two items to d3's date + formatter: "%h" for half of the year as a decimal number as + well as "%{n}f" for fractional seconds with n digits. For + example, *2016-10-13 09:15:23.456* with tickformat + "%H~%M~%S.%2f" would display *09~15~23.46*By default the values + are formatted using `zaxis.hoverformat`. + + The 'zhoverformat' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["zhoverformat"] + + @zhoverformat.setter + def zhoverformat(self, val): + self["zhoverformat"] = val + + @property + def zsrc(self): + """ + Sets the source reference on Chart Studio Cloud for `z`. + + The 'zsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["zsrc"] + + @zsrc.setter + def zsrc(self, val): + self["zsrc"] = val + + @property + def type(self): + return self._props["type"] + + @property + def _prop_descriptions(self): + return """\ + autocolorscale + Determines whether the colorscale is a default palette + (`autocolorscale: true`) or the palette determined by + `colorscale`. In case `colorscale` is unspecified or + `autocolorscale` is true, the default palette will be + chosen according to whether numbers in the `color` + array are all positive, all negative or mixed. + caps + :class:`plotly.graph_objects.volume.Caps` instance or + dict with compatible properties + cauto + Determines whether or not the color domain is computed + with respect to the input data (here `value`) or the + bounds set in `cmin` and `cmax` Defaults to `false` + when `cmin` and `cmax` are set by the user. + cmax + Sets the upper bound of the color domain. Value should + have the same units as `value` and if set, `cmin` must + be set as well. + cmid + Sets the mid-point of the color domain by scaling + `cmin` and/or `cmax` to be equidistant to this point. + Value should have the same units as `value`. Has no + effect when `cauto` is `false`. + cmin + Sets the lower bound of the color domain. Value should + have the same units as `value` and if set, `cmax` must + be set as well. + coloraxis + Sets a reference to a shared color axis. References to + these shared color axes are "coloraxis", "coloraxis2", + "coloraxis3", etc. Settings for these shared color axes + are set in the layout, under `layout.coloraxis`, + `layout.coloraxis2`, etc. Note that multiple color + scales can be linked to the same color axis. + colorbar + :class:`plotly.graph_objects.volume.ColorBar` instance + or dict with compatible properties + colorscale + Sets the colorscale. The colorscale must be an array + containing arrays mapping a normalized value to an rgb, + rgba, hex, hsl, hsv, or named color string. At minimum, + a mapping for the lowest (0) and highest (1) values are + required. For example, `[[0, 'rgb(0,0,255)'], [1, + 'rgb(255,0,0)']]`. To control the bounds of the + colorscale in color space, use `cmin` and `cmax`. + Alternatively, `colorscale` may be a palette name + string of the following list: Blackbody,Bluered,Blues,C + ividis,Earth,Electric,Greens,Greys,Hot,Jet,Picnic,Portl + and,Rainbow,RdBu,Reds,Viridis,YlGnBu,YlOrRd. + contour + :class:`plotly.graph_objects.volume.Contour` instance + or dict with compatible properties + customdata + Assigns extra data each datum. This may be useful when + listening to hover, click and selection events. Note + that, "scatter" traces also appends customdata items in + the markers DOM elements + customdatasrc + Sets the source reference on Chart Studio Cloud for + `customdata`. + flatshading + Determines whether or not normal smoothing is applied + to the meshes, creating meshes with an angular, low- + poly look via flat reflections. + hoverinfo + Determines which trace information appear on hover. If + `none` or `skip` are set, no information is displayed + upon hovering. But, if `none` is set, click and hover + events are still fired. + hoverinfosrc + Sets the source reference on Chart Studio Cloud for + `hoverinfo`. + hoverlabel + :class:`plotly.graph_objects.volume.Hoverlabel` + instance or dict with compatible properties + hovertemplate + Template string used for rendering the information that + appear on hover box. Note that this will override + `hoverinfo`. Variables are inserted using %{variable}, + for example "y: %{y}" as well as %{xother}, {%_xother}, + {%_xother_}, {%xother_}. When showing info for several + points, "xother" will be added to those with different + x positions from the first point. An underscore before + or after "(x|y)other" will add a space on that side, + only when this field is shown. Numbers are formatted + using d3-format's syntax %{variable:d3-format}, for + example "Price: %{y:$.2f}". + https://github.com/d3/d3-format/tree/v1.4.5#d3-format + for details on the formatting syntax. Dates are + formatted using d3-time-format's syntax + %{variable|d3-time-format}, for example "Day: + %{2019-01-01|%A}". https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format for details on the + date formatting syntax. Variables that can't be found + will be replaced with the specifier. For example, a + template of "data: %{x}, %{y}" will result in a value + of "data: 1, %{y}" if x is 1 and y is missing. + Variables with an undefined value will be replaced with + the fallback value. The variables available in + `hovertemplate` are the ones emitted as event data + described at this link + https://plotly.com/javascript/plotlyjs-events/#event- + data. Additionally, all attributes that can be + specified per-point (the ones that are `arrayOk: true`) + are available. Anything contained in tag `` is + displayed in the secondary box, for example + `%{fullData.name}`. To hide the + secondary box completely, use an empty tag + ``. + hovertemplatefallback + Fallback string that's displayed when a variable + referenced in a template is missing. If the boolean + value 'false' is passed in, the specifier with the + missing variable will be displayed. + hovertemplatesrc + Sets the source reference on Chart Studio Cloud for + `hovertemplate`. + hovertext + Same as `text`. + hovertextsrc + Sets the source reference on Chart Studio Cloud for + `hovertext`. + ids + Assigns id labels to each datum. These ids for object + constancy of data points during animation. Should be an + array of strings, not numbers or any other type. + idssrc + Sets the source reference on Chart Studio Cloud for + `ids`. + isomax + Sets the maximum boundary for iso-surface plot. + isomin + Sets the minimum boundary for iso-surface plot. + legend + Sets the reference to a legend to show this trace in. + References to these legends are "legend", "legend2", + "legend3", etc. Settings for these legends are set in + the layout, under `layout.legend`, `layout.legend2`, + etc. + legendgroup + Sets the legend group for this trace. Traces and shapes + part of the same legend group hide/show at the same + time when toggling legend items. + legendgrouptitle + :class:`plotly.graph_objects.volume.Legendgrouptitle` + instance or dict with compatible properties + legendrank + Sets the legend rank for this trace. Items and groups + with smaller ranks are presented on top/left side while + with "reversed" `legend.traceorder` they are on + bottom/right side. The default legendrank is 1000, so + that you can use ranks less than 1000 to place certain + items before all unranked items, and ranks greater than + 1000 to go after all unranked items. When having + unranked or equal rank items shapes would be displayed + after traces i.e. according to their order in data and + layout. + legendwidth + Sets the width (in px or fraction) of the legend for + this trace. + lighting + :class:`plotly.graph_objects.volume.Lighting` instance + or dict with compatible properties + lightposition + :class:`plotly.graph_objects.volume.Lightposition` + instance or dict with compatible properties + meta + Assigns extra meta information associated with this + trace that can be used in various text attributes. + Attributes such as trace `name`, graph, axis and + colorbar `title.text`, annotation `text` + `rangeselector`, `updatemenues` and `sliders` `label` + text all support `meta`. To access the trace `meta` + values in an attribute in the same trace, simply use + `%{meta[i]}` where `i` is the index or key of the + `meta` item in question. To access trace `meta` in + layout attributes, use `%{data[n[.meta[i]}` where `i` + is the index or key of the `meta` and `n` is the trace + index. + metasrc + Sets the source reference on Chart Studio Cloud for + `meta`. + name + Sets the trace name. The trace name appears as the + legend item and on hover. + opacity + Sets the opacity of the surface. Please note that in + the case of using high `opacity` values for example a + value greater than or equal to 0.5 on two surfaces (and + 0.25 with four surfaces), an overlay of multiple + transparent surfaces may not perfectly be sorted in + depth by the webgl API. This behavior may be improved + in the near future and is subject to change. + opacityscale + Sets the opacityscale. The opacityscale must be an + array containing arrays mapping a normalized value to + an opacity value. At minimum, a mapping for the lowest + (0) and highest (1) values are required. For example, + `[[0, 1], [0.5, 0.2], [1, 1]]` means that higher/lower + values would have higher opacity values and those in + the middle would be more transparent Alternatively, + `opacityscale` may be a palette name string of the + following list: 'min', 'max', 'extremes' and 'uniform'. + The default is 'uniform'. + reversescale + Reverses the color mapping if true. If true, `cmin` + will correspond to the last color in the array and + `cmax` will correspond to the first color. + scene + Sets a reference between this trace's 3D coordinate + system and a 3D scene. If "scene" (the default value), + the (x,y,z) coordinates refer to `layout.scene`. If + "scene2", the (x,y,z) coordinates refer to + `layout.scene2`, and so on. + showlegend + Determines whether or not an item corresponding to this + trace is shown in the legend. + showscale + Determines whether or not a colorbar is displayed for + this trace. + slices + :class:`plotly.graph_objects.volume.Slices` instance or + dict with compatible properties + spaceframe + :class:`plotly.graph_objects.volume.Spaceframe` + instance or dict with compatible properties + stream + :class:`plotly.graph_objects.volume.Stream` instance or + dict with compatible properties + surface + :class:`plotly.graph_objects.volume.Surface` instance + or dict with compatible properties + text + Sets the text elements associated with the vertices. If + trace `hoverinfo` contains a "text" flag and + "hovertext" is not set, these elements will be seen in + the hover labels. + textsrc + Sets the source reference on Chart Studio Cloud for + `text`. + uid + Assign an id to this trace, Use this to provide object + constancy between traces during animations and + transitions. + uirevision + Controls persistence of some user-driven changes to the + trace: `constraintrange` in `parcoords` traces, as well + as some `editable: true` modifications such as `name` + and `colorbar.title`. Defaults to `layout.uirevision`. + Note that other user-driven trace attribute changes are + controlled by `layout` attributes: `trace.visible` is + controlled by `layout.legend.uirevision`, + `selectedpoints` is controlled by + `layout.selectionrevision`, and `colorbar.(x|y)` + (accessible with `config: {editable: true}`) is + controlled by `layout.editrevision`. Trace changes are + tracked by `uid`, which only falls back on trace index + if no `uid` is provided. So if your app can add/remove + traces before the end of the `data` array, such that + the same trace has a different index, you can still + preserve user-driven changes if you give each trace a + `uid` that stays with it as it moves. + value + Sets the 4th dimension (value) of the vertices. + valuehoverformat + Sets the hover text formatting rulefor `value` using + d3 formatting mini-languages which are very similar to + those in Python. For numbers, see: https://github.com/d + 3/d3-format/tree/v1.4.5#d3-format.By default the values + are formatted using generic number format. + valuesrc + Sets the source reference on Chart Studio Cloud for + `value`. + visible + Determines whether or not this trace is visible. If + "legendonly", the trace is not drawn, but can appear as + a legend item (provided that the legend itself is + visible). + x + Sets the X coordinates of the vertices on X axis. + xhoverformat + Sets the hover text formatting rulefor `x` using d3 + formatting mini-languages which are very similar to + those in Python. For numbers, see: + https://github.com/d3/d3-format/tree/v1.4.5#d3-format. + And for dates see: https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format. We add two items to + d3's date formatter: "%h" for half of the year as a + decimal number as well as "%{n}f" for fractional + seconds with n digits. For example, *2016-10-13 + 09:15:23.456* with tickformat "%H~%M~%S.%2f" would + display *09~15~23.46*By default the values are + formatted using `xaxis.hoverformat`. + xsrc + Sets the source reference on Chart Studio Cloud for + `x`. + y + Sets the Y coordinates of the vertices on Y axis. + yhoverformat + Sets the hover text formatting rulefor `y` using d3 + formatting mini-languages which are very similar to + those in Python. For numbers, see: + https://github.com/d3/d3-format/tree/v1.4.5#d3-format. + And for dates see: https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format. We add two items to + d3's date formatter: "%h" for half of the year as a + decimal number as well as "%{n}f" for fractional + seconds with n digits. For example, *2016-10-13 + 09:15:23.456* with tickformat "%H~%M~%S.%2f" would + display *09~15~23.46*By default the values are + formatted using `yaxis.hoverformat`. + ysrc + Sets the source reference on Chart Studio Cloud for + `y`. + z + Sets the Z coordinates of the vertices on Z axis. + zhoverformat + Sets the hover text formatting rulefor `z` using d3 + formatting mini-languages which are very similar to + those in Python. For numbers, see: + https://github.com/d3/d3-format/tree/v1.4.5#d3-format. + And for dates see: https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format. We add two items to + d3's date formatter: "%h" for half of the year as a + decimal number as well as "%{n}f" for fractional + seconds with n digits. For example, *2016-10-13 + 09:15:23.456* with tickformat "%H~%M~%S.%2f" would + display *09~15~23.46*By default the values are + formatted using `zaxis.hoverformat`. + zsrc + Sets the source reference on Chart Studio Cloud for + `z`. + """ + + def __init__( + self, + arg=None, + autocolorscale=None, + caps=None, + cauto=None, + cmax=None, + cmid=None, + cmin=None, + coloraxis=None, + colorbar=None, + colorscale=None, + contour=None, + customdata=None, + customdatasrc=None, + flatshading=None, + hoverinfo=None, + hoverinfosrc=None, + hoverlabel=None, + hovertemplate=None, + hovertemplatefallback=None, + hovertemplatesrc=None, + hovertext=None, + hovertextsrc=None, + ids=None, + idssrc=None, + isomax=None, + isomin=None, + legend=None, + legendgroup=None, + legendgrouptitle=None, + legendrank=None, + legendwidth=None, + lighting=None, + lightposition=None, + meta=None, + metasrc=None, + name=None, + opacity=None, + opacityscale=None, + reversescale=None, + scene=None, + showlegend=None, + showscale=None, + slices=None, + spaceframe=None, + stream=None, + surface=None, + text=None, + textsrc=None, + uid=None, + uirevision=None, + value=None, + valuehoverformat=None, + valuesrc=None, + visible=None, + x=None, + xhoverformat=None, + xsrc=None, + y=None, + yhoverformat=None, + ysrc=None, + z=None, + zhoverformat=None, + zsrc=None, + **kwargs, + ): + """ + Construct a new Volume object + + Draws volume trace between iso-min and iso-max values with + coordinates given by four 1-dimensional arrays containing the + `value`, `x`, `y` and `z` of every vertex of a uniform or non- + uniform 3-D grid. Horizontal or vertical slices, caps as well + as spaceframe between iso-min and iso-max values could also be + drawn using this trace. + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of :class:`plotly.graph_objs.Volume` + autocolorscale + Determines whether the colorscale is a default palette + (`autocolorscale: true`) or the palette determined by + `colorscale`. In case `colorscale` is unspecified or + `autocolorscale` is true, the default palette will be + chosen according to whether numbers in the `color` + array are all positive, all negative or mixed. + caps + :class:`plotly.graph_objects.volume.Caps` instance or + dict with compatible properties + cauto + Determines whether or not the color domain is computed + with respect to the input data (here `value`) or the + bounds set in `cmin` and `cmax` Defaults to `false` + when `cmin` and `cmax` are set by the user. + cmax + Sets the upper bound of the color domain. Value should + have the same units as `value` and if set, `cmin` must + be set as well. + cmid + Sets the mid-point of the color domain by scaling + `cmin` and/or `cmax` to be equidistant to this point. + Value should have the same units as `value`. Has no + effect when `cauto` is `false`. + cmin + Sets the lower bound of the color domain. Value should + have the same units as `value` and if set, `cmax` must + be set as well. + coloraxis + Sets a reference to a shared color axis. References to + these shared color axes are "coloraxis", "coloraxis2", + "coloraxis3", etc. Settings for these shared color axes + are set in the layout, under `layout.coloraxis`, + `layout.coloraxis2`, etc. Note that multiple color + scales can be linked to the same color axis. + colorbar + :class:`plotly.graph_objects.volume.ColorBar` instance + or dict with compatible properties + colorscale + Sets the colorscale. The colorscale must be an array + containing arrays mapping a normalized value to an rgb, + rgba, hex, hsl, hsv, or named color string. At minimum, + a mapping for the lowest (0) and highest (1) values are + required. For example, `[[0, 'rgb(0,0,255)'], [1, + 'rgb(255,0,0)']]`. To control the bounds of the + colorscale in color space, use `cmin` and `cmax`. + Alternatively, `colorscale` may be a palette name + string of the following list: Blackbody,Bluered,Blues,C + ividis,Earth,Electric,Greens,Greys,Hot,Jet,Picnic,Portl + and,Rainbow,RdBu,Reds,Viridis,YlGnBu,YlOrRd. + contour + :class:`plotly.graph_objects.volume.Contour` instance + or dict with compatible properties + customdata + Assigns extra data each datum. This may be useful when + listening to hover, click and selection events. Note + that, "scatter" traces also appends customdata items in + the markers DOM elements + customdatasrc + Sets the source reference on Chart Studio Cloud for + `customdata`. + flatshading + Determines whether or not normal smoothing is applied + to the meshes, creating meshes with an angular, low- + poly look via flat reflections. + hoverinfo + Determines which trace information appear on hover. If + `none` or `skip` are set, no information is displayed + upon hovering. But, if `none` is set, click and hover + events are still fired. + hoverinfosrc + Sets the source reference on Chart Studio Cloud for + `hoverinfo`. + hoverlabel + :class:`plotly.graph_objects.volume.Hoverlabel` + instance or dict with compatible properties + hovertemplate + Template string used for rendering the information that + appear on hover box. Note that this will override + `hoverinfo`. Variables are inserted using %{variable}, + for example "y: %{y}" as well as %{xother}, {%_xother}, + {%_xother_}, {%xother_}. When showing info for several + points, "xother" will be added to those with different + x positions from the first point. An underscore before + or after "(x|y)other" will add a space on that side, + only when this field is shown. Numbers are formatted + using d3-format's syntax %{variable:d3-format}, for + example "Price: %{y:$.2f}". + https://github.com/d3/d3-format/tree/v1.4.5#d3-format + for details on the formatting syntax. Dates are + formatted using d3-time-format's syntax + %{variable|d3-time-format}, for example "Day: + %{2019-01-01|%A}". https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format for details on the + date formatting syntax. Variables that can't be found + will be replaced with the specifier. For example, a + template of "data: %{x}, %{y}" will result in a value + of "data: 1, %{y}" if x is 1 and y is missing. + Variables with an undefined value will be replaced with + the fallback value. The variables available in + `hovertemplate` are the ones emitted as event data + described at this link + https://plotly.com/javascript/plotlyjs-events/#event- + data. Additionally, all attributes that can be + specified per-point (the ones that are `arrayOk: true`) + are available. Anything contained in tag `` is + displayed in the secondary box, for example + `%{fullData.name}`. To hide the + secondary box completely, use an empty tag + ``. + hovertemplatefallback + Fallback string that's displayed when a variable + referenced in a template is missing. If the boolean + value 'false' is passed in, the specifier with the + missing variable will be displayed. + hovertemplatesrc + Sets the source reference on Chart Studio Cloud for + `hovertemplate`. + hovertext + Same as `text`. + hovertextsrc + Sets the source reference on Chart Studio Cloud for + `hovertext`. + ids + Assigns id labels to each datum. These ids for object + constancy of data points during animation. Should be an + array of strings, not numbers or any other type. + idssrc + Sets the source reference on Chart Studio Cloud for + `ids`. + isomax + Sets the maximum boundary for iso-surface plot. + isomin + Sets the minimum boundary for iso-surface plot. + legend + Sets the reference to a legend to show this trace in. + References to these legends are "legend", "legend2", + "legend3", etc. Settings for these legends are set in + the layout, under `layout.legend`, `layout.legend2`, + etc. + legendgroup + Sets the legend group for this trace. Traces and shapes + part of the same legend group hide/show at the same + time when toggling legend items. + legendgrouptitle + :class:`plotly.graph_objects.volume.Legendgrouptitle` + instance or dict with compatible properties + legendrank + Sets the legend rank for this trace. Items and groups + with smaller ranks are presented on top/left side while + with "reversed" `legend.traceorder` they are on + bottom/right side. The default legendrank is 1000, so + that you can use ranks less than 1000 to place certain + items before all unranked items, and ranks greater than + 1000 to go after all unranked items. When having + unranked or equal rank items shapes would be displayed + after traces i.e. according to their order in data and + layout. + legendwidth + Sets the width (in px or fraction) of the legend for + this trace. + lighting + :class:`plotly.graph_objects.volume.Lighting` instance + or dict with compatible properties + lightposition + :class:`plotly.graph_objects.volume.Lightposition` + instance or dict with compatible properties + meta + Assigns extra meta information associated with this + trace that can be used in various text attributes. + Attributes such as trace `name`, graph, axis and + colorbar `title.text`, annotation `text` + `rangeselector`, `updatemenues` and `sliders` `label` + text all support `meta`. To access the trace `meta` + values in an attribute in the same trace, simply use + `%{meta[i]}` where `i` is the index or key of the + `meta` item in question. To access trace `meta` in + layout attributes, use `%{data[n[.meta[i]}` where `i` + is the index or key of the `meta` and `n` is the trace + index. + metasrc + Sets the source reference on Chart Studio Cloud for + `meta`. + name + Sets the trace name. The trace name appears as the + legend item and on hover. + opacity + Sets the opacity of the surface. Please note that in + the case of using high `opacity` values for example a + value greater than or equal to 0.5 on two surfaces (and + 0.25 with four surfaces), an overlay of multiple + transparent surfaces may not perfectly be sorted in + depth by the webgl API. This behavior may be improved + in the near future and is subject to change. + opacityscale + Sets the opacityscale. The opacityscale must be an + array containing arrays mapping a normalized value to + an opacity value. At minimum, a mapping for the lowest + (0) and highest (1) values are required. For example, + `[[0, 1], [0.5, 0.2], [1, 1]]` means that higher/lower + values would have higher opacity values and those in + the middle would be more transparent Alternatively, + `opacityscale` may be a palette name string of the + following list: 'min', 'max', 'extremes' and 'uniform'. + The default is 'uniform'. + reversescale + Reverses the color mapping if true. If true, `cmin` + will correspond to the last color in the array and + `cmax` will correspond to the first color. + scene + Sets a reference between this trace's 3D coordinate + system and a 3D scene. If "scene" (the default value), + the (x,y,z) coordinates refer to `layout.scene`. If + "scene2", the (x,y,z) coordinates refer to + `layout.scene2`, and so on. + showlegend + Determines whether or not an item corresponding to this + trace is shown in the legend. + showscale + Determines whether or not a colorbar is displayed for + this trace. + slices + :class:`plotly.graph_objects.volume.Slices` instance or + dict with compatible properties + spaceframe + :class:`plotly.graph_objects.volume.Spaceframe` + instance or dict with compatible properties + stream + :class:`plotly.graph_objects.volume.Stream` instance or + dict with compatible properties + surface + :class:`plotly.graph_objects.volume.Surface` instance + or dict with compatible properties + text + Sets the text elements associated with the vertices. If + trace `hoverinfo` contains a "text" flag and + "hovertext" is not set, these elements will be seen in + the hover labels. + textsrc + Sets the source reference on Chart Studio Cloud for + `text`. + uid + Assign an id to this trace, Use this to provide object + constancy between traces during animations and + transitions. + uirevision + Controls persistence of some user-driven changes to the + trace: `constraintrange` in `parcoords` traces, as well + as some `editable: true` modifications such as `name` + and `colorbar.title`. Defaults to `layout.uirevision`. + Note that other user-driven trace attribute changes are + controlled by `layout` attributes: `trace.visible` is + controlled by `layout.legend.uirevision`, + `selectedpoints` is controlled by + `layout.selectionrevision`, and `colorbar.(x|y)` + (accessible with `config: {editable: true}`) is + controlled by `layout.editrevision`. Trace changes are + tracked by `uid`, which only falls back on trace index + if no `uid` is provided. So if your app can add/remove + traces before the end of the `data` array, such that + the same trace has a different index, you can still + preserve user-driven changes if you give each trace a + `uid` that stays with it as it moves. + value + Sets the 4th dimension (value) of the vertices. + valuehoverformat + Sets the hover text formatting rulefor `value` using + d3 formatting mini-languages which are very similar to + those in Python. For numbers, see: https://github.com/d + 3/d3-format/tree/v1.4.5#d3-format.By default the values + are formatted using generic number format. + valuesrc + Sets the source reference on Chart Studio Cloud for + `value`. + visible + Determines whether or not this trace is visible. If + "legendonly", the trace is not drawn, but can appear as + a legend item (provided that the legend itself is + visible). + x + Sets the X coordinates of the vertices on X axis. + xhoverformat + Sets the hover text formatting rulefor `x` using d3 + formatting mini-languages which are very similar to + those in Python. For numbers, see: + https://github.com/d3/d3-format/tree/v1.4.5#d3-format. + And for dates see: https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format. We add two items to + d3's date formatter: "%h" for half of the year as a + decimal number as well as "%{n}f" for fractional + seconds with n digits. For example, *2016-10-13 + 09:15:23.456* with tickformat "%H~%M~%S.%2f" would + display *09~15~23.46*By default the values are + formatted using `xaxis.hoverformat`. + xsrc + Sets the source reference on Chart Studio Cloud for + `x`. + y + Sets the Y coordinates of the vertices on Y axis. + yhoverformat + Sets the hover text formatting rulefor `y` using d3 + formatting mini-languages which are very similar to + those in Python. For numbers, see: + https://github.com/d3/d3-format/tree/v1.4.5#d3-format. + And for dates see: https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format. We add two items to + d3's date formatter: "%h" for half of the year as a + decimal number as well as "%{n}f" for fractional + seconds with n digits. For example, *2016-10-13 + 09:15:23.456* with tickformat "%H~%M~%S.%2f" would + display *09~15~23.46*By default the values are + formatted using `yaxis.hoverformat`. + ysrc + Sets the source reference on Chart Studio Cloud for + `y`. + z + Sets the Z coordinates of the vertices on Z axis. + zhoverformat + Sets the hover text formatting rulefor `z` using d3 + formatting mini-languages which are very similar to + those in Python. For numbers, see: + https://github.com/d3/d3-format/tree/v1.4.5#d3-format. + And for dates see: https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format. We add two items to + d3's date formatter: "%h" for half of the year as a + decimal number as well as "%{n}f" for fractional + seconds with n digits. For example, *2016-10-13 + 09:15:23.456* with tickformat "%H~%M~%S.%2f" would + display *09~15~23.46*By default the values are + formatted using `zaxis.hoverformat`. + zsrc + Sets the source reference on Chart Studio Cloud for + `z`. + + Returns + ------- + Volume + """ + super().__init__("volume") + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + if arg is None: + arg = {} + elif isinstance(arg, self.__class__): + arg = arg.to_plotly_json() + elif isinstance(arg, dict): + arg = _copy.copy(arg) + else: + raise ValueError("""\ +The first argument to the plotly.graph_objs.Volume +constructor must be a dict or +an instance of :class:`plotly.graph_objs.Volume`""") + + self._skip_invalid = kwargs.pop("skip_invalid", False) + self._validate = kwargs.pop("_validate", True) + + self._set_property("autocolorscale", arg, autocolorscale) + self._set_property("caps", arg, caps) + self._set_property("cauto", arg, cauto) + self._set_property("cmax", arg, cmax) + self._set_property("cmid", arg, cmid) + self._set_property("cmin", arg, cmin) + self._set_property("coloraxis", arg, coloraxis) + self._set_property("colorbar", arg, colorbar) + self._set_property("colorscale", arg, colorscale) + self._set_property("contour", arg, contour) + self._set_property("customdata", arg, customdata) + self._set_property("customdatasrc", arg, customdatasrc) + self._set_property("flatshading", arg, flatshading) + self._set_property("hoverinfo", arg, hoverinfo) + self._set_property("hoverinfosrc", arg, hoverinfosrc) + self._set_property("hoverlabel", arg, hoverlabel) + self._set_property("hovertemplate", arg, hovertemplate) + self._set_property("hovertemplatefallback", arg, hovertemplatefallback) + self._set_property("hovertemplatesrc", arg, hovertemplatesrc) + self._set_property("hovertext", arg, hovertext) + self._set_property("hovertextsrc", arg, hovertextsrc) + self._set_property("ids", arg, ids) + self._set_property("idssrc", arg, idssrc) + self._set_property("isomax", arg, isomax) + self._set_property("isomin", arg, isomin) + self._set_property("legend", arg, legend) + self._set_property("legendgroup", arg, legendgroup) + self._set_property("legendgrouptitle", arg, legendgrouptitle) + self._set_property("legendrank", arg, legendrank) + self._set_property("legendwidth", arg, legendwidth) + self._set_property("lighting", arg, lighting) + self._set_property("lightposition", arg, lightposition) + self._set_property("meta", arg, meta) + self._set_property("metasrc", arg, metasrc) + self._set_property("name", arg, name) + self._set_property("opacity", arg, opacity) + self._set_property("opacityscale", arg, opacityscale) + self._set_property("reversescale", arg, reversescale) + self._set_property("scene", arg, scene) + self._set_property("showlegend", arg, showlegend) + self._set_property("showscale", arg, showscale) + self._set_property("slices", arg, slices) + self._set_property("spaceframe", arg, spaceframe) + self._set_property("stream", arg, stream) + self._set_property("surface", arg, surface) + self._set_property("text", arg, text) + self._set_property("textsrc", arg, textsrc) + self._set_property("uid", arg, uid) + self._set_property("uirevision", arg, uirevision) + self._set_property("value", arg, value) + self._set_property("valuehoverformat", arg, valuehoverformat) + self._set_property("valuesrc", arg, valuesrc) + self._set_property("visible", arg, visible) + self._set_property("x", arg, x) + self._set_property("xhoverformat", arg, xhoverformat) + self._set_property("xsrc", arg, xsrc) + self._set_property("y", arg, y) + self._set_property("yhoverformat", arg, yhoverformat) + self._set_property("ysrc", arg, ysrc) + self._set_property("z", arg, z) + self._set_property("zhoverformat", arg, zhoverformat) + self._set_property("zsrc", arg, zsrc) + + self._props["type"] = "volume" + arg.pop("type", None) + self._process_kwargs(**dict(arg, **kwargs)) + self._skip_invalid = False diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/_waterfall.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/_waterfall.py new file mode 100644 index 0000000000000000000000000000000000000000..ad71ced965275d2426389e31cafa0f680016b370 --- /dev/null +++ b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/_waterfall.py @@ -0,0 +1,2674 @@ +# --- THIS FILE IS AUTO-GENERATED --- +# Modifications will be overwitten the next time code generation run. + +from plotly.basedatatypes import BaseTraceType as _BaseTraceType +import copy as _copy + + +class Waterfall(_BaseTraceType): + _parent_path_str = "" + _path_str = "waterfall" + _valid_props = { + "alignmentgroup", + "base", + "cliponaxis", + "connector", + "constraintext", + "customdata", + "customdatasrc", + "decreasing", + "dx", + "dy", + "hoverinfo", + "hoverinfosrc", + "hoverlabel", + "hovertemplate", + "hovertemplatefallback", + "hovertemplatesrc", + "hovertext", + "hovertextsrc", + "ids", + "idssrc", + "increasing", + "insidetextanchor", + "insidetextfont", + "legend", + "legendgroup", + "legendgrouptitle", + "legendrank", + "legendwidth", + "measure", + "measuresrc", + "meta", + "metasrc", + "name", + "offset", + "offsetgroup", + "offsetsrc", + "opacity", + "orientation", + "outsidetextfont", + "selectedpoints", + "showlegend", + "stream", + "text", + "textangle", + "textfont", + "textinfo", + "textposition", + "textpositionsrc", + "textsrc", + "texttemplate", + "texttemplatefallback", + "texttemplatesrc", + "totals", + "type", + "uid", + "uirevision", + "visible", + "width", + "widthsrc", + "x", + "x0", + "xaxis", + "xhoverformat", + "xperiod", + "xperiod0", + "xperiodalignment", + "xsrc", + "y", + "y0", + "yaxis", + "yhoverformat", + "yperiod", + "yperiod0", + "yperiodalignment", + "ysrc", + "zorder", + } + + @property + def alignmentgroup(self): + """ + Set several traces linked to the same position axis or matching + axes to the same alignmentgroup. This controls whether bars + compute their positional range dependently or independently. + + The 'alignmentgroup' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["alignmentgroup"] + + @alignmentgroup.setter + def alignmentgroup(self, val): + self["alignmentgroup"] = val + + @property + def base(self): + """ + Sets where the bar base is drawn (in position axis units). + + The 'base' property is a number and may be specified as: + - An int or float + + Returns + ------- + int|float + """ + return self["base"] + + @base.setter + def base(self, val): + self["base"] = val + + @property + def cliponaxis(self): + """ + Determines whether the text nodes are clipped about the subplot + axes. To show the text nodes above axis lines and tick labels, + make sure to set `xaxis.layer` and `yaxis.layer` to *below + traces*. + + The 'cliponaxis' property is a boolean and must be specified as: + - A boolean value: True or False + + Returns + ------- + bool + """ + return self["cliponaxis"] + + @cliponaxis.setter + def cliponaxis(self, val): + self["cliponaxis"] = val + + @property + def connector(self): + """ + The 'connector' property is an instance of Connector + that may be specified as: + - An instance of :class:`plotly.graph_objs.waterfall.Connector` + - A dict of string/value properties that will be passed + to the Connector constructor + + Returns + ------- + plotly.graph_objs.waterfall.Connector + """ + return self["connector"] + + @connector.setter + def connector(self, val): + self["connector"] = val + + @property + def constraintext(self): + """ + Constrain the size of text inside or outside a bar to be no + larger than the bar itself. + + The 'constraintext' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['inside', 'outside', 'both', 'none'] + + Returns + ------- + Any + """ + return self["constraintext"] + + @constraintext.setter + def constraintext(self, val): + self["constraintext"] = val + + @property + def customdata(self): + """ + Assigns extra data each datum. This may be useful when + listening to hover, click and selection events. Note that, + "scatter" traces also appends customdata items in the markers + DOM elements + + The 'customdata' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["customdata"] + + @customdata.setter + def customdata(self, val): + self["customdata"] = val + + @property + def customdatasrc(self): + """ + Sets the source reference on Chart Studio Cloud for + `customdata`. + + The 'customdatasrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["customdatasrc"] + + @customdatasrc.setter + def customdatasrc(self, val): + self["customdatasrc"] = val + + @property + def decreasing(self): + """ + The 'decreasing' property is an instance of Decreasing + that may be specified as: + - An instance of :class:`plotly.graph_objs.waterfall.Decreasing` + - A dict of string/value properties that will be passed + to the Decreasing constructor + + Returns + ------- + plotly.graph_objs.waterfall.Decreasing + """ + return self["decreasing"] + + @decreasing.setter + def decreasing(self, val): + self["decreasing"] = val + + @property + def dx(self): + """ + Sets the x coordinate step. See `x0` for more info. + + The 'dx' property is a number and may be specified as: + - An int or float + + Returns + ------- + int|float + """ + return self["dx"] + + @dx.setter + def dx(self, val): + self["dx"] = val + + @property + def dy(self): + """ + Sets the y coordinate step. See `y0` for more info. + + The 'dy' property is a number and may be specified as: + - An int or float + + Returns + ------- + int|float + """ + return self["dy"] + + @dy.setter + def dy(self, val): + self["dy"] = val + + @property + def hoverinfo(self): + """ + Determines which trace information appear on hover. If `none` + or `skip` are set, no information is displayed upon hovering. + But, if `none` is set, click and hover events are still fired. + + The 'hoverinfo' property is a flaglist and may be specified + as a string containing: + - Any combination of ['name', 'x', 'y', 'text', 'initial', 'delta', 'final'] joined with '+' characters + (e.g. 'name+x') + OR exactly one of ['all', 'none', 'skip'] (e.g. 'skip') + - A list or array of the above + + Returns + ------- + Any|numpy.ndarray + """ + return self["hoverinfo"] + + @hoverinfo.setter + def hoverinfo(self, val): + self["hoverinfo"] = val + + @property + def hoverinfosrc(self): + """ + Sets the source reference on Chart Studio Cloud for + `hoverinfo`. + + The 'hoverinfosrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["hoverinfosrc"] + + @hoverinfosrc.setter + def hoverinfosrc(self, val): + self["hoverinfosrc"] = val + + @property + def hoverlabel(self): + """ + The 'hoverlabel' property is an instance of Hoverlabel + that may be specified as: + - An instance of :class:`plotly.graph_objs.waterfall.Hoverlabel` + - A dict of string/value properties that will be passed + to the Hoverlabel constructor + + Returns + ------- + plotly.graph_objs.waterfall.Hoverlabel + """ + return self["hoverlabel"] + + @hoverlabel.setter + def hoverlabel(self, val): + self["hoverlabel"] = val + + @property + def hovertemplate(self): + """ + Template string used for rendering the information that appear + on hover box. Note that this will override `hoverinfo`. + Variables are inserted using %{variable}, for example "y: %{y}" + as well as %{xother}, {%_xother}, {%_xother_}, {%xother_}. When + showing info for several points, "xother" will be added to + those with different x positions from the first point. An + underscore before or after "(x|y)other" will add a space on + that side, only when this field is shown. Numbers are formatted + using d3-format's syntax %{variable:d3-format}, for example + "Price: %{y:$.2f}". + https://github.com/d3/d3-format/tree/v1.4.5#d3-format for + details on the formatting syntax. Dates are formatted using + d3-time-format's syntax %{variable|d3-time-format}, for example + "Day: %{2019-01-01|%A}". https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format for details on the date + formatting syntax. Variables that can't be found will be + replaced with the specifier. For example, a template of "data: + %{x}, %{y}" will result in a value of "data: 1, %{y}" if x is 1 + and y is missing. Variables with an undefined value will be + replaced with the fallback value. The variables available in + `hovertemplate` are the ones emitted as event data described at + this link https://plotly.com/javascript/plotlyjs-events/#event- + data. Additionally, all attributes that can be specified per- + point (the ones that are `arrayOk: true`) are available. + Finally, the template string has access to variables `initial`, + `delta` and `final`. Anything contained in tag `` is + displayed in the secondary box, for example + `%{fullData.name}`. To hide the secondary box + completely, use an empty tag ``. + + The 'hovertemplate' property is a string and must be specified as: + - A string + - A number that will be converted to a string + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["hovertemplate"] + + @hovertemplate.setter + def hovertemplate(self, val): + self["hovertemplate"] = val + + @property + def hovertemplatefallback(self): + """ + Fallback string that's displayed when a variable referenced in + a template is missing. If the boolean value 'false' is passed + in, the specifier with the missing variable will be displayed. + + The 'hovertemplatefallback' property accepts values of any type + + Returns + ------- + Any + """ + return self["hovertemplatefallback"] + + @hovertemplatefallback.setter + def hovertemplatefallback(self, val): + self["hovertemplatefallback"] = val + + @property + def hovertemplatesrc(self): + """ + Sets the source reference on Chart Studio Cloud for + `hovertemplate`. + + The 'hovertemplatesrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["hovertemplatesrc"] + + @hovertemplatesrc.setter + def hovertemplatesrc(self, val): + self["hovertemplatesrc"] = val + + @property + def hovertext(self): + """ + Sets hover text elements associated with each (x,y) pair. If a + single string, the same string appears over all the data + points. If an array of string, the items are mapped in order to + the this trace's (x,y) coordinates. To be seen, trace + `hoverinfo` must contain a "text" flag. + + The 'hovertext' property is a string and must be specified as: + - A string + - A number that will be converted to a string + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["hovertext"] + + @hovertext.setter + def hovertext(self, val): + self["hovertext"] = val + + @property + def hovertextsrc(self): + """ + Sets the source reference on Chart Studio Cloud for + `hovertext`. + + The 'hovertextsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["hovertextsrc"] + + @hovertextsrc.setter + def hovertextsrc(self, val): + self["hovertextsrc"] = val + + @property + def ids(self): + """ + Assigns id labels to each datum. These ids for object constancy + of data points during animation. Should be an array of strings, + not numbers or any other type. + + The 'ids' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["ids"] + + @ids.setter + def ids(self, val): + self["ids"] = val + + @property + def idssrc(self): + """ + Sets the source reference on Chart Studio Cloud for `ids`. + + The 'idssrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["idssrc"] + + @idssrc.setter + def idssrc(self, val): + self["idssrc"] = val + + @property + def increasing(self): + """ + The 'increasing' property is an instance of Increasing + that may be specified as: + - An instance of :class:`plotly.graph_objs.waterfall.Increasing` + - A dict of string/value properties that will be passed + to the Increasing constructor + + Returns + ------- + plotly.graph_objs.waterfall.Increasing + """ + return self["increasing"] + + @increasing.setter + def increasing(self, val): + self["increasing"] = val + + @property + def insidetextanchor(self): + """ + Determines if texts are kept at center or start/end points in + `textposition` "inside" mode. + + The 'insidetextanchor' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['end', 'middle', 'start'] + + Returns + ------- + Any + """ + return self["insidetextanchor"] + + @insidetextanchor.setter + def insidetextanchor(self, val): + self["insidetextanchor"] = val + + @property + def insidetextfont(self): + """ + Sets the font used for `text` lying inside the bar. + + The 'insidetextfont' property is an instance of Insidetextfont + that may be specified as: + - An instance of :class:`plotly.graph_objs.waterfall.Insidetextfont` + - A dict of string/value properties that will be passed + to the Insidetextfont constructor + + Returns + ------- + plotly.graph_objs.waterfall.Insidetextfont + """ + return self["insidetextfont"] + + @insidetextfont.setter + def insidetextfont(self, val): + self["insidetextfont"] = val + + @property + def legend(self): + """ + Sets the reference to a legend to show this trace in. + References to these legends are "legend", "legend2", "legend3", + etc. Settings for these legends are set in the layout, under + `layout.legend`, `layout.legend2`, etc. + + The 'legend' property is an identifier of a particular + subplot, of type 'legend', that may be specified as: + - the string 'legend' optionally followed by an integer >= 1 + (e.g. 'legend', 'legend1', 'legend2', 'legend3', etc.) + + Returns + ------- + str + """ + return self["legend"] + + @legend.setter + def legend(self, val): + self["legend"] = val + + @property + def legendgroup(self): + """ + Sets the legend group for this trace. Traces and shapes part of + the same legend group hide/show at the same time when toggling + legend items. + + The 'legendgroup' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["legendgroup"] + + @legendgroup.setter + def legendgroup(self, val): + self["legendgroup"] = val + + @property + def legendgrouptitle(self): + """ + The 'legendgrouptitle' property is an instance of Legendgrouptitle + that may be specified as: + - An instance of :class:`plotly.graph_objs.waterfall.Legendgrouptitle` + - A dict of string/value properties that will be passed + to the Legendgrouptitle constructor + + Returns + ------- + plotly.graph_objs.waterfall.Legendgrouptitle + """ + return self["legendgrouptitle"] + + @legendgrouptitle.setter + def legendgrouptitle(self, val): + self["legendgrouptitle"] = val + + @property + def legendrank(self): + """ + Sets the legend rank for this trace. Items and groups with + smaller ranks are presented on top/left side while with + "reversed" `legend.traceorder` they are on bottom/right side. + The default legendrank is 1000, so that you can use ranks less + than 1000 to place certain items before all unranked items, and + ranks greater than 1000 to go after all unranked items. When + having unranked or equal rank items shapes would be displayed + after traces i.e. according to their order in data and layout. + + The 'legendrank' property is a number and may be specified as: + - An int or float + + Returns + ------- + int|float + """ + return self["legendrank"] + + @legendrank.setter + def legendrank(self, val): + self["legendrank"] = val + + @property + def legendwidth(self): + """ + Sets the width (in px or fraction) of the legend for this + trace. + + The 'legendwidth' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["legendwidth"] + + @legendwidth.setter + def legendwidth(self, val): + self["legendwidth"] = val + + @property + def measure(self): + """ + An array containing types of values. By default the values are + considered as 'relative'. However; it is possible to use + 'total' to compute the sums. Also 'absolute' could be applied + to reset the computed total or to declare an initial value + where needed. + + The 'measure' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["measure"] + + @measure.setter + def measure(self, val): + self["measure"] = val + + @property + def measuresrc(self): + """ + Sets the source reference on Chart Studio Cloud for `measure`. + + The 'measuresrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["measuresrc"] + + @measuresrc.setter + def measuresrc(self, val): + self["measuresrc"] = val + + @property + def meta(self): + """ + Assigns extra meta information associated with this trace that + can be used in various text attributes. Attributes such as + trace `name`, graph, axis and colorbar `title.text`, annotation + `text` `rangeselector`, `updatemenues` and `sliders` `label` + text all support `meta`. To access the trace `meta` values in + an attribute in the same trace, simply use `%{meta[i]}` where + `i` is the index or key of the `meta` item in question. To + access trace `meta` in layout attributes, use + `%{data[n[.meta[i]}` where `i` is the index or key of the + `meta` and `n` is the trace index. + + The 'meta' property accepts values of any type + + Returns + ------- + Any|numpy.ndarray + """ + return self["meta"] + + @meta.setter + def meta(self, val): + self["meta"] = val + + @property + def metasrc(self): + """ + Sets the source reference on Chart Studio Cloud for `meta`. + + The 'metasrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["metasrc"] + + @metasrc.setter + def metasrc(self, val): + self["metasrc"] = val + + @property + def name(self): + """ + Sets the trace name. The trace name appears as the legend item + and on hover. + + The 'name' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["name"] + + @name.setter + def name(self, val): + self["name"] = val + + @property + def offset(self): + """ + Shifts the position where the bar is drawn (in position axis + units). In "group" barmode, traces that set "offset" will be + excluded and drawn in "overlay" mode instead. + + The 'offset' property is a number and may be specified as: + - An int or float + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + int|float|numpy.ndarray + """ + return self["offset"] + + @offset.setter + def offset(self, val): + self["offset"] = val + + @property + def offsetgroup(self): + """ + Set several traces linked to the same position axis or matching + axes to the same offsetgroup where bars of the same position + coordinate will line up. + + The 'offsetgroup' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["offsetgroup"] + + @offsetgroup.setter + def offsetgroup(self, val): + self["offsetgroup"] = val + + @property + def offsetsrc(self): + """ + Sets the source reference on Chart Studio Cloud for `offset`. + + The 'offsetsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["offsetsrc"] + + @offsetsrc.setter + def offsetsrc(self, val): + self["offsetsrc"] = val + + @property + def opacity(self): + """ + Sets the opacity of the trace. + + The 'opacity' property is a number and may be specified as: + - An int or float in the interval [0, 1] + + Returns + ------- + int|float + """ + return self["opacity"] + + @opacity.setter + def opacity(self, val): + self["opacity"] = val + + @property + def orientation(self): + """ + Sets the orientation of the bars. With "v" ("h"), the value of + the each bar spans along the vertical (horizontal). + + The 'orientation' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['v', 'h'] + + Returns + ------- + Any + """ + return self["orientation"] + + @orientation.setter + def orientation(self, val): + self["orientation"] = val + + @property + def outsidetextfont(self): + """ + Sets the font used for `text` lying outside the bar. + + The 'outsidetextfont' property is an instance of Outsidetextfont + that may be specified as: + - An instance of :class:`plotly.graph_objs.waterfall.Outsidetextfont` + - A dict of string/value properties that will be passed + to the Outsidetextfont constructor + + Returns + ------- + plotly.graph_objs.waterfall.Outsidetextfont + """ + return self["outsidetextfont"] + + @outsidetextfont.setter + def outsidetextfont(self, val): + self["outsidetextfont"] = val + + @property + def selectedpoints(self): + """ + Array containing integer indices of selected points. Has an + effect only for traces that support selections. Note that an + empty array means an empty selection where the `unselected` are + turned on for all points, whereas, any other non-array values + means no selection all where the `selected` and `unselected` + styles have no effect. + + The 'selectedpoints' property accepts values of any type + + Returns + ------- + Any + """ + return self["selectedpoints"] + + @selectedpoints.setter + def selectedpoints(self, val): + self["selectedpoints"] = val + + @property + def showlegend(self): + """ + Determines whether or not an item corresponding to this trace + is shown in the legend. + + The 'showlegend' property is a boolean and must be specified as: + - A boolean value: True or False + + Returns + ------- + bool + """ + return self["showlegend"] + + @showlegend.setter + def showlegend(self, val): + self["showlegend"] = val + + @property + def stream(self): + """ + The 'stream' property is an instance of Stream + that may be specified as: + - An instance of :class:`plotly.graph_objs.waterfall.Stream` + - A dict of string/value properties that will be passed + to the Stream constructor + + Returns + ------- + plotly.graph_objs.waterfall.Stream + """ + return self["stream"] + + @stream.setter + def stream(self, val): + self["stream"] = val + + @property + def text(self): + """ + Sets text elements associated with each (x,y) pair. If a single + string, the same string appears over all the data points. If an + array of string, the items are mapped in order to the this + trace's (x,y) coordinates. If trace `hoverinfo` contains a + "text" flag and "hovertext" is not set, these elements will be + seen in the hover labels. + + The 'text' property is a string and must be specified as: + - A string + - A number that will be converted to a string + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["text"] + + @text.setter + def text(self, val): + self["text"] = val + + @property + def textangle(self): + """ + Sets the angle of the tick labels with respect to the bar. For + example, a `tickangle` of -90 draws the tick labels vertically. + With "auto" the texts may automatically be rotated to fit with + the maximum size in bars. + + The 'textangle' property is a angle (in degrees) that may be + specified as a number between -180 and 180. + Numeric values outside this range are converted to the equivalent value + (e.g. 270 is converted to -90). + + Returns + ------- + int|float + """ + return self["textangle"] + + @textangle.setter + def textangle(self, val): + self["textangle"] = val + + @property + def textfont(self): + """ + Sets the font used for `text`. + + The 'textfont' property is an instance of Textfont + that may be specified as: + - An instance of :class:`plotly.graph_objs.waterfall.Textfont` + - A dict of string/value properties that will be passed + to the Textfont constructor + + Returns + ------- + plotly.graph_objs.waterfall.Textfont + """ + return self["textfont"] + + @textfont.setter + def textfont(self, val): + self["textfont"] = val + + @property + def textinfo(self): + """ + Determines which trace information appear on the graph. In the + case of having multiple waterfalls, totals are computed + separately (per trace). + + The 'textinfo' property is a flaglist and may be specified + as a string containing: + - Any combination of ['label', 'text', 'initial', 'delta', 'final'] joined with '+' characters + (e.g. 'label+text') + OR exactly one of ['none'] (e.g. 'none') + + Returns + ------- + Any + """ + return self["textinfo"] + + @textinfo.setter + def textinfo(self, val): + self["textinfo"] = val + + @property + def textposition(self): + """ + Specifies the location of the `text`. "inside" positions `text` + inside, next to the bar end (rotated and scaled if needed). + "outside" positions `text` outside, next to the bar end (scaled + if needed), unless there is another bar stacked on this one, + then the text gets pushed inside. "auto" tries to position + `text` inside the bar, but if the bar is too small and no bar + is stacked on this one the text is moved outside. If "none", no + text appears. + + The 'textposition' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['inside', 'outside', 'auto', 'none'] + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + Any|numpy.ndarray + """ + return self["textposition"] + + @textposition.setter + def textposition(self, val): + self["textposition"] = val + + @property + def textpositionsrc(self): + """ + Sets the source reference on Chart Studio Cloud for + `textposition`. + + The 'textpositionsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["textpositionsrc"] + + @textpositionsrc.setter + def textpositionsrc(self, val): + self["textpositionsrc"] = val + + @property + def textsrc(self): + """ + Sets the source reference on Chart Studio Cloud for `text`. + + The 'textsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["textsrc"] + + @textsrc.setter + def textsrc(self, val): + self["textsrc"] = val + + @property + def texttemplate(self): + """ + Template string used for rendering the information text that + appears on points. Note that this will override `textinfo`. + Variables are inserted using %{variable}, for example "y: + %{y}". Numbers are formatted using d3-format's syntax + %{variable:d3-format}, for example "Price: %{y:$.2f}". + https://github.com/d3/d3-format/tree/v1.4.5#d3-format for + details on the formatting syntax. Dates are formatted using + d3-time-format's syntax %{variable|d3-time-format}, for example + "Day: %{2019-01-01|%A}". https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format for details on the date + formatting syntax. Variables that can't be found will be + replaced with the specifier. For example, a template of "data: + %{x}, %{y}" will result in a value of "data: 1, %{y}" if x is 1 + and y is missing. Variables with an undefined value will be + replaced with the fallback value. All attributes that can be + specified per-point (the ones that are `arrayOk: true`) are + available. Finally, the template string has access to variables + `initial`, `delta`, `final` and `label`. + + The 'texttemplate' property is a string and must be specified as: + - A string + - A number that will be converted to a string + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["texttemplate"] + + @texttemplate.setter + def texttemplate(self, val): + self["texttemplate"] = val + + @property + def texttemplatefallback(self): + """ + Fallback string that's displayed when a variable referenced in + a template is missing. If the boolean value 'false' is passed + in, the specifier with the missing variable will be displayed. + + The 'texttemplatefallback' property accepts values of any type + + Returns + ------- + Any + """ + return self["texttemplatefallback"] + + @texttemplatefallback.setter + def texttemplatefallback(self, val): + self["texttemplatefallback"] = val + + @property + def texttemplatesrc(self): + """ + Sets the source reference on Chart Studio Cloud for + `texttemplate`. + + The 'texttemplatesrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["texttemplatesrc"] + + @texttemplatesrc.setter + def texttemplatesrc(self, val): + self["texttemplatesrc"] = val + + @property + def totals(self): + """ + The 'totals' property is an instance of Totals + that may be specified as: + - An instance of :class:`plotly.graph_objs.waterfall.Totals` + - A dict of string/value properties that will be passed + to the Totals constructor + + Returns + ------- + plotly.graph_objs.waterfall.Totals + """ + return self["totals"] + + @totals.setter + def totals(self, val): + self["totals"] = val + + @property + def uid(self): + """ + Assign an id to this trace, Use this to provide object + constancy between traces during animations and transitions. + + The 'uid' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["uid"] + + @uid.setter + def uid(self, val): + self["uid"] = val + + @property + def uirevision(self): + """ + Controls persistence of some user-driven changes to the trace: + `constraintrange` in `parcoords` traces, as well as some + `editable: true` modifications such as `name` and + `colorbar.title`. Defaults to `layout.uirevision`. Note that + other user-driven trace attribute changes are controlled by + `layout` attributes: `trace.visible` is controlled by + `layout.legend.uirevision`, `selectedpoints` is controlled by + `layout.selectionrevision`, and `colorbar.(x|y)` (accessible + with `config: {editable: true}`) is controlled by + `layout.editrevision`. Trace changes are tracked by `uid`, + which only falls back on trace index if no `uid` is provided. + So if your app can add/remove traces before the end of the + `data` array, such that the same trace has a different index, + you can still preserve user-driven changes if you give each + trace a `uid` that stays with it as it moves. + + The 'uirevision' property accepts values of any type + + Returns + ------- + Any + """ + return self["uirevision"] + + @uirevision.setter + def uirevision(self, val): + self["uirevision"] = val + + @property + def visible(self): + """ + Determines whether or not this trace is visible. If + "legendonly", the trace is not drawn, but can appear as a + legend item (provided that the legend itself is visible). + + The 'visible' property is an enumeration that may be specified as: + - One of the following enumeration values: + [True, False, 'legendonly'] + + Returns + ------- + Any + """ + return self["visible"] + + @visible.setter + def visible(self, val): + self["visible"] = val + + @property + def width(self): + """ + Sets the bar width (in position axis units). + + The 'width' property is a number and may be specified as: + - An int or float in the interval [0, inf] + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + int|float|numpy.ndarray + """ + return self["width"] + + @width.setter + def width(self, val): + self["width"] = val + + @property + def widthsrc(self): + """ + Sets the source reference on Chart Studio Cloud for `width`. + + The 'widthsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["widthsrc"] + + @widthsrc.setter + def widthsrc(self, val): + self["widthsrc"] = val + + @property + def x(self): + """ + Sets the x coordinates. + + The 'x' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["x"] + + @x.setter + def x(self, val): + self["x"] = val + + @property + def x0(self): + """ + Alternate to `x`. Builds a linear space of x coordinates. Use + with `dx` where `x0` is the starting coordinate and `dx` the + step. + + The 'x0' property accepts values of any type + + Returns + ------- + Any + """ + return self["x0"] + + @x0.setter + def x0(self, val): + self["x0"] = val + + @property + def xaxis(self): + """ + Sets a reference between this trace's x coordinates and a 2D + cartesian x axis. If "x" (the default value), the x coordinates + refer to `layout.xaxis`. If "x2", the x coordinates refer to + `layout.xaxis2`, and so on. + + The 'xaxis' property is an identifier of a particular + subplot, of type 'x', that may be specified as: + - the string 'x' optionally followed by an integer >= 1 + (e.g. 'x', 'x1', 'x2', 'x3', etc.) + + Returns + ------- + str + """ + return self["xaxis"] + + @xaxis.setter + def xaxis(self, val): + self["xaxis"] = val + + @property + def xhoverformat(self): + """ + Sets the hover text formatting rulefor `x` using d3 formatting + mini-languages which are very similar to those in Python. For + numbers, see: + https://github.com/d3/d3-format/tree/v1.4.5#d3-format. And for + dates see: https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format. We add two items to d3's date + formatter: "%h" for half of the year as a decimal number as + well as "%{n}f" for fractional seconds with n digits. For + example, *2016-10-13 09:15:23.456* with tickformat + "%H~%M~%S.%2f" would display *09~15~23.46*By default the values + are formatted using `xaxis.hoverformat`. + + The 'xhoverformat' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["xhoverformat"] + + @xhoverformat.setter + def xhoverformat(self, val): + self["xhoverformat"] = val + + @property + def xperiod(self): + """ + Only relevant when the axis `type` is "date". Sets the period + positioning in milliseconds or "M" on the x axis. Special + values in the form of "M" could be used to declare the + number of months. In this case `n` must be a positive integer. + + The 'xperiod' property accepts values of any type + + Returns + ------- + Any + """ + return self["xperiod"] + + @xperiod.setter + def xperiod(self, val): + self["xperiod"] = val + + @property + def xperiod0(self): + """ + Only relevant when the axis `type` is "date". Sets the base for + period positioning in milliseconds or date string on the x0 + axis. When `x0period` is round number of weeks, the `x0period0` + by default would be on a Sunday i.e. 2000-01-02, otherwise it + would be at 2000-01-01. + + The 'xperiod0' property accepts values of any type + + Returns + ------- + Any + """ + return self["xperiod0"] + + @xperiod0.setter + def xperiod0(self, val): + self["xperiod0"] = val + + @property + def xperiodalignment(self): + """ + Only relevant when the axis `type` is "date". Sets the + alignment of data points on the x axis. + + The 'xperiodalignment' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['start', 'middle', 'end'] + + Returns + ------- + Any + """ + return self["xperiodalignment"] + + @xperiodalignment.setter + def xperiodalignment(self, val): + self["xperiodalignment"] = val + + @property + def xsrc(self): + """ + Sets the source reference on Chart Studio Cloud for `x`. + + The 'xsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["xsrc"] + + @xsrc.setter + def xsrc(self, val): + self["xsrc"] = val + + @property + def y(self): + """ + Sets the y coordinates. + + The 'y' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["y"] + + @y.setter + def y(self, val): + self["y"] = val + + @property + def y0(self): + """ + Alternate to `y`. Builds a linear space of y coordinates. Use + with `dy` where `y0` is the starting coordinate and `dy` the + step. + + The 'y0' property accepts values of any type + + Returns + ------- + Any + """ + return self["y0"] + + @y0.setter + def y0(self, val): + self["y0"] = val + + @property + def yaxis(self): + """ + Sets a reference between this trace's y coordinates and a 2D + cartesian y axis. If "y" (the default value), the y coordinates + refer to `layout.yaxis`. If "y2", the y coordinates refer to + `layout.yaxis2`, and so on. + + The 'yaxis' property is an identifier of a particular + subplot, of type 'y', that may be specified as: + - the string 'y' optionally followed by an integer >= 1 + (e.g. 'y', 'y1', 'y2', 'y3', etc.) + + Returns + ------- + str + """ + return self["yaxis"] + + @yaxis.setter + def yaxis(self, val): + self["yaxis"] = val + + @property + def yhoverformat(self): + """ + Sets the hover text formatting rulefor `y` using d3 formatting + mini-languages which are very similar to those in Python. For + numbers, see: + https://github.com/d3/d3-format/tree/v1.4.5#d3-format. And for + dates see: https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format. We add two items to d3's date + formatter: "%h" for half of the year as a decimal number as + well as "%{n}f" for fractional seconds with n digits. For + example, *2016-10-13 09:15:23.456* with tickformat + "%H~%M~%S.%2f" would display *09~15~23.46*By default the values + are formatted using `yaxis.hoverformat`. + + The 'yhoverformat' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["yhoverformat"] + + @yhoverformat.setter + def yhoverformat(self, val): + self["yhoverformat"] = val + + @property + def yperiod(self): + """ + Only relevant when the axis `type` is "date". Sets the period + positioning in milliseconds or "M" on the y axis. Special + values in the form of "M" could be used to declare the + number of months. In this case `n` must be a positive integer. + + The 'yperiod' property accepts values of any type + + Returns + ------- + Any + """ + return self["yperiod"] + + @yperiod.setter + def yperiod(self, val): + self["yperiod"] = val + + @property + def yperiod0(self): + """ + Only relevant when the axis `type` is "date". Sets the base for + period positioning in milliseconds or date string on the y0 + axis. When `y0period` is round number of weeks, the `y0period0` + by default would be on a Sunday i.e. 2000-01-02, otherwise it + would be at 2000-01-01. + + The 'yperiod0' property accepts values of any type + + Returns + ------- + Any + """ + return self["yperiod0"] + + @yperiod0.setter + def yperiod0(self, val): + self["yperiod0"] = val + + @property + def yperiodalignment(self): + """ + Only relevant when the axis `type` is "date". Sets the + alignment of data points on the y axis. + + The 'yperiodalignment' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['start', 'middle', 'end'] + + Returns + ------- + Any + """ + return self["yperiodalignment"] + + @yperiodalignment.setter + def yperiodalignment(self, val): + self["yperiodalignment"] = val + + @property + def ysrc(self): + """ + Sets the source reference on Chart Studio Cloud for `y`. + + The 'ysrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["ysrc"] + + @ysrc.setter + def ysrc(self, val): + self["ysrc"] = val + + @property + def zorder(self): + """ + Sets the layer on which this trace is displayed, relative to + other SVG traces on the same subplot. SVG traces with higher + `zorder` appear in front of those with lower `zorder`. + + The 'zorder' property is a integer and may be specified as: + - An int (or float that will be cast to an int) + + Returns + ------- + int + """ + return self["zorder"] + + @zorder.setter + def zorder(self, val): + self["zorder"] = val + + @property + def type(self): + return self._props["type"] + + @property + def _prop_descriptions(self): + return """\ + alignmentgroup + Set several traces linked to the same position axis or + matching axes to the same alignmentgroup. This controls + whether bars compute their positional range dependently + or independently. + base + Sets where the bar base is drawn (in position axis + units). + cliponaxis + Determines whether the text nodes are clipped about the + subplot axes. To show the text nodes above axis lines + and tick labels, make sure to set `xaxis.layer` and + `yaxis.layer` to *below traces*. + connector + :class:`plotly.graph_objects.waterfall.Connector` + instance or dict with compatible properties + constraintext + Constrain the size of text inside or outside a bar to + be no larger than the bar itself. + customdata + Assigns extra data each datum. This may be useful when + listening to hover, click and selection events. Note + that, "scatter" traces also appends customdata items in + the markers DOM elements + customdatasrc + Sets the source reference on Chart Studio Cloud for + `customdata`. + decreasing + :class:`plotly.graph_objects.waterfall.Decreasing` + instance or dict with compatible properties + dx + Sets the x coordinate step. See `x0` for more info. + dy + Sets the y coordinate step. See `y0` for more info. + hoverinfo + Determines which trace information appear on hover. If + `none` or `skip` are set, no information is displayed + upon hovering. But, if `none` is set, click and hover + events are still fired. + hoverinfosrc + Sets the source reference on Chart Studio Cloud for + `hoverinfo`. + hoverlabel + :class:`plotly.graph_objects.waterfall.Hoverlabel` + instance or dict with compatible properties + hovertemplate + Template string used for rendering the information that + appear on hover box. Note that this will override + `hoverinfo`. Variables are inserted using %{variable}, + for example "y: %{y}" as well as %{xother}, {%_xother}, + {%_xother_}, {%xother_}. When showing info for several + points, "xother" will be added to those with different + x positions from the first point. An underscore before + or after "(x|y)other" will add a space on that side, + only when this field is shown. Numbers are formatted + using d3-format's syntax %{variable:d3-format}, for + example "Price: %{y:$.2f}". + https://github.com/d3/d3-format/tree/v1.4.5#d3-format + for details on the formatting syntax. Dates are + formatted using d3-time-format's syntax + %{variable|d3-time-format}, for example "Day: + %{2019-01-01|%A}". https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format for details on the + date formatting syntax. Variables that can't be found + will be replaced with the specifier. For example, a + template of "data: %{x}, %{y}" will result in a value + of "data: 1, %{y}" if x is 1 and y is missing. + Variables with an undefined value will be replaced with + the fallback value. The variables available in + `hovertemplate` are the ones emitted as event data + described at this link + https://plotly.com/javascript/plotlyjs-events/#event- + data. Additionally, all attributes that can be + specified per-point (the ones that are `arrayOk: true`) + are available. Finally, the template string has access + to variables `initial`, `delta` and `final`. Anything + contained in tag `` is displayed in the + secondary box, for example + `%{fullData.name}`. To hide the + secondary box completely, use an empty tag + ``. + hovertemplatefallback + Fallback string that's displayed when a variable + referenced in a template is missing. If the boolean + value 'false' is passed in, the specifier with the + missing variable will be displayed. + hovertemplatesrc + Sets the source reference on Chart Studio Cloud for + `hovertemplate`. + hovertext + Sets hover text elements associated with each (x,y) + pair. If a single string, the same string appears over + all the data points. If an array of string, the items + are mapped in order to the this trace's (x,y) + coordinates. To be seen, trace `hoverinfo` must contain + a "text" flag. + hovertextsrc + Sets the source reference on Chart Studio Cloud for + `hovertext`. + ids + Assigns id labels to each datum. These ids for object + constancy of data points during animation. Should be an + array of strings, not numbers or any other type. + idssrc + Sets the source reference on Chart Studio Cloud for + `ids`. + increasing + :class:`plotly.graph_objects.waterfall.Increasing` + instance or dict with compatible properties + insidetextanchor + Determines if texts are kept at center or start/end + points in `textposition` "inside" mode. + insidetextfont + Sets the font used for `text` lying inside the bar. + legend + Sets the reference to a legend to show this trace in. + References to these legends are "legend", "legend2", + "legend3", etc. Settings for these legends are set in + the layout, under `layout.legend`, `layout.legend2`, + etc. + legendgroup + Sets the legend group for this trace. Traces and shapes + part of the same legend group hide/show at the same + time when toggling legend items. + legendgrouptitle + :class:`plotly.graph_objects.waterfall.Legendgrouptitle + ` instance or dict with compatible properties + legendrank + Sets the legend rank for this trace. Items and groups + with smaller ranks are presented on top/left side while + with "reversed" `legend.traceorder` they are on + bottom/right side. The default legendrank is 1000, so + that you can use ranks less than 1000 to place certain + items before all unranked items, and ranks greater than + 1000 to go after all unranked items. When having + unranked or equal rank items shapes would be displayed + after traces i.e. according to their order in data and + layout. + legendwidth + Sets the width (in px or fraction) of the legend for + this trace. + measure + An array containing types of values. By default the + values are considered as 'relative'. However; it is + possible to use 'total' to compute the sums. Also + 'absolute' could be applied to reset the computed total + or to declare an initial value where needed. + measuresrc + Sets the source reference on Chart Studio Cloud for + `measure`. + meta + Assigns extra meta information associated with this + trace that can be used in various text attributes. + Attributes such as trace `name`, graph, axis and + colorbar `title.text`, annotation `text` + `rangeselector`, `updatemenues` and `sliders` `label` + text all support `meta`. To access the trace `meta` + values in an attribute in the same trace, simply use + `%{meta[i]}` where `i` is the index or key of the + `meta` item in question. To access trace `meta` in + layout attributes, use `%{data[n[.meta[i]}` where `i` + is the index or key of the `meta` and `n` is the trace + index. + metasrc + Sets the source reference on Chart Studio Cloud for + `meta`. + name + Sets the trace name. The trace name appears as the + legend item and on hover. + offset + Shifts the position where the bar is drawn (in position + axis units). In "group" barmode, traces that set + "offset" will be excluded and drawn in "overlay" mode + instead. + offsetgroup + Set several traces linked to the same position axis or + matching axes to the same offsetgroup where bars of the + same position coordinate will line up. + offsetsrc + Sets the source reference on Chart Studio Cloud for + `offset`. + opacity + Sets the opacity of the trace. + orientation + Sets the orientation of the bars. With "v" ("h"), the + value of the each bar spans along the vertical + (horizontal). + outsidetextfont + Sets the font used for `text` lying outside the bar. + selectedpoints + Array containing integer indices of selected points. + Has an effect only for traces that support selections. + Note that an empty array means an empty selection where + the `unselected` are turned on for all points, whereas, + any other non-array values means no selection all where + the `selected` and `unselected` styles have no effect. + showlegend + Determines whether or not an item corresponding to this + trace is shown in the legend. + stream + :class:`plotly.graph_objects.waterfall.Stream` instance + or dict with compatible properties + text + Sets text elements associated with each (x,y) pair. If + a single string, the same string appears over all the + data points. If an array of string, the items are + mapped in order to the this trace's (x,y) coordinates. + If trace `hoverinfo` contains a "text" flag and + "hovertext" is not set, these elements will be seen in + the hover labels. + textangle + Sets the angle of the tick labels with respect to the + bar. For example, a `tickangle` of -90 draws the tick + labels vertically. With "auto" the texts may + automatically be rotated to fit with the maximum size + in bars. + textfont + Sets the font used for `text`. + textinfo + Determines which trace information appear on the graph. + In the case of having multiple waterfalls, totals are + computed separately (per trace). + textposition + Specifies the location of the `text`. "inside" + positions `text` inside, next to the bar end (rotated + and scaled if needed). "outside" positions `text` + outside, next to the bar end (scaled if needed), unless + there is another bar stacked on this one, then the text + gets pushed inside. "auto" tries to position `text` + inside the bar, but if the bar is too small and no bar + is stacked on this one the text is moved outside. If + "none", no text appears. + textpositionsrc + Sets the source reference on Chart Studio Cloud for + `textposition`. + textsrc + Sets the source reference on Chart Studio Cloud for + `text`. + texttemplate + Template string used for rendering the information text + that appears on points. Note that this will override + `textinfo`. Variables are inserted using %{variable}, + for example "y: %{y}". Numbers are formatted using + d3-format's syntax %{variable:d3-format}, for example + "Price: %{y:$.2f}". + https://github.com/d3/d3-format/tree/v1.4.5#d3-format + for details on the formatting syntax. Dates are + formatted using d3-time-format's syntax + %{variable|d3-time-format}, for example "Day: + %{2019-01-01|%A}". https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format for details on the + date formatting syntax. Variables that can't be found + will be replaced with the specifier. For example, a + template of "data: %{x}, %{y}" will result in a value + of "data: 1, %{y}" if x is 1 and y is missing. + Variables with an undefined value will be replaced with + the fallback value. All attributes that can be + specified per-point (the ones that are `arrayOk: true`) + are available. Finally, the template string has access + to variables `initial`, `delta`, `final` and `label`. + texttemplatefallback + Fallback string that's displayed when a variable + referenced in a template is missing. If the boolean + value 'false' is passed in, the specifier with the + missing variable will be displayed. + texttemplatesrc + Sets the source reference on Chart Studio Cloud for + `texttemplate`. + totals + :class:`plotly.graph_objects.waterfall.Totals` instance + or dict with compatible properties + uid + Assign an id to this trace, Use this to provide object + constancy between traces during animations and + transitions. + uirevision + Controls persistence of some user-driven changes to the + trace: `constraintrange` in `parcoords` traces, as well + as some `editable: true` modifications such as `name` + and `colorbar.title`. Defaults to `layout.uirevision`. + Note that other user-driven trace attribute changes are + controlled by `layout` attributes: `trace.visible` is + controlled by `layout.legend.uirevision`, + `selectedpoints` is controlled by + `layout.selectionrevision`, and `colorbar.(x|y)` + (accessible with `config: {editable: true}`) is + controlled by `layout.editrevision`. Trace changes are + tracked by `uid`, which only falls back on trace index + if no `uid` is provided. So if your app can add/remove + traces before the end of the `data` array, such that + the same trace has a different index, you can still + preserve user-driven changes if you give each trace a + `uid` that stays with it as it moves. + visible + Determines whether or not this trace is visible. If + "legendonly", the trace is not drawn, but can appear as + a legend item (provided that the legend itself is + visible). + width + Sets the bar width (in position axis units). + widthsrc + Sets the source reference on Chart Studio Cloud for + `width`. + x + Sets the x coordinates. + x0 + Alternate to `x`. Builds a linear space of x + coordinates. Use with `dx` where `x0` is the starting + coordinate and `dx` the step. + xaxis + Sets a reference between this trace's x coordinates and + a 2D cartesian x axis. If "x" (the default value), the + x coordinates refer to `layout.xaxis`. If "x2", the x + coordinates refer to `layout.xaxis2`, and so on. + xhoverformat + Sets the hover text formatting rulefor `x` using d3 + formatting mini-languages which are very similar to + those in Python. For numbers, see: + https://github.com/d3/d3-format/tree/v1.4.5#d3-format. + And for dates see: https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format. We add two items to + d3's date formatter: "%h" for half of the year as a + decimal number as well as "%{n}f" for fractional + seconds with n digits. For example, *2016-10-13 + 09:15:23.456* with tickformat "%H~%M~%S.%2f" would + display *09~15~23.46*By default the values are + formatted using `xaxis.hoverformat`. + xperiod + Only relevant when the axis `type` is "date". Sets the + period positioning in milliseconds or "M" on the x + axis. Special values in the form of "M" could be + used to declare the number of months. In this case `n` + must be a positive integer. + xperiod0 + Only relevant when the axis `type` is "date". Sets the + base for period positioning in milliseconds or date + string on the x0 axis. When `x0period` is round number + of weeks, the `x0period0` by default would be on a + Sunday i.e. 2000-01-02, otherwise it would be at + 2000-01-01. + xperiodalignment + Only relevant when the axis `type` is "date". Sets the + alignment of data points on the x axis. + xsrc + Sets the source reference on Chart Studio Cloud for + `x`. + y + Sets the y coordinates. + y0 + Alternate to `y`. Builds a linear space of y + coordinates. Use with `dy` where `y0` is the starting + coordinate and `dy` the step. + yaxis + Sets a reference between this trace's y coordinates and + a 2D cartesian y axis. If "y" (the default value), the + y coordinates refer to `layout.yaxis`. If "y2", the y + coordinates refer to `layout.yaxis2`, and so on. + yhoverformat + Sets the hover text formatting rulefor `y` using d3 + formatting mini-languages which are very similar to + those in Python. For numbers, see: + https://github.com/d3/d3-format/tree/v1.4.5#d3-format. + And for dates see: https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format. We add two items to + d3's date formatter: "%h" for half of the year as a + decimal number as well as "%{n}f" for fractional + seconds with n digits. For example, *2016-10-13 + 09:15:23.456* with tickformat "%H~%M~%S.%2f" would + display *09~15~23.46*By default the values are + formatted using `yaxis.hoverformat`. + yperiod + Only relevant when the axis `type` is "date". Sets the + period positioning in milliseconds or "M" on the y + axis. Special values in the form of "M" could be + used to declare the number of months. In this case `n` + must be a positive integer. + yperiod0 + Only relevant when the axis `type` is "date". Sets the + base for period positioning in milliseconds or date + string on the y0 axis. When `y0period` is round number + of weeks, the `y0period0` by default would be on a + Sunday i.e. 2000-01-02, otherwise it would be at + 2000-01-01. + yperiodalignment + Only relevant when the axis `type` is "date". Sets the + alignment of data points on the y axis. + ysrc + Sets the source reference on Chart Studio Cloud for + `y`. + zorder + Sets the layer on which this trace is displayed, + relative to other SVG traces on the same subplot. SVG + traces with higher `zorder` appear in front of those + with lower `zorder`. + """ + + def __init__( + self, + arg=None, + alignmentgroup=None, + base=None, + cliponaxis=None, + connector=None, + constraintext=None, + customdata=None, + customdatasrc=None, + decreasing=None, + dx=None, + dy=None, + hoverinfo=None, + hoverinfosrc=None, + hoverlabel=None, + hovertemplate=None, + hovertemplatefallback=None, + hovertemplatesrc=None, + hovertext=None, + hovertextsrc=None, + ids=None, + idssrc=None, + increasing=None, + insidetextanchor=None, + insidetextfont=None, + legend=None, + legendgroup=None, + legendgrouptitle=None, + legendrank=None, + legendwidth=None, + measure=None, + measuresrc=None, + meta=None, + metasrc=None, + name=None, + offset=None, + offsetgroup=None, + offsetsrc=None, + opacity=None, + orientation=None, + outsidetextfont=None, + selectedpoints=None, + showlegend=None, + stream=None, + text=None, + textangle=None, + textfont=None, + textinfo=None, + textposition=None, + textpositionsrc=None, + textsrc=None, + texttemplate=None, + texttemplatefallback=None, + texttemplatesrc=None, + totals=None, + uid=None, + uirevision=None, + visible=None, + width=None, + widthsrc=None, + x=None, + x0=None, + xaxis=None, + xhoverformat=None, + xperiod=None, + xperiod0=None, + xperiodalignment=None, + xsrc=None, + y=None, + y0=None, + yaxis=None, + yhoverformat=None, + yperiod=None, + yperiod0=None, + yperiodalignment=None, + ysrc=None, + zorder=None, + **kwargs, + ): + """ + Construct a new Waterfall object + + Draws waterfall trace which is useful graph to displays the + contribution of various elements (either positive or negative) + in a bar chart. The data visualized by the span of the bars is + set in `y` if `orientation` is set to "v" (the default) and the + labels are set in `x`. By setting `orientation` to "h", the + roles are interchanged. + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of :class:`plotly.graph_objs.Waterfall` + alignmentgroup + Set several traces linked to the same position axis or + matching axes to the same alignmentgroup. This controls + whether bars compute their positional range dependently + or independently. + base + Sets where the bar base is drawn (in position axis + units). + cliponaxis + Determines whether the text nodes are clipped about the + subplot axes. To show the text nodes above axis lines + and tick labels, make sure to set `xaxis.layer` and + `yaxis.layer` to *below traces*. + connector + :class:`plotly.graph_objects.waterfall.Connector` + instance or dict with compatible properties + constraintext + Constrain the size of text inside or outside a bar to + be no larger than the bar itself. + customdata + Assigns extra data each datum. This may be useful when + listening to hover, click and selection events. Note + that, "scatter" traces also appends customdata items in + the markers DOM elements + customdatasrc + Sets the source reference on Chart Studio Cloud for + `customdata`. + decreasing + :class:`plotly.graph_objects.waterfall.Decreasing` + instance or dict with compatible properties + dx + Sets the x coordinate step. See `x0` for more info. + dy + Sets the y coordinate step. See `y0` for more info. + hoverinfo + Determines which trace information appear on hover. If + `none` or `skip` are set, no information is displayed + upon hovering. But, if `none` is set, click and hover + events are still fired. + hoverinfosrc + Sets the source reference on Chart Studio Cloud for + `hoverinfo`. + hoverlabel + :class:`plotly.graph_objects.waterfall.Hoverlabel` + instance or dict with compatible properties + hovertemplate + Template string used for rendering the information that + appear on hover box. Note that this will override + `hoverinfo`. Variables are inserted using %{variable}, + for example "y: %{y}" as well as %{xother}, {%_xother}, + {%_xother_}, {%xother_}. When showing info for several + points, "xother" will be added to those with different + x positions from the first point. An underscore before + or after "(x|y)other" will add a space on that side, + only when this field is shown. Numbers are formatted + using d3-format's syntax %{variable:d3-format}, for + example "Price: %{y:$.2f}". + https://github.com/d3/d3-format/tree/v1.4.5#d3-format + for details on the formatting syntax. Dates are + formatted using d3-time-format's syntax + %{variable|d3-time-format}, for example "Day: + %{2019-01-01|%A}". https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format for details on the + date formatting syntax. Variables that can't be found + will be replaced with the specifier. For example, a + template of "data: %{x}, %{y}" will result in a value + of "data: 1, %{y}" if x is 1 and y is missing. + Variables with an undefined value will be replaced with + the fallback value. The variables available in + `hovertemplate` are the ones emitted as event data + described at this link + https://plotly.com/javascript/plotlyjs-events/#event- + data. Additionally, all attributes that can be + specified per-point (the ones that are `arrayOk: true`) + are available. Finally, the template string has access + to variables `initial`, `delta` and `final`. Anything + contained in tag `` is displayed in the + secondary box, for example + `%{fullData.name}`. To hide the + secondary box completely, use an empty tag + ``. + hovertemplatefallback + Fallback string that's displayed when a variable + referenced in a template is missing. If the boolean + value 'false' is passed in, the specifier with the + missing variable will be displayed. + hovertemplatesrc + Sets the source reference on Chart Studio Cloud for + `hovertemplate`. + hovertext + Sets hover text elements associated with each (x,y) + pair. If a single string, the same string appears over + all the data points. If an array of string, the items + are mapped in order to the this trace's (x,y) + coordinates. To be seen, trace `hoverinfo` must contain + a "text" flag. + hovertextsrc + Sets the source reference on Chart Studio Cloud for + `hovertext`. + ids + Assigns id labels to each datum. These ids for object + constancy of data points during animation. Should be an + array of strings, not numbers or any other type. + idssrc + Sets the source reference on Chart Studio Cloud for + `ids`. + increasing + :class:`plotly.graph_objects.waterfall.Increasing` + instance or dict with compatible properties + insidetextanchor + Determines if texts are kept at center or start/end + points in `textposition` "inside" mode. + insidetextfont + Sets the font used for `text` lying inside the bar. + legend + Sets the reference to a legend to show this trace in. + References to these legends are "legend", "legend2", + "legend3", etc. Settings for these legends are set in + the layout, under `layout.legend`, `layout.legend2`, + etc. + legendgroup + Sets the legend group for this trace. Traces and shapes + part of the same legend group hide/show at the same + time when toggling legend items. + legendgrouptitle + :class:`plotly.graph_objects.waterfall.Legendgrouptitle + ` instance or dict with compatible properties + legendrank + Sets the legend rank for this trace. Items and groups + with smaller ranks are presented on top/left side while + with "reversed" `legend.traceorder` they are on + bottom/right side. The default legendrank is 1000, so + that you can use ranks less than 1000 to place certain + items before all unranked items, and ranks greater than + 1000 to go after all unranked items. When having + unranked or equal rank items shapes would be displayed + after traces i.e. according to their order in data and + layout. + legendwidth + Sets the width (in px or fraction) of the legend for + this trace. + measure + An array containing types of values. By default the + values are considered as 'relative'. However; it is + possible to use 'total' to compute the sums. Also + 'absolute' could be applied to reset the computed total + or to declare an initial value where needed. + measuresrc + Sets the source reference on Chart Studio Cloud for + `measure`. + meta + Assigns extra meta information associated with this + trace that can be used in various text attributes. + Attributes such as trace `name`, graph, axis and + colorbar `title.text`, annotation `text` + `rangeselector`, `updatemenues` and `sliders` `label` + text all support `meta`. To access the trace `meta` + values in an attribute in the same trace, simply use + `%{meta[i]}` where `i` is the index or key of the + `meta` item in question. To access trace `meta` in + layout attributes, use `%{data[n[.meta[i]}` where `i` + is the index or key of the `meta` and `n` is the trace + index. + metasrc + Sets the source reference on Chart Studio Cloud for + `meta`. + name + Sets the trace name. The trace name appears as the + legend item and on hover. + offset + Shifts the position where the bar is drawn (in position + axis units). In "group" barmode, traces that set + "offset" will be excluded and drawn in "overlay" mode + instead. + offsetgroup + Set several traces linked to the same position axis or + matching axes to the same offsetgroup where bars of the + same position coordinate will line up. + offsetsrc + Sets the source reference on Chart Studio Cloud for + `offset`. + opacity + Sets the opacity of the trace. + orientation + Sets the orientation of the bars. With "v" ("h"), the + value of the each bar spans along the vertical + (horizontal). + outsidetextfont + Sets the font used for `text` lying outside the bar. + selectedpoints + Array containing integer indices of selected points. + Has an effect only for traces that support selections. + Note that an empty array means an empty selection where + the `unselected` are turned on for all points, whereas, + any other non-array values means no selection all where + the `selected` and `unselected` styles have no effect. + showlegend + Determines whether or not an item corresponding to this + trace is shown in the legend. + stream + :class:`plotly.graph_objects.waterfall.Stream` instance + or dict with compatible properties + text + Sets text elements associated with each (x,y) pair. If + a single string, the same string appears over all the + data points. If an array of string, the items are + mapped in order to the this trace's (x,y) coordinates. + If trace `hoverinfo` contains a "text" flag and + "hovertext" is not set, these elements will be seen in + the hover labels. + textangle + Sets the angle of the tick labels with respect to the + bar. For example, a `tickangle` of -90 draws the tick + labels vertically. With "auto" the texts may + automatically be rotated to fit with the maximum size + in bars. + textfont + Sets the font used for `text`. + textinfo + Determines which trace information appear on the graph. + In the case of having multiple waterfalls, totals are + computed separately (per trace). + textposition + Specifies the location of the `text`. "inside" + positions `text` inside, next to the bar end (rotated + and scaled if needed). "outside" positions `text` + outside, next to the bar end (scaled if needed), unless + there is another bar stacked on this one, then the text + gets pushed inside. "auto" tries to position `text` + inside the bar, but if the bar is too small and no bar + is stacked on this one the text is moved outside. If + "none", no text appears. + textpositionsrc + Sets the source reference on Chart Studio Cloud for + `textposition`. + textsrc + Sets the source reference on Chart Studio Cloud for + `text`. + texttemplate + Template string used for rendering the information text + that appears on points. Note that this will override + `textinfo`. Variables are inserted using %{variable}, + for example "y: %{y}". Numbers are formatted using + d3-format's syntax %{variable:d3-format}, for example + "Price: %{y:$.2f}". + https://github.com/d3/d3-format/tree/v1.4.5#d3-format + for details on the formatting syntax. Dates are + formatted using d3-time-format's syntax + %{variable|d3-time-format}, for example "Day: + %{2019-01-01|%A}". https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format for details on the + date formatting syntax. Variables that can't be found + will be replaced with the specifier. For example, a + template of "data: %{x}, %{y}" will result in a value + of "data: 1, %{y}" if x is 1 and y is missing. + Variables with an undefined value will be replaced with + the fallback value. All attributes that can be + specified per-point (the ones that are `arrayOk: true`) + are available. Finally, the template string has access + to variables `initial`, `delta`, `final` and `label`. + texttemplatefallback + Fallback string that's displayed when a variable + referenced in a template is missing. If the boolean + value 'false' is passed in, the specifier with the + missing variable will be displayed. + texttemplatesrc + Sets the source reference on Chart Studio Cloud for + `texttemplate`. + totals + :class:`plotly.graph_objects.waterfall.Totals` instance + or dict with compatible properties + uid + Assign an id to this trace, Use this to provide object + constancy between traces during animations and + transitions. + uirevision + Controls persistence of some user-driven changes to the + trace: `constraintrange` in `parcoords` traces, as well + as some `editable: true` modifications such as `name` + and `colorbar.title`. Defaults to `layout.uirevision`. + Note that other user-driven trace attribute changes are + controlled by `layout` attributes: `trace.visible` is + controlled by `layout.legend.uirevision`, + `selectedpoints` is controlled by + `layout.selectionrevision`, and `colorbar.(x|y)` + (accessible with `config: {editable: true}`) is + controlled by `layout.editrevision`. Trace changes are + tracked by `uid`, which only falls back on trace index + if no `uid` is provided. So if your app can add/remove + traces before the end of the `data` array, such that + the same trace has a different index, you can still + preserve user-driven changes if you give each trace a + `uid` that stays with it as it moves. + visible + Determines whether or not this trace is visible. If + "legendonly", the trace is not drawn, but can appear as + a legend item (provided that the legend itself is + visible). + width + Sets the bar width (in position axis units). + widthsrc + Sets the source reference on Chart Studio Cloud for + `width`. + x + Sets the x coordinates. + x0 + Alternate to `x`. Builds a linear space of x + coordinates. Use with `dx` where `x0` is the starting + coordinate and `dx` the step. + xaxis + Sets a reference between this trace's x coordinates and + a 2D cartesian x axis. If "x" (the default value), the + x coordinates refer to `layout.xaxis`. If "x2", the x + coordinates refer to `layout.xaxis2`, and so on. + xhoverformat + Sets the hover text formatting rulefor `x` using d3 + formatting mini-languages which are very similar to + those in Python. For numbers, see: + https://github.com/d3/d3-format/tree/v1.4.5#d3-format. + And for dates see: https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format. We add two items to + d3's date formatter: "%h" for half of the year as a + decimal number as well as "%{n}f" for fractional + seconds with n digits. For example, *2016-10-13 + 09:15:23.456* with tickformat "%H~%M~%S.%2f" would + display *09~15~23.46*By default the values are + formatted using `xaxis.hoverformat`. + xperiod + Only relevant when the axis `type` is "date". Sets the + period positioning in milliseconds or "M" on the x + axis. Special values in the form of "M" could be + used to declare the number of months. In this case `n` + must be a positive integer. + xperiod0 + Only relevant when the axis `type` is "date". Sets the + base for period positioning in milliseconds or date + string on the x0 axis. When `x0period` is round number + of weeks, the `x0period0` by default would be on a + Sunday i.e. 2000-01-02, otherwise it would be at + 2000-01-01. + xperiodalignment + Only relevant when the axis `type` is "date". Sets the + alignment of data points on the x axis. + xsrc + Sets the source reference on Chart Studio Cloud for + `x`. + y + Sets the y coordinates. + y0 + Alternate to `y`. Builds a linear space of y + coordinates. Use with `dy` where `y0` is the starting + coordinate and `dy` the step. + yaxis + Sets a reference between this trace's y coordinates and + a 2D cartesian y axis. If "y" (the default value), the + y coordinates refer to `layout.yaxis`. If "y2", the y + coordinates refer to `layout.yaxis2`, and so on. + yhoverformat + Sets the hover text formatting rulefor `y` using d3 + formatting mini-languages which are very similar to + those in Python. For numbers, see: + https://github.com/d3/d3-format/tree/v1.4.5#d3-format. + And for dates see: https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format. We add two items to + d3's date formatter: "%h" for half of the year as a + decimal number as well as "%{n}f" for fractional + seconds with n digits. For example, *2016-10-13 + 09:15:23.456* with tickformat "%H~%M~%S.%2f" would + display *09~15~23.46*By default the values are + formatted using `yaxis.hoverformat`. + yperiod + Only relevant when the axis `type` is "date". Sets the + period positioning in milliseconds or "M" on the y + axis. Special values in the form of "M" could be + used to declare the number of months. In this case `n` + must be a positive integer. + yperiod0 + Only relevant when the axis `type` is "date". Sets the + base for period positioning in milliseconds or date + string on the y0 axis. When `y0period` is round number + of weeks, the `y0period0` by default would be on a + Sunday i.e. 2000-01-02, otherwise it would be at + 2000-01-01. + yperiodalignment + Only relevant when the axis `type` is "date". Sets the + alignment of data points on the y axis. + ysrc + Sets the source reference on Chart Studio Cloud for + `y`. + zorder + Sets the layer on which this trace is displayed, + relative to other SVG traces on the same subplot. SVG + traces with higher `zorder` appear in front of those + with lower `zorder`. + + Returns + ------- + Waterfall + """ + super().__init__("waterfall") + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + if arg is None: + arg = {} + elif isinstance(arg, self.__class__): + arg = arg.to_plotly_json() + elif isinstance(arg, dict): + arg = _copy.copy(arg) + else: + raise ValueError("""\ +The first argument to the plotly.graph_objs.Waterfall +constructor must be a dict or +an instance of :class:`plotly.graph_objs.Waterfall`""") + + self._skip_invalid = kwargs.pop("skip_invalid", False) + self._validate = kwargs.pop("_validate", True) + + self._set_property("alignmentgroup", arg, alignmentgroup) + self._set_property("base", arg, base) + self._set_property("cliponaxis", arg, cliponaxis) + self._set_property("connector", arg, connector) + self._set_property("constraintext", arg, constraintext) + self._set_property("customdata", arg, customdata) + self._set_property("customdatasrc", arg, customdatasrc) + self._set_property("decreasing", arg, decreasing) + self._set_property("dx", arg, dx) + self._set_property("dy", arg, dy) + self._set_property("hoverinfo", arg, hoverinfo) + self._set_property("hoverinfosrc", arg, hoverinfosrc) + self._set_property("hoverlabel", arg, hoverlabel) + self._set_property("hovertemplate", arg, hovertemplate) + self._set_property("hovertemplatefallback", arg, hovertemplatefallback) + self._set_property("hovertemplatesrc", arg, hovertemplatesrc) + self._set_property("hovertext", arg, hovertext) + self._set_property("hovertextsrc", arg, hovertextsrc) + self._set_property("ids", arg, ids) + self._set_property("idssrc", arg, idssrc) + self._set_property("increasing", arg, increasing) + self._set_property("insidetextanchor", arg, insidetextanchor) + self._set_property("insidetextfont", arg, insidetextfont) + self._set_property("legend", arg, legend) + self._set_property("legendgroup", arg, legendgroup) + self._set_property("legendgrouptitle", arg, legendgrouptitle) + self._set_property("legendrank", arg, legendrank) + self._set_property("legendwidth", arg, legendwidth) + self._set_property("measure", arg, measure) + self._set_property("measuresrc", arg, measuresrc) + self._set_property("meta", arg, meta) + self._set_property("metasrc", arg, metasrc) + self._set_property("name", arg, name) + self._set_property("offset", arg, offset) + self._set_property("offsetgroup", arg, offsetgroup) + self._set_property("offsetsrc", arg, offsetsrc) + self._set_property("opacity", arg, opacity) + self._set_property("orientation", arg, orientation) + self._set_property("outsidetextfont", arg, outsidetextfont) + self._set_property("selectedpoints", arg, selectedpoints) + self._set_property("showlegend", arg, showlegend) + self._set_property("stream", arg, stream) + self._set_property("text", arg, text) + self._set_property("textangle", arg, textangle) + self._set_property("textfont", arg, textfont) + self._set_property("textinfo", arg, textinfo) + self._set_property("textposition", arg, textposition) + self._set_property("textpositionsrc", arg, textpositionsrc) + self._set_property("textsrc", arg, textsrc) + self._set_property("texttemplate", arg, texttemplate) + self._set_property("texttemplatefallback", arg, texttemplatefallback) + self._set_property("texttemplatesrc", arg, texttemplatesrc) + self._set_property("totals", arg, totals) + self._set_property("uid", arg, uid) + self._set_property("uirevision", arg, uirevision) + self._set_property("visible", arg, visible) + self._set_property("width", arg, width) + self._set_property("widthsrc", arg, widthsrc) + self._set_property("x", arg, x) + self._set_property("x0", arg, x0) + self._set_property("xaxis", arg, xaxis) + self._set_property("xhoverformat", arg, xhoverformat) + self._set_property("xperiod", arg, xperiod) + self._set_property("xperiod0", arg, xperiod0) + self._set_property("xperiodalignment", arg, xperiodalignment) + self._set_property("xsrc", arg, xsrc) + self._set_property("y", arg, y) + self._set_property("y0", arg, y0) + self._set_property("yaxis", arg, yaxis) + self._set_property("yhoverformat", arg, yhoverformat) + self._set_property("yperiod", arg, yperiod) + self._set_property("yperiod0", arg, yperiod0) + self._set_property("yperiodalignment", arg, yperiodalignment) + self._set_property("ysrc", arg, ysrc) + self._set_property("zorder", arg, zorder) + + self._props["type"] = "waterfall" + arg.pop("type", None) + self._process_kwargs(**dict(arg, **kwargs)) + self._skip_invalid = False diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/bar/.___init__.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/bar/.___init__.py new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/bar/.___init__.py differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/bar/.___pycache__ b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/bar/.___pycache__ new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/bar/.___pycache__ differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/bar/.__error_x.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/bar/.__error_x.py new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/bar/.__error_x.py differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/bar/.__error_y.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/bar/.__error_y.py new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/bar/.__error_y.py differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/bar/.__hoverlabel.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/bar/.__hoverlabel.py new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/bar/.__hoverlabel.py differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/bar/.__insidetextfont.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/bar/.__insidetextfont.py new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/bar/.__insidetextfont.py differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/bar/.__legendgrouptitle.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/bar/.__legendgrouptitle.py new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/bar/.__legendgrouptitle.py differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/bar/.__marker.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/bar/.__marker.py new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/bar/.__marker.py differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/bar/.__outsidetextfont.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/bar/.__outsidetextfont.py new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/bar/.__outsidetextfont.py differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/bar/.__selected.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/bar/.__selected.py new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/bar/.__selected.py differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/bar/.__stream.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/bar/.__stream.py new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/bar/.__stream.py differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/bar/.__textfont.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/bar/.__textfont.py new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/bar/.__textfont.py differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/bar/.__unselected.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/bar/.__unselected.py new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/bar/.__unselected.py differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/bar/._hoverlabel b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/bar/._hoverlabel new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/bar/._hoverlabel differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/bar/._legendgrouptitle b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/bar/._legendgrouptitle new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/bar/._legendgrouptitle differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/bar/._marker b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/bar/._marker new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/bar/._marker differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/bar/._selected b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/bar/._selected new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/bar/._selected differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/bar/._unselected b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/bar/._unselected new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/bar/._unselected differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/bar/__init__.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/bar/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..3b22b71d4c36c8300572b902fc200e7b8acfe2d5 --- /dev/null +++ b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/bar/__init__.py @@ -0,0 +1,40 @@ +import sys +from typing import TYPE_CHECKING + +if TYPE_CHECKING: + from ._error_x import ErrorX + from ._error_y import ErrorY + from ._hoverlabel import Hoverlabel + from ._insidetextfont import Insidetextfont + from ._legendgrouptitle import Legendgrouptitle + from ._marker import Marker + from ._outsidetextfont import Outsidetextfont + from ._selected import Selected + from ._stream import Stream + from ._textfont import Textfont + from ._unselected import Unselected + from . import hoverlabel + from . import legendgrouptitle + from . import marker + from . import selected + from . import unselected +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [".hoverlabel", ".legendgrouptitle", ".marker", ".selected", ".unselected"], + [ + "._error_x.ErrorX", + "._error_y.ErrorY", + "._hoverlabel.Hoverlabel", + "._insidetextfont.Insidetextfont", + "._legendgrouptitle.Legendgrouptitle", + "._marker.Marker", + "._outsidetextfont.Outsidetextfont", + "._selected.Selected", + "._stream.Stream", + "._textfont.Textfont", + "._unselected.Unselected", + ], + ) diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/bar/_error_x.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/bar/_error_x.py new file mode 100644 index 0000000000000000000000000000000000000000..6c2537e68b3db30e66633937b6ba372716fd38a8 --- /dev/null +++ b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/bar/_error_x.py @@ -0,0 +1,502 @@ +# --- THIS FILE IS AUTO-GENERATED --- +# Modifications will be overwitten the next time code generation run. + +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class ErrorX(_BaseTraceHierarchyType): + _parent_path_str = "bar" + _path_str = "bar.error_x" + _valid_props = { + "array", + "arrayminus", + "arrayminussrc", + "arraysrc", + "color", + "copy_ystyle", + "symmetric", + "thickness", + "traceref", + "tracerefminus", + "type", + "value", + "valueminus", + "visible", + "width", + } + + @property + def array(self): + """ + Sets the data corresponding the length of each error bar. + Values are plotted relative to the underlying data. + + The 'array' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["array"] + + @array.setter + def array(self, val): + self["array"] = val + + @property + def arrayminus(self): + """ + Sets the data corresponding the length of each error bar in the + bottom (left) direction for vertical (horizontal) bars Values + are plotted relative to the underlying data. + + The 'arrayminus' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["arrayminus"] + + @arrayminus.setter + def arrayminus(self, val): + self["arrayminus"] = val + + @property + def arrayminussrc(self): + """ + Sets the source reference on Chart Studio Cloud for + `arrayminus`. + + The 'arrayminussrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["arrayminussrc"] + + @arrayminussrc.setter + def arrayminussrc(self, val): + self["arrayminussrc"] = val + + @property + def arraysrc(self): + """ + Sets the source reference on Chart Studio Cloud for `array`. + + The 'arraysrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["arraysrc"] + + @arraysrc.setter + def arraysrc(self, val): + self["arraysrc"] = val + + @property + def color(self): + """ + Sets the stroke color of the error bars. + + The 'color' property is a color and may be specified as: + - A hex string (e.g. '#ff0000') + - An rgb/rgba string (e.g. 'rgb(255,0,0)') + - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') + - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') + - A named CSS color: see https://plotly.com/python/css-colors/ for a list + + Returns + ------- + str + """ + return self["color"] + + @color.setter + def color(self, val): + self["color"] = val + + @property + def copy_ystyle(self): + """ + The 'copy_ystyle' property is a boolean and must be specified as: + - A boolean value: True or False + + Returns + ------- + bool + """ + return self["copy_ystyle"] + + @copy_ystyle.setter + def copy_ystyle(self, val): + self["copy_ystyle"] = val + + @property + def symmetric(self): + """ + Determines whether or not the error bars have the same length + in both direction (top/bottom for vertical bars, left/right for + horizontal bars. + + The 'symmetric' property is a boolean and must be specified as: + - A boolean value: True or False + + Returns + ------- + bool + """ + return self["symmetric"] + + @symmetric.setter + def symmetric(self, val): + self["symmetric"] = val + + @property + def thickness(self): + """ + Sets the thickness (in px) of the error bars. + + The 'thickness' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["thickness"] + + @thickness.setter + def thickness(self, val): + self["thickness"] = val + + @property + def traceref(self): + """ + The 'traceref' property is a integer and may be specified as: + - An int (or float that will be cast to an int) + in the interval [0, 9223372036854775807] + + Returns + ------- + int + """ + return self["traceref"] + + @traceref.setter + def traceref(self, val): + self["traceref"] = val + + @property + def tracerefminus(self): + """ + The 'tracerefminus' property is a integer and may be specified as: + - An int (or float that will be cast to an int) + in the interval [0, 9223372036854775807] + + Returns + ------- + int + """ + return self["tracerefminus"] + + @tracerefminus.setter + def tracerefminus(self, val): + self["tracerefminus"] = val + + @property + def type(self): + """ + Determines the rule used to generate the error bars. If + "constant", the bar lengths are of a constant value. Set this + constant in `value`. If "percent", the bar lengths correspond + to a percentage of underlying data. Set this percentage in + `value`. If "sqrt", the bar lengths correspond to the square of + the underlying data. If "data", the bar lengths are set with + data set `array`. + + The 'type' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['percent', 'constant', 'sqrt', 'data'] + + Returns + ------- + Any + """ + return self["type"] + + @type.setter + def type(self, val): + self["type"] = val + + @property + def value(self): + """ + Sets the value of either the percentage (if `type` is set to + "percent") or the constant (if `type` is set to "constant") + corresponding to the lengths of the error bars. + + The 'value' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["value"] + + @value.setter + def value(self, val): + self["value"] = val + + @property + def valueminus(self): + """ + Sets the value of either the percentage (if `type` is set to + "percent") or the constant (if `type` is set to "constant") + corresponding to the lengths of the error bars in the bottom + (left) direction for vertical (horizontal) bars + + The 'valueminus' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["valueminus"] + + @valueminus.setter + def valueminus(self, val): + self["valueminus"] = val + + @property + def visible(self): + """ + Determines whether or not this set of error bars is visible. + + The 'visible' property is a boolean and must be specified as: + - A boolean value: True or False + + Returns + ------- + bool + """ + return self["visible"] + + @visible.setter + def visible(self, val): + self["visible"] = val + + @property + def width(self): + """ + Sets the width (in px) of the cross-bar at both ends of the + error bars. + + The 'width' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["width"] + + @width.setter + def width(self, val): + self["width"] = val + + @property + def _prop_descriptions(self): + return """\ + array + Sets the data corresponding the length of each error + bar. Values are plotted relative to the underlying + data. + arrayminus + Sets the data corresponding the length of each error + bar in the bottom (left) direction for vertical + (horizontal) bars Values are plotted relative to the + underlying data. + arrayminussrc + Sets the source reference on Chart Studio Cloud for + `arrayminus`. + arraysrc + Sets the source reference on Chart Studio Cloud for + `array`. + color + Sets the stroke color of the error bars. + copy_ystyle + + symmetric + Determines whether or not the error bars have the same + length in both direction (top/bottom for vertical bars, + left/right for horizontal bars. + thickness + Sets the thickness (in px) of the error bars. + traceref + + tracerefminus + + type + Determines the rule used to generate the error bars. If + "constant", the bar lengths are of a constant value. + Set this constant in `value`. If "percent", the bar + lengths correspond to a percentage of underlying data. + Set this percentage in `value`. If "sqrt", the bar + lengths correspond to the square of the underlying + data. If "data", the bar lengths are set with data set + `array`. + value + Sets the value of either the percentage (if `type` is + set to "percent") or the constant (if `type` is set to + "constant") corresponding to the lengths of the error + bars. + valueminus + Sets the value of either the percentage (if `type` is + set to "percent") or the constant (if `type` is set to + "constant") corresponding to the lengths of the error + bars in the bottom (left) direction for vertical + (horizontal) bars + visible + Determines whether or not this set of error bars is + visible. + width + Sets the width (in px) of the cross-bar at both ends of + the error bars. + """ + + def __init__( + self, + arg=None, + array=None, + arrayminus=None, + arrayminussrc=None, + arraysrc=None, + color=None, + copy_ystyle=None, + symmetric=None, + thickness=None, + traceref=None, + tracerefminus=None, + type=None, + value=None, + valueminus=None, + visible=None, + width=None, + **kwargs, + ): + """ + Construct a new ErrorX object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of :class:`plotly.graph_objs.bar.ErrorX` + array + Sets the data corresponding the length of each error + bar. Values are plotted relative to the underlying + data. + arrayminus + Sets the data corresponding the length of each error + bar in the bottom (left) direction for vertical + (horizontal) bars Values are plotted relative to the + underlying data. + arrayminussrc + Sets the source reference on Chart Studio Cloud for + `arrayminus`. + arraysrc + Sets the source reference on Chart Studio Cloud for + `array`. + color + Sets the stroke color of the error bars. + copy_ystyle + + symmetric + Determines whether or not the error bars have the same + length in both direction (top/bottom for vertical bars, + left/right for horizontal bars. + thickness + Sets the thickness (in px) of the error bars. + traceref + + tracerefminus + + type + Determines the rule used to generate the error bars. If + "constant", the bar lengths are of a constant value. + Set this constant in `value`. If "percent", the bar + lengths correspond to a percentage of underlying data. + Set this percentage in `value`. If "sqrt", the bar + lengths correspond to the square of the underlying + data. If "data", the bar lengths are set with data set + `array`. + value + Sets the value of either the percentage (if `type` is + set to "percent") or the constant (if `type` is set to + "constant") corresponding to the lengths of the error + bars. + valueminus + Sets the value of either the percentage (if `type` is + set to "percent") or the constant (if `type` is set to + "constant") corresponding to the lengths of the error + bars in the bottom (left) direction for vertical + (horizontal) bars + visible + Determines whether or not this set of error bars is + visible. + width + Sets the width (in px) of the cross-bar at both ends of + the error bars. + + Returns + ------- + ErrorX + """ + super().__init__("error_x") + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + if arg is None: + arg = {} + elif isinstance(arg, self.__class__): + arg = arg.to_plotly_json() + elif isinstance(arg, dict): + arg = _copy.copy(arg) + else: + raise ValueError("""\ +The first argument to the plotly.graph_objs.bar.ErrorX +constructor must be a dict or +an instance of :class:`plotly.graph_objs.bar.ErrorX`""") + + self._skip_invalid = kwargs.pop("skip_invalid", False) + self._validate = kwargs.pop("_validate", True) + + self._set_property("array", arg, array) + self._set_property("arrayminus", arg, arrayminus) + self._set_property("arrayminussrc", arg, arrayminussrc) + self._set_property("arraysrc", arg, arraysrc) + self._set_property("color", arg, color) + self._set_property("copy_ystyle", arg, copy_ystyle) + self._set_property("symmetric", arg, symmetric) + self._set_property("thickness", arg, thickness) + self._set_property("traceref", arg, traceref) + self._set_property("tracerefminus", arg, tracerefminus) + self._set_property("type", arg, type) + self._set_property("value", arg, value) + self._set_property("valueminus", arg, valueminus) + self._set_property("visible", arg, visible) + self._set_property("width", arg, width) + self._process_kwargs(**dict(arg, **kwargs)) + self._skip_invalid = False diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/bar/_error_y.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/bar/_error_y.py new file mode 100644 index 0000000000000000000000000000000000000000..3d99cd85f2d4568ec3587e7e2359a5443a3ed9e2 --- /dev/null +++ b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/bar/_error_y.py @@ -0,0 +1,479 @@ +# --- THIS FILE IS AUTO-GENERATED --- +# Modifications will be overwitten the next time code generation run. + +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class ErrorY(_BaseTraceHierarchyType): + _parent_path_str = "bar" + _path_str = "bar.error_y" + _valid_props = { + "array", + "arrayminus", + "arrayminussrc", + "arraysrc", + "color", + "symmetric", + "thickness", + "traceref", + "tracerefminus", + "type", + "value", + "valueminus", + "visible", + "width", + } + + @property + def array(self): + """ + Sets the data corresponding the length of each error bar. + Values are plotted relative to the underlying data. + + The 'array' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["array"] + + @array.setter + def array(self, val): + self["array"] = val + + @property + def arrayminus(self): + """ + Sets the data corresponding the length of each error bar in the + bottom (left) direction for vertical (horizontal) bars Values + are plotted relative to the underlying data. + + The 'arrayminus' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["arrayminus"] + + @arrayminus.setter + def arrayminus(self, val): + self["arrayminus"] = val + + @property + def arrayminussrc(self): + """ + Sets the source reference on Chart Studio Cloud for + `arrayminus`. + + The 'arrayminussrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["arrayminussrc"] + + @arrayminussrc.setter + def arrayminussrc(self, val): + self["arrayminussrc"] = val + + @property + def arraysrc(self): + """ + Sets the source reference on Chart Studio Cloud for `array`. + + The 'arraysrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["arraysrc"] + + @arraysrc.setter + def arraysrc(self, val): + self["arraysrc"] = val + + @property + def color(self): + """ + Sets the stroke color of the error bars. + + The 'color' property is a color and may be specified as: + - A hex string (e.g. '#ff0000') + - An rgb/rgba string (e.g. 'rgb(255,0,0)') + - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') + - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') + - A named CSS color: see https://plotly.com/python/css-colors/ for a list + + Returns + ------- + str + """ + return self["color"] + + @color.setter + def color(self, val): + self["color"] = val + + @property + def symmetric(self): + """ + Determines whether or not the error bars have the same length + in both direction (top/bottom for vertical bars, left/right for + horizontal bars. + + The 'symmetric' property is a boolean and must be specified as: + - A boolean value: True or False + + Returns + ------- + bool + """ + return self["symmetric"] + + @symmetric.setter + def symmetric(self, val): + self["symmetric"] = val + + @property + def thickness(self): + """ + Sets the thickness (in px) of the error bars. + + The 'thickness' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["thickness"] + + @thickness.setter + def thickness(self, val): + self["thickness"] = val + + @property + def traceref(self): + """ + The 'traceref' property is a integer and may be specified as: + - An int (or float that will be cast to an int) + in the interval [0, 9223372036854775807] + + Returns + ------- + int + """ + return self["traceref"] + + @traceref.setter + def traceref(self, val): + self["traceref"] = val + + @property + def tracerefminus(self): + """ + The 'tracerefminus' property is a integer and may be specified as: + - An int (or float that will be cast to an int) + in the interval [0, 9223372036854775807] + + Returns + ------- + int + """ + return self["tracerefminus"] + + @tracerefminus.setter + def tracerefminus(self, val): + self["tracerefminus"] = val + + @property + def type(self): + """ + Determines the rule used to generate the error bars. If + "constant", the bar lengths are of a constant value. Set this + constant in `value`. If "percent", the bar lengths correspond + to a percentage of underlying data. Set this percentage in + `value`. If "sqrt", the bar lengths correspond to the square of + the underlying data. If "data", the bar lengths are set with + data set `array`. + + The 'type' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['percent', 'constant', 'sqrt', 'data'] + + Returns + ------- + Any + """ + return self["type"] + + @type.setter + def type(self, val): + self["type"] = val + + @property + def value(self): + """ + Sets the value of either the percentage (if `type` is set to + "percent") or the constant (if `type` is set to "constant") + corresponding to the lengths of the error bars. + + The 'value' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["value"] + + @value.setter + def value(self, val): + self["value"] = val + + @property + def valueminus(self): + """ + Sets the value of either the percentage (if `type` is set to + "percent") or the constant (if `type` is set to "constant") + corresponding to the lengths of the error bars in the bottom + (left) direction for vertical (horizontal) bars + + The 'valueminus' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["valueminus"] + + @valueminus.setter + def valueminus(self, val): + self["valueminus"] = val + + @property + def visible(self): + """ + Determines whether or not this set of error bars is visible. + + The 'visible' property is a boolean and must be specified as: + - A boolean value: True or False + + Returns + ------- + bool + """ + return self["visible"] + + @visible.setter + def visible(self, val): + self["visible"] = val + + @property + def width(self): + """ + Sets the width (in px) of the cross-bar at both ends of the + error bars. + + The 'width' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["width"] + + @width.setter + def width(self, val): + self["width"] = val + + @property + def _prop_descriptions(self): + return """\ + array + Sets the data corresponding the length of each error + bar. Values are plotted relative to the underlying + data. + arrayminus + Sets the data corresponding the length of each error + bar in the bottom (left) direction for vertical + (horizontal) bars Values are plotted relative to the + underlying data. + arrayminussrc + Sets the source reference on Chart Studio Cloud for + `arrayminus`. + arraysrc + Sets the source reference on Chart Studio Cloud for + `array`. + color + Sets the stroke color of the error bars. + symmetric + Determines whether or not the error bars have the same + length in both direction (top/bottom for vertical bars, + left/right for horizontal bars. + thickness + Sets the thickness (in px) of the error bars. + traceref + + tracerefminus + + type + Determines the rule used to generate the error bars. If + "constant", the bar lengths are of a constant value. + Set this constant in `value`. If "percent", the bar + lengths correspond to a percentage of underlying data. + Set this percentage in `value`. If "sqrt", the bar + lengths correspond to the square of the underlying + data. If "data", the bar lengths are set with data set + `array`. + value + Sets the value of either the percentage (if `type` is + set to "percent") or the constant (if `type` is set to + "constant") corresponding to the lengths of the error + bars. + valueminus + Sets the value of either the percentage (if `type` is + set to "percent") or the constant (if `type` is set to + "constant") corresponding to the lengths of the error + bars in the bottom (left) direction for vertical + (horizontal) bars + visible + Determines whether or not this set of error bars is + visible. + width + Sets the width (in px) of the cross-bar at both ends of + the error bars. + """ + + def __init__( + self, + arg=None, + array=None, + arrayminus=None, + arrayminussrc=None, + arraysrc=None, + color=None, + symmetric=None, + thickness=None, + traceref=None, + tracerefminus=None, + type=None, + value=None, + valueminus=None, + visible=None, + width=None, + **kwargs, + ): + """ + Construct a new ErrorY object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of :class:`plotly.graph_objs.bar.ErrorY` + array + Sets the data corresponding the length of each error + bar. Values are plotted relative to the underlying + data. + arrayminus + Sets the data corresponding the length of each error + bar in the bottom (left) direction for vertical + (horizontal) bars Values are plotted relative to the + underlying data. + arrayminussrc + Sets the source reference on Chart Studio Cloud for + `arrayminus`. + arraysrc + Sets the source reference on Chart Studio Cloud for + `array`. + color + Sets the stroke color of the error bars. + symmetric + Determines whether or not the error bars have the same + length in both direction (top/bottom for vertical bars, + left/right for horizontal bars. + thickness + Sets the thickness (in px) of the error bars. + traceref + + tracerefminus + + type + Determines the rule used to generate the error bars. If + "constant", the bar lengths are of a constant value. + Set this constant in `value`. If "percent", the bar + lengths correspond to a percentage of underlying data. + Set this percentage in `value`. If "sqrt", the bar + lengths correspond to the square of the underlying + data. If "data", the bar lengths are set with data set + `array`. + value + Sets the value of either the percentage (if `type` is + set to "percent") or the constant (if `type` is set to + "constant") corresponding to the lengths of the error + bars. + valueminus + Sets the value of either the percentage (if `type` is + set to "percent") or the constant (if `type` is set to + "constant") corresponding to the lengths of the error + bars in the bottom (left) direction for vertical + (horizontal) bars + visible + Determines whether or not this set of error bars is + visible. + width + Sets the width (in px) of the cross-bar at both ends of + the error bars. + + Returns + ------- + ErrorY + """ + super().__init__("error_y") + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + if arg is None: + arg = {} + elif isinstance(arg, self.__class__): + arg = arg.to_plotly_json() + elif isinstance(arg, dict): + arg = _copy.copy(arg) + else: + raise ValueError("""\ +The first argument to the plotly.graph_objs.bar.ErrorY +constructor must be a dict or +an instance of :class:`plotly.graph_objs.bar.ErrorY`""") + + self._skip_invalid = kwargs.pop("skip_invalid", False) + self._validate = kwargs.pop("_validate", True) + + self._set_property("array", arg, array) + self._set_property("arrayminus", arg, arrayminus) + self._set_property("arrayminussrc", arg, arrayminussrc) + self._set_property("arraysrc", arg, arraysrc) + self._set_property("color", arg, color) + self._set_property("symmetric", arg, symmetric) + self._set_property("thickness", arg, thickness) + self._set_property("traceref", arg, traceref) + self._set_property("tracerefminus", arg, tracerefminus) + self._set_property("type", arg, type) + self._set_property("value", arg, value) + self._set_property("valueminus", arg, valueminus) + self._set_property("visible", arg, visible) + self._set_property("width", arg, width) + self._process_kwargs(**dict(arg, **kwargs)) + self._skip_invalid = False diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/bar/_hoverlabel.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/bar/_hoverlabel.py new file mode 100644 index 0000000000000000000000000000000000000000..652f3069e91015677e3e36f8c2ae03916deffe77 --- /dev/null +++ b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/bar/_hoverlabel.py @@ -0,0 +1,366 @@ +# --- THIS FILE IS AUTO-GENERATED --- +# Modifications will be overwitten the next time code generation run. + +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Hoverlabel(_BaseTraceHierarchyType): + _parent_path_str = "bar" + _path_str = "bar.hoverlabel" + _valid_props = { + "align", + "alignsrc", + "bgcolor", + "bgcolorsrc", + "bordercolor", + "bordercolorsrc", + "font", + "namelength", + "namelengthsrc", + "showarrow", + } + + @property + def align(self): + """ + Sets the horizontal alignment of the text content within hover + label box. Has an effect only if the hover label text spans + more two or more lines + + The 'align' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['left', 'right', 'auto'] + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + Any|numpy.ndarray + """ + return self["align"] + + @align.setter + def align(self, val): + self["align"] = val + + @property + def alignsrc(self): + """ + Sets the source reference on Chart Studio Cloud for `align`. + + The 'alignsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["alignsrc"] + + @alignsrc.setter + def alignsrc(self, val): + self["alignsrc"] = val + + @property + def bgcolor(self): + """ + Sets the background color of the hover labels for this trace + + The 'bgcolor' property is a color and may be specified as: + - A hex string (e.g. '#ff0000') + - An rgb/rgba string (e.g. 'rgb(255,0,0)') + - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') + - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') + - A named CSS color: see https://plotly.com/python/css-colors/ for a list + - A list or array of any of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["bgcolor"] + + @bgcolor.setter + def bgcolor(self, val): + self["bgcolor"] = val + + @property + def bgcolorsrc(self): + """ + Sets the source reference on Chart Studio Cloud for `bgcolor`. + + The 'bgcolorsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["bgcolorsrc"] + + @bgcolorsrc.setter + def bgcolorsrc(self, val): + self["bgcolorsrc"] = val + + @property + def bordercolor(self): + """ + Sets the border color of the hover labels for this trace. + + The 'bordercolor' property is a color and may be specified as: + - A hex string (e.g. '#ff0000') + - An rgb/rgba string (e.g. 'rgb(255,0,0)') + - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') + - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') + - A named CSS color: see https://plotly.com/python/css-colors/ for a list + - A list or array of any of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["bordercolor"] + + @bordercolor.setter + def bordercolor(self, val): + self["bordercolor"] = val + + @property + def bordercolorsrc(self): + """ + Sets the source reference on Chart Studio Cloud for + `bordercolor`. + + The 'bordercolorsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["bordercolorsrc"] + + @bordercolorsrc.setter + def bordercolorsrc(self, val): + self["bordercolorsrc"] = val + + @property + def font(self): + """ + Sets the font used in hover labels. + + The 'font' property is an instance of Font + that may be specified as: + - An instance of :class:`plotly.graph_objs.bar.hoverlabel.Font` + - A dict of string/value properties that will be passed + to the Font constructor + + Returns + ------- + plotly.graph_objs.bar.hoverlabel.Font + """ + return self["font"] + + @font.setter + def font(self, val): + self["font"] = val + + @property + def namelength(self): + """ + Sets the default length (in number of characters) of the trace + name in the hover labels for all traces. -1 shows the whole + name regardless of length. 0-3 shows the first 0-3 characters, + and an integer >3 will show the whole name if it is less than + that many characters, but if it is longer, will truncate to + `namelength - 3` characters and add an ellipsis. + + The 'namelength' property is a integer and may be specified as: + - An int (or float that will be cast to an int) + in the interval [-1, 9223372036854775807] + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + int|numpy.ndarray + """ + return self["namelength"] + + @namelength.setter + def namelength(self, val): + self["namelength"] = val + + @property + def namelengthsrc(self): + """ + Sets the source reference on Chart Studio Cloud for + `namelength`. + + The 'namelengthsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["namelengthsrc"] + + @namelengthsrc.setter + def namelengthsrc(self, val): + self["namelengthsrc"] = val + + @property + def showarrow(self): + """ + Sets whether or not to show the hover label arrow/triangle + pointing to the data point. + + The 'showarrow' property is a boolean and must be specified as: + - A boolean value: True or False + + Returns + ------- + bool + """ + return self["showarrow"] + + @showarrow.setter + def showarrow(self, val): + self["showarrow"] = val + + @property + def _prop_descriptions(self): + return """\ + align + Sets the horizontal alignment of the text content + within hover label box. Has an effect only if the hover + label text spans more two or more lines + alignsrc + Sets the source reference on Chart Studio Cloud for + `align`. + bgcolor + Sets the background color of the hover labels for this + trace + bgcolorsrc + Sets the source reference on Chart Studio Cloud for + `bgcolor`. + bordercolor + Sets the border color of the hover labels for this + trace. + bordercolorsrc + Sets the source reference on Chart Studio Cloud for + `bordercolor`. + font + Sets the font used in hover labels. + namelength + Sets the default length (in number of characters) of + the trace name in the hover labels for all traces. -1 + shows the whole name regardless of length. 0-3 shows + the first 0-3 characters, and an integer >3 will show + the whole name if it is less than that many characters, + but if it is longer, will truncate to `namelength - 3` + characters and add an ellipsis. + namelengthsrc + Sets the source reference on Chart Studio Cloud for + `namelength`. + showarrow + Sets whether or not to show the hover label + arrow/triangle pointing to the data point. + """ + + def __init__( + self, + arg=None, + align=None, + alignsrc=None, + bgcolor=None, + bgcolorsrc=None, + bordercolor=None, + bordercolorsrc=None, + font=None, + namelength=None, + namelengthsrc=None, + showarrow=None, + **kwargs, + ): + """ + Construct a new Hoverlabel object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.bar.Hoverlabel` + align + Sets the horizontal alignment of the text content + within hover label box. Has an effect only if the hover + label text spans more two or more lines + alignsrc + Sets the source reference on Chart Studio Cloud for + `align`. + bgcolor + Sets the background color of the hover labels for this + trace + bgcolorsrc + Sets the source reference on Chart Studio Cloud for + `bgcolor`. + bordercolor + Sets the border color of the hover labels for this + trace. + bordercolorsrc + Sets the source reference on Chart Studio Cloud for + `bordercolor`. + font + Sets the font used in hover labels. + namelength + Sets the default length (in number of characters) of + the trace name in the hover labels for all traces. -1 + shows the whole name regardless of length. 0-3 shows + the first 0-3 characters, and an integer >3 will show + the whole name if it is less than that many characters, + but if it is longer, will truncate to `namelength - 3` + characters and add an ellipsis. + namelengthsrc + Sets the source reference on Chart Studio Cloud for + `namelength`. + showarrow + Sets whether or not to show the hover label + arrow/triangle pointing to the data point. + + Returns + ------- + Hoverlabel + """ + super().__init__("hoverlabel") + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + if arg is None: + arg = {} + elif isinstance(arg, self.__class__): + arg = arg.to_plotly_json() + elif isinstance(arg, dict): + arg = _copy.copy(arg) + else: + raise ValueError("""\ +The first argument to the plotly.graph_objs.bar.Hoverlabel +constructor must be a dict or +an instance of :class:`plotly.graph_objs.bar.Hoverlabel`""") + + self._skip_invalid = kwargs.pop("skip_invalid", False) + self._validate = kwargs.pop("_validate", True) + + self._set_property("align", arg, align) + self._set_property("alignsrc", arg, alignsrc) + self._set_property("bgcolor", arg, bgcolor) + self._set_property("bgcolorsrc", arg, bgcolorsrc) + self._set_property("bordercolor", arg, bordercolor) + self._set_property("bordercolorsrc", arg, bordercolorsrc) + self._set_property("font", arg, font) + self._set_property("namelength", arg, namelength) + self._set_property("namelengthsrc", arg, namelengthsrc) + self._set_property("showarrow", arg, showarrow) + self._process_kwargs(**dict(arg, **kwargs)) + self._skip_invalid = False diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/bar/_insidetextfont.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/bar/_insidetextfont.py new file mode 100644 index 0000000000000000000000000000000000000000..f1c48dad8aba73fc23b6cbe4bb05e47418db5b96 --- /dev/null +++ b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/bar/_insidetextfont.py @@ -0,0 +1,587 @@ +# --- THIS FILE IS AUTO-GENERATED --- +# Modifications will be overwitten the next time code generation run. + +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Insidetextfont(_BaseTraceHierarchyType): + _parent_path_str = "bar" + _path_str = "bar.insidetextfont" + _valid_props = { + "color", + "colorsrc", + "family", + "familysrc", + "lineposition", + "linepositionsrc", + "shadow", + "shadowsrc", + "size", + "sizesrc", + "style", + "stylesrc", + "textcase", + "textcasesrc", + "variant", + "variantsrc", + "weight", + "weightsrc", + } + + @property + def color(self): + """ + The 'color' property is a color and may be specified as: + - A hex string (e.g. '#ff0000') + - An rgb/rgba string (e.g. 'rgb(255,0,0)') + - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') + - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') + - A named CSS color: see https://plotly.com/python/css-colors/ for a list + - A list or array of any of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["color"] + + @color.setter + def color(self, val): + self["color"] = val + + @property + def colorsrc(self): + """ + Sets the source reference on Chart Studio Cloud for `color`. + + The 'colorsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["colorsrc"] + + @colorsrc.setter + def colorsrc(self, val): + self["colorsrc"] = val + + @property + def family(self): + """ + HTML font family - the typeface that will be applied by the web + browser. The web browser can only apply a font if it is + available on the system where it runs. Provide multiple font + families, separated by commas, to indicate the order in which + to apply fonts if they aren't available. + + The 'family' property is a string and must be specified as: + - A non-empty string + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["family"] + + @family.setter + def family(self, val): + self["family"] = val + + @property + def familysrc(self): + """ + Sets the source reference on Chart Studio Cloud for `family`. + + The 'familysrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["familysrc"] + + @familysrc.setter + def familysrc(self, val): + self["familysrc"] = val + + @property + def lineposition(self): + """ + Sets the kind of decoration line(s) with text, such as an + "under", "over" or "through" as well as combinations e.g. + "under+over", etc. + + The 'lineposition' property is a flaglist and may be specified + as a string containing: + - Any combination of ['under', 'over', 'through'] joined with '+' characters + (e.g. 'under+over') + OR exactly one of ['none'] (e.g. 'none') + - A list or array of the above + + Returns + ------- + Any|numpy.ndarray + """ + return self["lineposition"] + + @lineposition.setter + def lineposition(self, val): + self["lineposition"] = val + + @property + def linepositionsrc(self): + """ + Sets the source reference on Chart Studio Cloud for + `lineposition`. + + The 'linepositionsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["linepositionsrc"] + + @linepositionsrc.setter + def linepositionsrc(self, val): + self["linepositionsrc"] = val + + @property + def shadow(self): + """ + Sets the shape and color of the shadow behind text. "auto" + places minimal shadow and applies contrast text font color. See + https://developer.mozilla.org/en-US/docs/Web/CSS/text-shadow + for additional options. + + The 'shadow' property is a string and must be specified as: + - A string + - A number that will be converted to a string + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["shadow"] + + @shadow.setter + def shadow(self, val): + self["shadow"] = val + + @property + def shadowsrc(self): + """ + Sets the source reference on Chart Studio Cloud for `shadow`. + + The 'shadowsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["shadowsrc"] + + @shadowsrc.setter + def shadowsrc(self, val): + self["shadowsrc"] = val + + @property + def size(self): + """ + The 'size' property is a number and may be specified as: + - An int or float in the interval [1, inf] + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + int|float|numpy.ndarray + """ + return self["size"] + + @size.setter + def size(self, val): + self["size"] = val + + @property + def sizesrc(self): + """ + Sets the source reference on Chart Studio Cloud for `size`. + + The 'sizesrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["sizesrc"] + + @sizesrc.setter + def sizesrc(self, val): + self["sizesrc"] = val + + @property + def style(self): + """ + Sets whether a font should be styled with a normal or italic + face from its family. + + The 'style' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['normal', 'italic'] + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + Any|numpy.ndarray + """ + return self["style"] + + @style.setter + def style(self, val): + self["style"] = val + + @property + def stylesrc(self): + """ + Sets the source reference on Chart Studio Cloud for `style`. + + The 'stylesrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["stylesrc"] + + @stylesrc.setter + def stylesrc(self, val): + self["stylesrc"] = val + + @property + def textcase(self): + """ + Sets capitalization of text. It can be used to make text appear + in all-uppercase or all-lowercase, or with each word + capitalized. + + The 'textcase' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['normal', 'word caps', 'upper', 'lower'] + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + Any|numpy.ndarray + """ + return self["textcase"] + + @textcase.setter + def textcase(self, val): + self["textcase"] = val + + @property + def textcasesrc(self): + """ + Sets the source reference on Chart Studio Cloud for `textcase`. + + The 'textcasesrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["textcasesrc"] + + @textcasesrc.setter + def textcasesrc(self, val): + self["textcasesrc"] = val + + @property + def variant(self): + """ + Sets the variant of the font. + + The 'variant' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['normal', 'small-caps', 'all-small-caps', + 'all-petite-caps', 'petite-caps', 'unicase'] + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + Any|numpy.ndarray + """ + return self["variant"] + + @variant.setter + def variant(self, val): + self["variant"] = val + + @property + def variantsrc(self): + """ + Sets the source reference on Chart Studio Cloud for `variant`. + + The 'variantsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["variantsrc"] + + @variantsrc.setter + def variantsrc(self, val): + self["variantsrc"] = val + + @property + def weight(self): + """ + Sets the weight (or boldness) of the font. + + The 'weight' property is a integer and may be specified as: + - An int (or float that will be cast to an int) + in the interval [1, 1000] + OR exactly one of ['normal', 'bold'] (e.g. 'bold') + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + int|numpy.ndarray + """ + return self["weight"] + + @weight.setter + def weight(self, val): + self["weight"] = val + + @property + def weightsrc(self): + """ + Sets the source reference on Chart Studio Cloud for `weight`. + + The 'weightsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["weightsrc"] + + @weightsrc.setter + def weightsrc(self, val): + self["weightsrc"] = val + + @property + def _prop_descriptions(self): + return """\ + color + + colorsrc + Sets the source reference on Chart Studio Cloud for + `color`. + family + HTML font family - the typeface that will be applied by + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. + familysrc + Sets the source reference on Chart Studio Cloud for + `family`. + lineposition + Sets the kind of decoration line(s) with text, such as + an "under", "over" or "through" as well as combinations + e.g. "under+over", etc. + linepositionsrc + Sets the source reference on Chart Studio Cloud for + `lineposition`. + shadow + Sets the shape and color of the shadow behind text. + "auto" places minimal shadow and applies contrast text + font color. See https://developer.mozilla.org/en- + US/docs/Web/CSS/text-shadow for additional options. + shadowsrc + Sets the source reference on Chart Studio Cloud for + `shadow`. + size + + sizesrc + Sets the source reference on Chart Studio Cloud for + `size`. + style + Sets whether a font should be styled with a normal or + italic face from its family. + stylesrc + Sets the source reference on Chart Studio Cloud for + `style`. + textcase + Sets capitalization of text. It can be used to make + text appear in all-uppercase or all-lowercase, or with + each word capitalized. + textcasesrc + Sets the source reference on Chart Studio Cloud for + `textcase`. + variant + Sets the variant of the font. + variantsrc + Sets the source reference on Chart Studio Cloud for + `variant`. + weight + Sets the weight (or boldness) of the font. + weightsrc + Sets the source reference on Chart Studio Cloud for + `weight`. + """ + + def __init__( + self, + arg=None, + color=None, + colorsrc=None, + family=None, + familysrc=None, + lineposition=None, + linepositionsrc=None, + shadow=None, + shadowsrc=None, + size=None, + sizesrc=None, + style=None, + stylesrc=None, + textcase=None, + textcasesrc=None, + variant=None, + variantsrc=None, + weight=None, + weightsrc=None, + **kwargs, + ): + """ + Construct a new Insidetextfont object + + Sets the font used for `text` lying inside the bar. + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.bar.Insidetextfont` + color + + colorsrc + Sets the source reference on Chart Studio Cloud for + `color`. + family + HTML font family - the typeface that will be applied by + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. + familysrc + Sets the source reference on Chart Studio Cloud for + `family`. + lineposition + Sets the kind of decoration line(s) with text, such as + an "under", "over" or "through" as well as combinations + e.g. "under+over", etc. + linepositionsrc + Sets the source reference on Chart Studio Cloud for + `lineposition`. + shadow + Sets the shape and color of the shadow behind text. + "auto" places minimal shadow and applies contrast text + font color. See https://developer.mozilla.org/en- + US/docs/Web/CSS/text-shadow for additional options. + shadowsrc + Sets the source reference on Chart Studio Cloud for + `shadow`. + size + + sizesrc + Sets the source reference on Chart Studio Cloud for + `size`. + style + Sets whether a font should be styled with a normal or + italic face from its family. + stylesrc + Sets the source reference on Chart Studio Cloud for + `style`. + textcase + Sets capitalization of text. It can be used to make + text appear in all-uppercase or all-lowercase, or with + each word capitalized. + textcasesrc + Sets the source reference on Chart Studio Cloud for + `textcase`. + variant + Sets the variant of the font. + variantsrc + Sets the source reference on Chart Studio Cloud for + `variant`. + weight + Sets the weight (or boldness) of the font. + weightsrc + Sets the source reference on Chart Studio Cloud for + `weight`. + + Returns + ------- + Insidetextfont + """ + super().__init__("insidetextfont") + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + if arg is None: + arg = {} + elif isinstance(arg, self.__class__): + arg = arg.to_plotly_json() + elif isinstance(arg, dict): + arg = _copy.copy(arg) + else: + raise ValueError("""\ +The first argument to the plotly.graph_objs.bar.Insidetextfont +constructor must be a dict or +an instance of :class:`plotly.graph_objs.bar.Insidetextfont`""") + + self._skip_invalid = kwargs.pop("skip_invalid", False) + self._validate = kwargs.pop("_validate", True) + + self._set_property("color", arg, color) + self._set_property("colorsrc", arg, colorsrc) + self._set_property("family", arg, family) + self._set_property("familysrc", arg, familysrc) + self._set_property("lineposition", arg, lineposition) + self._set_property("linepositionsrc", arg, linepositionsrc) + self._set_property("shadow", arg, shadow) + self._set_property("shadowsrc", arg, shadowsrc) + self._set_property("size", arg, size) + self._set_property("sizesrc", arg, sizesrc) + self._set_property("style", arg, style) + self._set_property("stylesrc", arg, stylesrc) + self._set_property("textcase", arg, textcase) + self._set_property("textcasesrc", arg, textcasesrc) + self._set_property("variant", arg, variant) + self._set_property("variantsrc", arg, variantsrc) + self._set_property("weight", arg, weight) + self._set_property("weightsrc", arg, weightsrc) + self._process_kwargs(**dict(arg, **kwargs)) + self._skip_invalid = False diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/bar/_legendgrouptitle.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/bar/_legendgrouptitle.py new file mode 100644 index 0000000000000000000000000000000000000000..3a74894f2565b70c38f9bf4abf4e0424d4bd44cd --- /dev/null +++ b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/bar/_legendgrouptitle.py @@ -0,0 +1,104 @@ +# --- THIS FILE IS AUTO-GENERATED --- +# Modifications will be overwitten the next time code generation run. + +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Legendgrouptitle(_BaseTraceHierarchyType): + _parent_path_str = "bar" + _path_str = "bar.legendgrouptitle" + _valid_props = {"font", "text"} + + @property + def font(self): + """ + Sets this legend group's title font. + + The 'font' property is an instance of Font + that may be specified as: + - An instance of :class:`plotly.graph_objs.bar.legendgrouptitle.Font` + - A dict of string/value properties that will be passed + to the Font constructor + + Returns + ------- + plotly.graph_objs.bar.legendgrouptitle.Font + """ + return self["font"] + + @font.setter + def font(self, val): + self["font"] = val + + @property + def text(self): + """ + Sets the title of the legend group. + + The 'text' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["text"] + + @text.setter + def text(self, val): + self["text"] = val + + @property + def _prop_descriptions(self): + return """\ + font + Sets this legend group's title font. + text + Sets the title of the legend group. + """ + + def __init__(self, arg=None, font=None, text=None, **kwargs): + """ + Construct a new Legendgrouptitle object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.bar.Legendgrouptitle` + font + Sets this legend group's title font. + text + Sets the title of the legend group. + + Returns + ------- + Legendgrouptitle + """ + super().__init__("legendgrouptitle") + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + if arg is None: + arg = {} + elif isinstance(arg, self.__class__): + arg = arg.to_plotly_json() + elif isinstance(arg, dict): + arg = _copy.copy(arg) + else: + raise ValueError("""\ +The first argument to the plotly.graph_objs.bar.Legendgrouptitle +constructor must be a dict or +an instance of :class:`plotly.graph_objs.bar.Legendgrouptitle`""") + + self._skip_invalid = kwargs.pop("skip_invalid", False) + self._validate = kwargs.pop("_validate", True) + + self._set_property("font", arg, font) + self._set_property("text", arg, text) + self._process_kwargs(**dict(arg, **kwargs)) + self._skip_invalid = False diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/bar/_marker.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/bar/_marker.py new file mode 100644 index 0000000000000000000000000000000000000000..a1fc12688dbc00f312a5adfe2775b7d0e4faf84b --- /dev/null +++ b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/bar/_marker.py @@ -0,0 +1,685 @@ +# --- THIS FILE IS AUTO-GENERATED --- +# Modifications will be overwitten the next time code generation run. + +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Marker(_BaseTraceHierarchyType): + _parent_path_str = "bar" + _path_str = "bar.marker" + _valid_props = { + "autocolorscale", + "cauto", + "cmax", + "cmid", + "cmin", + "color", + "coloraxis", + "colorbar", + "colorscale", + "colorsrc", + "cornerradius", + "line", + "opacity", + "opacitysrc", + "pattern", + "reversescale", + "showscale", + } + + @property + def autocolorscale(self): + """ + Determines whether the colorscale is a default palette + (`autocolorscale: true`) or the palette determined by + `marker.colorscale`. Has an effect only if in `marker.color` is + set to a numerical array. In case `colorscale` is unspecified + or `autocolorscale` is true, the default palette will be chosen + according to whether numbers in the `color` array are all + positive, all negative or mixed. + + The 'autocolorscale' property is a boolean and must be specified as: + - A boolean value: True or False + + Returns + ------- + bool + """ + return self["autocolorscale"] + + @autocolorscale.setter + def autocolorscale(self, val): + self["autocolorscale"] = val + + @property + def cauto(self): + """ + Determines whether or not the color domain is computed with + respect to the input data (here in `marker.color`) or the + bounds set in `marker.cmin` and `marker.cmax` Has an effect + only if in `marker.color` is set to a numerical array. Defaults + to `false` when `marker.cmin` and `marker.cmax` are set by the + user. + + The 'cauto' property is a boolean and must be specified as: + - A boolean value: True or False + + Returns + ------- + bool + """ + return self["cauto"] + + @cauto.setter + def cauto(self, val): + self["cauto"] = val + + @property + def cmax(self): + """ + Sets the upper bound of the color domain. Has an effect only if + in `marker.color` is set to a numerical array. Value should + have the same units as in `marker.color` and if set, + `marker.cmin` must be set as well. + + The 'cmax' property is a number and may be specified as: + - An int or float + + Returns + ------- + int|float + """ + return self["cmax"] + + @cmax.setter + def cmax(self, val): + self["cmax"] = val + + @property + def cmid(self): + """ + Sets the mid-point of the color domain by scaling `marker.cmin` + and/or `marker.cmax` to be equidistant to this point. Has an + effect only if in `marker.color` is set to a numerical array. + Value should have the same units as in `marker.color`. Has no + effect when `marker.cauto` is `false`. + + The 'cmid' property is a number and may be specified as: + - An int or float + + Returns + ------- + int|float + """ + return self["cmid"] + + @cmid.setter + def cmid(self, val): + self["cmid"] = val + + @property + def cmin(self): + """ + Sets the lower bound of the color domain. Has an effect only if + in `marker.color` is set to a numerical array. Value should + have the same units as in `marker.color` and if set, + `marker.cmax` must be set as well. + + The 'cmin' property is a number and may be specified as: + - An int or float + + Returns + ------- + int|float + """ + return self["cmin"] + + @cmin.setter + def cmin(self, val): + self["cmin"] = val + + @property + def color(self): + """ + Sets the marker color. It accepts either a specific color or an + array of numbers that are mapped to the colorscale relative to + the max and min values of the array or relative to + `marker.cmin` and `marker.cmax` if set. + + The 'color' property is a color and may be specified as: + - A hex string (e.g. '#ff0000') + - An rgb/rgba string (e.g. 'rgb(255,0,0)') + - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') + - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') + - A named CSS color: see https://plotly.com/python/css-colors/ for a list + - A number that will be interpreted as a color + according to bar.marker.colorscale + - A list or array of any of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["color"] + + @color.setter + def color(self, val): + self["color"] = val + + @property + def coloraxis(self): + """ + Sets a reference to a shared color axis. References to these + shared color axes are "coloraxis", "coloraxis2", "coloraxis3", + etc. Settings for these shared color axes are set in the + layout, under `layout.coloraxis`, `layout.coloraxis2`, etc. + Note that multiple color scales can be linked to the same color + axis. + + The 'coloraxis' property is an identifier of a particular + subplot, of type 'coloraxis', that may be specified as: + - the string 'coloraxis' optionally followed by an integer >= 1 + (e.g. 'coloraxis', 'coloraxis1', 'coloraxis2', 'coloraxis3', etc.) + + Returns + ------- + str + """ + return self["coloraxis"] + + @coloraxis.setter + def coloraxis(self, val): + self["coloraxis"] = val + + @property + def colorbar(self): + """ + The 'colorbar' property is an instance of ColorBar + that may be specified as: + - An instance of :class:`plotly.graph_objs.bar.marker.ColorBar` + - A dict of string/value properties that will be passed + to the ColorBar constructor + + Returns + ------- + plotly.graph_objs.bar.marker.ColorBar + """ + return self["colorbar"] + + @colorbar.setter + def colorbar(self, val): + self["colorbar"] = val + + @property + def colorscale(self): + """ + Sets the colorscale. Has an effect only if in `marker.color` is + set to a numerical array. The colorscale must be an array + containing arrays mapping a normalized value to an rgb, rgba, + hex, hsl, hsv, or named color string. At minimum, a mapping for + the lowest (0) and highest (1) values are required. For + example, `[[0, 'rgb(0,0,255)'], [1, 'rgb(255,0,0)']]`. To + control the bounds of the colorscale in color space, use + `marker.cmin` and `marker.cmax`. Alternatively, `colorscale` + may be a palette name string of the following list: Blackbody,B + luered,Blues,Cividis,Earth,Electric,Greens,Greys,Hot,Jet,Picnic + ,Portland,Rainbow,RdBu,Reds,Viridis,YlGnBu,YlOrRd. + + The 'colorscale' property is a colorscale and may be + specified as: + - A list of colors that will be spaced evenly to create the colorscale. + Many predefined colorscale lists are included in the sequential, diverging, + and cyclical modules in the plotly.colors package. + - A list of 2-element lists where the first element is the + normalized color level value (starting at 0 and ending at 1), + and the second item is a valid color string. + (e.g. [[0, 'green'], [0.5, 'red'], [1.0, 'rgb(0, 0, 255)']]) + - One of the following named colorscales: + ['aggrnyl', 'agsunset', 'algae', 'amp', 'armyrose', 'balance', + 'blackbody', 'bluered', 'blues', 'blugrn', 'bluyl', 'brbg', + 'brwnyl', 'bugn', 'bupu', 'burg', 'burgyl', 'cividis', 'curl', + 'darkmint', 'deep', 'delta', 'dense', 'earth', 'edge', 'electric', + 'emrld', 'fall', 'geyser', 'gnbu', 'gray', 'greens', 'greys', + 'haline', 'hot', 'hsv', 'ice', 'icefire', 'inferno', 'jet', + 'magenta', 'magma', 'matter', 'mint', 'mrybm', 'mygbm', 'oranges', + 'orrd', 'oryel', 'oxy', 'peach', 'phase', 'picnic', 'pinkyl', + 'piyg', 'plasma', 'plotly3', 'portland', 'prgn', 'pubu', 'pubugn', + 'puor', 'purd', 'purp', 'purples', 'purpor', 'rainbow', 'rdbu', + 'rdgy', 'rdpu', 'rdylbu', 'rdylgn', 'redor', 'reds', 'solar', + 'spectral', 'speed', 'sunset', 'sunsetdark', 'teal', 'tealgrn', + 'tealrose', 'tempo', 'temps', 'thermal', 'tropic', 'turbid', + 'turbo', 'twilight', 'viridis', 'ylgn', 'ylgnbu', 'ylorbr', + 'ylorrd']. + Appending '_r' to a named colorscale reverses it. + + Returns + ------- + str + """ + return self["colorscale"] + + @colorscale.setter + def colorscale(self, val): + self["colorscale"] = val + + @property + def colorsrc(self): + """ + Sets the source reference on Chart Studio Cloud for `color`. + + The 'colorsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["colorsrc"] + + @colorsrc.setter + def colorsrc(self, val): + self["colorsrc"] = val + + @property + def cornerradius(self): + """ + Sets the rounding of corners. May be an integer number of + pixels, or a percentage of bar width (as a string ending in %). + Defaults to `layout.barcornerradius`. In stack or relative + barmode, the first trace to set cornerradius is used for the + whole stack. + + The 'cornerradius' property accepts values of any type + + Returns + ------- + Any + """ + return self["cornerradius"] + + @cornerradius.setter + def cornerradius(self, val): + self["cornerradius"] = val + + @property + def line(self): + """ + The 'line' property is an instance of Line + that may be specified as: + - An instance of :class:`plotly.graph_objs.bar.marker.Line` + - A dict of string/value properties that will be passed + to the Line constructor + + Returns + ------- + plotly.graph_objs.bar.marker.Line + """ + return self["line"] + + @line.setter + def line(self, val): + self["line"] = val + + @property + def opacity(self): + """ + Sets the opacity of the bars. + + The 'opacity' property is a number and may be specified as: + - An int or float in the interval [0, 1] + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + int|float|numpy.ndarray + """ + return self["opacity"] + + @opacity.setter + def opacity(self, val): + self["opacity"] = val + + @property + def opacitysrc(self): + """ + Sets the source reference on Chart Studio Cloud for `opacity`. + + The 'opacitysrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["opacitysrc"] + + @opacitysrc.setter + def opacitysrc(self, val): + self["opacitysrc"] = val + + @property + def pattern(self): + """ + Sets the pattern within the marker. + + The 'pattern' property is an instance of Pattern + that may be specified as: + - An instance of :class:`plotly.graph_objs.bar.marker.Pattern` + - A dict of string/value properties that will be passed + to the Pattern constructor + + Returns + ------- + plotly.graph_objs.bar.marker.Pattern + """ + return self["pattern"] + + @pattern.setter + def pattern(self, val): + self["pattern"] = val + + @property + def reversescale(self): + """ + Reverses the color mapping if true. Has an effect only if in + `marker.color` is set to a numerical array. If true, + `marker.cmin` will correspond to the last color in the array + and `marker.cmax` will correspond to the first color. + + The 'reversescale' property is a boolean and must be specified as: + - A boolean value: True or False + + Returns + ------- + bool + """ + return self["reversescale"] + + @reversescale.setter + def reversescale(self, val): + self["reversescale"] = val + + @property + def showscale(self): + """ + Determines whether or not a colorbar is displayed for this + trace. Has an effect only if in `marker.color` is set to a + numerical array. + + The 'showscale' property is a boolean and must be specified as: + - A boolean value: True or False + + Returns + ------- + bool + """ + return self["showscale"] + + @showscale.setter + def showscale(self, val): + self["showscale"] = val + + @property + def _prop_descriptions(self): + return """\ + autocolorscale + Determines whether the colorscale is a default palette + (`autocolorscale: true`) or the palette determined by + `marker.colorscale`. Has an effect only if in + `marker.color` is set to a numerical array. In case + `colorscale` is unspecified or `autocolorscale` is + true, the default palette will be chosen according to + whether numbers in the `color` array are all positive, + all negative or mixed. + cauto + Determines whether or not the color domain is computed + with respect to the input data (here in `marker.color`) + or the bounds set in `marker.cmin` and `marker.cmax` + Has an effect only if in `marker.color` is set to a + numerical array. Defaults to `false` when `marker.cmin` + and `marker.cmax` are set by the user. + cmax + Sets the upper bound of the color domain. Has an effect + only if in `marker.color` is set to a numerical array. + Value should have the same units as in `marker.color` + and if set, `marker.cmin` must be set as well. + cmid + Sets the mid-point of the color domain by scaling + `marker.cmin` and/or `marker.cmax` to be equidistant to + this point. Has an effect only if in `marker.color` is + set to a numerical array. Value should have the same + units as in `marker.color`. Has no effect when + `marker.cauto` is `false`. + cmin + Sets the lower bound of the color domain. Has an effect + only if in `marker.color` is set to a numerical array. + Value should have the same units as in `marker.color` + and if set, `marker.cmax` must be set as well. + color + Sets the marker color. It accepts either a specific + color or an array of numbers that are mapped to the + colorscale relative to the max and min values of the + array or relative to `marker.cmin` and `marker.cmax` if + set. + coloraxis + Sets a reference to a shared color axis. References to + these shared color axes are "coloraxis", "coloraxis2", + "coloraxis3", etc. Settings for these shared color axes + are set in the layout, under `layout.coloraxis`, + `layout.coloraxis2`, etc. Note that multiple color + scales can be linked to the same color axis. + colorbar + :class:`plotly.graph_objects.bar.marker.ColorBar` + instance or dict with compatible properties + colorscale + Sets the colorscale. Has an effect only if in + `marker.color` is set to a numerical array. The + colorscale must be an array containing arrays mapping a + normalized value to an rgb, rgba, hex, hsl, hsv, or + named color string. At minimum, a mapping for the + lowest (0) and highest (1) values are required. For + example, `[[0, 'rgb(0,0,255)'], [1, 'rgb(255,0,0)']]`. + To control the bounds of the colorscale in color space, + use `marker.cmin` and `marker.cmax`. Alternatively, + `colorscale` may be a palette name string of the + following list: Blackbody,Bluered,Blues,Cividis,Earth,E + lectric,Greens,Greys,Hot,Jet,Picnic,Portland,Rainbow,Rd + Bu,Reds,Viridis,YlGnBu,YlOrRd. + colorsrc + Sets the source reference on Chart Studio Cloud for + `color`. + cornerradius + Sets the rounding of corners. May be an integer number + of pixels, or a percentage of bar width (as a string + ending in %). Defaults to `layout.barcornerradius`. In + stack or relative barmode, the first trace to set + cornerradius is used for the whole stack. + line + :class:`plotly.graph_objects.bar.marker.Line` instance + or dict with compatible properties + opacity + Sets the opacity of the bars. + opacitysrc + Sets the source reference on Chart Studio Cloud for + `opacity`. + pattern + Sets the pattern within the marker. + reversescale + Reverses the color mapping if true. Has an effect only + if in `marker.color` is set to a numerical array. If + true, `marker.cmin` will correspond to the last color + in the array and `marker.cmax` will correspond to the + first color. + showscale + Determines whether or not a colorbar is displayed for + this trace. Has an effect only if in `marker.color` is + set to a numerical array. + """ + + def __init__( + self, + arg=None, + autocolorscale=None, + cauto=None, + cmax=None, + cmid=None, + cmin=None, + color=None, + coloraxis=None, + colorbar=None, + colorscale=None, + colorsrc=None, + cornerradius=None, + line=None, + opacity=None, + opacitysrc=None, + pattern=None, + reversescale=None, + showscale=None, + **kwargs, + ): + """ + Construct a new Marker object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of :class:`plotly.graph_objs.bar.Marker` + autocolorscale + Determines whether the colorscale is a default palette + (`autocolorscale: true`) or the palette determined by + `marker.colorscale`. Has an effect only if in + `marker.color` is set to a numerical array. In case + `colorscale` is unspecified or `autocolorscale` is + true, the default palette will be chosen according to + whether numbers in the `color` array are all positive, + all negative or mixed. + cauto + Determines whether or not the color domain is computed + with respect to the input data (here in `marker.color`) + or the bounds set in `marker.cmin` and `marker.cmax` + Has an effect only if in `marker.color` is set to a + numerical array. Defaults to `false` when `marker.cmin` + and `marker.cmax` are set by the user. + cmax + Sets the upper bound of the color domain. Has an effect + only if in `marker.color` is set to a numerical array. + Value should have the same units as in `marker.color` + and if set, `marker.cmin` must be set as well. + cmid + Sets the mid-point of the color domain by scaling + `marker.cmin` and/or `marker.cmax` to be equidistant to + this point. Has an effect only if in `marker.color` is + set to a numerical array. Value should have the same + units as in `marker.color`. Has no effect when + `marker.cauto` is `false`. + cmin + Sets the lower bound of the color domain. Has an effect + only if in `marker.color` is set to a numerical array. + Value should have the same units as in `marker.color` + and if set, `marker.cmax` must be set as well. + color + Sets the marker color. It accepts either a specific + color or an array of numbers that are mapped to the + colorscale relative to the max and min values of the + array or relative to `marker.cmin` and `marker.cmax` if + set. + coloraxis + Sets a reference to a shared color axis. References to + these shared color axes are "coloraxis", "coloraxis2", + "coloraxis3", etc. Settings for these shared color axes + are set in the layout, under `layout.coloraxis`, + `layout.coloraxis2`, etc. Note that multiple color + scales can be linked to the same color axis. + colorbar + :class:`plotly.graph_objects.bar.marker.ColorBar` + instance or dict with compatible properties + colorscale + Sets the colorscale. Has an effect only if in + `marker.color` is set to a numerical array. The + colorscale must be an array containing arrays mapping a + normalized value to an rgb, rgba, hex, hsl, hsv, or + named color string. At minimum, a mapping for the + lowest (0) and highest (1) values are required. For + example, `[[0, 'rgb(0,0,255)'], [1, 'rgb(255,0,0)']]`. + To control the bounds of the colorscale in color space, + use `marker.cmin` and `marker.cmax`. Alternatively, + `colorscale` may be a palette name string of the + following list: Blackbody,Bluered,Blues,Cividis,Earth,E + lectric,Greens,Greys,Hot,Jet,Picnic,Portland,Rainbow,Rd + Bu,Reds,Viridis,YlGnBu,YlOrRd. + colorsrc + Sets the source reference on Chart Studio Cloud for + `color`. + cornerradius + Sets the rounding of corners. May be an integer number + of pixels, or a percentage of bar width (as a string + ending in %). Defaults to `layout.barcornerradius`. In + stack or relative barmode, the first trace to set + cornerradius is used for the whole stack. + line + :class:`plotly.graph_objects.bar.marker.Line` instance + or dict with compatible properties + opacity + Sets the opacity of the bars. + opacitysrc + Sets the source reference on Chart Studio Cloud for + `opacity`. + pattern + Sets the pattern within the marker. + reversescale + Reverses the color mapping if true. Has an effect only + if in `marker.color` is set to a numerical array. If + true, `marker.cmin` will correspond to the last color + in the array and `marker.cmax` will correspond to the + first color. + showscale + Determines whether or not a colorbar is displayed for + this trace. Has an effect only if in `marker.color` is + set to a numerical array. + + Returns + ------- + Marker + """ + super().__init__("marker") + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + if arg is None: + arg = {} + elif isinstance(arg, self.__class__): + arg = arg.to_plotly_json() + elif isinstance(arg, dict): + arg = _copy.copy(arg) + else: + raise ValueError("""\ +The first argument to the plotly.graph_objs.bar.Marker +constructor must be a dict or +an instance of :class:`plotly.graph_objs.bar.Marker`""") + + self._skip_invalid = kwargs.pop("skip_invalid", False) + self._validate = kwargs.pop("_validate", True) + + self._set_property("autocolorscale", arg, autocolorscale) + self._set_property("cauto", arg, cauto) + self._set_property("cmax", arg, cmax) + self._set_property("cmid", arg, cmid) + self._set_property("cmin", arg, cmin) + self._set_property("color", arg, color) + self._set_property("coloraxis", arg, coloraxis) + self._set_property("colorbar", arg, colorbar) + self._set_property("colorscale", arg, colorscale) + self._set_property("colorsrc", arg, colorsrc) + self._set_property("cornerradius", arg, cornerradius) + self._set_property("line", arg, line) + self._set_property("opacity", arg, opacity) + self._set_property("opacitysrc", arg, opacitysrc) + self._set_property("pattern", arg, pattern) + self._set_property("reversescale", arg, reversescale) + self._set_property("showscale", arg, showscale) + self._process_kwargs(**dict(arg, **kwargs)) + self._skip_invalid = False diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/bar/_outsidetextfont.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/bar/_outsidetextfont.py new file mode 100644 index 0000000000000000000000000000000000000000..2e2a8a3929a46b39b44f819517b8a20125028d7e --- /dev/null +++ b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/bar/_outsidetextfont.py @@ -0,0 +1,587 @@ +# --- THIS FILE IS AUTO-GENERATED --- +# Modifications will be overwitten the next time code generation run. + +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Outsidetextfont(_BaseTraceHierarchyType): + _parent_path_str = "bar" + _path_str = "bar.outsidetextfont" + _valid_props = { + "color", + "colorsrc", + "family", + "familysrc", + "lineposition", + "linepositionsrc", + "shadow", + "shadowsrc", + "size", + "sizesrc", + "style", + "stylesrc", + "textcase", + "textcasesrc", + "variant", + "variantsrc", + "weight", + "weightsrc", + } + + @property + def color(self): + """ + The 'color' property is a color and may be specified as: + - A hex string (e.g. '#ff0000') + - An rgb/rgba string (e.g. 'rgb(255,0,0)') + - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') + - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') + - A named CSS color: see https://plotly.com/python/css-colors/ for a list + - A list or array of any of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["color"] + + @color.setter + def color(self, val): + self["color"] = val + + @property + def colorsrc(self): + """ + Sets the source reference on Chart Studio Cloud for `color`. + + The 'colorsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["colorsrc"] + + @colorsrc.setter + def colorsrc(self, val): + self["colorsrc"] = val + + @property + def family(self): + """ + HTML font family - the typeface that will be applied by the web + browser. The web browser can only apply a font if it is + available on the system where it runs. Provide multiple font + families, separated by commas, to indicate the order in which + to apply fonts if they aren't available. + + The 'family' property is a string and must be specified as: + - A non-empty string + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["family"] + + @family.setter + def family(self, val): + self["family"] = val + + @property + def familysrc(self): + """ + Sets the source reference on Chart Studio Cloud for `family`. + + The 'familysrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["familysrc"] + + @familysrc.setter + def familysrc(self, val): + self["familysrc"] = val + + @property + def lineposition(self): + """ + Sets the kind of decoration line(s) with text, such as an + "under", "over" or "through" as well as combinations e.g. + "under+over", etc. + + The 'lineposition' property is a flaglist and may be specified + as a string containing: + - Any combination of ['under', 'over', 'through'] joined with '+' characters + (e.g. 'under+over') + OR exactly one of ['none'] (e.g. 'none') + - A list or array of the above + + Returns + ------- + Any|numpy.ndarray + """ + return self["lineposition"] + + @lineposition.setter + def lineposition(self, val): + self["lineposition"] = val + + @property + def linepositionsrc(self): + """ + Sets the source reference on Chart Studio Cloud for + `lineposition`. + + The 'linepositionsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["linepositionsrc"] + + @linepositionsrc.setter + def linepositionsrc(self, val): + self["linepositionsrc"] = val + + @property + def shadow(self): + """ + Sets the shape and color of the shadow behind text. "auto" + places minimal shadow and applies contrast text font color. See + https://developer.mozilla.org/en-US/docs/Web/CSS/text-shadow + for additional options. + + The 'shadow' property is a string and must be specified as: + - A string + - A number that will be converted to a string + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["shadow"] + + @shadow.setter + def shadow(self, val): + self["shadow"] = val + + @property + def shadowsrc(self): + """ + Sets the source reference on Chart Studio Cloud for `shadow`. + + The 'shadowsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["shadowsrc"] + + @shadowsrc.setter + def shadowsrc(self, val): + self["shadowsrc"] = val + + @property + def size(self): + """ + The 'size' property is a number and may be specified as: + - An int or float in the interval [1, inf] + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + int|float|numpy.ndarray + """ + return self["size"] + + @size.setter + def size(self, val): + self["size"] = val + + @property + def sizesrc(self): + """ + Sets the source reference on Chart Studio Cloud for `size`. + + The 'sizesrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["sizesrc"] + + @sizesrc.setter + def sizesrc(self, val): + self["sizesrc"] = val + + @property + def style(self): + """ + Sets whether a font should be styled with a normal or italic + face from its family. + + The 'style' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['normal', 'italic'] + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + Any|numpy.ndarray + """ + return self["style"] + + @style.setter + def style(self, val): + self["style"] = val + + @property + def stylesrc(self): + """ + Sets the source reference on Chart Studio Cloud for `style`. + + The 'stylesrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["stylesrc"] + + @stylesrc.setter + def stylesrc(self, val): + self["stylesrc"] = val + + @property + def textcase(self): + """ + Sets capitalization of text. It can be used to make text appear + in all-uppercase or all-lowercase, or with each word + capitalized. + + The 'textcase' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['normal', 'word caps', 'upper', 'lower'] + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + Any|numpy.ndarray + """ + return self["textcase"] + + @textcase.setter + def textcase(self, val): + self["textcase"] = val + + @property + def textcasesrc(self): + """ + Sets the source reference on Chart Studio Cloud for `textcase`. + + The 'textcasesrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["textcasesrc"] + + @textcasesrc.setter + def textcasesrc(self, val): + self["textcasesrc"] = val + + @property + def variant(self): + """ + Sets the variant of the font. + + The 'variant' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['normal', 'small-caps', 'all-small-caps', + 'all-petite-caps', 'petite-caps', 'unicase'] + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + Any|numpy.ndarray + """ + return self["variant"] + + @variant.setter + def variant(self, val): + self["variant"] = val + + @property + def variantsrc(self): + """ + Sets the source reference on Chart Studio Cloud for `variant`. + + The 'variantsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["variantsrc"] + + @variantsrc.setter + def variantsrc(self, val): + self["variantsrc"] = val + + @property + def weight(self): + """ + Sets the weight (or boldness) of the font. + + The 'weight' property is a integer and may be specified as: + - An int (or float that will be cast to an int) + in the interval [1, 1000] + OR exactly one of ['normal', 'bold'] (e.g. 'bold') + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + int|numpy.ndarray + """ + return self["weight"] + + @weight.setter + def weight(self, val): + self["weight"] = val + + @property + def weightsrc(self): + """ + Sets the source reference on Chart Studio Cloud for `weight`. + + The 'weightsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["weightsrc"] + + @weightsrc.setter + def weightsrc(self, val): + self["weightsrc"] = val + + @property + def _prop_descriptions(self): + return """\ + color + + colorsrc + Sets the source reference on Chart Studio Cloud for + `color`. + family + HTML font family - the typeface that will be applied by + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. + familysrc + Sets the source reference on Chart Studio Cloud for + `family`. + lineposition + Sets the kind of decoration line(s) with text, such as + an "under", "over" or "through" as well as combinations + e.g. "under+over", etc. + linepositionsrc + Sets the source reference on Chart Studio Cloud for + `lineposition`. + shadow + Sets the shape and color of the shadow behind text. + "auto" places minimal shadow and applies contrast text + font color. See https://developer.mozilla.org/en- + US/docs/Web/CSS/text-shadow for additional options. + shadowsrc + Sets the source reference on Chart Studio Cloud for + `shadow`. + size + + sizesrc + Sets the source reference on Chart Studio Cloud for + `size`. + style + Sets whether a font should be styled with a normal or + italic face from its family. + stylesrc + Sets the source reference on Chart Studio Cloud for + `style`. + textcase + Sets capitalization of text. It can be used to make + text appear in all-uppercase or all-lowercase, or with + each word capitalized. + textcasesrc + Sets the source reference on Chart Studio Cloud for + `textcase`. + variant + Sets the variant of the font. + variantsrc + Sets the source reference on Chart Studio Cloud for + `variant`. + weight + Sets the weight (or boldness) of the font. + weightsrc + Sets the source reference on Chart Studio Cloud for + `weight`. + """ + + def __init__( + self, + arg=None, + color=None, + colorsrc=None, + family=None, + familysrc=None, + lineposition=None, + linepositionsrc=None, + shadow=None, + shadowsrc=None, + size=None, + sizesrc=None, + style=None, + stylesrc=None, + textcase=None, + textcasesrc=None, + variant=None, + variantsrc=None, + weight=None, + weightsrc=None, + **kwargs, + ): + """ + Construct a new Outsidetextfont object + + Sets the font used for `text` lying outside the bar. + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.bar.Outsidetextfont` + color + + colorsrc + Sets the source reference on Chart Studio Cloud for + `color`. + family + HTML font family - the typeface that will be applied by + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. + familysrc + Sets the source reference on Chart Studio Cloud for + `family`. + lineposition + Sets the kind of decoration line(s) with text, such as + an "under", "over" or "through" as well as combinations + e.g. "under+over", etc. + linepositionsrc + Sets the source reference on Chart Studio Cloud for + `lineposition`. + shadow + Sets the shape and color of the shadow behind text. + "auto" places minimal shadow and applies contrast text + font color. See https://developer.mozilla.org/en- + US/docs/Web/CSS/text-shadow for additional options. + shadowsrc + Sets the source reference on Chart Studio Cloud for + `shadow`. + size + + sizesrc + Sets the source reference on Chart Studio Cloud for + `size`. + style + Sets whether a font should be styled with a normal or + italic face from its family. + stylesrc + Sets the source reference on Chart Studio Cloud for + `style`. + textcase + Sets capitalization of text. It can be used to make + text appear in all-uppercase or all-lowercase, or with + each word capitalized. + textcasesrc + Sets the source reference on Chart Studio Cloud for + `textcase`. + variant + Sets the variant of the font. + variantsrc + Sets the source reference on Chart Studio Cloud for + `variant`. + weight + Sets the weight (or boldness) of the font. + weightsrc + Sets the source reference on Chart Studio Cloud for + `weight`. + + Returns + ------- + Outsidetextfont + """ + super().__init__("outsidetextfont") + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + if arg is None: + arg = {} + elif isinstance(arg, self.__class__): + arg = arg.to_plotly_json() + elif isinstance(arg, dict): + arg = _copy.copy(arg) + else: + raise ValueError("""\ +The first argument to the plotly.graph_objs.bar.Outsidetextfont +constructor must be a dict or +an instance of :class:`plotly.graph_objs.bar.Outsidetextfont`""") + + self._skip_invalid = kwargs.pop("skip_invalid", False) + self._validate = kwargs.pop("_validate", True) + + self._set_property("color", arg, color) + self._set_property("colorsrc", arg, colorsrc) + self._set_property("family", arg, family) + self._set_property("familysrc", arg, familysrc) + self._set_property("lineposition", arg, lineposition) + self._set_property("linepositionsrc", arg, linepositionsrc) + self._set_property("shadow", arg, shadow) + self._set_property("shadowsrc", arg, shadowsrc) + self._set_property("size", arg, size) + self._set_property("sizesrc", arg, sizesrc) + self._set_property("style", arg, style) + self._set_property("stylesrc", arg, stylesrc) + self._set_property("textcase", arg, textcase) + self._set_property("textcasesrc", arg, textcasesrc) + self._set_property("variant", arg, variant) + self._set_property("variantsrc", arg, variantsrc) + self._set_property("weight", arg, weight) + self._set_property("weightsrc", arg, weightsrc) + self._process_kwargs(**dict(arg, **kwargs)) + self._skip_invalid = False diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/bar/_selected.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/bar/_selected.py new file mode 100644 index 0000000000000000000000000000000000000000..df30936a7b7fcb5d786f9fec1f7bd66da16fed3d --- /dev/null +++ b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/bar/_selected.py @@ -0,0 +1,105 @@ +# --- THIS FILE IS AUTO-GENERATED --- +# Modifications will be overwitten the next time code generation run. + +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Selected(_BaseTraceHierarchyType): + _parent_path_str = "bar" + _path_str = "bar.selected" + _valid_props = {"marker", "textfont"} + + @property + def marker(self): + """ + The 'marker' property is an instance of Marker + that may be specified as: + - An instance of :class:`plotly.graph_objs.bar.selected.Marker` + - A dict of string/value properties that will be passed + to the Marker constructor + + Returns + ------- + plotly.graph_objs.bar.selected.Marker + """ + return self["marker"] + + @marker.setter + def marker(self, val): + self["marker"] = val + + @property + def textfont(self): + """ + The 'textfont' property is an instance of Textfont + that may be specified as: + - An instance of :class:`plotly.graph_objs.bar.selected.Textfont` + - A dict of string/value properties that will be passed + to the Textfont constructor + + Returns + ------- + plotly.graph_objs.bar.selected.Textfont + """ + return self["textfont"] + + @textfont.setter + def textfont(self, val): + self["textfont"] = val + + @property + def _prop_descriptions(self): + return """\ + marker + :class:`plotly.graph_objects.bar.selected.Marker` + instance or dict with compatible properties + textfont + :class:`plotly.graph_objects.bar.selected.Textfont` + instance or dict with compatible properties + """ + + def __init__(self, arg=None, marker=None, textfont=None, **kwargs): + """ + Construct a new Selected object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of :class:`plotly.graph_objs.bar.Selected` + marker + :class:`plotly.graph_objects.bar.selected.Marker` + instance or dict with compatible properties + textfont + :class:`plotly.graph_objects.bar.selected.Textfont` + instance or dict with compatible properties + + Returns + ------- + Selected + """ + super().__init__("selected") + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + if arg is None: + arg = {} + elif isinstance(arg, self.__class__): + arg = arg.to_plotly_json() + elif isinstance(arg, dict): + arg = _copy.copy(arg) + else: + raise ValueError("""\ +The first argument to the plotly.graph_objs.bar.Selected +constructor must be a dict or +an instance of :class:`plotly.graph_objs.bar.Selected`""") + + self._skip_invalid = kwargs.pop("skip_invalid", False) + self._validate = kwargs.pop("_validate", True) + + self._set_property("marker", arg, marker) + self._set_property("textfont", arg, textfont) + self._process_kwargs(**dict(arg, **kwargs)) + self._skip_invalid = False diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/bar/_stream.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/bar/_stream.py new file mode 100644 index 0000000000000000000000000000000000000000..c4d3c0553265e9dfa13610478e21e09d1b103cd3 --- /dev/null +++ b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/bar/_stream.py @@ -0,0 +1,113 @@ +# --- THIS FILE IS AUTO-GENERATED --- +# Modifications will be overwitten the next time code generation run. + +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Stream(_BaseTraceHierarchyType): + _parent_path_str = "bar" + _path_str = "bar.stream" + _valid_props = {"maxpoints", "token"} + + @property + def maxpoints(self): + """ + Sets the maximum number of points to keep on the plots from an + incoming stream. If `maxpoints` is set to 50, only the newest + 50 points will be displayed on the plot. + + The 'maxpoints' property is a number and may be specified as: + - An int or float in the interval [0, 10000] + + Returns + ------- + int|float + """ + return self["maxpoints"] + + @maxpoints.setter + def maxpoints(self, val): + self["maxpoints"] = val + + @property + def token(self): + """ + The stream id number links a data trace on a plot with a + stream. See https://chart-studio.plotly.com/settings for more + details. + + The 'token' property is a string and must be specified as: + - A non-empty string + + Returns + ------- + str + """ + return self["token"] + + @token.setter + def token(self, val): + self["token"] = val + + @property + def _prop_descriptions(self): + return """\ + maxpoints + Sets the maximum number of points to keep on the plots + from an incoming stream. If `maxpoints` is set to 50, + only the newest 50 points will be displayed on the + plot. + token + The stream id number links a data trace on a plot with + a stream. See https://chart-studio.plotly.com/settings + for more details. + """ + + def __init__(self, arg=None, maxpoints=None, token=None, **kwargs): + """ + Construct a new Stream object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of :class:`plotly.graph_objs.bar.Stream` + maxpoints + Sets the maximum number of points to keep on the plots + from an incoming stream. If `maxpoints` is set to 50, + only the newest 50 points will be displayed on the + plot. + token + The stream id number links a data trace on a plot with + a stream. See https://chart-studio.plotly.com/settings + for more details. + + Returns + ------- + Stream + """ + super().__init__("stream") + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + if arg is None: + arg = {} + elif isinstance(arg, self.__class__): + arg = arg.to_plotly_json() + elif isinstance(arg, dict): + arg = _copy.copy(arg) + else: + raise ValueError("""\ +The first argument to the plotly.graph_objs.bar.Stream +constructor must be a dict or +an instance of :class:`plotly.graph_objs.bar.Stream`""") + + self._skip_invalid = kwargs.pop("skip_invalid", False) + self._validate = kwargs.pop("_validate", True) + + self._set_property("maxpoints", arg, maxpoints) + self._set_property("token", arg, token) + self._process_kwargs(**dict(arg, **kwargs)) + self._skip_invalid = False diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/bar/_textfont.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/bar/_textfont.py new file mode 100644 index 0000000000000000000000000000000000000000..f63c5c45538e9bc9d3f660ff707d244785981429 --- /dev/null +++ b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/bar/_textfont.py @@ -0,0 +1,586 @@ +# --- THIS FILE IS AUTO-GENERATED --- +# Modifications will be overwitten the next time code generation run. + +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Textfont(_BaseTraceHierarchyType): + _parent_path_str = "bar" + _path_str = "bar.textfont" + _valid_props = { + "color", + "colorsrc", + "family", + "familysrc", + "lineposition", + "linepositionsrc", + "shadow", + "shadowsrc", + "size", + "sizesrc", + "style", + "stylesrc", + "textcase", + "textcasesrc", + "variant", + "variantsrc", + "weight", + "weightsrc", + } + + @property + def color(self): + """ + The 'color' property is a color and may be specified as: + - A hex string (e.g. '#ff0000') + - An rgb/rgba string (e.g. 'rgb(255,0,0)') + - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') + - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') + - A named CSS color: see https://plotly.com/python/css-colors/ for a list + - A list or array of any of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["color"] + + @color.setter + def color(self, val): + self["color"] = val + + @property + def colorsrc(self): + """ + Sets the source reference on Chart Studio Cloud for `color`. + + The 'colorsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["colorsrc"] + + @colorsrc.setter + def colorsrc(self, val): + self["colorsrc"] = val + + @property + def family(self): + """ + HTML font family - the typeface that will be applied by the web + browser. The web browser can only apply a font if it is + available on the system where it runs. Provide multiple font + families, separated by commas, to indicate the order in which + to apply fonts if they aren't available. + + The 'family' property is a string and must be specified as: + - A non-empty string + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["family"] + + @family.setter + def family(self, val): + self["family"] = val + + @property + def familysrc(self): + """ + Sets the source reference on Chart Studio Cloud for `family`. + + The 'familysrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["familysrc"] + + @familysrc.setter + def familysrc(self, val): + self["familysrc"] = val + + @property + def lineposition(self): + """ + Sets the kind of decoration line(s) with text, such as an + "under", "over" or "through" as well as combinations e.g. + "under+over", etc. + + The 'lineposition' property is a flaglist and may be specified + as a string containing: + - Any combination of ['under', 'over', 'through'] joined with '+' characters + (e.g. 'under+over') + OR exactly one of ['none'] (e.g. 'none') + - A list or array of the above + + Returns + ------- + Any|numpy.ndarray + """ + return self["lineposition"] + + @lineposition.setter + def lineposition(self, val): + self["lineposition"] = val + + @property + def linepositionsrc(self): + """ + Sets the source reference on Chart Studio Cloud for + `lineposition`. + + The 'linepositionsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["linepositionsrc"] + + @linepositionsrc.setter + def linepositionsrc(self, val): + self["linepositionsrc"] = val + + @property + def shadow(self): + """ + Sets the shape and color of the shadow behind text. "auto" + places minimal shadow and applies contrast text font color. See + https://developer.mozilla.org/en-US/docs/Web/CSS/text-shadow + for additional options. + + The 'shadow' property is a string and must be specified as: + - A string + - A number that will be converted to a string + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["shadow"] + + @shadow.setter + def shadow(self, val): + self["shadow"] = val + + @property + def shadowsrc(self): + """ + Sets the source reference on Chart Studio Cloud for `shadow`. + + The 'shadowsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["shadowsrc"] + + @shadowsrc.setter + def shadowsrc(self, val): + self["shadowsrc"] = val + + @property + def size(self): + """ + The 'size' property is a number and may be specified as: + - An int or float in the interval [1, inf] + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + int|float|numpy.ndarray + """ + return self["size"] + + @size.setter + def size(self, val): + self["size"] = val + + @property + def sizesrc(self): + """ + Sets the source reference on Chart Studio Cloud for `size`. + + The 'sizesrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["sizesrc"] + + @sizesrc.setter + def sizesrc(self, val): + self["sizesrc"] = val + + @property + def style(self): + """ + Sets whether a font should be styled with a normal or italic + face from its family. + + The 'style' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['normal', 'italic'] + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + Any|numpy.ndarray + """ + return self["style"] + + @style.setter + def style(self, val): + self["style"] = val + + @property + def stylesrc(self): + """ + Sets the source reference on Chart Studio Cloud for `style`. + + The 'stylesrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["stylesrc"] + + @stylesrc.setter + def stylesrc(self, val): + self["stylesrc"] = val + + @property + def textcase(self): + """ + Sets capitalization of text. It can be used to make text appear + in all-uppercase or all-lowercase, or with each word + capitalized. + + The 'textcase' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['normal', 'word caps', 'upper', 'lower'] + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + Any|numpy.ndarray + """ + return self["textcase"] + + @textcase.setter + def textcase(self, val): + self["textcase"] = val + + @property + def textcasesrc(self): + """ + Sets the source reference on Chart Studio Cloud for `textcase`. + + The 'textcasesrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["textcasesrc"] + + @textcasesrc.setter + def textcasesrc(self, val): + self["textcasesrc"] = val + + @property + def variant(self): + """ + Sets the variant of the font. + + The 'variant' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['normal', 'small-caps', 'all-small-caps', + 'all-petite-caps', 'petite-caps', 'unicase'] + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + Any|numpy.ndarray + """ + return self["variant"] + + @variant.setter + def variant(self, val): + self["variant"] = val + + @property + def variantsrc(self): + """ + Sets the source reference on Chart Studio Cloud for `variant`. + + The 'variantsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["variantsrc"] + + @variantsrc.setter + def variantsrc(self, val): + self["variantsrc"] = val + + @property + def weight(self): + """ + Sets the weight (or boldness) of the font. + + The 'weight' property is a integer and may be specified as: + - An int (or float that will be cast to an int) + in the interval [1, 1000] + OR exactly one of ['normal', 'bold'] (e.g. 'bold') + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + int|numpy.ndarray + """ + return self["weight"] + + @weight.setter + def weight(self, val): + self["weight"] = val + + @property + def weightsrc(self): + """ + Sets the source reference on Chart Studio Cloud for `weight`. + + The 'weightsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["weightsrc"] + + @weightsrc.setter + def weightsrc(self, val): + self["weightsrc"] = val + + @property + def _prop_descriptions(self): + return """\ + color + + colorsrc + Sets the source reference on Chart Studio Cloud for + `color`. + family + HTML font family - the typeface that will be applied by + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. + familysrc + Sets the source reference on Chart Studio Cloud for + `family`. + lineposition + Sets the kind of decoration line(s) with text, such as + an "under", "over" or "through" as well as combinations + e.g. "under+over", etc. + linepositionsrc + Sets the source reference on Chart Studio Cloud for + `lineposition`. + shadow + Sets the shape and color of the shadow behind text. + "auto" places minimal shadow and applies contrast text + font color. See https://developer.mozilla.org/en- + US/docs/Web/CSS/text-shadow for additional options. + shadowsrc + Sets the source reference on Chart Studio Cloud for + `shadow`. + size + + sizesrc + Sets the source reference on Chart Studio Cloud for + `size`. + style + Sets whether a font should be styled with a normal or + italic face from its family. + stylesrc + Sets the source reference on Chart Studio Cloud for + `style`. + textcase + Sets capitalization of text. It can be used to make + text appear in all-uppercase or all-lowercase, or with + each word capitalized. + textcasesrc + Sets the source reference on Chart Studio Cloud for + `textcase`. + variant + Sets the variant of the font. + variantsrc + Sets the source reference on Chart Studio Cloud for + `variant`. + weight + Sets the weight (or boldness) of the font. + weightsrc + Sets the source reference on Chart Studio Cloud for + `weight`. + """ + + def __init__( + self, + arg=None, + color=None, + colorsrc=None, + family=None, + familysrc=None, + lineposition=None, + linepositionsrc=None, + shadow=None, + shadowsrc=None, + size=None, + sizesrc=None, + style=None, + stylesrc=None, + textcase=None, + textcasesrc=None, + variant=None, + variantsrc=None, + weight=None, + weightsrc=None, + **kwargs, + ): + """ + Construct a new Textfont object + + Sets the font used for `text`. + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of :class:`plotly.graph_objs.bar.Textfont` + color + + colorsrc + Sets the source reference on Chart Studio Cloud for + `color`. + family + HTML font family - the typeface that will be applied by + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. + familysrc + Sets the source reference on Chart Studio Cloud for + `family`. + lineposition + Sets the kind of decoration line(s) with text, such as + an "under", "over" or "through" as well as combinations + e.g. "under+over", etc. + linepositionsrc + Sets the source reference on Chart Studio Cloud for + `lineposition`. + shadow + Sets the shape and color of the shadow behind text. + "auto" places minimal shadow and applies contrast text + font color. See https://developer.mozilla.org/en- + US/docs/Web/CSS/text-shadow for additional options. + shadowsrc + Sets the source reference on Chart Studio Cloud for + `shadow`. + size + + sizesrc + Sets the source reference on Chart Studio Cloud for + `size`. + style + Sets whether a font should be styled with a normal or + italic face from its family. + stylesrc + Sets the source reference on Chart Studio Cloud for + `style`. + textcase + Sets capitalization of text. It can be used to make + text appear in all-uppercase or all-lowercase, or with + each word capitalized. + textcasesrc + Sets the source reference on Chart Studio Cloud for + `textcase`. + variant + Sets the variant of the font. + variantsrc + Sets the source reference on Chart Studio Cloud for + `variant`. + weight + Sets the weight (or boldness) of the font. + weightsrc + Sets the source reference on Chart Studio Cloud for + `weight`. + + Returns + ------- + Textfont + """ + super().__init__("textfont") + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + if arg is None: + arg = {} + elif isinstance(arg, self.__class__): + arg = arg.to_plotly_json() + elif isinstance(arg, dict): + arg = _copy.copy(arg) + else: + raise ValueError("""\ +The first argument to the plotly.graph_objs.bar.Textfont +constructor must be a dict or +an instance of :class:`plotly.graph_objs.bar.Textfont`""") + + self._skip_invalid = kwargs.pop("skip_invalid", False) + self._validate = kwargs.pop("_validate", True) + + self._set_property("color", arg, color) + self._set_property("colorsrc", arg, colorsrc) + self._set_property("family", arg, family) + self._set_property("familysrc", arg, familysrc) + self._set_property("lineposition", arg, lineposition) + self._set_property("linepositionsrc", arg, linepositionsrc) + self._set_property("shadow", arg, shadow) + self._set_property("shadowsrc", arg, shadowsrc) + self._set_property("size", arg, size) + self._set_property("sizesrc", arg, sizesrc) + self._set_property("style", arg, style) + self._set_property("stylesrc", arg, stylesrc) + self._set_property("textcase", arg, textcase) + self._set_property("textcasesrc", arg, textcasesrc) + self._set_property("variant", arg, variant) + self._set_property("variantsrc", arg, variantsrc) + self._set_property("weight", arg, weight) + self._set_property("weightsrc", arg, weightsrc) + self._process_kwargs(**dict(arg, **kwargs)) + self._skip_invalid = False diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/bar/_unselected.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/bar/_unselected.py new file mode 100644 index 0000000000000000000000000000000000000000..9bd645d47c7b5c504c6b23d520f6d2cf6210855f --- /dev/null +++ b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/bar/_unselected.py @@ -0,0 +1,106 @@ +# --- THIS FILE IS AUTO-GENERATED --- +# Modifications will be overwitten the next time code generation run. + +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Unselected(_BaseTraceHierarchyType): + _parent_path_str = "bar" + _path_str = "bar.unselected" + _valid_props = {"marker", "textfont"} + + @property + def marker(self): + """ + The 'marker' property is an instance of Marker + that may be specified as: + - An instance of :class:`plotly.graph_objs.bar.unselected.Marker` + - A dict of string/value properties that will be passed + to the Marker constructor + + Returns + ------- + plotly.graph_objs.bar.unselected.Marker + """ + return self["marker"] + + @marker.setter + def marker(self, val): + self["marker"] = val + + @property + def textfont(self): + """ + The 'textfont' property is an instance of Textfont + that may be specified as: + - An instance of :class:`plotly.graph_objs.bar.unselected.Textfont` + - A dict of string/value properties that will be passed + to the Textfont constructor + + Returns + ------- + plotly.graph_objs.bar.unselected.Textfont + """ + return self["textfont"] + + @textfont.setter + def textfont(self, val): + self["textfont"] = val + + @property + def _prop_descriptions(self): + return """\ + marker + :class:`plotly.graph_objects.bar.unselected.Marker` + instance or dict with compatible properties + textfont + :class:`plotly.graph_objects.bar.unselected.Textfont` + instance or dict with compatible properties + """ + + def __init__(self, arg=None, marker=None, textfont=None, **kwargs): + """ + Construct a new Unselected object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.bar.Unselected` + marker + :class:`plotly.graph_objects.bar.unselected.Marker` + instance or dict with compatible properties + textfont + :class:`plotly.graph_objects.bar.unselected.Textfont` + instance or dict with compatible properties + + Returns + ------- + Unselected + """ + super().__init__("unselected") + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + if arg is None: + arg = {} + elif isinstance(arg, self.__class__): + arg = arg.to_plotly_json() + elif isinstance(arg, dict): + arg = _copy.copy(arg) + else: + raise ValueError("""\ +The first argument to the plotly.graph_objs.bar.Unselected +constructor must be a dict or +an instance of :class:`plotly.graph_objs.bar.Unselected`""") + + self._skip_invalid = kwargs.pop("skip_invalid", False) + self._validate = kwargs.pop("_validate", True) + + self._set_property("marker", arg, marker) + self._set_property("textfont", arg, textfont) + self._process_kwargs(**dict(arg, **kwargs)) + self._skip_invalid = False diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/bar/hoverlabel/.___init__.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/bar/hoverlabel/.___init__.py new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/bar/hoverlabel/.___init__.py differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/bar/hoverlabel/.___pycache__ b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/bar/hoverlabel/.___pycache__ new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/bar/hoverlabel/.___pycache__ differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/bar/hoverlabel/.__font.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/bar/hoverlabel/.__font.py new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/bar/hoverlabel/.__font.py differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/bar/hoverlabel/__init__.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/bar/hoverlabel/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..56f600d3458c41f269053307377e9707ab13e090 --- /dev/null +++ b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/bar/hoverlabel/__init__.py @@ -0,0 +1,9 @@ +import sys +from typing import TYPE_CHECKING + +if TYPE_CHECKING: + from ._font import Font +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import(__name__, [], ["._font.Font"]) diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/bar/hoverlabel/_font.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/bar/hoverlabel/_font.py new file mode 100644 index 0000000000000000000000000000000000000000..485d5a7be56d6fcd20420056fad46be6f8f966d0 --- /dev/null +++ b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/bar/hoverlabel/_font.py @@ -0,0 +1,587 @@ +# --- THIS FILE IS AUTO-GENERATED --- +# Modifications will be overwitten the next time code generation run. + +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Font(_BaseTraceHierarchyType): + _parent_path_str = "bar.hoverlabel" + _path_str = "bar.hoverlabel.font" + _valid_props = { + "color", + "colorsrc", + "family", + "familysrc", + "lineposition", + "linepositionsrc", + "shadow", + "shadowsrc", + "size", + "sizesrc", + "style", + "stylesrc", + "textcase", + "textcasesrc", + "variant", + "variantsrc", + "weight", + "weightsrc", + } + + @property + def color(self): + """ + The 'color' property is a color and may be specified as: + - A hex string (e.g. '#ff0000') + - An rgb/rgba string (e.g. 'rgb(255,0,0)') + - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') + - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') + - A named CSS color: see https://plotly.com/python/css-colors/ for a list + - A list or array of any of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["color"] + + @color.setter + def color(self, val): + self["color"] = val + + @property + def colorsrc(self): + """ + Sets the source reference on Chart Studio Cloud for `color`. + + The 'colorsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["colorsrc"] + + @colorsrc.setter + def colorsrc(self, val): + self["colorsrc"] = val + + @property + def family(self): + """ + HTML font family - the typeface that will be applied by the web + browser. The web browser can only apply a font if it is + available on the system where it runs. Provide multiple font + families, separated by commas, to indicate the order in which + to apply fonts if they aren't available. + + The 'family' property is a string and must be specified as: + - A non-empty string + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["family"] + + @family.setter + def family(self, val): + self["family"] = val + + @property + def familysrc(self): + """ + Sets the source reference on Chart Studio Cloud for `family`. + + The 'familysrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["familysrc"] + + @familysrc.setter + def familysrc(self, val): + self["familysrc"] = val + + @property + def lineposition(self): + """ + Sets the kind of decoration line(s) with text, such as an + "under", "over" or "through" as well as combinations e.g. + "under+over", etc. + + The 'lineposition' property is a flaglist and may be specified + as a string containing: + - Any combination of ['under', 'over', 'through'] joined with '+' characters + (e.g. 'under+over') + OR exactly one of ['none'] (e.g. 'none') + - A list or array of the above + + Returns + ------- + Any|numpy.ndarray + """ + return self["lineposition"] + + @lineposition.setter + def lineposition(self, val): + self["lineposition"] = val + + @property + def linepositionsrc(self): + """ + Sets the source reference on Chart Studio Cloud for + `lineposition`. + + The 'linepositionsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["linepositionsrc"] + + @linepositionsrc.setter + def linepositionsrc(self, val): + self["linepositionsrc"] = val + + @property + def shadow(self): + """ + Sets the shape and color of the shadow behind text. "auto" + places minimal shadow and applies contrast text font color. See + https://developer.mozilla.org/en-US/docs/Web/CSS/text-shadow + for additional options. + + The 'shadow' property is a string and must be specified as: + - A string + - A number that will be converted to a string + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["shadow"] + + @shadow.setter + def shadow(self, val): + self["shadow"] = val + + @property + def shadowsrc(self): + """ + Sets the source reference on Chart Studio Cloud for `shadow`. + + The 'shadowsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["shadowsrc"] + + @shadowsrc.setter + def shadowsrc(self, val): + self["shadowsrc"] = val + + @property + def size(self): + """ + The 'size' property is a number and may be specified as: + - An int or float in the interval [1, inf] + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + int|float|numpy.ndarray + """ + return self["size"] + + @size.setter + def size(self, val): + self["size"] = val + + @property + def sizesrc(self): + """ + Sets the source reference on Chart Studio Cloud for `size`. + + The 'sizesrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["sizesrc"] + + @sizesrc.setter + def sizesrc(self, val): + self["sizesrc"] = val + + @property + def style(self): + """ + Sets whether a font should be styled with a normal or italic + face from its family. + + The 'style' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['normal', 'italic'] + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + Any|numpy.ndarray + """ + return self["style"] + + @style.setter + def style(self, val): + self["style"] = val + + @property + def stylesrc(self): + """ + Sets the source reference on Chart Studio Cloud for `style`. + + The 'stylesrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["stylesrc"] + + @stylesrc.setter + def stylesrc(self, val): + self["stylesrc"] = val + + @property + def textcase(self): + """ + Sets capitalization of text. It can be used to make text appear + in all-uppercase or all-lowercase, or with each word + capitalized. + + The 'textcase' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['normal', 'word caps', 'upper', 'lower'] + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + Any|numpy.ndarray + """ + return self["textcase"] + + @textcase.setter + def textcase(self, val): + self["textcase"] = val + + @property + def textcasesrc(self): + """ + Sets the source reference on Chart Studio Cloud for `textcase`. + + The 'textcasesrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["textcasesrc"] + + @textcasesrc.setter + def textcasesrc(self, val): + self["textcasesrc"] = val + + @property + def variant(self): + """ + Sets the variant of the font. + + The 'variant' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['normal', 'small-caps', 'all-small-caps', + 'all-petite-caps', 'petite-caps', 'unicase'] + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + Any|numpy.ndarray + """ + return self["variant"] + + @variant.setter + def variant(self, val): + self["variant"] = val + + @property + def variantsrc(self): + """ + Sets the source reference on Chart Studio Cloud for `variant`. + + The 'variantsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["variantsrc"] + + @variantsrc.setter + def variantsrc(self, val): + self["variantsrc"] = val + + @property + def weight(self): + """ + Sets the weight (or boldness) of the font. + + The 'weight' property is a integer and may be specified as: + - An int (or float that will be cast to an int) + in the interval [1, 1000] + OR exactly one of ['normal', 'bold'] (e.g. 'bold') + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + int|numpy.ndarray + """ + return self["weight"] + + @weight.setter + def weight(self, val): + self["weight"] = val + + @property + def weightsrc(self): + """ + Sets the source reference on Chart Studio Cloud for `weight`. + + The 'weightsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["weightsrc"] + + @weightsrc.setter + def weightsrc(self, val): + self["weightsrc"] = val + + @property + def _prop_descriptions(self): + return """\ + color + + colorsrc + Sets the source reference on Chart Studio Cloud for + `color`. + family + HTML font family - the typeface that will be applied by + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. + familysrc + Sets the source reference on Chart Studio Cloud for + `family`. + lineposition + Sets the kind of decoration line(s) with text, such as + an "under", "over" or "through" as well as combinations + e.g. "under+over", etc. + linepositionsrc + Sets the source reference on Chart Studio Cloud for + `lineposition`. + shadow + Sets the shape and color of the shadow behind text. + "auto" places minimal shadow and applies contrast text + font color. See https://developer.mozilla.org/en- + US/docs/Web/CSS/text-shadow for additional options. + shadowsrc + Sets the source reference on Chart Studio Cloud for + `shadow`. + size + + sizesrc + Sets the source reference on Chart Studio Cloud for + `size`. + style + Sets whether a font should be styled with a normal or + italic face from its family. + stylesrc + Sets the source reference on Chart Studio Cloud for + `style`. + textcase + Sets capitalization of text. It can be used to make + text appear in all-uppercase or all-lowercase, or with + each word capitalized. + textcasesrc + Sets the source reference on Chart Studio Cloud for + `textcase`. + variant + Sets the variant of the font. + variantsrc + Sets the source reference on Chart Studio Cloud for + `variant`. + weight + Sets the weight (or boldness) of the font. + weightsrc + Sets the source reference on Chart Studio Cloud for + `weight`. + """ + + def __init__( + self, + arg=None, + color=None, + colorsrc=None, + family=None, + familysrc=None, + lineposition=None, + linepositionsrc=None, + shadow=None, + shadowsrc=None, + size=None, + sizesrc=None, + style=None, + stylesrc=None, + textcase=None, + textcasesrc=None, + variant=None, + variantsrc=None, + weight=None, + weightsrc=None, + **kwargs, + ): + """ + Construct a new Font object + + Sets the font used in hover labels. + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.bar.hoverlabel.Font` + color + + colorsrc + Sets the source reference on Chart Studio Cloud for + `color`. + family + HTML font family - the typeface that will be applied by + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. + familysrc + Sets the source reference on Chart Studio Cloud for + `family`. + lineposition + Sets the kind of decoration line(s) with text, such as + an "under", "over" or "through" as well as combinations + e.g. "under+over", etc. + linepositionsrc + Sets the source reference on Chart Studio Cloud for + `lineposition`. + shadow + Sets the shape and color of the shadow behind text. + "auto" places minimal shadow and applies contrast text + font color. See https://developer.mozilla.org/en- + US/docs/Web/CSS/text-shadow for additional options. + shadowsrc + Sets the source reference on Chart Studio Cloud for + `shadow`. + size + + sizesrc + Sets the source reference on Chart Studio Cloud for + `size`. + style + Sets whether a font should be styled with a normal or + italic face from its family. + stylesrc + Sets the source reference on Chart Studio Cloud for + `style`. + textcase + Sets capitalization of text. It can be used to make + text appear in all-uppercase or all-lowercase, or with + each word capitalized. + textcasesrc + Sets the source reference on Chart Studio Cloud for + `textcase`. + variant + Sets the variant of the font. + variantsrc + Sets the source reference on Chart Studio Cloud for + `variant`. + weight + Sets the weight (or boldness) of the font. + weightsrc + Sets the source reference on Chart Studio Cloud for + `weight`. + + Returns + ------- + Font + """ + super().__init__("font") + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + if arg is None: + arg = {} + elif isinstance(arg, self.__class__): + arg = arg.to_plotly_json() + elif isinstance(arg, dict): + arg = _copy.copy(arg) + else: + raise ValueError("""\ +The first argument to the plotly.graph_objs.bar.hoverlabel.Font +constructor must be a dict or +an instance of :class:`plotly.graph_objs.bar.hoverlabel.Font`""") + + self._skip_invalid = kwargs.pop("skip_invalid", False) + self._validate = kwargs.pop("_validate", True) + + self._set_property("color", arg, color) + self._set_property("colorsrc", arg, colorsrc) + self._set_property("family", arg, family) + self._set_property("familysrc", arg, familysrc) + self._set_property("lineposition", arg, lineposition) + self._set_property("linepositionsrc", arg, linepositionsrc) + self._set_property("shadow", arg, shadow) + self._set_property("shadowsrc", arg, shadowsrc) + self._set_property("size", arg, size) + self._set_property("sizesrc", arg, sizesrc) + self._set_property("style", arg, style) + self._set_property("stylesrc", arg, stylesrc) + self._set_property("textcase", arg, textcase) + self._set_property("textcasesrc", arg, textcasesrc) + self._set_property("variant", arg, variant) + self._set_property("variantsrc", arg, variantsrc) + self._set_property("weight", arg, weight) + self._set_property("weightsrc", arg, weightsrc) + self._process_kwargs(**dict(arg, **kwargs)) + self._skip_invalid = False diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/bar/legendgrouptitle/.___init__.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/bar/legendgrouptitle/.___init__.py new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/bar/legendgrouptitle/.___init__.py differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/bar/legendgrouptitle/.___pycache__ b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/bar/legendgrouptitle/.___pycache__ new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/bar/legendgrouptitle/.___pycache__ differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/bar/legendgrouptitle/.__font.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/bar/legendgrouptitle/.__font.py new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/bar/legendgrouptitle/.__font.py differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/bar/legendgrouptitle/__init__.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/bar/legendgrouptitle/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..56f600d3458c41f269053307377e9707ab13e090 --- /dev/null +++ b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/bar/legendgrouptitle/__init__.py @@ -0,0 +1,9 @@ +import sys +from typing import TYPE_CHECKING + +if TYPE_CHECKING: + from ._font import Font +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import(__name__, [], ["._font.Font"]) diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/bar/legendgrouptitle/_font.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/bar/legendgrouptitle/_font.py new file mode 100644 index 0000000000000000000000000000000000000000..9c134c3fd6c2fdd428d4950cdc1fe266ee7aecf6 --- /dev/null +++ b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/bar/legendgrouptitle/_font.py @@ -0,0 +1,334 @@ +# --- THIS FILE IS AUTO-GENERATED --- +# Modifications will be overwitten the next time code generation run. + +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Font(_BaseTraceHierarchyType): + _parent_path_str = "bar.legendgrouptitle" + _path_str = "bar.legendgrouptitle.font" + _valid_props = { + "color", + "family", + "lineposition", + "shadow", + "size", + "style", + "textcase", + "variant", + "weight", + } + + @property + def color(self): + """ + The 'color' property is a color and may be specified as: + - A hex string (e.g. '#ff0000') + - An rgb/rgba string (e.g. 'rgb(255,0,0)') + - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') + - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') + - A named CSS color: see https://plotly.com/python/css-colors/ for a list + + Returns + ------- + str + """ + return self["color"] + + @color.setter + def color(self, val): + self["color"] = val + + @property + def family(self): + """ + HTML font family - the typeface that will be applied by the web + browser. The web browser can only apply a font if it is + available on the system where it runs. Provide multiple font + families, separated by commas, to indicate the order in which + to apply fonts if they aren't available. + + The 'family' property is a string and must be specified as: + - A non-empty string + + Returns + ------- + str + """ + return self["family"] + + @family.setter + def family(self, val): + self["family"] = val + + @property + def lineposition(self): + """ + Sets the kind of decoration line(s) with text, such as an + "under", "over" or "through" as well as combinations e.g. + "under+over", etc. + + The 'lineposition' property is a flaglist and may be specified + as a string containing: + - Any combination of ['under', 'over', 'through'] joined with '+' characters + (e.g. 'under+over') + OR exactly one of ['none'] (e.g. 'none') + + Returns + ------- + Any + """ + return self["lineposition"] + + @lineposition.setter + def lineposition(self, val): + self["lineposition"] = val + + @property + def shadow(self): + """ + Sets the shape and color of the shadow behind text. "auto" + places minimal shadow and applies contrast text font color. See + https://developer.mozilla.org/en-US/docs/Web/CSS/text-shadow + for additional options. + + The 'shadow' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["shadow"] + + @shadow.setter + def shadow(self, val): + self["shadow"] = val + + @property + def size(self): + """ + The 'size' property is a number and may be specified as: + - An int or float in the interval [1, inf] + + Returns + ------- + int|float + """ + return self["size"] + + @size.setter + def size(self, val): + self["size"] = val + + @property + def style(self): + """ + Sets whether a font should be styled with a normal or italic + face from its family. + + The 'style' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['normal', 'italic'] + + Returns + ------- + Any + """ + return self["style"] + + @style.setter + def style(self, val): + self["style"] = val + + @property + def textcase(self): + """ + Sets capitalization of text. It can be used to make text appear + in all-uppercase or all-lowercase, or with each word + capitalized. + + The 'textcase' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['normal', 'word caps', 'upper', 'lower'] + + Returns + ------- + Any + """ + return self["textcase"] + + @textcase.setter + def textcase(self, val): + self["textcase"] = val + + @property + def variant(self): + """ + Sets the variant of the font. + + The 'variant' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['normal', 'small-caps', 'all-small-caps', + 'all-petite-caps', 'petite-caps', 'unicase'] + + Returns + ------- + Any + """ + return self["variant"] + + @variant.setter + def variant(self, val): + self["variant"] = val + + @property + def weight(self): + """ + Sets the weight (or boldness) of the font. + + The 'weight' property is a integer and may be specified as: + - An int (or float that will be cast to an int) + in the interval [1, 1000] + OR exactly one of ['normal', 'bold'] (e.g. 'bold') + + Returns + ------- + int + """ + return self["weight"] + + @weight.setter + def weight(self, val): + self["weight"] = val + + @property + def _prop_descriptions(self): + return """\ + color + + family + HTML font family - the typeface that will be applied by + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. + lineposition + Sets the kind of decoration line(s) with text, such as + an "under", "over" or "through" as well as combinations + e.g. "under+over", etc. + shadow + Sets the shape and color of the shadow behind text. + "auto" places minimal shadow and applies contrast text + font color. See https://developer.mozilla.org/en- + US/docs/Web/CSS/text-shadow for additional options. + size + + style + Sets whether a font should be styled with a normal or + italic face from its family. + textcase + Sets capitalization of text. It can be used to make + text appear in all-uppercase or all-lowercase, or with + each word capitalized. + variant + Sets the variant of the font. + weight + Sets the weight (or boldness) of the font. + """ + + def __init__( + self, + arg=None, + color=None, + family=None, + lineposition=None, + shadow=None, + size=None, + style=None, + textcase=None, + variant=None, + weight=None, + **kwargs, + ): + """ + Construct a new Font object + + Sets this legend group's title font. + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.bar.legendgrouptitle.Font` + color + + family + HTML font family - the typeface that will be applied by + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. + lineposition + Sets the kind of decoration line(s) with text, such as + an "under", "over" or "through" as well as combinations + e.g. "under+over", etc. + shadow + Sets the shape and color of the shadow behind text. + "auto" places minimal shadow and applies contrast text + font color. See https://developer.mozilla.org/en- + US/docs/Web/CSS/text-shadow for additional options. + size + + style + Sets whether a font should be styled with a normal or + italic face from its family. + textcase + Sets capitalization of text. It can be used to make + text appear in all-uppercase or all-lowercase, or with + each word capitalized. + variant + Sets the variant of the font. + weight + Sets the weight (or boldness) of the font. + + Returns + ------- + Font + """ + super().__init__("font") + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + if arg is None: + arg = {} + elif isinstance(arg, self.__class__): + arg = arg.to_plotly_json() + elif isinstance(arg, dict): + arg = _copy.copy(arg) + else: + raise ValueError("""\ +The first argument to the plotly.graph_objs.bar.legendgrouptitle.Font +constructor must be a dict or +an instance of :class:`plotly.graph_objs.bar.legendgrouptitle.Font`""") + + self._skip_invalid = kwargs.pop("skip_invalid", False) + self._validate = kwargs.pop("_validate", True) + + self._set_property("color", arg, color) + self._set_property("family", arg, family) + self._set_property("lineposition", arg, lineposition) + self._set_property("shadow", arg, shadow) + self._set_property("size", arg, size) + self._set_property("style", arg, style) + self._set_property("textcase", arg, textcase) + self._set_property("variant", arg, variant) + self._set_property("weight", arg, weight) + self._process_kwargs(**dict(arg, **kwargs)) + self._skip_invalid = False diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/bar/marker/.___init__.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/bar/marker/.___init__.py new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/bar/marker/.___init__.py differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/bar/marker/.___pycache__ b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/bar/marker/.___pycache__ new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/bar/marker/.___pycache__ differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/bar/marker/.__colorbar.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/bar/marker/.__colorbar.py new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/bar/marker/.__colorbar.py differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/bar/marker/.__line.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/bar/marker/.__line.py new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/bar/marker/.__line.py differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/bar/marker/.__pattern.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/bar/marker/.__pattern.py new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/bar/marker/.__pattern.py differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/bar/marker/._colorbar b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/bar/marker/._colorbar new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/bar/marker/._colorbar differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/bar/marker/__init__.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/bar/marker/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..e2d7a121b709e5e43cfe58285a29c1f396c1077d --- /dev/null +++ b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/bar/marker/__init__.py @@ -0,0 +1,16 @@ +import sys +from typing import TYPE_CHECKING + +if TYPE_CHECKING: + from ._colorbar import ColorBar + from ._line import Line + from ._pattern import Pattern + from . import colorbar +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [".colorbar"], + ["._colorbar.ColorBar", "._line.Line", "._pattern.Pattern"], + ) diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/bar/marker/_colorbar.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/bar/marker/_colorbar.py new file mode 100644 index 0000000000000000000000000000000000000000..f00a4bdce6ead4453b984d6193bbf61983183bdd --- /dev/null +++ b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/bar/marker/_colorbar.py @@ -0,0 +1,1738 @@ +# --- THIS FILE IS AUTO-GENERATED --- +# Modifications will be overwitten the next time code generation run. + +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class ColorBar(_BaseTraceHierarchyType): + _parent_path_str = "bar.marker" + _path_str = "bar.marker.colorbar" + _valid_props = { + "bgcolor", + "bordercolor", + "borderwidth", + "dtick", + "exponentformat", + "labelalias", + "len", + "lenmode", + "minexponent", + "nticks", + "orientation", + "outlinecolor", + "outlinewidth", + "separatethousands", + "showexponent", + "showticklabels", + "showtickprefix", + "showticksuffix", + "thickness", + "thicknessmode", + "tick0", + "tickangle", + "tickcolor", + "tickfont", + "tickformat", + "tickformatstopdefaults", + "tickformatstops", + "ticklabeloverflow", + "ticklabelposition", + "ticklabelstep", + "ticklen", + "tickmode", + "tickprefix", + "ticks", + "ticksuffix", + "ticktext", + "ticktextsrc", + "tickvals", + "tickvalssrc", + "tickwidth", + "title", + "x", + "xanchor", + "xpad", + "xref", + "y", + "yanchor", + "ypad", + "yref", + } + + @property + def bgcolor(self): + """ + Sets the color of padded area. + + The 'bgcolor' property is a color and may be specified as: + - A hex string (e.g. '#ff0000') + - An rgb/rgba string (e.g. 'rgb(255,0,0)') + - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') + - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') + - A named CSS color: see https://plotly.com/python/css-colors/ for a list + + Returns + ------- + str + """ + return self["bgcolor"] + + @bgcolor.setter + def bgcolor(self, val): + self["bgcolor"] = val + + @property + def bordercolor(self): + """ + Sets the axis line color. + + The 'bordercolor' property is a color and may be specified as: + - A hex string (e.g. '#ff0000') + - An rgb/rgba string (e.g. 'rgb(255,0,0)') + - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') + - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') + - A named CSS color: see https://plotly.com/python/css-colors/ for a list + + Returns + ------- + str + """ + return self["bordercolor"] + + @bordercolor.setter + def bordercolor(self, val): + self["bordercolor"] = val + + @property + def borderwidth(self): + """ + Sets the width (in px) or the border enclosing this color bar. + + The 'borderwidth' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["borderwidth"] + + @borderwidth.setter + def borderwidth(self, val): + self["borderwidth"] = val + + @property + def dtick(self): + """ + Sets the step in-between ticks on this axis. Use with `tick0`. + Must be a positive number, or special strings available to + "log" and "date" axes. If the axis `type` is "log", then ticks + are set every 10^(n*dtick) where n is the tick number. For + example, to set a tick mark at 1, 10, 100, 1000, ... set dtick + to 1. To set tick marks at 1, 100, 10000, ... set dtick to 2. + To set tick marks at 1, 5, 25, 125, 625, 3125, ... set dtick to + log_10(5), or 0.69897000433. "log" has several special values; + "L", where `f` is a positive number, gives ticks linearly + spaced in value (but not position). For example `tick0` = 0.1, + `dtick` = "L0.5" will put ticks at 0.1, 0.6, 1.1, 1.6 etc. To + show powers of 10 plus small digits between, use "D1" (all + digits) or "D2" (only 2 and 5). `tick0` is ignored for "D1" and + "D2". If the axis `type` is "date", then you must convert the + time to milliseconds. For example, to set the interval between + ticks to one day, set `dtick` to 86400000.0. "date" also has + special values "M" gives ticks spaced by a number of months. + `n` must be a positive integer. To set ticks on the 15th of + every third month, set `tick0` to "2000-01-15" and `dtick` to + "M3". To set ticks every 4 years, set `dtick` to "M48" + + The 'dtick' property accepts values of any type + + Returns + ------- + Any + """ + return self["dtick"] + + @dtick.setter + def dtick(self, val): + self["dtick"] = val + + @property + def exponentformat(self): + """ + Determines a formatting rule for the tick exponents. For + example, consider the number 1,000,000,000. If "none", it + appears as 1,000,000,000. If "e", 1e+9. If "E", 1E+9. If + "power", 1x10^9 (with 9 in a super script). If "SI", 1G. If + "B", 1B. "SI" uses prefixes from "femto" f (10^-15) to "tera" T + (10^12). *SI extended* covers instead the full SI range from + "quecto" q (10^-30) to "quetta" Q (10^30). If "SI" or *SI + extended* is used and the exponent is beyond the above ranges, + the formatting rule will automatically be switched to the power + notation. + + The 'exponentformat' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['none', 'e', 'E', 'power', 'SI', 'B', 'SI extended'] + + Returns + ------- + Any + """ + return self["exponentformat"] + + @exponentformat.setter + def exponentformat(self, val): + self["exponentformat"] = val + + @property + def labelalias(self): + """ + Replacement text for specific tick or hover labels. For example + using {US: 'USA', CA: 'Canada'} changes US to USA and CA to + Canada. The labels we would have shown must match the keys + exactly, after adding any tickprefix or ticksuffix. For + negative numbers the minus sign symbol used (U+2212) is wider + than the regular ascii dash. That means you need to use −1 + instead of -1. labelalias can be used with any axis type, and + both keys (if needed) and values (if desired) can include html- + like tags or MathJax. + + The 'labelalias' property accepts values of any type + + Returns + ------- + Any + """ + return self["labelalias"] + + @labelalias.setter + def labelalias(self, val): + self["labelalias"] = val + + @property + def len(self): + """ + Sets the length of the color bar This measure excludes the + padding of both ends. That is, the color bar length is this + length minus the padding on both ends. + + The 'len' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["len"] + + @len.setter + def len(self, val): + self["len"] = val + + @property + def lenmode(self): + """ + Determines whether this color bar's length (i.e. the measure in + the color variation direction) is set in units of plot + "fraction" or in *pixels. Use `len` to set the value. + + The 'lenmode' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['fraction', 'pixels'] + + Returns + ------- + Any + """ + return self["lenmode"] + + @lenmode.setter + def lenmode(self, val): + self["lenmode"] = val + + @property + def minexponent(self): + """ + Hide SI prefix for 10^n if |n| is below this number. This only + has an effect when `tickformat` is "SI" or "B". + + The 'minexponent' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["minexponent"] + + @minexponent.setter + def minexponent(self, val): + self["minexponent"] = val + + @property + def nticks(self): + """ + Specifies the maximum number of ticks for the particular axis. + The actual number of ticks will be chosen automatically to be + less than or equal to `nticks`. Has an effect only if + `tickmode` is set to "auto". + + The 'nticks' property is a integer and may be specified as: + - An int (or float that will be cast to an int) + in the interval [0, 9223372036854775807] + + Returns + ------- + int + """ + return self["nticks"] + + @nticks.setter + def nticks(self, val): + self["nticks"] = val + + @property + def orientation(self): + """ + Sets the orientation of the colorbar. + + The 'orientation' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['h', 'v'] + + Returns + ------- + Any + """ + return self["orientation"] + + @orientation.setter + def orientation(self, val): + self["orientation"] = val + + @property + def outlinecolor(self): + """ + Sets the axis line color. + + The 'outlinecolor' property is a color and may be specified as: + - A hex string (e.g. '#ff0000') + - An rgb/rgba string (e.g. 'rgb(255,0,0)') + - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') + - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') + - A named CSS color: see https://plotly.com/python/css-colors/ for a list + + Returns + ------- + str + """ + return self["outlinecolor"] + + @outlinecolor.setter + def outlinecolor(self, val): + self["outlinecolor"] = val + + @property + def outlinewidth(self): + """ + Sets the width (in px) of the axis line. + + The 'outlinewidth' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["outlinewidth"] + + @outlinewidth.setter + def outlinewidth(self, val): + self["outlinewidth"] = val + + @property + def separatethousands(self): + """ + If "true", even 4-digit integers are separated + + The 'separatethousands' property is a boolean and must be specified as: + - A boolean value: True or False + + Returns + ------- + bool + """ + return self["separatethousands"] + + @separatethousands.setter + def separatethousands(self, val): + self["separatethousands"] = val + + @property + def showexponent(self): + """ + If "all", all exponents are shown besides their significands. + If "first", only the exponent of the first tick is shown. If + "last", only the exponent of the last tick is shown. If "none", + no exponents appear. + + The 'showexponent' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['all', 'first', 'last', 'none'] + + Returns + ------- + Any + """ + return self["showexponent"] + + @showexponent.setter + def showexponent(self, val): + self["showexponent"] = val + + @property + def showticklabels(self): + """ + Determines whether or not the tick labels are drawn. + + The 'showticklabels' property is a boolean and must be specified as: + - A boolean value: True or False + + Returns + ------- + bool + """ + return self["showticklabels"] + + @showticklabels.setter + def showticklabels(self, val): + self["showticklabels"] = val + + @property + def showtickprefix(self): + """ + If "all", all tick labels are displayed with a prefix. If + "first", only the first tick is displayed with a prefix. If + "last", only the last tick is displayed with a suffix. If + "none", tick prefixes are hidden. + + The 'showtickprefix' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['all', 'first', 'last', 'none'] + + Returns + ------- + Any + """ + return self["showtickprefix"] + + @showtickprefix.setter + def showtickprefix(self, val): + self["showtickprefix"] = val + + @property + def showticksuffix(self): + """ + Same as `showtickprefix` but for tick suffixes. + + The 'showticksuffix' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['all', 'first', 'last', 'none'] + + Returns + ------- + Any + """ + return self["showticksuffix"] + + @showticksuffix.setter + def showticksuffix(self, val): + self["showticksuffix"] = val + + @property + def thickness(self): + """ + Sets the thickness of the color bar This measure excludes the + size of the padding, ticks and labels. + + The 'thickness' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["thickness"] + + @thickness.setter + def thickness(self, val): + self["thickness"] = val + + @property + def thicknessmode(self): + """ + Determines whether this color bar's thickness (i.e. the measure + in the constant color direction) is set in units of plot + "fraction" or in "pixels". Use `thickness` to set the value. + + The 'thicknessmode' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['fraction', 'pixels'] + + Returns + ------- + Any + """ + return self["thicknessmode"] + + @thicknessmode.setter + def thicknessmode(self, val): + self["thicknessmode"] = val + + @property + def tick0(self): + """ + Sets the placement of the first tick on this axis. Use with + `dtick`. If the axis `type` is "log", then you must take the + log of your starting tick (e.g. to set the starting tick to + 100, set the `tick0` to 2) except when `dtick`=*L* (see + `dtick` for more info). If the axis `type` is "date", it should + be a date string, like date data. If the axis `type` is + "category", it should be a number, using the scale where each + category is assigned a serial number from zero in the order it + appears. + + The 'tick0' property accepts values of any type + + Returns + ------- + Any + """ + return self["tick0"] + + @tick0.setter + def tick0(self, val): + self["tick0"] = val + + @property + def tickangle(self): + """ + Sets the angle of the tick labels with respect to the + horizontal. For example, a `tickangle` of -90 draws the tick + labels vertically. + + The 'tickangle' property is a angle (in degrees) that may be + specified as a number between -180 and 180. + Numeric values outside this range are converted to the equivalent value + (e.g. 270 is converted to -90). + + Returns + ------- + int|float + """ + return self["tickangle"] + + @tickangle.setter + def tickangle(self, val): + self["tickangle"] = val + + @property + def tickcolor(self): + """ + Sets the tick color. + + The 'tickcolor' property is a color and may be specified as: + - A hex string (e.g. '#ff0000') + - An rgb/rgba string (e.g. 'rgb(255,0,0)') + - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') + - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') + - A named CSS color: see https://plotly.com/python/css-colors/ for a list + + Returns + ------- + str + """ + return self["tickcolor"] + + @tickcolor.setter + def tickcolor(self, val): + self["tickcolor"] = val + + @property + def tickfont(self): + """ + Sets the color bar's tick label font + + The 'tickfont' property is an instance of Tickfont + that may be specified as: + - An instance of :class:`plotly.graph_objs.bar.marker.colorbar.Tickfont` + - A dict of string/value properties that will be passed + to the Tickfont constructor + + Returns + ------- + plotly.graph_objs.bar.marker.colorbar.Tickfont + """ + return self["tickfont"] + + @tickfont.setter + def tickfont(self, val): + self["tickfont"] = val + + @property + def tickformat(self): + """ + Sets the tick label formatting rule using d3 formatting mini- + languages which are very similar to those in Python. For + numbers, see: + https://github.com/d3/d3-format/tree/v1.4.5#d3-format. And for + dates see: https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format. We add two items to d3's date + formatter: "%h" for half of the year as a decimal number as + well as "%{n}f" for fractional seconds with n digits. For + example, *2016-10-13 09:15:23.456* with tickformat + "%H~%M~%S.%2f" would display "09~15~23.46" + + The 'tickformat' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["tickformat"] + + @tickformat.setter + def tickformat(self, val): + self["tickformat"] = val + + @property + def tickformatstops(self): + """ + The 'tickformatstops' property is a tuple of instances of + Tickformatstop that may be specified as: + - A list or tuple of instances of plotly.graph_objs.bar.marker.colorbar.Tickformatstop + - A list or tuple of dicts of string/value properties that + will be passed to the Tickformatstop constructor + + Returns + ------- + tuple[plotly.graph_objs.bar.marker.colorbar.Tickformatstop] + """ + return self["tickformatstops"] + + @tickformatstops.setter + def tickformatstops(self, val): + self["tickformatstops"] = val + + @property + def tickformatstopdefaults(self): + """ + When used in a template (as layout.template.data.bar.marker.col + orbar.tickformatstopdefaults), sets the default property values + to use for elements of bar.marker.colorbar.tickformatstops + + The 'tickformatstopdefaults' property is an instance of Tickformatstop + that may be specified as: + - An instance of :class:`plotly.graph_objs.bar.marker.colorbar.Tickformatstop` + - A dict of string/value properties that will be passed + to the Tickformatstop constructor + + Returns + ------- + plotly.graph_objs.bar.marker.colorbar.Tickformatstop + """ + return self["tickformatstopdefaults"] + + @tickformatstopdefaults.setter + def tickformatstopdefaults(self, val): + self["tickformatstopdefaults"] = val + + @property + def ticklabeloverflow(self): + """ + Determines how we handle tick labels that would overflow either + the graph div or the domain of the axis. The default value for + inside tick labels is *hide past domain*. In other cases the + default is *hide past div*. + + The 'ticklabeloverflow' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['allow', 'hide past div', 'hide past domain'] + + Returns + ------- + Any + """ + return self["ticklabeloverflow"] + + @ticklabeloverflow.setter + def ticklabeloverflow(self, val): + self["ticklabeloverflow"] = val + + @property + def ticklabelposition(self): + """ + Determines where tick labels are drawn relative to the ticks. + Left and right options are used when `orientation` is "h", top + and bottom when `orientation` is "v". + + The 'ticklabelposition' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['outside', 'inside', 'outside top', 'inside top', + 'outside left', 'inside left', 'outside right', 'inside + right', 'outside bottom', 'inside bottom'] + + Returns + ------- + Any + """ + return self["ticklabelposition"] + + @ticklabelposition.setter + def ticklabelposition(self, val): + self["ticklabelposition"] = val + + @property + def ticklabelstep(self): + """ + Sets the spacing between tick labels as compared to the spacing + between ticks. A value of 1 (default) means each tick gets a + label. A value of 2 means shows every 2nd label. A larger value + n means only every nth tick is labeled. `tick0` determines + which labels are shown. Not implemented for axes with `type` + "log" or "multicategory", or when `tickmode` is "array". + + The 'ticklabelstep' property is a integer and may be specified as: + - An int (or float that will be cast to an int) + in the interval [1, 9223372036854775807] + + Returns + ------- + int + """ + return self["ticklabelstep"] + + @ticklabelstep.setter + def ticklabelstep(self, val): + self["ticklabelstep"] = val + + @property + def ticklen(self): + """ + Sets the tick length (in px). + + The 'ticklen' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["ticklen"] + + @ticklen.setter + def ticklen(self, val): + self["ticklen"] = val + + @property + def tickmode(self): + """ + Sets the tick mode for this axis. If "auto", the number of + ticks is set via `nticks`. If "linear", the placement of the + ticks is determined by a starting position `tick0` and a tick + step `dtick` ("linear" is the default value if `tick0` and + `dtick` are provided). If "array", the placement of the ticks + is set via `tickvals` and the tick text is `ticktext`. ("array" + is the default value if `tickvals` is provided). + + The 'tickmode' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['auto', 'linear', 'array'] + + Returns + ------- + Any + """ + return self["tickmode"] + + @tickmode.setter + def tickmode(self, val): + self["tickmode"] = val + + @property + def tickprefix(self): + """ + Sets a tick label prefix. + + The 'tickprefix' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["tickprefix"] + + @tickprefix.setter + def tickprefix(self, val): + self["tickprefix"] = val + + @property + def ticks(self): + """ + Determines whether ticks are drawn or not. If "", this axis' + ticks are not drawn. If "outside" ("inside"), this axis' are + drawn outside (inside) the axis lines. + + The 'ticks' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['outside', 'inside', ''] + + Returns + ------- + Any + """ + return self["ticks"] + + @ticks.setter + def ticks(self, val): + self["ticks"] = val + + @property + def ticksuffix(self): + """ + Sets a tick label suffix. + + The 'ticksuffix' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["ticksuffix"] + + @ticksuffix.setter + def ticksuffix(self, val): + self["ticksuffix"] = val + + @property + def ticktext(self): + """ + Sets the text displayed at the ticks position via `tickvals`. + Only has an effect if `tickmode` is set to "array". Used with + `tickvals`. + + The 'ticktext' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["ticktext"] + + @ticktext.setter + def ticktext(self, val): + self["ticktext"] = val + + @property + def ticktextsrc(self): + """ + Sets the source reference on Chart Studio Cloud for `ticktext`. + + The 'ticktextsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["ticktextsrc"] + + @ticktextsrc.setter + def ticktextsrc(self, val): + self["ticktextsrc"] = val + + @property + def tickvals(self): + """ + Sets the values at which ticks on this axis appear. Only has an + effect if `tickmode` is set to "array". Used with `ticktext`. + + The 'tickvals' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["tickvals"] + + @tickvals.setter + def tickvals(self, val): + self["tickvals"] = val + + @property + def tickvalssrc(self): + """ + Sets the source reference on Chart Studio Cloud for `tickvals`. + + The 'tickvalssrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["tickvalssrc"] + + @tickvalssrc.setter + def tickvalssrc(self, val): + self["tickvalssrc"] = val + + @property + def tickwidth(self): + """ + Sets the tick width (in px). + + The 'tickwidth' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["tickwidth"] + + @tickwidth.setter + def tickwidth(self, val): + self["tickwidth"] = val + + @property + def title(self): + """ + The 'title' property is an instance of Title + that may be specified as: + - An instance of :class:`plotly.graph_objs.bar.marker.colorbar.Title` + - A dict of string/value properties that will be passed + to the Title constructor + + Returns + ------- + plotly.graph_objs.bar.marker.colorbar.Title + """ + return self["title"] + + @title.setter + def title(self, val): + self["title"] = val + + @property + def x(self): + """ + Sets the x position with respect to `xref` of the color bar (in + plot fraction). When `xref` is "paper", defaults to 1.02 when + `orientation` is "v" and 0.5 when `orientation` is "h". When + `xref` is "container", defaults to 1 when `orientation` is "v" + and 0.5 when `orientation` is "h". Must be between 0 and 1 if + `xref` is "container" and between "-2" and 3 if `xref` is + "paper". + + The 'x' property is a number and may be specified as: + - An int or float + + Returns + ------- + int|float + """ + return self["x"] + + @x.setter + def x(self, val): + self["x"] = val + + @property + def xanchor(self): + """ + Sets this color bar's horizontal position anchor. This anchor + binds the `x` position to the "left", "center" or "right" of + the color bar. Defaults to "left" when `orientation` is "v" and + "center" when `orientation` is "h". + + The 'xanchor' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['left', 'center', 'right'] + + Returns + ------- + Any + """ + return self["xanchor"] + + @xanchor.setter + def xanchor(self, val): + self["xanchor"] = val + + @property + def xpad(self): + """ + Sets the amount of padding (in px) along the x direction. + + The 'xpad' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["xpad"] + + @xpad.setter + def xpad(self, val): + self["xpad"] = val + + @property + def xref(self): + """ + Sets the container `x` refers to. "container" spans the entire + `width` of the plot. "paper" refers to the width of the + plotting area only. + + The 'xref' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['container', 'paper'] + + Returns + ------- + Any + """ + return self["xref"] + + @xref.setter + def xref(self, val): + self["xref"] = val + + @property + def y(self): + """ + Sets the y position with respect to `yref` of the color bar (in + plot fraction). When `yref` is "paper", defaults to 0.5 when + `orientation` is "v" and 1.02 when `orientation` is "h". When + `yref` is "container", defaults to 0.5 when `orientation` is + "v" and 1 when `orientation` is "h". Must be between 0 and 1 if + `yref` is "container" and between "-2" and 3 if `yref` is + "paper". + + The 'y' property is a number and may be specified as: + - An int or float + + Returns + ------- + int|float + """ + return self["y"] + + @y.setter + def y(self, val): + self["y"] = val + + @property + def yanchor(self): + """ + Sets this color bar's vertical position anchor This anchor + binds the `y` position to the "top", "middle" or "bottom" of + the color bar. Defaults to "middle" when `orientation` is "v" + and "bottom" when `orientation` is "h". + + The 'yanchor' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['top', 'middle', 'bottom'] + + Returns + ------- + Any + """ + return self["yanchor"] + + @yanchor.setter + def yanchor(self, val): + self["yanchor"] = val + + @property + def ypad(self): + """ + Sets the amount of padding (in px) along the y direction. + + The 'ypad' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["ypad"] + + @ypad.setter + def ypad(self, val): + self["ypad"] = val + + @property + def yref(self): + """ + Sets the container `y` refers to. "container" spans the entire + `height` of the plot. "paper" refers to the height of the + plotting area only. + + The 'yref' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['container', 'paper'] + + Returns + ------- + Any + """ + return self["yref"] + + @yref.setter + def yref(self, val): + self["yref"] = val + + @property + def _prop_descriptions(self): + return """\ + bgcolor + Sets the color of padded area. + bordercolor + Sets the axis line color. + borderwidth + Sets the width (in px) or the border enclosing this + color bar. + dtick + Sets the step in-between ticks on this axis. Use with + `tick0`. Must be a positive number, or special strings + available to "log" and "date" axes. If the axis `type` + is "log", then ticks are set every 10^(n*dtick) where n + is the tick number. For example, to set a tick mark at + 1, 10, 100, 1000, ... set dtick to 1. To set tick marks + at 1, 100, 10000, ... set dtick to 2. To set tick marks + at 1, 5, 25, 125, 625, 3125, ... set dtick to + log_10(5), or 0.69897000433. "log" has several special + values; "L", where `f` is a positive number, gives + ticks linearly spaced in value (but not position). For + example `tick0` = 0.1, `dtick` = "L0.5" will put ticks + at 0.1, 0.6, 1.1, 1.6 etc. To show powers of 10 plus + small digits between, use "D1" (all digits) or "D2" + (only 2 and 5). `tick0` is ignored for "D1" and "D2". + If the axis `type` is "date", then you must convert the + time to milliseconds. For example, to set the interval + between ticks to one day, set `dtick` to 86400000.0. + "date" also has special values "M" gives ticks + spaced by a number of months. `n` must be a positive + integer. To set ticks on the 15th of every third month, + set `tick0` to "2000-01-15" and `dtick` to "M3". To set + ticks every 4 years, set `dtick` to "M48" + exponentformat + Determines a formatting rule for the tick exponents. + For example, consider the number 1,000,000,000. If + "none", it appears as 1,000,000,000. If "e", 1e+9. If + "E", 1E+9. If "power", 1x10^9 (with 9 in a super + script). If "SI", 1G. If "B", 1B. "SI" uses prefixes + from "femto" f (10^-15) to "tera" T (10^12). *SI + extended* covers instead the full SI range from + "quecto" q (10^-30) to "quetta" Q (10^30). If "SI" or + *SI extended* is used and the exponent is beyond the + above ranges, the formatting rule will automatically be + switched to the power notation. + labelalias + Replacement text for specific tick or hover labels. For + example using {US: 'USA', CA: 'Canada'} changes US to + USA and CA to Canada. The labels we would have shown + must match the keys exactly, after adding any + tickprefix or ticksuffix. For negative numbers the + minus sign symbol used (U+2212) is wider than the + regular ascii dash. That means you need to use −1 + instead of -1. labelalias can be used with any axis + type, and both keys (if needed) and values (if desired) + can include html-like tags or MathJax. + len + Sets the length of the color bar This measure excludes + the padding of both ends. That is, the color bar length + is this length minus the padding on both ends. + lenmode + Determines whether this color bar's length (i.e. the + measure in the color variation direction) is set in + units of plot "fraction" or in *pixels. Use `len` to + set the value. + minexponent + Hide SI prefix for 10^n if |n| is below this number. + This only has an effect when `tickformat` is "SI" or + "B". + nticks + Specifies the maximum number of ticks for the + particular axis. The actual number of ticks will be + chosen automatically to be less than or equal to + `nticks`. Has an effect only if `tickmode` is set to + "auto". + orientation + Sets the orientation of the colorbar. + outlinecolor + Sets the axis line color. + outlinewidth + Sets the width (in px) of the axis line. + separatethousands + If "true", even 4-digit integers are separated + showexponent + If "all", all exponents are shown besides their + significands. If "first", only the exponent of the + first tick is shown. If "last", only the exponent of + the last tick is shown. If "none", no exponents appear. + showticklabels + Determines whether or not the tick labels are drawn. + showtickprefix + If "all", all tick labels are displayed with a prefix. + If "first", only the first tick is displayed with a + prefix. If "last", only the last tick is displayed with + a suffix. If "none", tick prefixes are hidden. + showticksuffix + Same as `showtickprefix` but for tick suffixes. + thickness + Sets the thickness of the color bar This measure + excludes the size of the padding, ticks and labels. + thicknessmode + Determines whether this color bar's thickness (i.e. the + measure in the constant color direction) is set in + units of plot "fraction" or in "pixels". Use + `thickness` to set the value. + tick0 + Sets the placement of the first tick on this axis. Use + with `dtick`. If the axis `type` is "log", then you + must take the log of your starting tick (e.g. to set + the starting tick to 100, set the `tick0` to 2) except + when `dtick`=*L* (see `dtick` for more info). If the + axis `type` is "date", it should be a date string, like + date data. If the axis `type` is "category", it should + be a number, using the scale where each category is + assigned a serial number from zero in the order it + appears. + tickangle + Sets the angle of the tick labels with respect to the + horizontal. For example, a `tickangle` of -90 draws the + tick labels vertically. + tickcolor + Sets the tick color. + tickfont + Sets the color bar's tick label font + tickformat + Sets the tick label formatting rule using d3 formatting + mini-languages which are very similar to those in + Python. For numbers, see: + https://github.com/d3/d3-format/tree/v1.4.5#d3-format. + And for dates see: https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format. We add two items to + d3's date formatter: "%h" for half of the year as a + decimal number as well as "%{n}f" for fractional + seconds with n digits. For example, *2016-10-13 + 09:15:23.456* with tickformat "%H~%M~%S.%2f" would + display "09~15~23.46" + tickformatstops + A tuple of :class:`plotly.graph_objects.bar.marker.colo + rbar.Tickformatstop` instances or dicts with compatible + properties + tickformatstopdefaults + When used in a template (as layout.template.data.bar.ma + rker.colorbar.tickformatstopdefaults), sets the default + property values to use for elements of + bar.marker.colorbar.tickformatstops + ticklabeloverflow + Determines how we handle tick labels that would + overflow either the graph div or the domain of the + axis. The default value for inside tick labels is *hide + past domain*. In other cases the default is *hide past + div*. + ticklabelposition + Determines where tick labels are drawn relative to the + ticks. Left and right options are used when + `orientation` is "h", top and bottom when `orientation` + is "v". + ticklabelstep + Sets the spacing between tick labels as compared to the + spacing between ticks. A value of 1 (default) means + each tick gets a label. A value of 2 means shows every + 2nd label. A larger value n means only every nth tick + is labeled. `tick0` determines which labels are shown. + Not implemented for axes with `type` "log" or + "multicategory", or when `tickmode` is "array". + ticklen + Sets the tick length (in px). + tickmode + Sets the tick mode for this axis. If "auto", the number + of ticks is set via `nticks`. If "linear", the + placement of the ticks is determined by a starting + position `tick0` and a tick step `dtick` ("linear" is + the default value if `tick0` and `dtick` are provided). + If "array", the placement of the ticks is set via + `tickvals` and the tick text is `ticktext`. ("array" is + the default value if `tickvals` is provided). + tickprefix + Sets a tick label prefix. + ticks + Determines whether ticks are drawn or not. If "", this + axis' ticks are not drawn. If "outside" ("inside"), + this axis' are drawn outside (inside) the axis lines. + ticksuffix + Sets a tick label suffix. + ticktext + Sets the text displayed at the ticks position via + `tickvals`. Only has an effect if `tickmode` is set to + "array". Used with `tickvals`. + ticktextsrc + Sets the source reference on Chart Studio Cloud for + `ticktext`. + tickvals + Sets the values at which ticks on this axis appear. + Only has an effect if `tickmode` is set to "array". + Used with `ticktext`. + tickvalssrc + Sets the source reference on Chart Studio Cloud for + `tickvals`. + tickwidth + Sets the tick width (in px). + title + :class:`plotly.graph_objects.bar.marker.colorbar.Title` + instance or dict with compatible properties + x + Sets the x position with respect to `xref` of the color + bar (in plot fraction). When `xref` is "paper", + defaults to 1.02 when `orientation` is "v" and 0.5 when + `orientation` is "h". When `xref` is "container", + defaults to 1 when `orientation` is "v" and 0.5 when + `orientation` is "h". Must be between 0 and 1 if `xref` + is "container" and between "-2" and 3 if `xref` is + "paper". + xanchor + Sets this color bar's horizontal position anchor. This + anchor binds the `x` position to the "left", "center" + or "right" of the color bar. Defaults to "left" when + `orientation` is "v" and "center" when `orientation` is + "h". + xpad + Sets the amount of padding (in px) along the x + direction. + xref + Sets the container `x` refers to. "container" spans the + entire `width` of the plot. "paper" refers to the width + of the plotting area only. + y + Sets the y position with respect to `yref` of the color + bar (in plot fraction). When `yref` is "paper", + defaults to 0.5 when `orientation` is "v" and 1.02 when + `orientation` is "h". When `yref` is "container", + defaults to 0.5 when `orientation` is "v" and 1 when + `orientation` is "h". Must be between 0 and 1 if `yref` + is "container" and between "-2" and 3 if `yref` is + "paper". + yanchor + Sets this color bar's vertical position anchor This + anchor binds the `y` position to the "top", "middle" or + "bottom" of the color bar. Defaults to "middle" when + `orientation` is "v" and "bottom" when `orientation` is + "h". + ypad + Sets the amount of padding (in px) along the y + direction. + yref + Sets the container `y` refers to. "container" spans the + entire `height` of the plot. "paper" refers to the + height of the plotting area only. + """ + + def __init__( + self, + arg=None, + bgcolor=None, + bordercolor=None, + borderwidth=None, + dtick=None, + exponentformat=None, + labelalias=None, + len=None, + lenmode=None, + minexponent=None, + nticks=None, + orientation=None, + outlinecolor=None, + outlinewidth=None, + separatethousands=None, + showexponent=None, + showticklabels=None, + showtickprefix=None, + showticksuffix=None, + thickness=None, + thicknessmode=None, + tick0=None, + tickangle=None, + tickcolor=None, + tickfont=None, + tickformat=None, + tickformatstops=None, + tickformatstopdefaults=None, + ticklabeloverflow=None, + ticklabelposition=None, + ticklabelstep=None, + ticklen=None, + tickmode=None, + tickprefix=None, + ticks=None, + ticksuffix=None, + ticktext=None, + ticktextsrc=None, + tickvals=None, + tickvalssrc=None, + tickwidth=None, + title=None, + x=None, + xanchor=None, + xpad=None, + xref=None, + y=None, + yanchor=None, + ypad=None, + yref=None, + **kwargs, + ): + """ + Construct a new ColorBar object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.bar.marker.ColorBar` + bgcolor + Sets the color of padded area. + bordercolor + Sets the axis line color. + borderwidth + Sets the width (in px) or the border enclosing this + color bar. + dtick + Sets the step in-between ticks on this axis. Use with + `tick0`. Must be a positive number, or special strings + available to "log" and "date" axes. If the axis `type` + is "log", then ticks are set every 10^(n*dtick) where n + is the tick number. For example, to set a tick mark at + 1, 10, 100, 1000, ... set dtick to 1. To set tick marks + at 1, 100, 10000, ... set dtick to 2. To set tick marks + at 1, 5, 25, 125, 625, 3125, ... set dtick to + log_10(5), or 0.69897000433. "log" has several special + values; "L", where `f` is a positive number, gives + ticks linearly spaced in value (but not position). For + example `tick0` = 0.1, `dtick` = "L0.5" will put ticks + at 0.1, 0.6, 1.1, 1.6 etc. To show powers of 10 plus + small digits between, use "D1" (all digits) or "D2" + (only 2 and 5). `tick0` is ignored for "D1" and "D2". + If the axis `type` is "date", then you must convert the + time to milliseconds. For example, to set the interval + between ticks to one day, set `dtick` to 86400000.0. + "date" also has special values "M" gives ticks + spaced by a number of months. `n` must be a positive + integer. To set ticks on the 15th of every third month, + set `tick0` to "2000-01-15" and `dtick` to "M3". To set + ticks every 4 years, set `dtick` to "M48" + exponentformat + Determines a formatting rule for the tick exponents. + For example, consider the number 1,000,000,000. If + "none", it appears as 1,000,000,000. If "e", 1e+9. If + "E", 1E+9. If "power", 1x10^9 (with 9 in a super + script). If "SI", 1G. If "B", 1B. "SI" uses prefixes + from "femto" f (10^-15) to "tera" T (10^12). *SI + extended* covers instead the full SI range from + "quecto" q (10^-30) to "quetta" Q (10^30). If "SI" or + *SI extended* is used and the exponent is beyond the + above ranges, the formatting rule will automatically be + switched to the power notation. + labelalias + Replacement text for specific tick or hover labels. For + example using {US: 'USA', CA: 'Canada'} changes US to + USA and CA to Canada. The labels we would have shown + must match the keys exactly, after adding any + tickprefix or ticksuffix. For negative numbers the + minus sign symbol used (U+2212) is wider than the + regular ascii dash. That means you need to use −1 + instead of -1. labelalias can be used with any axis + type, and both keys (if needed) and values (if desired) + can include html-like tags or MathJax. + len + Sets the length of the color bar This measure excludes + the padding of both ends. That is, the color bar length + is this length minus the padding on both ends. + lenmode + Determines whether this color bar's length (i.e. the + measure in the color variation direction) is set in + units of plot "fraction" or in *pixels. Use `len` to + set the value. + minexponent + Hide SI prefix for 10^n if |n| is below this number. + This only has an effect when `tickformat` is "SI" or + "B". + nticks + Specifies the maximum number of ticks for the + particular axis. The actual number of ticks will be + chosen automatically to be less than or equal to + `nticks`. Has an effect only if `tickmode` is set to + "auto". + orientation + Sets the orientation of the colorbar. + outlinecolor + Sets the axis line color. + outlinewidth + Sets the width (in px) of the axis line. + separatethousands + If "true", even 4-digit integers are separated + showexponent + If "all", all exponents are shown besides their + significands. If "first", only the exponent of the + first tick is shown. If "last", only the exponent of + the last tick is shown. If "none", no exponents appear. + showticklabels + Determines whether or not the tick labels are drawn. + showtickprefix + If "all", all tick labels are displayed with a prefix. + If "first", only the first tick is displayed with a + prefix. If "last", only the last tick is displayed with + a suffix. If "none", tick prefixes are hidden. + showticksuffix + Same as `showtickprefix` but for tick suffixes. + thickness + Sets the thickness of the color bar This measure + excludes the size of the padding, ticks and labels. + thicknessmode + Determines whether this color bar's thickness (i.e. the + measure in the constant color direction) is set in + units of plot "fraction" or in "pixels". Use + `thickness` to set the value. + tick0 + Sets the placement of the first tick on this axis. Use + with `dtick`. If the axis `type` is "log", then you + must take the log of your starting tick (e.g. to set + the starting tick to 100, set the `tick0` to 2) except + when `dtick`=*L* (see `dtick` for more info). If the + axis `type` is "date", it should be a date string, like + date data. If the axis `type` is "category", it should + be a number, using the scale where each category is + assigned a serial number from zero in the order it + appears. + tickangle + Sets the angle of the tick labels with respect to the + horizontal. For example, a `tickangle` of -90 draws the + tick labels vertically. + tickcolor + Sets the tick color. + tickfont + Sets the color bar's tick label font + tickformat + Sets the tick label formatting rule using d3 formatting + mini-languages which are very similar to those in + Python. For numbers, see: + https://github.com/d3/d3-format/tree/v1.4.5#d3-format. + And for dates see: https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format. We add two items to + d3's date formatter: "%h" for half of the year as a + decimal number as well as "%{n}f" for fractional + seconds with n digits. For example, *2016-10-13 + 09:15:23.456* with tickformat "%H~%M~%S.%2f" would + display "09~15~23.46" + tickformatstops + A tuple of :class:`plotly.graph_objects.bar.marker.colo + rbar.Tickformatstop` instances or dicts with compatible + properties + tickformatstopdefaults + When used in a template (as layout.template.data.bar.ma + rker.colorbar.tickformatstopdefaults), sets the default + property values to use for elements of + bar.marker.colorbar.tickformatstops + ticklabeloverflow + Determines how we handle tick labels that would + overflow either the graph div or the domain of the + axis. The default value for inside tick labels is *hide + past domain*. In other cases the default is *hide past + div*. + ticklabelposition + Determines where tick labels are drawn relative to the + ticks. Left and right options are used when + `orientation` is "h", top and bottom when `orientation` + is "v". + ticklabelstep + Sets the spacing between tick labels as compared to the + spacing between ticks. A value of 1 (default) means + each tick gets a label. A value of 2 means shows every + 2nd label. A larger value n means only every nth tick + is labeled. `tick0` determines which labels are shown. + Not implemented for axes with `type` "log" or + "multicategory", or when `tickmode` is "array". + ticklen + Sets the tick length (in px). + tickmode + Sets the tick mode for this axis. If "auto", the number + of ticks is set via `nticks`. If "linear", the + placement of the ticks is determined by a starting + position `tick0` and a tick step `dtick` ("linear" is + the default value if `tick0` and `dtick` are provided). + If "array", the placement of the ticks is set via + `tickvals` and the tick text is `ticktext`. ("array" is + the default value if `tickvals` is provided). + tickprefix + Sets a tick label prefix. + ticks + Determines whether ticks are drawn or not. If "", this + axis' ticks are not drawn. If "outside" ("inside"), + this axis' are drawn outside (inside) the axis lines. + ticksuffix + Sets a tick label suffix. + ticktext + Sets the text displayed at the ticks position via + `tickvals`. Only has an effect if `tickmode` is set to + "array". Used with `tickvals`. + ticktextsrc + Sets the source reference on Chart Studio Cloud for + `ticktext`. + tickvals + Sets the values at which ticks on this axis appear. + Only has an effect if `tickmode` is set to "array". + Used with `ticktext`. + tickvalssrc + Sets the source reference on Chart Studio Cloud for + `tickvals`. + tickwidth + Sets the tick width (in px). + title + :class:`plotly.graph_objects.bar.marker.colorbar.Title` + instance or dict with compatible properties + x + Sets the x position with respect to `xref` of the color + bar (in plot fraction). When `xref` is "paper", + defaults to 1.02 when `orientation` is "v" and 0.5 when + `orientation` is "h". When `xref` is "container", + defaults to 1 when `orientation` is "v" and 0.5 when + `orientation` is "h". Must be between 0 and 1 if `xref` + is "container" and between "-2" and 3 if `xref` is + "paper". + xanchor + Sets this color bar's horizontal position anchor. This + anchor binds the `x` position to the "left", "center" + or "right" of the color bar. Defaults to "left" when + `orientation` is "v" and "center" when `orientation` is + "h". + xpad + Sets the amount of padding (in px) along the x + direction. + xref + Sets the container `x` refers to. "container" spans the + entire `width` of the plot. "paper" refers to the width + of the plotting area only. + y + Sets the y position with respect to `yref` of the color + bar (in plot fraction). When `yref` is "paper", + defaults to 0.5 when `orientation` is "v" and 1.02 when + `orientation` is "h". When `yref` is "container", + defaults to 0.5 when `orientation` is "v" and 1 when + `orientation` is "h". Must be between 0 and 1 if `yref` + is "container" and between "-2" and 3 if `yref` is + "paper". + yanchor + Sets this color bar's vertical position anchor This + anchor binds the `y` position to the "top", "middle" or + "bottom" of the color bar. Defaults to "middle" when + `orientation` is "v" and "bottom" when `orientation` is + "h". + ypad + Sets the amount of padding (in px) along the y + direction. + yref + Sets the container `y` refers to. "container" spans the + entire `height` of the plot. "paper" refers to the + height of the plotting area only. + + Returns + ------- + ColorBar + """ + super().__init__("colorbar") + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + if arg is None: + arg = {} + elif isinstance(arg, self.__class__): + arg = arg.to_plotly_json() + elif isinstance(arg, dict): + arg = _copy.copy(arg) + else: + raise ValueError("""\ +The first argument to the plotly.graph_objs.bar.marker.ColorBar +constructor must be a dict or +an instance of :class:`plotly.graph_objs.bar.marker.ColorBar`""") + + self._skip_invalid = kwargs.pop("skip_invalid", False) + self._validate = kwargs.pop("_validate", True) + + self._set_property("bgcolor", arg, bgcolor) + self._set_property("bordercolor", arg, bordercolor) + self._set_property("borderwidth", arg, borderwidth) + self._set_property("dtick", arg, dtick) + self._set_property("exponentformat", arg, exponentformat) + self._set_property("labelalias", arg, labelalias) + self._set_property("len", arg, len) + self._set_property("lenmode", arg, lenmode) + self._set_property("minexponent", arg, minexponent) + self._set_property("nticks", arg, nticks) + self._set_property("orientation", arg, orientation) + self._set_property("outlinecolor", arg, outlinecolor) + self._set_property("outlinewidth", arg, outlinewidth) + self._set_property("separatethousands", arg, separatethousands) + self._set_property("showexponent", arg, showexponent) + self._set_property("showticklabels", arg, showticklabels) + self._set_property("showtickprefix", arg, showtickprefix) + self._set_property("showticksuffix", arg, showticksuffix) + self._set_property("thickness", arg, thickness) + self._set_property("thicknessmode", arg, thicknessmode) + self._set_property("tick0", arg, tick0) + self._set_property("tickangle", arg, tickangle) + self._set_property("tickcolor", arg, tickcolor) + self._set_property("tickfont", arg, tickfont) + self._set_property("tickformat", arg, tickformat) + self._set_property("tickformatstops", arg, tickformatstops) + self._set_property("tickformatstopdefaults", arg, tickformatstopdefaults) + self._set_property("ticklabeloverflow", arg, ticklabeloverflow) + self._set_property("ticklabelposition", arg, ticklabelposition) + self._set_property("ticklabelstep", arg, ticklabelstep) + self._set_property("ticklen", arg, ticklen) + self._set_property("tickmode", arg, tickmode) + self._set_property("tickprefix", arg, tickprefix) + self._set_property("ticks", arg, ticks) + self._set_property("ticksuffix", arg, ticksuffix) + self._set_property("ticktext", arg, ticktext) + self._set_property("ticktextsrc", arg, ticktextsrc) + self._set_property("tickvals", arg, tickvals) + self._set_property("tickvalssrc", arg, tickvalssrc) + self._set_property("tickwidth", arg, tickwidth) + self._set_property("title", arg, title) + self._set_property("x", arg, x) + self._set_property("xanchor", arg, xanchor) + self._set_property("xpad", arg, xpad) + self._set_property("xref", arg, xref) + self._set_property("y", arg, y) + self._set_property("yanchor", arg, yanchor) + self._set_property("ypad", arg, ypad) + self._set_property("yref", arg, yref) + self._process_kwargs(**dict(arg, **kwargs)) + self._skip_invalid = False diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/bar/marker/_line.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/bar/marker/_line.py new file mode 100644 index 0000000000000000000000000000000000000000..16afb497a21554a6b01c60e54ab6c3238e82fbd0 --- /dev/null +++ b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/bar/marker/_line.py @@ -0,0 +1,546 @@ +# --- THIS FILE IS AUTO-GENERATED --- +# Modifications will be overwitten the next time code generation run. + +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Line(_BaseTraceHierarchyType): + _parent_path_str = "bar.marker" + _path_str = "bar.marker.line" + _valid_props = { + "autocolorscale", + "cauto", + "cmax", + "cmid", + "cmin", + "color", + "coloraxis", + "colorscale", + "colorsrc", + "reversescale", + "width", + "widthsrc", + } + + @property + def autocolorscale(self): + """ + Determines whether the colorscale is a default palette + (`autocolorscale: true`) or the palette determined by + `marker.line.colorscale`. Has an effect only if in + `marker.line.color` is set to a numerical array. In case + `colorscale` is unspecified or `autocolorscale` is true, the + default palette will be chosen according to whether numbers in + the `color` array are all positive, all negative or mixed. + + The 'autocolorscale' property is a boolean and must be specified as: + - A boolean value: True or False + + Returns + ------- + bool + """ + return self["autocolorscale"] + + @autocolorscale.setter + def autocolorscale(self, val): + self["autocolorscale"] = val + + @property + def cauto(self): + """ + Determines whether or not the color domain is computed with + respect to the input data (here in `marker.line.color`) or the + bounds set in `marker.line.cmin` and `marker.line.cmax` Has an + effect only if in `marker.line.color` is set to a numerical + array. Defaults to `false` when `marker.line.cmin` and + `marker.line.cmax` are set by the user. + + The 'cauto' property is a boolean and must be specified as: + - A boolean value: True or False + + Returns + ------- + bool + """ + return self["cauto"] + + @cauto.setter + def cauto(self, val): + self["cauto"] = val + + @property + def cmax(self): + """ + Sets the upper bound of the color domain. Has an effect only if + in `marker.line.color` is set to a numerical array. Value + should have the same units as in `marker.line.color` and if + set, `marker.line.cmin` must be set as well. + + The 'cmax' property is a number and may be specified as: + - An int or float + + Returns + ------- + int|float + """ + return self["cmax"] + + @cmax.setter + def cmax(self, val): + self["cmax"] = val + + @property + def cmid(self): + """ + Sets the mid-point of the color domain by scaling + `marker.line.cmin` and/or `marker.line.cmax` to be equidistant + to this point. Has an effect only if in `marker.line.color` is + set to a numerical array. Value should have the same units as + in `marker.line.color`. Has no effect when `marker.line.cauto` + is `false`. + + The 'cmid' property is a number and may be specified as: + - An int or float + + Returns + ------- + int|float + """ + return self["cmid"] + + @cmid.setter + def cmid(self, val): + self["cmid"] = val + + @property + def cmin(self): + """ + Sets the lower bound of the color domain. Has an effect only if + in `marker.line.color` is set to a numerical array. Value + should have the same units as in `marker.line.color` and if + set, `marker.line.cmax` must be set as well. + + The 'cmin' property is a number and may be specified as: + - An int or float + + Returns + ------- + int|float + """ + return self["cmin"] + + @cmin.setter + def cmin(self, val): + self["cmin"] = val + + @property + def color(self): + """ + Sets the marker.line color. It accepts either a specific color + or an array of numbers that are mapped to the colorscale + relative to the max and min values of the array or relative to + `marker.line.cmin` and `marker.line.cmax` if set. + + The 'color' property is a color and may be specified as: + - A hex string (e.g. '#ff0000') + - An rgb/rgba string (e.g. 'rgb(255,0,0)') + - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') + - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') + - A named CSS color: see https://plotly.com/python/css-colors/ for a list + - A number that will be interpreted as a color + according to bar.marker.line.colorscale + - A list or array of any of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["color"] + + @color.setter + def color(self, val): + self["color"] = val + + @property + def coloraxis(self): + """ + Sets a reference to a shared color axis. References to these + shared color axes are "coloraxis", "coloraxis2", "coloraxis3", + etc. Settings for these shared color axes are set in the + layout, under `layout.coloraxis`, `layout.coloraxis2`, etc. + Note that multiple color scales can be linked to the same color + axis. + + The 'coloraxis' property is an identifier of a particular + subplot, of type 'coloraxis', that may be specified as: + - the string 'coloraxis' optionally followed by an integer >= 1 + (e.g. 'coloraxis', 'coloraxis1', 'coloraxis2', 'coloraxis3', etc.) + + Returns + ------- + str + """ + return self["coloraxis"] + + @coloraxis.setter + def coloraxis(self, val): + self["coloraxis"] = val + + @property + def colorscale(self): + """ + Sets the colorscale. Has an effect only if in + `marker.line.color` is set to a numerical array. The colorscale + must be an array containing arrays mapping a normalized value + to an rgb, rgba, hex, hsl, hsv, or named color string. At + minimum, a mapping for the lowest (0) and highest (1) values + are required. For example, `[[0, 'rgb(0,0,255)'], [1, + 'rgb(255,0,0)']]`. To control the bounds of the colorscale in + color space, use `marker.line.cmin` and `marker.line.cmax`. + Alternatively, `colorscale` may be a palette name string of the + following list: Blackbody,Bluered,Blues,Cividis,Earth,Electric, + Greens,Greys,Hot,Jet,Picnic,Portland,Rainbow,RdBu,Reds,Viridis, + YlGnBu,YlOrRd. + + The 'colorscale' property is a colorscale and may be + specified as: + - A list of colors that will be spaced evenly to create the colorscale. + Many predefined colorscale lists are included in the sequential, diverging, + and cyclical modules in the plotly.colors package. + - A list of 2-element lists where the first element is the + normalized color level value (starting at 0 and ending at 1), + and the second item is a valid color string. + (e.g. [[0, 'green'], [0.5, 'red'], [1.0, 'rgb(0, 0, 255)']]) + - One of the following named colorscales: + ['aggrnyl', 'agsunset', 'algae', 'amp', 'armyrose', 'balance', + 'blackbody', 'bluered', 'blues', 'blugrn', 'bluyl', 'brbg', + 'brwnyl', 'bugn', 'bupu', 'burg', 'burgyl', 'cividis', 'curl', + 'darkmint', 'deep', 'delta', 'dense', 'earth', 'edge', 'electric', + 'emrld', 'fall', 'geyser', 'gnbu', 'gray', 'greens', 'greys', + 'haline', 'hot', 'hsv', 'ice', 'icefire', 'inferno', 'jet', + 'magenta', 'magma', 'matter', 'mint', 'mrybm', 'mygbm', 'oranges', + 'orrd', 'oryel', 'oxy', 'peach', 'phase', 'picnic', 'pinkyl', + 'piyg', 'plasma', 'plotly3', 'portland', 'prgn', 'pubu', 'pubugn', + 'puor', 'purd', 'purp', 'purples', 'purpor', 'rainbow', 'rdbu', + 'rdgy', 'rdpu', 'rdylbu', 'rdylgn', 'redor', 'reds', 'solar', + 'spectral', 'speed', 'sunset', 'sunsetdark', 'teal', 'tealgrn', + 'tealrose', 'tempo', 'temps', 'thermal', 'tropic', 'turbid', + 'turbo', 'twilight', 'viridis', 'ylgn', 'ylgnbu', 'ylorbr', + 'ylorrd']. + Appending '_r' to a named colorscale reverses it. + + Returns + ------- + str + """ + return self["colorscale"] + + @colorscale.setter + def colorscale(self, val): + self["colorscale"] = val + + @property + def colorsrc(self): + """ + Sets the source reference on Chart Studio Cloud for `color`. + + The 'colorsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["colorsrc"] + + @colorsrc.setter + def colorsrc(self, val): + self["colorsrc"] = val + + @property + def reversescale(self): + """ + Reverses the color mapping if true. Has an effect only if in + `marker.line.color` is set to a numerical array. If true, + `marker.line.cmin` will correspond to the last color in the + array and `marker.line.cmax` will correspond to the first + color. + + The 'reversescale' property is a boolean and must be specified as: + - A boolean value: True or False + + Returns + ------- + bool + """ + return self["reversescale"] + + @reversescale.setter + def reversescale(self, val): + self["reversescale"] = val + + @property + def width(self): + """ + Sets the width (in px) of the lines bounding the marker points. + + The 'width' property is a number and may be specified as: + - An int or float in the interval [0, inf] + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + int|float|numpy.ndarray + """ + return self["width"] + + @width.setter + def width(self, val): + self["width"] = val + + @property + def widthsrc(self): + """ + Sets the source reference on Chart Studio Cloud for `width`. + + The 'widthsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["widthsrc"] + + @widthsrc.setter + def widthsrc(self, val): + self["widthsrc"] = val + + @property + def _prop_descriptions(self): + return """\ + autocolorscale + Determines whether the colorscale is a default palette + (`autocolorscale: true`) or the palette determined by + `marker.line.colorscale`. Has an effect only if in + `marker.line.color` is set to a numerical array. In + case `colorscale` is unspecified or `autocolorscale` is + true, the default palette will be chosen according to + whether numbers in the `color` array are all positive, + all negative or mixed. + cauto + Determines whether or not the color domain is computed + with respect to the input data (here in + `marker.line.color`) or the bounds set in + `marker.line.cmin` and `marker.line.cmax` Has an effect + only if in `marker.line.color` is set to a numerical + array. Defaults to `false` when `marker.line.cmin` and + `marker.line.cmax` are set by the user. + cmax + Sets the upper bound of the color domain. Has an effect + only if in `marker.line.color` is set to a numerical + array. Value should have the same units as in + `marker.line.color` and if set, `marker.line.cmin` must + be set as well. + cmid + Sets the mid-point of the color domain by scaling + `marker.line.cmin` and/or `marker.line.cmax` to be + equidistant to this point. Has an effect only if in + `marker.line.color` is set to a numerical array. Value + should have the same units as in `marker.line.color`. + Has no effect when `marker.line.cauto` is `false`. + cmin + Sets the lower bound of the color domain. Has an effect + only if in `marker.line.color` is set to a numerical + array. Value should have the same units as in + `marker.line.color` and if set, `marker.line.cmax` must + be set as well. + color + Sets the marker.line color. It accepts either a + specific color or an array of numbers that are mapped + to the colorscale relative to the max and min values of + the array or relative to `marker.line.cmin` and + `marker.line.cmax` if set. + coloraxis + Sets a reference to a shared color axis. References to + these shared color axes are "coloraxis", "coloraxis2", + "coloraxis3", etc. Settings for these shared color axes + are set in the layout, under `layout.coloraxis`, + `layout.coloraxis2`, etc. Note that multiple color + scales can be linked to the same color axis. + colorscale + Sets the colorscale. Has an effect only if in + `marker.line.color` is set to a numerical array. The + colorscale must be an array containing arrays mapping a + normalized value to an rgb, rgba, hex, hsl, hsv, or + named color string. At minimum, a mapping for the + lowest (0) and highest (1) values are required. For + example, `[[0, 'rgb(0,0,255)'], [1, 'rgb(255,0,0)']]`. + To control the bounds of the colorscale in color space, + use `marker.line.cmin` and `marker.line.cmax`. + Alternatively, `colorscale` may be a palette name + string of the following list: Blackbody,Bluered,Blues,C + ividis,Earth,Electric,Greens,Greys,Hot,Jet,Picnic,Portl + and,Rainbow,RdBu,Reds,Viridis,YlGnBu,YlOrRd. + colorsrc + Sets the source reference on Chart Studio Cloud for + `color`. + reversescale + Reverses the color mapping if true. Has an effect only + if in `marker.line.color` is set to a numerical array. + If true, `marker.line.cmin` will correspond to the last + color in the array and `marker.line.cmax` will + correspond to the first color. + width + Sets the width (in px) of the lines bounding the marker + points. + widthsrc + Sets the source reference on Chart Studio Cloud for + `width`. + """ + + def __init__( + self, + arg=None, + autocolorscale=None, + cauto=None, + cmax=None, + cmid=None, + cmin=None, + color=None, + coloraxis=None, + colorscale=None, + colorsrc=None, + reversescale=None, + width=None, + widthsrc=None, + **kwargs, + ): + """ + Construct a new Line object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.bar.marker.Line` + autocolorscale + Determines whether the colorscale is a default palette + (`autocolorscale: true`) or the palette determined by + `marker.line.colorscale`. Has an effect only if in + `marker.line.color` is set to a numerical array. In + case `colorscale` is unspecified or `autocolorscale` is + true, the default palette will be chosen according to + whether numbers in the `color` array are all positive, + all negative or mixed. + cauto + Determines whether or not the color domain is computed + with respect to the input data (here in + `marker.line.color`) or the bounds set in + `marker.line.cmin` and `marker.line.cmax` Has an effect + only if in `marker.line.color` is set to a numerical + array. Defaults to `false` when `marker.line.cmin` and + `marker.line.cmax` are set by the user. + cmax + Sets the upper bound of the color domain. Has an effect + only if in `marker.line.color` is set to a numerical + array. Value should have the same units as in + `marker.line.color` and if set, `marker.line.cmin` must + be set as well. + cmid + Sets the mid-point of the color domain by scaling + `marker.line.cmin` and/or `marker.line.cmax` to be + equidistant to this point. Has an effect only if in + `marker.line.color` is set to a numerical array. Value + should have the same units as in `marker.line.color`. + Has no effect when `marker.line.cauto` is `false`. + cmin + Sets the lower bound of the color domain. Has an effect + only if in `marker.line.color` is set to a numerical + array. Value should have the same units as in + `marker.line.color` and if set, `marker.line.cmax` must + be set as well. + color + Sets the marker.line color. It accepts either a + specific color or an array of numbers that are mapped + to the colorscale relative to the max and min values of + the array or relative to `marker.line.cmin` and + `marker.line.cmax` if set. + coloraxis + Sets a reference to a shared color axis. References to + these shared color axes are "coloraxis", "coloraxis2", + "coloraxis3", etc. Settings for these shared color axes + are set in the layout, under `layout.coloraxis`, + `layout.coloraxis2`, etc. Note that multiple color + scales can be linked to the same color axis. + colorscale + Sets the colorscale. Has an effect only if in + `marker.line.color` is set to a numerical array. The + colorscale must be an array containing arrays mapping a + normalized value to an rgb, rgba, hex, hsl, hsv, or + named color string. At minimum, a mapping for the + lowest (0) and highest (1) values are required. For + example, `[[0, 'rgb(0,0,255)'], [1, 'rgb(255,0,0)']]`. + To control the bounds of the colorscale in color space, + use `marker.line.cmin` and `marker.line.cmax`. + Alternatively, `colorscale` may be a palette name + string of the following list: Blackbody,Bluered,Blues,C + ividis,Earth,Electric,Greens,Greys,Hot,Jet,Picnic,Portl + and,Rainbow,RdBu,Reds,Viridis,YlGnBu,YlOrRd. + colorsrc + Sets the source reference on Chart Studio Cloud for + `color`. + reversescale + Reverses the color mapping if true. Has an effect only + if in `marker.line.color` is set to a numerical array. + If true, `marker.line.cmin` will correspond to the last + color in the array and `marker.line.cmax` will + correspond to the first color. + width + Sets the width (in px) of the lines bounding the marker + points. + widthsrc + Sets the source reference on Chart Studio Cloud for + `width`. + + Returns + ------- + Line + """ + super().__init__("line") + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + if arg is None: + arg = {} + elif isinstance(arg, self.__class__): + arg = arg.to_plotly_json() + elif isinstance(arg, dict): + arg = _copy.copy(arg) + else: + raise ValueError("""\ +The first argument to the plotly.graph_objs.bar.marker.Line +constructor must be a dict or +an instance of :class:`plotly.graph_objs.bar.marker.Line`""") + + self._skip_invalid = kwargs.pop("skip_invalid", False) + self._validate = kwargs.pop("_validate", True) + + self._set_property("autocolorscale", arg, autocolorscale) + self._set_property("cauto", arg, cauto) + self._set_property("cmax", arg, cmax) + self._set_property("cmid", arg, cmid) + self._set_property("cmin", arg, cmin) + self._set_property("color", arg, color) + self._set_property("coloraxis", arg, coloraxis) + self._set_property("colorscale", arg, colorscale) + self._set_property("colorsrc", arg, colorsrc) + self._set_property("reversescale", arg, reversescale) + self._set_property("width", arg, width) + self._set_property("widthsrc", arg, widthsrc) + self._process_kwargs(**dict(arg, **kwargs)) + self._skip_invalid = False diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/bar/marker/_pattern.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/bar/marker/_pattern.py new file mode 100644 index 0000000000000000000000000000000000000000..ce8bd8a10ae7b12c0aed26b7909a827f86b1531d --- /dev/null +++ b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/bar/marker/_pattern.py @@ -0,0 +1,495 @@ +# --- THIS FILE IS AUTO-GENERATED --- +# Modifications will be overwitten the next time code generation run. + +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Pattern(_BaseTraceHierarchyType): + _parent_path_str = "bar.marker" + _path_str = "bar.marker.pattern" + _valid_props = { + "bgcolor", + "bgcolorsrc", + "fgcolor", + "fgcolorsrc", + "fgopacity", + "fillmode", + "path", + "pathsrc", + "shape", + "shapesrc", + "size", + "sizesrc", + "solidity", + "soliditysrc", + } + + @property + def bgcolor(self): + """ + When there is no colorscale sets the color of background + pattern fill. Defaults to a `marker.color` background when + `fillmode` is "overlay". Otherwise, defaults to a transparent + background. + + The 'bgcolor' property is a color and may be specified as: + - A hex string (e.g. '#ff0000') + - An rgb/rgba string (e.g. 'rgb(255,0,0)') + - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') + - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') + - A named CSS color: see https://plotly.com/python/css-colors/ for a list + - A list or array of any of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["bgcolor"] + + @bgcolor.setter + def bgcolor(self, val): + self["bgcolor"] = val + + @property + def bgcolorsrc(self): + """ + Sets the source reference on Chart Studio Cloud for `bgcolor`. + + The 'bgcolorsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["bgcolorsrc"] + + @bgcolorsrc.setter + def bgcolorsrc(self, val): + self["bgcolorsrc"] = val + + @property + def fgcolor(self): + """ + When there is no colorscale sets the color of foreground + pattern fill. Defaults to a `marker.color` background when + `fillmode` is "replace". Otherwise, defaults to dark grey or + white to increase contrast with the `bgcolor`. + + The 'fgcolor' property is a color and may be specified as: + - A hex string (e.g. '#ff0000') + - An rgb/rgba string (e.g. 'rgb(255,0,0)') + - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') + - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') + - A named CSS color: see https://plotly.com/python/css-colors/ for a list + - A list or array of any of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["fgcolor"] + + @fgcolor.setter + def fgcolor(self, val): + self["fgcolor"] = val + + @property + def fgcolorsrc(self): + """ + Sets the source reference on Chart Studio Cloud for `fgcolor`. + + The 'fgcolorsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["fgcolorsrc"] + + @fgcolorsrc.setter + def fgcolorsrc(self, val): + self["fgcolorsrc"] = val + + @property + def fgopacity(self): + """ + Sets the opacity of the foreground pattern fill. Defaults to a + 0.5 when `fillmode` is "overlay". Otherwise, defaults to 1. + + The 'fgopacity' property is a number and may be specified as: + - An int or float in the interval [0, 1] + + Returns + ------- + int|float + """ + return self["fgopacity"] + + @fgopacity.setter + def fgopacity(self, val): + self["fgopacity"] = val + + @property + def fillmode(self): + """ + Determines whether `marker.color` should be used as a default + to `bgcolor` or a `fgcolor`. + + The 'fillmode' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['replace', 'overlay'] + + Returns + ------- + Any + """ + return self["fillmode"] + + @fillmode.setter + def fillmode(self, val): + self["fillmode"] = val + + @property + def path(self): + """ + Sets a custom path for pattern fill. Use with no `shape` or + `solidity`, provide an SVG path string for the regions of the + square from (0,0) to (`size`,`size`) to color. + + The 'path' property is a string and must be specified as: + - A string + - A number that will be converted to a string + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["path"] + + @path.setter + def path(self, val): + self["path"] = val + + @property + def pathsrc(self): + """ + Sets the source reference on Chart Studio Cloud for `path`. + + The 'pathsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["pathsrc"] + + @pathsrc.setter + def pathsrc(self, val): + self["pathsrc"] = val + + @property + def shape(self): + """ + Sets the shape of the pattern fill. By default, no pattern is + used for filling the area. + + The 'shape' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['', '/', '\\', 'x', '-', '|', '+', '.'] + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + Any|numpy.ndarray + """ + return self["shape"] + + @shape.setter + def shape(self, val): + self["shape"] = val + + @property + def shapesrc(self): + """ + Sets the source reference on Chart Studio Cloud for `shape`. + + The 'shapesrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["shapesrc"] + + @shapesrc.setter + def shapesrc(self, val): + self["shapesrc"] = val + + @property + def size(self): + """ + Sets the size of unit squares of the pattern fill in pixels, + which corresponds to the interval of repetition of the pattern. + + The 'size' property is a number and may be specified as: + - An int or float in the interval [0, inf] + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + int|float|numpy.ndarray + """ + return self["size"] + + @size.setter + def size(self, val): + self["size"] = val + + @property + def sizesrc(self): + """ + Sets the source reference on Chart Studio Cloud for `size`. + + The 'sizesrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["sizesrc"] + + @sizesrc.setter + def sizesrc(self, val): + self["sizesrc"] = val + + @property + def solidity(self): + """ + Sets the solidity of the pattern fill. Solidity is roughly the + fraction of the area filled by the pattern. Solidity of 0 shows + only the background color without pattern and solidty of 1 + shows only the foreground color without pattern. + + The 'solidity' property is a number and may be specified as: + - An int or float in the interval [0, 1] + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + int|float|numpy.ndarray + """ + return self["solidity"] + + @solidity.setter + def solidity(self, val): + self["solidity"] = val + + @property + def soliditysrc(self): + """ + Sets the source reference on Chart Studio Cloud for `solidity`. + + The 'soliditysrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["soliditysrc"] + + @soliditysrc.setter + def soliditysrc(self, val): + self["soliditysrc"] = val + + @property + def _prop_descriptions(self): + return """\ + bgcolor + When there is no colorscale sets the color of + background pattern fill. Defaults to a `marker.color` + background when `fillmode` is "overlay". Otherwise, + defaults to a transparent background. + bgcolorsrc + Sets the source reference on Chart Studio Cloud for + `bgcolor`. + fgcolor + When there is no colorscale sets the color of + foreground pattern fill. Defaults to a `marker.color` + background when `fillmode` is "replace". Otherwise, + defaults to dark grey or white to increase contrast + with the `bgcolor`. + fgcolorsrc + Sets the source reference on Chart Studio Cloud for + `fgcolor`. + fgopacity + Sets the opacity of the foreground pattern fill. + Defaults to a 0.5 when `fillmode` is "overlay". + Otherwise, defaults to 1. + fillmode + Determines whether `marker.color` should be used as a + default to `bgcolor` or a `fgcolor`. + path + Sets a custom path for pattern fill. Use with no + `shape` or `solidity`, provide an SVG path string for + the regions of the square from (0,0) to (`size`,`size`) + to color. + pathsrc + Sets the source reference on Chart Studio Cloud for + `path`. + shape + Sets the shape of the pattern fill. By default, no + pattern is used for filling the area. + shapesrc + Sets the source reference on Chart Studio Cloud for + `shape`. + size + Sets the size of unit squares of the pattern fill in + pixels, which corresponds to the interval of repetition + of the pattern. + sizesrc + Sets the source reference on Chart Studio Cloud for + `size`. + solidity + Sets the solidity of the pattern fill. Solidity is + roughly the fraction of the area filled by the pattern. + Solidity of 0 shows only the background color without + pattern and solidty of 1 shows only the foreground + color without pattern. + soliditysrc + Sets the source reference on Chart Studio Cloud for + `solidity`. + """ + + def __init__( + self, + arg=None, + bgcolor=None, + bgcolorsrc=None, + fgcolor=None, + fgcolorsrc=None, + fgopacity=None, + fillmode=None, + path=None, + pathsrc=None, + shape=None, + shapesrc=None, + size=None, + sizesrc=None, + solidity=None, + soliditysrc=None, + **kwargs, + ): + """ + Construct a new Pattern object + + Sets the pattern within the marker. + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.bar.marker.Pattern` + bgcolor + When there is no colorscale sets the color of + background pattern fill. Defaults to a `marker.color` + background when `fillmode` is "overlay". Otherwise, + defaults to a transparent background. + bgcolorsrc + Sets the source reference on Chart Studio Cloud for + `bgcolor`. + fgcolor + When there is no colorscale sets the color of + foreground pattern fill. Defaults to a `marker.color` + background when `fillmode` is "replace". Otherwise, + defaults to dark grey or white to increase contrast + with the `bgcolor`. + fgcolorsrc + Sets the source reference on Chart Studio Cloud for + `fgcolor`. + fgopacity + Sets the opacity of the foreground pattern fill. + Defaults to a 0.5 when `fillmode` is "overlay". + Otherwise, defaults to 1. + fillmode + Determines whether `marker.color` should be used as a + default to `bgcolor` or a `fgcolor`. + path + Sets a custom path for pattern fill. Use with no + `shape` or `solidity`, provide an SVG path string for + the regions of the square from (0,0) to (`size`,`size`) + to color. + pathsrc + Sets the source reference on Chart Studio Cloud for + `path`. + shape + Sets the shape of the pattern fill. By default, no + pattern is used for filling the area. + shapesrc + Sets the source reference on Chart Studio Cloud for + `shape`. + size + Sets the size of unit squares of the pattern fill in + pixels, which corresponds to the interval of repetition + of the pattern. + sizesrc + Sets the source reference on Chart Studio Cloud for + `size`. + solidity + Sets the solidity of the pattern fill. Solidity is + roughly the fraction of the area filled by the pattern. + Solidity of 0 shows only the background color without + pattern and solidty of 1 shows only the foreground + color without pattern. + soliditysrc + Sets the source reference on Chart Studio Cloud for + `solidity`. + + Returns + ------- + Pattern + """ + super().__init__("pattern") + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + if arg is None: + arg = {} + elif isinstance(arg, self.__class__): + arg = arg.to_plotly_json() + elif isinstance(arg, dict): + arg = _copy.copy(arg) + else: + raise ValueError("""\ +The first argument to the plotly.graph_objs.bar.marker.Pattern +constructor must be a dict or +an instance of :class:`plotly.graph_objs.bar.marker.Pattern`""") + + self._skip_invalid = kwargs.pop("skip_invalid", False) + self._validate = kwargs.pop("_validate", True) + + self._set_property("bgcolor", arg, bgcolor) + self._set_property("bgcolorsrc", arg, bgcolorsrc) + self._set_property("fgcolor", arg, fgcolor) + self._set_property("fgcolorsrc", arg, fgcolorsrc) + self._set_property("fgopacity", arg, fgopacity) + self._set_property("fillmode", arg, fillmode) + self._set_property("path", arg, path) + self._set_property("pathsrc", arg, pathsrc) + self._set_property("shape", arg, shape) + self._set_property("shapesrc", arg, shapesrc) + self._set_property("size", arg, size) + self._set_property("sizesrc", arg, sizesrc) + self._set_property("solidity", arg, solidity) + self._set_property("soliditysrc", arg, soliditysrc) + self._process_kwargs(**dict(arg, **kwargs)) + self._skip_invalid = False diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/bar/marker/colorbar/.___init__.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/bar/marker/colorbar/.___init__.py new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/bar/marker/colorbar/.___init__.py differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/bar/marker/colorbar/.___pycache__ b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/bar/marker/colorbar/.___pycache__ new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/bar/marker/colorbar/.___pycache__ differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/bar/marker/colorbar/.__tickfont.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/bar/marker/colorbar/.__tickfont.py new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/bar/marker/colorbar/.__tickfont.py differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/bar/marker/colorbar/.__tickformatstop.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/bar/marker/colorbar/.__tickformatstop.py new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/bar/marker/colorbar/.__tickformatstop.py differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/bar/marker/colorbar/.__title.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/bar/marker/colorbar/.__title.py new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/bar/marker/colorbar/.__title.py differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/bar/marker/colorbar/._title b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/bar/marker/colorbar/._title new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/bar/marker/colorbar/._title differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/bar/marker/colorbar/__init__.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/bar/marker/colorbar/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..4690d3cc738a44d43a04d43d3aa0be36d7cd34e2 --- /dev/null +++ b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/bar/marker/colorbar/__init__.py @@ -0,0 +1,16 @@ +import sys +from typing import TYPE_CHECKING + +if TYPE_CHECKING: + from ._tickfont import Tickfont + from ._tickformatstop import Tickformatstop + from ._title import Title + from . import title +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [".title"], + ["._tickfont.Tickfont", "._tickformatstop.Tickformatstop", "._title.Title"], + ) diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/bar/marker/colorbar/_tickfont.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/bar/marker/colorbar/_tickfont.py new file mode 100644 index 0000000000000000000000000000000000000000..5cfa677df3105a17d6af20f836a8d479f83297ea --- /dev/null +++ b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/bar/marker/colorbar/_tickfont.py @@ -0,0 +1,334 @@ +# --- THIS FILE IS AUTO-GENERATED --- +# Modifications will be overwitten the next time code generation run. + +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Tickfont(_BaseTraceHierarchyType): + _parent_path_str = "bar.marker.colorbar" + _path_str = "bar.marker.colorbar.tickfont" + _valid_props = { + "color", + "family", + "lineposition", + "shadow", + "size", + "style", + "textcase", + "variant", + "weight", + } + + @property + def color(self): + """ + The 'color' property is a color and may be specified as: + - A hex string (e.g. '#ff0000') + - An rgb/rgba string (e.g. 'rgb(255,0,0)') + - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') + - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') + - A named CSS color: see https://plotly.com/python/css-colors/ for a list + + Returns + ------- + str + """ + return self["color"] + + @color.setter + def color(self, val): + self["color"] = val + + @property + def family(self): + """ + HTML font family - the typeface that will be applied by the web + browser. The web browser can only apply a font if it is + available on the system where it runs. Provide multiple font + families, separated by commas, to indicate the order in which + to apply fonts if they aren't available. + + The 'family' property is a string and must be specified as: + - A non-empty string + + Returns + ------- + str + """ + return self["family"] + + @family.setter + def family(self, val): + self["family"] = val + + @property + def lineposition(self): + """ + Sets the kind of decoration line(s) with text, such as an + "under", "over" or "through" as well as combinations e.g. + "under+over", etc. + + The 'lineposition' property is a flaglist and may be specified + as a string containing: + - Any combination of ['under', 'over', 'through'] joined with '+' characters + (e.g. 'under+over') + OR exactly one of ['none'] (e.g. 'none') + + Returns + ------- + Any + """ + return self["lineposition"] + + @lineposition.setter + def lineposition(self, val): + self["lineposition"] = val + + @property + def shadow(self): + """ + Sets the shape and color of the shadow behind text. "auto" + places minimal shadow and applies contrast text font color. See + https://developer.mozilla.org/en-US/docs/Web/CSS/text-shadow + for additional options. + + The 'shadow' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["shadow"] + + @shadow.setter + def shadow(self, val): + self["shadow"] = val + + @property + def size(self): + """ + The 'size' property is a number and may be specified as: + - An int or float in the interval [1, inf] + + Returns + ------- + int|float + """ + return self["size"] + + @size.setter + def size(self, val): + self["size"] = val + + @property + def style(self): + """ + Sets whether a font should be styled with a normal or italic + face from its family. + + The 'style' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['normal', 'italic'] + + Returns + ------- + Any + """ + return self["style"] + + @style.setter + def style(self, val): + self["style"] = val + + @property + def textcase(self): + """ + Sets capitalization of text. It can be used to make text appear + in all-uppercase or all-lowercase, or with each word + capitalized. + + The 'textcase' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['normal', 'word caps', 'upper', 'lower'] + + Returns + ------- + Any + """ + return self["textcase"] + + @textcase.setter + def textcase(self, val): + self["textcase"] = val + + @property + def variant(self): + """ + Sets the variant of the font. + + The 'variant' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['normal', 'small-caps', 'all-small-caps', + 'all-petite-caps', 'petite-caps', 'unicase'] + + Returns + ------- + Any + """ + return self["variant"] + + @variant.setter + def variant(self, val): + self["variant"] = val + + @property + def weight(self): + """ + Sets the weight (or boldness) of the font. + + The 'weight' property is a integer and may be specified as: + - An int (or float that will be cast to an int) + in the interval [1, 1000] + OR exactly one of ['normal', 'bold'] (e.g. 'bold') + + Returns + ------- + int + """ + return self["weight"] + + @weight.setter + def weight(self, val): + self["weight"] = val + + @property + def _prop_descriptions(self): + return """\ + color + + family + HTML font family - the typeface that will be applied by + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. + lineposition + Sets the kind of decoration line(s) with text, such as + an "under", "over" or "through" as well as combinations + e.g. "under+over", etc. + shadow + Sets the shape and color of the shadow behind text. + "auto" places minimal shadow and applies contrast text + font color. See https://developer.mozilla.org/en- + US/docs/Web/CSS/text-shadow for additional options. + size + + style + Sets whether a font should be styled with a normal or + italic face from its family. + textcase + Sets capitalization of text. It can be used to make + text appear in all-uppercase or all-lowercase, or with + each word capitalized. + variant + Sets the variant of the font. + weight + Sets the weight (or boldness) of the font. + """ + + def __init__( + self, + arg=None, + color=None, + family=None, + lineposition=None, + shadow=None, + size=None, + style=None, + textcase=None, + variant=None, + weight=None, + **kwargs, + ): + """ + Construct a new Tickfont object + + Sets the color bar's tick label font + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.bar.marker.colorbar.Tickfont` + color + + family + HTML font family - the typeface that will be applied by + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. + lineposition + Sets the kind of decoration line(s) with text, such as + an "under", "over" or "through" as well as combinations + e.g. "under+over", etc. + shadow + Sets the shape and color of the shadow behind text. + "auto" places minimal shadow and applies contrast text + font color. See https://developer.mozilla.org/en- + US/docs/Web/CSS/text-shadow for additional options. + size + + style + Sets whether a font should be styled with a normal or + italic face from its family. + textcase + Sets capitalization of text. It can be used to make + text appear in all-uppercase or all-lowercase, or with + each word capitalized. + variant + Sets the variant of the font. + weight + Sets the weight (or boldness) of the font. + + Returns + ------- + Tickfont + """ + super().__init__("tickfont") + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + if arg is None: + arg = {} + elif isinstance(arg, self.__class__): + arg = arg.to_plotly_json() + elif isinstance(arg, dict): + arg = _copy.copy(arg) + else: + raise ValueError("""\ +The first argument to the plotly.graph_objs.bar.marker.colorbar.Tickfont +constructor must be a dict or +an instance of :class:`plotly.graph_objs.bar.marker.colorbar.Tickfont`""") + + self._skip_invalid = kwargs.pop("skip_invalid", False) + self._validate = kwargs.pop("_validate", True) + + self._set_property("color", arg, color) + self._set_property("family", arg, family) + self._set_property("lineposition", arg, lineposition) + self._set_property("shadow", arg, shadow) + self._set_property("size", arg, size) + self._set_property("style", arg, style) + self._set_property("textcase", arg, textcase) + self._set_property("variant", arg, variant) + self._set_property("weight", arg, weight) + self._process_kwargs(**dict(arg, **kwargs)) + self._skip_invalid = False diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/bar/marker/colorbar/_tickformatstop.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/bar/marker/colorbar/_tickformatstop.py new file mode 100644 index 0000000000000000000000000000000000000000..da1b3e8501d3d4c257345213170134f5914b0eb6 --- /dev/null +++ b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/bar/marker/colorbar/_tickformatstop.py @@ -0,0 +1,241 @@ +# --- THIS FILE IS AUTO-GENERATED --- +# Modifications will be overwitten the next time code generation run. + +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Tickformatstop(_BaseTraceHierarchyType): + _parent_path_str = "bar.marker.colorbar" + _path_str = "bar.marker.colorbar.tickformatstop" + _valid_props = {"dtickrange", "enabled", "name", "templateitemname", "value"} + + @property + def dtickrange(self): + """ + range [*min*, *max*], where "min", "max" - dtick values which + describe some zoom level, it is possible to omit "min" or "max" + value by passing "null" + + The 'dtickrange' property is an info array that may be specified as: + + * a list or tuple of 2 elements where: + (0) The 'dtickrange[0]' property accepts values of any type + (1) The 'dtickrange[1]' property accepts values of any type + + Returns + ------- + list + """ + return self["dtickrange"] + + @dtickrange.setter + def dtickrange(self, val): + self["dtickrange"] = val + + @property + def enabled(self): + """ + Determines whether or not this stop is used. If `false`, this + stop is ignored even within its `dtickrange`. + + The 'enabled' property is a boolean and must be specified as: + - A boolean value: True or False + + Returns + ------- + bool + """ + return self["enabled"] + + @enabled.setter + def enabled(self, val): + self["enabled"] = val + + @property + def name(self): + """ + When used in a template, named items are created in the output + figure in addition to any items the figure already has in this + array. You can modify these items in the output figure by + making your own item with `templateitemname` matching this + `name` alongside your modifications (including `visible: false` + or `enabled: false` to hide it). Has no effect outside of a + template. + + The 'name' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["name"] + + @name.setter + def name(self, val): + self["name"] = val + + @property + def templateitemname(self): + """ + Used to refer to a named item in this array in the template. + Named items from the template will be created even without a + matching item in the input figure, but you can modify one by + making an item with `templateitemname` matching its `name`, + alongside your modifications (including `visible: false` or + `enabled: false` to hide it). If there is no template or no + matching item, this item will be hidden unless you explicitly + show it with `visible: true`. + + The 'templateitemname' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["templateitemname"] + + @templateitemname.setter + def templateitemname(self, val): + self["templateitemname"] = val + + @property + def value(self): + """ + string - dtickformat for described zoom level, the same as + "tickformat" + + The 'value' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["value"] + + @value.setter + def value(self, val): + self["value"] = val + + @property + def _prop_descriptions(self): + return """\ + dtickrange + range [*min*, *max*], where "min", "max" - dtick values + which describe some zoom level, it is possible to omit + "min" or "max" value by passing "null" + enabled + Determines whether or not this stop is used. If + `false`, this stop is ignored even within its + `dtickrange`. + name + When used in a template, named items are created in the + output figure in addition to any items the figure + already has in this array. You can modify these items + in the output figure by making your own item with + `templateitemname` matching this `name` alongside your + modifications (including `visible: false` or `enabled: + false` to hide it). Has no effect outside of a + template. + templateitemname + Used to refer to a named item in this array in the + template. Named items from the template will be created + even without a matching item in the input figure, but + you can modify one by making an item with + `templateitemname` matching its `name`, alongside your + modifications (including `visible: false` or `enabled: + false` to hide it). If there is no template or no + matching item, this item will be hidden unless you + explicitly show it with `visible: true`. + value + string - dtickformat for described zoom level, the same + as "tickformat" + """ + + def __init__( + self, + arg=None, + dtickrange=None, + enabled=None, + name=None, + templateitemname=None, + value=None, + **kwargs, + ): + """ + Construct a new Tickformatstop object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of :class:`plotly.graph_objs.bar.marker.col + orbar.Tickformatstop` + dtickrange + range [*min*, *max*], where "min", "max" - dtick values + which describe some zoom level, it is possible to omit + "min" or "max" value by passing "null" + enabled + Determines whether or not this stop is used. If + `false`, this stop is ignored even within its + `dtickrange`. + name + When used in a template, named items are created in the + output figure in addition to any items the figure + already has in this array. You can modify these items + in the output figure by making your own item with + `templateitemname` matching this `name` alongside your + modifications (including `visible: false` or `enabled: + false` to hide it). Has no effect outside of a + template. + templateitemname + Used to refer to a named item in this array in the + template. Named items from the template will be created + even without a matching item in the input figure, but + you can modify one by making an item with + `templateitemname` matching its `name`, alongside your + modifications (including `visible: false` or `enabled: + false` to hide it). If there is no template or no + matching item, this item will be hidden unless you + explicitly show it with `visible: true`. + value + string - dtickformat for described zoom level, the same + as "tickformat" + + Returns + ------- + Tickformatstop + """ + super().__init__("tickformatstops") + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + if arg is None: + arg = {} + elif isinstance(arg, self.__class__): + arg = arg.to_plotly_json() + elif isinstance(arg, dict): + arg = _copy.copy(arg) + else: + raise ValueError("""\ +The first argument to the plotly.graph_objs.bar.marker.colorbar.Tickformatstop +constructor must be a dict or +an instance of :class:`plotly.graph_objs.bar.marker.colorbar.Tickformatstop`""") + + self._skip_invalid = kwargs.pop("skip_invalid", False) + self._validate = kwargs.pop("_validate", True) + + self._set_property("dtickrange", arg, dtickrange) + self._set_property("enabled", arg, enabled) + self._set_property("name", arg, name) + self._set_property("templateitemname", arg, templateitemname) + self._set_property("value", arg, value) + self._process_kwargs(**dict(arg, **kwargs)) + self._skip_invalid = False diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/bar/marker/colorbar/_title.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/bar/marker/colorbar/_title.py new file mode 100644 index 0000000000000000000000000000000000000000..ac2a569886ba96fd6cab9dc394248b93764f542a --- /dev/null +++ b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/bar/marker/colorbar/_title.py @@ -0,0 +1,136 @@ +# --- THIS FILE IS AUTO-GENERATED --- +# Modifications will be overwitten the next time code generation run. + +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Title(_BaseTraceHierarchyType): + _parent_path_str = "bar.marker.colorbar" + _path_str = "bar.marker.colorbar.title" + _valid_props = {"font", "side", "text"} + + @property + def font(self): + """ + Sets this color bar's title font. + + The 'font' property is an instance of Font + that may be specified as: + - An instance of :class:`plotly.graph_objs.bar.marker.colorbar.title.Font` + - A dict of string/value properties that will be passed + to the Font constructor + + Returns + ------- + plotly.graph_objs.bar.marker.colorbar.title.Font + """ + return self["font"] + + @font.setter + def font(self, val): + self["font"] = val + + @property + def side(self): + """ + Determines the location of color bar's title with respect to + the color bar. Defaults to "top" when `orientation` if "v" and + defaults to "right" when `orientation` if "h". + + The 'side' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['right', 'top', 'bottom'] + + Returns + ------- + Any + """ + return self["side"] + + @side.setter + def side(self, val): + self["side"] = val + + @property + def text(self): + """ + Sets the title of the color bar. + + The 'text' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["text"] + + @text.setter + def text(self, val): + self["text"] = val + + @property + def _prop_descriptions(self): + return """\ + font + Sets this color bar's title font. + side + Determines the location of color bar's title with + respect to the color bar. Defaults to "top" when + `orientation` if "v" and defaults to "right" when + `orientation` if "h". + text + Sets the title of the color bar. + """ + + def __init__(self, arg=None, font=None, side=None, text=None, **kwargs): + """ + Construct a new Title object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.bar.marker.colorbar.Title` + font + Sets this color bar's title font. + side + Determines the location of color bar's title with + respect to the color bar. Defaults to "top" when + `orientation` if "v" and defaults to "right" when + `orientation` if "h". + text + Sets the title of the color bar. + + Returns + ------- + Title + """ + super().__init__("title") + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + if arg is None: + arg = {} + elif isinstance(arg, self.__class__): + arg = arg.to_plotly_json() + elif isinstance(arg, dict): + arg = _copy.copy(arg) + else: + raise ValueError("""\ +The first argument to the plotly.graph_objs.bar.marker.colorbar.Title +constructor must be a dict or +an instance of :class:`plotly.graph_objs.bar.marker.colorbar.Title`""") + + self._skip_invalid = kwargs.pop("skip_invalid", False) + self._validate = kwargs.pop("_validate", True) + + self._set_property("font", arg, font) + self._set_property("side", arg, side) + self._set_property("text", arg, text) + self._process_kwargs(**dict(arg, **kwargs)) + self._skip_invalid = False diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/bar/marker/colorbar/title/.___init__.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/bar/marker/colorbar/title/.___init__.py new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/bar/marker/colorbar/title/.___init__.py differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/bar/marker/colorbar/title/.___pycache__ b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/bar/marker/colorbar/title/.___pycache__ new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/bar/marker/colorbar/title/.___pycache__ differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/bar/marker/colorbar/title/.__font.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/bar/marker/colorbar/title/.__font.py new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/bar/marker/colorbar/title/.__font.py differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/bar/marker/colorbar/title/__init__.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/bar/marker/colorbar/title/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..56f600d3458c41f269053307377e9707ab13e090 --- /dev/null +++ b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/bar/marker/colorbar/title/__init__.py @@ -0,0 +1,9 @@ +import sys +from typing import TYPE_CHECKING + +if TYPE_CHECKING: + from ._font import Font +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import(__name__, [], ["._font.Font"]) diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/bar/marker/colorbar/title/_font.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/bar/marker/colorbar/title/_font.py new file mode 100644 index 0000000000000000000000000000000000000000..a3c50a3f67c87bdb8b4ab0327046857327068826 --- /dev/null +++ b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/bar/marker/colorbar/title/_font.py @@ -0,0 +1,334 @@ +# --- THIS FILE IS AUTO-GENERATED --- +# Modifications will be overwitten the next time code generation run. + +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Font(_BaseTraceHierarchyType): + _parent_path_str = "bar.marker.colorbar.title" + _path_str = "bar.marker.colorbar.title.font" + _valid_props = { + "color", + "family", + "lineposition", + "shadow", + "size", + "style", + "textcase", + "variant", + "weight", + } + + @property + def color(self): + """ + The 'color' property is a color and may be specified as: + - A hex string (e.g. '#ff0000') + - An rgb/rgba string (e.g. 'rgb(255,0,0)') + - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') + - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') + - A named CSS color: see https://plotly.com/python/css-colors/ for a list + + Returns + ------- + str + """ + return self["color"] + + @color.setter + def color(self, val): + self["color"] = val + + @property + def family(self): + """ + HTML font family - the typeface that will be applied by the web + browser. The web browser can only apply a font if it is + available on the system where it runs. Provide multiple font + families, separated by commas, to indicate the order in which + to apply fonts if they aren't available. + + The 'family' property is a string and must be specified as: + - A non-empty string + + Returns + ------- + str + """ + return self["family"] + + @family.setter + def family(self, val): + self["family"] = val + + @property + def lineposition(self): + """ + Sets the kind of decoration line(s) with text, such as an + "under", "over" or "through" as well as combinations e.g. + "under+over", etc. + + The 'lineposition' property is a flaglist and may be specified + as a string containing: + - Any combination of ['under', 'over', 'through'] joined with '+' characters + (e.g. 'under+over') + OR exactly one of ['none'] (e.g. 'none') + + Returns + ------- + Any + """ + return self["lineposition"] + + @lineposition.setter + def lineposition(self, val): + self["lineposition"] = val + + @property + def shadow(self): + """ + Sets the shape and color of the shadow behind text. "auto" + places minimal shadow and applies contrast text font color. See + https://developer.mozilla.org/en-US/docs/Web/CSS/text-shadow + for additional options. + + The 'shadow' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["shadow"] + + @shadow.setter + def shadow(self, val): + self["shadow"] = val + + @property + def size(self): + """ + The 'size' property is a number and may be specified as: + - An int or float in the interval [1, inf] + + Returns + ------- + int|float + """ + return self["size"] + + @size.setter + def size(self, val): + self["size"] = val + + @property + def style(self): + """ + Sets whether a font should be styled with a normal or italic + face from its family. + + The 'style' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['normal', 'italic'] + + Returns + ------- + Any + """ + return self["style"] + + @style.setter + def style(self, val): + self["style"] = val + + @property + def textcase(self): + """ + Sets capitalization of text. It can be used to make text appear + in all-uppercase or all-lowercase, or with each word + capitalized. + + The 'textcase' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['normal', 'word caps', 'upper', 'lower'] + + Returns + ------- + Any + """ + return self["textcase"] + + @textcase.setter + def textcase(self, val): + self["textcase"] = val + + @property + def variant(self): + """ + Sets the variant of the font. + + The 'variant' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['normal', 'small-caps', 'all-small-caps', + 'all-petite-caps', 'petite-caps', 'unicase'] + + Returns + ------- + Any + """ + return self["variant"] + + @variant.setter + def variant(self, val): + self["variant"] = val + + @property + def weight(self): + """ + Sets the weight (or boldness) of the font. + + The 'weight' property is a integer and may be specified as: + - An int (or float that will be cast to an int) + in the interval [1, 1000] + OR exactly one of ['normal', 'bold'] (e.g. 'bold') + + Returns + ------- + int + """ + return self["weight"] + + @weight.setter + def weight(self, val): + self["weight"] = val + + @property + def _prop_descriptions(self): + return """\ + color + + family + HTML font family - the typeface that will be applied by + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. + lineposition + Sets the kind of decoration line(s) with text, such as + an "under", "over" or "through" as well as combinations + e.g. "under+over", etc. + shadow + Sets the shape and color of the shadow behind text. + "auto" places minimal shadow and applies contrast text + font color. See https://developer.mozilla.org/en- + US/docs/Web/CSS/text-shadow for additional options. + size + + style + Sets whether a font should be styled with a normal or + italic face from its family. + textcase + Sets capitalization of text. It can be used to make + text appear in all-uppercase or all-lowercase, or with + each word capitalized. + variant + Sets the variant of the font. + weight + Sets the weight (or boldness) of the font. + """ + + def __init__( + self, + arg=None, + color=None, + family=None, + lineposition=None, + shadow=None, + size=None, + style=None, + textcase=None, + variant=None, + weight=None, + **kwargs, + ): + """ + Construct a new Font object + + Sets this color bar's title font. + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of :class:`plotly.graph_objs.bar.marker.col + orbar.title.Font` + color + + family + HTML font family - the typeface that will be applied by + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. + lineposition + Sets the kind of decoration line(s) with text, such as + an "under", "over" or "through" as well as combinations + e.g. "under+over", etc. + shadow + Sets the shape and color of the shadow behind text. + "auto" places minimal shadow and applies contrast text + font color. See https://developer.mozilla.org/en- + US/docs/Web/CSS/text-shadow for additional options. + size + + style + Sets whether a font should be styled with a normal or + italic face from its family. + textcase + Sets capitalization of text. It can be used to make + text appear in all-uppercase or all-lowercase, or with + each word capitalized. + variant + Sets the variant of the font. + weight + Sets the weight (or boldness) of the font. + + Returns + ------- + Font + """ + super().__init__("font") + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + if arg is None: + arg = {} + elif isinstance(arg, self.__class__): + arg = arg.to_plotly_json() + elif isinstance(arg, dict): + arg = _copy.copy(arg) + else: + raise ValueError("""\ +The first argument to the plotly.graph_objs.bar.marker.colorbar.title.Font +constructor must be a dict or +an instance of :class:`plotly.graph_objs.bar.marker.colorbar.title.Font`""") + + self._skip_invalid = kwargs.pop("skip_invalid", False) + self._validate = kwargs.pop("_validate", True) + + self._set_property("color", arg, color) + self._set_property("family", arg, family) + self._set_property("lineposition", arg, lineposition) + self._set_property("shadow", arg, shadow) + self._set_property("size", arg, size) + self._set_property("style", arg, style) + self._set_property("textcase", arg, textcase) + self._set_property("variant", arg, variant) + self._set_property("weight", arg, weight) + self._process_kwargs(**dict(arg, **kwargs)) + self._skip_invalid = False diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/bar/selected/.___init__.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/bar/selected/.___init__.py new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/bar/selected/.___init__.py differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/bar/selected/.___pycache__ b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/bar/selected/.___pycache__ new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/bar/selected/.___pycache__ differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/bar/selected/.__marker.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/bar/selected/.__marker.py new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/bar/selected/.__marker.py differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/bar/selected/.__textfont.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/bar/selected/.__textfont.py new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/bar/selected/.__textfont.py differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/bar/selected/__init__.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/bar/selected/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..851549000c0d17cdc7711565999bb9de85ebcb65 --- /dev/null +++ b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/bar/selected/__init__.py @@ -0,0 +1,12 @@ +import sys +from typing import TYPE_CHECKING + +if TYPE_CHECKING: + from ._marker import Marker + from ._textfont import Textfont +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, [], ["._marker.Marker", "._textfont.Textfont"] + ) diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/bar/selected/_marker.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/bar/selected/_marker.py new file mode 100644 index 0000000000000000000000000000000000000000..e704eb44fcfec77f9f983a72e325d1e5bb8db810 --- /dev/null +++ b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/bar/selected/_marker.py @@ -0,0 +1,104 @@ +# --- THIS FILE IS AUTO-GENERATED --- +# Modifications will be overwitten the next time code generation run. + +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Marker(_BaseTraceHierarchyType): + _parent_path_str = "bar.selected" + _path_str = "bar.selected.marker" + _valid_props = {"color", "opacity"} + + @property + def color(self): + """ + Sets the marker color of selected points. + + The 'color' property is a color and may be specified as: + - A hex string (e.g. '#ff0000') + - An rgb/rgba string (e.g. 'rgb(255,0,0)') + - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') + - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') + - A named CSS color: see https://plotly.com/python/css-colors/ for a list + + Returns + ------- + str + """ + return self["color"] + + @color.setter + def color(self, val): + self["color"] = val + + @property + def opacity(self): + """ + Sets the marker opacity of selected points. + + The 'opacity' property is a number and may be specified as: + - An int or float in the interval [0, 1] + + Returns + ------- + int|float + """ + return self["opacity"] + + @opacity.setter + def opacity(self, val): + self["opacity"] = val + + @property + def _prop_descriptions(self): + return """\ + color + Sets the marker color of selected points. + opacity + Sets the marker opacity of selected points. + """ + + def __init__(self, arg=None, color=None, opacity=None, **kwargs): + """ + Construct a new Marker object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.bar.selected.Marker` + color + Sets the marker color of selected points. + opacity + Sets the marker opacity of selected points. + + Returns + ------- + Marker + """ + super().__init__("marker") + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + if arg is None: + arg = {} + elif isinstance(arg, self.__class__): + arg = arg.to_plotly_json() + elif isinstance(arg, dict): + arg = _copy.copy(arg) + else: + raise ValueError("""\ +The first argument to the plotly.graph_objs.bar.selected.Marker +constructor must be a dict or +an instance of :class:`plotly.graph_objs.bar.selected.Marker`""") + + self._skip_invalid = kwargs.pop("skip_invalid", False) + self._validate = kwargs.pop("_validate", True) + + self._set_property("color", arg, color) + self._set_property("opacity", arg, opacity) + self._process_kwargs(**dict(arg, **kwargs)) + self._skip_invalid = False diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/bar/selected/_textfont.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/bar/selected/_textfont.py new file mode 100644 index 0000000000000000000000000000000000000000..79fb7abab61af9e0e49396d3e65fcd67dd501f3d --- /dev/null +++ b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/bar/selected/_textfont.py @@ -0,0 +1,81 @@ +# --- THIS FILE IS AUTO-GENERATED --- +# Modifications will be overwitten the next time code generation run. + +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Textfont(_BaseTraceHierarchyType): + _parent_path_str = "bar.selected" + _path_str = "bar.selected.textfont" + _valid_props = {"color"} + + @property + def color(self): + """ + Sets the text font color of selected points. + + The 'color' property is a color and may be specified as: + - A hex string (e.g. '#ff0000') + - An rgb/rgba string (e.g. 'rgb(255,0,0)') + - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') + - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') + - A named CSS color: see https://plotly.com/python/css-colors/ for a list + + Returns + ------- + str + """ + return self["color"] + + @color.setter + def color(self, val): + self["color"] = val + + @property + def _prop_descriptions(self): + return """\ + color + Sets the text font color of selected points. + """ + + def __init__(self, arg=None, color=None, **kwargs): + """ + Construct a new Textfont object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.bar.selected.Textfont` + color + Sets the text font color of selected points. + + Returns + ------- + Textfont + """ + super().__init__("textfont") + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + if arg is None: + arg = {} + elif isinstance(arg, self.__class__): + arg = arg.to_plotly_json() + elif isinstance(arg, dict): + arg = _copy.copy(arg) + else: + raise ValueError("""\ +The first argument to the plotly.graph_objs.bar.selected.Textfont +constructor must be a dict or +an instance of :class:`plotly.graph_objs.bar.selected.Textfont`""") + + self._skip_invalid = kwargs.pop("skip_invalid", False) + self._validate = kwargs.pop("_validate", True) + + self._set_property("color", arg, color) + self._process_kwargs(**dict(arg, **kwargs)) + self._skip_invalid = False diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/bar/unselected/.___init__.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/bar/unselected/.___init__.py new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/bar/unselected/.___init__.py differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/bar/unselected/.___pycache__ b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/bar/unselected/.___pycache__ new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/bar/unselected/.___pycache__ differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/bar/unselected/.__marker.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/bar/unselected/.__marker.py new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/bar/unselected/.__marker.py differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/bar/unselected/.__textfont.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/bar/unselected/.__textfont.py new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/bar/unselected/.__textfont.py differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/bar/unselected/__init__.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/bar/unselected/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..851549000c0d17cdc7711565999bb9de85ebcb65 --- /dev/null +++ b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/bar/unselected/__init__.py @@ -0,0 +1,12 @@ +import sys +from typing import TYPE_CHECKING + +if TYPE_CHECKING: + from ._marker import Marker + from ._textfont import Textfont +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, [], ["._marker.Marker", "._textfont.Textfont"] + ) diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/bar/unselected/_marker.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/bar/unselected/_marker.py new file mode 100644 index 0000000000000000000000000000000000000000..a4e004c7aeecf5c9b040efc5575f108009dfe391 --- /dev/null +++ b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/bar/unselected/_marker.py @@ -0,0 +1,110 @@ +# --- THIS FILE IS AUTO-GENERATED --- +# Modifications will be overwitten the next time code generation run. + +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Marker(_BaseTraceHierarchyType): + _parent_path_str = "bar.unselected" + _path_str = "bar.unselected.marker" + _valid_props = {"color", "opacity"} + + @property + def color(self): + """ + Sets the marker color of unselected points, applied only when a + selection exists. + + The 'color' property is a color and may be specified as: + - A hex string (e.g. '#ff0000') + - An rgb/rgba string (e.g. 'rgb(255,0,0)') + - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') + - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') + - A named CSS color: see https://plotly.com/python/css-colors/ for a list + + Returns + ------- + str + """ + return self["color"] + + @color.setter + def color(self, val): + self["color"] = val + + @property + def opacity(self): + """ + Sets the marker opacity of unselected points, applied only when + a selection exists. + + The 'opacity' property is a number and may be specified as: + - An int or float in the interval [0, 1] + + Returns + ------- + int|float + """ + return self["opacity"] + + @opacity.setter + def opacity(self, val): + self["opacity"] = val + + @property + def _prop_descriptions(self): + return """\ + color + Sets the marker color of unselected points, applied + only when a selection exists. + opacity + Sets the marker opacity of unselected points, applied + only when a selection exists. + """ + + def __init__(self, arg=None, color=None, opacity=None, **kwargs): + """ + Construct a new Marker object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.bar.unselected.Marker` + color + Sets the marker color of unselected points, applied + only when a selection exists. + opacity + Sets the marker opacity of unselected points, applied + only when a selection exists. + + Returns + ------- + Marker + """ + super().__init__("marker") + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + if arg is None: + arg = {} + elif isinstance(arg, self.__class__): + arg = arg.to_plotly_json() + elif isinstance(arg, dict): + arg = _copy.copy(arg) + else: + raise ValueError("""\ +The first argument to the plotly.graph_objs.bar.unselected.Marker +constructor must be a dict or +an instance of :class:`plotly.graph_objs.bar.unselected.Marker`""") + + self._skip_invalid = kwargs.pop("skip_invalid", False) + self._validate = kwargs.pop("_validate", True) + + self._set_property("color", arg, color) + self._set_property("opacity", arg, opacity) + self._process_kwargs(**dict(arg, **kwargs)) + self._skip_invalid = False diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/bar/unselected/_textfont.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/bar/unselected/_textfont.py new file mode 100644 index 0000000000000000000000000000000000000000..eb15311b9c8d732a11c08752d7463d728430a6f7 --- /dev/null +++ b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/bar/unselected/_textfont.py @@ -0,0 +1,84 @@ +# --- THIS FILE IS AUTO-GENERATED --- +# Modifications will be overwitten the next time code generation run. + +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Textfont(_BaseTraceHierarchyType): + _parent_path_str = "bar.unselected" + _path_str = "bar.unselected.textfont" + _valid_props = {"color"} + + @property + def color(self): + """ + Sets the text font color of unselected points, applied only + when a selection exists. + + The 'color' property is a color and may be specified as: + - A hex string (e.g. '#ff0000') + - An rgb/rgba string (e.g. 'rgb(255,0,0)') + - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') + - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') + - A named CSS color: see https://plotly.com/python/css-colors/ for a list + + Returns + ------- + str + """ + return self["color"] + + @color.setter + def color(self, val): + self["color"] = val + + @property + def _prop_descriptions(self): + return """\ + color + Sets the text font color of unselected points, applied + only when a selection exists. + """ + + def __init__(self, arg=None, color=None, **kwargs): + """ + Construct a new Textfont object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.bar.unselected.Textfont` + color + Sets the text font color of unselected points, applied + only when a selection exists. + + Returns + ------- + Textfont + """ + super().__init__("textfont") + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + if arg is None: + arg = {} + elif isinstance(arg, self.__class__): + arg = arg.to_plotly_json() + elif isinstance(arg, dict): + arg = _copy.copy(arg) + else: + raise ValueError("""\ +The first argument to the plotly.graph_objs.bar.unselected.Textfont +constructor must be a dict or +an instance of :class:`plotly.graph_objs.bar.unselected.Textfont`""") + + self._skip_invalid = kwargs.pop("skip_invalid", False) + self._validate = kwargs.pop("_validate", True) + + self._set_property("color", arg, color) + self._process_kwargs(**dict(arg, **kwargs)) + self._skip_invalid = False diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/barpolar/.___init__.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/barpolar/.___init__.py new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/barpolar/.___init__.py differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/barpolar/.___pycache__ b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/barpolar/.___pycache__ new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/barpolar/.___pycache__ differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/barpolar/.__hoverlabel.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/barpolar/.__hoverlabel.py new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/barpolar/.__hoverlabel.py differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/barpolar/.__legendgrouptitle.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/barpolar/.__legendgrouptitle.py new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/barpolar/.__legendgrouptitle.py differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/barpolar/.__marker.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/barpolar/.__marker.py new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/barpolar/.__marker.py differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/barpolar/.__selected.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/barpolar/.__selected.py new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/barpolar/.__selected.py differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/barpolar/.__stream.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/barpolar/.__stream.py new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/barpolar/.__stream.py differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/barpolar/.__unselected.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/barpolar/.__unselected.py new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/barpolar/.__unselected.py differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/barpolar/._hoverlabel b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/barpolar/._hoverlabel new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/barpolar/._hoverlabel differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/barpolar/._legendgrouptitle b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/barpolar/._legendgrouptitle new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/barpolar/._legendgrouptitle differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/barpolar/._marker b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/barpolar/._marker new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/barpolar/._marker differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/barpolar/._selected b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/barpolar/._selected new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/barpolar/._selected differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/barpolar/._unselected b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/barpolar/._unselected new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/barpolar/._unselected differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/barpolar/__init__.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/barpolar/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..12dab9a56439db25a4c6c00ba515ece2de6f948b --- /dev/null +++ b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/barpolar/__init__.py @@ -0,0 +1,30 @@ +import sys +from typing import TYPE_CHECKING + +if TYPE_CHECKING: + from ._hoverlabel import Hoverlabel + from ._legendgrouptitle import Legendgrouptitle + from ._marker import Marker + from ._selected import Selected + from ._stream import Stream + from ._unselected import Unselected + from . import hoverlabel + from . import legendgrouptitle + from . import marker + from . import selected + from . import unselected +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [".hoverlabel", ".legendgrouptitle", ".marker", ".selected", ".unselected"], + [ + "._hoverlabel.Hoverlabel", + "._legendgrouptitle.Legendgrouptitle", + "._marker.Marker", + "._selected.Selected", + "._stream.Stream", + "._unselected.Unselected", + ], + ) diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/barpolar/_hoverlabel.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/barpolar/_hoverlabel.py new file mode 100644 index 0000000000000000000000000000000000000000..b528ce3f80050a27b50d3996747a655a78a2ff75 --- /dev/null +++ b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/barpolar/_hoverlabel.py @@ -0,0 +1,366 @@ +# --- THIS FILE IS AUTO-GENERATED --- +# Modifications will be overwitten the next time code generation run. + +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Hoverlabel(_BaseTraceHierarchyType): + _parent_path_str = "barpolar" + _path_str = "barpolar.hoverlabel" + _valid_props = { + "align", + "alignsrc", + "bgcolor", + "bgcolorsrc", + "bordercolor", + "bordercolorsrc", + "font", + "namelength", + "namelengthsrc", + "showarrow", + } + + @property + def align(self): + """ + Sets the horizontal alignment of the text content within hover + label box. Has an effect only if the hover label text spans + more two or more lines + + The 'align' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['left', 'right', 'auto'] + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + Any|numpy.ndarray + """ + return self["align"] + + @align.setter + def align(self, val): + self["align"] = val + + @property + def alignsrc(self): + """ + Sets the source reference on Chart Studio Cloud for `align`. + + The 'alignsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["alignsrc"] + + @alignsrc.setter + def alignsrc(self, val): + self["alignsrc"] = val + + @property + def bgcolor(self): + """ + Sets the background color of the hover labels for this trace + + The 'bgcolor' property is a color and may be specified as: + - A hex string (e.g. '#ff0000') + - An rgb/rgba string (e.g. 'rgb(255,0,0)') + - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') + - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') + - A named CSS color: see https://plotly.com/python/css-colors/ for a list + - A list or array of any of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["bgcolor"] + + @bgcolor.setter + def bgcolor(self, val): + self["bgcolor"] = val + + @property + def bgcolorsrc(self): + """ + Sets the source reference on Chart Studio Cloud for `bgcolor`. + + The 'bgcolorsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["bgcolorsrc"] + + @bgcolorsrc.setter + def bgcolorsrc(self, val): + self["bgcolorsrc"] = val + + @property + def bordercolor(self): + """ + Sets the border color of the hover labels for this trace. + + The 'bordercolor' property is a color and may be specified as: + - A hex string (e.g. '#ff0000') + - An rgb/rgba string (e.g. 'rgb(255,0,0)') + - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') + - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') + - A named CSS color: see https://plotly.com/python/css-colors/ for a list + - A list or array of any of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["bordercolor"] + + @bordercolor.setter + def bordercolor(self, val): + self["bordercolor"] = val + + @property + def bordercolorsrc(self): + """ + Sets the source reference on Chart Studio Cloud for + `bordercolor`. + + The 'bordercolorsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["bordercolorsrc"] + + @bordercolorsrc.setter + def bordercolorsrc(self, val): + self["bordercolorsrc"] = val + + @property + def font(self): + """ + Sets the font used in hover labels. + + The 'font' property is an instance of Font + that may be specified as: + - An instance of :class:`plotly.graph_objs.barpolar.hoverlabel.Font` + - A dict of string/value properties that will be passed + to the Font constructor + + Returns + ------- + plotly.graph_objs.barpolar.hoverlabel.Font + """ + return self["font"] + + @font.setter + def font(self, val): + self["font"] = val + + @property + def namelength(self): + """ + Sets the default length (in number of characters) of the trace + name in the hover labels for all traces. -1 shows the whole + name regardless of length. 0-3 shows the first 0-3 characters, + and an integer >3 will show the whole name if it is less than + that many characters, but if it is longer, will truncate to + `namelength - 3` characters and add an ellipsis. + + The 'namelength' property is a integer and may be specified as: + - An int (or float that will be cast to an int) + in the interval [-1, 9223372036854775807] + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + int|numpy.ndarray + """ + return self["namelength"] + + @namelength.setter + def namelength(self, val): + self["namelength"] = val + + @property + def namelengthsrc(self): + """ + Sets the source reference on Chart Studio Cloud for + `namelength`. + + The 'namelengthsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["namelengthsrc"] + + @namelengthsrc.setter + def namelengthsrc(self, val): + self["namelengthsrc"] = val + + @property + def showarrow(self): + """ + Sets whether or not to show the hover label arrow/triangle + pointing to the data point. + + The 'showarrow' property is a boolean and must be specified as: + - A boolean value: True or False + + Returns + ------- + bool + """ + return self["showarrow"] + + @showarrow.setter + def showarrow(self, val): + self["showarrow"] = val + + @property + def _prop_descriptions(self): + return """\ + align + Sets the horizontal alignment of the text content + within hover label box. Has an effect only if the hover + label text spans more two or more lines + alignsrc + Sets the source reference on Chart Studio Cloud for + `align`. + bgcolor + Sets the background color of the hover labels for this + trace + bgcolorsrc + Sets the source reference on Chart Studio Cloud for + `bgcolor`. + bordercolor + Sets the border color of the hover labels for this + trace. + bordercolorsrc + Sets the source reference on Chart Studio Cloud for + `bordercolor`. + font + Sets the font used in hover labels. + namelength + Sets the default length (in number of characters) of + the trace name in the hover labels for all traces. -1 + shows the whole name regardless of length. 0-3 shows + the first 0-3 characters, and an integer >3 will show + the whole name if it is less than that many characters, + but if it is longer, will truncate to `namelength - 3` + characters and add an ellipsis. + namelengthsrc + Sets the source reference on Chart Studio Cloud for + `namelength`. + showarrow + Sets whether or not to show the hover label + arrow/triangle pointing to the data point. + """ + + def __init__( + self, + arg=None, + align=None, + alignsrc=None, + bgcolor=None, + bgcolorsrc=None, + bordercolor=None, + bordercolorsrc=None, + font=None, + namelength=None, + namelengthsrc=None, + showarrow=None, + **kwargs, + ): + """ + Construct a new Hoverlabel object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.barpolar.Hoverlabel` + align + Sets the horizontal alignment of the text content + within hover label box. Has an effect only if the hover + label text spans more two or more lines + alignsrc + Sets the source reference on Chart Studio Cloud for + `align`. + bgcolor + Sets the background color of the hover labels for this + trace + bgcolorsrc + Sets the source reference on Chart Studio Cloud for + `bgcolor`. + bordercolor + Sets the border color of the hover labels for this + trace. + bordercolorsrc + Sets the source reference on Chart Studio Cloud for + `bordercolor`. + font + Sets the font used in hover labels. + namelength + Sets the default length (in number of characters) of + the trace name in the hover labels for all traces. -1 + shows the whole name regardless of length. 0-3 shows + the first 0-3 characters, and an integer >3 will show + the whole name if it is less than that many characters, + but if it is longer, will truncate to `namelength - 3` + characters and add an ellipsis. + namelengthsrc + Sets the source reference on Chart Studio Cloud for + `namelength`. + showarrow + Sets whether or not to show the hover label + arrow/triangle pointing to the data point. + + Returns + ------- + Hoverlabel + """ + super().__init__("hoverlabel") + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + if arg is None: + arg = {} + elif isinstance(arg, self.__class__): + arg = arg.to_plotly_json() + elif isinstance(arg, dict): + arg = _copy.copy(arg) + else: + raise ValueError("""\ +The first argument to the plotly.graph_objs.barpolar.Hoverlabel +constructor must be a dict or +an instance of :class:`plotly.graph_objs.barpolar.Hoverlabel`""") + + self._skip_invalid = kwargs.pop("skip_invalid", False) + self._validate = kwargs.pop("_validate", True) + + self._set_property("align", arg, align) + self._set_property("alignsrc", arg, alignsrc) + self._set_property("bgcolor", arg, bgcolor) + self._set_property("bgcolorsrc", arg, bgcolorsrc) + self._set_property("bordercolor", arg, bordercolor) + self._set_property("bordercolorsrc", arg, bordercolorsrc) + self._set_property("font", arg, font) + self._set_property("namelength", arg, namelength) + self._set_property("namelengthsrc", arg, namelengthsrc) + self._set_property("showarrow", arg, showarrow) + self._process_kwargs(**dict(arg, **kwargs)) + self._skip_invalid = False diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/barpolar/_legendgrouptitle.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/barpolar/_legendgrouptitle.py new file mode 100644 index 0000000000000000000000000000000000000000..d5a65562dc8716edcf7029ae6eae08fd6d7b209d --- /dev/null +++ b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/barpolar/_legendgrouptitle.py @@ -0,0 +1,104 @@ +# --- THIS FILE IS AUTO-GENERATED --- +# Modifications will be overwitten the next time code generation run. + +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Legendgrouptitle(_BaseTraceHierarchyType): + _parent_path_str = "barpolar" + _path_str = "barpolar.legendgrouptitle" + _valid_props = {"font", "text"} + + @property + def font(self): + """ + Sets this legend group's title font. + + The 'font' property is an instance of Font + that may be specified as: + - An instance of :class:`plotly.graph_objs.barpolar.legendgrouptitle.Font` + - A dict of string/value properties that will be passed + to the Font constructor + + Returns + ------- + plotly.graph_objs.barpolar.legendgrouptitle.Font + """ + return self["font"] + + @font.setter + def font(self, val): + self["font"] = val + + @property + def text(self): + """ + Sets the title of the legend group. + + The 'text' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["text"] + + @text.setter + def text(self, val): + self["text"] = val + + @property + def _prop_descriptions(self): + return """\ + font + Sets this legend group's title font. + text + Sets the title of the legend group. + """ + + def __init__(self, arg=None, font=None, text=None, **kwargs): + """ + Construct a new Legendgrouptitle object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.barpolar.Legendgrouptitle` + font + Sets this legend group's title font. + text + Sets the title of the legend group. + + Returns + ------- + Legendgrouptitle + """ + super().__init__("legendgrouptitle") + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + if arg is None: + arg = {} + elif isinstance(arg, self.__class__): + arg = arg.to_plotly_json() + elif isinstance(arg, dict): + arg = _copy.copy(arg) + else: + raise ValueError("""\ +The first argument to the plotly.graph_objs.barpolar.Legendgrouptitle +constructor must be a dict or +an instance of :class:`plotly.graph_objs.barpolar.Legendgrouptitle`""") + + self._skip_invalid = kwargs.pop("skip_invalid", False) + self._validate = kwargs.pop("_validate", True) + + self._set_property("font", arg, font) + self._set_property("text", arg, text) + self._process_kwargs(**dict(arg, **kwargs)) + self._skip_invalid = False diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/barpolar/_marker.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/barpolar/_marker.py new file mode 100644 index 0000000000000000000000000000000000000000..97977f391ac8dcd8d925487428381fcf23e25dc9 --- /dev/null +++ b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/barpolar/_marker.py @@ -0,0 +1,650 @@ +# --- THIS FILE IS AUTO-GENERATED --- +# Modifications will be overwitten the next time code generation run. + +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Marker(_BaseTraceHierarchyType): + _parent_path_str = "barpolar" + _path_str = "barpolar.marker" + _valid_props = { + "autocolorscale", + "cauto", + "cmax", + "cmid", + "cmin", + "color", + "coloraxis", + "colorbar", + "colorscale", + "colorsrc", + "line", + "opacity", + "opacitysrc", + "pattern", + "reversescale", + "showscale", + } + + @property + def autocolorscale(self): + """ + Determines whether the colorscale is a default palette + (`autocolorscale: true`) or the palette determined by + `marker.colorscale`. Has an effect only if in `marker.color` is + set to a numerical array. In case `colorscale` is unspecified + or `autocolorscale` is true, the default palette will be chosen + according to whether numbers in the `color` array are all + positive, all negative or mixed. + + The 'autocolorscale' property is a boolean and must be specified as: + - A boolean value: True or False + + Returns + ------- + bool + """ + return self["autocolorscale"] + + @autocolorscale.setter + def autocolorscale(self, val): + self["autocolorscale"] = val + + @property + def cauto(self): + """ + Determines whether or not the color domain is computed with + respect to the input data (here in `marker.color`) or the + bounds set in `marker.cmin` and `marker.cmax` Has an effect + only if in `marker.color` is set to a numerical array. Defaults + to `false` when `marker.cmin` and `marker.cmax` are set by the + user. + + The 'cauto' property is a boolean and must be specified as: + - A boolean value: True or False + + Returns + ------- + bool + """ + return self["cauto"] + + @cauto.setter + def cauto(self, val): + self["cauto"] = val + + @property + def cmax(self): + """ + Sets the upper bound of the color domain. Has an effect only if + in `marker.color` is set to a numerical array. Value should + have the same units as in `marker.color` and if set, + `marker.cmin` must be set as well. + + The 'cmax' property is a number and may be specified as: + - An int or float + + Returns + ------- + int|float + """ + return self["cmax"] + + @cmax.setter + def cmax(self, val): + self["cmax"] = val + + @property + def cmid(self): + """ + Sets the mid-point of the color domain by scaling `marker.cmin` + and/or `marker.cmax` to be equidistant to this point. Has an + effect only if in `marker.color` is set to a numerical array. + Value should have the same units as in `marker.color`. Has no + effect when `marker.cauto` is `false`. + + The 'cmid' property is a number and may be specified as: + - An int or float + + Returns + ------- + int|float + """ + return self["cmid"] + + @cmid.setter + def cmid(self, val): + self["cmid"] = val + + @property + def cmin(self): + """ + Sets the lower bound of the color domain. Has an effect only if + in `marker.color` is set to a numerical array. Value should + have the same units as in `marker.color` and if set, + `marker.cmax` must be set as well. + + The 'cmin' property is a number and may be specified as: + - An int or float + + Returns + ------- + int|float + """ + return self["cmin"] + + @cmin.setter + def cmin(self, val): + self["cmin"] = val + + @property + def color(self): + """ + Sets the marker color. It accepts either a specific color or an + array of numbers that are mapped to the colorscale relative to + the max and min values of the array or relative to + `marker.cmin` and `marker.cmax` if set. + + The 'color' property is a color and may be specified as: + - A hex string (e.g. '#ff0000') + - An rgb/rgba string (e.g. 'rgb(255,0,0)') + - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') + - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') + - A named CSS color: see https://plotly.com/python/css-colors/ for a list + - A number that will be interpreted as a color + according to barpolar.marker.colorscale + - A list or array of any of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["color"] + + @color.setter + def color(self, val): + self["color"] = val + + @property + def coloraxis(self): + """ + Sets a reference to a shared color axis. References to these + shared color axes are "coloraxis", "coloraxis2", "coloraxis3", + etc. Settings for these shared color axes are set in the + layout, under `layout.coloraxis`, `layout.coloraxis2`, etc. + Note that multiple color scales can be linked to the same color + axis. + + The 'coloraxis' property is an identifier of a particular + subplot, of type 'coloraxis', that may be specified as: + - the string 'coloraxis' optionally followed by an integer >= 1 + (e.g. 'coloraxis', 'coloraxis1', 'coloraxis2', 'coloraxis3', etc.) + + Returns + ------- + str + """ + return self["coloraxis"] + + @coloraxis.setter + def coloraxis(self, val): + self["coloraxis"] = val + + @property + def colorbar(self): + """ + The 'colorbar' property is an instance of ColorBar + that may be specified as: + - An instance of :class:`plotly.graph_objs.barpolar.marker.ColorBar` + - A dict of string/value properties that will be passed + to the ColorBar constructor + + Returns + ------- + plotly.graph_objs.barpolar.marker.ColorBar + """ + return self["colorbar"] + + @colorbar.setter + def colorbar(self, val): + self["colorbar"] = val + + @property + def colorscale(self): + """ + Sets the colorscale. Has an effect only if in `marker.color` is + set to a numerical array. The colorscale must be an array + containing arrays mapping a normalized value to an rgb, rgba, + hex, hsl, hsv, or named color string. At minimum, a mapping for + the lowest (0) and highest (1) values are required. For + example, `[[0, 'rgb(0,0,255)'], [1, 'rgb(255,0,0)']]`. To + control the bounds of the colorscale in color space, use + `marker.cmin` and `marker.cmax`. Alternatively, `colorscale` + may be a palette name string of the following list: Blackbody,B + luered,Blues,Cividis,Earth,Electric,Greens,Greys,Hot,Jet,Picnic + ,Portland,Rainbow,RdBu,Reds,Viridis,YlGnBu,YlOrRd. + + The 'colorscale' property is a colorscale and may be + specified as: + - A list of colors that will be spaced evenly to create the colorscale. + Many predefined colorscale lists are included in the sequential, diverging, + and cyclical modules in the plotly.colors package. + - A list of 2-element lists where the first element is the + normalized color level value (starting at 0 and ending at 1), + and the second item is a valid color string. + (e.g. [[0, 'green'], [0.5, 'red'], [1.0, 'rgb(0, 0, 255)']]) + - One of the following named colorscales: + ['aggrnyl', 'agsunset', 'algae', 'amp', 'armyrose', 'balance', + 'blackbody', 'bluered', 'blues', 'blugrn', 'bluyl', 'brbg', + 'brwnyl', 'bugn', 'bupu', 'burg', 'burgyl', 'cividis', 'curl', + 'darkmint', 'deep', 'delta', 'dense', 'earth', 'edge', 'electric', + 'emrld', 'fall', 'geyser', 'gnbu', 'gray', 'greens', 'greys', + 'haline', 'hot', 'hsv', 'ice', 'icefire', 'inferno', 'jet', + 'magenta', 'magma', 'matter', 'mint', 'mrybm', 'mygbm', 'oranges', + 'orrd', 'oryel', 'oxy', 'peach', 'phase', 'picnic', 'pinkyl', + 'piyg', 'plasma', 'plotly3', 'portland', 'prgn', 'pubu', 'pubugn', + 'puor', 'purd', 'purp', 'purples', 'purpor', 'rainbow', 'rdbu', + 'rdgy', 'rdpu', 'rdylbu', 'rdylgn', 'redor', 'reds', 'solar', + 'spectral', 'speed', 'sunset', 'sunsetdark', 'teal', 'tealgrn', + 'tealrose', 'tempo', 'temps', 'thermal', 'tropic', 'turbid', + 'turbo', 'twilight', 'viridis', 'ylgn', 'ylgnbu', 'ylorbr', + 'ylorrd']. + Appending '_r' to a named colorscale reverses it. + + Returns + ------- + str + """ + return self["colorscale"] + + @colorscale.setter + def colorscale(self, val): + self["colorscale"] = val + + @property + def colorsrc(self): + """ + Sets the source reference on Chart Studio Cloud for `color`. + + The 'colorsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["colorsrc"] + + @colorsrc.setter + def colorsrc(self, val): + self["colorsrc"] = val + + @property + def line(self): + """ + The 'line' property is an instance of Line + that may be specified as: + - An instance of :class:`plotly.graph_objs.barpolar.marker.Line` + - A dict of string/value properties that will be passed + to the Line constructor + + Returns + ------- + plotly.graph_objs.barpolar.marker.Line + """ + return self["line"] + + @line.setter + def line(self, val): + self["line"] = val + + @property + def opacity(self): + """ + Sets the opacity of the bars. + + The 'opacity' property is a number and may be specified as: + - An int or float in the interval [0, 1] + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + int|float|numpy.ndarray + """ + return self["opacity"] + + @opacity.setter + def opacity(self, val): + self["opacity"] = val + + @property + def opacitysrc(self): + """ + Sets the source reference on Chart Studio Cloud for `opacity`. + + The 'opacitysrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["opacitysrc"] + + @opacitysrc.setter + def opacitysrc(self, val): + self["opacitysrc"] = val + + @property + def pattern(self): + """ + Sets the pattern within the marker. + + The 'pattern' property is an instance of Pattern + that may be specified as: + - An instance of :class:`plotly.graph_objs.barpolar.marker.Pattern` + - A dict of string/value properties that will be passed + to the Pattern constructor + + Returns + ------- + plotly.graph_objs.barpolar.marker.Pattern + """ + return self["pattern"] + + @pattern.setter + def pattern(self, val): + self["pattern"] = val + + @property + def reversescale(self): + """ + Reverses the color mapping if true. Has an effect only if in + `marker.color` is set to a numerical array. If true, + `marker.cmin` will correspond to the last color in the array + and `marker.cmax` will correspond to the first color. + + The 'reversescale' property is a boolean and must be specified as: + - A boolean value: True or False + + Returns + ------- + bool + """ + return self["reversescale"] + + @reversescale.setter + def reversescale(self, val): + self["reversescale"] = val + + @property + def showscale(self): + """ + Determines whether or not a colorbar is displayed for this + trace. Has an effect only if in `marker.color` is set to a + numerical array. + + The 'showscale' property is a boolean and must be specified as: + - A boolean value: True or False + + Returns + ------- + bool + """ + return self["showscale"] + + @showscale.setter + def showscale(self, val): + self["showscale"] = val + + @property + def _prop_descriptions(self): + return """\ + autocolorscale + Determines whether the colorscale is a default palette + (`autocolorscale: true`) or the palette determined by + `marker.colorscale`. Has an effect only if in + `marker.color` is set to a numerical array. In case + `colorscale` is unspecified or `autocolorscale` is + true, the default palette will be chosen according to + whether numbers in the `color` array are all positive, + all negative or mixed. + cauto + Determines whether or not the color domain is computed + with respect to the input data (here in `marker.color`) + or the bounds set in `marker.cmin` and `marker.cmax` + Has an effect only if in `marker.color` is set to a + numerical array. Defaults to `false` when `marker.cmin` + and `marker.cmax` are set by the user. + cmax + Sets the upper bound of the color domain. Has an effect + only if in `marker.color` is set to a numerical array. + Value should have the same units as in `marker.color` + and if set, `marker.cmin` must be set as well. + cmid + Sets the mid-point of the color domain by scaling + `marker.cmin` and/or `marker.cmax` to be equidistant to + this point. Has an effect only if in `marker.color` is + set to a numerical array. Value should have the same + units as in `marker.color`. Has no effect when + `marker.cauto` is `false`. + cmin + Sets the lower bound of the color domain. Has an effect + only if in `marker.color` is set to a numerical array. + Value should have the same units as in `marker.color` + and if set, `marker.cmax` must be set as well. + color + Sets the marker color. It accepts either a specific + color or an array of numbers that are mapped to the + colorscale relative to the max and min values of the + array or relative to `marker.cmin` and `marker.cmax` if + set. + coloraxis + Sets a reference to a shared color axis. References to + these shared color axes are "coloraxis", "coloraxis2", + "coloraxis3", etc. Settings for these shared color axes + are set in the layout, under `layout.coloraxis`, + `layout.coloraxis2`, etc. Note that multiple color + scales can be linked to the same color axis. + colorbar + :class:`plotly.graph_objects.barpolar.marker.ColorBar` + instance or dict with compatible properties + colorscale + Sets the colorscale. Has an effect only if in + `marker.color` is set to a numerical array. The + colorscale must be an array containing arrays mapping a + normalized value to an rgb, rgba, hex, hsl, hsv, or + named color string. At minimum, a mapping for the + lowest (0) and highest (1) values are required. For + example, `[[0, 'rgb(0,0,255)'], [1, 'rgb(255,0,0)']]`. + To control the bounds of the colorscale in color space, + use `marker.cmin` and `marker.cmax`. Alternatively, + `colorscale` may be a palette name string of the + following list: Blackbody,Bluered,Blues,Cividis,Earth,E + lectric,Greens,Greys,Hot,Jet,Picnic,Portland,Rainbow,Rd + Bu,Reds,Viridis,YlGnBu,YlOrRd. + colorsrc + Sets the source reference on Chart Studio Cloud for + `color`. + line + :class:`plotly.graph_objects.barpolar.marker.Line` + instance or dict with compatible properties + opacity + Sets the opacity of the bars. + opacitysrc + Sets the source reference on Chart Studio Cloud for + `opacity`. + pattern + Sets the pattern within the marker. + reversescale + Reverses the color mapping if true. Has an effect only + if in `marker.color` is set to a numerical array. If + true, `marker.cmin` will correspond to the last color + in the array and `marker.cmax` will correspond to the + first color. + showscale + Determines whether or not a colorbar is displayed for + this trace. Has an effect only if in `marker.color` is + set to a numerical array. + """ + + def __init__( + self, + arg=None, + autocolorscale=None, + cauto=None, + cmax=None, + cmid=None, + cmin=None, + color=None, + coloraxis=None, + colorbar=None, + colorscale=None, + colorsrc=None, + line=None, + opacity=None, + opacitysrc=None, + pattern=None, + reversescale=None, + showscale=None, + **kwargs, + ): + """ + Construct a new Marker object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.barpolar.Marker` + autocolorscale + Determines whether the colorscale is a default palette + (`autocolorscale: true`) or the palette determined by + `marker.colorscale`. Has an effect only if in + `marker.color` is set to a numerical array. In case + `colorscale` is unspecified or `autocolorscale` is + true, the default palette will be chosen according to + whether numbers in the `color` array are all positive, + all negative or mixed. + cauto + Determines whether or not the color domain is computed + with respect to the input data (here in `marker.color`) + or the bounds set in `marker.cmin` and `marker.cmax` + Has an effect only if in `marker.color` is set to a + numerical array. Defaults to `false` when `marker.cmin` + and `marker.cmax` are set by the user. + cmax + Sets the upper bound of the color domain. Has an effect + only if in `marker.color` is set to a numerical array. + Value should have the same units as in `marker.color` + and if set, `marker.cmin` must be set as well. + cmid + Sets the mid-point of the color domain by scaling + `marker.cmin` and/or `marker.cmax` to be equidistant to + this point. Has an effect only if in `marker.color` is + set to a numerical array. Value should have the same + units as in `marker.color`. Has no effect when + `marker.cauto` is `false`. + cmin + Sets the lower bound of the color domain. Has an effect + only if in `marker.color` is set to a numerical array. + Value should have the same units as in `marker.color` + and if set, `marker.cmax` must be set as well. + color + Sets the marker color. It accepts either a specific + color or an array of numbers that are mapped to the + colorscale relative to the max and min values of the + array or relative to `marker.cmin` and `marker.cmax` if + set. + coloraxis + Sets a reference to a shared color axis. References to + these shared color axes are "coloraxis", "coloraxis2", + "coloraxis3", etc. Settings for these shared color axes + are set in the layout, under `layout.coloraxis`, + `layout.coloraxis2`, etc. Note that multiple color + scales can be linked to the same color axis. + colorbar + :class:`plotly.graph_objects.barpolar.marker.ColorBar` + instance or dict with compatible properties + colorscale + Sets the colorscale. Has an effect only if in + `marker.color` is set to a numerical array. The + colorscale must be an array containing arrays mapping a + normalized value to an rgb, rgba, hex, hsl, hsv, or + named color string. At minimum, a mapping for the + lowest (0) and highest (1) values are required. For + example, `[[0, 'rgb(0,0,255)'], [1, 'rgb(255,0,0)']]`. + To control the bounds of the colorscale in color space, + use `marker.cmin` and `marker.cmax`. Alternatively, + `colorscale` may be a palette name string of the + following list: Blackbody,Bluered,Blues,Cividis,Earth,E + lectric,Greens,Greys,Hot,Jet,Picnic,Portland,Rainbow,Rd + Bu,Reds,Viridis,YlGnBu,YlOrRd. + colorsrc + Sets the source reference on Chart Studio Cloud for + `color`. + line + :class:`plotly.graph_objects.barpolar.marker.Line` + instance or dict with compatible properties + opacity + Sets the opacity of the bars. + opacitysrc + Sets the source reference on Chart Studio Cloud for + `opacity`. + pattern + Sets the pattern within the marker. + reversescale + Reverses the color mapping if true. Has an effect only + if in `marker.color` is set to a numerical array. If + true, `marker.cmin` will correspond to the last color + in the array and `marker.cmax` will correspond to the + first color. + showscale + Determines whether or not a colorbar is displayed for + this trace. Has an effect only if in `marker.color` is + set to a numerical array. + + Returns + ------- + Marker + """ + super().__init__("marker") + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + if arg is None: + arg = {} + elif isinstance(arg, self.__class__): + arg = arg.to_plotly_json() + elif isinstance(arg, dict): + arg = _copy.copy(arg) + else: + raise ValueError("""\ +The first argument to the plotly.graph_objs.barpolar.Marker +constructor must be a dict or +an instance of :class:`plotly.graph_objs.barpolar.Marker`""") + + self._skip_invalid = kwargs.pop("skip_invalid", False) + self._validate = kwargs.pop("_validate", True) + + self._set_property("autocolorscale", arg, autocolorscale) + self._set_property("cauto", arg, cauto) + self._set_property("cmax", arg, cmax) + self._set_property("cmid", arg, cmid) + self._set_property("cmin", arg, cmin) + self._set_property("color", arg, color) + self._set_property("coloraxis", arg, coloraxis) + self._set_property("colorbar", arg, colorbar) + self._set_property("colorscale", arg, colorscale) + self._set_property("colorsrc", arg, colorsrc) + self._set_property("line", arg, line) + self._set_property("opacity", arg, opacity) + self._set_property("opacitysrc", arg, opacitysrc) + self._set_property("pattern", arg, pattern) + self._set_property("reversescale", arg, reversescale) + self._set_property("showscale", arg, showscale) + self._process_kwargs(**dict(arg, **kwargs)) + self._skip_invalid = False diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/barpolar/_selected.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/barpolar/_selected.py new file mode 100644 index 0000000000000000000000000000000000000000..60132e32cd4497f0224b9ce8aee641504ef324a2 --- /dev/null +++ b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/barpolar/_selected.py @@ -0,0 +1,106 @@ +# --- THIS FILE IS AUTO-GENERATED --- +# Modifications will be overwitten the next time code generation run. + +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Selected(_BaseTraceHierarchyType): + _parent_path_str = "barpolar" + _path_str = "barpolar.selected" + _valid_props = {"marker", "textfont"} + + @property + def marker(self): + """ + The 'marker' property is an instance of Marker + that may be specified as: + - An instance of :class:`plotly.graph_objs.barpolar.selected.Marker` + - A dict of string/value properties that will be passed + to the Marker constructor + + Returns + ------- + plotly.graph_objs.barpolar.selected.Marker + """ + return self["marker"] + + @marker.setter + def marker(self, val): + self["marker"] = val + + @property + def textfont(self): + """ + The 'textfont' property is an instance of Textfont + that may be specified as: + - An instance of :class:`plotly.graph_objs.barpolar.selected.Textfont` + - A dict of string/value properties that will be passed + to the Textfont constructor + + Returns + ------- + plotly.graph_objs.barpolar.selected.Textfont + """ + return self["textfont"] + + @textfont.setter + def textfont(self, val): + self["textfont"] = val + + @property + def _prop_descriptions(self): + return """\ + marker + :class:`plotly.graph_objects.barpolar.selected.Marker` + instance or dict with compatible properties + textfont + :class:`plotly.graph_objects.barpolar.selected.Textfont + ` instance or dict with compatible properties + """ + + def __init__(self, arg=None, marker=None, textfont=None, **kwargs): + """ + Construct a new Selected object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.barpolar.Selected` + marker + :class:`plotly.graph_objects.barpolar.selected.Marker` + instance or dict with compatible properties + textfont + :class:`plotly.graph_objects.barpolar.selected.Textfont + ` instance or dict with compatible properties + + Returns + ------- + Selected + """ + super().__init__("selected") + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + if arg is None: + arg = {} + elif isinstance(arg, self.__class__): + arg = arg.to_plotly_json() + elif isinstance(arg, dict): + arg = _copy.copy(arg) + else: + raise ValueError("""\ +The first argument to the plotly.graph_objs.barpolar.Selected +constructor must be a dict or +an instance of :class:`plotly.graph_objs.barpolar.Selected`""") + + self._skip_invalid = kwargs.pop("skip_invalid", False) + self._validate = kwargs.pop("_validate", True) + + self._set_property("marker", arg, marker) + self._set_property("textfont", arg, textfont) + self._process_kwargs(**dict(arg, **kwargs)) + self._skip_invalid = False diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/barpolar/_stream.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/barpolar/_stream.py new file mode 100644 index 0000000000000000000000000000000000000000..8640dbb62d1fcad420e90045669423194bddc968 --- /dev/null +++ b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/barpolar/_stream.py @@ -0,0 +1,114 @@ +# --- THIS FILE IS AUTO-GENERATED --- +# Modifications will be overwitten the next time code generation run. + +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Stream(_BaseTraceHierarchyType): + _parent_path_str = "barpolar" + _path_str = "barpolar.stream" + _valid_props = {"maxpoints", "token"} + + @property + def maxpoints(self): + """ + Sets the maximum number of points to keep on the plots from an + incoming stream. If `maxpoints` is set to 50, only the newest + 50 points will be displayed on the plot. + + The 'maxpoints' property is a number and may be specified as: + - An int or float in the interval [0, 10000] + + Returns + ------- + int|float + """ + return self["maxpoints"] + + @maxpoints.setter + def maxpoints(self, val): + self["maxpoints"] = val + + @property + def token(self): + """ + The stream id number links a data trace on a plot with a + stream. See https://chart-studio.plotly.com/settings for more + details. + + The 'token' property is a string and must be specified as: + - A non-empty string + + Returns + ------- + str + """ + return self["token"] + + @token.setter + def token(self, val): + self["token"] = val + + @property + def _prop_descriptions(self): + return """\ + maxpoints + Sets the maximum number of points to keep on the plots + from an incoming stream. If `maxpoints` is set to 50, + only the newest 50 points will be displayed on the + plot. + token + The stream id number links a data trace on a plot with + a stream. See https://chart-studio.plotly.com/settings + for more details. + """ + + def __init__(self, arg=None, maxpoints=None, token=None, **kwargs): + """ + Construct a new Stream object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.barpolar.Stream` + maxpoints + Sets the maximum number of points to keep on the plots + from an incoming stream. If `maxpoints` is set to 50, + only the newest 50 points will be displayed on the + plot. + token + The stream id number links a data trace on a plot with + a stream. See https://chart-studio.plotly.com/settings + for more details. + + Returns + ------- + Stream + """ + super().__init__("stream") + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + if arg is None: + arg = {} + elif isinstance(arg, self.__class__): + arg = arg.to_plotly_json() + elif isinstance(arg, dict): + arg = _copy.copy(arg) + else: + raise ValueError("""\ +The first argument to the plotly.graph_objs.barpolar.Stream +constructor must be a dict or +an instance of :class:`plotly.graph_objs.barpolar.Stream`""") + + self._skip_invalid = kwargs.pop("skip_invalid", False) + self._validate = kwargs.pop("_validate", True) + + self._set_property("maxpoints", arg, maxpoints) + self._set_property("token", arg, token) + self._process_kwargs(**dict(arg, **kwargs)) + self._skip_invalid = False diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/barpolar/_unselected.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/barpolar/_unselected.py new file mode 100644 index 0000000000000000000000000000000000000000..ef4cde928b982889add8df3f3acefac241867ec2 --- /dev/null +++ b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/barpolar/_unselected.py @@ -0,0 +1,106 @@ +# --- THIS FILE IS AUTO-GENERATED --- +# Modifications will be overwitten the next time code generation run. + +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Unselected(_BaseTraceHierarchyType): + _parent_path_str = "barpolar" + _path_str = "barpolar.unselected" + _valid_props = {"marker", "textfont"} + + @property + def marker(self): + """ + The 'marker' property is an instance of Marker + that may be specified as: + - An instance of :class:`plotly.graph_objs.barpolar.unselected.Marker` + - A dict of string/value properties that will be passed + to the Marker constructor + + Returns + ------- + plotly.graph_objs.barpolar.unselected.Marker + """ + return self["marker"] + + @marker.setter + def marker(self, val): + self["marker"] = val + + @property + def textfont(self): + """ + The 'textfont' property is an instance of Textfont + that may be specified as: + - An instance of :class:`plotly.graph_objs.barpolar.unselected.Textfont` + - A dict of string/value properties that will be passed + to the Textfont constructor + + Returns + ------- + plotly.graph_objs.barpolar.unselected.Textfont + """ + return self["textfont"] + + @textfont.setter + def textfont(self, val): + self["textfont"] = val + + @property + def _prop_descriptions(self): + return """\ + marker + :class:`plotly.graph_objects.barpolar.unselected.Marker + ` instance or dict with compatible properties + textfont + :class:`plotly.graph_objects.barpolar.unselected.Textfo + nt` instance or dict with compatible properties + """ + + def __init__(self, arg=None, marker=None, textfont=None, **kwargs): + """ + Construct a new Unselected object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.barpolar.Unselected` + marker + :class:`plotly.graph_objects.barpolar.unselected.Marker + ` instance or dict with compatible properties + textfont + :class:`plotly.graph_objects.barpolar.unselected.Textfo + nt` instance or dict with compatible properties + + Returns + ------- + Unselected + """ + super().__init__("unselected") + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + if arg is None: + arg = {} + elif isinstance(arg, self.__class__): + arg = arg.to_plotly_json() + elif isinstance(arg, dict): + arg = _copy.copy(arg) + else: + raise ValueError("""\ +The first argument to the plotly.graph_objs.barpolar.Unselected +constructor must be a dict or +an instance of :class:`plotly.graph_objs.barpolar.Unselected`""") + + self._skip_invalid = kwargs.pop("skip_invalid", False) + self._validate = kwargs.pop("_validate", True) + + self._set_property("marker", arg, marker) + self._set_property("textfont", arg, textfont) + self._process_kwargs(**dict(arg, **kwargs)) + self._skip_invalid = False diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/barpolar/hoverlabel/.___init__.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/barpolar/hoverlabel/.___init__.py new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/barpolar/hoverlabel/.___init__.py differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/barpolar/hoverlabel/.___pycache__ b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/barpolar/hoverlabel/.___pycache__ new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/barpolar/hoverlabel/.___pycache__ differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/barpolar/hoverlabel/.__font.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/barpolar/hoverlabel/.__font.py new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/barpolar/hoverlabel/.__font.py differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/barpolar/hoverlabel/__init__.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/barpolar/hoverlabel/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..56f600d3458c41f269053307377e9707ab13e090 --- /dev/null +++ b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/barpolar/hoverlabel/__init__.py @@ -0,0 +1,9 @@ +import sys +from typing import TYPE_CHECKING + +if TYPE_CHECKING: + from ._font import Font +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import(__name__, [], ["._font.Font"]) diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/barpolar/hoverlabel/_font.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/barpolar/hoverlabel/_font.py new file mode 100644 index 0000000000000000000000000000000000000000..fd59e9a887fea5bcd5b443711ef4eef9c04d0303 --- /dev/null +++ b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/barpolar/hoverlabel/_font.py @@ -0,0 +1,587 @@ +# --- THIS FILE IS AUTO-GENERATED --- +# Modifications will be overwitten the next time code generation run. + +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Font(_BaseTraceHierarchyType): + _parent_path_str = "barpolar.hoverlabel" + _path_str = "barpolar.hoverlabel.font" + _valid_props = { + "color", + "colorsrc", + "family", + "familysrc", + "lineposition", + "linepositionsrc", + "shadow", + "shadowsrc", + "size", + "sizesrc", + "style", + "stylesrc", + "textcase", + "textcasesrc", + "variant", + "variantsrc", + "weight", + "weightsrc", + } + + @property + def color(self): + """ + The 'color' property is a color and may be specified as: + - A hex string (e.g. '#ff0000') + - An rgb/rgba string (e.g. 'rgb(255,0,0)') + - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') + - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') + - A named CSS color: see https://plotly.com/python/css-colors/ for a list + - A list or array of any of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["color"] + + @color.setter + def color(self, val): + self["color"] = val + + @property + def colorsrc(self): + """ + Sets the source reference on Chart Studio Cloud for `color`. + + The 'colorsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["colorsrc"] + + @colorsrc.setter + def colorsrc(self, val): + self["colorsrc"] = val + + @property + def family(self): + """ + HTML font family - the typeface that will be applied by the web + browser. The web browser can only apply a font if it is + available on the system where it runs. Provide multiple font + families, separated by commas, to indicate the order in which + to apply fonts if they aren't available. + + The 'family' property is a string and must be specified as: + - A non-empty string + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["family"] + + @family.setter + def family(self, val): + self["family"] = val + + @property + def familysrc(self): + """ + Sets the source reference on Chart Studio Cloud for `family`. + + The 'familysrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["familysrc"] + + @familysrc.setter + def familysrc(self, val): + self["familysrc"] = val + + @property + def lineposition(self): + """ + Sets the kind of decoration line(s) with text, such as an + "under", "over" or "through" as well as combinations e.g. + "under+over", etc. + + The 'lineposition' property is a flaglist and may be specified + as a string containing: + - Any combination of ['under', 'over', 'through'] joined with '+' characters + (e.g. 'under+over') + OR exactly one of ['none'] (e.g. 'none') + - A list or array of the above + + Returns + ------- + Any|numpy.ndarray + """ + return self["lineposition"] + + @lineposition.setter + def lineposition(self, val): + self["lineposition"] = val + + @property + def linepositionsrc(self): + """ + Sets the source reference on Chart Studio Cloud for + `lineposition`. + + The 'linepositionsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["linepositionsrc"] + + @linepositionsrc.setter + def linepositionsrc(self, val): + self["linepositionsrc"] = val + + @property + def shadow(self): + """ + Sets the shape and color of the shadow behind text. "auto" + places minimal shadow and applies contrast text font color. See + https://developer.mozilla.org/en-US/docs/Web/CSS/text-shadow + for additional options. + + The 'shadow' property is a string and must be specified as: + - A string + - A number that will be converted to a string + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["shadow"] + + @shadow.setter + def shadow(self, val): + self["shadow"] = val + + @property + def shadowsrc(self): + """ + Sets the source reference on Chart Studio Cloud for `shadow`. + + The 'shadowsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["shadowsrc"] + + @shadowsrc.setter + def shadowsrc(self, val): + self["shadowsrc"] = val + + @property + def size(self): + """ + The 'size' property is a number and may be specified as: + - An int or float in the interval [1, inf] + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + int|float|numpy.ndarray + """ + return self["size"] + + @size.setter + def size(self, val): + self["size"] = val + + @property + def sizesrc(self): + """ + Sets the source reference on Chart Studio Cloud for `size`. + + The 'sizesrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["sizesrc"] + + @sizesrc.setter + def sizesrc(self, val): + self["sizesrc"] = val + + @property + def style(self): + """ + Sets whether a font should be styled with a normal or italic + face from its family. + + The 'style' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['normal', 'italic'] + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + Any|numpy.ndarray + """ + return self["style"] + + @style.setter + def style(self, val): + self["style"] = val + + @property + def stylesrc(self): + """ + Sets the source reference on Chart Studio Cloud for `style`. + + The 'stylesrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["stylesrc"] + + @stylesrc.setter + def stylesrc(self, val): + self["stylesrc"] = val + + @property + def textcase(self): + """ + Sets capitalization of text. It can be used to make text appear + in all-uppercase or all-lowercase, or with each word + capitalized. + + The 'textcase' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['normal', 'word caps', 'upper', 'lower'] + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + Any|numpy.ndarray + """ + return self["textcase"] + + @textcase.setter + def textcase(self, val): + self["textcase"] = val + + @property + def textcasesrc(self): + """ + Sets the source reference on Chart Studio Cloud for `textcase`. + + The 'textcasesrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["textcasesrc"] + + @textcasesrc.setter + def textcasesrc(self, val): + self["textcasesrc"] = val + + @property + def variant(self): + """ + Sets the variant of the font. + + The 'variant' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['normal', 'small-caps', 'all-small-caps', + 'all-petite-caps', 'petite-caps', 'unicase'] + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + Any|numpy.ndarray + """ + return self["variant"] + + @variant.setter + def variant(self, val): + self["variant"] = val + + @property + def variantsrc(self): + """ + Sets the source reference on Chart Studio Cloud for `variant`. + + The 'variantsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["variantsrc"] + + @variantsrc.setter + def variantsrc(self, val): + self["variantsrc"] = val + + @property + def weight(self): + """ + Sets the weight (or boldness) of the font. + + The 'weight' property is a integer and may be specified as: + - An int (or float that will be cast to an int) + in the interval [1, 1000] + OR exactly one of ['normal', 'bold'] (e.g. 'bold') + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + int|numpy.ndarray + """ + return self["weight"] + + @weight.setter + def weight(self, val): + self["weight"] = val + + @property + def weightsrc(self): + """ + Sets the source reference on Chart Studio Cloud for `weight`. + + The 'weightsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["weightsrc"] + + @weightsrc.setter + def weightsrc(self, val): + self["weightsrc"] = val + + @property + def _prop_descriptions(self): + return """\ + color + + colorsrc + Sets the source reference on Chart Studio Cloud for + `color`. + family + HTML font family - the typeface that will be applied by + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. + familysrc + Sets the source reference on Chart Studio Cloud for + `family`. + lineposition + Sets the kind of decoration line(s) with text, such as + an "under", "over" or "through" as well as combinations + e.g. "under+over", etc. + linepositionsrc + Sets the source reference on Chart Studio Cloud for + `lineposition`. + shadow + Sets the shape and color of the shadow behind text. + "auto" places minimal shadow and applies contrast text + font color. See https://developer.mozilla.org/en- + US/docs/Web/CSS/text-shadow for additional options. + shadowsrc + Sets the source reference on Chart Studio Cloud for + `shadow`. + size + + sizesrc + Sets the source reference on Chart Studio Cloud for + `size`. + style + Sets whether a font should be styled with a normal or + italic face from its family. + stylesrc + Sets the source reference on Chart Studio Cloud for + `style`. + textcase + Sets capitalization of text. It can be used to make + text appear in all-uppercase or all-lowercase, or with + each word capitalized. + textcasesrc + Sets the source reference on Chart Studio Cloud for + `textcase`. + variant + Sets the variant of the font. + variantsrc + Sets the source reference on Chart Studio Cloud for + `variant`. + weight + Sets the weight (or boldness) of the font. + weightsrc + Sets the source reference on Chart Studio Cloud for + `weight`. + """ + + def __init__( + self, + arg=None, + color=None, + colorsrc=None, + family=None, + familysrc=None, + lineposition=None, + linepositionsrc=None, + shadow=None, + shadowsrc=None, + size=None, + sizesrc=None, + style=None, + stylesrc=None, + textcase=None, + textcasesrc=None, + variant=None, + variantsrc=None, + weight=None, + weightsrc=None, + **kwargs, + ): + """ + Construct a new Font object + + Sets the font used in hover labels. + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.barpolar.hoverlabel.Font` + color + + colorsrc + Sets the source reference on Chart Studio Cloud for + `color`. + family + HTML font family - the typeface that will be applied by + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. + familysrc + Sets the source reference on Chart Studio Cloud for + `family`. + lineposition + Sets the kind of decoration line(s) with text, such as + an "under", "over" or "through" as well as combinations + e.g. "under+over", etc. + linepositionsrc + Sets the source reference on Chart Studio Cloud for + `lineposition`. + shadow + Sets the shape and color of the shadow behind text. + "auto" places minimal shadow and applies contrast text + font color. See https://developer.mozilla.org/en- + US/docs/Web/CSS/text-shadow for additional options. + shadowsrc + Sets the source reference on Chart Studio Cloud for + `shadow`. + size + + sizesrc + Sets the source reference on Chart Studio Cloud for + `size`. + style + Sets whether a font should be styled with a normal or + italic face from its family. + stylesrc + Sets the source reference on Chart Studio Cloud for + `style`. + textcase + Sets capitalization of text. It can be used to make + text appear in all-uppercase or all-lowercase, or with + each word capitalized. + textcasesrc + Sets the source reference on Chart Studio Cloud for + `textcase`. + variant + Sets the variant of the font. + variantsrc + Sets the source reference on Chart Studio Cloud for + `variant`. + weight + Sets the weight (or boldness) of the font. + weightsrc + Sets the source reference on Chart Studio Cloud for + `weight`. + + Returns + ------- + Font + """ + super().__init__("font") + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + if arg is None: + arg = {} + elif isinstance(arg, self.__class__): + arg = arg.to_plotly_json() + elif isinstance(arg, dict): + arg = _copy.copy(arg) + else: + raise ValueError("""\ +The first argument to the plotly.graph_objs.barpolar.hoverlabel.Font +constructor must be a dict or +an instance of :class:`plotly.graph_objs.barpolar.hoverlabel.Font`""") + + self._skip_invalid = kwargs.pop("skip_invalid", False) + self._validate = kwargs.pop("_validate", True) + + self._set_property("color", arg, color) + self._set_property("colorsrc", arg, colorsrc) + self._set_property("family", arg, family) + self._set_property("familysrc", arg, familysrc) + self._set_property("lineposition", arg, lineposition) + self._set_property("linepositionsrc", arg, linepositionsrc) + self._set_property("shadow", arg, shadow) + self._set_property("shadowsrc", arg, shadowsrc) + self._set_property("size", arg, size) + self._set_property("sizesrc", arg, sizesrc) + self._set_property("style", arg, style) + self._set_property("stylesrc", arg, stylesrc) + self._set_property("textcase", arg, textcase) + self._set_property("textcasesrc", arg, textcasesrc) + self._set_property("variant", arg, variant) + self._set_property("variantsrc", arg, variantsrc) + self._set_property("weight", arg, weight) + self._set_property("weightsrc", arg, weightsrc) + self._process_kwargs(**dict(arg, **kwargs)) + self._skip_invalid = False diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/barpolar/legendgrouptitle/.___init__.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/barpolar/legendgrouptitle/.___init__.py new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/barpolar/legendgrouptitle/.___init__.py differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/barpolar/legendgrouptitle/.___pycache__ b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/barpolar/legendgrouptitle/.___pycache__ new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/barpolar/legendgrouptitle/.___pycache__ differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/barpolar/legendgrouptitle/.__font.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/barpolar/legendgrouptitle/.__font.py new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/barpolar/legendgrouptitle/.__font.py differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/barpolar/legendgrouptitle/__init__.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/barpolar/legendgrouptitle/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..56f600d3458c41f269053307377e9707ab13e090 --- /dev/null +++ b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/barpolar/legendgrouptitle/__init__.py @@ -0,0 +1,9 @@ +import sys +from typing import TYPE_CHECKING + +if TYPE_CHECKING: + from ._font import Font +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import(__name__, [], ["._font.Font"]) diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/barpolar/legendgrouptitle/_font.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/barpolar/legendgrouptitle/_font.py new file mode 100644 index 0000000000000000000000000000000000000000..5c097a19a8e60baa97d1cbbe8d6756fb042bd2c3 --- /dev/null +++ b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/barpolar/legendgrouptitle/_font.py @@ -0,0 +1,334 @@ +# --- THIS FILE IS AUTO-GENERATED --- +# Modifications will be overwitten the next time code generation run. + +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Font(_BaseTraceHierarchyType): + _parent_path_str = "barpolar.legendgrouptitle" + _path_str = "barpolar.legendgrouptitle.font" + _valid_props = { + "color", + "family", + "lineposition", + "shadow", + "size", + "style", + "textcase", + "variant", + "weight", + } + + @property + def color(self): + """ + The 'color' property is a color and may be specified as: + - A hex string (e.g. '#ff0000') + - An rgb/rgba string (e.g. 'rgb(255,0,0)') + - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') + - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') + - A named CSS color: see https://plotly.com/python/css-colors/ for a list + + Returns + ------- + str + """ + return self["color"] + + @color.setter + def color(self, val): + self["color"] = val + + @property + def family(self): + """ + HTML font family - the typeface that will be applied by the web + browser. The web browser can only apply a font if it is + available on the system where it runs. Provide multiple font + families, separated by commas, to indicate the order in which + to apply fonts if they aren't available. + + The 'family' property is a string and must be specified as: + - A non-empty string + + Returns + ------- + str + """ + return self["family"] + + @family.setter + def family(self, val): + self["family"] = val + + @property + def lineposition(self): + """ + Sets the kind of decoration line(s) with text, such as an + "under", "over" or "through" as well as combinations e.g. + "under+over", etc. + + The 'lineposition' property is a flaglist and may be specified + as a string containing: + - Any combination of ['under', 'over', 'through'] joined with '+' characters + (e.g. 'under+over') + OR exactly one of ['none'] (e.g. 'none') + + Returns + ------- + Any + """ + return self["lineposition"] + + @lineposition.setter + def lineposition(self, val): + self["lineposition"] = val + + @property + def shadow(self): + """ + Sets the shape and color of the shadow behind text. "auto" + places minimal shadow and applies contrast text font color. See + https://developer.mozilla.org/en-US/docs/Web/CSS/text-shadow + for additional options. + + The 'shadow' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["shadow"] + + @shadow.setter + def shadow(self, val): + self["shadow"] = val + + @property + def size(self): + """ + The 'size' property is a number and may be specified as: + - An int or float in the interval [1, inf] + + Returns + ------- + int|float + """ + return self["size"] + + @size.setter + def size(self, val): + self["size"] = val + + @property + def style(self): + """ + Sets whether a font should be styled with a normal or italic + face from its family. + + The 'style' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['normal', 'italic'] + + Returns + ------- + Any + """ + return self["style"] + + @style.setter + def style(self, val): + self["style"] = val + + @property + def textcase(self): + """ + Sets capitalization of text. It can be used to make text appear + in all-uppercase or all-lowercase, or with each word + capitalized. + + The 'textcase' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['normal', 'word caps', 'upper', 'lower'] + + Returns + ------- + Any + """ + return self["textcase"] + + @textcase.setter + def textcase(self, val): + self["textcase"] = val + + @property + def variant(self): + """ + Sets the variant of the font. + + The 'variant' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['normal', 'small-caps', 'all-small-caps', + 'all-petite-caps', 'petite-caps', 'unicase'] + + Returns + ------- + Any + """ + return self["variant"] + + @variant.setter + def variant(self, val): + self["variant"] = val + + @property + def weight(self): + """ + Sets the weight (or boldness) of the font. + + The 'weight' property is a integer and may be specified as: + - An int (or float that will be cast to an int) + in the interval [1, 1000] + OR exactly one of ['normal', 'bold'] (e.g. 'bold') + + Returns + ------- + int + """ + return self["weight"] + + @weight.setter + def weight(self, val): + self["weight"] = val + + @property + def _prop_descriptions(self): + return """\ + color + + family + HTML font family - the typeface that will be applied by + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. + lineposition + Sets the kind of decoration line(s) with text, such as + an "under", "over" or "through" as well as combinations + e.g. "under+over", etc. + shadow + Sets the shape and color of the shadow behind text. + "auto" places minimal shadow and applies contrast text + font color. See https://developer.mozilla.org/en- + US/docs/Web/CSS/text-shadow for additional options. + size + + style + Sets whether a font should be styled with a normal or + italic face from its family. + textcase + Sets capitalization of text. It can be used to make + text appear in all-uppercase or all-lowercase, or with + each word capitalized. + variant + Sets the variant of the font. + weight + Sets the weight (or boldness) of the font. + """ + + def __init__( + self, + arg=None, + color=None, + family=None, + lineposition=None, + shadow=None, + size=None, + style=None, + textcase=None, + variant=None, + weight=None, + **kwargs, + ): + """ + Construct a new Font object + + Sets this legend group's title font. + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of :class:`plotly.graph_objs.barpolar.legen + dgrouptitle.Font` + color + + family + HTML font family - the typeface that will be applied by + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. + lineposition + Sets the kind of decoration line(s) with text, such as + an "under", "over" or "through" as well as combinations + e.g. "under+over", etc. + shadow + Sets the shape and color of the shadow behind text. + "auto" places minimal shadow and applies contrast text + font color. See https://developer.mozilla.org/en- + US/docs/Web/CSS/text-shadow for additional options. + size + + style + Sets whether a font should be styled with a normal or + italic face from its family. + textcase + Sets capitalization of text. It can be used to make + text appear in all-uppercase or all-lowercase, or with + each word capitalized. + variant + Sets the variant of the font. + weight + Sets the weight (or boldness) of the font. + + Returns + ------- + Font + """ + super().__init__("font") + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + if arg is None: + arg = {} + elif isinstance(arg, self.__class__): + arg = arg.to_plotly_json() + elif isinstance(arg, dict): + arg = _copy.copy(arg) + else: + raise ValueError("""\ +The first argument to the plotly.graph_objs.barpolar.legendgrouptitle.Font +constructor must be a dict or +an instance of :class:`plotly.graph_objs.barpolar.legendgrouptitle.Font`""") + + self._skip_invalid = kwargs.pop("skip_invalid", False) + self._validate = kwargs.pop("_validate", True) + + self._set_property("color", arg, color) + self._set_property("family", arg, family) + self._set_property("lineposition", arg, lineposition) + self._set_property("shadow", arg, shadow) + self._set_property("size", arg, size) + self._set_property("style", arg, style) + self._set_property("textcase", arg, textcase) + self._set_property("variant", arg, variant) + self._set_property("weight", arg, weight) + self._process_kwargs(**dict(arg, **kwargs)) + self._skip_invalid = False diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/barpolar/marker/.___init__.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/barpolar/marker/.___init__.py new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/barpolar/marker/.___init__.py differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/barpolar/marker/.___pycache__ b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/barpolar/marker/.___pycache__ new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/barpolar/marker/.___pycache__ differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/barpolar/marker/.__colorbar.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/barpolar/marker/.__colorbar.py new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/barpolar/marker/.__colorbar.py differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/barpolar/marker/.__line.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/barpolar/marker/.__line.py new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/barpolar/marker/.__line.py differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/barpolar/marker/.__pattern.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/barpolar/marker/.__pattern.py new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/barpolar/marker/.__pattern.py differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/barpolar/marker/._colorbar b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/barpolar/marker/._colorbar new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/barpolar/marker/._colorbar differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/barpolar/marker/__init__.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/barpolar/marker/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..e2d7a121b709e5e43cfe58285a29c1f396c1077d --- /dev/null +++ b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/barpolar/marker/__init__.py @@ -0,0 +1,16 @@ +import sys +from typing import TYPE_CHECKING + +if TYPE_CHECKING: + from ._colorbar import ColorBar + from ._line import Line + from ._pattern import Pattern + from . import colorbar +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [".colorbar"], + ["._colorbar.ColorBar", "._line.Line", "._pattern.Pattern"], + ) diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/barpolar/marker/_colorbar.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/barpolar/marker/_colorbar.py new file mode 100644 index 0000000000000000000000000000000000000000..c95f81224bbd20411111eb5dff1bccd1b5d04d45 --- /dev/null +++ b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/barpolar/marker/_colorbar.py @@ -0,0 +1,1739 @@ +# --- THIS FILE IS AUTO-GENERATED --- +# Modifications will be overwitten the next time code generation run. + +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class ColorBar(_BaseTraceHierarchyType): + _parent_path_str = "barpolar.marker" + _path_str = "barpolar.marker.colorbar" + _valid_props = { + "bgcolor", + "bordercolor", + "borderwidth", + "dtick", + "exponentformat", + "labelalias", + "len", + "lenmode", + "minexponent", + "nticks", + "orientation", + "outlinecolor", + "outlinewidth", + "separatethousands", + "showexponent", + "showticklabels", + "showtickprefix", + "showticksuffix", + "thickness", + "thicknessmode", + "tick0", + "tickangle", + "tickcolor", + "tickfont", + "tickformat", + "tickformatstopdefaults", + "tickformatstops", + "ticklabeloverflow", + "ticklabelposition", + "ticklabelstep", + "ticklen", + "tickmode", + "tickprefix", + "ticks", + "ticksuffix", + "ticktext", + "ticktextsrc", + "tickvals", + "tickvalssrc", + "tickwidth", + "title", + "x", + "xanchor", + "xpad", + "xref", + "y", + "yanchor", + "ypad", + "yref", + } + + @property + def bgcolor(self): + """ + Sets the color of padded area. + + The 'bgcolor' property is a color and may be specified as: + - A hex string (e.g. '#ff0000') + - An rgb/rgba string (e.g. 'rgb(255,0,0)') + - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') + - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') + - A named CSS color: see https://plotly.com/python/css-colors/ for a list + + Returns + ------- + str + """ + return self["bgcolor"] + + @bgcolor.setter + def bgcolor(self, val): + self["bgcolor"] = val + + @property + def bordercolor(self): + """ + Sets the axis line color. + + The 'bordercolor' property is a color and may be specified as: + - A hex string (e.g. '#ff0000') + - An rgb/rgba string (e.g. 'rgb(255,0,0)') + - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') + - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') + - A named CSS color: see https://plotly.com/python/css-colors/ for a list + + Returns + ------- + str + """ + return self["bordercolor"] + + @bordercolor.setter + def bordercolor(self, val): + self["bordercolor"] = val + + @property + def borderwidth(self): + """ + Sets the width (in px) or the border enclosing this color bar. + + The 'borderwidth' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["borderwidth"] + + @borderwidth.setter + def borderwidth(self, val): + self["borderwidth"] = val + + @property + def dtick(self): + """ + Sets the step in-between ticks on this axis. Use with `tick0`. + Must be a positive number, or special strings available to + "log" and "date" axes. If the axis `type` is "log", then ticks + are set every 10^(n*dtick) where n is the tick number. For + example, to set a tick mark at 1, 10, 100, 1000, ... set dtick + to 1. To set tick marks at 1, 100, 10000, ... set dtick to 2. + To set tick marks at 1, 5, 25, 125, 625, 3125, ... set dtick to + log_10(5), or 0.69897000433. "log" has several special values; + "L", where `f` is a positive number, gives ticks linearly + spaced in value (but not position). For example `tick0` = 0.1, + `dtick` = "L0.5" will put ticks at 0.1, 0.6, 1.1, 1.6 etc. To + show powers of 10 plus small digits between, use "D1" (all + digits) or "D2" (only 2 and 5). `tick0` is ignored for "D1" and + "D2". If the axis `type` is "date", then you must convert the + time to milliseconds. For example, to set the interval between + ticks to one day, set `dtick` to 86400000.0. "date" also has + special values "M" gives ticks spaced by a number of months. + `n` must be a positive integer. To set ticks on the 15th of + every third month, set `tick0` to "2000-01-15" and `dtick` to + "M3". To set ticks every 4 years, set `dtick` to "M48" + + The 'dtick' property accepts values of any type + + Returns + ------- + Any + """ + return self["dtick"] + + @dtick.setter + def dtick(self, val): + self["dtick"] = val + + @property + def exponentformat(self): + """ + Determines a formatting rule for the tick exponents. For + example, consider the number 1,000,000,000. If "none", it + appears as 1,000,000,000. If "e", 1e+9. If "E", 1E+9. If + "power", 1x10^9 (with 9 in a super script). If "SI", 1G. If + "B", 1B. "SI" uses prefixes from "femto" f (10^-15) to "tera" T + (10^12). *SI extended* covers instead the full SI range from + "quecto" q (10^-30) to "quetta" Q (10^30). If "SI" or *SI + extended* is used and the exponent is beyond the above ranges, + the formatting rule will automatically be switched to the power + notation. + + The 'exponentformat' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['none', 'e', 'E', 'power', 'SI', 'B', 'SI extended'] + + Returns + ------- + Any + """ + return self["exponentformat"] + + @exponentformat.setter + def exponentformat(self, val): + self["exponentformat"] = val + + @property + def labelalias(self): + """ + Replacement text for specific tick or hover labels. For example + using {US: 'USA', CA: 'Canada'} changes US to USA and CA to + Canada. The labels we would have shown must match the keys + exactly, after adding any tickprefix or ticksuffix. For + negative numbers the minus sign symbol used (U+2212) is wider + than the regular ascii dash. That means you need to use −1 + instead of -1. labelalias can be used with any axis type, and + both keys (if needed) and values (if desired) can include html- + like tags or MathJax. + + The 'labelalias' property accepts values of any type + + Returns + ------- + Any + """ + return self["labelalias"] + + @labelalias.setter + def labelalias(self, val): + self["labelalias"] = val + + @property + def len(self): + """ + Sets the length of the color bar This measure excludes the + padding of both ends. That is, the color bar length is this + length minus the padding on both ends. + + The 'len' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["len"] + + @len.setter + def len(self, val): + self["len"] = val + + @property + def lenmode(self): + """ + Determines whether this color bar's length (i.e. the measure in + the color variation direction) is set in units of plot + "fraction" or in *pixels. Use `len` to set the value. + + The 'lenmode' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['fraction', 'pixels'] + + Returns + ------- + Any + """ + return self["lenmode"] + + @lenmode.setter + def lenmode(self, val): + self["lenmode"] = val + + @property + def minexponent(self): + """ + Hide SI prefix for 10^n if |n| is below this number. This only + has an effect when `tickformat` is "SI" or "B". + + The 'minexponent' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["minexponent"] + + @minexponent.setter + def minexponent(self, val): + self["minexponent"] = val + + @property + def nticks(self): + """ + Specifies the maximum number of ticks for the particular axis. + The actual number of ticks will be chosen automatically to be + less than or equal to `nticks`. Has an effect only if + `tickmode` is set to "auto". + + The 'nticks' property is a integer and may be specified as: + - An int (or float that will be cast to an int) + in the interval [0, 9223372036854775807] + + Returns + ------- + int + """ + return self["nticks"] + + @nticks.setter + def nticks(self, val): + self["nticks"] = val + + @property + def orientation(self): + """ + Sets the orientation of the colorbar. + + The 'orientation' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['h', 'v'] + + Returns + ------- + Any + """ + return self["orientation"] + + @orientation.setter + def orientation(self, val): + self["orientation"] = val + + @property + def outlinecolor(self): + """ + Sets the axis line color. + + The 'outlinecolor' property is a color and may be specified as: + - A hex string (e.g. '#ff0000') + - An rgb/rgba string (e.g. 'rgb(255,0,0)') + - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') + - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') + - A named CSS color: see https://plotly.com/python/css-colors/ for a list + + Returns + ------- + str + """ + return self["outlinecolor"] + + @outlinecolor.setter + def outlinecolor(self, val): + self["outlinecolor"] = val + + @property + def outlinewidth(self): + """ + Sets the width (in px) of the axis line. + + The 'outlinewidth' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["outlinewidth"] + + @outlinewidth.setter + def outlinewidth(self, val): + self["outlinewidth"] = val + + @property + def separatethousands(self): + """ + If "true", even 4-digit integers are separated + + The 'separatethousands' property is a boolean and must be specified as: + - A boolean value: True or False + + Returns + ------- + bool + """ + return self["separatethousands"] + + @separatethousands.setter + def separatethousands(self, val): + self["separatethousands"] = val + + @property + def showexponent(self): + """ + If "all", all exponents are shown besides their significands. + If "first", only the exponent of the first tick is shown. If + "last", only the exponent of the last tick is shown. If "none", + no exponents appear. + + The 'showexponent' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['all', 'first', 'last', 'none'] + + Returns + ------- + Any + """ + return self["showexponent"] + + @showexponent.setter + def showexponent(self, val): + self["showexponent"] = val + + @property + def showticklabels(self): + """ + Determines whether or not the tick labels are drawn. + + The 'showticklabels' property is a boolean and must be specified as: + - A boolean value: True or False + + Returns + ------- + bool + """ + return self["showticklabels"] + + @showticklabels.setter + def showticklabels(self, val): + self["showticklabels"] = val + + @property + def showtickprefix(self): + """ + If "all", all tick labels are displayed with a prefix. If + "first", only the first tick is displayed with a prefix. If + "last", only the last tick is displayed with a suffix. If + "none", tick prefixes are hidden. + + The 'showtickprefix' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['all', 'first', 'last', 'none'] + + Returns + ------- + Any + """ + return self["showtickprefix"] + + @showtickprefix.setter + def showtickprefix(self, val): + self["showtickprefix"] = val + + @property + def showticksuffix(self): + """ + Same as `showtickprefix` but for tick suffixes. + + The 'showticksuffix' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['all', 'first', 'last', 'none'] + + Returns + ------- + Any + """ + return self["showticksuffix"] + + @showticksuffix.setter + def showticksuffix(self, val): + self["showticksuffix"] = val + + @property + def thickness(self): + """ + Sets the thickness of the color bar This measure excludes the + size of the padding, ticks and labels. + + The 'thickness' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["thickness"] + + @thickness.setter + def thickness(self, val): + self["thickness"] = val + + @property + def thicknessmode(self): + """ + Determines whether this color bar's thickness (i.e. the measure + in the constant color direction) is set in units of plot + "fraction" or in "pixels". Use `thickness` to set the value. + + The 'thicknessmode' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['fraction', 'pixels'] + + Returns + ------- + Any + """ + return self["thicknessmode"] + + @thicknessmode.setter + def thicknessmode(self, val): + self["thicknessmode"] = val + + @property + def tick0(self): + """ + Sets the placement of the first tick on this axis. Use with + `dtick`. If the axis `type` is "log", then you must take the + log of your starting tick (e.g. to set the starting tick to + 100, set the `tick0` to 2) except when `dtick`=*L* (see + `dtick` for more info). If the axis `type` is "date", it should + be a date string, like date data. If the axis `type` is + "category", it should be a number, using the scale where each + category is assigned a serial number from zero in the order it + appears. + + The 'tick0' property accepts values of any type + + Returns + ------- + Any + """ + return self["tick0"] + + @tick0.setter + def tick0(self, val): + self["tick0"] = val + + @property + def tickangle(self): + """ + Sets the angle of the tick labels with respect to the + horizontal. For example, a `tickangle` of -90 draws the tick + labels vertically. + + The 'tickangle' property is a angle (in degrees) that may be + specified as a number between -180 and 180. + Numeric values outside this range are converted to the equivalent value + (e.g. 270 is converted to -90). + + Returns + ------- + int|float + """ + return self["tickangle"] + + @tickangle.setter + def tickangle(self, val): + self["tickangle"] = val + + @property + def tickcolor(self): + """ + Sets the tick color. + + The 'tickcolor' property is a color and may be specified as: + - A hex string (e.g. '#ff0000') + - An rgb/rgba string (e.g. 'rgb(255,0,0)') + - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') + - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') + - A named CSS color: see https://plotly.com/python/css-colors/ for a list + + Returns + ------- + str + """ + return self["tickcolor"] + + @tickcolor.setter + def tickcolor(self, val): + self["tickcolor"] = val + + @property + def tickfont(self): + """ + Sets the color bar's tick label font + + The 'tickfont' property is an instance of Tickfont + that may be specified as: + - An instance of :class:`plotly.graph_objs.barpolar.marker.colorbar.Tickfont` + - A dict of string/value properties that will be passed + to the Tickfont constructor + + Returns + ------- + plotly.graph_objs.barpolar.marker.colorbar.Tickfont + """ + return self["tickfont"] + + @tickfont.setter + def tickfont(self, val): + self["tickfont"] = val + + @property + def tickformat(self): + """ + Sets the tick label formatting rule using d3 formatting mini- + languages which are very similar to those in Python. For + numbers, see: + https://github.com/d3/d3-format/tree/v1.4.5#d3-format. And for + dates see: https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format. We add two items to d3's date + formatter: "%h" for half of the year as a decimal number as + well as "%{n}f" for fractional seconds with n digits. For + example, *2016-10-13 09:15:23.456* with tickformat + "%H~%M~%S.%2f" would display "09~15~23.46" + + The 'tickformat' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["tickformat"] + + @tickformat.setter + def tickformat(self, val): + self["tickformat"] = val + + @property + def tickformatstops(self): + """ + The 'tickformatstops' property is a tuple of instances of + Tickformatstop that may be specified as: + - A list or tuple of instances of plotly.graph_objs.barpolar.marker.colorbar.Tickformatstop + - A list or tuple of dicts of string/value properties that + will be passed to the Tickformatstop constructor + + Returns + ------- + tuple[plotly.graph_objs.barpolar.marker.colorbar.Tickformatstop] + """ + return self["tickformatstops"] + + @tickformatstops.setter + def tickformatstops(self, val): + self["tickformatstops"] = val + + @property + def tickformatstopdefaults(self): + """ + When used in a template (as layout.template.data.barpolar.marke + r.colorbar.tickformatstopdefaults), sets the default property + values to use for elements of + barpolar.marker.colorbar.tickformatstops + + The 'tickformatstopdefaults' property is an instance of Tickformatstop + that may be specified as: + - An instance of :class:`plotly.graph_objs.barpolar.marker.colorbar.Tickformatstop` + - A dict of string/value properties that will be passed + to the Tickformatstop constructor + + Returns + ------- + plotly.graph_objs.barpolar.marker.colorbar.Tickformatstop + """ + return self["tickformatstopdefaults"] + + @tickformatstopdefaults.setter + def tickformatstopdefaults(self, val): + self["tickformatstopdefaults"] = val + + @property + def ticklabeloverflow(self): + """ + Determines how we handle tick labels that would overflow either + the graph div or the domain of the axis. The default value for + inside tick labels is *hide past domain*. In other cases the + default is *hide past div*. + + The 'ticklabeloverflow' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['allow', 'hide past div', 'hide past domain'] + + Returns + ------- + Any + """ + return self["ticklabeloverflow"] + + @ticklabeloverflow.setter + def ticklabeloverflow(self, val): + self["ticklabeloverflow"] = val + + @property + def ticklabelposition(self): + """ + Determines where tick labels are drawn relative to the ticks. + Left and right options are used when `orientation` is "h", top + and bottom when `orientation` is "v". + + The 'ticklabelposition' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['outside', 'inside', 'outside top', 'inside top', + 'outside left', 'inside left', 'outside right', 'inside + right', 'outside bottom', 'inside bottom'] + + Returns + ------- + Any + """ + return self["ticklabelposition"] + + @ticklabelposition.setter + def ticklabelposition(self, val): + self["ticklabelposition"] = val + + @property + def ticklabelstep(self): + """ + Sets the spacing between tick labels as compared to the spacing + between ticks. A value of 1 (default) means each tick gets a + label. A value of 2 means shows every 2nd label. A larger value + n means only every nth tick is labeled. `tick0` determines + which labels are shown. Not implemented for axes with `type` + "log" or "multicategory", or when `tickmode` is "array". + + The 'ticklabelstep' property is a integer and may be specified as: + - An int (or float that will be cast to an int) + in the interval [1, 9223372036854775807] + + Returns + ------- + int + """ + return self["ticklabelstep"] + + @ticklabelstep.setter + def ticklabelstep(self, val): + self["ticklabelstep"] = val + + @property + def ticklen(self): + """ + Sets the tick length (in px). + + The 'ticklen' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["ticklen"] + + @ticklen.setter + def ticklen(self, val): + self["ticklen"] = val + + @property + def tickmode(self): + """ + Sets the tick mode for this axis. If "auto", the number of + ticks is set via `nticks`. If "linear", the placement of the + ticks is determined by a starting position `tick0` and a tick + step `dtick` ("linear" is the default value if `tick0` and + `dtick` are provided). If "array", the placement of the ticks + is set via `tickvals` and the tick text is `ticktext`. ("array" + is the default value if `tickvals` is provided). + + The 'tickmode' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['auto', 'linear', 'array'] + + Returns + ------- + Any + """ + return self["tickmode"] + + @tickmode.setter + def tickmode(self, val): + self["tickmode"] = val + + @property + def tickprefix(self): + """ + Sets a tick label prefix. + + The 'tickprefix' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["tickprefix"] + + @tickprefix.setter + def tickprefix(self, val): + self["tickprefix"] = val + + @property + def ticks(self): + """ + Determines whether ticks are drawn or not. If "", this axis' + ticks are not drawn. If "outside" ("inside"), this axis' are + drawn outside (inside) the axis lines. + + The 'ticks' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['outside', 'inside', ''] + + Returns + ------- + Any + """ + return self["ticks"] + + @ticks.setter + def ticks(self, val): + self["ticks"] = val + + @property + def ticksuffix(self): + """ + Sets a tick label suffix. + + The 'ticksuffix' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["ticksuffix"] + + @ticksuffix.setter + def ticksuffix(self, val): + self["ticksuffix"] = val + + @property + def ticktext(self): + """ + Sets the text displayed at the ticks position via `tickvals`. + Only has an effect if `tickmode` is set to "array". Used with + `tickvals`. + + The 'ticktext' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["ticktext"] + + @ticktext.setter + def ticktext(self, val): + self["ticktext"] = val + + @property + def ticktextsrc(self): + """ + Sets the source reference on Chart Studio Cloud for `ticktext`. + + The 'ticktextsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["ticktextsrc"] + + @ticktextsrc.setter + def ticktextsrc(self, val): + self["ticktextsrc"] = val + + @property + def tickvals(self): + """ + Sets the values at which ticks on this axis appear. Only has an + effect if `tickmode` is set to "array". Used with `ticktext`. + + The 'tickvals' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["tickvals"] + + @tickvals.setter + def tickvals(self, val): + self["tickvals"] = val + + @property + def tickvalssrc(self): + """ + Sets the source reference on Chart Studio Cloud for `tickvals`. + + The 'tickvalssrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["tickvalssrc"] + + @tickvalssrc.setter + def tickvalssrc(self, val): + self["tickvalssrc"] = val + + @property + def tickwidth(self): + """ + Sets the tick width (in px). + + The 'tickwidth' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["tickwidth"] + + @tickwidth.setter + def tickwidth(self, val): + self["tickwidth"] = val + + @property + def title(self): + """ + The 'title' property is an instance of Title + that may be specified as: + - An instance of :class:`plotly.graph_objs.barpolar.marker.colorbar.Title` + - A dict of string/value properties that will be passed + to the Title constructor + + Returns + ------- + plotly.graph_objs.barpolar.marker.colorbar.Title + """ + return self["title"] + + @title.setter + def title(self, val): + self["title"] = val + + @property + def x(self): + """ + Sets the x position with respect to `xref` of the color bar (in + plot fraction). When `xref` is "paper", defaults to 1.02 when + `orientation` is "v" and 0.5 when `orientation` is "h". When + `xref` is "container", defaults to 1 when `orientation` is "v" + and 0.5 when `orientation` is "h". Must be between 0 and 1 if + `xref` is "container" and between "-2" and 3 if `xref` is + "paper". + + The 'x' property is a number and may be specified as: + - An int or float + + Returns + ------- + int|float + """ + return self["x"] + + @x.setter + def x(self, val): + self["x"] = val + + @property + def xanchor(self): + """ + Sets this color bar's horizontal position anchor. This anchor + binds the `x` position to the "left", "center" or "right" of + the color bar. Defaults to "left" when `orientation` is "v" and + "center" when `orientation` is "h". + + The 'xanchor' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['left', 'center', 'right'] + + Returns + ------- + Any + """ + return self["xanchor"] + + @xanchor.setter + def xanchor(self, val): + self["xanchor"] = val + + @property + def xpad(self): + """ + Sets the amount of padding (in px) along the x direction. + + The 'xpad' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["xpad"] + + @xpad.setter + def xpad(self, val): + self["xpad"] = val + + @property + def xref(self): + """ + Sets the container `x` refers to. "container" spans the entire + `width` of the plot. "paper" refers to the width of the + plotting area only. + + The 'xref' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['container', 'paper'] + + Returns + ------- + Any + """ + return self["xref"] + + @xref.setter + def xref(self, val): + self["xref"] = val + + @property + def y(self): + """ + Sets the y position with respect to `yref` of the color bar (in + plot fraction). When `yref` is "paper", defaults to 0.5 when + `orientation` is "v" and 1.02 when `orientation` is "h". When + `yref` is "container", defaults to 0.5 when `orientation` is + "v" and 1 when `orientation` is "h". Must be between 0 and 1 if + `yref` is "container" and between "-2" and 3 if `yref` is + "paper". + + The 'y' property is a number and may be specified as: + - An int or float + + Returns + ------- + int|float + """ + return self["y"] + + @y.setter + def y(self, val): + self["y"] = val + + @property + def yanchor(self): + """ + Sets this color bar's vertical position anchor This anchor + binds the `y` position to the "top", "middle" or "bottom" of + the color bar. Defaults to "middle" when `orientation` is "v" + and "bottom" when `orientation` is "h". + + The 'yanchor' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['top', 'middle', 'bottom'] + + Returns + ------- + Any + """ + return self["yanchor"] + + @yanchor.setter + def yanchor(self, val): + self["yanchor"] = val + + @property + def ypad(self): + """ + Sets the amount of padding (in px) along the y direction. + + The 'ypad' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["ypad"] + + @ypad.setter + def ypad(self, val): + self["ypad"] = val + + @property + def yref(self): + """ + Sets the container `y` refers to. "container" spans the entire + `height` of the plot. "paper" refers to the height of the + plotting area only. + + The 'yref' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['container', 'paper'] + + Returns + ------- + Any + """ + return self["yref"] + + @yref.setter + def yref(self, val): + self["yref"] = val + + @property + def _prop_descriptions(self): + return """\ + bgcolor + Sets the color of padded area. + bordercolor + Sets the axis line color. + borderwidth + Sets the width (in px) or the border enclosing this + color bar. + dtick + Sets the step in-between ticks on this axis. Use with + `tick0`. Must be a positive number, or special strings + available to "log" and "date" axes. If the axis `type` + is "log", then ticks are set every 10^(n*dtick) where n + is the tick number. For example, to set a tick mark at + 1, 10, 100, 1000, ... set dtick to 1. To set tick marks + at 1, 100, 10000, ... set dtick to 2. To set tick marks + at 1, 5, 25, 125, 625, 3125, ... set dtick to + log_10(5), or 0.69897000433. "log" has several special + values; "L", where `f` is a positive number, gives + ticks linearly spaced in value (but not position). For + example `tick0` = 0.1, `dtick` = "L0.5" will put ticks + at 0.1, 0.6, 1.1, 1.6 etc. To show powers of 10 plus + small digits between, use "D1" (all digits) or "D2" + (only 2 and 5). `tick0` is ignored for "D1" and "D2". + If the axis `type` is "date", then you must convert the + time to milliseconds. For example, to set the interval + between ticks to one day, set `dtick` to 86400000.0. + "date" also has special values "M" gives ticks + spaced by a number of months. `n` must be a positive + integer. To set ticks on the 15th of every third month, + set `tick0` to "2000-01-15" and `dtick` to "M3". To set + ticks every 4 years, set `dtick` to "M48" + exponentformat + Determines a formatting rule for the tick exponents. + For example, consider the number 1,000,000,000. If + "none", it appears as 1,000,000,000. If "e", 1e+9. If + "E", 1E+9. If "power", 1x10^9 (with 9 in a super + script). If "SI", 1G. If "B", 1B. "SI" uses prefixes + from "femto" f (10^-15) to "tera" T (10^12). *SI + extended* covers instead the full SI range from + "quecto" q (10^-30) to "quetta" Q (10^30). If "SI" or + *SI extended* is used and the exponent is beyond the + above ranges, the formatting rule will automatically be + switched to the power notation. + labelalias + Replacement text for specific tick or hover labels. For + example using {US: 'USA', CA: 'Canada'} changes US to + USA and CA to Canada. The labels we would have shown + must match the keys exactly, after adding any + tickprefix or ticksuffix. For negative numbers the + minus sign symbol used (U+2212) is wider than the + regular ascii dash. That means you need to use −1 + instead of -1. labelalias can be used with any axis + type, and both keys (if needed) and values (if desired) + can include html-like tags or MathJax. + len + Sets the length of the color bar This measure excludes + the padding of both ends. That is, the color bar length + is this length minus the padding on both ends. + lenmode + Determines whether this color bar's length (i.e. the + measure in the color variation direction) is set in + units of plot "fraction" or in *pixels. Use `len` to + set the value. + minexponent + Hide SI prefix for 10^n if |n| is below this number. + This only has an effect when `tickformat` is "SI" or + "B". + nticks + Specifies the maximum number of ticks for the + particular axis. The actual number of ticks will be + chosen automatically to be less than or equal to + `nticks`. Has an effect only if `tickmode` is set to + "auto". + orientation + Sets the orientation of the colorbar. + outlinecolor + Sets the axis line color. + outlinewidth + Sets the width (in px) of the axis line. + separatethousands + If "true", even 4-digit integers are separated + showexponent + If "all", all exponents are shown besides their + significands. If "first", only the exponent of the + first tick is shown. If "last", only the exponent of + the last tick is shown. If "none", no exponents appear. + showticklabels + Determines whether or not the tick labels are drawn. + showtickprefix + If "all", all tick labels are displayed with a prefix. + If "first", only the first tick is displayed with a + prefix. If "last", only the last tick is displayed with + a suffix. If "none", tick prefixes are hidden. + showticksuffix + Same as `showtickprefix` but for tick suffixes. + thickness + Sets the thickness of the color bar This measure + excludes the size of the padding, ticks and labels. + thicknessmode + Determines whether this color bar's thickness (i.e. the + measure in the constant color direction) is set in + units of plot "fraction" or in "pixels". Use + `thickness` to set the value. + tick0 + Sets the placement of the first tick on this axis. Use + with `dtick`. If the axis `type` is "log", then you + must take the log of your starting tick (e.g. to set + the starting tick to 100, set the `tick0` to 2) except + when `dtick`=*L* (see `dtick` for more info). If the + axis `type` is "date", it should be a date string, like + date data. If the axis `type` is "category", it should + be a number, using the scale where each category is + assigned a serial number from zero in the order it + appears. + tickangle + Sets the angle of the tick labels with respect to the + horizontal. For example, a `tickangle` of -90 draws the + tick labels vertically. + tickcolor + Sets the tick color. + tickfont + Sets the color bar's tick label font + tickformat + Sets the tick label formatting rule using d3 formatting + mini-languages which are very similar to those in + Python. For numbers, see: + https://github.com/d3/d3-format/tree/v1.4.5#d3-format. + And for dates see: https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format. We add two items to + d3's date formatter: "%h" for half of the year as a + decimal number as well as "%{n}f" for fractional + seconds with n digits. For example, *2016-10-13 + 09:15:23.456* with tickformat "%H~%M~%S.%2f" would + display "09~15~23.46" + tickformatstops + A tuple of :class:`plotly.graph_objects.barpolar.marker + .colorbar.Tickformatstop` instances or dicts with + compatible properties + tickformatstopdefaults + When used in a template (as layout.template.data.barpol + ar.marker.colorbar.tickformatstopdefaults), sets the + default property values to use for elements of + barpolar.marker.colorbar.tickformatstops + ticklabeloverflow + Determines how we handle tick labels that would + overflow either the graph div or the domain of the + axis. The default value for inside tick labels is *hide + past domain*. In other cases the default is *hide past + div*. + ticklabelposition + Determines where tick labels are drawn relative to the + ticks. Left and right options are used when + `orientation` is "h", top and bottom when `orientation` + is "v". + ticklabelstep + Sets the spacing between tick labels as compared to the + spacing between ticks. A value of 1 (default) means + each tick gets a label. A value of 2 means shows every + 2nd label. A larger value n means only every nth tick + is labeled. `tick0` determines which labels are shown. + Not implemented for axes with `type` "log" or + "multicategory", or when `tickmode` is "array". + ticklen + Sets the tick length (in px). + tickmode + Sets the tick mode for this axis. If "auto", the number + of ticks is set via `nticks`. If "linear", the + placement of the ticks is determined by a starting + position `tick0` and a tick step `dtick` ("linear" is + the default value if `tick0` and `dtick` are provided). + If "array", the placement of the ticks is set via + `tickvals` and the tick text is `ticktext`. ("array" is + the default value if `tickvals` is provided). + tickprefix + Sets a tick label prefix. + ticks + Determines whether ticks are drawn or not. If "", this + axis' ticks are not drawn. If "outside" ("inside"), + this axis' are drawn outside (inside) the axis lines. + ticksuffix + Sets a tick label suffix. + ticktext + Sets the text displayed at the ticks position via + `tickvals`. Only has an effect if `tickmode` is set to + "array". Used with `tickvals`. + ticktextsrc + Sets the source reference on Chart Studio Cloud for + `ticktext`. + tickvals + Sets the values at which ticks on this axis appear. + Only has an effect if `tickmode` is set to "array". + Used with `ticktext`. + tickvalssrc + Sets the source reference on Chart Studio Cloud for + `tickvals`. + tickwidth + Sets the tick width (in px). + title + :class:`plotly.graph_objects.barpolar.marker.colorbar.T + itle` instance or dict with compatible properties + x + Sets the x position with respect to `xref` of the color + bar (in plot fraction). When `xref` is "paper", + defaults to 1.02 when `orientation` is "v" and 0.5 when + `orientation` is "h". When `xref` is "container", + defaults to 1 when `orientation` is "v" and 0.5 when + `orientation` is "h". Must be between 0 and 1 if `xref` + is "container" and between "-2" and 3 if `xref` is + "paper". + xanchor + Sets this color bar's horizontal position anchor. This + anchor binds the `x` position to the "left", "center" + or "right" of the color bar. Defaults to "left" when + `orientation` is "v" and "center" when `orientation` is + "h". + xpad + Sets the amount of padding (in px) along the x + direction. + xref + Sets the container `x` refers to. "container" spans the + entire `width` of the plot. "paper" refers to the width + of the plotting area only. + y + Sets the y position with respect to `yref` of the color + bar (in plot fraction). When `yref` is "paper", + defaults to 0.5 when `orientation` is "v" and 1.02 when + `orientation` is "h". When `yref` is "container", + defaults to 0.5 when `orientation` is "v" and 1 when + `orientation` is "h". Must be between 0 and 1 if `yref` + is "container" and between "-2" and 3 if `yref` is + "paper". + yanchor + Sets this color bar's vertical position anchor This + anchor binds the `y` position to the "top", "middle" or + "bottom" of the color bar. Defaults to "middle" when + `orientation` is "v" and "bottom" when `orientation` is + "h". + ypad + Sets the amount of padding (in px) along the y + direction. + yref + Sets the container `y` refers to. "container" spans the + entire `height` of the plot. "paper" refers to the + height of the plotting area only. + """ + + def __init__( + self, + arg=None, + bgcolor=None, + bordercolor=None, + borderwidth=None, + dtick=None, + exponentformat=None, + labelalias=None, + len=None, + lenmode=None, + minexponent=None, + nticks=None, + orientation=None, + outlinecolor=None, + outlinewidth=None, + separatethousands=None, + showexponent=None, + showticklabels=None, + showtickprefix=None, + showticksuffix=None, + thickness=None, + thicknessmode=None, + tick0=None, + tickangle=None, + tickcolor=None, + tickfont=None, + tickformat=None, + tickformatstops=None, + tickformatstopdefaults=None, + ticklabeloverflow=None, + ticklabelposition=None, + ticklabelstep=None, + ticklen=None, + tickmode=None, + tickprefix=None, + ticks=None, + ticksuffix=None, + ticktext=None, + ticktextsrc=None, + tickvals=None, + tickvalssrc=None, + tickwidth=None, + title=None, + x=None, + xanchor=None, + xpad=None, + xref=None, + y=None, + yanchor=None, + ypad=None, + yref=None, + **kwargs, + ): + """ + Construct a new ColorBar object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.barpolar.marker.ColorBar` + bgcolor + Sets the color of padded area. + bordercolor + Sets the axis line color. + borderwidth + Sets the width (in px) or the border enclosing this + color bar. + dtick + Sets the step in-between ticks on this axis. Use with + `tick0`. Must be a positive number, or special strings + available to "log" and "date" axes. If the axis `type` + is "log", then ticks are set every 10^(n*dtick) where n + is the tick number. For example, to set a tick mark at + 1, 10, 100, 1000, ... set dtick to 1. To set tick marks + at 1, 100, 10000, ... set dtick to 2. To set tick marks + at 1, 5, 25, 125, 625, 3125, ... set dtick to + log_10(5), or 0.69897000433. "log" has several special + values; "L", where `f` is a positive number, gives + ticks linearly spaced in value (but not position). For + example `tick0` = 0.1, `dtick` = "L0.5" will put ticks + at 0.1, 0.6, 1.1, 1.6 etc. To show powers of 10 plus + small digits between, use "D1" (all digits) or "D2" + (only 2 and 5). `tick0` is ignored for "D1" and "D2". + If the axis `type` is "date", then you must convert the + time to milliseconds. For example, to set the interval + between ticks to one day, set `dtick` to 86400000.0. + "date" also has special values "M" gives ticks + spaced by a number of months. `n` must be a positive + integer. To set ticks on the 15th of every third month, + set `tick0` to "2000-01-15" and `dtick` to "M3". To set + ticks every 4 years, set `dtick` to "M48" + exponentformat + Determines a formatting rule for the tick exponents. + For example, consider the number 1,000,000,000. If + "none", it appears as 1,000,000,000. If "e", 1e+9. If + "E", 1E+9. If "power", 1x10^9 (with 9 in a super + script). If "SI", 1G. If "B", 1B. "SI" uses prefixes + from "femto" f (10^-15) to "tera" T (10^12). *SI + extended* covers instead the full SI range from + "quecto" q (10^-30) to "quetta" Q (10^30). If "SI" or + *SI extended* is used and the exponent is beyond the + above ranges, the formatting rule will automatically be + switched to the power notation. + labelalias + Replacement text for specific tick or hover labels. For + example using {US: 'USA', CA: 'Canada'} changes US to + USA and CA to Canada. The labels we would have shown + must match the keys exactly, after adding any + tickprefix or ticksuffix. For negative numbers the + minus sign symbol used (U+2212) is wider than the + regular ascii dash. That means you need to use −1 + instead of -1. labelalias can be used with any axis + type, and both keys (if needed) and values (if desired) + can include html-like tags or MathJax. + len + Sets the length of the color bar This measure excludes + the padding of both ends. That is, the color bar length + is this length minus the padding on both ends. + lenmode + Determines whether this color bar's length (i.e. the + measure in the color variation direction) is set in + units of plot "fraction" or in *pixels. Use `len` to + set the value. + minexponent + Hide SI prefix for 10^n if |n| is below this number. + This only has an effect when `tickformat` is "SI" or + "B". + nticks + Specifies the maximum number of ticks for the + particular axis. The actual number of ticks will be + chosen automatically to be less than or equal to + `nticks`. Has an effect only if `tickmode` is set to + "auto". + orientation + Sets the orientation of the colorbar. + outlinecolor + Sets the axis line color. + outlinewidth + Sets the width (in px) of the axis line. + separatethousands + If "true", even 4-digit integers are separated + showexponent + If "all", all exponents are shown besides their + significands. If "first", only the exponent of the + first tick is shown. If "last", only the exponent of + the last tick is shown. If "none", no exponents appear. + showticklabels + Determines whether or not the tick labels are drawn. + showtickprefix + If "all", all tick labels are displayed with a prefix. + If "first", only the first tick is displayed with a + prefix. If "last", only the last tick is displayed with + a suffix. If "none", tick prefixes are hidden. + showticksuffix + Same as `showtickprefix` but for tick suffixes. + thickness + Sets the thickness of the color bar This measure + excludes the size of the padding, ticks and labels. + thicknessmode + Determines whether this color bar's thickness (i.e. the + measure in the constant color direction) is set in + units of plot "fraction" or in "pixels". Use + `thickness` to set the value. + tick0 + Sets the placement of the first tick on this axis. Use + with `dtick`. If the axis `type` is "log", then you + must take the log of your starting tick (e.g. to set + the starting tick to 100, set the `tick0` to 2) except + when `dtick`=*L* (see `dtick` for more info). If the + axis `type` is "date", it should be a date string, like + date data. If the axis `type` is "category", it should + be a number, using the scale where each category is + assigned a serial number from zero in the order it + appears. + tickangle + Sets the angle of the tick labels with respect to the + horizontal. For example, a `tickangle` of -90 draws the + tick labels vertically. + tickcolor + Sets the tick color. + tickfont + Sets the color bar's tick label font + tickformat + Sets the tick label formatting rule using d3 formatting + mini-languages which are very similar to those in + Python. For numbers, see: + https://github.com/d3/d3-format/tree/v1.4.5#d3-format. + And for dates see: https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format. We add two items to + d3's date formatter: "%h" for half of the year as a + decimal number as well as "%{n}f" for fractional + seconds with n digits. For example, *2016-10-13 + 09:15:23.456* with tickformat "%H~%M~%S.%2f" would + display "09~15~23.46" + tickformatstops + A tuple of :class:`plotly.graph_objects.barpolar.marker + .colorbar.Tickformatstop` instances or dicts with + compatible properties + tickformatstopdefaults + When used in a template (as layout.template.data.barpol + ar.marker.colorbar.tickformatstopdefaults), sets the + default property values to use for elements of + barpolar.marker.colorbar.tickformatstops + ticklabeloverflow + Determines how we handle tick labels that would + overflow either the graph div or the domain of the + axis. The default value for inside tick labels is *hide + past domain*. In other cases the default is *hide past + div*. + ticklabelposition + Determines where tick labels are drawn relative to the + ticks. Left and right options are used when + `orientation` is "h", top and bottom when `orientation` + is "v". + ticklabelstep + Sets the spacing between tick labels as compared to the + spacing between ticks. A value of 1 (default) means + each tick gets a label. A value of 2 means shows every + 2nd label. A larger value n means only every nth tick + is labeled. `tick0` determines which labels are shown. + Not implemented for axes with `type` "log" or + "multicategory", or when `tickmode` is "array". + ticklen + Sets the tick length (in px). + tickmode + Sets the tick mode for this axis. If "auto", the number + of ticks is set via `nticks`. If "linear", the + placement of the ticks is determined by a starting + position `tick0` and a tick step `dtick` ("linear" is + the default value if `tick0` and `dtick` are provided). + If "array", the placement of the ticks is set via + `tickvals` and the tick text is `ticktext`. ("array" is + the default value if `tickvals` is provided). + tickprefix + Sets a tick label prefix. + ticks + Determines whether ticks are drawn or not. If "", this + axis' ticks are not drawn. If "outside" ("inside"), + this axis' are drawn outside (inside) the axis lines. + ticksuffix + Sets a tick label suffix. + ticktext + Sets the text displayed at the ticks position via + `tickvals`. Only has an effect if `tickmode` is set to + "array". Used with `tickvals`. + ticktextsrc + Sets the source reference on Chart Studio Cloud for + `ticktext`. + tickvals + Sets the values at which ticks on this axis appear. + Only has an effect if `tickmode` is set to "array". + Used with `ticktext`. + tickvalssrc + Sets the source reference on Chart Studio Cloud for + `tickvals`. + tickwidth + Sets the tick width (in px). + title + :class:`plotly.graph_objects.barpolar.marker.colorbar.T + itle` instance or dict with compatible properties + x + Sets the x position with respect to `xref` of the color + bar (in plot fraction). When `xref` is "paper", + defaults to 1.02 when `orientation` is "v" and 0.5 when + `orientation` is "h". When `xref` is "container", + defaults to 1 when `orientation` is "v" and 0.5 when + `orientation` is "h". Must be between 0 and 1 if `xref` + is "container" and between "-2" and 3 if `xref` is + "paper". + xanchor + Sets this color bar's horizontal position anchor. This + anchor binds the `x` position to the "left", "center" + or "right" of the color bar. Defaults to "left" when + `orientation` is "v" and "center" when `orientation` is + "h". + xpad + Sets the amount of padding (in px) along the x + direction. + xref + Sets the container `x` refers to. "container" spans the + entire `width` of the plot. "paper" refers to the width + of the plotting area only. + y + Sets the y position with respect to `yref` of the color + bar (in plot fraction). When `yref` is "paper", + defaults to 0.5 when `orientation` is "v" and 1.02 when + `orientation` is "h". When `yref` is "container", + defaults to 0.5 when `orientation` is "v" and 1 when + `orientation` is "h". Must be between 0 and 1 if `yref` + is "container" and between "-2" and 3 if `yref` is + "paper". + yanchor + Sets this color bar's vertical position anchor This + anchor binds the `y` position to the "top", "middle" or + "bottom" of the color bar. Defaults to "middle" when + `orientation` is "v" and "bottom" when `orientation` is + "h". + ypad + Sets the amount of padding (in px) along the y + direction. + yref + Sets the container `y` refers to. "container" spans the + entire `height` of the plot. "paper" refers to the + height of the plotting area only. + + Returns + ------- + ColorBar + """ + super().__init__("colorbar") + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + if arg is None: + arg = {} + elif isinstance(arg, self.__class__): + arg = arg.to_plotly_json() + elif isinstance(arg, dict): + arg = _copy.copy(arg) + else: + raise ValueError("""\ +The first argument to the plotly.graph_objs.barpolar.marker.ColorBar +constructor must be a dict or +an instance of :class:`plotly.graph_objs.barpolar.marker.ColorBar`""") + + self._skip_invalid = kwargs.pop("skip_invalid", False) + self._validate = kwargs.pop("_validate", True) + + self._set_property("bgcolor", arg, bgcolor) + self._set_property("bordercolor", arg, bordercolor) + self._set_property("borderwidth", arg, borderwidth) + self._set_property("dtick", arg, dtick) + self._set_property("exponentformat", arg, exponentformat) + self._set_property("labelalias", arg, labelalias) + self._set_property("len", arg, len) + self._set_property("lenmode", arg, lenmode) + self._set_property("minexponent", arg, minexponent) + self._set_property("nticks", arg, nticks) + self._set_property("orientation", arg, orientation) + self._set_property("outlinecolor", arg, outlinecolor) + self._set_property("outlinewidth", arg, outlinewidth) + self._set_property("separatethousands", arg, separatethousands) + self._set_property("showexponent", arg, showexponent) + self._set_property("showticklabels", arg, showticklabels) + self._set_property("showtickprefix", arg, showtickprefix) + self._set_property("showticksuffix", arg, showticksuffix) + self._set_property("thickness", arg, thickness) + self._set_property("thicknessmode", arg, thicknessmode) + self._set_property("tick0", arg, tick0) + self._set_property("tickangle", arg, tickangle) + self._set_property("tickcolor", arg, tickcolor) + self._set_property("tickfont", arg, tickfont) + self._set_property("tickformat", arg, tickformat) + self._set_property("tickformatstops", arg, tickformatstops) + self._set_property("tickformatstopdefaults", arg, tickformatstopdefaults) + self._set_property("ticklabeloverflow", arg, ticklabeloverflow) + self._set_property("ticklabelposition", arg, ticklabelposition) + self._set_property("ticklabelstep", arg, ticklabelstep) + self._set_property("ticklen", arg, ticklen) + self._set_property("tickmode", arg, tickmode) + self._set_property("tickprefix", arg, tickprefix) + self._set_property("ticks", arg, ticks) + self._set_property("ticksuffix", arg, ticksuffix) + self._set_property("ticktext", arg, ticktext) + self._set_property("ticktextsrc", arg, ticktextsrc) + self._set_property("tickvals", arg, tickvals) + self._set_property("tickvalssrc", arg, tickvalssrc) + self._set_property("tickwidth", arg, tickwidth) + self._set_property("title", arg, title) + self._set_property("x", arg, x) + self._set_property("xanchor", arg, xanchor) + self._set_property("xpad", arg, xpad) + self._set_property("xref", arg, xref) + self._set_property("y", arg, y) + self._set_property("yanchor", arg, yanchor) + self._set_property("ypad", arg, ypad) + self._set_property("yref", arg, yref) + self._process_kwargs(**dict(arg, **kwargs)) + self._skip_invalid = False diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/barpolar/marker/_line.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/barpolar/marker/_line.py new file mode 100644 index 0000000000000000000000000000000000000000..6df343506dac900777936a205cd1113c6d43ad66 --- /dev/null +++ b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/barpolar/marker/_line.py @@ -0,0 +1,546 @@ +# --- THIS FILE IS AUTO-GENERATED --- +# Modifications will be overwitten the next time code generation run. + +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Line(_BaseTraceHierarchyType): + _parent_path_str = "barpolar.marker" + _path_str = "barpolar.marker.line" + _valid_props = { + "autocolorscale", + "cauto", + "cmax", + "cmid", + "cmin", + "color", + "coloraxis", + "colorscale", + "colorsrc", + "reversescale", + "width", + "widthsrc", + } + + @property + def autocolorscale(self): + """ + Determines whether the colorscale is a default palette + (`autocolorscale: true`) or the palette determined by + `marker.line.colorscale`. Has an effect only if in + `marker.line.color` is set to a numerical array. In case + `colorscale` is unspecified or `autocolorscale` is true, the + default palette will be chosen according to whether numbers in + the `color` array are all positive, all negative or mixed. + + The 'autocolorscale' property is a boolean and must be specified as: + - A boolean value: True or False + + Returns + ------- + bool + """ + return self["autocolorscale"] + + @autocolorscale.setter + def autocolorscale(self, val): + self["autocolorscale"] = val + + @property + def cauto(self): + """ + Determines whether or not the color domain is computed with + respect to the input data (here in `marker.line.color`) or the + bounds set in `marker.line.cmin` and `marker.line.cmax` Has an + effect only if in `marker.line.color` is set to a numerical + array. Defaults to `false` when `marker.line.cmin` and + `marker.line.cmax` are set by the user. + + The 'cauto' property is a boolean and must be specified as: + - A boolean value: True or False + + Returns + ------- + bool + """ + return self["cauto"] + + @cauto.setter + def cauto(self, val): + self["cauto"] = val + + @property + def cmax(self): + """ + Sets the upper bound of the color domain. Has an effect only if + in `marker.line.color` is set to a numerical array. Value + should have the same units as in `marker.line.color` and if + set, `marker.line.cmin` must be set as well. + + The 'cmax' property is a number and may be specified as: + - An int or float + + Returns + ------- + int|float + """ + return self["cmax"] + + @cmax.setter + def cmax(self, val): + self["cmax"] = val + + @property + def cmid(self): + """ + Sets the mid-point of the color domain by scaling + `marker.line.cmin` and/or `marker.line.cmax` to be equidistant + to this point. Has an effect only if in `marker.line.color` is + set to a numerical array. Value should have the same units as + in `marker.line.color`. Has no effect when `marker.line.cauto` + is `false`. + + The 'cmid' property is a number and may be specified as: + - An int or float + + Returns + ------- + int|float + """ + return self["cmid"] + + @cmid.setter + def cmid(self, val): + self["cmid"] = val + + @property + def cmin(self): + """ + Sets the lower bound of the color domain. Has an effect only if + in `marker.line.color` is set to a numerical array. Value + should have the same units as in `marker.line.color` and if + set, `marker.line.cmax` must be set as well. + + The 'cmin' property is a number and may be specified as: + - An int or float + + Returns + ------- + int|float + """ + return self["cmin"] + + @cmin.setter + def cmin(self, val): + self["cmin"] = val + + @property + def color(self): + """ + Sets the marker.line color. It accepts either a specific color + or an array of numbers that are mapped to the colorscale + relative to the max and min values of the array or relative to + `marker.line.cmin` and `marker.line.cmax` if set. + + The 'color' property is a color and may be specified as: + - A hex string (e.g. '#ff0000') + - An rgb/rgba string (e.g. 'rgb(255,0,0)') + - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') + - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') + - A named CSS color: see https://plotly.com/python/css-colors/ for a list + - A number that will be interpreted as a color + according to barpolar.marker.line.colorscale + - A list or array of any of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["color"] + + @color.setter + def color(self, val): + self["color"] = val + + @property + def coloraxis(self): + """ + Sets a reference to a shared color axis. References to these + shared color axes are "coloraxis", "coloraxis2", "coloraxis3", + etc. Settings for these shared color axes are set in the + layout, under `layout.coloraxis`, `layout.coloraxis2`, etc. + Note that multiple color scales can be linked to the same color + axis. + + The 'coloraxis' property is an identifier of a particular + subplot, of type 'coloraxis', that may be specified as: + - the string 'coloraxis' optionally followed by an integer >= 1 + (e.g. 'coloraxis', 'coloraxis1', 'coloraxis2', 'coloraxis3', etc.) + + Returns + ------- + str + """ + return self["coloraxis"] + + @coloraxis.setter + def coloraxis(self, val): + self["coloraxis"] = val + + @property + def colorscale(self): + """ + Sets the colorscale. Has an effect only if in + `marker.line.color` is set to a numerical array. The colorscale + must be an array containing arrays mapping a normalized value + to an rgb, rgba, hex, hsl, hsv, or named color string. At + minimum, a mapping for the lowest (0) and highest (1) values + are required. For example, `[[0, 'rgb(0,0,255)'], [1, + 'rgb(255,0,0)']]`. To control the bounds of the colorscale in + color space, use `marker.line.cmin` and `marker.line.cmax`. + Alternatively, `colorscale` may be a palette name string of the + following list: Blackbody,Bluered,Blues,Cividis,Earth,Electric, + Greens,Greys,Hot,Jet,Picnic,Portland,Rainbow,RdBu,Reds,Viridis, + YlGnBu,YlOrRd. + + The 'colorscale' property is a colorscale and may be + specified as: + - A list of colors that will be spaced evenly to create the colorscale. + Many predefined colorscale lists are included in the sequential, diverging, + and cyclical modules in the plotly.colors package. + - A list of 2-element lists where the first element is the + normalized color level value (starting at 0 and ending at 1), + and the second item is a valid color string. + (e.g. [[0, 'green'], [0.5, 'red'], [1.0, 'rgb(0, 0, 255)']]) + - One of the following named colorscales: + ['aggrnyl', 'agsunset', 'algae', 'amp', 'armyrose', 'balance', + 'blackbody', 'bluered', 'blues', 'blugrn', 'bluyl', 'brbg', + 'brwnyl', 'bugn', 'bupu', 'burg', 'burgyl', 'cividis', 'curl', + 'darkmint', 'deep', 'delta', 'dense', 'earth', 'edge', 'electric', + 'emrld', 'fall', 'geyser', 'gnbu', 'gray', 'greens', 'greys', + 'haline', 'hot', 'hsv', 'ice', 'icefire', 'inferno', 'jet', + 'magenta', 'magma', 'matter', 'mint', 'mrybm', 'mygbm', 'oranges', + 'orrd', 'oryel', 'oxy', 'peach', 'phase', 'picnic', 'pinkyl', + 'piyg', 'plasma', 'plotly3', 'portland', 'prgn', 'pubu', 'pubugn', + 'puor', 'purd', 'purp', 'purples', 'purpor', 'rainbow', 'rdbu', + 'rdgy', 'rdpu', 'rdylbu', 'rdylgn', 'redor', 'reds', 'solar', + 'spectral', 'speed', 'sunset', 'sunsetdark', 'teal', 'tealgrn', + 'tealrose', 'tempo', 'temps', 'thermal', 'tropic', 'turbid', + 'turbo', 'twilight', 'viridis', 'ylgn', 'ylgnbu', 'ylorbr', + 'ylorrd']. + Appending '_r' to a named colorscale reverses it. + + Returns + ------- + str + """ + return self["colorscale"] + + @colorscale.setter + def colorscale(self, val): + self["colorscale"] = val + + @property + def colorsrc(self): + """ + Sets the source reference on Chart Studio Cloud for `color`. + + The 'colorsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["colorsrc"] + + @colorsrc.setter + def colorsrc(self, val): + self["colorsrc"] = val + + @property + def reversescale(self): + """ + Reverses the color mapping if true. Has an effect only if in + `marker.line.color` is set to a numerical array. If true, + `marker.line.cmin` will correspond to the last color in the + array and `marker.line.cmax` will correspond to the first + color. + + The 'reversescale' property is a boolean and must be specified as: + - A boolean value: True or False + + Returns + ------- + bool + """ + return self["reversescale"] + + @reversescale.setter + def reversescale(self, val): + self["reversescale"] = val + + @property + def width(self): + """ + Sets the width (in px) of the lines bounding the marker points. + + The 'width' property is a number and may be specified as: + - An int or float in the interval [0, inf] + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + int|float|numpy.ndarray + """ + return self["width"] + + @width.setter + def width(self, val): + self["width"] = val + + @property + def widthsrc(self): + """ + Sets the source reference on Chart Studio Cloud for `width`. + + The 'widthsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["widthsrc"] + + @widthsrc.setter + def widthsrc(self, val): + self["widthsrc"] = val + + @property + def _prop_descriptions(self): + return """\ + autocolorscale + Determines whether the colorscale is a default palette + (`autocolorscale: true`) or the palette determined by + `marker.line.colorscale`. Has an effect only if in + `marker.line.color` is set to a numerical array. In + case `colorscale` is unspecified or `autocolorscale` is + true, the default palette will be chosen according to + whether numbers in the `color` array are all positive, + all negative or mixed. + cauto + Determines whether or not the color domain is computed + with respect to the input data (here in + `marker.line.color`) or the bounds set in + `marker.line.cmin` and `marker.line.cmax` Has an effect + only if in `marker.line.color` is set to a numerical + array. Defaults to `false` when `marker.line.cmin` and + `marker.line.cmax` are set by the user. + cmax + Sets the upper bound of the color domain. Has an effect + only if in `marker.line.color` is set to a numerical + array. Value should have the same units as in + `marker.line.color` and if set, `marker.line.cmin` must + be set as well. + cmid + Sets the mid-point of the color domain by scaling + `marker.line.cmin` and/or `marker.line.cmax` to be + equidistant to this point. Has an effect only if in + `marker.line.color` is set to a numerical array. Value + should have the same units as in `marker.line.color`. + Has no effect when `marker.line.cauto` is `false`. + cmin + Sets the lower bound of the color domain. Has an effect + only if in `marker.line.color` is set to a numerical + array. Value should have the same units as in + `marker.line.color` and if set, `marker.line.cmax` must + be set as well. + color + Sets the marker.line color. It accepts either a + specific color or an array of numbers that are mapped + to the colorscale relative to the max and min values of + the array or relative to `marker.line.cmin` and + `marker.line.cmax` if set. + coloraxis + Sets a reference to a shared color axis. References to + these shared color axes are "coloraxis", "coloraxis2", + "coloraxis3", etc. Settings for these shared color axes + are set in the layout, under `layout.coloraxis`, + `layout.coloraxis2`, etc. Note that multiple color + scales can be linked to the same color axis. + colorscale + Sets the colorscale. Has an effect only if in + `marker.line.color` is set to a numerical array. The + colorscale must be an array containing arrays mapping a + normalized value to an rgb, rgba, hex, hsl, hsv, or + named color string. At minimum, a mapping for the + lowest (0) and highest (1) values are required. For + example, `[[0, 'rgb(0,0,255)'], [1, 'rgb(255,0,0)']]`. + To control the bounds of the colorscale in color space, + use `marker.line.cmin` and `marker.line.cmax`. + Alternatively, `colorscale` may be a palette name + string of the following list: Blackbody,Bluered,Blues,C + ividis,Earth,Electric,Greens,Greys,Hot,Jet,Picnic,Portl + and,Rainbow,RdBu,Reds,Viridis,YlGnBu,YlOrRd. + colorsrc + Sets the source reference on Chart Studio Cloud for + `color`. + reversescale + Reverses the color mapping if true. Has an effect only + if in `marker.line.color` is set to a numerical array. + If true, `marker.line.cmin` will correspond to the last + color in the array and `marker.line.cmax` will + correspond to the first color. + width + Sets the width (in px) of the lines bounding the marker + points. + widthsrc + Sets the source reference on Chart Studio Cloud for + `width`. + """ + + def __init__( + self, + arg=None, + autocolorscale=None, + cauto=None, + cmax=None, + cmid=None, + cmin=None, + color=None, + coloraxis=None, + colorscale=None, + colorsrc=None, + reversescale=None, + width=None, + widthsrc=None, + **kwargs, + ): + """ + Construct a new Line object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.barpolar.marker.Line` + autocolorscale + Determines whether the colorscale is a default palette + (`autocolorscale: true`) or the palette determined by + `marker.line.colorscale`. Has an effect only if in + `marker.line.color` is set to a numerical array. In + case `colorscale` is unspecified or `autocolorscale` is + true, the default palette will be chosen according to + whether numbers in the `color` array are all positive, + all negative or mixed. + cauto + Determines whether or not the color domain is computed + with respect to the input data (here in + `marker.line.color`) or the bounds set in + `marker.line.cmin` and `marker.line.cmax` Has an effect + only if in `marker.line.color` is set to a numerical + array. Defaults to `false` when `marker.line.cmin` and + `marker.line.cmax` are set by the user. + cmax + Sets the upper bound of the color domain. Has an effect + only if in `marker.line.color` is set to a numerical + array. Value should have the same units as in + `marker.line.color` and if set, `marker.line.cmin` must + be set as well. + cmid + Sets the mid-point of the color domain by scaling + `marker.line.cmin` and/or `marker.line.cmax` to be + equidistant to this point. Has an effect only if in + `marker.line.color` is set to a numerical array. Value + should have the same units as in `marker.line.color`. + Has no effect when `marker.line.cauto` is `false`. + cmin + Sets the lower bound of the color domain. Has an effect + only if in `marker.line.color` is set to a numerical + array. Value should have the same units as in + `marker.line.color` and if set, `marker.line.cmax` must + be set as well. + color + Sets the marker.line color. It accepts either a + specific color or an array of numbers that are mapped + to the colorscale relative to the max and min values of + the array or relative to `marker.line.cmin` and + `marker.line.cmax` if set. + coloraxis + Sets a reference to a shared color axis. References to + these shared color axes are "coloraxis", "coloraxis2", + "coloraxis3", etc. Settings for these shared color axes + are set in the layout, under `layout.coloraxis`, + `layout.coloraxis2`, etc. Note that multiple color + scales can be linked to the same color axis. + colorscale + Sets the colorscale. Has an effect only if in + `marker.line.color` is set to a numerical array. The + colorscale must be an array containing arrays mapping a + normalized value to an rgb, rgba, hex, hsl, hsv, or + named color string. At minimum, a mapping for the + lowest (0) and highest (1) values are required. For + example, `[[0, 'rgb(0,0,255)'], [1, 'rgb(255,0,0)']]`. + To control the bounds of the colorscale in color space, + use `marker.line.cmin` and `marker.line.cmax`. + Alternatively, `colorscale` may be a palette name + string of the following list: Blackbody,Bluered,Blues,C + ividis,Earth,Electric,Greens,Greys,Hot,Jet,Picnic,Portl + and,Rainbow,RdBu,Reds,Viridis,YlGnBu,YlOrRd. + colorsrc + Sets the source reference on Chart Studio Cloud for + `color`. + reversescale + Reverses the color mapping if true. Has an effect only + if in `marker.line.color` is set to a numerical array. + If true, `marker.line.cmin` will correspond to the last + color in the array and `marker.line.cmax` will + correspond to the first color. + width + Sets the width (in px) of the lines bounding the marker + points. + widthsrc + Sets the source reference on Chart Studio Cloud for + `width`. + + Returns + ------- + Line + """ + super().__init__("line") + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + if arg is None: + arg = {} + elif isinstance(arg, self.__class__): + arg = arg.to_plotly_json() + elif isinstance(arg, dict): + arg = _copy.copy(arg) + else: + raise ValueError("""\ +The first argument to the plotly.graph_objs.barpolar.marker.Line +constructor must be a dict or +an instance of :class:`plotly.graph_objs.barpolar.marker.Line`""") + + self._skip_invalid = kwargs.pop("skip_invalid", False) + self._validate = kwargs.pop("_validate", True) + + self._set_property("autocolorscale", arg, autocolorscale) + self._set_property("cauto", arg, cauto) + self._set_property("cmax", arg, cmax) + self._set_property("cmid", arg, cmid) + self._set_property("cmin", arg, cmin) + self._set_property("color", arg, color) + self._set_property("coloraxis", arg, coloraxis) + self._set_property("colorscale", arg, colorscale) + self._set_property("colorsrc", arg, colorsrc) + self._set_property("reversescale", arg, reversescale) + self._set_property("width", arg, width) + self._set_property("widthsrc", arg, widthsrc) + self._process_kwargs(**dict(arg, **kwargs)) + self._skip_invalid = False diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/barpolar/marker/_pattern.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/barpolar/marker/_pattern.py new file mode 100644 index 0000000000000000000000000000000000000000..94329f6afb4f4ef4fb5a8671a214c08bbe332db9 --- /dev/null +++ b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/barpolar/marker/_pattern.py @@ -0,0 +1,495 @@ +# --- THIS FILE IS AUTO-GENERATED --- +# Modifications will be overwitten the next time code generation run. + +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Pattern(_BaseTraceHierarchyType): + _parent_path_str = "barpolar.marker" + _path_str = "barpolar.marker.pattern" + _valid_props = { + "bgcolor", + "bgcolorsrc", + "fgcolor", + "fgcolorsrc", + "fgopacity", + "fillmode", + "path", + "pathsrc", + "shape", + "shapesrc", + "size", + "sizesrc", + "solidity", + "soliditysrc", + } + + @property + def bgcolor(self): + """ + When there is no colorscale sets the color of background + pattern fill. Defaults to a `marker.color` background when + `fillmode` is "overlay". Otherwise, defaults to a transparent + background. + + The 'bgcolor' property is a color and may be specified as: + - A hex string (e.g. '#ff0000') + - An rgb/rgba string (e.g. 'rgb(255,0,0)') + - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') + - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') + - A named CSS color: see https://plotly.com/python/css-colors/ for a list + - A list or array of any of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["bgcolor"] + + @bgcolor.setter + def bgcolor(self, val): + self["bgcolor"] = val + + @property + def bgcolorsrc(self): + """ + Sets the source reference on Chart Studio Cloud for `bgcolor`. + + The 'bgcolorsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["bgcolorsrc"] + + @bgcolorsrc.setter + def bgcolorsrc(self, val): + self["bgcolorsrc"] = val + + @property + def fgcolor(self): + """ + When there is no colorscale sets the color of foreground + pattern fill. Defaults to a `marker.color` background when + `fillmode` is "replace". Otherwise, defaults to dark grey or + white to increase contrast with the `bgcolor`. + + The 'fgcolor' property is a color and may be specified as: + - A hex string (e.g. '#ff0000') + - An rgb/rgba string (e.g. 'rgb(255,0,0)') + - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') + - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') + - A named CSS color: see https://plotly.com/python/css-colors/ for a list + - A list or array of any of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["fgcolor"] + + @fgcolor.setter + def fgcolor(self, val): + self["fgcolor"] = val + + @property + def fgcolorsrc(self): + """ + Sets the source reference on Chart Studio Cloud for `fgcolor`. + + The 'fgcolorsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["fgcolorsrc"] + + @fgcolorsrc.setter + def fgcolorsrc(self, val): + self["fgcolorsrc"] = val + + @property + def fgopacity(self): + """ + Sets the opacity of the foreground pattern fill. Defaults to a + 0.5 when `fillmode` is "overlay". Otherwise, defaults to 1. + + The 'fgopacity' property is a number and may be specified as: + - An int or float in the interval [0, 1] + + Returns + ------- + int|float + """ + return self["fgopacity"] + + @fgopacity.setter + def fgopacity(self, val): + self["fgopacity"] = val + + @property + def fillmode(self): + """ + Determines whether `marker.color` should be used as a default + to `bgcolor` or a `fgcolor`. + + The 'fillmode' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['replace', 'overlay'] + + Returns + ------- + Any + """ + return self["fillmode"] + + @fillmode.setter + def fillmode(self, val): + self["fillmode"] = val + + @property + def path(self): + """ + Sets a custom path for pattern fill. Use with no `shape` or + `solidity`, provide an SVG path string for the regions of the + square from (0,0) to (`size`,`size`) to color. + + The 'path' property is a string and must be specified as: + - A string + - A number that will be converted to a string + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["path"] + + @path.setter + def path(self, val): + self["path"] = val + + @property + def pathsrc(self): + """ + Sets the source reference on Chart Studio Cloud for `path`. + + The 'pathsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["pathsrc"] + + @pathsrc.setter + def pathsrc(self, val): + self["pathsrc"] = val + + @property + def shape(self): + """ + Sets the shape of the pattern fill. By default, no pattern is + used for filling the area. + + The 'shape' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['', '/', '\\', 'x', '-', '|', '+', '.'] + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + Any|numpy.ndarray + """ + return self["shape"] + + @shape.setter + def shape(self, val): + self["shape"] = val + + @property + def shapesrc(self): + """ + Sets the source reference on Chart Studio Cloud for `shape`. + + The 'shapesrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["shapesrc"] + + @shapesrc.setter + def shapesrc(self, val): + self["shapesrc"] = val + + @property + def size(self): + """ + Sets the size of unit squares of the pattern fill in pixels, + which corresponds to the interval of repetition of the pattern. + + The 'size' property is a number and may be specified as: + - An int or float in the interval [0, inf] + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + int|float|numpy.ndarray + """ + return self["size"] + + @size.setter + def size(self, val): + self["size"] = val + + @property + def sizesrc(self): + """ + Sets the source reference on Chart Studio Cloud for `size`. + + The 'sizesrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["sizesrc"] + + @sizesrc.setter + def sizesrc(self, val): + self["sizesrc"] = val + + @property + def solidity(self): + """ + Sets the solidity of the pattern fill. Solidity is roughly the + fraction of the area filled by the pattern. Solidity of 0 shows + only the background color without pattern and solidty of 1 + shows only the foreground color without pattern. + + The 'solidity' property is a number and may be specified as: + - An int or float in the interval [0, 1] + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + int|float|numpy.ndarray + """ + return self["solidity"] + + @solidity.setter + def solidity(self, val): + self["solidity"] = val + + @property + def soliditysrc(self): + """ + Sets the source reference on Chart Studio Cloud for `solidity`. + + The 'soliditysrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["soliditysrc"] + + @soliditysrc.setter + def soliditysrc(self, val): + self["soliditysrc"] = val + + @property + def _prop_descriptions(self): + return """\ + bgcolor + When there is no colorscale sets the color of + background pattern fill. Defaults to a `marker.color` + background when `fillmode` is "overlay". Otherwise, + defaults to a transparent background. + bgcolorsrc + Sets the source reference on Chart Studio Cloud for + `bgcolor`. + fgcolor + When there is no colorscale sets the color of + foreground pattern fill. Defaults to a `marker.color` + background when `fillmode` is "replace". Otherwise, + defaults to dark grey or white to increase contrast + with the `bgcolor`. + fgcolorsrc + Sets the source reference on Chart Studio Cloud for + `fgcolor`. + fgopacity + Sets the opacity of the foreground pattern fill. + Defaults to a 0.5 when `fillmode` is "overlay". + Otherwise, defaults to 1. + fillmode + Determines whether `marker.color` should be used as a + default to `bgcolor` or a `fgcolor`. + path + Sets a custom path for pattern fill. Use with no + `shape` or `solidity`, provide an SVG path string for + the regions of the square from (0,0) to (`size`,`size`) + to color. + pathsrc + Sets the source reference on Chart Studio Cloud for + `path`. + shape + Sets the shape of the pattern fill. By default, no + pattern is used for filling the area. + shapesrc + Sets the source reference on Chart Studio Cloud for + `shape`. + size + Sets the size of unit squares of the pattern fill in + pixels, which corresponds to the interval of repetition + of the pattern. + sizesrc + Sets the source reference on Chart Studio Cloud for + `size`. + solidity + Sets the solidity of the pattern fill. Solidity is + roughly the fraction of the area filled by the pattern. + Solidity of 0 shows only the background color without + pattern and solidty of 1 shows only the foreground + color without pattern. + soliditysrc + Sets the source reference on Chart Studio Cloud for + `solidity`. + """ + + def __init__( + self, + arg=None, + bgcolor=None, + bgcolorsrc=None, + fgcolor=None, + fgcolorsrc=None, + fgopacity=None, + fillmode=None, + path=None, + pathsrc=None, + shape=None, + shapesrc=None, + size=None, + sizesrc=None, + solidity=None, + soliditysrc=None, + **kwargs, + ): + """ + Construct a new Pattern object + + Sets the pattern within the marker. + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.barpolar.marker.Pattern` + bgcolor + When there is no colorscale sets the color of + background pattern fill. Defaults to a `marker.color` + background when `fillmode` is "overlay". Otherwise, + defaults to a transparent background. + bgcolorsrc + Sets the source reference on Chart Studio Cloud for + `bgcolor`. + fgcolor + When there is no colorscale sets the color of + foreground pattern fill. Defaults to a `marker.color` + background when `fillmode` is "replace". Otherwise, + defaults to dark grey or white to increase contrast + with the `bgcolor`. + fgcolorsrc + Sets the source reference on Chart Studio Cloud for + `fgcolor`. + fgopacity + Sets the opacity of the foreground pattern fill. + Defaults to a 0.5 when `fillmode` is "overlay". + Otherwise, defaults to 1. + fillmode + Determines whether `marker.color` should be used as a + default to `bgcolor` or a `fgcolor`. + path + Sets a custom path for pattern fill. Use with no + `shape` or `solidity`, provide an SVG path string for + the regions of the square from (0,0) to (`size`,`size`) + to color. + pathsrc + Sets the source reference on Chart Studio Cloud for + `path`. + shape + Sets the shape of the pattern fill. By default, no + pattern is used for filling the area. + shapesrc + Sets the source reference on Chart Studio Cloud for + `shape`. + size + Sets the size of unit squares of the pattern fill in + pixels, which corresponds to the interval of repetition + of the pattern. + sizesrc + Sets the source reference on Chart Studio Cloud for + `size`. + solidity + Sets the solidity of the pattern fill. Solidity is + roughly the fraction of the area filled by the pattern. + Solidity of 0 shows only the background color without + pattern and solidty of 1 shows only the foreground + color without pattern. + soliditysrc + Sets the source reference on Chart Studio Cloud for + `solidity`. + + Returns + ------- + Pattern + """ + super().__init__("pattern") + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + if arg is None: + arg = {} + elif isinstance(arg, self.__class__): + arg = arg.to_plotly_json() + elif isinstance(arg, dict): + arg = _copy.copy(arg) + else: + raise ValueError("""\ +The first argument to the plotly.graph_objs.barpolar.marker.Pattern +constructor must be a dict or +an instance of :class:`plotly.graph_objs.barpolar.marker.Pattern`""") + + self._skip_invalid = kwargs.pop("skip_invalid", False) + self._validate = kwargs.pop("_validate", True) + + self._set_property("bgcolor", arg, bgcolor) + self._set_property("bgcolorsrc", arg, bgcolorsrc) + self._set_property("fgcolor", arg, fgcolor) + self._set_property("fgcolorsrc", arg, fgcolorsrc) + self._set_property("fgopacity", arg, fgopacity) + self._set_property("fillmode", arg, fillmode) + self._set_property("path", arg, path) + self._set_property("pathsrc", arg, pathsrc) + self._set_property("shape", arg, shape) + self._set_property("shapesrc", arg, shapesrc) + self._set_property("size", arg, size) + self._set_property("sizesrc", arg, sizesrc) + self._set_property("solidity", arg, solidity) + self._set_property("soliditysrc", arg, soliditysrc) + self._process_kwargs(**dict(arg, **kwargs)) + self._skip_invalid = False diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/barpolar/marker/colorbar/.___init__.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/barpolar/marker/colorbar/.___init__.py new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/barpolar/marker/colorbar/.___init__.py differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/barpolar/marker/colorbar/.___pycache__ b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/barpolar/marker/colorbar/.___pycache__ new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/barpolar/marker/colorbar/.___pycache__ differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/barpolar/marker/colorbar/.__tickfont.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/barpolar/marker/colorbar/.__tickfont.py new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/barpolar/marker/colorbar/.__tickfont.py differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/barpolar/marker/colorbar/.__tickformatstop.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/barpolar/marker/colorbar/.__tickformatstop.py new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/barpolar/marker/colorbar/.__tickformatstop.py differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/barpolar/marker/colorbar/.__title.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/barpolar/marker/colorbar/.__title.py new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/barpolar/marker/colorbar/.__title.py differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/barpolar/marker/colorbar/._title b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/barpolar/marker/colorbar/._title new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/barpolar/marker/colorbar/._title differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/barpolar/marker/colorbar/__init__.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/barpolar/marker/colorbar/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..4690d3cc738a44d43a04d43d3aa0be36d7cd34e2 --- /dev/null +++ b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/barpolar/marker/colorbar/__init__.py @@ -0,0 +1,16 @@ +import sys +from typing import TYPE_CHECKING + +if TYPE_CHECKING: + from ._tickfont import Tickfont + from ._tickformatstop import Tickformatstop + from ._title import Title + from . import title +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [".title"], + ["._tickfont.Tickfont", "._tickformatstop.Tickformatstop", "._title.Title"], + ) diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/barpolar/marker/colorbar/_tickfont.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/barpolar/marker/colorbar/_tickfont.py new file mode 100644 index 0000000000000000000000000000000000000000..3f1bdc9d24b6a22575e6b35444ce8eedeb56653e --- /dev/null +++ b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/barpolar/marker/colorbar/_tickfont.py @@ -0,0 +1,334 @@ +# --- THIS FILE IS AUTO-GENERATED --- +# Modifications will be overwitten the next time code generation run. + +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Tickfont(_BaseTraceHierarchyType): + _parent_path_str = "barpolar.marker.colorbar" + _path_str = "barpolar.marker.colorbar.tickfont" + _valid_props = { + "color", + "family", + "lineposition", + "shadow", + "size", + "style", + "textcase", + "variant", + "weight", + } + + @property + def color(self): + """ + The 'color' property is a color and may be specified as: + - A hex string (e.g. '#ff0000') + - An rgb/rgba string (e.g. 'rgb(255,0,0)') + - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') + - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') + - A named CSS color: see https://plotly.com/python/css-colors/ for a list + + Returns + ------- + str + """ + return self["color"] + + @color.setter + def color(self, val): + self["color"] = val + + @property + def family(self): + """ + HTML font family - the typeface that will be applied by the web + browser. The web browser can only apply a font if it is + available on the system where it runs. Provide multiple font + families, separated by commas, to indicate the order in which + to apply fonts if they aren't available. + + The 'family' property is a string and must be specified as: + - A non-empty string + + Returns + ------- + str + """ + return self["family"] + + @family.setter + def family(self, val): + self["family"] = val + + @property + def lineposition(self): + """ + Sets the kind of decoration line(s) with text, such as an + "under", "over" or "through" as well as combinations e.g. + "under+over", etc. + + The 'lineposition' property is a flaglist and may be specified + as a string containing: + - Any combination of ['under', 'over', 'through'] joined with '+' characters + (e.g. 'under+over') + OR exactly one of ['none'] (e.g. 'none') + + Returns + ------- + Any + """ + return self["lineposition"] + + @lineposition.setter + def lineposition(self, val): + self["lineposition"] = val + + @property + def shadow(self): + """ + Sets the shape and color of the shadow behind text. "auto" + places minimal shadow and applies contrast text font color. See + https://developer.mozilla.org/en-US/docs/Web/CSS/text-shadow + for additional options. + + The 'shadow' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["shadow"] + + @shadow.setter + def shadow(self, val): + self["shadow"] = val + + @property + def size(self): + """ + The 'size' property is a number and may be specified as: + - An int or float in the interval [1, inf] + + Returns + ------- + int|float + """ + return self["size"] + + @size.setter + def size(self, val): + self["size"] = val + + @property + def style(self): + """ + Sets whether a font should be styled with a normal or italic + face from its family. + + The 'style' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['normal', 'italic'] + + Returns + ------- + Any + """ + return self["style"] + + @style.setter + def style(self, val): + self["style"] = val + + @property + def textcase(self): + """ + Sets capitalization of text. It can be used to make text appear + in all-uppercase or all-lowercase, or with each word + capitalized. + + The 'textcase' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['normal', 'word caps', 'upper', 'lower'] + + Returns + ------- + Any + """ + return self["textcase"] + + @textcase.setter + def textcase(self, val): + self["textcase"] = val + + @property + def variant(self): + """ + Sets the variant of the font. + + The 'variant' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['normal', 'small-caps', 'all-small-caps', + 'all-petite-caps', 'petite-caps', 'unicase'] + + Returns + ------- + Any + """ + return self["variant"] + + @variant.setter + def variant(self, val): + self["variant"] = val + + @property + def weight(self): + """ + Sets the weight (or boldness) of the font. + + The 'weight' property is a integer and may be specified as: + - An int (or float that will be cast to an int) + in the interval [1, 1000] + OR exactly one of ['normal', 'bold'] (e.g. 'bold') + + Returns + ------- + int + """ + return self["weight"] + + @weight.setter + def weight(self, val): + self["weight"] = val + + @property + def _prop_descriptions(self): + return """\ + color + + family + HTML font family - the typeface that will be applied by + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. + lineposition + Sets the kind of decoration line(s) with text, such as + an "under", "over" or "through" as well as combinations + e.g. "under+over", etc. + shadow + Sets the shape and color of the shadow behind text. + "auto" places minimal shadow and applies contrast text + font color. See https://developer.mozilla.org/en- + US/docs/Web/CSS/text-shadow for additional options. + size + + style + Sets whether a font should be styled with a normal or + italic face from its family. + textcase + Sets capitalization of text. It can be used to make + text appear in all-uppercase or all-lowercase, or with + each word capitalized. + variant + Sets the variant of the font. + weight + Sets the weight (or boldness) of the font. + """ + + def __init__( + self, + arg=None, + color=None, + family=None, + lineposition=None, + shadow=None, + size=None, + style=None, + textcase=None, + variant=None, + weight=None, + **kwargs, + ): + """ + Construct a new Tickfont object + + Sets the color bar's tick label font + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of :class:`plotly.graph_objs.barpolar.marke + r.colorbar.Tickfont` + color + + family + HTML font family - the typeface that will be applied by + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. + lineposition + Sets the kind of decoration line(s) with text, such as + an "under", "over" or "through" as well as combinations + e.g. "under+over", etc. + shadow + Sets the shape and color of the shadow behind text. + "auto" places minimal shadow and applies contrast text + font color. See https://developer.mozilla.org/en- + US/docs/Web/CSS/text-shadow for additional options. + size + + style + Sets whether a font should be styled with a normal or + italic face from its family. + textcase + Sets capitalization of text. It can be used to make + text appear in all-uppercase or all-lowercase, or with + each word capitalized. + variant + Sets the variant of the font. + weight + Sets the weight (or boldness) of the font. + + Returns + ------- + Tickfont + """ + super().__init__("tickfont") + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + if arg is None: + arg = {} + elif isinstance(arg, self.__class__): + arg = arg.to_plotly_json() + elif isinstance(arg, dict): + arg = _copy.copy(arg) + else: + raise ValueError("""\ +The first argument to the plotly.graph_objs.barpolar.marker.colorbar.Tickfont +constructor must be a dict or +an instance of :class:`plotly.graph_objs.barpolar.marker.colorbar.Tickfont`""") + + self._skip_invalid = kwargs.pop("skip_invalid", False) + self._validate = kwargs.pop("_validate", True) + + self._set_property("color", arg, color) + self._set_property("family", arg, family) + self._set_property("lineposition", arg, lineposition) + self._set_property("shadow", arg, shadow) + self._set_property("size", arg, size) + self._set_property("style", arg, style) + self._set_property("textcase", arg, textcase) + self._set_property("variant", arg, variant) + self._set_property("weight", arg, weight) + self._process_kwargs(**dict(arg, **kwargs)) + self._skip_invalid = False diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/barpolar/marker/colorbar/_tickformatstop.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/barpolar/marker/colorbar/_tickformatstop.py new file mode 100644 index 0000000000000000000000000000000000000000..44f0fd6bee556d15dfd34324b610a07f609428b3 --- /dev/null +++ b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/barpolar/marker/colorbar/_tickformatstop.py @@ -0,0 +1,241 @@ +# --- THIS FILE IS AUTO-GENERATED --- +# Modifications will be overwitten the next time code generation run. + +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Tickformatstop(_BaseTraceHierarchyType): + _parent_path_str = "barpolar.marker.colorbar" + _path_str = "barpolar.marker.colorbar.tickformatstop" + _valid_props = {"dtickrange", "enabled", "name", "templateitemname", "value"} + + @property + def dtickrange(self): + """ + range [*min*, *max*], where "min", "max" - dtick values which + describe some zoom level, it is possible to omit "min" or "max" + value by passing "null" + + The 'dtickrange' property is an info array that may be specified as: + + * a list or tuple of 2 elements where: + (0) The 'dtickrange[0]' property accepts values of any type + (1) The 'dtickrange[1]' property accepts values of any type + + Returns + ------- + list + """ + return self["dtickrange"] + + @dtickrange.setter + def dtickrange(self, val): + self["dtickrange"] = val + + @property + def enabled(self): + """ + Determines whether or not this stop is used. If `false`, this + stop is ignored even within its `dtickrange`. + + The 'enabled' property is a boolean and must be specified as: + - A boolean value: True or False + + Returns + ------- + bool + """ + return self["enabled"] + + @enabled.setter + def enabled(self, val): + self["enabled"] = val + + @property + def name(self): + """ + When used in a template, named items are created in the output + figure in addition to any items the figure already has in this + array. You can modify these items in the output figure by + making your own item with `templateitemname` matching this + `name` alongside your modifications (including `visible: false` + or `enabled: false` to hide it). Has no effect outside of a + template. + + The 'name' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["name"] + + @name.setter + def name(self, val): + self["name"] = val + + @property + def templateitemname(self): + """ + Used to refer to a named item in this array in the template. + Named items from the template will be created even without a + matching item in the input figure, but you can modify one by + making an item with `templateitemname` matching its `name`, + alongside your modifications (including `visible: false` or + `enabled: false` to hide it). If there is no template or no + matching item, this item will be hidden unless you explicitly + show it with `visible: true`. + + The 'templateitemname' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["templateitemname"] + + @templateitemname.setter + def templateitemname(self, val): + self["templateitemname"] = val + + @property + def value(self): + """ + string - dtickformat for described zoom level, the same as + "tickformat" + + The 'value' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["value"] + + @value.setter + def value(self, val): + self["value"] = val + + @property + def _prop_descriptions(self): + return """\ + dtickrange + range [*min*, *max*], where "min", "max" - dtick values + which describe some zoom level, it is possible to omit + "min" or "max" value by passing "null" + enabled + Determines whether or not this stop is used. If + `false`, this stop is ignored even within its + `dtickrange`. + name + When used in a template, named items are created in the + output figure in addition to any items the figure + already has in this array. You can modify these items + in the output figure by making your own item with + `templateitemname` matching this `name` alongside your + modifications (including `visible: false` or `enabled: + false` to hide it). Has no effect outside of a + template. + templateitemname + Used to refer to a named item in this array in the + template. Named items from the template will be created + even without a matching item in the input figure, but + you can modify one by making an item with + `templateitemname` matching its `name`, alongside your + modifications (including `visible: false` or `enabled: + false` to hide it). If there is no template or no + matching item, this item will be hidden unless you + explicitly show it with `visible: true`. + value + string - dtickformat for described zoom level, the same + as "tickformat" + """ + + def __init__( + self, + arg=None, + dtickrange=None, + enabled=None, + name=None, + templateitemname=None, + value=None, + **kwargs, + ): + """ + Construct a new Tickformatstop object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of :class:`plotly.graph_objs.barpolar.marke + r.colorbar.Tickformatstop` + dtickrange + range [*min*, *max*], where "min", "max" - dtick values + which describe some zoom level, it is possible to omit + "min" or "max" value by passing "null" + enabled + Determines whether or not this stop is used. If + `false`, this stop is ignored even within its + `dtickrange`. + name + When used in a template, named items are created in the + output figure in addition to any items the figure + already has in this array. You can modify these items + in the output figure by making your own item with + `templateitemname` matching this `name` alongside your + modifications (including `visible: false` or `enabled: + false` to hide it). Has no effect outside of a + template. + templateitemname + Used to refer to a named item in this array in the + template. Named items from the template will be created + even without a matching item in the input figure, but + you can modify one by making an item with + `templateitemname` matching its `name`, alongside your + modifications (including `visible: false` or `enabled: + false` to hide it). If there is no template or no + matching item, this item will be hidden unless you + explicitly show it with `visible: true`. + value + string - dtickformat for described zoom level, the same + as "tickformat" + + Returns + ------- + Tickformatstop + """ + super().__init__("tickformatstops") + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + if arg is None: + arg = {} + elif isinstance(arg, self.__class__): + arg = arg.to_plotly_json() + elif isinstance(arg, dict): + arg = _copy.copy(arg) + else: + raise ValueError("""\ +The first argument to the plotly.graph_objs.barpolar.marker.colorbar.Tickformatstop +constructor must be a dict or +an instance of :class:`plotly.graph_objs.barpolar.marker.colorbar.Tickformatstop`""") + + self._skip_invalid = kwargs.pop("skip_invalid", False) + self._validate = kwargs.pop("_validate", True) + + self._set_property("dtickrange", arg, dtickrange) + self._set_property("enabled", arg, enabled) + self._set_property("name", arg, name) + self._set_property("templateitemname", arg, templateitemname) + self._set_property("value", arg, value) + self._process_kwargs(**dict(arg, **kwargs)) + self._skip_invalid = False diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/barpolar/marker/colorbar/_title.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/barpolar/marker/colorbar/_title.py new file mode 100644 index 0000000000000000000000000000000000000000..6c674fb8cd744339e6d1dd7173bb8467984a2464 --- /dev/null +++ b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/barpolar/marker/colorbar/_title.py @@ -0,0 +1,136 @@ +# --- THIS FILE IS AUTO-GENERATED --- +# Modifications will be overwitten the next time code generation run. + +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Title(_BaseTraceHierarchyType): + _parent_path_str = "barpolar.marker.colorbar" + _path_str = "barpolar.marker.colorbar.title" + _valid_props = {"font", "side", "text"} + + @property + def font(self): + """ + Sets this color bar's title font. + + The 'font' property is an instance of Font + that may be specified as: + - An instance of :class:`plotly.graph_objs.barpolar.marker.colorbar.title.Font` + - A dict of string/value properties that will be passed + to the Font constructor + + Returns + ------- + plotly.graph_objs.barpolar.marker.colorbar.title.Font + """ + return self["font"] + + @font.setter + def font(self, val): + self["font"] = val + + @property + def side(self): + """ + Determines the location of color bar's title with respect to + the color bar. Defaults to "top" when `orientation` if "v" and + defaults to "right" when `orientation` if "h". + + The 'side' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['right', 'top', 'bottom'] + + Returns + ------- + Any + """ + return self["side"] + + @side.setter + def side(self, val): + self["side"] = val + + @property + def text(self): + """ + Sets the title of the color bar. + + The 'text' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["text"] + + @text.setter + def text(self, val): + self["text"] = val + + @property + def _prop_descriptions(self): + return """\ + font + Sets this color bar's title font. + side + Determines the location of color bar's title with + respect to the color bar. Defaults to "top" when + `orientation` if "v" and defaults to "right" when + `orientation` if "h". + text + Sets the title of the color bar. + """ + + def __init__(self, arg=None, font=None, side=None, text=None, **kwargs): + """ + Construct a new Title object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of :class:`plotly.graph_objs.barpolar.marke + r.colorbar.Title` + font + Sets this color bar's title font. + side + Determines the location of color bar's title with + respect to the color bar. Defaults to "top" when + `orientation` if "v" and defaults to "right" when + `orientation` if "h". + text + Sets the title of the color bar. + + Returns + ------- + Title + """ + super().__init__("title") + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + if arg is None: + arg = {} + elif isinstance(arg, self.__class__): + arg = arg.to_plotly_json() + elif isinstance(arg, dict): + arg = _copy.copy(arg) + else: + raise ValueError("""\ +The first argument to the plotly.graph_objs.barpolar.marker.colorbar.Title +constructor must be a dict or +an instance of :class:`plotly.graph_objs.barpolar.marker.colorbar.Title`""") + + self._skip_invalid = kwargs.pop("skip_invalid", False) + self._validate = kwargs.pop("_validate", True) + + self._set_property("font", arg, font) + self._set_property("side", arg, side) + self._set_property("text", arg, text) + self._process_kwargs(**dict(arg, **kwargs)) + self._skip_invalid = False diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/barpolar/marker/colorbar/title/.___init__.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/barpolar/marker/colorbar/title/.___init__.py new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/barpolar/marker/colorbar/title/.___init__.py differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/barpolar/marker/colorbar/title/.___pycache__ b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/barpolar/marker/colorbar/title/.___pycache__ new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/barpolar/marker/colorbar/title/.___pycache__ differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/barpolar/marker/colorbar/title/.__font.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/barpolar/marker/colorbar/title/.__font.py new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/barpolar/marker/colorbar/title/.__font.py differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/barpolar/marker/colorbar/title/__init__.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/barpolar/marker/colorbar/title/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..56f600d3458c41f269053307377e9707ab13e090 --- /dev/null +++ b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/barpolar/marker/colorbar/title/__init__.py @@ -0,0 +1,9 @@ +import sys +from typing import TYPE_CHECKING + +if TYPE_CHECKING: + from ._font import Font +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import(__name__, [], ["._font.Font"]) diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/barpolar/marker/colorbar/title/_font.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/barpolar/marker/colorbar/title/_font.py new file mode 100644 index 0000000000000000000000000000000000000000..fac5ba93a118b2a35b65404688b8cfd95557904d --- /dev/null +++ b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/barpolar/marker/colorbar/title/_font.py @@ -0,0 +1,334 @@ +# --- THIS FILE IS AUTO-GENERATED --- +# Modifications will be overwitten the next time code generation run. + +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Font(_BaseTraceHierarchyType): + _parent_path_str = "barpolar.marker.colorbar.title" + _path_str = "barpolar.marker.colorbar.title.font" + _valid_props = { + "color", + "family", + "lineposition", + "shadow", + "size", + "style", + "textcase", + "variant", + "weight", + } + + @property + def color(self): + """ + The 'color' property is a color and may be specified as: + - A hex string (e.g. '#ff0000') + - An rgb/rgba string (e.g. 'rgb(255,0,0)') + - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') + - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') + - A named CSS color: see https://plotly.com/python/css-colors/ for a list + + Returns + ------- + str + """ + return self["color"] + + @color.setter + def color(self, val): + self["color"] = val + + @property + def family(self): + """ + HTML font family - the typeface that will be applied by the web + browser. The web browser can only apply a font if it is + available on the system where it runs. Provide multiple font + families, separated by commas, to indicate the order in which + to apply fonts if they aren't available. + + The 'family' property is a string and must be specified as: + - A non-empty string + + Returns + ------- + str + """ + return self["family"] + + @family.setter + def family(self, val): + self["family"] = val + + @property + def lineposition(self): + """ + Sets the kind of decoration line(s) with text, such as an + "under", "over" or "through" as well as combinations e.g. + "under+over", etc. + + The 'lineposition' property is a flaglist and may be specified + as a string containing: + - Any combination of ['under', 'over', 'through'] joined with '+' characters + (e.g. 'under+over') + OR exactly one of ['none'] (e.g. 'none') + + Returns + ------- + Any + """ + return self["lineposition"] + + @lineposition.setter + def lineposition(self, val): + self["lineposition"] = val + + @property + def shadow(self): + """ + Sets the shape and color of the shadow behind text. "auto" + places minimal shadow and applies contrast text font color. See + https://developer.mozilla.org/en-US/docs/Web/CSS/text-shadow + for additional options. + + The 'shadow' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["shadow"] + + @shadow.setter + def shadow(self, val): + self["shadow"] = val + + @property + def size(self): + """ + The 'size' property is a number and may be specified as: + - An int or float in the interval [1, inf] + + Returns + ------- + int|float + """ + return self["size"] + + @size.setter + def size(self, val): + self["size"] = val + + @property + def style(self): + """ + Sets whether a font should be styled with a normal or italic + face from its family. + + The 'style' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['normal', 'italic'] + + Returns + ------- + Any + """ + return self["style"] + + @style.setter + def style(self, val): + self["style"] = val + + @property + def textcase(self): + """ + Sets capitalization of text. It can be used to make text appear + in all-uppercase or all-lowercase, or with each word + capitalized. + + The 'textcase' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['normal', 'word caps', 'upper', 'lower'] + + Returns + ------- + Any + """ + return self["textcase"] + + @textcase.setter + def textcase(self, val): + self["textcase"] = val + + @property + def variant(self): + """ + Sets the variant of the font. + + The 'variant' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['normal', 'small-caps', 'all-small-caps', + 'all-petite-caps', 'petite-caps', 'unicase'] + + Returns + ------- + Any + """ + return self["variant"] + + @variant.setter + def variant(self, val): + self["variant"] = val + + @property + def weight(self): + """ + Sets the weight (or boldness) of the font. + + The 'weight' property is a integer and may be specified as: + - An int (or float that will be cast to an int) + in the interval [1, 1000] + OR exactly one of ['normal', 'bold'] (e.g. 'bold') + + Returns + ------- + int + """ + return self["weight"] + + @weight.setter + def weight(self, val): + self["weight"] = val + + @property + def _prop_descriptions(self): + return """\ + color + + family + HTML font family - the typeface that will be applied by + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. + lineposition + Sets the kind of decoration line(s) with text, such as + an "under", "over" or "through" as well as combinations + e.g. "under+over", etc. + shadow + Sets the shape and color of the shadow behind text. + "auto" places minimal shadow and applies contrast text + font color. See https://developer.mozilla.org/en- + US/docs/Web/CSS/text-shadow for additional options. + size + + style + Sets whether a font should be styled with a normal or + italic face from its family. + textcase + Sets capitalization of text. It can be used to make + text appear in all-uppercase or all-lowercase, or with + each word capitalized. + variant + Sets the variant of the font. + weight + Sets the weight (or boldness) of the font. + """ + + def __init__( + self, + arg=None, + color=None, + family=None, + lineposition=None, + shadow=None, + size=None, + style=None, + textcase=None, + variant=None, + weight=None, + **kwargs, + ): + """ + Construct a new Font object + + Sets this color bar's title font. + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of :class:`plotly.graph_objs.barpolar.marke + r.colorbar.title.Font` + color + + family + HTML font family - the typeface that will be applied by + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. + lineposition + Sets the kind of decoration line(s) with text, such as + an "under", "over" or "through" as well as combinations + e.g. "under+over", etc. + shadow + Sets the shape and color of the shadow behind text. + "auto" places minimal shadow and applies contrast text + font color. See https://developer.mozilla.org/en- + US/docs/Web/CSS/text-shadow for additional options. + size + + style + Sets whether a font should be styled with a normal or + italic face from its family. + textcase + Sets capitalization of text. It can be used to make + text appear in all-uppercase or all-lowercase, or with + each word capitalized. + variant + Sets the variant of the font. + weight + Sets the weight (or boldness) of the font. + + Returns + ------- + Font + """ + super().__init__("font") + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + if arg is None: + arg = {} + elif isinstance(arg, self.__class__): + arg = arg.to_plotly_json() + elif isinstance(arg, dict): + arg = _copy.copy(arg) + else: + raise ValueError("""\ +The first argument to the plotly.graph_objs.barpolar.marker.colorbar.title.Font +constructor must be a dict or +an instance of :class:`plotly.graph_objs.barpolar.marker.colorbar.title.Font`""") + + self._skip_invalid = kwargs.pop("skip_invalid", False) + self._validate = kwargs.pop("_validate", True) + + self._set_property("color", arg, color) + self._set_property("family", arg, family) + self._set_property("lineposition", arg, lineposition) + self._set_property("shadow", arg, shadow) + self._set_property("size", arg, size) + self._set_property("style", arg, style) + self._set_property("textcase", arg, textcase) + self._set_property("variant", arg, variant) + self._set_property("weight", arg, weight) + self._process_kwargs(**dict(arg, **kwargs)) + self._skip_invalid = False diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/barpolar/selected/.___init__.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/barpolar/selected/.___init__.py new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/barpolar/selected/.___init__.py differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/barpolar/selected/.___pycache__ b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/barpolar/selected/.___pycache__ new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/barpolar/selected/.___pycache__ differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/barpolar/selected/.__marker.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/barpolar/selected/.__marker.py new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/barpolar/selected/.__marker.py differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/barpolar/selected/.__textfont.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/barpolar/selected/.__textfont.py new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/barpolar/selected/.__textfont.py differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/barpolar/selected/__init__.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/barpolar/selected/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..851549000c0d17cdc7711565999bb9de85ebcb65 --- /dev/null +++ b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/barpolar/selected/__init__.py @@ -0,0 +1,12 @@ +import sys +from typing import TYPE_CHECKING + +if TYPE_CHECKING: + from ._marker import Marker + from ._textfont import Textfont +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, [], ["._marker.Marker", "._textfont.Textfont"] + ) diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/barpolar/selected/_marker.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/barpolar/selected/_marker.py new file mode 100644 index 0000000000000000000000000000000000000000..ca4aba8869fb58748ab54d5669b7207d09cb20ab --- /dev/null +++ b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/barpolar/selected/_marker.py @@ -0,0 +1,104 @@ +# --- THIS FILE IS AUTO-GENERATED --- +# Modifications will be overwitten the next time code generation run. + +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Marker(_BaseTraceHierarchyType): + _parent_path_str = "barpolar.selected" + _path_str = "barpolar.selected.marker" + _valid_props = {"color", "opacity"} + + @property + def color(self): + """ + Sets the marker color of selected points. + + The 'color' property is a color and may be specified as: + - A hex string (e.g. '#ff0000') + - An rgb/rgba string (e.g. 'rgb(255,0,0)') + - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') + - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') + - A named CSS color: see https://plotly.com/python/css-colors/ for a list + + Returns + ------- + str + """ + return self["color"] + + @color.setter + def color(self, val): + self["color"] = val + + @property + def opacity(self): + """ + Sets the marker opacity of selected points. + + The 'opacity' property is a number and may be specified as: + - An int or float in the interval [0, 1] + + Returns + ------- + int|float + """ + return self["opacity"] + + @opacity.setter + def opacity(self, val): + self["opacity"] = val + + @property + def _prop_descriptions(self): + return """\ + color + Sets the marker color of selected points. + opacity + Sets the marker opacity of selected points. + """ + + def __init__(self, arg=None, color=None, opacity=None, **kwargs): + """ + Construct a new Marker object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.barpolar.selected.Marker` + color + Sets the marker color of selected points. + opacity + Sets the marker opacity of selected points. + + Returns + ------- + Marker + """ + super().__init__("marker") + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + if arg is None: + arg = {} + elif isinstance(arg, self.__class__): + arg = arg.to_plotly_json() + elif isinstance(arg, dict): + arg = _copy.copy(arg) + else: + raise ValueError("""\ +The first argument to the plotly.graph_objs.barpolar.selected.Marker +constructor must be a dict or +an instance of :class:`plotly.graph_objs.barpolar.selected.Marker`""") + + self._skip_invalid = kwargs.pop("skip_invalid", False) + self._validate = kwargs.pop("_validate", True) + + self._set_property("color", arg, color) + self._set_property("opacity", arg, opacity) + self._process_kwargs(**dict(arg, **kwargs)) + self._skip_invalid = False diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/barpolar/selected/_textfont.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/barpolar/selected/_textfont.py new file mode 100644 index 0000000000000000000000000000000000000000..111a9ff78efb140f1f09d33002b2c60c26ae0d3d --- /dev/null +++ b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/barpolar/selected/_textfont.py @@ -0,0 +1,81 @@ +# --- THIS FILE IS AUTO-GENERATED --- +# Modifications will be overwitten the next time code generation run. + +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Textfont(_BaseTraceHierarchyType): + _parent_path_str = "barpolar.selected" + _path_str = "barpolar.selected.textfont" + _valid_props = {"color"} + + @property + def color(self): + """ + Sets the text font color of selected points. + + The 'color' property is a color and may be specified as: + - A hex string (e.g. '#ff0000') + - An rgb/rgba string (e.g. 'rgb(255,0,0)') + - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') + - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') + - A named CSS color: see https://plotly.com/python/css-colors/ for a list + + Returns + ------- + str + """ + return self["color"] + + @color.setter + def color(self, val): + self["color"] = val + + @property + def _prop_descriptions(self): + return """\ + color + Sets the text font color of selected points. + """ + + def __init__(self, arg=None, color=None, **kwargs): + """ + Construct a new Textfont object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.barpolar.selected.Textfont` + color + Sets the text font color of selected points. + + Returns + ------- + Textfont + """ + super().__init__("textfont") + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + if arg is None: + arg = {} + elif isinstance(arg, self.__class__): + arg = arg.to_plotly_json() + elif isinstance(arg, dict): + arg = _copy.copy(arg) + else: + raise ValueError("""\ +The first argument to the plotly.graph_objs.barpolar.selected.Textfont +constructor must be a dict or +an instance of :class:`plotly.graph_objs.barpolar.selected.Textfont`""") + + self._skip_invalid = kwargs.pop("skip_invalid", False) + self._validate = kwargs.pop("_validate", True) + + self._set_property("color", arg, color) + self._process_kwargs(**dict(arg, **kwargs)) + self._skip_invalid = False diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/barpolar/unselected/.___init__.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/barpolar/unselected/.___init__.py new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/barpolar/unselected/.___init__.py differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/barpolar/unselected/.___pycache__ b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/barpolar/unselected/.___pycache__ new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/barpolar/unselected/.___pycache__ differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/barpolar/unselected/.__marker.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/barpolar/unselected/.__marker.py new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/barpolar/unselected/.__marker.py differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/barpolar/unselected/.__textfont.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/barpolar/unselected/.__textfont.py new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/barpolar/unselected/.__textfont.py differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/barpolar/unselected/__init__.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/barpolar/unselected/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..851549000c0d17cdc7711565999bb9de85ebcb65 --- /dev/null +++ b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/barpolar/unselected/__init__.py @@ -0,0 +1,12 @@ +import sys +from typing import TYPE_CHECKING + +if TYPE_CHECKING: + from ._marker import Marker + from ._textfont import Textfont +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, [], ["._marker.Marker", "._textfont.Textfont"] + ) diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/barpolar/unselected/_marker.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/barpolar/unselected/_marker.py new file mode 100644 index 0000000000000000000000000000000000000000..85e314bfd20738963ef2d6e7582cdb81432fe1e9 --- /dev/null +++ b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/barpolar/unselected/_marker.py @@ -0,0 +1,110 @@ +# --- THIS FILE IS AUTO-GENERATED --- +# Modifications will be overwitten the next time code generation run. + +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Marker(_BaseTraceHierarchyType): + _parent_path_str = "barpolar.unselected" + _path_str = "barpolar.unselected.marker" + _valid_props = {"color", "opacity"} + + @property + def color(self): + """ + Sets the marker color of unselected points, applied only when a + selection exists. + + The 'color' property is a color and may be specified as: + - A hex string (e.g. '#ff0000') + - An rgb/rgba string (e.g. 'rgb(255,0,0)') + - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') + - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') + - A named CSS color: see https://plotly.com/python/css-colors/ for a list + + Returns + ------- + str + """ + return self["color"] + + @color.setter + def color(self, val): + self["color"] = val + + @property + def opacity(self): + """ + Sets the marker opacity of unselected points, applied only when + a selection exists. + + The 'opacity' property is a number and may be specified as: + - An int or float in the interval [0, 1] + + Returns + ------- + int|float + """ + return self["opacity"] + + @opacity.setter + def opacity(self, val): + self["opacity"] = val + + @property + def _prop_descriptions(self): + return """\ + color + Sets the marker color of unselected points, applied + only when a selection exists. + opacity + Sets the marker opacity of unselected points, applied + only when a selection exists. + """ + + def __init__(self, arg=None, color=None, opacity=None, **kwargs): + """ + Construct a new Marker object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.barpolar.unselected.Marker` + color + Sets the marker color of unselected points, applied + only when a selection exists. + opacity + Sets the marker opacity of unselected points, applied + only when a selection exists. + + Returns + ------- + Marker + """ + super().__init__("marker") + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + if arg is None: + arg = {} + elif isinstance(arg, self.__class__): + arg = arg.to_plotly_json() + elif isinstance(arg, dict): + arg = _copy.copy(arg) + else: + raise ValueError("""\ +The first argument to the plotly.graph_objs.barpolar.unselected.Marker +constructor must be a dict or +an instance of :class:`plotly.graph_objs.barpolar.unselected.Marker`""") + + self._skip_invalid = kwargs.pop("skip_invalid", False) + self._validate = kwargs.pop("_validate", True) + + self._set_property("color", arg, color) + self._set_property("opacity", arg, opacity) + self._process_kwargs(**dict(arg, **kwargs)) + self._skip_invalid = False diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/barpolar/unselected/_textfont.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/barpolar/unselected/_textfont.py new file mode 100644 index 0000000000000000000000000000000000000000..41ad2f2e23db2402ef6e2d6b9297596fb7d7d9a9 --- /dev/null +++ b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/barpolar/unselected/_textfont.py @@ -0,0 +1,84 @@ +# --- THIS FILE IS AUTO-GENERATED --- +# Modifications will be overwitten the next time code generation run. + +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Textfont(_BaseTraceHierarchyType): + _parent_path_str = "barpolar.unselected" + _path_str = "barpolar.unselected.textfont" + _valid_props = {"color"} + + @property + def color(self): + """ + Sets the text font color of unselected points, applied only + when a selection exists. + + The 'color' property is a color and may be specified as: + - A hex string (e.g. '#ff0000') + - An rgb/rgba string (e.g. 'rgb(255,0,0)') + - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') + - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') + - A named CSS color: see https://plotly.com/python/css-colors/ for a list + + Returns + ------- + str + """ + return self["color"] + + @color.setter + def color(self, val): + self["color"] = val + + @property + def _prop_descriptions(self): + return """\ + color + Sets the text font color of unselected points, applied + only when a selection exists. + """ + + def __init__(self, arg=None, color=None, **kwargs): + """ + Construct a new Textfont object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.barpolar.unselected.Textfont` + color + Sets the text font color of unselected points, applied + only when a selection exists. + + Returns + ------- + Textfont + """ + super().__init__("textfont") + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + if arg is None: + arg = {} + elif isinstance(arg, self.__class__): + arg = arg.to_plotly_json() + elif isinstance(arg, dict): + arg = _copy.copy(arg) + else: + raise ValueError("""\ +The first argument to the plotly.graph_objs.barpolar.unselected.Textfont +constructor must be a dict or +an instance of :class:`plotly.graph_objs.barpolar.unselected.Textfont`""") + + self._skip_invalid = kwargs.pop("skip_invalid", False) + self._validate = kwargs.pop("_validate", True) + + self._set_property("color", arg, color) + self._process_kwargs(**dict(arg, **kwargs)) + self._skip_invalid = False diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/box/.___init__.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/box/.___init__.py new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/box/.___init__.py differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/box/.___pycache__ b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/box/.___pycache__ new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/box/.___pycache__ differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/box/.__hoverlabel.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/box/.__hoverlabel.py new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/box/.__hoverlabel.py differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/box/.__legendgrouptitle.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/box/.__legendgrouptitle.py new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/box/.__legendgrouptitle.py differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/box/.__line.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/box/.__line.py new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/box/.__line.py differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/box/.__marker.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/box/.__marker.py new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/box/.__marker.py differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/box/.__selected.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/box/.__selected.py new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/box/.__selected.py differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/box/.__stream.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/box/.__stream.py new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/box/.__stream.py differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/box/.__unselected.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/box/.__unselected.py new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/box/.__unselected.py differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/box/._hoverlabel b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/box/._hoverlabel new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/box/._hoverlabel differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/box/._legendgrouptitle b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/box/._legendgrouptitle new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/box/._legendgrouptitle differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/box/._marker b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/box/._marker new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/box/._marker differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/box/._selected b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/box/._selected new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/box/._selected differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/box/._unselected b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/box/._unselected new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/box/._unselected differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/box/__init__.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/box/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..f9bb46ff8ab9cacf4311ed515d569df1e55c7978 --- /dev/null +++ b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/box/__init__.py @@ -0,0 +1,32 @@ +import sys +from typing import TYPE_CHECKING + +if TYPE_CHECKING: + from ._hoverlabel import Hoverlabel + from ._legendgrouptitle import Legendgrouptitle + from ._line import Line + from ._marker import Marker + from ._selected import Selected + from ._stream import Stream + from ._unselected import Unselected + from . import hoverlabel + from . import legendgrouptitle + from . import marker + from . import selected + from . import unselected +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [".hoverlabel", ".legendgrouptitle", ".marker", ".selected", ".unselected"], + [ + "._hoverlabel.Hoverlabel", + "._legendgrouptitle.Legendgrouptitle", + "._line.Line", + "._marker.Marker", + "._selected.Selected", + "._stream.Stream", + "._unselected.Unselected", + ], + ) diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/box/_hoverlabel.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/box/_hoverlabel.py new file mode 100644 index 0000000000000000000000000000000000000000..6955298406e7ce5769a35af754bead5449435e62 --- /dev/null +++ b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/box/_hoverlabel.py @@ -0,0 +1,366 @@ +# --- THIS FILE IS AUTO-GENERATED --- +# Modifications will be overwitten the next time code generation run. + +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Hoverlabel(_BaseTraceHierarchyType): + _parent_path_str = "box" + _path_str = "box.hoverlabel" + _valid_props = { + "align", + "alignsrc", + "bgcolor", + "bgcolorsrc", + "bordercolor", + "bordercolorsrc", + "font", + "namelength", + "namelengthsrc", + "showarrow", + } + + @property + def align(self): + """ + Sets the horizontal alignment of the text content within hover + label box. Has an effect only if the hover label text spans + more two or more lines + + The 'align' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['left', 'right', 'auto'] + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + Any|numpy.ndarray + """ + return self["align"] + + @align.setter + def align(self, val): + self["align"] = val + + @property + def alignsrc(self): + """ + Sets the source reference on Chart Studio Cloud for `align`. + + The 'alignsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["alignsrc"] + + @alignsrc.setter + def alignsrc(self, val): + self["alignsrc"] = val + + @property + def bgcolor(self): + """ + Sets the background color of the hover labels for this trace + + The 'bgcolor' property is a color and may be specified as: + - A hex string (e.g. '#ff0000') + - An rgb/rgba string (e.g. 'rgb(255,0,0)') + - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') + - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') + - A named CSS color: see https://plotly.com/python/css-colors/ for a list + - A list or array of any of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["bgcolor"] + + @bgcolor.setter + def bgcolor(self, val): + self["bgcolor"] = val + + @property + def bgcolorsrc(self): + """ + Sets the source reference on Chart Studio Cloud for `bgcolor`. + + The 'bgcolorsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["bgcolorsrc"] + + @bgcolorsrc.setter + def bgcolorsrc(self, val): + self["bgcolorsrc"] = val + + @property + def bordercolor(self): + """ + Sets the border color of the hover labels for this trace. + + The 'bordercolor' property is a color and may be specified as: + - A hex string (e.g. '#ff0000') + - An rgb/rgba string (e.g. 'rgb(255,0,0)') + - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') + - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') + - A named CSS color: see https://plotly.com/python/css-colors/ for a list + - A list or array of any of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["bordercolor"] + + @bordercolor.setter + def bordercolor(self, val): + self["bordercolor"] = val + + @property + def bordercolorsrc(self): + """ + Sets the source reference on Chart Studio Cloud for + `bordercolor`. + + The 'bordercolorsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["bordercolorsrc"] + + @bordercolorsrc.setter + def bordercolorsrc(self, val): + self["bordercolorsrc"] = val + + @property + def font(self): + """ + Sets the font used in hover labels. + + The 'font' property is an instance of Font + that may be specified as: + - An instance of :class:`plotly.graph_objs.box.hoverlabel.Font` + - A dict of string/value properties that will be passed + to the Font constructor + + Returns + ------- + plotly.graph_objs.box.hoverlabel.Font + """ + return self["font"] + + @font.setter + def font(self, val): + self["font"] = val + + @property + def namelength(self): + """ + Sets the default length (in number of characters) of the trace + name in the hover labels for all traces. -1 shows the whole + name regardless of length. 0-3 shows the first 0-3 characters, + and an integer >3 will show the whole name if it is less than + that many characters, but if it is longer, will truncate to + `namelength - 3` characters and add an ellipsis. + + The 'namelength' property is a integer and may be specified as: + - An int (or float that will be cast to an int) + in the interval [-1, 9223372036854775807] + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + int|numpy.ndarray + """ + return self["namelength"] + + @namelength.setter + def namelength(self, val): + self["namelength"] = val + + @property + def namelengthsrc(self): + """ + Sets the source reference on Chart Studio Cloud for + `namelength`. + + The 'namelengthsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["namelengthsrc"] + + @namelengthsrc.setter + def namelengthsrc(self, val): + self["namelengthsrc"] = val + + @property + def showarrow(self): + """ + Sets whether or not to show the hover label arrow/triangle + pointing to the data point. + + The 'showarrow' property is a boolean and must be specified as: + - A boolean value: True or False + + Returns + ------- + bool + """ + return self["showarrow"] + + @showarrow.setter + def showarrow(self, val): + self["showarrow"] = val + + @property + def _prop_descriptions(self): + return """\ + align + Sets the horizontal alignment of the text content + within hover label box. Has an effect only if the hover + label text spans more two or more lines + alignsrc + Sets the source reference on Chart Studio Cloud for + `align`. + bgcolor + Sets the background color of the hover labels for this + trace + bgcolorsrc + Sets the source reference on Chart Studio Cloud for + `bgcolor`. + bordercolor + Sets the border color of the hover labels for this + trace. + bordercolorsrc + Sets the source reference on Chart Studio Cloud for + `bordercolor`. + font + Sets the font used in hover labels. + namelength + Sets the default length (in number of characters) of + the trace name in the hover labels for all traces. -1 + shows the whole name regardless of length. 0-3 shows + the first 0-3 characters, and an integer >3 will show + the whole name if it is less than that many characters, + but if it is longer, will truncate to `namelength - 3` + characters and add an ellipsis. + namelengthsrc + Sets the source reference on Chart Studio Cloud for + `namelength`. + showarrow + Sets whether or not to show the hover label + arrow/triangle pointing to the data point. + """ + + def __init__( + self, + arg=None, + align=None, + alignsrc=None, + bgcolor=None, + bgcolorsrc=None, + bordercolor=None, + bordercolorsrc=None, + font=None, + namelength=None, + namelengthsrc=None, + showarrow=None, + **kwargs, + ): + """ + Construct a new Hoverlabel object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.box.Hoverlabel` + align + Sets the horizontal alignment of the text content + within hover label box. Has an effect only if the hover + label text spans more two or more lines + alignsrc + Sets the source reference on Chart Studio Cloud for + `align`. + bgcolor + Sets the background color of the hover labels for this + trace + bgcolorsrc + Sets the source reference on Chart Studio Cloud for + `bgcolor`. + bordercolor + Sets the border color of the hover labels for this + trace. + bordercolorsrc + Sets the source reference on Chart Studio Cloud for + `bordercolor`. + font + Sets the font used in hover labels. + namelength + Sets the default length (in number of characters) of + the trace name in the hover labels for all traces. -1 + shows the whole name regardless of length. 0-3 shows + the first 0-3 characters, and an integer >3 will show + the whole name if it is less than that many characters, + but if it is longer, will truncate to `namelength - 3` + characters and add an ellipsis. + namelengthsrc + Sets the source reference on Chart Studio Cloud for + `namelength`. + showarrow + Sets whether or not to show the hover label + arrow/triangle pointing to the data point. + + Returns + ------- + Hoverlabel + """ + super().__init__("hoverlabel") + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + if arg is None: + arg = {} + elif isinstance(arg, self.__class__): + arg = arg.to_plotly_json() + elif isinstance(arg, dict): + arg = _copy.copy(arg) + else: + raise ValueError("""\ +The first argument to the plotly.graph_objs.box.Hoverlabel +constructor must be a dict or +an instance of :class:`plotly.graph_objs.box.Hoverlabel`""") + + self._skip_invalid = kwargs.pop("skip_invalid", False) + self._validate = kwargs.pop("_validate", True) + + self._set_property("align", arg, align) + self._set_property("alignsrc", arg, alignsrc) + self._set_property("bgcolor", arg, bgcolor) + self._set_property("bgcolorsrc", arg, bgcolorsrc) + self._set_property("bordercolor", arg, bordercolor) + self._set_property("bordercolorsrc", arg, bordercolorsrc) + self._set_property("font", arg, font) + self._set_property("namelength", arg, namelength) + self._set_property("namelengthsrc", arg, namelengthsrc) + self._set_property("showarrow", arg, showarrow) + self._process_kwargs(**dict(arg, **kwargs)) + self._skip_invalid = False diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/box/_legendgrouptitle.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/box/_legendgrouptitle.py new file mode 100644 index 0000000000000000000000000000000000000000..a2c2541baecd17856bb10308c81f6082cfda9891 --- /dev/null +++ b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/box/_legendgrouptitle.py @@ -0,0 +1,104 @@ +# --- THIS FILE IS AUTO-GENERATED --- +# Modifications will be overwitten the next time code generation run. + +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Legendgrouptitle(_BaseTraceHierarchyType): + _parent_path_str = "box" + _path_str = "box.legendgrouptitle" + _valid_props = {"font", "text"} + + @property + def font(self): + """ + Sets this legend group's title font. + + The 'font' property is an instance of Font + that may be specified as: + - An instance of :class:`plotly.graph_objs.box.legendgrouptitle.Font` + - A dict of string/value properties that will be passed + to the Font constructor + + Returns + ------- + plotly.graph_objs.box.legendgrouptitle.Font + """ + return self["font"] + + @font.setter + def font(self, val): + self["font"] = val + + @property + def text(self): + """ + Sets the title of the legend group. + + The 'text' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["text"] + + @text.setter + def text(self, val): + self["text"] = val + + @property + def _prop_descriptions(self): + return """\ + font + Sets this legend group's title font. + text + Sets the title of the legend group. + """ + + def __init__(self, arg=None, font=None, text=None, **kwargs): + """ + Construct a new Legendgrouptitle object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.box.Legendgrouptitle` + font + Sets this legend group's title font. + text + Sets the title of the legend group. + + Returns + ------- + Legendgrouptitle + """ + super().__init__("legendgrouptitle") + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + if arg is None: + arg = {} + elif isinstance(arg, self.__class__): + arg = arg.to_plotly_json() + elif isinstance(arg, dict): + arg = _copy.copy(arg) + else: + raise ValueError("""\ +The first argument to the plotly.graph_objs.box.Legendgrouptitle +constructor must be a dict or +an instance of :class:`plotly.graph_objs.box.Legendgrouptitle`""") + + self._skip_invalid = kwargs.pop("skip_invalid", False) + self._validate = kwargs.pop("_validate", True) + + self._set_property("font", arg, font) + self._set_property("text", arg, text) + self._process_kwargs(**dict(arg, **kwargs)) + self._skip_invalid = False diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/box/_line.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/box/_line.py new file mode 100644 index 0000000000000000000000000000000000000000..4887c7e2517ba0b3c3661d939a8f09ba0a654076 --- /dev/null +++ b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/box/_line.py @@ -0,0 +1,103 @@ +# --- THIS FILE IS AUTO-GENERATED --- +# Modifications will be overwitten the next time code generation run. + +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Line(_BaseTraceHierarchyType): + _parent_path_str = "box" + _path_str = "box.line" + _valid_props = {"color", "width"} + + @property + def color(self): + """ + Sets the color of line bounding the box(es). + + The 'color' property is a color and may be specified as: + - A hex string (e.g. '#ff0000') + - An rgb/rgba string (e.g. 'rgb(255,0,0)') + - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') + - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') + - A named CSS color: see https://plotly.com/python/css-colors/ for a list + + Returns + ------- + str + """ + return self["color"] + + @color.setter + def color(self, val): + self["color"] = val + + @property + def width(self): + """ + Sets the width (in px) of line bounding the box(es). + + The 'width' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["width"] + + @width.setter + def width(self, val): + self["width"] = val + + @property + def _prop_descriptions(self): + return """\ + color + Sets the color of line bounding the box(es). + width + Sets the width (in px) of line bounding the box(es). + """ + + def __init__(self, arg=None, color=None, width=None, **kwargs): + """ + Construct a new Line object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of :class:`plotly.graph_objs.box.Line` + color + Sets the color of line bounding the box(es). + width + Sets the width (in px) of line bounding the box(es). + + Returns + ------- + Line + """ + super().__init__("line") + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + if arg is None: + arg = {} + elif isinstance(arg, self.__class__): + arg = arg.to_plotly_json() + elif isinstance(arg, dict): + arg = _copy.copy(arg) + else: + raise ValueError("""\ +The first argument to the plotly.graph_objs.box.Line +constructor must be a dict or +an instance of :class:`plotly.graph_objs.box.Line`""") + + self._skip_invalid = kwargs.pop("skip_invalid", False) + self._validate = kwargs.pop("_validate", True) + + self._set_property("color", arg, color) + self._set_property("width", arg, width) + self._process_kwargs(**dict(arg, **kwargs)) + self._skip_invalid = False diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/box/_marker.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/box/_marker.py new file mode 100644 index 0000000000000000000000000000000000000000..eaf4f80d4f0aa60d98223ee8a33d4a8c3b9a9fb8 --- /dev/null +++ b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/box/_marker.py @@ -0,0 +1,357 @@ +# --- THIS FILE IS AUTO-GENERATED --- +# Modifications will be overwitten the next time code generation run. + +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Marker(_BaseTraceHierarchyType): + _parent_path_str = "box" + _path_str = "box.marker" + _valid_props = { + "angle", + "color", + "line", + "opacity", + "outliercolor", + "size", + "symbol", + } + + @property + def angle(self): + """ + Sets the marker angle in respect to `angleref`. + + The 'angle' property is a angle (in degrees) that may be + specified as a number between -180 and 180. + Numeric values outside this range are converted to the equivalent value + (e.g. 270 is converted to -90). + + Returns + ------- + int|float + """ + return self["angle"] + + @angle.setter + def angle(self, val): + self["angle"] = val + + @property + def color(self): + """ + Sets the marker color. It accepts either a specific color or an + array of numbers that are mapped to the colorscale relative to + the max and min values of the array or relative to + `marker.cmin` and `marker.cmax` if set. + + The 'color' property is a color and may be specified as: + - A hex string (e.g. '#ff0000') + - An rgb/rgba string (e.g. 'rgb(255,0,0)') + - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') + - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') + - A named CSS color: see https://plotly.com/python/css-colors/ for a list + + Returns + ------- + str + """ + return self["color"] + + @color.setter + def color(self, val): + self["color"] = val + + @property + def line(self): + """ + The 'line' property is an instance of Line + that may be specified as: + - An instance of :class:`plotly.graph_objs.box.marker.Line` + - A dict of string/value properties that will be passed + to the Line constructor + + Returns + ------- + plotly.graph_objs.box.marker.Line + """ + return self["line"] + + @line.setter + def line(self, val): + self["line"] = val + + @property + def opacity(self): + """ + Sets the marker opacity. + + The 'opacity' property is a number and may be specified as: + - An int or float in the interval [0, 1] + + Returns + ------- + int|float + """ + return self["opacity"] + + @opacity.setter + def opacity(self, val): + self["opacity"] = val + + @property + def outliercolor(self): + """ + Sets the color of the outlier sample points. + + The 'outliercolor' property is a color and may be specified as: + - A hex string (e.g. '#ff0000') + - An rgb/rgba string (e.g. 'rgb(255,0,0)') + - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') + - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') + - A named CSS color: see https://plotly.com/python/css-colors/ for a list + + Returns + ------- + str + """ + return self["outliercolor"] + + @outliercolor.setter + def outliercolor(self, val): + self["outliercolor"] = val + + @property + def size(self): + """ + Sets the marker size (in px). + + The 'size' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["size"] + + @size.setter + def size(self, val): + self["size"] = val + + @property + def symbol(self): + """ + Sets the marker symbol type. Adding 100 is equivalent to + appending "-open" to a symbol name. Adding 200 is equivalent to + appending "-dot" to a symbol name. Adding 300 is equivalent to + appending "-open-dot" or "dot-open" to a symbol name. + + The 'symbol' property is an enumeration that may be specified as: + - One of the following enumeration values: + [0, '0', 'circle', 100, '100', 'circle-open', 200, '200', + 'circle-dot', 300, '300', 'circle-open-dot', 1, '1', + 'square', 101, '101', 'square-open', 201, '201', + 'square-dot', 301, '301', 'square-open-dot', 2, '2', + 'diamond', 102, '102', 'diamond-open', 202, '202', + 'diamond-dot', 302, '302', 'diamond-open-dot', 3, '3', + 'cross', 103, '103', 'cross-open', 203, '203', + 'cross-dot', 303, '303', 'cross-open-dot', 4, '4', 'x', + 104, '104', 'x-open', 204, '204', 'x-dot', 304, '304', + 'x-open-dot', 5, '5', 'triangle-up', 105, '105', + 'triangle-up-open', 205, '205', 'triangle-up-dot', 305, + '305', 'triangle-up-open-dot', 6, '6', 'triangle-down', + 106, '106', 'triangle-down-open', 206, '206', + 'triangle-down-dot', 306, '306', 'triangle-down-open-dot', + 7, '7', 'triangle-left', 107, '107', 'triangle-left-open', + 207, '207', 'triangle-left-dot', 307, '307', + 'triangle-left-open-dot', 8, '8', 'triangle-right', 108, + '108', 'triangle-right-open', 208, '208', + 'triangle-right-dot', 308, '308', + 'triangle-right-open-dot', 9, '9', 'triangle-ne', 109, + '109', 'triangle-ne-open', 209, '209', 'triangle-ne-dot', + 309, '309', 'triangle-ne-open-dot', 10, '10', + 'triangle-se', 110, '110', 'triangle-se-open', 210, '210', + 'triangle-se-dot', 310, '310', 'triangle-se-open-dot', 11, + '11', 'triangle-sw', 111, '111', 'triangle-sw-open', 211, + '211', 'triangle-sw-dot', 311, '311', + 'triangle-sw-open-dot', 12, '12', 'triangle-nw', 112, + '112', 'triangle-nw-open', 212, '212', 'triangle-nw-dot', + 312, '312', 'triangle-nw-open-dot', 13, '13', 'pentagon', + 113, '113', 'pentagon-open', 213, '213', 'pentagon-dot', + 313, '313', 'pentagon-open-dot', 14, '14', 'hexagon', 114, + '114', 'hexagon-open', 214, '214', 'hexagon-dot', 314, + '314', 'hexagon-open-dot', 15, '15', 'hexagon2', 115, + '115', 'hexagon2-open', 215, '215', 'hexagon2-dot', 315, + '315', 'hexagon2-open-dot', 16, '16', 'octagon', 116, + '116', 'octagon-open', 216, '216', 'octagon-dot', 316, + '316', 'octagon-open-dot', 17, '17', 'star', 117, '117', + 'star-open', 217, '217', 'star-dot', 317, '317', + 'star-open-dot', 18, '18', 'hexagram', 118, '118', + 'hexagram-open', 218, '218', 'hexagram-dot', 318, '318', + 'hexagram-open-dot', 19, '19', 'star-triangle-up', 119, + '119', 'star-triangle-up-open', 219, '219', + 'star-triangle-up-dot', 319, '319', + 'star-triangle-up-open-dot', 20, '20', + 'star-triangle-down', 120, '120', + 'star-triangle-down-open', 220, '220', + 'star-triangle-down-dot', 320, '320', + 'star-triangle-down-open-dot', 21, '21', 'star-square', + 121, '121', 'star-square-open', 221, '221', + 'star-square-dot', 321, '321', 'star-square-open-dot', 22, + '22', 'star-diamond', 122, '122', 'star-diamond-open', + 222, '222', 'star-diamond-dot', 322, '322', + 'star-diamond-open-dot', 23, '23', 'diamond-tall', 123, + '123', 'diamond-tall-open', 223, '223', + 'diamond-tall-dot', 323, '323', 'diamond-tall-open-dot', + 24, '24', 'diamond-wide', 124, '124', 'diamond-wide-open', + 224, '224', 'diamond-wide-dot', 324, '324', + 'diamond-wide-open-dot', 25, '25', 'hourglass', 125, + '125', 'hourglass-open', 26, '26', 'bowtie', 126, '126', + 'bowtie-open', 27, '27', 'circle-cross', 127, '127', + 'circle-cross-open', 28, '28', 'circle-x', 128, '128', + 'circle-x-open', 29, '29', 'square-cross', 129, '129', + 'square-cross-open', 30, '30', 'square-x', 130, '130', + 'square-x-open', 31, '31', 'diamond-cross', 131, '131', + 'diamond-cross-open', 32, '32', 'diamond-x', 132, '132', + 'diamond-x-open', 33, '33', 'cross-thin', 133, '133', + 'cross-thin-open', 34, '34', 'x-thin', 134, '134', + 'x-thin-open', 35, '35', 'asterisk', 135, '135', + 'asterisk-open', 36, '36', 'hash', 136, '136', + 'hash-open', 236, '236', 'hash-dot', 336, '336', + 'hash-open-dot', 37, '37', 'y-up', 137, '137', + 'y-up-open', 38, '38', 'y-down', 138, '138', + 'y-down-open', 39, '39', 'y-left', 139, '139', + 'y-left-open', 40, '40', 'y-right', 140, '140', + 'y-right-open', 41, '41', 'line-ew', 141, '141', + 'line-ew-open', 42, '42', 'line-ns', 142, '142', + 'line-ns-open', 43, '43', 'line-ne', 143, '143', + 'line-ne-open', 44, '44', 'line-nw', 144, '144', + 'line-nw-open', 45, '45', 'arrow-up', 145, '145', + 'arrow-up-open', 46, '46', 'arrow-down', 146, '146', + 'arrow-down-open', 47, '47', 'arrow-left', 147, '147', + 'arrow-left-open', 48, '48', 'arrow-right', 148, '148', + 'arrow-right-open', 49, '49', 'arrow-bar-up', 149, '149', + 'arrow-bar-up-open', 50, '50', 'arrow-bar-down', 150, + '150', 'arrow-bar-down-open', 51, '51', 'arrow-bar-left', + 151, '151', 'arrow-bar-left-open', 52, '52', + 'arrow-bar-right', 152, '152', 'arrow-bar-right-open', 53, + '53', 'arrow', 153, '153', 'arrow-open', 54, '54', + 'arrow-wide', 154, '154', 'arrow-wide-open'] + + Returns + ------- + Any + """ + return self["symbol"] + + @symbol.setter + def symbol(self, val): + self["symbol"] = val + + @property + def _prop_descriptions(self): + return """\ + angle + Sets the marker angle in respect to `angleref`. + color + Sets the marker color. It accepts either a specific + color or an array of numbers that are mapped to the + colorscale relative to the max and min values of the + array or relative to `marker.cmin` and `marker.cmax` if + set. + line + :class:`plotly.graph_objects.box.marker.Line` instance + or dict with compatible properties + opacity + Sets the marker opacity. + outliercolor + Sets the color of the outlier sample points. + size + Sets the marker size (in px). + symbol + Sets the marker symbol type. Adding 100 is equivalent + to appending "-open" to a symbol name. Adding 200 is + equivalent to appending "-dot" to a symbol name. Adding + 300 is equivalent to appending "-open-dot" or "dot- + open" to a symbol name. + """ + + def __init__( + self, + arg=None, + angle=None, + color=None, + line=None, + opacity=None, + outliercolor=None, + size=None, + symbol=None, + **kwargs, + ): + """ + Construct a new Marker object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of :class:`plotly.graph_objs.box.Marker` + angle + Sets the marker angle in respect to `angleref`. + color + Sets the marker color. It accepts either a specific + color or an array of numbers that are mapped to the + colorscale relative to the max and min values of the + array or relative to `marker.cmin` and `marker.cmax` if + set. + line + :class:`plotly.graph_objects.box.marker.Line` instance + or dict with compatible properties + opacity + Sets the marker opacity. + outliercolor + Sets the color of the outlier sample points. + size + Sets the marker size (in px). + symbol + Sets the marker symbol type. Adding 100 is equivalent + to appending "-open" to a symbol name. Adding 200 is + equivalent to appending "-dot" to a symbol name. Adding + 300 is equivalent to appending "-open-dot" or "dot- + open" to a symbol name. + + Returns + ------- + Marker + """ + super().__init__("marker") + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + if arg is None: + arg = {} + elif isinstance(arg, self.__class__): + arg = arg.to_plotly_json() + elif isinstance(arg, dict): + arg = _copy.copy(arg) + else: + raise ValueError("""\ +The first argument to the plotly.graph_objs.box.Marker +constructor must be a dict or +an instance of :class:`plotly.graph_objs.box.Marker`""") + + self._skip_invalid = kwargs.pop("skip_invalid", False) + self._validate = kwargs.pop("_validate", True) + + self._set_property("angle", arg, angle) + self._set_property("color", arg, color) + self._set_property("line", arg, line) + self._set_property("opacity", arg, opacity) + self._set_property("outliercolor", arg, outliercolor) + self._set_property("size", arg, size) + self._set_property("symbol", arg, symbol) + self._process_kwargs(**dict(arg, **kwargs)) + self._skip_invalid = False diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/box/_selected.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/box/_selected.py new file mode 100644 index 0000000000000000000000000000000000000000..cb94773b85a8ea6eafc262cd3e560f537dcb0d35 --- /dev/null +++ b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/box/_selected.py @@ -0,0 +1,79 @@ +# --- THIS FILE IS AUTO-GENERATED --- +# Modifications will be overwitten the next time code generation run. + +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Selected(_BaseTraceHierarchyType): + _parent_path_str = "box" + _path_str = "box.selected" + _valid_props = {"marker"} + + @property + def marker(self): + """ + The 'marker' property is an instance of Marker + that may be specified as: + - An instance of :class:`plotly.graph_objs.box.selected.Marker` + - A dict of string/value properties that will be passed + to the Marker constructor + + Returns + ------- + plotly.graph_objs.box.selected.Marker + """ + return self["marker"] + + @marker.setter + def marker(self, val): + self["marker"] = val + + @property + def _prop_descriptions(self): + return """\ + marker + :class:`plotly.graph_objects.box.selected.Marker` + instance or dict with compatible properties + """ + + def __init__(self, arg=None, marker=None, **kwargs): + """ + Construct a new Selected object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of :class:`plotly.graph_objs.box.Selected` + marker + :class:`plotly.graph_objects.box.selected.Marker` + instance or dict with compatible properties + + Returns + ------- + Selected + """ + super().__init__("selected") + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + if arg is None: + arg = {} + elif isinstance(arg, self.__class__): + arg = arg.to_plotly_json() + elif isinstance(arg, dict): + arg = _copy.copy(arg) + else: + raise ValueError("""\ +The first argument to the plotly.graph_objs.box.Selected +constructor must be a dict or +an instance of :class:`plotly.graph_objs.box.Selected`""") + + self._skip_invalid = kwargs.pop("skip_invalid", False) + self._validate = kwargs.pop("_validate", True) + + self._set_property("marker", arg, marker) + self._process_kwargs(**dict(arg, **kwargs)) + self._skip_invalid = False diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/box/_stream.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/box/_stream.py new file mode 100644 index 0000000000000000000000000000000000000000..b6cd0eb667cd9113dee3ce795baa8073ab138e29 --- /dev/null +++ b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/box/_stream.py @@ -0,0 +1,113 @@ +# --- THIS FILE IS AUTO-GENERATED --- +# Modifications will be overwitten the next time code generation run. + +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Stream(_BaseTraceHierarchyType): + _parent_path_str = "box" + _path_str = "box.stream" + _valid_props = {"maxpoints", "token"} + + @property + def maxpoints(self): + """ + Sets the maximum number of points to keep on the plots from an + incoming stream. If `maxpoints` is set to 50, only the newest + 50 points will be displayed on the plot. + + The 'maxpoints' property is a number and may be specified as: + - An int or float in the interval [0, 10000] + + Returns + ------- + int|float + """ + return self["maxpoints"] + + @maxpoints.setter + def maxpoints(self, val): + self["maxpoints"] = val + + @property + def token(self): + """ + The stream id number links a data trace on a plot with a + stream. See https://chart-studio.plotly.com/settings for more + details. + + The 'token' property is a string and must be specified as: + - A non-empty string + + Returns + ------- + str + """ + return self["token"] + + @token.setter + def token(self, val): + self["token"] = val + + @property + def _prop_descriptions(self): + return """\ + maxpoints + Sets the maximum number of points to keep on the plots + from an incoming stream. If `maxpoints` is set to 50, + only the newest 50 points will be displayed on the + plot. + token + The stream id number links a data trace on a plot with + a stream. See https://chart-studio.plotly.com/settings + for more details. + """ + + def __init__(self, arg=None, maxpoints=None, token=None, **kwargs): + """ + Construct a new Stream object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of :class:`plotly.graph_objs.box.Stream` + maxpoints + Sets the maximum number of points to keep on the plots + from an incoming stream. If `maxpoints` is set to 50, + only the newest 50 points will be displayed on the + plot. + token + The stream id number links a data trace on a plot with + a stream. See https://chart-studio.plotly.com/settings + for more details. + + Returns + ------- + Stream + """ + super().__init__("stream") + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + if arg is None: + arg = {} + elif isinstance(arg, self.__class__): + arg = arg.to_plotly_json() + elif isinstance(arg, dict): + arg = _copy.copy(arg) + else: + raise ValueError("""\ +The first argument to the plotly.graph_objs.box.Stream +constructor must be a dict or +an instance of :class:`plotly.graph_objs.box.Stream`""") + + self._skip_invalid = kwargs.pop("skip_invalid", False) + self._validate = kwargs.pop("_validate", True) + + self._set_property("maxpoints", arg, maxpoints) + self._set_property("token", arg, token) + self._process_kwargs(**dict(arg, **kwargs)) + self._skip_invalid = False diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/box/_unselected.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/box/_unselected.py new file mode 100644 index 0000000000000000000000000000000000000000..9db72eb4501306c8eea557bef63d6dba1817d97e --- /dev/null +++ b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/box/_unselected.py @@ -0,0 +1,80 @@ +# --- THIS FILE IS AUTO-GENERATED --- +# Modifications will be overwitten the next time code generation run. + +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Unselected(_BaseTraceHierarchyType): + _parent_path_str = "box" + _path_str = "box.unselected" + _valid_props = {"marker"} + + @property + def marker(self): + """ + The 'marker' property is an instance of Marker + that may be specified as: + - An instance of :class:`plotly.graph_objs.box.unselected.Marker` + - A dict of string/value properties that will be passed + to the Marker constructor + + Returns + ------- + plotly.graph_objs.box.unselected.Marker + """ + return self["marker"] + + @marker.setter + def marker(self, val): + self["marker"] = val + + @property + def _prop_descriptions(self): + return """\ + marker + :class:`plotly.graph_objects.box.unselected.Marker` + instance or dict with compatible properties + """ + + def __init__(self, arg=None, marker=None, **kwargs): + """ + Construct a new Unselected object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.box.Unselected` + marker + :class:`plotly.graph_objects.box.unselected.Marker` + instance or dict with compatible properties + + Returns + ------- + Unselected + """ + super().__init__("unselected") + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + if arg is None: + arg = {} + elif isinstance(arg, self.__class__): + arg = arg.to_plotly_json() + elif isinstance(arg, dict): + arg = _copy.copy(arg) + else: + raise ValueError("""\ +The first argument to the plotly.graph_objs.box.Unselected +constructor must be a dict or +an instance of :class:`plotly.graph_objs.box.Unselected`""") + + self._skip_invalid = kwargs.pop("skip_invalid", False) + self._validate = kwargs.pop("_validate", True) + + self._set_property("marker", arg, marker) + self._process_kwargs(**dict(arg, **kwargs)) + self._skip_invalid = False diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/box/hoverlabel/.___init__.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/box/hoverlabel/.___init__.py new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/box/hoverlabel/.___init__.py differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/box/hoverlabel/.___pycache__ b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/box/hoverlabel/.___pycache__ new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/box/hoverlabel/.___pycache__ differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/box/hoverlabel/.__font.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/box/hoverlabel/.__font.py new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/box/hoverlabel/.__font.py differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/box/hoverlabel/__init__.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/box/hoverlabel/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..56f600d3458c41f269053307377e9707ab13e090 --- /dev/null +++ b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/box/hoverlabel/__init__.py @@ -0,0 +1,9 @@ +import sys +from typing import TYPE_CHECKING + +if TYPE_CHECKING: + from ._font import Font +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import(__name__, [], ["._font.Font"]) diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/box/hoverlabel/_font.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/box/hoverlabel/_font.py new file mode 100644 index 0000000000000000000000000000000000000000..f4ab0af7113178d6bf25660039f093a6d6d26d2d --- /dev/null +++ b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/box/hoverlabel/_font.py @@ -0,0 +1,587 @@ +# --- THIS FILE IS AUTO-GENERATED --- +# Modifications will be overwitten the next time code generation run. + +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Font(_BaseTraceHierarchyType): + _parent_path_str = "box.hoverlabel" + _path_str = "box.hoverlabel.font" + _valid_props = { + "color", + "colorsrc", + "family", + "familysrc", + "lineposition", + "linepositionsrc", + "shadow", + "shadowsrc", + "size", + "sizesrc", + "style", + "stylesrc", + "textcase", + "textcasesrc", + "variant", + "variantsrc", + "weight", + "weightsrc", + } + + @property + def color(self): + """ + The 'color' property is a color and may be specified as: + - A hex string (e.g. '#ff0000') + - An rgb/rgba string (e.g. 'rgb(255,0,0)') + - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') + - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') + - A named CSS color: see https://plotly.com/python/css-colors/ for a list + - A list or array of any of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["color"] + + @color.setter + def color(self, val): + self["color"] = val + + @property + def colorsrc(self): + """ + Sets the source reference on Chart Studio Cloud for `color`. + + The 'colorsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["colorsrc"] + + @colorsrc.setter + def colorsrc(self, val): + self["colorsrc"] = val + + @property + def family(self): + """ + HTML font family - the typeface that will be applied by the web + browser. The web browser can only apply a font if it is + available on the system where it runs. Provide multiple font + families, separated by commas, to indicate the order in which + to apply fonts if they aren't available. + + The 'family' property is a string and must be specified as: + - A non-empty string + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["family"] + + @family.setter + def family(self, val): + self["family"] = val + + @property + def familysrc(self): + """ + Sets the source reference on Chart Studio Cloud for `family`. + + The 'familysrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["familysrc"] + + @familysrc.setter + def familysrc(self, val): + self["familysrc"] = val + + @property + def lineposition(self): + """ + Sets the kind of decoration line(s) with text, such as an + "under", "over" or "through" as well as combinations e.g. + "under+over", etc. + + The 'lineposition' property is a flaglist and may be specified + as a string containing: + - Any combination of ['under', 'over', 'through'] joined with '+' characters + (e.g. 'under+over') + OR exactly one of ['none'] (e.g. 'none') + - A list or array of the above + + Returns + ------- + Any|numpy.ndarray + """ + return self["lineposition"] + + @lineposition.setter + def lineposition(self, val): + self["lineposition"] = val + + @property + def linepositionsrc(self): + """ + Sets the source reference on Chart Studio Cloud for + `lineposition`. + + The 'linepositionsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["linepositionsrc"] + + @linepositionsrc.setter + def linepositionsrc(self, val): + self["linepositionsrc"] = val + + @property + def shadow(self): + """ + Sets the shape and color of the shadow behind text. "auto" + places minimal shadow and applies contrast text font color. See + https://developer.mozilla.org/en-US/docs/Web/CSS/text-shadow + for additional options. + + The 'shadow' property is a string and must be specified as: + - A string + - A number that will be converted to a string + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["shadow"] + + @shadow.setter + def shadow(self, val): + self["shadow"] = val + + @property + def shadowsrc(self): + """ + Sets the source reference on Chart Studio Cloud for `shadow`. + + The 'shadowsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["shadowsrc"] + + @shadowsrc.setter + def shadowsrc(self, val): + self["shadowsrc"] = val + + @property + def size(self): + """ + The 'size' property is a number and may be specified as: + - An int or float in the interval [1, inf] + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + int|float|numpy.ndarray + """ + return self["size"] + + @size.setter + def size(self, val): + self["size"] = val + + @property + def sizesrc(self): + """ + Sets the source reference on Chart Studio Cloud for `size`. + + The 'sizesrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["sizesrc"] + + @sizesrc.setter + def sizesrc(self, val): + self["sizesrc"] = val + + @property + def style(self): + """ + Sets whether a font should be styled with a normal or italic + face from its family. + + The 'style' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['normal', 'italic'] + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + Any|numpy.ndarray + """ + return self["style"] + + @style.setter + def style(self, val): + self["style"] = val + + @property + def stylesrc(self): + """ + Sets the source reference on Chart Studio Cloud for `style`. + + The 'stylesrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["stylesrc"] + + @stylesrc.setter + def stylesrc(self, val): + self["stylesrc"] = val + + @property + def textcase(self): + """ + Sets capitalization of text. It can be used to make text appear + in all-uppercase or all-lowercase, or with each word + capitalized. + + The 'textcase' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['normal', 'word caps', 'upper', 'lower'] + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + Any|numpy.ndarray + """ + return self["textcase"] + + @textcase.setter + def textcase(self, val): + self["textcase"] = val + + @property + def textcasesrc(self): + """ + Sets the source reference on Chart Studio Cloud for `textcase`. + + The 'textcasesrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["textcasesrc"] + + @textcasesrc.setter + def textcasesrc(self, val): + self["textcasesrc"] = val + + @property + def variant(self): + """ + Sets the variant of the font. + + The 'variant' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['normal', 'small-caps', 'all-small-caps', + 'all-petite-caps', 'petite-caps', 'unicase'] + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + Any|numpy.ndarray + """ + return self["variant"] + + @variant.setter + def variant(self, val): + self["variant"] = val + + @property + def variantsrc(self): + """ + Sets the source reference on Chart Studio Cloud for `variant`. + + The 'variantsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["variantsrc"] + + @variantsrc.setter + def variantsrc(self, val): + self["variantsrc"] = val + + @property + def weight(self): + """ + Sets the weight (or boldness) of the font. + + The 'weight' property is a integer and may be specified as: + - An int (or float that will be cast to an int) + in the interval [1, 1000] + OR exactly one of ['normal', 'bold'] (e.g. 'bold') + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + int|numpy.ndarray + """ + return self["weight"] + + @weight.setter + def weight(self, val): + self["weight"] = val + + @property + def weightsrc(self): + """ + Sets the source reference on Chart Studio Cloud for `weight`. + + The 'weightsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["weightsrc"] + + @weightsrc.setter + def weightsrc(self, val): + self["weightsrc"] = val + + @property + def _prop_descriptions(self): + return """\ + color + + colorsrc + Sets the source reference on Chart Studio Cloud for + `color`. + family + HTML font family - the typeface that will be applied by + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. + familysrc + Sets the source reference on Chart Studio Cloud for + `family`. + lineposition + Sets the kind of decoration line(s) with text, such as + an "under", "over" or "through" as well as combinations + e.g. "under+over", etc. + linepositionsrc + Sets the source reference on Chart Studio Cloud for + `lineposition`. + shadow + Sets the shape and color of the shadow behind text. + "auto" places minimal shadow and applies contrast text + font color. See https://developer.mozilla.org/en- + US/docs/Web/CSS/text-shadow for additional options. + shadowsrc + Sets the source reference on Chart Studio Cloud for + `shadow`. + size + + sizesrc + Sets the source reference on Chart Studio Cloud for + `size`. + style + Sets whether a font should be styled with a normal or + italic face from its family. + stylesrc + Sets the source reference on Chart Studio Cloud for + `style`. + textcase + Sets capitalization of text. It can be used to make + text appear in all-uppercase or all-lowercase, or with + each word capitalized. + textcasesrc + Sets the source reference on Chart Studio Cloud for + `textcase`. + variant + Sets the variant of the font. + variantsrc + Sets the source reference on Chart Studio Cloud for + `variant`. + weight + Sets the weight (or boldness) of the font. + weightsrc + Sets the source reference on Chart Studio Cloud for + `weight`. + """ + + def __init__( + self, + arg=None, + color=None, + colorsrc=None, + family=None, + familysrc=None, + lineposition=None, + linepositionsrc=None, + shadow=None, + shadowsrc=None, + size=None, + sizesrc=None, + style=None, + stylesrc=None, + textcase=None, + textcasesrc=None, + variant=None, + variantsrc=None, + weight=None, + weightsrc=None, + **kwargs, + ): + """ + Construct a new Font object + + Sets the font used in hover labels. + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.box.hoverlabel.Font` + color + + colorsrc + Sets the source reference on Chart Studio Cloud for + `color`. + family + HTML font family - the typeface that will be applied by + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. + familysrc + Sets the source reference on Chart Studio Cloud for + `family`. + lineposition + Sets the kind of decoration line(s) with text, such as + an "under", "over" or "through" as well as combinations + e.g. "under+over", etc. + linepositionsrc + Sets the source reference on Chart Studio Cloud for + `lineposition`. + shadow + Sets the shape and color of the shadow behind text. + "auto" places minimal shadow and applies contrast text + font color. See https://developer.mozilla.org/en- + US/docs/Web/CSS/text-shadow for additional options. + shadowsrc + Sets the source reference on Chart Studio Cloud for + `shadow`. + size + + sizesrc + Sets the source reference on Chart Studio Cloud for + `size`. + style + Sets whether a font should be styled with a normal or + italic face from its family. + stylesrc + Sets the source reference on Chart Studio Cloud for + `style`. + textcase + Sets capitalization of text. It can be used to make + text appear in all-uppercase or all-lowercase, or with + each word capitalized. + textcasesrc + Sets the source reference on Chart Studio Cloud for + `textcase`. + variant + Sets the variant of the font. + variantsrc + Sets the source reference on Chart Studio Cloud for + `variant`. + weight + Sets the weight (or boldness) of the font. + weightsrc + Sets the source reference on Chart Studio Cloud for + `weight`. + + Returns + ------- + Font + """ + super().__init__("font") + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + if arg is None: + arg = {} + elif isinstance(arg, self.__class__): + arg = arg.to_plotly_json() + elif isinstance(arg, dict): + arg = _copy.copy(arg) + else: + raise ValueError("""\ +The first argument to the plotly.graph_objs.box.hoverlabel.Font +constructor must be a dict or +an instance of :class:`plotly.graph_objs.box.hoverlabel.Font`""") + + self._skip_invalid = kwargs.pop("skip_invalid", False) + self._validate = kwargs.pop("_validate", True) + + self._set_property("color", arg, color) + self._set_property("colorsrc", arg, colorsrc) + self._set_property("family", arg, family) + self._set_property("familysrc", arg, familysrc) + self._set_property("lineposition", arg, lineposition) + self._set_property("linepositionsrc", arg, linepositionsrc) + self._set_property("shadow", arg, shadow) + self._set_property("shadowsrc", arg, shadowsrc) + self._set_property("size", arg, size) + self._set_property("sizesrc", arg, sizesrc) + self._set_property("style", arg, style) + self._set_property("stylesrc", arg, stylesrc) + self._set_property("textcase", arg, textcase) + self._set_property("textcasesrc", arg, textcasesrc) + self._set_property("variant", arg, variant) + self._set_property("variantsrc", arg, variantsrc) + self._set_property("weight", arg, weight) + self._set_property("weightsrc", arg, weightsrc) + self._process_kwargs(**dict(arg, **kwargs)) + self._skip_invalid = False diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/box/legendgrouptitle/.___init__.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/box/legendgrouptitle/.___init__.py new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/box/legendgrouptitle/.___init__.py differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/box/legendgrouptitle/.___pycache__ b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/box/legendgrouptitle/.___pycache__ new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/box/legendgrouptitle/.___pycache__ differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/box/legendgrouptitle/.__font.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/box/legendgrouptitle/.__font.py new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/box/legendgrouptitle/.__font.py differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/box/legendgrouptitle/__init__.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/box/legendgrouptitle/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..56f600d3458c41f269053307377e9707ab13e090 --- /dev/null +++ b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/box/legendgrouptitle/__init__.py @@ -0,0 +1,9 @@ +import sys +from typing import TYPE_CHECKING + +if TYPE_CHECKING: + from ._font import Font +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import(__name__, [], ["._font.Font"]) diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/box/legendgrouptitle/_font.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/box/legendgrouptitle/_font.py new file mode 100644 index 0000000000000000000000000000000000000000..aa42e3d9f104728ee819b19b06bc39031ebca5b2 --- /dev/null +++ b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/box/legendgrouptitle/_font.py @@ -0,0 +1,334 @@ +# --- THIS FILE IS AUTO-GENERATED --- +# Modifications will be overwitten the next time code generation run. + +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Font(_BaseTraceHierarchyType): + _parent_path_str = "box.legendgrouptitle" + _path_str = "box.legendgrouptitle.font" + _valid_props = { + "color", + "family", + "lineposition", + "shadow", + "size", + "style", + "textcase", + "variant", + "weight", + } + + @property + def color(self): + """ + The 'color' property is a color and may be specified as: + - A hex string (e.g. '#ff0000') + - An rgb/rgba string (e.g. 'rgb(255,0,0)') + - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') + - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') + - A named CSS color: see https://plotly.com/python/css-colors/ for a list + + Returns + ------- + str + """ + return self["color"] + + @color.setter + def color(self, val): + self["color"] = val + + @property + def family(self): + """ + HTML font family - the typeface that will be applied by the web + browser. The web browser can only apply a font if it is + available on the system where it runs. Provide multiple font + families, separated by commas, to indicate the order in which + to apply fonts if they aren't available. + + The 'family' property is a string and must be specified as: + - A non-empty string + + Returns + ------- + str + """ + return self["family"] + + @family.setter + def family(self, val): + self["family"] = val + + @property + def lineposition(self): + """ + Sets the kind of decoration line(s) with text, such as an + "under", "over" or "through" as well as combinations e.g. + "under+over", etc. + + The 'lineposition' property is a flaglist and may be specified + as a string containing: + - Any combination of ['under', 'over', 'through'] joined with '+' characters + (e.g. 'under+over') + OR exactly one of ['none'] (e.g. 'none') + + Returns + ------- + Any + """ + return self["lineposition"] + + @lineposition.setter + def lineposition(self, val): + self["lineposition"] = val + + @property + def shadow(self): + """ + Sets the shape and color of the shadow behind text. "auto" + places minimal shadow and applies contrast text font color. See + https://developer.mozilla.org/en-US/docs/Web/CSS/text-shadow + for additional options. + + The 'shadow' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["shadow"] + + @shadow.setter + def shadow(self, val): + self["shadow"] = val + + @property + def size(self): + """ + The 'size' property is a number and may be specified as: + - An int or float in the interval [1, inf] + + Returns + ------- + int|float + """ + return self["size"] + + @size.setter + def size(self, val): + self["size"] = val + + @property + def style(self): + """ + Sets whether a font should be styled with a normal or italic + face from its family. + + The 'style' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['normal', 'italic'] + + Returns + ------- + Any + """ + return self["style"] + + @style.setter + def style(self, val): + self["style"] = val + + @property + def textcase(self): + """ + Sets capitalization of text. It can be used to make text appear + in all-uppercase or all-lowercase, or with each word + capitalized. + + The 'textcase' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['normal', 'word caps', 'upper', 'lower'] + + Returns + ------- + Any + """ + return self["textcase"] + + @textcase.setter + def textcase(self, val): + self["textcase"] = val + + @property + def variant(self): + """ + Sets the variant of the font. + + The 'variant' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['normal', 'small-caps', 'all-small-caps', + 'all-petite-caps', 'petite-caps', 'unicase'] + + Returns + ------- + Any + """ + return self["variant"] + + @variant.setter + def variant(self, val): + self["variant"] = val + + @property + def weight(self): + """ + Sets the weight (or boldness) of the font. + + The 'weight' property is a integer and may be specified as: + - An int (or float that will be cast to an int) + in the interval [1, 1000] + OR exactly one of ['normal', 'bold'] (e.g. 'bold') + + Returns + ------- + int + """ + return self["weight"] + + @weight.setter + def weight(self, val): + self["weight"] = val + + @property + def _prop_descriptions(self): + return """\ + color + + family + HTML font family - the typeface that will be applied by + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. + lineposition + Sets the kind of decoration line(s) with text, such as + an "under", "over" or "through" as well as combinations + e.g. "under+over", etc. + shadow + Sets the shape and color of the shadow behind text. + "auto" places minimal shadow and applies contrast text + font color. See https://developer.mozilla.org/en- + US/docs/Web/CSS/text-shadow for additional options. + size + + style + Sets whether a font should be styled with a normal or + italic face from its family. + textcase + Sets capitalization of text. It can be used to make + text appear in all-uppercase or all-lowercase, or with + each word capitalized. + variant + Sets the variant of the font. + weight + Sets the weight (or boldness) of the font. + """ + + def __init__( + self, + arg=None, + color=None, + family=None, + lineposition=None, + shadow=None, + size=None, + style=None, + textcase=None, + variant=None, + weight=None, + **kwargs, + ): + """ + Construct a new Font object + + Sets this legend group's title font. + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.box.legendgrouptitle.Font` + color + + family + HTML font family - the typeface that will be applied by + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. + lineposition + Sets the kind of decoration line(s) with text, such as + an "under", "over" or "through" as well as combinations + e.g. "under+over", etc. + shadow + Sets the shape and color of the shadow behind text. + "auto" places minimal shadow and applies contrast text + font color. See https://developer.mozilla.org/en- + US/docs/Web/CSS/text-shadow for additional options. + size + + style + Sets whether a font should be styled with a normal or + italic face from its family. + textcase + Sets capitalization of text. It can be used to make + text appear in all-uppercase or all-lowercase, or with + each word capitalized. + variant + Sets the variant of the font. + weight + Sets the weight (or boldness) of the font. + + Returns + ------- + Font + """ + super().__init__("font") + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + if arg is None: + arg = {} + elif isinstance(arg, self.__class__): + arg = arg.to_plotly_json() + elif isinstance(arg, dict): + arg = _copy.copy(arg) + else: + raise ValueError("""\ +The first argument to the plotly.graph_objs.box.legendgrouptitle.Font +constructor must be a dict or +an instance of :class:`plotly.graph_objs.box.legendgrouptitle.Font`""") + + self._skip_invalid = kwargs.pop("skip_invalid", False) + self._validate = kwargs.pop("_validate", True) + + self._set_property("color", arg, color) + self._set_property("family", arg, family) + self._set_property("lineposition", arg, lineposition) + self._set_property("shadow", arg, shadow) + self._set_property("size", arg, size) + self._set_property("style", arg, style) + self._set_property("textcase", arg, textcase) + self._set_property("variant", arg, variant) + self._set_property("weight", arg, weight) + self._process_kwargs(**dict(arg, **kwargs)) + self._skip_invalid = False diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/box/marker/.___init__.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/box/marker/.___init__.py new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/box/marker/.___init__.py differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/box/marker/.___pycache__ b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/box/marker/.___pycache__ new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/box/marker/.___pycache__ differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/box/marker/.__line.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/box/marker/.__line.py new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/box/marker/.__line.py differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/box/marker/__init__.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/box/marker/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..33e42c007335e876d1a3c1d78cec108c9248c1c9 --- /dev/null +++ b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/box/marker/__init__.py @@ -0,0 +1,9 @@ +import sys +from typing import TYPE_CHECKING + +if TYPE_CHECKING: + from ._line import Line +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import(__name__, [], ["._line.Line"]) diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/box/marker/_line.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/box/marker/_line.py new file mode 100644 index 0000000000000000000000000000000000000000..95b6e0bed4995a0db3acc669b6845a380c08ba41 --- /dev/null +++ b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/box/marker/_line.py @@ -0,0 +1,181 @@ +# --- THIS FILE IS AUTO-GENERATED --- +# Modifications will be overwitten the next time code generation run. + +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Line(_BaseTraceHierarchyType): + _parent_path_str = "box.marker" + _path_str = "box.marker.line" + _valid_props = {"color", "outliercolor", "outlierwidth", "width"} + + @property + def color(self): + """ + Sets the marker.line color. It accepts either a specific color + or an array of numbers that are mapped to the colorscale + relative to the max and min values of the array or relative to + `marker.line.cmin` and `marker.line.cmax` if set. + + The 'color' property is a color and may be specified as: + - A hex string (e.g. '#ff0000') + - An rgb/rgba string (e.g. 'rgb(255,0,0)') + - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') + - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') + - A named CSS color: see https://plotly.com/python/css-colors/ for a list + + Returns + ------- + str + """ + return self["color"] + + @color.setter + def color(self, val): + self["color"] = val + + @property + def outliercolor(self): + """ + Sets the border line color of the outlier sample points. + Defaults to marker.color + + The 'outliercolor' property is a color and may be specified as: + - A hex string (e.g. '#ff0000') + - An rgb/rgba string (e.g. 'rgb(255,0,0)') + - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') + - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') + - A named CSS color: see https://plotly.com/python/css-colors/ for a list + + Returns + ------- + str + """ + return self["outliercolor"] + + @outliercolor.setter + def outliercolor(self, val): + self["outliercolor"] = val + + @property + def outlierwidth(self): + """ + Sets the border line width (in px) of the outlier sample + points. + + The 'outlierwidth' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["outlierwidth"] + + @outlierwidth.setter + def outlierwidth(self, val): + self["outlierwidth"] = val + + @property + def width(self): + """ + Sets the width (in px) of the lines bounding the marker points. + + The 'width' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["width"] + + @width.setter + def width(self, val): + self["width"] = val + + @property + def _prop_descriptions(self): + return """\ + color + Sets the marker.line color. It accepts either a + specific color or an array of numbers that are mapped + to the colorscale relative to the max and min values of + the array or relative to `marker.line.cmin` and + `marker.line.cmax` if set. + outliercolor + Sets the border line color of the outlier sample + points. Defaults to marker.color + outlierwidth + Sets the border line width (in px) of the outlier + sample points. + width + Sets the width (in px) of the lines bounding the marker + points. + """ + + def __init__( + self, + arg=None, + color=None, + outliercolor=None, + outlierwidth=None, + width=None, + **kwargs, + ): + """ + Construct a new Line object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.box.marker.Line` + color + Sets the marker.line color. It accepts either a + specific color or an array of numbers that are mapped + to the colorscale relative to the max and min values of + the array or relative to `marker.line.cmin` and + `marker.line.cmax` if set. + outliercolor + Sets the border line color of the outlier sample + points. Defaults to marker.color + outlierwidth + Sets the border line width (in px) of the outlier + sample points. + width + Sets the width (in px) of the lines bounding the marker + points. + + Returns + ------- + Line + """ + super().__init__("line") + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + if arg is None: + arg = {} + elif isinstance(arg, self.__class__): + arg = arg.to_plotly_json() + elif isinstance(arg, dict): + arg = _copy.copy(arg) + else: + raise ValueError("""\ +The first argument to the plotly.graph_objs.box.marker.Line +constructor must be a dict or +an instance of :class:`plotly.graph_objs.box.marker.Line`""") + + self._skip_invalid = kwargs.pop("skip_invalid", False) + self._validate = kwargs.pop("_validate", True) + + self._set_property("color", arg, color) + self._set_property("outliercolor", arg, outliercolor) + self._set_property("outlierwidth", arg, outlierwidth) + self._set_property("width", arg, width) + self._process_kwargs(**dict(arg, **kwargs)) + self._skip_invalid = False diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/box/selected/.___init__.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/box/selected/.___init__.py new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/box/selected/.___init__.py differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/box/selected/.___pycache__ b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/box/selected/.___pycache__ new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/box/selected/.___pycache__ differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/box/selected/.__marker.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/box/selected/.__marker.py new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/box/selected/.__marker.py differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/box/selected/__init__.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/box/selected/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..b4ba7bf2614e6c8f6fce41321172f465c59ab433 --- /dev/null +++ b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/box/selected/__init__.py @@ -0,0 +1,9 @@ +import sys +from typing import TYPE_CHECKING + +if TYPE_CHECKING: + from ._marker import Marker +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import(__name__, [], ["._marker.Marker"]) diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/box/selected/_marker.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/box/selected/_marker.py new file mode 100644 index 0000000000000000000000000000000000000000..b4f9afaf2c9017d31704377971268edbcf693e75 --- /dev/null +++ b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/box/selected/_marker.py @@ -0,0 +1,127 @@ +# --- THIS FILE IS AUTO-GENERATED --- +# Modifications will be overwitten the next time code generation run. + +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Marker(_BaseTraceHierarchyType): + _parent_path_str = "box.selected" + _path_str = "box.selected.marker" + _valid_props = {"color", "opacity", "size"} + + @property + def color(self): + """ + Sets the marker color of selected points. + + The 'color' property is a color and may be specified as: + - A hex string (e.g. '#ff0000') + - An rgb/rgba string (e.g. 'rgb(255,0,0)') + - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') + - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') + - A named CSS color: see https://plotly.com/python/css-colors/ for a list + + Returns + ------- + str + """ + return self["color"] + + @color.setter + def color(self, val): + self["color"] = val + + @property + def opacity(self): + """ + Sets the marker opacity of selected points. + + The 'opacity' property is a number and may be specified as: + - An int or float in the interval [0, 1] + + Returns + ------- + int|float + """ + return self["opacity"] + + @opacity.setter + def opacity(self, val): + self["opacity"] = val + + @property + def size(self): + """ + Sets the marker size of selected points. + + The 'size' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["size"] + + @size.setter + def size(self, val): + self["size"] = val + + @property + def _prop_descriptions(self): + return """\ + color + Sets the marker color of selected points. + opacity + Sets the marker opacity of selected points. + size + Sets the marker size of selected points. + """ + + def __init__(self, arg=None, color=None, opacity=None, size=None, **kwargs): + """ + Construct a new Marker object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.box.selected.Marker` + color + Sets the marker color of selected points. + opacity + Sets the marker opacity of selected points. + size + Sets the marker size of selected points. + + Returns + ------- + Marker + """ + super().__init__("marker") + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + if arg is None: + arg = {} + elif isinstance(arg, self.__class__): + arg = arg.to_plotly_json() + elif isinstance(arg, dict): + arg = _copy.copy(arg) + else: + raise ValueError("""\ +The first argument to the plotly.graph_objs.box.selected.Marker +constructor must be a dict or +an instance of :class:`plotly.graph_objs.box.selected.Marker`""") + + self._skip_invalid = kwargs.pop("skip_invalid", False) + self._validate = kwargs.pop("_validate", True) + + self._set_property("color", arg, color) + self._set_property("opacity", arg, opacity) + self._set_property("size", arg, size) + self._process_kwargs(**dict(arg, **kwargs)) + self._skip_invalid = False diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/box/unselected/.___init__.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/box/unselected/.___init__.py new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/box/unselected/.___init__.py differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/box/unselected/.___pycache__ b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/box/unselected/.___pycache__ new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/box/unselected/.___pycache__ differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/box/unselected/.__marker.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/box/unselected/.__marker.py new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/box/unselected/.__marker.py differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/box/unselected/__init__.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/box/unselected/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..b4ba7bf2614e6c8f6fce41321172f465c59ab433 --- /dev/null +++ b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/box/unselected/__init__.py @@ -0,0 +1,9 @@ +import sys +from typing import TYPE_CHECKING + +if TYPE_CHECKING: + from ._marker import Marker +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import(__name__, [], ["._marker.Marker"]) diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/box/unselected/_marker.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/box/unselected/_marker.py new file mode 100644 index 0000000000000000000000000000000000000000..b2c5d8f5d7c2d1c2cbb29551a5da29d2f2fdf015 --- /dev/null +++ b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/box/unselected/_marker.py @@ -0,0 +1,136 @@ +# --- THIS FILE IS AUTO-GENERATED --- +# Modifications will be overwitten the next time code generation run. + +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Marker(_BaseTraceHierarchyType): + _parent_path_str = "box.unselected" + _path_str = "box.unselected.marker" + _valid_props = {"color", "opacity", "size"} + + @property + def color(self): + """ + Sets the marker color of unselected points, applied only when a + selection exists. + + The 'color' property is a color and may be specified as: + - A hex string (e.g. '#ff0000') + - An rgb/rgba string (e.g. 'rgb(255,0,0)') + - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') + - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') + - A named CSS color: see https://plotly.com/python/css-colors/ for a list + + Returns + ------- + str + """ + return self["color"] + + @color.setter + def color(self, val): + self["color"] = val + + @property + def opacity(self): + """ + Sets the marker opacity of unselected points, applied only when + a selection exists. + + The 'opacity' property is a number and may be specified as: + - An int or float in the interval [0, 1] + + Returns + ------- + int|float + """ + return self["opacity"] + + @opacity.setter + def opacity(self, val): + self["opacity"] = val + + @property + def size(self): + """ + Sets the marker size of unselected points, applied only when a + selection exists. + + The 'size' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["size"] + + @size.setter + def size(self, val): + self["size"] = val + + @property + def _prop_descriptions(self): + return """\ + color + Sets the marker color of unselected points, applied + only when a selection exists. + opacity + Sets the marker opacity of unselected points, applied + only when a selection exists. + size + Sets the marker size of unselected points, applied only + when a selection exists. + """ + + def __init__(self, arg=None, color=None, opacity=None, size=None, **kwargs): + """ + Construct a new Marker object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.box.unselected.Marker` + color + Sets the marker color of unselected points, applied + only when a selection exists. + opacity + Sets the marker opacity of unselected points, applied + only when a selection exists. + size + Sets the marker size of unselected points, applied only + when a selection exists. + + Returns + ------- + Marker + """ + super().__init__("marker") + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + if arg is None: + arg = {} + elif isinstance(arg, self.__class__): + arg = arg.to_plotly_json() + elif isinstance(arg, dict): + arg = _copy.copy(arg) + else: + raise ValueError("""\ +The first argument to the plotly.graph_objs.box.unselected.Marker +constructor must be a dict or +an instance of :class:`plotly.graph_objs.box.unselected.Marker`""") + + self._skip_invalid = kwargs.pop("skip_invalid", False) + self._validate = kwargs.pop("_validate", True) + + self._set_property("color", arg, color) + self._set_property("opacity", arg, opacity) + self._set_property("size", arg, size) + self._process_kwargs(**dict(arg, **kwargs)) + self._skip_invalid = False diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/candlestick/.___init__.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/candlestick/.___init__.py new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/candlestick/.___init__.py differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/candlestick/.___pycache__ b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/candlestick/.___pycache__ new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/candlestick/.___pycache__ differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/candlestick/.__decreasing.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/candlestick/.__decreasing.py new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/candlestick/.__decreasing.py differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/candlestick/.__hoverlabel.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/candlestick/.__hoverlabel.py new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/candlestick/.__hoverlabel.py differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/candlestick/.__increasing.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/candlestick/.__increasing.py new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/candlestick/.__increasing.py differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/candlestick/.__legendgrouptitle.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/candlestick/.__legendgrouptitle.py new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/candlestick/.__legendgrouptitle.py differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/candlestick/.__line.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/candlestick/.__line.py new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/candlestick/.__line.py differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/candlestick/.__stream.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/candlestick/.__stream.py new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/candlestick/.__stream.py differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/candlestick/._decreasing b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/candlestick/._decreasing new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/candlestick/._decreasing differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/candlestick/._hoverlabel b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/candlestick/._hoverlabel new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/candlestick/._hoverlabel differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/candlestick/._increasing b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/candlestick/._increasing new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/candlestick/._increasing differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/candlestick/._legendgrouptitle b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/candlestick/._legendgrouptitle new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/candlestick/._legendgrouptitle differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/candlestick/__init__.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/candlestick/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..464258ceedc20c6dd9712eaae044bdfb4a521f07 --- /dev/null +++ b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/candlestick/__init__.py @@ -0,0 +1,29 @@ +import sys +from typing import TYPE_CHECKING + +if TYPE_CHECKING: + from ._decreasing import Decreasing + from ._hoverlabel import Hoverlabel + from ._increasing import Increasing + from ._legendgrouptitle import Legendgrouptitle + from ._line import Line + from ._stream import Stream + from . import decreasing + from . import hoverlabel + from . import increasing + from . import legendgrouptitle +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [".decreasing", ".hoverlabel", ".increasing", ".legendgrouptitle"], + [ + "._decreasing.Decreasing", + "._hoverlabel.Hoverlabel", + "._increasing.Increasing", + "._legendgrouptitle.Legendgrouptitle", + "._line.Line", + "._stream.Stream", + ], + ) diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/candlestick/_decreasing.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/candlestick/_decreasing.py new file mode 100644 index 0000000000000000000000000000000000000000..c801692156a1f26bf7ed47f41905fa2990e79620 --- /dev/null +++ b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/candlestick/_decreasing.py @@ -0,0 +1,113 @@ +# --- THIS FILE IS AUTO-GENERATED --- +# Modifications will be overwitten the next time code generation run. + +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Decreasing(_BaseTraceHierarchyType): + _parent_path_str = "candlestick" + _path_str = "candlestick.decreasing" + _valid_props = {"fillcolor", "line"} + + @property + def fillcolor(self): + """ + Sets the fill color. Defaults to a half-transparent variant of + the line color, marker color, or marker line color, whichever + is available. + + The 'fillcolor' property is a color and may be specified as: + - A hex string (e.g. '#ff0000') + - An rgb/rgba string (e.g. 'rgb(255,0,0)') + - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') + - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') + - A named CSS color: see https://plotly.com/python/css-colors/ for a list + + Returns + ------- + str + """ + return self["fillcolor"] + + @fillcolor.setter + def fillcolor(self, val): + self["fillcolor"] = val + + @property + def line(self): + """ + The 'line' property is an instance of Line + that may be specified as: + - An instance of :class:`plotly.graph_objs.candlestick.decreasing.Line` + - A dict of string/value properties that will be passed + to the Line constructor + + Returns + ------- + plotly.graph_objs.candlestick.decreasing.Line + """ + return self["line"] + + @line.setter + def line(self, val): + self["line"] = val + + @property + def _prop_descriptions(self): + return """\ + fillcolor + Sets the fill color. Defaults to a half-transparent + variant of the line color, marker color, or marker line + color, whichever is available. + line + :class:`plotly.graph_objects.candlestick.decreasing.Lin + e` instance or dict with compatible properties + """ + + def __init__(self, arg=None, fillcolor=None, line=None, **kwargs): + """ + Construct a new Decreasing object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.candlestick.Decreasing` + fillcolor + Sets the fill color. Defaults to a half-transparent + variant of the line color, marker color, or marker line + color, whichever is available. + line + :class:`plotly.graph_objects.candlestick.decreasing.Lin + e` instance or dict with compatible properties + + Returns + ------- + Decreasing + """ + super().__init__("decreasing") + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + if arg is None: + arg = {} + elif isinstance(arg, self.__class__): + arg = arg.to_plotly_json() + elif isinstance(arg, dict): + arg = _copy.copy(arg) + else: + raise ValueError("""\ +The first argument to the plotly.graph_objs.candlestick.Decreasing +constructor must be a dict or +an instance of :class:`plotly.graph_objs.candlestick.Decreasing`""") + + self._skip_invalid = kwargs.pop("skip_invalid", False) + self._validate = kwargs.pop("_validate", True) + + self._set_property("fillcolor", arg, fillcolor) + self._set_property("line", arg, line) + self._process_kwargs(**dict(arg, **kwargs)) + self._skip_invalid = False diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/candlestick/_hoverlabel.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/candlestick/_hoverlabel.py new file mode 100644 index 0000000000000000000000000000000000000000..6208c5d8596e2b723eda677c8ebc66a9fb2afdd0 --- /dev/null +++ b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/candlestick/_hoverlabel.py @@ -0,0 +1,399 @@ +# --- THIS FILE IS AUTO-GENERATED --- +# Modifications will be overwitten the next time code generation run. + +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Hoverlabel(_BaseTraceHierarchyType): + _parent_path_str = "candlestick" + _path_str = "candlestick.hoverlabel" + _valid_props = { + "align", + "alignsrc", + "bgcolor", + "bgcolorsrc", + "bordercolor", + "bordercolorsrc", + "font", + "namelength", + "namelengthsrc", + "showarrow", + "split", + } + + @property + def align(self): + """ + Sets the horizontal alignment of the text content within hover + label box. Has an effect only if the hover label text spans + more two or more lines + + The 'align' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['left', 'right', 'auto'] + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + Any|numpy.ndarray + """ + return self["align"] + + @align.setter + def align(self, val): + self["align"] = val + + @property + def alignsrc(self): + """ + Sets the source reference on Chart Studio Cloud for `align`. + + The 'alignsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["alignsrc"] + + @alignsrc.setter + def alignsrc(self, val): + self["alignsrc"] = val + + @property + def bgcolor(self): + """ + Sets the background color of the hover labels for this trace + + The 'bgcolor' property is a color and may be specified as: + - A hex string (e.g. '#ff0000') + - An rgb/rgba string (e.g. 'rgb(255,0,0)') + - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') + - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') + - A named CSS color: see https://plotly.com/python/css-colors/ for a list + - A list or array of any of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["bgcolor"] + + @bgcolor.setter + def bgcolor(self, val): + self["bgcolor"] = val + + @property + def bgcolorsrc(self): + """ + Sets the source reference on Chart Studio Cloud for `bgcolor`. + + The 'bgcolorsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["bgcolorsrc"] + + @bgcolorsrc.setter + def bgcolorsrc(self, val): + self["bgcolorsrc"] = val + + @property + def bordercolor(self): + """ + Sets the border color of the hover labels for this trace. + + The 'bordercolor' property is a color and may be specified as: + - A hex string (e.g. '#ff0000') + - An rgb/rgba string (e.g. 'rgb(255,0,0)') + - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') + - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') + - A named CSS color: see https://plotly.com/python/css-colors/ for a list + - A list or array of any of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["bordercolor"] + + @bordercolor.setter + def bordercolor(self, val): + self["bordercolor"] = val + + @property + def bordercolorsrc(self): + """ + Sets the source reference on Chart Studio Cloud for + `bordercolor`. + + The 'bordercolorsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["bordercolorsrc"] + + @bordercolorsrc.setter + def bordercolorsrc(self, val): + self["bordercolorsrc"] = val + + @property + def font(self): + """ + Sets the font used in hover labels. + + The 'font' property is an instance of Font + that may be specified as: + - An instance of :class:`plotly.graph_objs.candlestick.hoverlabel.Font` + - A dict of string/value properties that will be passed + to the Font constructor + + Returns + ------- + plotly.graph_objs.candlestick.hoverlabel.Font + """ + return self["font"] + + @font.setter + def font(self, val): + self["font"] = val + + @property + def namelength(self): + """ + Sets the default length (in number of characters) of the trace + name in the hover labels for all traces. -1 shows the whole + name regardless of length. 0-3 shows the first 0-3 characters, + and an integer >3 will show the whole name if it is less than + that many characters, but if it is longer, will truncate to + `namelength - 3` characters and add an ellipsis. + + The 'namelength' property is a integer and may be specified as: + - An int (or float that will be cast to an int) + in the interval [-1, 9223372036854775807] + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + int|numpy.ndarray + """ + return self["namelength"] + + @namelength.setter + def namelength(self, val): + self["namelength"] = val + + @property + def namelengthsrc(self): + """ + Sets the source reference on Chart Studio Cloud for + `namelength`. + + The 'namelengthsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["namelengthsrc"] + + @namelengthsrc.setter + def namelengthsrc(self, val): + self["namelengthsrc"] = val + + @property + def showarrow(self): + """ + Sets whether or not to show the hover label arrow/triangle + pointing to the data point. + + The 'showarrow' property is a boolean and must be specified as: + - A boolean value: True or False + + Returns + ------- + bool + """ + return self["showarrow"] + + @showarrow.setter + def showarrow(self, val): + self["showarrow"] = val + + @property + def split(self): + """ + Show hover information (open, close, high, low) in separate + labels, rather than a single unified label. Default: False. + When set to True, `hovertemplate` is ignored. + + The 'split' property is a boolean and must be specified as: + - A boolean value: True or False + + Returns + ------- + bool + """ + return self["split"] + + @split.setter + def split(self, val): + self["split"] = val + + @property + def _prop_descriptions(self): + return """\ + align + Sets the horizontal alignment of the text content + within hover label box. Has an effect only if the hover + label text spans more two or more lines + alignsrc + Sets the source reference on Chart Studio Cloud for + `align`. + bgcolor + Sets the background color of the hover labels for this + trace + bgcolorsrc + Sets the source reference on Chart Studio Cloud for + `bgcolor`. + bordercolor + Sets the border color of the hover labels for this + trace. + bordercolorsrc + Sets the source reference on Chart Studio Cloud for + `bordercolor`. + font + Sets the font used in hover labels. + namelength + Sets the default length (in number of characters) of + the trace name in the hover labels for all traces. -1 + shows the whole name regardless of length. 0-3 shows + the first 0-3 characters, and an integer >3 will show + the whole name if it is less than that many characters, + but if it is longer, will truncate to `namelength - 3` + characters and add an ellipsis. + namelengthsrc + Sets the source reference on Chart Studio Cloud for + `namelength`. + showarrow + Sets whether or not to show the hover label + arrow/triangle pointing to the data point. + split + Show hover information (open, close, high, low) in + separate labels, rather than a single unified label. + Default: False. When set to True, `hovertemplate` is + ignored. + """ + + def __init__( + self, + arg=None, + align=None, + alignsrc=None, + bgcolor=None, + bgcolorsrc=None, + bordercolor=None, + bordercolorsrc=None, + font=None, + namelength=None, + namelengthsrc=None, + showarrow=None, + split=None, + **kwargs, + ): + """ + Construct a new Hoverlabel object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.candlestick.Hoverlabel` + align + Sets the horizontal alignment of the text content + within hover label box. Has an effect only if the hover + label text spans more two or more lines + alignsrc + Sets the source reference on Chart Studio Cloud for + `align`. + bgcolor + Sets the background color of the hover labels for this + trace + bgcolorsrc + Sets the source reference on Chart Studio Cloud for + `bgcolor`. + bordercolor + Sets the border color of the hover labels for this + trace. + bordercolorsrc + Sets the source reference on Chart Studio Cloud for + `bordercolor`. + font + Sets the font used in hover labels. + namelength + Sets the default length (in number of characters) of + the trace name in the hover labels for all traces. -1 + shows the whole name regardless of length. 0-3 shows + the first 0-3 characters, and an integer >3 will show + the whole name if it is less than that many characters, + but if it is longer, will truncate to `namelength - 3` + characters and add an ellipsis. + namelengthsrc + Sets the source reference on Chart Studio Cloud for + `namelength`. + showarrow + Sets whether or not to show the hover label + arrow/triangle pointing to the data point. + split + Show hover information (open, close, high, low) in + separate labels, rather than a single unified label. + Default: False. When set to True, `hovertemplate` is + ignored. + + Returns + ------- + Hoverlabel + """ + super().__init__("hoverlabel") + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + if arg is None: + arg = {} + elif isinstance(arg, self.__class__): + arg = arg.to_plotly_json() + elif isinstance(arg, dict): + arg = _copy.copy(arg) + else: + raise ValueError("""\ +The first argument to the plotly.graph_objs.candlestick.Hoverlabel +constructor must be a dict or +an instance of :class:`plotly.graph_objs.candlestick.Hoverlabel`""") + + self._skip_invalid = kwargs.pop("skip_invalid", False) + self._validate = kwargs.pop("_validate", True) + + self._set_property("align", arg, align) + self._set_property("alignsrc", arg, alignsrc) + self._set_property("bgcolor", arg, bgcolor) + self._set_property("bgcolorsrc", arg, bgcolorsrc) + self._set_property("bordercolor", arg, bordercolor) + self._set_property("bordercolorsrc", arg, bordercolorsrc) + self._set_property("font", arg, font) + self._set_property("namelength", arg, namelength) + self._set_property("namelengthsrc", arg, namelengthsrc) + self._set_property("showarrow", arg, showarrow) + self._set_property("split", arg, split) + self._process_kwargs(**dict(arg, **kwargs)) + self._skip_invalid = False diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/candlestick/_increasing.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/candlestick/_increasing.py new file mode 100644 index 0000000000000000000000000000000000000000..547e846a997cef1b1e605fb0cf44c0f56ef82909 --- /dev/null +++ b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/candlestick/_increasing.py @@ -0,0 +1,113 @@ +# --- THIS FILE IS AUTO-GENERATED --- +# Modifications will be overwitten the next time code generation run. + +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Increasing(_BaseTraceHierarchyType): + _parent_path_str = "candlestick" + _path_str = "candlestick.increasing" + _valid_props = {"fillcolor", "line"} + + @property + def fillcolor(self): + """ + Sets the fill color. Defaults to a half-transparent variant of + the line color, marker color, or marker line color, whichever + is available. + + The 'fillcolor' property is a color and may be specified as: + - A hex string (e.g. '#ff0000') + - An rgb/rgba string (e.g. 'rgb(255,0,0)') + - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') + - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') + - A named CSS color: see https://plotly.com/python/css-colors/ for a list + + Returns + ------- + str + """ + return self["fillcolor"] + + @fillcolor.setter + def fillcolor(self, val): + self["fillcolor"] = val + + @property + def line(self): + """ + The 'line' property is an instance of Line + that may be specified as: + - An instance of :class:`plotly.graph_objs.candlestick.increasing.Line` + - A dict of string/value properties that will be passed + to the Line constructor + + Returns + ------- + plotly.graph_objs.candlestick.increasing.Line + """ + return self["line"] + + @line.setter + def line(self, val): + self["line"] = val + + @property + def _prop_descriptions(self): + return """\ + fillcolor + Sets the fill color. Defaults to a half-transparent + variant of the line color, marker color, or marker line + color, whichever is available. + line + :class:`plotly.graph_objects.candlestick.increasing.Lin + e` instance or dict with compatible properties + """ + + def __init__(self, arg=None, fillcolor=None, line=None, **kwargs): + """ + Construct a new Increasing object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.candlestick.Increasing` + fillcolor + Sets the fill color. Defaults to a half-transparent + variant of the line color, marker color, or marker line + color, whichever is available. + line + :class:`plotly.graph_objects.candlestick.increasing.Lin + e` instance or dict with compatible properties + + Returns + ------- + Increasing + """ + super().__init__("increasing") + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + if arg is None: + arg = {} + elif isinstance(arg, self.__class__): + arg = arg.to_plotly_json() + elif isinstance(arg, dict): + arg = _copy.copy(arg) + else: + raise ValueError("""\ +The first argument to the plotly.graph_objs.candlestick.Increasing +constructor must be a dict or +an instance of :class:`plotly.graph_objs.candlestick.Increasing`""") + + self._skip_invalid = kwargs.pop("skip_invalid", False) + self._validate = kwargs.pop("_validate", True) + + self._set_property("fillcolor", arg, fillcolor) + self._set_property("line", arg, line) + self._process_kwargs(**dict(arg, **kwargs)) + self._skip_invalid = False diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/candlestick/_legendgrouptitle.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/candlestick/_legendgrouptitle.py new file mode 100644 index 0000000000000000000000000000000000000000..c4fb3f77ced8ab6afa06eca3fde6f8f7a3e8b0ed --- /dev/null +++ b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/candlestick/_legendgrouptitle.py @@ -0,0 +1,104 @@ +# --- THIS FILE IS AUTO-GENERATED --- +# Modifications will be overwitten the next time code generation run. + +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Legendgrouptitle(_BaseTraceHierarchyType): + _parent_path_str = "candlestick" + _path_str = "candlestick.legendgrouptitle" + _valid_props = {"font", "text"} + + @property + def font(self): + """ + Sets this legend group's title font. + + The 'font' property is an instance of Font + that may be specified as: + - An instance of :class:`plotly.graph_objs.candlestick.legendgrouptitle.Font` + - A dict of string/value properties that will be passed + to the Font constructor + + Returns + ------- + plotly.graph_objs.candlestick.legendgrouptitle.Font + """ + return self["font"] + + @font.setter + def font(self, val): + self["font"] = val + + @property + def text(self): + """ + Sets the title of the legend group. + + The 'text' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["text"] + + @text.setter + def text(self, val): + self["text"] = val + + @property + def _prop_descriptions(self): + return """\ + font + Sets this legend group's title font. + text + Sets the title of the legend group. + """ + + def __init__(self, arg=None, font=None, text=None, **kwargs): + """ + Construct a new Legendgrouptitle object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.candlestick.Legendgrouptitle` + font + Sets this legend group's title font. + text + Sets the title of the legend group. + + Returns + ------- + Legendgrouptitle + """ + super().__init__("legendgrouptitle") + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + if arg is None: + arg = {} + elif isinstance(arg, self.__class__): + arg = arg.to_plotly_json() + elif isinstance(arg, dict): + arg = _copy.copy(arg) + else: + raise ValueError("""\ +The first argument to the plotly.graph_objs.candlestick.Legendgrouptitle +constructor must be a dict or +an instance of :class:`plotly.graph_objs.candlestick.Legendgrouptitle`""") + + self._skip_invalid = kwargs.pop("skip_invalid", False) + self._validate = kwargs.pop("_validate", True) + + self._set_property("font", arg, font) + self._set_property("text", arg, text) + self._process_kwargs(**dict(arg, **kwargs)) + self._skip_invalid = False diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/candlestick/_line.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/candlestick/_line.py new file mode 100644 index 0000000000000000000000000000000000000000..4250d339af55d70c8ae183833abf28a442ecadac --- /dev/null +++ b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/candlestick/_line.py @@ -0,0 +1,85 @@ +# --- THIS FILE IS AUTO-GENERATED --- +# Modifications will be overwitten the next time code generation run. + +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Line(_BaseTraceHierarchyType): + _parent_path_str = "candlestick" + _path_str = "candlestick.line" + _valid_props = {"width"} + + @property + def width(self): + """ + Sets the width (in px) of line bounding the box(es). Note that + this style setting can also be set per direction via + `increasing.line.width` and `decreasing.line.width`. + + The 'width' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["width"] + + @width.setter + def width(self, val): + self["width"] = val + + @property + def _prop_descriptions(self): + return """\ + width + Sets the width (in px) of line bounding the box(es). + Note that this style setting can also be set per + direction via `increasing.line.width` and + `decreasing.line.width`. + """ + + def __init__(self, arg=None, width=None, **kwargs): + """ + Construct a new Line object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.candlestick.Line` + width + Sets the width (in px) of line bounding the box(es). + Note that this style setting can also be set per + direction via `increasing.line.width` and + `decreasing.line.width`. + + Returns + ------- + Line + """ + super().__init__("line") + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + if arg is None: + arg = {} + elif isinstance(arg, self.__class__): + arg = arg.to_plotly_json() + elif isinstance(arg, dict): + arg = _copy.copy(arg) + else: + raise ValueError("""\ +The first argument to the plotly.graph_objs.candlestick.Line +constructor must be a dict or +an instance of :class:`plotly.graph_objs.candlestick.Line`""") + + self._skip_invalid = kwargs.pop("skip_invalid", False) + self._validate = kwargs.pop("_validate", True) + + self._set_property("width", arg, width) + self._process_kwargs(**dict(arg, **kwargs)) + self._skip_invalid = False diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/candlestick/_stream.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/candlestick/_stream.py new file mode 100644 index 0000000000000000000000000000000000000000..1242e424bbabdda14f47c25a62fed7593fd38153 --- /dev/null +++ b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/candlestick/_stream.py @@ -0,0 +1,114 @@ +# --- THIS FILE IS AUTO-GENERATED --- +# Modifications will be overwitten the next time code generation run. + +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Stream(_BaseTraceHierarchyType): + _parent_path_str = "candlestick" + _path_str = "candlestick.stream" + _valid_props = {"maxpoints", "token"} + + @property + def maxpoints(self): + """ + Sets the maximum number of points to keep on the plots from an + incoming stream. If `maxpoints` is set to 50, only the newest + 50 points will be displayed on the plot. + + The 'maxpoints' property is a number and may be specified as: + - An int or float in the interval [0, 10000] + + Returns + ------- + int|float + """ + return self["maxpoints"] + + @maxpoints.setter + def maxpoints(self, val): + self["maxpoints"] = val + + @property + def token(self): + """ + The stream id number links a data trace on a plot with a + stream. See https://chart-studio.plotly.com/settings for more + details. + + The 'token' property is a string and must be specified as: + - A non-empty string + + Returns + ------- + str + """ + return self["token"] + + @token.setter + def token(self, val): + self["token"] = val + + @property + def _prop_descriptions(self): + return """\ + maxpoints + Sets the maximum number of points to keep on the plots + from an incoming stream. If `maxpoints` is set to 50, + only the newest 50 points will be displayed on the + plot. + token + The stream id number links a data trace on a plot with + a stream. See https://chart-studio.plotly.com/settings + for more details. + """ + + def __init__(self, arg=None, maxpoints=None, token=None, **kwargs): + """ + Construct a new Stream object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.candlestick.Stream` + maxpoints + Sets the maximum number of points to keep on the plots + from an incoming stream. If `maxpoints` is set to 50, + only the newest 50 points will be displayed on the + plot. + token + The stream id number links a data trace on a plot with + a stream. See https://chart-studio.plotly.com/settings + for more details. + + Returns + ------- + Stream + """ + super().__init__("stream") + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + if arg is None: + arg = {} + elif isinstance(arg, self.__class__): + arg = arg.to_plotly_json() + elif isinstance(arg, dict): + arg = _copy.copy(arg) + else: + raise ValueError("""\ +The first argument to the plotly.graph_objs.candlestick.Stream +constructor must be a dict or +an instance of :class:`plotly.graph_objs.candlestick.Stream`""") + + self._skip_invalid = kwargs.pop("skip_invalid", False) + self._validate = kwargs.pop("_validate", True) + + self._set_property("maxpoints", arg, maxpoints) + self._set_property("token", arg, token) + self._process_kwargs(**dict(arg, **kwargs)) + self._skip_invalid = False diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/candlestick/decreasing/.___init__.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/candlestick/decreasing/.___init__.py new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/candlestick/decreasing/.___init__.py differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/candlestick/decreasing/.___pycache__ b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/candlestick/decreasing/.___pycache__ new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/candlestick/decreasing/.___pycache__ differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/candlestick/decreasing/.__line.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/candlestick/decreasing/.__line.py new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/candlestick/decreasing/.__line.py differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/candlestick/decreasing/__init__.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/candlestick/decreasing/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..33e42c007335e876d1a3c1d78cec108c9248c1c9 --- /dev/null +++ b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/candlestick/decreasing/__init__.py @@ -0,0 +1,9 @@ +import sys +from typing import TYPE_CHECKING + +if TYPE_CHECKING: + from ._line import Line +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import(__name__, [], ["._line.Line"]) diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/candlestick/decreasing/_line.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/candlestick/decreasing/_line.py new file mode 100644 index 0000000000000000000000000000000000000000..4e0f2e0260e38c048a88bd7527acc6b9b69f8c69 --- /dev/null +++ b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/candlestick/decreasing/_line.py @@ -0,0 +1,104 @@ +# --- THIS FILE IS AUTO-GENERATED --- +# Modifications will be overwitten the next time code generation run. + +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Line(_BaseTraceHierarchyType): + _parent_path_str = "candlestick.decreasing" + _path_str = "candlestick.decreasing.line" + _valid_props = {"color", "width"} + + @property + def color(self): + """ + Sets the color of line bounding the box(es). + + The 'color' property is a color and may be specified as: + - A hex string (e.g. '#ff0000') + - An rgb/rgba string (e.g. 'rgb(255,0,0)') + - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') + - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') + - A named CSS color: see https://plotly.com/python/css-colors/ for a list + + Returns + ------- + str + """ + return self["color"] + + @color.setter + def color(self, val): + self["color"] = val + + @property + def width(self): + """ + Sets the width (in px) of line bounding the box(es). + + The 'width' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["width"] + + @width.setter + def width(self, val): + self["width"] = val + + @property + def _prop_descriptions(self): + return """\ + color + Sets the color of line bounding the box(es). + width + Sets the width (in px) of line bounding the box(es). + """ + + def __init__(self, arg=None, color=None, width=None, **kwargs): + """ + Construct a new Line object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.candlestick.decreasing.Line` + color + Sets the color of line bounding the box(es). + width + Sets the width (in px) of line bounding the box(es). + + Returns + ------- + Line + """ + super().__init__("line") + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + if arg is None: + arg = {} + elif isinstance(arg, self.__class__): + arg = arg.to_plotly_json() + elif isinstance(arg, dict): + arg = _copy.copy(arg) + else: + raise ValueError("""\ +The first argument to the plotly.graph_objs.candlestick.decreasing.Line +constructor must be a dict or +an instance of :class:`plotly.graph_objs.candlestick.decreasing.Line`""") + + self._skip_invalid = kwargs.pop("skip_invalid", False) + self._validate = kwargs.pop("_validate", True) + + self._set_property("color", arg, color) + self._set_property("width", arg, width) + self._process_kwargs(**dict(arg, **kwargs)) + self._skip_invalid = False diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/candlestick/hoverlabel/.___init__.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/candlestick/hoverlabel/.___init__.py new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/candlestick/hoverlabel/.___init__.py differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/candlestick/hoverlabel/.___pycache__ b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/candlestick/hoverlabel/.___pycache__ new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/candlestick/hoverlabel/.___pycache__ differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/candlestick/hoverlabel/.__font.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/candlestick/hoverlabel/.__font.py new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/candlestick/hoverlabel/.__font.py differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/candlestick/hoverlabel/__init__.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/candlestick/hoverlabel/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..56f600d3458c41f269053307377e9707ab13e090 --- /dev/null +++ b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/candlestick/hoverlabel/__init__.py @@ -0,0 +1,9 @@ +import sys +from typing import TYPE_CHECKING + +if TYPE_CHECKING: + from ._font import Font +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import(__name__, [], ["._font.Font"]) diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/candlestick/hoverlabel/_font.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/candlestick/hoverlabel/_font.py new file mode 100644 index 0000000000000000000000000000000000000000..86e1b5ad71bc2a9550439d765d2a2ebba7762c54 --- /dev/null +++ b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/candlestick/hoverlabel/_font.py @@ -0,0 +1,587 @@ +# --- THIS FILE IS AUTO-GENERATED --- +# Modifications will be overwitten the next time code generation run. + +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Font(_BaseTraceHierarchyType): + _parent_path_str = "candlestick.hoverlabel" + _path_str = "candlestick.hoverlabel.font" + _valid_props = { + "color", + "colorsrc", + "family", + "familysrc", + "lineposition", + "linepositionsrc", + "shadow", + "shadowsrc", + "size", + "sizesrc", + "style", + "stylesrc", + "textcase", + "textcasesrc", + "variant", + "variantsrc", + "weight", + "weightsrc", + } + + @property + def color(self): + """ + The 'color' property is a color and may be specified as: + - A hex string (e.g. '#ff0000') + - An rgb/rgba string (e.g. 'rgb(255,0,0)') + - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') + - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') + - A named CSS color: see https://plotly.com/python/css-colors/ for a list + - A list or array of any of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["color"] + + @color.setter + def color(self, val): + self["color"] = val + + @property + def colorsrc(self): + """ + Sets the source reference on Chart Studio Cloud for `color`. + + The 'colorsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["colorsrc"] + + @colorsrc.setter + def colorsrc(self, val): + self["colorsrc"] = val + + @property + def family(self): + """ + HTML font family - the typeface that will be applied by the web + browser. The web browser can only apply a font if it is + available on the system where it runs. Provide multiple font + families, separated by commas, to indicate the order in which + to apply fonts if they aren't available. + + The 'family' property is a string and must be specified as: + - A non-empty string + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["family"] + + @family.setter + def family(self, val): + self["family"] = val + + @property + def familysrc(self): + """ + Sets the source reference on Chart Studio Cloud for `family`. + + The 'familysrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["familysrc"] + + @familysrc.setter + def familysrc(self, val): + self["familysrc"] = val + + @property + def lineposition(self): + """ + Sets the kind of decoration line(s) with text, such as an + "under", "over" or "through" as well as combinations e.g. + "under+over", etc. + + The 'lineposition' property is a flaglist and may be specified + as a string containing: + - Any combination of ['under', 'over', 'through'] joined with '+' characters + (e.g. 'under+over') + OR exactly one of ['none'] (e.g. 'none') + - A list or array of the above + + Returns + ------- + Any|numpy.ndarray + """ + return self["lineposition"] + + @lineposition.setter + def lineposition(self, val): + self["lineposition"] = val + + @property + def linepositionsrc(self): + """ + Sets the source reference on Chart Studio Cloud for + `lineposition`. + + The 'linepositionsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["linepositionsrc"] + + @linepositionsrc.setter + def linepositionsrc(self, val): + self["linepositionsrc"] = val + + @property + def shadow(self): + """ + Sets the shape and color of the shadow behind text. "auto" + places minimal shadow and applies contrast text font color. See + https://developer.mozilla.org/en-US/docs/Web/CSS/text-shadow + for additional options. + + The 'shadow' property is a string and must be specified as: + - A string + - A number that will be converted to a string + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["shadow"] + + @shadow.setter + def shadow(self, val): + self["shadow"] = val + + @property + def shadowsrc(self): + """ + Sets the source reference on Chart Studio Cloud for `shadow`. + + The 'shadowsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["shadowsrc"] + + @shadowsrc.setter + def shadowsrc(self, val): + self["shadowsrc"] = val + + @property + def size(self): + """ + The 'size' property is a number and may be specified as: + - An int or float in the interval [1, inf] + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + int|float|numpy.ndarray + """ + return self["size"] + + @size.setter + def size(self, val): + self["size"] = val + + @property + def sizesrc(self): + """ + Sets the source reference on Chart Studio Cloud for `size`. + + The 'sizesrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["sizesrc"] + + @sizesrc.setter + def sizesrc(self, val): + self["sizesrc"] = val + + @property + def style(self): + """ + Sets whether a font should be styled with a normal or italic + face from its family. + + The 'style' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['normal', 'italic'] + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + Any|numpy.ndarray + """ + return self["style"] + + @style.setter + def style(self, val): + self["style"] = val + + @property + def stylesrc(self): + """ + Sets the source reference on Chart Studio Cloud for `style`. + + The 'stylesrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["stylesrc"] + + @stylesrc.setter + def stylesrc(self, val): + self["stylesrc"] = val + + @property + def textcase(self): + """ + Sets capitalization of text. It can be used to make text appear + in all-uppercase or all-lowercase, or with each word + capitalized. + + The 'textcase' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['normal', 'word caps', 'upper', 'lower'] + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + Any|numpy.ndarray + """ + return self["textcase"] + + @textcase.setter + def textcase(self, val): + self["textcase"] = val + + @property + def textcasesrc(self): + """ + Sets the source reference on Chart Studio Cloud for `textcase`. + + The 'textcasesrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["textcasesrc"] + + @textcasesrc.setter + def textcasesrc(self, val): + self["textcasesrc"] = val + + @property + def variant(self): + """ + Sets the variant of the font. + + The 'variant' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['normal', 'small-caps', 'all-small-caps', + 'all-petite-caps', 'petite-caps', 'unicase'] + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + Any|numpy.ndarray + """ + return self["variant"] + + @variant.setter + def variant(self, val): + self["variant"] = val + + @property + def variantsrc(self): + """ + Sets the source reference on Chart Studio Cloud for `variant`. + + The 'variantsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["variantsrc"] + + @variantsrc.setter + def variantsrc(self, val): + self["variantsrc"] = val + + @property + def weight(self): + """ + Sets the weight (or boldness) of the font. + + The 'weight' property is a integer and may be specified as: + - An int (or float that will be cast to an int) + in the interval [1, 1000] + OR exactly one of ['normal', 'bold'] (e.g. 'bold') + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + int|numpy.ndarray + """ + return self["weight"] + + @weight.setter + def weight(self, val): + self["weight"] = val + + @property + def weightsrc(self): + """ + Sets the source reference on Chart Studio Cloud for `weight`. + + The 'weightsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["weightsrc"] + + @weightsrc.setter + def weightsrc(self, val): + self["weightsrc"] = val + + @property + def _prop_descriptions(self): + return """\ + color + + colorsrc + Sets the source reference on Chart Studio Cloud for + `color`. + family + HTML font family - the typeface that will be applied by + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. + familysrc + Sets the source reference on Chart Studio Cloud for + `family`. + lineposition + Sets the kind of decoration line(s) with text, such as + an "under", "over" or "through" as well as combinations + e.g. "under+over", etc. + linepositionsrc + Sets the source reference on Chart Studio Cloud for + `lineposition`. + shadow + Sets the shape and color of the shadow behind text. + "auto" places minimal shadow and applies contrast text + font color. See https://developer.mozilla.org/en- + US/docs/Web/CSS/text-shadow for additional options. + shadowsrc + Sets the source reference on Chart Studio Cloud for + `shadow`. + size + + sizesrc + Sets the source reference on Chart Studio Cloud for + `size`. + style + Sets whether a font should be styled with a normal or + italic face from its family. + stylesrc + Sets the source reference on Chart Studio Cloud for + `style`. + textcase + Sets capitalization of text. It can be used to make + text appear in all-uppercase or all-lowercase, or with + each word capitalized. + textcasesrc + Sets the source reference on Chart Studio Cloud for + `textcase`. + variant + Sets the variant of the font. + variantsrc + Sets the source reference on Chart Studio Cloud for + `variant`. + weight + Sets the weight (or boldness) of the font. + weightsrc + Sets the source reference on Chart Studio Cloud for + `weight`. + """ + + def __init__( + self, + arg=None, + color=None, + colorsrc=None, + family=None, + familysrc=None, + lineposition=None, + linepositionsrc=None, + shadow=None, + shadowsrc=None, + size=None, + sizesrc=None, + style=None, + stylesrc=None, + textcase=None, + textcasesrc=None, + variant=None, + variantsrc=None, + weight=None, + weightsrc=None, + **kwargs, + ): + """ + Construct a new Font object + + Sets the font used in hover labels. + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.candlestick.hoverlabel.Font` + color + + colorsrc + Sets the source reference on Chart Studio Cloud for + `color`. + family + HTML font family - the typeface that will be applied by + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. + familysrc + Sets the source reference on Chart Studio Cloud for + `family`. + lineposition + Sets the kind of decoration line(s) with text, such as + an "under", "over" or "through" as well as combinations + e.g. "under+over", etc. + linepositionsrc + Sets the source reference on Chart Studio Cloud for + `lineposition`. + shadow + Sets the shape and color of the shadow behind text. + "auto" places minimal shadow and applies contrast text + font color. See https://developer.mozilla.org/en- + US/docs/Web/CSS/text-shadow for additional options. + shadowsrc + Sets the source reference on Chart Studio Cloud for + `shadow`. + size + + sizesrc + Sets the source reference on Chart Studio Cloud for + `size`. + style + Sets whether a font should be styled with a normal or + italic face from its family. + stylesrc + Sets the source reference on Chart Studio Cloud for + `style`. + textcase + Sets capitalization of text. It can be used to make + text appear in all-uppercase or all-lowercase, or with + each word capitalized. + textcasesrc + Sets the source reference on Chart Studio Cloud for + `textcase`. + variant + Sets the variant of the font. + variantsrc + Sets the source reference on Chart Studio Cloud for + `variant`. + weight + Sets the weight (or boldness) of the font. + weightsrc + Sets the source reference on Chart Studio Cloud for + `weight`. + + Returns + ------- + Font + """ + super().__init__("font") + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + if arg is None: + arg = {} + elif isinstance(arg, self.__class__): + arg = arg.to_plotly_json() + elif isinstance(arg, dict): + arg = _copy.copy(arg) + else: + raise ValueError("""\ +The first argument to the plotly.graph_objs.candlestick.hoverlabel.Font +constructor must be a dict or +an instance of :class:`plotly.graph_objs.candlestick.hoverlabel.Font`""") + + self._skip_invalid = kwargs.pop("skip_invalid", False) + self._validate = kwargs.pop("_validate", True) + + self._set_property("color", arg, color) + self._set_property("colorsrc", arg, colorsrc) + self._set_property("family", arg, family) + self._set_property("familysrc", arg, familysrc) + self._set_property("lineposition", arg, lineposition) + self._set_property("linepositionsrc", arg, linepositionsrc) + self._set_property("shadow", arg, shadow) + self._set_property("shadowsrc", arg, shadowsrc) + self._set_property("size", arg, size) + self._set_property("sizesrc", arg, sizesrc) + self._set_property("style", arg, style) + self._set_property("stylesrc", arg, stylesrc) + self._set_property("textcase", arg, textcase) + self._set_property("textcasesrc", arg, textcasesrc) + self._set_property("variant", arg, variant) + self._set_property("variantsrc", arg, variantsrc) + self._set_property("weight", arg, weight) + self._set_property("weightsrc", arg, weightsrc) + self._process_kwargs(**dict(arg, **kwargs)) + self._skip_invalid = False diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/candlestick/increasing/.___init__.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/candlestick/increasing/.___init__.py new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/candlestick/increasing/.___init__.py differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/candlestick/increasing/.___pycache__ b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/candlestick/increasing/.___pycache__ new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/candlestick/increasing/.___pycache__ differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/candlestick/increasing/.__line.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/candlestick/increasing/.__line.py new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/candlestick/increasing/.__line.py differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/candlestick/increasing/__init__.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/candlestick/increasing/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..33e42c007335e876d1a3c1d78cec108c9248c1c9 --- /dev/null +++ b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/candlestick/increasing/__init__.py @@ -0,0 +1,9 @@ +import sys +from typing import TYPE_CHECKING + +if TYPE_CHECKING: + from ._line import Line +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import(__name__, [], ["._line.Line"]) diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/candlestick/increasing/_line.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/candlestick/increasing/_line.py new file mode 100644 index 0000000000000000000000000000000000000000..964d07d81ccb5d6db37679e0a580a8846e39ea78 --- /dev/null +++ b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/candlestick/increasing/_line.py @@ -0,0 +1,104 @@ +# --- THIS FILE IS AUTO-GENERATED --- +# Modifications will be overwitten the next time code generation run. + +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Line(_BaseTraceHierarchyType): + _parent_path_str = "candlestick.increasing" + _path_str = "candlestick.increasing.line" + _valid_props = {"color", "width"} + + @property + def color(self): + """ + Sets the color of line bounding the box(es). + + The 'color' property is a color and may be specified as: + - A hex string (e.g. '#ff0000') + - An rgb/rgba string (e.g. 'rgb(255,0,0)') + - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') + - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') + - A named CSS color: see https://plotly.com/python/css-colors/ for a list + + Returns + ------- + str + """ + return self["color"] + + @color.setter + def color(self, val): + self["color"] = val + + @property + def width(self): + """ + Sets the width (in px) of line bounding the box(es). + + The 'width' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["width"] + + @width.setter + def width(self, val): + self["width"] = val + + @property + def _prop_descriptions(self): + return """\ + color + Sets the color of line bounding the box(es). + width + Sets the width (in px) of line bounding the box(es). + """ + + def __init__(self, arg=None, color=None, width=None, **kwargs): + """ + Construct a new Line object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.candlestick.increasing.Line` + color + Sets the color of line bounding the box(es). + width + Sets the width (in px) of line bounding the box(es). + + Returns + ------- + Line + """ + super().__init__("line") + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + if arg is None: + arg = {} + elif isinstance(arg, self.__class__): + arg = arg.to_plotly_json() + elif isinstance(arg, dict): + arg = _copy.copy(arg) + else: + raise ValueError("""\ +The first argument to the plotly.graph_objs.candlestick.increasing.Line +constructor must be a dict or +an instance of :class:`plotly.graph_objs.candlestick.increasing.Line`""") + + self._skip_invalid = kwargs.pop("skip_invalid", False) + self._validate = kwargs.pop("_validate", True) + + self._set_property("color", arg, color) + self._set_property("width", arg, width) + self._process_kwargs(**dict(arg, **kwargs)) + self._skip_invalid = False diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/candlestick/legendgrouptitle/.___init__.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/candlestick/legendgrouptitle/.___init__.py new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/candlestick/legendgrouptitle/.___init__.py differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/candlestick/legendgrouptitle/.___pycache__ b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/candlestick/legendgrouptitle/.___pycache__ new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/candlestick/legendgrouptitle/.___pycache__ differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/candlestick/legendgrouptitle/.__font.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/candlestick/legendgrouptitle/.__font.py new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/candlestick/legendgrouptitle/.__font.py differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/candlestick/legendgrouptitle/__init__.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/candlestick/legendgrouptitle/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..56f600d3458c41f269053307377e9707ab13e090 --- /dev/null +++ b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/candlestick/legendgrouptitle/__init__.py @@ -0,0 +1,9 @@ +import sys +from typing import TYPE_CHECKING + +if TYPE_CHECKING: + from ._font import Font +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import(__name__, [], ["._font.Font"]) diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/candlestick/legendgrouptitle/_font.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/candlestick/legendgrouptitle/_font.py new file mode 100644 index 0000000000000000000000000000000000000000..3026f85f528666e58baa69a9641a24722f0e47a1 --- /dev/null +++ b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/candlestick/legendgrouptitle/_font.py @@ -0,0 +1,334 @@ +# --- THIS FILE IS AUTO-GENERATED --- +# Modifications will be overwitten the next time code generation run. + +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Font(_BaseTraceHierarchyType): + _parent_path_str = "candlestick.legendgrouptitle" + _path_str = "candlestick.legendgrouptitle.font" + _valid_props = { + "color", + "family", + "lineposition", + "shadow", + "size", + "style", + "textcase", + "variant", + "weight", + } + + @property + def color(self): + """ + The 'color' property is a color and may be specified as: + - A hex string (e.g. '#ff0000') + - An rgb/rgba string (e.g. 'rgb(255,0,0)') + - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') + - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') + - A named CSS color: see https://plotly.com/python/css-colors/ for a list + + Returns + ------- + str + """ + return self["color"] + + @color.setter + def color(self, val): + self["color"] = val + + @property + def family(self): + """ + HTML font family - the typeface that will be applied by the web + browser. The web browser can only apply a font if it is + available on the system where it runs. Provide multiple font + families, separated by commas, to indicate the order in which + to apply fonts if they aren't available. + + The 'family' property is a string and must be specified as: + - A non-empty string + + Returns + ------- + str + """ + return self["family"] + + @family.setter + def family(self, val): + self["family"] = val + + @property + def lineposition(self): + """ + Sets the kind of decoration line(s) with text, such as an + "under", "over" or "through" as well as combinations e.g. + "under+over", etc. + + The 'lineposition' property is a flaglist and may be specified + as a string containing: + - Any combination of ['under', 'over', 'through'] joined with '+' characters + (e.g. 'under+over') + OR exactly one of ['none'] (e.g. 'none') + + Returns + ------- + Any + """ + return self["lineposition"] + + @lineposition.setter + def lineposition(self, val): + self["lineposition"] = val + + @property + def shadow(self): + """ + Sets the shape and color of the shadow behind text. "auto" + places minimal shadow and applies contrast text font color. See + https://developer.mozilla.org/en-US/docs/Web/CSS/text-shadow + for additional options. + + The 'shadow' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["shadow"] + + @shadow.setter + def shadow(self, val): + self["shadow"] = val + + @property + def size(self): + """ + The 'size' property is a number and may be specified as: + - An int or float in the interval [1, inf] + + Returns + ------- + int|float + """ + return self["size"] + + @size.setter + def size(self, val): + self["size"] = val + + @property + def style(self): + """ + Sets whether a font should be styled with a normal or italic + face from its family. + + The 'style' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['normal', 'italic'] + + Returns + ------- + Any + """ + return self["style"] + + @style.setter + def style(self, val): + self["style"] = val + + @property + def textcase(self): + """ + Sets capitalization of text. It can be used to make text appear + in all-uppercase or all-lowercase, or with each word + capitalized. + + The 'textcase' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['normal', 'word caps', 'upper', 'lower'] + + Returns + ------- + Any + """ + return self["textcase"] + + @textcase.setter + def textcase(self, val): + self["textcase"] = val + + @property + def variant(self): + """ + Sets the variant of the font. + + The 'variant' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['normal', 'small-caps', 'all-small-caps', + 'all-petite-caps', 'petite-caps', 'unicase'] + + Returns + ------- + Any + """ + return self["variant"] + + @variant.setter + def variant(self, val): + self["variant"] = val + + @property + def weight(self): + """ + Sets the weight (or boldness) of the font. + + The 'weight' property is a integer and may be specified as: + - An int (or float that will be cast to an int) + in the interval [1, 1000] + OR exactly one of ['normal', 'bold'] (e.g. 'bold') + + Returns + ------- + int + """ + return self["weight"] + + @weight.setter + def weight(self, val): + self["weight"] = val + + @property + def _prop_descriptions(self): + return """\ + color + + family + HTML font family - the typeface that will be applied by + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. + lineposition + Sets the kind of decoration line(s) with text, such as + an "under", "over" or "through" as well as combinations + e.g. "under+over", etc. + shadow + Sets the shape and color of the shadow behind text. + "auto" places minimal shadow and applies contrast text + font color. See https://developer.mozilla.org/en- + US/docs/Web/CSS/text-shadow for additional options. + size + + style + Sets whether a font should be styled with a normal or + italic face from its family. + textcase + Sets capitalization of text. It can be used to make + text appear in all-uppercase or all-lowercase, or with + each word capitalized. + variant + Sets the variant of the font. + weight + Sets the weight (or boldness) of the font. + """ + + def __init__( + self, + arg=None, + color=None, + family=None, + lineposition=None, + shadow=None, + size=None, + style=None, + textcase=None, + variant=None, + weight=None, + **kwargs, + ): + """ + Construct a new Font object + + Sets this legend group's title font. + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of :class:`plotly.graph_objs.candlestick.le + gendgrouptitle.Font` + color + + family + HTML font family - the typeface that will be applied by + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. + lineposition + Sets the kind of decoration line(s) with text, such as + an "under", "over" or "through" as well as combinations + e.g. "under+over", etc. + shadow + Sets the shape and color of the shadow behind text. + "auto" places minimal shadow and applies contrast text + font color. See https://developer.mozilla.org/en- + US/docs/Web/CSS/text-shadow for additional options. + size + + style + Sets whether a font should be styled with a normal or + italic face from its family. + textcase + Sets capitalization of text. It can be used to make + text appear in all-uppercase or all-lowercase, or with + each word capitalized. + variant + Sets the variant of the font. + weight + Sets the weight (or boldness) of the font. + + Returns + ------- + Font + """ + super().__init__("font") + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + if arg is None: + arg = {} + elif isinstance(arg, self.__class__): + arg = arg.to_plotly_json() + elif isinstance(arg, dict): + arg = _copy.copy(arg) + else: + raise ValueError("""\ +The first argument to the plotly.graph_objs.candlestick.legendgrouptitle.Font +constructor must be a dict or +an instance of :class:`plotly.graph_objs.candlestick.legendgrouptitle.Font`""") + + self._skip_invalid = kwargs.pop("skip_invalid", False) + self._validate = kwargs.pop("_validate", True) + + self._set_property("color", arg, color) + self._set_property("family", arg, family) + self._set_property("lineposition", arg, lineposition) + self._set_property("shadow", arg, shadow) + self._set_property("size", arg, size) + self._set_property("style", arg, style) + self._set_property("textcase", arg, textcase) + self._set_property("variant", arg, variant) + self._set_property("weight", arg, weight) + self._process_kwargs(**dict(arg, **kwargs)) + self._skip_invalid = False diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/carpet/.___init__.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/carpet/.___init__.py new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/carpet/.___init__.py differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/carpet/.___pycache__ b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/carpet/.___pycache__ new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/carpet/.___pycache__ differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/carpet/.__aaxis.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/carpet/.__aaxis.py new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/carpet/.__aaxis.py differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/carpet/.__baxis.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/carpet/.__baxis.py new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/carpet/.__baxis.py differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/carpet/.__font.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/carpet/.__font.py new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/carpet/.__font.py differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/carpet/.__legendgrouptitle.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/carpet/.__legendgrouptitle.py new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/carpet/.__legendgrouptitle.py differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/carpet/.__stream.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/carpet/.__stream.py new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/carpet/.__stream.py differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/carpet/._aaxis b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/carpet/._aaxis new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/carpet/._aaxis differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/carpet/._baxis b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/carpet/._baxis new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/carpet/._baxis differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/carpet/._legendgrouptitle b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/carpet/._legendgrouptitle new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/carpet/._legendgrouptitle differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/carpet/__init__.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/carpet/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..38c554d4e051256e19bb356f6010e8b466096721 --- /dev/null +++ b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/carpet/__init__.py @@ -0,0 +1,26 @@ +import sys +from typing import TYPE_CHECKING + +if TYPE_CHECKING: + from ._aaxis import Aaxis + from ._baxis import Baxis + from ._font import Font + from ._legendgrouptitle import Legendgrouptitle + from ._stream import Stream + from . import aaxis + from . import baxis + from . import legendgrouptitle +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [".aaxis", ".baxis", ".legendgrouptitle"], + [ + "._aaxis.Aaxis", + "._baxis.Baxis", + "._font.Font", + "._legendgrouptitle.Legendgrouptitle", + "._stream.Stream", + ], + ) diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/carpet/_aaxis.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/carpet/_aaxis.py new file mode 100644 index 0000000000000000000000000000000000000000..978ff2da3104dbbf3d4bf85463a320c211d29298 --- /dev/null +++ b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/carpet/_aaxis.py @@ -0,0 +1,1850 @@ +# --- THIS FILE IS AUTO-GENERATED --- +# Modifications will be overwitten the next time code generation run. + +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Aaxis(_BaseTraceHierarchyType): + _parent_path_str = "carpet" + _path_str = "carpet.aaxis" + _valid_props = { + "arraydtick", + "arraytick0", + "autorange", + "autotypenumbers", + "categoryarray", + "categoryarraysrc", + "categoryorder", + "cheatertype", + "color", + "dtick", + "endline", + "endlinecolor", + "endlinewidth", + "exponentformat", + "fixedrange", + "gridcolor", + "griddash", + "gridwidth", + "labelalias", + "labelpadding", + "labelprefix", + "labelsuffix", + "linecolor", + "linewidth", + "minexponent", + "minorgridcolor", + "minorgridcount", + "minorgriddash", + "minorgridwidth", + "nticks", + "range", + "rangemode", + "separatethousands", + "showexponent", + "showgrid", + "showline", + "showticklabels", + "showtickprefix", + "showticksuffix", + "smoothing", + "startline", + "startlinecolor", + "startlinewidth", + "tick0", + "tickangle", + "tickfont", + "tickformat", + "tickformatstopdefaults", + "tickformatstops", + "tickmode", + "tickprefix", + "ticksuffix", + "ticktext", + "ticktextsrc", + "tickvals", + "tickvalssrc", + "title", + "type", + } + + @property + def arraydtick(self): + """ + The stride between grid lines along the axis + + The 'arraydtick' property is a integer and may be specified as: + - An int (or float that will be cast to an int) + in the interval [1, 9223372036854775807] + + Returns + ------- + int + """ + return self["arraydtick"] + + @arraydtick.setter + def arraydtick(self, val): + self["arraydtick"] = val + + @property + def arraytick0(self): + """ + The starting index of grid lines along the axis + + The 'arraytick0' property is a integer and may be specified as: + - An int (or float that will be cast to an int) + in the interval [0, 9223372036854775807] + + Returns + ------- + int + """ + return self["arraytick0"] + + @arraytick0.setter + def arraytick0(self, val): + self["arraytick0"] = val + + @property + def autorange(self): + """ + Determines whether or not the range of this axis is computed in + relation to the input data. See `rangemode` for more info. If + `range` is provided, then `autorange` is set to False. + + The 'autorange' property is an enumeration that may be specified as: + - One of the following enumeration values: + [True, False, 'reversed'] + + Returns + ------- + Any + """ + return self["autorange"] + + @autorange.setter + def autorange(self, val): + self["autorange"] = val + + @property + def autotypenumbers(self): + """ + Using "strict" a numeric string in trace data is not converted + to a number. Using *convert types* a numeric string in trace + data may be treated as a number during automatic axis `type` + detection. Defaults to layout.autotypenumbers. + + The 'autotypenumbers' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['convert types', 'strict'] + + Returns + ------- + Any + """ + return self["autotypenumbers"] + + @autotypenumbers.setter + def autotypenumbers(self, val): + self["autotypenumbers"] = val + + @property + def categoryarray(self): + """ + Sets the order in which categories on this axis appear. Only + has an effect if `categoryorder` is set to "array". Used with + `categoryorder`. + + The 'categoryarray' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["categoryarray"] + + @categoryarray.setter + def categoryarray(self, val): + self["categoryarray"] = val + + @property + def categoryarraysrc(self): + """ + Sets the source reference on Chart Studio Cloud for + `categoryarray`. + + The 'categoryarraysrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["categoryarraysrc"] + + @categoryarraysrc.setter + def categoryarraysrc(self, val): + self["categoryarraysrc"] = val + + @property + def categoryorder(self): + """ + Specifies the ordering logic for the case of categorical + variables. By default, plotly uses "trace", which specifies the + order that is present in the data supplied. Set `categoryorder` + to *category ascending* or *category descending* if order + should be determined by the alphanumerical order of the + category names. Set `categoryorder` to "array" to derive the + ordering from the attribute `categoryarray`. If a category is + not found in the `categoryarray` array, the sorting behavior + for that attribute will be identical to the "trace" mode. The + unspecified categories will follow the categories in + `categoryarray`. + + The 'categoryorder' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['trace', 'category ascending', 'category descending', + 'array'] + + Returns + ------- + Any + """ + return self["categoryorder"] + + @categoryorder.setter + def categoryorder(self, val): + self["categoryorder"] = val + + @property + def cheatertype(self): + """ + The 'cheatertype' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['index', 'value'] + + Returns + ------- + Any + """ + return self["cheatertype"] + + @cheatertype.setter + def cheatertype(self, val): + self["cheatertype"] = val + + @property + def color(self): + """ + Sets default for all colors associated with this axis all at + once: line, font, tick, and grid colors. Grid color is + lightened by blending this with the plot background Individual + pieces can override this. + + The 'color' property is a color and may be specified as: + - A hex string (e.g. '#ff0000') + - An rgb/rgba string (e.g. 'rgb(255,0,0)') + - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') + - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') + - A named CSS color: see https://plotly.com/python/css-colors/ for a list + + Returns + ------- + str + """ + return self["color"] + + @color.setter + def color(self, val): + self["color"] = val + + @property + def dtick(self): + """ + The stride between grid lines along the axis + + The 'dtick' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["dtick"] + + @dtick.setter + def dtick(self, val): + self["dtick"] = val + + @property + def endline(self): + """ + Determines whether or not a line is drawn at along the final + value of this axis. If True, the end line is drawn on top of + the grid lines. + + The 'endline' property is a boolean and must be specified as: + - A boolean value: True or False + + Returns + ------- + bool + """ + return self["endline"] + + @endline.setter + def endline(self, val): + self["endline"] = val + + @property + def endlinecolor(self): + """ + Sets the line color of the end line. + + The 'endlinecolor' property is a color and may be specified as: + - A hex string (e.g. '#ff0000') + - An rgb/rgba string (e.g. 'rgb(255,0,0)') + - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') + - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') + - A named CSS color: see https://plotly.com/python/css-colors/ for a list + + Returns + ------- + str + """ + return self["endlinecolor"] + + @endlinecolor.setter + def endlinecolor(self, val): + self["endlinecolor"] = val + + @property + def endlinewidth(self): + """ + Sets the width (in px) of the end line. + + The 'endlinewidth' property is a number and may be specified as: + - An int or float + + Returns + ------- + int|float + """ + return self["endlinewidth"] + + @endlinewidth.setter + def endlinewidth(self, val): + self["endlinewidth"] = val + + @property + def exponentformat(self): + """ + Determines a formatting rule for the tick exponents. For + example, consider the number 1,000,000,000. If "none", it + appears as 1,000,000,000. If "e", 1e+9. If "E", 1E+9. If + "power", 1x10^9 (with 9 in a super script). If "SI", 1G. If + "B", 1B. + + The 'exponentformat' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['none', 'e', 'E', 'power', 'SI', 'B', 'SI extended'] + + Returns + ------- + Any + """ + return self["exponentformat"] + + @exponentformat.setter + def exponentformat(self, val): + self["exponentformat"] = val + + @property + def fixedrange(self): + """ + Determines whether or not this axis is zoom-able. If true, then + zoom is disabled. + + The 'fixedrange' property is a boolean and must be specified as: + - A boolean value: True or False + + Returns + ------- + bool + """ + return self["fixedrange"] + + @fixedrange.setter + def fixedrange(self, val): + self["fixedrange"] = val + + @property + def gridcolor(self): + """ + Sets the axis line color. + + The 'gridcolor' property is a color and may be specified as: + - A hex string (e.g. '#ff0000') + - An rgb/rgba string (e.g. 'rgb(255,0,0)') + - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') + - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') + - A named CSS color: see https://plotly.com/python/css-colors/ for a list + + Returns + ------- + str + """ + return self["gridcolor"] + + @gridcolor.setter + def gridcolor(self, val): + self["gridcolor"] = val + + @property + def griddash(self): + """ + Sets the dash style of lines. Set to a dash type string + ("solid", "dot", "dash", "longdash", "dashdot", or + "longdashdot") or a dash length list in px (eg + "5px,10px,2px,2px"). + + The 'griddash' property is an enumeration that may be specified as: + - One of the following dash styles: + ['solid', 'dot', 'dash', 'longdash', 'dashdot', 'longdashdot'] + - A string containing a dash length list in pixels or percentages + (e.g. '5px 10px 2px 2px', '5, 10, 2, 2', '10% 20% 40%', etc.) + + Returns + ------- + str + """ + return self["griddash"] + + @griddash.setter + def griddash(self, val): + self["griddash"] = val + + @property + def gridwidth(self): + """ + Sets the width (in px) of the axis line. + + The 'gridwidth' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["gridwidth"] + + @gridwidth.setter + def gridwidth(self, val): + self["gridwidth"] = val + + @property + def labelalias(self): + """ + Replacement text for specific tick or hover labels. For example + using {US: 'USA', CA: 'Canada'} changes US to USA and CA to + Canada. The labels we would have shown must match the keys + exactly, after adding any tickprefix or ticksuffix. For + negative numbers the minus sign symbol used (U+2212) is wider + than the regular ascii dash. That means you need to use −1 + instead of -1. labelalias can be used with any axis type, and + both keys (if needed) and values (if desired) can include html- + like tags or MathJax. + + The 'labelalias' property accepts values of any type + + Returns + ------- + Any + """ + return self["labelalias"] + + @labelalias.setter + def labelalias(self, val): + self["labelalias"] = val + + @property + def labelpadding(self): + """ + Extra padding between label and the axis + + The 'labelpadding' property is a integer and may be specified as: + - An int (or float that will be cast to an int) + + Returns + ------- + int + """ + return self["labelpadding"] + + @labelpadding.setter + def labelpadding(self, val): + self["labelpadding"] = val + + @property + def labelprefix(self): + """ + Sets a axis label prefix. + + The 'labelprefix' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["labelprefix"] + + @labelprefix.setter + def labelprefix(self, val): + self["labelprefix"] = val + + @property + def labelsuffix(self): + """ + Sets a axis label suffix. + + The 'labelsuffix' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["labelsuffix"] + + @labelsuffix.setter + def labelsuffix(self, val): + self["labelsuffix"] = val + + @property + def linecolor(self): + """ + Sets the axis line color. + + The 'linecolor' property is a color and may be specified as: + - A hex string (e.g. '#ff0000') + - An rgb/rgba string (e.g. 'rgb(255,0,0)') + - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') + - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') + - A named CSS color: see https://plotly.com/python/css-colors/ for a list + + Returns + ------- + str + """ + return self["linecolor"] + + @linecolor.setter + def linecolor(self, val): + self["linecolor"] = val + + @property + def linewidth(self): + """ + Sets the width (in px) of the axis line. + + The 'linewidth' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["linewidth"] + + @linewidth.setter + def linewidth(self, val): + self["linewidth"] = val + + @property + def minexponent(self): + """ + Hide SI prefix for 10^n if |n| is below this number + + The 'minexponent' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["minexponent"] + + @minexponent.setter + def minexponent(self, val): + self["minexponent"] = val + + @property + def minorgridcolor(self): + """ + Sets the color of the grid lines. + + The 'minorgridcolor' property is a color and may be specified as: + - A hex string (e.g. '#ff0000') + - An rgb/rgba string (e.g. 'rgb(255,0,0)') + - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') + - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') + - A named CSS color: see https://plotly.com/python/css-colors/ for a list + + Returns + ------- + str + """ + return self["minorgridcolor"] + + @minorgridcolor.setter + def minorgridcolor(self, val): + self["minorgridcolor"] = val + + @property + def minorgridcount(self): + """ + Sets the number of minor grid ticks per major grid tick + + The 'minorgridcount' property is a integer and may be specified as: + - An int (or float that will be cast to an int) + in the interval [0, 9223372036854775807] + + Returns + ------- + int + """ + return self["minorgridcount"] + + @minorgridcount.setter + def minorgridcount(self, val): + self["minorgridcount"] = val + + @property + def minorgriddash(self): + """ + Sets the dash style of lines. Set to a dash type string + ("solid", "dot", "dash", "longdash", "dashdot", or + "longdashdot") or a dash length list in px (eg + "5px,10px,2px,2px"). + + The 'minorgriddash' property is an enumeration that may be specified as: + - One of the following dash styles: + ['solid', 'dot', 'dash', 'longdash', 'dashdot', 'longdashdot'] + - A string containing a dash length list in pixels or percentages + (e.g. '5px 10px 2px 2px', '5, 10, 2, 2', '10% 20% 40%', etc.) + + Returns + ------- + str + """ + return self["minorgriddash"] + + @minorgriddash.setter + def minorgriddash(self, val): + self["minorgriddash"] = val + + @property + def minorgridwidth(self): + """ + Sets the width (in px) of the grid lines. + + The 'minorgridwidth' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["minorgridwidth"] + + @minorgridwidth.setter + def minorgridwidth(self, val): + self["minorgridwidth"] = val + + @property + def nticks(self): + """ + Specifies the maximum number of ticks for the particular axis. + The actual number of ticks will be chosen automatically to be + less than or equal to `nticks`. Has an effect only if + `tickmode` is set to "auto". + + The 'nticks' property is a integer and may be specified as: + - An int (or float that will be cast to an int) + in the interval [0, 9223372036854775807] + + Returns + ------- + int + """ + return self["nticks"] + + @nticks.setter + def nticks(self, val): + self["nticks"] = val + + @property + def range(self): + """ + Sets the range of this axis. If the axis `type` is "log", then + you must take the log of your desired range (e.g. to set the + range from 1 to 100, set the range from 0 to 2). If the axis + `type` is "date", it should be date strings, like date data, + though Date objects and unix milliseconds will be accepted and + converted to strings. If the axis `type` is "category", it + should be numbers, using the scale where each category is + assigned a serial number from zero in the order it appears. + + The 'range' property is an info array that may be specified as: + + * a list or tuple of 2 elements where: + (0) The 'range[0]' property accepts values of any type + (1) The 'range[1]' property accepts values of any type + + Returns + ------- + list + """ + return self["range"] + + @range.setter + def range(self, val): + self["range"] = val + + @property + def rangemode(self): + """ + If "normal", the range is computed in relation to the extrema + of the input data. If "tozero", the range extends to 0, + regardless of the input data If "nonnegative", the range is + non-negative, regardless of the input data. + + The 'rangemode' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['normal', 'tozero', 'nonnegative'] + + Returns + ------- + Any + """ + return self["rangemode"] + + @rangemode.setter + def rangemode(self, val): + self["rangemode"] = val + + @property + def separatethousands(self): + """ + If "true", even 4-digit integers are separated + + The 'separatethousands' property is a boolean and must be specified as: + - A boolean value: True or False + + Returns + ------- + bool + """ + return self["separatethousands"] + + @separatethousands.setter + def separatethousands(self, val): + self["separatethousands"] = val + + @property + def showexponent(self): + """ + If "all", all exponents are shown besides their significands. + If "first", only the exponent of the first tick is shown. If + "last", only the exponent of the last tick is shown. If "none", + no exponents appear. + + The 'showexponent' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['all', 'first', 'last', 'none'] + + Returns + ------- + Any + """ + return self["showexponent"] + + @showexponent.setter + def showexponent(self, val): + self["showexponent"] = val + + @property + def showgrid(self): + """ + Determines whether or not grid lines are drawn. If True, the + grid lines are drawn at every tick mark. + + The 'showgrid' property is a boolean and must be specified as: + - A boolean value: True or False + + Returns + ------- + bool + """ + return self["showgrid"] + + @showgrid.setter + def showgrid(self, val): + self["showgrid"] = val + + @property + def showline(self): + """ + Determines whether or not a line bounding this axis is drawn. + + The 'showline' property is a boolean and must be specified as: + - A boolean value: True or False + + Returns + ------- + bool + """ + return self["showline"] + + @showline.setter + def showline(self, val): + self["showline"] = val + + @property + def showticklabels(self): + """ + Determines whether axis labels are drawn on the low side, the + high side, both, or neither side of the axis. + + The 'showticklabels' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['start', 'end', 'both', 'none'] + + Returns + ------- + Any + """ + return self["showticklabels"] + + @showticklabels.setter + def showticklabels(self, val): + self["showticklabels"] = val + + @property + def showtickprefix(self): + """ + If "all", all tick labels are displayed with a prefix. If + "first", only the first tick is displayed with a prefix. If + "last", only the last tick is displayed with a suffix. If + "none", tick prefixes are hidden. + + The 'showtickprefix' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['all', 'first', 'last', 'none'] + + Returns + ------- + Any + """ + return self["showtickprefix"] + + @showtickprefix.setter + def showtickprefix(self, val): + self["showtickprefix"] = val + + @property + def showticksuffix(self): + """ + Same as `showtickprefix` but for tick suffixes. + + The 'showticksuffix' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['all', 'first', 'last', 'none'] + + Returns + ------- + Any + """ + return self["showticksuffix"] + + @showticksuffix.setter + def showticksuffix(self, val): + self["showticksuffix"] = val + + @property + def smoothing(self): + """ + The 'smoothing' property is a number and may be specified as: + - An int or float in the interval [0, 1.3] + + Returns + ------- + int|float + """ + return self["smoothing"] + + @smoothing.setter + def smoothing(self, val): + self["smoothing"] = val + + @property + def startline(self): + """ + Determines whether or not a line is drawn at along the starting + value of this axis. If True, the start line is drawn on top of + the grid lines. + + The 'startline' property is a boolean and must be specified as: + - A boolean value: True or False + + Returns + ------- + bool + """ + return self["startline"] + + @startline.setter + def startline(self, val): + self["startline"] = val + + @property + def startlinecolor(self): + """ + Sets the line color of the start line. + + The 'startlinecolor' property is a color and may be specified as: + - A hex string (e.g. '#ff0000') + - An rgb/rgba string (e.g. 'rgb(255,0,0)') + - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') + - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') + - A named CSS color: see https://plotly.com/python/css-colors/ for a list + + Returns + ------- + str + """ + return self["startlinecolor"] + + @startlinecolor.setter + def startlinecolor(self, val): + self["startlinecolor"] = val + + @property + def startlinewidth(self): + """ + Sets the width (in px) of the start line. + + The 'startlinewidth' property is a number and may be specified as: + - An int or float + + Returns + ------- + int|float + """ + return self["startlinewidth"] + + @startlinewidth.setter + def startlinewidth(self, val): + self["startlinewidth"] = val + + @property + def tick0(self): + """ + The starting index of grid lines along the axis + + The 'tick0' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["tick0"] + + @tick0.setter + def tick0(self, val): + self["tick0"] = val + + @property + def tickangle(self): + """ + Sets the angle of the tick labels with respect to the + horizontal. For example, a `tickangle` of -90 draws the tick + labels vertically. + + The 'tickangle' property is a angle (in degrees) that may be + specified as a number between -180 and 180. + Numeric values outside this range are converted to the equivalent value + (e.g. 270 is converted to -90). + + Returns + ------- + int|float + """ + return self["tickangle"] + + @tickangle.setter + def tickangle(self, val): + self["tickangle"] = val + + @property + def tickfont(self): + """ + Sets the tick font. + + The 'tickfont' property is an instance of Tickfont + that may be specified as: + - An instance of :class:`plotly.graph_objs.carpet.aaxis.Tickfont` + - A dict of string/value properties that will be passed + to the Tickfont constructor + + Returns + ------- + plotly.graph_objs.carpet.aaxis.Tickfont + """ + return self["tickfont"] + + @tickfont.setter + def tickfont(self, val): + self["tickfont"] = val + + @property + def tickformat(self): + """ + Sets the tick label formatting rule using d3 formatting mini- + languages which are very similar to those in Python. For + numbers, see: + https://github.com/d3/d3-format/tree/v1.4.5#d3-format. And for + dates see: https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format. We add two items to d3's date + formatter: "%h" for half of the year as a decimal number as + well as "%{n}f" for fractional seconds with n digits. For + example, *2016-10-13 09:15:23.456* with tickformat + "%H~%M~%S.%2f" would display "09~15~23.46" + + The 'tickformat' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["tickformat"] + + @tickformat.setter + def tickformat(self, val): + self["tickformat"] = val + + @property + def tickformatstops(self): + """ + The 'tickformatstops' property is a tuple of instances of + Tickformatstop that may be specified as: + - A list or tuple of instances of plotly.graph_objs.carpet.aaxis.Tickformatstop + - A list or tuple of dicts of string/value properties that + will be passed to the Tickformatstop constructor + + Returns + ------- + tuple[plotly.graph_objs.carpet.aaxis.Tickformatstop] + """ + return self["tickformatstops"] + + @tickformatstops.setter + def tickformatstops(self, val): + self["tickformatstops"] = val + + @property + def tickformatstopdefaults(self): + """ + When used in a template (as + layout.template.data.carpet.aaxis.tickformatstopdefaults), sets + the default property values to use for elements of + carpet.aaxis.tickformatstops + + The 'tickformatstopdefaults' property is an instance of Tickformatstop + that may be specified as: + - An instance of :class:`plotly.graph_objs.carpet.aaxis.Tickformatstop` + - A dict of string/value properties that will be passed + to the Tickformatstop constructor + + Returns + ------- + plotly.graph_objs.carpet.aaxis.Tickformatstop + """ + return self["tickformatstopdefaults"] + + @tickformatstopdefaults.setter + def tickformatstopdefaults(self, val): + self["tickformatstopdefaults"] = val + + @property + def tickmode(self): + """ + The 'tickmode' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['linear', 'array'] + + Returns + ------- + Any + """ + return self["tickmode"] + + @tickmode.setter + def tickmode(self, val): + self["tickmode"] = val + + @property + def tickprefix(self): + """ + Sets a tick label prefix. + + The 'tickprefix' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["tickprefix"] + + @tickprefix.setter + def tickprefix(self, val): + self["tickprefix"] = val + + @property + def ticksuffix(self): + """ + Sets a tick label suffix. + + The 'ticksuffix' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["ticksuffix"] + + @ticksuffix.setter + def ticksuffix(self, val): + self["ticksuffix"] = val + + @property + def ticktext(self): + """ + Sets the text displayed at the ticks position via `tickvals`. + Only has an effect if `tickmode` is set to "array". Used with + `tickvals`. + + The 'ticktext' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["ticktext"] + + @ticktext.setter + def ticktext(self, val): + self["ticktext"] = val + + @property + def ticktextsrc(self): + """ + Sets the source reference on Chart Studio Cloud for `ticktext`. + + The 'ticktextsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["ticktextsrc"] + + @ticktextsrc.setter + def ticktextsrc(self, val): + self["ticktextsrc"] = val + + @property + def tickvals(self): + """ + Sets the values at which ticks on this axis appear. Only has an + effect if `tickmode` is set to "array". Used with `ticktext`. + + The 'tickvals' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["tickvals"] + + @tickvals.setter + def tickvals(self, val): + self["tickvals"] = val + + @property + def tickvalssrc(self): + """ + Sets the source reference on Chart Studio Cloud for `tickvals`. + + The 'tickvalssrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["tickvalssrc"] + + @tickvalssrc.setter + def tickvalssrc(self, val): + self["tickvalssrc"] = val + + @property + def title(self): + """ + The 'title' property is an instance of Title + that may be specified as: + - An instance of :class:`plotly.graph_objs.carpet.aaxis.Title` + - A dict of string/value properties that will be passed + to the Title constructor + + Returns + ------- + plotly.graph_objs.carpet.aaxis.Title + """ + return self["title"] + + @title.setter + def title(self, val): + self["title"] = val + + @property + def type(self): + """ + Sets the axis type. By default, plotly attempts to determined + the axis type by looking into the data of the traces that + referenced the axis in question. + + The 'type' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['-', 'linear', 'date', 'category'] + + Returns + ------- + Any + """ + return self["type"] + + @type.setter + def type(self, val): + self["type"] = val + + @property + def _prop_descriptions(self): + return """\ + arraydtick + The stride between grid lines along the axis + arraytick0 + The starting index of grid lines along the axis + autorange + Determines whether or not the range of this axis is + computed in relation to the input data. See `rangemode` + for more info. If `range` is provided, then `autorange` + is set to False. + autotypenumbers + Using "strict" a numeric string in trace data is not + converted to a number. Using *convert types* a numeric + string in trace data may be treated as a number during + automatic axis `type` detection. Defaults to + layout.autotypenumbers. + categoryarray + Sets the order in which categories on this axis appear. + Only has an effect if `categoryorder` is set to + "array". Used with `categoryorder`. + categoryarraysrc + Sets the source reference on Chart Studio Cloud for + `categoryarray`. + categoryorder + Specifies the ordering logic for the case of + categorical variables. By default, plotly uses "trace", + which specifies the order that is present in the data + supplied. Set `categoryorder` to *category ascending* + or *category descending* if order should be determined + by the alphanumerical order of the category names. Set + `categoryorder` to "array" to derive the ordering from + the attribute `categoryarray`. If a category is not + found in the `categoryarray` array, the sorting + behavior for that attribute will be identical to the + "trace" mode. The unspecified categories will follow + the categories in `categoryarray`. + cheatertype + + color + Sets default for all colors associated with this axis + all at once: line, font, tick, and grid colors. Grid + color is lightened by blending this with the plot + background Individual pieces can override this. + dtick + The stride between grid lines along the axis + endline + Determines whether or not a line is drawn at along the + final value of this axis. If True, the end line is + drawn on top of the grid lines. + endlinecolor + Sets the line color of the end line. + endlinewidth + Sets the width (in px) of the end line. + exponentformat + Determines a formatting rule for the tick exponents. + For example, consider the number 1,000,000,000. If + "none", it appears as 1,000,000,000. If "e", 1e+9. If + "E", 1E+9. If "power", 1x10^9 (with 9 in a super + script). If "SI", 1G. If "B", 1B. + fixedrange + Determines whether or not this axis is zoom-able. If + true, then zoom is disabled. + gridcolor + Sets the axis line color. + griddash + Sets the dash style of lines. Set to a dash type string + ("solid", "dot", "dash", "longdash", "dashdot", or + "longdashdot") or a dash length list in px (eg + "5px,10px,2px,2px"). + gridwidth + Sets the width (in px) of the axis line. + labelalias + Replacement text for specific tick or hover labels. For + example using {US: 'USA', CA: 'Canada'} changes US to + USA and CA to Canada. The labels we would have shown + must match the keys exactly, after adding any + tickprefix or ticksuffix. For negative numbers the + minus sign symbol used (U+2212) is wider than the + regular ascii dash. That means you need to use −1 + instead of -1. labelalias can be used with any axis + type, and both keys (if needed) and values (if desired) + can include html-like tags or MathJax. + labelpadding + Extra padding between label and the axis + labelprefix + Sets a axis label prefix. + labelsuffix + Sets a axis label suffix. + linecolor + Sets the axis line color. + linewidth + Sets the width (in px) of the axis line. + minexponent + Hide SI prefix for 10^n if |n| is below this number + minorgridcolor + Sets the color of the grid lines. + minorgridcount + Sets the number of minor grid ticks per major grid tick + minorgriddash + Sets the dash style of lines. Set to a dash type string + ("solid", "dot", "dash", "longdash", "dashdot", or + "longdashdot") or a dash length list in px (eg + "5px,10px,2px,2px"). + minorgridwidth + Sets the width (in px) of the grid lines. + nticks + Specifies the maximum number of ticks for the + particular axis. The actual number of ticks will be + chosen automatically to be less than or equal to + `nticks`. Has an effect only if `tickmode` is set to + "auto". + range + Sets the range of this axis. If the axis `type` is + "log", then you must take the log of your desired range + (e.g. to set the range from 1 to 100, set the range + from 0 to 2). If the axis `type` is "date", it should + be date strings, like date data, though Date objects + and unix milliseconds will be accepted and converted to + strings. If the axis `type` is "category", it should be + numbers, using the scale where each category is + assigned a serial number from zero in the order it + appears. + rangemode + If "normal", the range is computed in relation to the + extrema of the input data. If "tozero", the range + extends to 0, regardless of the input data If + "nonnegative", the range is non-negative, regardless of + the input data. + separatethousands + If "true", even 4-digit integers are separated + showexponent + If "all", all exponents are shown besides their + significands. If "first", only the exponent of the + first tick is shown. If "last", only the exponent of + the last tick is shown. If "none", no exponents appear. + showgrid + Determines whether or not grid lines are drawn. If + True, the grid lines are drawn at every tick mark. + showline + Determines whether or not a line bounding this axis is + drawn. + showticklabels + Determines whether axis labels are drawn on the low + side, the high side, both, or neither side of the axis. + showtickprefix + If "all", all tick labels are displayed with a prefix. + If "first", only the first tick is displayed with a + prefix. If "last", only the last tick is displayed with + a suffix. If "none", tick prefixes are hidden. + showticksuffix + Same as `showtickprefix` but for tick suffixes. + smoothing + + startline + Determines whether or not a line is drawn at along the + starting value of this axis. If True, the start line is + drawn on top of the grid lines. + startlinecolor + Sets the line color of the start line. + startlinewidth + Sets the width (in px) of the start line. + tick0 + The starting index of grid lines along the axis + tickangle + Sets the angle of the tick labels with respect to the + horizontal. For example, a `tickangle` of -90 draws the + tick labels vertically. + tickfont + Sets the tick font. + tickformat + Sets the tick label formatting rule using d3 formatting + mini-languages which are very similar to those in + Python. For numbers, see: + https://github.com/d3/d3-format/tree/v1.4.5#d3-format. + And for dates see: https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format. We add two items to + d3's date formatter: "%h" for half of the year as a + decimal number as well as "%{n}f" for fractional + seconds with n digits. For example, *2016-10-13 + 09:15:23.456* with tickformat "%H~%M~%S.%2f" would + display "09~15~23.46" + tickformatstops + A tuple of :class:`plotly.graph_objects.carpet.aaxis.Ti + ckformatstop` instances or dicts with compatible + properties + tickformatstopdefaults + When used in a template (as layout.template.data.carpet + .aaxis.tickformatstopdefaults), sets the default + property values to use for elements of + carpet.aaxis.tickformatstops + tickmode + + tickprefix + Sets a tick label prefix. + ticksuffix + Sets a tick label suffix. + ticktext + Sets the text displayed at the ticks position via + `tickvals`. Only has an effect if `tickmode` is set to + "array". Used with `tickvals`. + ticktextsrc + Sets the source reference on Chart Studio Cloud for + `ticktext`. + tickvals + Sets the values at which ticks on this axis appear. + Only has an effect if `tickmode` is set to "array". + Used with `ticktext`. + tickvalssrc + Sets the source reference on Chart Studio Cloud for + `tickvals`. + title + :class:`plotly.graph_objects.carpet.aaxis.Title` + instance or dict with compatible properties + type + Sets the axis type. By default, plotly attempts to + determined the axis type by looking into the data of + the traces that referenced the axis in question. + """ + + def __init__( + self, + arg=None, + arraydtick=None, + arraytick0=None, + autorange=None, + autotypenumbers=None, + categoryarray=None, + categoryarraysrc=None, + categoryorder=None, + cheatertype=None, + color=None, + dtick=None, + endline=None, + endlinecolor=None, + endlinewidth=None, + exponentformat=None, + fixedrange=None, + gridcolor=None, + griddash=None, + gridwidth=None, + labelalias=None, + labelpadding=None, + labelprefix=None, + labelsuffix=None, + linecolor=None, + linewidth=None, + minexponent=None, + minorgridcolor=None, + minorgridcount=None, + minorgriddash=None, + minorgridwidth=None, + nticks=None, + range=None, + rangemode=None, + separatethousands=None, + showexponent=None, + showgrid=None, + showline=None, + showticklabels=None, + showtickprefix=None, + showticksuffix=None, + smoothing=None, + startline=None, + startlinecolor=None, + startlinewidth=None, + tick0=None, + tickangle=None, + tickfont=None, + tickformat=None, + tickformatstops=None, + tickformatstopdefaults=None, + tickmode=None, + tickprefix=None, + ticksuffix=None, + ticktext=None, + ticktextsrc=None, + tickvals=None, + tickvalssrc=None, + title=None, + type=None, + **kwargs, + ): + """ + Construct a new Aaxis object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of :class:`plotly.graph_objs.carpet.Aaxis` + arraydtick + The stride between grid lines along the axis + arraytick0 + The starting index of grid lines along the axis + autorange + Determines whether or not the range of this axis is + computed in relation to the input data. See `rangemode` + for more info. If `range` is provided, then `autorange` + is set to False. + autotypenumbers + Using "strict" a numeric string in trace data is not + converted to a number. Using *convert types* a numeric + string in trace data may be treated as a number during + automatic axis `type` detection. Defaults to + layout.autotypenumbers. + categoryarray + Sets the order in which categories on this axis appear. + Only has an effect if `categoryorder` is set to + "array". Used with `categoryorder`. + categoryarraysrc + Sets the source reference on Chart Studio Cloud for + `categoryarray`. + categoryorder + Specifies the ordering logic for the case of + categorical variables. By default, plotly uses "trace", + which specifies the order that is present in the data + supplied. Set `categoryorder` to *category ascending* + or *category descending* if order should be determined + by the alphanumerical order of the category names. Set + `categoryorder` to "array" to derive the ordering from + the attribute `categoryarray`. If a category is not + found in the `categoryarray` array, the sorting + behavior for that attribute will be identical to the + "trace" mode. The unspecified categories will follow + the categories in `categoryarray`. + cheatertype + + color + Sets default for all colors associated with this axis + all at once: line, font, tick, and grid colors. Grid + color is lightened by blending this with the plot + background Individual pieces can override this. + dtick + The stride between grid lines along the axis + endline + Determines whether or not a line is drawn at along the + final value of this axis. If True, the end line is + drawn on top of the grid lines. + endlinecolor + Sets the line color of the end line. + endlinewidth + Sets the width (in px) of the end line. + exponentformat + Determines a formatting rule for the tick exponents. + For example, consider the number 1,000,000,000. If + "none", it appears as 1,000,000,000. If "e", 1e+9. If + "E", 1E+9. If "power", 1x10^9 (with 9 in a super + script). If "SI", 1G. If "B", 1B. + fixedrange + Determines whether or not this axis is zoom-able. If + true, then zoom is disabled. + gridcolor + Sets the axis line color. + griddash + Sets the dash style of lines. Set to a dash type string + ("solid", "dot", "dash", "longdash", "dashdot", or + "longdashdot") or a dash length list in px (eg + "5px,10px,2px,2px"). + gridwidth + Sets the width (in px) of the axis line. + labelalias + Replacement text for specific tick or hover labels. For + example using {US: 'USA', CA: 'Canada'} changes US to + USA and CA to Canada. The labels we would have shown + must match the keys exactly, after adding any + tickprefix or ticksuffix. For negative numbers the + minus sign symbol used (U+2212) is wider than the + regular ascii dash. That means you need to use −1 + instead of -1. labelalias can be used with any axis + type, and both keys (if needed) and values (if desired) + can include html-like tags or MathJax. + labelpadding + Extra padding between label and the axis + labelprefix + Sets a axis label prefix. + labelsuffix + Sets a axis label suffix. + linecolor + Sets the axis line color. + linewidth + Sets the width (in px) of the axis line. + minexponent + Hide SI prefix for 10^n if |n| is below this number + minorgridcolor + Sets the color of the grid lines. + minorgridcount + Sets the number of minor grid ticks per major grid tick + minorgriddash + Sets the dash style of lines. Set to a dash type string + ("solid", "dot", "dash", "longdash", "dashdot", or + "longdashdot") or a dash length list in px (eg + "5px,10px,2px,2px"). + minorgridwidth + Sets the width (in px) of the grid lines. + nticks + Specifies the maximum number of ticks for the + particular axis. The actual number of ticks will be + chosen automatically to be less than or equal to + `nticks`. Has an effect only if `tickmode` is set to + "auto". + range + Sets the range of this axis. If the axis `type` is + "log", then you must take the log of your desired range + (e.g. to set the range from 1 to 100, set the range + from 0 to 2). If the axis `type` is "date", it should + be date strings, like date data, though Date objects + and unix milliseconds will be accepted and converted to + strings. If the axis `type` is "category", it should be + numbers, using the scale where each category is + assigned a serial number from zero in the order it + appears. + rangemode + If "normal", the range is computed in relation to the + extrema of the input data. If "tozero", the range + extends to 0, regardless of the input data If + "nonnegative", the range is non-negative, regardless of + the input data. + separatethousands + If "true", even 4-digit integers are separated + showexponent + If "all", all exponents are shown besides their + significands. If "first", only the exponent of the + first tick is shown. If "last", only the exponent of + the last tick is shown. If "none", no exponents appear. + showgrid + Determines whether or not grid lines are drawn. If + True, the grid lines are drawn at every tick mark. + showline + Determines whether or not a line bounding this axis is + drawn. + showticklabels + Determines whether axis labels are drawn on the low + side, the high side, both, or neither side of the axis. + showtickprefix + If "all", all tick labels are displayed with a prefix. + If "first", only the first tick is displayed with a + prefix. If "last", only the last tick is displayed with + a suffix. If "none", tick prefixes are hidden. + showticksuffix + Same as `showtickprefix` but for tick suffixes. + smoothing + + startline + Determines whether or not a line is drawn at along the + starting value of this axis. If True, the start line is + drawn on top of the grid lines. + startlinecolor + Sets the line color of the start line. + startlinewidth + Sets the width (in px) of the start line. + tick0 + The starting index of grid lines along the axis + tickangle + Sets the angle of the tick labels with respect to the + horizontal. For example, a `tickangle` of -90 draws the + tick labels vertically. + tickfont + Sets the tick font. + tickformat + Sets the tick label formatting rule using d3 formatting + mini-languages which are very similar to those in + Python. For numbers, see: + https://github.com/d3/d3-format/tree/v1.4.5#d3-format. + And for dates see: https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format. We add two items to + d3's date formatter: "%h" for half of the year as a + decimal number as well as "%{n}f" for fractional + seconds with n digits. For example, *2016-10-13 + 09:15:23.456* with tickformat "%H~%M~%S.%2f" would + display "09~15~23.46" + tickformatstops + A tuple of :class:`plotly.graph_objects.carpet.aaxis.Ti + ckformatstop` instances or dicts with compatible + properties + tickformatstopdefaults + When used in a template (as layout.template.data.carpet + .aaxis.tickformatstopdefaults), sets the default + property values to use for elements of + carpet.aaxis.tickformatstops + tickmode + + tickprefix + Sets a tick label prefix. + ticksuffix + Sets a tick label suffix. + ticktext + Sets the text displayed at the ticks position via + `tickvals`. Only has an effect if `tickmode` is set to + "array". Used with `tickvals`. + ticktextsrc + Sets the source reference on Chart Studio Cloud for + `ticktext`. + tickvals + Sets the values at which ticks on this axis appear. + Only has an effect if `tickmode` is set to "array". + Used with `ticktext`. + tickvalssrc + Sets the source reference on Chart Studio Cloud for + `tickvals`. + title + :class:`plotly.graph_objects.carpet.aaxis.Title` + instance or dict with compatible properties + type + Sets the axis type. By default, plotly attempts to + determined the axis type by looking into the data of + the traces that referenced the axis in question. + + Returns + ------- + Aaxis + """ + super().__init__("aaxis") + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + if arg is None: + arg = {} + elif isinstance(arg, self.__class__): + arg = arg.to_plotly_json() + elif isinstance(arg, dict): + arg = _copy.copy(arg) + else: + raise ValueError("""\ +The first argument to the plotly.graph_objs.carpet.Aaxis +constructor must be a dict or +an instance of :class:`plotly.graph_objs.carpet.Aaxis`""") + + self._skip_invalid = kwargs.pop("skip_invalid", False) + self._validate = kwargs.pop("_validate", True) + + self._set_property("arraydtick", arg, arraydtick) + self._set_property("arraytick0", arg, arraytick0) + self._set_property("autorange", arg, autorange) + self._set_property("autotypenumbers", arg, autotypenumbers) + self._set_property("categoryarray", arg, categoryarray) + self._set_property("categoryarraysrc", arg, categoryarraysrc) + self._set_property("categoryorder", arg, categoryorder) + self._set_property("cheatertype", arg, cheatertype) + self._set_property("color", arg, color) + self._set_property("dtick", arg, dtick) + self._set_property("endline", arg, endline) + self._set_property("endlinecolor", arg, endlinecolor) + self._set_property("endlinewidth", arg, endlinewidth) + self._set_property("exponentformat", arg, exponentformat) + self._set_property("fixedrange", arg, fixedrange) + self._set_property("gridcolor", arg, gridcolor) + self._set_property("griddash", arg, griddash) + self._set_property("gridwidth", arg, gridwidth) + self._set_property("labelalias", arg, labelalias) + self._set_property("labelpadding", arg, labelpadding) + self._set_property("labelprefix", arg, labelprefix) + self._set_property("labelsuffix", arg, labelsuffix) + self._set_property("linecolor", arg, linecolor) + self._set_property("linewidth", arg, linewidth) + self._set_property("minexponent", arg, minexponent) + self._set_property("minorgridcolor", arg, minorgridcolor) + self._set_property("minorgridcount", arg, minorgridcount) + self._set_property("minorgriddash", arg, minorgriddash) + self._set_property("minorgridwidth", arg, minorgridwidth) + self._set_property("nticks", arg, nticks) + self._set_property("range", arg, range) + self._set_property("rangemode", arg, rangemode) + self._set_property("separatethousands", arg, separatethousands) + self._set_property("showexponent", arg, showexponent) + self._set_property("showgrid", arg, showgrid) + self._set_property("showline", arg, showline) + self._set_property("showticklabels", arg, showticklabels) + self._set_property("showtickprefix", arg, showtickprefix) + self._set_property("showticksuffix", arg, showticksuffix) + self._set_property("smoothing", arg, smoothing) + self._set_property("startline", arg, startline) + self._set_property("startlinecolor", arg, startlinecolor) + self._set_property("startlinewidth", arg, startlinewidth) + self._set_property("tick0", arg, tick0) + self._set_property("tickangle", arg, tickangle) + self._set_property("tickfont", arg, tickfont) + self._set_property("tickformat", arg, tickformat) + self._set_property("tickformatstops", arg, tickformatstops) + self._set_property("tickformatstopdefaults", arg, tickformatstopdefaults) + self._set_property("tickmode", arg, tickmode) + self._set_property("tickprefix", arg, tickprefix) + self._set_property("ticksuffix", arg, ticksuffix) + self._set_property("ticktext", arg, ticktext) + self._set_property("ticktextsrc", arg, ticktextsrc) + self._set_property("tickvals", arg, tickvals) + self._set_property("tickvalssrc", arg, tickvalssrc) + self._set_property("title", arg, title) + self._set_property("type", arg, type) + self._process_kwargs(**dict(arg, **kwargs)) + self._skip_invalid = False diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/carpet/_baxis.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/carpet/_baxis.py new file mode 100644 index 0000000000000000000000000000000000000000..4b193f8b9cc3a299c74e1b9f89c17c006e4ed139 --- /dev/null +++ b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/carpet/_baxis.py @@ -0,0 +1,1850 @@ +# --- THIS FILE IS AUTO-GENERATED --- +# Modifications will be overwitten the next time code generation run. + +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Baxis(_BaseTraceHierarchyType): + _parent_path_str = "carpet" + _path_str = "carpet.baxis" + _valid_props = { + "arraydtick", + "arraytick0", + "autorange", + "autotypenumbers", + "categoryarray", + "categoryarraysrc", + "categoryorder", + "cheatertype", + "color", + "dtick", + "endline", + "endlinecolor", + "endlinewidth", + "exponentformat", + "fixedrange", + "gridcolor", + "griddash", + "gridwidth", + "labelalias", + "labelpadding", + "labelprefix", + "labelsuffix", + "linecolor", + "linewidth", + "minexponent", + "minorgridcolor", + "minorgridcount", + "minorgriddash", + "minorgridwidth", + "nticks", + "range", + "rangemode", + "separatethousands", + "showexponent", + "showgrid", + "showline", + "showticklabels", + "showtickprefix", + "showticksuffix", + "smoothing", + "startline", + "startlinecolor", + "startlinewidth", + "tick0", + "tickangle", + "tickfont", + "tickformat", + "tickformatstopdefaults", + "tickformatstops", + "tickmode", + "tickprefix", + "ticksuffix", + "ticktext", + "ticktextsrc", + "tickvals", + "tickvalssrc", + "title", + "type", + } + + @property + def arraydtick(self): + """ + The stride between grid lines along the axis + + The 'arraydtick' property is a integer and may be specified as: + - An int (or float that will be cast to an int) + in the interval [1, 9223372036854775807] + + Returns + ------- + int + """ + return self["arraydtick"] + + @arraydtick.setter + def arraydtick(self, val): + self["arraydtick"] = val + + @property + def arraytick0(self): + """ + The starting index of grid lines along the axis + + The 'arraytick0' property is a integer and may be specified as: + - An int (or float that will be cast to an int) + in the interval [0, 9223372036854775807] + + Returns + ------- + int + """ + return self["arraytick0"] + + @arraytick0.setter + def arraytick0(self, val): + self["arraytick0"] = val + + @property + def autorange(self): + """ + Determines whether or not the range of this axis is computed in + relation to the input data. See `rangemode` for more info. If + `range` is provided, then `autorange` is set to False. + + The 'autorange' property is an enumeration that may be specified as: + - One of the following enumeration values: + [True, False, 'reversed'] + + Returns + ------- + Any + """ + return self["autorange"] + + @autorange.setter + def autorange(self, val): + self["autorange"] = val + + @property + def autotypenumbers(self): + """ + Using "strict" a numeric string in trace data is not converted + to a number. Using *convert types* a numeric string in trace + data may be treated as a number during automatic axis `type` + detection. Defaults to layout.autotypenumbers. + + The 'autotypenumbers' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['convert types', 'strict'] + + Returns + ------- + Any + """ + return self["autotypenumbers"] + + @autotypenumbers.setter + def autotypenumbers(self, val): + self["autotypenumbers"] = val + + @property + def categoryarray(self): + """ + Sets the order in which categories on this axis appear. Only + has an effect if `categoryorder` is set to "array". Used with + `categoryorder`. + + The 'categoryarray' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["categoryarray"] + + @categoryarray.setter + def categoryarray(self, val): + self["categoryarray"] = val + + @property + def categoryarraysrc(self): + """ + Sets the source reference on Chart Studio Cloud for + `categoryarray`. + + The 'categoryarraysrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["categoryarraysrc"] + + @categoryarraysrc.setter + def categoryarraysrc(self, val): + self["categoryarraysrc"] = val + + @property + def categoryorder(self): + """ + Specifies the ordering logic for the case of categorical + variables. By default, plotly uses "trace", which specifies the + order that is present in the data supplied. Set `categoryorder` + to *category ascending* or *category descending* if order + should be determined by the alphanumerical order of the + category names. Set `categoryorder` to "array" to derive the + ordering from the attribute `categoryarray`. If a category is + not found in the `categoryarray` array, the sorting behavior + for that attribute will be identical to the "trace" mode. The + unspecified categories will follow the categories in + `categoryarray`. + + The 'categoryorder' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['trace', 'category ascending', 'category descending', + 'array'] + + Returns + ------- + Any + """ + return self["categoryorder"] + + @categoryorder.setter + def categoryorder(self, val): + self["categoryorder"] = val + + @property + def cheatertype(self): + """ + The 'cheatertype' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['index', 'value'] + + Returns + ------- + Any + """ + return self["cheatertype"] + + @cheatertype.setter + def cheatertype(self, val): + self["cheatertype"] = val + + @property + def color(self): + """ + Sets default for all colors associated with this axis all at + once: line, font, tick, and grid colors. Grid color is + lightened by blending this with the plot background Individual + pieces can override this. + + The 'color' property is a color and may be specified as: + - A hex string (e.g. '#ff0000') + - An rgb/rgba string (e.g. 'rgb(255,0,0)') + - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') + - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') + - A named CSS color: see https://plotly.com/python/css-colors/ for a list + + Returns + ------- + str + """ + return self["color"] + + @color.setter + def color(self, val): + self["color"] = val + + @property + def dtick(self): + """ + The stride between grid lines along the axis + + The 'dtick' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["dtick"] + + @dtick.setter + def dtick(self, val): + self["dtick"] = val + + @property + def endline(self): + """ + Determines whether or not a line is drawn at along the final + value of this axis. If True, the end line is drawn on top of + the grid lines. + + The 'endline' property is a boolean and must be specified as: + - A boolean value: True or False + + Returns + ------- + bool + """ + return self["endline"] + + @endline.setter + def endline(self, val): + self["endline"] = val + + @property + def endlinecolor(self): + """ + Sets the line color of the end line. + + The 'endlinecolor' property is a color and may be specified as: + - A hex string (e.g. '#ff0000') + - An rgb/rgba string (e.g. 'rgb(255,0,0)') + - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') + - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') + - A named CSS color: see https://plotly.com/python/css-colors/ for a list + + Returns + ------- + str + """ + return self["endlinecolor"] + + @endlinecolor.setter + def endlinecolor(self, val): + self["endlinecolor"] = val + + @property + def endlinewidth(self): + """ + Sets the width (in px) of the end line. + + The 'endlinewidth' property is a number and may be specified as: + - An int or float + + Returns + ------- + int|float + """ + return self["endlinewidth"] + + @endlinewidth.setter + def endlinewidth(self, val): + self["endlinewidth"] = val + + @property + def exponentformat(self): + """ + Determines a formatting rule for the tick exponents. For + example, consider the number 1,000,000,000. If "none", it + appears as 1,000,000,000. If "e", 1e+9. If "E", 1E+9. If + "power", 1x10^9 (with 9 in a super script). If "SI", 1G. If + "B", 1B. + + The 'exponentformat' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['none', 'e', 'E', 'power', 'SI', 'B', 'SI extended'] + + Returns + ------- + Any + """ + return self["exponentformat"] + + @exponentformat.setter + def exponentformat(self, val): + self["exponentformat"] = val + + @property + def fixedrange(self): + """ + Determines whether or not this axis is zoom-able. If true, then + zoom is disabled. + + The 'fixedrange' property is a boolean and must be specified as: + - A boolean value: True or False + + Returns + ------- + bool + """ + return self["fixedrange"] + + @fixedrange.setter + def fixedrange(self, val): + self["fixedrange"] = val + + @property + def gridcolor(self): + """ + Sets the axis line color. + + The 'gridcolor' property is a color and may be specified as: + - A hex string (e.g. '#ff0000') + - An rgb/rgba string (e.g. 'rgb(255,0,0)') + - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') + - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') + - A named CSS color: see https://plotly.com/python/css-colors/ for a list + + Returns + ------- + str + """ + return self["gridcolor"] + + @gridcolor.setter + def gridcolor(self, val): + self["gridcolor"] = val + + @property + def griddash(self): + """ + Sets the dash style of lines. Set to a dash type string + ("solid", "dot", "dash", "longdash", "dashdot", or + "longdashdot") or a dash length list in px (eg + "5px,10px,2px,2px"). + + The 'griddash' property is an enumeration that may be specified as: + - One of the following dash styles: + ['solid', 'dot', 'dash', 'longdash', 'dashdot', 'longdashdot'] + - A string containing a dash length list in pixels or percentages + (e.g. '5px 10px 2px 2px', '5, 10, 2, 2', '10% 20% 40%', etc.) + + Returns + ------- + str + """ + return self["griddash"] + + @griddash.setter + def griddash(self, val): + self["griddash"] = val + + @property + def gridwidth(self): + """ + Sets the width (in px) of the axis line. + + The 'gridwidth' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["gridwidth"] + + @gridwidth.setter + def gridwidth(self, val): + self["gridwidth"] = val + + @property + def labelalias(self): + """ + Replacement text for specific tick or hover labels. For example + using {US: 'USA', CA: 'Canada'} changes US to USA and CA to + Canada. The labels we would have shown must match the keys + exactly, after adding any tickprefix or ticksuffix. For + negative numbers the minus sign symbol used (U+2212) is wider + than the regular ascii dash. That means you need to use −1 + instead of -1. labelalias can be used with any axis type, and + both keys (if needed) and values (if desired) can include html- + like tags or MathJax. + + The 'labelalias' property accepts values of any type + + Returns + ------- + Any + """ + return self["labelalias"] + + @labelalias.setter + def labelalias(self, val): + self["labelalias"] = val + + @property + def labelpadding(self): + """ + Extra padding between label and the axis + + The 'labelpadding' property is a integer and may be specified as: + - An int (or float that will be cast to an int) + + Returns + ------- + int + """ + return self["labelpadding"] + + @labelpadding.setter + def labelpadding(self, val): + self["labelpadding"] = val + + @property + def labelprefix(self): + """ + Sets a axis label prefix. + + The 'labelprefix' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["labelprefix"] + + @labelprefix.setter + def labelprefix(self, val): + self["labelprefix"] = val + + @property + def labelsuffix(self): + """ + Sets a axis label suffix. + + The 'labelsuffix' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["labelsuffix"] + + @labelsuffix.setter + def labelsuffix(self, val): + self["labelsuffix"] = val + + @property + def linecolor(self): + """ + Sets the axis line color. + + The 'linecolor' property is a color and may be specified as: + - A hex string (e.g. '#ff0000') + - An rgb/rgba string (e.g. 'rgb(255,0,0)') + - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') + - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') + - A named CSS color: see https://plotly.com/python/css-colors/ for a list + + Returns + ------- + str + """ + return self["linecolor"] + + @linecolor.setter + def linecolor(self, val): + self["linecolor"] = val + + @property + def linewidth(self): + """ + Sets the width (in px) of the axis line. + + The 'linewidth' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["linewidth"] + + @linewidth.setter + def linewidth(self, val): + self["linewidth"] = val + + @property + def minexponent(self): + """ + Hide SI prefix for 10^n if |n| is below this number + + The 'minexponent' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["minexponent"] + + @minexponent.setter + def minexponent(self, val): + self["minexponent"] = val + + @property + def minorgridcolor(self): + """ + Sets the color of the grid lines. + + The 'minorgridcolor' property is a color and may be specified as: + - A hex string (e.g. '#ff0000') + - An rgb/rgba string (e.g. 'rgb(255,0,0)') + - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') + - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') + - A named CSS color: see https://plotly.com/python/css-colors/ for a list + + Returns + ------- + str + """ + return self["minorgridcolor"] + + @minorgridcolor.setter + def minorgridcolor(self, val): + self["minorgridcolor"] = val + + @property + def minorgridcount(self): + """ + Sets the number of minor grid ticks per major grid tick + + The 'minorgridcount' property is a integer and may be specified as: + - An int (or float that will be cast to an int) + in the interval [0, 9223372036854775807] + + Returns + ------- + int + """ + return self["minorgridcount"] + + @minorgridcount.setter + def minorgridcount(self, val): + self["minorgridcount"] = val + + @property + def minorgriddash(self): + """ + Sets the dash style of lines. Set to a dash type string + ("solid", "dot", "dash", "longdash", "dashdot", or + "longdashdot") or a dash length list in px (eg + "5px,10px,2px,2px"). + + The 'minorgriddash' property is an enumeration that may be specified as: + - One of the following dash styles: + ['solid', 'dot', 'dash', 'longdash', 'dashdot', 'longdashdot'] + - A string containing a dash length list in pixels or percentages + (e.g. '5px 10px 2px 2px', '5, 10, 2, 2', '10% 20% 40%', etc.) + + Returns + ------- + str + """ + return self["minorgriddash"] + + @minorgriddash.setter + def minorgriddash(self, val): + self["minorgriddash"] = val + + @property + def minorgridwidth(self): + """ + Sets the width (in px) of the grid lines. + + The 'minorgridwidth' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["minorgridwidth"] + + @minorgridwidth.setter + def minorgridwidth(self, val): + self["minorgridwidth"] = val + + @property + def nticks(self): + """ + Specifies the maximum number of ticks for the particular axis. + The actual number of ticks will be chosen automatically to be + less than or equal to `nticks`. Has an effect only if + `tickmode` is set to "auto". + + The 'nticks' property is a integer and may be specified as: + - An int (or float that will be cast to an int) + in the interval [0, 9223372036854775807] + + Returns + ------- + int + """ + return self["nticks"] + + @nticks.setter + def nticks(self, val): + self["nticks"] = val + + @property + def range(self): + """ + Sets the range of this axis. If the axis `type` is "log", then + you must take the log of your desired range (e.g. to set the + range from 1 to 100, set the range from 0 to 2). If the axis + `type` is "date", it should be date strings, like date data, + though Date objects and unix milliseconds will be accepted and + converted to strings. If the axis `type` is "category", it + should be numbers, using the scale where each category is + assigned a serial number from zero in the order it appears. + + The 'range' property is an info array that may be specified as: + + * a list or tuple of 2 elements where: + (0) The 'range[0]' property accepts values of any type + (1) The 'range[1]' property accepts values of any type + + Returns + ------- + list + """ + return self["range"] + + @range.setter + def range(self, val): + self["range"] = val + + @property + def rangemode(self): + """ + If "normal", the range is computed in relation to the extrema + of the input data. If "tozero", the range extends to 0, + regardless of the input data If "nonnegative", the range is + non-negative, regardless of the input data. + + The 'rangemode' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['normal', 'tozero', 'nonnegative'] + + Returns + ------- + Any + """ + return self["rangemode"] + + @rangemode.setter + def rangemode(self, val): + self["rangemode"] = val + + @property + def separatethousands(self): + """ + If "true", even 4-digit integers are separated + + The 'separatethousands' property is a boolean and must be specified as: + - A boolean value: True or False + + Returns + ------- + bool + """ + return self["separatethousands"] + + @separatethousands.setter + def separatethousands(self, val): + self["separatethousands"] = val + + @property + def showexponent(self): + """ + If "all", all exponents are shown besides their significands. + If "first", only the exponent of the first tick is shown. If + "last", only the exponent of the last tick is shown. If "none", + no exponents appear. + + The 'showexponent' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['all', 'first', 'last', 'none'] + + Returns + ------- + Any + """ + return self["showexponent"] + + @showexponent.setter + def showexponent(self, val): + self["showexponent"] = val + + @property + def showgrid(self): + """ + Determines whether or not grid lines are drawn. If True, the + grid lines are drawn at every tick mark. + + The 'showgrid' property is a boolean and must be specified as: + - A boolean value: True or False + + Returns + ------- + bool + """ + return self["showgrid"] + + @showgrid.setter + def showgrid(self, val): + self["showgrid"] = val + + @property + def showline(self): + """ + Determines whether or not a line bounding this axis is drawn. + + The 'showline' property is a boolean and must be specified as: + - A boolean value: True or False + + Returns + ------- + bool + """ + return self["showline"] + + @showline.setter + def showline(self, val): + self["showline"] = val + + @property + def showticklabels(self): + """ + Determines whether axis labels are drawn on the low side, the + high side, both, or neither side of the axis. + + The 'showticklabels' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['start', 'end', 'both', 'none'] + + Returns + ------- + Any + """ + return self["showticklabels"] + + @showticklabels.setter + def showticklabels(self, val): + self["showticklabels"] = val + + @property + def showtickprefix(self): + """ + If "all", all tick labels are displayed with a prefix. If + "first", only the first tick is displayed with a prefix. If + "last", only the last tick is displayed with a suffix. If + "none", tick prefixes are hidden. + + The 'showtickprefix' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['all', 'first', 'last', 'none'] + + Returns + ------- + Any + """ + return self["showtickprefix"] + + @showtickprefix.setter + def showtickprefix(self, val): + self["showtickprefix"] = val + + @property + def showticksuffix(self): + """ + Same as `showtickprefix` but for tick suffixes. + + The 'showticksuffix' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['all', 'first', 'last', 'none'] + + Returns + ------- + Any + """ + return self["showticksuffix"] + + @showticksuffix.setter + def showticksuffix(self, val): + self["showticksuffix"] = val + + @property + def smoothing(self): + """ + The 'smoothing' property is a number and may be specified as: + - An int or float in the interval [0, 1.3] + + Returns + ------- + int|float + """ + return self["smoothing"] + + @smoothing.setter + def smoothing(self, val): + self["smoothing"] = val + + @property + def startline(self): + """ + Determines whether or not a line is drawn at along the starting + value of this axis. If True, the start line is drawn on top of + the grid lines. + + The 'startline' property is a boolean and must be specified as: + - A boolean value: True or False + + Returns + ------- + bool + """ + return self["startline"] + + @startline.setter + def startline(self, val): + self["startline"] = val + + @property + def startlinecolor(self): + """ + Sets the line color of the start line. + + The 'startlinecolor' property is a color and may be specified as: + - A hex string (e.g. '#ff0000') + - An rgb/rgba string (e.g. 'rgb(255,0,0)') + - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') + - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') + - A named CSS color: see https://plotly.com/python/css-colors/ for a list + + Returns + ------- + str + """ + return self["startlinecolor"] + + @startlinecolor.setter + def startlinecolor(self, val): + self["startlinecolor"] = val + + @property + def startlinewidth(self): + """ + Sets the width (in px) of the start line. + + The 'startlinewidth' property is a number and may be specified as: + - An int or float + + Returns + ------- + int|float + """ + return self["startlinewidth"] + + @startlinewidth.setter + def startlinewidth(self, val): + self["startlinewidth"] = val + + @property + def tick0(self): + """ + The starting index of grid lines along the axis + + The 'tick0' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["tick0"] + + @tick0.setter + def tick0(self, val): + self["tick0"] = val + + @property + def tickangle(self): + """ + Sets the angle of the tick labels with respect to the + horizontal. For example, a `tickangle` of -90 draws the tick + labels vertically. + + The 'tickangle' property is a angle (in degrees) that may be + specified as a number between -180 and 180. + Numeric values outside this range are converted to the equivalent value + (e.g. 270 is converted to -90). + + Returns + ------- + int|float + """ + return self["tickangle"] + + @tickangle.setter + def tickangle(self, val): + self["tickangle"] = val + + @property + def tickfont(self): + """ + Sets the tick font. + + The 'tickfont' property is an instance of Tickfont + that may be specified as: + - An instance of :class:`plotly.graph_objs.carpet.baxis.Tickfont` + - A dict of string/value properties that will be passed + to the Tickfont constructor + + Returns + ------- + plotly.graph_objs.carpet.baxis.Tickfont + """ + return self["tickfont"] + + @tickfont.setter + def tickfont(self, val): + self["tickfont"] = val + + @property + def tickformat(self): + """ + Sets the tick label formatting rule using d3 formatting mini- + languages which are very similar to those in Python. For + numbers, see: + https://github.com/d3/d3-format/tree/v1.4.5#d3-format. And for + dates see: https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format. We add two items to d3's date + formatter: "%h" for half of the year as a decimal number as + well as "%{n}f" for fractional seconds with n digits. For + example, *2016-10-13 09:15:23.456* with tickformat + "%H~%M~%S.%2f" would display "09~15~23.46" + + The 'tickformat' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["tickformat"] + + @tickformat.setter + def tickformat(self, val): + self["tickformat"] = val + + @property + def tickformatstops(self): + """ + The 'tickformatstops' property is a tuple of instances of + Tickformatstop that may be specified as: + - A list or tuple of instances of plotly.graph_objs.carpet.baxis.Tickformatstop + - A list or tuple of dicts of string/value properties that + will be passed to the Tickformatstop constructor + + Returns + ------- + tuple[plotly.graph_objs.carpet.baxis.Tickformatstop] + """ + return self["tickformatstops"] + + @tickformatstops.setter + def tickformatstops(self, val): + self["tickformatstops"] = val + + @property + def tickformatstopdefaults(self): + """ + When used in a template (as + layout.template.data.carpet.baxis.tickformatstopdefaults), sets + the default property values to use for elements of + carpet.baxis.tickformatstops + + The 'tickformatstopdefaults' property is an instance of Tickformatstop + that may be specified as: + - An instance of :class:`plotly.graph_objs.carpet.baxis.Tickformatstop` + - A dict of string/value properties that will be passed + to the Tickformatstop constructor + + Returns + ------- + plotly.graph_objs.carpet.baxis.Tickformatstop + """ + return self["tickformatstopdefaults"] + + @tickformatstopdefaults.setter + def tickformatstopdefaults(self, val): + self["tickformatstopdefaults"] = val + + @property + def tickmode(self): + """ + The 'tickmode' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['linear', 'array'] + + Returns + ------- + Any + """ + return self["tickmode"] + + @tickmode.setter + def tickmode(self, val): + self["tickmode"] = val + + @property + def tickprefix(self): + """ + Sets a tick label prefix. + + The 'tickprefix' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["tickprefix"] + + @tickprefix.setter + def tickprefix(self, val): + self["tickprefix"] = val + + @property + def ticksuffix(self): + """ + Sets a tick label suffix. + + The 'ticksuffix' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["ticksuffix"] + + @ticksuffix.setter + def ticksuffix(self, val): + self["ticksuffix"] = val + + @property + def ticktext(self): + """ + Sets the text displayed at the ticks position via `tickvals`. + Only has an effect if `tickmode` is set to "array". Used with + `tickvals`. + + The 'ticktext' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["ticktext"] + + @ticktext.setter + def ticktext(self, val): + self["ticktext"] = val + + @property + def ticktextsrc(self): + """ + Sets the source reference on Chart Studio Cloud for `ticktext`. + + The 'ticktextsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["ticktextsrc"] + + @ticktextsrc.setter + def ticktextsrc(self, val): + self["ticktextsrc"] = val + + @property + def tickvals(self): + """ + Sets the values at which ticks on this axis appear. Only has an + effect if `tickmode` is set to "array". Used with `ticktext`. + + The 'tickvals' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["tickvals"] + + @tickvals.setter + def tickvals(self, val): + self["tickvals"] = val + + @property + def tickvalssrc(self): + """ + Sets the source reference on Chart Studio Cloud for `tickvals`. + + The 'tickvalssrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["tickvalssrc"] + + @tickvalssrc.setter + def tickvalssrc(self, val): + self["tickvalssrc"] = val + + @property + def title(self): + """ + The 'title' property is an instance of Title + that may be specified as: + - An instance of :class:`plotly.graph_objs.carpet.baxis.Title` + - A dict of string/value properties that will be passed + to the Title constructor + + Returns + ------- + plotly.graph_objs.carpet.baxis.Title + """ + return self["title"] + + @title.setter + def title(self, val): + self["title"] = val + + @property + def type(self): + """ + Sets the axis type. By default, plotly attempts to determined + the axis type by looking into the data of the traces that + referenced the axis in question. + + The 'type' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['-', 'linear', 'date', 'category'] + + Returns + ------- + Any + """ + return self["type"] + + @type.setter + def type(self, val): + self["type"] = val + + @property + def _prop_descriptions(self): + return """\ + arraydtick + The stride between grid lines along the axis + arraytick0 + The starting index of grid lines along the axis + autorange + Determines whether or not the range of this axis is + computed in relation to the input data. See `rangemode` + for more info. If `range` is provided, then `autorange` + is set to False. + autotypenumbers + Using "strict" a numeric string in trace data is not + converted to a number. Using *convert types* a numeric + string in trace data may be treated as a number during + automatic axis `type` detection. Defaults to + layout.autotypenumbers. + categoryarray + Sets the order in which categories on this axis appear. + Only has an effect if `categoryorder` is set to + "array". Used with `categoryorder`. + categoryarraysrc + Sets the source reference on Chart Studio Cloud for + `categoryarray`. + categoryorder + Specifies the ordering logic for the case of + categorical variables. By default, plotly uses "trace", + which specifies the order that is present in the data + supplied. Set `categoryorder` to *category ascending* + or *category descending* if order should be determined + by the alphanumerical order of the category names. Set + `categoryorder` to "array" to derive the ordering from + the attribute `categoryarray`. If a category is not + found in the `categoryarray` array, the sorting + behavior for that attribute will be identical to the + "trace" mode. The unspecified categories will follow + the categories in `categoryarray`. + cheatertype + + color + Sets default for all colors associated with this axis + all at once: line, font, tick, and grid colors. Grid + color is lightened by blending this with the plot + background Individual pieces can override this. + dtick + The stride between grid lines along the axis + endline + Determines whether or not a line is drawn at along the + final value of this axis. If True, the end line is + drawn on top of the grid lines. + endlinecolor + Sets the line color of the end line. + endlinewidth + Sets the width (in px) of the end line. + exponentformat + Determines a formatting rule for the tick exponents. + For example, consider the number 1,000,000,000. If + "none", it appears as 1,000,000,000. If "e", 1e+9. If + "E", 1E+9. If "power", 1x10^9 (with 9 in a super + script). If "SI", 1G. If "B", 1B. + fixedrange + Determines whether or not this axis is zoom-able. If + true, then zoom is disabled. + gridcolor + Sets the axis line color. + griddash + Sets the dash style of lines. Set to a dash type string + ("solid", "dot", "dash", "longdash", "dashdot", or + "longdashdot") or a dash length list in px (eg + "5px,10px,2px,2px"). + gridwidth + Sets the width (in px) of the axis line. + labelalias + Replacement text for specific tick or hover labels. For + example using {US: 'USA', CA: 'Canada'} changes US to + USA and CA to Canada. The labels we would have shown + must match the keys exactly, after adding any + tickprefix or ticksuffix. For negative numbers the + minus sign symbol used (U+2212) is wider than the + regular ascii dash. That means you need to use −1 + instead of -1. labelalias can be used with any axis + type, and both keys (if needed) and values (if desired) + can include html-like tags or MathJax. + labelpadding + Extra padding between label and the axis + labelprefix + Sets a axis label prefix. + labelsuffix + Sets a axis label suffix. + linecolor + Sets the axis line color. + linewidth + Sets the width (in px) of the axis line. + minexponent + Hide SI prefix for 10^n if |n| is below this number + minorgridcolor + Sets the color of the grid lines. + minorgridcount + Sets the number of minor grid ticks per major grid tick + minorgriddash + Sets the dash style of lines. Set to a dash type string + ("solid", "dot", "dash", "longdash", "dashdot", or + "longdashdot") or a dash length list in px (eg + "5px,10px,2px,2px"). + minorgridwidth + Sets the width (in px) of the grid lines. + nticks + Specifies the maximum number of ticks for the + particular axis. The actual number of ticks will be + chosen automatically to be less than or equal to + `nticks`. Has an effect only if `tickmode` is set to + "auto". + range + Sets the range of this axis. If the axis `type` is + "log", then you must take the log of your desired range + (e.g. to set the range from 1 to 100, set the range + from 0 to 2). If the axis `type` is "date", it should + be date strings, like date data, though Date objects + and unix milliseconds will be accepted and converted to + strings. If the axis `type` is "category", it should be + numbers, using the scale where each category is + assigned a serial number from zero in the order it + appears. + rangemode + If "normal", the range is computed in relation to the + extrema of the input data. If "tozero", the range + extends to 0, regardless of the input data If + "nonnegative", the range is non-negative, regardless of + the input data. + separatethousands + If "true", even 4-digit integers are separated + showexponent + If "all", all exponents are shown besides their + significands. If "first", only the exponent of the + first tick is shown. If "last", only the exponent of + the last tick is shown. If "none", no exponents appear. + showgrid + Determines whether or not grid lines are drawn. If + True, the grid lines are drawn at every tick mark. + showline + Determines whether or not a line bounding this axis is + drawn. + showticklabels + Determines whether axis labels are drawn on the low + side, the high side, both, or neither side of the axis. + showtickprefix + If "all", all tick labels are displayed with a prefix. + If "first", only the first tick is displayed with a + prefix. If "last", only the last tick is displayed with + a suffix. If "none", tick prefixes are hidden. + showticksuffix + Same as `showtickprefix` but for tick suffixes. + smoothing + + startline + Determines whether or not a line is drawn at along the + starting value of this axis. If True, the start line is + drawn on top of the grid lines. + startlinecolor + Sets the line color of the start line. + startlinewidth + Sets the width (in px) of the start line. + tick0 + The starting index of grid lines along the axis + tickangle + Sets the angle of the tick labels with respect to the + horizontal. For example, a `tickangle` of -90 draws the + tick labels vertically. + tickfont + Sets the tick font. + tickformat + Sets the tick label formatting rule using d3 formatting + mini-languages which are very similar to those in + Python. For numbers, see: + https://github.com/d3/d3-format/tree/v1.4.5#d3-format. + And for dates see: https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format. We add two items to + d3's date formatter: "%h" for half of the year as a + decimal number as well as "%{n}f" for fractional + seconds with n digits. For example, *2016-10-13 + 09:15:23.456* with tickformat "%H~%M~%S.%2f" would + display "09~15~23.46" + tickformatstops + A tuple of :class:`plotly.graph_objects.carpet.baxis.Ti + ckformatstop` instances or dicts with compatible + properties + tickformatstopdefaults + When used in a template (as layout.template.data.carpet + .baxis.tickformatstopdefaults), sets the default + property values to use for elements of + carpet.baxis.tickformatstops + tickmode + + tickprefix + Sets a tick label prefix. + ticksuffix + Sets a tick label suffix. + ticktext + Sets the text displayed at the ticks position via + `tickvals`. Only has an effect if `tickmode` is set to + "array". Used with `tickvals`. + ticktextsrc + Sets the source reference on Chart Studio Cloud for + `ticktext`. + tickvals + Sets the values at which ticks on this axis appear. + Only has an effect if `tickmode` is set to "array". + Used with `ticktext`. + tickvalssrc + Sets the source reference on Chart Studio Cloud for + `tickvals`. + title + :class:`plotly.graph_objects.carpet.baxis.Title` + instance or dict with compatible properties + type + Sets the axis type. By default, plotly attempts to + determined the axis type by looking into the data of + the traces that referenced the axis in question. + """ + + def __init__( + self, + arg=None, + arraydtick=None, + arraytick0=None, + autorange=None, + autotypenumbers=None, + categoryarray=None, + categoryarraysrc=None, + categoryorder=None, + cheatertype=None, + color=None, + dtick=None, + endline=None, + endlinecolor=None, + endlinewidth=None, + exponentformat=None, + fixedrange=None, + gridcolor=None, + griddash=None, + gridwidth=None, + labelalias=None, + labelpadding=None, + labelprefix=None, + labelsuffix=None, + linecolor=None, + linewidth=None, + minexponent=None, + minorgridcolor=None, + minorgridcount=None, + minorgriddash=None, + minorgridwidth=None, + nticks=None, + range=None, + rangemode=None, + separatethousands=None, + showexponent=None, + showgrid=None, + showline=None, + showticklabels=None, + showtickprefix=None, + showticksuffix=None, + smoothing=None, + startline=None, + startlinecolor=None, + startlinewidth=None, + tick0=None, + tickangle=None, + tickfont=None, + tickformat=None, + tickformatstops=None, + tickformatstopdefaults=None, + tickmode=None, + tickprefix=None, + ticksuffix=None, + ticktext=None, + ticktextsrc=None, + tickvals=None, + tickvalssrc=None, + title=None, + type=None, + **kwargs, + ): + """ + Construct a new Baxis object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of :class:`plotly.graph_objs.carpet.Baxis` + arraydtick + The stride between grid lines along the axis + arraytick0 + The starting index of grid lines along the axis + autorange + Determines whether or not the range of this axis is + computed in relation to the input data. See `rangemode` + for more info. If `range` is provided, then `autorange` + is set to False. + autotypenumbers + Using "strict" a numeric string in trace data is not + converted to a number. Using *convert types* a numeric + string in trace data may be treated as a number during + automatic axis `type` detection. Defaults to + layout.autotypenumbers. + categoryarray + Sets the order in which categories on this axis appear. + Only has an effect if `categoryorder` is set to + "array". Used with `categoryorder`. + categoryarraysrc + Sets the source reference on Chart Studio Cloud for + `categoryarray`. + categoryorder + Specifies the ordering logic for the case of + categorical variables. By default, plotly uses "trace", + which specifies the order that is present in the data + supplied. Set `categoryorder` to *category ascending* + or *category descending* if order should be determined + by the alphanumerical order of the category names. Set + `categoryorder` to "array" to derive the ordering from + the attribute `categoryarray`. If a category is not + found in the `categoryarray` array, the sorting + behavior for that attribute will be identical to the + "trace" mode. The unspecified categories will follow + the categories in `categoryarray`. + cheatertype + + color + Sets default for all colors associated with this axis + all at once: line, font, tick, and grid colors. Grid + color is lightened by blending this with the plot + background Individual pieces can override this. + dtick + The stride between grid lines along the axis + endline + Determines whether or not a line is drawn at along the + final value of this axis. If True, the end line is + drawn on top of the grid lines. + endlinecolor + Sets the line color of the end line. + endlinewidth + Sets the width (in px) of the end line. + exponentformat + Determines a formatting rule for the tick exponents. + For example, consider the number 1,000,000,000. If + "none", it appears as 1,000,000,000. If "e", 1e+9. If + "E", 1E+9. If "power", 1x10^9 (with 9 in a super + script). If "SI", 1G. If "B", 1B. + fixedrange + Determines whether or not this axis is zoom-able. If + true, then zoom is disabled. + gridcolor + Sets the axis line color. + griddash + Sets the dash style of lines. Set to a dash type string + ("solid", "dot", "dash", "longdash", "dashdot", or + "longdashdot") or a dash length list in px (eg + "5px,10px,2px,2px"). + gridwidth + Sets the width (in px) of the axis line. + labelalias + Replacement text for specific tick or hover labels. For + example using {US: 'USA', CA: 'Canada'} changes US to + USA and CA to Canada. The labels we would have shown + must match the keys exactly, after adding any + tickprefix or ticksuffix. For negative numbers the + minus sign symbol used (U+2212) is wider than the + regular ascii dash. That means you need to use −1 + instead of -1. labelalias can be used with any axis + type, and both keys (if needed) and values (if desired) + can include html-like tags or MathJax. + labelpadding + Extra padding between label and the axis + labelprefix + Sets a axis label prefix. + labelsuffix + Sets a axis label suffix. + linecolor + Sets the axis line color. + linewidth + Sets the width (in px) of the axis line. + minexponent + Hide SI prefix for 10^n if |n| is below this number + minorgridcolor + Sets the color of the grid lines. + minorgridcount + Sets the number of minor grid ticks per major grid tick + minorgriddash + Sets the dash style of lines. Set to a dash type string + ("solid", "dot", "dash", "longdash", "dashdot", or + "longdashdot") or a dash length list in px (eg + "5px,10px,2px,2px"). + minorgridwidth + Sets the width (in px) of the grid lines. + nticks + Specifies the maximum number of ticks for the + particular axis. The actual number of ticks will be + chosen automatically to be less than or equal to + `nticks`. Has an effect only if `tickmode` is set to + "auto". + range + Sets the range of this axis. If the axis `type` is + "log", then you must take the log of your desired range + (e.g. to set the range from 1 to 100, set the range + from 0 to 2). If the axis `type` is "date", it should + be date strings, like date data, though Date objects + and unix milliseconds will be accepted and converted to + strings. If the axis `type` is "category", it should be + numbers, using the scale where each category is + assigned a serial number from zero in the order it + appears. + rangemode + If "normal", the range is computed in relation to the + extrema of the input data. If "tozero", the range + extends to 0, regardless of the input data If + "nonnegative", the range is non-negative, regardless of + the input data. + separatethousands + If "true", even 4-digit integers are separated + showexponent + If "all", all exponents are shown besides their + significands. If "first", only the exponent of the + first tick is shown. If "last", only the exponent of + the last tick is shown. If "none", no exponents appear. + showgrid + Determines whether or not grid lines are drawn. If + True, the grid lines are drawn at every tick mark. + showline + Determines whether or not a line bounding this axis is + drawn. + showticklabels + Determines whether axis labels are drawn on the low + side, the high side, both, or neither side of the axis. + showtickprefix + If "all", all tick labels are displayed with a prefix. + If "first", only the first tick is displayed with a + prefix. If "last", only the last tick is displayed with + a suffix. If "none", tick prefixes are hidden. + showticksuffix + Same as `showtickprefix` but for tick suffixes. + smoothing + + startline + Determines whether or not a line is drawn at along the + starting value of this axis. If True, the start line is + drawn on top of the grid lines. + startlinecolor + Sets the line color of the start line. + startlinewidth + Sets the width (in px) of the start line. + tick0 + The starting index of grid lines along the axis + tickangle + Sets the angle of the tick labels with respect to the + horizontal. For example, a `tickangle` of -90 draws the + tick labels vertically. + tickfont + Sets the tick font. + tickformat + Sets the tick label formatting rule using d3 formatting + mini-languages which are very similar to those in + Python. For numbers, see: + https://github.com/d3/d3-format/tree/v1.4.5#d3-format. + And for dates see: https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format. We add two items to + d3's date formatter: "%h" for half of the year as a + decimal number as well as "%{n}f" for fractional + seconds with n digits. For example, *2016-10-13 + 09:15:23.456* with tickformat "%H~%M~%S.%2f" would + display "09~15~23.46" + tickformatstops + A tuple of :class:`plotly.graph_objects.carpet.baxis.Ti + ckformatstop` instances or dicts with compatible + properties + tickformatstopdefaults + When used in a template (as layout.template.data.carpet + .baxis.tickformatstopdefaults), sets the default + property values to use for elements of + carpet.baxis.tickformatstops + tickmode + + tickprefix + Sets a tick label prefix. + ticksuffix + Sets a tick label suffix. + ticktext + Sets the text displayed at the ticks position via + `tickvals`. Only has an effect if `tickmode` is set to + "array". Used with `tickvals`. + ticktextsrc + Sets the source reference on Chart Studio Cloud for + `ticktext`. + tickvals + Sets the values at which ticks on this axis appear. + Only has an effect if `tickmode` is set to "array". + Used with `ticktext`. + tickvalssrc + Sets the source reference on Chart Studio Cloud for + `tickvals`. + title + :class:`plotly.graph_objects.carpet.baxis.Title` + instance or dict with compatible properties + type + Sets the axis type. By default, plotly attempts to + determined the axis type by looking into the data of + the traces that referenced the axis in question. + + Returns + ------- + Baxis + """ + super().__init__("baxis") + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + if arg is None: + arg = {} + elif isinstance(arg, self.__class__): + arg = arg.to_plotly_json() + elif isinstance(arg, dict): + arg = _copy.copy(arg) + else: + raise ValueError("""\ +The first argument to the plotly.graph_objs.carpet.Baxis +constructor must be a dict or +an instance of :class:`plotly.graph_objs.carpet.Baxis`""") + + self._skip_invalid = kwargs.pop("skip_invalid", False) + self._validate = kwargs.pop("_validate", True) + + self._set_property("arraydtick", arg, arraydtick) + self._set_property("arraytick0", arg, arraytick0) + self._set_property("autorange", arg, autorange) + self._set_property("autotypenumbers", arg, autotypenumbers) + self._set_property("categoryarray", arg, categoryarray) + self._set_property("categoryarraysrc", arg, categoryarraysrc) + self._set_property("categoryorder", arg, categoryorder) + self._set_property("cheatertype", arg, cheatertype) + self._set_property("color", arg, color) + self._set_property("dtick", arg, dtick) + self._set_property("endline", arg, endline) + self._set_property("endlinecolor", arg, endlinecolor) + self._set_property("endlinewidth", arg, endlinewidth) + self._set_property("exponentformat", arg, exponentformat) + self._set_property("fixedrange", arg, fixedrange) + self._set_property("gridcolor", arg, gridcolor) + self._set_property("griddash", arg, griddash) + self._set_property("gridwidth", arg, gridwidth) + self._set_property("labelalias", arg, labelalias) + self._set_property("labelpadding", arg, labelpadding) + self._set_property("labelprefix", arg, labelprefix) + self._set_property("labelsuffix", arg, labelsuffix) + self._set_property("linecolor", arg, linecolor) + self._set_property("linewidth", arg, linewidth) + self._set_property("minexponent", arg, minexponent) + self._set_property("minorgridcolor", arg, minorgridcolor) + self._set_property("minorgridcount", arg, minorgridcount) + self._set_property("minorgriddash", arg, minorgriddash) + self._set_property("minorgridwidth", arg, minorgridwidth) + self._set_property("nticks", arg, nticks) + self._set_property("range", arg, range) + self._set_property("rangemode", arg, rangemode) + self._set_property("separatethousands", arg, separatethousands) + self._set_property("showexponent", arg, showexponent) + self._set_property("showgrid", arg, showgrid) + self._set_property("showline", arg, showline) + self._set_property("showticklabels", arg, showticklabels) + self._set_property("showtickprefix", arg, showtickprefix) + self._set_property("showticksuffix", arg, showticksuffix) + self._set_property("smoothing", arg, smoothing) + self._set_property("startline", arg, startline) + self._set_property("startlinecolor", arg, startlinecolor) + self._set_property("startlinewidth", arg, startlinewidth) + self._set_property("tick0", arg, tick0) + self._set_property("tickangle", arg, tickangle) + self._set_property("tickfont", arg, tickfont) + self._set_property("tickformat", arg, tickformat) + self._set_property("tickformatstops", arg, tickformatstops) + self._set_property("tickformatstopdefaults", arg, tickformatstopdefaults) + self._set_property("tickmode", arg, tickmode) + self._set_property("tickprefix", arg, tickprefix) + self._set_property("ticksuffix", arg, ticksuffix) + self._set_property("ticktext", arg, ticktext) + self._set_property("ticktextsrc", arg, ticktextsrc) + self._set_property("tickvals", arg, tickvals) + self._set_property("tickvalssrc", arg, tickvalssrc) + self._set_property("title", arg, title) + self._set_property("type", arg, type) + self._process_kwargs(**dict(arg, **kwargs)) + self._skip_invalid = False diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/carpet/_font.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/carpet/_font.py new file mode 100644 index 0000000000000000000000000000000000000000..d41425cc7f6a4e888629b1d0e3591a956f16d53c --- /dev/null +++ b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/carpet/_font.py @@ -0,0 +1,333 @@ +# --- THIS FILE IS AUTO-GENERATED --- +# Modifications will be overwitten the next time code generation run. + +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Font(_BaseTraceHierarchyType): + _parent_path_str = "carpet" + _path_str = "carpet.font" + _valid_props = { + "color", + "family", + "lineposition", + "shadow", + "size", + "style", + "textcase", + "variant", + "weight", + } + + @property + def color(self): + """ + The 'color' property is a color and may be specified as: + - A hex string (e.g. '#ff0000') + - An rgb/rgba string (e.g. 'rgb(255,0,0)') + - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') + - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') + - A named CSS color: see https://plotly.com/python/css-colors/ for a list + + Returns + ------- + str + """ + return self["color"] + + @color.setter + def color(self, val): + self["color"] = val + + @property + def family(self): + """ + HTML font family - the typeface that will be applied by the web + browser. The web browser can only apply a font if it is + available on the system where it runs. Provide multiple font + families, separated by commas, to indicate the order in which + to apply fonts if they aren't available. + + The 'family' property is a string and must be specified as: + - A non-empty string + + Returns + ------- + str + """ + return self["family"] + + @family.setter + def family(self, val): + self["family"] = val + + @property + def lineposition(self): + """ + Sets the kind of decoration line(s) with text, such as an + "under", "over" or "through" as well as combinations e.g. + "under+over", etc. + + The 'lineposition' property is a flaglist and may be specified + as a string containing: + - Any combination of ['under', 'over', 'through'] joined with '+' characters + (e.g. 'under+over') + OR exactly one of ['none'] (e.g. 'none') + + Returns + ------- + Any + """ + return self["lineposition"] + + @lineposition.setter + def lineposition(self, val): + self["lineposition"] = val + + @property + def shadow(self): + """ + Sets the shape and color of the shadow behind text. "auto" + places minimal shadow and applies contrast text font color. See + https://developer.mozilla.org/en-US/docs/Web/CSS/text-shadow + for additional options. + + The 'shadow' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["shadow"] + + @shadow.setter + def shadow(self, val): + self["shadow"] = val + + @property + def size(self): + """ + The 'size' property is a number and may be specified as: + - An int or float in the interval [1, inf] + + Returns + ------- + int|float + """ + return self["size"] + + @size.setter + def size(self, val): + self["size"] = val + + @property + def style(self): + """ + Sets whether a font should be styled with a normal or italic + face from its family. + + The 'style' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['normal', 'italic'] + + Returns + ------- + Any + """ + return self["style"] + + @style.setter + def style(self, val): + self["style"] = val + + @property + def textcase(self): + """ + Sets capitalization of text. It can be used to make text appear + in all-uppercase or all-lowercase, or with each word + capitalized. + + The 'textcase' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['normal', 'word caps', 'upper', 'lower'] + + Returns + ------- + Any + """ + return self["textcase"] + + @textcase.setter + def textcase(self, val): + self["textcase"] = val + + @property + def variant(self): + """ + Sets the variant of the font. + + The 'variant' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['normal', 'small-caps', 'all-small-caps', + 'all-petite-caps', 'petite-caps', 'unicase'] + + Returns + ------- + Any + """ + return self["variant"] + + @variant.setter + def variant(self, val): + self["variant"] = val + + @property + def weight(self): + """ + Sets the weight (or boldness) of the font. + + The 'weight' property is a integer and may be specified as: + - An int (or float that will be cast to an int) + in the interval [1, 1000] + OR exactly one of ['normal', 'bold'] (e.g. 'bold') + + Returns + ------- + int + """ + return self["weight"] + + @weight.setter + def weight(self, val): + self["weight"] = val + + @property + def _prop_descriptions(self): + return """\ + color + + family + HTML font family - the typeface that will be applied by + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. + lineposition + Sets the kind of decoration line(s) with text, such as + an "under", "over" or "through" as well as combinations + e.g. "under+over", etc. + shadow + Sets the shape and color of the shadow behind text. + "auto" places minimal shadow and applies contrast text + font color. See https://developer.mozilla.org/en- + US/docs/Web/CSS/text-shadow for additional options. + size + + style + Sets whether a font should be styled with a normal or + italic face from its family. + textcase + Sets capitalization of text. It can be used to make + text appear in all-uppercase or all-lowercase, or with + each word capitalized. + variant + Sets the variant of the font. + weight + Sets the weight (or boldness) of the font. + """ + + def __init__( + self, + arg=None, + color=None, + family=None, + lineposition=None, + shadow=None, + size=None, + style=None, + textcase=None, + variant=None, + weight=None, + **kwargs, + ): + """ + Construct a new Font object + + The default font used for axis & tick labels on this carpet + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of :class:`plotly.graph_objs.carpet.Font` + color + + family + HTML font family - the typeface that will be applied by + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. + lineposition + Sets the kind of decoration line(s) with text, such as + an "under", "over" or "through" as well as combinations + e.g. "under+over", etc. + shadow + Sets the shape and color of the shadow behind text. + "auto" places minimal shadow and applies contrast text + font color. See https://developer.mozilla.org/en- + US/docs/Web/CSS/text-shadow for additional options. + size + + style + Sets whether a font should be styled with a normal or + italic face from its family. + textcase + Sets capitalization of text. It can be used to make + text appear in all-uppercase or all-lowercase, or with + each word capitalized. + variant + Sets the variant of the font. + weight + Sets the weight (or boldness) of the font. + + Returns + ------- + Font + """ + super().__init__("font") + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + if arg is None: + arg = {} + elif isinstance(arg, self.__class__): + arg = arg.to_plotly_json() + elif isinstance(arg, dict): + arg = _copy.copy(arg) + else: + raise ValueError("""\ +The first argument to the plotly.graph_objs.carpet.Font +constructor must be a dict or +an instance of :class:`plotly.graph_objs.carpet.Font`""") + + self._skip_invalid = kwargs.pop("skip_invalid", False) + self._validate = kwargs.pop("_validate", True) + + self._set_property("color", arg, color) + self._set_property("family", arg, family) + self._set_property("lineposition", arg, lineposition) + self._set_property("shadow", arg, shadow) + self._set_property("size", arg, size) + self._set_property("style", arg, style) + self._set_property("textcase", arg, textcase) + self._set_property("variant", arg, variant) + self._set_property("weight", arg, weight) + self._process_kwargs(**dict(arg, **kwargs)) + self._skip_invalid = False diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/carpet/_legendgrouptitle.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/carpet/_legendgrouptitle.py new file mode 100644 index 0000000000000000000000000000000000000000..94d0b97116f26349c4bd1f93786d93dd4f027cfa --- /dev/null +++ b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/carpet/_legendgrouptitle.py @@ -0,0 +1,104 @@ +# --- THIS FILE IS AUTO-GENERATED --- +# Modifications will be overwitten the next time code generation run. + +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Legendgrouptitle(_BaseTraceHierarchyType): + _parent_path_str = "carpet" + _path_str = "carpet.legendgrouptitle" + _valid_props = {"font", "text"} + + @property + def font(self): + """ + Sets this legend group's title font. + + The 'font' property is an instance of Font + that may be specified as: + - An instance of :class:`plotly.graph_objs.carpet.legendgrouptitle.Font` + - A dict of string/value properties that will be passed + to the Font constructor + + Returns + ------- + plotly.graph_objs.carpet.legendgrouptitle.Font + """ + return self["font"] + + @font.setter + def font(self, val): + self["font"] = val + + @property + def text(self): + """ + Sets the title of the legend group. + + The 'text' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["text"] + + @text.setter + def text(self, val): + self["text"] = val + + @property + def _prop_descriptions(self): + return """\ + font + Sets this legend group's title font. + text + Sets the title of the legend group. + """ + + def __init__(self, arg=None, font=None, text=None, **kwargs): + """ + Construct a new Legendgrouptitle object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.carpet.Legendgrouptitle` + font + Sets this legend group's title font. + text + Sets the title of the legend group. + + Returns + ------- + Legendgrouptitle + """ + super().__init__("legendgrouptitle") + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + if arg is None: + arg = {} + elif isinstance(arg, self.__class__): + arg = arg.to_plotly_json() + elif isinstance(arg, dict): + arg = _copy.copy(arg) + else: + raise ValueError("""\ +The first argument to the plotly.graph_objs.carpet.Legendgrouptitle +constructor must be a dict or +an instance of :class:`plotly.graph_objs.carpet.Legendgrouptitle`""") + + self._skip_invalid = kwargs.pop("skip_invalid", False) + self._validate = kwargs.pop("_validate", True) + + self._set_property("font", arg, font) + self._set_property("text", arg, text) + self._process_kwargs(**dict(arg, **kwargs)) + self._skip_invalid = False diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/carpet/_stream.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/carpet/_stream.py new file mode 100644 index 0000000000000000000000000000000000000000..47c3ae79196084e4b7eff530f2b1adcfdaa5eb94 --- /dev/null +++ b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/carpet/_stream.py @@ -0,0 +1,113 @@ +# --- THIS FILE IS AUTO-GENERATED --- +# Modifications will be overwitten the next time code generation run. + +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Stream(_BaseTraceHierarchyType): + _parent_path_str = "carpet" + _path_str = "carpet.stream" + _valid_props = {"maxpoints", "token"} + + @property + def maxpoints(self): + """ + Sets the maximum number of points to keep on the plots from an + incoming stream. If `maxpoints` is set to 50, only the newest + 50 points will be displayed on the plot. + + The 'maxpoints' property is a number and may be specified as: + - An int or float in the interval [0, 10000] + + Returns + ------- + int|float + """ + return self["maxpoints"] + + @maxpoints.setter + def maxpoints(self, val): + self["maxpoints"] = val + + @property + def token(self): + """ + The stream id number links a data trace on a plot with a + stream. See https://chart-studio.plotly.com/settings for more + details. + + The 'token' property is a string and must be specified as: + - A non-empty string + + Returns + ------- + str + """ + return self["token"] + + @token.setter + def token(self, val): + self["token"] = val + + @property + def _prop_descriptions(self): + return """\ + maxpoints + Sets the maximum number of points to keep on the plots + from an incoming stream. If `maxpoints` is set to 50, + only the newest 50 points will be displayed on the + plot. + token + The stream id number links a data trace on a plot with + a stream. See https://chart-studio.plotly.com/settings + for more details. + """ + + def __init__(self, arg=None, maxpoints=None, token=None, **kwargs): + """ + Construct a new Stream object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of :class:`plotly.graph_objs.carpet.Stream` + maxpoints + Sets the maximum number of points to keep on the plots + from an incoming stream. If `maxpoints` is set to 50, + only the newest 50 points will be displayed on the + plot. + token + The stream id number links a data trace on a plot with + a stream. See https://chart-studio.plotly.com/settings + for more details. + + Returns + ------- + Stream + """ + super().__init__("stream") + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + if arg is None: + arg = {} + elif isinstance(arg, self.__class__): + arg = arg.to_plotly_json() + elif isinstance(arg, dict): + arg = _copy.copy(arg) + else: + raise ValueError("""\ +The first argument to the plotly.graph_objs.carpet.Stream +constructor must be a dict or +an instance of :class:`plotly.graph_objs.carpet.Stream`""") + + self._skip_invalid = kwargs.pop("skip_invalid", False) + self._validate = kwargs.pop("_validate", True) + + self._set_property("maxpoints", arg, maxpoints) + self._set_property("token", arg, token) + self._process_kwargs(**dict(arg, **kwargs)) + self._skip_invalid = False diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/carpet/aaxis/.___init__.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/carpet/aaxis/.___init__.py new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/carpet/aaxis/.___init__.py differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/carpet/aaxis/.___pycache__ b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/carpet/aaxis/.___pycache__ new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/carpet/aaxis/.___pycache__ differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/carpet/aaxis/.__tickfont.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/carpet/aaxis/.__tickfont.py new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/carpet/aaxis/.__tickfont.py differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/carpet/aaxis/.__tickformatstop.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/carpet/aaxis/.__tickformatstop.py new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/carpet/aaxis/.__tickformatstop.py differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/carpet/aaxis/.__title.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/carpet/aaxis/.__title.py new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/carpet/aaxis/.__title.py differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/carpet/aaxis/._title b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/carpet/aaxis/._title new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/carpet/aaxis/._title differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/carpet/aaxis/__init__.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/carpet/aaxis/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..4690d3cc738a44d43a04d43d3aa0be36d7cd34e2 --- /dev/null +++ b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/carpet/aaxis/__init__.py @@ -0,0 +1,16 @@ +import sys +from typing import TYPE_CHECKING + +if TYPE_CHECKING: + from ._tickfont import Tickfont + from ._tickformatstop import Tickformatstop + from ._title import Title + from . import title +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [".title"], + ["._tickfont.Tickfont", "._tickformatstop.Tickformatstop", "._title.Title"], + ) diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/carpet/aaxis/_tickfont.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/carpet/aaxis/_tickfont.py new file mode 100644 index 0000000000000000000000000000000000000000..32256e97f47e945fb57e220ec8adf2c6abe0c40d --- /dev/null +++ b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/carpet/aaxis/_tickfont.py @@ -0,0 +1,334 @@ +# --- THIS FILE IS AUTO-GENERATED --- +# Modifications will be overwitten the next time code generation run. + +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Tickfont(_BaseTraceHierarchyType): + _parent_path_str = "carpet.aaxis" + _path_str = "carpet.aaxis.tickfont" + _valid_props = { + "color", + "family", + "lineposition", + "shadow", + "size", + "style", + "textcase", + "variant", + "weight", + } + + @property + def color(self): + """ + The 'color' property is a color and may be specified as: + - A hex string (e.g. '#ff0000') + - An rgb/rgba string (e.g. 'rgb(255,0,0)') + - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') + - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') + - A named CSS color: see https://plotly.com/python/css-colors/ for a list + + Returns + ------- + str + """ + return self["color"] + + @color.setter + def color(self, val): + self["color"] = val + + @property + def family(self): + """ + HTML font family - the typeface that will be applied by the web + browser. The web browser can only apply a font if it is + available on the system where it runs. Provide multiple font + families, separated by commas, to indicate the order in which + to apply fonts if they aren't available. + + The 'family' property is a string and must be specified as: + - A non-empty string + + Returns + ------- + str + """ + return self["family"] + + @family.setter + def family(self, val): + self["family"] = val + + @property + def lineposition(self): + """ + Sets the kind of decoration line(s) with text, such as an + "under", "over" or "through" as well as combinations e.g. + "under+over", etc. + + The 'lineposition' property is a flaglist and may be specified + as a string containing: + - Any combination of ['under', 'over', 'through'] joined with '+' characters + (e.g. 'under+over') + OR exactly one of ['none'] (e.g. 'none') + + Returns + ------- + Any + """ + return self["lineposition"] + + @lineposition.setter + def lineposition(self, val): + self["lineposition"] = val + + @property + def shadow(self): + """ + Sets the shape and color of the shadow behind text. "auto" + places minimal shadow and applies contrast text font color. See + https://developer.mozilla.org/en-US/docs/Web/CSS/text-shadow + for additional options. + + The 'shadow' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["shadow"] + + @shadow.setter + def shadow(self, val): + self["shadow"] = val + + @property + def size(self): + """ + The 'size' property is a number and may be specified as: + - An int or float in the interval [1, inf] + + Returns + ------- + int|float + """ + return self["size"] + + @size.setter + def size(self, val): + self["size"] = val + + @property + def style(self): + """ + Sets whether a font should be styled with a normal or italic + face from its family. + + The 'style' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['normal', 'italic'] + + Returns + ------- + Any + """ + return self["style"] + + @style.setter + def style(self, val): + self["style"] = val + + @property + def textcase(self): + """ + Sets capitalization of text. It can be used to make text appear + in all-uppercase or all-lowercase, or with each word + capitalized. + + The 'textcase' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['normal', 'word caps', 'upper', 'lower'] + + Returns + ------- + Any + """ + return self["textcase"] + + @textcase.setter + def textcase(self, val): + self["textcase"] = val + + @property + def variant(self): + """ + Sets the variant of the font. + + The 'variant' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['normal', 'small-caps', 'all-small-caps', + 'all-petite-caps', 'petite-caps', 'unicase'] + + Returns + ------- + Any + """ + return self["variant"] + + @variant.setter + def variant(self, val): + self["variant"] = val + + @property + def weight(self): + """ + Sets the weight (or boldness) of the font. + + The 'weight' property is a integer and may be specified as: + - An int (or float that will be cast to an int) + in the interval [1, 1000] + OR exactly one of ['normal', 'bold'] (e.g. 'bold') + + Returns + ------- + int + """ + return self["weight"] + + @weight.setter + def weight(self, val): + self["weight"] = val + + @property + def _prop_descriptions(self): + return """\ + color + + family + HTML font family - the typeface that will be applied by + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. + lineposition + Sets the kind of decoration line(s) with text, such as + an "under", "over" or "through" as well as combinations + e.g. "under+over", etc. + shadow + Sets the shape and color of the shadow behind text. + "auto" places minimal shadow and applies contrast text + font color. See https://developer.mozilla.org/en- + US/docs/Web/CSS/text-shadow for additional options. + size + + style + Sets whether a font should be styled with a normal or + italic face from its family. + textcase + Sets capitalization of text. It can be used to make + text appear in all-uppercase or all-lowercase, or with + each word capitalized. + variant + Sets the variant of the font. + weight + Sets the weight (or boldness) of the font. + """ + + def __init__( + self, + arg=None, + color=None, + family=None, + lineposition=None, + shadow=None, + size=None, + style=None, + textcase=None, + variant=None, + weight=None, + **kwargs, + ): + """ + Construct a new Tickfont object + + Sets the tick font. + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.carpet.aaxis.Tickfont` + color + + family + HTML font family - the typeface that will be applied by + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. + lineposition + Sets the kind of decoration line(s) with text, such as + an "under", "over" or "through" as well as combinations + e.g. "under+over", etc. + shadow + Sets the shape and color of the shadow behind text. + "auto" places minimal shadow and applies contrast text + font color. See https://developer.mozilla.org/en- + US/docs/Web/CSS/text-shadow for additional options. + size + + style + Sets whether a font should be styled with a normal or + italic face from its family. + textcase + Sets capitalization of text. It can be used to make + text appear in all-uppercase or all-lowercase, or with + each word capitalized. + variant + Sets the variant of the font. + weight + Sets the weight (or boldness) of the font. + + Returns + ------- + Tickfont + """ + super().__init__("tickfont") + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + if arg is None: + arg = {} + elif isinstance(arg, self.__class__): + arg = arg.to_plotly_json() + elif isinstance(arg, dict): + arg = _copy.copy(arg) + else: + raise ValueError("""\ +The first argument to the plotly.graph_objs.carpet.aaxis.Tickfont +constructor must be a dict or +an instance of :class:`plotly.graph_objs.carpet.aaxis.Tickfont`""") + + self._skip_invalid = kwargs.pop("skip_invalid", False) + self._validate = kwargs.pop("_validate", True) + + self._set_property("color", arg, color) + self._set_property("family", arg, family) + self._set_property("lineposition", arg, lineposition) + self._set_property("shadow", arg, shadow) + self._set_property("size", arg, size) + self._set_property("style", arg, style) + self._set_property("textcase", arg, textcase) + self._set_property("variant", arg, variant) + self._set_property("weight", arg, weight) + self._process_kwargs(**dict(arg, **kwargs)) + self._skip_invalid = False diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/carpet/aaxis/_tickformatstop.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/carpet/aaxis/_tickformatstop.py new file mode 100644 index 0000000000000000000000000000000000000000..a44be5f1709f32f1253748a0bd6267eb651cc2ab --- /dev/null +++ b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/carpet/aaxis/_tickformatstop.py @@ -0,0 +1,241 @@ +# --- THIS FILE IS AUTO-GENERATED --- +# Modifications will be overwitten the next time code generation run. + +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Tickformatstop(_BaseTraceHierarchyType): + _parent_path_str = "carpet.aaxis" + _path_str = "carpet.aaxis.tickformatstop" + _valid_props = {"dtickrange", "enabled", "name", "templateitemname", "value"} + + @property + def dtickrange(self): + """ + range [*min*, *max*], where "min", "max" - dtick values which + describe some zoom level, it is possible to omit "min" or "max" + value by passing "null" + + The 'dtickrange' property is an info array that may be specified as: + + * a list or tuple of 2 elements where: + (0) The 'dtickrange[0]' property accepts values of any type + (1) The 'dtickrange[1]' property accepts values of any type + + Returns + ------- + list + """ + return self["dtickrange"] + + @dtickrange.setter + def dtickrange(self, val): + self["dtickrange"] = val + + @property + def enabled(self): + """ + Determines whether or not this stop is used. If `false`, this + stop is ignored even within its `dtickrange`. + + The 'enabled' property is a boolean and must be specified as: + - A boolean value: True or False + + Returns + ------- + bool + """ + return self["enabled"] + + @enabled.setter + def enabled(self, val): + self["enabled"] = val + + @property + def name(self): + """ + When used in a template, named items are created in the output + figure in addition to any items the figure already has in this + array. You can modify these items in the output figure by + making your own item with `templateitemname` matching this + `name` alongside your modifications (including `visible: false` + or `enabled: false` to hide it). Has no effect outside of a + template. + + The 'name' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["name"] + + @name.setter + def name(self, val): + self["name"] = val + + @property + def templateitemname(self): + """ + Used to refer to a named item in this array in the template. + Named items from the template will be created even without a + matching item in the input figure, but you can modify one by + making an item with `templateitemname` matching its `name`, + alongside your modifications (including `visible: false` or + `enabled: false` to hide it). If there is no template or no + matching item, this item will be hidden unless you explicitly + show it with `visible: true`. + + The 'templateitemname' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["templateitemname"] + + @templateitemname.setter + def templateitemname(self, val): + self["templateitemname"] = val + + @property + def value(self): + """ + string - dtickformat for described zoom level, the same as + "tickformat" + + The 'value' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["value"] + + @value.setter + def value(self, val): + self["value"] = val + + @property + def _prop_descriptions(self): + return """\ + dtickrange + range [*min*, *max*], where "min", "max" - dtick values + which describe some zoom level, it is possible to omit + "min" or "max" value by passing "null" + enabled + Determines whether or not this stop is used. If + `false`, this stop is ignored even within its + `dtickrange`. + name + When used in a template, named items are created in the + output figure in addition to any items the figure + already has in this array. You can modify these items + in the output figure by making your own item with + `templateitemname` matching this `name` alongside your + modifications (including `visible: false` or `enabled: + false` to hide it). Has no effect outside of a + template. + templateitemname + Used to refer to a named item in this array in the + template. Named items from the template will be created + even without a matching item in the input figure, but + you can modify one by making an item with + `templateitemname` matching its `name`, alongside your + modifications (including `visible: false` or `enabled: + false` to hide it). If there is no template or no + matching item, this item will be hidden unless you + explicitly show it with `visible: true`. + value + string - dtickformat for described zoom level, the same + as "tickformat" + """ + + def __init__( + self, + arg=None, + dtickrange=None, + enabled=None, + name=None, + templateitemname=None, + value=None, + **kwargs, + ): + """ + Construct a new Tickformatstop object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.carpet.aaxis.Tickformatstop` + dtickrange + range [*min*, *max*], where "min", "max" - dtick values + which describe some zoom level, it is possible to omit + "min" or "max" value by passing "null" + enabled + Determines whether or not this stop is used. If + `false`, this stop is ignored even within its + `dtickrange`. + name + When used in a template, named items are created in the + output figure in addition to any items the figure + already has in this array. You can modify these items + in the output figure by making your own item with + `templateitemname` matching this `name` alongside your + modifications (including `visible: false` or `enabled: + false` to hide it). Has no effect outside of a + template. + templateitemname + Used to refer to a named item in this array in the + template. Named items from the template will be created + even without a matching item in the input figure, but + you can modify one by making an item with + `templateitemname` matching its `name`, alongside your + modifications (including `visible: false` or `enabled: + false` to hide it). If there is no template or no + matching item, this item will be hidden unless you + explicitly show it with `visible: true`. + value + string - dtickformat for described zoom level, the same + as "tickformat" + + Returns + ------- + Tickformatstop + """ + super().__init__("tickformatstops") + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + if arg is None: + arg = {} + elif isinstance(arg, self.__class__): + arg = arg.to_plotly_json() + elif isinstance(arg, dict): + arg = _copy.copy(arg) + else: + raise ValueError("""\ +The first argument to the plotly.graph_objs.carpet.aaxis.Tickformatstop +constructor must be a dict or +an instance of :class:`plotly.graph_objs.carpet.aaxis.Tickformatstop`""") + + self._skip_invalid = kwargs.pop("skip_invalid", False) + self._validate = kwargs.pop("_validate", True) + + self._set_property("dtickrange", arg, dtickrange) + self._set_property("enabled", arg, enabled) + self._set_property("name", arg, name) + self._set_property("templateitemname", arg, templateitemname) + self._set_property("value", arg, value) + self._process_kwargs(**dict(arg, **kwargs)) + self._skip_invalid = False diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/carpet/aaxis/_title.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/carpet/aaxis/_title.py new file mode 100644 index 0000000000000000000000000000000000000000..265e4e1b37d41402c7cfd213f6e2c819cfeda440 --- /dev/null +++ b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/carpet/aaxis/_title.py @@ -0,0 +1,130 @@ +# --- THIS FILE IS AUTO-GENERATED --- +# Modifications will be overwitten the next time code generation run. + +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Title(_BaseTraceHierarchyType): + _parent_path_str = "carpet.aaxis" + _path_str = "carpet.aaxis.title" + _valid_props = {"font", "offset", "text"} + + @property + def font(self): + """ + Sets this axis' title font. + + The 'font' property is an instance of Font + that may be specified as: + - An instance of :class:`plotly.graph_objs.carpet.aaxis.title.Font` + - A dict of string/value properties that will be passed + to the Font constructor + + Returns + ------- + plotly.graph_objs.carpet.aaxis.title.Font + """ + return self["font"] + + @font.setter + def font(self, val): + self["font"] = val + + @property + def offset(self): + """ + An additional amount by which to offset the title from the tick + labels, given in pixels. + + The 'offset' property is a number and may be specified as: + - An int or float + + Returns + ------- + int|float + """ + return self["offset"] + + @offset.setter + def offset(self, val): + self["offset"] = val + + @property + def text(self): + """ + Sets the title of this axis. + + The 'text' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["text"] + + @text.setter + def text(self, val): + self["text"] = val + + @property + def _prop_descriptions(self): + return """\ + font + Sets this axis' title font. + offset + An additional amount by which to offset the title from + the tick labels, given in pixels. + text + Sets the title of this axis. + """ + + def __init__(self, arg=None, font=None, offset=None, text=None, **kwargs): + """ + Construct a new Title object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.carpet.aaxis.Title` + font + Sets this axis' title font. + offset + An additional amount by which to offset the title from + the tick labels, given in pixels. + text + Sets the title of this axis. + + Returns + ------- + Title + """ + super().__init__("title") + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + if arg is None: + arg = {} + elif isinstance(arg, self.__class__): + arg = arg.to_plotly_json() + elif isinstance(arg, dict): + arg = _copy.copy(arg) + else: + raise ValueError("""\ +The first argument to the plotly.graph_objs.carpet.aaxis.Title +constructor must be a dict or +an instance of :class:`plotly.graph_objs.carpet.aaxis.Title`""") + + self._skip_invalid = kwargs.pop("skip_invalid", False) + self._validate = kwargs.pop("_validate", True) + + self._set_property("font", arg, font) + self._set_property("offset", arg, offset) + self._set_property("text", arg, text) + self._process_kwargs(**dict(arg, **kwargs)) + self._skip_invalid = False diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/carpet/aaxis/title/.___init__.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/carpet/aaxis/title/.___init__.py new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/carpet/aaxis/title/.___init__.py differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/carpet/aaxis/title/.___pycache__ b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/carpet/aaxis/title/.___pycache__ new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/carpet/aaxis/title/.___pycache__ differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/carpet/aaxis/title/.__font.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/carpet/aaxis/title/.__font.py new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/carpet/aaxis/title/.__font.py differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/carpet/aaxis/title/__init__.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/carpet/aaxis/title/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..56f600d3458c41f269053307377e9707ab13e090 --- /dev/null +++ b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/carpet/aaxis/title/__init__.py @@ -0,0 +1,9 @@ +import sys +from typing import TYPE_CHECKING + +if TYPE_CHECKING: + from ._font import Font +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import(__name__, [], ["._font.Font"]) diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/carpet/aaxis/title/_font.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/carpet/aaxis/title/_font.py new file mode 100644 index 0000000000000000000000000000000000000000..398ca780a8950db21100406732165c441f0e7ea9 --- /dev/null +++ b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/carpet/aaxis/title/_font.py @@ -0,0 +1,334 @@ +# --- THIS FILE IS AUTO-GENERATED --- +# Modifications will be overwitten the next time code generation run. + +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Font(_BaseTraceHierarchyType): + _parent_path_str = "carpet.aaxis.title" + _path_str = "carpet.aaxis.title.font" + _valid_props = { + "color", + "family", + "lineposition", + "shadow", + "size", + "style", + "textcase", + "variant", + "weight", + } + + @property + def color(self): + """ + The 'color' property is a color and may be specified as: + - A hex string (e.g. '#ff0000') + - An rgb/rgba string (e.g. 'rgb(255,0,0)') + - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') + - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') + - A named CSS color: see https://plotly.com/python/css-colors/ for a list + + Returns + ------- + str + """ + return self["color"] + + @color.setter + def color(self, val): + self["color"] = val + + @property + def family(self): + """ + HTML font family - the typeface that will be applied by the web + browser. The web browser can only apply a font if it is + available on the system where it runs. Provide multiple font + families, separated by commas, to indicate the order in which + to apply fonts if they aren't available. + + The 'family' property is a string and must be specified as: + - A non-empty string + + Returns + ------- + str + """ + return self["family"] + + @family.setter + def family(self, val): + self["family"] = val + + @property + def lineposition(self): + """ + Sets the kind of decoration line(s) with text, such as an + "under", "over" or "through" as well as combinations e.g. + "under+over", etc. + + The 'lineposition' property is a flaglist and may be specified + as a string containing: + - Any combination of ['under', 'over', 'through'] joined with '+' characters + (e.g. 'under+over') + OR exactly one of ['none'] (e.g. 'none') + + Returns + ------- + Any + """ + return self["lineposition"] + + @lineposition.setter + def lineposition(self, val): + self["lineposition"] = val + + @property + def shadow(self): + """ + Sets the shape and color of the shadow behind text. "auto" + places minimal shadow and applies contrast text font color. See + https://developer.mozilla.org/en-US/docs/Web/CSS/text-shadow + for additional options. + + The 'shadow' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["shadow"] + + @shadow.setter + def shadow(self, val): + self["shadow"] = val + + @property + def size(self): + """ + The 'size' property is a number and may be specified as: + - An int or float in the interval [1, inf] + + Returns + ------- + int|float + """ + return self["size"] + + @size.setter + def size(self, val): + self["size"] = val + + @property + def style(self): + """ + Sets whether a font should be styled with a normal or italic + face from its family. + + The 'style' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['normal', 'italic'] + + Returns + ------- + Any + """ + return self["style"] + + @style.setter + def style(self, val): + self["style"] = val + + @property + def textcase(self): + """ + Sets capitalization of text. It can be used to make text appear + in all-uppercase or all-lowercase, or with each word + capitalized. + + The 'textcase' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['normal', 'word caps', 'upper', 'lower'] + + Returns + ------- + Any + """ + return self["textcase"] + + @textcase.setter + def textcase(self, val): + self["textcase"] = val + + @property + def variant(self): + """ + Sets the variant of the font. + + The 'variant' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['normal', 'small-caps', 'all-small-caps', + 'all-petite-caps', 'petite-caps', 'unicase'] + + Returns + ------- + Any + """ + return self["variant"] + + @variant.setter + def variant(self, val): + self["variant"] = val + + @property + def weight(self): + """ + Sets the weight (or boldness) of the font. + + The 'weight' property is a integer and may be specified as: + - An int (or float that will be cast to an int) + in the interval [1, 1000] + OR exactly one of ['normal', 'bold'] (e.g. 'bold') + + Returns + ------- + int + """ + return self["weight"] + + @weight.setter + def weight(self, val): + self["weight"] = val + + @property + def _prop_descriptions(self): + return """\ + color + + family + HTML font family - the typeface that will be applied by + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. + lineposition + Sets the kind of decoration line(s) with text, such as + an "under", "over" or "through" as well as combinations + e.g. "under+over", etc. + shadow + Sets the shape and color of the shadow behind text. + "auto" places minimal shadow and applies contrast text + font color. See https://developer.mozilla.org/en- + US/docs/Web/CSS/text-shadow for additional options. + size + + style + Sets whether a font should be styled with a normal or + italic face from its family. + textcase + Sets capitalization of text. It can be used to make + text appear in all-uppercase or all-lowercase, or with + each word capitalized. + variant + Sets the variant of the font. + weight + Sets the weight (or boldness) of the font. + """ + + def __init__( + self, + arg=None, + color=None, + family=None, + lineposition=None, + shadow=None, + size=None, + style=None, + textcase=None, + variant=None, + weight=None, + **kwargs, + ): + """ + Construct a new Font object + + Sets this axis' title font. + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.carpet.aaxis.title.Font` + color + + family + HTML font family - the typeface that will be applied by + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. + lineposition + Sets the kind of decoration line(s) with text, such as + an "under", "over" or "through" as well as combinations + e.g. "under+over", etc. + shadow + Sets the shape and color of the shadow behind text. + "auto" places minimal shadow and applies contrast text + font color. See https://developer.mozilla.org/en- + US/docs/Web/CSS/text-shadow for additional options. + size + + style + Sets whether a font should be styled with a normal or + italic face from its family. + textcase + Sets capitalization of text. It can be used to make + text appear in all-uppercase or all-lowercase, or with + each word capitalized. + variant + Sets the variant of the font. + weight + Sets the weight (or boldness) of the font. + + Returns + ------- + Font + """ + super().__init__("font") + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + if arg is None: + arg = {} + elif isinstance(arg, self.__class__): + arg = arg.to_plotly_json() + elif isinstance(arg, dict): + arg = _copy.copy(arg) + else: + raise ValueError("""\ +The first argument to the plotly.graph_objs.carpet.aaxis.title.Font +constructor must be a dict or +an instance of :class:`plotly.graph_objs.carpet.aaxis.title.Font`""") + + self._skip_invalid = kwargs.pop("skip_invalid", False) + self._validate = kwargs.pop("_validate", True) + + self._set_property("color", arg, color) + self._set_property("family", arg, family) + self._set_property("lineposition", arg, lineposition) + self._set_property("shadow", arg, shadow) + self._set_property("size", arg, size) + self._set_property("style", arg, style) + self._set_property("textcase", arg, textcase) + self._set_property("variant", arg, variant) + self._set_property("weight", arg, weight) + self._process_kwargs(**dict(arg, **kwargs)) + self._skip_invalid = False diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/carpet/baxis/.___init__.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/carpet/baxis/.___init__.py new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/carpet/baxis/.___init__.py differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/carpet/baxis/.___pycache__ b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/carpet/baxis/.___pycache__ new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/carpet/baxis/.___pycache__ differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/carpet/baxis/.__tickfont.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/carpet/baxis/.__tickfont.py new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/carpet/baxis/.__tickfont.py differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/carpet/baxis/.__tickformatstop.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/carpet/baxis/.__tickformatstop.py new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/carpet/baxis/.__tickformatstop.py differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/carpet/baxis/.__title.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/carpet/baxis/.__title.py new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/carpet/baxis/.__title.py differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/carpet/baxis/._title b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/carpet/baxis/._title new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/carpet/baxis/._title differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/carpet/baxis/__init__.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/carpet/baxis/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..4690d3cc738a44d43a04d43d3aa0be36d7cd34e2 --- /dev/null +++ b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/carpet/baxis/__init__.py @@ -0,0 +1,16 @@ +import sys +from typing import TYPE_CHECKING + +if TYPE_CHECKING: + from ._tickfont import Tickfont + from ._tickformatstop import Tickformatstop + from ._title import Title + from . import title +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [".title"], + ["._tickfont.Tickfont", "._tickformatstop.Tickformatstop", "._title.Title"], + ) diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/carpet/baxis/_tickfont.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/carpet/baxis/_tickfont.py new file mode 100644 index 0000000000000000000000000000000000000000..0085dc56018ed64e2edee590fbfb4baaf825ba4a --- /dev/null +++ b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/carpet/baxis/_tickfont.py @@ -0,0 +1,334 @@ +# --- THIS FILE IS AUTO-GENERATED --- +# Modifications will be overwitten the next time code generation run. + +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Tickfont(_BaseTraceHierarchyType): + _parent_path_str = "carpet.baxis" + _path_str = "carpet.baxis.tickfont" + _valid_props = { + "color", + "family", + "lineposition", + "shadow", + "size", + "style", + "textcase", + "variant", + "weight", + } + + @property + def color(self): + """ + The 'color' property is a color and may be specified as: + - A hex string (e.g. '#ff0000') + - An rgb/rgba string (e.g. 'rgb(255,0,0)') + - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') + - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') + - A named CSS color: see https://plotly.com/python/css-colors/ for a list + + Returns + ------- + str + """ + return self["color"] + + @color.setter + def color(self, val): + self["color"] = val + + @property + def family(self): + """ + HTML font family - the typeface that will be applied by the web + browser. The web browser can only apply a font if it is + available on the system where it runs. Provide multiple font + families, separated by commas, to indicate the order in which + to apply fonts if they aren't available. + + The 'family' property is a string and must be specified as: + - A non-empty string + + Returns + ------- + str + """ + return self["family"] + + @family.setter + def family(self, val): + self["family"] = val + + @property + def lineposition(self): + """ + Sets the kind of decoration line(s) with text, such as an + "under", "over" or "through" as well as combinations e.g. + "under+over", etc. + + The 'lineposition' property is a flaglist and may be specified + as a string containing: + - Any combination of ['under', 'over', 'through'] joined with '+' characters + (e.g. 'under+over') + OR exactly one of ['none'] (e.g. 'none') + + Returns + ------- + Any + """ + return self["lineposition"] + + @lineposition.setter + def lineposition(self, val): + self["lineposition"] = val + + @property + def shadow(self): + """ + Sets the shape and color of the shadow behind text. "auto" + places minimal shadow and applies contrast text font color. See + https://developer.mozilla.org/en-US/docs/Web/CSS/text-shadow + for additional options. + + The 'shadow' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["shadow"] + + @shadow.setter + def shadow(self, val): + self["shadow"] = val + + @property + def size(self): + """ + The 'size' property is a number and may be specified as: + - An int or float in the interval [1, inf] + + Returns + ------- + int|float + """ + return self["size"] + + @size.setter + def size(self, val): + self["size"] = val + + @property + def style(self): + """ + Sets whether a font should be styled with a normal or italic + face from its family. + + The 'style' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['normal', 'italic'] + + Returns + ------- + Any + """ + return self["style"] + + @style.setter + def style(self, val): + self["style"] = val + + @property + def textcase(self): + """ + Sets capitalization of text. It can be used to make text appear + in all-uppercase or all-lowercase, or with each word + capitalized. + + The 'textcase' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['normal', 'word caps', 'upper', 'lower'] + + Returns + ------- + Any + """ + return self["textcase"] + + @textcase.setter + def textcase(self, val): + self["textcase"] = val + + @property + def variant(self): + """ + Sets the variant of the font. + + The 'variant' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['normal', 'small-caps', 'all-small-caps', + 'all-petite-caps', 'petite-caps', 'unicase'] + + Returns + ------- + Any + """ + return self["variant"] + + @variant.setter + def variant(self, val): + self["variant"] = val + + @property + def weight(self): + """ + Sets the weight (or boldness) of the font. + + The 'weight' property is a integer and may be specified as: + - An int (or float that will be cast to an int) + in the interval [1, 1000] + OR exactly one of ['normal', 'bold'] (e.g. 'bold') + + Returns + ------- + int + """ + return self["weight"] + + @weight.setter + def weight(self, val): + self["weight"] = val + + @property + def _prop_descriptions(self): + return """\ + color + + family + HTML font family - the typeface that will be applied by + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. + lineposition + Sets the kind of decoration line(s) with text, such as + an "under", "over" or "through" as well as combinations + e.g. "under+over", etc. + shadow + Sets the shape and color of the shadow behind text. + "auto" places minimal shadow and applies contrast text + font color. See https://developer.mozilla.org/en- + US/docs/Web/CSS/text-shadow for additional options. + size + + style + Sets whether a font should be styled with a normal or + italic face from its family. + textcase + Sets capitalization of text. It can be used to make + text appear in all-uppercase or all-lowercase, or with + each word capitalized. + variant + Sets the variant of the font. + weight + Sets the weight (or boldness) of the font. + """ + + def __init__( + self, + arg=None, + color=None, + family=None, + lineposition=None, + shadow=None, + size=None, + style=None, + textcase=None, + variant=None, + weight=None, + **kwargs, + ): + """ + Construct a new Tickfont object + + Sets the tick font. + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.carpet.baxis.Tickfont` + color + + family + HTML font family - the typeface that will be applied by + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. + lineposition + Sets the kind of decoration line(s) with text, such as + an "under", "over" or "through" as well as combinations + e.g. "under+over", etc. + shadow + Sets the shape and color of the shadow behind text. + "auto" places minimal shadow and applies contrast text + font color. See https://developer.mozilla.org/en- + US/docs/Web/CSS/text-shadow for additional options. + size + + style + Sets whether a font should be styled with a normal or + italic face from its family. + textcase + Sets capitalization of text. It can be used to make + text appear in all-uppercase or all-lowercase, or with + each word capitalized. + variant + Sets the variant of the font. + weight + Sets the weight (or boldness) of the font. + + Returns + ------- + Tickfont + """ + super().__init__("tickfont") + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + if arg is None: + arg = {} + elif isinstance(arg, self.__class__): + arg = arg.to_plotly_json() + elif isinstance(arg, dict): + arg = _copy.copy(arg) + else: + raise ValueError("""\ +The first argument to the plotly.graph_objs.carpet.baxis.Tickfont +constructor must be a dict or +an instance of :class:`plotly.graph_objs.carpet.baxis.Tickfont`""") + + self._skip_invalid = kwargs.pop("skip_invalid", False) + self._validate = kwargs.pop("_validate", True) + + self._set_property("color", arg, color) + self._set_property("family", arg, family) + self._set_property("lineposition", arg, lineposition) + self._set_property("shadow", arg, shadow) + self._set_property("size", arg, size) + self._set_property("style", arg, style) + self._set_property("textcase", arg, textcase) + self._set_property("variant", arg, variant) + self._set_property("weight", arg, weight) + self._process_kwargs(**dict(arg, **kwargs)) + self._skip_invalid = False diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/carpet/baxis/_tickformatstop.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/carpet/baxis/_tickformatstop.py new file mode 100644 index 0000000000000000000000000000000000000000..e477d01bbe47e6f0b28e01b4b4d0d87eaddf99a9 --- /dev/null +++ b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/carpet/baxis/_tickformatstop.py @@ -0,0 +1,241 @@ +# --- THIS FILE IS AUTO-GENERATED --- +# Modifications will be overwitten the next time code generation run. + +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Tickformatstop(_BaseTraceHierarchyType): + _parent_path_str = "carpet.baxis" + _path_str = "carpet.baxis.tickformatstop" + _valid_props = {"dtickrange", "enabled", "name", "templateitemname", "value"} + + @property + def dtickrange(self): + """ + range [*min*, *max*], where "min", "max" - dtick values which + describe some zoom level, it is possible to omit "min" or "max" + value by passing "null" + + The 'dtickrange' property is an info array that may be specified as: + + * a list or tuple of 2 elements where: + (0) The 'dtickrange[0]' property accepts values of any type + (1) The 'dtickrange[1]' property accepts values of any type + + Returns + ------- + list + """ + return self["dtickrange"] + + @dtickrange.setter + def dtickrange(self, val): + self["dtickrange"] = val + + @property + def enabled(self): + """ + Determines whether or not this stop is used. If `false`, this + stop is ignored even within its `dtickrange`. + + The 'enabled' property is a boolean and must be specified as: + - A boolean value: True or False + + Returns + ------- + bool + """ + return self["enabled"] + + @enabled.setter + def enabled(self, val): + self["enabled"] = val + + @property + def name(self): + """ + When used in a template, named items are created in the output + figure in addition to any items the figure already has in this + array. You can modify these items in the output figure by + making your own item with `templateitemname` matching this + `name` alongside your modifications (including `visible: false` + or `enabled: false` to hide it). Has no effect outside of a + template. + + The 'name' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["name"] + + @name.setter + def name(self, val): + self["name"] = val + + @property + def templateitemname(self): + """ + Used to refer to a named item in this array in the template. + Named items from the template will be created even without a + matching item in the input figure, but you can modify one by + making an item with `templateitemname` matching its `name`, + alongside your modifications (including `visible: false` or + `enabled: false` to hide it). If there is no template or no + matching item, this item will be hidden unless you explicitly + show it with `visible: true`. + + The 'templateitemname' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["templateitemname"] + + @templateitemname.setter + def templateitemname(self, val): + self["templateitemname"] = val + + @property + def value(self): + """ + string - dtickformat for described zoom level, the same as + "tickformat" + + The 'value' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["value"] + + @value.setter + def value(self, val): + self["value"] = val + + @property + def _prop_descriptions(self): + return """\ + dtickrange + range [*min*, *max*], where "min", "max" - dtick values + which describe some zoom level, it is possible to omit + "min" or "max" value by passing "null" + enabled + Determines whether or not this stop is used. If + `false`, this stop is ignored even within its + `dtickrange`. + name + When used in a template, named items are created in the + output figure in addition to any items the figure + already has in this array. You can modify these items + in the output figure by making your own item with + `templateitemname` matching this `name` alongside your + modifications (including `visible: false` or `enabled: + false` to hide it). Has no effect outside of a + template. + templateitemname + Used to refer to a named item in this array in the + template. Named items from the template will be created + even without a matching item in the input figure, but + you can modify one by making an item with + `templateitemname` matching its `name`, alongside your + modifications (including `visible: false` or `enabled: + false` to hide it). If there is no template or no + matching item, this item will be hidden unless you + explicitly show it with `visible: true`. + value + string - dtickformat for described zoom level, the same + as "tickformat" + """ + + def __init__( + self, + arg=None, + dtickrange=None, + enabled=None, + name=None, + templateitemname=None, + value=None, + **kwargs, + ): + """ + Construct a new Tickformatstop object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.carpet.baxis.Tickformatstop` + dtickrange + range [*min*, *max*], where "min", "max" - dtick values + which describe some zoom level, it is possible to omit + "min" or "max" value by passing "null" + enabled + Determines whether or not this stop is used. If + `false`, this stop is ignored even within its + `dtickrange`. + name + When used in a template, named items are created in the + output figure in addition to any items the figure + already has in this array. You can modify these items + in the output figure by making your own item with + `templateitemname` matching this `name` alongside your + modifications (including `visible: false` or `enabled: + false` to hide it). Has no effect outside of a + template. + templateitemname + Used to refer to a named item in this array in the + template. Named items from the template will be created + even without a matching item in the input figure, but + you can modify one by making an item with + `templateitemname` matching its `name`, alongside your + modifications (including `visible: false` or `enabled: + false` to hide it). If there is no template or no + matching item, this item will be hidden unless you + explicitly show it with `visible: true`. + value + string - dtickformat for described zoom level, the same + as "tickformat" + + Returns + ------- + Tickformatstop + """ + super().__init__("tickformatstops") + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + if arg is None: + arg = {} + elif isinstance(arg, self.__class__): + arg = arg.to_plotly_json() + elif isinstance(arg, dict): + arg = _copy.copy(arg) + else: + raise ValueError("""\ +The first argument to the plotly.graph_objs.carpet.baxis.Tickformatstop +constructor must be a dict or +an instance of :class:`plotly.graph_objs.carpet.baxis.Tickformatstop`""") + + self._skip_invalid = kwargs.pop("skip_invalid", False) + self._validate = kwargs.pop("_validate", True) + + self._set_property("dtickrange", arg, dtickrange) + self._set_property("enabled", arg, enabled) + self._set_property("name", arg, name) + self._set_property("templateitemname", arg, templateitemname) + self._set_property("value", arg, value) + self._process_kwargs(**dict(arg, **kwargs)) + self._skip_invalid = False diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/carpet/baxis/_title.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/carpet/baxis/_title.py new file mode 100644 index 0000000000000000000000000000000000000000..b1e66dd3726bf238197347ee0b37726fbc6ea6b4 --- /dev/null +++ b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/carpet/baxis/_title.py @@ -0,0 +1,130 @@ +# --- THIS FILE IS AUTO-GENERATED --- +# Modifications will be overwitten the next time code generation run. + +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Title(_BaseTraceHierarchyType): + _parent_path_str = "carpet.baxis" + _path_str = "carpet.baxis.title" + _valid_props = {"font", "offset", "text"} + + @property + def font(self): + """ + Sets this axis' title font. + + The 'font' property is an instance of Font + that may be specified as: + - An instance of :class:`plotly.graph_objs.carpet.baxis.title.Font` + - A dict of string/value properties that will be passed + to the Font constructor + + Returns + ------- + plotly.graph_objs.carpet.baxis.title.Font + """ + return self["font"] + + @font.setter + def font(self, val): + self["font"] = val + + @property + def offset(self): + """ + An additional amount by which to offset the title from the tick + labels, given in pixels. + + The 'offset' property is a number and may be specified as: + - An int or float + + Returns + ------- + int|float + """ + return self["offset"] + + @offset.setter + def offset(self, val): + self["offset"] = val + + @property + def text(self): + """ + Sets the title of this axis. + + The 'text' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["text"] + + @text.setter + def text(self, val): + self["text"] = val + + @property + def _prop_descriptions(self): + return """\ + font + Sets this axis' title font. + offset + An additional amount by which to offset the title from + the tick labels, given in pixels. + text + Sets the title of this axis. + """ + + def __init__(self, arg=None, font=None, offset=None, text=None, **kwargs): + """ + Construct a new Title object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.carpet.baxis.Title` + font + Sets this axis' title font. + offset + An additional amount by which to offset the title from + the tick labels, given in pixels. + text + Sets the title of this axis. + + Returns + ------- + Title + """ + super().__init__("title") + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + if arg is None: + arg = {} + elif isinstance(arg, self.__class__): + arg = arg.to_plotly_json() + elif isinstance(arg, dict): + arg = _copy.copy(arg) + else: + raise ValueError("""\ +The first argument to the plotly.graph_objs.carpet.baxis.Title +constructor must be a dict or +an instance of :class:`plotly.graph_objs.carpet.baxis.Title`""") + + self._skip_invalid = kwargs.pop("skip_invalid", False) + self._validate = kwargs.pop("_validate", True) + + self._set_property("font", arg, font) + self._set_property("offset", arg, offset) + self._set_property("text", arg, text) + self._process_kwargs(**dict(arg, **kwargs)) + self._skip_invalid = False diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/carpet/baxis/title/.___init__.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/carpet/baxis/title/.___init__.py new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/carpet/baxis/title/.___init__.py differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/carpet/baxis/title/.___pycache__ b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/carpet/baxis/title/.___pycache__ new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/carpet/baxis/title/.___pycache__ differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/carpet/baxis/title/.__font.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/carpet/baxis/title/.__font.py new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/carpet/baxis/title/.__font.py differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/carpet/baxis/title/__init__.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/carpet/baxis/title/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..56f600d3458c41f269053307377e9707ab13e090 --- /dev/null +++ b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/carpet/baxis/title/__init__.py @@ -0,0 +1,9 @@ +import sys +from typing import TYPE_CHECKING + +if TYPE_CHECKING: + from ._font import Font +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import(__name__, [], ["._font.Font"]) diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/carpet/baxis/title/_font.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/carpet/baxis/title/_font.py new file mode 100644 index 0000000000000000000000000000000000000000..58b35959d5ef8a290331f2e79b1418d2bd964a87 --- /dev/null +++ b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/carpet/baxis/title/_font.py @@ -0,0 +1,334 @@ +# --- THIS FILE IS AUTO-GENERATED --- +# Modifications will be overwitten the next time code generation run. + +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Font(_BaseTraceHierarchyType): + _parent_path_str = "carpet.baxis.title" + _path_str = "carpet.baxis.title.font" + _valid_props = { + "color", + "family", + "lineposition", + "shadow", + "size", + "style", + "textcase", + "variant", + "weight", + } + + @property + def color(self): + """ + The 'color' property is a color and may be specified as: + - A hex string (e.g. '#ff0000') + - An rgb/rgba string (e.g. 'rgb(255,0,0)') + - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') + - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') + - A named CSS color: see https://plotly.com/python/css-colors/ for a list + + Returns + ------- + str + """ + return self["color"] + + @color.setter + def color(self, val): + self["color"] = val + + @property + def family(self): + """ + HTML font family - the typeface that will be applied by the web + browser. The web browser can only apply a font if it is + available on the system where it runs. Provide multiple font + families, separated by commas, to indicate the order in which + to apply fonts if they aren't available. + + The 'family' property is a string and must be specified as: + - A non-empty string + + Returns + ------- + str + """ + return self["family"] + + @family.setter + def family(self, val): + self["family"] = val + + @property + def lineposition(self): + """ + Sets the kind of decoration line(s) with text, such as an + "under", "over" or "through" as well as combinations e.g. + "under+over", etc. + + The 'lineposition' property is a flaglist and may be specified + as a string containing: + - Any combination of ['under', 'over', 'through'] joined with '+' characters + (e.g. 'under+over') + OR exactly one of ['none'] (e.g. 'none') + + Returns + ------- + Any + """ + return self["lineposition"] + + @lineposition.setter + def lineposition(self, val): + self["lineposition"] = val + + @property + def shadow(self): + """ + Sets the shape and color of the shadow behind text. "auto" + places minimal shadow and applies contrast text font color. See + https://developer.mozilla.org/en-US/docs/Web/CSS/text-shadow + for additional options. + + The 'shadow' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["shadow"] + + @shadow.setter + def shadow(self, val): + self["shadow"] = val + + @property + def size(self): + """ + The 'size' property is a number and may be specified as: + - An int or float in the interval [1, inf] + + Returns + ------- + int|float + """ + return self["size"] + + @size.setter + def size(self, val): + self["size"] = val + + @property + def style(self): + """ + Sets whether a font should be styled with a normal or italic + face from its family. + + The 'style' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['normal', 'italic'] + + Returns + ------- + Any + """ + return self["style"] + + @style.setter + def style(self, val): + self["style"] = val + + @property + def textcase(self): + """ + Sets capitalization of text. It can be used to make text appear + in all-uppercase or all-lowercase, or with each word + capitalized. + + The 'textcase' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['normal', 'word caps', 'upper', 'lower'] + + Returns + ------- + Any + """ + return self["textcase"] + + @textcase.setter + def textcase(self, val): + self["textcase"] = val + + @property + def variant(self): + """ + Sets the variant of the font. + + The 'variant' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['normal', 'small-caps', 'all-small-caps', + 'all-petite-caps', 'petite-caps', 'unicase'] + + Returns + ------- + Any + """ + return self["variant"] + + @variant.setter + def variant(self, val): + self["variant"] = val + + @property + def weight(self): + """ + Sets the weight (or boldness) of the font. + + The 'weight' property is a integer and may be specified as: + - An int (or float that will be cast to an int) + in the interval [1, 1000] + OR exactly one of ['normal', 'bold'] (e.g. 'bold') + + Returns + ------- + int + """ + return self["weight"] + + @weight.setter + def weight(self, val): + self["weight"] = val + + @property + def _prop_descriptions(self): + return """\ + color + + family + HTML font family - the typeface that will be applied by + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. + lineposition + Sets the kind of decoration line(s) with text, such as + an "under", "over" or "through" as well as combinations + e.g. "under+over", etc. + shadow + Sets the shape and color of the shadow behind text. + "auto" places minimal shadow and applies contrast text + font color. See https://developer.mozilla.org/en- + US/docs/Web/CSS/text-shadow for additional options. + size + + style + Sets whether a font should be styled with a normal or + italic face from its family. + textcase + Sets capitalization of text. It can be used to make + text appear in all-uppercase or all-lowercase, or with + each word capitalized. + variant + Sets the variant of the font. + weight + Sets the weight (or boldness) of the font. + """ + + def __init__( + self, + arg=None, + color=None, + family=None, + lineposition=None, + shadow=None, + size=None, + style=None, + textcase=None, + variant=None, + weight=None, + **kwargs, + ): + """ + Construct a new Font object + + Sets this axis' title font. + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.carpet.baxis.title.Font` + color + + family + HTML font family - the typeface that will be applied by + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. + lineposition + Sets the kind of decoration line(s) with text, such as + an "under", "over" or "through" as well as combinations + e.g. "under+over", etc. + shadow + Sets the shape and color of the shadow behind text. + "auto" places minimal shadow and applies contrast text + font color. See https://developer.mozilla.org/en- + US/docs/Web/CSS/text-shadow for additional options. + size + + style + Sets whether a font should be styled with a normal or + italic face from its family. + textcase + Sets capitalization of text. It can be used to make + text appear in all-uppercase or all-lowercase, or with + each word capitalized. + variant + Sets the variant of the font. + weight + Sets the weight (or boldness) of the font. + + Returns + ------- + Font + """ + super().__init__("font") + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + if arg is None: + arg = {} + elif isinstance(arg, self.__class__): + arg = arg.to_plotly_json() + elif isinstance(arg, dict): + arg = _copy.copy(arg) + else: + raise ValueError("""\ +The first argument to the plotly.graph_objs.carpet.baxis.title.Font +constructor must be a dict or +an instance of :class:`plotly.graph_objs.carpet.baxis.title.Font`""") + + self._skip_invalid = kwargs.pop("skip_invalid", False) + self._validate = kwargs.pop("_validate", True) + + self._set_property("color", arg, color) + self._set_property("family", arg, family) + self._set_property("lineposition", arg, lineposition) + self._set_property("shadow", arg, shadow) + self._set_property("size", arg, size) + self._set_property("style", arg, style) + self._set_property("textcase", arg, textcase) + self._set_property("variant", arg, variant) + self._set_property("weight", arg, weight) + self._process_kwargs(**dict(arg, **kwargs)) + self._skip_invalid = False diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/carpet/legendgrouptitle/.___init__.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/carpet/legendgrouptitle/.___init__.py new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/carpet/legendgrouptitle/.___init__.py differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/carpet/legendgrouptitle/.___pycache__ b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/carpet/legendgrouptitle/.___pycache__ new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/carpet/legendgrouptitle/.___pycache__ differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/carpet/legendgrouptitle/.__font.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/carpet/legendgrouptitle/.__font.py new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/carpet/legendgrouptitle/.__font.py differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/carpet/legendgrouptitle/__init__.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/carpet/legendgrouptitle/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..56f600d3458c41f269053307377e9707ab13e090 --- /dev/null +++ b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/carpet/legendgrouptitle/__init__.py @@ -0,0 +1,9 @@ +import sys +from typing import TYPE_CHECKING + +if TYPE_CHECKING: + from ._font import Font +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import(__name__, [], ["._font.Font"]) diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/carpet/legendgrouptitle/_font.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/carpet/legendgrouptitle/_font.py new file mode 100644 index 0000000000000000000000000000000000000000..d8f6eb1859ddd46de0d97ca432f61c0b061d4edc --- /dev/null +++ b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/carpet/legendgrouptitle/_font.py @@ -0,0 +1,334 @@ +# --- THIS FILE IS AUTO-GENERATED --- +# Modifications will be overwitten the next time code generation run. + +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Font(_BaseTraceHierarchyType): + _parent_path_str = "carpet.legendgrouptitle" + _path_str = "carpet.legendgrouptitle.font" + _valid_props = { + "color", + "family", + "lineposition", + "shadow", + "size", + "style", + "textcase", + "variant", + "weight", + } + + @property + def color(self): + """ + The 'color' property is a color and may be specified as: + - A hex string (e.g. '#ff0000') + - An rgb/rgba string (e.g. 'rgb(255,0,0)') + - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') + - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') + - A named CSS color: see https://plotly.com/python/css-colors/ for a list + + Returns + ------- + str + """ + return self["color"] + + @color.setter + def color(self, val): + self["color"] = val + + @property + def family(self): + """ + HTML font family - the typeface that will be applied by the web + browser. The web browser can only apply a font if it is + available on the system where it runs. Provide multiple font + families, separated by commas, to indicate the order in which + to apply fonts if they aren't available. + + The 'family' property is a string and must be specified as: + - A non-empty string + + Returns + ------- + str + """ + return self["family"] + + @family.setter + def family(self, val): + self["family"] = val + + @property + def lineposition(self): + """ + Sets the kind of decoration line(s) with text, such as an + "under", "over" or "through" as well as combinations e.g. + "under+over", etc. + + The 'lineposition' property is a flaglist and may be specified + as a string containing: + - Any combination of ['under', 'over', 'through'] joined with '+' characters + (e.g. 'under+over') + OR exactly one of ['none'] (e.g. 'none') + + Returns + ------- + Any + """ + return self["lineposition"] + + @lineposition.setter + def lineposition(self, val): + self["lineposition"] = val + + @property + def shadow(self): + """ + Sets the shape and color of the shadow behind text. "auto" + places minimal shadow and applies contrast text font color. See + https://developer.mozilla.org/en-US/docs/Web/CSS/text-shadow + for additional options. + + The 'shadow' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["shadow"] + + @shadow.setter + def shadow(self, val): + self["shadow"] = val + + @property + def size(self): + """ + The 'size' property is a number and may be specified as: + - An int or float in the interval [1, inf] + + Returns + ------- + int|float + """ + return self["size"] + + @size.setter + def size(self, val): + self["size"] = val + + @property + def style(self): + """ + Sets whether a font should be styled with a normal or italic + face from its family. + + The 'style' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['normal', 'italic'] + + Returns + ------- + Any + """ + return self["style"] + + @style.setter + def style(self, val): + self["style"] = val + + @property + def textcase(self): + """ + Sets capitalization of text. It can be used to make text appear + in all-uppercase or all-lowercase, or with each word + capitalized. + + The 'textcase' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['normal', 'word caps', 'upper', 'lower'] + + Returns + ------- + Any + """ + return self["textcase"] + + @textcase.setter + def textcase(self, val): + self["textcase"] = val + + @property + def variant(self): + """ + Sets the variant of the font. + + The 'variant' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['normal', 'small-caps', 'all-small-caps', + 'all-petite-caps', 'petite-caps', 'unicase'] + + Returns + ------- + Any + """ + return self["variant"] + + @variant.setter + def variant(self, val): + self["variant"] = val + + @property + def weight(self): + """ + Sets the weight (or boldness) of the font. + + The 'weight' property is a integer and may be specified as: + - An int (or float that will be cast to an int) + in the interval [1, 1000] + OR exactly one of ['normal', 'bold'] (e.g. 'bold') + + Returns + ------- + int + """ + return self["weight"] + + @weight.setter + def weight(self, val): + self["weight"] = val + + @property + def _prop_descriptions(self): + return """\ + color + + family + HTML font family - the typeface that will be applied by + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. + lineposition + Sets the kind of decoration line(s) with text, such as + an "under", "over" or "through" as well as combinations + e.g. "under+over", etc. + shadow + Sets the shape and color of the shadow behind text. + "auto" places minimal shadow and applies contrast text + font color. See https://developer.mozilla.org/en- + US/docs/Web/CSS/text-shadow for additional options. + size + + style + Sets whether a font should be styled with a normal or + italic face from its family. + textcase + Sets capitalization of text. It can be used to make + text appear in all-uppercase or all-lowercase, or with + each word capitalized. + variant + Sets the variant of the font. + weight + Sets the weight (or boldness) of the font. + """ + + def __init__( + self, + arg=None, + color=None, + family=None, + lineposition=None, + shadow=None, + size=None, + style=None, + textcase=None, + variant=None, + weight=None, + **kwargs, + ): + """ + Construct a new Font object + + Sets this legend group's title font. + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.carpet.legendgrouptitle.Font` + color + + family + HTML font family - the typeface that will be applied by + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. + lineposition + Sets the kind of decoration line(s) with text, such as + an "under", "over" or "through" as well as combinations + e.g. "under+over", etc. + shadow + Sets the shape and color of the shadow behind text. + "auto" places minimal shadow and applies contrast text + font color. See https://developer.mozilla.org/en- + US/docs/Web/CSS/text-shadow for additional options. + size + + style + Sets whether a font should be styled with a normal or + italic face from its family. + textcase + Sets capitalization of text. It can be used to make + text appear in all-uppercase or all-lowercase, or with + each word capitalized. + variant + Sets the variant of the font. + weight + Sets the weight (or boldness) of the font. + + Returns + ------- + Font + """ + super().__init__("font") + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + if arg is None: + arg = {} + elif isinstance(arg, self.__class__): + arg = arg.to_plotly_json() + elif isinstance(arg, dict): + arg = _copy.copy(arg) + else: + raise ValueError("""\ +The first argument to the plotly.graph_objs.carpet.legendgrouptitle.Font +constructor must be a dict or +an instance of :class:`plotly.graph_objs.carpet.legendgrouptitle.Font`""") + + self._skip_invalid = kwargs.pop("skip_invalid", False) + self._validate = kwargs.pop("_validate", True) + + self._set_property("color", arg, color) + self._set_property("family", arg, family) + self._set_property("lineposition", arg, lineposition) + self._set_property("shadow", arg, shadow) + self._set_property("size", arg, size) + self._set_property("style", arg, style) + self._set_property("textcase", arg, textcase) + self._set_property("variant", arg, variant) + self._set_property("weight", arg, weight) + self._process_kwargs(**dict(arg, **kwargs)) + self._skip_invalid = False diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/choropleth/.___init__.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/choropleth/.___init__.py new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/choropleth/.___init__.py differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/choropleth/.___pycache__ b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/choropleth/.___pycache__ new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/choropleth/.___pycache__ differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/choropleth/.__colorbar.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/choropleth/.__colorbar.py new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/choropleth/.__colorbar.py differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/choropleth/.__hoverlabel.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/choropleth/.__hoverlabel.py new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/choropleth/.__hoverlabel.py differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/choropleth/.__legendgrouptitle.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/choropleth/.__legendgrouptitle.py new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/choropleth/.__legendgrouptitle.py differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/choropleth/.__marker.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/choropleth/.__marker.py new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/choropleth/.__marker.py differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/choropleth/.__selected.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/choropleth/.__selected.py new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/choropleth/.__selected.py differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/choropleth/.__stream.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/choropleth/.__stream.py new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/choropleth/.__stream.py differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/choropleth/.__unselected.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/choropleth/.__unselected.py new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/choropleth/.__unselected.py differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/choropleth/._colorbar b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/choropleth/._colorbar new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/choropleth/._colorbar differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/choropleth/._hoverlabel b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/choropleth/._hoverlabel new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/choropleth/._hoverlabel differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/choropleth/._legendgrouptitle b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/choropleth/._legendgrouptitle new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/choropleth/._legendgrouptitle differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/choropleth/._marker b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/choropleth/._marker new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/choropleth/._marker differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/choropleth/._selected b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/choropleth/._selected new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/choropleth/._selected differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/choropleth/._unselected b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/choropleth/._unselected new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/choropleth/._unselected differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/choropleth/__init__.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/choropleth/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..bbdf79a35a765428a67b80fc7e9703117398bc32 --- /dev/null +++ b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/choropleth/__init__.py @@ -0,0 +1,40 @@ +import sys +from typing import TYPE_CHECKING + +if TYPE_CHECKING: + from ._colorbar import ColorBar + from ._hoverlabel import Hoverlabel + from ._legendgrouptitle import Legendgrouptitle + from ._marker import Marker + from ._selected import Selected + from ._stream import Stream + from ._unselected import Unselected + from . import colorbar + from . import hoverlabel + from . import legendgrouptitle + from . import marker + from . import selected + from . import unselected +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [ + ".colorbar", + ".hoverlabel", + ".legendgrouptitle", + ".marker", + ".selected", + ".unselected", + ], + [ + "._colorbar.ColorBar", + "._hoverlabel.Hoverlabel", + "._legendgrouptitle.Legendgrouptitle", + "._marker.Marker", + "._selected.Selected", + "._stream.Stream", + "._unselected.Unselected", + ], + ) diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/choropleth/_colorbar.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/choropleth/_colorbar.py new file mode 100644 index 0000000000000000000000000000000000000000..40aa56437a46b456e82e8982c067c01d242ec636 --- /dev/null +++ b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/choropleth/_colorbar.py @@ -0,0 +1,1738 @@ +# --- THIS FILE IS AUTO-GENERATED --- +# Modifications will be overwitten the next time code generation run. + +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class ColorBar(_BaseTraceHierarchyType): + _parent_path_str = "choropleth" + _path_str = "choropleth.colorbar" + _valid_props = { + "bgcolor", + "bordercolor", + "borderwidth", + "dtick", + "exponentformat", + "labelalias", + "len", + "lenmode", + "minexponent", + "nticks", + "orientation", + "outlinecolor", + "outlinewidth", + "separatethousands", + "showexponent", + "showticklabels", + "showtickprefix", + "showticksuffix", + "thickness", + "thicknessmode", + "tick0", + "tickangle", + "tickcolor", + "tickfont", + "tickformat", + "tickformatstopdefaults", + "tickformatstops", + "ticklabeloverflow", + "ticklabelposition", + "ticklabelstep", + "ticklen", + "tickmode", + "tickprefix", + "ticks", + "ticksuffix", + "ticktext", + "ticktextsrc", + "tickvals", + "tickvalssrc", + "tickwidth", + "title", + "x", + "xanchor", + "xpad", + "xref", + "y", + "yanchor", + "ypad", + "yref", + } + + @property + def bgcolor(self): + """ + Sets the color of padded area. + + The 'bgcolor' property is a color and may be specified as: + - A hex string (e.g. '#ff0000') + - An rgb/rgba string (e.g. 'rgb(255,0,0)') + - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') + - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') + - A named CSS color: see https://plotly.com/python/css-colors/ for a list + + Returns + ------- + str + """ + return self["bgcolor"] + + @bgcolor.setter + def bgcolor(self, val): + self["bgcolor"] = val + + @property + def bordercolor(self): + """ + Sets the axis line color. + + The 'bordercolor' property is a color and may be specified as: + - A hex string (e.g. '#ff0000') + - An rgb/rgba string (e.g. 'rgb(255,0,0)') + - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') + - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') + - A named CSS color: see https://plotly.com/python/css-colors/ for a list + + Returns + ------- + str + """ + return self["bordercolor"] + + @bordercolor.setter + def bordercolor(self, val): + self["bordercolor"] = val + + @property + def borderwidth(self): + """ + Sets the width (in px) or the border enclosing this color bar. + + The 'borderwidth' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["borderwidth"] + + @borderwidth.setter + def borderwidth(self, val): + self["borderwidth"] = val + + @property + def dtick(self): + """ + Sets the step in-between ticks on this axis. Use with `tick0`. + Must be a positive number, or special strings available to + "log" and "date" axes. If the axis `type` is "log", then ticks + are set every 10^(n*dtick) where n is the tick number. For + example, to set a tick mark at 1, 10, 100, 1000, ... set dtick + to 1. To set tick marks at 1, 100, 10000, ... set dtick to 2. + To set tick marks at 1, 5, 25, 125, 625, 3125, ... set dtick to + log_10(5), or 0.69897000433. "log" has several special values; + "L", where `f` is a positive number, gives ticks linearly + spaced in value (but not position). For example `tick0` = 0.1, + `dtick` = "L0.5" will put ticks at 0.1, 0.6, 1.1, 1.6 etc. To + show powers of 10 plus small digits between, use "D1" (all + digits) or "D2" (only 2 and 5). `tick0` is ignored for "D1" and + "D2". If the axis `type` is "date", then you must convert the + time to milliseconds. For example, to set the interval between + ticks to one day, set `dtick` to 86400000.0. "date" also has + special values "M" gives ticks spaced by a number of months. + `n` must be a positive integer. To set ticks on the 15th of + every third month, set `tick0` to "2000-01-15" and `dtick` to + "M3". To set ticks every 4 years, set `dtick` to "M48" + + The 'dtick' property accepts values of any type + + Returns + ------- + Any + """ + return self["dtick"] + + @dtick.setter + def dtick(self, val): + self["dtick"] = val + + @property + def exponentformat(self): + """ + Determines a formatting rule for the tick exponents. For + example, consider the number 1,000,000,000. If "none", it + appears as 1,000,000,000. If "e", 1e+9. If "E", 1E+9. If + "power", 1x10^9 (with 9 in a super script). If "SI", 1G. If + "B", 1B. "SI" uses prefixes from "femto" f (10^-15) to "tera" T + (10^12). *SI extended* covers instead the full SI range from + "quecto" q (10^-30) to "quetta" Q (10^30). If "SI" or *SI + extended* is used and the exponent is beyond the above ranges, + the formatting rule will automatically be switched to the power + notation. + + The 'exponentformat' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['none', 'e', 'E', 'power', 'SI', 'B', 'SI extended'] + + Returns + ------- + Any + """ + return self["exponentformat"] + + @exponentformat.setter + def exponentformat(self, val): + self["exponentformat"] = val + + @property + def labelalias(self): + """ + Replacement text for specific tick or hover labels. For example + using {US: 'USA', CA: 'Canada'} changes US to USA and CA to + Canada. The labels we would have shown must match the keys + exactly, after adding any tickprefix or ticksuffix. For + negative numbers the minus sign symbol used (U+2212) is wider + than the regular ascii dash. That means you need to use −1 + instead of -1. labelalias can be used with any axis type, and + both keys (if needed) and values (if desired) can include html- + like tags or MathJax. + + The 'labelalias' property accepts values of any type + + Returns + ------- + Any + """ + return self["labelalias"] + + @labelalias.setter + def labelalias(self, val): + self["labelalias"] = val + + @property + def len(self): + """ + Sets the length of the color bar This measure excludes the + padding of both ends. That is, the color bar length is this + length minus the padding on both ends. + + The 'len' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["len"] + + @len.setter + def len(self, val): + self["len"] = val + + @property + def lenmode(self): + """ + Determines whether this color bar's length (i.e. the measure in + the color variation direction) is set in units of plot + "fraction" or in *pixels. Use `len` to set the value. + + The 'lenmode' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['fraction', 'pixels'] + + Returns + ------- + Any + """ + return self["lenmode"] + + @lenmode.setter + def lenmode(self, val): + self["lenmode"] = val + + @property + def minexponent(self): + """ + Hide SI prefix for 10^n if |n| is below this number. This only + has an effect when `tickformat` is "SI" or "B". + + The 'minexponent' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["minexponent"] + + @minexponent.setter + def minexponent(self, val): + self["minexponent"] = val + + @property + def nticks(self): + """ + Specifies the maximum number of ticks for the particular axis. + The actual number of ticks will be chosen automatically to be + less than or equal to `nticks`. Has an effect only if + `tickmode` is set to "auto". + + The 'nticks' property is a integer and may be specified as: + - An int (or float that will be cast to an int) + in the interval [0, 9223372036854775807] + + Returns + ------- + int + """ + return self["nticks"] + + @nticks.setter + def nticks(self, val): + self["nticks"] = val + + @property + def orientation(self): + """ + Sets the orientation of the colorbar. + + The 'orientation' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['h', 'v'] + + Returns + ------- + Any + """ + return self["orientation"] + + @orientation.setter + def orientation(self, val): + self["orientation"] = val + + @property + def outlinecolor(self): + """ + Sets the axis line color. + + The 'outlinecolor' property is a color and may be specified as: + - A hex string (e.g. '#ff0000') + - An rgb/rgba string (e.g. 'rgb(255,0,0)') + - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') + - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') + - A named CSS color: see https://plotly.com/python/css-colors/ for a list + + Returns + ------- + str + """ + return self["outlinecolor"] + + @outlinecolor.setter + def outlinecolor(self, val): + self["outlinecolor"] = val + + @property + def outlinewidth(self): + """ + Sets the width (in px) of the axis line. + + The 'outlinewidth' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["outlinewidth"] + + @outlinewidth.setter + def outlinewidth(self, val): + self["outlinewidth"] = val + + @property + def separatethousands(self): + """ + If "true", even 4-digit integers are separated + + The 'separatethousands' property is a boolean and must be specified as: + - A boolean value: True or False + + Returns + ------- + bool + """ + return self["separatethousands"] + + @separatethousands.setter + def separatethousands(self, val): + self["separatethousands"] = val + + @property + def showexponent(self): + """ + If "all", all exponents are shown besides their significands. + If "first", only the exponent of the first tick is shown. If + "last", only the exponent of the last tick is shown. If "none", + no exponents appear. + + The 'showexponent' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['all', 'first', 'last', 'none'] + + Returns + ------- + Any + """ + return self["showexponent"] + + @showexponent.setter + def showexponent(self, val): + self["showexponent"] = val + + @property + def showticklabels(self): + """ + Determines whether or not the tick labels are drawn. + + The 'showticklabels' property is a boolean and must be specified as: + - A boolean value: True or False + + Returns + ------- + bool + """ + return self["showticklabels"] + + @showticklabels.setter + def showticklabels(self, val): + self["showticklabels"] = val + + @property + def showtickprefix(self): + """ + If "all", all tick labels are displayed with a prefix. If + "first", only the first tick is displayed with a prefix. If + "last", only the last tick is displayed with a suffix. If + "none", tick prefixes are hidden. + + The 'showtickprefix' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['all', 'first', 'last', 'none'] + + Returns + ------- + Any + """ + return self["showtickprefix"] + + @showtickprefix.setter + def showtickprefix(self, val): + self["showtickprefix"] = val + + @property + def showticksuffix(self): + """ + Same as `showtickprefix` but for tick suffixes. + + The 'showticksuffix' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['all', 'first', 'last', 'none'] + + Returns + ------- + Any + """ + return self["showticksuffix"] + + @showticksuffix.setter + def showticksuffix(self, val): + self["showticksuffix"] = val + + @property + def thickness(self): + """ + Sets the thickness of the color bar This measure excludes the + size of the padding, ticks and labels. + + The 'thickness' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["thickness"] + + @thickness.setter + def thickness(self, val): + self["thickness"] = val + + @property + def thicknessmode(self): + """ + Determines whether this color bar's thickness (i.e. the measure + in the constant color direction) is set in units of plot + "fraction" or in "pixels". Use `thickness` to set the value. + + The 'thicknessmode' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['fraction', 'pixels'] + + Returns + ------- + Any + """ + return self["thicknessmode"] + + @thicknessmode.setter + def thicknessmode(self, val): + self["thicknessmode"] = val + + @property + def tick0(self): + """ + Sets the placement of the first tick on this axis. Use with + `dtick`. If the axis `type` is "log", then you must take the + log of your starting tick (e.g. to set the starting tick to + 100, set the `tick0` to 2) except when `dtick`=*L* (see + `dtick` for more info). If the axis `type` is "date", it should + be a date string, like date data. If the axis `type` is + "category", it should be a number, using the scale where each + category is assigned a serial number from zero in the order it + appears. + + The 'tick0' property accepts values of any type + + Returns + ------- + Any + """ + return self["tick0"] + + @tick0.setter + def tick0(self, val): + self["tick0"] = val + + @property + def tickangle(self): + """ + Sets the angle of the tick labels with respect to the + horizontal. For example, a `tickangle` of -90 draws the tick + labels vertically. + + The 'tickangle' property is a angle (in degrees) that may be + specified as a number between -180 and 180. + Numeric values outside this range are converted to the equivalent value + (e.g. 270 is converted to -90). + + Returns + ------- + int|float + """ + return self["tickangle"] + + @tickangle.setter + def tickangle(self, val): + self["tickangle"] = val + + @property + def tickcolor(self): + """ + Sets the tick color. + + The 'tickcolor' property is a color and may be specified as: + - A hex string (e.g. '#ff0000') + - An rgb/rgba string (e.g. 'rgb(255,0,0)') + - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') + - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') + - A named CSS color: see https://plotly.com/python/css-colors/ for a list + + Returns + ------- + str + """ + return self["tickcolor"] + + @tickcolor.setter + def tickcolor(self, val): + self["tickcolor"] = val + + @property + def tickfont(self): + """ + Sets the color bar's tick label font + + The 'tickfont' property is an instance of Tickfont + that may be specified as: + - An instance of :class:`plotly.graph_objs.choropleth.colorbar.Tickfont` + - A dict of string/value properties that will be passed + to the Tickfont constructor + + Returns + ------- + plotly.graph_objs.choropleth.colorbar.Tickfont + """ + return self["tickfont"] + + @tickfont.setter + def tickfont(self, val): + self["tickfont"] = val + + @property + def tickformat(self): + """ + Sets the tick label formatting rule using d3 formatting mini- + languages which are very similar to those in Python. For + numbers, see: + https://github.com/d3/d3-format/tree/v1.4.5#d3-format. And for + dates see: https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format. We add two items to d3's date + formatter: "%h" for half of the year as a decimal number as + well as "%{n}f" for fractional seconds with n digits. For + example, *2016-10-13 09:15:23.456* with tickformat + "%H~%M~%S.%2f" would display "09~15~23.46" + + The 'tickformat' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["tickformat"] + + @tickformat.setter + def tickformat(self, val): + self["tickformat"] = val + + @property + def tickformatstops(self): + """ + The 'tickformatstops' property is a tuple of instances of + Tickformatstop that may be specified as: + - A list or tuple of instances of plotly.graph_objs.choropleth.colorbar.Tickformatstop + - A list or tuple of dicts of string/value properties that + will be passed to the Tickformatstop constructor + + Returns + ------- + tuple[plotly.graph_objs.choropleth.colorbar.Tickformatstop] + """ + return self["tickformatstops"] + + @tickformatstops.setter + def tickformatstops(self, val): + self["tickformatstops"] = val + + @property + def tickformatstopdefaults(self): + """ + When used in a template (as layout.template.data.choropleth.col + orbar.tickformatstopdefaults), sets the default property values + to use for elements of choropleth.colorbar.tickformatstops + + The 'tickformatstopdefaults' property is an instance of Tickformatstop + that may be specified as: + - An instance of :class:`plotly.graph_objs.choropleth.colorbar.Tickformatstop` + - A dict of string/value properties that will be passed + to the Tickformatstop constructor + + Returns + ------- + plotly.graph_objs.choropleth.colorbar.Tickformatstop + """ + return self["tickformatstopdefaults"] + + @tickformatstopdefaults.setter + def tickformatstopdefaults(self, val): + self["tickformatstopdefaults"] = val + + @property + def ticklabeloverflow(self): + """ + Determines how we handle tick labels that would overflow either + the graph div or the domain of the axis. The default value for + inside tick labels is *hide past domain*. In other cases the + default is *hide past div*. + + The 'ticklabeloverflow' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['allow', 'hide past div', 'hide past domain'] + + Returns + ------- + Any + """ + return self["ticklabeloverflow"] + + @ticklabeloverflow.setter + def ticklabeloverflow(self, val): + self["ticklabeloverflow"] = val + + @property + def ticklabelposition(self): + """ + Determines where tick labels are drawn relative to the ticks. + Left and right options are used when `orientation` is "h", top + and bottom when `orientation` is "v". + + The 'ticklabelposition' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['outside', 'inside', 'outside top', 'inside top', + 'outside left', 'inside left', 'outside right', 'inside + right', 'outside bottom', 'inside bottom'] + + Returns + ------- + Any + """ + return self["ticklabelposition"] + + @ticklabelposition.setter + def ticklabelposition(self, val): + self["ticklabelposition"] = val + + @property + def ticklabelstep(self): + """ + Sets the spacing between tick labels as compared to the spacing + between ticks. A value of 1 (default) means each tick gets a + label. A value of 2 means shows every 2nd label. A larger value + n means only every nth tick is labeled. `tick0` determines + which labels are shown. Not implemented for axes with `type` + "log" or "multicategory", or when `tickmode` is "array". + + The 'ticklabelstep' property is a integer and may be specified as: + - An int (or float that will be cast to an int) + in the interval [1, 9223372036854775807] + + Returns + ------- + int + """ + return self["ticklabelstep"] + + @ticklabelstep.setter + def ticklabelstep(self, val): + self["ticklabelstep"] = val + + @property + def ticklen(self): + """ + Sets the tick length (in px). + + The 'ticklen' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["ticklen"] + + @ticklen.setter + def ticklen(self, val): + self["ticklen"] = val + + @property + def tickmode(self): + """ + Sets the tick mode for this axis. If "auto", the number of + ticks is set via `nticks`. If "linear", the placement of the + ticks is determined by a starting position `tick0` and a tick + step `dtick` ("linear" is the default value if `tick0` and + `dtick` are provided). If "array", the placement of the ticks + is set via `tickvals` and the tick text is `ticktext`. ("array" + is the default value if `tickvals` is provided). + + The 'tickmode' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['auto', 'linear', 'array'] + + Returns + ------- + Any + """ + return self["tickmode"] + + @tickmode.setter + def tickmode(self, val): + self["tickmode"] = val + + @property + def tickprefix(self): + """ + Sets a tick label prefix. + + The 'tickprefix' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["tickprefix"] + + @tickprefix.setter + def tickprefix(self, val): + self["tickprefix"] = val + + @property + def ticks(self): + """ + Determines whether ticks are drawn or not. If "", this axis' + ticks are not drawn. If "outside" ("inside"), this axis' are + drawn outside (inside) the axis lines. + + The 'ticks' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['outside', 'inside', ''] + + Returns + ------- + Any + """ + return self["ticks"] + + @ticks.setter + def ticks(self, val): + self["ticks"] = val + + @property + def ticksuffix(self): + """ + Sets a tick label suffix. + + The 'ticksuffix' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["ticksuffix"] + + @ticksuffix.setter + def ticksuffix(self, val): + self["ticksuffix"] = val + + @property + def ticktext(self): + """ + Sets the text displayed at the ticks position via `tickvals`. + Only has an effect if `tickmode` is set to "array". Used with + `tickvals`. + + The 'ticktext' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["ticktext"] + + @ticktext.setter + def ticktext(self, val): + self["ticktext"] = val + + @property + def ticktextsrc(self): + """ + Sets the source reference on Chart Studio Cloud for `ticktext`. + + The 'ticktextsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["ticktextsrc"] + + @ticktextsrc.setter + def ticktextsrc(self, val): + self["ticktextsrc"] = val + + @property + def tickvals(self): + """ + Sets the values at which ticks on this axis appear. Only has an + effect if `tickmode` is set to "array". Used with `ticktext`. + + The 'tickvals' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["tickvals"] + + @tickvals.setter + def tickvals(self, val): + self["tickvals"] = val + + @property + def tickvalssrc(self): + """ + Sets the source reference on Chart Studio Cloud for `tickvals`. + + The 'tickvalssrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["tickvalssrc"] + + @tickvalssrc.setter + def tickvalssrc(self, val): + self["tickvalssrc"] = val + + @property + def tickwidth(self): + """ + Sets the tick width (in px). + + The 'tickwidth' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["tickwidth"] + + @tickwidth.setter + def tickwidth(self, val): + self["tickwidth"] = val + + @property + def title(self): + """ + The 'title' property is an instance of Title + that may be specified as: + - An instance of :class:`plotly.graph_objs.choropleth.colorbar.Title` + - A dict of string/value properties that will be passed + to the Title constructor + + Returns + ------- + plotly.graph_objs.choropleth.colorbar.Title + """ + return self["title"] + + @title.setter + def title(self, val): + self["title"] = val + + @property + def x(self): + """ + Sets the x position with respect to `xref` of the color bar (in + plot fraction). When `xref` is "paper", defaults to 1.02 when + `orientation` is "v" and 0.5 when `orientation` is "h". When + `xref` is "container", defaults to 1 when `orientation` is "v" + and 0.5 when `orientation` is "h". Must be between 0 and 1 if + `xref` is "container" and between "-2" and 3 if `xref` is + "paper". + + The 'x' property is a number and may be specified as: + - An int or float + + Returns + ------- + int|float + """ + return self["x"] + + @x.setter + def x(self, val): + self["x"] = val + + @property + def xanchor(self): + """ + Sets this color bar's horizontal position anchor. This anchor + binds the `x` position to the "left", "center" or "right" of + the color bar. Defaults to "left" when `orientation` is "v" and + "center" when `orientation` is "h". + + The 'xanchor' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['left', 'center', 'right'] + + Returns + ------- + Any + """ + return self["xanchor"] + + @xanchor.setter + def xanchor(self, val): + self["xanchor"] = val + + @property + def xpad(self): + """ + Sets the amount of padding (in px) along the x direction. + + The 'xpad' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["xpad"] + + @xpad.setter + def xpad(self, val): + self["xpad"] = val + + @property + def xref(self): + """ + Sets the container `x` refers to. "container" spans the entire + `width` of the plot. "paper" refers to the width of the + plotting area only. + + The 'xref' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['container', 'paper'] + + Returns + ------- + Any + """ + return self["xref"] + + @xref.setter + def xref(self, val): + self["xref"] = val + + @property + def y(self): + """ + Sets the y position with respect to `yref` of the color bar (in + plot fraction). When `yref` is "paper", defaults to 0.5 when + `orientation` is "v" and 1.02 when `orientation` is "h". When + `yref` is "container", defaults to 0.5 when `orientation` is + "v" and 1 when `orientation` is "h". Must be between 0 and 1 if + `yref` is "container" and between "-2" and 3 if `yref` is + "paper". + + The 'y' property is a number and may be specified as: + - An int or float + + Returns + ------- + int|float + """ + return self["y"] + + @y.setter + def y(self, val): + self["y"] = val + + @property + def yanchor(self): + """ + Sets this color bar's vertical position anchor This anchor + binds the `y` position to the "top", "middle" or "bottom" of + the color bar. Defaults to "middle" when `orientation` is "v" + and "bottom" when `orientation` is "h". + + The 'yanchor' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['top', 'middle', 'bottom'] + + Returns + ------- + Any + """ + return self["yanchor"] + + @yanchor.setter + def yanchor(self, val): + self["yanchor"] = val + + @property + def ypad(self): + """ + Sets the amount of padding (in px) along the y direction. + + The 'ypad' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["ypad"] + + @ypad.setter + def ypad(self, val): + self["ypad"] = val + + @property + def yref(self): + """ + Sets the container `y` refers to. "container" spans the entire + `height` of the plot. "paper" refers to the height of the + plotting area only. + + The 'yref' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['container', 'paper'] + + Returns + ------- + Any + """ + return self["yref"] + + @yref.setter + def yref(self, val): + self["yref"] = val + + @property + def _prop_descriptions(self): + return """\ + bgcolor + Sets the color of padded area. + bordercolor + Sets the axis line color. + borderwidth + Sets the width (in px) or the border enclosing this + color bar. + dtick + Sets the step in-between ticks on this axis. Use with + `tick0`. Must be a positive number, or special strings + available to "log" and "date" axes. If the axis `type` + is "log", then ticks are set every 10^(n*dtick) where n + is the tick number. For example, to set a tick mark at + 1, 10, 100, 1000, ... set dtick to 1. To set tick marks + at 1, 100, 10000, ... set dtick to 2. To set tick marks + at 1, 5, 25, 125, 625, 3125, ... set dtick to + log_10(5), or 0.69897000433. "log" has several special + values; "L", where `f` is a positive number, gives + ticks linearly spaced in value (but not position). For + example `tick0` = 0.1, `dtick` = "L0.5" will put ticks + at 0.1, 0.6, 1.1, 1.6 etc. To show powers of 10 plus + small digits between, use "D1" (all digits) or "D2" + (only 2 and 5). `tick0` is ignored for "D1" and "D2". + If the axis `type` is "date", then you must convert the + time to milliseconds. For example, to set the interval + between ticks to one day, set `dtick` to 86400000.0. + "date" also has special values "M" gives ticks + spaced by a number of months. `n` must be a positive + integer. To set ticks on the 15th of every third month, + set `tick0` to "2000-01-15" and `dtick` to "M3". To set + ticks every 4 years, set `dtick` to "M48" + exponentformat + Determines a formatting rule for the tick exponents. + For example, consider the number 1,000,000,000. If + "none", it appears as 1,000,000,000. If "e", 1e+9. If + "E", 1E+9. If "power", 1x10^9 (with 9 in a super + script). If "SI", 1G. If "B", 1B. "SI" uses prefixes + from "femto" f (10^-15) to "tera" T (10^12). *SI + extended* covers instead the full SI range from + "quecto" q (10^-30) to "quetta" Q (10^30). If "SI" or + *SI extended* is used and the exponent is beyond the + above ranges, the formatting rule will automatically be + switched to the power notation. + labelalias + Replacement text for specific tick or hover labels. For + example using {US: 'USA', CA: 'Canada'} changes US to + USA and CA to Canada. The labels we would have shown + must match the keys exactly, after adding any + tickprefix or ticksuffix. For negative numbers the + minus sign symbol used (U+2212) is wider than the + regular ascii dash. That means you need to use −1 + instead of -1. labelalias can be used with any axis + type, and both keys (if needed) and values (if desired) + can include html-like tags or MathJax. + len + Sets the length of the color bar This measure excludes + the padding of both ends. That is, the color bar length + is this length minus the padding on both ends. + lenmode + Determines whether this color bar's length (i.e. the + measure in the color variation direction) is set in + units of plot "fraction" or in *pixels. Use `len` to + set the value. + minexponent + Hide SI prefix for 10^n if |n| is below this number. + This only has an effect when `tickformat` is "SI" or + "B". + nticks + Specifies the maximum number of ticks for the + particular axis. The actual number of ticks will be + chosen automatically to be less than or equal to + `nticks`. Has an effect only if `tickmode` is set to + "auto". + orientation + Sets the orientation of the colorbar. + outlinecolor + Sets the axis line color. + outlinewidth + Sets the width (in px) of the axis line. + separatethousands + If "true", even 4-digit integers are separated + showexponent + If "all", all exponents are shown besides their + significands. If "first", only the exponent of the + first tick is shown. If "last", only the exponent of + the last tick is shown. If "none", no exponents appear. + showticklabels + Determines whether or not the tick labels are drawn. + showtickprefix + If "all", all tick labels are displayed with a prefix. + If "first", only the first tick is displayed with a + prefix. If "last", only the last tick is displayed with + a suffix. If "none", tick prefixes are hidden. + showticksuffix + Same as `showtickprefix` but for tick suffixes. + thickness + Sets the thickness of the color bar This measure + excludes the size of the padding, ticks and labels. + thicknessmode + Determines whether this color bar's thickness (i.e. the + measure in the constant color direction) is set in + units of plot "fraction" or in "pixels". Use + `thickness` to set the value. + tick0 + Sets the placement of the first tick on this axis. Use + with `dtick`. If the axis `type` is "log", then you + must take the log of your starting tick (e.g. to set + the starting tick to 100, set the `tick0` to 2) except + when `dtick`=*L* (see `dtick` for more info). If the + axis `type` is "date", it should be a date string, like + date data. If the axis `type` is "category", it should + be a number, using the scale where each category is + assigned a serial number from zero in the order it + appears. + tickangle + Sets the angle of the tick labels with respect to the + horizontal. For example, a `tickangle` of -90 draws the + tick labels vertically. + tickcolor + Sets the tick color. + tickfont + Sets the color bar's tick label font + tickformat + Sets the tick label formatting rule using d3 formatting + mini-languages which are very similar to those in + Python. For numbers, see: + https://github.com/d3/d3-format/tree/v1.4.5#d3-format. + And for dates see: https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format. We add two items to + d3's date formatter: "%h" for half of the year as a + decimal number as well as "%{n}f" for fractional + seconds with n digits. For example, *2016-10-13 + 09:15:23.456* with tickformat "%H~%M~%S.%2f" would + display "09~15~23.46" + tickformatstops + A tuple of :class:`plotly.graph_objects.choropleth.colo + rbar.Tickformatstop` instances or dicts with compatible + properties + tickformatstopdefaults + When used in a template (as layout.template.data.chorop + leth.colorbar.tickformatstopdefaults), sets the default + property values to use for elements of + choropleth.colorbar.tickformatstops + ticklabeloverflow + Determines how we handle tick labels that would + overflow either the graph div or the domain of the + axis. The default value for inside tick labels is *hide + past domain*. In other cases the default is *hide past + div*. + ticklabelposition + Determines where tick labels are drawn relative to the + ticks. Left and right options are used when + `orientation` is "h", top and bottom when `orientation` + is "v". + ticklabelstep + Sets the spacing between tick labels as compared to the + spacing between ticks. A value of 1 (default) means + each tick gets a label. A value of 2 means shows every + 2nd label. A larger value n means only every nth tick + is labeled. `tick0` determines which labels are shown. + Not implemented for axes with `type` "log" or + "multicategory", or when `tickmode` is "array". + ticklen + Sets the tick length (in px). + tickmode + Sets the tick mode for this axis. If "auto", the number + of ticks is set via `nticks`. If "linear", the + placement of the ticks is determined by a starting + position `tick0` and a tick step `dtick` ("linear" is + the default value if `tick0` and `dtick` are provided). + If "array", the placement of the ticks is set via + `tickvals` and the tick text is `ticktext`. ("array" is + the default value if `tickvals` is provided). + tickprefix + Sets a tick label prefix. + ticks + Determines whether ticks are drawn or not. If "", this + axis' ticks are not drawn. If "outside" ("inside"), + this axis' are drawn outside (inside) the axis lines. + ticksuffix + Sets a tick label suffix. + ticktext + Sets the text displayed at the ticks position via + `tickvals`. Only has an effect if `tickmode` is set to + "array". Used with `tickvals`. + ticktextsrc + Sets the source reference on Chart Studio Cloud for + `ticktext`. + tickvals + Sets the values at which ticks on this axis appear. + Only has an effect if `tickmode` is set to "array". + Used with `ticktext`. + tickvalssrc + Sets the source reference on Chart Studio Cloud for + `tickvals`. + tickwidth + Sets the tick width (in px). + title + :class:`plotly.graph_objects.choropleth.colorbar.Title` + instance or dict with compatible properties + x + Sets the x position with respect to `xref` of the color + bar (in plot fraction). When `xref` is "paper", + defaults to 1.02 when `orientation` is "v" and 0.5 when + `orientation` is "h". When `xref` is "container", + defaults to 1 when `orientation` is "v" and 0.5 when + `orientation` is "h". Must be between 0 and 1 if `xref` + is "container" and between "-2" and 3 if `xref` is + "paper". + xanchor + Sets this color bar's horizontal position anchor. This + anchor binds the `x` position to the "left", "center" + or "right" of the color bar. Defaults to "left" when + `orientation` is "v" and "center" when `orientation` is + "h". + xpad + Sets the amount of padding (in px) along the x + direction. + xref + Sets the container `x` refers to. "container" spans the + entire `width` of the plot. "paper" refers to the width + of the plotting area only. + y + Sets the y position with respect to `yref` of the color + bar (in plot fraction). When `yref` is "paper", + defaults to 0.5 when `orientation` is "v" and 1.02 when + `orientation` is "h". When `yref` is "container", + defaults to 0.5 when `orientation` is "v" and 1 when + `orientation` is "h". Must be between 0 and 1 if `yref` + is "container" and between "-2" and 3 if `yref` is + "paper". + yanchor + Sets this color bar's vertical position anchor This + anchor binds the `y` position to the "top", "middle" or + "bottom" of the color bar. Defaults to "middle" when + `orientation` is "v" and "bottom" when `orientation` is + "h". + ypad + Sets the amount of padding (in px) along the y + direction. + yref + Sets the container `y` refers to. "container" spans the + entire `height` of the plot. "paper" refers to the + height of the plotting area only. + """ + + def __init__( + self, + arg=None, + bgcolor=None, + bordercolor=None, + borderwidth=None, + dtick=None, + exponentformat=None, + labelalias=None, + len=None, + lenmode=None, + minexponent=None, + nticks=None, + orientation=None, + outlinecolor=None, + outlinewidth=None, + separatethousands=None, + showexponent=None, + showticklabels=None, + showtickprefix=None, + showticksuffix=None, + thickness=None, + thicknessmode=None, + tick0=None, + tickangle=None, + tickcolor=None, + tickfont=None, + tickformat=None, + tickformatstops=None, + tickformatstopdefaults=None, + ticklabeloverflow=None, + ticklabelposition=None, + ticklabelstep=None, + ticklen=None, + tickmode=None, + tickprefix=None, + ticks=None, + ticksuffix=None, + ticktext=None, + ticktextsrc=None, + tickvals=None, + tickvalssrc=None, + tickwidth=None, + title=None, + x=None, + xanchor=None, + xpad=None, + xref=None, + y=None, + yanchor=None, + ypad=None, + yref=None, + **kwargs, + ): + """ + Construct a new ColorBar object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.choropleth.ColorBar` + bgcolor + Sets the color of padded area. + bordercolor + Sets the axis line color. + borderwidth + Sets the width (in px) or the border enclosing this + color bar. + dtick + Sets the step in-between ticks on this axis. Use with + `tick0`. Must be a positive number, or special strings + available to "log" and "date" axes. If the axis `type` + is "log", then ticks are set every 10^(n*dtick) where n + is the tick number. For example, to set a tick mark at + 1, 10, 100, 1000, ... set dtick to 1. To set tick marks + at 1, 100, 10000, ... set dtick to 2. To set tick marks + at 1, 5, 25, 125, 625, 3125, ... set dtick to + log_10(5), or 0.69897000433. "log" has several special + values; "L", where `f` is a positive number, gives + ticks linearly spaced in value (but not position). For + example `tick0` = 0.1, `dtick` = "L0.5" will put ticks + at 0.1, 0.6, 1.1, 1.6 etc. To show powers of 10 plus + small digits between, use "D1" (all digits) or "D2" + (only 2 and 5). `tick0` is ignored for "D1" and "D2". + If the axis `type` is "date", then you must convert the + time to milliseconds. For example, to set the interval + between ticks to one day, set `dtick` to 86400000.0. + "date" also has special values "M" gives ticks + spaced by a number of months. `n` must be a positive + integer. To set ticks on the 15th of every third month, + set `tick0` to "2000-01-15" and `dtick` to "M3". To set + ticks every 4 years, set `dtick` to "M48" + exponentformat + Determines a formatting rule for the tick exponents. + For example, consider the number 1,000,000,000. If + "none", it appears as 1,000,000,000. If "e", 1e+9. If + "E", 1E+9. If "power", 1x10^9 (with 9 in a super + script). If "SI", 1G. If "B", 1B. "SI" uses prefixes + from "femto" f (10^-15) to "tera" T (10^12). *SI + extended* covers instead the full SI range from + "quecto" q (10^-30) to "quetta" Q (10^30). If "SI" or + *SI extended* is used and the exponent is beyond the + above ranges, the formatting rule will automatically be + switched to the power notation. + labelalias + Replacement text for specific tick or hover labels. For + example using {US: 'USA', CA: 'Canada'} changes US to + USA and CA to Canada. The labels we would have shown + must match the keys exactly, after adding any + tickprefix or ticksuffix. For negative numbers the + minus sign symbol used (U+2212) is wider than the + regular ascii dash. That means you need to use −1 + instead of -1. labelalias can be used with any axis + type, and both keys (if needed) and values (if desired) + can include html-like tags or MathJax. + len + Sets the length of the color bar This measure excludes + the padding of both ends. That is, the color bar length + is this length minus the padding on both ends. + lenmode + Determines whether this color bar's length (i.e. the + measure in the color variation direction) is set in + units of plot "fraction" or in *pixels. Use `len` to + set the value. + minexponent + Hide SI prefix for 10^n if |n| is below this number. + This only has an effect when `tickformat` is "SI" or + "B". + nticks + Specifies the maximum number of ticks for the + particular axis. The actual number of ticks will be + chosen automatically to be less than or equal to + `nticks`. Has an effect only if `tickmode` is set to + "auto". + orientation + Sets the orientation of the colorbar. + outlinecolor + Sets the axis line color. + outlinewidth + Sets the width (in px) of the axis line. + separatethousands + If "true", even 4-digit integers are separated + showexponent + If "all", all exponents are shown besides their + significands. If "first", only the exponent of the + first tick is shown. If "last", only the exponent of + the last tick is shown. If "none", no exponents appear. + showticklabels + Determines whether or not the tick labels are drawn. + showtickprefix + If "all", all tick labels are displayed with a prefix. + If "first", only the first tick is displayed with a + prefix. If "last", only the last tick is displayed with + a suffix. If "none", tick prefixes are hidden. + showticksuffix + Same as `showtickprefix` but for tick suffixes. + thickness + Sets the thickness of the color bar This measure + excludes the size of the padding, ticks and labels. + thicknessmode + Determines whether this color bar's thickness (i.e. the + measure in the constant color direction) is set in + units of plot "fraction" or in "pixels". Use + `thickness` to set the value. + tick0 + Sets the placement of the first tick on this axis. Use + with `dtick`. If the axis `type` is "log", then you + must take the log of your starting tick (e.g. to set + the starting tick to 100, set the `tick0` to 2) except + when `dtick`=*L* (see `dtick` for more info). If the + axis `type` is "date", it should be a date string, like + date data. If the axis `type` is "category", it should + be a number, using the scale where each category is + assigned a serial number from zero in the order it + appears. + tickangle + Sets the angle of the tick labels with respect to the + horizontal. For example, a `tickangle` of -90 draws the + tick labels vertically. + tickcolor + Sets the tick color. + tickfont + Sets the color bar's tick label font + tickformat + Sets the tick label formatting rule using d3 formatting + mini-languages which are very similar to those in + Python. For numbers, see: + https://github.com/d3/d3-format/tree/v1.4.5#d3-format. + And for dates see: https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format. We add two items to + d3's date formatter: "%h" for half of the year as a + decimal number as well as "%{n}f" for fractional + seconds with n digits. For example, *2016-10-13 + 09:15:23.456* with tickformat "%H~%M~%S.%2f" would + display "09~15~23.46" + tickformatstops + A tuple of :class:`plotly.graph_objects.choropleth.colo + rbar.Tickformatstop` instances or dicts with compatible + properties + tickformatstopdefaults + When used in a template (as layout.template.data.chorop + leth.colorbar.tickformatstopdefaults), sets the default + property values to use for elements of + choropleth.colorbar.tickformatstops + ticklabeloverflow + Determines how we handle tick labels that would + overflow either the graph div or the domain of the + axis. The default value for inside tick labels is *hide + past domain*. In other cases the default is *hide past + div*. + ticklabelposition + Determines where tick labels are drawn relative to the + ticks. Left and right options are used when + `orientation` is "h", top and bottom when `orientation` + is "v". + ticklabelstep + Sets the spacing between tick labels as compared to the + spacing between ticks. A value of 1 (default) means + each tick gets a label. A value of 2 means shows every + 2nd label. A larger value n means only every nth tick + is labeled. `tick0` determines which labels are shown. + Not implemented for axes with `type` "log" or + "multicategory", or when `tickmode` is "array". + ticklen + Sets the tick length (in px). + tickmode + Sets the tick mode for this axis. If "auto", the number + of ticks is set via `nticks`. If "linear", the + placement of the ticks is determined by a starting + position `tick0` and a tick step `dtick` ("linear" is + the default value if `tick0` and `dtick` are provided). + If "array", the placement of the ticks is set via + `tickvals` and the tick text is `ticktext`. ("array" is + the default value if `tickvals` is provided). + tickprefix + Sets a tick label prefix. + ticks + Determines whether ticks are drawn or not. If "", this + axis' ticks are not drawn. If "outside" ("inside"), + this axis' are drawn outside (inside) the axis lines. + ticksuffix + Sets a tick label suffix. + ticktext + Sets the text displayed at the ticks position via + `tickvals`. Only has an effect if `tickmode` is set to + "array". Used with `tickvals`. + ticktextsrc + Sets the source reference on Chart Studio Cloud for + `ticktext`. + tickvals + Sets the values at which ticks on this axis appear. + Only has an effect if `tickmode` is set to "array". + Used with `ticktext`. + tickvalssrc + Sets the source reference on Chart Studio Cloud for + `tickvals`. + tickwidth + Sets the tick width (in px). + title + :class:`plotly.graph_objects.choropleth.colorbar.Title` + instance or dict with compatible properties + x + Sets the x position with respect to `xref` of the color + bar (in plot fraction). When `xref` is "paper", + defaults to 1.02 when `orientation` is "v" and 0.5 when + `orientation` is "h". When `xref` is "container", + defaults to 1 when `orientation` is "v" and 0.5 when + `orientation` is "h". Must be between 0 and 1 if `xref` + is "container" and between "-2" and 3 if `xref` is + "paper". + xanchor + Sets this color bar's horizontal position anchor. This + anchor binds the `x` position to the "left", "center" + or "right" of the color bar. Defaults to "left" when + `orientation` is "v" and "center" when `orientation` is + "h". + xpad + Sets the amount of padding (in px) along the x + direction. + xref + Sets the container `x` refers to. "container" spans the + entire `width` of the plot. "paper" refers to the width + of the plotting area only. + y + Sets the y position with respect to `yref` of the color + bar (in plot fraction). When `yref` is "paper", + defaults to 0.5 when `orientation` is "v" and 1.02 when + `orientation` is "h". When `yref` is "container", + defaults to 0.5 when `orientation` is "v" and 1 when + `orientation` is "h". Must be between 0 and 1 if `yref` + is "container" and between "-2" and 3 if `yref` is + "paper". + yanchor + Sets this color bar's vertical position anchor This + anchor binds the `y` position to the "top", "middle" or + "bottom" of the color bar. Defaults to "middle" when + `orientation` is "v" and "bottom" when `orientation` is + "h". + ypad + Sets the amount of padding (in px) along the y + direction. + yref + Sets the container `y` refers to. "container" spans the + entire `height` of the plot. "paper" refers to the + height of the plotting area only. + + Returns + ------- + ColorBar + """ + super().__init__("colorbar") + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + if arg is None: + arg = {} + elif isinstance(arg, self.__class__): + arg = arg.to_plotly_json() + elif isinstance(arg, dict): + arg = _copy.copy(arg) + else: + raise ValueError("""\ +The first argument to the plotly.graph_objs.choropleth.ColorBar +constructor must be a dict or +an instance of :class:`plotly.graph_objs.choropleth.ColorBar`""") + + self._skip_invalid = kwargs.pop("skip_invalid", False) + self._validate = kwargs.pop("_validate", True) + + self._set_property("bgcolor", arg, bgcolor) + self._set_property("bordercolor", arg, bordercolor) + self._set_property("borderwidth", arg, borderwidth) + self._set_property("dtick", arg, dtick) + self._set_property("exponentformat", arg, exponentformat) + self._set_property("labelalias", arg, labelalias) + self._set_property("len", arg, len) + self._set_property("lenmode", arg, lenmode) + self._set_property("minexponent", arg, minexponent) + self._set_property("nticks", arg, nticks) + self._set_property("orientation", arg, orientation) + self._set_property("outlinecolor", arg, outlinecolor) + self._set_property("outlinewidth", arg, outlinewidth) + self._set_property("separatethousands", arg, separatethousands) + self._set_property("showexponent", arg, showexponent) + self._set_property("showticklabels", arg, showticklabels) + self._set_property("showtickprefix", arg, showtickprefix) + self._set_property("showticksuffix", arg, showticksuffix) + self._set_property("thickness", arg, thickness) + self._set_property("thicknessmode", arg, thicknessmode) + self._set_property("tick0", arg, tick0) + self._set_property("tickangle", arg, tickangle) + self._set_property("tickcolor", arg, tickcolor) + self._set_property("tickfont", arg, tickfont) + self._set_property("tickformat", arg, tickformat) + self._set_property("tickformatstops", arg, tickformatstops) + self._set_property("tickformatstopdefaults", arg, tickformatstopdefaults) + self._set_property("ticklabeloverflow", arg, ticklabeloverflow) + self._set_property("ticklabelposition", arg, ticklabelposition) + self._set_property("ticklabelstep", arg, ticklabelstep) + self._set_property("ticklen", arg, ticklen) + self._set_property("tickmode", arg, tickmode) + self._set_property("tickprefix", arg, tickprefix) + self._set_property("ticks", arg, ticks) + self._set_property("ticksuffix", arg, ticksuffix) + self._set_property("ticktext", arg, ticktext) + self._set_property("ticktextsrc", arg, ticktextsrc) + self._set_property("tickvals", arg, tickvals) + self._set_property("tickvalssrc", arg, tickvalssrc) + self._set_property("tickwidth", arg, tickwidth) + self._set_property("title", arg, title) + self._set_property("x", arg, x) + self._set_property("xanchor", arg, xanchor) + self._set_property("xpad", arg, xpad) + self._set_property("xref", arg, xref) + self._set_property("y", arg, y) + self._set_property("yanchor", arg, yanchor) + self._set_property("ypad", arg, ypad) + self._set_property("yref", arg, yref) + self._process_kwargs(**dict(arg, **kwargs)) + self._skip_invalid = False diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/choropleth/_hoverlabel.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/choropleth/_hoverlabel.py new file mode 100644 index 0000000000000000000000000000000000000000..0c7a22282ed0659f4b756c03cb840e1d9d3eb5d3 --- /dev/null +++ b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/choropleth/_hoverlabel.py @@ -0,0 +1,366 @@ +# --- THIS FILE IS AUTO-GENERATED --- +# Modifications will be overwitten the next time code generation run. + +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Hoverlabel(_BaseTraceHierarchyType): + _parent_path_str = "choropleth" + _path_str = "choropleth.hoverlabel" + _valid_props = { + "align", + "alignsrc", + "bgcolor", + "bgcolorsrc", + "bordercolor", + "bordercolorsrc", + "font", + "namelength", + "namelengthsrc", + "showarrow", + } + + @property + def align(self): + """ + Sets the horizontal alignment of the text content within hover + label box. Has an effect only if the hover label text spans + more two or more lines + + The 'align' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['left', 'right', 'auto'] + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + Any|numpy.ndarray + """ + return self["align"] + + @align.setter + def align(self, val): + self["align"] = val + + @property + def alignsrc(self): + """ + Sets the source reference on Chart Studio Cloud for `align`. + + The 'alignsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["alignsrc"] + + @alignsrc.setter + def alignsrc(self, val): + self["alignsrc"] = val + + @property + def bgcolor(self): + """ + Sets the background color of the hover labels for this trace + + The 'bgcolor' property is a color and may be specified as: + - A hex string (e.g. '#ff0000') + - An rgb/rgba string (e.g. 'rgb(255,0,0)') + - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') + - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') + - A named CSS color: see https://plotly.com/python/css-colors/ for a list + - A list or array of any of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["bgcolor"] + + @bgcolor.setter + def bgcolor(self, val): + self["bgcolor"] = val + + @property + def bgcolorsrc(self): + """ + Sets the source reference on Chart Studio Cloud for `bgcolor`. + + The 'bgcolorsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["bgcolorsrc"] + + @bgcolorsrc.setter + def bgcolorsrc(self, val): + self["bgcolorsrc"] = val + + @property + def bordercolor(self): + """ + Sets the border color of the hover labels for this trace. + + The 'bordercolor' property is a color and may be specified as: + - A hex string (e.g. '#ff0000') + - An rgb/rgba string (e.g. 'rgb(255,0,0)') + - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') + - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') + - A named CSS color: see https://plotly.com/python/css-colors/ for a list + - A list or array of any of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["bordercolor"] + + @bordercolor.setter + def bordercolor(self, val): + self["bordercolor"] = val + + @property + def bordercolorsrc(self): + """ + Sets the source reference on Chart Studio Cloud for + `bordercolor`. + + The 'bordercolorsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["bordercolorsrc"] + + @bordercolorsrc.setter + def bordercolorsrc(self, val): + self["bordercolorsrc"] = val + + @property + def font(self): + """ + Sets the font used in hover labels. + + The 'font' property is an instance of Font + that may be specified as: + - An instance of :class:`plotly.graph_objs.choropleth.hoverlabel.Font` + - A dict of string/value properties that will be passed + to the Font constructor + + Returns + ------- + plotly.graph_objs.choropleth.hoverlabel.Font + """ + return self["font"] + + @font.setter + def font(self, val): + self["font"] = val + + @property + def namelength(self): + """ + Sets the default length (in number of characters) of the trace + name in the hover labels for all traces. -1 shows the whole + name regardless of length. 0-3 shows the first 0-3 characters, + and an integer >3 will show the whole name if it is less than + that many characters, but if it is longer, will truncate to + `namelength - 3` characters and add an ellipsis. + + The 'namelength' property is a integer and may be specified as: + - An int (or float that will be cast to an int) + in the interval [-1, 9223372036854775807] + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + int|numpy.ndarray + """ + return self["namelength"] + + @namelength.setter + def namelength(self, val): + self["namelength"] = val + + @property + def namelengthsrc(self): + """ + Sets the source reference on Chart Studio Cloud for + `namelength`. + + The 'namelengthsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["namelengthsrc"] + + @namelengthsrc.setter + def namelengthsrc(self, val): + self["namelengthsrc"] = val + + @property + def showarrow(self): + """ + Sets whether or not to show the hover label arrow/triangle + pointing to the data point. + + The 'showarrow' property is a boolean and must be specified as: + - A boolean value: True or False + + Returns + ------- + bool + """ + return self["showarrow"] + + @showarrow.setter + def showarrow(self, val): + self["showarrow"] = val + + @property + def _prop_descriptions(self): + return """\ + align + Sets the horizontal alignment of the text content + within hover label box. Has an effect only if the hover + label text spans more two or more lines + alignsrc + Sets the source reference on Chart Studio Cloud for + `align`. + bgcolor + Sets the background color of the hover labels for this + trace + bgcolorsrc + Sets the source reference on Chart Studio Cloud for + `bgcolor`. + bordercolor + Sets the border color of the hover labels for this + trace. + bordercolorsrc + Sets the source reference on Chart Studio Cloud for + `bordercolor`. + font + Sets the font used in hover labels. + namelength + Sets the default length (in number of characters) of + the trace name in the hover labels for all traces. -1 + shows the whole name regardless of length. 0-3 shows + the first 0-3 characters, and an integer >3 will show + the whole name if it is less than that many characters, + but if it is longer, will truncate to `namelength - 3` + characters and add an ellipsis. + namelengthsrc + Sets the source reference on Chart Studio Cloud for + `namelength`. + showarrow + Sets whether or not to show the hover label + arrow/triangle pointing to the data point. + """ + + def __init__( + self, + arg=None, + align=None, + alignsrc=None, + bgcolor=None, + bgcolorsrc=None, + bordercolor=None, + bordercolorsrc=None, + font=None, + namelength=None, + namelengthsrc=None, + showarrow=None, + **kwargs, + ): + """ + Construct a new Hoverlabel object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.choropleth.Hoverlabel` + align + Sets the horizontal alignment of the text content + within hover label box. Has an effect only if the hover + label text spans more two or more lines + alignsrc + Sets the source reference on Chart Studio Cloud for + `align`. + bgcolor + Sets the background color of the hover labels for this + trace + bgcolorsrc + Sets the source reference on Chart Studio Cloud for + `bgcolor`. + bordercolor + Sets the border color of the hover labels for this + trace. + bordercolorsrc + Sets the source reference on Chart Studio Cloud for + `bordercolor`. + font + Sets the font used in hover labels. + namelength + Sets the default length (in number of characters) of + the trace name in the hover labels for all traces. -1 + shows the whole name regardless of length. 0-3 shows + the first 0-3 characters, and an integer >3 will show + the whole name if it is less than that many characters, + but if it is longer, will truncate to `namelength - 3` + characters and add an ellipsis. + namelengthsrc + Sets the source reference on Chart Studio Cloud for + `namelength`. + showarrow + Sets whether or not to show the hover label + arrow/triangle pointing to the data point. + + Returns + ------- + Hoverlabel + """ + super().__init__("hoverlabel") + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + if arg is None: + arg = {} + elif isinstance(arg, self.__class__): + arg = arg.to_plotly_json() + elif isinstance(arg, dict): + arg = _copy.copy(arg) + else: + raise ValueError("""\ +The first argument to the plotly.graph_objs.choropleth.Hoverlabel +constructor must be a dict or +an instance of :class:`plotly.graph_objs.choropleth.Hoverlabel`""") + + self._skip_invalid = kwargs.pop("skip_invalid", False) + self._validate = kwargs.pop("_validate", True) + + self._set_property("align", arg, align) + self._set_property("alignsrc", arg, alignsrc) + self._set_property("bgcolor", arg, bgcolor) + self._set_property("bgcolorsrc", arg, bgcolorsrc) + self._set_property("bordercolor", arg, bordercolor) + self._set_property("bordercolorsrc", arg, bordercolorsrc) + self._set_property("font", arg, font) + self._set_property("namelength", arg, namelength) + self._set_property("namelengthsrc", arg, namelengthsrc) + self._set_property("showarrow", arg, showarrow) + self._process_kwargs(**dict(arg, **kwargs)) + self._skip_invalid = False diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/choropleth/_legendgrouptitle.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/choropleth/_legendgrouptitle.py new file mode 100644 index 0000000000000000000000000000000000000000..c568234db1610f7f84e1df14684e3caba35433e0 --- /dev/null +++ b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/choropleth/_legendgrouptitle.py @@ -0,0 +1,104 @@ +# --- THIS FILE IS AUTO-GENERATED --- +# Modifications will be overwitten the next time code generation run. + +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Legendgrouptitle(_BaseTraceHierarchyType): + _parent_path_str = "choropleth" + _path_str = "choropleth.legendgrouptitle" + _valid_props = {"font", "text"} + + @property + def font(self): + """ + Sets this legend group's title font. + + The 'font' property is an instance of Font + that may be specified as: + - An instance of :class:`plotly.graph_objs.choropleth.legendgrouptitle.Font` + - A dict of string/value properties that will be passed + to the Font constructor + + Returns + ------- + plotly.graph_objs.choropleth.legendgrouptitle.Font + """ + return self["font"] + + @font.setter + def font(self, val): + self["font"] = val + + @property + def text(self): + """ + Sets the title of the legend group. + + The 'text' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["text"] + + @text.setter + def text(self, val): + self["text"] = val + + @property + def _prop_descriptions(self): + return """\ + font + Sets this legend group's title font. + text + Sets the title of the legend group. + """ + + def __init__(self, arg=None, font=None, text=None, **kwargs): + """ + Construct a new Legendgrouptitle object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.choropleth.Legendgrouptitle` + font + Sets this legend group's title font. + text + Sets the title of the legend group. + + Returns + ------- + Legendgrouptitle + """ + super().__init__("legendgrouptitle") + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + if arg is None: + arg = {} + elif isinstance(arg, self.__class__): + arg = arg.to_plotly_json() + elif isinstance(arg, dict): + arg = _copy.copy(arg) + else: + raise ValueError("""\ +The first argument to the plotly.graph_objs.choropleth.Legendgrouptitle +constructor must be a dict or +an instance of :class:`plotly.graph_objs.choropleth.Legendgrouptitle`""") + + self._skip_invalid = kwargs.pop("skip_invalid", False) + self._validate = kwargs.pop("_validate", True) + + self._set_property("font", arg, font) + self._set_property("text", arg, text) + self._process_kwargs(**dict(arg, **kwargs)) + self._skip_invalid = False diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/choropleth/_marker.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/choropleth/_marker.py new file mode 100644 index 0000000000000000000000000000000000000000..212bde1253ab5ee3b789505ef9fff95ca01dd0df --- /dev/null +++ b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/choropleth/_marker.py @@ -0,0 +1,129 @@ +# --- THIS FILE IS AUTO-GENERATED --- +# Modifications will be overwitten the next time code generation run. + +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Marker(_BaseTraceHierarchyType): + _parent_path_str = "choropleth" + _path_str = "choropleth.marker" + _valid_props = {"line", "opacity", "opacitysrc"} + + @property + def line(self): + """ + The 'line' property is an instance of Line + that may be specified as: + - An instance of :class:`plotly.graph_objs.choropleth.marker.Line` + - A dict of string/value properties that will be passed + to the Line constructor + + Returns + ------- + plotly.graph_objs.choropleth.marker.Line + """ + return self["line"] + + @line.setter + def line(self, val): + self["line"] = val + + @property + def opacity(self): + """ + Sets the opacity of the locations. + + The 'opacity' property is a number and may be specified as: + - An int or float in the interval [0, 1] + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + int|float|numpy.ndarray + """ + return self["opacity"] + + @opacity.setter + def opacity(self, val): + self["opacity"] = val + + @property + def opacitysrc(self): + """ + Sets the source reference on Chart Studio Cloud for `opacity`. + + The 'opacitysrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["opacitysrc"] + + @opacitysrc.setter + def opacitysrc(self, val): + self["opacitysrc"] = val + + @property + def _prop_descriptions(self): + return """\ + line + :class:`plotly.graph_objects.choropleth.marker.Line` + instance or dict with compatible properties + opacity + Sets the opacity of the locations. + opacitysrc + Sets the source reference on Chart Studio Cloud for + `opacity`. + """ + + def __init__(self, arg=None, line=None, opacity=None, opacitysrc=None, **kwargs): + """ + Construct a new Marker object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.choropleth.Marker` + line + :class:`plotly.graph_objects.choropleth.marker.Line` + instance or dict with compatible properties + opacity + Sets the opacity of the locations. + opacitysrc + Sets the source reference on Chart Studio Cloud for + `opacity`. + + Returns + ------- + Marker + """ + super().__init__("marker") + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + if arg is None: + arg = {} + elif isinstance(arg, self.__class__): + arg = arg.to_plotly_json() + elif isinstance(arg, dict): + arg = _copy.copy(arg) + else: + raise ValueError("""\ +The first argument to the plotly.graph_objs.choropleth.Marker +constructor must be a dict or +an instance of :class:`plotly.graph_objs.choropleth.Marker`""") + + self._skip_invalid = kwargs.pop("skip_invalid", False) + self._validate = kwargs.pop("_validate", True) + + self._set_property("line", arg, line) + self._set_property("opacity", arg, opacity) + self._set_property("opacitysrc", arg, opacitysrc) + self._process_kwargs(**dict(arg, **kwargs)) + self._skip_invalid = False diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/choropleth/_selected.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/choropleth/_selected.py new file mode 100644 index 0000000000000000000000000000000000000000..ff0cafd515e832879dd3b66a0151d977745fed9b --- /dev/null +++ b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/choropleth/_selected.py @@ -0,0 +1,80 @@ +# --- THIS FILE IS AUTO-GENERATED --- +# Modifications will be overwitten the next time code generation run. + +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Selected(_BaseTraceHierarchyType): + _parent_path_str = "choropleth" + _path_str = "choropleth.selected" + _valid_props = {"marker"} + + @property + def marker(self): + """ + The 'marker' property is an instance of Marker + that may be specified as: + - An instance of :class:`plotly.graph_objs.choropleth.selected.Marker` + - A dict of string/value properties that will be passed + to the Marker constructor + + Returns + ------- + plotly.graph_objs.choropleth.selected.Marker + """ + return self["marker"] + + @marker.setter + def marker(self, val): + self["marker"] = val + + @property + def _prop_descriptions(self): + return """\ + marker + :class:`plotly.graph_objects.choropleth.selected.Marker + ` instance or dict with compatible properties + """ + + def __init__(self, arg=None, marker=None, **kwargs): + """ + Construct a new Selected object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.choropleth.Selected` + marker + :class:`plotly.graph_objects.choropleth.selected.Marker + ` instance or dict with compatible properties + + Returns + ------- + Selected + """ + super().__init__("selected") + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + if arg is None: + arg = {} + elif isinstance(arg, self.__class__): + arg = arg.to_plotly_json() + elif isinstance(arg, dict): + arg = _copy.copy(arg) + else: + raise ValueError("""\ +The first argument to the plotly.graph_objs.choropleth.Selected +constructor must be a dict or +an instance of :class:`plotly.graph_objs.choropleth.Selected`""") + + self._skip_invalid = kwargs.pop("skip_invalid", False) + self._validate = kwargs.pop("_validate", True) + + self._set_property("marker", arg, marker) + self._process_kwargs(**dict(arg, **kwargs)) + self._skip_invalid = False diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/choropleth/_stream.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/choropleth/_stream.py new file mode 100644 index 0000000000000000000000000000000000000000..84624f89331c39f84394f487f383f3a7bfbe4a55 --- /dev/null +++ b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/choropleth/_stream.py @@ -0,0 +1,114 @@ +# --- THIS FILE IS AUTO-GENERATED --- +# Modifications will be overwitten the next time code generation run. + +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Stream(_BaseTraceHierarchyType): + _parent_path_str = "choropleth" + _path_str = "choropleth.stream" + _valid_props = {"maxpoints", "token"} + + @property + def maxpoints(self): + """ + Sets the maximum number of points to keep on the plots from an + incoming stream. If `maxpoints` is set to 50, only the newest + 50 points will be displayed on the plot. + + The 'maxpoints' property is a number and may be specified as: + - An int or float in the interval [0, 10000] + + Returns + ------- + int|float + """ + return self["maxpoints"] + + @maxpoints.setter + def maxpoints(self, val): + self["maxpoints"] = val + + @property + def token(self): + """ + The stream id number links a data trace on a plot with a + stream. See https://chart-studio.plotly.com/settings for more + details. + + The 'token' property is a string and must be specified as: + - A non-empty string + + Returns + ------- + str + """ + return self["token"] + + @token.setter + def token(self, val): + self["token"] = val + + @property + def _prop_descriptions(self): + return """\ + maxpoints + Sets the maximum number of points to keep on the plots + from an incoming stream. If `maxpoints` is set to 50, + only the newest 50 points will be displayed on the + plot. + token + The stream id number links a data trace on a plot with + a stream. See https://chart-studio.plotly.com/settings + for more details. + """ + + def __init__(self, arg=None, maxpoints=None, token=None, **kwargs): + """ + Construct a new Stream object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.choropleth.Stream` + maxpoints + Sets the maximum number of points to keep on the plots + from an incoming stream. If `maxpoints` is set to 50, + only the newest 50 points will be displayed on the + plot. + token + The stream id number links a data trace on a plot with + a stream. See https://chart-studio.plotly.com/settings + for more details. + + Returns + ------- + Stream + """ + super().__init__("stream") + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + if arg is None: + arg = {} + elif isinstance(arg, self.__class__): + arg = arg.to_plotly_json() + elif isinstance(arg, dict): + arg = _copy.copy(arg) + else: + raise ValueError("""\ +The first argument to the plotly.graph_objs.choropleth.Stream +constructor must be a dict or +an instance of :class:`plotly.graph_objs.choropleth.Stream`""") + + self._skip_invalid = kwargs.pop("skip_invalid", False) + self._validate = kwargs.pop("_validate", True) + + self._set_property("maxpoints", arg, maxpoints) + self._set_property("token", arg, token) + self._process_kwargs(**dict(arg, **kwargs)) + self._skip_invalid = False diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/choropleth/_unselected.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/choropleth/_unselected.py new file mode 100644 index 0000000000000000000000000000000000000000..68ef597c4b460085e118d39fb56522099bdd3ea8 --- /dev/null +++ b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/choropleth/_unselected.py @@ -0,0 +1,80 @@ +# --- THIS FILE IS AUTO-GENERATED --- +# Modifications will be overwitten the next time code generation run. + +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Unselected(_BaseTraceHierarchyType): + _parent_path_str = "choropleth" + _path_str = "choropleth.unselected" + _valid_props = {"marker"} + + @property + def marker(self): + """ + The 'marker' property is an instance of Marker + that may be specified as: + - An instance of :class:`plotly.graph_objs.choropleth.unselected.Marker` + - A dict of string/value properties that will be passed + to the Marker constructor + + Returns + ------- + plotly.graph_objs.choropleth.unselected.Marker + """ + return self["marker"] + + @marker.setter + def marker(self, val): + self["marker"] = val + + @property + def _prop_descriptions(self): + return """\ + marker + :class:`plotly.graph_objects.choropleth.unselected.Mark + er` instance or dict with compatible properties + """ + + def __init__(self, arg=None, marker=None, **kwargs): + """ + Construct a new Unselected object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.choropleth.Unselected` + marker + :class:`plotly.graph_objects.choropleth.unselected.Mark + er` instance or dict with compatible properties + + Returns + ------- + Unselected + """ + super().__init__("unselected") + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + if arg is None: + arg = {} + elif isinstance(arg, self.__class__): + arg = arg.to_plotly_json() + elif isinstance(arg, dict): + arg = _copy.copy(arg) + else: + raise ValueError("""\ +The first argument to the plotly.graph_objs.choropleth.Unselected +constructor must be a dict or +an instance of :class:`plotly.graph_objs.choropleth.Unselected`""") + + self._skip_invalid = kwargs.pop("skip_invalid", False) + self._validate = kwargs.pop("_validate", True) + + self._set_property("marker", arg, marker) + self._process_kwargs(**dict(arg, **kwargs)) + self._skip_invalid = False diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/choropleth/colorbar/.___init__.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/choropleth/colorbar/.___init__.py new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/choropleth/colorbar/.___init__.py differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/choropleth/colorbar/.___pycache__ b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/choropleth/colorbar/.___pycache__ new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/choropleth/colorbar/.___pycache__ differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/choropleth/colorbar/.__tickfont.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/choropleth/colorbar/.__tickfont.py new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/choropleth/colorbar/.__tickfont.py differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/choropleth/colorbar/.__tickformatstop.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/choropleth/colorbar/.__tickformatstop.py new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/choropleth/colorbar/.__tickformatstop.py differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/choropleth/colorbar/.__title.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/choropleth/colorbar/.__title.py new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/choropleth/colorbar/.__title.py differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/choropleth/colorbar/._title b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/choropleth/colorbar/._title new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/choropleth/colorbar/._title differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/choropleth/colorbar/__init__.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/choropleth/colorbar/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..4690d3cc738a44d43a04d43d3aa0be36d7cd34e2 --- /dev/null +++ b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/choropleth/colorbar/__init__.py @@ -0,0 +1,16 @@ +import sys +from typing import TYPE_CHECKING + +if TYPE_CHECKING: + from ._tickfont import Tickfont + from ._tickformatstop import Tickformatstop + from ._title import Title + from . import title +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [".title"], + ["._tickfont.Tickfont", "._tickformatstop.Tickformatstop", "._title.Title"], + ) diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/choropleth/colorbar/_tickfont.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/choropleth/colorbar/_tickfont.py new file mode 100644 index 0000000000000000000000000000000000000000..48096423fb8c49d9a14f4b53a7244667f375dbe4 --- /dev/null +++ b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/choropleth/colorbar/_tickfont.py @@ -0,0 +1,334 @@ +# --- THIS FILE IS AUTO-GENERATED --- +# Modifications will be overwitten the next time code generation run. + +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Tickfont(_BaseTraceHierarchyType): + _parent_path_str = "choropleth.colorbar" + _path_str = "choropleth.colorbar.tickfont" + _valid_props = { + "color", + "family", + "lineposition", + "shadow", + "size", + "style", + "textcase", + "variant", + "weight", + } + + @property + def color(self): + """ + The 'color' property is a color and may be specified as: + - A hex string (e.g. '#ff0000') + - An rgb/rgba string (e.g. 'rgb(255,0,0)') + - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') + - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') + - A named CSS color: see https://plotly.com/python/css-colors/ for a list + + Returns + ------- + str + """ + return self["color"] + + @color.setter + def color(self, val): + self["color"] = val + + @property + def family(self): + """ + HTML font family - the typeface that will be applied by the web + browser. The web browser can only apply a font if it is + available on the system where it runs. Provide multiple font + families, separated by commas, to indicate the order in which + to apply fonts if they aren't available. + + The 'family' property is a string and must be specified as: + - A non-empty string + + Returns + ------- + str + """ + return self["family"] + + @family.setter + def family(self, val): + self["family"] = val + + @property + def lineposition(self): + """ + Sets the kind of decoration line(s) with text, such as an + "under", "over" or "through" as well as combinations e.g. + "under+over", etc. + + The 'lineposition' property is a flaglist and may be specified + as a string containing: + - Any combination of ['under', 'over', 'through'] joined with '+' characters + (e.g. 'under+over') + OR exactly one of ['none'] (e.g. 'none') + + Returns + ------- + Any + """ + return self["lineposition"] + + @lineposition.setter + def lineposition(self, val): + self["lineposition"] = val + + @property + def shadow(self): + """ + Sets the shape and color of the shadow behind text. "auto" + places minimal shadow and applies contrast text font color. See + https://developer.mozilla.org/en-US/docs/Web/CSS/text-shadow + for additional options. + + The 'shadow' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["shadow"] + + @shadow.setter + def shadow(self, val): + self["shadow"] = val + + @property + def size(self): + """ + The 'size' property is a number and may be specified as: + - An int or float in the interval [1, inf] + + Returns + ------- + int|float + """ + return self["size"] + + @size.setter + def size(self, val): + self["size"] = val + + @property + def style(self): + """ + Sets whether a font should be styled with a normal or italic + face from its family. + + The 'style' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['normal', 'italic'] + + Returns + ------- + Any + """ + return self["style"] + + @style.setter + def style(self, val): + self["style"] = val + + @property + def textcase(self): + """ + Sets capitalization of text. It can be used to make text appear + in all-uppercase or all-lowercase, or with each word + capitalized. + + The 'textcase' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['normal', 'word caps', 'upper', 'lower'] + + Returns + ------- + Any + """ + return self["textcase"] + + @textcase.setter + def textcase(self, val): + self["textcase"] = val + + @property + def variant(self): + """ + Sets the variant of the font. + + The 'variant' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['normal', 'small-caps', 'all-small-caps', + 'all-petite-caps', 'petite-caps', 'unicase'] + + Returns + ------- + Any + """ + return self["variant"] + + @variant.setter + def variant(self, val): + self["variant"] = val + + @property + def weight(self): + """ + Sets the weight (or boldness) of the font. + + The 'weight' property is a integer and may be specified as: + - An int (or float that will be cast to an int) + in the interval [1, 1000] + OR exactly one of ['normal', 'bold'] (e.g. 'bold') + + Returns + ------- + int + """ + return self["weight"] + + @weight.setter + def weight(self, val): + self["weight"] = val + + @property + def _prop_descriptions(self): + return """\ + color + + family + HTML font family - the typeface that will be applied by + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. + lineposition + Sets the kind of decoration line(s) with text, such as + an "under", "over" or "through" as well as combinations + e.g. "under+over", etc. + shadow + Sets the shape and color of the shadow behind text. + "auto" places minimal shadow and applies contrast text + font color. See https://developer.mozilla.org/en- + US/docs/Web/CSS/text-shadow for additional options. + size + + style + Sets whether a font should be styled with a normal or + italic face from its family. + textcase + Sets capitalization of text. It can be used to make + text appear in all-uppercase or all-lowercase, or with + each word capitalized. + variant + Sets the variant of the font. + weight + Sets the weight (or boldness) of the font. + """ + + def __init__( + self, + arg=None, + color=None, + family=None, + lineposition=None, + shadow=None, + size=None, + style=None, + textcase=None, + variant=None, + weight=None, + **kwargs, + ): + """ + Construct a new Tickfont object + + Sets the color bar's tick label font + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.choropleth.colorbar.Tickfont` + color + + family + HTML font family - the typeface that will be applied by + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. + lineposition + Sets the kind of decoration line(s) with text, such as + an "under", "over" or "through" as well as combinations + e.g. "under+over", etc. + shadow + Sets the shape and color of the shadow behind text. + "auto" places minimal shadow and applies contrast text + font color. See https://developer.mozilla.org/en- + US/docs/Web/CSS/text-shadow for additional options. + size + + style + Sets whether a font should be styled with a normal or + italic face from its family. + textcase + Sets capitalization of text. It can be used to make + text appear in all-uppercase or all-lowercase, or with + each word capitalized. + variant + Sets the variant of the font. + weight + Sets the weight (or boldness) of the font. + + Returns + ------- + Tickfont + """ + super().__init__("tickfont") + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + if arg is None: + arg = {} + elif isinstance(arg, self.__class__): + arg = arg.to_plotly_json() + elif isinstance(arg, dict): + arg = _copy.copy(arg) + else: + raise ValueError("""\ +The first argument to the plotly.graph_objs.choropleth.colorbar.Tickfont +constructor must be a dict or +an instance of :class:`plotly.graph_objs.choropleth.colorbar.Tickfont`""") + + self._skip_invalid = kwargs.pop("skip_invalid", False) + self._validate = kwargs.pop("_validate", True) + + self._set_property("color", arg, color) + self._set_property("family", arg, family) + self._set_property("lineposition", arg, lineposition) + self._set_property("shadow", arg, shadow) + self._set_property("size", arg, size) + self._set_property("style", arg, style) + self._set_property("textcase", arg, textcase) + self._set_property("variant", arg, variant) + self._set_property("weight", arg, weight) + self._process_kwargs(**dict(arg, **kwargs)) + self._skip_invalid = False diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/choropleth/colorbar/_tickformatstop.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/choropleth/colorbar/_tickformatstop.py new file mode 100644 index 0000000000000000000000000000000000000000..6ffb5563d0404e1a9a21a359284ea493ff9a2656 --- /dev/null +++ b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/choropleth/colorbar/_tickformatstop.py @@ -0,0 +1,241 @@ +# --- THIS FILE IS AUTO-GENERATED --- +# Modifications will be overwitten the next time code generation run. + +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Tickformatstop(_BaseTraceHierarchyType): + _parent_path_str = "choropleth.colorbar" + _path_str = "choropleth.colorbar.tickformatstop" + _valid_props = {"dtickrange", "enabled", "name", "templateitemname", "value"} + + @property + def dtickrange(self): + """ + range [*min*, *max*], where "min", "max" - dtick values which + describe some zoom level, it is possible to omit "min" or "max" + value by passing "null" + + The 'dtickrange' property is an info array that may be specified as: + + * a list or tuple of 2 elements where: + (0) The 'dtickrange[0]' property accepts values of any type + (1) The 'dtickrange[1]' property accepts values of any type + + Returns + ------- + list + """ + return self["dtickrange"] + + @dtickrange.setter + def dtickrange(self, val): + self["dtickrange"] = val + + @property + def enabled(self): + """ + Determines whether or not this stop is used. If `false`, this + stop is ignored even within its `dtickrange`. + + The 'enabled' property is a boolean and must be specified as: + - A boolean value: True or False + + Returns + ------- + bool + """ + return self["enabled"] + + @enabled.setter + def enabled(self, val): + self["enabled"] = val + + @property + def name(self): + """ + When used in a template, named items are created in the output + figure in addition to any items the figure already has in this + array. You can modify these items in the output figure by + making your own item with `templateitemname` matching this + `name` alongside your modifications (including `visible: false` + or `enabled: false` to hide it). Has no effect outside of a + template. + + The 'name' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["name"] + + @name.setter + def name(self, val): + self["name"] = val + + @property + def templateitemname(self): + """ + Used to refer to a named item in this array in the template. + Named items from the template will be created even without a + matching item in the input figure, but you can modify one by + making an item with `templateitemname` matching its `name`, + alongside your modifications (including `visible: false` or + `enabled: false` to hide it). If there is no template or no + matching item, this item will be hidden unless you explicitly + show it with `visible: true`. + + The 'templateitemname' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["templateitemname"] + + @templateitemname.setter + def templateitemname(self, val): + self["templateitemname"] = val + + @property + def value(self): + """ + string - dtickformat for described zoom level, the same as + "tickformat" + + The 'value' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["value"] + + @value.setter + def value(self, val): + self["value"] = val + + @property + def _prop_descriptions(self): + return """\ + dtickrange + range [*min*, *max*], where "min", "max" - dtick values + which describe some zoom level, it is possible to omit + "min" or "max" value by passing "null" + enabled + Determines whether or not this stop is used. If + `false`, this stop is ignored even within its + `dtickrange`. + name + When used in a template, named items are created in the + output figure in addition to any items the figure + already has in this array. You can modify these items + in the output figure by making your own item with + `templateitemname` matching this `name` alongside your + modifications (including `visible: false` or `enabled: + false` to hide it). Has no effect outside of a + template. + templateitemname + Used to refer to a named item in this array in the + template. Named items from the template will be created + even without a matching item in the input figure, but + you can modify one by making an item with + `templateitemname` matching its `name`, alongside your + modifications (including `visible: false` or `enabled: + false` to hide it). If there is no template or no + matching item, this item will be hidden unless you + explicitly show it with `visible: true`. + value + string - dtickformat for described zoom level, the same + as "tickformat" + """ + + def __init__( + self, + arg=None, + dtickrange=None, + enabled=None, + name=None, + templateitemname=None, + value=None, + **kwargs, + ): + """ + Construct a new Tickformatstop object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of :class:`plotly.graph_objs.choropleth.col + orbar.Tickformatstop` + dtickrange + range [*min*, *max*], where "min", "max" - dtick values + which describe some zoom level, it is possible to omit + "min" or "max" value by passing "null" + enabled + Determines whether or not this stop is used. If + `false`, this stop is ignored even within its + `dtickrange`. + name + When used in a template, named items are created in the + output figure in addition to any items the figure + already has in this array. You can modify these items + in the output figure by making your own item with + `templateitemname` matching this `name` alongside your + modifications (including `visible: false` or `enabled: + false` to hide it). Has no effect outside of a + template. + templateitemname + Used to refer to a named item in this array in the + template. Named items from the template will be created + even without a matching item in the input figure, but + you can modify one by making an item with + `templateitemname` matching its `name`, alongside your + modifications (including `visible: false` or `enabled: + false` to hide it). If there is no template or no + matching item, this item will be hidden unless you + explicitly show it with `visible: true`. + value + string - dtickformat for described zoom level, the same + as "tickformat" + + Returns + ------- + Tickformatstop + """ + super().__init__("tickformatstops") + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + if arg is None: + arg = {} + elif isinstance(arg, self.__class__): + arg = arg.to_plotly_json() + elif isinstance(arg, dict): + arg = _copy.copy(arg) + else: + raise ValueError("""\ +The first argument to the plotly.graph_objs.choropleth.colorbar.Tickformatstop +constructor must be a dict or +an instance of :class:`plotly.graph_objs.choropleth.colorbar.Tickformatstop`""") + + self._skip_invalid = kwargs.pop("skip_invalid", False) + self._validate = kwargs.pop("_validate", True) + + self._set_property("dtickrange", arg, dtickrange) + self._set_property("enabled", arg, enabled) + self._set_property("name", arg, name) + self._set_property("templateitemname", arg, templateitemname) + self._set_property("value", arg, value) + self._process_kwargs(**dict(arg, **kwargs)) + self._skip_invalid = False diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/choropleth/colorbar/_title.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/choropleth/colorbar/_title.py new file mode 100644 index 0000000000000000000000000000000000000000..1ae8cfce3d5e7e82962bf25d71f7085d077fe4f8 --- /dev/null +++ b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/choropleth/colorbar/_title.py @@ -0,0 +1,136 @@ +# --- THIS FILE IS AUTO-GENERATED --- +# Modifications will be overwitten the next time code generation run. + +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Title(_BaseTraceHierarchyType): + _parent_path_str = "choropleth.colorbar" + _path_str = "choropleth.colorbar.title" + _valid_props = {"font", "side", "text"} + + @property + def font(self): + """ + Sets this color bar's title font. + + The 'font' property is an instance of Font + that may be specified as: + - An instance of :class:`plotly.graph_objs.choropleth.colorbar.title.Font` + - A dict of string/value properties that will be passed + to the Font constructor + + Returns + ------- + plotly.graph_objs.choropleth.colorbar.title.Font + """ + return self["font"] + + @font.setter + def font(self, val): + self["font"] = val + + @property + def side(self): + """ + Determines the location of color bar's title with respect to + the color bar. Defaults to "top" when `orientation` if "v" and + defaults to "right" when `orientation` if "h". + + The 'side' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['right', 'top', 'bottom'] + + Returns + ------- + Any + """ + return self["side"] + + @side.setter + def side(self, val): + self["side"] = val + + @property + def text(self): + """ + Sets the title of the color bar. + + The 'text' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["text"] + + @text.setter + def text(self, val): + self["text"] = val + + @property + def _prop_descriptions(self): + return """\ + font + Sets this color bar's title font. + side + Determines the location of color bar's title with + respect to the color bar. Defaults to "top" when + `orientation` if "v" and defaults to "right" when + `orientation` if "h". + text + Sets the title of the color bar. + """ + + def __init__(self, arg=None, font=None, side=None, text=None, **kwargs): + """ + Construct a new Title object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.choropleth.colorbar.Title` + font + Sets this color bar's title font. + side + Determines the location of color bar's title with + respect to the color bar. Defaults to "top" when + `orientation` if "v" and defaults to "right" when + `orientation` if "h". + text + Sets the title of the color bar. + + Returns + ------- + Title + """ + super().__init__("title") + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + if arg is None: + arg = {} + elif isinstance(arg, self.__class__): + arg = arg.to_plotly_json() + elif isinstance(arg, dict): + arg = _copy.copy(arg) + else: + raise ValueError("""\ +The first argument to the plotly.graph_objs.choropleth.colorbar.Title +constructor must be a dict or +an instance of :class:`plotly.graph_objs.choropleth.colorbar.Title`""") + + self._skip_invalid = kwargs.pop("skip_invalid", False) + self._validate = kwargs.pop("_validate", True) + + self._set_property("font", arg, font) + self._set_property("side", arg, side) + self._set_property("text", arg, text) + self._process_kwargs(**dict(arg, **kwargs)) + self._skip_invalid = False diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/choropleth/colorbar/title/.___init__.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/choropleth/colorbar/title/.___init__.py new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/choropleth/colorbar/title/.___init__.py differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/choropleth/colorbar/title/.___pycache__ b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/choropleth/colorbar/title/.___pycache__ new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/choropleth/colorbar/title/.___pycache__ differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/choropleth/colorbar/title/.__font.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/choropleth/colorbar/title/.__font.py new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/choropleth/colorbar/title/.__font.py differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/choropleth/colorbar/title/__init__.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/choropleth/colorbar/title/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..56f600d3458c41f269053307377e9707ab13e090 --- /dev/null +++ b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/choropleth/colorbar/title/__init__.py @@ -0,0 +1,9 @@ +import sys +from typing import TYPE_CHECKING + +if TYPE_CHECKING: + from ._font import Font +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import(__name__, [], ["._font.Font"]) diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/choropleth/colorbar/title/_font.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/choropleth/colorbar/title/_font.py new file mode 100644 index 0000000000000000000000000000000000000000..69df048aa6c5905f3e521f0afb91b889513937f1 --- /dev/null +++ b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/choropleth/colorbar/title/_font.py @@ -0,0 +1,334 @@ +# --- THIS FILE IS AUTO-GENERATED --- +# Modifications will be overwitten the next time code generation run. + +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Font(_BaseTraceHierarchyType): + _parent_path_str = "choropleth.colorbar.title" + _path_str = "choropleth.colorbar.title.font" + _valid_props = { + "color", + "family", + "lineposition", + "shadow", + "size", + "style", + "textcase", + "variant", + "weight", + } + + @property + def color(self): + """ + The 'color' property is a color and may be specified as: + - A hex string (e.g. '#ff0000') + - An rgb/rgba string (e.g. 'rgb(255,0,0)') + - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') + - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') + - A named CSS color: see https://plotly.com/python/css-colors/ for a list + + Returns + ------- + str + """ + return self["color"] + + @color.setter + def color(self, val): + self["color"] = val + + @property + def family(self): + """ + HTML font family - the typeface that will be applied by the web + browser. The web browser can only apply a font if it is + available on the system where it runs. Provide multiple font + families, separated by commas, to indicate the order in which + to apply fonts if they aren't available. + + The 'family' property is a string and must be specified as: + - A non-empty string + + Returns + ------- + str + """ + return self["family"] + + @family.setter + def family(self, val): + self["family"] = val + + @property + def lineposition(self): + """ + Sets the kind of decoration line(s) with text, such as an + "under", "over" or "through" as well as combinations e.g. + "under+over", etc. + + The 'lineposition' property is a flaglist and may be specified + as a string containing: + - Any combination of ['under', 'over', 'through'] joined with '+' characters + (e.g. 'under+over') + OR exactly one of ['none'] (e.g. 'none') + + Returns + ------- + Any + """ + return self["lineposition"] + + @lineposition.setter + def lineposition(self, val): + self["lineposition"] = val + + @property + def shadow(self): + """ + Sets the shape and color of the shadow behind text. "auto" + places minimal shadow and applies contrast text font color. See + https://developer.mozilla.org/en-US/docs/Web/CSS/text-shadow + for additional options. + + The 'shadow' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["shadow"] + + @shadow.setter + def shadow(self, val): + self["shadow"] = val + + @property + def size(self): + """ + The 'size' property is a number and may be specified as: + - An int or float in the interval [1, inf] + + Returns + ------- + int|float + """ + return self["size"] + + @size.setter + def size(self, val): + self["size"] = val + + @property + def style(self): + """ + Sets whether a font should be styled with a normal or italic + face from its family. + + The 'style' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['normal', 'italic'] + + Returns + ------- + Any + """ + return self["style"] + + @style.setter + def style(self, val): + self["style"] = val + + @property + def textcase(self): + """ + Sets capitalization of text. It can be used to make text appear + in all-uppercase or all-lowercase, or with each word + capitalized. + + The 'textcase' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['normal', 'word caps', 'upper', 'lower'] + + Returns + ------- + Any + """ + return self["textcase"] + + @textcase.setter + def textcase(self, val): + self["textcase"] = val + + @property + def variant(self): + """ + Sets the variant of the font. + + The 'variant' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['normal', 'small-caps', 'all-small-caps', + 'all-petite-caps', 'petite-caps', 'unicase'] + + Returns + ------- + Any + """ + return self["variant"] + + @variant.setter + def variant(self, val): + self["variant"] = val + + @property + def weight(self): + """ + Sets the weight (or boldness) of the font. + + The 'weight' property is a integer and may be specified as: + - An int (or float that will be cast to an int) + in the interval [1, 1000] + OR exactly one of ['normal', 'bold'] (e.g. 'bold') + + Returns + ------- + int + """ + return self["weight"] + + @weight.setter + def weight(self, val): + self["weight"] = val + + @property + def _prop_descriptions(self): + return """\ + color + + family + HTML font family - the typeface that will be applied by + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. + lineposition + Sets the kind of decoration line(s) with text, such as + an "under", "over" or "through" as well as combinations + e.g. "under+over", etc. + shadow + Sets the shape and color of the shadow behind text. + "auto" places minimal shadow and applies contrast text + font color. See https://developer.mozilla.org/en- + US/docs/Web/CSS/text-shadow for additional options. + size + + style + Sets whether a font should be styled with a normal or + italic face from its family. + textcase + Sets capitalization of text. It can be used to make + text appear in all-uppercase or all-lowercase, or with + each word capitalized. + variant + Sets the variant of the font. + weight + Sets the weight (or boldness) of the font. + """ + + def __init__( + self, + arg=None, + color=None, + family=None, + lineposition=None, + shadow=None, + size=None, + style=None, + textcase=None, + variant=None, + weight=None, + **kwargs, + ): + """ + Construct a new Font object + + Sets this color bar's title font. + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of :class:`plotly.graph_objs.choropleth.col + orbar.title.Font` + color + + family + HTML font family - the typeface that will be applied by + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. + lineposition + Sets the kind of decoration line(s) with text, such as + an "under", "over" or "through" as well as combinations + e.g. "under+over", etc. + shadow + Sets the shape and color of the shadow behind text. + "auto" places minimal shadow and applies contrast text + font color. See https://developer.mozilla.org/en- + US/docs/Web/CSS/text-shadow for additional options. + size + + style + Sets whether a font should be styled with a normal or + italic face from its family. + textcase + Sets capitalization of text. It can be used to make + text appear in all-uppercase or all-lowercase, or with + each word capitalized. + variant + Sets the variant of the font. + weight + Sets the weight (or boldness) of the font. + + Returns + ------- + Font + """ + super().__init__("font") + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + if arg is None: + arg = {} + elif isinstance(arg, self.__class__): + arg = arg.to_plotly_json() + elif isinstance(arg, dict): + arg = _copy.copy(arg) + else: + raise ValueError("""\ +The first argument to the plotly.graph_objs.choropleth.colorbar.title.Font +constructor must be a dict or +an instance of :class:`plotly.graph_objs.choropleth.colorbar.title.Font`""") + + self._skip_invalid = kwargs.pop("skip_invalid", False) + self._validate = kwargs.pop("_validate", True) + + self._set_property("color", arg, color) + self._set_property("family", arg, family) + self._set_property("lineposition", arg, lineposition) + self._set_property("shadow", arg, shadow) + self._set_property("size", arg, size) + self._set_property("style", arg, style) + self._set_property("textcase", arg, textcase) + self._set_property("variant", arg, variant) + self._set_property("weight", arg, weight) + self._process_kwargs(**dict(arg, **kwargs)) + self._skip_invalid = False diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/choropleth/hoverlabel/.___init__.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/choropleth/hoverlabel/.___init__.py new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/choropleth/hoverlabel/.___init__.py differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/choropleth/hoverlabel/.___pycache__ b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/choropleth/hoverlabel/.___pycache__ new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/choropleth/hoverlabel/.___pycache__ differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/choropleth/hoverlabel/.__font.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/choropleth/hoverlabel/.__font.py new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/choropleth/hoverlabel/.__font.py differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/choropleth/hoverlabel/__init__.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/choropleth/hoverlabel/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..56f600d3458c41f269053307377e9707ab13e090 --- /dev/null +++ b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/choropleth/hoverlabel/__init__.py @@ -0,0 +1,9 @@ +import sys +from typing import TYPE_CHECKING + +if TYPE_CHECKING: + from ._font import Font +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import(__name__, [], ["._font.Font"]) diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/choropleth/hoverlabel/_font.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/choropleth/hoverlabel/_font.py new file mode 100644 index 0000000000000000000000000000000000000000..5892c809ed00b29a5313c6d6e836007eaeb1a8d8 --- /dev/null +++ b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/choropleth/hoverlabel/_font.py @@ -0,0 +1,587 @@ +# --- THIS FILE IS AUTO-GENERATED --- +# Modifications will be overwitten the next time code generation run. + +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Font(_BaseTraceHierarchyType): + _parent_path_str = "choropleth.hoverlabel" + _path_str = "choropleth.hoverlabel.font" + _valid_props = { + "color", + "colorsrc", + "family", + "familysrc", + "lineposition", + "linepositionsrc", + "shadow", + "shadowsrc", + "size", + "sizesrc", + "style", + "stylesrc", + "textcase", + "textcasesrc", + "variant", + "variantsrc", + "weight", + "weightsrc", + } + + @property + def color(self): + """ + The 'color' property is a color and may be specified as: + - A hex string (e.g. '#ff0000') + - An rgb/rgba string (e.g. 'rgb(255,0,0)') + - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') + - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') + - A named CSS color: see https://plotly.com/python/css-colors/ for a list + - A list or array of any of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["color"] + + @color.setter + def color(self, val): + self["color"] = val + + @property + def colorsrc(self): + """ + Sets the source reference on Chart Studio Cloud for `color`. + + The 'colorsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["colorsrc"] + + @colorsrc.setter + def colorsrc(self, val): + self["colorsrc"] = val + + @property + def family(self): + """ + HTML font family - the typeface that will be applied by the web + browser. The web browser can only apply a font if it is + available on the system where it runs. Provide multiple font + families, separated by commas, to indicate the order in which + to apply fonts if they aren't available. + + The 'family' property is a string and must be specified as: + - A non-empty string + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["family"] + + @family.setter + def family(self, val): + self["family"] = val + + @property + def familysrc(self): + """ + Sets the source reference on Chart Studio Cloud for `family`. + + The 'familysrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["familysrc"] + + @familysrc.setter + def familysrc(self, val): + self["familysrc"] = val + + @property + def lineposition(self): + """ + Sets the kind of decoration line(s) with text, such as an + "under", "over" or "through" as well as combinations e.g. + "under+over", etc. + + The 'lineposition' property is a flaglist and may be specified + as a string containing: + - Any combination of ['under', 'over', 'through'] joined with '+' characters + (e.g. 'under+over') + OR exactly one of ['none'] (e.g. 'none') + - A list or array of the above + + Returns + ------- + Any|numpy.ndarray + """ + return self["lineposition"] + + @lineposition.setter + def lineposition(self, val): + self["lineposition"] = val + + @property + def linepositionsrc(self): + """ + Sets the source reference on Chart Studio Cloud for + `lineposition`. + + The 'linepositionsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["linepositionsrc"] + + @linepositionsrc.setter + def linepositionsrc(self, val): + self["linepositionsrc"] = val + + @property + def shadow(self): + """ + Sets the shape and color of the shadow behind text. "auto" + places minimal shadow and applies contrast text font color. See + https://developer.mozilla.org/en-US/docs/Web/CSS/text-shadow + for additional options. + + The 'shadow' property is a string and must be specified as: + - A string + - A number that will be converted to a string + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["shadow"] + + @shadow.setter + def shadow(self, val): + self["shadow"] = val + + @property + def shadowsrc(self): + """ + Sets the source reference on Chart Studio Cloud for `shadow`. + + The 'shadowsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["shadowsrc"] + + @shadowsrc.setter + def shadowsrc(self, val): + self["shadowsrc"] = val + + @property + def size(self): + """ + The 'size' property is a number and may be specified as: + - An int or float in the interval [1, inf] + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + int|float|numpy.ndarray + """ + return self["size"] + + @size.setter + def size(self, val): + self["size"] = val + + @property + def sizesrc(self): + """ + Sets the source reference on Chart Studio Cloud for `size`. + + The 'sizesrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["sizesrc"] + + @sizesrc.setter + def sizesrc(self, val): + self["sizesrc"] = val + + @property + def style(self): + """ + Sets whether a font should be styled with a normal or italic + face from its family. + + The 'style' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['normal', 'italic'] + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + Any|numpy.ndarray + """ + return self["style"] + + @style.setter + def style(self, val): + self["style"] = val + + @property + def stylesrc(self): + """ + Sets the source reference on Chart Studio Cloud for `style`. + + The 'stylesrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["stylesrc"] + + @stylesrc.setter + def stylesrc(self, val): + self["stylesrc"] = val + + @property + def textcase(self): + """ + Sets capitalization of text. It can be used to make text appear + in all-uppercase or all-lowercase, or with each word + capitalized. + + The 'textcase' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['normal', 'word caps', 'upper', 'lower'] + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + Any|numpy.ndarray + """ + return self["textcase"] + + @textcase.setter + def textcase(self, val): + self["textcase"] = val + + @property + def textcasesrc(self): + """ + Sets the source reference on Chart Studio Cloud for `textcase`. + + The 'textcasesrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["textcasesrc"] + + @textcasesrc.setter + def textcasesrc(self, val): + self["textcasesrc"] = val + + @property + def variant(self): + """ + Sets the variant of the font. + + The 'variant' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['normal', 'small-caps', 'all-small-caps', + 'all-petite-caps', 'petite-caps', 'unicase'] + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + Any|numpy.ndarray + """ + return self["variant"] + + @variant.setter + def variant(self, val): + self["variant"] = val + + @property + def variantsrc(self): + """ + Sets the source reference on Chart Studio Cloud for `variant`. + + The 'variantsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["variantsrc"] + + @variantsrc.setter + def variantsrc(self, val): + self["variantsrc"] = val + + @property + def weight(self): + """ + Sets the weight (or boldness) of the font. + + The 'weight' property is a integer and may be specified as: + - An int (or float that will be cast to an int) + in the interval [1, 1000] + OR exactly one of ['normal', 'bold'] (e.g. 'bold') + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + int|numpy.ndarray + """ + return self["weight"] + + @weight.setter + def weight(self, val): + self["weight"] = val + + @property + def weightsrc(self): + """ + Sets the source reference on Chart Studio Cloud for `weight`. + + The 'weightsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["weightsrc"] + + @weightsrc.setter + def weightsrc(self, val): + self["weightsrc"] = val + + @property + def _prop_descriptions(self): + return """\ + color + + colorsrc + Sets the source reference on Chart Studio Cloud for + `color`. + family + HTML font family - the typeface that will be applied by + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. + familysrc + Sets the source reference on Chart Studio Cloud for + `family`. + lineposition + Sets the kind of decoration line(s) with text, such as + an "under", "over" or "through" as well as combinations + e.g. "under+over", etc. + linepositionsrc + Sets the source reference on Chart Studio Cloud for + `lineposition`. + shadow + Sets the shape and color of the shadow behind text. + "auto" places minimal shadow and applies contrast text + font color. See https://developer.mozilla.org/en- + US/docs/Web/CSS/text-shadow for additional options. + shadowsrc + Sets the source reference on Chart Studio Cloud for + `shadow`. + size + + sizesrc + Sets the source reference on Chart Studio Cloud for + `size`. + style + Sets whether a font should be styled with a normal or + italic face from its family. + stylesrc + Sets the source reference on Chart Studio Cloud for + `style`. + textcase + Sets capitalization of text. It can be used to make + text appear in all-uppercase or all-lowercase, or with + each word capitalized. + textcasesrc + Sets the source reference on Chart Studio Cloud for + `textcase`. + variant + Sets the variant of the font. + variantsrc + Sets the source reference on Chart Studio Cloud for + `variant`. + weight + Sets the weight (or boldness) of the font. + weightsrc + Sets the source reference on Chart Studio Cloud for + `weight`. + """ + + def __init__( + self, + arg=None, + color=None, + colorsrc=None, + family=None, + familysrc=None, + lineposition=None, + linepositionsrc=None, + shadow=None, + shadowsrc=None, + size=None, + sizesrc=None, + style=None, + stylesrc=None, + textcase=None, + textcasesrc=None, + variant=None, + variantsrc=None, + weight=None, + weightsrc=None, + **kwargs, + ): + """ + Construct a new Font object + + Sets the font used in hover labels. + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.choropleth.hoverlabel.Font` + color + + colorsrc + Sets the source reference on Chart Studio Cloud for + `color`. + family + HTML font family - the typeface that will be applied by + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. + familysrc + Sets the source reference on Chart Studio Cloud for + `family`. + lineposition + Sets the kind of decoration line(s) with text, such as + an "under", "over" or "through" as well as combinations + e.g. "under+over", etc. + linepositionsrc + Sets the source reference on Chart Studio Cloud for + `lineposition`. + shadow + Sets the shape and color of the shadow behind text. + "auto" places minimal shadow and applies contrast text + font color. See https://developer.mozilla.org/en- + US/docs/Web/CSS/text-shadow for additional options. + shadowsrc + Sets the source reference on Chart Studio Cloud for + `shadow`. + size + + sizesrc + Sets the source reference on Chart Studio Cloud for + `size`. + style + Sets whether a font should be styled with a normal or + italic face from its family. + stylesrc + Sets the source reference on Chart Studio Cloud for + `style`. + textcase + Sets capitalization of text. It can be used to make + text appear in all-uppercase or all-lowercase, or with + each word capitalized. + textcasesrc + Sets the source reference on Chart Studio Cloud for + `textcase`. + variant + Sets the variant of the font. + variantsrc + Sets the source reference on Chart Studio Cloud for + `variant`. + weight + Sets the weight (or boldness) of the font. + weightsrc + Sets the source reference on Chart Studio Cloud for + `weight`. + + Returns + ------- + Font + """ + super().__init__("font") + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + if arg is None: + arg = {} + elif isinstance(arg, self.__class__): + arg = arg.to_plotly_json() + elif isinstance(arg, dict): + arg = _copy.copy(arg) + else: + raise ValueError("""\ +The first argument to the plotly.graph_objs.choropleth.hoverlabel.Font +constructor must be a dict or +an instance of :class:`plotly.graph_objs.choropleth.hoverlabel.Font`""") + + self._skip_invalid = kwargs.pop("skip_invalid", False) + self._validate = kwargs.pop("_validate", True) + + self._set_property("color", arg, color) + self._set_property("colorsrc", arg, colorsrc) + self._set_property("family", arg, family) + self._set_property("familysrc", arg, familysrc) + self._set_property("lineposition", arg, lineposition) + self._set_property("linepositionsrc", arg, linepositionsrc) + self._set_property("shadow", arg, shadow) + self._set_property("shadowsrc", arg, shadowsrc) + self._set_property("size", arg, size) + self._set_property("sizesrc", arg, sizesrc) + self._set_property("style", arg, style) + self._set_property("stylesrc", arg, stylesrc) + self._set_property("textcase", arg, textcase) + self._set_property("textcasesrc", arg, textcasesrc) + self._set_property("variant", arg, variant) + self._set_property("variantsrc", arg, variantsrc) + self._set_property("weight", arg, weight) + self._set_property("weightsrc", arg, weightsrc) + self._process_kwargs(**dict(arg, **kwargs)) + self._skip_invalid = False diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/choropleth/legendgrouptitle/.___init__.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/choropleth/legendgrouptitle/.___init__.py new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/choropleth/legendgrouptitle/.___init__.py differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/choropleth/legendgrouptitle/.___pycache__ b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/choropleth/legendgrouptitle/.___pycache__ new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/choropleth/legendgrouptitle/.___pycache__ differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/choropleth/legendgrouptitle/.__font.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/choropleth/legendgrouptitle/.__font.py new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/choropleth/legendgrouptitle/.__font.py differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/choropleth/legendgrouptitle/__init__.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/choropleth/legendgrouptitle/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..56f600d3458c41f269053307377e9707ab13e090 --- /dev/null +++ b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/choropleth/legendgrouptitle/__init__.py @@ -0,0 +1,9 @@ +import sys +from typing import TYPE_CHECKING + +if TYPE_CHECKING: + from ._font import Font +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import(__name__, [], ["._font.Font"]) diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/choropleth/legendgrouptitle/_font.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/choropleth/legendgrouptitle/_font.py new file mode 100644 index 0000000000000000000000000000000000000000..79c05c7d4dd54297570248825ab85d416ed39245 --- /dev/null +++ b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/choropleth/legendgrouptitle/_font.py @@ -0,0 +1,334 @@ +# --- THIS FILE IS AUTO-GENERATED --- +# Modifications will be overwitten the next time code generation run. + +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Font(_BaseTraceHierarchyType): + _parent_path_str = "choropleth.legendgrouptitle" + _path_str = "choropleth.legendgrouptitle.font" + _valid_props = { + "color", + "family", + "lineposition", + "shadow", + "size", + "style", + "textcase", + "variant", + "weight", + } + + @property + def color(self): + """ + The 'color' property is a color and may be specified as: + - A hex string (e.g. '#ff0000') + - An rgb/rgba string (e.g. 'rgb(255,0,0)') + - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') + - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') + - A named CSS color: see https://plotly.com/python/css-colors/ for a list + + Returns + ------- + str + """ + return self["color"] + + @color.setter + def color(self, val): + self["color"] = val + + @property + def family(self): + """ + HTML font family - the typeface that will be applied by the web + browser. The web browser can only apply a font if it is + available on the system where it runs. Provide multiple font + families, separated by commas, to indicate the order in which + to apply fonts if they aren't available. + + The 'family' property is a string and must be specified as: + - A non-empty string + + Returns + ------- + str + """ + return self["family"] + + @family.setter + def family(self, val): + self["family"] = val + + @property + def lineposition(self): + """ + Sets the kind of decoration line(s) with text, such as an + "under", "over" or "through" as well as combinations e.g. + "under+over", etc. + + The 'lineposition' property is a flaglist and may be specified + as a string containing: + - Any combination of ['under', 'over', 'through'] joined with '+' characters + (e.g. 'under+over') + OR exactly one of ['none'] (e.g. 'none') + + Returns + ------- + Any + """ + return self["lineposition"] + + @lineposition.setter + def lineposition(self, val): + self["lineposition"] = val + + @property + def shadow(self): + """ + Sets the shape and color of the shadow behind text. "auto" + places minimal shadow and applies contrast text font color. See + https://developer.mozilla.org/en-US/docs/Web/CSS/text-shadow + for additional options. + + The 'shadow' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["shadow"] + + @shadow.setter + def shadow(self, val): + self["shadow"] = val + + @property + def size(self): + """ + The 'size' property is a number and may be specified as: + - An int or float in the interval [1, inf] + + Returns + ------- + int|float + """ + return self["size"] + + @size.setter + def size(self, val): + self["size"] = val + + @property + def style(self): + """ + Sets whether a font should be styled with a normal or italic + face from its family. + + The 'style' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['normal', 'italic'] + + Returns + ------- + Any + """ + return self["style"] + + @style.setter + def style(self, val): + self["style"] = val + + @property + def textcase(self): + """ + Sets capitalization of text. It can be used to make text appear + in all-uppercase or all-lowercase, or with each word + capitalized. + + The 'textcase' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['normal', 'word caps', 'upper', 'lower'] + + Returns + ------- + Any + """ + return self["textcase"] + + @textcase.setter + def textcase(self, val): + self["textcase"] = val + + @property + def variant(self): + """ + Sets the variant of the font. + + The 'variant' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['normal', 'small-caps', 'all-small-caps', + 'all-petite-caps', 'petite-caps', 'unicase'] + + Returns + ------- + Any + """ + return self["variant"] + + @variant.setter + def variant(self, val): + self["variant"] = val + + @property + def weight(self): + """ + Sets the weight (or boldness) of the font. + + The 'weight' property is a integer and may be specified as: + - An int (or float that will be cast to an int) + in the interval [1, 1000] + OR exactly one of ['normal', 'bold'] (e.g. 'bold') + + Returns + ------- + int + """ + return self["weight"] + + @weight.setter + def weight(self, val): + self["weight"] = val + + @property + def _prop_descriptions(self): + return """\ + color + + family + HTML font family - the typeface that will be applied by + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. + lineposition + Sets the kind of decoration line(s) with text, such as + an "under", "over" or "through" as well as combinations + e.g. "under+over", etc. + shadow + Sets the shape and color of the shadow behind text. + "auto" places minimal shadow and applies contrast text + font color. See https://developer.mozilla.org/en- + US/docs/Web/CSS/text-shadow for additional options. + size + + style + Sets whether a font should be styled with a normal or + italic face from its family. + textcase + Sets capitalization of text. It can be used to make + text appear in all-uppercase or all-lowercase, or with + each word capitalized. + variant + Sets the variant of the font. + weight + Sets the weight (or boldness) of the font. + """ + + def __init__( + self, + arg=None, + color=None, + family=None, + lineposition=None, + shadow=None, + size=None, + style=None, + textcase=None, + variant=None, + weight=None, + **kwargs, + ): + """ + Construct a new Font object + + Sets this legend group's title font. + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of :class:`plotly.graph_objs.choropleth.leg + endgrouptitle.Font` + color + + family + HTML font family - the typeface that will be applied by + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. + lineposition + Sets the kind of decoration line(s) with text, such as + an "under", "over" or "through" as well as combinations + e.g. "under+over", etc. + shadow + Sets the shape and color of the shadow behind text. + "auto" places minimal shadow and applies contrast text + font color. See https://developer.mozilla.org/en- + US/docs/Web/CSS/text-shadow for additional options. + size + + style + Sets whether a font should be styled with a normal or + italic face from its family. + textcase + Sets capitalization of text. It can be used to make + text appear in all-uppercase or all-lowercase, or with + each word capitalized. + variant + Sets the variant of the font. + weight + Sets the weight (or boldness) of the font. + + Returns + ------- + Font + """ + super().__init__("font") + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + if arg is None: + arg = {} + elif isinstance(arg, self.__class__): + arg = arg.to_plotly_json() + elif isinstance(arg, dict): + arg = _copy.copy(arg) + else: + raise ValueError("""\ +The first argument to the plotly.graph_objs.choropleth.legendgrouptitle.Font +constructor must be a dict or +an instance of :class:`plotly.graph_objs.choropleth.legendgrouptitle.Font`""") + + self._skip_invalid = kwargs.pop("skip_invalid", False) + self._validate = kwargs.pop("_validate", True) + + self._set_property("color", arg, color) + self._set_property("family", arg, family) + self._set_property("lineposition", arg, lineposition) + self._set_property("shadow", arg, shadow) + self._set_property("size", arg, size) + self._set_property("style", arg, style) + self._set_property("textcase", arg, textcase) + self._set_property("variant", arg, variant) + self._set_property("weight", arg, weight) + self._process_kwargs(**dict(arg, **kwargs)) + self._skip_invalid = False diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/choropleth/marker/.___init__.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/choropleth/marker/.___init__.py new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/choropleth/marker/.___init__.py differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/choropleth/marker/.___pycache__ b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/choropleth/marker/.___pycache__ new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/choropleth/marker/.___pycache__ differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/choropleth/marker/.__line.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/choropleth/marker/.__line.py new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/choropleth/marker/.__line.py differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/choropleth/marker/__init__.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/choropleth/marker/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..33e42c007335e876d1a3c1d78cec108c9248c1c9 --- /dev/null +++ b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/choropleth/marker/__init__.py @@ -0,0 +1,9 @@ +import sys +from typing import TYPE_CHECKING + +if TYPE_CHECKING: + from ._line import Line +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import(__name__, [], ["._line.Line"]) diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/choropleth/marker/_line.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/choropleth/marker/_line.py new file mode 100644 index 0000000000000000000000000000000000000000..bf9d861776f5a54f7bd9dfe71e583e317ffc7e81 --- /dev/null +++ b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/choropleth/marker/_line.py @@ -0,0 +1,171 @@ +# --- THIS FILE IS AUTO-GENERATED --- +# Modifications will be overwitten the next time code generation run. + +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Line(_BaseTraceHierarchyType): + _parent_path_str = "choropleth.marker" + _path_str = "choropleth.marker.line" + _valid_props = {"color", "colorsrc", "width", "widthsrc"} + + @property + def color(self): + """ + Sets the marker.line color. It accepts either a specific color + or an array of numbers that are mapped to the colorscale + relative to the max and min values of the array or relative to + `marker.line.cmin` and `marker.line.cmax` if set. + + The 'color' property is a color and may be specified as: + - A hex string (e.g. '#ff0000') + - An rgb/rgba string (e.g. 'rgb(255,0,0)') + - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') + - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') + - A named CSS color: see https://plotly.com/python/css-colors/ for a list + - A list or array of any of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["color"] + + @color.setter + def color(self, val): + self["color"] = val + + @property + def colorsrc(self): + """ + Sets the source reference on Chart Studio Cloud for `color`. + + The 'colorsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["colorsrc"] + + @colorsrc.setter + def colorsrc(self, val): + self["colorsrc"] = val + + @property + def width(self): + """ + Sets the width (in px) of the lines bounding the marker points. + + The 'width' property is a number and may be specified as: + - An int or float in the interval [0, inf] + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + int|float|numpy.ndarray + """ + return self["width"] + + @width.setter + def width(self, val): + self["width"] = val + + @property + def widthsrc(self): + """ + Sets the source reference on Chart Studio Cloud for `width`. + + The 'widthsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["widthsrc"] + + @widthsrc.setter + def widthsrc(self, val): + self["widthsrc"] = val + + @property + def _prop_descriptions(self): + return """\ + color + Sets the marker.line color. It accepts either a + specific color or an array of numbers that are mapped + to the colorscale relative to the max and min values of + the array or relative to `marker.line.cmin` and + `marker.line.cmax` if set. + colorsrc + Sets the source reference on Chart Studio Cloud for + `color`. + width + Sets the width (in px) of the lines bounding the marker + points. + widthsrc + Sets the source reference on Chart Studio Cloud for + `width`. + """ + + def __init__( + self, arg=None, color=None, colorsrc=None, width=None, widthsrc=None, **kwargs + ): + """ + Construct a new Line object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.choropleth.marker.Line` + color + Sets the marker.line color. It accepts either a + specific color or an array of numbers that are mapped + to the colorscale relative to the max and min values of + the array or relative to `marker.line.cmin` and + `marker.line.cmax` if set. + colorsrc + Sets the source reference on Chart Studio Cloud for + `color`. + width + Sets the width (in px) of the lines bounding the marker + points. + widthsrc + Sets the source reference on Chart Studio Cloud for + `width`. + + Returns + ------- + Line + """ + super().__init__("line") + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + if arg is None: + arg = {} + elif isinstance(arg, self.__class__): + arg = arg.to_plotly_json() + elif isinstance(arg, dict): + arg = _copy.copy(arg) + else: + raise ValueError("""\ +The first argument to the plotly.graph_objs.choropleth.marker.Line +constructor must be a dict or +an instance of :class:`plotly.graph_objs.choropleth.marker.Line`""") + + self._skip_invalid = kwargs.pop("skip_invalid", False) + self._validate = kwargs.pop("_validate", True) + + self._set_property("color", arg, color) + self._set_property("colorsrc", arg, colorsrc) + self._set_property("width", arg, width) + self._set_property("widthsrc", arg, widthsrc) + self._process_kwargs(**dict(arg, **kwargs)) + self._skip_invalid = False diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/choropleth/selected/.___init__.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/choropleth/selected/.___init__.py new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/choropleth/selected/.___init__.py differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/choropleth/selected/.___pycache__ b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/choropleth/selected/.___pycache__ new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/choropleth/selected/.___pycache__ differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/choropleth/selected/.__marker.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/choropleth/selected/.__marker.py new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/choropleth/selected/.__marker.py differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/choropleth/selected/__init__.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/choropleth/selected/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..b4ba7bf2614e6c8f6fce41321172f465c59ab433 --- /dev/null +++ b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/choropleth/selected/__init__.py @@ -0,0 +1,9 @@ +import sys +from typing import TYPE_CHECKING + +if TYPE_CHECKING: + from ._marker import Marker +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import(__name__, [], ["._marker.Marker"]) diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/choropleth/selected/_marker.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/choropleth/selected/_marker.py new file mode 100644 index 0000000000000000000000000000000000000000..97eaa76cc7223298edf214310943fe9f1441e6bb --- /dev/null +++ b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/choropleth/selected/_marker.py @@ -0,0 +1,77 @@ +# --- THIS FILE IS AUTO-GENERATED --- +# Modifications will be overwitten the next time code generation run. + +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Marker(_BaseTraceHierarchyType): + _parent_path_str = "choropleth.selected" + _path_str = "choropleth.selected.marker" + _valid_props = {"opacity"} + + @property + def opacity(self): + """ + Sets the marker opacity of selected points. + + The 'opacity' property is a number and may be specified as: + - An int or float in the interval [0, 1] + + Returns + ------- + int|float + """ + return self["opacity"] + + @opacity.setter + def opacity(self, val): + self["opacity"] = val + + @property + def _prop_descriptions(self): + return """\ + opacity + Sets the marker opacity of selected points. + """ + + def __init__(self, arg=None, opacity=None, **kwargs): + """ + Construct a new Marker object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.choropleth.selected.Marker` + opacity + Sets the marker opacity of selected points. + + Returns + ------- + Marker + """ + super().__init__("marker") + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + if arg is None: + arg = {} + elif isinstance(arg, self.__class__): + arg = arg.to_plotly_json() + elif isinstance(arg, dict): + arg = _copy.copy(arg) + else: + raise ValueError("""\ +The first argument to the plotly.graph_objs.choropleth.selected.Marker +constructor must be a dict or +an instance of :class:`plotly.graph_objs.choropleth.selected.Marker`""") + + self._skip_invalid = kwargs.pop("skip_invalid", False) + self._validate = kwargs.pop("_validate", True) + + self._set_property("opacity", arg, opacity) + self._process_kwargs(**dict(arg, **kwargs)) + self._skip_invalid = False diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/choropleth/unselected/.___init__.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/choropleth/unselected/.___init__.py new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/choropleth/unselected/.___init__.py differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/choropleth/unselected/.___pycache__ b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/choropleth/unselected/.___pycache__ new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/choropleth/unselected/.___pycache__ differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/choropleth/unselected/.__marker.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/choropleth/unselected/.__marker.py new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/choropleth/unselected/.__marker.py differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/choropleth/unselected/__init__.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/choropleth/unselected/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..b4ba7bf2614e6c8f6fce41321172f465c59ab433 --- /dev/null +++ b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/choropleth/unselected/__init__.py @@ -0,0 +1,9 @@ +import sys +from typing import TYPE_CHECKING + +if TYPE_CHECKING: + from ._marker import Marker +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import(__name__, [], ["._marker.Marker"]) diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/choropleth/unselected/_marker.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/choropleth/unselected/_marker.py new file mode 100644 index 0000000000000000000000000000000000000000..d7d5881d4347def05df10cc44addcfb49e81c05e --- /dev/null +++ b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/choropleth/unselected/_marker.py @@ -0,0 +1,80 @@ +# --- THIS FILE IS AUTO-GENERATED --- +# Modifications will be overwitten the next time code generation run. + +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Marker(_BaseTraceHierarchyType): + _parent_path_str = "choropleth.unselected" + _path_str = "choropleth.unselected.marker" + _valid_props = {"opacity"} + + @property + def opacity(self): + """ + Sets the marker opacity of unselected points, applied only when + a selection exists. + + The 'opacity' property is a number and may be specified as: + - An int or float in the interval [0, 1] + + Returns + ------- + int|float + """ + return self["opacity"] + + @opacity.setter + def opacity(self, val): + self["opacity"] = val + + @property + def _prop_descriptions(self): + return """\ + opacity + Sets the marker opacity of unselected points, applied + only when a selection exists. + """ + + def __init__(self, arg=None, opacity=None, **kwargs): + """ + Construct a new Marker object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.choropleth.unselected.Marker` + opacity + Sets the marker opacity of unselected points, applied + only when a selection exists. + + Returns + ------- + Marker + """ + super().__init__("marker") + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + if arg is None: + arg = {} + elif isinstance(arg, self.__class__): + arg = arg.to_plotly_json() + elif isinstance(arg, dict): + arg = _copy.copy(arg) + else: + raise ValueError("""\ +The first argument to the plotly.graph_objs.choropleth.unselected.Marker +constructor must be a dict or +an instance of :class:`plotly.graph_objs.choropleth.unselected.Marker`""") + + self._skip_invalid = kwargs.pop("skip_invalid", False) + self._validate = kwargs.pop("_validate", True) + + self._set_property("opacity", arg, opacity) + self._process_kwargs(**dict(arg, **kwargs)) + self._skip_invalid = False diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/choroplethmap/.___init__.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/choroplethmap/.___init__.py new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/choroplethmap/.___init__.py differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/choroplethmap/.___pycache__ b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/choroplethmap/.___pycache__ new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/choroplethmap/.___pycache__ differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/choroplethmap/.__colorbar.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/choroplethmap/.__colorbar.py new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/choroplethmap/.__colorbar.py differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/choroplethmap/.__hoverlabel.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/choroplethmap/.__hoverlabel.py new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/choroplethmap/.__hoverlabel.py differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/choroplethmap/.__legendgrouptitle.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/choroplethmap/.__legendgrouptitle.py new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/choroplethmap/.__legendgrouptitle.py differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/choroplethmap/.__marker.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/choroplethmap/.__marker.py new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/choroplethmap/.__marker.py differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/choroplethmap/.__selected.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/choroplethmap/.__selected.py new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/choroplethmap/.__selected.py differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/choroplethmap/.__stream.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/choroplethmap/.__stream.py new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/choroplethmap/.__stream.py differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/choroplethmap/.__unselected.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/choroplethmap/.__unselected.py new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/choroplethmap/.__unselected.py differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/choroplethmap/._colorbar b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/choroplethmap/._colorbar new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/choroplethmap/._colorbar differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/choroplethmap/._hoverlabel b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/choroplethmap/._hoverlabel new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/choroplethmap/._hoverlabel differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/choroplethmap/._legendgrouptitle b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/choroplethmap/._legendgrouptitle new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/choroplethmap/._legendgrouptitle differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/choroplethmap/._marker b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/choroplethmap/._marker new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/choroplethmap/._marker differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/choroplethmap/._selected b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/choroplethmap/._selected new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/choroplethmap/._selected differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/choroplethmap/._unselected b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/choroplethmap/._unselected new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/choroplethmap/._unselected differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/choroplethmap/__init__.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/choroplethmap/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..bbdf79a35a765428a67b80fc7e9703117398bc32 --- /dev/null +++ b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/choroplethmap/__init__.py @@ -0,0 +1,40 @@ +import sys +from typing import TYPE_CHECKING + +if TYPE_CHECKING: + from ._colorbar import ColorBar + from ._hoverlabel import Hoverlabel + from ._legendgrouptitle import Legendgrouptitle + from ._marker import Marker + from ._selected import Selected + from ._stream import Stream + from ._unselected import Unselected + from . import colorbar + from . import hoverlabel + from . import legendgrouptitle + from . import marker + from . import selected + from . import unselected +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [ + ".colorbar", + ".hoverlabel", + ".legendgrouptitle", + ".marker", + ".selected", + ".unselected", + ], + [ + "._colorbar.ColorBar", + "._hoverlabel.Hoverlabel", + "._legendgrouptitle.Legendgrouptitle", + "._marker.Marker", + "._selected.Selected", + "._stream.Stream", + "._unselected.Unselected", + ], + ) diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/choroplethmap/_colorbar.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/choroplethmap/_colorbar.py new file mode 100644 index 0000000000000000000000000000000000000000..a09c2a2714825f9a3cf49e91308f0239bd38a1f2 --- /dev/null +++ b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/choroplethmap/_colorbar.py @@ -0,0 +1,1739 @@ +# --- THIS FILE IS AUTO-GENERATED --- +# Modifications will be overwitten the next time code generation run. + +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class ColorBar(_BaseTraceHierarchyType): + _parent_path_str = "choroplethmap" + _path_str = "choroplethmap.colorbar" + _valid_props = { + "bgcolor", + "bordercolor", + "borderwidth", + "dtick", + "exponentformat", + "labelalias", + "len", + "lenmode", + "minexponent", + "nticks", + "orientation", + "outlinecolor", + "outlinewidth", + "separatethousands", + "showexponent", + "showticklabels", + "showtickprefix", + "showticksuffix", + "thickness", + "thicknessmode", + "tick0", + "tickangle", + "tickcolor", + "tickfont", + "tickformat", + "tickformatstopdefaults", + "tickformatstops", + "ticklabeloverflow", + "ticklabelposition", + "ticklabelstep", + "ticklen", + "tickmode", + "tickprefix", + "ticks", + "ticksuffix", + "ticktext", + "ticktextsrc", + "tickvals", + "tickvalssrc", + "tickwidth", + "title", + "x", + "xanchor", + "xpad", + "xref", + "y", + "yanchor", + "ypad", + "yref", + } + + @property + def bgcolor(self): + """ + Sets the color of padded area. + + The 'bgcolor' property is a color and may be specified as: + - A hex string (e.g. '#ff0000') + - An rgb/rgba string (e.g. 'rgb(255,0,0)') + - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') + - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') + - A named CSS color: see https://plotly.com/python/css-colors/ for a list + + Returns + ------- + str + """ + return self["bgcolor"] + + @bgcolor.setter + def bgcolor(self, val): + self["bgcolor"] = val + + @property + def bordercolor(self): + """ + Sets the axis line color. + + The 'bordercolor' property is a color and may be specified as: + - A hex string (e.g. '#ff0000') + - An rgb/rgba string (e.g. 'rgb(255,0,0)') + - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') + - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') + - A named CSS color: see https://plotly.com/python/css-colors/ for a list + + Returns + ------- + str + """ + return self["bordercolor"] + + @bordercolor.setter + def bordercolor(self, val): + self["bordercolor"] = val + + @property + def borderwidth(self): + """ + Sets the width (in px) or the border enclosing this color bar. + + The 'borderwidth' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["borderwidth"] + + @borderwidth.setter + def borderwidth(self, val): + self["borderwidth"] = val + + @property + def dtick(self): + """ + Sets the step in-between ticks on this axis. Use with `tick0`. + Must be a positive number, or special strings available to + "log" and "date" axes. If the axis `type` is "log", then ticks + are set every 10^(n*dtick) where n is the tick number. For + example, to set a tick mark at 1, 10, 100, 1000, ... set dtick + to 1. To set tick marks at 1, 100, 10000, ... set dtick to 2. + To set tick marks at 1, 5, 25, 125, 625, 3125, ... set dtick to + log_10(5), or 0.69897000433. "log" has several special values; + "L", where `f` is a positive number, gives ticks linearly + spaced in value (but not position). For example `tick0` = 0.1, + `dtick` = "L0.5" will put ticks at 0.1, 0.6, 1.1, 1.6 etc. To + show powers of 10 plus small digits between, use "D1" (all + digits) or "D2" (only 2 and 5). `tick0` is ignored for "D1" and + "D2". If the axis `type` is "date", then you must convert the + time to milliseconds. For example, to set the interval between + ticks to one day, set `dtick` to 86400000.0. "date" also has + special values "M" gives ticks spaced by a number of months. + `n` must be a positive integer. To set ticks on the 15th of + every third month, set `tick0` to "2000-01-15" and `dtick` to + "M3". To set ticks every 4 years, set `dtick` to "M48" + + The 'dtick' property accepts values of any type + + Returns + ------- + Any + """ + return self["dtick"] + + @dtick.setter + def dtick(self, val): + self["dtick"] = val + + @property + def exponentformat(self): + """ + Determines a formatting rule for the tick exponents. For + example, consider the number 1,000,000,000. If "none", it + appears as 1,000,000,000. If "e", 1e+9. If "E", 1E+9. If + "power", 1x10^9 (with 9 in a super script). If "SI", 1G. If + "B", 1B. "SI" uses prefixes from "femto" f (10^-15) to "tera" T + (10^12). *SI extended* covers instead the full SI range from + "quecto" q (10^-30) to "quetta" Q (10^30). If "SI" or *SI + extended* is used and the exponent is beyond the above ranges, + the formatting rule will automatically be switched to the power + notation. + + The 'exponentformat' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['none', 'e', 'E', 'power', 'SI', 'B', 'SI extended'] + + Returns + ------- + Any + """ + return self["exponentformat"] + + @exponentformat.setter + def exponentformat(self, val): + self["exponentformat"] = val + + @property + def labelalias(self): + """ + Replacement text for specific tick or hover labels. For example + using {US: 'USA', CA: 'Canada'} changes US to USA and CA to + Canada. The labels we would have shown must match the keys + exactly, after adding any tickprefix or ticksuffix. For + negative numbers the minus sign symbol used (U+2212) is wider + than the regular ascii dash. That means you need to use −1 + instead of -1. labelalias can be used with any axis type, and + both keys (if needed) and values (if desired) can include html- + like tags or MathJax. + + The 'labelalias' property accepts values of any type + + Returns + ------- + Any + """ + return self["labelalias"] + + @labelalias.setter + def labelalias(self, val): + self["labelalias"] = val + + @property + def len(self): + """ + Sets the length of the color bar This measure excludes the + padding of both ends. That is, the color bar length is this + length minus the padding on both ends. + + The 'len' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["len"] + + @len.setter + def len(self, val): + self["len"] = val + + @property + def lenmode(self): + """ + Determines whether this color bar's length (i.e. the measure in + the color variation direction) is set in units of plot + "fraction" or in *pixels. Use `len` to set the value. + + The 'lenmode' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['fraction', 'pixels'] + + Returns + ------- + Any + """ + return self["lenmode"] + + @lenmode.setter + def lenmode(self, val): + self["lenmode"] = val + + @property + def minexponent(self): + """ + Hide SI prefix for 10^n if |n| is below this number. This only + has an effect when `tickformat` is "SI" or "B". + + The 'minexponent' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["minexponent"] + + @minexponent.setter + def minexponent(self, val): + self["minexponent"] = val + + @property + def nticks(self): + """ + Specifies the maximum number of ticks for the particular axis. + The actual number of ticks will be chosen automatically to be + less than or equal to `nticks`. Has an effect only if + `tickmode` is set to "auto". + + The 'nticks' property is a integer and may be specified as: + - An int (or float that will be cast to an int) + in the interval [0, 9223372036854775807] + + Returns + ------- + int + """ + return self["nticks"] + + @nticks.setter + def nticks(self, val): + self["nticks"] = val + + @property + def orientation(self): + """ + Sets the orientation of the colorbar. + + The 'orientation' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['h', 'v'] + + Returns + ------- + Any + """ + return self["orientation"] + + @orientation.setter + def orientation(self, val): + self["orientation"] = val + + @property + def outlinecolor(self): + """ + Sets the axis line color. + + The 'outlinecolor' property is a color and may be specified as: + - A hex string (e.g. '#ff0000') + - An rgb/rgba string (e.g. 'rgb(255,0,0)') + - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') + - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') + - A named CSS color: see https://plotly.com/python/css-colors/ for a list + + Returns + ------- + str + """ + return self["outlinecolor"] + + @outlinecolor.setter + def outlinecolor(self, val): + self["outlinecolor"] = val + + @property + def outlinewidth(self): + """ + Sets the width (in px) of the axis line. + + The 'outlinewidth' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["outlinewidth"] + + @outlinewidth.setter + def outlinewidth(self, val): + self["outlinewidth"] = val + + @property + def separatethousands(self): + """ + If "true", even 4-digit integers are separated + + The 'separatethousands' property is a boolean and must be specified as: + - A boolean value: True or False + + Returns + ------- + bool + """ + return self["separatethousands"] + + @separatethousands.setter + def separatethousands(self, val): + self["separatethousands"] = val + + @property + def showexponent(self): + """ + If "all", all exponents are shown besides their significands. + If "first", only the exponent of the first tick is shown. If + "last", only the exponent of the last tick is shown. If "none", + no exponents appear. + + The 'showexponent' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['all', 'first', 'last', 'none'] + + Returns + ------- + Any + """ + return self["showexponent"] + + @showexponent.setter + def showexponent(self, val): + self["showexponent"] = val + + @property + def showticklabels(self): + """ + Determines whether or not the tick labels are drawn. + + The 'showticklabels' property is a boolean and must be specified as: + - A boolean value: True or False + + Returns + ------- + bool + """ + return self["showticklabels"] + + @showticklabels.setter + def showticklabels(self, val): + self["showticklabels"] = val + + @property + def showtickprefix(self): + """ + If "all", all tick labels are displayed with a prefix. If + "first", only the first tick is displayed with a prefix. If + "last", only the last tick is displayed with a suffix. If + "none", tick prefixes are hidden. + + The 'showtickprefix' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['all', 'first', 'last', 'none'] + + Returns + ------- + Any + """ + return self["showtickprefix"] + + @showtickprefix.setter + def showtickprefix(self, val): + self["showtickprefix"] = val + + @property + def showticksuffix(self): + """ + Same as `showtickprefix` but for tick suffixes. + + The 'showticksuffix' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['all', 'first', 'last', 'none'] + + Returns + ------- + Any + """ + return self["showticksuffix"] + + @showticksuffix.setter + def showticksuffix(self, val): + self["showticksuffix"] = val + + @property + def thickness(self): + """ + Sets the thickness of the color bar This measure excludes the + size of the padding, ticks and labels. + + The 'thickness' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["thickness"] + + @thickness.setter + def thickness(self, val): + self["thickness"] = val + + @property + def thicknessmode(self): + """ + Determines whether this color bar's thickness (i.e. the measure + in the constant color direction) is set in units of plot + "fraction" or in "pixels". Use `thickness` to set the value. + + The 'thicknessmode' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['fraction', 'pixels'] + + Returns + ------- + Any + """ + return self["thicknessmode"] + + @thicknessmode.setter + def thicknessmode(self, val): + self["thicknessmode"] = val + + @property + def tick0(self): + """ + Sets the placement of the first tick on this axis. Use with + `dtick`. If the axis `type` is "log", then you must take the + log of your starting tick (e.g. to set the starting tick to + 100, set the `tick0` to 2) except when `dtick`=*L* (see + `dtick` for more info). If the axis `type` is "date", it should + be a date string, like date data. If the axis `type` is + "category", it should be a number, using the scale where each + category is assigned a serial number from zero in the order it + appears. + + The 'tick0' property accepts values of any type + + Returns + ------- + Any + """ + return self["tick0"] + + @tick0.setter + def tick0(self, val): + self["tick0"] = val + + @property + def tickangle(self): + """ + Sets the angle of the tick labels with respect to the + horizontal. For example, a `tickangle` of -90 draws the tick + labels vertically. + + The 'tickangle' property is a angle (in degrees) that may be + specified as a number between -180 and 180. + Numeric values outside this range are converted to the equivalent value + (e.g. 270 is converted to -90). + + Returns + ------- + int|float + """ + return self["tickangle"] + + @tickangle.setter + def tickangle(self, val): + self["tickangle"] = val + + @property + def tickcolor(self): + """ + Sets the tick color. + + The 'tickcolor' property is a color and may be specified as: + - A hex string (e.g. '#ff0000') + - An rgb/rgba string (e.g. 'rgb(255,0,0)') + - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') + - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') + - A named CSS color: see https://plotly.com/python/css-colors/ for a list + + Returns + ------- + str + """ + return self["tickcolor"] + + @tickcolor.setter + def tickcolor(self, val): + self["tickcolor"] = val + + @property + def tickfont(self): + """ + Sets the color bar's tick label font + + The 'tickfont' property is an instance of Tickfont + that may be specified as: + - An instance of :class:`plotly.graph_objs.choroplethmap.colorbar.Tickfont` + - A dict of string/value properties that will be passed + to the Tickfont constructor + + Returns + ------- + plotly.graph_objs.choroplethmap.colorbar.Tickfont + """ + return self["tickfont"] + + @tickfont.setter + def tickfont(self, val): + self["tickfont"] = val + + @property + def tickformat(self): + """ + Sets the tick label formatting rule using d3 formatting mini- + languages which are very similar to those in Python. For + numbers, see: + https://github.com/d3/d3-format/tree/v1.4.5#d3-format. And for + dates see: https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format. We add two items to d3's date + formatter: "%h" for half of the year as a decimal number as + well as "%{n}f" for fractional seconds with n digits. For + example, *2016-10-13 09:15:23.456* with tickformat + "%H~%M~%S.%2f" would display "09~15~23.46" + + The 'tickformat' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["tickformat"] + + @tickformat.setter + def tickformat(self, val): + self["tickformat"] = val + + @property + def tickformatstops(self): + """ + The 'tickformatstops' property is a tuple of instances of + Tickformatstop that may be specified as: + - A list or tuple of instances of plotly.graph_objs.choroplethmap.colorbar.Tickformatstop + - A list or tuple of dicts of string/value properties that + will be passed to the Tickformatstop constructor + + Returns + ------- + tuple[plotly.graph_objs.choroplethmap.colorbar.Tickformatstop] + """ + return self["tickformatstops"] + + @tickformatstops.setter + def tickformatstops(self, val): + self["tickformatstops"] = val + + @property + def tickformatstopdefaults(self): + """ + When used in a template (as layout.template.data.choroplethmap. + colorbar.tickformatstopdefaults), sets the default property + values to use for elements of + choroplethmap.colorbar.tickformatstops + + The 'tickformatstopdefaults' property is an instance of Tickformatstop + that may be specified as: + - An instance of :class:`plotly.graph_objs.choroplethmap.colorbar.Tickformatstop` + - A dict of string/value properties that will be passed + to the Tickformatstop constructor + + Returns + ------- + plotly.graph_objs.choroplethmap.colorbar.Tickformatstop + """ + return self["tickformatstopdefaults"] + + @tickformatstopdefaults.setter + def tickformatstopdefaults(self, val): + self["tickformatstopdefaults"] = val + + @property + def ticklabeloverflow(self): + """ + Determines how we handle tick labels that would overflow either + the graph div or the domain of the axis. The default value for + inside tick labels is *hide past domain*. In other cases the + default is *hide past div*. + + The 'ticklabeloverflow' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['allow', 'hide past div', 'hide past domain'] + + Returns + ------- + Any + """ + return self["ticklabeloverflow"] + + @ticklabeloverflow.setter + def ticklabeloverflow(self, val): + self["ticklabeloverflow"] = val + + @property + def ticklabelposition(self): + """ + Determines where tick labels are drawn relative to the ticks. + Left and right options are used when `orientation` is "h", top + and bottom when `orientation` is "v". + + The 'ticklabelposition' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['outside', 'inside', 'outside top', 'inside top', + 'outside left', 'inside left', 'outside right', 'inside + right', 'outside bottom', 'inside bottom'] + + Returns + ------- + Any + """ + return self["ticklabelposition"] + + @ticklabelposition.setter + def ticklabelposition(self, val): + self["ticklabelposition"] = val + + @property + def ticklabelstep(self): + """ + Sets the spacing between tick labels as compared to the spacing + between ticks. A value of 1 (default) means each tick gets a + label. A value of 2 means shows every 2nd label. A larger value + n means only every nth tick is labeled. `tick0` determines + which labels are shown. Not implemented for axes with `type` + "log" or "multicategory", or when `tickmode` is "array". + + The 'ticklabelstep' property is a integer and may be specified as: + - An int (or float that will be cast to an int) + in the interval [1, 9223372036854775807] + + Returns + ------- + int + """ + return self["ticklabelstep"] + + @ticklabelstep.setter + def ticklabelstep(self, val): + self["ticklabelstep"] = val + + @property + def ticklen(self): + """ + Sets the tick length (in px). + + The 'ticklen' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["ticklen"] + + @ticklen.setter + def ticklen(self, val): + self["ticklen"] = val + + @property + def tickmode(self): + """ + Sets the tick mode for this axis. If "auto", the number of + ticks is set via `nticks`. If "linear", the placement of the + ticks is determined by a starting position `tick0` and a tick + step `dtick` ("linear" is the default value if `tick0` and + `dtick` are provided). If "array", the placement of the ticks + is set via `tickvals` and the tick text is `ticktext`. ("array" + is the default value if `tickvals` is provided). + + The 'tickmode' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['auto', 'linear', 'array'] + + Returns + ------- + Any + """ + return self["tickmode"] + + @tickmode.setter + def tickmode(self, val): + self["tickmode"] = val + + @property + def tickprefix(self): + """ + Sets a tick label prefix. + + The 'tickprefix' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["tickprefix"] + + @tickprefix.setter + def tickprefix(self, val): + self["tickprefix"] = val + + @property + def ticks(self): + """ + Determines whether ticks are drawn or not. If "", this axis' + ticks are not drawn. If "outside" ("inside"), this axis' are + drawn outside (inside) the axis lines. + + The 'ticks' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['outside', 'inside', ''] + + Returns + ------- + Any + """ + return self["ticks"] + + @ticks.setter + def ticks(self, val): + self["ticks"] = val + + @property + def ticksuffix(self): + """ + Sets a tick label suffix. + + The 'ticksuffix' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["ticksuffix"] + + @ticksuffix.setter + def ticksuffix(self, val): + self["ticksuffix"] = val + + @property + def ticktext(self): + """ + Sets the text displayed at the ticks position via `tickvals`. + Only has an effect if `tickmode` is set to "array". Used with + `tickvals`. + + The 'ticktext' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["ticktext"] + + @ticktext.setter + def ticktext(self, val): + self["ticktext"] = val + + @property + def ticktextsrc(self): + """ + Sets the source reference on Chart Studio Cloud for `ticktext`. + + The 'ticktextsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["ticktextsrc"] + + @ticktextsrc.setter + def ticktextsrc(self, val): + self["ticktextsrc"] = val + + @property + def tickvals(self): + """ + Sets the values at which ticks on this axis appear. Only has an + effect if `tickmode` is set to "array". Used with `ticktext`. + + The 'tickvals' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["tickvals"] + + @tickvals.setter + def tickvals(self, val): + self["tickvals"] = val + + @property + def tickvalssrc(self): + """ + Sets the source reference on Chart Studio Cloud for `tickvals`. + + The 'tickvalssrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["tickvalssrc"] + + @tickvalssrc.setter + def tickvalssrc(self, val): + self["tickvalssrc"] = val + + @property + def tickwidth(self): + """ + Sets the tick width (in px). + + The 'tickwidth' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["tickwidth"] + + @tickwidth.setter + def tickwidth(self, val): + self["tickwidth"] = val + + @property + def title(self): + """ + The 'title' property is an instance of Title + that may be specified as: + - An instance of :class:`plotly.graph_objs.choroplethmap.colorbar.Title` + - A dict of string/value properties that will be passed + to the Title constructor + + Returns + ------- + plotly.graph_objs.choroplethmap.colorbar.Title + """ + return self["title"] + + @title.setter + def title(self, val): + self["title"] = val + + @property + def x(self): + """ + Sets the x position with respect to `xref` of the color bar (in + plot fraction). When `xref` is "paper", defaults to 1.02 when + `orientation` is "v" and 0.5 when `orientation` is "h". When + `xref` is "container", defaults to 1 when `orientation` is "v" + and 0.5 when `orientation` is "h". Must be between 0 and 1 if + `xref` is "container" and between "-2" and 3 if `xref` is + "paper". + + The 'x' property is a number and may be specified as: + - An int or float + + Returns + ------- + int|float + """ + return self["x"] + + @x.setter + def x(self, val): + self["x"] = val + + @property + def xanchor(self): + """ + Sets this color bar's horizontal position anchor. This anchor + binds the `x` position to the "left", "center" or "right" of + the color bar. Defaults to "left" when `orientation` is "v" and + "center" when `orientation` is "h". + + The 'xanchor' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['left', 'center', 'right'] + + Returns + ------- + Any + """ + return self["xanchor"] + + @xanchor.setter + def xanchor(self, val): + self["xanchor"] = val + + @property + def xpad(self): + """ + Sets the amount of padding (in px) along the x direction. + + The 'xpad' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["xpad"] + + @xpad.setter + def xpad(self, val): + self["xpad"] = val + + @property + def xref(self): + """ + Sets the container `x` refers to. "container" spans the entire + `width` of the plot. "paper" refers to the width of the + plotting area only. + + The 'xref' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['container', 'paper'] + + Returns + ------- + Any + """ + return self["xref"] + + @xref.setter + def xref(self, val): + self["xref"] = val + + @property + def y(self): + """ + Sets the y position with respect to `yref` of the color bar (in + plot fraction). When `yref` is "paper", defaults to 0.5 when + `orientation` is "v" and 1.02 when `orientation` is "h". When + `yref` is "container", defaults to 0.5 when `orientation` is + "v" and 1 when `orientation` is "h". Must be between 0 and 1 if + `yref` is "container" and between "-2" and 3 if `yref` is + "paper". + + The 'y' property is a number and may be specified as: + - An int or float + + Returns + ------- + int|float + """ + return self["y"] + + @y.setter + def y(self, val): + self["y"] = val + + @property + def yanchor(self): + """ + Sets this color bar's vertical position anchor This anchor + binds the `y` position to the "top", "middle" or "bottom" of + the color bar. Defaults to "middle" when `orientation` is "v" + and "bottom" when `orientation` is "h". + + The 'yanchor' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['top', 'middle', 'bottom'] + + Returns + ------- + Any + """ + return self["yanchor"] + + @yanchor.setter + def yanchor(self, val): + self["yanchor"] = val + + @property + def ypad(self): + """ + Sets the amount of padding (in px) along the y direction. + + The 'ypad' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["ypad"] + + @ypad.setter + def ypad(self, val): + self["ypad"] = val + + @property + def yref(self): + """ + Sets the container `y` refers to. "container" spans the entire + `height` of the plot. "paper" refers to the height of the + plotting area only. + + The 'yref' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['container', 'paper'] + + Returns + ------- + Any + """ + return self["yref"] + + @yref.setter + def yref(self, val): + self["yref"] = val + + @property + def _prop_descriptions(self): + return """\ + bgcolor + Sets the color of padded area. + bordercolor + Sets the axis line color. + borderwidth + Sets the width (in px) or the border enclosing this + color bar. + dtick + Sets the step in-between ticks on this axis. Use with + `tick0`. Must be a positive number, or special strings + available to "log" and "date" axes. If the axis `type` + is "log", then ticks are set every 10^(n*dtick) where n + is the tick number. For example, to set a tick mark at + 1, 10, 100, 1000, ... set dtick to 1. To set tick marks + at 1, 100, 10000, ... set dtick to 2. To set tick marks + at 1, 5, 25, 125, 625, 3125, ... set dtick to + log_10(5), or 0.69897000433. "log" has several special + values; "L", where `f` is a positive number, gives + ticks linearly spaced in value (but not position). For + example `tick0` = 0.1, `dtick` = "L0.5" will put ticks + at 0.1, 0.6, 1.1, 1.6 etc. To show powers of 10 plus + small digits between, use "D1" (all digits) or "D2" + (only 2 and 5). `tick0` is ignored for "D1" and "D2". + If the axis `type` is "date", then you must convert the + time to milliseconds. For example, to set the interval + between ticks to one day, set `dtick` to 86400000.0. + "date" also has special values "M" gives ticks + spaced by a number of months. `n` must be a positive + integer. To set ticks on the 15th of every third month, + set `tick0` to "2000-01-15" and `dtick` to "M3". To set + ticks every 4 years, set `dtick` to "M48" + exponentformat + Determines a formatting rule for the tick exponents. + For example, consider the number 1,000,000,000. If + "none", it appears as 1,000,000,000. If "e", 1e+9. If + "E", 1E+9. If "power", 1x10^9 (with 9 in a super + script). If "SI", 1G. If "B", 1B. "SI" uses prefixes + from "femto" f (10^-15) to "tera" T (10^12). *SI + extended* covers instead the full SI range from + "quecto" q (10^-30) to "quetta" Q (10^30). If "SI" or + *SI extended* is used and the exponent is beyond the + above ranges, the formatting rule will automatically be + switched to the power notation. + labelalias + Replacement text for specific tick or hover labels. For + example using {US: 'USA', CA: 'Canada'} changes US to + USA and CA to Canada. The labels we would have shown + must match the keys exactly, after adding any + tickprefix or ticksuffix. For negative numbers the + minus sign symbol used (U+2212) is wider than the + regular ascii dash. That means you need to use −1 + instead of -1. labelalias can be used with any axis + type, and both keys (if needed) and values (if desired) + can include html-like tags or MathJax. + len + Sets the length of the color bar This measure excludes + the padding of both ends. That is, the color bar length + is this length minus the padding on both ends. + lenmode + Determines whether this color bar's length (i.e. the + measure in the color variation direction) is set in + units of plot "fraction" or in *pixels. Use `len` to + set the value. + minexponent + Hide SI prefix for 10^n if |n| is below this number. + This only has an effect when `tickformat` is "SI" or + "B". + nticks + Specifies the maximum number of ticks for the + particular axis. The actual number of ticks will be + chosen automatically to be less than or equal to + `nticks`. Has an effect only if `tickmode` is set to + "auto". + orientation + Sets the orientation of the colorbar. + outlinecolor + Sets the axis line color. + outlinewidth + Sets the width (in px) of the axis line. + separatethousands + If "true", even 4-digit integers are separated + showexponent + If "all", all exponents are shown besides their + significands. If "first", only the exponent of the + first tick is shown. If "last", only the exponent of + the last tick is shown. If "none", no exponents appear. + showticklabels + Determines whether or not the tick labels are drawn. + showtickprefix + If "all", all tick labels are displayed with a prefix. + If "first", only the first tick is displayed with a + prefix. If "last", only the last tick is displayed with + a suffix. If "none", tick prefixes are hidden. + showticksuffix + Same as `showtickprefix` but for tick suffixes. + thickness + Sets the thickness of the color bar This measure + excludes the size of the padding, ticks and labels. + thicknessmode + Determines whether this color bar's thickness (i.e. the + measure in the constant color direction) is set in + units of plot "fraction" or in "pixels". Use + `thickness` to set the value. + tick0 + Sets the placement of the first tick on this axis. Use + with `dtick`. If the axis `type` is "log", then you + must take the log of your starting tick (e.g. to set + the starting tick to 100, set the `tick0` to 2) except + when `dtick`=*L* (see `dtick` for more info). If the + axis `type` is "date", it should be a date string, like + date data. If the axis `type` is "category", it should + be a number, using the scale where each category is + assigned a serial number from zero in the order it + appears. + tickangle + Sets the angle of the tick labels with respect to the + horizontal. For example, a `tickangle` of -90 draws the + tick labels vertically. + tickcolor + Sets the tick color. + tickfont + Sets the color bar's tick label font + tickformat + Sets the tick label formatting rule using d3 formatting + mini-languages which are very similar to those in + Python. For numbers, see: + https://github.com/d3/d3-format/tree/v1.4.5#d3-format. + And for dates see: https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format. We add two items to + d3's date formatter: "%h" for half of the year as a + decimal number as well as "%{n}f" for fractional + seconds with n digits. For example, *2016-10-13 + 09:15:23.456* with tickformat "%H~%M~%S.%2f" would + display "09~15~23.46" + tickformatstops + A tuple of :class:`plotly.graph_objects.choroplethmap.c + olorbar.Tickformatstop` instances or dicts with + compatible properties + tickformatstopdefaults + When used in a template (as layout.template.data.chorop + lethmap.colorbar.tickformatstopdefaults), sets the + default property values to use for elements of + choroplethmap.colorbar.tickformatstops + ticklabeloverflow + Determines how we handle tick labels that would + overflow either the graph div or the domain of the + axis. The default value for inside tick labels is *hide + past domain*. In other cases the default is *hide past + div*. + ticklabelposition + Determines where tick labels are drawn relative to the + ticks. Left and right options are used when + `orientation` is "h", top and bottom when `orientation` + is "v". + ticklabelstep + Sets the spacing between tick labels as compared to the + spacing between ticks. A value of 1 (default) means + each tick gets a label. A value of 2 means shows every + 2nd label. A larger value n means only every nth tick + is labeled. `tick0` determines which labels are shown. + Not implemented for axes with `type` "log" or + "multicategory", or when `tickmode` is "array". + ticklen + Sets the tick length (in px). + tickmode + Sets the tick mode for this axis. If "auto", the number + of ticks is set via `nticks`. If "linear", the + placement of the ticks is determined by a starting + position `tick0` and a tick step `dtick` ("linear" is + the default value if `tick0` and `dtick` are provided). + If "array", the placement of the ticks is set via + `tickvals` and the tick text is `ticktext`. ("array" is + the default value if `tickvals` is provided). + tickprefix + Sets a tick label prefix. + ticks + Determines whether ticks are drawn or not. If "", this + axis' ticks are not drawn. If "outside" ("inside"), + this axis' are drawn outside (inside) the axis lines. + ticksuffix + Sets a tick label suffix. + ticktext + Sets the text displayed at the ticks position via + `tickvals`. Only has an effect if `tickmode` is set to + "array". Used with `tickvals`. + ticktextsrc + Sets the source reference on Chart Studio Cloud for + `ticktext`. + tickvals + Sets the values at which ticks on this axis appear. + Only has an effect if `tickmode` is set to "array". + Used with `ticktext`. + tickvalssrc + Sets the source reference on Chart Studio Cloud for + `tickvals`. + tickwidth + Sets the tick width (in px). + title + :class:`plotly.graph_objects.choroplethmap.colorbar.Tit + le` instance or dict with compatible properties + x + Sets the x position with respect to `xref` of the color + bar (in plot fraction). When `xref` is "paper", + defaults to 1.02 when `orientation` is "v" and 0.5 when + `orientation` is "h". When `xref` is "container", + defaults to 1 when `orientation` is "v" and 0.5 when + `orientation` is "h". Must be between 0 and 1 if `xref` + is "container" and between "-2" and 3 if `xref` is + "paper". + xanchor + Sets this color bar's horizontal position anchor. This + anchor binds the `x` position to the "left", "center" + or "right" of the color bar. Defaults to "left" when + `orientation` is "v" and "center" when `orientation` is + "h". + xpad + Sets the amount of padding (in px) along the x + direction. + xref + Sets the container `x` refers to. "container" spans the + entire `width` of the plot. "paper" refers to the width + of the plotting area only. + y + Sets the y position with respect to `yref` of the color + bar (in plot fraction). When `yref` is "paper", + defaults to 0.5 when `orientation` is "v" and 1.02 when + `orientation` is "h". When `yref` is "container", + defaults to 0.5 when `orientation` is "v" and 1 when + `orientation` is "h". Must be between 0 and 1 if `yref` + is "container" and between "-2" and 3 if `yref` is + "paper". + yanchor + Sets this color bar's vertical position anchor This + anchor binds the `y` position to the "top", "middle" or + "bottom" of the color bar. Defaults to "middle" when + `orientation` is "v" and "bottom" when `orientation` is + "h". + ypad + Sets the amount of padding (in px) along the y + direction. + yref + Sets the container `y` refers to. "container" spans the + entire `height` of the plot. "paper" refers to the + height of the plotting area only. + """ + + def __init__( + self, + arg=None, + bgcolor=None, + bordercolor=None, + borderwidth=None, + dtick=None, + exponentformat=None, + labelalias=None, + len=None, + lenmode=None, + minexponent=None, + nticks=None, + orientation=None, + outlinecolor=None, + outlinewidth=None, + separatethousands=None, + showexponent=None, + showticklabels=None, + showtickprefix=None, + showticksuffix=None, + thickness=None, + thicknessmode=None, + tick0=None, + tickangle=None, + tickcolor=None, + tickfont=None, + tickformat=None, + tickformatstops=None, + tickformatstopdefaults=None, + ticklabeloverflow=None, + ticklabelposition=None, + ticklabelstep=None, + ticklen=None, + tickmode=None, + tickprefix=None, + ticks=None, + ticksuffix=None, + ticktext=None, + ticktextsrc=None, + tickvals=None, + tickvalssrc=None, + tickwidth=None, + title=None, + x=None, + xanchor=None, + xpad=None, + xref=None, + y=None, + yanchor=None, + ypad=None, + yref=None, + **kwargs, + ): + """ + Construct a new ColorBar object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.choroplethmap.ColorBar` + bgcolor + Sets the color of padded area. + bordercolor + Sets the axis line color. + borderwidth + Sets the width (in px) or the border enclosing this + color bar. + dtick + Sets the step in-between ticks on this axis. Use with + `tick0`. Must be a positive number, or special strings + available to "log" and "date" axes. If the axis `type` + is "log", then ticks are set every 10^(n*dtick) where n + is the tick number. For example, to set a tick mark at + 1, 10, 100, 1000, ... set dtick to 1. To set tick marks + at 1, 100, 10000, ... set dtick to 2. To set tick marks + at 1, 5, 25, 125, 625, 3125, ... set dtick to + log_10(5), or 0.69897000433. "log" has several special + values; "L", where `f` is a positive number, gives + ticks linearly spaced in value (but not position). For + example `tick0` = 0.1, `dtick` = "L0.5" will put ticks + at 0.1, 0.6, 1.1, 1.6 etc. To show powers of 10 plus + small digits between, use "D1" (all digits) or "D2" + (only 2 and 5). `tick0` is ignored for "D1" and "D2". + If the axis `type` is "date", then you must convert the + time to milliseconds. For example, to set the interval + between ticks to one day, set `dtick` to 86400000.0. + "date" also has special values "M" gives ticks + spaced by a number of months. `n` must be a positive + integer. To set ticks on the 15th of every third month, + set `tick0` to "2000-01-15" and `dtick` to "M3". To set + ticks every 4 years, set `dtick` to "M48" + exponentformat + Determines a formatting rule for the tick exponents. + For example, consider the number 1,000,000,000. If + "none", it appears as 1,000,000,000. If "e", 1e+9. If + "E", 1E+9. If "power", 1x10^9 (with 9 in a super + script). If "SI", 1G. If "B", 1B. "SI" uses prefixes + from "femto" f (10^-15) to "tera" T (10^12). *SI + extended* covers instead the full SI range from + "quecto" q (10^-30) to "quetta" Q (10^30). If "SI" or + *SI extended* is used and the exponent is beyond the + above ranges, the formatting rule will automatically be + switched to the power notation. + labelalias + Replacement text for specific tick or hover labels. For + example using {US: 'USA', CA: 'Canada'} changes US to + USA and CA to Canada. The labels we would have shown + must match the keys exactly, after adding any + tickprefix or ticksuffix. For negative numbers the + minus sign symbol used (U+2212) is wider than the + regular ascii dash. That means you need to use −1 + instead of -1. labelalias can be used with any axis + type, and both keys (if needed) and values (if desired) + can include html-like tags or MathJax. + len + Sets the length of the color bar This measure excludes + the padding of both ends. That is, the color bar length + is this length minus the padding on both ends. + lenmode + Determines whether this color bar's length (i.e. the + measure in the color variation direction) is set in + units of plot "fraction" or in *pixels. Use `len` to + set the value. + minexponent + Hide SI prefix for 10^n if |n| is below this number. + This only has an effect when `tickformat` is "SI" or + "B". + nticks + Specifies the maximum number of ticks for the + particular axis. The actual number of ticks will be + chosen automatically to be less than or equal to + `nticks`. Has an effect only if `tickmode` is set to + "auto". + orientation + Sets the orientation of the colorbar. + outlinecolor + Sets the axis line color. + outlinewidth + Sets the width (in px) of the axis line. + separatethousands + If "true", even 4-digit integers are separated + showexponent + If "all", all exponents are shown besides their + significands. If "first", only the exponent of the + first tick is shown. If "last", only the exponent of + the last tick is shown. If "none", no exponents appear. + showticklabels + Determines whether or not the tick labels are drawn. + showtickprefix + If "all", all tick labels are displayed with a prefix. + If "first", only the first tick is displayed with a + prefix. If "last", only the last tick is displayed with + a suffix. If "none", tick prefixes are hidden. + showticksuffix + Same as `showtickprefix` but for tick suffixes. + thickness + Sets the thickness of the color bar This measure + excludes the size of the padding, ticks and labels. + thicknessmode + Determines whether this color bar's thickness (i.e. the + measure in the constant color direction) is set in + units of plot "fraction" or in "pixels". Use + `thickness` to set the value. + tick0 + Sets the placement of the first tick on this axis. Use + with `dtick`. If the axis `type` is "log", then you + must take the log of your starting tick (e.g. to set + the starting tick to 100, set the `tick0` to 2) except + when `dtick`=*L* (see `dtick` for more info). If the + axis `type` is "date", it should be a date string, like + date data. If the axis `type` is "category", it should + be a number, using the scale where each category is + assigned a serial number from zero in the order it + appears. + tickangle + Sets the angle of the tick labels with respect to the + horizontal. For example, a `tickangle` of -90 draws the + tick labels vertically. + tickcolor + Sets the tick color. + tickfont + Sets the color bar's tick label font + tickformat + Sets the tick label formatting rule using d3 formatting + mini-languages which are very similar to those in + Python. For numbers, see: + https://github.com/d3/d3-format/tree/v1.4.5#d3-format. + And for dates see: https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format. We add two items to + d3's date formatter: "%h" for half of the year as a + decimal number as well as "%{n}f" for fractional + seconds with n digits. For example, *2016-10-13 + 09:15:23.456* with tickformat "%H~%M~%S.%2f" would + display "09~15~23.46" + tickformatstops + A tuple of :class:`plotly.graph_objects.choroplethmap.c + olorbar.Tickformatstop` instances or dicts with + compatible properties + tickformatstopdefaults + When used in a template (as layout.template.data.chorop + lethmap.colorbar.tickformatstopdefaults), sets the + default property values to use for elements of + choroplethmap.colorbar.tickformatstops + ticklabeloverflow + Determines how we handle tick labels that would + overflow either the graph div or the domain of the + axis. The default value for inside tick labels is *hide + past domain*. In other cases the default is *hide past + div*. + ticklabelposition + Determines where tick labels are drawn relative to the + ticks. Left and right options are used when + `orientation` is "h", top and bottom when `orientation` + is "v". + ticklabelstep + Sets the spacing between tick labels as compared to the + spacing between ticks. A value of 1 (default) means + each tick gets a label. A value of 2 means shows every + 2nd label. A larger value n means only every nth tick + is labeled. `tick0` determines which labels are shown. + Not implemented for axes with `type` "log" or + "multicategory", or when `tickmode` is "array". + ticklen + Sets the tick length (in px). + tickmode + Sets the tick mode for this axis. If "auto", the number + of ticks is set via `nticks`. If "linear", the + placement of the ticks is determined by a starting + position `tick0` and a tick step `dtick` ("linear" is + the default value if `tick0` and `dtick` are provided). + If "array", the placement of the ticks is set via + `tickvals` and the tick text is `ticktext`. ("array" is + the default value if `tickvals` is provided). + tickprefix + Sets a tick label prefix. + ticks + Determines whether ticks are drawn or not. If "", this + axis' ticks are not drawn. If "outside" ("inside"), + this axis' are drawn outside (inside) the axis lines. + ticksuffix + Sets a tick label suffix. + ticktext + Sets the text displayed at the ticks position via + `tickvals`. Only has an effect if `tickmode` is set to + "array". Used with `tickvals`. + ticktextsrc + Sets the source reference on Chart Studio Cloud for + `ticktext`. + tickvals + Sets the values at which ticks on this axis appear. + Only has an effect if `tickmode` is set to "array". + Used with `ticktext`. + tickvalssrc + Sets the source reference on Chart Studio Cloud for + `tickvals`. + tickwidth + Sets the tick width (in px). + title + :class:`plotly.graph_objects.choroplethmap.colorbar.Tit + le` instance or dict with compatible properties + x + Sets the x position with respect to `xref` of the color + bar (in plot fraction). When `xref` is "paper", + defaults to 1.02 when `orientation` is "v" and 0.5 when + `orientation` is "h". When `xref` is "container", + defaults to 1 when `orientation` is "v" and 0.5 when + `orientation` is "h". Must be between 0 and 1 if `xref` + is "container" and between "-2" and 3 if `xref` is + "paper". + xanchor + Sets this color bar's horizontal position anchor. This + anchor binds the `x` position to the "left", "center" + or "right" of the color bar. Defaults to "left" when + `orientation` is "v" and "center" when `orientation` is + "h". + xpad + Sets the amount of padding (in px) along the x + direction. + xref + Sets the container `x` refers to. "container" spans the + entire `width` of the plot. "paper" refers to the width + of the plotting area only. + y + Sets the y position with respect to `yref` of the color + bar (in plot fraction). When `yref` is "paper", + defaults to 0.5 when `orientation` is "v" and 1.02 when + `orientation` is "h". When `yref` is "container", + defaults to 0.5 when `orientation` is "v" and 1 when + `orientation` is "h". Must be between 0 and 1 if `yref` + is "container" and between "-2" and 3 if `yref` is + "paper". + yanchor + Sets this color bar's vertical position anchor This + anchor binds the `y` position to the "top", "middle" or + "bottom" of the color bar. Defaults to "middle" when + `orientation` is "v" and "bottom" when `orientation` is + "h". + ypad + Sets the amount of padding (in px) along the y + direction. + yref + Sets the container `y` refers to. "container" spans the + entire `height` of the plot. "paper" refers to the + height of the plotting area only. + + Returns + ------- + ColorBar + """ + super().__init__("colorbar") + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + if arg is None: + arg = {} + elif isinstance(arg, self.__class__): + arg = arg.to_plotly_json() + elif isinstance(arg, dict): + arg = _copy.copy(arg) + else: + raise ValueError("""\ +The first argument to the plotly.graph_objs.choroplethmap.ColorBar +constructor must be a dict or +an instance of :class:`plotly.graph_objs.choroplethmap.ColorBar`""") + + self._skip_invalid = kwargs.pop("skip_invalid", False) + self._validate = kwargs.pop("_validate", True) + + self._set_property("bgcolor", arg, bgcolor) + self._set_property("bordercolor", arg, bordercolor) + self._set_property("borderwidth", arg, borderwidth) + self._set_property("dtick", arg, dtick) + self._set_property("exponentformat", arg, exponentformat) + self._set_property("labelalias", arg, labelalias) + self._set_property("len", arg, len) + self._set_property("lenmode", arg, lenmode) + self._set_property("minexponent", arg, minexponent) + self._set_property("nticks", arg, nticks) + self._set_property("orientation", arg, orientation) + self._set_property("outlinecolor", arg, outlinecolor) + self._set_property("outlinewidth", arg, outlinewidth) + self._set_property("separatethousands", arg, separatethousands) + self._set_property("showexponent", arg, showexponent) + self._set_property("showticklabels", arg, showticklabels) + self._set_property("showtickprefix", arg, showtickprefix) + self._set_property("showticksuffix", arg, showticksuffix) + self._set_property("thickness", arg, thickness) + self._set_property("thicknessmode", arg, thicknessmode) + self._set_property("tick0", arg, tick0) + self._set_property("tickangle", arg, tickangle) + self._set_property("tickcolor", arg, tickcolor) + self._set_property("tickfont", arg, tickfont) + self._set_property("tickformat", arg, tickformat) + self._set_property("tickformatstops", arg, tickformatstops) + self._set_property("tickformatstopdefaults", arg, tickformatstopdefaults) + self._set_property("ticklabeloverflow", arg, ticklabeloverflow) + self._set_property("ticklabelposition", arg, ticklabelposition) + self._set_property("ticklabelstep", arg, ticklabelstep) + self._set_property("ticklen", arg, ticklen) + self._set_property("tickmode", arg, tickmode) + self._set_property("tickprefix", arg, tickprefix) + self._set_property("ticks", arg, ticks) + self._set_property("ticksuffix", arg, ticksuffix) + self._set_property("ticktext", arg, ticktext) + self._set_property("ticktextsrc", arg, ticktextsrc) + self._set_property("tickvals", arg, tickvals) + self._set_property("tickvalssrc", arg, tickvalssrc) + self._set_property("tickwidth", arg, tickwidth) + self._set_property("title", arg, title) + self._set_property("x", arg, x) + self._set_property("xanchor", arg, xanchor) + self._set_property("xpad", arg, xpad) + self._set_property("xref", arg, xref) + self._set_property("y", arg, y) + self._set_property("yanchor", arg, yanchor) + self._set_property("ypad", arg, ypad) + self._set_property("yref", arg, yref) + self._process_kwargs(**dict(arg, **kwargs)) + self._skip_invalid = False diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/choroplethmap/_hoverlabel.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/choroplethmap/_hoverlabel.py new file mode 100644 index 0000000000000000000000000000000000000000..c1d92e416950e12f9f99ed287edf90e367c5752d --- /dev/null +++ b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/choroplethmap/_hoverlabel.py @@ -0,0 +1,366 @@ +# --- THIS FILE IS AUTO-GENERATED --- +# Modifications will be overwitten the next time code generation run. + +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Hoverlabel(_BaseTraceHierarchyType): + _parent_path_str = "choroplethmap" + _path_str = "choroplethmap.hoverlabel" + _valid_props = { + "align", + "alignsrc", + "bgcolor", + "bgcolorsrc", + "bordercolor", + "bordercolorsrc", + "font", + "namelength", + "namelengthsrc", + "showarrow", + } + + @property + def align(self): + """ + Sets the horizontal alignment of the text content within hover + label box. Has an effect only if the hover label text spans + more two or more lines + + The 'align' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['left', 'right', 'auto'] + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + Any|numpy.ndarray + """ + return self["align"] + + @align.setter + def align(self, val): + self["align"] = val + + @property + def alignsrc(self): + """ + Sets the source reference on Chart Studio Cloud for `align`. + + The 'alignsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["alignsrc"] + + @alignsrc.setter + def alignsrc(self, val): + self["alignsrc"] = val + + @property + def bgcolor(self): + """ + Sets the background color of the hover labels for this trace + + The 'bgcolor' property is a color and may be specified as: + - A hex string (e.g. '#ff0000') + - An rgb/rgba string (e.g. 'rgb(255,0,0)') + - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') + - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') + - A named CSS color: see https://plotly.com/python/css-colors/ for a list + - A list or array of any of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["bgcolor"] + + @bgcolor.setter + def bgcolor(self, val): + self["bgcolor"] = val + + @property + def bgcolorsrc(self): + """ + Sets the source reference on Chart Studio Cloud for `bgcolor`. + + The 'bgcolorsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["bgcolorsrc"] + + @bgcolorsrc.setter + def bgcolorsrc(self, val): + self["bgcolorsrc"] = val + + @property + def bordercolor(self): + """ + Sets the border color of the hover labels for this trace. + + The 'bordercolor' property is a color and may be specified as: + - A hex string (e.g. '#ff0000') + - An rgb/rgba string (e.g. 'rgb(255,0,0)') + - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') + - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') + - A named CSS color: see https://plotly.com/python/css-colors/ for a list + - A list or array of any of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["bordercolor"] + + @bordercolor.setter + def bordercolor(self, val): + self["bordercolor"] = val + + @property + def bordercolorsrc(self): + """ + Sets the source reference on Chart Studio Cloud for + `bordercolor`. + + The 'bordercolorsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["bordercolorsrc"] + + @bordercolorsrc.setter + def bordercolorsrc(self, val): + self["bordercolorsrc"] = val + + @property + def font(self): + """ + Sets the font used in hover labels. + + The 'font' property is an instance of Font + that may be specified as: + - An instance of :class:`plotly.graph_objs.choroplethmap.hoverlabel.Font` + - A dict of string/value properties that will be passed + to the Font constructor + + Returns + ------- + plotly.graph_objs.choroplethmap.hoverlabel.Font + """ + return self["font"] + + @font.setter + def font(self, val): + self["font"] = val + + @property + def namelength(self): + """ + Sets the default length (in number of characters) of the trace + name in the hover labels for all traces. -1 shows the whole + name regardless of length. 0-3 shows the first 0-3 characters, + and an integer >3 will show the whole name if it is less than + that many characters, but if it is longer, will truncate to + `namelength - 3` characters and add an ellipsis. + + The 'namelength' property is a integer and may be specified as: + - An int (or float that will be cast to an int) + in the interval [-1, 9223372036854775807] + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + int|numpy.ndarray + """ + return self["namelength"] + + @namelength.setter + def namelength(self, val): + self["namelength"] = val + + @property + def namelengthsrc(self): + """ + Sets the source reference on Chart Studio Cloud for + `namelength`. + + The 'namelengthsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["namelengthsrc"] + + @namelengthsrc.setter + def namelengthsrc(self, val): + self["namelengthsrc"] = val + + @property + def showarrow(self): + """ + Sets whether or not to show the hover label arrow/triangle + pointing to the data point. + + The 'showarrow' property is a boolean and must be specified as: + - A boolean value: True or False + + Returns + ------- + bool + """ + return self["showarrow"] + + @showarrow.setter + def showarrow(self, val): + self["showarrow"] = val + + @property + def _prop_descriptions(self): + return """\ + align + Sets the horizontal alignment of the text content + within hover label box. Has an effect only if the hover + label text spans more two or more lines + alignsrc + Sets the source reference on Chart Studio Cloud for + `align`. + bgcolor + Sets the background color of the hover labels for this + trace + bgcolorsrc + Sets the source reference on Chart Studio Cloud for + `bgcolor`. + bordercolor + Sets the border color of the hover labels for this + trace. + bordercolorsrc + Sets the source reference on Chart Studio Cloud for + `bordercolor`. + font + Sets the font used in hover labels. + namelength + Sets the default length (in number of characters) of + the trace name in the hover labels for all traces. -1 + shows the whole name regardless of length. 0-3 shows + the first 0-3 characters, and an integer >3 will show + the whole name if it is less than that many characters, + but if it is longer, will truncate to `namelength - 3` + characters and add an ellipsis. + namelengthsrc + Sets the source reference on Chart Studio Cloud for + `namelength`. + showarrow + Sets whether or not to show the hover label + arrow/triangle pointing to the data point. + """ + + def __init__( + self, + arg=None, + align=None, + alignsrc=None, + bgcolor=None, + bgcolorsrc=None, + bordercolor=None, + bordercolorsrc=None, + font=None, + namelength=None, + namelengthsrc=None, + showarrow=None, + **kwargs, + ): + """ + Construct a new Hoverlabel object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.choroplethmap.Hoverlabel` + align + Sets the horizontal alignment of the text content + within hover label box. Has an effect only if the hover + label text spans more two or more lines + alignsrc + Sets the source reference on Chart Studio Cloud for + `align`. + bgcolor + Sets the background color of the hover labels for this + trace + bgcolorsrc + Sets the source reference on Chart Studio Cloud for + `bgcolor`. + bordercolor + Sets the border color of the hover labels for this + trace. + bordercolorsrc + Sets the source reference on Chart Studio Cloud for + `bordercolor`. + font + Sets the font used in hover labels. + namelength + Sets the default length (in number of characters) of + the trace name in the hover labels for all traces. -1 + shows the whole name regardless of length. 0-3 shows + the first 0-3 characters, and an integer >3 will show + the whole name if it is less than that many characters, + but if it is longer, will truncate to `namelength - 3` + characters and add an ellipsis. + namelengthsrc + Sets the source reference on Chart Studio Cloud for + `namelength`. + showarrow + Sets whether or not to show the hover label + arrow/triangle pointing to the data point. + + Returns + ------- + Hoverlabel + """ + super().__init__("hoverlabel") + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + if arg is None: + arg = {} + elif isinstance(arg, self.__class__): + arg = arg.to_plotly_json() + elif isinstance(arg, dict): + arg = _copy.copy(arg) + else: + raise ValueError("""\ +The first argument to the plotly.graph_objs.choroplethmap.Hoverlabel +constructor must be a dict or +an instance of :class:`plotly.graph_objs.choroplethmap.Hoverlabel`""") + + self._skip_invalid = kwargs.pop("skip_invalid", False) + self._validate = kwargs.pop("_validate", True) + + self._set_property("align", arg, align) + self._set_property("alignsrc", arg, alignsrc) + self._set_property("bgcolor", arg, bgcolor) + self._set_property("bgcolorsrc", arg, bgcolorsrc) + self._set_property("bordercolor", arg, bordercolor) + self._set_property("bordercolorsrc", arg, bordercolorsrc) + self._set_property("font", arg, font) + self._set_property("namelength", arg, namelength) + self._set_property("namelengthsrc", arg, namelengthsrc) + self._set_property("showarrow", arg, showarrow) + self._process_kwargs(**dict(arg, **kwargs)) + self._skip_invalid = False diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/choroplethmap/_legendgrouptitle.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/choroplethmap/_legendgrouptitle.py new file mode 100644 index 0000000000000000000000000000000000000000..ddfbdfdf11c7276057c858d7360856325b386227 --- /dev/null +++ b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/choroplethmap/_legendgrouptitle.py @@ -0,0 +1,104 @@ +# --- THIS FILE IS AUTO-GENERATED --- +# Modifications will be overwitten the next time code generation run. + +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Legendgrouptitle(_BaseTraceHierarchyType): + _parent_path_str = "choroplethmap" + _path_str = "choroplethmap.legendgrouptitle" + _valid_props = {"font", "text"} + + @property + def font(self): + """ + Sets this legend group's title font. + + The 'font' property is an instance of Font + that may be specified as: + - An instance of :class:`plotly.graph_objs.choroplethmap.legendgrouptitle.Font` + - A dict of string/value properties that will be passed + to the Font constructor + + Returns + ------- + plotly.graph_objs.choroplethmap.legendgrouptitle.Font + """ + return self["font"] + + @font.setter + def font(self, val): + self["font"] = val + + @property + def text(self): + """ + Sets the title of the legend group. + + The 'text' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["text"] + + @text.setter + def text(self, val): + self["text"] = val + + @property + def _prop_descriptions(self): + return """\ + font + Sets this legend group's title font. + text + Sets the title of the legend group. + """ + + def __init__(self, arg=None, font=None, text=None, **kwargs): + """ + Construct a new Legendgrouptitle object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of :class:`plotly.graph_objs.choroplethmap. + Legendgrouptitle` + font + Sets this legend group's title font. + text + Sets the title of the legend group. + + Returns + ------- + Legendgrouptitle + """ + super().__init__("legendgrouptitle") + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + if arg is None: + arg = {} + elif isinstance(arg, self.__class__): + arg = arg.to_plotly_json() + elif isinstance(arg, dict): + arg = _copy.copy(arg) + else: + raise ValueError("""\ +The first argument to the plotly.graph_objs.choroplethmap.Legendgrouptitle +constructor must be a dict or +an instance of :class:`plotly.graph_objs.choroplethmap.Legendgrouptitle`""") + + self._skip_invalid = kwargs.pop("skip_invalid", False) + self._validate = kwargs.pop("_validate", True) + + self._set_property("font", arg, font) + self._set_property("text", arg, text) + self._process_kwargs(**dict(arg, **kwargs)) + self._skip_invalid = False diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/choroplethmap/_marker.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/choroplethmap/_marker.py new file mode 100644 index 0000000000000000000000000000000000000000..0f7f498b9288dc28961e83c33924cfe4bd110594 --- /dev/null +++ b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/choroplethmap/_marker.py @@ -0,0 +1,129 @@ +# --- THIS FILE IS AUTO-GENERATED --- +# Modifications will be overwitten the next time code generation run. + +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Marker(_BaseTraceHierarchyType): + _parent_path_str = "choroplethmap" + _path_str = "choroplethmap.marker" + _valid_props = {"line", "opacity", "opacitysrc"} + + @property + def line(self): + """ + The 'line' property is an instance of Line + that may be specified as: + - An instance of :class:`plotly.graph_objs.choroplethmap.marker.Line` + - A dict of string/value properties that will be passed + to the Line constructor + + Returns + ------- + plotly.graph_objs.choroplethmap.marker.Line + """ + return self["line"] + + @line.setter + def line(self, val): + self["line"] = val + + @property + def opacity(self): + """ + Sets the opacity of the locations. + + The 'opacity' property is a number and may be specified as: + - An int or float in the interval [0, 1] + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + int|float|numpy.ndarray + """ + return self["opacity"] + + @opacity.setter + def opacity(self, val): + self["opacity"] = val + + @property + def opacitysrc(self): + """ + Sets the source reference on Chart Studio Cloud for `opacity`. + + The 'opacitysrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["opacitysrc"] + + @opacitysrc.setter + def opacitysrc(self, val): + self["opacitysrc"] = val + + @property + def _prop_descriptions(self): + return """\ + line + :class:`plotly.graph_objects.choroplethmap.marker.Line` + instance or dict with compatible properties + opacity + Sets the opacity of the locations. + opacitysrc + Sets the source reference on Chart Studio Cloud for + `opacity`. + """ + + def __init__(self, arg=None, line=None, opacity=None, opacitysrc=None, **kwargs): + """ + Construct a new Marker object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.choroplethmap.Marker` + line + :class:`plotly.graph_objects.choroplethmap.marker.Line` + instance or dict with compatible properties + opacity + Sets the opacity of the locations. + opacitysrc + Sets the source reference on Chart Studio Cloud for + `opacity`. + + Returns + ------- + Marker + """ + super().__init__("marker") + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + if arg is None: + arg = {} + elif isinstance(arg, self.__class__): + arg = arg.to_plotly_json() + elif isinstance(arg, dict): + arg = _copy.copy(arg) + else: + raise ValueError("""\ +The first argument to the plotly.graph_objs.choroplethmap.Marker +constructor must be a dict or +an instance of :class:`plotly.graph_objs.choroplethmap.Marker`""") + + self._skip_invalid = kwargs.pop("skip_invalid", False) + self._validate = kwargs.pop("_validate", True) + + self._set_property("line", arg, line) + self._set_property("opacity", arg, opacity) + self._set_property("opacitysrc", arg, opacitysrc) + self._process_kwargs(**dict(arg, **kwargs)) + self._skip_invalid = False diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/choroplethmap/_selected.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/choroplethmap/_selected.py new file mode 100644 index 0000000000000000000000000000000000000000..e68c38fe4806b4e76a804dfb368897a9265af076 --- /dev/null +++ b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/choroplethmap/_selected.py @@ -0,0 +1,80 @@ +# --- THIS FILE IS AUTO-GENERATED --- +# Modifications will be overwitten the next time code generation run. + +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Selected(_BaseTraceHierarchyType): + _parent_path_str = "choroplethmap" + _path_str = "choroplethmap.selected" + _valid_props = {"marker"} + + @property + def marker(self): + """ + The 'marker' property is an instance of Marker + that may be specified as: + - An instance of :class:`plotly.graph_objs.choroplethmap.selected.Marker` + - A dict of string/value properties that will be passed + to the Marker constructor + + Returns + ------- + plotly.graph_objs.choroplethmap.selected.Marker + """ + return self["marker"] + + @marker.setter + def marker(self, val): + self["marker"] = val + + @property + def _prop_descriptions(self): + return """\ + marker + :class:`plotly.graph_objects.choroplethmap.selected.Mar + ker` instance or dict with compatible properties + """ + + def __init__(self, arg=None, marker=None, **kwargs): + """ + Construct a new Selected object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.choroplethmap.Selected` + marker + :class:`plotly.graph_objects.choroplethmap.selected.Mar + ker` instance or dict with compatible properties + + Returns + ------- + Selected + """ + super().__init__("selected") + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + if arg is None: + arg = {} + elif isinstance(arg, self.__class__): + arg = arg.to_plotly_json() + elif isinstance(arg, dict): + arg = _copy.copy(arg) + else: + raise ValueError("""\ +The first argument to the plotly.graph_objs.choroplethmap.Selected +constructor must be a dict or +an instance of :class:`plotly.graph_objs.choroplethmap.Selected`""") + + self._skip_invalid = kwargs.pop("skip_invalid", False) + self._validate = kwargs.pop("_validate", True) + + self._set_property("marker", arg, marker) + self._process_kwargs(**dict(arg, **kwargs)) + self._skip_invalid = False diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/choroplethmap/_stream.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/choroplethmap/_stream.py new file mode 100644 index 0000000000000000000000000000000000000000..348b27d96429133ed7168c2657e8d294d159ad19 --- /dev/null +++ b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/choroplethmap/_stream.py @@ -0,0 +1,114 @@ +# --- THIS FILE IS AUTO-GENERATED --- +# Modifications will be overwitten the next time code generation run. + +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Stream(_BaseTraceHierarchyType): + _parent_path_str = "choroplethmap" + _path_str = "choroplethmap.stream" + _valid_props = {"maxpoints", "token"} + + @property + def maxpoints(self): + """ + Sets the maximum number of points to keep on the plots from an + incoming stream. If `maxpoints` is set to 50, only the newest + 50 points will be displayed on the plot. + + The 'maxpoints' property is a number and may be specified as: + - An int or float in the interval [0, 10000] + + Returns + ------- + int|float + """ + return self["maxpoints"] + + @maxpoints.setter + def maxpoints(self, val): + self["maxpoints"] = val + + @property + def token(self): + """ + The stream id number links a data trace on a plot with a + stream. See https://chart-studio.plotly.com/settings for more + details. + + The 'token' property is a string and must be specified as: + - A non-empty string + + Returns + ------- + str + """ + return self["token"] + + @token.setter + def token(self, val): + self["token"] = val + + @property + def _prop_descriptions(self): + return """\ + maxpoints + Sets the maximum number of points to keep on the plots + from an incoming stream. If `maxpoints` is set to 50, + only the newest 50 points will be displayed on the + plot. + token + The stream id number links a data trace on a plot with + a stream. See https://chart-studio.plotly.com/settings + for more details. + """ + + def __init__(self, arg=None, maxpoints=None, token=None, **kwargs): + """ + Construct a new Stream object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.choroplethmap.Stream` + maxpoints + Sets the maximum number of points to keep on the plots + from an incoming stream. If `maxpoints` is set to 50, + only the newest 50 points will be displayed on the + plot. + token + The stream id number links a data trace on a plot with + a stream. See https://chart-studio.plotly.com/settings + for more details. + + Returns + ------- + Stream + """ + super().__init__("stream") + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + if arg is None: + arg = {} + elif isinstance(arg, self.__class__): + arg = arg.to_plotly_json() + elif isinstance(arg, dict): + arg = _copy.copy(arg) + else: + raise ValueError("""\ +The first argument to the plotly.graph_objs.choroplethmap.Stream +constructor must be a dict or +an instance of :class:`plotly.graph_objs.choroplethmap.Stream`""") + + self._skip_invalid = kwargs.pop("skip_invalid", False) + self._validate = kwargs.pop("_validate", True) + + self._set_property("maxpoints", arg, maxpoints) + self._set_property("token", arg, token) + self._process_kwargs(**dict(arg, **kwargs)) + self._skip_invalid = False diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/choroplethmap/_unselected.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/choroplethmap/_unselected.py new file mode 100644 index 0000000000000000000000000000000000000000..fcbf6a8fb82746da20103c9948ab561968dbc5f1 --- /dev/null +++ b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/choroplethmap/_unselected.py @@ -0,0 +1,80 @@ +# --- THIS FILE IS AUTO-GENERATED --- +# Modifications will be overwitten the next time code generation run. + +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Unselected(_BaseTraceHierarchyType): + _parent_path_str = "choroplethmap" + _path_str = "choroplethmap.unselected" + _valid_props = {"marker"} + + @property + def marker(self): + """ + The 'marker' property is an instance of Marker + that may be specified as: + - An instance of :class:`plotly.graph_objs.choroplethmap.unselected.Marker` + - A dict of string/value properties that will be passed + to the Marker constructor + + Returns + ------- + plotly.graph_objs.choroplethmap.unselected.Marker + """ + return self["marker"] + + @marker.setter + def marker(self, val): + self["marker"] = val + + @property + def _prop_descriptions(self): + return """\ + marker + :class:`plotly.graph_objects.choroplethmap.unselected.M + arker` instance or dict with compatible properties + """ + + def __init__(self, arg=None, marker=None, **kwargs): + """ + Construct a new Unselected object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.choroplethmap.Unselected` + marker + :class:`plotly.graph_objects.choroplethmap.unselected.M + arker` instance or dict with compatible properties + + Returns + ------- + Unselected + """ + super().__init__("unselected") + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + if arg is None: + arg = {} + elif isinstance(arg, self.__class__): + arg = arg.to_plotly_json() + elif isinstance(arg, dict): + arg = _copy.copy(arg) + else: + raise ValueError("""\ +The first argument to the plotly.graph_objs.choroplethmap.Unselected +constructor must be a dict or +an instance of :class:`plotly.graph_objs.choroplethmap.Unselected`""") + + self._skip_invalid = kwargs.pop("skip_invalid", False) + self._validate = kwargs.pop("_validate", True) + + self._set_property("marker", arg, marker) + self._process_kwargs(**dict(arg, **kwargs)) + self._skip_invalid = False diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/choroplethmap/colorbar/.___init__.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/choroplethmap/colorbar/.___init__.py new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/choroplethmap/colorbar/.___init__.py differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/choroplethmap/colorbar/.___pycache__ b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/choroplethmap/colorbar/.___pycache__ new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/choroplethmap/colorbar/.___pycache__ differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/choroplethmap/colorbar/.__tickfont.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/choroplethmap/colorbar/.__tickfont.py new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/choroplethmap/colorbar/.__tickfont.py differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/choroplethmap/colorbar/.__tickformatstop.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/choroplethmap/colorbar/.__tickformatstop.py new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/choroplethmap/colorbar/.__tickformatstop.py differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/choroplethmap/colorbar/.__title.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/choroplethmap/colorbar/.__title.py new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/choroplethmap/colorbar/.__title.py differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/choroplethmap/colorbar/._title b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/choroplethmap/colorbar/._title new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/choroplethmap/colorbar/._title differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/choroplethmap/colorbar/__init__.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/choroplethmap/colorbar/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..4690d3cc738a44d43a04d43d3aa0be36d7cd34e2 --- /dev/null +++ b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/choroplethmap/colorbar/__init__.py @@ -0,0 +1,16 @@ +import sys +from typing import TYPE_CHECKING + +if TYPE_CHECKING: + from ._tickfont import Tickfont + from ._tickformatstop import Tickformatstop + from ._title import Title + from . import title +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [".title"], + ["._tickfont.Tickfont", "._tickformatstop.Tickformatstop", "._title.Title"], + ) diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/choroplethmap/colorbar/_tickfont.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/choroplethmap/colorbar/_tickfont.py new file mode 100644 index 0000000000000000000000000000000000000000..b20f689e1097d46a5c7f5a8ccaf07f45330a0d22 --- /dev/null +++ b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/choroplethmap/colorbar/_tickfont.py @@ -0,0 +1,334 @@ +# --- THIS FILE IS AUTO-GENERATED --- +# Modifications will be overwitten the next time code generation run. + +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Tickfont(_BaseTraceHierarchyType): + _parent_path_str = "choroplethmap.colorbar" + _path_str = "choroplethmap.colorbar.tickfont" + _valid_props = { + "color", + "family", + "lineposition", + "shadow", + "size", + "style", + "textcase", + "variant", + "weight", + } + + @property + def color(self): + """ + The 'color' property is a color and may be specified as: + - A hex string (e.g. '#ff0000') + - An rgb/rgba string (e.g. 'rgb(255,0,0)') + - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') + - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') + - A named CSS color: see https://plotly.com/python/css-colors/ for a list + + Returns + ------- + str + """ + return self["color"] + + @color.setter + def color(self, val): + self["color"] = val + + @property + def family(self): + """ + HTML font family - the typeface that will be applied by the web + browser. The web browser can only apply a font if it is + available on the system where it runs. Provide multiple font + families, separated by commas, to indicate the order in which + to apply fonts if they aren't available. + + The 'family' property is a string and must be specified as: + - A non-empty string + + Returns + ------- + str + """ + return self["family"] + + @family.setter + def family(self, val): + self["family"] = val + + @property + def lineposition(self): + """ + Sets the kind of decoration line(s) with text, such as an + "under", "over" or "through" as well as combinations e.g. + "under+over", etc. + + The 'lineposition' property is a flaglist and may be specified + as a string containing: + - Any combination of ['under', 'over', 'through'] joined with '+' characters + (e.g. 'under+over') + OR exactly one of ['none'] (e.g. 'none') + + Returns + ------- + Any + """ + return self["lineposition"] + + @lineposition.setter + def lineposition(self, val): + self["lineposition"] = val + + @property + def shadow(self): + """ + Sets the shape and color of the shadow behind text. "auto" + places minimal shadow and applies contrast text font color. See + https://developer.mozilla.org/en-US/docs/Web/CSS/text-shadow + for additional options. + + The 'shadow' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["shadow"] + + @shadow.setter + def shadow(self, val): + self["shadow"] = val + + @property + def size(self): + """ + The 'size' property is a number and may be specified as: + - An int or float in the interval [1, inf] + + Returns + ------- + int|float + """ + return self["size"] + + @size.setter + def size(self, val): + self["size"] = val + + @property + def style(self): + """ + Sets whether a font should be styled with a normal or italic + face from its family. + + The 'style' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['normal', 'italic'] + + Returns + ------- + Any + """ + return self["style"] + + @style.setter + def style(self, val): + self["style"] = val + + @property + def textcase(self): + """ + Sets capitalization of text. It can be used to make text appear + in all-uppercase or all-lowercase, or with each word + capitalized. + + The 'textcase' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['normal', 'word caps', 'upper', 'lower'] + + Returns + ------- + Any + """ + return self["textcase"] + + @textcase.setter + def textcase(self, val): + self["textcase"] = val + + @property + def variant(self): + """ + Sets the variant of the font. + + The 'variant' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['normal', 'small-caps', 'all-small-caps', + 'all-petite-caps', 'petite-caps', 'unicase'] + + Returns + ------- + Any + """ + return self["variant"] + + @variant.setter + def variant(self, val): + self["variant"] = val + + @property + def weight(self): + """ + Sets the weight (or boldness) of the font. + + The 'weight' property is a integer and may be specified as: + - An int (or float that will be cast to an int) + in the interval [1, 1000] + OR exactly one of ['normal', 'bold'] (e.g. 'bold') + + Returns + ------- + int + """ + return self["weight"] + + @weight.setter + def weight(self, val): + self["weight"] = val + + @property + def _prop_descriptions(self): + return """\ + color + + family + HTML font family - the typeface that will be applied by + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. + lineposition + Sets the kind of decoration line(s) with text, such as + an "under", "over" or "through" as well as combinations + e.g. "under+over", etc. + shadow + Sets the shape and color of the shadow behind text. + "auto" places minimal shadow and applies contrast text + font color. See https://developer.mozilla.org/en- + US/docs/Web/CSS/text-shadow for additional options. + size + + style + Sets whether a font should be styled with a normal or + italic face from its family. + textcase + Sets capitalization of text. It can be used to make + text appear in all-uppercase or all-lowercase, or with + each word capitalized. + variant + Sets the variant of the font. + weight + Sets the weight (or boldness) of the font. + """ + + def __init__( + self, + arg=None, + color=None, + family=None, + lineposition=None, + shadow=None, + size=None, + style=None, + textcase=None, + variant=None, + weight=None, + **kwargs, + ): + """ + Construct a new Tickfont object + + Sets the color bar's tick label font + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of :class:`plotly.graph_objs.choroplethmap. + colorbar.Tickfont` + color + + family + HTML font family - the typeface that will be applied by + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. + lineposition + Sets the kind of decoration line(s) with text, such as + an "under", "over" or "through" as well as combinations + e.g. "under+over", etc. + shadow + Sets the shape and color of the shadow behind text. + "auto" places minimal shadow and applies contrast text + font color. See https://developer.mozilla.org/en- + US/docs/Web/CSS/text-shadow for additional options. + size + + style + Sets whether a font should be styled with a normal or + italic face from its family. + textcase + Sets capitalization of text. It can be used to make + text appear in all-uppercase or all-lowercase, or with + each word capitalized. + variant + Sets the variant of the font. + weight + Sets the weight (or boldness) of the font. + + Returns + ------- + Tickfont + """ + super().__init__("tickfont") + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + if arg is None: + arg = {} + elif isinstance(arg, self.__class__): + arg = arg.to_plotly_json() + elif isinstance(arg, dict): + arg = _copy.copy(arg) + else: + raise ValueError("""\ +The first argument to the plotly.graph_objs.choroplethmap.colorbar.Tickfont +constructor must be a dict or +an instance of :class:`plotly.graph_objs.choroplethmap.colorbar.Tickfont`""") + + self._skip_invalid = kwargs.pop("skip_invalid", False) + self._validate = kwargs.pop("_validate", True) + + self._set_property("color", arg, color) + self._set_property("family", arg, family) + self._set_property("lineposition", arg, lineposition) + self._set_property("shadow", arg, shadow) + self._set_property("size", arg, size) + self._set_property("style", arg, style) + self._set_property("textcase", arg, textcase) + self._set_property("variant", arg, variant) + self._set_property("weight", arg, weight) + self._process_kwargs(**dict(arg, **kwargs)) + self._skip_invalid = False diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/choroplethmap/colorbar/_tickformatstop.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/choroplethmap/colorbar/_tickformatstop.py new file mode 100644 index 0000000000000000000000000000000000000000..95d8ef0d3bd76bea3cefcd909477c5f87327c061 --- /dev/null +++ b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/choroplethmap/colorbar/_tickformatstop.py @@ -0,0 +1,241 @@ +# --- THIS FILE IS AUTO-GENERATED --- +# Modifications will be overwitten the next time code generation run. + +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Tickformatstop(_BaseTraceHierarchyType): + _parent_path_str = "choroplethmap.colorbar" + _path_str = "choroplethmap.colorbar.tickformatstop" + _valid_props = {"dtickrange", "enabled", "name", "templateitemname", "value"} + + @property + def dtickrange(self): + """ + range [*min*, *max*], where "min", "max" - dtick values which + describe some zoom level, it is possible to omit "min" or "max" + value by passing "null" + + The 'dtickrange' property is an info array that may be specified as: + + * a list or tuple of 2 elements where: + (0) The 'dtickrange[0]' property accepts values of any type + (1) The 'dtickrange[1]' property accepts values of any type + + Returns + ------- + list + """ + return self["dtickrange"] + + @dtickrange.setter + def dtickrange(self, val): + self["dtickrange"] = val + + @property + def enabled(self): + """ + Determines whether or not this stop is used. If `false`, this + stop is ignored even within its `dtickrange`. + + The 'enabled' property is a boolean and must be specified as: + - A boolean value: True or False + + Returns + ------- + bool + """ + return self["enabled"] + + @enabled.setter + def enabled(self, val): + self["enabled"] = val + + @property + def name(self): + """ + When used in a template, named items are created in the output + figure in addition to any items the figure already has in this + array. You can modify these items in the output figure by + making your own item with `templateitemname` matching this + `name` alongside your modifications (including `visible: false` + or `enabled: false` to hide it). Has no effect outside of a + template. + + The 'name' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["name"] + + @name.setter + def name(self, val): + self["name"] = val + + @property + def templateitemname(self): + """ + Used to refer to a named item in this array in the template. + Named items from the template will be created even without a + matching item in the input figure, but you can modify one by + making an item with `templateitemname` matching its `name`, + alongside your modifications (including `visible: false` or + `enabled: false` to hide it). If there is no template or no + matching item, this item will be hidden unless you explicitly + show it with `visible: true`. + + The 'templateitemname' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["templateitemname"] + + @templateitemname.setter + def templateitemname(self, val): + self["templateitemname"] = val + + @property + def value(self): + """ + string - dtickformat for described zoom level, the same as + "tickformat" + + The 'value' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["value"] + + @value.setter + def value(self, val): + self["value"] = val + + @property + def _prop_descriptions(self): + return """\ + dtickrange + range [*min*, *max*], where "min", "max" - dtick values + which describe some zoom level, it is possible to omit + "min" or "max" value by passing "null" + enabled + Determines whether or not this stop is used. If + `false`, this stop is ignored even within its + `dtickrange`. + name + When used in a template, named items are created in the + output figure in addition to any items the figure + already has in this array. You can modify these items + in the output figure by making your own item with + `templateitemname` matching this `name` alongside your + modifications (including `visible: false` or `enabled: + false` to hide it). Has no effect outside of a + template. + templateitemname + Used to refer to a named item in this array in the + template. Named items from the template will be created + even without a matching item in the input figure, but + you can modify one by making an item with + `templateitemname` matching its `name`, alongside your + modifications (including `visible: false` or `enabled: + false` to hide it). If there is no template or no + matching item, this item will be hidden unless you + explicitly show it with `visible: true`. + value + string - dtickformat for described zoom level, the same + as "tickformat" + """ + + def __init__( + self, + arg=None, + dtickrange=None, + enabled=None, + name=None, + templateitemname=None, + value=None, + **kwargs, + ): + """ + Construct a new Tickformatstop object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of :class:`plotly.graph_objs.choroplethmap. + colorbar.Tickformatstop` + dtickrange + range [*min*, *max*], where "min", "max" - dtick values + which describe some zoom level, it is possible to omit + "min" or "max" value by passing "null" + enabled + Determines whether or not this stop is used. If + `false`, this stop is ignored even within its + `dtickrange`. + name + When used in a template, named items are created in the + output figure in addition to any items the figure + already has in this array. You can modify these items + in the output figure by making your own item with + `templateitemname` matching this `name` alongside your + modifications (including `visible: false` or `enabled: + false` to hide it). Has no effect outside of a + template. + templateitemname + Used to refer to a named item in this array in the + template. Named items from the template will be created + even without a matching item in the input figure, but + you can modify one by making an item with + `templateitemname` matching its `name`, alongside your + modifications (including `visible: false` or `enabled: + false` to hide it). If there is no template or no + matching item, this item will be hidden unless you + explicitly show it with `visible: true`. + value + string - dtickformat for described zoom level, the same + as "tickformat" + + Returns + ------- + Tickformatstop + """ + super().__init__("tickformatstops") + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + if arg is None: + arg = {} + elif isinstance(arg, self.__class__): + arg = arg.to_plotly_json() + elif isinstance(arg, dict): + arg = _copy.copy(arg) + else: + raise ValueError("""\ +The first argument to the plotly.graph_objs.choroplethmap.colorbar.Tickformatstop +constructor must be a dict or +an instance of :class:`plotly.graph_objs.choroplethmap.colorbar.Tickformatstop`""") + + self._skip_invalid = kwargs.pop("skip_invalid", False) + self._validate = kwargs.pop("_validate", True) + + self._set_property("dtickrange", arg, dtickrange) + self._set_property("enabled", arg, enabled) + self._set_property("name", arg, name) + self._set_property("templateitemname", arg, templateitemname) + self._set_property("value", arg, value) + self._process_kwargs(**dict(arg, **kwargs)) + self._skip_invalid = False diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/choroplethmap/colorbar/_title.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/choroplethmap/colorbar/_title.py new file mode 100644 index 0000000000000000000000000000000000000000..c5f12b32500f163b599bf966ccfa292700a7fc51 --- /dev/null +++ b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/choroplethmap/colorbar/_title.py @@ -0,0 +1,136 @@ +# --- THIS FILE IS AUTO-GENERATED --- +# Modifications will be overwitten the next time code generation run. + +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Title(_BaseTraceHierarchyType): + _parent_path_str = "choroplethmap.colorbar" + _path_str = "choroplethmap.colorbar.title" + _valid_props = {"font", "side", "text"} + + @property + def font(self): + """ + Sets this color bar's title font. + + The 'font' property is an instance of Font + that may be specified as: + - An instance of :class:`plotly.graph_objs.choroplethmap.colorbar.title.Font` + - A dict of string/value properties that will be passed + to the Font constructor + + Returns + ------- + plotly.graph_objs.choroplethmap.colorbar.title.Font + """ + return self["font"] + + @font.setter + def font(self, val): + self["font"] = val + + @property + def side(self): + """ + Determines the location of color bar's title with respect to + the color bar. Defaults to "top" when `orientation` if "v" and + defaults to "right" when `orientation` if "h". + + The 'side' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['right', 'top', 'bottom'] + + Returns + ------- + Any + """ + return self["side"] + + @side.setter + def side(self, val): + self["side"] = val + + @property + def text(self): + """ + Sets the title of the color bar. + + The 'text' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["text"] + + @text.setter + def text(self, val): + self["text"] = val + + @property + def _prop_descriptions(self): + return """\ + font + Sets this color bar's title font. + side + Determines the location of color bar's title with + respect to the color bar. Defaults to "top" when + `orientation` if "v" and defaults to "right" when + `orientation` if "h". + text + Sets the title of the color bar. + """ + + def __init__(self, arg=None, font=None, side=None, text=None, **kwargs): + """ + Construct a new Title object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.choroplethmap.colorbar.Title` + font + Sets this color bar's title font. + side + Determines the location of color bar's title with + respect to the color bar. Defaults to "top" when + `orientation` if "v" and defaults to "right" when + `orientation` if "h". + text + Sets the title of the color bar. + + Returns + ------- + Title + """ + super().__init__("title") + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + if arg is None: + arg = {} + elif isinstance(arg, self.__class__): + arg = arg.to_plotly_json() + elif isinstance(arg, dict): + arg = _copy.copy(arg) + else: + raise ValueError("""\ +The first argument to the plotly.graph_objs.choroplethmap.colorbar.Title +constructor must be a dict or +an instance of :class:`plotly.graph_objs.choroplethmap.colorbar.Title`""") + + self._skip_invalid = kwargs.pop("skip_invalid", False) + self._validate = kwargs.pop("_validate", True) + + self._set_property("font", arg, font) + self._set_property("side", arg, side) + self._set_property("text", arg, text) + self._process_kwargs(**dict(arg, **kwargs)) + self._skip_invalid = False diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/choroplethmap/colorbar/title/.___init__.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/choroplethmap/colorbar/title/.___init__.py new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/choroplethmap/colorbar/title/.___init__.py differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/choroplethmap/colorbar/title/.___pycache__ b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/choroplethmap/colorbar/title/.___pycache__ new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/choroplethmap/colorbar/title/.___pycache__ differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/choroplethmap/colorbar/title/.__font.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/choroplethmap/colorbar/title/.__font.py new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/choroplethmap/colorbar/title/.__font.py differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/choroplethmap/colorbar/title/__init__.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/choroplethmap/colorbar/title/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..56f600d3458c41f269053307377e9707ab13e090 --- /dev/null +++ b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/choroplethmap/colorbar/title/__init__.py @@ -0,0 +1,9 @@ +import sys +from typing import TYPE_CHECKING + +if TYPE_CHECKING: + from ._font import Font +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import(__name__, [], ["._font.Font"]) diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/choroplethmap/colorbar/title/_font.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/choroplethmap/colorbar/title/_font.py new file mode 100644 index 0000000000000000000000000000000000000000..ff94542fafb7884cb126014ba9fe488559ea380d --- /dev/null +++ b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/choroplethmap/colorbar/title/_font.py @@ -0,0 +1,334 @@ +# --- THIS FILE IS AUTO-GENERATED --- +# Modifications will be overwitten the next time code generation run. + +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Font(_BaseTraceHierarchyType): + _parent_path_str = "choroplethmap.colorbar.title" + _path_str = "choroplethmap.colorbar.title.font" + _valid_props = { + "color", + "family", + "lineposition", + "shadow", + "size", + "style", + "textcase", + "variant", + "weight", + } + + @property + def color(self): + """ + The 'color' property is a color and may be specified as: + - A hex string (e.g. '#ff0000') + - An rgb/rgba string (e.g. 'rgb(255,0,0)') + - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') + - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') + - A named CSS color: see https://plotly.com/python/css-colors/ for a list + + Returns + ------- + str + """ + return self["color"] + + @color.setter + def color(self, val): + self["color"] = val + + @property + def family(self): + """ + HTML font family - the typeface that will be applied by the web + browser. The web browser can only apply a font if it is + available on the system where it runs. Provide multiple font + families, separated by commas, to indicate the order in which + to apply fonts if they aren't available. + + The 'family' property is a string and must be specified as: + - A non-empty string + + Returns + ------- + str + """ + return self["family"] + + @family.setter + def family(self, val): + self["family"] = val + + @property + def lineposition(self): + """ + Sets the kind of decoration line(s) with text, such as an + "under", "over" or "through" as well as combinations e.g. + "under+over", etc. + + The 'lineposition' property is a flaglist and may be specified + as a string containing: + - Any combination of ['under', 'over', 'through'] joined with '+' characters + (e.g. 'under+over') + OR exactly one of ['none'] (e.g. 'none') + + Returns + ------- + Any + """ + return self["lineposition"] + + @lineposition.setter + def lineposition(self, val): + self["lineposition"] = val + + @property + def shadow(self): + """ + Sets the shape and color of the shadow behind text. "auto" + places minimal shadow and applies contrast text font color. See + https://developer.mozilla.org/en-US/docs/Web/CSS/text-shadow + for additional options. + + The 'shadow' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["shadow"] + + @shadow.setter + def shadow(self, val): + self["shadow"] = val + + @property + def size(self): + """ + The 'size' property is a number and may be specified as: + - An int or float in the interval [1, inf] + + Returns + ------- + int|float + """ + return self["size"] + + @size.setter + def size(self, val): + self["size"] = val + + @property + def style(self): + """ + Sets whether a font should be styled with a normal or italic + face from its family. + + The 'style' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['normal', 'italic'] + + Returns + ------- + Any + """ + return self["style"] + + @style.setter + def style(self, val): + self["style"] = val + + @property + def textcase(self): + """ + Sets capitalization of text. It can be used to make text appear + in all-uppercase or all-lowercase, or with each word + capitalized. + + The 'textcase' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['normal', 'word caps', 'upper', 'lower'] + + Returns + ------- + Any + """ + return self["textcase"] + + @textcase.setter + def textcase(self, val): + self["textcase"] = val + + @property + def variant(self): + """ + Sets the variant of the font. + + The 'variant' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['normal', 'small-caps', 'all-small-caps', + 'all-petite-caps', 'petite-caps', 'unicase'] + + Returns + ------- + Any + """ + return self["variant"] + + @variant.setter + def variant(self, val): + self["variant"] = val + + @property + def weight(self): + """ + Sets the weight (or boldness) of the font. + + The 'weight' property is a integer and may be specified as: + - An int (or float that will be cast to an int) + in the interval [1, 1000] + OR exactly one of ['normal', 'bold'] (e.g. 'bold') + + Returns + ------- + int + """ + return self["weight"] + + @weight.setter + def weight(self, val): + self["weight"] = val + + @property + def _prop_descriptions(self): + return """\ + color + + family + HTML font family - the typeface that will be applied by + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. + lineposition + Sets the kind of decoration line(s) with text, such as + an "under", "over" or "through" as well as combinations + e.g. "under+over", etc. + shadow + Sets the shape and color of the shadow behind text. + "auto" places minimal shadow and applies contrast text + font color. See https://developer.mozilla.org/en- + US/docs/Web/CSS/text-shadow for additional options. + size + + style + Sets whether a font should be styled with a normal or + italic face from its family. + textcase + Sets capitalization of text. It can be used to make + text appear in all-uppercase or all-lowercase, or with + each word capitalized. + variant + Sets the variant of the font. + weight + Sets the weight (or boldness) of the font. + """ + + def __init__( + self, + arg=None, + color=None, + family=None, + lineposition=None, + shadow=None, + size=None, + style=None, + textcase=None, + variant=None, + weight=None, + **kwargs, + ): + """ + Construct a new Font object + + Sets this color bar's title font. + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of :class:`plotly.graph_objs.choroplethmap. + colorbar.title.Font` + color + + family + HTML font family - the typeface that will be applied by + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. + lineposition + Sets the kind of decoration line(s) with text, such as + an "under", "over" or "through" as well as combinations + e.g. "under+over", etc. + shadow + Sets the shape and color of the shadow behind text. + "auto" places minimal shadow and applies contrast text + font color. See https://developer.mozilla.org/en- + US/docs/Web/CSS/text-shadow for additional options. + size + + style + Sets whether a font should be styled with a normal or + italic face from its family. + textcase + Sets capitalization of text. It can be used to make + text appear in all-uppercase or all-lowercase, or with + each word capitalized. + variant + Sets the variant of the font. + weight + Sets the weight (or boldness) of the font. + + Returns + ------- + Font + """ + super().__init__("font") + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + if arg is None: + arg = {} + elif isinstance(arg, self.__class__): + arg = arg.to_plotly_json() + elif isinstance(arg, dict): + arg = _copy.copy(arg) + else: + raise ValueError("""\ +The first argument to the plotly.graph_objs.choroplethmap.colorbar.title.Font +constructor must be a dict or +an instance of :class:`plotly.graph_objs.choroplethmap.colorbar.title.Font`""") + + self._skip_invalid = kwargs.pop("skip_invalid", False) + self._validate = kwargs.pop("_validate", True) + + self._set_property("color", arg, color) + self._set_property("family", arg, family) + self._set_property("lineposition", arg, lineposition) + self._set_property("shadow", arg, shadow) + self._set_property("size", arg, size) + self._set_property("style", arg, style) + self._set_property("textcase", arg, textcase) + self._set_property("variant", arg, variant) + self._set_property("weight", arg, weight) + self._process_kwargs(**dict(arg, **kwargs)) + self._skip_invalid = False diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/choroplethmap/hoverlabel/.___init__.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/choroplethmap/hoverlabel/.___init__.py new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/choroplethmap/hoverlabel/.___init__.py differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/choroplethmap/hoverlabel/.___pycache__ b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/choroplethmap/hoverlabel/.___pycache__ new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/choroplethmap/hoverlabel/.___pycache__ differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/choroplethmap/hoverlabel/.__font.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/choroplethmap/hoverlabel/.__font.py new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/choroplethmap/hoverlabel/.__font.py differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/choroplethmap/hoverlabel/__init__.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/choroplethmap/hoverlabel/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..56f600d3458c41f269053307377e9707ab13e090 --- /dev/null +++ b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/choroplethmap/hoverlabel/__init__.py @@ -0,0 +1,9 @@ +import sys +from typing import TYPE_CHECKING + +if TYPE_CHECKING: + from ._font import Font +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import(__name__, [], ["._font.Font"]) diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/choroplethmap/hoverlabel/_font.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/choroplethmap/hoverlabel/_font.py new file mode 100644 index 0000000000000000000000000000000000000000..dda15f31cc648b83c9a48f28b80af8f7097a0eab --- /dev/null +++ b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/choroplethmap/hoverlabel/_font.py @@ -0,0 +1,587 @@ +# --- THIS FILE IS AUTO-GENERATED --- +# Modifications will be overwitten the next time code generation run. + +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Font(_BaseTraceHierarchyType): + _parent_path_str = "choroplethmap.hoverlabel" + _path_str = "choroplethmap.hoverlabel.font" + _valid_props = { + "color", + "colorsrc", + "family", + "familysrc", + "lineposition", + "linepositionsrc", + "shadow", + "shadowsrc", + "size", + "sizesrc", + "style", + "stylesrc", + "textcase", + "textcasesrc", + "variant", + "variantsrc", + "weight", + "weightsrc", + } + + @property + def color(self): + """ + The 'color' property is a color and may be specified as: + - A hex string (e.g. '#ff0000') + - An rgb/rgba string (e.g. 'rgb(255,0,0)') + - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') + - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') + - A named CSS color: see https://plotly.com/python/css-colors/ for a list + - A list or array of any of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["color"] + + @color.setter + def color(self, val): + self["color"] = val + + @property + def colorsrc(self): + """ + Sets the source reference on Chart Studio Cloud for `color`. + + The 'colorsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["colorsrc"] + + @colorsrc.setter + def colorsrc(self, val): + self["colorsrc"] = val + + @property + def family(self): + """ + HTML font family - the typeface that will be applied by the web + browser. The web browser can only apply a font if it is + available on the system where it runs. Provide multiple font + families, separated by commas, to indicate the order in which + to apply fonts if they aren't available. + + The 'family' property is a string and must be specified as: + - A non-empty string + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["family"] + + @family.setter + def family(self, val): + self["family"] = val + + @property + def familysrc(self): + """ + Sets the source reference on Chart Studio Cloud for `family`. + + The 'familysrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["familysrc"] + + @familysrc.setter + def familysrc(self, val): + self["familysrc"] = val + + @property + def lineposition(self): + """ + Sets the kind of decoration line(s) with text, such as an + "under", "over" or "through" as well as combinations e.g. + "under+over", etc. + + The 'lineposition' property is a flaglist and may be specified + as a string containing: + - Any combination of ['under', 'over', 'through'] joined with '+' characters + (e.g. 'under+over') + OR exactly one of ['none'] (e.g. 'none') + - A list or array of the above + + Returns + ------- + Any|numpy.ndarray + """ + return self["lineposition"] + + @lineposition.setter + def lineposition(self, val): + self["lineposition"] = val + + @property + def linepositionsrc(self): + """ + Sets the source reference on Chart Studio Cloud for + `lineposition`. + + The 'linepositionsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["linepositionsrc"] + + @linepositionsrc.setter + def linepositionsrc(self, val): + self["linepositionsrc"] = val + + @property + def shadow(self): + """ + Sets the shape and color of the shadow behind text. "auto" + places minimal shadow and applies contrast text font color. See + https://developer.mozilla.org/en-US/docs/Web/CSS/text-shadow + for additional options. + + The 'shadow' property is a string and must be specified as: + - A string + - A number that will be converted to a string + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["shadow"] + + @shadow.setter + def shadow(self, val): + self["shadow"] = val + + @property + def shadowsrc(self): + """ + Sets the source reference on Chart Studio Cloud for `shadow`. + + The 'shadowsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["shadowsrc"] + + @shadowsrc.setter + def shadowsrc(self, val): + self["shadowsrc"] = val + + @property + def size(self): + """ + The 'size' property is a number and may be specified as: + - An int or float in the interval [1, inf] + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + int|float|numpy.ndarray + """ + return self["size"] + + @size.setter + def size(self, val): + self["size"] = val + + @property + def sizesrc(self): + """ + Sets the source reference on Chart Studio Cloud for `size`. + + The 'sizesrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["sizesrc"] + + @sizesrc.setter + def sizesrc(self, val): + self["sizesrc"] = val + + @property + def style(self): + """ + Sets whether a font should be styled with a normal or italic + face from its family. + + The 'style' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['normal', 'italic'] + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + Any|numpy.ndarray + """ + return self["style"] + + @style.setter + def style(self, val): + self["style"] = val + + @property + def stylesrc(self): + """ + Sets the source reference on Chart Studio Cloud for `style`. + + The 'stylesrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["stylesrc"] + + @stylesrc.setter + def stylesrc(self, val): + self["stylesrc"] = val + + @property + def textcase(self): + """ + Sets capitalization of text. It can be used to make text appear + in all-uppercase or all-lowercase, or with each word + capitalized. + + The 'textcase' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['normal', 'word caps', 'upper', 'lower'] + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + Any|numpy.ndarray + """ + return self["textcase"] + + @textcase.setter + def textcase(self, val): + self["textcase"] = val + + @property + def textcasesrc(self): + """ + Sets the source reference on Chart Studio Cloud for `textcase`. + + The 'textcasesrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["textcasesrc"] + + @textcasesrc.setter + def textcasesrc(self, val): + self["textcasesrc"] = val + + @property + def variant(self): + """ + Sets the variant of the font. + + The 'variant' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['normal', 'small-caps', 'all-small-caps', + 'all-petite-caps', 'petite-caps', 'unicase'] + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + Any|numpy.ndarray + """ + return self["variant"] + + @variant.setter + def variant(self, val): + self["variant"] = val + + @property + def variantsrc(self): + """ + Sets the source reference on Chart Studio Cloud for `variant`. + + The 'variantsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["variantsrc"] + + @variantsrc.setter + def variantsrc(self, val): + self["variantsrc"] = val + + @property + def weight(self): + """ + Sets the weight (or boldness) of the font. + + The 'weight' property is a integer and may be specified as: + - An int (or float that will be cast to an int) + in the interval [1, 1000] + OR exactly one of ['normal', 'bold'] (e.g. 'bold') + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + int|numpy.ndarray + """ + return self["weight"] + + @weight.setter + def weight(self, val): + self["weight"] = val + + @property + def weightsrc(self): + """ + Sets the source reference on Chart Studio Cloud for `weight`. + + The 'weightsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["weightsrc"] + + @weightsrc.setter + def weightsrc(self, val): + self["weightsrc"] = val + + @property + def _prop_descriptions(self): + return """\ + color + + colorsrc + Sets the source reference on Chart Studio Cloud for + `color`. + family + HTML font family - the typeface that will be applied by + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. + familysrc + Sets the source reference on Chart Studio Cloud for + `family`. + lineposition + Sets the kind of decoration line(s) with text, such as + an "under", "over" or "through" as well as combinations + e.g. "under+over", etc. + linepositionsrc + Sets the source reference on Chart Studio Cloud for + `lineposition`. + shadow + Sets the shape and color of the shadow behind text. + "auto" places minimal shadow and applies contrast text + font color. See https://developer.mozilla.org/en- + US/docs/Web/CSS/text-shadow for additional options. + shadowsrc + Sets the source reference on Chart Studio Cloud for + `shadow`. + size + + sizesrc + Sets the source reference on Chart Studio Cloud for + `size`. + style + Sets whether a font should be styled with a normal or + italic face from its family. + stylesrc + Sets the source reference on Chart Studio Cloud for + `style`. + textcase + Sets capitalization of text. It can be used to make + text appear in all-uppercase or all-lowercase, or with + each word capitalized. + textcasesrc + Sets the source reference on Chart Studio Cloud for + `textcase`. + variant + Sets the variant of the font. + variantsrc + Sets the source reference on Chart Studio Cloud for + `variant`. + weight + Sets the weight (or boldness) of the font. + weightsrc + Sets the source reference on Chart Studio Cloud for + `weight`. + """ + + def __init__( + self, + arg=None, + color=None, + colorsrc=None, + family=None, + familysrc=None, + lineposition=None, + linepositionsrc=None, + shadow=None, + shadowsrc=None, + size=None, + sizesrc=None, + style=None, + stylesrc=None, + textcase=None, + textcasesrc=None, + variant=None, + variantsrc=None, + weight=None, + weightsrc=None, + **kwargs, + ): + """ + Construct a new Font object + + Sets the font used in hover labels. + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of :class:`plotly.graph_objs.choroplethmap. + hoverlabel.Font` + color + + colorsrc + Sets the source reference on Chart Studio Cloud for + `color`. + family + HTML font family - the typeface that will be applied by + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. + familysrc + Sets the source reference on Chart Studio Cloud for + `family`. + lineposition + Sets the kind of decoration line(s) with text, such as + an "under", "over" or "through" as well as combinations + e.g. "under+over", etc. + linepositionsrc + Sets the source reference on Chart Studio Cloud for + `lineposition`. + shadow + Sets the shape and color of the shadow behind text. + "auto" places minimal shadow and applies contrast text + font color. See https://developer.mozilla.org/en- + US/docs/Web/CSS/text-shadow for additional options. + shadowsrc + Sets the source reference on Chart Studio Cloud for + `shadow`. + size + + sizesrc + Sets the source reference on Chart Studio Cloud for + `size`. + style + Sets whether a font should be styled with a normal or + italic face from its family. + stylesrc + Sets the source reference on Chart Studio Cloud for + `style`. + textcase + Sets capitalization of text. It can be used to make + text appear in all-uppercase or all-lowercase, or with + each word capitalized. + textcasesrc + Sets the source reference on Chart Studio Cloud for + `textcase`. + variant + Sets the variant of the font. + variantsrc + Sets the source reference on Chart Studio Cloud for + `variant`. + weight + Sets the weight (or boldness) of the font. + weightsrc + Sets the source reference on Chart Studio Cloud for + `weight`. + + Returns + ------- + Font + """ + super().__init__("font") + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + if arg is None: + arg = {} + elif isinstance(arg, self.__class__): + arg = arg.to_plotly_json() + elif isinstance(arg, dict): + arg = _copy.copy(arg) + else: + raise ValueError("""\ +The first argument to the plotly.graph_objs.choroplethmap.hoverlabel.Font +constructor must be a dict or +an instance of :class:`plotly.graph_objs.choroplethmap.hoverlabel.Font`""") + + self._skip_invalid = kwargs.pop("skip_invalid", False) + self._validate = kwargs.pop("_validate", True) + + self._set_property("color", arg, color) + self._set_property("colorsrc", arg, colorsrc) + self._set_property("family", arg, family) + self._set_property("familysrc", arg, familysrc) + self._set_property("lineposition", arg, lineposition) + self._set_property("linepositionsrc", arg, linepositionsrc) + self._set_property("shadow", arg, shadow) + self._set_property("shadowsrc", arg, shadowsrc) + self._set_property("size", arg, size) + self._set_property("sizesrc", arg, sizesrc) + self._set_property("style", arg, style) + self._set_property("stylesrc", arg, stylesrc) + self._set_property("textcase", arg, textcase) + self._set_property("textcasesrc", arg, textcasesrc) + self._set_property("variant", arg, variant) + self._set_property("variantsrc", arg, variantsrc) + self._set_property("weight", arg, weight) + self._set_property("weightsrc", arg, weightsrc) + self._process_kwargs(**dict(arg, **kwargs)) + self._skip_invalid = False diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/choroplethmap/legendgrouptitle/.___init__.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/choroplethmap/legendgrouptitle/.___init__.py new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/choroplethmap/legendgrouptitle/.___init__.py differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/choroplethmap/legendgrouptitle/.___pycache__ b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/choroplethmap/legendgrouptitle/.___pycache__ new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/choroplethmap/legendgrouptitle/.___pycache__ differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/choroplethmap/legendgrouptitle/.__font.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/choroplethmap/legendgrouptitle/.__font.py new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/choroplethmap/legendgrouptitle/.__font.py differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/choroplethmap/legendgrouptitle/__init__.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/choroplethmap/legendgrouptitle/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..56f600d3458c41f269053307377e9707ab13e090 --- /dev/null +++ b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/choroplethmap/legendgrouptitle/__init__.py @@ -0,0 +1,9 @@ +import sys +from typing import TYPE_CHECKING + +if TYPE_CHECKING: + from ._font import Font +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import(__name__, [], ["._font.Font"]) diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/choroplethmap/legendgrouptitle/_font.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/choroplethmap/legendgrouptitle/_font.py new file mode 100644 index 0000000000000000000000000000000000000000..4d2b65b6151b21f6f91ef27373a226bd1687d0bd --- /dev/null +++ b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/choroplethmap/legendgrouptitle/_font.py @@ -0,0 +1,334 @@ +# --- THIS FILE IS AUTO-GENERATED --- +# Modifications will be overwitten the next time code generation run. + +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Font(_BaseTraceHierarchyType): + _parent_path_str = "choroplethmap.legendgrouptitle" + _path_str = "choroplethmap.legendgrouptitle.font" + _valid_props = { + "color", + "family", + "lineposition", + "shadow", + "size", + "style", + "textcase", + "variant", + "weight", + } + + @property + def color(self): + """ + The 'color' property is a color and may be specified as: + - A hex string (e.g. '#ff0000') + - An rgb/rgba string (e.g. 'rgb(255,0,0)') + - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') + - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') + - A named CSS color: see https://plotly.com/python/css-colors/ for a list + + Returns + ------- + str + """ + return self["color"] + + @color.setter + def color(self, val): + self["color"] = val + + @property + def family(self): + """ + HTML font family - the typeface that will be applied by the web + browser. The web browser can only apply a font if it is + available on the system where it runs. Provide multiple font + families, separated by commas, to indicate the order in which + to apply fonts if they aren't available. + + The 'family' property is a string and must be specified as: + - A non-empty string + + Returns + ------- + str + """ + return self["family"] + + @family.setter + def family(self, val): + self["family"] = val + + @property + def lineposition(self): + """ + Sets the kind of decoration line(s) with text, such as an + "under", "over" or "through" as well as combinations e.g. + "under+over", etc. + + The 'lineposition' property is a flaglist and may be specified + as a string containing: + - Any combination of ['under', 'over', 'through'] joined with '+' characters + (e.g. 'under+over') + OR exactly one of ['none'] (e.g. 'none') + + Returns + ------- + Any + """ + return self["lineposition"] + + @lineposition.setter + def lineposition(self, val): + self["lineposition"] = val + + @property + def shadow(self): + """ + Sets the shape and color of the shadow behind text. "auto" + places minimal shadow and applies contrast text font color. See + https://developer.mozilla.org/en-US/docs/Web/CSS/text-shadow + for additional options. + + The 'shadow' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["shadow"] + + @shadow.setter + def shadow(self, val): + self["shadow"] = val + + @property + def size(self): + """ + The 'size' property is a number and may be specified as: + - An int or float in the interval [1, inf] + + Returns + ------- + int|float + """ + return self["size"] + + @size.setter + def size(self, val): + self["size"] = val + + @property + def style(self): + """ + Sets whether a font should be styled with a normal or italic + face from its family. + + The 'style' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['normal', 'italic'] + + Returns + ------- + Any + """ + return self["style"] + + @style.setter + def style(self, val): + self["style"] = val + + @property + def textcase(self): + """ + Sets capitalization of text. It can be used to make text appear + in all-uppercase or all-lowercase, or with each word + capitalized. + + The 'textcase' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['normal', 'word caps', 'upper', 'lower'] + + Returns + ------- + Any + """ + return self["textcase"] + + @textcase.setter + def textcase(self, val): + self["textcase"] = val + + @property + def variant(self): + """ + Sets the variant of the font. + + The 'variant' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['normal', 'small-caps', 'all-small-caps', + 'all-petite-caps', 'petite-caps', 'unicase'] + + Returns + ------- + Any + """ + return self["variant"] + + @variant.setter + def variant(self, val): + self["variant"] = val + + @property + def weight(self): + """ + Sets the weight (or boldness) of the font. + + The 'weight' property is a integer and may be specified as: + - An int (or float that will be cast to an int) + in the interval [1, 1000] + OR exactly one of ['normal', 'bold'] (e.g. 'bold') + + Returns + ------- + int + """ + return self["weight"] + + @weight.setter + def weight(self, val): + self["weight"] = val + + @property + def _prop_descriptions(self): + return """\ + color + + family + HTML font family - the typeface that will be applied by + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. + lineposition + Sets the kind of decoration line(s) with text, such as + an "under", "over" or "through" as well as combinations + e.g. "under+over", etc. + shadow + Sets the shape and color of the shadow behind text. + "auto" places minimal shadow and applies contrast text + font color. See https://developer.mozilla.org/en- + US/docs/Web/CSS/text-shadow for additional options. + size + + style + Sets whether a font should be styled with a normal or + italic face from its family. + textcase + Sets capitalization of text. It can be used to make + text appear in all-uppercase or all-lowercase, or with + each word capitalized. + variant + Sets the variant of the font. + weight + Sets the weight (or boldness) of the font. + """ + + def __init__( + self, + arg=None, + color=None, + family=None, + lineposition=None, + shadow=None, + size=None, + style=None, + textcase=None, + variant=None, + weight=None, + **kwargs, + ): + """ + Construct a new Font object + + Sets this legend group's title font. + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of :class:`plotly.graph_objs.choroplethmap. + legendgrouptitle.Font` + color + + family + HTML font family - the typeface that will be applied by + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. + lineposition + Sets the kind of decoration line(s) with text, such as + an "under", "over" or "through" as well as combinations + e.g. "under+over", etc. + shadow + Sets the shape and color of the shadow behind text. + "auto" places minimal shadow and applies contrast text + font color. See https://developer.mozilla.org/en- + US/docs/Web/CSS/text-shadow for additional options. + size + + style + Sets whether a font should be styled with a normal or + italic face from its family. + textcase + Sets capitalization of text. It can be used to make + text appear in all-uppercase or all-lowercase, or with + each word capitalized. + variant + Sets the variant of the font. + weight + Sets the weight (or boldness) of the font. + + Returns + ------- + Font + """ + super().__init__("font") + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + if arg is None: + arg = {} + elif isinstance(arg, self.__class__): + arg = arg.to_plotly_json() + elif isinstance(arg, dict): + arg = _copy.copy(arg) + else: + raise ValueError("""\ +The first argument to the plotly.graph_objs.choroplethmap.legendgrouptitle.Font +constructor must be a dict or +an instance of :class:`plotly.graph_objs.choroplethmap.legendgrouptitle.Font`""") + + self._skip_invalid = kwargs.pop("skip_invalid", False) + self._validate = kwargs.pop("_validate", True) + + self._set_property("color", arg, color) + self._set_property("family", arg, family) + self._set_property("lineposition", arg, lineposition) + self._set_property("shadow", arg, shadow) + self._set_property("size", arg, size) + self._set_property("style", arg, style) + self._set_property("textcase", arg, textcase) + self._set_property("variant", arg, variant) + self._set_property("weight", arg, weight) + self._process_kwargs(**dict(arg, **kwargs)) + self._skip_invalid = False diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/choroplethmap/marker/.___init__.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/choroplethmap/marker/.___init__.py new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/choroplethmap/marker/.___init__.py differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/choroplethmap/marker/.___pycache__ b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/choroplethmap/marker/.___pycache__ new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/choroplethmap/marker/.___pycache__ differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/choroplethmap/marker/.__line.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/choroplethmap/marker/.__line.py new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/choroplethmap/marker/.__line.py differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/choroplethmap/marker/__init__.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/choroplethmap/marker/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..33e42c007335e876d1a3c1d78cec108c9248c1c9 --- /dev/null +++ b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/choroplethmap/marker/__init__.py @@ -0,0 +1,9 @@ +import sys +from typing import TYPE_CHECKING + +if TYPE_CHECKING: + from ._line import Line +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import(__name__, [], ["._line.Line"]) diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/choroplethmap/marker/_line.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/choroplethmap/marker/_line.py new file mode 100644 index 0000000000000000000000000000000000000000..77c79282b007bbfe718669c7075a97c028e77853 --- /dev/null +++ b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/choroplethmap/marker/_line.py @@ -0,0 +1,171 @@ +# --- THIS FILE IS AUTO-GENERATED --- +# Modifications will be overwitten the next time code generation run. + +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Line(_BaseTraceHierarchyType): + _parent_path_str = "choroplethmap.marker" + _path_str = "choroplethmap.marker.line" + _valid_props = {"color", "colorsrc", "width", "widthsrc"} + + @property + def color(self): + """ + Sets the marker.line color. It accepts either a specific color + or an array of numbers that are mapped to the colorscale + relative to the max and min values of the array or relative to + `marker.line.cmin` and `marker.line.cmax` if set. + + The 'color' property is a color and may be specified as: + - A hex string (e.g. '#ff0000') + - An rgb/rgba string (e.g. 'rgb(255,0,0)') + - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') + - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') + - A named CSS color: see https://plotly.com/python/css-colors/ for a list + - A list or array of any of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["color"] + + @color.setter + def color(self, val): + self["color"] = val + + @property + def colorsrc(self): + """ + Sets the source reference on Chart Studio Cloud for `color`. + + The 'colorsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["colorsrc"] + + @colorsrc.setter + def colorsrc(self, val): + self["colorsrc"] = val + + @property + def width(self): + """ + Sets the width (in px) of the lines bounding the marker points. + + The 'width' property is a number and may be specified as: + - An int or float in the interval [0, inf] + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + int|float|numpy.ndarray + """ + return self["width"] + + @width.setter + def width(self, val): + self["width"] = val + + @property + def widthsrc(self): + """ + Sets the source reference on Chart Studio Cloud for `width`. + + The 'widthsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["widthsrc"] + + @widthsrc.setter + def widthsrc(self, val): + self["widthsrc"] = val + + @property + def _prop_descriptions(self): + return """\ + color + Sets the marker.line color. It accepts either a + specific color or an array of numbers that are mapped + to the colorscale relative to the max and min values of + the array or relative to `marker.line.cmin` and + `marker.line.cmax` if set. + colorsrc + Sets the source reference on Chart Studio Cloud for + `color`. + width + Sets the width (in px) of the lines bounding the marker + points. + widthsrc + Sets the source reference on Chart Studio Cloud for + `width`. + """ + + def __init__( + self, arg=None, color=None, colorsrc=None, width=None, widthsrc=None, **kwargs + ): + """ + Construct a new Line object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.choroplethmap.marker.Line` + color + Sets the marker.line color. It accepts either a + specific color or an array of numbers that are mapped + to the colorscale relative to the max and min values of + the array or relative to `marker.line.cmin` and + `marker.line.cmax` if set. + colorsrc + Sets the source reference on Chart Studio Cloud for + `color`. + width + Sets the width (in px) of the lines bounding the marker + points. + widthsrc + Sets the source reference on Chart Studio Cloud for + `width`. + + Returns + ------- + Line + """ + super().__init__("line") + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + if arg is None: + arg = {} + elif isinstance(arg, self.__class__): + arg = arg.to_plotly_json() + elif isinstance(arg, dict): + arg = _copy.copy(arg) + else: + raise ValueError("""\ +The first argument to the plotly.graph_objs.choroplethmap.marker.Line +constructor must be a dict or +an instance of :class:`plotly.graph_objs.choroplethmap.marker.Line`""") + + self._skip_invalid = kwargs.pop("skip_invalid", False) + self._validate = kwargs.pop("_validate", True) + + self._set_property("color", arg, color) + self._set_property("colorsrc", arg, colorsrc) + self._set_property("width", arg, width) + self._set_property("widthsrc", arg, widthsrc) + self._process_kwargs(**dict(arg, **kwargs)) + self._skip_invalid = False diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/choroplethmap/selected/.___init__.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/choroplethmap/selected/.___init__.py new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/choroplethmap/selected/.___init__.py differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/choroplethmap/selected/.___pycache__ b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/choroplethmap/selected/.___pycache__ new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/choroplethmap/selected/.___pycache__ differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/choroplethmap/selected/.__marker.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/choroplethmap/selected/.__marker.py new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/choroplethmap/selected/.__marker.py differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/choroplethmap/selected/__init__.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/choroplethmap/selected/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..b4ba7bf2614e6c8f6fce41321172f465c59ab433 --- /dev/null +++ b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/choroplethmap/selected/__init__.py @@ -0,0 +1,9 @@ +import sys +from typing import TYPE_CHECKING + +if TYPE_CHECKING: + from ._marker import Marker +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import(__name__, [], ["._marker.Marker"]) diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/choroplethmap/selected/_marker.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/choroplethmap/selected/_marker.py new file mode 100644 index 0000000000000000000000000000000000000000..9f254a9bc18a21e06764b145744afe86e2846879 --- /dev/null +++ b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/choroplethmap/selected/_marker.py @@ -0,0 +1,77 @@ +# --- THIS FILE IS AUTO-GENERATED --- +# Modifications will be overwitten the next time code generation run. + +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Marker(_BaseTraceHierarchyType): + _parent_path_str = "choroplethmap.selected" + _path_str = "choroplethmap.selected.marker" + _valid_props = {"opacity"} + + @property + def opacity(self): + """ + Sets the marker opacity of selected points. + + The 'opacity' property is a number and may be specified as: + - An int or float in the interval [0, 1] + + Returns + ------- + int|float + """ + return self["opacity"] + + @opacity.setter + def opacity(self, val): + self["opacity"] = val + + @property + def _prop_descriptions(self): + return """\ + opacity + Sets the marker opacity of selected points. + """ + + def __init__(self, arg=None, opacity=None, **kwargs): + """ + Construct a new Marker object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of :class:`plotly.graph_objs.choroplethmap. + selected.Marker` + opacity + Sets the marker opacity of selected points. + + Returns + ------- + Marker + """ + super().__init__("marker") + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + if arg is None: + arg = {} + elif isinstance(arg, self.__class__): + arg = arg.to_plotly_json() + elif isinstance(arg, dict): + arg = _copy.copy(arg) + else: + raise ValueError("""\ +The first argument to the plotly.graph_objs.choroplethmap.selected.Marker +constructor must be a dict or +an instance of :class:`plotly.graph_objs.choroplethmap.selected.Marker`""") + + self._skip_invalid = kwargs.pop("skip_invalid", False) + self._validate = kwargs.pop("_validate", True) + + self._set_property("opacity", arg, opacity) + self._process_kwargs(**dict(arg, **kwargs)) + self._skip_invalid = False diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/choroplethmap/unselected/.___init__.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/choroplethmap/unselected/.___init__.py new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/choroplethmap/unselected/.___init__.py differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/choroplethmap/unselected/.___pycache__ b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/choroplethmap/unselected/.___pycache__ new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/choroplethmap/unselected/.___pycache__ differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/choroplethmap/unselected/.__marker.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/choroplethmap/unselected/.__marker.py new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/choroplethmap/unselected/.__marker.py differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/choroplethmap/unselected/__init__.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/choroplethmap/unselected/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..b4ba7bf2614e6c8f6fce41321172f465c59ab433 --- /dev/null +++ b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/choroplethmap/unselected/__init__.py @@ -0,0 +1,9 @@ +import sys +from typing import TYPE_CHECKING + +if TYPE_CHECKING: + from ._marker import Marker +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import(__name__, [], ["._marker.Marker"]) diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/choroplethmap/unselected/_marker.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/choroplethmap/unselected/_marker.py new file mode 100644 index 0000000000000000000000000000000000000000..27e2a341abc305d84efdd3df71070b8dcb2fc22e --- /dev/null +++ b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/choroplethmap/unselected/_marker.py @@ -0,0 +1,80 @@ +# --- THIS FILE IS AUTO-GENERATED --- +# Modifications will be overwitten the next time code generation run. + +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Marker(_BaseTraceHierarchyType): + _parent_path_str = "choroplethmap.unselected" + _path_str = "choroplethmap.unselected.marker" + _valid_props = {"opacity"} + + @property + def opacity(self): + """ + Sets the marker opacity of unselected points, applied only when + a selection exists. + + The 'opacity' property is a number and may be specified as: + - An int or float in the interval [0, 1] + + Returns + ------- + int|float + """ + return self["opacity"] + + @opacity.setter + def opacity(self, val): + self["opacity"] = val + + @property + def _prop_descriptions(self): + return """\ + opacity + Sets the marker opacity of unselected points, applied + only when a selection exists. + """ + + def __init__(self, arg=None, opacity=None, **kwargs): + """ + Construct a new Marker object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of :class:`plotly.graph_objs.choroplethmap. + unselected.Marker` + opacity + Sets the marker opacity of unselected points, applied + only when a selection exists. + + Returns + ------- + Marker + """ + super().__init__("marker") + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + if arg is None: + arg = {} + elif isinstance(arg, self.__class__): + arg = arg.to_plotly_json() + elif isinstance(arg, dict): + arg = _copy.copy(arg) + else: + raise ValueError("""\ +The first argument to the plotly.graph_objs.choroplethmap.unselected.Marker +constructor must be a dict or +an instance of :class:`plotly.graph_objs.choroplethmap.unselected.Marker`""") + + self._skip_invalid = kwargs.pop("skip_invalid", False) + self._validate = kwargs.pop("_validate", True) + + self._set_property("opacity", arg, opacity) + self._process_kwargs(**dict(arg, **kwargs)) + self._skip_invalid = False diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/choroplethmapbox/.___init__.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/choroplethmapbox/.___init__.py new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/choroplethmapbox/.___init__.py differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/choroplethmapbox/.___pycache__ b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/choroplethmapbox/.___pycache__ new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/choroplethmapbox/.___pycache__ differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/choroplethmapbox/.__colorbar.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/choroplethmapbox/.__colorbar.py new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/choroplethmapbox/.__colorbar.py differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/choroplethmapbox/.__hoverlabel.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/choroplethmapbox/.__hoverlabel.py new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/choroplethmapbox/.__hoverlabel.py differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/choroplethmapbox/.__legendgrouptitle.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/choroplethmapbox/.__legendgrouptitle.py new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/choroplethmapbox/.__legendgrouptitle.py differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/choroplethmapbox/.__marker.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/choroplethmapbox/.__marker.py new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/choroplethmapbox/.__marker.py differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/choroplethmapbox/.__selected.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/choroplethmapbox/.__selected.py new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/choroplethmapbox/.__selected.py differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/choroplethmapbox/.__stream.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/choroplethmapbox/.__stream.py new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/choroplethmapbox/.__stream.py differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/choroplethmapbox/.__unselected.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/choroplethmapbox/.__unselected.py new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/choroplethmapbox/.__unselected.py differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/choroplethmapbox/._colorbar b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/choroplethmapbox/._colorbar new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/choroplethmapbox/._colorbar differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/choroplethmapbox/._hoverlabel b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/choroplethmapbox/._hoverlabel new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/choroplethmapbox/._hoverlabel differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/choroplethmapbox/._legendgrouptitle b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/choroplethmapbox/._legendgrouptitle new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/choroplethmapbox/._legendgrouptitle differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/choroplethmapbox/._marker b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/choroplethmapbox/._marker new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/choroplethmapbox/._marker differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/choroplethmapbox/._selected b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/choroplethmapbox/._selected new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/choroplethmapbox/._selected differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/choroplethmapbox/._unselected b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/choroplethmapbox/._unselected new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/choroplethmapbox/._unselected differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/choroplethmapbox/__init__.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/choroplethmapbox/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..bbdf79a35a765428a67b80fc7e9703117398bc32 --- /dev/null +++ b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/choroplethmapbox/__init__.py @@ -0,0 +1,40 @@ +import sys +from typing import TYPE_CHECKING + +if TYPE_CHECKING: + from ._colorbar import ColorBar + from ._hoverlabel import Hoverlabel + from ._legendgrouptitle import Legendgrouptitle + from ._marker import Marker + from ._selected import Selected + from ._stream import Stream + from ._unselected import Unselected + from . import colorbar + from . import hoverlabel + from . import legendgrouptitle + from . import marker + from . import selected + from . import unselected +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [ + ".colorbar", + ".hoverlabel", + ".legendgrouptitle", + ".marker", + ".selected", + ".unselected", + ], + [ + "._colorbar.ColorBar", + "._hoverlabel.Hoverlabel", + "._legendgrouptitle.Legendgrouptitle", + "._marker.Marker", + "._selected.Selected", + "._stream.Stream", + "._unselected.Unselected", + ], + ) diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/choroplethmapbox/_colorbar.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/choroplethmapbox/_colorbar.py new file mode 100644 index 0000000000000000000000000000000000000000..b5df84e382fd0b78e13d9bba8cb0434b64896c73 --- /dev/null +++ b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/choroplethmapbox/_colorbar.py @@ -0,0 +1,1739 @@ +# --- THIS FILE IS AUTO-GENERATED --- +# Modifications will be overwitten the next time code generation run. + +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class ColorBar(_BaseTraceHierarchyType): + _parent_path_str = "choroplethmapbox" + _path_str = "choroplethmapbox.colorbar" + _valid_props = { + "bgcolor", + "bordercolor", + "borderwidth", + "dtick", + "exponentformat", + "labelalias", + "len", + "lenmode", + "minexponent", + "nticks", + "orientation", + "outlinecolor", + "outlinewidth", + "separatethousands", + "showexponent", + "showticklabels", + "showtickprefix", + "showticksuffix", + "thickness", + "thicknessmode", + "tick0", + "tickangle", + "tickcolor", + "tickfont", + "tickformat", + "tickformatstopdefaults", + "tickformatstops", + "ticklabeloverflow", + "ticklabelposition", + "ticklabelstep", + "ticklen", + "tickmode", + "tickprefix", + "ticks", + "ticksuffix", + "ticktext", + "ticktextsrc", + "tickvals", + "tickvalssrc", + "tickwidth", + "title", + "x", + "xanchor", + "xpad", + "xref", + "y", + "yanchor", + "ypad", + "yref", + } + + @property + def bgcolor(self): + """ + Sets the color of padded area. + + The 'bgcolor' property is a color and may be specified as: + - A hex string (e.g. '#ff0000') + - An rgb/rgba string (e.g. 'rgb(255,0,0)') + - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') + - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') + - A named CSS color: see https://plotly.com/python/css-colors/ for a list + + Returns + ------- + str + """ + return self["bgcolor"] + + @bgcolor.setter + def bgcolor(self, val): + self["bgcolor"] = val + + @property + def bordercolor(self): + """ + Sets the axis line color. + + The 'bordercolor' property is a color and may be specified as: + - A hex string (e.g. '#ff0000') + - An rgb/rgba string (e.g. 'rgb(255,0,0)') + - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') + - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') + - A named CSS color: see https://plotly.com/python/css-colors/ for a list + + Returns + ------- + str + """ + return self["bordercolor"] + + @bordercolor.setter + def bordercolor(self, val): + self["bordercolor"] = val + + @property + def borderwidth(self): + """ + Sets the width (in px) or the border enclosing this color bar. + + The 'borderwidth' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["borderwidth"] + + @borderwidth.setter + def borderwidth(self, val): + self["borderwidth"] = val + + @property + def dtick(self): + """ + Sets the step in-between ticks on this axis. Use with `tick0`. + Must be a positive number, or special strings available to + "log" and "date" axes. If the axis `type` is "log", then ticks + are set every 10^(n*dtick) where n is the tick number. For + example, to set a tick mark at 1, 10, 100, 1000, ... set dtick + to 1. To set tick marks at 1, 100, 10000, ... set dtick to 2. + To set tick marks at 1, 5, 25, 125, 625, 3125, ... set dtick to + log_10(5), or 0.69897000433. "log" has several special values; + "L", where `f` is a positive number, gives ticks linearly + spaced in value (but not position). For example `tick0` = 0.1, + `dtick` = "L0.5" will put ticks at 0.1, 0.6, 1.1, 1.6 etc. To + show powers of 10 plus small digits between, use "D1" (all + digits) or "D2" (only 2 and 5). `tick0` is ignored for "D1" and + "D2". If the axis `type` is "date", then you must convert the + time to milliseconds. For example, to set the interval between + ticks to one day, set `dtick` to 86400000.0. "date" also has + special values "M" gives ticks spaced by a number of months. + `n` must be a positive integer. To set ticks on the 15th of + every third month, set `tick0` to "2000-01-15" and `dtick` to + "M3". To set ticks every 4 years, set `dtick` to "M48" + + The 'dtick' property accepts values of any type + + Returns + ------- + Any + """ + return self["dtick"] + + @dtick.setter + def dtick(self, val): + self["dtick"] = val + + @property + def exponentformat(self): + """ + Determines a formatting rule for the tick exponents. For + example, consider the number 1,000,000,000. If "none", it + appears as 1,000,000,000. If "e", 1e+9. If "E", 1E+9. If + "power", 1x10^9 (with 9 in a super script). If "SI", 1G. If + "B", 1B. "SI" uses prefixes from "femto" f (10^-15) to "tera" T + (10^12). *SI extended* covers instead the full SI range from + "quecto" q (10^-30) to "quetta" Q (10^30). If "SI" or *SI + extended* is used and the exponent is beyond the above ranges, + the formatting rule will automatically be switched to the power + notation. + + The 'exponentformat' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['none', 'e', 'E', 'power', 'SI', 'B', 'SI extended'] + + Returns + ------- + Any + """ + return self["exponentformat"] + + @exponentformat.setter + def exponentformat(self, val): + self["exponentformat"] = val + + @property + def labelalias(self): + """ + Replacement text for specific tick or hover labels. For example + using {US: 'USA', CA: 'Canada'} changes US to USA and CA to + Canada. The labels we would have shown must match the keys + exactly, after adding any tickprefix or ticksuffix. For + negative numbers the minus sign symbol used (U+2212) is wider + than the regular ascii dash. That means you need to use −1 + instead of -1. labelalias can be used with any axis type, and + both keys (if needed) and values (if desired) can include html- + like tags or MathJax. + + The 'labelalias' property accepts values of any type + + Returns + ------- + Any + """ + return self["labelalias"] + + @labelalias.setter + def labelalias(self, val): + self["labelalias"] = val + + @property + def len(self): + """ + Sets the length of the color bar This measure excludes the + padding of both ends. That is, the color bar length is this + length minus the padding on both ends. + + The 'len' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["len"] + + @len.setter + def len(self, val): + self["len"] = val + + @property + def lenmode(self): + """ + Determines whether this color bar's length (i.e. the measure in + the color variation direction) is set in units of plot + "fraction" or in *pixels. Use `len` to set the value. + + The 'lenmode' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['fraction', 'pixels'] + + Returns + ------- + Any + """ + return self["lenmode"] + + @lenmode.setter + def lenmode(self, val): + self["lenmode"] = val + + @property + def minexponent(self): + """ + Hide SI prefix for 10^n if |n| is below this number. This only + has an effect when `tickformat` is "SI" or "B". + + The 'minexponent' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["minexponent"] + + @minexponent.setter + def minexponent(self, val): + self["minexponent"] = val + + @property + def nticks(self): + """ + Specifies the maximum number of ticks for the particular axis. + The actual number of ticks will be chosen automatically to be + less than or equal to `nticks`. Has an effect only if + `tickmode` is set to "auto". + + The 'nticks' property is a integer and may be specified as: + - An int (or float that will be cast to an int) + in the interval [0, 9223372036854775807] + + Returns + ------- + int + """ + return self["nticks"] + + @nticks.setter + def nticks(self, val): + self["nticks"] = val + + @property + def orientation(self): + """ + Sets the orientation of the colorbar. + + The 'orientation' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['h', 'v'] + + Returns + ------- + Any + """ + return self["orientation"] + + @orientation.setter + def orientation(self, val): + self["orientation"] = val + + @property + def outlinecolor(self): + """ + Sets the axis line color. + + The 'outlinecolor' property is a color and may be specified as: + - A hex string (e.g. '#ff0000') + - An rgb/rgba string (e.g. 'rgb(255,0,0)') + - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') + - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') + - A named CSS color: see https://plotly.com/python/css-colors/ for a list + + Returns + ------- + str + """ + return self["outlinecolor"] + + @outlinecolor.setter + def outlinecolor(self, val): + self["outlinecolor"] = val + + @property + def outlinewidth(self): + """ + Sets the width (in px) of the axis line. + + The 'outlinewidth' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["outlinewidth"] + + @outlinewidth.setter + def outlinewidth(self, val): + self["outlinewidth"] = val + + @property + def separatethousands(self): + """ + If "true", even 4-digit integers are separated + + The 'separatethousands' property is a boolean and must be specified as: + - A boolean value: True or False + + Returns + ------- + bool + """ + return self["separatethousands"] + + @separatethousands.setter + def separatethousands(self, val): + self["separatethousands"] = val + + @property + def showexponent(self): + """ + If "all", all exponents are shown besides their significands. + If "first", only the exponent of the first tick is shown. If + "last", only the exponent of the last tick is shown. If "none", + no exponents appear. + + The 'showexponent' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['all', 'first', 'last', 'none'] + + Returns + ------- + Any + """ + return self["showexponent"] + + @showexponent.setter + def showexponent(self, val): + self["showexponent"] = val + + @property + def showticklabels(self): + """ + Determines whether or not the tick labels are drawn. + + The 'showticklabels' property is a boolean and must be specified as: + - A boolean value: True or False + + Returns + ------- + bool + """ + return self["showticklabels"] + + @showticklabels.setter + def showticklabels(self, val): + self["showticklabels"] = val + + @property + def showtickprefix(self): + """ + If "all", all tick labels are displayed with a prefix. If + "first", only the first tick is displayed with a prefix. If + "last", only the last tick is displayed with a suffix. If + "none", tick prefixes are hidden. + + The 'showtickprefix' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['all', 'first', 'last', 'none'] + + Returns + ------- + Any + """ + return self["showtickprefix"] + + @showtickprefix.setter + def showtickprefix(self, val): + self["showtickprefix"] = val + + @property + def showticksuffix(self): + """ + Same as `showtickprefix` but for tick suffixes. + + The 'showticksuffix' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['all', 'first', 'last', 'none'] + + Returns + ------- + Any + """ + return self["showticksuffix"] + + @showticksuffix.setter + def showticksuffix(self, val): + self["showticksuffix"] = val + + @property + def thickness(self): + """ + Sets the thickness of the color bar This measure excludes the + size of the padding, ticks and labels. + + The 'thickness' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["thickness"] + + @thickness.setter + def thickness(self, val): + self["thickness"] = val + + @property + def thicknessmode(self): + """ + Determines whether this color bar's thickness (i.e. the measure + in the constant color direction) is set in units of plot + "fraction" or in "pixels". Use `thickness` to set the value. + + The 'thicknessmode' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['fraction', 'pixels'] + + Returns + ------- + Any + """ + return self["thicknessmode"] + + @thicknessmode.setter + def thicknessmode(self, val): + self["thicknessmode"] = val + + @property + def tick0(self): + """ + Sets the placement of the first tick on this axis. Use with + `dtick`. If the axis `type` is "log", then you must take the + log of your starting tick (e.g. to set the starting tick to + 100, set the `tick0` to 2) except when `dtick`=*L* (see + `dtick` for more info). If the axis `type` is "date", it should + be a date string, like date data. If the axis `type` is + "category", it should be a number, using the scale where each + category is assigned a serial number from zero in the order it + appears. + + The 'tick0' property accepts values of any type + + Returns + ------- + Any + """ + return self["tick0"] + + @tick0.setter + def tick0(self, val): + self["tick0"] = val + + @property + def tickangle(self): + """ + Sets the angle of the tick labels with respect to the + horizontal. For example, a `tickangle` of -90 draws the tick + labels vertically. + + The 'tickangle' property is a angle (in degrees) that may be + specified as a number between -180 and 180. + Numeric values outside this range are converted to the equivalent value + (e.g. 270 is converted to -90). + + Returns + ------- + int|float + """ + return self["tickangle"] + + @tickangle.setter + def tickangle(self, val): + self["tickangle"] = val + + @property + def tickcolor(self): + """ + Sets the tick color. + + The 'tickcolor' property is a color and may be specified as: + - A hex string (e.g. '#ff0000') + - An rgb/rgba string (e.g. 'rgb(255,0,0)') + - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') + - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') + - A named CSS color: see https://plotly.com/python/css-colors/ for a list + + Returns + ------- + str + """ + return self["tickcolor"] + + @tickcolor.setter + def tickcolor(self, val): + self["tickcolor"] = val + + @property + def tickfont(self): + """ + Sets the color bar's tick label font + + The 'tickfont' property is an instance of Tickfont + that may be specified as: + - An instance of :class:`plotly.graph_objs.choroplethmapbox.colorbar.Tickfont` + - A dict of string/value properties that will be passed + to the Tickfont constructor + + Returns + ------- + plotly.graph_objs.choroplethmapbox.colorbar.Tickfont + """ + return self["tickfont"] + + @tickfont.setter + def tickfont(self, val): + self["tickfont"] = val + + @property + def tickformat(self): + """ + Sets the tick label formatting rule using d3 formatting mini- + languages which are very similar to those in Python. For + numbers, see: + https://github.com/d3/d3-format/tree/v1.4.5#d3-format. And for + dates see: https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format. We add two items to d3's date + formatter: "%h" for half of the year as a decimal number as + well as "%{n}f" for fractional seconds with n digits. For + example, *2016-10-13 09:15:23.456* with tickformat + "%H~%M~%S.%2f" would display "09~15~23.46" + + The 'tickformat' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["tickformat"] + + @tickformat.setter + def tickformat(self, val): + self["tickformat"] = val + + @property + def tickformatstops(self): + """ + The 'tickformatstops' property is a tuple of instances of + Tickformatstop that may be specified as: + - A list or tuple of instances of plotly.graph_objs.choroplethmapbox.colorbar.Tickformatstop + - A list or tuple of dicts of string/value properties that + will be passed to the Tickformatstop constructor + + Returns + ------- + tuple[plotly.graph_objs.choroplethmapbox.colorbar.Tickformatstop] + """ + return self["tickformatstops"] + + @tickformatstops.setter + def tickformatstops(self, val): + self["tickformatstops"] = val + + @property + def tickformatstopdefaults(self): + """ + When used in a template (as layout.template.data.choroplethmapb + ox.colorbar.tickformatstopdefaults), sets the default property + values to use for elements of + choroplethmapbox.colorbar.tickformatstops + + The 'tickformatstopdefaults' property is an instance of Tickformatstop + that may be specified as: + - An instance of :class:`plotly.graph_objs.choroplethmapbox.colorbar.Tickformatstop` + - A dict of string/value properties that will be passed + to the Tickformatstop constructor + + Returns + ------- + plotly.graph_objs.choroplethmapbox.colorbar.Tickformatstop + """ + return self["tickformatstopdefaults"] + + @tickformatstopdefaults.setter + def tickformatstopdefaults(self, val): + self["tickformatstopdefaults"] = val + + @property + def ticklabeloverflow(self): + """ + Determines how we handle tick labels that would overflow either + the graph div or the domain of the axis. The default value for + inside tick labels is *hide past domain*. In other cases the + default is *hide past div*. + + The 'ticklabeloverflow' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['allow', 'hide past div', 'hide past domain'] + + Returns + ------- + Any + """ + return self["ticklabeloverflow"] + + @ticklabeloverflow.setter + def ticklabeloverflow(self, val): + self["ticklabeloverflow"] = val + + @property + def ticklabelposition(self): + """ + Determines where tick labels are drawn relative to the ticks. + Left and right options are used when `orientation` is "h", top + and bottom when `orientation` is "v". + + The 'ticklabelposition' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['outside', 'inside', 'outside top', 'inside top', + 'outside left', 'inside left', 'outside right', 'inside + right', 'outside bottom', 'inside bottom'] + + Returns + ------- + Any + """ + return self["ticklabelposition"] + + @ticklabelposition.setter + def ticklabelposition(self, val): + self["ticklabelposition"] = val + + @property + def ticklabelstep(self): + """ + Sets the spacing between tick labels as compared to the spacing + between ticks. A value of 1 (default) means each tick gets a + label. A value of 2 means shows every 2nd label. A larger value + n means only every nth tick is labeled. `tick0` determines + which labels are shown. Not implemented for axes with `type` + "log" or "multicategory", or when `tickmode` is "array". + + The 'ticklabelstep' property is a integer and may be specified as: + - An int (or float that will be cast to an int) + in the interval [1, 9223372036854775807] + + Returns + ------- + int + """ + return self["ticklabelstep"] + + @ticklabelstep.setter + def ticklabelstep(self, val): + self["ticklabelstep"] = val + + @property + def ticklen(self): + """ + Sets the tick length (in px). + + The 'ticklen' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["ticklen"] + + @ticklen.setter + def ticklen(self, val): + self["ticklen"] = val + + @property + def tickmode(self): + """ + Sets the tick mode for this axis. If "auto", the number of + ticks is set via `nticks`. If "linear", the placement of the + ticks is determined by a starting position `tick0` and a tick + step `dtick` ("linear" is the default value if `tick0` and + `dtick` are provided). If "array", the placement of the ticks + is set via `tickvals` and the tick text is `ticktext`. ("array" + is the default value if `tickvals` is provided). + + The 'tickmode' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['auto', 'linear', 'array'] + + Returns + ------- + Any + """ + return self["tickmode"] + + @tickmode.setter + def tickmode(self, val): + self["tickmode"] = val + + @property + def tickprefix(self): + """ + Sets a tick label prefix. + + The 'tickprefix' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["tickprefix"] + + @tickprefix.setter + def tickprefix(self, val): + self["tickprefix"] = val + + @property + def ticks(self): + """ + Determines whether ticks are drawn or not. If "", this axis' + ticks are not drawn. If "outside" ("inside"), this axis' are + drawn outside (inside) the axis lines. + + The 'ticks' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['outside', 'inside', ''] + + Returns + ------- + Any + """ + return self["ticks"] + + @ticks.setter + def ticks(self, val): + self["ticks"] = val + + @property + def ticksuffix(self): + """ + Sets a tick label suffix. + + The 'ticksuffix' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["ticksuffix"] + + @ticksuffix.setter + def ticksuffix(self, val): + self["ticksuffix"] = val + + @property + def ticktext(self): + """ + Sets the text displayed at the ticks position via `tickvals`. + Only has an effect if `tickmode` is set to "array". Used with + `tickvals`. + + The 'ticktext' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["ticktext"] + + @ticktext.setter + def ticktext(self, val): + self["ticktext"] = val + + @property + def ticktextsrc(self): + """ + Sets the source reference on Chart Studio Cloud for `ticktext`. + + The 'ticktextsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["ticktextsrc"] + + @ticktextsrc.setter + def ticktextsrc(self, val): + self["ticktextsrc"] = val + + @property + def tickvals(self): + """ + Sets the values at which ticks on this axis appear. Only has an + effect if `tickmode` is set to "array". Used with `ticktext`. + + The 'tickvals' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["tickvals"] + + @tickvals.setter + def tickvals(self, val): + self["tickvals"] = val + + @property + def tickvalssrc(self): + """ + Sets the source reference on Chart Studio Cloud for `tickvals`. + + The 'tickvalssrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["tickvalssrc"] + + @tickvalssrc.setter + def tickvalssrc(self, val): + self["tickvalssrc"] = val + + @property + def tickwidth(self): + """ + Sets the tick width (in px). + + The 'tickwidth' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["tickwidth"] + + @tickwidth.setter + def tickwidth(self, val): + self["tickwidth"] = val + + @property + def title(self): + """ + The 'title' property is an instance of Title + that may be specified as: + - An instance of :class:`plotly.graph_objs.choroplethmapbox.colorbar.Title` + - A dict of string/value properties that will be passed + to the Title constructor + + Returns + ------- + plotly.graph_objs.choroplethmapbox.colorbar.Title + """ + return self["title"] + + @title.setter + def title(self, val): + self["title"] = val + + @property + def x(self): + """ + Sets the x position with respect to `xref` of the color bar (in + plot fraction). When `xref` is "paper", defaults to 1.02 when + `orientation` is "v" and 0.5 when `orientation` is "h". When + `xref` is "container", defaults to 1 when `orientation` is "v" + and 0.5 when `orientation` is "h". Must be between 0 and 1 if + `xref` is "container" and between "-2" and 3 if `xref` is + "paper". + + The 'x' property is a number and may be specified as: + - An int or float + + Returns + ------- + int|float + """ + return self["x"] + + @x.setter + def x(self, val): + self["x"] = val + + @property + def xanchor(self): + """ + Sets this color bar's horizontal position anchor. This anchor + binds the `x` position to the "left", "center" or "right" of + the color bar. Defaults to "left" when `orientation` is "v" and + "center" when `orientation` is "h". + + The 'xanchor' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['left', 'center', 'right'] + + Returns + ------- + Any + """ + return self["xanchor"] + + @xanchor.setter + def xanchor(self, val): + self["xanchor"] = val + + @property + def xpad(self): + """ + Sets the amount of padding (in px) along the x direction. + + The 'xpad' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["xpad"] + + @xpad.setter + def xpad(self, val): + self["xpad"] = val + + @property + def xref(self): + """ + Sets the container `x` refers to. "container" spans the entire + `width` of the plot. "paper" refers to the width of the + plotting area only. + + The 'xref' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['container', 'paper'] + + Returns + ------- + Any + """ + return self["xref"] + + @xref.setter + def xref(self, val): + self["xref"] = val + + @property + def y(self): + """ + Sets the y position with respect to `yref` of the color bar (in + plot fraction). When `yref` is "paper", defaults to 0.5 when + `orientation` is "v" and 1.02 when `orientation` is "h". When + `yref` is "container", defaults to 0.5 when `orientation` is + "v" and 1 when `orientation` is "h". Must be between 0 and 1 if + `yref` is "container" and between "-2" and 3 if `yref` is + "paper". + + The 'y' property is a number and may be specified as: + - An int or float + + Returns + ------- + int|float + """ + return self["y"] + + @y.setter + def y(self, val): + self["y"] = val + + @property + def yanchor(self): + """ + Sets this color bar's vertical position anchor This anchor + binds the `y` position to the "top", "middle" or "bottom" of + the color bar. Defaults to "middle" when `orientation` is "v" + and "bottom" when `orientation` is "h". + + The 'yanchor' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['top', 'middle', 'bottom'] + + Returns + ------- + Any + """ + return self["yanchor"] + + @yanchor.setter + def yanchor(self, val): + self["yanchor"] = val + + @property + def ypad(self): + """ + Sets the amount of padding (in px) along the y direction. + + The 'ypad' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["ypad"] + + @ypad.setter + def ypad(self, val): + self["ypad"] = val + + @property + def yref(self): + """ + Sets the container `y` refers to. "container" spans the entire + `height` of the plot. "paper" refers to the height of the + plotting area only. + + The 'yref' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['container', 'paper'] + + Returns + ------- + Any + """ + return self["yref"] + + @yref.setter + def yref(self, val): + self["yref"] = val + + @property + def _prop_descriptions(self): + return """\ + bgcolor + Sets the color of padded area. + bordercolor + Sets the axis line color. + borderwidth + Sets the width (in px) or the border enclosing this + color bar. + dtick + Sets the step in-between ticks on this axis. Use with + `tick0`. Must be a positive number, or special strings + available to "log" and "date" axes. If the axis `type` + is "log", then ticks are set every 10^(n*dtick) where n + is the tick number. For example, to set a tick mark at + 1, 10, 100, 1000, ... set dtick to 1. To set tick marks + at 1, 100, 10000, ... set dtick to 2. To set tick marks + at 1, 5, 25, 125, 625, 3125, ... set dtick to + log_10(5), or 0.69897000433. "log" has several special + values; "L", where `f` is a positive number, gives + ticks linearly spaced in value (but not position). For + example `tick0` = 0.1, `dtick` = "L0.5" will put ticks + at 0.1, 0.6, 1.1, 1.6 etc. To show powers of 10 plus + small digits between, use "D1" (all digits) or "D2" + (only 2 and 5). `tick0` is ignored for "D1" and "D2". + If the axis `type` is "date", then you must convert the + time to milliseconds. For example, to set the interval + between ticks to one day, set `dtick` to 86400000.0. + "date" also has special values "M" gives ticks + spaced by a number of months. `n` must be a positive + integer. To set ticks on the 15th of every third month, + set `tick0` to "2000-01-15" and `dtick` to "M3". To set + ticks every 4 years, set `dtick` to "M48" + exponentformat + Determines a formatting rule for the tick exponents. + For example, consider the number 1,000,000,000. If + "none", it appears as 1,000,000,000. If "e", 1e+9. If + "E", 1E+9. If "power", 1x10^9 (with 9 in a super + script). If "SI", 1G. If "B", 1B. "SI" uses prefixes + from "femto" f (10^-15) to "tera" T (10^12). *SI + extended* covers instead the full SI range from + "quecto" q (10^-30) to "quetta" Q (10^30). If "SI" or + *SI extended* is used and the exponent is beyond the + above ranges, the formatting rule will automatically be + switched to the power notation. + labelalias + Replacement text for specific tick or hover labels. For + example using {US: 'USA', CA: 'Canada'} changes US to + USA and CA to Canada. The labels we would have shown + must match the keys exactly, after adding any + tickprefix or ticksuffix. For negative numbers the + minus sign symbol used (U+2212) is wider than the + regular ascii dash. That means you need to use −1 + instead of -1. labelalias can be used with any axis + type, and both keys (if needed) and values (if desired) + can include html-like tags or MathJax. + len + Sets the length of the color bar This measure excludes + the padding of both ends. That is, the color bar length + is this length minus the padding on both ends. + lenmode + Determines whether this color bar's length (i.e. the + measure in the color variation direction) is set in + units of plot "fraction" or in *pixels. Use `len` to + set the value. + minexponent + Hide SI prefix for 10^n if |n| is below this number. + This only has an effect when `tickformat` is "SI" or + "B". + nticks + Specifies the maximum number of ticks for the + particular axis. The actual number of ticks will be + chosen automatically to be less than or equal to + `nticks`. Has an effect only if `tickmode` is set to + "auto". + orientation + Sets the orientation of the colorbar. + outlinecolor + Sets the axis line color. + outlinewidth + Sets the width (in px) of the axis line. + separatethousands + If "true", even 4-digit integers are separated + showexponent + If "all", all exponents are shown besides their + significands. If "first", only the exponent of the + first tick is shown. If "last", only the exponent of + the last tick is shown. If "none", no exponents appear. + showticklabels + Determines whether or not the tick labels are drawn. + showtickprefix + If "all", all tick labels are displayed with a prefix. + If "first", only the first tick is displayed with a + prefix. If "last", only the last tick is displayed with + a suffix. If "none", tick prefixes are hidden. + showticksuffix + Same as `showtickprefix` but for tick suffixes. + thickness + Sets the thickness of the color bar This measure + excludes the size of the padding, ticks and labels. + thicknessmode + Determines whether this color bar's thickness (i.e. the + measure in the constant color direction) is set in + units of plot "fraction" or in "pixels". Use + `thickness` to set the value. + tick0 + Sets the placement of the first tick on this axis. Use + with `dtick`. If the axis `type` is "log", then you + must take the log of your starting tick (e.g. to set + the starting tick to 100, set the `tick0` to 2) except + when `dtick`=*L* (see `dtick` for more info). If the + axis `type` is "date", it should be a date string, like + date data. If the axis `type` is "category", it should + be a number, using the scale where each category is + assigned a serial number from zero in the order it + appears. + tickangle + Sets the angle of the tick labels with respect to the + horizontal. For example, a `tickangle` of -90 draws the + tick labels vertically. + tickcolor + Sets the tick color. + tickfont + Sets the color bar's tick label font + tickformat + Sets the tick label formatting rule using d3 formatting + mini-languages which are very similar to those in + Python. For numbers, see: + https://github.com/d3/d3-format/tree/v1.4.5#d3-format. + And for dates see: https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format. We add two items to + d3's date formatter: "%h" for half of the year as a + decimal number as well as "%{n}f" for fractional + seconds with n digits. For example, *2016-10-13 + 09:15:23.456* with tickformat "%H~%M~%S.%2f" would + display "09~15~23.46" + tickformatstops + A tuple of :class:`plotly.graph_objects.choroplethmapbo + x.colorbar.Tickformatstop` instances or dicts with + compatible properties + tickformatstopdefaults + When used in a template (as layout.template.data.chorop + lethmapbox.colorbar.tickformatstopdefaults), sets the + default property values to use for elements of + choroplethmapbox.colorbar.tickformatstops + ticklabeloverflow + Determines how we handle tick labels that would + overflow either the graph div or the domain of the + axis. The default value for inside tick labels is *hide + past domain*. In other cases the default is *hide past + div*. + ticklabelposition + Determines where tick labels are drawn relative to the + ticks. Left and right options are used when + `orientation` is "h", top and bottom when `orientation` + is "v". + ticklabelstep + Sets the spacing between tick labels as compared to the + spacing between ticks. A value of 1 (default) means + each tick gets a label. A value of 2 means shows every + 2nd label. A larger value n means only every nth tick + is labeled. `tick0` determines which labels are shown. + Not implemented for axes with `type` "log" or + "multicategory", or when `tickmode` is "array". + ticklen + Sets the tick length (in px). + tickmode + Sets the tick mode for this axis. If "auto", the number + of ticks is set via `nticks`. If "linear", the + placement of the ticks is determined by a starting + position `tick0` and a tick step `dtick` ("linear" is + the default value if `tick0` and `dtick` are provided). + If "array", the placement of the ticks is set via + `tickvals` and the tick text is `ticktext`. ("array" is + the default value if `tickvals` is provided). + tickprefix + Sets a tick label prefix. + ticks + Determines whether ticks are drawn or not. If "", this + axis' ticks are not drawn. If "outside" ("inside"), + this axis' are drawn outside (inside) the axis lines. + ticksuffix + Sets a tick label suffix. + ticktext + Sets the text displayed at the ticks position via + `tickvals`. Only has an effect if `tickmode` is set to + "array". Used with `tickvals`. + ticktextsrc + Sets the source reference on Chart Studio Cloud for + `ticktext`. + tickvals + Sets the values at which ticks on this axis appear. + Only has an effect if `tickmode` is set to "array". + Used with `ticktext`. + tickvalssrc + Sets the source reference on Chart Studio Cloud for + `tickvals`. + tickwidth + Sets the tick width (in px). + title + :class:`plotly.graph_objects.choroplethmapbox.colorbar. + Title` instance or dict with compatible properties + x + Sets the x position with respect to `xref` of the color + bar (in plot fraction). When `xref` is "paper", + defaults to 1.02 when `orientation` is "v" and 0.5 when + `orientation` is "h". When `xref` is "container", + defaults to 1 when `orientation` is "v" and 0.5 when + `orientation` is "h". Must be between 0 and 1 if `xref` + is "container" and between "-2" and 3 if `xref` is + "paper". + xanchor + Sets this color bar's horizontal position anchor. This + anchor binds the `x` position to the "left", "center" + or "right" of the color bar. Defaults to "left" when + `orientation` is "v" and "center" when `orientation` is + "h". + xpad + Sets the amount of padding (in px) along the x + direction. + xref + Sets the container `x` refers to. "container" spans the + entire `width` of the plot. "paper" refers to the width + of the plotting area only. + y + Sets the y position with respect to `yref` of the color + bar (in plot fraction). When `yref` is "paper", + defaults to 0.5 when `orientation` is "v" and 1.02 when + `orientation` is "h". When `yref` is "container", + defaults to 0.5 when `orientation` is "v" and 1 when + `orientation` is "h". Must be between 0 and 1 if `yref` + is "container" and between "-2" and 3 if `yref` is + "paper". + yanchor + Sets this color bar's vertical position anchor This + anchor binds the `y` position to the "top", "middle" or + "bottom" of the color bar. Defaults to "middle" when + `orientation` is "v" and "bottom" when `orientation` is + "h". + ypad + Sets the amount of padding (in px) along the y + direction. + yref + Sets the container `y` refers to. "container" spans the + entire `height` of the plot. "paper" refers to the + height of the plotting area only. + """ + + def __init__( + self, + arg=None, + bgcolor=None, + bordercolor=None, + borderwidth=None, + dtick=None, + exponentformat=None, + labelalias=None, + len=None, + lenmode=None, + minexponent=None, + nticks=None, + orientation=None, + outlinecolor=None, + outlinewidth=None, + separatethousands=None, + showexponent=None, + showticklabels=None, + showtickprefix=None, + showticksuffix=None, + thickness=None, + thicknessmode=None, + tick0=None, + tickangle=None, + tickcolor=None, + tickfont=None, + tickformat=None, + tickformatstops=None, + tickformatstopdefaults=None, + ticklabeloverflow=None, + ticklabelposition=None, + ticklabelstep=None, + ticklen=None, + tickmode=None, + tickprefix=None, + ticks=None, + ticksuffix=None, + ticktext=None, + ticktextsrc=None, + tickvals=None, + tickvalssrc=None, + tickwidth=None, + title=None, + x=None, + xanchor=None, + xpad=None, + xref=None, + y=None, + yanchor=None, + ypad=None, + yref=None, + **kwargs, + ): + """ + Construct a new ColorBar object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.choroplethmapbox.ColorBar` + bgcolor + Sets the color of padded area. + bordercolor + Sets the axis line color. + borderwidth + Sets the width (in px) or the border enclosing this + color bar. + dtick + Sets the step in-between ticks on this axis. Use with + `tick0`. Must be a positive number, or special strings + available to "log" and "date" axes. If the axis `type` + is "log", then ticks are set every 10^(n*dtick) where n + is the tick number. For example, to set a tick mark at + 1, 10, 100, 1000, ... set dtick to 1. To set tick marks + at 1, 100, 10000, ... set dtick to 2. To set tick marks + at 1, 5, 25, 125, 625, 3125, ... set dtick to + log_10(5), or 0.69897000433. "log" has several special + values; "L", where `f` is a positive number, gives + ticks linearly spaced in value (but not position). For + example `tick0` = 0.1, `dtick` = "L0.5" will put ticks + at 0.1, 0.6, 1.1, 1.6 etc. To show powers of 10 plus + small digits between, use "D1" (all digits) or "D2" + (only 2 and 5). `tick0` is ignored for "D1" and "D2". + If the axis `type` is "date", then you must convert the + time to milliseconds. For example, to set the interval + between ticks to one day, set `dtick` to 86400000.0. + "date" also has special values "M" gives ticks + spaced by a number of months. `n` must be a positive + integer. To set ticks on the 15th of every third month, + set `tick0` to "2000-01-15" and `dtick` to "M3". To set + ticks every 4 years, set `dtick` to "M48" + exponentformat + Determines a formatting rule for the tick exponents. + For example, consider the number 1,000,000,000. If + "none", it appears as 1,000,000,000. If "e", 1e+9. If + "E", 1E+9. If "power", 1x10^9 (with 9 in a super + script). If "SI", 1G. If "B", 1B. "SI" uses prefixes + from "femto" f (10^-15) to "tera" T (10^12). *SI + extended* covers instead the full SI range from + "quecto" q (10^-30) to "quetta" Q (10^30). If "SI" or + *SI extended* is used and the exponent is beyond the + above ranges, the formatting rule will automatically be + switched to the power notation. + labelalias + Replacement text for specific tick or hover labels. For + example using {US: 'USA', CA: 'Canada'} changes US to + USA and CA to Canada. The labels we would have shown + must match the keys exactly, after adding any + tickprefix or ticksuffix. For negative numbers the + minus sign symbol used (U+2212) is wider than the + regular ascii dash. That means you need to use −1 + instead of -1. labelalias can be used with any axis + type, and both keys (if needed) and values (if desired) + can include html-like tags or MathJax. + len + Sets the length of the color bar This measure excludes + the padding of both ends. That is, the color bar length + is this length minus the padding on both ends. + lenmode + Determines whether this color bar's length (i.e. the + measure in the color variation direction) is set in + units of plot "fraction" or in *pixels. Use `len` to + set the value. + minexponent + Hide SI prefix for 10^n if |n| is below this number. + This only has an effect when `tickformat` is "SI" or + "B". + nticks + Specifies the maximum number of ticks for the + particular axis. The actual number of ticks will be + chosen automatically to be less than or equal to + `nticks`. Has an effect only if `tickmode` is set to + "auto". + orientation + Sets the orientation of the colorbar. + outlinecolor + Sets the axis line color. + outlinewidth + Sets the width (in px) of the axis line. + separatethousands + If "true", even 4-digit integers are separated + showexponent + If "all", all exponents are shown besides their + significands. If "first", only the exponent of the + first tick is shown. If "last", only the exponent of + the last tick is shown. If "none", no exponents appear. + showticklabels + Determines whether or not the tick labels are drawn. + showtickprefix + If "all", all tick labels are displayed with a prefix. + If "first", only the first tick is displayed with a + prefix. If "last", only the last tick is displayed with + a suffix. If "none", tick prefixes are hidden. + showticksuffix + Same as `showtickprefix` but for tick suffixes. + thickness + Sets the thickness of the color bar This measure + excludes the size of the padding, ticks and labels. + thicknessmode + Determines whether this color bar's thickness (i.e. the + measure in the constant color direction) is set in + units of plot "fraction" or in "pixels". Use + `thickness` to set the value. + tick0 + Sets the placement of the first tick on this axis. Use + with `dtick`. If the axis `type` is "log", then you + must take the log of your starting tick (e.g. to set + the starting tick to 100, set the `tick0` to 2) except + when `dtick`=*L* (see `dtick` for more info). If the + axis `type` is "date", it should be a date string, like + date data. If the axis `type` is "category", it should + be a number, using the scale where each category is + assigned a serial number from zero in the order it + appears. + tickangle + Sets the angle of the tick labels with respect to the + horizontal. For example, a `tickangle` of -90 draws the + tick labels vertically. + tickcolor + Sets the tick color. + tickfont + Sets the color bar's tick label font + tickformat + Sets the tick label formatting rule using d3 formatting + mini-languages which are very similar to those in + Python. For numbers, see: + https://github.com/d3/d3-format/tree/v1.4.5#d3-format. + And for dates see: https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format. We add two items to + d3's date formatter: "%h" for half of the year as a + decimal number as well as "%{n}f" for fractional + seconds with n digits. For example, *2016-10-13 + 09:15:23.456* with tickformat "%H~%M~%S.%2f" would + display "09~15~23.46" + tickformatstops + A tuple of :class:`plotly.graph_objects.choroplethmapbo + x.colorbar.Tickformatstop` instances or dicts with + compatible properties + tickformatstopdefaults + When used in a template (as layout.template.data.chorop + lethmapbox.colorbar.tickformatstopdefaults), sets the + default property values to use for elements of + choroplethmapbox.colorbar.tickformatstops + ticklabeloverflow + Determines how we handle tick labels that would + overflow either the graph div or the domain of the + axis. The default value for inside tick labels is *hide + past domain*. In other cases the default is *hide past + div*. + ticklabelposition + Determines where tick labels are drawn relative to the + ticks. Left and right options are used when + `orientation` is "h", top and bottom when `orientation` + is "v". + ticklabelstep + Sets the spacing between tick labels as compared to the + spacing between ticks. A value of 1 (default) means + each tick gets a label. A value of 2 means shows every + 2nd label. A larger value n means only every nth tick + is labeled. `tick0` determines which labels are shown. + Not implemented for axes with `type` "log" or + "multicategory", or when `tickmode` is "array". + ticklen + Sets the tick length (in px). + tickmode + Sets the tick mode for this axis. If "auto", the number + of ticks is set via `nticks`. If "linear", the + placement of the ticks is determined by a starting + position `tick0` and a tick step `dtick` ("linear" is + the default value if `tick0` and `dtick` are provided). + If "array", the placement of the ticks is set via + `tickvals` and the tick text is `ticktext`. ("array" is + the default value if `tickvals` is provided). + tickprefix + Sets a tick label prefix. + ticks + Determines whether ticks are drawn or not. If "", this + axis' ticks are not drawn. If "outside" ("inside"), + this axis' are drawn outside (inside) the axis lines. + ticksuffix + Sets a tick label suffix. + ticktext + Sets the text displayed at the ticks position via + `tickvals`. Only has an effect if `tickmode` is set to + "array". Used with `tickvals`. + ticktextsrc + Sets the source reference on Chart Studio Cloud for + `ticktext`. + tickvals + Sets the values at which ticks on this axis appear. + Only has an effect if `tickmode` is set to "array". + Used with `ticktext`. + tickvalssrc + Sets the source reference on Chart Studio Cloud for + `tickvals`. + tickwidth + Sets the tick width (in px). + title + :class:`plotly.graph_objects.choroplethmapbox.colorbar. + Title` instance or dict with compatible properties + x + Sets the x position with respect to `xref` of the color + bar (in plot fraction). When `xref` is "paper", + defaults to 1.02 when `orientation` is "v" and 0.5 when + `orientation` is "h". When `xref` is "container", + defaults to 1 when `orientation` is "v" and 0.5 when + `orientation` is "h". Must be between 0 and 1 if `xref` + is "container" and between "-2" and 3 if `xref` is + "paper". + xanchor + Sets this color bar's horizontal position anchor. This + anchor binds the `x` position to the "left", "center" + or "right" of the color bar. Defaults to "left" when + `orientation` is "v" and "center" when `orientation` is + "h". + xpad + Sets the amount of padding (in px) along the x + direction. + xref + Sets the container `x` refers to. "container" spans the + entire `width` of the plot. "paper" refers to the width + of the plotting area only. + y + Sets the y position with respect to `yref` of the color + bar (in plot fraction). When `yref` is "paper", + defaults to 0.5 when `orientation` is "v" and 1.02 when + `orientation` is "h". When `yref` is "container", + defaults to 0.5 when `orientation` is "v" and 1 when + `orientation` is "h". Must be between 0 and 1 if `yref` + is "container" and between "-2" and 3 if `yref` is + "paper". + yanchor + Sets this color bar's vertical position anchor This + anchor binds the `y` position to the "top", "middle" or + "bottom" of the color bar. Defaults to "middle" when + `orientation` is "v" and "bottom" when `orientation` is + "h". + ypad + Sets the amount of padding (in px) along the y + direction. + yref + Sets the container `y` refers to. "container" spans the + entire `height` of the plot. "paper" refers to the + height of the plotting area only. + + Returns + ------- + ColorBar + """ + super().__init__("colorbar") + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + if arg is None: + arg = {} + elif isinstance(arg, self.__class__): + arg = arg.to_plotly_json() + elif isinstance(arg, dict): + arg = _copy.copy(arg) + else: + raise ValueError("""\ +The first argument to the plotly.graph_objs.choroplethmapbox.ColorBar +constructor must be a dict or +an instance of :class:`plotly.graph_objs.choroplethmapbox.ColorBar`""") + + self._skip_invalid = kwargs.pop("skip_invalid", False) + self._validate = kwargs.pop("_validate", True) + + self._set_property("bgcolor", arg, bgcolor) + self._set_property("bordercolor", arg, bordercolor) + self._set_property("borderwidth", arg, borderwidth) + self._set_property("dtick", arg, dtick) + self._set_property("exponentformat", arg, exponentformat) + self._set_property("labelalias", arg, labelalias) + self._set_property("len", arg, len) + self._set_property("lenmode", arg, lenmode) + self._set_property("minexponent", arg, minexponent) + self._set_property("nticks", arg, nticks) + self._set_property("orientation", arg, orientation) + self._set_property("outlinecolor", arg, outlinecolor) + self._set_property("outlinewidth", arg, outlinewidth) + self._set_property("separatethousands", arg, separatethousands) + self._set_property("showexponent", arg, showexponent) + self._set_property("showticklabels", arg, showticklabels) + self._set_property("showtickprefix", arg, showtickprefix) + self._set_property("showticksuffix", arg, showticksuffix) + self._set_property("thickness", arg, thickness) + self._set_property("thicknessmode", arg, thicknessmode) + self._set_property("tick0", arg, tick0) + self._set_property("tickangle", arg, tickangle) + self._set_property("tickcolor", arg, tickcolor) + self._set_property("tickfont", arg, tickfont) + self._set_property("tickformat", arg, tickformat) + self._set_property("tickformatstops", arg, tickformatstops) + self._set_property("tickformatstopdefaults", arg, tickformatstopdefaults) + self._set_property("ticklabeloverflow", arg, ticklabeloverflow) + self._set_property("ticklabelposition", arg, ticklabelposition) + self._set_property("ticklabelstep", arg, ticklabelstep) + self._set_property("ticklen", arg, ticklen) + self._set_property("tickmode", arg, tickmode) + self._set_property("tickprefix", arg, tickprefix) + self._set_property("ticks", arg, ticks) + self._set_property("ticksuffix", arg, ticksuffix) + self._set_property("ticktext", arg, ticktext) + self._set_property("ticktextsrc", arg, ticktextsrc) + self._set_property("tickvals", arg, tickvals) + self._set_property("tickvalssrc", arg, tickvalssrc) + self._set_property("tickwidth", arg, tickwidth) + self._set_property("title", arg, title) + self._set_property("x", arg, x) + self._set_property("xanchor", arg, xanchor) + self._set_property("xpad", arg, xpad) + self._set_property("xref", arg, xref) + self._set_property("y", arg, y) + self._set_property("yanchor", arg, yanchor) + self._set_property("ypad", arg, ypad) + self._set_property("yref", arg, yref) + self._process_kwargs(**dict(arg, **kwargs)) + self._skip_invalid = False diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/choroplethmapbox/_hoverlabel.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/choroplethmapbox/_hoverlabel.py new file mode 100644 index 0000000000000000000000000000000000000000..80cd197708b38ae64817d6430f58dbce7d16aad3 --- /dev/null +++ b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/choroplethmapbox/_hoverlabel.py @@ -0,0 +1,366 @@ +# --- THIS FILE IS AUTO-GENERATED --- +# Modifications will be overwitten the next time code generation run. + +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Hoverlabel(_BaseTraceHierarchyType): + _parent_path_str = "choroplethmapbox" + _path_str = "choroplethmapbox.hoverlabel" + _valid_props = { + "align", + "alignsrc", + "bgcolor", + "bgcolorsrc", + "bordercolor", + "bordercolorsrc", + "font", + "namelength", + "namelengthsrc", + "showarrow", + } + + @property + def align(self): + """ + Sets the horizontal alignment of the text content within hover + label box. Has an effect only if the hover label text spans + more two or more lines + + The 'align' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['left', 'right', 'auto'] + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + Any|numpy.ndarray + """ + return self["align"] + + @align.setter + def align(self, val): + self["align"] = val + + @property + def alignsrc(self): + """ + Sets the source reference on Chart Studio Cloud for `align`. + + The 'alignsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["alignsrc"] + + @alignsrc.setter + def alignsrc(self, val): + self["alignsrc"] = val + + @property + def bgcolor(self): + """ + Sets the background color of the hover labels for this trace + + The 'bgcolor' property is a color and may be specified as: + - A hex string (e.g. '#ff0000') + - An rgb/rgba string (e.g. 'rgb(255,0,0)') + - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') + - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') + - A named CSS color: see https://plotly.com/python/css-colors/ for a list + - A list or array of any of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["bgcolor"] + + @bgcolor.setter + def bgcolor(self, val): + self["bgcolor"] = val + + @property + def bgcolorsrc(self): + """ + Sets the source reference on Chart Studio Cloud for `bgcolor`. + + The 'bgcolorsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["bgcolorsrc"] + + @bgcolorsrc.setter + def bgcolorsrc(self, val): + self["bgcolorsrc"] = val + + @property + def bordercolor(self): + """ + Sets the border color of the hover labels for this trace. + + The 'bordercolor' property is a color and may be specified as: + - A hex string (e.g. '#ff0000') + - An rgb/rgba string (e.g. 'rgb(255,0,0)') + - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') + - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') + - A named CSS color: see https://plotly.com/python/css-colors/ for a list + - A list or array of any of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["bordercolor"] + + @bordercolor.setter + def bordercolor(self, val): + self["bordercolor"] = val + + @property + def bordercolorsrc(self): + """ + Sets the source reference on Chart Studio Cloud for + `bordercolor`. + + The 'bordercolorsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["bordercolorsrc"] + + @bordercolorsrc.setter + def bordercolorsrc(self, val): + self["bordercolorsrc"] = val + + @property + def font(self): + """ + Sets the font used in hover labels. + + The 'font' property is an instance of Font + that may be specified as: + - An instance of :class:`plotly.graph_objs.choroplethmapbox.hoverlabel.Font` + - A dict of string/value properties that will be passed + to the Font constructor + + Returns + ------- + plotly.graph_objs.choroplethmapbox.hoverlabel.Font + """ + return self["font"] + + @font.setter + def font(self, val): + self["font"] = val + + @property + def namelength(self): + """ + Sets the default length (in number of characters) of the trace + name in the hover labels for all traces. -1 shows the whole + name regardless of length. 0-3 shows the first 0-3 characters, + and an integer >3 will show the whole name if it is less than + that many characters, but if it is longer, will truncate to + `namelength - 3` characters and add an ellipsis. + + The 'namelength' property is a integer and may be specified as: + - An int (or float that will be cast to an int) + in the interval [-1, 9223372036854775807] + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + int|numpy.ndarray + """ + return self["namelength"] + + @namelength.setter + def namelength(self, val): + self["namelength"] = val + + @property + def namelengthsrc(self): + """ + Sets the source reference on Chart Studio Cloud for + `namelength`. + + The 'namelengthsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["namelengthsrc"] + + @namelengthsrc.setter + def namelengthsrc(self, val): + self["namelengthsrc"] = val + + @property + def showarrow(self): + """ + Sets whether or not to show the hover label arrow/triangle + pointing to the data point. + + The 'showarrow' property is a boolean and must be specified as: + - A boolean value: True or False + + Returns + ------- + bool + """ + return self["showarrow"] + + @showarrow.setter + def showarrow(self, val): + self["showarrow"] = val + + @property + def _prop_descriptions(self): + return """\ + align + Sets the horizontal alignment of the text content + within hover label box. Has an effect only if the hover + label text spans more two or more lines + alignsrc + Sets the source reference on Chart Studio Cloud for + `align`. + bgcolor + Sets the background color of the hover labels for this + trace + bgcolorsrc + Sets the source reference on Chart Studio Cloud for + `bgcolor`. + bordercolor + Sets the border color of the hover labels for this + trace. + bordercolorsrc + Sets the source reference on Chart Studio Cloud for + `bordercolor`. + font + Sets the font used in hover labels. + namelength + Sets the default length (in number of characters) of + the trace name in the hover labels for all traces. -1 + shows the whole name regardless of length. 0-3 shows + the first 0-3 characters, and an integer >3 will show + the whole name if it is less than that many characters, + but if it is longer, will truncate to `namelength - 3` + characters and add an ellipsis. + namelengthsrc + Sets the source reference on Chart Studio Cloud for + `namelength`. + showarrow + Sets whether or not to show the hover label + arrow/triangle pointing to the data point. + """ + + def __init__( + self, + arg=None, + align=None, + alignsrc=None, + bgcolor=None, + bgcolorsrc=None, + bordercolor=None, + bordercolorsrc=None, + font=None, + namelength=None, + namelengthsrc=None, + showarrow=None, + **kwargs, + ): + """ + Construct a new Hoverlabel object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.choroplethmapbox.Hoverlabel` + align + Sets the horizontal alignment of the text content + within hover label box. Has an effect only if the hover + label text spans more two or more lines + alignsrc + Sets the source reference on Chart Studio Cloud for + `align`. + bgcolor + Sets the background color of the hover labels for this + trace + bgcolorsrc + Sets the source reference on Chart Studio Cloud for + `bgcolor`. + bordercolor + Sets the border color of the hover labels for this + trace. + bordercolorsrc + Sets the source reference on Chart Studio Cloud for + `bordercolor`. + font + Sets the font used in hover labels. + namelength + Sets the default length (in number of characters) of + the trace name in the hover labels for all traces. -1 + shows the whole name regardless of length. 0-3 shows + the first 0-3 characters, and an integer >3 will show + the whole name if it is less than that many characters, + but if it is longer, will truncate to `namelength - 3` + characters and add an ellipsis. + namelengthsrc + Sets the source reference on Chart Studio Cloud for + `namelength`. + showarrow + Sets whether or not to show the hover label + arrow/triangle pointing to the data point. + + Returns + ------- + Hoverlabel + """ + super().__init__("hoverlabel") + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + if arg is None: + arg = {} + elif isinstance(arg, self.__class__): + arg = arg.to_plotly_json() + elif isinstance(arg, dict): + arg = _copy.copy(arg) + else: + raise ValueError("""\ +The first argument to the plotly.graph_objs.choroplethmapbox.Hoverlabel +constructor must be a dict or +an instance of :class:`plotly.graph_objs.choroplethmapbox.Hoverlabel`""") + + self._skip_invalid = kwargs.pop("skip_invalid", False) + self._validate = kwargs.pop("_validate", True) + + self._set_property("align", arg, align) + self._set_property("alignsrc", arg, alignsrc) + self._set_property("bgcolor", arg, bgcolor) + self._set_property("bgcolorsrc", arg, bgcolorsrc) + self._set_property("bordercolor", arg, bordercolor) + self._set_property("bordercolorsrc", arg, bordercolorsrc) + self._set_property("font", arg, font) + self._set_property("namelength", arg, namelength) + self._set_property("namelengthsrc", arg, namelengthsrc) + self._set_property("showarrow", arg, showarrow) + self._process_kwargs(**dict(arg, **kwargs)) + self._skip_invalid = False diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/choroplethmapbox/_legendgrouptitle.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/choroplethmapbox/_legendgrouptitle.py new file mode 100644 index 0000000000000000000000000000000000000000..24455318cdf26a21aeb17495206fa2e40316bd43 --- /dev/null +++ b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/choroplethmapbox/_legendgrouptitle.py @@ -0,0 +1,104 @@ +# --- THIS FILE IS AUTO-GENERATED --- +# Modifications will be overwitten the next time code generation run. + +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Legendgrouptitle(_BaseTraceHierarchyType): + _parent_path_str = "choroplethmapbox" + _path_str = "choroplethmapbox.legendgrouptitle" + _valid_props = {"font", "text"} + + @property + def font(self): + """ + Sets this legend group's title font. + + The 'font' property is an instance of Font + that may be specified as: + - An instance of :class:`plotly.graph_objs.choroplethmapbox.legendgrouptitle.Font` + - A dict of string/value properties that will be passed + to the Font constructor + + Returns + ------- + plotly.graph_objs.choroplethmapbox.legendgrouptitle.Font + """ + return self["font"] + + @font.setter + def font(self, val): + self["font"] = val + + @property + def text(self): + """ + Sets the title of the legend group. + + The 'text' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["text"] + + @text.setter + def text(self, val): + self["text"] = val + + @property + def _prop_descriptions(self): + return """\ + font + Sets this legend group's title font. + text + Sets the title of the legend group. + """ + + def __init__(self, arg=None, font=None, text=None, **kwargs): + """ + Construct a new Legendgrouptitle object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of :class:`plotly.graph_objs.choroplethmapb + ox.Legendgrouptitle` + font + Sets this legend group's title font. + text + Sets the title of the legend group. + + Returns + ------- + Legendgrouptitle + """ + super().__init__("legendgrouptitle") + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + if arg is None: + arg = {} + elif isinstance(arg, self.__class__): + arg = arg.to_plotly_json() + elif isinstance(arg, dict): + arg = _copy.copy(arg) + else: + raise ValueError("""\ +The first argument to the plotly.graph_objs.choroplethmapbox.Legendgrouptitle +constructor must be a dict or +an instance of :class:`plotly.graph_objs.choroplethmapbox.Legendgrouptitle`""") + + self._skip_invalid = kwargs.pop("skip_invalid", False) + self._validate = kwargs.pop("_validate", True) + + self._set_property("font", arg, font) + self._set_property("text", arg, text) + self._process_kwargs(**dict(arg, **kwargs)) + self._skip_invalid = False diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/choroplethmapbox/_marker.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/choroplethmapbox/_marker.py new file mode 100644 index 0000000000000000000000000000000000000000..d4b24d4d30cf9f46c75b8f2923ba2a4ade739d6c --- /dev/null +++ b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/choroplethmapbox/_marker.py @@ -0,0 +1,129 @@ +# --- THIS FILE IS AUTO-GENERATED --- +# Modifications will be overwitten the next time code generation run. + +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Marker(_BaseTraceHierarchyType): + _parent_path_str = "choroplethmapbox" + _path_str = "choroplethmapbox.marker" + _valid_props = {"line", "opacity", "opacitysrc"} + + @property + def line(self): + """ + The 'line' property is an instance of Line + that may be specified as: + - An instance of :class:`plotly.graph_objs.choroplethmapbox.marker.Line` + - A dict of string/value properties that will be passed + to the Line constructor + + Returns + ------- + plotly.graph_objs.choroplethmapbox.marker.Line + """ + return self["line"] + + @line.setter + def line(self, val): + self["line"] = val + + @property + def opacity(self): + """ + Sets the opacity of the locations. + + The 'opacity' property is a number and may be specified as: + - An int or float in the interval [0, 1] + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + int|float|numpy.ndarray + """ + return self["opacity"] + + @opacity.setter + def opacity(self, val): + self["opacity"] = val + + @property + def opacitysrc(self): + """ + Sets the source reference on Chart Studio Cloud for `opacity`. + + The 'opacitysrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["opacitysrc"] + + @opacitysrc.setter + def opacitysrc(self, val): + self["opacitysrc"] = val + + @property + def _prop_descriptions(self): + return """\ + line + :class:`plotly.graph_objects.choroplethmapbox.marker.Li + ne` instance or dict with compatible properties + opacity + Sets the opacity of the locations. + opacitysrc + Sets the source reference on Chart Studio Cloud for + `opacity`. + """ + + def __init__(self, arg=None, line=None, opacity=None, opacitysrc=None, **kwargs): + """ + Construct a new Marker object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.choroplethmapbox.Marker` + line + :class:`plotly.graph_objects.choroplethmapbox.marker.Li + ne` instance or dict with compatible properties + opacity + Sets the opacity of the locations. + opacitysrc + Sets the source reference on Chart Studio Cloud for + `opacity`. + + Returns + ------- + Marker + """ + super().__init__("marker") + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + if arg is None: + arg = {} + elif isinstance(arg, self.__class__): + arg = arg.to_plotly_json() + elif isinstance(arg, dict): + arg = _copy.copy(arg) + else: + raise ValueError("""\ +The first argument to the plotly.graph_objs.choroplethmapbox.Marker +constructor must be a dict or +an instance of :class:`plotly.graph_objs.choroplethmapbox.Marker`""") + + self._skip_invalid = kwargs.pop("skip_invalid", False) + self._validate = kwargs.pop("_validate", True) + + self._set_property("line", arg, line) + self._set_property("opacity", arg, opacity) + self._set_property("opacitysrc", arg, opacitysrc) + self._process_kwargs(**dict(arg, **kwargs)) + self._skip_invalid = False diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/choroplethmapbox/_selected.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/choroplethmapbox/_selected.py new file mode 100644 index 0000000000000000000000000000000000000000..d7c4b1300920781a643c695c71e8be8dbb20436f --- /dev/null +++ b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/choroplethmapbox/_selected.py @@ -0,0 +1,80 @@ +# --- THIS FILE IS AUTO-GENERATED --- +# Modifications will be overwitten the next time code generation run. + +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Selected(_BaseTraceHierarchyType): + _parent_path_str = "choroplethmapbox" + _path_str = "choroplethmapbox.selected" + _valid_props = {"marker"} + + @property + def marker(self): + """ + The 'marker' property is an instance of Marker + that may be specified as: + - An instance of :class:`plotly.graph_objs.choroplethmapbox.selected.Marker` + - A dict of string/value properties that will be passed + to the Marker constructor + + Returns + ------- + plotly.graph_objs.choroplethmapbox.selected.Marker + """ + return self["marker"] + + @marker.setter + def marker(self, val): + self["marker"] = val + + @property + def _prop_descriptions(self): + return """\ + marker + :class:`plotly.graph_objects.choroplethmapbox.selected. + Marker` instance or dict with compatible properties + """ + + def __init__(self, arg=None, marker=None, **kwargs): + """ + Construct a new Selected object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.choroplethmapbox.Selected` + marker + :class:`plotly.graph_objects.choroplethmapbox.selected. + Marker` instance or dict with compatible properties + + Returns + ------- + Selected + """ + super().__init__("selected") + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + if arg is None: + arg = {} + elif isinstance(arg, self.__class__): + arg = arg.to_plotly_json() + elif isinstance(arg, dict): + arg = _copy.copy(arg) + else: + raise ValueError("""\ +The first argument to the plotly.graph_objs.choroplethmapbox.Selected +constructor must be a dict or +an instance of :class:`plotly.graph_objs.choroplethmapbox.Selected`""") + + self._skip_invalid = kwargs.pop("skip_invalid", False) + self._validate = kwargs.pop("_validate", True) + + self._set_property("marker", arg, marker) + self._process_kwargs(**dict(arg, **kwargs)) + self._skip_invalid = False diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/choroplethmapbox/_stream.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/choroplethmapbox/_stream.py new file mode 100644 index 0000000000000000000000000000000000000000..1698554caf76fb98ba225381a031c84875ed679a --- /dev/null +++ b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/choroplethmapbox/_stream.py @@ -0,0 +1,114 @@ +# --- THIS FILE IS AUTO-GENERATED --- +# Modifications will be overwitten the next time code generation run. + +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Stream(_BaseTraceHierarchyType): + _parent_path_str = "choroplethmapbox" + _path_str = "choroplethmapbox.stream" + _valid_props = {"maxpoints", "token"} + + @property + def maxpoints(self): + """ + Sets the maximum number of points to keep on the plots from an + incoming stream. If `maxpoints` is set to 50, only the newest + 50 points will be displayed on the plot. + + The 'maxpoints' property is a number and may be specified as: + - An int or float in the interval [0, 10000] + + Returns + ------- + int|float + """ + return self["maxpoints"] + + @maxpoints.setter + def maxpoints(self, val): + self["maxpoints"] = val + + @property + def token(self): + """ + The stream id number links a data trace on a plot with a + stream. See https://chart-studio.plotly.com/settings for more + details. + + The 'token' property is a string and must be specified as: + - A non-empty string + + Returns + ------- + str + """ + return self["token"] + + @token.setter + def token(self, val): + self["token"] = val + + @property + def _prop_descriptions(self): + return """\ + maxpoints + Sets the maximum number of points to keep on the plots + from an incoming stream. If `maxpoints` is set to 50, + only the newest 50 points will be displayed on the + plot. + token + The stream id number links a data trace on a plot with + a stream. See https://chart-studio.plotly.com/settings + for more details. + """ + + def __init__(self, arg=None, maxpoints=None, token=None, **kwargs): + """ + Construct a new Stream object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.choroplethmapbox.Stream` + maxpoints + Sets the maximum number of points to keep on the plots + from an incoming stream. If `maxpoints` is set to 50, + only the newest 50 points will be displayed on the + plot. + token + The stream id number links a data trace on a plot with + a stream. See https://chart-studio.plotly.com/settings + for more details. + + Returns + ------- + Stream + """ + super().__init__("stream") + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + if arg is None: + arg = {} + elif isinstance(arg, self.__class__): + arg = arg.to_plotly_json() + elif isinstance(arg, dict): + arg = _copy.copy(arg) + else: + raise ValueError("""\ +The first argument to the plotly.graph_objs.choroplethmapbox.Stream +constructor must be a dict or +an instance of :class:`plotly.graph_objs.choroplethmapbox.Stream`""") + + self._skip_invalid = kwargs.pop("skip_invalid", False) + self._validate = kwargs.pop("_validate", True) + + self._set_property("maxpoints", arg, maxpoints) + self._set_property("token", arg, token) + self._process_kwargs(**dict(arg, **kwargs)) + self._skip_invalid = False diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/choroplethmapbox/_unselected.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/choroplethmapbox/_unselected.py new file mode 100644 index 0000000000000000000000000000000000000000..ad22ba4cdaf316c5dadf753bef58f8d4210c79a5 --- /dev/null +++ b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/choroplethmapbox/_unselected.py @@ -0,0 +1,80 @@ +# --- THIS FILE IS AUTO-GENERATED --- +# Modifications will be overwitten the next time code generation run. + +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Unselected(_BaseTraceHierarchyType): + _parent_path_str = "choroplethmapbox" + _path_str = "choroplethmapbox.unselected" + _valid_props = {"marker"} + + @property + def marker(self): + """ + The 'marker' property is an instance of Marker + that may be specified as: + - An instance of :class:`plotly.graph_objs.choroplethmapbox.unselected.Marker` + - A dict of string/value properties that will be passed + to the Marker constructor + + Returns + ------- + plotly.graph_objs.choroplethmapbox.unselected.Marker + """ + return self["marker"] + + @marker.setter + def marker(self, val): + self["marker"] = val + + @property + def _prop_descriptions(self): + return """\ + marker + :class:`plotly.graph_objects.choroplethmapbox.unselecte + d.Marker` instance or dict with compatible properties + """ + + def __init__(self, arg=None, marker=None, **kwargs): + """ + Construct a new Unselected object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.choroplethmapbox.Unselected` + marker + :class:`plotly.graph_objects.choroplethmapbox.unselecte + d.Marker` instance or dict with compatible properties + + Returns + ------- + Unselected + """ + super().__init__("unselected") + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + if arg is None: + arg = {} + elif isinstance(arg, self.__class__): + arg = arg.to_plotly_json() + elif isinstance(arg, dict): + arg = _copy.copy(arg) + else: + raise ValueError("""\ +The first argument to the plotly.graph_objs.choroplethmapbox.Unselected +constructor must be a dict or +an instance of :class:`plotly.graph_objs.choroplethmapbox.Unselected`""") + + self._skip_invalid = kwargs.pop("skip_invalid", False) + self._validate = kwargs.pop("_validate", True) + + self._set_property("marker", arg, marker) + self._process_kwargs(**dict(arg, **kwargs)) + self._skip_invalid = False diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/choroplethmapbox/colorbar/.___init__.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/choroplethmapbox/colorbar/.___init__.py new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/choroplethmapbox/colorbar/.___init__.py differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/choroplethmapbox/colorbar/.___pycache__ b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/choroplethmapbox/colorbar/.___pycache__ new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/choroplethmapbox/colorbar/.___pycache__ differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/choroplethmapbox/colorbar/.__tickfont.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/choroplethmapbox/colorbar/.__tickfont.py new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/choroplethmapbox/colorbar/.__tickfont.py differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/choroplethmapbox/colorbar/.__tickformatstop.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/choroplethmapbox/colorbar/.__tickformatstop.py new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/choroplethmapbox/colorbar/.__tickformatstop.py differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/choroplethmapbox/colorbar/.__title.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/choroplethmapbox/colorbar/.__title.py new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/choroplethmapbox/colorbar/.__title.py differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/choroplethmapbox/colorbar/._title b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/choroplethmapbox/colorbar/._title new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/choroplethmapbox/colorbar/._title differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/choroplethmapbox/colorbar/__init__.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/choroplethmapbox/colorbar/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..4690d3cc738a44d43a04d43d3aa0be36d7cd34e2 --- /dev/null +++ b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/choroplethmapbox/colorbar/__init__.py @@ -0,0 +1,16 @@ +import sys +from typing import TYPE_CHECKING + +if TYPE_CHECKING: + from ._tickfont import Tickfont + from ._tickformatstop import Tickformatstop + from ._title import Title + from . import title +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [".title"], + ["._tickfont.Tickfont", "._tickformatstop.Tickformatstop", "._title.Title"], + ) diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/choroplethmapbox/colorbar/_tickfont.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/choroplethmapbox/colorbar/_tickfont.py new file mode 100644 index 0000000000000000000000000000000000000000..b44c18a7cf33964a84f120d4ca4125eb5a7d9904 --- /dev/null +++ b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/choroplethmapbox/colorbar/_tickfont.py @@ -0,0 +1,334 @@ +# --- THIS FILE IS AUTO-GENERATED --- +# Modifications will be overwitten the next time code generation run. + +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Tickfont(_BaseTraceHierarchyType): + _parent_path_str = "choroplethmapbox.colorbar" + _path_str = "choroplethmapbox.colorbar.tickfont" + _valid_props = { + "color", + "family", + "lineposition", + "shadow", + "size", + "style", + "textcase", + "variant", + "weight", + } + + @property + def color(self): + """ + The 'color' property is a color and may be specified as: + - A hex string (e.g. '#ff0000') + - An rgb/rgba string (e.g. 'rgb(255,0,0)') + - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') + - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') + - A named CSS color: see https://plotly.com/python/css-colors/ for a list + + Returns + ------- + str + """ + return self["color"] + + @color.setter + def color(self, val): + self["color"] = val + + @property + def family(self): + """ + HTML font family - the typeface that will be applied by the web + browser. The web browser can only apply a font if it is + available on the system where it runs. Provide multiple font + families, separated by commas, to indicate the order in which + to apply fonts if they aren't available. + + The 'family' property is a string and must be specified as: + - A non-empty string + + Returns + ------- + str + """ + return self["family"] + + @family.setter + def family(self, val): + self["family"] = val + + @property + def lineposition(self): + """ + Sets the kind of decoration line(s) with text, such as an + "under", "over" or "through" as well as combinations e.g. + "under+over", etc. + + The 'lineposition' property is a flaglist and may be specified + as a string containing: + - Any combination of ['under', 'over', 'through'] joined with '+' characters + (e.g. 'under+over') + OR exactly one of ['none'] (e.g. 'none') + + Returns + ------- + Any + """ + return self["lineposition"] + + @lineposition.setter + def lineposition(self, val): + self["lineposition"] = val + + @property + def shadow(self): + """ + Sets the shape and color of the shadow behind text. "auto" + places minimal shadow and applies contrast text font color. See + https://developer.mozilla.org/en-US/docs/Web/CSS/text-shadow + for additional options. + + The 'shadow' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["shadow"] + + @shadow.setter + def shadow(self, val): + self["shadow"] = val + + @property + def size(self): + """ + The 'size' property is a number and may be specified as: + - An int or float in the interval [1, inf] + + Returns + ------- + int|float + """ + return self["size"] + + @size.setter + def size(self, val): + self["size"] = val + + @property + def style(self): + """ + Sets whether a font should be styled with a normal or italic + face from its family. + + The 'style' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['normal', 'italic'] + + Returns + ------- + Any + """ + return self["style"] + + @style.setter + def style(self, val): + self["style"] = val + + @property + def textcase(self): + """ + Sets capitalization of text. It can be used to make text appear + in all-uppercase or all-lowercase, or with each word + capitalized. + + The 'textcase' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['normal', 'word caps', 'upper', 'lower'] + + Returns + ------- + Any + """ + return self["textcase"] + + @textcase.setter + def textcase(self, val): + self["textcase"] = val + + @property + def variant(self): + """ + Sets the variant of the font. + + The 'variant' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['normal', 'small-caps', 'all-small-caps', + 'all-petite-caps', 'petite-caps', 'unicase'] + + Returns + ------- + Any + """ + return self["variant"] + + @variant.setter + def variant(self, val): + self["variant"] = val + + @property + def weight(self): + """ + Sets the weight (or boldness) of the font. + + The 'weight' property is a integer and may be specified as: + - An int (or float that will be cast to an int) + in the interval [1, 1000] + OR exactly one of ['normal', 'bold'] (e.g. 'bold') + + Returns + ------- + int + """ + return self["weight"] + + @weight.setter + def weight(self, val): + self["weight"] = val + + @property + def _prop_descriptions(self): + return """\ + color + + family + HTML font family - the typeface that will be applied by + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. + lineposition + Sets the kind of decoration line(s) with text, such as + an "under", "over" or "through" as well as combinations + e.g. "under+over", etc. + shadow + Sets the shape and color of the shadow behind text. + "auto" places minimal shadow and applies contrast text + font color. See https://developer.mozilla.org/en- + US/docs/Web/CSS/text-shadow for additional options. + size + + style + Sets whether a font should be styled with a normal or + italic face from its family. + textcase + Sets capitalization of text. It can be used to make + text appear in all-uppercase or all-lowercase, or with + each word capitalized. + variant + Sets the variant of the font. + weight + Sets the weight (or boldness) of the font. + """ + + def __init__( + self, + arg=None, + color=None, + family=None, + lineposition=None, + shadow=None, + size=None, + style=None, + textcase=None, + variant=None, + weight=None, + **kwargs, + ): + """ + Construct a new Tickfont object + + Sets the color bar's tick label font + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of :class:`plotly.graph_objs.choroplethmapb + ox.colorbar.Tickfont` + color + + family + HTML font family - the typeface that will be applied by + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. + lineposition + Sets the kind of decoration line(s) with text, such as + an "under", "over" or "through" as well as combinations + e.g. "under+over", etc. + shadow + Sets the shape and color of the shadow behind text. + "auto" places minimal shadow and applies contrast text + font color. See https://developer.mozilla.org/en- + US/docs/Web/CSS/text-shadow for additional options. + size + + style + Sets whether a font should be styled with a normal or + italic face from its family. + textcase + Sets capitalization of text. It can be used to make + text appear in all-uppercase or all-lowercase, or with + each word capitalized. + variant + Sets the variant of the font. + weight + Sets the weight (or boldness) of the font. + + Returns + ------- + Tickfont + """ + super().__init__("tickfont") + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + if arg is None: + arg = {} + elif isinstance(arg, self.__class__): + arg = arg.to_plotly_json() + elif isinstance(arg, dict): + arg = _copy.copy(arg) + else: + raise ValueError("""\ +The first argument to the plotly.graph_objs.choroplethmapbox.colorbar.Tickfont +constructor must be a dict or +an instance of :class:`plotly.graph_objs.choroplethmapbox.colorbar.Tickfont`""") + + self._skip_invalid = kwargs.pop("skip_invalid", False) + self._validate = kwargs.pop("_validate", True) + + self._set_property("color", arg, color) + self._set_property("family", arg, family) + self._set_property("lineposition", arg, lineposition) + self._set_property("shadow", arg, shadow) + self._set_property("size", arg, size) + self._set_property("style", arg, style) + self._set_property("textcase", arg, textcase) + self._set_property("variant", arg, variant) + self._set_property("weight", arg, weight) + self._process_kwargs(**dict(arg, **kwargs)) + self._skip_invalid = False diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/choroplethmapbox/colorbar/_tickformatstop.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/choroplethmapbox/colorbar/_tickformatstop.py new file mode 100644 index 0000000000000000000000000000000000000000..8a0c64df3815b920bd5064118d2abeff0c46ce7d --- /dev/null +++ b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/choroplethmapbox/colorbar/_tickformatstop.py @@ -0,0 +1,241 @@ +# --- THIS FILE IS AUTO-GENERATED --- +# Modifications will be overwitten the next time code generation run. + +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Tickformatstop(_BaseTraceHierarchyType): + _parent_path_str = "choroplethmapbox.colorbar" + _path_str = "choroplethmapbox.colorbar.tickformatstop" + _valid_props = {"dtickrange", "enabled", "name", "templateitemname", "value"} + + @property + def dtickrange(self): + """ + range [*min*, *max*], where "min", "max" - dtick values which + describe some zoom level, it is possible to omit "min" or "max" + value by passing "null" + + The 'dtickrange' property is an info array that may be specified as: + + * a list or tuple of 2 elements where: + (0) The 'dtickrange[0]' property accepts values of any type + (1) The 'dtickrange[1]' property accepts values of any type + + Returns + ------- + list + """ + return self["dtickrange"] + + @dtickrange.setter + def dtickrange(self, val): + self["dtickrange"] = val + + @property + def enabled(self): + """ + Determines whether or not this stop is used. If `false`, this + stop is ignored even within its `dtickrange`. + + The 'enabled' property is a boolean and must be specified as: + - A boolean value: True or False + + Returns + ------- + bool + """ + return self["enabled"] + + @enabled.setter + def enabled(self, val): + self["enabled"] = val + + @property + def name(self): + """ + When used in a template, named items are created in the output + figure in addition to any items the figure already has in this + array. You can modify these items in the output figure by + making your own item with `templateitemname` matching this + `name` alongside your modifications (including `visible: false` + or `enabled: false` to hide it). Has no effect outside of a + template. + + The 'name' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["name"] + + @name.setter + def name(self, val): + self["name"] = val + + @property + def templateitemname(self): + """ + Used to refer to a named item in this array in the template. + Named items from the template will be created even without a + matching item in the input figure, but you can modify one by + making an item with `templateitemname` matching its `name`, + alongside your modifications (including `visible: false` or + `enabled: false` to hide it). If there is no template or no + matching item, this item will be hidden unless you explicitly + show it with `visible: true`. + + The 'templateitemname' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["templateitemname"] + + @templateitemname.setter + def templateitemname(self, val): + self["templateitemname"] = val + + @property + def value(self): + """ + string - dtickformat for described zoom level, the same as + "tickformat" + + The 'value' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["value"] + + @value.setter + def value(self, val): + self["value"] = val + + @property + def _prop_descriptions(self): + return """\ + dtickrange + range [*min*, *max*], where "min", "max" - dtick values + which describe some zoom level, it is possible to omit + "min" or "max" value by passing "null" + enabled + Determines whether or not this stop is used. If + `false`, this stop is ignored even within its + `dtickrange`. + name + When used in a template, named items are created in the + output figure in addition to any items the figure + already has in this array. You can modify these items + in the output figure by making your own item with + `templateitemname` matching this `name` alongside your + modifications (including `visible: false` or `enabled: + false` to hide it). Has no effect outside of a + template. + templateitemname + Used to refer to a named item in this array in the + template. Named items from the template will be created + even without a matching item in the input figure, but + you can modify one by making an item with + `templateitemname` matching its `name`, alongside your + modifications (including `visible: false` or `enabled: + false` to hide it). If there is no template or no + matching item, this item will be hidden unless you + explicitly show it with `visible: true`. + value + string - dtickformat for described zoom level, the same + as "tickformat" + """ + + def __init__( + self, + arg=None, + dtickrange=None, + enabled=None, + name=None, + templateitemname=None, + value=None, + **kwargs, + ): + """ + Construct a new Tickformatstop object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of :class:`plotly.graph_objs.choroplethmapb + ox.colorbar.Tickformatstop` + dtickrange + range [*min*, *max*], where "min", "max" - dtick values + which describe some zoom level, it is possible to omit + "min" or "max" value by passing "null" + enabled + Determines whether or not this stop is used. If + `false`, this stop is ignored even within its + `dtickrange`. + name + When used in a template, named items are created in the + output figure in addition to any items the figure + already has in this array. You can modify these items + in the output figure by making your own item with + `templateitemname` matching this `name` alongside your + modifications (including `visible: false` or `enabled: + false` to hide it). Has no effect outside of a + template. + templateitemname + Used to refer to a named item in this array in the + template. Named items from the template will be created + even without a matching item in the input figure, but + you can modify one by making an item with + `templateitemname` matching its `name`, alongside your + modifications (including `visible: false` or `enabled: + false` to hide it). If there is no template or no + matching item, this item will be hidden unless you + explicitly show it with `visible: true`. + value + string - dtickformat for described zoom level, the same + as "tickformat" + + Returns + ------- + Tickformatstop + """ + super().__init__("tickformatstops") + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + if arg is None: + arg = {} + elif isinstance(arg, self.__class__): + arg = arg.to_plotly_json() + elif isinstance(arg, dict): + arg = _copy.copy(arg) + else: + raise ValueError("""\ +The first argument to the plotly.graph_objs.choroplethmapbox.colorbar.Tickformatstop +constructor must be a dict or +an instance of :class:`plotly.graph_objs.choroplethmapbox.colorbar.Tickformatstop`""") + + self._skip_invalid = kwargs.pop("skip_invalid", False) + self._validate = kwargs.pop("_validate", True) + + self._set_property("dtickrange", arg, dtickrange) + self._set_property("enabled", arg, enabled) + self._set_property("name", arg, name) + self._set_property("templateitemname", arg, templateitemname) + self._set_property("value", arg, value) + self._process_kwargs(**dict(arg, **kwargs)) + self._skip_invalid = False diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/choroplethmapbox/colorbar/_title.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/choroplethmapbox/colorbar/_title.py new file mode 100644 index 0000000000000000000000000000000000000000..f96e32ecdfb0473b0cd8d361ac4af1b3b100bf93 --- /dev/null +++ b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/choroplethmapbox/colorbar/_title.py @@ -0,0 +1,136 @@ +# --- THIS FILE IS AUTO-GENERATED --- +# Modifications will be overwitten the next time code generation run. + +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Title(_BaseTraceHierarchyType): + _parent_path_str = "choroplethmapbox.colorbar" + _path_str = "choroplethmapbox.colorbar.title" + _valid_props = {"font", "side", "text"} + + @property + def font(self): + """ + Sets this color bar's title font. + + The 'font' property is an instance of Font + that may be specified as: + - An instance of :class:`plotly.graph_objs.choroplethmapbox.colorbar.title.Font` + - A dict of string/value properties that will be passed + to the Font constructor + + Returns + ------- + plotly.graph_objs.choroplethmapbox.colorbar.title.Font + """ + return self["font"] + + @font.setter + def font(self, val): + self["font"] = val + + @property + def side(self): + """ + Determines the location of color bar's title with respect to + the color bar. Defaults to "top" when `orientation` if "v" and + defaults to "right" when `orientation` if "h". + + The 'side' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['right', 'top', 'bottom'] + + Returns + ------- + Any + """ + return self["side"] + + @side.setter + def side(self, val): + self["side"] = val + + @property + def text(self): + """ + Sets the title of the color bar. + + The 'text' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["text"] + + @text.setter + def text(self, val): + self["text"] = val + + @property + def _prop_descriptions(self): + return """\ + font + Sets this color bar's title font. + side + Determines the location of color bar's title with + respect to the color bar. Defaults to "top" when + `orientation` if "v" and defaults to "right" when + `orientation` if "h". + text + Sets the title of the color bar. + """ + + def __init__(self, arg=None, font=None, side=None, text=None, **kwargs): + """ + Construct a new Title object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of :class:`plotly.graph_objs.choroplethmapb + ox.colorbar.Title` + font + Sets this color bar's title font. + side + Determines the location of color bar's title with + respect to the color bar. Defaults to "top" when + `orientation` if "v" and defaults to "right" when + `orientation` if "h". + text + Sets the title of the color bar. + + Returns + ------- + Title + """ + super().__init__("title") + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + if arg is None: + arg = {} + elif isinstance(arg, self.__class__): + arg = arg.to_plotly_json() + elif isinstance(arg, dict): + arg = _copy.copy(arg) + else: + raise ValueError("""\ +The first argument to the plotly.graph_objs.choroplethmapbox.colorbar.Title +constructor must be a dict or +an instance of :class:`plotly.graph_objs.choroplethmapbox.colorbar.Title`""") + + self._skip_invalid = kwargs.pop("skip_invalid", False) + self._validate = kwargs.pop("_validate", True) + + self._set_property("font", arg, font) + self._set_property("side", arg, side) + self._set_property("text", arg, text) + self._process_kwargs(**dict(arg, **kwargs)) + self._skip_invalid = False diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/choroplethmapbox/colorbar/title/.___init__.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/choroplethmapbox/colorbar/title/.___init__.py new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/choroplethmapbox/colorbar/title/.___init__.py differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/choroplethmapbox/colorbar/title/.___pycache__ b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/choroplethmapbox/colorbar/title/.___pycache__ new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/choroplethmapbox/colorbar/title/.___pycache__ differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/choroplethmapbox/colorbar/title/.__font.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/choroplethmapbox/colorbar/title/.__font.py new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/choroplethmapbox/colorbar/title/.__font.py differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/choroplethmapbox/colorbar/title/__init__.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/choroplethmapbox/colorbar/title/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..56f600d3458c41f269053307377e9707ab13e090 --- /dev/null +++ b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/choroplethmapbox/colorbar/title/__init__.py @@ -0,0 +1,9 @@ +import sys +from typing import TYPE_CHECKING + +if TYPE_CHECKING: + from ._font import Font +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import(__name__, [], ["._font.Font"]) diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/choroplethmapbox/colorbar/title/_font.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/choroplethmapbox/colorbar/title/_font.py new file mode 100644 index 0000000000000000000000000000000000000000..1fd1fc233ad0a377943001a99e282991641967f6 --- /dev/null +++ b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/choroplethmapbox/colorbar/title/_font.py @@ -0,0 +1,334 @@ +# --- THIS FILE IS AUTO-GENERATED --- +# Modifications will be overwitten the next time code generation run. + +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Font(_BaseTraceHierarchyType): + _parent_path_str = "choroplethmapbox.colorbar.title" + _path_str = "choroplethmapbox.colorbar.title.font" + _valid_props = { + "color", + "family", + "lineposition", + "shadow", + "size", + "style", + "textcase", + "variant", + "weight", + } + + @property + def color(self): + """ + The 'color' property is a color and may be specified as: + - A hex string (e.g. '#ff0000') + - An rgb/rgba string (e.g. 'rgb(255,0,0)') + - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') + - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') + - A named CSS color: see https://plotly.com/python/css-colors/ for a list + + Returns + ------- + str + """ + return self["color"] + + @color.setter + def color(self, val): + self["color"] = val + + @property + def family(self): + """ + HTML font family - the typeface that will be applied by the web + browser. The web browser can only apply a font if it is + available on the system where it runs. Provide multiple font + families, separated by commas, to indicate the order in which + to apply fonts if they aren't available. + + The 'family' property is a string and must be specified as: + - A non-empty string + + Returns + ------- + str + """ + return self["family"] + + @family.setter + def family(self, val): + self["family"] = val + + @property + def lineposition(self): + """ + Sets the kind of decoration line(s) with text, such as an + "under", "over" or "through" as well as combinations e.g. + "under+over", etc. + + The 'lineposition' property is a flaglist and may be specified + as a string containing: + - Any combination of ['under', 'over', 'through'] joined with '+' characters + (e.g. 'under+over') + OR exactly one of ['none'] (e.g. 'none') + + Returns + ------- + Any + """ + return self["lineposition"] + + @lineposition.setter + def lineposition(self, val): + self["lineposition"] = val + + @property + def shadow(self): + """ + Sets the shape and color of the shadow behind text. "auto" + places minimal shadow and applies contrast text font color. See + https://developer.mozilla.org/en-US/docs/Web/CSS/text-shadow + for additional options. + + The 'shadow' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["shadow"] + + @shadow.setter + def shadow(self, val): + self["shadow"] = val + + @property + def size(self): + """ + The 'size' property is a number and may be specified as: + - An int or float in the interval [1, inf] + + Returns + ------- + int|float + """ + return self["size"] + + @size.setter + def size(self, val): + self["size"] = val + + @property + def style(self): + """ + Sets whether a font should be styled with a normal or italic + face from its family. + + The 'style' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['normal', 'italic'] + + Returns + ------- + Any + """ + return self["style"] + + @style.setter + def style(self, val): + self["style"] = val + + @property + def textcase(self): + """ + Sets capitalization of text. It can be used to make text appear + in all-uppercase or all-lowercase, or with each word + capitalized. + + The 'textcase' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['normal', 'word caps', 'upper', 'lower'] + + Returns + ------- + Any + """ + return self["textcase"] + + @textcase.setter + def textcase(self, val): + self["textcase"] = val + + @property + def variant(self): + """ + Sets the variant of the font. + + The 'variant' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['normal', 'small-caps', 'all-small-caps', + 'all-petite-caps', 'petite-caps', 'unicase'] + + Returns + ------- + Any + """ + return self["variant"] + + @variant.setter + def variant(self, val): + self["variant"] = val + + @property + def weight(self): + """ + Sets the weight (or boldness) of the font. + + The 'weight' property is a integer and may be specified as: + - An int (or float that will be cast to an int) + in the interval [1, 1000] + OR exactly one of ['normal', 'bold'] (e.g. 'bold') + + Returns + ------- + int + """ + return self["weight"] + + @weight.setter + def weight(self, val): + self["weight"] = val + + @property + def _prop_descriptions(self): + return """\ + color + + family + HTML font family - the typeface that will be applied by + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. + lineposition + Sets the kind of decoration line(s) with text, such as + an "under", "over" or "through" as well as combinations + e.g. "under+over", etc. + shadow + Sets the shape and color of the shadow behind text. + "auto" places minimal shadow and applies contrast text + font color. See https://developer.mozilla.org/en- + US/docs/Web/CSS/text-shadow for additional options. + size + + style + Sets whether a font should be styled with a normal or + italic face from its family. + textcase + Sets capitalization of text. It can be used to make + text appear in all-uppercase or all-lowercase, or with + each word capitalized. + variant + Sets the variant of the font. + weight + Sets the weight (or boldness) of the font. + """ + + def __init__( + self, + arg=None, + color=None, + family=None, + lineposition=None, + shadow=None, + size=None, + style=None, + textcase=None, + variant=None, + weight=None, + **kwargs, + ): + """ + Construct a new Font object + + Sets this color bar's title font. + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of :class:`plotly.graph_objs.choroplethmapb + ox.colorbar.title.Font` + color + + family + HTML font family - the typeface that will be applied by + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. + lineposition + Sets the kind of decoration line(s) with text, such as + an "under", "over" or "through" as well as combinations + e.g. "under+over", etc. + shadow + Sets the shape and color of the shadow behind text. + "auto" places minimal shadow and applies contrast text + font color. See https://developer.mozilla.org/en- + US/docs/Web/CSS/text-shadow for additional options. + size + + style + Sets whether a font should be styled with a normal or + italic face from its family. + textcase + Sets capitalization of text. It can be used to make + text appear in all-uppercase or all-lowercase, or with + each word capitalized. + variant + Sets the variant of the font. + weight + Sets the weight (or boldness) of the font. + + Returns + ------- + Font + """ + super().__init__("font") + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + if arg is None: + arg = {} + elif isinstance(arg, self.__class__): + arg = arg.to_plotly_json() + elif isinstance(arg, dict): + arg = _copy.copy(arg) + else: + raise ValueError("""\ +The first argument to the plotly.graph_objs.choroplethmapbox.colorbar.title.Font +constructor must be a dict or +an instance of :class:`plotly.graph_objs.choroplethmapbox.colorbar.title.Font`""") + + self._skip_invalid = kwargs.pop("skip_invalid", False) + self._validate = kwargs.pop("_validate", True) + + self._set_property("color", arg, color) + self._set_property("family", arg, family) + self._set_property("lineposition", arg, lineposition) + self._set_property("shadow", arg, shadow) + self._set_property("size", arg, size) + self._set_property("style", arg, style) + self._set_property("textcase", arg, textcase) + self._set_property("variant", arg, variant) + self._set_property("weight", arg, weight) + self._process_kwargs(**dict(arg, **kwargs)) + self._skip_invalid = False diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/choroplethmapbox/hoverlabel/.___init__.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/choroplethmapbox/hoverlabel/.___init__.py new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/choroplethmapbox/hoverlabel/.___init__.py differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/choroplethmapbox/hoverlabel/.___pycache__ b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/choroplethmapbox/hoverlabel/.___pycache__ new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/choroplethmapbox/hoverlabel/.___pycache__ differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/choroplethmapbox/hoverlabel/.__font.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/choroplethmapbox/hoverlabel/.__font.py new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/choroplethmapbox/hoverlabel/.__font.py differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/choroplethmapbox/hoverlabel/__init__.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/choroplethmapbox/hoverlabel/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..56f600d3458c41f269053307377e9707ab13e090 --- /dev/null +++ b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/choroplethmapbox/hoverlabel/__init__.py @@ -0,0 +1,9 @@ +import sys +from typing import TYPE_CHECKING + +if TYPE_CHECKING: + from ._font import Font +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import(__name__, [], ["._font.Font"]) diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/choroplethmapbox/hoverlabel/_font.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/choroplethmapbox/hoverlabel/_font.py new file mode 100644 index 0000000000000000000000000000000000000000..20d0759f7899f5a010ebfd936a0e6c9b528b5a99 --- /dev/null +++ b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/choroplethmapbox/hoverlabel/_font.py @@ -0,0 +1,587 @@ +# --- THIS FILE IS AUTO-GENERATED --- +# Modifications will be overwitten the next time code generation run. + +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Font(_BaseTraceHierarchyType): + _parent_path_str = "choroplethmapbox.hoverlabel" + _path_str = "choroplethmapbox.hoverlabel.font" + _valid_props = { + "color", + "colorsrc", + "family", + "familysrc", + "lineposition", + "linepositionsrc", + "shadow", + "shadowsrc", + "size", + "sizesrc", + "style", + "stylesrc", + "textcase", + "textcasesrc", + "variant", + "variantsrc", + "weight", + "weightsrc", + } + + @property + def color(self): + """ + The 'color' property is a color and may be specified as: + - A hex string (e.g. '#ff0000') + - An rgb/rgba string (e.g. 'rgb(255,0,0)') + - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') + - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') + - A named CSS color: see https://plotly.com/python/css-colors/ for a list + - A list or array of any of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["color"] + + @color.setter + def color(self, val): + self["color"] = val + + @property + def colorsrc(self): + """ + Sets the source reference on Chart Studio Cloud for `color`. + + The 'colorsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["colorsrc"] + + @colorsrc.setter + def colorsrc(self, val): + self["colorsrc"] = val + + @property + def family(self): + """ + HTML font family - the typeface that will be applied by the web + browser. The web browser can only apply a font if it is + available on the system where it runs. Provide multiple font + families, separated by commas, to indicate the order in which + to apply fonts if they aren't available. + + The 'family' property is a string and must be specified as: + - A non-empty string + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["family"] + + @family.setter + def family(self, val): + self["family"] = val + + @property + def familysrc(self): + """ + Sets the source reference on Chart Studio Cloud for `family`. + + The 'familysrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["familysrc"] + + @familysrc.setter + def familysrc(self, val): + self["familysrc"] = val + + @property + def lineposition(self): + """ + Sets the kind of decoration line(s) with text, such as an + "under", "over" or "through" as well as combinations e.g. + "under+over", etc. + + The 'lineposition' property is a flaglist and may be specified + as a string containing: + - Any combination of ['under', 'over', 'through'] joined with '+' characters + (e.g. 'under+over') + OR exactly one of ['none'] (e.g. 'none') + - A list or array of the above + + Returns + ------- + Any|numpy.ndarray + """ + return self["lineposition"] + + @lineposition.setter + def lineposition(self, val): + self["lineposition"] = val + + @property + def linepositionsrc(self): + """ + Sets the source reference on Chart Studio Cloud for + `lineposition`. + + The 'linepositionsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["linepositionsrc"] + + @linepositionsrc.setter + def linepositionsrc(self, val): + self["linepositionsrc"] = val + + @property + def shadow(self): + """ + Sets the shape and color of the shadow behind text. "auto" + places minimal shadow and applies contrast text font color. See + https://developer.mozilla.org/en-US/docs/Web/CSS/text-shadow + for additional options. + + The 'shadow' property is a string and must be specified as: + - A string + - A number that will be converted to a string + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["shadow"] + + @shadow.setter + def shadow(self, val): + self["shadow"] = val + + @property + def shadowsrc(self): + """ + Sets the source reference on Chart Studio Cloud for `shadow`. + + The 'shadowsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["shadowsrc"] + + @shadowsrc.setter + def shadowsrc(self, val): + self["shadowsrc"] = val + + @property + def size(self): + """ + The 'size' property is a number and may be specified as: + - An int or float in the interval [1, inf] + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + int|float|numpy.ndarray + """ + return self["size"] + + @size.setter + def size(self, val): + self["size"] = val + + @property + def sizesrc(self): + """ + Sets the source reference on Chart Studio Cloud for `size`. + + The 'sizesrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["sizesrc"] + + @sizesrc.setter + def sizesrc(self, val): + self["sizesrc"] = val + + @property + def style(self): + """ + Sets whether a font should be styled with a normal or italic + face from its family. + + The 'style' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['normal', 'italic'] + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + Any|numpy.ndarray + """ + return self["style"] + + @style.setter + def style(self, val): + self["style"] = val + + @property + def stylesrc(self): + """ + Sets the source reference on Chart Studio Cloud for `style`. + + The 'stylesrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["stylesrc"] + + @stylesrc.setter + def stylesrc(self, val): + self["stylesrc"] = val + + @property + def textcase(self): + """ + Sets capitalization of text. It can be used to make text appear + in all-uppercase or all-lowercase, or with each word + capitalized. + + The 'textcase' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['normal', 'word caps', 'upper', 'lower'] + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + Any|numpy.ndarray + """ + return self["textcase"] + + @textcase.setter + def textcase(self, val): + self["textcase"] = val + + @property + def textcasesrc(self): + """ + Sets the source reference on Chart Studio Cloud for `textcase`. + + The 'textcasesrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["textcasesrc"] + + @textcasesrc.setter + def textcasesrc(self, val): + self["textcasesrc"] = val + + @property + def variant(self): + """ + Sets the variant of the font. + + The 'variant' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['normal', 'small-caps', 'all-small-caps', + 'all-petite-caps', 'petite-caps', 'unicase'] + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + Any|numpy.ndarray + """ + return self["variant"] + + @variant.setter + def variant(self, val): + self["variant"] = val + + @property + def variantsrc(self): + """ + Sets the source reference on Chart Studio Cloud for `variant`. + + The 'variantsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["variantsrc"] + + @variantsrc.setter + def variantsrc(self, val): + self["variantsrc"] = val + + @property + def weight(self): + """ + Sets the weight (or boldness) of the font. + + The 'weight' property is a integer and may be specified as: + - An int (or float that will be cast to an int) + in the interval [1, 1000] + OR exactly one of ['normal', 'bold'] (e.g. 'bold') + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + int|numpy.ndarray + """ + return self["weight"] + + @weight.setter + def weight(self, val): + self["weight"] = val + + @property + def weightsrc(self): + """ + Sets the source reference on Chart Studio Cloud for `weight`. + + The 'weightsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["weightsrc"] + + @weightsrc.setter + def weightsrc(self, val): + self["weightsrc"] = val + + @property + def _prop_descriptions(self): + return """\ + color + + colorsrc + Sets the source reference on Chart Studio Cloud for + `color`. + family + HTML font family - the typeface that will be applied by + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. + familysrc + Sets the source reference on Chart Studio Cloud for + `family`. + lineposition + Sets the kind of decoration line(s) with text, such as + an "under", "over" or "through" as well as combinations + e.g. "under+over", etc. + linepositionsrc + Sets the source reference on Chart Studio Cloud for + `lineposition`. + shadow + Sets the shape and color of the shadow behind text. + "auto" places minimal shadow and applies contrast text + font color. See https://developer.mozilla.org/en- + US/docs/Web/CSS/text-shadow for additional options. + shadowsrc + Sets the source reference on Chart Studio Cloud for + `shadow`. + size + + sizesrc + Sets the source reference on Chart Studio Cloud for + `size`. + style + Sets whether a font should be styled with a normal or + italic face from its family. + stylesrc + Sets the source reference on Chart Studio Cloud for + `style`. + textcase + Sets capitalization of text. It can be used to make + text appear in all-uppercase or all-lowercase, or with + each word capitalized. + textcasesrc + Sets the source reference on Chart Studio Cloud for + `textcase`. + variant + Sets the variant of the font. + variantsrc + Sets the source reference on Chart Studio Cloud for + `variant`. + weight + Sets the weight (or boldness) of the font. + weightsrc + Sets the source reference on Chart Studio Cloud for + `weight`. + """ + + def __init__( + self, + arg=None, + color=None, + colorsrc=None, + family=None, + familysrc=None, + lineposition=None, + linepositionsrc=None, + shadow=None, + shadowsrc=None, + size=None, + sizesrc=None, + style=None, + stylesrc=None, + textcase=None, + textcasesrc=None, + variant=None, + variantsrc=None, + weight=None, + weightsrc=None, + **kwargs, + ): + """ + Construct a new Font object + + Sets the font used in hover labels. + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of :class:`plotly.graph_objs.choroplethmapb + ox.hoverlabel.Font` + color + + colorsrc + Sets the source reference on Chart Studio Cloud for + `color`. + family + HTML font family - the typeface that will be applied by + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. + familysrc + Sets the source reference on Chart Studio Cloud for + `family`. + lineposition + Sets the kind of decoration line(s) with text, such as + an "under", "over" or "through" as well as combinations + e.g. "under+over", etc. + linepositionsrc + Sets the source reference on Chart Studio Cloud for + `lineposition`. + shadow + Sets the shape and color of the shadow behind text. + "auto" places minimal shadow and applies contrast text + font color. See https://developer.mozilla.org/en- + US/docs/Web/CSS/text-shadow for additional options. + shadowsrc + Sets the source reference on Chart Studio Cloud for + `shadow`. + size + + sizesrc + Sets the source reference on Chart Studio Cloud for + `size`. + style + Sets whether a font should be styled with a normal or + italic face from its family. + stylesrc + Sets the source reference on Chart Studio Cloud for + `style`. + textcase + Sets capitalization of text. It can be used to make + text appear in all-uppercase or all-lowercase, or with + each word capitalized. + textcasesrc + Sets the source reference on Chart Studio Cloud for + `textcase`. + variant + Sets the variant of the font. + variantsrc + Sets the source reference on Chart Studio Cloud for + `variant`. + weight + Sets the weight (or boldness) of the font. + weightsrc + Sets the source reference on Chart Studio Cloud for + `weight`. + + Returns + ------- + Font + """ + super().__init__("font") + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + if arg is None: + arg = {} + elif isinstance(arg, self.__class__): + arg = arg.to_plotly_json() + elif isinstance(arg, dict): + arg = _copy.copy(arg) + else: + raise ValueError("""\ +The first argument to the plotly.graph_objs.choroplethmapbox.hoverlabel.Font +constructor must be a dict or +an instance of :class:`plotly.graph_objs.choroplethmapbox.hoverlabel.Font`""") + + self._skip_invalid = kwargs.pop("skip_invalid", False) + self._validate = kwargs.pop("_validate", True) + + self._set_property("color", arg, color) + self._set_property("colorsrc", arg, colorsrc) + self._set_property("family", arg, family) + self._set_property("familysrc", arg, familysrc) + self._set_property("lineposition", arg, lineposition) + self._set_property("linepositionsrc", arg, linepositionsrc) + self._set_property("shadow", arg, shadow) + self._set_property("shadowsrc", arg, shadowsrc) + self._set_property("size", arg, size) + self._set_property("sizesrc", arg, sizesrc) + self._set_property("style", arg, style) + self._set_property("stylesrc", arg, stylesrc) + self._set_property("textcase", arg, textcase) + self._set_property("textcasesrc", arg, textcasesrc) + self._set_property("variant", arg, variant) + self._set_property("variantsrc", arg, variantsrc) + self._set_property("weight", arg, weight) + self._set_property("weightsrc", arg, weightsrc) + self._process_kwargs(**dict(arg, **kwargs)) + self._skip_invalid = False diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/choroplethmapbox/legendgrouptitle/.___init__.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/choroplethmapbox/legendgrouptitle/.___init__.py new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/choroplethmapbox/legendgrouptitle/.___init__.py differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/choroplethmapbox/legendgrouptitle/.___pycache__ b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/choroplethmapbox/legendgrouptitle/.___pycache__ new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/choroplethmapbox/legendgrouptitle/.___pycache__ differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/choroplethmapbox/legendgrouptitle/.__font.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/choroplethmapbox/legendgrouptitle/.__font.py new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/choroplethmapbox/legendgrouptitle/.__font.py differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/choroplethmapbox/legendgrouptitle/__init__.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/choroplethmapbox/legendgrouptitle/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..56f600d3458c41f269053307377e9707ab13e090 --- /dev/null +++ b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/choroplethmapbox/legendgrouptitle/__init__.py @@ -0,0 +1,9 @@ +import sys +from typing import TYPE_CHECKING + +if TYPE_CHECKING: + from ._font import Font +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import(__name__, [], ["._font.Font"]) diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/choroplethmapbox/legendgrouptitle/_font.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/choroplethmapbox/legendgrouptitle/_font.py new file mode 100644 index 0000000000000000000000000000000000000000..21b889a3b8d948975f9fff9f0b3af87bd1419d1b --- /dev/null +++ b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/choroplethmapbox/legendgrouptitle/_font.py @@ -0,0 +1,334 @@ +# --- THIS FILE IS AUTO-GENERATED --- +# Modifications will be overwitten the next time code generation run. + +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Font(_BaseTraceHierarchyType): + _parent_path_str = "choroplethmapbox.legendgrouptitle" + _path_str = "choroplethmapbox.legendgrouptitle.font" + _valid_props = { + "color", + "family", + "lineposition", + "shadow", + "size", + "style", + "textcase", + "variant", + "weight", + } + + @property + def color(self): + """ + The 'color' property is a color and may be specified as: + - A hex string (e.g. '#ff0000') + - An rgb/rgba string (e.g. 'rgb(255,0,0)') + - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') + - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') + - A named CSS color: see https://plotly.com/python/css-colors/ for a list + + Returns + ------- + str + """ + return self["color"] + + @color.setter + def color(self, val): + self["color"] = val + + @property + def family(self): + """ + HTML font family - the typeface that will be applied by the web + browser. The web browser can only apply a font if it is + available on the system where it runs. Provide multiple font + families, separated by commas, to indicate the order in which + to apply fonts if they aren't available. + + The 'family' property is a string and must be specified as: + - A non-empty string + + Returns + ------- + str + """ + return self["family"] + + @family.setter + def family(self, val): + self["family"] = val + + @property + def lineposition(self): + """ + Sets the kind of decoration line(s) with text, such as an + "under", "over" or "through" as well as combinations e.g. + "under+over", etc. + + The 'lineposition' property is a flaglist and may be specified + as a string containing: + - Any combination of ['under', 'over', 'through'] joined with '+' characters + (e.g. 'under+over') + OR exactly one of ['none'] (e.g. 'none') + + Returns + ------- + Any + """ + return self["lineposition"] + + @lineposition.setter + def lineposition(self, val): + self["lineposition"] = val + + @property + def shadow(self): + """ + Sets the shape and color of the shadow behind text. "auto" + places minimal shadow and applies contrast text font color. See + https://developer.mozilla.org/en-US/docs/Web/CSS/text-shadow + for additional options. + + The 'shadow' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["shadow"] + + @shadow.setter + def shadow(self, val): + self["shadow"] = val + + @property + def size(self): + """ + The 'size' property is a number and may be specified as: + - An int or float in the interval [1, inf] + + Returns + ------- + int|float + """ + return self["size"] + + @size.setter + def size(self, val): + self["size"] = val + + @property + def style(self): + """ + Sets whether a font should be styled with a normal or italic + face from its family. + + The 'style' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['normal', 'italic'] + + Returns + ------- + Any + """ + return self["style"] + + @style.setter + def style(self, val): + self["style"] = val + + @property + def textcase(self): + """ + Sets capitalization of text. It can be used to make text appear + in all-uppercase or all-lowercase, or with each word + capitalized. + + The 'textcase' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['normal', 'word caps', 'upper', 'lower'] + + Returns + ------- + Any + """ + return self["textcase"] + + @textcase.setter + def textcase(self, val): + self["textcase"] = val + + @property + def variant(self): + """ + Sets the variant of the font. + + The 'variant' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['normal', 'small-caps', 'all-small-caps', + 'all-petite-caps', 'petite-caps', 'unicase'] + + Returns + ------- + Any + """ + return self["variant"] + + @variant.setter + def variant(self, val): + self["variant"] = val + + @property + def weight(self): + """ + Sets the weight (or boldness) of the font. + + The 'weight' property is a integer and may be specified as: + - An int (or float that will be cast to an int) + in the interval [1, 1000] + OR exactly one of ['normal', 'bold'] (e.g. 'bold') + + Returns + ------- + int + """ + return self["weight"] + + @weight.setter + def weight(self, val): + self["weight"] = val + + @property + def _prop_descriptions(self): + return """\ + color + + family + HTML font family - the typeface that will be applied by + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. + lineposition + Sets the kind of decoration line(s) with text, such as + an "under", "over" or "through" as well as combinations + e.g. "under+over", etc. + shadow + Sets the shape and color of the shadow behind text. + "auto" places minimal shadow and applies contrast text + font color. See https://developer.mozilla.org/en- + US/docs/Web/CSS/text-shadow for additional options. + size + + style + Sets whether a font should be styled with a normal or + italic face from its family. + textcase + Sets capitalization of text. It can be used to make + text appear in all-uppercase or all-lowercase, or with + each word capitalized. + variant + Sets the variant of the font. + weight + Sets the weight (or boldness) of the font. + """ + + def __init__( + self, + arg=None, + color=None, + family=None, + lineposition=None, + shadow=None, + size=None, + style=None, + textcase=None, + variant=None, + weight=None, + **kwargs, + ): + """ + Construct a new Font object + + Sets this legend group's title font. + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of :class:`plotly.graph_objs.choroplethmapb + ox.legendgrouptitle.Font` + color + + family + HTML font family - the typeface that will be applied by + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. + lineposition + Sets the kind of decoration line(s) with text, such as + an "under", "over" or "through" as well as combinations + e.g. "under+over", etc. + shadow + Sets the shape and color of the shadow behind text. + "auto" places minimal shadow and applies contrast text + font color. See https://developer.mozilla.org/en- + US/docs/Web/CSS/text-shadow for additional options. + size + + style + Sets whether a font should be styled with a normal or + italic face from its family. + textcase + Sets capitalization of text. It can be used to make + text appear in all-uppercase or all-lowercase, or with + each word capitalized. + variant + Sets the variant of the font. + weight + Sets the weight (or boldness) of the font. + + Returns + ------- + Font + """ + super().__init__("font") + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + if arg is None: + arg = {} + elif isinstance(arg, self.__class__): + arg = arg.to_plotly_json() + elif isinstance(arg, dict): + arg = _copy.copy(arg) + else: + raise ValueError("""\ +The first argument to the plotly.graph_objs.choroplethmapbox.legendgrouptitle.Font +constructor must be a dict or +an instance of :class:`plotly.graph_objs.choroplethmapbox.legendgrouptitle.Font`""") + + self._skip_invalid = kwargs.pop("skip_invalid", False) + self._validate = kwargs.pop("_validate", True) + + self._set_property("color", arg, color) + self._set_property("family", arg, family) + self._set_property("lineposition", arg, lineposition) + self._set_property("shadow", arg, shadow) + self._set_property("size", arg, size) + self._set_property("style", arg, style) + self._set_property("textcase", arg, textcase) + self._set_property("variant", arg, variant) + self._set_property("weight", arg, weight) + self._process_kwargs(**dict(arg, **kwargs)) + self._skip_invalid = False diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/choroplethmapbox/marker/.___init__.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/choroplethmapbox/marker/.___init__.py new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/choroplethmapbox/marker/.___init__.py differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/choroplethmapbox/marker/.___pycache__ b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/choroplethmapbox/marker/.___pycache__ new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/choroplethmapbox/marker/.___pycache__ differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/choroplethmapbox/marker/.__line.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/choroplethmapbox/marker/.__line.py new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/choroplethmapbox/marker/.__line.py differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/choroplethmapbox/marker/__init__.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/choroplethmapbox/marker/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..33e42c007335e876d1a3c1d78cec108c9248c1c9 --- /dev/null +++ b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/choroplethmapbox/marker/__init__.py @@ -0,0 +1,9 @@ +import sys +from typing import TYPE_CHECKING + +if TYPE_CHECKING: + from ._line import Line +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import(__name__, [], ["._line.Line"]) diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/choroplethmapbox/marker/_line.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/choroplethmapbox/marker/_line.py new file mode 100644 index 0000000000000000000000000000000000000000..47d10d322dbe535d117861670b62acf59352a262 --- /dev/null +++ b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/choroplethmapbox/marker/_line.py @@ -0,0 +1,171 @@ +# --- THIS FILE IS AUTO-GENERATED --- +# Modifications will be overwitten the next time code generation run. + +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Line(_BaseTraceHierarchyType): + _parent_path_str = "choroplethmapbox.marker" + _path_str = "choroplethmapbox.marker.line" + _valid_props = {"color", "colorsrc", "width", "widthsrc"} + + @property + def color(self): + """ + Sets the marker.line color. It accepts either a specific color + or an array of numbers that are mapped to the colorscale + relative to the max and min values of the array or relative to + `marker.line.cmin` and `marker.line.cmax` if set. + + The 'color' property is a color and may be specified as: + - A hex string (e.g. '#ff0000') + - An rgb/rgba string (e.g. 'rgb(255,0,0)') + - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') + - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') + - A named CSS color: see https://plotly.com/python/css-colors/ for a list + - A list or array of any of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["color"] + + @color.setter + def color(self, val): + self["color"] = val + + @property + def colorsrc(self): + """ + Sets the source reference on Chart Studio Cloud for `color`. + + The 'colorsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["colorsrc"] + + @colorsrc.setter + def colorsrc(self, val): + self["colorsrc"] = val + + @property + def width(self): + """ + Sets the width (in px) of the lines bounding the marker points. + + The 'width' property is a number and may be specified as: + - An int or float in the interval [0, inf] + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + int|float|numpy.ndarray + """ + return self["width"] + + @width.setter + def width(self, val): + self["width"] = val + + @property + def widthsrc(self): + """ + Sets the source reference on Chart Studio Cloud for `width`. + + The 'widthsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["widthsrc"] + + @widthsrc.setter + def widthsrc(self, val): + self["widthsrc"] = val + + @property + def _prop_descriptions(self): + return """\ + color + Sets the marker.line color. It accepts either a + specific color or an array of numbers that are mapped + to the colorscale relative to the max and min values of + the array or relative to `marker.line.cmin` and + `marker.line.cmax` if set. + colorsrc + Sets the source reference on Chart Studio Cloud for + `color`. + width + Sets the width (in px) of the lines bounding the marker + points. + widthsrc + Sets the source reference on Chart Studio Cloud for + `width`. + """ + + def __init__( + self, arg=None, color=None, colorsrc=None, width=None, widthsrc=None, **kwargs + ): + """ + Construct a new Line object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.choroplethmapbox.marker.Line` + color + Sets the marker.line color. It accepts either a + specific color or an array of numbers that are mapped + to the colorscale relative to the max and min values of + the array or relative to `marker.line.cmin` and + `marker.line.cmax` if set. + colorsrc + Sets the source reference on Chart Studio Cloud for + `color`. + width + Sets the width (in px) of the lines bounding the marker + points. + widthsrc + Sets the source reference on Chart Studio Cloud for + `width`. + + Returns + ------- + Line + """ + super().__init__("line") + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + if arg is None: + arg = {} + elif isinstance(arg, self.__class__): + arg = arg.to_plotly_json() + elif isinstance(arg, dict): + arg = _copy.copy(arg) + else: + raise ValueError("""\ +The first argument to the plotly.graph_objs.choroplethmapbox.marker.Line +constructor must be a dict or +an instance of :class:`plotly.graph_objs.choroplethmapbox.marker.Line`""") + + self._skip_invalid = kwargs.pop("skip_invalid", False) + self._validate = kwargs.pop("_validate", True) + + self._set_property("color", arg, color) + self._set_property("colorsrc", arg, colorsrc) + self._set_property("width", arg, width) + self._set_property("widthsrc", arg, widthsrc) + self._process_kwargs(**dict(arg, **kwargs)) + self._skip_invalid = False diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/choroplethmapbox/selected/.___init__.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/choroplethmapbox/selected/.___init__.py new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/choroplethmapbox/selected/.___init__.py differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/choroplethmapbox/selected/.___pycache__ b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/choroplethmapbox/selected/.___pycache__ new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/choroplethmapbox/selected/.___pycache__ differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/choroplethmapbox/selected/.__marker.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/choroplethmapbox/selected/.__marker.py new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/choroplethmapbox/selected/.__marker.py differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/choroplethmapbox/selected/__init__.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/choroplethmapbox/selected/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..b4ba7bf2614e6c8f6fce41321172f465c59ab433 --- /dev/null +++ b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/choroplethmapbox/selected/__init__.py @@ -0,0 +1,9 @@ +import sys +from typing import TYPE_CHECKING + +if TYPE_CHECKING: + from ._marker import Marker +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import(__name__, [], ["._marker.Marker"]) diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/choroplethmapbox/selected/_marker.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/choroplethmapbox/selected/_marker.py new file mode 100644 index 0000000000000000000000000000000000000000..4b7a35defba6fbc84880e90df6c5ba8079ba9cae --- /dev/null +++ b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/choroplethmapbox/selected/_marker.py @@ -0,0 +1,77 @@ +# --- THIS FILE IS AUTO-GENERATED --- +# Modifications will be overwitten the next time code generation run. + +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Marker(_BaseTraceHierarchyType): + _parent_path_str = "choroplethmapbox.selected" + _path_str = "choroplethmapbox.selected.marker" + _valid_props = {"opacity"} + + @property + def opacity(self): + """ + Sets the marker opacity of selected points. + + The 'opacity' property is a number and may be specified as: + - An int or float in the interval [0, 1] + + Returns + ------- + int|float + """ + return self["opacity"] + + @opacity.setter + def opacity(self, val): + self["opacity"] = val + + @property + def _prop_descriptions(self): + return """\ + opacity + Sets the marker opacity of selected points. + """ + + def __init__(self, arg=None, opacity=None, **kwargs): + """ + Construct a new Marker object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of :class:`plotly.graph_objs.choroplethmapb + ox.selected.Marker` + opacity + Sets the marker opacity of selected points. + + Returns + ------- + Marker + """ + super().__init__("marker") + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + if arg is None: + arg = {} + elif isinstance(arg, self.__class__): + arg = arg.to_plotly_json() + elif isinstance(arg, dict): + arg = _copy.copy(arg) + else: + raise ValueError("""\ +The first argument to the plotly.graph_objs.choroplethmapbox.selected.Marker +constructor must be a dict or +an instance of :class:`plotly.graph_objs.choroplethmapbox.selected.Marker`""") + + self._skip_invalid = kwargs.pop("skip_invalid", False) + self._validate = kwargs.pop("_validate", True) + + self._set_property("opacity", arg, opacity) + self._process_kwargs(**dict(arg, **kwargs)) + self._skip_invalid = False diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/choroplethmapbox/unselected/.___init__.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/choroplethmapbox/unselected/.___init__.py new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/choroplethmapbox/unselected/.___init__.py differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/choroplethmapbox/unselected/.___pycache__ b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/choroplethmapbox/unselected/.___pycache__ new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/choroplethmapbox/unselected/.___pycache__ differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/choroplethmapbox/unselected/.__marker.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/choroplethmapbox/unselected/.__marker.py new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/choroplethmapbox/unselected/.__marker.py differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/choroplethmapbox/unselected/__init__.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/choroplethmapbox/unselected/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..b4ba7bf2614e6c8f6fce41321172f465c59ab433 --- /dev/null +++ b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/choroplethmapbox/unselected/__init__.py @@ -0,0 +1,9 @@ +import sys +from typing import TYPE_CHECKING + +if TYPE_CHECKING: + from ._marker import Marker +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import(__name__, [], ["._marker.Marker"]) diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/choroplethmapbox/unselected/_marker.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/choroplethmapbox/unselected/_marker.py new file mode 100644 index 0000000000000000000000000000000000000000..5da2bb2173fab36bc68922d134d85227a94d66dd --- /dev/null +++ b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/choroplethmapbox/unselected/_marker.py @@ -0,0 +1,80 @@ +# --- THIS FILE IS AUTO-GENERATED --- +# Modifications will be overwitten the next time code generation run. + +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Marker(_BaseTraceHierarchyType): + _parent_path_str = "choroplethmapbox.unselected" + _path_str = "choroplethmapbox.unselected.marker" + _valid_props = {"opacity"} + + @property + def opacity(self): + """ + Sets the marker opacity of unselected points, applied only when + a selection exists. + + The 'opacity' property is a number and may be specified as: + - An int or float in the interval [0, 1] + + Returns + ------- + int|float + """ + return self["opacity"] + + @opacity.setter + def opacity(self, val): + self["opacity"] = val + + @property + def _prop_descriptions(self): + return """\ + opacity + Sets the marker opacity of unselected points, applied + only when a selection exists. + """ + + def __init__(self, arg=None, opacity=None, **kwargs): + """ + Construct a new Marker object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of :class:`plotly.graph_objs.choroplethmapb + ox.unselected.Marker` + opacity + Sets the marker opacity of unselected points, applied + only when a selection exists. + + Returns + ------- + Marker + """ + super().__init__("marker") + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + if arg is None: + arg = {} + elif isinstance(arg, self.__class__): + arg = arg.to_plotly_json() + elif isinstance(arg, dict): + arg = _copy.copy(arg) + else: + raise ValueError("""\ +The first argument to the plotly.graph_objs.choroplethmapbox.unselected.Marker +constructor must be a dict or +an instance of :class:`plotly.graph_objs.choroplethmapbox.unselected.Marker`""") + + self._skip_invalid = kwargs.pop("skip_invalid", False) + self._validate = kwargs.pop("_validate", True) + + self._set_property("opacity", arg, opacity) + self._process_kwargs(**dict(arg, **kwargs)) + self._skip_invalid = False diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/cone/.___init__.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/cone/.___init__.py new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/cone/.___init__.py differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/cone/.___pycache__ b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/cone/.___pycache__ new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/cone/.___pycache__ differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/cone/.__colorbar.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/cone/.__colorbar.py new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/cone/.__colorbar.py differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/cone/.__hoverlabel.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/cone/.__hoverlabel.py new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/cone/.__hoverlabel.py differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/cone/.__legendgrouptitle.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/cone/.__legendgrouptitle.py new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/cone/.__legendgrouptitle.py differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/cone/.__lighting.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/cone/.__lighting.py new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/cone/.__lighting.py differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/cone/.__lightposition.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/cone/.__lightposition.py new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/cone/.__lightposition.py differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/cone/.__stream.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/cone/.__stream.py new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/cone/.__stream.py differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/cone/._colorbar b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/cone/._colorbar new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/cone/._colorbar differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/cone/._hoverlabel b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/cone/._hoverlabel new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/cone/._hoverlabel differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/cone/._legendgrouptitle b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/cone/._legendgrouptitle new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/cone/._legendgrouptitle differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/cone/__init__.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/cone/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..c523ad166acc8315fce809744c6259cd900d821c --- /dev/null +++ b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/cone/__init__.py @@ -0,0 +1,28 @@ +import sys +from typing import TYPE_CHECKING + +if TYPE_CHECKING: + from ._colorbar import ColorBar + from ._hoverlabel import Hoverlabel + from ._legendgrouptitle import Legendgrouptitle + from ._lighting import Lighting + from ._lightposition import Lightposition + from ._stream import Stream + from . import colorbar + from . import hoverlabel + from . import legendgrouptitle +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [".colorbar", ".hoverlabel", ".legendgrouptitle"], + [ + "._colorbar.ColorBar", + "._hoverlabel.Hoverlabel", + "._legendgrouptitle.Legendgrouptitle", + "._lighting.Lighting", + "._lightposition.Lightposition", + "._stream.Stream", + ], + ) diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/cone/_colorbar.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/cone/_colorbar.py new file mode 100644 index 0000000000000000000000000000000000000000..5433bc9def6f96b74a28193c7d77e8730ffb2a12 --- /dev/null +++ b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/cone/_colorbar.py @@ -0,0 +1,1738 @@ +# --- THIS FILE IS AUTO-GENERATED --- +# Modifications will be overwitten the next time code generation run. + +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class ColorBar(_BaseTraceHierarchyType): + _parent_path_str = "cone" + _path_str = "cone.colorbar" + _valid_props = { + "bgcolor", + "bordercolor", + "borderwidth", + "dtick", + "exponentformat", + "labelalias", + "len", + "lenmode", + "minexponent", + "nticks", + "orientation", + "outlinecolor", + "outlinewidth", + "separatethousands", + "showexponent", + "showticklabels", + "showtickprefix", + "showticksuffix", + "thickness", + "thicknessmode", + "tick0", + "tickangle", + "tickcolor", + "tickfont", + "tickformat", + "tickformatstopdefaults", + "tickformatstops", + "ticklabeloverflow", + "ticklabelposition", + "ticklabelstep", + "ticklen", + "tickmode", + "tickprefix", + "ticks", + "ticksuffix", + "ticktext", + "ticktextsrc", + "tickvals", + "tickvalssrc", + "tickwidth", + "title", + "x", + "xanchor", + "xpad", + "xref", + "y", + "yanchor", + "ypad", + "yref", + } + + @property + def bgcolor(self): + """ + Sets the color of padded area. + + The 'bgcolor' property is a color and may be specified as: + - A hex string (e.g. '#ff0000') + - An rgb/rgba string (e.g. 'rgb(255,0,0)') + - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') + - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') + - A named CSS color: see https://plotly.com/python/css-colors/ for a list + + Returns + ------- + str + """ + return self["bgcolor"] + + @bgcolor.setter + def bgcolor(self, val): + self["bgcolor"] = val + + @property + def bordercolor(self): + """ + Sets the axis line color. + + The 'bordercolor' property is a color and may be specified as: + - A hex string (e.g. '#ff0000') + - An rgb/rgba string (e.g. 'rgb(255,0,0)') + - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') + - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') + - A named CSS color: see https://plotly.com/python/css-colors/ for a list + + Returns + ------- + str + """ + return self["bordercolor"] + + @bordercolor.setter + def bordercolor(self, val): + self["bordercolor"] = val + + @property + def borderwidth(self): + """ + Sets the width (in px) or the border enclosing this color bar. + + The 'borderwidth' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["borderwidth"] + + @borderwidth.setter + def borderwidth(self, val): + self["borderwidth"] = val + + @property + def dtick(self): + """ + Sets the step in-between ticks on this axis. Use with `tick0`. + Must be a positive number, or special strings available to + "log" and "date" axes. If the axis `type` is "log", then ticks + are set every 10^(n*dtick) where n is the tick number. For + example, to set a tick mark at 1, 10, 100, 1000, ... set dtick + to 1. To set tick marks at 1, 100, 10000, ... set dtick to 2. + To set tick marks at 1, 5, 25, 125, 625, 3125, ... set dtick to + log_10(5), or 0.69897000433. "log" has several special values; + "L", where `f` is a positive number, gives ticks linearly + spaced in value (but not position). For example `tick0` = 0.1, + `dtick` = "L0.5" will put ticks at 0.1, 0.6, 1.1, 1.6 etc. To + show powers of 10 plus small digits between, use "D1" (all + digits) or "D2" (only 2 and 5). `tick0` is ignored for "D1" and + "D2". If the axis `type` is "date", then you must convert the + time to milliseconds. For example, to set the interval between + ticks to one day, set `dtick` to 86400000.0. "date" also has + special values "M" gives ticks spaced by a number of months. + `n` must be a positive integer. To set ticks on the 15th of + every third month, set `tick0` to "2000-01-15" and `dtick` to + "M3". To set ticks every 4 years, set `dtick` to "M48" + + The 'dtick' property accepts values of any type + + Returns + ------- + Any + """ + return self["dtick"] + + @dtick.setter + def dtick(self, val): + self["dtick"] = val + + @property + def exponentformat(self): + """ + Determines a formatting rule for the tick exponents. For + example, consider the number 1,000,000,000. If "none", it + appears as 1,000,000,000. If "e", 1e+9. If "E", 1E+9. If + "power", 1x10^9 (with 9 in a super script). If "SI", 1G. If + "B", 1B. "SI" uses prefixes from "femto" f (10^-15) to "tera" T + (10^12). *SI extended* covers instead the full SI range from + "quecto" q (10^-30) to "quetta" Q (10^30). If "SI" or *SI + extended* is used and the exponent is beyond the above ranges, + the formatting rule will automatically be switched to the power + notation. + + The 'exponentformat' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['none', 'e', 'E', 'power', 'SI', 'B', 'SI extended'] + + Returns + ------- + Any + """ + return self["exponentformat"] + + @exponentformat.setter + def exponentformat(self, val): + self["exponentformat"] = val + + @property + def labelalias(self): + """ + Replacement text for specific tick or hover labels. For example + using {US: 'USA', CA: 'Canada'} changes US to USA and CA to + Canada. The labels we would have shown must match the keys + exactly, after adding any tickprefix or ticksuffix. For + negative numbers the minus sign symbol used (U+2212) is wider + than the regular ascii dash. That means you need to use −1 + instead of -1. labelalias can be used with any axis type, and + both keys (if needed) and values (if desired) can include html- + like tags or MathJax. + + The 'labelalias' property accepts values of any type + + Returns + ------- + Any + """ + return self["labelalias"] + + @labelalias.setter + def labelalias(self, val): + self["labelalias"] = val + + @property + def len(self): + """ + Sets the length of the color bar This measure excludes the + padding of both ends. That is, the color bar length is this + length minus the padding on both ends. + + The 'len' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["len"] + + @len.setter + def len(self, val): + self["len"] = val + + @property + def lenmode(self): + """ + Determines whether this color bar's length (i.e. the measure in + the color variation direction) is set in units of plot + "fraction" or in *pixels. Use `len` to set the value. + + The 'lenmode' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['fraction', 'pixels'] + + Returns + ------- + Any + """ + return self["lenmode"] + + @lenmode.setter + def lenmode(self, val): + self["lenmode"] = val + + @property + def minexponent(self): + """ + Hide SI prefix for 10^n if |n| is below this number. This only + has an effect when `tickformat` is "SI" or "B". + + The 'minexponent' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["minexponent"] + + @minexponent.setter + def minexponent(self, val): + self["minexponent"] = val + + @property + def nticks(self): + """ + Specifies the maximum number of ticks for the particular axis. + The actual number of ticks will be chosen automatically to be + less than or equal to `nticks`. Has an effect only if + `tickmode` is set to "auto". + + The 'nticks' property is a integer and may be specified as: + - An int (or float that will be cast to an int) + in the interval [0, 9223372036854775807] + + Returns + ------- + int + """ + return self["nticks"] + + @nticks.setter + def nticks(self, val): + self["nticks"] = val + + @property + def orientation(self): + """ + Sets the orientation of the colorbar. + + The 'orientation' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['h', 'v'] + + Returns + ------- + Any + """ + return self["orientation"] + + @orientation.setter + def orientation(self, val): + self["orientation"] = val + + @property + def outlinecolor(self): + """ + Sets the axis line color. + + The 'outlinecolor' property is a color and may be specified as: + - A hex string (e.g. '#ff0000') + - An rgb/rgba string (e.g. 'rgb(255,0,0)') + - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') + - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') + - A named CSS color: see https://plotly.com/python/css-colors/ for a list + + Returns + ------- + str + """ + return self["outlinecolor"] + + @outlinecolor.setter + def outlinecolor(self, val): + self["outlinecolor"] = val + + @property + def outlinewidth(self): + """ + Sets the width (in px) of the axis line. + + The 'outlinewidth' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["outlinewidth"] + + @outlinewidth.setter + def outlinewidth(self, val): + self["outlinewidth"] = val + + @property + def separatethousands(self): + """ + If "true", even 4-digit integers are separated + + The 'separatethousands' property is a boolean and must be specified as: + - A boolean value: True or False + + Returns + ------- + bool + """ + return self["separatethousands"] + + @separatethousands.setter + def separatethousands(self, val): + self["separatethousands"] = val + + @property + def showexponent(self): + """ + If "all", all exponents are shown besides their significands. + If "first", only the exponent of the first tick is shown. If + "last", only the exponent of the last tick is shown. If "none", + no exponents appear. + + The 'showexponent' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['all', 'first', 'last', 'none'] + + Returns + ------- + Any + """ + return self["showexponent"] + + @showexponent.setter + def showexponent(self, val): + self["showexponent"] = val + + @property + def showticklabels(self): + """ + Determines whether or not the tick labels are drawn. + + The 'showticklabels' property is a boolean and must be specified as: + - A boolean value: True or False + + Returns + ------- + bool + """ + return self["showticklabels"] + + @showticklabels.setter + def showticklabels(self, val): + self["showticklabels"] = val + + @property + def showtickprefix(self): + """ + If "all", all tick labels are displayed with a prefix. If + "first", only the first tick is displayed with a prefix. If + "last", only the last tick is displayed with a suffix. If + "none", tick prefixes are hidden. + + The 'showtickprefix' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['all', 'first', 'last', 'none'] + + Returns + ------- + Any + """ + return self["showtickprefix"] + + @showtickprefix.setter + def showtickprefix(self, val): + self["showtickprefix"] = val + + @property + def showticksuffix(self): + """ + Same as `showtickprefix` but for tick suffixes. + + The 'showticksuffix' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['all', 'first', 'last', 'none'] + + Returns + ------- + Any + """ + return self["showticksuffix"] + + @showticksuffix.setter + def showticksuffix(self, val): + self["showticksuffix"] = val + + @property + def thickness(self): + """ + Sets the thickness of the color bar This measure excludes the + size of the padding, ticks and labels. + + The 'thickness' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["thickness"] + + @thickness.setter + def thickness(self, val): + self["thickness"] = val + + @property + def thicknessmode(self): + """ + Determines whether this color bar's thickness (i.e. the measure + in the constant color direction) is set in units of plot + "fraction" or in "pixels". Use `thickness` to set the value. + + The 'thicknessmode' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['fraction', 'pixels'] + + Returns + ------- + Any + """ + return self["thicknessmode"] + + @thicknessmode.setter + def thicknessmode(self, val): + self["thicknessmode"] = val + + @property + def tick0(self): + """ + Sets the placement of the first tick on this axis. Use with + `dtick`. If the axis `type` is "log", then you must take the + log of your starting tick (e.g. to set the starting tick to + 100, set the `tick0` to 2) except when `dtick`=*L* (see + `dtick` for more info). If the axis `type` is "date", it should + be a date string, like date data. If the axis `type` is + "category", it should be a number, using the scale where each + category is assigned a serial number from zero in the order it + appears. + + The 'tick0' property accepts values of any type + + Returns + ------- + Any + """ + return self["tick0"] + + @tick0.setter + def tick0(self, val): + self["tick0"] = val + + @property + def tickangle(self): + """ + Sets the angle of the tick labels with respect to the + horizontal. For example, a `tickangle` of -90 draws the tick + labels vertically. + + The 'tickangle' property is a angle (in degrees) that may be + specified as a number between -180 and 180. + Numeric values outside this range are converted to the equivalent value + (e.g. 270 is converted to -90). + + Returns + ------- + int|float + """ + return self["tickangle"] + + @tickangle.setter + def tickangle(self, val): + self["tickangle"] = val + + @property + def tickcolor(self): + """ + Sets the tick color. + + The 'tickcolor' property is a color and may be specified as: + - A hex string (e.g. '#ff0000') + - An rgb/rgba string (e.g. 'rgb(255,0,0)') + - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') + - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') + - A named CSS color: see https://plotly.com/python/css-colors/ for a list + + Returns + ------- + str + """ + return self["tickcolor"] + + @tickcolor.setter + def tickcolor(self, val): + self["tickcolor"] = val + + @property + def tickfont(self): + """ + Sets the color bar's tick label font + + The 'tickfont' property is an instance of Tickfont + that may be specified as: + - An instance of :class:`plotly.graph_objs.cone.colorbar.Tickfont` + - A dict of string/value properties that will be passed + to the Tickfont constructor + + Returns + ------- + plotly.graph_objs.cone.colorbar.Tickfont + """ + return self["tickfont"] + + @tickfont.setter + def tickfont(self, val): + self["tickfont"] = val + + @property + def tickformat(self): + """ + Sets the tick label formatting rule using d3 formatting mini- + languages which are very similar to those in Python. For + numbers, see: + https://github.com/d3/d3-format/tree/v1.4.5#d3-format. And for + dates see: https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format. We add two items to d3's date + formatter: "%h" for half of the year as a decimal number as + well as "%{n}f" for fractional seconds with n digits. For + example, *2016-10-13 09:15:23.456* with tickformat + "%H~%M~%S.%2f" would display "09~15~23.46" + + The 'tickformat' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["tickformat"] + + @tickformat.setter + def tickformat(self, val): + self["tickformat"] = val + + @property + def tickformatstops(self): + """ + The 'tickformatstops' property is a tuple of instances of + Tickformatstop that may be specified as: + - A list or tuple of instances of plotly.graph_objs.cone.colorbar.Tickformatstop + - A list or tuple of dicts of string/value properties that + will be passed to the Tickformatstop constructor + + Returns + ------- + tuple[plotly.graph_objs.cone.colorbar.Tickformatstop] + """ + return self["tickformatstops"] + + @tickformatstops.setter + def tickformatstops(self, val): + self["tickformatstops"] = val + + @property + def tickformatstopdefaults(self): + """ + When used in a template (as + layout.template.data.cone.colorbar.tickformatstopdefaults), + sets the default property values to use for elements of + cone.colorbar.tickformatstops + + The 'tickformatstopdefaults' property is an instance of Tickformatstop + that may be specified as: + - An instance of :class:`plotly.graph_objs.cone.colorbar.Tickformatstop` + - A dict of string/value properties that will be passed + to the Tickformatstop constructor + + Returns + ------- + plotly.graph_objs.cone.colorbar.Tickformatstop + """ + return self["tickformatstopdefaults"] + + @tickformatstopdefaults.setter + def tickformatstopdefaults(self, val): + self["tickformatstopdefaults"] = val + + @property + def ticklabeloverflow(self): + """ + Determines how we handle tick labels that would overflow either + the graph div or the domain of the axis. The default value for + inside tick labels is *hide past domain*. In other cases the + default is *hide past div*. + + The 'ticklabeloverflow' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['allow', 'hide past div', 'hide past domain'] + + Returns + ------- + Any + """ + return self["ticklabeloverflow"] + + @ticklabeloverflow.setter + def ticklabeloverflow(self, val): + self["ticklabeloverflow"] = val + + @property + def ticklabelposition(self): + """ + Determines where tick labels are drawn relative to the ticks. + Left and right options are used when `orientation` is "h", top + and bottom when `orientation` is "v". + + The 'ticklabelposition' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['outside', 'inside', 'outside top', 'inside top', + 'outside left', 'inside left', 'outside right', 'inside + right', 'outside bottom', 'inside bottom'] + + Returns + ------- + Any + """ + return self["ticklabelposition"] + + @ticklabelposition.setter + def ticklabelposition(self, val): + self["ticklabelposition"] = val + + @property + def ticklabelstep(self): + """ + Sets the spacing between tick labels as compared to the spacing + between ticks. A value of 1 (default) means each tick gets a + label. A value of 2 means shows every 2nd label. A larger value + n means only every nth tick is labeled. `tick0` determines + which labels are shown. Not implemented for axes with `type` + "log" or "multicategory", or when `tickmode` is "array". + + The 'ticklabelstep' property is a integer and may be specified as: + - An int (or float that will be cast to an int) + in the interval [1, 9223372036854775807] + + Returns + ------- + int + """ + return self["ticklabelstep"] + + @ticklabelstep.setter + def ticklabelstep(self, val): + self["ticklabelstep"] = val + + @property + def ticklen(self): + """ + Sets the tick length (in px). + + The 'ticklen' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["ticklen"] + + @ticklen.setter + def ticklen(self, val): + self["ticklen"] = val + + @property + def tickmode(self): + """ + Sets the tick mode for this axis. If "auto", the number of + ticks is set via `nticks`. If "linear", the placement of the + ticks is determined by a starting position `tick0` and a tick + step `dtick` ("linear" is the default value if `tick0` and + `dtick` are provided). If "array", the placement of the ticks + is set via `tickvals` and the tick text is `ticktext`. ("array" + is the default value if `tickvals` is provided). + + The 'tickmode' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['auto', 'linear', 'array'] + + Returns + ------- + Any + """ + return self["tickmode"] + + @tickmode.setter + def tickmode(self, val): + self["tickmode"] = val + + @property + def tickprefix(self): + """ + Sets a tick label prefix. + + The 'tickprefix' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["tickprefix"] + + @tickprefix.setter + def tickprefix(self, val): + self["tickprefix"] = val + + @property + def ticks(self): + """ + Determines whether ticks are drawn or not. If "", this axis' + ticks are not drawn. If "outside" ("inside"), this axis' are + drawn outside (inside) the axis lines. + + The 'ticks' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['outside', 'inside', ''] + + Returns + ------- + Any + """ + return self["ticks"] + + @ticks.setter + def ticks(self, val): + self["ticks"] = val + + @property + def ticksuffix(self): + """ + Sets a tick label suffix. + + The 'ticksuffix' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["ticksuffix"] + + @ticksuffix.setter + def ticksuffix(self, val): + self["ticksuffix"] = val + + @property + def ticktext(self): + """ + Sets the text displayed at the ticks position via `tickvals`. + Only has an effect if `tickmode` is set to "array". Used with + `tickvals`. + + The 'ticktext' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["ticktext"] + + @ticktext.setter + def ticktext(self, val): + self["ticktext"] = val + + @property + def ticktextsrc(self): + """ + Sets the source reference on Chart Studio Cloud for `ticktext`. + + The 'ticktextsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["ticktextsrc"] + + @ticktextsrc.setter + def ticktextsrc(self, val): + self["ticktextsrc"] = val + + @property + def tickvals(self): + """ + Sets the values at which ticks on this axis appear. Only has an + effect if `tickmode` is set to "array". Used with `ticktext`. + + The 'tickvals' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["tickvals"] + + @tickvals.setter + def tickvals(self, val): + self["tickvals"] = val + + @property + def tickvalssrc(self): + """ + Sets the source reference on Chart Studio Cloud for `tickvals`. + + The 'tickvalssrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["tickvalssrc"] + + @tickvalssrc.setter + def tickvalssrc(self, val): + self["tickvalssrc"] = val + + @property + def tickwidth(self): + """ + Sets the tick width (in px). + + The 'tickwidth' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["tickwidth"] + + @tickwidth.setter + def tickwidth(self, val): + self["tickwidth"] = val + + @property + def title(self): + """ + The 'title' property is an instance of Title + that may be specified as: + - An instance of :class:`plotly.graph_objs.cone.colorbar.Title` + - A dict of string/value properties that will be passed + to the Title constructor + + Returns + ------- + plotly.graph_objs.cone.colorbar.Title + """ + return self["title"] + + @title.setter + def title(self, val): + self["title"] = val + + @property + def x(self): + """ + Sets the x position with respect to `xref` of the color bar (in + plot fraction). When `xref` is "paper", defaults to 1.02 when + `orientation` is "v" and 0.5 when `orientation` is "h". When + `xref` is "container", defaults to 1 when `orientation` is "v" + and 0.5 when `orientation` is "h". Must be between 0 and 1 if + `xref` is "container" and between "-2" and 3 if `xref` is + "paper". + + The 'x' property is a number and may be specified as: + - An int or float + + Returns + ------- + int|float + """ + return self["x"] + + @x.setter + def x(self, val): + self["x"] = val + + @property + def xanchor(self): + """ + Sets this color bar's horizontal position anchor. This anchor + binds the `x` position to the "left", "center" or "right" of + the color bar. Defaults to "left" when `orientation` is "v" and + "center" when `orientation` is "h". + + The 'xanchor' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['left', 'center', 'right'] + + Returns + ------- + Any + """ + return self["xanchor"] + + @xanchor.setter + def xanchor(self, val): + self["xanchor"] = val + + @property + def xpad(self): + """ + Sets the amount of padding (in px) along the x direction. + + The 'xpad' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["xpad"] + + @xpad.setter + def xpad(self, val): + self["xpad"] = val + + @property + def xref(self): + """ + Sets the container `x` refers to. "container" spans the entire + `width` of the plot. "paper" refers to the width of the + plotting area only. + + The 'xref' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['container', 'paper'] + + Returns + ------- + Any + """ + return self["xref"] + + @xref.setter + def xref(self, val): + self["xref"] = val + + @property + def y(self): + """ + Sets the y position with respect to `yref` of the color bar (in + plot fraction). When `yref` is "paper", defaults to 0.5 when + `orientation` is "v" and 1.02 when `orientation` is "h". When + `yref` is "container", defaults to 0.5 when `orientation` is + "v" and 1 when `orientation` is "h". Must be between 0 and 1 if + `yref` is "container" and between "-2" and 3 if `yref` is + "paper". + + The 'y' property is a number and may be specified as: + - An int or float + + Returns + ------- + int|float + """ + return self["y"] + + @y.setter + def y(self, val): + self["y"] = val + + @property + def yanchor(self): + """ + Sets this color bar's vertical position anchor This anchor + binds the `y` position to the "top", "middle" or "bottom" of + the color bar. Defaults to "middle" when `orientation` is "v" + and "bottom" when `orientation` is "h". + + The 'yanchor' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['top', 'middle', 'bottom'] + + Returns + ------- + Any + """ + return self["yanchor"] + + @yanchor.setter + def yanchor(self, val): + self["yanchor"] = val + + @property + def ypad(self): + """ + Sets the amount of padding (in px) along the y direction. + + The 'ypad' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["ypad"] + + @ypad.setter + def ypad(self, val): + self["ypad"] = val + + @property + def yref(self): + """ + Sets the container `y` refers to. "container" spans the entire + `height` of the plot. "paper" refers to the height of the + plotting area only. + + The 'yref' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['container', 'paper'] + + Returns + ------- + Any + """ + return self["yref"] + + @yref.setter + def yref(self, val): + self["yref"] = val + + @property + def _prop_descriptions(self): + return """\ + bgcolor + Sets the color of padded area. + bordercolor + Sets the axis line color. + borderwidth + Sets the width (in px) or the border enclosing this + color bar. + dtick + Sets the step in-between ticks on this axis. Use with + `tick0`. Must be a positive number, or special strings + available to "log" and "date" axes. If the axis `type` + is "log", then ticks are set every 10^(n*dtick) where n + is the tick number. For example, to set a tick mark at + 1, 10, 100, 1000, ... set dtick to 1. To set tick marks + at 1, 100, 10000, ... set dtick to 2. To set tick marks + at 1, 5, 25, 125, 625, 3125, ... set dtick to + log_10(5), or 0.69897000433. "log" has several special + values; "L", where `f` is a positive number, gives + ticks linearly spaced in value (but not position). For + example `tick0` = 0.1, `dtick` = "L0.5" will put ticks + at 0.1, 0.6, 1.1, 1.6 etc. To show powers of 10 plus + small digits between, use "D1" (all digits) or "D2" + (only 2 and 5). `tick0` is ignored for "D1" and "D2". + If the axis `type` is "date", then you must convert the + time to milliseconds. For example, to set the interval + between ticks to one day, set `dtick` to 86400000.0. + "date" also has special values "M" gives ticks + spaced by a number of months. `n` must be a positive + integer. To set ticks on the 15th of every third month, + set `tick0` to "2000-01-15" and `dtick` to "M3". To set + ticks every 4 years, set `dtick` to "M48" + exponentformat + Determines a formatting rule for the tick exponents. + For example, consider the number 1,000,000,000. If + "none", it appears as 1,000,000,000. If "e", 1e+9. If + "E", 1E+9. If "power", 1x10^9 (with 9 in a super + script). If "SI", 1G. If "B", 1B. "SI" uses prefixes + from "femto" f (10^-15) to "tera" T (10^12). *SI + extended* covers instead the full SI range from + "quecto" q (10^-30) to "quetta" Q (10^30). If "SI" or + *SI extended* is used and the exponent is beyond the + above ranges, the formatting rule will automatically be + switched to the power notation. + labelalias + Replacement text for specific tick or hover labels. For + example using {US: 'USA', CA: 'Canada'} changes US to + USA and CA to Canada. The labels we would have shown + must match the keys exactly, after adding any + tickprefix or ticksuffix. For negative numbers the + minus sign symbol used (U+2212) is wider than the + regular ascii dash. That means you need to use −1 + instead of -1. labelalias can be used with any axis + type, and both keys (if needed) and values (if desired) + can include html-like tags or MathJax. + len + Sets the length of the color bar This measure excludes + the padding of both ends. That is, the color bar length + is this length minus the padding on both ends. + lenmode + Determines whether this color bar's length (i.e. the + measure in the color variation direction) is set in + units of plot "fraction" or in *pixels. Use `len` to + set the value. + minexponent + Hide SI prefix for 10^n if |n| is below this number. + This only has an effect when `tickformat` is "SI" or + "B". + nticks + Specifies the maximum number of ticks for the + particular axis. The actual number of ticks will be + chosen automatically to be less than or equal to + `nticks`. Has an effect only if `tickmode` is set to + "auto". + orientation + Sets the orientation of the colorbar. + outlinecolor + Sets the axis line color. + outlinewidth + Sets the width (in px) of the axis line. + separatethousands + If "true", even 4-digit integers are separated + showexponent + If "all", all exponents are shown besides their + significands. If "first", only the exponent of the + first tick is shown. If "last", only the exponent of + the last tick is shown. If "none", no exponents appear. + showticklabels + Determines whether or not the tick labels are drawn. + showtickprefix + If "all", all tick labels are displayed with a prefix. + If "first", only the first tick is displayed with a + prefix. If "last", only the last tick is displayed with + a suffix. If "none", tick prefixes are hidden. + showticksuffix + Same as `showtickprefix` but for tick suffixes. + thickness + Sets the thickness of the color bar This measure + excludes the size of the padding, ticks and labels. + thicknessmode + Determines whether this color bar's thickness (i.e. the + measure in the constant color direction) is set in + units of plot "fraction" or in "pixels". Use + `thickness` to set the value. + tick0 + Sets the placement of the first tick on this axis. Use + with `dtick`. If the axis `type` is "log", then you + must take the log of your starting tick (e.g. to set + the starting tick to 100, set the `tick0` to 2) except + when `dtick`=*L* (see `dtick` for more info). If the + axis `type` is "date", it should be a date string, like + date data. If the axis `type` is "category", it should + be a number, using the scale where each category is + assigned a serial number from zero in the order it + appears. + tickangle + Sets the angle of the tick labels with respect to the + horizontal. For example, a `tickangle` of -90 draws the + tick labels vertically. + tickcolor + Sets the tick color. + tickfont + Sets the color bar's tick label font + tickformat + Sets the tick label formatting rule using d3 formatting + mini-languages which are very similar to those in + Python. For numbers, see: + https://github.com/d3/d3-format/tree/v1.4.5#d3-format. + And for dates see: https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format. We add two items to + d3's date formatter: "%h" for half of the year as a + decimal number as well as "%{n}f" for fractional + seconds with n digits. For example, *2016-10-13 + 09:15:23.456* with tickformat "%H~%M~%S.%2f" would + display "09~15~23.46" + tickformatstops + A tuple of :class:`plotly.graph_objects.cone.colorbar.T + ickformatstop` instances or dicts with compatible + properties + tickformatstopdefaults + When used in a template (as layout.template.data.cone.c + olorbar.tickformatstopdefaults), sets the default + property values to use for elements of + cone.colorbar.tickformatstops + ticklabeloverflow + Determines how we handle tick labels that would + overflow either the graph div or the domain of the + axis. The default value for inside tick labels is *hide + past domain*. In other cases the default is *hide past + div*. + ticklabelposition + Determines where tick labels are drawn relative to the + ticks. Left and right options are used when + `orientation` is "h", top and bottom when `orientation` + is "v". + ticklabelstep + Sets the spacing between tick labels as compared to the + spacing between ticks. A value of 1 (default) means + each tick gets a label. A value of 2 means shows every + 2nd label. A larger value n means only every nth tick + is labeled. `tick0` determines which labels are shown. + Not implemented for axes with `type` "log" or + "multicategory", or when `tickmode` is "array". + ticklen + Sets the tick length (in px). + tickmode + Sets the tick mode for this axis. If "auto", the number + of ticks is set via `nticks`. If "linear", the + placement of the ticks is determined by a starting + position `tick0` and a tick step `dtick` ("linear" is + the default value if `tick0` and `dtick` are provided). + If "array", the placement of the ticks is set via + `tickvals` and the tick text is `ticktext`. ("array" is + the default value if `tickvals` is provided). + tickprefix + Sets a tick label prefix. + ticks + Determines whether ticks are drawn or not. If "", this + axis' ticks are not drawn. If "outside" ("inside"), + this axis' are drawn outside (inside) the axis lines. + ticksuffix + Sets a tick label suffix. + ticktext + Sets the text displayed at the ticks position via + `tickvals`. Only has an effect if `tickmode` is set to + "array". Used with `tickvals`. + ticktextsrc + Sets the source reference on Chart Studio Cloud for + `ticktext`. + tickvals + Sets the values at which ticks on this axis appear. + Only has an effect if `tickmode` is set to "array". + Used with `ticktext`. + tickvalssrc + Sets the source reference on Chart Studio Cloud for + `tickvals`. + tickwidth + Sets the tick width (in px). + title + :class:`plotly.graph_objects.cone.colorbar.Title` + instance or dict with compatible properties + x + Sets the x position with respect to `xref` of the color + bar (in plot fraction). When `xref` is "paper", + defaults to 1.02 when `orientation` is "v" and 0.5 when + `orientation` is "h". When `xref` is "container", + defaults to 1 when `orientation` is "v" and 0.5 when + `orientation` is "h". Must be between 0 and 1 if `xref` + is "container" and between "-2" and 3 if `xref` is + "paper". + xanchor + Sets this color bar's horizontal position anchor. This + anchor binds the `x` position to the "left", "center" + or "right" of the color bar. Defaults to "left" when + `orientation` is "v" and "center" when `orientation` is + "h". + xpad + Sets the amount of padding (in px) along the x + direction. + xref + Sets the container `x` refers to. "container" spans the + entire `width` of the plot. "paper" refers to the width + of the plotting area only. + y + Sets the y position with respect to `yref` of the color + bar (in plot fraction). When `yref` is "paper", + defaults to 0.5 when `orientation` is "v" and 1.02 when + `orientation` is "h". When `yref` is "container", + defaults to 0.5 when `orientation` is "v" and 1 when + `orientation` is "h". Must be between 0 and 1 if `yref` + is "container" and between "-2" and 3 if `yref` is + "paper". + yanchor + Sets this color bar's vertical position anchor This + anchor binds the `y` position to the "top", "middle" or + "bottom" of the color bar. Defaults to "middle" when + `orientation` is "v" and "bottom" when `orientation` is + "h". + ypad + Sets the amount of padding (in px) along the y + direction. + yref + Sets the container `y` refers to. "container" spans the + entire `height` of the plot. "paper" refers to the + height of the plotting area only. + """ + + def __init__( + self, + arg=None, + bgcolor=None, + bordercolor=None, + borderwidth=None, + dtick=None, + exponentformat=None, + labelalias=None, + len=None, + lenmode=None, + minexponent=None, + nticks=None, + orientation=None, + outlinecolor=None, + outlinewidth=None, + separatethousands=None, + showexponent=None, + showticklabels=None, + showtickprefix=None, + showticksuffix=None, + thickness=None, + thicknessmode=None, + tick0=None, + tickangle=None, + tickcolor=None, + tickfont=None, + tickformat=None, + tickformatstops=None, + tickformatstopdefaults=None, + ticklabeloverflow=None, + ticklabelposition=None, + ticklabelstep=None, + ticklen=None, + tickmode=None, + tickprefix=None, + ticks=None, + ticksuffix=None, + ticktext=None, + ticktextsrc=None, + tickvals=None, + tickvalssrc=None, + tickwidth=None, + title=None, + x=None, + xanchor=None, + xpad=None, + xref=None, + y=None, + yanchor=None, + ypad=None, + yref=None, + **kwargs, + ): + """ + Construct a new ColorBar object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of :class:`plotly.graph_objs.cone.ColorBar` + bgcolor + Sets the color of padded area. + bordercolor + Sets the axis line color. + borderwidth + Sets the width (in px) or the border enclosing this + color bar. + dtick + Sets the step in-between ticks on this axis. Use with + `tick0`. Must be a positive number, or special strings + available to "log" and "date" axes. If the axis `type` + is "log", then ticks are set every 10^(n*dtick) where n + is the tick number. For example, to set a tick mark at + 1, 10, 100, 1000, ... set dtick to 1. To set tick marks + at 1, 100, 10000, ... set dtick to 2. To set tick marks + at 1, 5, 25, 125, 625, 3125, ... set dtick to + log_10(5), or 0.69897000433. "log" has several special + values; "L", where `f` is a positive number, gives + ticks linearly spaced in value (but not position). For + example `tick0` = 0.1, `dtick` = "L0.5" will put ticks + at 0.1, 0.6, 1.1, 1.6 etc. To show powers of 10 plus + small digits between, use "D1" (all digits) or "D2" + (only 2 and 5). `tick0` is ignored for "D1" and "D2". + If the axis `type` is "date", then you must convert the + time to milliseconds. For example, to set the interval + between ticks to one day, set `dtick` to 86400000.0. + "date" also has special values "M" gives ticks + spaced by a number of months. `n` must be a positive + integer. To set ticks on the 15th of every third month, + set `tick0` to "2000-01-15" and `dtick` to "M3". To set + ticks every 4 years, set `dtick` to "M48" + exponentformat + Determines a formatting rule for the tick exponents. + For example, consider the number 1,000,000,000. If + "none", it appears as 1,000,000,000. If "e", 1e+9. If + "E", 1E+9. If "power", 1x10^9 (with 9 in a super + script). If "SI", 1G. If "B", 1B. "SI" uses prefixes + from "femto" f (10^-15) to "tera" T (10^12). *SI + extended* covers instead the full SI range from + "quecto" q (10^-30) to "quetta" Q (10^30). If "SI" or + *SI extended* is used and the exponent is beyond the + above ranges, the formatting rule will automatically be + switched to the power notation. + labelalias + Replacement text for specific tick or hover labels. For + example using {US: 'USA', CA: 'Canada'} changes US to + USA and CA to Canada. The labels we would have shown + must match the keys exactly, after adding any + tickprefix or ticksuffix. For negative numbers the + minus sign symbol used (U+2212) is wider than the + regular ascii dash. That means you need to use −1 + instead of -1. labelalias can be used with any axis + type, and both keys (if needed) and values (if desired) + can include html-like tags or MathJax. + len + Sets the length of the color bar This measure excludes + the padding of both ends. That is, the color bar length + is this length minus the padding on both ends. + lenmode + Determines whether this color bar's length (i.e. the + measure in the color variation direction) is set in + units of plot "fraction" or in *pixels. Use `len` to + set the value. + minexponent + Hide SI prefix for 10^n if |n| is below this number. + This only has an effect when `tickformat` is "SI" or + "B". + nticks + Specifies the maximum number of ticks for the + particular axis. The actual number of ticks will be + chosen automatically to be less than or equal to + `nticks`. Has an effect only if `tickmode` is set to + "auto". + orientation + Sets the orientation of the colorbar. + outlinecolor + Sets the axis line color. + outlinewidth + Sets the width (in px) of the axis line. + separatethousands + If "true", even 4-digit integers are separated + showexponent + If "all", all exponents are shown besides their + significands. If "first", only the exponent of the + first tick is shown. If "last", only the exponent of + the last tick is shown. If "none", no exponents appear. + showticklabels + Determines whether or not the tick labels are drawn. + showtickprefix + If "all", all tick labels are displayed with a prefix. + If "first", only the first tick is displayed with a + prefix. If "last", only the last tick is displayed with + a suffix. If "none", tick prefixes are hidden. + showticksuffix + Same as `showtickprefix` but for tick suffixes. + thickness + Sets the thickness of the color bar This measure + excludes the size of the padding, ticks and labels. + thicknessmode + Determines whether this color bar's thickness (i.e. the + measure in the constant color direction) is set in + units of plot "fraction" or in "pixels". Use + `thickness` to set the value. + tick0 + Sets the placement of the first tick on this axis. Use + with `dtick`. If the axis `type` is "log", then you + must take the log of your starting tick (e.g. to set + the starting tick to 100, set the `tick0` to 2) except + when `dtick`=*L* (see `dtick` for more info). If the + axis `type` is "date", it should be a date string, like + date data. If the axis `type` is "category", it should + be a number, using the scale where each category is + assigned a serial number from zero in the order it + appears. + tickangle + Sets the angle of the tick labels with respect to the + horizontal. For example, a `tickangle` of -90 draws the + tick labels vertically. + tickcolor + Sets the tick color. + tickfont + Sets the color bar's tick label font + tickformat + Sets the tick label formatting rule using d3 formatting + mini-languages which are very similar to those in + Python. For numbers, see: + https://github.com/d3/d3-format/tree/v1.4.5#d3-format. + And for dates see: https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format. We add two items to + d3's date formatter: "%h" for half of the year as a + decimal number as well as "%{n}f" for fractional + seconds with n digits. For example, *2016-10-13 + 09:15:23.456* with tickformat "%H~%M~%S.%2f" would + display "09~15~23.46" + tickformatstops + A tuple of :class:`plotly.graph_objects.cone.colorbar.T + ickformatstop` instances or dicts with compatible + properties + tickformatstopdefaults + When used in a template (as layout.template.data.cone.c + olorbar.tickformatstopdefaults), sets the default + property values to use for elements of + cone.colorbar.tickformatstops + ticklabeloverflow + Determines how we handle tick labels that would + overflow either the graph div or the domain of the + axis. The default value for inside tick labels is *hide + past domain*. In other cases the default is *hide past + div*. + ticklabelposition + Determines where tick labels are drawn relative to the + ticks. Left and right options are used when + `orientation` is "h", top and bottom when `orientation` + is "v". + ticklabelstep + Sets the spacing between tick labels as compared to the + spacing between ticks. A value of 1 (default) means + each tick gets a label. A value of 2 means shows every + 2nd label. A larger value n means only every nth tick + is labeled. `tick0` determines which labels are shown. + Not implemented for axes with `type` "log" or + "multicategory", or when `tickmode` is "array". + ticklen + Sets the tick length (in px). + tickmode + Sets the tick mode for this axis. If "auto", the number + of ticks is set via `nticks`. If "linear", the + placement of the ticks is determined by a starting + position `tick0` and a tick step `dtick` ("linear" is + the default value if `tick0` and `dtick` are provided). + If "array", the placement of the ticks is set via + `tickvals` and the tick text is `ticktext`. ("array" is + the default value if `tickvals` is provided). + tickprefix + Sets a tick label prefix. + ticks + Determines whether ticks are drawn or not. If "", this + axis' ticks are not drawn. If "outside" ("inside"), + this axis' are drawn outside (inside) the axis lines. + ticksuffix + Sets a tick label suffix. + ticktext + Sets the text displayed at the ticks position via + `tickvals`. Only has an effect if `tickmode` is set to + "array". Used with `tickvals`. + ticktextsrc + Sets the source reference on Chart Studio Cloud for + `ticktext`. + tickvals + Sets the values at which ticks on this axis appear. + Only has an effect if `tickmode` is set to "array". + Used with `ticktext`. + tickvalssrc + Sets the source reference on Chart Studio Cloud for + `tickvals`. + tickwidth + Sets the tick width (in px). + title + :class:`plotly.graph_objects.cone.colorbar.Title` + instance or dict with compatible properties + x + Sets the x position with respect to `xref` of the color + bar (in plot fraction). When `xref` is "paper", + defaults to 1.02 when `orientation` is "v" and 0.5 when + `orientation` is "h". When `xref` is "container", + defaults to 1 when `orientation` is "v" and 0.5 when + `orientation` is "h". Must be between 0 and 1 if `xref` + is "container" and between "-2" and 3 if `xref` is + "paper". + xanchor + Sets this color bar's horizontal position anchor. This + anchor binds the `x` position to the "left", "center" + or "right" of the color bar. Defaults to "left" when + `orientation` is "v" and "center" when `orientation` is + "h". + xpad + Sets the amount of padding (in px) along the x + direction. + xref + Sets the container `x` refers to. "container" spans the + entire `width` of the plot. "paper" refers to the width + of the plotting area only. + y + Sets the y position with respect to `yref` of the color + bar (in plot fraction). When `yref` is "paper", + defaults to 0.5 when `orientation` is "v" and 1.02 when + `orientation` is "h". When `yref` is "container", + defaults to 0.5 when `orientation` is "v" and 1 when + `orientation` is "h". Must be between 0 and 1 if `yref` + is "container" and between "-2" and 3 if `yref` is + "paper". + yanchor + Sets this color bar's vertical position anchor This + anchor binds the `y` position to the "top", "middle" or + "bottom" of the color bar. Defaults to "middle" when + `orientation` is "v" and "bottom" when `orientation` is + "h". + ypad + Sets the amount of padding (in px) along the y + direction. + yref + Sets the container `y` refers to. "container" spans the + entire `height` of the plot. "paper" refers to the + height of the plotting area only. + + Returns + ------- + ColorBar + """ + super().__init__("colorbar") + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + if arg is None: + arg = {} + elif isinstance(arg, self.__class__): + arg = arg.to_plotly_json() + elif isinstance(arg, dict): + arg = _copy.copy(arg) + else: + raise ValueError("""\ +The first argument to the plotly.graph_objs.cone.ColorBar +constructor must be a dict or +an instance of :class:`plotly.graph_objs.cone.ColorBar`""") + + self._skip_invalid = kwargs.pop("skip_invalid", False) + self._validate = kwargs.pop("_validate", True) + + self._set_property("bgcolor", arg, bgcolor) + self._set_property("bordercolor", arg, bordercolor) + self._set_property("borderwidth", arg, borderwidth) + self._set_property("dtick", arg, dtick) + self._set_property("exponentformat", arg, exponentformat) + self._set_property("labelalias", arg, labelalias) + self._set_property("len", arg, len) + self._set_property("lenmode", arg, lenmode) + self._set_property("minexponent", arg, minexponent) + self._set_property("nticks", arg, nticks) + self._set_property("orientation", arg, orientation) + self._set_property("outlinecolor", arg, outlinecolor) + self._set_property("outlinewidth", arg, outlinewidth) + self._set_property("separatethousands", arg, separatethousands) + self._set_property("showexponent", arg, showexponent) + self._set_property("showticklabels", arg, showticklabels) + self._set_property("showtickprefix", arg, showtickprefix) + self._set_property("showticksuffix", arg, showticksuffix) + self._set_property("thickness", arg, thickness) + self._set_property("thicknessmode", arg, thicknessmode) + self._set_property("tick0", arg, tick0) + self._set_property("tickangle", arg, tickangle) + self._set_property("tickcolor", arg, tickcolor) + self._set_property("tickfont", arg, tickfont) + self._set_property("tickformat", arg, tickformat) + self._set_property("tickformatstops", arg, tickformatstops) + self._set_property("tickformatstopdefaults", arg, tickformatstopdefaults) + self._set_property("ticklabeloverflow", arg, ticklabeloverflow) + self._set_property("ticklabelposition", arg, ticklabelposition) + self._set_property("ticklabelstep", arg, ticklabelstep) + self._set_property("ticklen", arg, ticklen) + self._set_property("tickmode", arg, tickmode) + self._set_property("tickprefix", arg, tickprefix) + self._set_property("ticks", arg, ticks) + self._set_property("ticksuffix", arg, ticksuffix) + self._set_property("ticktext", arg, ticktext) + self._set_property("ticktextsrc", arg, ticktextsrc) + self._set_property("tickvals", arg, tickvals) + self._set_property("tickvalssrc", arg, tickvalssrc) + self._set_property("tickwidth", arg, tickwidth) + self._set_property("title", arg, title) + self._set_property("x", arg, x) + self._set_property("xanchor", arg, xanchor) + self._set_property("xpad", arg, xpad) + self._set_property("xref", arg, xref) + self._set_property("y", arg, y) + self._set_property("yanchor", arg, yanchor) + self._set_property("ypad", arg, ypad) + self._set_property("yref", arg, yref) + self._process_kwargs(**dict(arg, **kwargs)) + self._skip_invalid = False diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/cone/_hoverlabel.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/cone/_hoverlabel.py new file mode 100644 index 0000000000000000000000000000000000000000..efc8c36cae1a95d6dabfafb53aa919f30b826b52 --- /dev/null +++ b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/cone/_hoverlabel.py @@ -0,0 +1,366 @@ +# --- THIS FILE IS AUTO-GENERATED --- +# Modifications will be overwitten the next time code generation run. + +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Hoverlabel(_BaseTraceHierarchyType): + _parent_path_str = "cone" + _path_str = "cone.hoverlabel" + _valid_props = { + "align", + "alignsrc", + "bgcolor", + "bgcolorsrc", + "bordercolor", + "bordercolorsrc", + "font", + "namelength", + "namelengthsrc", + "showarrow", + } + + @property + def align(self): + """ + Sets the horizontal alignment of the text content within hover + label box. Has an effect only if the hover label text spans + more two or more lines + + The 'align' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['left', 'right', 'auto'] + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + Any|numpy.ndarray + """ + return self["align"] + + @align.setter + def align(self, val): + self["align"] = val + + @property + def alignsrc(self): + """ + Sets the source reference on Chart Studio Cloud for `align`. + + The 'alignsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["alignsrc"] + + @alignsrc.setter + def alignsrc(self, val): + self["alignsrc"] = val + + @property + def bgcolor(self): + """ + Sets the background color of the hover labels for this trace + + The 'bgcolor' property is a color and may be specified as: + - A hex string (e.g. '#ff0000') + - An rgb/rgba string (e.g. 'rgb(255,0,0)') + - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') + - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') + - A named CSS color: see https://plotly.com/python/css-colors/ for a list + - A list or array of any of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["bgcolor"] + + @bgcolor.setter + def bgcolor(self, val): + self["bgcolor"] = val + + @property + def bgcolorsrc(self): + """ + Sets the source reference on Chart Studio Cloud for `bgcolor`. + + The 'bgcolorsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["bgcolorsrc"] + + @bgcolorsrc.setter + def bgcolorsrc(self, val): + self["bgcolorsrc"] = val + + @property + def bordercolor(self): + """ + Sets the border color of the hover labels for this trace. + + The 'bordercolor' property is a color and may be specified as: + - A hex string (e.g. '#ff0000') + - An rgb/rgba string (e.g. 'rgb(255,0,0)') + - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') + - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') + - A named CSS color: see https://plotly.com/python/css-colors/ for a list + - A list or array of any of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["bordercolor"] + + @bordercolor.setter + def bordercolor(self, val): + self["bordercolor"] = val + + @property + def bordercolorsrc(self): + """ + Sets the source reference on Chart Studio Cloud for + `bordercolor`. + + The 'bordercolorsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["bordercolorsrc"] + + @bordercolorsrc.setter + def bordercolorsrc(self, val): + self["bordercolorsrc"] = val + + @property + def font(self): + """ + Sets the font used in hover labels. + + The 'font' property is an instance of Font + that may be specified as: + - An instance of :class:`plotly.graph_objs.cone.hoverlabel.Font` + - A dict of string/value properties that will be passed + to the Font constructor + + Returns + ------- + plotly.graph_objs.cone.hoverlabel.Font + """ + return self["font"] + + @font.setter + def font(self, val): + self["font"] = val + + @property + def namelength(self): + """ + Sets the default length (in number of characters) of the trace + name in the hover labels for all traces. -1 shows the whole + name regardless of length. 0-3 shows the first 0-3 characters, + and an integer >3 will show the whole name if it is less than + that many characters, but if it is longer, will truncate to + `namelength - 3` characters and add an ellipsis. + + The 'namelength' property is a integer and may be specified as: + - An int (or float that will be cast to an int) + in the interval [-1, 9223372036854775807] + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + int|numpy.ndarray + """ + return self["namelength"] + + @namelength.setter + def namelength(self, val): + self["namelength"] = val + + @property + def namelengthsrc(self): + """ + Sets the source reference on Chart Studio Cloud for + `namelength`. + + The 'namelengthsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["namelengthsrc"] + + @namelengthsrc.setter + def namelengthsrc(self, val): + self["namelengthsrc"] = val + + @property + def showarrow(self): + """ + Sets whether or not to show the hover label arrow/triangle + pointing to the data point. + + The 'showarrow' property is a boolean and must be specified as: + - A boolean value: True or False + + Returns + ------- + bool + """ + return self["showarrow"] + + @showarrow.setter + def showarrow(self, val): + self["showarrow"] = val + + @property + def _prop_descriptions(self): + return """\ + align + Sets the horizontal alignment of the text content + within hover label box. Has an effect only if the hover + label text spans more two or more lines + alignsrc + Sets the source reference on Chart Studio Cloud for + `align`. + bgcolor + Sets the background color of the hover labels for this + trace + bgcolorsrc + Sets the source reference on Chart Studio Cloud for + `bgcolor`. + bordercolor + Sets the border color of the hover labels for this + trace. + bordercolorsrc + Sets the source reference on Chart Studio Cloud for + `bordercolor`. + font + Sets the font used in hover labels. + namelength + Sets the default length (in number of characters) of + the trace name in the hover labels for all traces. -1 + shows the whole name regardless of length. 0-3 shows + the first 0-3 characters, and an integer >3 will show + the whole name if it is less than that many characters, + but if it is longer, will truncate to `namelength - 3` + characters and add an ellipsis. + namelengthsrc + Sets the source reference on Chart Studio Cloud for + `namelength`. + showarrow + Sets whether or not to show the hover label + arrow/triangle pointing to the data point. + """ + + def __init__( + self, + arg=None, + align=None, + alignsrc=None, + bgcolor=None, + bgcolorsrc=None, + bordercolor=None, + bordercolorsrc=None, + font=None, + namelength=None, + namelengthsrc=None, + showarrow=None, + **kwargs, + ): + """ + Construct a new Hoverlabel object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.cone.Hoverlabel` + align + Sets the horizontal alignment of the text content + within hover label box. Has an effect only if the hover + label text spans more two or more lines + alignsrc + Sets the source reference on Chart Studio Cloud for + `align`. + bgcolor + Sets the background color of the hover labels for this + trace + bgcolorsrc + Sets the source reference on Chart Studio Cloud for + `bgcolor`. + bordercolor + Sets the border color of the hover labels for this + trace. + bordercolorsrc + Sets the source reference on Chart Studio Cloud for + `bordercolor`. + font + Sets the font used in hover labels. + namelength + Sets the default length (in number of characters) of + the trace name in the hover labels for all traces. -1 + shows the whole name regardless of length. 0-3 shows + the first 0-3 characters, and an integer >3 will show + the whole name if it is less than that many characters, + but if it is longer, will truncate to `namelength - 3` + characters and add an ellipsis. + namelengthsrc + Sets the source reference on Chart Studio Cloud for + `namelength`. + showarrow + Sets whether or not to show the hover label + arrow/triangle pointing to the data point. + + Returns + ------- + Hoverlabel + """ + super().__init__("hoverlabel") + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + if arg is None: + arg = {} + elif isinstance(arg, self.__class__): + arg = arg.to_plotly_json() + elif isinstance(arg, dict): + arg = _copy.copy(arg) + else: + raise ValueError("""\ +The first argument to the plotly.graph_objs.cone.Hoverlabel +constructor must be a dict or +an instance of :class:`plotly.graph_objs.cone.Hoverlabel`""") + + self._skip_invalid = kwargs.pop("skip_invalid", False) + self._validate = kwargs.pop("_validate", True) + + self._set_property("align", arg, align) + self._set_property("alignsrc", arg, alignsrc) + self._set_property("bgcolor", arg, bgcolor) + self._set_property("bgcolorsrc", arg, bgcolorsrc) + self._set_property("bordercolor", arg, bordercolor) + self._set_property("bordercolorsrc", arg, bordercolorsrc) + self._set_property("font", arg, font) + self._set_property("namelength", arg, namelength) + self._set_property("namelengthsrc", arg, namelengthsrc) + self._set_property("showarrow", arg, showarrow) + self._process_kwargs(**dict(arg, **kwargs)) + self._skip_invalid = False diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/cone/_legendgrouptitle.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/cone/_legendgrouptitle.py new file mode 100644 index 0000000000000000000000000000000000000000..2028ac4426472e8e706252cdc87f587caec811f3 --- /dev/null +++ b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/cone/_legendgrouptitle.py @@ -0,0 +1,104 @@ +# --- THIS FILE IS AUTO-GENERATED --- +# Modifications will be overwitten the next time code generation run. + +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Legendgrouptitle(_BaseTraceHierarchyType): + _parent_path_str = "cone" + _path_str = "cone.legendgrouptitle" + _valid_props = {"font", "text"} + + @property + def font(self): + """ + Sets this legend group's title font. + + The 'font' property is an instance of Font + that may be specified as: + - An instance of :class:`plotly.graph_objs.cone.legendgrouptitle.Font` + - A dict of string/value properties that will be passed + to the Font constructor + + Returns + ------- + plotly.graph_objs.cone.legendgrouptitle.Font + """ + return self["font"] + + @font.setter + def font(self, val): + self["font"] = val + + @property + def text(self): + """ + Sets the title of the legend group. + + The 'text' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["text"] + + @text.setter + def text(self, val): + self["text"] = val + + @property + def _prop_descriptions(self): + return """\ + font + Sets this legend group's title font. + text + Sets the title of the legend group. + """ + + def __init__(self, arg=None, font=None, text=None, **kwargs): + """ + Construct a new Legendgrouptitle object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.cone.Legendgrouptitle` + font + Sets this legend group's title font. + text + Sets the title of the legend group. + + Returns + ------- + Legendgrouptitle + """ + super().__init__("legendgrouptitle") + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + if arg is None: + arg = {} + elif isinstance(arg, self.__class__): + arg = arg.to_plotly_json() + elif isinstance(arg, dict): + arg = _copy.copy(arg) + else: + raise ValueError("""\ +The first argument to the plotly.graph_objs.cone.Legendgrouptitle +constructor must be a dict or +an instance of :class:`plotly.graph_objs.cone.Legendgrouptitle`""") + + self._skip_invalid = kwargs.pop("skip_invalid", False) + self._validate = kwargs.pop("_validate", True) + + self._set_property("font", arg, font) + self._set_property("text", arg, text) + self._process_kwargs(**dict(arg, **kwargs)) + self._skip_invalid = False diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/cone/_lighting.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/cone/_lighting.py new file mode 100644 index 0000000000000000000000000000000000000000..e8cfa31ba4f75bac340e6eeed302c3c6f5fc3c01 --- /dev/null +++ b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/cone/_lighting.py @@ -0,0 +1,259 @@ +# --- THIS FILE IS AUTO-GENERATED --- +# Modifications will be overwitten the next time code generation run. + +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Lighting(_BaseTraceHierarchyType): + _parent_path_str = "cone" + _path_str = "cone.lighting" + _valid_props = { + "ambient", + "diffuse", + "facenormalsepsilon", + "fresnel", + "roughness", + "specular", + "vertexnormalsepsilon", + } + + @property + def ambient(self): + """ + Ambient light increases overall color visibility but can wash + out the image. + + The 'ambient' property is a number and may be specified as: + - An int or float in the interval [0, 1] + + Returns + ------- + int|float + """ + return self["ambient"] + + @ambient.setter + def ambient(self, val): + self["ambient"] = val + + @property + def diffuse(self): + """ + Represents the extent that incident rays are reflected in a + range of angles. + + The 'diffuse' property is a number and may be specified as: + - An int or float in the interval [0, 1] + + Returns + ------- + int|float + """ + return self["diffuse"] + + @diffuse.setter + def diffuse(self, val): + self["diffuse"] = val + + @property + def facenormalsepsilon(self): + """ + Epsilon for face normals calculation avoids math issues arising + from degenerate geometry. + + The 'facenormalsepsilon' property is a number and may be specified as: + - An int or float in the interval [0, 1] + + Returns + ------- + int|float + """ + return self["facenormalsepsilon"] + + @facenormalsepsilon.setter + def facenormalsepsilon(self, val): + self["facenormalsepsilon"] = val + + @property + def fresnel(self): + """ + Represents the reflectance as a dependency of the viewing + angle; e.g. paper is reflective when viewing it from the edge + of the paper (almost 90 degrees), causing shine. + + The 'fresnel' property is a number and may be specified as: + - An int or float in the interval [0, 5] + + Returns + ------- + int|float + """ + return self["fresnel"] + + @fresnel.setter + def fresnel(self, val): + self["fresnel"] = val + + @property + def roughness(self): + """ + Alters specular reflection; the rougher the surface, the wider + and less contrasty the shine. + + The 'roughness' property is a number and may be specified as: + - An int or float in the interval [0, 1] + + Returns + ------- + int|float + """ + return self["roughness"] + + @roughness.setter + def roughness(self, val): + self["roughness"] = val + + @property + def specular(self): + """ + Represents the level that incident rays are reflected in a + single direction, causing shine. + + The 'specular' property is a number and may be specified as: + - An int or float in the interval [0, 2] + + Returns + ------- + int|float + """ + return self["specular"] + + @specular.setter + def specular(self, val): + self["specular"] = val + + @property + def vertexnormalsepsilon(self): + """ + Epsilon for vertex normals calculation avoids math issues + arising from degenerate geometry. + + The 'vertexnormalsepsilon' property is a number and may be specified as: + - An int or float in the interval [0, 1] + + Returns + ------- + int|float + """ + return self["vertexnormalsepsilon"] + + @vertexnormalsepsilon.setter + def vertexnormalsepsilon(self, val): + self["vertexnormalsepsilon"] = val + + @property + def _prop_descriptions(self): + return """\ + ambient + Ambient light increases overall color visibility but + can wash out the image. + diffuse + Represents the extent that incident rays are reflected + in a range of angles. + facenormalsepsilon + Epsilon for face normals calculation avoids math issues + arising from degenerate geometry. + fresnel + Represents the reflectance as a dependency of the + viewing angle; e.g. paper is reflective when viewing it + from the edge of the paper (almost 90 degrees), causing + shine. + roughness + Alters specular reflection; the rougher the surface, + the wider and less contrasty the shine. + specular + Represents the level that incident rays are reflected + in a single direction, causing shine. + vertexnormalsepsilon + Epsilon for vertex normals calculation avoids math + issues arising from degenerate geometry. + """ + + def __init__( + self, + arg=None, + ambient=None, + diffuse=None, + facenormalsepsilon=None, + fresnel=None, + roughness=None, + specular=None, + vertexnormalsepsilon=None, + **kwargs, + ): + """ + Construct a new Lighting object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of :class:`plotly.graph_objs.cone.Lighting` + ambient + Ambient light increases overall color visibility but + can wash out the image. + diffuse + Represents the extent that incident rays are reflected + in a range of angles. + facenormalsepsilon + Epsilon for face normals calculation avoids math issues + arising from degenerate geometry. + fresnel + Represents the reflectance as a dependency of the + viewing angle; e.g. paper is reflective when viewing it + from the edge of the paper (almost 90 degrees), causing + shine. + roughness + Alters specular reflection; the rougher the surface, + the wider and less contrasty the shine. + specular + Represents the level that incident rays are reflected + in a single direction, causing shine. + vertexnormalsepsilon + Epsilon for vertex normals calculation avoids math + issues arising from degenerate geometry. + + Returns + ------- + Lighting + """ + super().__init__("lighting") + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + if arg is None: + arg = {} + elif isinstance(arg, self.__class__): + arg = arg.to_plotly_json() + elif isinstance(arg, dict): + arg = _copy.copy(arg) + else: + raise ValueError("""\ +The first argument to the plotly.graph_objs.cone.Lighting +constructor must be a dict or +an instance of :class:`plotly.graph_objs.cone.Lighting`""") + + self._skip_invalid = kwargs.pop("skip_invalid", False) + self._validate = kwargs.pop("_validate", True) + + self._set_property("ambient", arg, ambient) + self._set_property("diffuse", arg, diffuse) + self._set_property("facenormalsepsilon", arg, facenormalsepsilon) + self._set_property("fresnel", arg, fresnel) + self._set_property("roughness", arg, roughness) + self._set_property("specular", arg, specular) + self._set_property("vertexnormalsepsilon", arg, vertexnormalsepsilon) + self._process_kwargs(**dict(arg, **kwargs)) + self._skip_invalid = False diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/cone/_lightposition.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/cone/_lightposition.py new file mode 100644 index 0000000000000000000000000000000000000000..13775d631f1f3d811489de01df62187c257fddc7 --- /dev/null +++ b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/cone/_lightposition.py @@ -0,0 +1,129 @@ +# --- THIS FILE IS AUTO-GENERATED --- +# Modifications will be overwitten the next time code generation run. + +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Lightposition(_BaseTraceHierarchyType): + _parent_path_str = "cone" + _path_str = "cone.lightposition" + _valid_props = {"x", "y", "z"} + + @property + def x(self): + """ + Numeric vector, representing the X coordinate for each vertex. + + The 'x' property is a number and may be specified as: + - An int or float in the interval [-100000, 100000] + + Returns + ------- + int|float + """ + return self["x"] + + @x.setter + def x(self, val): + self["x"] = val + + @property + def y(self): + """ + Numeric vector, representing the Y coordinate for each vertex. + + The 'y' property is a number and may be specified as: + - An int or float in the interval [-100000, 100000] + + Returns + ------- + int|float + """ + return self["y"] + + @y.setter + def y(self, val): + self["y"] = val + + @property + def z(self): + """ + Numeric vector, representing the Z coordinate for each vertex. + + The 'z' property is a number and may be specified as: + - An int or float in the interval [-100000, 100000] + + Returns + ------- + int|float + """ + return self["z"] + + @z.setter + def z(self, val): + self["z"] = val + + @property + def _prop_descriptions(self): + return """\ + x + Numeric vector, representing the X coordinate for each + vertex. + y + Numeric vector, representing the Y coordinate for each + vertex. + z + Numeric vector, representing the Z coordinate for each + vertex. + """ + + def __init__(self, arg=None, x=None, y=None, z=None, **kwargs): + """ + Construct a new Lightposition object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.cone.Lightposition` + x + Numeric vector, representing the X coordinate for each + vertex. + y + Numeric vector, representing the Y coordinate for each + vertex. + z + Numeric vector, representing the Z coordinate for each + vertex. + + Returns + ------- + Lightposition + """ + super().__init__("lightposition") + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + if arg is None: + arg = {} + elif isinstance(arg, self.__class__): + arg = arg.to_plotly_json() + elif isinstance(arg, dict): + arg = _copy.copy(arg) + else: + raise ValueError("""\ +The first argument to the plotly.graph_objs.cone.Lightposition +constructor must be a dict or +an instance of :class:`plotly.graph_objs.cone.Lightposition`""") + + self._skip_invalid = kwargs.pop("skip_invalid", False) + self._validate = kwargs.pop("_validate", True) + + self._set_property("x", arg, x) + self._set_property("y", arg, y) + self._set_property("z", arg, z) + self._process_kwargs(**dict(arg, **kwargs)) + self._skip_invalid = False diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/cone/_stream.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/cone/_stream.py new file mode 100644 index 0000000000000000000000000000000000000000..6660a2ba385ccbedd9824d3a9b96ab0712830414 --- /dev/null +++ b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/cone/_stream.py @@ -0,0 +1,113 @@ +# --- THIS FILE IS AUTO-GENERATED --- +# Modifications will be overwitten the next time code generation run. + +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Stream(_BaseTraceHierarchyType): + _parent_path_str = "cone" + _path_str = "cone.stream" + _valid_props = {"maxpoints", "token"} + + @property + def maxpoints(self): + """ + Sets the maximum number of points to keep on the plots from an + incoming stream. If `maxpoints` is set to 50, only the newest + 50 points will be displayed on the plot. + + The 'maxpoints' property is a number and may be specified as: + - An int or float in the interval [0, 10000] + + Returns + ------- + int|float + """ + return self["maxpoints"] + + @maxpoints.setter + def maxpoints(self, val): + self["maxpoints"] = val + + @property + def token(self): + """ + The stream id number links a data trace on a plot with a + stream. See https://chart-studio.plotly.com/settings for more + details. + + The 'token' property is a string and must be specified as: + - A non-empty string + + Returns + ------- + str + """ + return self["token"] + + @token.setter + def token(self, val): + self["token"] = val + + @property + def _prop_descriptions(self): + return """\ + maxpoints + Sets the maximum number of points to keep on the plots + from an incoming stream. If `maxpoints` is set to 50, + only the newest 50 points will be displayed on the + plot. + token + The stream id number links a data trace on a plot with + a stream. See https://chart-studio.plotly.com/settings + for more details. + """ + + def __init__(self, arg=None, maxpoints=None, token=None, **kwargs): + """ + Construct a new Stream object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of :class:`plotly.graph_objs.cone.Stream` + maxpoints + Sets the maximum number of points to keep on the plots + from an incoming stream. If `maxpoints` is set to 50, + only the newest 50 points will be displayed on the + plot. + token + The stream id number links a data trace on a plot with + a stream. See https://chart-studio.plotly.com/settings + for more details. + + Returns + ------- + Stream + """ + super().__init__("stream") + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + if arg is None: + arg = {} + elif isinstance(arg, self.__class__): + arg = arg.to_plotly_json() + elif isinstance(arg, dict): + arg = _copy.copy(arg) + else: + raise ValueError("""\ +The first argument to the plotly.graph_objs.cone.Stream +constructor must be a dict or +an instance of :class:`plotly.graph_objs.cone.Stream`""") + + self._skip_invalid = kwargs.pop("skip_invalid", False) + self._validate = kwargs.pop("_validate", True) + + self._set_property("maxpoints", arg, maxpoints) + self._set_property("token", arg, token) + self._process_kwargs(**dict(arg, **kwargs)) + self._skip_invalid = False diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/cone/colorbar/.___init__.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/cone/colorbar/.___init__.py new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/cone/colorbar/.___init__.py differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/cone/colorbar/.___pycache__ b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/cone/colorbar/.___pycache__ new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/cone/colorbar/.___pycache__ differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/cone/colorbar/.__tickfont.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/cone/colorbar/.__tickfont.py new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/cone/colorbar/.__tickfont.py differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/cone/colorbar/.__tickformatstop.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/cone/colorbar/.__tickformatstop.py new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/cone/colorbar/.__tickformatstop.py differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/cone/colorbar/.__title.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/cone/colorbar/.__title.py new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/cone/colorbar/.__title.py differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/cone/colorbar/._title b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/cone/colorbar/._title new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/cone/colorbar/._title differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/cone/colorbar/__init__.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/cone/colorbar/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..4690d3cc738a44d43a04d43d3aa0be36d7cd34e2 --- /dev/null +++ b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/cone/colorbar/__init__.py @@ -0,0 +1,16 @@ +import sys +from typing import TYPE_CHECKING + +if TYPE_CHECKING: + from ._tickfont import Tickfont + from ._tickformatstop import Tickformatstop + from ._title import Title + from . import title +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [".title"], + ["._tickfont.Tickfont", "._tickformatstop.Tickformatstop", "._title.Title"], + ) diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/cone/colorbar/_tickfont.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/cone/colorbar/_tickfont.py new file mode 100644 index 0000000000000000000000000000000000000000..4b287303a6bf39a08a5ef8bc435d4eafa72bbdf0 --- /dev/null +++ b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/cone/colorbar/_tickfont.py @@ -0,0 +1,334 @@ +# --- THIS FILE IS AUTO-GENERATED --- +# Modifications will be overwitten the next time code generation run. + +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Tickfont(_BaseTraceHierarchyType): + _parent_path_str = "cone.colorbar" + _path_str = "cone.colorbar.tickfont" + _valid_props = { + "color", + "family", + "lineposition", + "shadow", + "size", + "style", + "textcase", + "variant", + "weight", + } + + @property + def color(self): + """ + The 'color' property is a color and may be specified as: + - A hex string (e.g. '#ff0000') + - An rgb/rgba string (e.g. 'rgb(255,0,0)') + - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') + - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') + - A named CSS color: see https://plotly.com/python/css-colors/ for a list + + Returns + ------- + str + """ + return self["color"] + + @color.setter + def color(self, val): + self["color"] = val + + @property + def family(self): + """ + HTML font family - the typeface that will be applied by the web + browser. The web browser can only apply a font if it is + available on the system where it runs. Provide multiple font + families, separated by commas, to indicate the order in which + to apply fonts if they aren't available. + + The 'family' property is a string and must be specified as: + - A non-empty string + + Returns + ------- + str + """ + return self["family"] + + @family.setter + def family(self, val): + self["family"] = val + + @property + def lineposition(self): + """ + Sets the kind of decoration line(s) with text, such as an + "under", "over" or "through" as well as combinations e.g. + "under+over", etc. + + The 'lineposition' property is a flaglist and may be specified + as a string containing: + - Any combination of ['under', 'over', 'through'] joined with '+' characters + (e.g. 'under+over') + OR exactly one of ['none'] (e.g. 'none') + + Returns + ------- + Any + """ + return self["lineposition"] + + @lineposition.setter + def lineposition(self, val): + self["lineposition"] = val + + @property + def shadow(self): + """ + Sets the shape and color of the shadow behind text. "auto" + places minimal shadow and applies contrast text font color. See + https://developer.mozilla.org/en-US/docs/Web/CSS/text-shadow + for additional options. + + The 'shadow' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["shadow"] + + @shadow.setter + def shadow(self, val): + self["shadow"] = val + + @property + def size(self): + """ + The 'size' property is a number and may be specified as: + - An int or float in the interval [1, inf] + + Returns + ------- + int|float + """ + return self["size"] + + @size.setter + def size(self, val): + self["size"] = val + + @property + def style(self): + """ + Sets whether a font should be styled with a normal or italic + face from its family. + + The 'style' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['normal', 'italic'] + + Returns + ------- + Any + """ + return self["style"] + + @style.setter + def style(self, val): + self["style"] = val + + @property + def textcase(self): + """ + Sets capitalization of text. It can be used to make text appear + in all-uppercase or all-lowercase, or with each word + capitalized. + + The 'textcase' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['normal', 'word caps', 'upper', 'lower'] + + Returns + ------- + Any + """ + return self["textcase"] + + @textcase.setter + def textcase(self, val): + self["textcase"] = val + + @property + def variant(self): + """ + Sets the variant of the font. + + The 'variant' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['normal', 'small-caps', 'all-small-caps', + 'all-petite-caps', 'petite-caps', 'unicase'] + + Returns + ------- + Any + """ + return self["variant"] + + @variant.setter + def variant(self, val): + self["variant"] = val + + @property + def weight(self): + """ + Sets the weight (or boldness) of the font. + + The 'weight' property is a integer and may be specified as: + - An int (or float that will be cast to an int) + in the interval [1, 1000] + OR exactly one of ['normal', 'bold'] (e.g. 'bold') + + Returns + ------- + int + """ + return self["weight"] + + @weight.setter + def weight(self, val): + self["weight"] = val + + @property + def _prop_descriptions(self): + return """\ + color + + family + HTML font family - the typeface that will be applied by + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. + lineposition + Sets the kind of decoration line(s) with text, such as + an "under", "over" or "through" as well as combinations + e.g. "under+over", etc. + shadow + Sets the shape and color of the shadow behind text. + "auto" places minimal shadow and applies contrast text + font color. See https://developer.mozilla.org/en- + US/docs/Web/CSS/text-shadow for additional options. + size + + style + Sets whether a font should be styled with a normal or + italic face from its family. + textcase + Sets capitalization of text. It can be used to make + text appear in all-uppercase or all-lowercase, or with + each word capitalized. + variant + Sets the variant of the font. + weight + Sets the weight (or boldness) of the font. + """ + + def __init__( + self, + arg=None, + color=None, + family=None, + lineposition=None, + shadow=None, + size=None, + style=None, + textcase=None, + variant=None, + weight=None, + **kwargs, + ): + """ + Construct a new Tickfont object + + Sets the color bar's tick label font + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.cone.colorbar.Tickfont` + color + + family + HTML font family - the typeface that will be applied by + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. + lineposition + Sets the kind of decoration line(s) with text, such as + an "under", "over" or "through" as well as combinations + e.g. "under+over", etc. + shadow + Sets the shape and color of the shadow behind text. + "auto" places minimal shadow and applies contrast text + font color. See https://developer.mozilla.org/en- + US/docs/Web/CSS/text-shadow for additional options. + size + + style + Sets whether a font should be styled with a normal or + italic face from its family. + textcase + Sets capitalization of text. It can be used to make + text appear in all-uppercase or all-lowercase, or with + each word capitalized. + variant + Sets the variant of the font. + weight + Sets the weight (or boldness) of the font. + + Returns + ------- + Tickfont + """ + super().__init__("tickfont") + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + if arg is None: + arg = {} + elif isinstance(arg, self.__class__): + arg = arg.to_plotly_json() + elif isinstance(arg, dict): + arg = _copy.copy(arg) + else: + raise ValueError("""\ +The first argument to the plotly.graph_objs.cone.colorbar.Tickfont +constructor must be a dict or +an instance of :class:`plotly.graph_objs.cone.colorbar.Tickfont`""") + + self._skip_invalid = kwargs.pop("skip_invalid", False) + self._validate = kwargs.pop("_validate", True) + + self._set_property("color", arg, color) + self._set_property("family", arg, family) + self._set_property("lineposition", arg, lineposition) + self._set_property("shadow", arg, shadow) + self._set_property("size", arg, size) + self._set_property("style", arg, style) + self._set_property("textcase", arg, textcase) + self._set_property("variant", arg, variant) + self._set_property("weight", arg, weight) + self._process_kwargs(**dict(arg, **kwargs)) + self._skip_invalid = False diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/cone/colorbar/_tickformatstop.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/cone/colorbar/_tickformatstop.py new file mode 100644 index 0000000000000000000000000000000000000000..c13e2bde6e62bb07e1115a12a60b549da94a749c --- /dev/null +++ b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/cone/colorbar/_tickformatstop.py @@ -0,0 +1,241 @@ +# --- THIS FILE IS AUTO-GENERATED --- +# Modifications will be overwitten the next time code generation run. + +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Tickformatstop(_BaseTraceHierarchyType): + _parent_path_str = "cone.colorbar" + _path_str = "cone.colorbar.tickformatstop" + _valid_props = {"dtickrange", "enabled", "name", "templateitemname", "value"} + + @property + def dtickrange(self): + """ + range [*min*, *max*], where "min", "max" - dtick values which + describe some zoom level, it is possible to omit "min" or "max" + value by passing "null" + + The 'dtickrange' property is an info array that may be specified as: + + * a list or tuple of 2 elements where: + (0) The 'dtickrange[0]' property accepts values of any type + (1) The 'dtickrange[1]' property accepts values of any type + + Returns + ------- + list + """ + return self["dtickrange"] + + @dtickrange.setter + def dtickrange(self, val): + self["dtickrange"] = val + + @property + def enabled(self): + """ + Determines whether or not this stop is used. If `false`, this + stop is ignored even within its `dtickrange`. + + The 'enabled' property is a boolean and must be specified as: + - A boolean value: True or False + + Returns + ------- + bool + """ + return self["enabled"] + + @enabled.setter + def enabled(self, val): + self["enabled"] = val + + @property + def name(self): + """ + When used in a template, named items are created in the output + figure in addition to any items the figure already has in this + array. You can modify these items in the output figure by + making your own item with `templateitemname` matching this + `name` alongside your modifications (including `visible: false` + or `enabled: false` to hide it). Has no effect outside of a + template. + + The 'name' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["name"] + + @name.setter + def name(self, val): + self["name"] = val + + @property + def templateitemname(self): + """ + Used to refer to a named item in this array in the template. + Named items from the template will be created even without a + matching item in the input figure, but you can modify one by + making an item with `templateitemname` matching its `name`, + alongside your modifications (including `visible: false` or + `enabled: false` to hide it). If there is no template or no + matching item, this item will be hidden unless you explicitly + show it with `visible: true`. + + The 'templateitemname' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["templateitemname"] + + @templateitemname.setter + def templateitemname(self, val): + self["templateitemname"] = val + + @property + def value(self): + """ + string - dtickformat for described zoom level, the same as + "tickformat" + + The 'value' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["value"] + + @value.setter + def value(self, val): + self["value"] = val + + @property + def _prop_descriptions(self): + return """\ + dtickrange + range [*min*, *max*], where "min", "max" - dtick values + which describe some zoom level, it is possible to omit + "min" or "max" value by passing "null" + enabled + Determines whether or not this stop is used. If + `false`, this stop is ignored even within its + `dtickrange`. + name + When used in a template, named items are created in the + output figure in addition to any items the figure + already has in this array. You can modify these items + in the output figure by making your own item with + `templateitemname` matching this `name` alongside your + modifications (including `visible: false` or `enabled: + false` to hide it). Has no effect outside of a + template. + templateitemname + Used to refer to a named item in this array in the + template. Named items from the template will be created + even without a matching item in the input figure, but + you can modify one by making an item with + `templateitemname` matching its `name`, alongside your + modifications (including `visible: false` or `enabled: + false` to hide it). If there is no template or no + matching item, this item will be hidden unless you + explicitly show it with `visible: true`. + value + string - dtickformat for described zoom level, the same + as "tickformat" + """ + + def __init__( + self, + arg=None, + dtickrange=None, + enabled=None, + name=None, + templateitemname=None, + value=None, + **kwargs, + ): + """ + Construct a new Tickformatstop object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.cone.colorbar.Tickformatstop` + dtickrange + range [*min*, *max*], where "min", "max" - dtick values + which describe some zoom level, it is possible to omit + "min" or "max" value by passing "null" + enabled + Determines whether or not this stop is used. If + `false`, this stop is ignored even within its + `dtickrange`. + name + When used in a template, named items are created in the + output figure in addition to any items the figure + already has in this array. You can modify these items + in the output figure by making your own item with + `templateitemname` matching this `name` alongside your + modifications (including `visible: false` or `enabled: + false` to hide it). Has no effect outside of a + template. + templateitemname + Used to refer to a named item in this array in the + template. Named items from the template will be created + even without a matching item in the input figure, but + you can modify one by making an item with + `templateitemname` matching its `name`, alongside your + modifications (including `visible: false` or `enabled: + false` to hide it). If there is no template or no + matching item, this item will be hidden unless you + explicitly show it with `visible: true`. + value + string - dtickformat for described zoom level, the same + as "tickformat" + + Returns + ------- + Tickformatstop + """ + super().__init__("tickformatstops") + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + if arg is None: + arg = {} + elif isinstance(arg, self.__class__): + arg = arg.to_plotly_json() + elif isinstance(arg, dict): + arg = _copy.copy(arg) + else: + raise ValueError("""\ +The first argument to the plotly.graph_objs.cone.colorbar.Tickformatstop +constructor must be a dict or +an instance of :class:`plotly.graph_objs.cone.colorbar.Tickformatstop`""") + + self._skip_invalid = kwargs.pop("skip_invalid", False) + self._validate = kwargs.pop("_validate", True) + + self._set_property("dtickrange", arg, dtickrange) + self._set_property("enabled", arg, enabled) + self._set_property("name", arg, name) + self._set_property("templateitemname", arg, templateitemname) + self._set_property("value", arg, value) + self._process_kwargs(**dict(arg, **kwargs)) + self._skip_invalid = False diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/cone/colorbar/_title.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/cone/colorbar/_title.py new file mode 100644 index 0000000000000000000000000000000000000000..66d5ec4d1b7cc987682473eb195eefed083076af --- /dev/null +++ b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/cone/colorbar/_title.py @@ -0,0 +1,136 @@ +# --- THIS FILE IS AUTO-GENERATED --- +# Modifications will be overwitten the next time code generation run. + +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Title(_BaseTraceHierarchyType): + _parent_path_str = "cone.colorbar" + _path_str = "cone.colorbar.title" + _valid_props = {"font", "side", "text"} + + @property + def font(self): + """ + Sets this color bar's title font. + + The 'font' property is an instance of Font + that may be specified as: + - An instance of :class:`plotly.graph_objs.cone.colorbar.title.Font` + - A dict of string/value properties that will be passed + to the Font constructor + + Returns + ------- + plotly.graph_objs.cone.colorbar.title.Font + """ + return self["font"] + + @font.setter + def font(self, val): + self["font"] = val + + @property + def side(self): + """ + Determines the location of color bar's title with respect to + the color bar. Defaults to "top" when `orientation` if "v" and + defaults to "right" when `orientation` if "h". + + The 'side' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['right', 'top', 'bottom'] + + Returns + ------- + Any + """ + return self["side"] + + @side.setter + def side(self, val): + self["side"] = val + + @property + def text(self): + """ + Sets the title of the color bar. + + The 'text' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["text"] + + @text.setter + def text(self, val): + self["text"] = val + + @property + def _prop_descriptions(self): + return """\ + font + Sets this color bar's title font. + side + Determines the location of color bar's title with + respect to the color bar. Defaults to "top" when + `orientation` if "v" and defaults to "right" when + `orientation` if "h". + text + Sets the title of the color bar. + """ + + def __init__(self, arg=None, font=None, side=None, text=None, **kwargs): + """ + Construct a new Title object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.cone.colorbar.Title` + font + Sets this color bar's title font. + side + Determines the location of color bar's title with + respect to the color bar. Defaults to "top" when + `orientation` if "v" and defaults to "right" when + `orientation` if "h". + text + Sets the title of the color bar. + + Returns + ------- + Title + """ + super().__init__("title") + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + if arg is None: + arg = {} + elif isinstance(arg, self.__class__): + arg = arg.to_plotly_json() + elif isinstance(arg, dict): + arg = _copy.copy(arg) + else: + raise ValueError("""\ +The first argument to the plotly.graph_objs.cone.colorbar.Title +constructor must be a dict or +an instance of :class:`plotly.graph_objs.cone.colorbar.Title`""") + + self._skip_invalid = kwargs.pop("skip_invalid", False) + self._validate = kwargs.pop("_validate", True) + + self._set_property("font", arg, font) + self._set_property("side", arg, side) + self._set_property("text", arg, text) + self._process_kwargs(**dict(arg, **kwargs)) + self._skip_invalid = False diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/cone/colorbar/title/.___init__.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/cone/colorbar/title/.___init__.py new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/cone/colorbar/title/.___init__.py differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/cone/colorbar/title/.___pycache__ b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/cone/colorbar/title/.___pycache__ new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/cone/colorbar/title/.___pycache__ differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/cone/colorbar/title/.__font.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/cone/colorbar/title/.__font.py new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/cone/colorbar/title/.__font.py differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/cone/colorbar/title/__init__.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/cone/colorbar/title/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..56f600d3458c41f269053307377e9707ab13e090 --- /dev/null +++ b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/cone/colorbar/title/__init__.py @@ -0,0 +1,9 @@ +import sys +from typing import TYPE_CHECKING + +if TYPE_CHECKING: + from ._font import Font +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import(__name__, [], ["._font.Font"]) diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/cone/colorbar/title/_font.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/cone/colorbar/title/_font.py new file mode 100644 index 0000000000000000000000000000000000000000..08e5f3c8f94fdf89af5cc3fafbf67daec72c4240 --- /dev/null +++ b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/cone/colorbar/title/_font.py @@ -0,0 +1,334 @@ +# --- THIS FILE IS AUTO-GENERATED --- +# Modifications will be overwitten the next time code generation run. + +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Font(_BaseTraceHierarchyType): + _parent_path_str = "cone.colorbar.title" + _path_str = "cone.colorbar.title.font" + _valid_props = { + "color", + "family", + "lineposition", + "shadow", + "size", + "style", + "textcase", + "variant", + "weight", + } + + @property + def color(self): + """ + The 'color' property is a color and may be specified as: + - A hex string (e.g. '#ff0000') + - An rgb/rgba string (e.g. 'rgb(255,0,0)') + - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') + - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') + - A named CSS color: see https://plotly.com/python/css-colors/ for a list + + Returns + ------- + str + """ + return self["color"] + + @color.setter + def color(self, val): + self["color"] = val + + @property + def family(self): + """ + HTML font family - the typeface that will be applied by the web + browser. The web browser can only apply a font if it is + available on the system where it runs. Provide multiple font + families, separated by commas, to indicate the order in which + to apply fonts if they aren't available. + + The 'family' property is a string and must be specified as: + - A non-empty string + + Returns + ------- + str + """ + return self["family"] + + @family.setter + def family(self, val): + self["family"] = val + + @property + def lineposition(self): + """ + Sets the kind of decoration line(s) with text, such as an + "under", "over" or "through" as well as combinations e.g. + "under+over", etc. + + The 'lineposition' property is a flaglist and may be specified + as a string containing: + - Any combination of ['under', 'over', 'through'] joined with '+' characters + (e.g. 'under+over') + OR exactly one of ['none'] (e.g. 'none') + + Returns + ------- + Any + """ + return self["lineposition"] + + @lineposition.setter + def lineposition(self, val): + self["lineposition"] = val + + @property + def shadow(self): + """ + Sets the shape and color of the shadow behind text. "auto" + places minimal shadow and applies contrast text font color. See + https://developer.mozilla.org/en-US/docs/Web/CSS/text-shadow + for additional options. + + The 'shadow' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["shadow"] + + @shadow.setter + def shadow(self, val): + self["shadow"] = val + + @property + def size(self): + """ + The 'size' property is a number and may be specified as: + - An int or float in the interval [1, inf] + + Returns + ------- + int|float + """ + return self["size"] + + @size.setter + def size(self, val): + self["size"] = val + + @property + def style(self): + """ + Sets whether a font should be styled with a normal or italic + face from its family. + + The 'style' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['normal', 'italic'] + + Returns + ------- + Any + """ + return self["style"] + + @style.setter + def style(self, val): + self["style"] = val + + @property + def textcase(self): + """ + Sets capitalization of text. It can be used to make text appear + in all-uppercase or all-lowercase, or with each word + capitalized. + + The 'textcase' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['normal', 'word caps', 'upper', 'lower'] + + Returns + ------- + Any + """ + return self["textcase"] + + @textcase.setter + def textcase(self, val): + self["textcase"] = val + + @property + def variant(self): + """ + Sets the variant of the font. + + The 'variant' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['normal', 'small-caps', 'all-small-caps', + 'all-petite-caps', 'petite-caps', 'unicase'] + + Returns + ------- + Any + """ + return self["variant"] + + @variant.setter + def variant(self, val): + self["variant"] = val + + @property + def weight(self): + """ + Sets the weight (or boldness) of the font. + + The 'weight' property is a integer and may be specified as: + - An int (or float that will be cast to an int) + in the interval [1, 1000] + OR exactly one of ['normal', 'bold'] (e.g. 'bold') + + Returns + ------- + int + """ + return self["weight"] + + @weight.setter + def weight(self, val): + self["weight"] = val + + @property + def _prop_descriptions(self): + return """\ + color + + family + HTML font family - the typeface that will be applied by + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. + lineposition + Sets the kind of decoration line(s) with text, such as + an "under", "over" or "through" as well as combinations + e.g. "under+over", etc. + shadow + Sets the shape and color of the shadow behind text. + "auto" places minimal shadow and applies contrast text + font color. See https://developer.mozilla.org/en- + US/docs/Web/CSS/text-shadow for additional options. + size + + style + Sets whether a font should be styled with a normal or + italic face from its family. + textcase + Sets capitalization of text. It can be used to make + text appear in all-uppercase or all-lowercase, or with + each word capitalized. + variant + Sets the variant of the font. + weight + Sets the weight (or boldness) of the font. + """ + + def __init__( + self, + arg=None, + color=None, + family=None, + lineposition=None, + shadow=None, + size=None, + style=None, + textcase=None, + variant=None, + weight=None, + **kwargs, + ): + """ + Construct a new Font object + + Sets this color bar's title font. + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.cone.colorbar.title.Font` + color + + family + HTML font family - the typeface that will be applied by + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. + lineposition + Sets the kind of decoration line(s) with text, such as + an "under", "over" or "through" as well as combinations + e.g. "under+over", etc. + shadow + Sets the shape and color of the shadow behind text. + "auto" places minimal shadow and applies contrast text + font color. See https://developer.mozilla.org/en- + US/docs/Web/CSS/text-shadow for additional options. + size + + style + Sets whether a font should be styled with a normal or + italic face from its family. + textcase + Sets capitalization of text. It can be used to make + text appear in all-uppercase or all-lowercase, or with + each word capitalized. + variant + Sets the variant of the font. + weight + Sets the weight (or boldness) of the font. + + Returns + ------- + Font + """ + super().__init__("font") + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + if arg is None: + arg = {} + elif isinstance(arg, self.__class__): + arg = arg.to_plotly_json() + elif isinstance(arg, dict): + arg = _copy.copy(arg) + else: + raise ValueError("""\ +The first argument to the plotly.graph_objs.cone.colorbar.title.Font +constructor must be a dict or +an instance of :class:`plotly.graph_objs.cone.colorbar.title.Font`""") + + self._skip_invalid = kwargs.pop("skip_invalid", False) + self._validate = kwargs.pop("_validate", True) + + self._set_property("color", arg, color) + self._set_property("family", arg, family) + self._set_property("lineposition", arg, lineposition) + self._set_property("shadow", arg, shadow) + self._set_property("size", arg, size) + self._set_property("style", arg, style) + self._set_property("textcase", arg, textcase) + self._set_property("variant", arg, variant) + self._set_property("weight", arg, weight) + self._process_kwargs(**dict(arg, **kwargs)) + self._skip_invalid = False diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/cone/hoverlabel/.___init__.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/cone/hoverlabel/.___init__.py new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/cone/hoverlabel/.___init__.py differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/cone/hoverlabel/.___pycache__ b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/cone/hoverlabel/.___pycache__ new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/cone/hoverlabel/.___pycache__ differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/cone/hoverlabel/.__font.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/cone/hoverlabel/.__font.py new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/cone/hoverlabel/.__font.py differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/cone/hoverlabel/__init__.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/cone/hoverlabel/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..56f600d3458c41f269053307377e9707ab13e090 --- /dev/null +++ b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/cone/hoverlabel/__init__.py @@ -0,0 +1,9 @@ +import sys +from typing import TYPE_CHECKING + +if TYPE_CHECKING: + from ._font import Font +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import(__name__, [], ["._font.Font"]) diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/cone/hoverlabel/_font.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/cone/hoverlabel/_font.py new file mode 100644 index 0000000000000000000000000000000000000000..b24ef2034ef206d360836713a863168c01315c82 --- /dev/null +++ b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/cone/hoverlabel/_font.py @@ -0,0 +1,587 @@ +# --- THIS FILE IS AUTO-GENERATED --- +# Modifications will be overwitten the next time code generation run. + +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Font(_BaseTraceHierarchyType): + _parent_path_str = "cone.hoverlabel" + _path_str = "cone.hoverlabel.font" + _valid_props = { + "color", + "colorsrc", + "family", + "familysrc", + "lineposition", + "linepositionsrc", + "shadow", + "shadowsrc", + "size", + "sizesrc", + "style", + "stylesrc", + "textcase", + "textcasesrc", + "variant", + "variantsrc", + "weight", + "weightsrc", + } + + @property + def color(self): + """ + The 'color' property is a color and may be specified as: + - A hex string (e.g. '#ff0000') + - An rgb/rgba string (e.g. 'rgb(255,0,0)') + - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') + - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') + - A named CSS color: see https://plotly.com/python/css-colors/ for a list + - A list or array of any of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["color"] + + @color.setter + def color(self, val): + self["color"] = val + + @property + def colorsrc(self): + """ + Sets the source reference on Chart Studio Cloud for `color`. + + The 'colorsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["colorsrc"] + + @colorsrc.setter + def colorsrc(self, val): + self["colorsrc"] = val + + @property + def family(self): + """ + HTML font family - the typeface that will be applied by the web + browser. The web browser can only apply a font if it is + available on the system where it runs. Provide multiple font + families, separated by commas, to indicate the order in which + to apply fonts if they aren't available. + + The 'family' property is a string and must be specified as: + - A non-empty string + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["family"] + + @family.setter + def family(self, val): + self["family"] = val + + @property + def familysrc(self): + """ + Sets the source reference on Chart Studio Cloud for `family`. + + The 'familysrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["familysrc"] + + @familysrc.setter + def familysrc(self, val): + self["familysrc"] = val + + @property + def lineposition(self): + """ + Sets the kind of decoration line(s) with text, such as an + "under", "over" or "through" as well as combinations e.g. + "under+over", etc. + + The 'lineposition' property is a flaglist and may be specified + as a string containing: + - Any combination of ['under', 'over', 'through'] joined with '+' characters + (e.g. 'under+over') + OR exactly one of ['none'] (e.g. 'none') + - A list or array of the above + + Returns + ------- + Any|numpy.ndarray + """ + return self["lineposition"] + + @lineposition.setter + def lineposition(self, val): + self["lineposition"] = val + + @property + def linepositionsrc(self): + """ + Sets the source reference on Chart Studio Cloud for + `lineposition`. + + The 'linepositionsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["linepositionsrc"] + + @linepositionsrc.setter + def linepositionsrc(self, val): + self["linepositionsrc"] = val + + @property + def shadow(self): + """ + Sets the shape and color of the shadow behind text. "auto" + places minimal shadow and applies contrast text font color. See + https://developer.mozilla.org/en-US/docs/Web/CSS/text-shadow + for additional options. + + The 'shadow' property is a string and must be specified as: + - A string + - A number that will be converted to a string + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["shadow"] + + @shadow.setter + def shadow(self, val): + self["shadow"] = val + + @property + def shadowsrc(self): + """ + Sets the source reference on Chart Studio Cloud for `shadow`. + + The 'shadowsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["shadowsrc"] + + @shadowsrc.setter + def shadowsrc(self, val): + self["shadowsrc"] = val + + @property + def size(self): + """ + The 'size' property is a number and may be specified as: + - An int or float in the interval [1, inf] + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + int|float|numpy.ndarray + """ + return self["size"] + + @size.setter + def size(self, val): + self["size"] = val + + @property + def sizesrc(self): + """ + Sets the source reference on Chart Studio Cloud for `size`. + + The 'sizesrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["sizesrc"] + + @sizesrc.setter + def sizesrc(self, val): + self["sizesrc"] = val + + @property + def style(self): + """ + Sets whether a font should be styled with a normal or italic + face from its family. + + The 'style' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['normal', 'italic'] + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + Any|numpy.ndarray + """ + return self["style"] + + @style.setter + def style(self, val): + self["style"] = val + + @property + def stylesrc(self): + """ + Sets the source reference on Chart Studio Cloud for `style`. + + The 'stylesrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["stylesrc"] + + @stylesrc.setter + def stylesrc(self, val): + self["stylesrc"] = val + + @property + def textcase(self): + """ + Sets capitalization of text. It can be used to make text appear + in all-uppercase or all-lowercase, or with each word + capitalized. + + The 'textcase' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['normal', 'word caps', 'upper', 'lower'] + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + Any|numpy.ndarray + """ + return self["textcase"] + + @textcase.setter + def textcase(self, val): + self["textcase"] = val + + @property + def textcasesrc(self): + """ + Sets the source reference on Chart Studio Cloud for `textcase`. + + The 'textcasesrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["textcasesrc"] + + @textcasesrc.setter + def textcasesrc(self, val): + self["textcasesrc"] = val + + @property + def variant(self): + """ + Sets the variant of the font. + + The 'variant' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['normal', 'small-caps', 'all-small-caps', + 'all-petite-caps', 'petite-caps', 'unicase'] + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + Any|numpy.ndarray + """ + return self["variant"] + + @variant.setter + def variant(self, val): + self["variant"] = val + + @property + def variantsrc(self): + """ + Sets the source reference on Chart Studio Cloud for `variant`. + + The 'variantsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["variantsrc"] + + @variantsrc.setter + def variantsrc(self, val): + self["variantsrc"] = val + + @property + def weight(self): + """ + Sets the weight (or boldness) of the font. + + The 'weight' property is a integer and may be specified as: + - An int (or float that will be cast to an int) + in the interval [1, 1000] + OR exactly one of ['normal', 'bold'] (e.g. 'bold') + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + int|numpy.ndarray + """ + return self["weight"] + + @weight.setter + def weight(self, val): + self["weight"] = val + + @property + def weightsrc(self): + """ + Sets the source reference on Chart Studio Cloud for `weight`. + + The 'weightsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["weightsrc"] + + @weightsrc.setter + def weightsrc(self, val): + self["weightsrc"] = val + + @property + def _prop_descriptions(self): + return """\ + color + + colorsrc + Sets the source reference on Chart Studio Cloud for + `color`. + family + HTML font family - the typeface that will be applied by + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. + familysrc + Sets the source reference on Chart Studio Cloud for + `family`. + lineposition + Sets the kind of decoration line(s) with text, such as + an "under", "over" or "through" as well as combinations + e.g. "under+over", etc. + linepositionsrc + Sets the source reference on Chart Studio Cloud for + `lineposition`. + shadow + Sets the shape and color of the shadow behind text. + "auto" places minimal shadow and applies contrast text + font color. See https://developer.mozilla.org/en- + US/docs/Web/CSS/text-shadow for additional options. + shadowsrc + Sets the source reference on Chart Studio Cloud for + `shadow`. + size + + sizesrc + Sets the source reference on Chart Studio Cloud for + `size`. + style + Sets whether a font should be styled with a normal or + italic face from its family. + stylesrc + Sets the source reference on Chart Studio Cloud for + `style`. + textcase + Sets capitalization of text. It can be used to make + text appear in all-uppercase or all-lowercase, or with + each word capitalized. + textcasesrc + Sets the source reference on Chart Studio Cloud for + `textcase`. + variant + Sets the variant of the font. + variantsrc + Sets the source reference on Chart Studio Cloud for + `variant`. + weight + Sets the weight (or boldness) of the font. + weightsrc + Sets the source reference on Chart Studio Cloud for + `weight`. + """ + + def __init__( + self, + arg=None, + color=None, + colorsrc=None, + family=None, + familysrc=None, + lineposition=None, + linepositionsrc=None, + shadow=None, + shadowsrc=None, + size=None, + sizesrc=None, + style=None, + stylesrc=None, + textcase=None, + textcasesrc=None, + variant=None, + variantsrc=None, + weight=None, + weightsrc=None, + **kwargs, + ): + """ + Construct a new Font object + + Sets the font used in hover labels. + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.cone.hoverlabel.Font` + color + + colorsrc + Sets the source reference on Chart Studio Cloud for + `color`. + family + HTML font family - the typeface that will be applied by + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. + familysrc + Sets the source reference on Chart Studio Cloud for + `family`. + lineposition + Sets the kind of decoration line(s) with text, such as + an "under", "over" or "through" as well as combinations + e.g. "under+over", etc. + linepositionsrc + Sets the source reference on Chart Studio Cloud for + `lineposition`. + shadow + Sets the shape and color of the shadow behind text. + "auto" places minimal shadow and applies contrast text + font color. See https://developer.mozilla.org/en- + US/docs/Web/CSS/text-shadow for additional options. + shadowsrc + Sets the source reference on Chart Studio Cloud for + `shadow`. + size + + sizesrc + Sets the source reference on Chart Studio Cloud for + `size`. + style + Sets whether a font should be styled with a normal or + italic face from its family. + stylesrc + Sets the source reference on Chart Studio Cloud for + `style`. + textcase + Sets capitalization of text. It can be used to make + text appear in all-uppercase or all-lowercase, or with + each word capitalized. + textcasesrc + Sets the source reference on Chart Studio Cloud for + `textcase`. + variant + Sets the variant of the font. + variantsrc + Sets the source reference on Chart Studio Cloud for + `variant`. + weight + Sets the weight (or boldness) of the font. + weightsrc + Sets the source reference on Chart Studio Cloud for + `weight`. + + Returns + ------- + Font + """ + super().__init__("font") + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + if arg is None: + arg = {} + elif isinstance(arg, self.__class__): + arg = arg.to_plotly_json() + elif isinstance(arg, dict): + arg = _copy.copy(arg) + else: + raise ValueError("""\ +The first argument to the plotly.graph_objs.cone.hoverlabel.Font +constructor must be a dict or +an instance of :class:`plotly.graph_objs.cone.hoverlabel.Font`""") + + self._skip_invalid = kwargs.pop("skip_invalid", False) + self._validate = kwargs.pop("_validate", True) + + self._set_property("color", arg, color) + self._set_property("colorsrc", arg, colorsrc) + self._set_property("family", arg, family) + self._set_property("familysrc", arg, familysrc) + self._set_property("lineposition", arg, lineposition) + self._set_property("linepositionsrc", arg, linepositionsrc) + self._set_property("shadow", arg, shadow) + self._set_property("shadowsrc", arg, shadowsrc) + self._set_property("size", arg, size) + self._set_property("sizesrc", arg, sizesrc) + self._set_property("style", arg, style) + self._set_property("stylesrc", arg, stylesrc) + self._set_property("textcase", arg, textcase) + self._set_property("textcasesrc", arg, textcasesrc) + self._set_property("variant", arg, variant) + self._set_property("variantsrc", arg, variantsrc) + self._set_property("weight", arg, weight) + self._set_property("weightsrc", arg, weightsrc) + self._process_kwargs(**dict(arg, **kwargs)) + self._skip_invalid = False diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/cone/legendgrouptitle/.___init__.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/cone/legendgrouptitle/.___init__.py new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/cone/legendgrouptitle/.___init__.py differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/cone/legendgrouptitle/.___pycache__ b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/cone/legendgrouptitle/.___pycache__ new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/cone/legendgrouptitle/.___pycache__ differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/cone/legendgrouptitle/.__font.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/cone/legendgrouptitle/.__font.py new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/cone/legendgrouptitle/.__font.py differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/cone/legendgrouptitle/__init__.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/cone/legendgrouptitle/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..56f600d3458c41f269053307377e9707ab13e090 --- /dev/null +++ b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/cone/legendgrouptitle/__init__.py @@ -0,0 +1,9 @@ +import sys +from typing import TYPE_CHECKING + +if TYPE_CHECKING: + from ._font import Font +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import(__name__, [], ["._font.Font"]) diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/cone/legendgrouptitle/_font.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/cone/legendgrouptitle/_font.py new file mode 100644 index 0000000000000000000000000000000000000000..90b723a1c2aa979e8bfd2b9d799f89b7e85a9d9d --- /dev/null +++ b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/cone/legendgrouptitle/_font.py @@ -0,0 +1,334 @@ +# --- THIS FILE IS AUTO-GENERATED --- +# Modifications will be overwitten the next time code generation run. + +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Font(_BaseTraceHierarchyType): + _parent_path_str = "cone.legendgrouptitle" + _path_str = "cone.legendgrouptitle.font" + _valid_props = { + "color", + "family", + "lineposition", + "shadow", + "size", + "style", + "textcase", + "variant", + "weight", + } + + @property + def color(self): + """ + The 'color' property is a color and may be specified as: + - A hex string (e.g. '#ff0000') + - An rgb/rgba string (e.g. 'rgb(255,0,0)') + - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') + - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') + - A named CSS color: see https://plotly.com/python/css-colors/ for a list + + Returns + ------- + str + """ + return self["color"] + + @color.setter + def color(self, val): + self["color"] = val + + @property + def family(self): + """ + HTML font family - the typeface that will be applied by the web + browser. The web browser can only apply a font if it is + available on the system where it runs. Provide multiple font + families, separated by commas, to indicate the order in which + to apply fonts if they aren't available. + + The 'family' property is a string and must be specified as: + - A non-empty string + + Returns + ------- + str + """ + return self["family"] + + @family.setter + def family(self, val): + self["family"] = val + + @property + def lineposition(self): + """ + Sets the kind of decoration line(s) with text, such as an + "under", "over" or "through" as well as combinations e.g. + "under+over", etc. + + The 'lineposition' property is a flaglist and may be specified + as a string containing: + - Any combination of ['under', 'over', 'through'] joined with '+' characters + (e.g. 'under+over') + OR exactly one of ['none'] (e.g. 'none') + + Returns + ------- + Any + """ + return self["lineposition"] + + @lineposition.setter + def lineposition(self, val): + self["lineposition"] = val + + @property + def shadow(self): + """ + Sets the shape and color of the shadow behind text. "auto" + places minimal shadow and applies contrast text font color. See + https://developer.mozilla.org/en-US/docs/Web/CSS/text-shadow + for additional options. + + The 'shadow' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["shadow"] + + @shadow.setter + def shadow(self, val): + self["shadow"] = val + + @property + def size(self): + """ + The 'size' property is a number and may be specified as: + - An int or float in the interval [1, inf] + + Returns + ------- + int|float + """ + return self["size"] + + @size.setter + def size(self, val): + self["size"] = val + + @property + def style(self): + """ + Sets whether a font should be styled with a normal or italic + face from its family. + + The 'style' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['normal', 'italic'] + + Returns + ------- + Any + """ + return self["style"] + + @style.setter + def style(self, val): + self["style"] = val + + @property + def textcase(self): + """ + Sets capitalization of text. It can be used to make text appear + in all-uppercase or all-lowercase, or with each word + capitalized. + + The 'textcase' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['normal', 'word caps', 'upper', 'lower'] + + Returns + ------- + Any + """ + return self["textcase"] + + @textcase.setter + def textcase(self, val): + self["textcase"] = val + + @property + def variant(self): + """ + Sets the variant of the font. + + The 'variant' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['normal', 'small-caps', 'all-small-caps', + 'all-petite-caps', 'petite-caps', 'unicase'] + + Returns + ------- + Any + """ + return self["variant"] + + @variant.setter + def variant(self, val): + self["variant"] = val + + @property + def weight(self): + """ + Sets the weight (or boldness) of the font. + + The 'weight' property is a integer and may be specified as: + - An int (or float that will be cast to an int) + in the interval [1, 1000] + OR exactly one of ['normal', 'bold'] (e.g. 'bold') + + Returns + ------- + int + """ + return self["weight"] + + @weight.setter + def weight(self, val): + self["weight"] = val + + @property + def _prop_descriptions(self): + return """\ + color + + family + HTML font family - the typeface that will be applied by + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. + lineposition + Sets the kind of decoration line(s) with text, such as + an "under", "over" or "through" as well as combinations + e.g. "under+over", etc. + shadow + Sets the shape and color of the shadow behind text. + "auto" places minimal shadow and applies contrast text + font color. See https://developer.mozilla.org/en- + US/docs/Web/CSS/text-shadow for additional options. + size + + style + Sets whether a font should be styled with a normal or + italic face from its family. + textcase + Sets capitalization of text. It can be used to make + text appear in all-uppercase or all-lowercase, or with + each word capitalized. + variant + Sets the variant of the font. + weight + Sets the weight (or boldness) of the font. + """ + + def __init__( + self, + arg=None, + color=None, + family=None, + lineposition=None, + shadow=None, + size=None, + style=None, + textcase=None, + variant=None, + weight=None, + **kwargs, + ): + """ + Construct a new Font object + + Sets this legend group's title font. + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.cone.legendgrouptitle.Font` + color + + family + HTML font family - the typeface that will be applied by + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. + lineposition + Sets the kind of decoration line(s) with text, such as + an "under", "over" or "through" as well as combinations + e.g. "under+over", etc. + shadow + Sets the shape and color of the shadow behind text. + "auto" places minimal shadow and applies contrast text + font color. See https://developer.mozilla.org/en- + US/docs/Web/CSS/text-shadow for additional options. + size + + style + Sets whether a font should be styled with a normal or + italic face from its family. + textcase + Sets capitalization of text. It can be used to make + text appear in all-uppercase or all-lowercase, or with + each word capitalized. + variant + Sets the variant of the font. + weight + Sets the weight (or boldness) of the font. + + Returns + ------- + Font + """ + super().__init__("font") + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + if arg is None: + arg = {} + elif isinstance(arg, self.__class__): + arg = arg.to_plotly_json() + elif isinstance(arg, dict): + arg = _copy.copy(arg) + else: + raise ValueError("""\ +The first argument to the plotly.graph_objs.cone.legendgrouptitle.Font +constructor must be a dict or +an instance of :class:`plotly.graph_objs.cone.legendgrouptitle.Font`""") + + self._skip_invalid = kwargs.pop("skip_invalid", False) + self._validate = kwargs.pop("_validate", True) + + self._set_property("color", arg, color) + self._set_property("family", arg, family) + self._set_property("lineposition", arg, lineposition) + self._set_property("shadow", arg, shadow) + self._set_property("size", arg, size) + self._set_property("style", arg, style) + self._set_property("textcase", arg, textcase) + self._set_property("variant", arg, variant) + self._set_property("weight", arg, weight) + self._process_kwargs(**dict(arg, **kwargs)) + self._skip_invalid = False diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/contour/.___init__.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/contour/.___init__.py new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/contour/.___init__.py differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/contour/.___pycache__ b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/contour/.___pycache__ new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/contour/.___pycache__ differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/contour/.__colorbar.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/contour/.__colorbar.py new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/contour/.__colorbar.py differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/contour/.__contours.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/contour/.__contours.py new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/contour/.__contours.py differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/contour/.__hoverlabel.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/contour/.__hoverlabel.py new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/contour/.__hoverlabel.py differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/contour/.__legendgrouptitle.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/contour/.__legendgrouptitle.py new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/contour/.__legendgrouptitle.py differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/contour/.__line.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/contour/.__line.py new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/contour/.__line.py differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/contour/.__stream.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/contour/.__stream.py new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/contour/.__stream.py differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/contour/.__textfont.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/contour/.__textfont.py new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/contour/.__textfont.py differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/contour/._colorbar b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/contour/._colorbar new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/contour/._colorbar differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/contour/._contours b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/contour/._contours new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/contour/._contours differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/contour/._hoverlabel b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/contour/._hoverlabel new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/contour/._hoverlabel differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/contour/._legendgrouptitle b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/contour/._legendgrouptitle new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/contour/._legendgrouptitle differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/contour/__init__.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/contour/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..335ba2577d1676cf0689398d6f0328e3b7e2ab0f --- /dev/null +++ b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/contour/__init__.py @@ -0,0 +1,31 @@ +import sys +from typing import TYPE_CHECKING + +if TYPE_CHECKING: + from ._colorbar import ColorBar + from ._contours import Contours + from ._hoverlabel import Hoverlabel + from ._legendgrouptitle import Legendgrouptitle + from ._line import Line + from ._stream import Stream + from ._textfont import Textfont + from . import colorbar + from . import contours + from . import hoverlabel + from . import legendgrouptitle +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [".colorbar", ".contours", ".hoverlabel", ".legendgrouptitle"], + [ + "._colorbar.ColorBar", + "._contours.Contours", + "._hoverlabel.Hoverlabel", + "._legendgrouptitle.Legendgrouptitle", + "._line.Line", + "._stream.Stream", + "._textfont.Textfont", + ], + ) diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/contour/_colorbar.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/contour/_colorbar.py new file mode 100644 index 0000000000000000000000000000000000000000..f51584db1623506e7013c58abedc006156459681 --- /dev/null +++ b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/contour/_colorbar.py @@ -0,0 +1,1739 @@ +# --- THIS FILE IS AUTO-GENERATED --- +# Modifications will be overwitten the next time code generation run. + +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class ColorBar(_BaseTraceHierarchyType): + _parent_path_str = "contour" + _path_str = "contour.colorbar" + _valid_props = { + "bgcolor", + "bordercolor", + "borderwidth", + "dtick", + "exponentformat", + "labelalias", + "len", + "lenmode", + "minexponent", + "nticks", + "orientation", + "outlinecolor", + "outlinewidth", + "separatethousands", + "showexponent", + "showticklabels", + "showtickprefix", + "showticksuffix", + "thickness", + "thicknessmode", + "tick0", + "tickangle", + "tickcolor", + "tickfont", + "tickformat", + "tickformatstopdefaults", + "tickformatstops", + "ticklabeloverflow", + "ticklabelposition", + "ticklabelstep", + "ticklen", + "tickmode", + "tickprefix", + "ticks", + "ticksuffix", + "ticktext", + "ticktextsrc", + "tickvals", + "tickvalssrc", + "tickwidth", + "title", + "x", + "xanchor", + "xpad", + "xref", + "y", + "yanchor", + "ypad", + "yref", + } + + @property + def bgcolor(self): + """ + Sets the color of padded area. + + The 'bgcolor' property is a color and may be specified as: + - A hex string (e.g. '#ff0000') + - An rgb/rgba string (e.g. 'rgb(255,0,0)') + - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') + - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') + - A named CSS color: see https://plotly.com/python/css-colors/ for a list + + Returns + ------- + str + """ + return self["bgcolor"] + + @bgcolor.setter + def bgcolor(self, val): + self["bgcolor"] = val + + @property + def bordercolor(self): + """ + Sets the axis line color. + + The 'bordercolor' property is a color and may be specified as: + - A hex string (e.g. '#ff0000') + - An rgb/rgba string (e.g. 'rgb(255,0,0)') + - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') + - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') + - A named CSS color: see https://plotly.com/python/css-colors/ for a list + + Returns + ------- + str + """ + return self["bordercolor"] + + @bordercolor.setter + def bordercolor(self, val): + self["bordercolor"] = val + + @property + def borderwidth(self): + """ + Sets the width (in px) or the border enclosing this color bar. + + The 'borderwidth' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["borderwidth"] + + @borderwidth.setter + def borderwidth(self, val): + self["borderwidth"] = val + + @property + def dtick(self): + """ + Sets the step in-between ticks on this axis. Use with `tick0`. + Must be a positive number, or special strings available to + "log" and "date" axes. If the axis `type` is "log", then ticks + are set every 10^(n*dtick) where n is the tick number. For + example, to set a tick mark at 1, 10, 100, 1000, ... set dtick + to 1. To set tick marks at 1, 100, 10000, ... set dtick to 2. + To set tick marks at 1, 5, 25, 125, 625, 3125, ... set dtick to + log_10(5), or 0.69897000433. "log" has several special values; + "L", where `f` is a positive number, gives ticks linearly + spaced in value (but not position). For example `tick0` = 0.1, + `dtick` = "L0.5" will put ticks at 0.1, 0.6, 1.1, 1.6 etc. To + show powers of 10 plus small digits between, use "D1" (all + digits) or "D2" (only 2 and 5). `tick0` is ignored for "D1" and + "D2". If the axis `type` is "date", then you must convert the + time to milliseconds. For example, to set the interval between + ticks to one day, set `dtick` to 86400000.0. "date" also has + special values "M" gives ticks spaced by a number of months. + `n` must be a positive integer. To set ticks on the 15th of + every third month, set `tick0` to "2000-01-15" and `dtick` to + "M3". To set ticks every 4 years, set `dtick` to "M48" + + The 'dtick' property accepts values of any type + + Returns + ------- + Any + """ + return self["dtick"] + + @dtick.setter + def dtick(self, val): + self["dtick"] = val + + @property + def exponentformat(self): + """ + Determines a formatting rule for the tick exponents. For + example, consider the number 1,000,000,000. If "none", it + appears as 1,000,000,000. If "e", 1e+9. If "E", 1E+9. If + "power", 1x10^9 (with 9 in a super script). If "SI", 1G. If + "B", 1B. "SI" uses prefixes from "femto" f (10^-15) to "tera" T + (10^12). *SI extended* covers instead the full SI range from + "quecto" q (10^-30) to "quetta" Q (10^30). If "SI" or *SI + extended* is used and the exponent is beyond the above ranges, + the formatting rule will automatically be switched to the power + notation. + + The 'exponentformat' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['none', 'e', 'E', 'power', 'SI', 'B', 'SI extended'] + + Returns + ------- + Any + """ + return self["exponentformat"] + + @exponentformat.setter + def exponentformat(self, val): + self["exponentformat"] = val + + @property + def labelalias(self): + """ + Replacement text for specific tick or hover labels. For example + using {US: 'USA', CA: 'Canada'} changes US to USA and CA to + Canada. The labels we would have shown must match the keys + exactly, after adding any tickprefix or ticksuffix. For + negative numbers the minus sign symbol used (U+2212) is wider + than the regular ascii dash. That means you need to use −1 + instead of -1. labelalias can be used with any axis type, and + both keys (if needed) and values (if desired) can include html- + like tags or MathJax. + + The 'labelalias' property accepts values of any type + + Returns + ------- + Any + """ + return self["labelalias"] + + @labelalias.setter + def labelalias(self, val): + self["labelalias"] = val + + @property + def len(self): + """ + Sets the length of the color bar This measure excludes the + padding of both ends. That is, the color bar length is this + length minus the padding on both ends. + + The 'len' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["len"] + + @len.setter + def len(self, val): + self["len"] = val + + @property + def lenmode(self): + """ + Determines whether this color bar's length (i.e. the measure in + the color variation direction) is set in units of plot + "fraction" or in *pixels. Use `len` to set the value. + + The 'lenmode' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['fraction', 'pixels'] + + Returns + ------- + Any + """ + return self["lenmode"] + + @lenmode.setter + def lenmode(self, val): + self["lenmode"] = val + + @property + def minexponent(self): + """ + Hide SI prefix for 10^n if |n| is below this number. This only + has an effect when `tickformat` is "SI" or "B". + + The 'minexponent' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["minexponent"] + + @minexponent.setter + def minexponent(self, val): + self["minexponent"] = val + + @property + def nticks(self): + """ + Specifies the maximum number of ticks for the particular axis. + The actual number of ticks will be chosen automatically to be + less than or equal to `nticks`. Has an effect only if + `tickmode` is set to "auto". + + The 'nticks' property is a integer and may be specified as: + - An int (or float that will be cast to an int) + in the interval [0, 9223372036854775807] + + Returns + ------- + int + """ + return self["nticks"] + + @nticks.setter + def nticks(self, val): + self["nticks"] = val + + @property + def orientation(self): + """ + Sets the orientation of the colorbar. + + The 'orientation' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['h', 'v'] + + Returns + ------- + Any + """ + return self["orientation"] + + @orientation.setter + def orientation(self, val): + self["orientation"] = val + + @property + def outlinecolor(self): + """ + Sets the axis line color. + + The 'outlinecolor' property is a color and may be specified as: + - A hex string (e.g. '#ff0000') + - An rgb/rgba string (e.g. 'rgb(255,0,0)') + - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') + - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') + - A named CSS color: see https://plotly.com/python/css-colors/ for a list + + Returns + ------- + str + """ + return self["outlinecolor"] + + @outlinecolor.setter + def outlinecolor(self, val): + self["outlinecolor"] = val + + @property + def outlinewidth(self): + """ + Sets the width (in px) of the axis line. + + The 'outlinewidth' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["outlinewidth"] + + @outlinewidth.setter + def outlinewidth(self, val): + self["outlinewidth"] = val + + @property + def separatethousands(self): + """ + If "true", even 4-digit integers are separated + + The 'separatethousands' property is a boolean and must be specified as: + - A boolean value: True or False + + Returns + ------- + bool + """ + return self["separatethousands"] + + @separatethousands.setter + def separatethousands(self, val): + self["separatethousands"] = val + + @property + def showexponent(self): + """ + If "all", all exponents are shown besides their significands. + If "first", only the exponent of the first tick is shown. If + "last", only the exponent of the last tick is shown. If "none", + no exponents appear. + + The 'showexponent' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['all', 'first', 'last', 'none'] + + Returns + ------- + Any + """ + return self["showexponent"] + + @showexponent.setter + def showexponent(self, val): + self["showexponent"] = val + + @property + def showticklabels(self): + """ + Determines whether or not the tick labels are drawn. + + The 'showticklabels' property is a boolean and must be specified as: + - A boolean value: True or False + + Returns + ------- + bool + """ + return self["showticklabels"] + + @showticklabels.setter + def showticklabels(self, val): + self["showticklabels"] = val + + @property + def showtickprefix(self): + """ + If "all", all tick labels are displayed with a prefix. If + "first", only the first tick is displayed with a prefix. If + "last", only the last tick is displayed with a suffix. If + "none", tick prefixes are hidden. + + The 'showtickprefix' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['all', 'first', 'last', 'none'] + + Returns + ------- + Any + """ + return self["showtickprefix"] + + @showtickprefix.setter + def showtickprefix(self, val): + self["showtickprefix"] = val + + @property + def showticksuffix(self): + """ + Same as `showtickprefix` but for tick suffixes. + + The 'showticksuffix' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['all', 'first', 'last', 'none'] + + Returns + ------- + Any + """ + return self["showticksuffix"] + + @showticksuffix.setter + def showticksuffix(self, val): + self["showticksuffix"] = val + + @property + def thickness(self): + """ + Sets the thickness of the color bar This measure excludes the + size of the padding, ticks and labels. + + The 'thickness' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["thickness"] + + @thickness.setter + def thickness(self, val): + self["thickness"] = val + + @property + def thicknessmode(self): + """ + Determines whether this color bar's thickness (i.e. the measure + in the constant color direction) is set in units of plot + "fraction" or in "pixels". Use `thickness` to set the value. + + The 'thicknessmode' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['fraction', 'pixels'] + + Returns + ------- + Any + """ + return self["thicknessmode"] + + @thicknessmode.setter + def thicknessmode(self, val): + self["thicknessmode"] = val + + @property + def tick0(self): + """ + Sets the placement of the first tick on this axis. Use with + `dtick`. If the axis `type` is "log", then you must take the + log of your starting tick (e.g. to set the starting tick to + 100, set the `tick0` to 2) except when `dtick`=*L* (see + `dtick` for more info). If the axis `type` is "date", it should + be a date string, like date data. If the axis `type` is + "category", it should be a number, using the scale where each + category is assigned a serial number from zero in the order it + appears. + + The 'tick0' property accepts values of any type + + Returns + ------- + Any + """ + return self["tick0"] + + @tick0.setter + def tick0(self, val): + self["tick0"] = val + + @property + def tickangle(self): + """ + Sets the angle of the tick labels with respect to the + horizontal. For example, a `tickangle` of -90 draws the tick + labels vertically. + + The 'tickangle' property is a angle (in degrees) that may be + specified as a number between -180 and 180. + Numeric values outside this range are converted to the equivalent value + (e.g. 270 is converted to -90). + + Returns + ------- + int|float + """ + return self["tickangle"] + + @tickangle.setter + def tickangle(self, val): + self["tickangle"] = val + + @property + def tickcolor(self): + """ + Sets the tick color. + + The 'tickcolor' property is a color and may be specified as: + - A hex string (e.g. '#ff0000') + - An rgb/rgba string (e.g. 'rgb(255,0,0)') + - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') + - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') + - A named CSS color: see https://plotly.com/python/css-colors/ for a list + + Returns + ------- + str + """ + return self["tickcolor"] + + @tickcolor.setter + def tickcolor(self, val): + self["tickcolor"] = val + + @property + def tickfont(self): + """ + Sets the color bar's tick label font + + The 'tickfont' property is an instance of Tickfont + that may be specified as: + - An instance of :class:`plotly.graph_objs.contour.colorbar.Tickfont` + - A dict of string/value properties that will be passed + to the Tickfont constructor + + Returns + ------- + plotly.graph_objs.contour.colorbar.Tickfont + """ + return self["tickfont"] + + @tickfont.setter + def tickfont(self, val): + self["tickfont"] = val + + @property + def tickformat(self): + """ + Sets the tick label formatting rule using d3 formatting mini- + languages which are very similar to those in Python. For + numbers, see: + https://github.com/d3/d3-format/tree/v1.4.5#d3-format. And for + dates see: https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format. We add two items to d3's date + formatter: "%h" for half of the year as a decimal number as + well as "%{n}f" for fractional seconds with n digits. For + example, *2016-10-13 09:15:23.456* with tickformat + "%H~%M~%S.%2f" would display "09~15~23.46" + + The 'tickformat' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["tickformat"] + + @tickformat.setter + def tickformat(self, val): + self["tickformat"] = val + + @property + def tickformatstops(self): + """ + The 'tickformatstops' property is a tuple of instances of + Tickformatstop that may be specified as: + - A list or tuple of instances of plotly.graph_objs.contour.colorbar.Tickformatstop + - A list or tuple of dicts of string/value properties that + will be passed to the Tickformatstop constructor + + Returns + ------- + tuple[plotly.graph_objs.contour.colorbar.Tickformatstop] + """ + return self["tickformatstops"] + + @tickformatstops.setter + def tickformatstops(self, val): + self["tickformatstops"] = val + + @property + def tickformatstopdefaults(self): + """ + When used in a template (as + layout.template.data.contour.colorbar.tickformatstopdefaults), + sets the default property values to use for elements of + contour.colorbar.tickformatstops + + The 'tickformatstopdefaults' property is an instance of Tickformatstop + that may be specified as: + - An instance of :class:`plotly.graph_objs.contour.colorbar.Tickformatstop` + - A dict of string/value properties that will be passed + to the Tickformatstop constructor + + Returns + ------- + plotly.graph_objs.contour.colorbar.Tickformatstop + """ + return self["tickformatstopdefaults"] + + @tickformatstopdefaults.setter + def tickformatstopdefaults(self, val): + self["tickformatstopdefaults"] = val + + @property + def ticklabeloverflow(self): + """ + Determines how we handle tick labels that would overflow either + the graph div or the domain of the axis. The default value for + inside tick labels is *hide past domain*. In other cases the + default is *hide past div*. + + The 'ticklabeloverflow' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['allow', 'hide past div', 'hide past domain'] + + Returns + ------- + Any + """ + return self["ticklabeloverflow"] + + @ticklabeloverflow.setter + def ticklabeloverflow(self, val): + self["ticklabeloverflow"] = val + + @property + def ticklabelposition(self): + """ + Determines where tick labels are drawn relative to the ticks. + Left and right options are used when `orientation` is "h", top + and bottom when `orientation` is "v". + + The 'ticklabelposition' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['outside', 'inside', 'outside top', 'inside top', + 'outside left', 'inside left', 'outside right', 'inside + right', 'outside bottom', 'inside bottom'] + + Returns + ------- + Any + """ + return self["ticklabelposition"] + + @ticklabelposition.setter + def ticklabelposition(self, val): + self["ticklabelposition"] = val + + @property + def ticklabelstep(self): + """ + Sets the spacing between tick labels as compared to the spacing + between ticks. A value of 1 (default) means each tick gets a + label. A value of 2 means shows every 2nd label. A larger value + n means only every nth tick is labeled. `tick0` determines + which labels are shown. Not implemented for axes with `type` + "log" or "multicategory", or when `tickmode` is "array". + + The 'ticklabelstep' property is a integer and may be specified as: + - An int (or float that will be cast to an int) + in the interval [1, 9223372036854775807] + + Returns + ------- + int + """ + return self["ticklabelstep"] + + @ticklabelstep.setter + def ticklabelstep(self, val): + self["ticklabelstep"] = val + + @property + def ticklen(self): + """ + Sets the tick length (in px). + + The 'ticklen' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["ticklen"] + + @ticklen.setter + def ticklen(self, val): + self["ticklen"] = val + + @property + def tickmode(self): + """ + Sets the tick mode for this axis. If "auto", the number of + ticks is set via `nticks`. If "linear", the placement of the + ticks is determined by a starting position `tick0` and a tick + step `dtick` ("linear" is the default value if `tick0` and + `dtick` are provided). If "array", the placement of the ticks + is set via `tickvals` and the tick text is `ticktext`. ("array" + is the default value if `tickvals` is provided). + + The 'tickmode' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['auto', 'linear', 'array'] + + Returns + ------- + Any + """ + return self["tickmode"] + + @tickmode.setter + def tickmode(self, val): + self["tickmode"] = val + + @property + def tickprefix(self): + """ + Sets a tick label prefix. + + The 'tickprefix' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["tickprefix"] + + @tickprefix.setter + def tickprefix(self, val): + self["tickprefix"] = val + + @property + def ticks(self): + """ + Determines whether ticks are drawn or not. If "", this axis' + ticks are not drawn. If "outside" ("inside"), this axis' are + drawn outside (inside) the axis lines. + + The 'ticks' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['outside', 'inside', ''] + + Returns + ------- + Any + """ + return self["ticks"] + + @ticks.setter + def ticks(self, val): + self["ticks"] = val + + @property + def ticksuffix(self): + """ + Sets a tick label suffix. + + The 'ticksuffix' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["ticksuffix"] + + @ticksuffix.setter + def ticksuffix(self, val): + self["ticksuffix"] = val + + @property + def ticktext(self): + """ + Sets the text displayed at the ticks position via `tickvals`. + Only has an effect if `tickmode` is set to "array". Used with + `tickvals`. + + The 'ticktext' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["ticktext"] + + @ticktext.setter + def ticktext(self, val): + self["ticktext"] = val + + @property + def ticktextsrc(self): + """ + Sets the source reference on Chart Studio Cloud for `ticktext`. + + The 'ticktextsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["ticktextsrc"] + + @ticktextsrc.setter + def ticktextsrc(self, val): + self["ticktextsrc"] = val + + @property + def tickvals(self): + """ + Sets the values at which ticks on this axis appear. Only has an + effect if `tickmode` is set to "array". Used with `ticktext`. + + The 'tickvals' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["tickvals"] + + @tickvals.setter + def tickvals(self, val): + self["tickvals"] = val + + @property + def tickvalssrc(self): + """ + Sets the source reference on Chart Studio Cloud for `tickvals`. + + The 'tickvalssrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["tickvalssrc"] + + @tickvalssrc.setter + def tickvalssrc(self, val): + self["tickvalssrc"] = val + + @property + def tickwidth(self): + """ + Sets the tick width (in px). + + The 'tickwidth' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["tickwidth"] + + @tickwidth.setter + def tickwidth(self, val): + self["tickwidth"] = val + + @property + def title(self): + """ + The 'title' property is an instance of Title + that may be specified as: + - An instance of :class:`plotly.graph_objs.contour.colorbar.Title` + - A dict of string/value properties that will be passed + to the Title constructor + + Returns + ------- + plotly.graph_objs.contour.colorbar.Title + """ + return self["title"] + + @title.setter + def title(self, val): + self["title"] = val + + @property + def x(self): + """ + Sets the x position with respect to `xref` of the color bar (in + plot fraction). When `xref` is "paper", defaults to 1.02 when + `orientation` is "v" and 0.5 when `orientation` is "h". When + `xref` is "container", defaults to 1 when `orientation` is "v" + and 0.5 when `orientation` is "h". Must be between 0 and 1 if + `xref` is "container" and between "-2" and 3 if `xref` is + "paper". + + The 'x' property is a number and may be specified as: + - An int or float + + Returns + ------- + int|float + """ + return self["x"] + + @x.setter + def x(self, val): + self["x"] = val + + @property + def xanchor(self): + """ + Sets this color bar's horizontal position anchor. This anchor + binds the `x` position to the "left", "center" or "right" of + the color bar. Defaults to "left" when `orientation` is "v" and + "center" when `orientation` is "h". + + The 'xanchor' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['left', 'center', 'right'] + + Returns + ------- + Any + """ + return self["xanchor"] + + @xanchor.setter + def xanchor(self, val): + self["xanchor"] = val + + @property + def xpad(self): + """ + Sets the amount of padding (in px) along the x direction. + + The 'xpad' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["xpad"] + + @xpad.setter + def xpad(self, val): + self["xpad"] = val + + @property + def xref(self): + """ + Sets the container `x` refers to. "container" spans the entire + `width` of the plot. "paper" refers to the width of the + plotting area only. + + The 'xref' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['container', 'paper'] + + Returns + ------- + Any + """ + return self["xref"] + + @xref.setter + def xref(self, val): + self["xref"] = val + + @property + def y(self): + """ + Sets the y position with respect to `yref` of the color bar (in + plot fraction). When `yref` is "paper", defaults to 0.5 when + `orientation` is "v" and 1.02 when `orientation` is "h". When + `yref` is "container", defaults to 0.5 when `orientation` is + "v" and 1 when `orientation` is "h". Must be between 0 and 1 if + `yref` is "container" and between "-2" and 3 if `yref` is + "paper". + + The 'y' property is a number and may be specified as: + - An int or float + + Returns + ------- + int|float + """ + return self["y"] + + @y.setter + def y(self, val): + self["y"] = val + + @property + def yanchor(self): + """ + Sets this color bar's vertical position anchor This anchor + binds the `y` position to the "top", "middle" or "bottom" of + the color bar. Defaults to "middle" when `orientation` is "v" + and "bottom" when `orientation` is "h". + + The 'yanchor' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['top', 'middle', 'bottom'] + + Returns + ------- + Any + """ + return self["yanchor"] + + @yanchor.setter + def yanchor(self, val): + self["yanchor"] = val + + @property + def ypad(self): + """ + Sets the amount of padding (in px) along the y direction. + + The 'ypad' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["ypad"] + + @ypad.setter + def ypad(self, val): + self["ypad"] = val + + @property + def yref(self): + """ + Sets the container `y` refers to. "container" spans the entire + `height` of the plot. "paper" refers to the height of the + plotting area only. + + The 'yref' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['container', 'paper'] + + Returns + ------- + Any + """ + return self["yref"] + + @yref.setter + def yref(self, val): + self["yref"] = val + + @property + def _prop_descriptions(self): + return """\ + bgcolor + Sets the color of padded area. + bordercolor + Sets the axis line color. + borderwidth + Sets the width (in px) or the border enclosing this + color bar. + dtick + Sets the step in-between ticks on this axis. Use with + `tick0`. Must be a positive number, or special strings + available to "log" and "date" axes. If the axis `type` + is "log", then ticks are set every 10^(n*dtick) where n + is the tick number. For example, to set a tick mark at + 1, 10, 100, 1000, ... set dtick to 1. To set tick marks + at 1, 100, 10000, ... set dtick to 2. To set tick marks + at 1, 5, 25, 125, 625, 3125, ... set dtick to + log_10(5), or 0.69897000433. "log" has several special + values; "L", where `f` is a positive number, gives + ticks linearly spaced in value (but not position). For + example `tick0` = 0.1, `dtick` = "L0.5" will put ticks + at 0.1, 0.6, 1.1, 1.6 etc. To show powers of 10 plus + small digits between, use "D1" (all digits) or "D2" + (only 2 and 5). `tick0` is ignored for "D1" and "D2". + If the axis `type` is "date", then you must convert the + time to milliseconds. For example, to set the interval + between ticks to one day, set `dtick` to 86400000.0. + "date" also has special values "M" gives ticks + spaced by a number of months. `n` must be a positive + integer. To set ticks on the 15th of every third month, + set `tick0` to "2000-01-15" and `dtick` to "M3". To set + ticks every 4 years, set `dtick` to "M48" + exponentformat + Determines a formatting rule for the tick exponents. + For example, consider the number 1,000,000,000. If + "none", it appears as 1,000,000,000. If "e", 1e+9. If + "E", 1E+9. If "power", 1x10^9 (with 9 in a super + script). If "SI", 1G. If "B", 1B. "SI" uses prefixes + from "femto" f (10^-15) to "tera" T (10^12). *SI + extended* covers instead the full SI range from + "quecto" q (10^-30) to "quetta" Q (10^30). If "SI" or + *SI extended* is used and the exponent is beyond the + above ranges, the formatting rule will automatically be + switched to the power notation. + labelalias + Replacement text for specific tick or hover labels. For + example using {US: 'USA', CA: 'Canada'} changes US to + USA and CA to Canada. The labels we would have shown + must match the keys exactly, after adding any + tickprefix or ticksuffix. For negative numbers the + minus sign symbol used (U+2212) is wider than the + regular ascii dash. That means you need to use −1 + instead of -1. labelalias can be used with any axis + type, and both keys (if needed) and values (if desired) + can include html-like tags or MathJax. + len + Sets the length of the color bar This measure excludes + the padding of both ends. That is, the color bar length + is this length minus the padding on both ends. + lenmode + Determines whether this color bar's length (i.e. the + measure in the color variation direction) is set in + units of plot "fraction" or in *pixels. Use `len` to + set the value. + minexponent + Hide SI prefix for 10^n if |n| is below this number. + This only has an effect when `tickformat` is "SI" or + "B". + nticks + Specifies the maximum number of ticks for the + particular axis. The actual number of ticks will be + chosen automatically to be less than or equal to + `nticks`. Has an effect only if `tickmode` is set to + "auto". + orientation + Sets the orientation of the colorbar. + outlinecolor + Sets the axis line color. + outlinewidth + Sets the width (in px) of the axis line. + separatethousands + If "true", even 4-digit integers are separated + showexponent + If "all", all exponents are shown besides their + significands. If "first", only the exponent of the + first tick is shown. If "last", only the exponent of + the last tick is shown. If "none", no exponents appear. + showticklabels + Determines whether or not the tick labels are drawn. + showtickprefix + If "all", all tick labels are displayed with a prefix. + If "first", only the first tick is displayed with a + prefix. If "last", only the last tick is displayed with + a suffix. If "none", tick prefixes are hidden. + showticksuffix + Same as `showtickprefix` but for tick suffixes. + thickness + Sets the thickness of the color bar This measure + excludes the size of the padding, ticks and labels. + thicknessmode + Determines whether this color bar's thickness (i.e. the + measure in the constant color direction) is set in + units of plot "fraction" or in "pixels". Use + `thickness` to set the value. + tick0 + Sets the placement of the first tick on this axis. Use + with `dtick`. If the axis `type` is "log", then you + must take the log of your starting tick (e.g. to set + the starting tick to 100, set the `tick0` to 2) except + when `dtick`=*L* (see `dtick` for more info). If the + axis `type` is "date", it should be a date string, like + date data. If the axis `type` is "category", it should + be a number, using the scale where each category is + assigned a serial number from zero in the order it + appears. + tickangle + Sets the angle of the tick labels with respect to the + horizontal. For example, a `tickangle` of -90 draws the + tick labels vertically. + tickcolor + Sets the tick color. + tickfont + Sets the color bar's tick label font + tickformat + Sets the tick label formatting rule using d3 formatting + mini-languages which are very similar to those in + Python. For numbers, see: + https://github.com/d3/d3-format/tree/v1.4.5#d3-format. + And for dates see: https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format. We add two items to + d3's date formatter: "%h" for half of the year as a + decimal number as well as "%{n}f" for fractional + seconds with n digits. For example, *2016-10-13 + 09:15:23.456* with tickformat "%H~%M~%S.%2f" would + display "09~15~23.46" + tickformatstops + A tuple of :class:`plotly.graph_objects.contour.colorba + r.Tickformatstop` instances or dicts with compatible + properties + tickformatstopdefaults + When used in a template (as layout.template.data.contou + r.colorbar.tickformatstopdefaults), sets the default + property values to use for elements of + contour.colorbar.tickformatstops + ticklabeloverflow + Determines how we handle tick labels that would + overflow either the graph div or the domain of the + axis. The default value for inside tick labels is *hide + past domain*. In other cases the default is *hide past + div*. + ticklabelposition + Determines where tick labels are drawn relative to the + ticks. Left and right options are used when + `orientation` is "h", top and bottom when `orientation` + is "v". + ticklabelstep + Sets the spacing between tick labels as compared to the + spacing between ticks. A value of 1 (default) means + each tick gets a label. A value of 2 means shows every + 2nd label. A larger value n means only every nth tick + is labeled. `tick0` determines which labels are shown. + Not implemented for axes with `type` "log" or + "multicategory", or when `tickmode` is "array". + ticklen + Sets the tick length (in px). + tickmode + Sets the tick mode for this axis. If "auto", the number + of ticks is set via `nticks`. If "linear", the + placement of the ticks is determined by a starting + position `tick0` and a tick step `dtick` ("linear" is + the default value if `tick0` and `dtick` are provided). + If "array", the placement of the ticks is set via + `tickvals` and the tick text is `ticktext`. ("array" is + the default value if `tickvals` is provided). + tickprefix + Sets a tick label prefix. + ticks + Determines whether ticks are drawn or not. If "", this + axis' ticks are not drawn. If "outside" ("inside"), + this axis' are drawn outside (inside) the axis lines. + ticksuffix + Sets a tick label suffix. + ticktext + Sets the text displayed at the ticks position via + `tickvals`. Only has an effect if `tickmode` is set to + "array". Used with `tickvals`. + ticktextsrc + Sets the source reference on Chart Studio Cloud for + `ticktext`. + tickvals + Sets the values at which ticks on this axis appear. + Only has an effect if `tickmode` is set to "array". + Used with `ticktext`. + tickvalssrc + Sets the source reference on Chart Studio Cloud for + `tickvals`. + tickwidth + Sets the tick width (in px). + title + :class:`plotly.graph_objects.contour.colorbar.Title` + instance or dict with compatible properties + x + Sets the x position with respect to `xref` of the color + bar (in plot fraction). When `xref` is "paper", + defaults to 1.02 when `orientation` is "v" and 0.5 when + `orientation` is "h". When `xref` is "container", + defaults to 1 when `orientation` is "v" and 0.5 when + `orientation` is "h". Must be between 0 and 1 if `xref` + is "container" and between "-2" and 3 if `xref` is + "paper". + xanchor + Sets this color bar's horizontal position anchor. This + anchor binds the `x` position to the "left", "center" + or "right" of the color bar. Defaults to "left" when + `orientation` is "v" and "center" when `orientation` is + "h". + xpad + Sets the amount of padding (in px) along the x + direction. + xref + Sets the container `x` refers to. "container" spans the + entire `width` of the plot. "paper" refers to the width + of the plotting area only. + y + Sets the y position with respect to `yref` of the color + bar (in plot fraction). When `yref` is "paper", + defaults to 0.5 when `orientation` is "v" and 1.02 when + `orientation` is "h". When `yref` is "container", + defaults to 0.5 when `orientation` is "v" and 1 when + `orientation` is "h". Must be between 0 and 1 if `yref` + is "container" and between "-2" and 3 if `yref` is + "paper". + yanchor + Sets this color bar's vertical position anchor This + anchor binds the `y` position to the "top", "middle" or + "bottom" of the color bar. Defaults to "middle" when + `orientation` is "v" and "bottom" when `orientation` is + "h". + ypad + Sets the amount of padding (in px) along the y + direction. + yref + Sets the container `y` refers to. "container" spans the + entire `height` of the plot. "paper" refers to the + height of the plotting area only. + """ + + def __init__( + self, + arg=None, + bgcolor=None, + bordercolor=None, + borderwidth=None, + dtick=None, + exponentformat=None, + labelalias=None, + len=None, + lenmode=None, + minexponent=None, + nticks=None, + orientation=None, + outlinecolor=None, + outlinewidth=None, + separatethousands=None, + showexponent=None, + showticklabels=None, + showtickprefix=None, + showticksuffix=None, + thickness=None, + thicknessmode=None, + tick0=None, + tickangle=None, + tickcolor=None, + tickfont=None, + tickformat=None, + tickformatstops=None, + tickformatstopdefaults=None, + ticklabeloverflow=None, + ticklabelposition=None, + ticklabelstep=None, + ticklen=None, + tickmode=None, + tickprefix=None, + ticks=None, + ticksuffix=None, + ticktext=None, + ticktextsrc=None, + tickvals=None, + tickvalssrc=None, + tickwidth=None, + title=None, + x=None, + xanchor=None, + xpad=None, + xref=None, + y=None, + yanchor=None, + ypad=None, + yref=None, + **kwargs, + ): + """ + Construct a new ColorBar object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.contour.ColorBar` + bgcolor + Sets the color of padded area. + bordercolor + Sets the axis line color. + borderwidth + Sets the width (in px) or the border enclosing this + color bar. + dtick + Sets the step in-between ticks on this axis. Use with + `tick0`. Must be a positive number, or special strings + available to "log" and "date" axes. If the axis `type` + is "log", then ticks are set every 10^(n*dtick) where n + is the tick number. For example, to set a tick mark at + 1, 10, 100, 1000, ... set dtick to 1. To set tick marks + at 1, 100, 10000, ... set dtick to 2. To set tick marks + at 1, 5, 25, 125, 625, 3125, ... set dtick to + log_10(5), or 0.69897000433. "log" has several special + values; "L", where `f` is a positive number, gives + ticks linearly spaced in value (but not position). For + example `tick0` = 0.1, `dtick` = "L0.5" will put ticks + at 0.1, 0.6, 1.1, 1.6 etc. To show powers of 10 plus + small digits between, use "D1" (all digits) or "D2" + (only 2 and 5). `tick0` is ignored for "D1" and "D2". + If the axis `type` is "date", then you must convert the + time to milliseconds. For example, to set the interval + between ticks to one day, set `dtick` to 86400000.0. + "date" also has special values "M" gives ticks + spaced by a number of months. `n` must be a positive + integer. To set ticks on the 15th of every third month, + set `tick0` to "2000-01-15" and `dtick` to "M3". To set + ticks every 4 years, set `dtick` to "M48" + exponentformat + Determines a formatting rule for the tick exponents. + For example, consider the number 1,000,000,000. If + "none", it appears as 1,000,000,000. If "e", 1e+9. If + "E", 1E+9. If "power", 1x10^9 (with 9 in a super + script). If "SI", 1G. If "B", 1B. "SI" uses prefixes + from "femto" f (10^-15) to "tera" T (10^12). *SI + extended* covers instead the full SI range from + "quecto" q (10^-30) to "quetta" Q (10^30). If "SI" or + *SI extended* is used and the exponent is beyond the + above ranges, the formatting rule will automatically be + switched to the power notation. + labelalias + Replacement text for specific tick or hover labels. For + example using {US: 'USA', CA: 'Canada'} changes US to + USA and CA to Canada. The labels we would have shown + must match the keys exactly, after adding any + tickprefix or ticksuffix. For negative numbers the + minus sign symbol used (U+2212) is wider than the + regular ascii dash. That means you need to use −1 + instead of -1. labelalias can be used with any axis + type, and both keys (if needed) and values (if desired) + can include html-like tags or MathJax. + len + Sets the length of the color bar This measure excludes + the padding of both ends. That is, the color bar length + is this length minus the padding on both ends. + lenmode + Determines whether this color bar's length (i.e. the + measure in the color variation direction) is set in + units of plot "fraction" or in *pixels. Use `len` to + set the value. + minexponent + Hide SI prefix for 10^n if |n| is below this number. + This only has an effect when `tickformat` is "SI" or + "B". + nticks + Specifies the maximum number of ticks for the + particular axis. The actual number of ticks will be + chosen automatically to be less than or equal to + `nticks`. Has an effect only if `tickmode` is set to + "auto". + orientation + Sets the orientation of the colorbar. + outlinecolor + Sets the axis line color. + outlinewidth + Sets the width (in px) of the axis line. + separatethousands + If "true", even 4-digit integers are separated + showexponent + If "all", all exponents are shown besides their + significands. If "first", only the exponent of the + first tick is shown. If "last", only the exponent of + the last tick is shown. If "none", no exponents appear. + showticklabels + Determines whether or not the tick labels are drawn. + showtickprefix + If "all", all tick labels are displayed with a prefix. + If "first", only the first tick is displayed with a + prefix. If "last", only the last tick is displayed with + a suffix. If "none", tick prefixes are hidden. + showticksuffix + Same as `showtickprefix` but for tick suffixes. + thickness + Sets the thickness of the color bar This measure + excludes the size of the padding, ticks and labels. + thicknessmode + Determines whether this color bar's thickness (i.e. the + measure in the constant color direction) is set in + units of plot "fraction" or in "pixels". Use + `thickness` to set the value. + tick0 + Sets the placement of the first tick on this axis. Use + with `dtick`. If the axis `type` is "log", then you + must take the log of your starting tick (e.g. to set + the starting tick to 100, set the `tick0` to 2) except + when `dtick`=*L* (see `dtick` for more info). If the + axis `type` is "date", it should be a date string, like + date data. If the axis `type` is "category", it should + be a number, using the scale where each category is + assigned a serial number from zero in the order it + appears. + tickangle + Sets the angle of the tick labels with respect to the + horizontal. For example, a `tickangle` of -90 draws the + tick labels vertically. + tickcolor + Sets the tick color. + tickfont + Sets the color bar's tick label font + tickformat + Sets the tick label formatting rule using d3 formatting + mini-languages which are very similar to those in + Python. For numbers, see: + https://github.com/d3/d3-format/tree/v1.4.5#d3-format. + And for dates see: https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format. We add two items to + d3's date formatter: "%h" for half of the year as a + decimal number as well as "%{n}f" for fractional + seconds with n digits. For example, *2016-10-13 + 09:15:23.456* with tickformat "%H~%M~%S.%2f" would + display "09~15~23.46" + tickformatstops + A tuple of :class:`plotly.graph_objects.contour.colorba + r.Tickformatstop` instances or dicts with compatible + properties + tickformatstopdefaults + When used in a template (as layout.template.data.contou + r.colorbar.tickformatstopdefaults), sets the default + property values to use for elements of + contour.colorbar.tickformatstops + ticklabeloverflow + Determines how we handle tick labels that would + overflow either the graph div or the domain of the + axis. The default value for inside tick labels is *hide + past domain*. In other cases the default is *hide past + div*. + ticklabelposition + Determines where tick labels are drawn relative to the + ticks. Left and right options are used when + `orientation` is "h", top and bottom when `orientation` + is "v". + ticklabelstep + Sets the spacing between tick labels as compared to the + spacing between ticks. A value of 1 (default) means + each tick gets a label. A value of 2 means shows every + 2nd label. A larger value n means only every nth tick + is labeled. `tick0` determines which labels are shown. + Not implemented for axes with `type` "log" or + "multicategory", or when `tickmode` is "array". + ticklen + Sets the tick length (in px). + tickmode + Sets the tick mode for this axis. If "auto", the number + of ticks is set via `nticks`. If "linear", the + placement of the ticks is determined by a starting + position `tick0` and a tick step `dtick` ("linear" is + the default value if `tick0` and `dtick` are provided). + If "array", the placement of the ticks is set via + `tickvals` and the tick text is `ticktext`. ("array" is + the default value if `tickvals` is provided). + tickprefix + Sets a tick label prefix. + ticks + Determines whether ticks are drawn or not. If "", this + axis' ticks are not drawn. If "outside" ("inside"), + this axis' are drawn outside (inside) the axis lines. + ticksuffix + Sets a tick label suffix. + ticktext + Sets the text displayed at the ticks position via + `tickvals`. Only has an effect if `tickmode` is set to + "array". Used with `tickvals`. + ticktextsrc + Sets the source reference on Chart Studio Cloud for + `ticktext`. + tickvals + Sets the values at which ticks on this axis appear. + Only has an effect if `tickmode` is set to "array". + Used with `ticktext`. + tickvalssrc + Sets the source reference on Chart Studio Cloud for + `tickvals`. + tickwidth + Sets the tick width (in px). + title + :class:`plotly.graph_objects.contour.colorbar.Title` + instance or dict with compatible properties + x + Sets the x position with respect to `xref` of the color + bar (in plot fraction). When `xref` is "paper", + defaults to 1.02 when `orientation` is "v" and 0.5 when + `orientation` is "h". When `xref` is "container", + defaults to 1 when `orientation` is "v" and 0.5 when + `orientation` is "h". Must be between 0 and 1 if `xref` + is "container" and between "-2" and 3 if `xref` is + "paper". + xanchor + Sets this color bar's horizontal position anchor. This + anchor binds the `x` position to the "left", "center" + or "right" of the color bar. Defaults to "left" when + `orientation` is "v" and "center" when `orientation` is + "h". + xpad + Sets the amount of padding (in px) along the x + direction. + xref + Sets the container `x` refers to. "container" spans the + entire `width` of the plot. "paper" refers to the width + of the plotting area only. + y + Sets the y position with respect to `yref` of the color + bar (in plot fraction). When `yref` is "paper", + defaults to 0.5 when `orientation` is "v" and 1.02 when + `orientation` is "h". When `yref` is "container", + defaults to 0.5 when `orientation` is "v" and 1 when + `orientation` is "h". Must be between 0 and 1 if `yref` + is "container" and between "-2" and 3 if `yref` is + "paper". + yanchor + Sets this color bar's vertical position anchor This + anchor binds the `y` position to the "top", "middle" or + "bottom" of the color bar. Defaults to "middle" when + `orientation` is "v" and "bottom" when `orientation` is + "h". + ypad + Sets the amount of padding (in px) along the y + direction. + yref + Sets the container `y` refers to. "container" spans the + entire `height` of the plot. "paper" refers to the + height of the plotting area only. + + Returns + ------- + ColorBar + """ + super().__init__("colorbar") + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + if arg is None: + arg = {} + elif isinstance(arg, self.__class__): + arg = arg.to_plotly_json() + elif isinstance(arg, dict): + arg = _copy.copy(arg) + else: + raise ValueError("""\ +The first argument to the plotly.graph_objs.contour.ColorBar +constructor must be a dict or +an instance of :class:`plotly.graph_objs.contour.ColorBar`""") + + self._skip_invalid = kwargs.pop("skip_invalid", False) + self._validate = kwargs.pop("_validate", True) + + self._set_property("bgcolor", arg, bgcolor) + self._set_property("bordercolor", arg, bordercolor) + self._set_property("borderwidth", arg, borderwidth) + self._set_property("dtick", arg, dtick) + self._set_property("exponentformat", arg, exponentformat) + self._set_property("labelalias", arg, labelalias) + self._set_property("len", arg, len) + self._set_property("lenmode", arg, lenmode) + self._set_property("minexponent", arg, minexponent) + self._set_property("nticks", arg, nticks) + self._set_property("orientation", arg, orientation) + self._set_property("outlinecolor", arg, outlinecolor) + self._set_property("outlinewidth", arg, outlinewidth) + self._set_property("separatethousands", arg, separatethousands) + self._set_property("showexponent", arg, showexponent) + self._set_property("showticklabels", arg, showticklabels) + self._set_property("showtickprefix", arg, showtickprefix) + self._set_property("showticksuffix", arg, showticksuffix) + self._set_property("thickness", arg, thickness) + self._set_property("thicknessmode", arg, thicknessmode) + self._set_property("tick0", arg, tick0) + self._set_property("tickangle", arg, tickangle) + self._set_property("tickcolor", arg, tickcolor) + self._set_property("tickfont", arg, tickfont) + self._set_property("tickformat", arg, tickformat) + self._set_property("tickformatstops", arg, tickformatstops) + self._set_property("tickformatstopdefaults", arg, tickformatstopdefaults) + self._set_property("ticklabeloverflow", arg, ticklabeloverflow) + self._set_property("ticklabelposition", arg, ticklabelposition) + self._set_property("ticklabelstep", arg, ticklabelstep) + self._set_property("ticklen", arg, ticklen) + self._set_property("tickmode", arg, tickmode) + self._set_property("tickprefix", arg, tickprefix) + self._set_property("ticks", arg, ticks) + self._set_property("ticksuffix", arg, ticksuffix) + self._set_property("ticktext", arg, ticktext) + self._set_property("ticktextsrc", arg, ticktextsrc) + self._set_property("tickvals", arg, tickvals) + self._set_property("tickvalssrc", arg, tickvalssrc) + self._set_property("tickwidth", arg, tickwidth) + self._set_property("title", arg, title) + self._set_property("x", arg, x) + self._set_property("xanchor", arg, xanchor) + self._set_property("xpad", arg, xpad) + self._set_property("xref", arg, xref) + self._set_property("y", arg, y) + self._set_property("yanchor", arg, yanchor) + self._set_property("ypad", arg, ypad) + self._set_property("yref", arg, yref) + self._process_kwargs(**dict(arg, **kwargs)) + self._skip_invalid = False diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/contour/_contours.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/contour/_contours.py new file mode 100644 index 0000000000000000000000000000000000000000..6668dbcc7c261d3a6d058dd5893d2d2f093a45b9 --- /dev/null +++ b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/contour/_contours.py @@ -0,0 +1,436 @@ +# --- THIS FILE IS AUTO-GENERATED --- +# Modifications will be overwitten the next time code generation run. + +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Contours(_BaseTraceHierarchyType): + _parent_path_str = "contour" + _path_str = "contour.contours" + _valid_props = { + "coloring", + "end", + "labelfont", + "labelformat", + "operation", + "showlabels", + "showlines", + "size", + "start", + "type", + "value", + } + + @property + def coloring(self): + """ + Determines the coloring method showing the contour values. If + "fill", coloring is done evenly between each contour level If + "heatmap", a heatmap gradient coloring is applied between each + contour level. If "lines", coloring is done on the contour + lines. If "none", no coloring is applied on this trace. + + The 'coloring' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['fill', 'heatmap', 'lines', 'none'] + + Returns + ------- + Any + """ + return self["coloring"] + + @coloring.setter + def coloring(self, val): + self["coloring"] = val + + @property + def end(self): + """ + Sets the end contour level value. Must be more than + `contours.start` + + The 'end' property is a number and may be specified as: + - An int or float + + Returns + ------- + int|float + """ + return self["end"] + + @end.setter + def end(self, val): + self["end"] = val + + @property + def labelfont(self): + """ + Sets the font used for labeling the contour levels. The default + color comes from the lines, if shown. The default family and + size come from `layout.font`. + + The 'labelfont' property is an instance of Labelfont + that may be specified as: + - An instance of :class:`plotly.graph_objs.contour.contours.Labelfont` + - A dict of string/value properties that will be passed + to the Labelfont constructor + + Returns + ------- + plotly.graph_objs.contour.contours.Labelfont + """ + return self["labelfont"] + + @labelfont.setter + def labelfont(self, val): + self["labelfont"] = val + + @property + def labelformat(self): + """ + Sets the contour label formatting rule using d3 formatting + mini-languages which are very similar to those in Python. For + numbers, see: + https://github.com/d3/d3-format/tree/v1.4.5#d3-format. + + The 'labelformat' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["labelformat"] + + @labelformat.setter + def labelformat(self, val): + self["labelformat"] = val + + @property + def operation(self): + """ + Sets the constraint operation. "=" keeps regions equal to + `value` "<" and "<=" keep regions less than `value` ">" and + ">=" keep regions greater than `value` "[]", "()", "[)", and + "(]" keep regions inside `value[0]` to `value[1]` "][", ")(", + "](", ")[" keep regions outside `value[0]` to value[1]` Open + vs. closed intervals make no difference to constraint display, + but all versions are allowed for consistency with filter + transforms. + + The 'operation' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['=', '<', '>=', '>', '<=', '[]', '()', '[)', '(]', '][', + ')(', '](', ')['] + + Returns + ------- + Any + """ + return self["operation"] + + @operation.setter + def operation(self, val): + self["operation"] = val + + @property + def showlabels(self): + """ + Determines whether to label the contour lines with their + values. + + The 'showlabels' property is a boolean and must be specified as: + - A boolean value: True or False + + Returns + ------- + bool + """ + return self["showlabels"] + + @showlabels.setter + def showlabels(self, val): + self["showlabels"] = val + + @property + def showlines(self): + """ + Determines whether or not the contour lines are drawn. Has an + effect only if `contours.coloring` is set to "fill". + + The 'showlines' property is a boolean and must be specified as: + - A boolean value: True or False + + Returns + ------- + bool + """ + return self["showlines"] + + @showlines.setter + def showlines(self, val): + self["showlines"] = val + + @property + def size(self): + """ + Sets the step between each contour level. Must be positive. + + The 'size' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["size"] + + @size.setter + def size(self, val): + self["size"] = val + + @property + def start(self): + """ + Sets the starting contour level value. Must be less than + `contours.end` + + The 'start' property is a number and may be specified as: + - An int or float + + Returns + ------- + int|float + """ + return self["start"] + + @start.setter + def start(self, val): + self["start"] = val + + @property + def type(self): + """ + If `levels`, the data is represented as a contour plot with + multiple levels displayed. If `constraint`, the data is + represented as constraints with the invalid region shaded as + specified by the `operation` and `value` parameters. + + The 'type' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['levels', 'constraint'] + + Returns + ------- + Any + """ + return self["type"] + + @type.setter + def type(self, val): + self["type"] = val + + @property + def value(self): + """ + Sets the value or values of the constraint boundary. When + `operation` is set to one of the comparison values + (`=,<,>=,>,<=`) "value" is expected to be a number. When + `operation` is set to one of the interval values + (`[],(),[),(],][,)(,](,)[`) "value" is expected to be an array + of two numbers where the first is the lower bound and the + second is the upper bound. + + The 'value' property accepts values of any type + + Returns + ------- + Any + """ + return self["value"] + + @value.setter + def value(self, val): + self["value"] = val + + @property + def _prop_descriptions(self): + return """\ + coloring + Determines the coloring method showing the contour + values. If "fill", coloring is done evenly between each + contour level If "heatmap", a heatmap gradient coloring + is applied between each contour level. If "lines", + coloring is done on the contour lines. If "none", no + coloring is applied on this trace. + end + Sets the end contour level value. Must be more than + `contours.start` + labelfont + Sets the font used for labeling the contour levels. The + default color comes from the lines, if shown. The + default family and size come from `layout.font`. + labelformat + Sets the contour label formatting rule using d3 + formatting mini-languages which are very similar to + those in Python. For numbers, see: + https://github.com/d3/d3-format/tree/v1.4.5#d3-format. + operation + Sets the constraint operation. "=" keeps regions equal + to `value` "<" and "<=" keep regions less than `value` + ">" and ">=" keep regions greater than `value` "[]", + "()", "[)", and "(]" keep regions inside `value[0]` to + `value[1]` "][", ")(", "](", ")[" keep regions outside + `value[0]` to value[1]` Open vs. closed intervals make + no difference to constraint display, but all versions + are allowed for consistency with filter transforms. + showlabels + Determines whether to label the contour lines with + their values. + showlines + Determines whether or not the contour lines are drawn. + Has an effect only if `contours.coloring` is set to + "fill". + size + Sets the step between each contour level. Must be + positive. + start + Sets the starting contour level value. Must be less + than `contours.end` + type + If `levels`, the data is represented as a contour plot + with multiple levels displayed. If `constraint`, the + data is represented as constraints with the invalid + region shaded as specified by the `operation` and + `value` parameters. + value + Sets the value or values of the constraint boundary. + When `operation` is set to one of the comparison values + (`=,<,>=,>,<=`) "value" is expected to be a number. + When `operation` is set to one of the interval values + (`[],(),[),(],][,)(,](,)[`) "value" is expected to be + an array of two numbers where the first is the lower + bound and the second is the upper bound. + """ + + def __init__( + self, + arg=None, + coloring=None, + end=None, + labelfont=None, + labelformat=None, + operation=None, + showlabels=None, + showlines=None, + size=None, + start=None, + type=None, + value=None, + **kwargs, + ): + """ + Construct a new Contours object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.contour.Contours` + coloring + Determines the coloring method showing the contour + values. If "fill", coloring is done evenly between each + contour level If "heatmap", a heatmap gradient coloring + is applied between each contour level. If "lines", + coloring is done on the contour lines. If "none", no + coloring is applied on this trace. + end + Sets the end contour level value. Must be more than + `contours.start` + labelfont + Sets the font used for labeling the contour levels. The + default color comes from the lines, if shown. The + default family and size come from `layout.font`. + labelformat + Sets the contour label formatting rule using d3 + formatting mini-languages which are very similar to + those in Python. For numbers, see: + https://github.com/d3/d3-format/tree/v1.4.5#d3-format. + operation + Sets the constraint operation. "=" keeps regions equal + to `value` "<" and "<=" keep regions less than `value` + ">" and ">=" keep regions greater than `value` "[]", + "()", "[)", and "(]" keep regions inside `value[0]` to + `value[1]` "][", ")(", "](", ")[" keep regions outside + `value[0]` to value[1]` Open vs. closed intervals make + no difference to constraint display, but all versions + are allowed for consistency with filter transforms. + showlabels + Determines whether to label the contour lines with + their values. + showlines + Determines whether or not the contour lines are drawn. + Has an effect only if `contours.coloring` is set to + "fill". + size + Sets the step between each contour level. Must be + positive. + start + Sets the starting contour level value. Must be less + than `contours.end` + type + If `levels`, the data is represented as a contour plot + with multiple levels displayed. If `constraint`, the + data is represented as constraints with the invalid + region shaded as specified by the `operation` and + `value` parameters. + value + Sets the value or values of the constraint boundary. + When `operation` is set to one of the comparison values + (`=,<,>=,>,<=`) "value" is expected to be a number. + When `operation` is set to one of the interval values + (`[],(),[),(],][,)(,](,)[`) "value" is expected to be + an array of two numbers where the first is the lower + bound and the second is the upper bound. + + Returns + ------- + Contours + """ + super().__init__("contours") + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + if arg is None: + arg = {} + elif isinstance(arg, self.__class__): + arg = arg.to_plotly_json() + elif isinstance(arg, dict): + arg = _copy.copy(arg) + else: + raise ValueError("""\ +The first argument to the plotly.graph_objs.contour.Contours +constructor must be a dict or +an instance of :class:`plotly.graph_objs.contour.Contours`""") + + self._skip_invalid = kwargs.pop("skip_invalid", False) + self._validate = kwargs.pop("_validate", True) + + self._set_property("coloring", arg, coloring) + self._set_property("end", arg, end) + self._set_property("labelfont", arg, labelfont) + self._set_property("labelformat", arg, labelformat) + self._set_property("operation", arg, operation) + self._set_property("showlabels", arg, showlabels) + self._set_property("showlines", arg, showlines) + self._set_property("size", arg, size) + self._set_property("start", arg, start) + self._set_property("type", arg, type) + self._set_property("value", arg, value) + self._process_kwargs(**dict(arg, **kwargs)) + self._skip_invalid = False diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/contour/_hoverlabel.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/contour/_hoverlabel.py new file mode 100644 index 0000000000000000000000000000000000000000..7a5d88b7b6c28c48fb5983329a00d5ce90b2e106 --- /dev/null +++ b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/contour/_hoverlabel.py @@ -0,0 +1,366 @@ +# --- THIS FILE IS AUTO-GENERATED --- +# Modifications will be overwitten the next time code generation run. + +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Hoverlabel(_BaseTraceHierarchyType): + _parent_path_str = "contour" + _path_str = "contour.hoverlabel" + _valid_props = { + "align", + "alignsrc", + "bgcolor", + "bgcolorsrc", + "bordercolor", + "bordercolorsrc", + "font", + "namelength", + "namelengthsrc", + "showarrow", + } + + @property + def align(self): + """ + Sets the horizontal alignment of the text content within hover + label box. Has an effect only if the hover label text spans + more two or more lines + + The 'align' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['left', 'right', 'auto'] + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + Any|numpy.ndarray + """ + return self["align"] + + @align.setter + def align(self, val): + self["align"] = val + + @property + def alignsrc(self): + """ + Sets the source reference on Chart Studio Cloud for `align`. + + The 'alignsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["alignsrc"] + + @alignsrc.setter + def alignsrc(self, val): + self["alignsrc"] = val + + @property + def bgcolor(self): + """ + Sets the background color of the hover labels for this trace + + The 'bgcolor' property is a color and may be specified as: + - A hex string (e.g. '#ff0000') + - An rgb/rgba string (e.g. 'rgb(255,0,0)') + - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') + - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') + - A named CSS color: see https://plotly.com/python/css-colors/ for a list + - A list or array of any of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["bgcolor"] + + @bgcolor.setter + def bgcolor(self, val): + self["bgcolor"] = val + + @property + def bgcolorsrc(self): + """ + Sets the source reference on Chart Studio Cloud for `bgcolor`. + + The 'bgcolorsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["bgcolorsrc"] + + @bgcolorsrc.setter + def bgcolorsrc(self, val): + self["bgcolorsrc"] = val + + @property + def bordercolor(self): + """ + Sets the border color of the hover labels for this trace. + + The 'bordercolor' property is a color and may be specified as: + - A hex string (e.g. '#ff0000') + - An rgb/rgba string (e.g. 'rgb(255,0,0)') + - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') + - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') + - A named CSS color: see https://plotly.com/python/css-colors/ for a list + - A list or array of any of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["bordercolor"] + + @bordercolor.setter + def bordercolor(self, val): + self["bordercolor"] = val + + @property + def bordercolorsrc(self): + """ + Sets the source reference on Chart Studio Cloud for + `bordercolor`. + + The 'bordercolorsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["bordercolorsrc"] + + @bordercolorsrc.setter + def bordercolorsrc(self, val): + self["bordercolorsrc"] = val + + @property + def font(self): + """ + Sets the font used in hover labels. + + The 'font' property is an instance of Font + that may be specified as: + - An instance of :class:`plotly.graph_objs.contour.hoverlabel.Font` + - A dict of string/value properties that will be passed + to the Font constructor + + Returns + ------- + plotly.graph_objs.contour.hoverlabel.Font + """ + return self["font"] + + @font.setter + def font(self, val): + self["font"] = val + + @property + def namelength(self): + """ + Sets the default length (in number of characters) of the trace + name in the hover labels for all traces. -1 shows the whole + name regardless of length. 0-3 shows the first 0-3 characters, + and an integer >3 will show the whole name if it is less than + that many characters, but if it is longer, will truncate to + `namelength - 3` characters and add an ellipsis. + + The 'namelength' property is a integer and may be specified as: + - An int (or float that will be cast to an int) + in the interval [-1, 9223372036854775807] + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + int|numpy.ndarray + """ + return self["namelength"] + + @namelength.setter + def namelength(self, val): + self["namelength"] = val + + @property + def namelengthsrc(self): + """ + Sets the source reference on Chart Studio Cloud for + `namelength`. + + The 'namelengthsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["namelengthsrc"] + + @namelengthsrc.setter + def namelengthsrc(self, val): + self["namelengthsrc"] = val + + @property + def showarrow(self): + """ + Sets whether or not to show the hover label arrow/triangle + pointing to the data point. + + The 'showarrow' property is a boolean and must be specified as: + - A boolean value: True or False + + Returns + ------- + bool + """ + return self["showarrow"] + + @showarrow.setter + def showarrow(self, val): + self["showarrow"] = val + + @property + def _prop_descriptions(self): + return """\ + align + Sets the horizontal alignment of the text content + within hover label box. Has an effect only if the hover + label text spans more two or more lines + alignsrc + Sets the source reference on Chart Studio Cloud for + `align`. + bgcolor + Sets the background color of the hover labels for this + trace + bgcolorsrc + Sets the source reference on Chart Studio Cloud for + `bgcolor`. + bordercolor + Sets the border color of the hover labels for this + trace. + bordercolorsrc + Sets the source reference on Chart Studio Cloud for + `bordercolor`. + font + Sets the font used in hover labels. + namelength + Sets the default length (in number of characters) of + the trace name in the hover labels for all traces. -1 + shows the whole name regardless of length. 0-3 shows + the first 0-3 characters, and an integer >3 will show + the whole name if it is less than that many characters, + but if it is longer, will truncate to `namelength - 3` + characters and add an ellipsis. + namelengthsrc + Sets the source reference on Chart Studio Cloud for + `namelength`. + showarrow + Sets whether or not to show the hover label + arrow/triangle pointing to the data point. + """ + + def __init__( + self, + arg=None, + align=None, + alignsrc=None, + bgcolor=None, + bgcolorsrc=None, + bordercolor=None, + bordercolorsrc=None, + font=None, + namelength=None, + namelengthsrc=None, + showarrow=None, + **kwargs, + ): + """ + Construct a new Hoverlabel object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.contour.Hoverlabel` + align + Sets the horizontal alignment of the text content + within hover label box. Has an effect only if the hover + label text spans more two or more lines + alignsrc + Sets the source reference on Chart Studio Cloud for + `align`. + bgcolor + Sets the background color of the hover labels for this + trace + bgcolorsrc + Sets the source reference on Chart Studio Cloud for + `bgcolor`. + bordercolor + Sets the border color of the hover labels for this + trace. + bordercolorsrc + Sets the source reference on Chart Studio Cloud for + `bordercolor`. + font + Sets the font used in hover labels. + namelength + Sets the default length (in number of characters) of + the trace name in the hover labels for all traces. -1 + shows the whole name regardless of length. 0-3 shows + the first 0-3 characters, and an integer >3 will show + the whole name if it is less than that many characters, + but if it is longer, will truncate to `namelength - 3` + characters and add an ellipsis. + namelengthsrc + Sets the source reference on Chart Studio Cloud for + `namelength`. + showarrow + Sets whether or not to show the hover label + arrow/triangle pointing to the data point. + + Returns + ------- + Hoverlabel + """ + super().__init__("hoverlabel") + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + if arg is None: + arg = {} + elif isinstance(arg, self.__class__): + arg = arg.to_plotly_json() + elif isinstance(arg, dict): + arg = _copy.copy(arg) + else: + raise ValueError("""\ +The first argument to the plotly.graph_objs.contour.Hoverlabel +constructor must be a dict or +an instance of :class:`plotly.graph_objs.contour.Hoverlabel`""") + + self._skip_invalid = kwargs.pop("skip_invalid", False) + self._validate = kwargs.pop("_validate", True) + + self._set_property("align", arg, align) + self._set_property("alignsrc", arg, alignsrc) + self._set_property("bgcolor", arg, bgcolor) + self._set_property("bgcolorsrc", arg, bgcolorsrc) + self._set_property("bordercolor", arg, bordercolor) + self._set_property("bordercolorsrc", arg, bordercolorsrc) + self._set_property("font", arg, font) + self._set_property("namelength", arg, namelength) + self._set_property("namelengthsrc", arg, namelengthsrc) + self._set_property("showarrow", arg, showarrow) + self._process_kwargs(**dict(arg, **kwargs)) + self._skip_invalid = False diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/contour/_legendgrouptitle.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/contour/_legendgrouptitle.py new file mode 100644 index 0000000000000000000000000000000000000000..9566a13db0cd096e3b1f9461f89214dbd27ebc5f --- /dev/null +++ b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/contour/_legendgrouptitle.py @@ -0,0 +1,104 @@ +# --- THIS FILE IS AUTO-GENERATED --- +# Modifications will be overwitten the next time code generation run. + +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Legendgrouptitle(_BaseTraceHierarchyType): + _parent_path_str = "contour" + _path_str = "contour.legendgrouptitle" + _valid_props = {"font", "text"} + + @property + def font(self): + """ + Sets this legend group's title font. + + The 'font' property is an instance of Font + that may be specified as: + - An instance of :class:`plotly.graph_objs.contour.legendgrouptitle.Font` + - A dict of string/value properties that will be passed + to the Font constructor + + Returns + ------- + plotly.graph_objs.contour.legendgrouptitle.Font + """ + return self["font"] + + @font.setter + def font(self, val): + self["font"] = val + + @property + def text(self): + """ + Sets the title of the legend group. + + The 'text' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["text"] + + @text.setter + def text(self, val): + self["text"] = val + + @property + def _prop_descriptions(self): + return """\ + font + Sets this legend group's title font. + text + Sets the title of the legend group. + """ + + def __init__(self, arg=None, font=None, text=None, **kwargs): + """ + Construct a new Legendgrouptitle object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.contour.Legendgrouptitle` + font + Sets this legend group's title font. + text + Sets the title of the legend group. + + Returns + ------- + Legendgrouptitle + """ + super().__init__("legendgrouptitle") + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + if arg is None: + arg = {} + elif isinstance(arg, self.__class__): + arg = arg.to_plotly_json() + elif isinstance(arg, dict): + arg = _copy.copy(arg) + else: + raise ValueError("""\ +The first argument to the plotly.graph_objs.contour.Legendgrouptitle +constructor must be a dict or +an instance of :class:`plotly.graph_objs.contour.Legendgrouptitle`""") + + self._skip_invalid = kwargs.pop("skip_invalid", False) + self._validate = kwargs.pop("_validate", True) + + self._set_property("font", arg, font) + self._set_property("text", arg, text) + self._process_kwargs(**dict(arg, **kwargs)) + self._skip_invalid = False diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/contour/_line.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/contour/_line.py new file mode 100644 index 0000000000000000000000000000000000000000..9090ff7ee69ade954d89ed163963795999e2ad7d --- /dev/null +++ b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/contour/_line.py @@ -0,0 +1,175 @@ +# --- THIS FILE IS AUTO-GENERATED --- +# Modifications will be overwitten the next time code generation run. + +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Line(_BaseTraceHierarchyType): + _parent_path_str = "contour" + _path_str = "contour.line" + _valid_props = {"color", "dash", "smoothing", "width"} + + @property + def color(self): + """ + Sets the color of the contour level. Has no effect if + `contours.coloring` is set to "lines". + + The 'color' property is a color and may be specified as: + - A hex string (e.g. '#ff0000') + - An rgb/rgba string (e.g. 'rgb(255,0,0)') + - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') + - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') + - A named CSS color: see https://plotly.com/python/css-colors/ for a list + + Returns + ------- + str + """ + return self["color"] + + @color.setter + def color(self, val): + self["color"] = val + + @property + def dash(self): + """ + Sets the dash style of lines. Set to a dash type string + ("solid", "dot", "dash", "longdash", "dashdot", or + "longdashdot") or a dash length list in px (eg + "5px,10px,2px,2px"). + + The 'dash' property is an enumeration that may be specified as: + - One of the following dash styles: + ['solid', 'dot', 'dash', 'longdash', 'dashdot', 'longdashdot'] + - A string containing a dash length list in pixels or percentages + (e.g. '5px 10px 2px 2px', '5, 10, 2, 2', '10% 20% 40%', etc.) + + Returns + ------- + str + """ + return self["dash"] + + @dash.setter + def dash(self, val): + self["dash"] = val + + @property + def smoothing(self): + """ + Sets the amount of smoothing for the contour lines, where 0 + corresponds to no smoothing. + + The 'smoothing' property is a number and may be specified as: + - An int or float in the interval [0, 1.3] + + Returns + ------- + int|float + """ + return self["smoothing"] + + @smoothing.setter + def smoothing(self, val): + self["smoothing"] = val + + @property + def width(self): + """ + Sets the contour line width in (in px) Defaults to 0.5 when + `contours.type` is "levels". Defaults to 2 when `contour.type` + is "constraint". + + The 'width' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["width"] + + @width.setter + def width(self, val): + self["width"] = val + + @property + def _prop_descriptions(self): + return """\ + color + Sets the color of the contour level. Has no effect if + `contours.coloring` is set to "lines". + dash + Sets the dash style of lines. Set to a dash type string + ("solid", "dot", "dash", "longdash", "dashdot", or + "longdashdot") or a dash length list in px (eg + "5px,10px,2px,2px"). + smoothing + Sets the amount of smoothing for the contour lines, + where 0 corresponds to no smoothing. + width + Sets the contour line width in (in px) Defaults to 0.5 + when `contours.type` is "levels". Defaults to 2 when + `contour.type` is "constraint". + """ + + def __init__( + self, arg=None, color=None, dash=None, smoothing=None, width=None, **kwargs + ): + """ + Construct a new Line object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of :class:`plotly.graph_objs.contour.Line` + color + Sets the color of the contour level. Has no effect if + `contours.coloring` is set to "lines". + dash + Sets the dash style of lines. Set to a dash type string + ("solid", "dot", "dash", "longdash", "dashdot", or + "longdashdot") or a dash length list in px (eg + "5px,10px,2px,2px"). + smoothing + Sets the amount of smoothing for the contour lines, + where 0 corresponds to no smoothing. + width + Sets the contour line width in (in px) Defaults to 0.5 + when `contours.type` is "levels". Defaults to 2 when + `contour.type` is "constraint". + + Returns + ------- + Line + """ + super().__init__("line") + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + if arg is None: + arg = {} + elif isinstance(arg, self.__class__): + arg = arg.to_plotly_json() + elif isinstance(arg, dict): + arg = _copy.copy(arg) + else: + raise ValueError("""\ +The first argument to the plotly.graph_objs.contour.Line +constructor must be a dict or +an instance of :class:`plotly.graph_objs.contour.Line`""") + + self._skip_invalid = kwargs.pop("skip_invalid", False) + self._validate = kwargs.pop("_validate", True) + + self._set_property("color", arg, color) + self._set_property("dash", arg, dash) + self._set_property("smoothing", arg, smoothing) + self._set_property("width", arg, width) + self._process_kwargs(**dict(arg, **kwargs)) + self._skip_invalid = False diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/contour/_stream.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/contour/_stream.py new file mode 100644 index 0000000000000000000000000000000000000000..0fc45b640b5e95c5c19765f450a5d0b019d3a55b --- /dev/null +++ b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/contour/_stream.py @@ -0,0 +1,114 @@ +# --- THIS FILE IS AUTO-GENERATED --- +# Modifications will be overwitten the next time code generation run. + +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Stream(_BaseTraceHierarchyType): + _parent_path_str = "contour" + _path_str = "contour.stream" + _valid_props = {"maxpoints", "token"} + + @property + def maxpoints(self): + """ + Sets the maximum number of points to keep on the plots from an + incoming stream. If `maxpoints` is set to 50, only the newest + 50 points will be displayed on the plot. + + The 'maxpoints' property is a number and may be specified as: + - An int or float in the interval [0, 10000] + + Returns + ------- + int|float + """ + return self["maxpoints"] + + @maxpoints.setter + def maxpoints(self, val): + self["maxpoints"] = val + + @property + def token(self): + """ + The stream id number links a data trace on a plot with a + stream. See https://chart-studio.plotly.com/settings for more + details. + + The 'token' property is a string and must be specified as: + - A non-empty string + + Returns + ------- + str + """ + return self["token"] + + @token.setter + def token(self, val): + self["token"] = val + + @property + def _prop_descriptions(self): + return """\ + maxpoints + Sets the maximum number of points to keep on the plots + from an incoming stream. If `maxpoints` is set to 50, + only the newest 50 points will be displayed on the + plot. + token + The stream id number links a data trace on a plot with + a stream. See https://chart-studio.plotly.com/settings + for more details. + """ + + def __init__(self, arg=None, maxpoints=None, token=None, **kwargs): + """ + Construct a new Stream object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.contour.Stream` + maxpoints + Sets the maximum number of points to keep on the plots + from an incoming stream. If `maxpoints` is set to 50, + only the newest 50 points will be displayed on the + plot. + token + The stream id number links a data trace on a plot with + a stream. See https://chart-studio.plotly.com/settings + for more details. + + Returns + ------- + Stream + """ + super().__init__("stream") + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + if arg is None: + arg = {} + elif isinstance(arg, self.__class__): + arg = arg.to_plotly_json() + elif isinstance(arg, dict): + arg = _copy.copy(arg) + else: + raise ValueError("""\ +The first argument to the plotly.graph_objs.contour.Stream +constructor must be a dict or +an instance of :class:`plotly.graph_objs.contour.Stream`""") + + self._skip_invalid = kwargs.pop("skip_invalid", False) + self._validate = kwargs.pop("_validate", True) + + self._set_property("maxpoints", arg, maxpoints) + self._set_property("token", arg, token) + self._process_kwargs(**dict(arg, **kwargs)) + self._skip_invalid = False diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/contour/_textfont.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/contour/_textfont.py new file mode 100644 index 0000000000000000000000000000000000000000..281f19b23f18f5470619bf5b51ddf1d8be9a2e9a --- /dev/null +++ b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/contour/_textfont.py @@ -0,0 +1,335 @@ +# --- THIS FILE IS AUTO-GENERATED --- +# Modifications will be overwitten the next time code generation run. + +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Textfont(_BaseTraceHierarchyType): + _parent_path_str = "contour" + _path_str = "contour.textfont" + _valid_props = { + "color", + "family", + "lineposition", + "shadow", + "size", + "style", + "textcase", + "variant", + "weight", + } + + @property + def color(self): + """ + The 'color' property is a color and may be specified as: + - A hex string (e.g. '#ff0000') + - An rgb/rgba string (e.g. 'rgb(255,0,0)') + - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') + - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') + - A named CSS color: see https://plotly.com/python/css-colors/ for a list + + Returns + ------- + str + """ + return self["color"] + + @color.setter + def color(self, val): + self["color"] = val + + @property + def family(self): + """ + HTML font family - the typeface that will be applied by the web + browser. The web browser can only apply a font if it is + available on the system where it runs. Provide multiple font + families, separated by commas, to indicate the order in which + to apply fonts if they aren't available. + + The 'family' property is a string and must be specified as: + - A non-empty string + + Returns + ------- + str + """ + return self["family"] + + @family.setter + def family(self, val): + self["family"] = val + + @property + def lineposition(self): + """ + Sets the kind of decoration line(s) with text, such as an + "under", "over" or "through" as well as combinations e.g. + "under+over", etc. + + The 'lineposition' property is a flaglist and may be specified + as a string containing: + - Any combination of ['under', 'over', 'through'] joined with '+' characters + (e.g. 'under+over') + OR exactly one of ['none'] (e.g. 'none') + + Returns + ------- + Any + """ + return self["lineposition"] + + @lineposition.setter + def lineposition(self, val): + self["lineposition"] = val + + @property + def shadow(self): + """ + Sets the shape and color of the shadow behind text. "auto" + places minimal shadow and applies contrast text font color. See + https://developer.mozilla.org/en-US/docs/Web/CSS/text-shadow + for additional options. + + The 'shadow' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["shadow"] + + @shadow.setter + def shadow(self, val): + self["shadow"] = val + + @property + def size(self): + """ + The 'size' property is a number and may be specified as: + - An int or float in the interval [1, inf] + + Returns + ------- + int|float + """ + return self["size"] + + @size.setter + def size(self, val): + self["size"] = val + + @property + def style(self): + """ + Sets whether a font should be styled with a normal or italic + face from its family. + + The 'style' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['normal', 'italic'] + + Returns + ------- + Any + """ + return self["style"] + + @style.setter + def style(self, val): + self["style"] = val + + @property + def textcase(self): + """ + Sets capitalization of text. It can be used to make text appear + in all-uppercase or all-lowercase, or with each word + capitalized. + + The 'textcase' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['normal', 'word caps', 'upper', 'lower'] + + Returns + ------- + Any + """ + return self["textcase"] + + @textcase.setter + def textcase(self, val): + self["textcase"] = val + + @property + def variant(self): + """ + Sets the variant of the font. + + The 'variant' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['normal', 'small-caps', 'all-small-caps', + 'all-petite-caps', 'petite-caps', 'unicase'] + + Returns + ------- + Any + """ + return self["variant"] + + @variant.setter + def variant(self, val): + self["variant"] = val + + @property + def weight(self): + """ + Sets the weight (or boldness) of the font. + + The 'weight' property is a integer and may be specified as: + - An int (or float that will be cast to an int) + in the interval [1, 1000] + OR exactly one of ['normal', 'bold'] (e.g. 'bold') + + Returns + ------- + int + """ + return self["weight"] + + @weight.setter + def weight(self, val): + self["weight"] = val + + @property + def _prop_descriptions(self): + return """\ + color + + family + HTML font family - the typeface that will be applied by + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. + lineposition + Sets the kind of decoration line(s) with text, such as + an "under", "over" or "through" as well as combinations + e.g. "under+over", etc. + shadow + Sets the shape and color of the shadow behind text. + "auto" places minimal shadow and applies contrast text + font color. See https://developer.mozilla.org/en- + US/docs/Web/CSS/text-shadow for additional options. + size + + style + Sets whether a font should be styled with a normal or + italic face from its family. + textcase + Sets capitalization of text. It can be used to make + text appear in all-uppercase or all-lowercase, or with + each word capitalized. + variant + Sets the variant of the font. + weight + Sets the weight (or boldness) of the font. + """ + + def __init__( + self, + arg=None, + color=None, + family=None, + lineposition=None, + shadow=None, + size=None, + style=None, + textcase=None, + variant=None, + weight=None, + **kwargs, + ): + """ + Construct a new Textfont object + + For this trace it only has an effect if `coloring` is set to + "heatmap". Sets the text font. + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.contour.Textfont` + color + + family + HTML font family - the typeface that will be applied by + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. + lineposition + Sets the kind of decoration line(s) with text, such as + an "under", "over" or "through" as well as combinations + e.g. "under+over", etc. + shadow + Sets the shape and color of the shadow behind text. + "auto" places minimal shadow and applies contrast text + font color. See https://developer.mozilla.org/en- + US/docs/Web/CSS/text-shadow for additional options. + size + + style + Sets whether a font should be styled with a normal or + italic face from its family. + textcase + Sets capitalization of text. It can be used to make + text appear in all-uppercase or all-lowercase, or with + each word capitalized. + variant + Sets the variant of the font. + weight + Sets the weight (or boldness) of the font. + + Returns + ------- + Textfont + """ + super().__init__("textfont") + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + if arg is None: + arg = {} + elif isinstance(arg, self.__class__): + arg = arg.to_plotly_json() + elif isinstance(arg, dict): + arg = _copy.copy(arg) + else: + raise ValueError("""\ +The first argument to the plotly.graph_objs.contour.Textfont +constructor must be a dict or +an instance of :class:`plotly.graph_objs.contour.Textfont`""") + + self._skip_invalid = kwargs.pop("skip_invalid", False) + self._validate = kwargs.pop("_validate", True) + + self._set_property("color", arg, color) + self._set_property("family", arg, family) + self._set_property("lineposition", arg, lineposition) + self._set_property("shadow", arg, shadow) + self._set_property("size", arg, size) + self._set_property("style", arg, style) + self._set_property("textcase", arg, textcase) + self._set_property("variant", arg, variant) + self._set_property("weight", arg, weight) + self._process_kwargs(**dict(arg, **kwargs)) + self._skip_invalid = False diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/contour/colorbar/.___init__.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/contour/colorbar/.___init__.py new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/contour/colorbar/.___init__.py differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/contour/colorbar/.___pycache__ b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/contour/colorbar/.___pycache__ new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/contour/colorbar/.___pycache__ differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/contour/colorbar/.__tickfont.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/contour/colorbar/.__tickfont.py new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/contour/colorbar/.__tickfont.py differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/contour/colorbar/.__tickformatstop.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/contour/colorbar/.__tickformatstop.py new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/contour/colorbar/.__tickformatstop.py differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/contour/colorbar/.__title.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/contour/colorbar/.__title.py new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/contour/colorbar/.__title.py differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/contour/colorbar/._title b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/contour/colorbar/._title new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/contour/colorbar/._title differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/contour/colorbar/__init__.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/contour/colorbar/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..4690d3cc738a44d43a04d43d3aa0be36d7cd34e2 --- /dev/null +++ b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/contour/colorbar/__init__.py @@ -0,0 +1,16 @@ +import sys +from typing import TYPE_CHECKING + +if TYPE_CHECKING: + from ._tickfont import Tickfont + from ._tickformatstop import Tickformatstop + from ._title import Title + from . import title +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [".title"], + ["._tickfont.Tickfont", "._tickformatstop.Tickformatstop", "._title.Title"], + ) diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/contour/colorbar/_tickfont.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/contour/colorbar/_tickfont.py new file mode 100644 index 0000000000000000000000000000000000000000..5d83a6417b17ac7bacc3716a4a771abb89037a69 --- /dev/null +++ b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/contour/colorbar/_tickfont.py @@ -0,0 +1,334 @@ +# --- THIS FILE IS AUTO-GENERATED --- +# Modifications will be overwitten the next time code generation run. + +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Tickfont(_BaseTraceHierarchyType): + _parent_path_str = "contour.colorbar" + _path_str = "contour.colorbar.tickfont" + _valid_props = { + "color", + "family", + "lineposition", + "shadow", + "size", + "style", + "textcase", + "variant", + "weight", + } + + @property + def color(self): + """ + The 'color' property is a color and may be specified as: + - A hex string (e.g. '#ff0000') + - An rgb/rgba string (e.g. 'rgb(255,0,0)') + - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') + - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') + - A named CSS color: see https://plotly.com/python/css-colors/ for a list + + Returns + ------- + str + """ + return self["color"] + + @color.setter + def color(self, val): + self["color"] = val + + @property + def family(self): + """ + HTML font family - the typeface that will be applied by the web + browser. The web browser can only apply a font if it is + available on the system where it runs. Provide multiple font + families, separated by commas, to indicate the order in which + to apply fonts if they aren't available. + + The 'family' property is a string and must be specified as: + - A non-empty string + + Returns + ------- + str + """ + return self["family"] + + @family.setter + def family(self, val): + self["family"] = val + + @property + def lineposition(self): + """ + Sets the kind of decoration line(s) with text, such as an + "under", "over" or "through" as well as combinations e.g. + "under+over", etc. + + The 'lineposition' property is a flaglist and may be specified + as a string containing: + - Any combination of ['under', 'over', 'through'] joined with '+' characters + (e.g. 'under+over') + OR exactly one of ['none'] (e.g. 'none') + + Returns + ------- + Any + """ + return self["lineposition"] + + @lineposition.setter + def lineposition(self, val): + self["lineposition"] = val + + @property + def shadow(self): + """ + Sets the shape and color of the shadow behind text. "auto" + places minimal shadow and applies contrast text font color. See + https://developer.mozilla.org/en-US/docs/Web/CSS/text-shadow + for additional options. + + The 'shadow' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["shadow"] + + @shadow.setter + def shadow(self, val): + self["shadow"] = val + + @property + def size(self): + """ + The 'size' property is a number and may be specified as: + - An int or float in the interval [1, inf] + + Returns + ------- + int|float + """ + return self["size"] + + @size.setter + def size(self, val): + self["size"] = val + + @property + def style(self): + """ + Sets whether a font should be styled with a normal or italic + face from its family. + + The 'style' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['normal', 'italic'] + + Returns + ------- + Any + """ + return self["style"] + + @style.setter + def style(self, val): + self["style"] = val + + @property + def textcase(self): + """ + Sets capitalization of text. It can be used to make text appear + in all-uppercase or all-lowercase, or with each word + capitalized. + + The 'textcase' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['normal', 'word caps', 'upper', 'lower'] + + Returns + ------- + Any + """ + return self["textcase"] + + @textcase.setter + def textcase(self, val): + self["textcase"] = val + + @property + def variant(self): + """ + Sets the variant of the font. + + The 'variant' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['normal', 'small-caps', 'all-small-caps', + 'all-petite-caps', 'petite-caps', 'unicase'] + + Returns + ------- + Any + """ + return self["variant"] + + @variant.setter + def variant(self, val): + self["variant"] = val + + @property + def weight(self): + """ + Sets the weight (or boldness) of the font. + + The 'weight' property is a integer and may be specified as: + - An int (or float that will be cast to an int) + in the interval [1, 1000] + OR exactly one of ['normal', 'bold'] (e.g. 'bold') + + Returns + ------- + int + """ + return self["weight"] + + @weight.setter + def weight(self, val): + self["weight"] = val + + @property + def _prop_descriptions(self): + return """\ + color + + family + HTML font family - the typeface that will be applied by + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. + lineposition + Sets the kind of decoration line(s) with text, such as + an "under", "over" or "through" as well as combinations + e.g. "under+over", etc. + shadow + Sets the shape and color of the shadow behind text. + "auto" places minimal shadow and applies contrast text + font color. See https://developer.mozilla.org/en- + US/docs/Web/CSS/text-shadow for additional options. + size + + style + Sets whether a font should be styled with a normal or + italic face from its family. + textcase + Sets capitalization of text. It can be used to make + text appear in all-uppercase or all-lowercase, or with + each word capitalized. + variant + Sets the variant of the font. + weight + Sets the weight (or boldness) of the font. + """ + + def __init__( + self, + arg=None, + color=None, + family=None, + lineposition=None, + shadow=None, + size=None, + style=None, + textcase=None, + variant=None, + weight=None, + **kwargs, + ): + """ + Construct a new Tickfont object + + Sets the color bar's tick label font + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.contour.colorbar.Tickfont` + color + + family + HTML font family - the typeface that will be applied by + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. + lineposition + Sets the kind of decoration line(s) with text, such as + an "under", "over" or "through" as well as combinations + e.g. "under+over", etc. + shadow + Sets the shape and color of the shadow behind text. + "auto" places minimal shadow and applies contrast text + font color. See https://developer.mozilla.org/en- + US/docs/Web/CSS/text-shadow for additional options. + size + + style + Sets whether a font should be styled with a normal or + italic face from its family. + textcase + Sets capitalization of text. It can be used to make + text appear in all-uppercase or all-lowercase, or with + each word capitalized. + variant + Sets the variant of the font. + weight + Sets the weight (or boldness) of the font. + + Returns + ------- + Tickfont + """ + super().__init__("tickfont") + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + if arg is None: + arg = {} + elif isinstance(arg, self.__class__): + arg = arg.to_plotly_json() + elif isinstance(arg, dict): + arg = _copy.copy(arg) + else: + raise ValueError("""\ +The first argument to the plotly.graph_objs.contour.colorbar.Tickfont +constructor must be a dict or +an instance of :class:`plotly.graph_objs.contour.colorbar.Tickfont`""") + + self._skip_invalid = kwargs.pop("skip_invalid", False) + self._validate = kwargs.pop("_validate", True) + + self._set_property("color", arg, color) + self._set_property("family", arg, family) + self._set_property("lineposition", arg, lineposition) + self._set_property("shadow", arg, shadow) + self._set_property("size", arg, size) + self._set_property("style", arg, style) + self._set_property("textcase", arg, textcase) + self._set_property("variant", arg, variant) + self._set_property("weight", arg, weight) + self._process_kwargs(**dict(arg, **kwargs)) + self._skip_invalid = False diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/contour/colorbar/_tickformatstop.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/contour/colorbar/_tickformatstop.py new file mode 100644 index 0000000000000000000000000000000000000000..fdc0599730b61d5ae9a6f47cc7c3c5435f58dc89 --- /dev/null +++ b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/contour/colorbar/_tickformatstop.py @@ -0,0 +1,241 @@ +# --- THIS FILE IS AUTO-GENERATED --- +# Modifications will be overwitten the next time code generation run. + +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Tickformatstop(_BaseTraceHierarchyType): + _parent_path_str = "contour.colorbar" + _path_str = "contour.colorbar.tickformatstop" + _valid_props = {"dtickrange", "enabled", "name", "templateitemname", "value"} + + @property + def dtickrange(self): + """ + range [*min*, *max*], where "min", "max" - dtick values which + describe some zoom level, it is possible to omit "min" or "max" + value by passing "null" + + The 'dtickrange' property is an info array that may be specified as: + + * a list or tuple of 2 elements where: + (0) The 'dtickrange[0]' property accepts values of any type + (1) The 'dtickrange[1]' property accepts values of any type + + Returns + ------- + list + """ + return self["dtickrange"] + + @dtickrange.setter + def dtickrange(self, val): + self["dtickrange"] = val + + @property + def enabled(self): + """ + Determines whether or not this stop is used. If `false`, this + stop is ignored even within its `dtickrange`. + + The 'enabled' property is a boolean and must be specified as: + - A boolean value: True or False + + Returns + ------- + bool + """ + return self["enabled"] + + @enabled.setter + def enabled(self, val): + self["enabled"] = val + + @property + def name(self): + """ + When used in a template, named items are created in the output + figure in addition to any items the figure already has in this + array. You can modify these items in the output figure by + making your own item with `templateitemname` matching this + `name` alongside your modifications (including `visible: false` + or `enabled: false` to hide it). Has no effect outside of a + template. + + The 'name' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["name"] + + @name.setter + def name(self, val): + self["name"] = val + + @property + def templateitemname(self): + """ + Used to refer to a named item in this array in the template. + Named items from the template will be created even without a + matching item in the input figure, but you can modify one by + making an item with `templateitemname` matching its `name`, + alongside your modifications (including `visible: false` or + `enabled: false` to hide it). If there is no template or no + matching item, this item will be hidden unless you explicitly + show it with `visible: true`. + + The 'templateitemname' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["templateitemname"] + + @templateitemname.setter + def templateitemname(self, val): + self["templateitemname"] = val + + @property + def value(self): + """ + string - dtickformat for described zoom level, the same as + "tickformat" + + The 'value' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["value"] + + @value.setter + def value(self, val): + self["value"] = val + + @property + def _prop_descriptions(self): + return """\ + dtickrange + range [*min*, *max*], where "min", "max" - dtick values + which describe some zoom level, it is possible to omit + "min" or "max" value by passing "null" + enabled + Determines whether or not this stop is used. If + `false`, this stop is ignored even within its + `dtickrange`. + name + When used in a template, named items are created in the + output figure in addition to any items the figure + already has in this array. You can modify these items + in the output figure by making your own item with + `templateitemname` matching this `name` alongside your + modifications (including `visible: false` or `enabled: + false` to hide it). Has no effect outside of a + template. + templateitemname + Used to refer to a named item in this array in the + template. Named items from the template will be created + even without a matching item in the input figure, but + you can modify one by making an item with + `templateitemname` matching its `name`, alongside your + modifications (including `visible: false` or `enabled: + false` to hide it). If there is no template or no + matching item, this item will be hidden unless you + explicitly show it with `visible: true`. + value + string - dtickformat for described zoom level, the same + as "tickformat" + """ + + def __init__( + self, + arg=None, + dtickrange=None, + enabled=None, + name=None, + templateitemname=None, + value=None, + **kwargs, + ): + """ + Construct a new Tickformatstop object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of :class:`plotly.graph_objs.contour.colorb + ar.Tickformatstop` + dtickrange + range [*min*, *max*], where "min", "max" - dtick values + which describe some zoom level, it is possible to omit + "min" or "max" value by passing "null" + enabled + Determines whether or not this stop is used. If + `false`, this stop is ignored even within its + `dtickrange`. + name + When used in a template, named items are created in the + output figure in addition to any items the figure + already has in this array. You can modify these items + in the output figure by making your own item with + `templateitemname` matching this `name` alongside your + modifications (including `visible: false` or `enabled: + false` to hide it). Has no effect outside of a + template. + templateitemname + Used to refer to a named item in this array in the + template. Named items from the template will be created + even without a matching item in the input figure, but + you can modify one by making an item with + `templateitemname` matching its `name`, alongside your + modifications (including `visible: false` or `enabled: + false` to hide it). If there is no template or no + matching item, this item will be hidden unless you + explicitly show it with `visible: true`. + value + string - dtickformat for described zoom level, the same + as "tickformat" + + Returns + ------- + Tickformatstop + """ + super().__init__("tickformatstops") + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + if arg is None: + arg = {} + elif isinstance(arg, self.__class__): + arg = arg.to_plotly_json() + elif isinstance(arg, dict): + arg = _copy.copy(arg) + else: + raise ValueError("""\ +The first argument to the plotly.graph_objs.contour.colorbar.Tickformatstop +constructor must be a dict or +an instance of :class:`plotly.graph_objs.contour.colorbar.Tickformatstop`""") + + self._skip_invalid = kwargs.pop("skip_invalid", False) + self._validate = kwargs.pop("_validate", True) + + self._set_property("dtickrange", arg, dtickrange) + self._set_property("enabled", arg, enabled) + self._set_property("name", arg, name) + self._set_property("templateitemname", arg, templateitemname) + self._set_property("value", arg, value) + self._process_kwargs(**dict(arg, **kwargs)) + self._skip_invalid = False diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/contour/colorbar/_title.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/contour/colorbar/_title.py new file mode 100644 index 0000000000000000000000000000000000000000..111d8484db6195cac8cdd679ff9d97b44d21a8ff --- /dev/null +++ b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/contour/colorbar/_title.py @@ -0,0 +1,136 @@ +# --- THIS FILE IS AUTO-GENERATED --- +# Modifications will be overwitten the next time code generation run. + +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Title(_BaseTraceHierarchyType): + _parent_path_str = "contour.colorbar" + _path_str = "contour.colorbar.title" + _valid_props = {"font", "side", "text"} + + @property + def font(self): + """ + Sets this color bar's title font. + + The 'font' property is an instance of Font + that may be specified as: + - An instance of :class:`plotly.graph_objs.contour.colorbar.title.Font` + - A dict of string/value properties that will be passed + to the Font constructor + + Returns + ------- + plotly.graph_objs.contour.colorbar.title.Font + """ + return self["font"] + + @font.setter + def font(self, val): + self["font"] = val + + @property + def side(self): + """ + Determines the location of color bar's title with respect to + the color bar. Defaults to "top" when `orientation` if "v" and + defaults to "right" when `orientation` if "h". + + The 'side' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['right', 'top', 'bottom'] + + Returns + ------- + Any + """ + return self["side"] + + @side.setter + def side(self, val): + self["side"] = val + + @property + def text(self): + """ + Sets the title of the color bar. + + The 'text' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["text"] + + @text.setter + def text(self, val): + self["text"] = val + + @property + def _prop_descriptions(self): + return """\ + font + Sets this color bar's title font. + side + Determines the location of color bar's title with + respect to the color bar. Defaults to "top" when + `orientation` if "v" and defaults to "right" when + `orientation` if "h". + text + Sets the title of the color bar. + """ + + def __init__(self, arg=None, font=None, side=None, text=None, **kwargs): + """ + Construct a new Title object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.contour.colorbar.Title` + font + Sets this color bar's title font. + side + Determines the location of color bar's title with + respect to the color bar. Defaults to "top" when + `orientation` if "v" and defaults to "right" when + `orientation` if "h". + text + Sets the title of the color bar. + + Returns + ------- + Title + """ + super().__init__("title") + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + if arg is None: + arg = {} + elif isinstance(arg, self.__class__): + arg = arg.to_plotly_json() + elif isinstance(arg, dict): + arg = _copy.copy(arg) + else: + raise ValueError("""\ +The first argument to the plotly.graph_objs.contour.colorbar.Title +constructor must be a dict or +an instance of :class:`plotly.graph_objs.contour.colorbar.Title`""") + + self._skip_invalid = kwargs.pop("skip_invalid", False) + self._validate = kwargs.pop("_validate", True) + + self._set_property("font", arg, font) + self._set_property("side", arg, side) + self._set_property("text", arg, text) + self._process_kwargs(**dict(arg, **kwargs)) + self._skip_invalid = False diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/contour/colorbar/title/.___init__.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/contour/colorbar/title/.___init__.py new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/contour/colorbar/title/.___init__.py differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/contour/colorbar/title/.___pycache__ b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/contour/colorbar/title/.___pycache__ new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/contour/colorbar/title/.___pycache__ differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/contour/colorbar/title/.__font.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/contour/colorbar/title/.__font.py new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/contour/colorbar/title/.__font.py differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/contour/colorbar/title/__init__.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/contour/colorbar/title/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..56f600d3458c41f269053307377e9707ab13e090 --- /dev/null +++ b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/contour/colorbar/title/__init__.py @@ -0,0 +1,9 @@ +import sys +from typing import TYPE_CHECKING + +if TYPE_CHECKING: + from ._font import Font +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import(__name__, [], ["._font.Font"]) diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/contour/colorbar/title/_font.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/contour/colorbar/title/_font.py new file mode 100644 index 0000000000000000000000000000000000000000..4d09b4e494e084e730dcfec3f5c90c74d151261a --- /dev/null +++ b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/contour/colorbar/title/_font.py @@ -0,0 +1,334 @@ +# --- THIS FILE IS AUTO-GENERATED --- +# Modifications will be overwitten the next time code generation run. + +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Font(_BaseTraceHierarchyType): + _parent_path_str = "contour.colorbar.title" + _path_str = "contour.colorbar.title.font" + _valid_props = { + "color", + "family", + "lineposition", + "shadow", + "size", + "style", + "textcase", + "variant", + "weight", + } + + @property + def color(self): + """ + The 'color' property is a color and may be specified as: + - A hex string (e.g. '#ff0000') + - An rgb/rgba string (e.g. 'rgb(255,0,0)') + - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') + - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') + - A named CSS color: see https://plotly.com/python/css-colors/ for a list + + Returns + ------- + str + """ + return self["color"] + + @color.setter + def color(self, val): + self["color"] = val + + @property + def family(self): + """ + HTML font family - the typeface that will be applied by the web + browser. The web browser can only apply a font if it is + available on the system where it runs. Provide multiple font + families, separated by commas, to indicate the order in which + to apply fonts if they aren't available. + + The 'family' property is a string and must be specified as: + - A non-empty string + + Returns + ------- + str + """ + return self["family"] + + @family.setter + def family(self, val): + self["family"] = val + + @property + def lineposition(self): + """ + Sets the kind of decoration line(s) with text, such as an + "under", "over" or "through" as well as combinations e.g. + "under+over", etc. + + The 'lineposition' property is a flaglist and may be specified + as a string containing: + - Any combination of ['under', 'over', 'through'] joined with '+' characters + (e.g. 'under+over') + OR exactly one of ['none'] (e.g. 'none') + + Returns + ------- + Any + """ + return self["lineposition"] + + @lineposition.setter + def lineposition(self, val): + self["lineposition"] = val + + @property + def shadow(self): + """ + Sets the shape and color of the shadow behind text. "auto" + places minimal shadow and applies contrast text font color. See + https://developer.mozilla.org/en-US/docs/Web/CSS/text-shadow + for additional options. + + The 'shadow' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["shadow"] + + @shadow.setter + def shadow(self, val): + self["shadow"] = val + + @property + def size(self): + """ + The 'size' property is a number and may be specified as: + - An int or float in the interval [1, inf] + + Returns + ------- + int|float + """ + return self["size"] + + @size.setter + def size(self, val): + self["size"] = val + + @property + def style(self): + """ + Sets whether a font should be styled with a normal or italic + face from its family. + + The 'style' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['normal', 'italic'] + + Returns + ------- + Any + """ + return self["style"] + + @style.setter + def style(self, val): + self["style"] = val + + @property + def textcase(self): + """ + Sets capitalization of text. It can be used to make text appear + in all-uppercase or all-lowercase, or with each word + capitalized. + + The 'textcase' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['normal', 'word caps', 'upper', 'lower'] + + Returns + ------- + Any + """ + return self["textcase"] + + @textcase.setter + def textcase(self, val): + self["textcase"] = val + + @property + def variant(self): + """ + Sets the variant of the font. + + The 'variant' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['normal', 'small-caps', 'all-small-caps', + 'all-petite-caps', 'petite-caps', 'unicase'] + + Returns + ------- + Any + """ + return self["variant"] + + @variant.setter + def variant(self, val): + self["variant"] = val + + @property + def weight(self): + """ + Sets the weight (or boldness) of the font. + + The 'weight' property is a integer and may be specified as: + - An int (or float that will be cast to an int) + in the interval [1, 1000] + OR exactly one of ['normal', 'bold'] (e.g. 'bold') + + Returns + ------- + int + """ + return self["weight"] + + @weight.setter + def weight(self, val): + self["weight"] = val + + @property + def _prop_descriptions(self): + return """\ + color + + family + HTML font family - the typeface that will be applied by + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. + lineposition + Sets the kind of decoration line(s) with text, such as + an "under", "over" or "through" as well as combinations + e.g. "under+over", etc. + shadow + Sets the shape and color of the shadow behind text. + "auto" places minimal shadow and applies contrast text + font color. See https://developer.mozilla.org/en- + US/docs/Web/CSS/text-shadow for additional options. + size + + style + Sets whether a font should be styled with a normal or + italic face from its family. + textcase + Sets capitalization of text. It can be used to make + text appear in all-uppercase or all-lowercase, or with + each word capitalized. + variant + Sets the variant of the font. + weight + Sets the weight (or boldness) of the font. + """ + + def __init__( + self, + arg=None, + color=None, + family=None, + lineposition=None, + shadow=None, + size=None, + style=None, + textcase=None, + variant=None, + weight=None, + **kwargs, + ): + """ + Construct a new Font object + + Sets this color bar's title font. + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.contour.colorbar.title.Font` + color + + family + HTML font family - the typeface that will be applied by + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. + lineposition + Sets the kind of decoration line(s) with text, such as + an "under", "over" or "through" as well as combinations + e.g. "under+over", etc. + shadow + Sets the shape and color of the shadow behind text. + "auto" places minimal shadow and applies contrast text + font color. See https://developer.mozilla.org/en- + US/docs/Web/CSS/text-shadow for additional options. + size + + style + Sets whether a font should be styled with a normal or + italic face from its family. + textcase + Sets capitalization of text. It can be used to make + text appear in all-uppercase or all-lowercase, or with + each word capitalized. + variant + Sets the variant of the font. + weight + Sets the weight (or boldness) of the font. + + Returns + ------- + Font + """ + super().__init__("font") + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + if arg is None: + arg = {} + elif isinstance(arg, self.__class__): + arg = arg.to_plotly_json() + elif isinstance(arg, dict): + arg = _copy.copy(arg) + else: + raise ValueError("""\ +The first argument to the plotly.graph_objs.contour.colorbar.title.Font +constructor must be a dict or +an instance of :class:`plotly.graph_objs.contour.colorbar.title.Font`""") + + self._skip_invalid = kwargs.pop("skip_invalid", False) + self._validate = kwargs.pop("_validate", True) + + self._set_property("color", arg, color) + self._set_property("family", arg, family) + self._set_property("lineposition", arg, lineposition) + self._set_property("shadow", arg, shadow) + self._set_property("size", arg, size) + self._set_property("style", arg, style) + self._set_property("textcase", arg, textcase) + self._set_property("variant", arg, variant) + self._set_property("weight", arg, weight) + self._process_kwargs(**dict(arg, **kwargs)) + self._skip_invalid = False diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/contour/contours/.___init__.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/contour/contours/.___init__.py new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/contour/contours/.___init__.py differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/contour/contours/.___pycache__ b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/contour/contours/.___pycache__ new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/contour/contours/.___pycache__ differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/contour/contours/.__labelfont.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/contour/contours/.__labelfont.py new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/contour/contours/.__labelfont.py differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/contour/contours/__init__.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/contour/contours/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..48d6bb693ba4b0221e76bfec4847f41eb4fc0fd2 --- /dev/null +++ b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/contour/contours/__init__.py @@ -0,0 +1,11 @@ +import sys +from typing import TYPE_CHECKING + +if TYPE_CHECKING: + from ._labelfont import Labelfont +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, [], ["._labelfont.Labelfont"] + ) diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/contour/contours/_labelfont.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/contour/contours/_labelfont.py new file mode 100644 index 0000000000000000000000000000000000000000..da4331751d16dd610e988bfed51c92801a669285 --- /dev/null +++ b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/contour/contours/_labelfont.py @@ -0,0 +1,336 @@ +# --- THIS FILE IS AUTO-GENERATED --- +# Modifications will be overwitten the next time code generation run. + +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Labelfont(_BaseTraceHierarchyType): + _parent_path_str = "contour.contours" + _path_str = "contour.contours.labelfont" + _valid_props = { + "color", + "family", + "lineposition", + "shadow", + "size", + "style", + "textcase", + "variant", + "weight", + } + + @property + def color(self): + """ + The 'color' property is a color and may be specified as: + - A hex string (e.g. '#ff0000') + - An rgb/rgba string (e.g. 'rgb(255,0,0)') + - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') + - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') + - A named CSS color: see https://plotly.com/python/css-colors/ for a list + + Returns + ------- + str + """ + return self["color"] + + @color.setter + def color(self, val): + self["color"] = val + + @property + def family(self): + """ + HTML font family - the typeface that will be applied by the web + browser. The web browser can only apply a font if it is + available on the system where it runs. Provide multiple font + families, separated by commas, to indicate the order in which + to apply fonts if they aren't available. + + The 'family' property is a string and must be specified as: + - A non-empty string + + Returns + ------- + str + """ + return self["family"] + + @family.setter + def family(self, val): + self["family"] = val + + @property + def lineposition(self): + """ + Sets the kind of decoration line(s) with text, such as an + "under", "over" or "through" as well as combinations e.g. + "under+over", etc. + + The 'lineposition' property is a flaglist and may be specified + as a string containing: + - Any combination of ['under', 'over', 'through'] joined with '+' characters + (e.g. 'under+over') + OR exactly one of ['none'] (e.g. 'none') + + Returns + ------- + Any + """ + return self["lineposition"] + + @lineposition.setter + def lineposition(self, val): + self["lineposition"] = val + + @property + def shadow(self): + """ + Sets the shape and color of the shadow behind text. "auto" + places minimal shadow and applies contrast text font color. See + https://developer.mozilla.org/en-US/docs/Web/CSS/text-shadow + for additional options. + + The 'shadow' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["shadow"] + + @shadow.setter + def shadow(self, val): + self["shadow"] = val + + @property + def size(self): + """ + The 'size' property is a number and may be specified as: + - An int or float in the interval [1, inf] + + Returns + ------- + int|float + """ + return self["size"] + + @size.setter + def size(self, val): + self["size"] = val + + @property + def style(self): + """ + Sets whether a font should be styled with a normal or italic + face from its family. + + The 'style' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['normal', 'italic'] + + Returns + ------- + Any + """ + return self["style"] + + @style.setter + def style(self, val): + self["style"] = val + + @property + def textcase(self): + """ + Sets capitalization of text. It can be used to make text appear + in all-uppercase or all-lowercase, or with each word + capitalized. + + The 'textcase' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['normal', 'word caps', 'upper', 'lower'] + + Returns + ------- + Any + """ + return self["textcase"] + + @textcase.setter + def textcase(self, val): + self["textcase"] = val + + @property + def variant(self): + """ + Sets the variant of the font. + + The 'variant' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['normal', 'small-caps', 'all-small-caps', + 'all-petite-caps', 'petite-caps', 'unicase'] + + Returns + ------- + Any + """ + return self["variant"] + + @variant.setter + def variant(self, val): + self["variant"] = val + + @property + def weight(self): + """ + Sets the weight (or boldness) of the font. + + The 'weight' property is a integer and may be specified as: + - An int (or float that will be cast to an int) + in the interval [1, 1000] + OR exactly one of ['normal', 'bold'] (e.g. 'bold') + + Returns + ------- + int + """ + return self["weight"] + + @weight.setter + def weight(self, val): + self["weight"] = val + + @property + def _prop_descriptions(self): + return """\ + color + + family + HTML font family - the typeface that will be applied by + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. + lineposition + Sets the kind of decoration line(s) with text, such as + an "under", "over" or "through" as well as combinations + e.g. "under+over", etc. + shadow + Sets the shape and color of the shadow behind text. + "auto" places minimal shadow and applies contrast text + font color. See https://developer.mozilla.org/en- + US/docs/Web/CSS/text-shadow for additional options. + size + + style + Sets whether a font should be styled with a normal or + italic face from its family. + textcase + Sets capitalization of text. It can be used to make + text appear in all-uppercase or all-lowercase, or with + each word capitalized. + variant + Sets the variant of the font. + weight + Sets the weight (or boldness) of the font. + """ + + def __init__( + self, + arg=None, + color=None, + family=None, + lineposition=None, + shadow=None, + size=None, + style=None, + textcase=None, + variant=None, + weight=None, + **kwargs, + ): + """ + Construct a new Labelfont object + + Sets the font used for labeling the contour levels. The default + color comes from the lines, if shown. The default family and + size come from `layout.font`. + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.contour.contours.Labelfont` + color + + family + HTML font family - the typeface that will be applied by + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. + lineposition + Sets the kind of decoration line(s) with text, such as + an "under", "over" or "through" as well as combinations + e.g. "under+over", etc. + shadow + Sets the shape and color of the shadow behind text. + "auto" places minimal shadow and applies contrast text + font color. See https://developer.mozilla.org/en- + US/docs/Web/CSS/text-shadow for additional options. + size + + style + Sets whether a font should be styled with a normal or + italic face from its family. + textcase + Sets capitalization of text. It can be used to make + text appear in all-uppercase or all-lowercase, or with + each word capitalized. + variant + Sets the variant of the font. + weight + Sets the weight (or boldness) of the font. + + Returns + ------- + Labelfont + """ + super().__init__("labelfont") + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + if arg is None: + arg = {} + elif isinstance(arg, self.__class__): + arg = arg.to_plotly_json() + elif isinstance(arg, dict): + arg = _copy.copy(arg) + else: + raise ValueError("""\ +The first argument to the plotly.graph_objs.contour.contours.Labelfont +constructor must be a dict or +an instance of :class:`plotly.graph_objs.contour.contours.Labelfont`""") + + self._skip_invalid = kwargs.pop("skip_invalid", False) + self._validate = kwargs.pop("_validate", True) + + self._set_property("color", arg, color) + self._set_property("family", arg, family) + self._set_property("lineposition", arg, lineposition) + self._set_property("shadow", arg, shadow) + self._set_property("size", arg, size) + self._set_property("style", arg, style) + self._set_property("textcase", arg, textcase) + self._set_property("variant", arg, variant) + self._set_property("weight", arg, weight) + self._process_kwargs(**dict(arg, **kwargs)) + self._skip_invalid = False diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/contour/hoverlabel/.___init__.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/contour/hoverlabel/.___init__.py new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/contour/hoverlabel/.___init__.py differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/contour/hoverlabel/.___pycache__ b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/contour/hoverlabel/.___pycache__ new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/contour/hoverlabel/.___pycache__ differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/contour/hoverlabel/.__font.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/contour/hoverlabel/.__font.py new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/contour/hoverlabel/.__font.py differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/contour/hoverlabel/__init__.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/contour/hoverlabel/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..56f600d3458c41f269053307377e9707ab13e090 --- /dev/null +++ b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/contour/hoverlabel/__init__.py @@ -0,0 +1,9 @@ +import sys +from typing import TYPE_CHECKING + +if TYPE_CHECKING: + from ._font import Font +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import(__name__, [], ["._font.Font"]) diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/contour/hoverlabel/_font.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/contour/hoverlabel/_font.py new file mode 100644 index 0000000000000000000000000000000000000000..6da93a51f8b1ac8a899871821412ed1f1c876a36 --- /dev/null +++ b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/contour/hoverlabel/_font.py @@ -0,0 +1,587 @@ +# --- THIS FILE IS AUTO-GENERATED --- +# Modifications will be overwitten the next time code generation run. + +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Font(_BaseTraceHierarchyType): + _parent_path_str = "contour.hoverlabel" + _path_str = "contour.hoverlabel.font" + _valid_props = { + "color", + "colorsrc", + "family", + "familysrc", + "lineposition", + "linepositionsrc", + "shadow", + "shadowsrc", + "size", + "sizesrc", + "style", + "stylesrc", + "textcase", + "textcasesrc", + "variant", + "variantsrc", + "weight", + "weightsrc", + } + + @property + def color(self): + """ + The 'color' property is a color and may be specified as: + - A hex string (e.g. '#ff0000') + - An rgb/rgba string (e.g. 'rgb(255,0,0)') + - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') + - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') + - A named CSS color: see https://plotly.com/python/css-colors/ for a list + - A list or array of any of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["color"] + + @color.setter + def color(self, val): + self["color"] = val + + @property + def colorsrc(self): + """ + Sets the source reference on Chart Studio Cloud for `color`. + + The 'colorsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["colorsrc"] + + @colorsrc.setter + def colorsrc(self, val): + self["colorsrc"] = val + + @property + def family(self): + """ + HTML font family - the typeface that will be applied by the web + browser. The web browser can only apply a font if it is + available on the system where it runs. Provide multiple font + families, separated by commas, to indicate the order in which + to apply fonts if they aren't available. + + The 'family' property is a string and must be specified as: + - A non-empty string + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["family"] + + @family.setter + def family(self, val): + self["family"] = val + + @property + def familysrc(self): + """ + Sets the source reference on Chart Studio Cloud for `family`. + + The 'familysrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["familysrc"] + + @familysrc.setter + def familysrc(self, val): + self["familysrc"] = val + + @property + def lineposition(self): + """ + Sets the kind of decoration line(s) with text, such as an + "under", "over" or "through" as well as combinations e.g. + "under+over", etc. + + The 'lineposition' property is a flaglist and may be specified + as a string containing: + - Any combination of ['under', 'over', 'through'] joined with '+' characters + (e.g. 'under+over') + OR exactly one of ['none'] (e.g. 'none') + - A list or array of the above + + Returns + ------- + Any|numpy.ndarray + """ + return self["lineposition"] + + @lineposition.setter + def lineposition(self, val): + self["lineposition"] = val + + @property + def linepositionsrc(self): + """ + Sets the source reference on Chart Studio Cloud for + `lineposition`. + + The 'linepositionsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["linepositionsrc"] + + @linepositionsrc.setter + def linepositionsrc(self, val): + self["linepositionsrc"] = val + + @property + def shadow(self): + """ + Sets the shape and color of the shadow behind text. "auto" + places minimal shadow and applies contrast text font color. See + https://developer.mozilla.org/en-US/docs/Web/CSS/text-shadow + for additional options. + + The 'shadow' property is a string and must be specified as: + - A string + - A number that will be converted to a string + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["shadow"] + + @shadow.setter + def shadow(self, val): + self["shadow"] = val + + @property + def shadowsrc(self): + """ + Sets the source reference on Chart Studio Cloud for `shadow`. + + The 'shadowsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["shadowsrc"] + + @shadowsrc.setter + def shadowsrc(self, val): + self["shadowsrc"] = val + + @property + def size(self): + """ + The 'size' property is a number and may be specified as: + - An int or float in the interval [1, inf] + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + int|float|numpy.ndarray + """ + return self["size"] + + @size.setter + def size(self, val): + self["size"] = val + + @property + def sizesrc(self): + """ + Sets the source reference on Chart Studio Cloud for `size`. + + The 'sizesrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["sizesrc"] + + @sizesrc.setter + def sizesrc(self, val): + self["sizesrc"] = val + + @property + def style(self): + """ + Sets whether a font should be styled with a normal or italic + face from its family. + + The 'style' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['normal', 'italic'] + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + Any|numpy.ndarray + """ + return self["style"] + + @style.setter + def style(self, val): + self["style"] = val + + @property + def stylesrc(self): + """ + Sets the source reference on Chart Studio Cloud for `style`. + + The 'stylesrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["stylesrc"] + + @stylesrc.setter + def stylesrc(self, val): + self["stylesrc"] = val + + @property + def textcase(self): + """ + Sets capitalization of text. It can be used to make text appear + in all-uppercase or all-lowercase, or with each word + capitalized. + + The 'textcase' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['normal', 'word caps', 'upper', 'lower'] + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + Any|numpy.ndarray + """ + return self["textcase"] + + @textcase.setter + def textcase(self, val): + self["textcase"] = val + + @property + def textcasesrc(self): + """ + Sets the source reference on Chart Studio Cloud for `textcase`. + + The 'textcasesrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["textcasesrc"] + + @textcasesrc.setter + def textcasesrc(self, val): + self["textcasesrc"] = val + + @property + def variant(self): + """ + Sets the variant of the font. + + The 'variant' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['normal', 'small-caps', 'all-small-caps', + 'all-petite-caps', 'petite-caps', 'unicase'] + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + Any|numpy.ndarray + """ + return self["variant"] + + @variant.setter + def variant(self, val): + self["variant"] = val + + @property + def variantsrc(self): + """ + Sets the source reference on Chart Studio Cloud for `variant`. + + The 'variantsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["variantsrc"] + + @variantsrc.setter + def variantsrc(self, val): + self["variantsrc"] = val + + @property + def weight(self): + """ + Sets the weight (or boldness) of the font. + + The 'weight' property is a integer and may be specified as: + - An int (or float that will be cast to an int) + in the interval [1, 1000] + OR exactly one of ['normal', 'bold'] (e.g. 'bold') + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + int|numpy.ndarray + """ + return self["weight"] + + @weight.setter + def weight(self, val): + self["weight"] = val + + @property + def weightsrc(self): + """ + Sets the source reference on Chart Studio Cloud for `weight`. + + The 'weightsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["weightsrc"] + + @weightsrc.setter + def weightsrc(self, val): + self["weightsrc"] = val + + @property + def _prop_descriptions(self): + return """\ + color + + colorsrc + Sets the source reference on Chart Studio Cloud for + `color`. + family + HTML font family - the typeface that will be applied by + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. + familysrc + Sets the source reference on Chart Studio Cloud for + `family`. + lineposition + Sets the kind of decoration line(s) with text, such as + an "under", "over" or "through" as well as combinations + e.g. "under+over", etc. + linepositionsrc + Sets the source reference on Chart Studio Cloud for + `lineposition`. + shadow + Sets the shape and color of the shadow behind text. + "auto" places minimal shadow and applies contrast text + font color. See https://developer.mozilla.org/en- + US/docs/Web/CSS/text-shadow for additional options. + shadowsrc + Sets the source reference on Chart Studio Cloud for + `shadow`. + size + + sizesrc + Sets the source reference on Chart Studio Cloud for + `size`. + style + Sets whether a font should be styled with a normal or + italic face from its family. + stylesrc + Sets the source reference on Chart Studio Cloud for + `style`. + textcase + Sets capitalization of text. It can be used to make + text appear in all-uppercase or all-lowercase, or with + each word capitalized. + textcasesrc + Sets the source reference on Chart Studio Cloud for + `textcase`. + variant + Sets the variant of the font. + variantsrc + Sets the source reference on Chart Studio Cloud for + `variant`. + weight + Sets the weight (or boldness) of the font. + weightsrc + Sets the source reference on Chart Studio Cloud for + `weight`. + """ + + def __init__( + self, + arg=None, + color=None, + colorsrc=None, + family=None, + familysrc=None, + lineposition=None, + linepositionsrc=None, + shadow=None, + shadowsrc=None, + size=None, + sizesrc=None, + style=None, + stylesrc=None, + textcase=None, + textcasesrc=None, + variant=None, + variantsrc=None, + weight=None, + weightsrc=None, + **kwargs, + ): + """ + Construct a new Font object + + Sets the font used in hover labels. + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.contour.hoverlabel.Font` + color + + colorsrc + Sets the source reference on Chart Studio Cloud for + `color`. + family + HTML font family - the typeface that will be applied by + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. + familysrc + Sets the source reference on Chart Studio Cloud for + `family`. + lineposition + Sets the kind of decoration line(s) with text, such as + an "under", "over" or "through" as well as combinations + e.g. "under+over", etc. + linepositionsrc + Sets the source reference on Chart Studio Cloud for + `lineposition`. + shadow + Sets the shape and color of the shadow behind text. + "auto" places minimal shadow and applies contrast text + font color. See https://developer.mozilla.org/en- + US/docs/Web/CSS/text-shadow for additional options. + shadowsrc + Sets the source reference on Chart Studio Cloud for + `shadow`. + size + + sizesrc + Sets the source reference on Chart Studio Cloud for + `size`. + style + Sets whether a font should be styled with a normal or + italic face from its family. + stylesrc + Sets the source reference on Chart Studio Cloud for + `style`. + textcase + Sets capitalization of text. It can be used to make + text appear in all-uppercase or all-lowercase, or with + each word capitalized. + textcasesrc + Sets the source reference on Chart Studio Cloud for + `textcase`. + variant + Sets the variant of the font. + variantsrc + Sets the source reference on Chart Studio Cloud for + `variant`. + weight + Sets the weight (or boldness) of the font. + weightsrc + Sets the source reference on Chart Studio Cloud for + `weight`. + + Returns + ------- + Font + """ + super().__init__("font") + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + if arg is None: + arg = {} + elif isinstance(arg, self.__class__): + arg = arg.to_plotly_json() + elif isinstance(arg, dict): + arg = _copy.copy(arg) + else: + raise ValueError("""\ +The first argument to the plotly.graph_objs.contour.hoverlabel.Font +constructor must be a dict or +an instance of :class:`plotly.graph_objs.contour.hoverlabel.Font`""") + + self._skip_invalid = kwargs.pop("skip_invalid", False) + self._validate = kwargs.pop("_validate", True) + + self._set_property("color", arg, color) + self._set_property("colorsrc", arg, colorsrc) + self._set_property("family", arg, family) + self._set_property("familysrc", arg, familysrc) + self._set_property("lineposition", arg, lineposition) + self._set_property("linepositionsrc", arg, linepositionsrc) + self._set_property("shadow", arg, shadow) + self._set_property("shadowsrc", arg, shadowsrc) + self._set_property("size", arg, size) + self._set_property("sizesrc", arg, sizesrc) + self._set_property("style", arg, style) + self._set_property("stylesrc", arg, stylesrc) + self._set_property("textcase", arg, textcase) + self._set_property("textcasesrc", arg, textcasesrc) + self._set_property("variant", arg, variant) + self._set_property("variantsrc", arg, variantsrc) + self._set_property("weight", arg, weight) + self._set_property("weightsrc", arg, weightsrc) + self._process_kwargs(**dict(arg, **kwargs)) + self._skip_invalid = False diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/contour/legendgrouptitle/.___init__.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/contour/legendgrouptitle/.___init__.py new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/contour/legendgrouptitle/.___init__.py differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/contour/legendgrouptitle/.___pycache__ b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/contour/legendgrouptitle/.___pycache__ new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/contour/legendgrouptitle/.___pycache__ differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/contour/legendgrouptitle/.__font.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/contour/legendgrouptitle/.__font.py new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/contour/legendgrouptitle/.__font.py differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/contour/legendgrouptitle/__init__.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/contour/legendgrouptitle/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..56f600d3458c41f269053307377e9707ab13e090 --- /dev/null +++ b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/contour/legendgrouptitle/__init__.py @@ -0,0 +1,9 @@ +import sys +from typing import TYPE_CHECKING + +if TYPE_CHECKING: + from ._font import Font +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import(__name__, [], ["._font.Font"]) diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/contour/legendgrouptitle/_font.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/contour/legendgrouptitle/_font.py new file mode 100644 index 0000000000000000000000000000000000000000..71f970064c219ecff98dd4ed916f314c4ae9af5a --- /dev/null +++ b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/contour/legendgrouptitle/_font.py @@ -0,0 +1,334 @@ +# --- THIS FILE IS AUTO-GENERATED --- +# Modifications will be overwitten the next time code generation run. + +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Font(_BaseTraceHierarchyType): + _parent_path_str = "contour.legendgrouptitle" + _path_str = "contour.legendgrouptitle.font" + _valid_props = { + "color", + "family", + "lineposition", + "shadow", + "size", + "style", + "textcase", + "variant", + "weight", + } + + @property + def color(self): + """ + The 'color' property is a color and may be specified as: + - A hex string (e.g. '#ff0000') + - An rgb/rgba string (e.g. 'rgb(255,0,0)') + - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') + - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') + - A named CSS color: see https://plotly.com/python/css-colors/ for a list + + Returns + ------- + str + """ + return self["color"] + + @color.setter + def color(self, val): + self["color"] = val + + @property + def family(self): + """ + HTML font family - the typeface that will be applied by the web + browser. The web browser can only apply a font if it is + available on the system where it runs. Provide multiple font + families, separated by commas, to indicate the order in which + to apply fonts if they aren't available. + + The 'family' property is a string and must be specified as: + - A non-empty string + + Returns + ------- + str + """ + return self["family"] + + @family.setter + def family(self, val): + self["family"] = val + + @property + def lineposition(self): + """ + Sets the kind of decoration line(s) with text, such as an + "under", "over" or "through" as well as combinations e.g. + "under+over", etc. + + The 'lineposition' property is a flaglist and may be specified + as a string containing: + - Any combination of ['under', 'over', 'through'] joined with '+' characters + (e.g. 'under+over') + OR exactly one of ['none'] (e.g. 'none') + + Returns + ------- + Any + """ + return self["lineposition"] + + @lineposition.setter + def lineposition(self, val): + self["lineposition"] = val + + @property + def shadow(self): + """ + Sets the shape and color of the shadow behind text. "auto" + places minimal shadow and applies contrast text font color. See + https://developer.mozilla.org/en-US/docs/Web/CSS/text-shadow + for additional options. + + The 'shadow' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["shadow"] + + @shadow.setter + def shadow(self, val): + self["shadow"] = val + + @property + def size(self): + """ + The 'size' property is a number and may be specified as: + - An int or float in the interval [1, inf] + + Returns + ------- + int|float + """ + return self["size"] + + @size.setter + def size(self, val): + self["size"] = val + + @property + def style(self): + """ + Sets whether a font should be styled with a normal or italic + face from its family. + + The 'style' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['normal', 'italic'] + + Returns + ------- + Any + """ + return self["style"] + + @style.setter + def style(self, val): + self["style"] = val + + @property + def textcase(self): + """ + Sets capitalization of text. It can be used to make text appear + in all-uppercase or all-lowercase, or with each word + capitalized. + + The 'textcase' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['normal', 'word caps', 'upper', 'lower'] + + Returns + ------- + Any + """ + return self["textcase"] + + @textcase.setter + def textcase(self, val): + self["textcase"] = val + + @property + def variant(self): + """ + Sets the variant of the font. + + The 'variant' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['normal', 'small-caps', 'all-small-caps', + 'all-petite-caps', 'petite-caps', 'unicase'] + + Returns + ------- + Any + """ + return self["variant"] + + @variant.setter + def variant(self, val): + self["variant"] = val + + @property + def weight(self): + """ + Sets the weight (or boldness) of the font. + + The 'weight' property is a integer and may be specified as: + - An int (or float that will be cast to an int) + in the interval [1, 1000] + OR exactly one of ['normal', 'bold'] (e.g. 'bold') + + Returns + ------- + int + """ + return self["weight"] + + @weight.setter + def weight(self, val): + self["weight"] = val + + @property + def _prop_descriptions(self): + return """\ + color + + family + HTML font family - the typeface that will be applied by + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. + lineposition + Sets the kind of decoration line(s) with text, such as + an "under", "over" or "through" as well as combinations + e.g. "under+over", etc. + shadow + Sets the shape and color of the shadow behind text. + "auto" places minimal shadow and applies contrast text + font color. See https://developer.mozilla.org/en- + US/docs/Web/CSS/text-shadow for additional options. + size + + style + Sets whether a font should be styled with a normal or + italic face from its family. + textcase + Sets capitalization of text. It can be used to make + text appear in all-uppercase or all-lowercase, or with + each word capitalized. + variant + Sets the variant of the font. + weight + Sets the weight (or boldness) of the font. + """ + + def __init__( + self, + arg=None, + color=None, + family=None, + lineposition=None, + shadow=None, + size=None, + style=None, + textcase=None, + variant=None, + weight=None, + **kwargs, + ): + """ + Construct a new Font object + + Sets this legend group's title font. + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of :class:`plotly.graph_objs.contour.legend + grouptitle.Font` + color + + family + HTML font family - the typeface that will be applied by + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. + lineposition + Sets the kind of decoration line(s) with text, such as + an "under", "over" or "through" as well as combinations + e.g. "under+over", etc. + shadow + Sets the shape and color of the shadow behind text. + "auto" places minimal shadow and applies contrast text + font color. See https://developer.mozilla.org/en- + US/docs/Web/CSS/text-shadow for additional options. + size + + style + Sets whether a font should be styled with a normal or + italic face from its family. + textcase + Sets capitalization of text. It can be used to make + text appear in all-uppercase or all-lowercase, or with + each word capitalized. + variant + Sets the variant of the font. + weight + Sets the weight (or boldness) of the font. + + Returns + ------- + Font + """ + super().__init__("font") + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + if arg is None: + arg = {} + elif isinstance(arg, self.__class__): + arg = arg.to_plotly_json() + elif isinstance(arg, dict): + arg = _copy.copy(arg) + else: + raise ValueError("""\ +The first argument to the plotly.graph_objs.contour.legendgrouptitle.Font +constructor must be a dict or +an instance of :class:`plotly.graph_objs.contour.legendgrouptitle.Font`""") + + self._skip_invalid = kwargs.pop("skip_invalid", False) + self._validate = kwargs.pop("_validate", True) + + self._set_property("color", arg, color) + self._set_property("family", arg, family) + self._set_property("lineposition", arg, lineposition) + self._set_property("shadow", arg, shadow) + self._set_property("size", arg, size) + self._set_property("style", arg, style) + self._set_property("textcase", arg, textcase) + self._set_property("variant", arg, variant) + self._set_property("weight", arg, weight) + self._process_kwargs(**dict(arg, **kwargs)) + self._skip_invalid = False diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/contourcarpet/.___init__.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/contourcarpet/.___init__.py new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/contourcarpet/.___init__.py differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/contourcarpet/.___pycache__ b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/contourcarpet/.___pycache__ new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/contourcarpet/.___pycache__ differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/contourcarpet/.__colorbar.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/contourcarpet/.__colorbar.py new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/contourcarpet/.__colorbar.py differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/contourcarpet/.__contours.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/contourcarpet/.__contours.py new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/contourcarpet/.__contours.py differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/contourcarpet/.__legendgrouptitle.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/contourcarpet/.__legendgrouptitle.py new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/contourcarpet/.__legendgrouptitle.py differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/contourcarpet/.__line.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/contourcarpet/.__line.py new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/contourcarpet/.__line.py differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/contourcarpet/.__stream.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/contourcarpet/.__stream.py new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/contourcarpet/.__stream.py differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/contourcarpet/._colorbar b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/contourcarpet/._colorbar new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/contourcarpet/._colorbar differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/contourcarpet/._contours b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/contourcarpet/._contours new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/contourcarpet/._contours differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/contourcarpet/._legendgrouptitle b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/contourcarpet/._legendgrouptitle new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/contourcarpet/._legendgrouptitle differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/contourcarpet/__init__.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/contourcarpet/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..8d9cb5e22a8abe44d4c4a304540faa8c4ed79736 --- /dev/null +++ b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/contourcarpet/__init__.py @@ -0,0 +1,26 @@ +import sys +from typing import TYPE_CHECKING + +if TYPE_CHECKING: + from ._colorbar import ColorBar + from ._contours import Contours + from ._legendgrouptitle import Legendgrouptitle + from ._line import Line + from ._stream import Stream + from . import colorbar + from . import contours + from . import legendgrouptitle +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [".colorbar", ".contours", ".legendgrouptitle"], + [ + "._colorbar.ColorBar", + "._contours.Contours", + "._legendgrouptitle.Legendgrouptitle", + "._line.Line", + "._stream.Stream", + ], + ) diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/contourcarpet/_colorbar.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/contourcarpet/_colorbar.py new file mode 100644 index 0000000000000000000000000000000000000000..5c18bab164750f7ba473f48aea25212a789d517f --- /dev/null +++ b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/contourcarpet/_colorbar.py @@ -0,0 +1,1739 @@ +# --- THIS FILE IS AUTO-GENERATED --- +# Modifications will be overwitten the next time code generation run. + +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class ColorBar(_BaseTraceHierarchyType): + _parent_path_str = "contourcarpet" + _path_str = "contourcarpet.colorbar" + _valid_props = { + "bgcolor", + "bordercolor", + "borderwidth", + "dtick", + "exponentformat", + "labelalias", + "len", + "lenmode", + "minexponent", + "nticks", + "orientation", + "outlinecolor", + "outlinewidth", + "separatethousands", + "showexponent", + "showticklabels", + "showtickprefix", + "showticksuffix", + "thickness", + "thicknessmode", + "tick0", + "tickangle", + "tickcolor", + "tickfont", + "tickformat", + "tickformatstopdefaults", + "tickformatstops", + "ticklabeloverflow", + "ticklabelposition", + "ticklabelstep", + "ticklen", + "tickmode", + "tickprefix", + "ticks", + "ticksuffix", + "ticktext", + "ticktextsrc", + "tickvals", + "tickvalssrc", + "tickwidth", + "title", + "x", + "xanchor", + "xpad", + "xref", + "y", + "yanchor", + "ypad", + "yref", + } + + @property + def bgcolor(self): + """ + Sets the color of padded area. + + The 'bgcolor' property is a color and may be specified as: + - A hex string (e.g. '#ff0000') + - An rgb/rgba string (e.g. 'rgb(255,0,0)') + - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') + - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') + - A named CSS color: see https://plotly.com/python/css-colors/ for a list + + Returns + ------- + str + """ + return self["bgcolor"] + + @bgcolor.setter + def bgcolor(self, val): + self["bgcolor"] = val + + @property + def bordercolor(self): + """ + Sets the axis line color. + + The 'bordercolor' property is a color and may be specified as: + - A hex string (e.g. '#ff0000') + - An rgb/rgba string (e.g. 'rgb(255,0,0)') + - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') + - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') + - A named CSS color: see https://plotly.com/python/css-colors/ for a list + + Returns + ------- + str + """ + return self["bordercolor"] + + @bordercolor.setter + def bordercolor(self, val): + self["bordercolor"] = val + + @property + def borderwidth(self): + """ + Sets the width (in px) or the border enclosing this color bar. + + The 'borderwidth' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["borderwidth"] + + @borderwidth.setter + def borderwidth(self, val): + self["borderwidth"] = val + + @property + def dtick(self): + """ + Sets the step in-between ticks on this axis. Use with `tick0`. + Must be a positive number, or special strings available to + "log" and "date" axes. If the axis `type` is "log", then ticks + are set every 10^(n*dtick) where n is the tick number. For + example, to set a tick mark at 1, 10, 100, 1000, ... set dtick + to 1. To set tick marks at 1, 100, 10000, ... set dtick to 2. + To set tick marks at 1, 5, 25, 125, 625, 3125, ... set dtick to + log_10(5), or 0.69897000433. "log" has several special values; + "L", where `f` is a positive number, gives ticks linearly + spaced in value (but not position). For example `tick0` = 0.1, + `dtick` = "L0.5" will put ticks at 0.1, 0.6, 1.1, 1.6 etc. To + show powers of 10 plus small digits between, use "D1" (all + digits) or "D2" (only 2 and 5). `tick0` is ignored for "D1" and + "D2". If the axis `type` is "date", then you must convert the + time to milliseconds. For example, to set the interval between + ticks to one day, set `dtick` to 86400000.0. "date" also has + special values "M" gives ticks spaced by a number of months. + `n` must be a positive integer. To set ticks on the 15th of + every third month, set `tick0` to "2000-01-15" and `dtick` to + "M3". To set ticks every 4 years, set `dtick` to "M48" + + The 'dtick' property accepts values of any type + + Returns + ------- + Any + """ + return self["dtick"] + + @dtick.setter + def dtick(self, val): + self["dtick"] = val + + @property + def exponentformat(self): + """ + Determines a formatting rule for the tick exponents. For + example, consider the number 1,000,000,000. If "none", it + appears as 1,000,000,000. If "e", 1e+9. If "E", 1E+9. If + "power", 1x10^9 (with 9 in a super script). If "SI", 1G. If + "B", 1B. "SI" uses prefixes from "femto" f (10^-15) to "tera" T + (10^12). *SI extended* covers instead the full SI range from + "quecto" q (10^-30) to "quetta" Q (10^30). If "SI" or *SI + extended* is used and the exponent is beyond the above ranges, + the formatting rule will automatically be switched to the power + notation. + + The 'exponentformat' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['none', 'e', 'E', 'power', 'SI', 'B', 'SI extended'] + + Returns + ------- + Any + """ + return self["exponentformat"] + + @exponentformat.setter + def exponentformat(self, val): + self["exponentformat"] = val + + @property + def labelalias(self): + """ + Replacement text for specific tick or hover labels. For example + using {US: 'USA', CA: 'Canada'} changes US to USA and CA to + Canada. The labels we would have shown must match the keys + exactly, after adding any tickprefix or ticksuffix. For + negative numbers the minus sign symbol used (U+2212) is wider + than the regular ascii dash. That means you need to use −1 + instead of -1. labelalias can be used with any axis type, and + both keys (if needed) and values (if desired) can include html- + like tags or MathJax. + + The 'labelalias' property accepts values of any type + + Returns + ------- + Any + """ + return self["labelalias"] + + @labelalias.setter + def labelalias(self, val): + self["labelalias"] = val + + @property + def len(self): + """ + Sets the length of the color bar This measure excludes the + padding of both ends. That is, the color bar length is this + length minus the padding on both ends. + + The 'len' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["len"] + + @len.setter + def len(self, val): + self["len"] = val + + @property + def lenmode(self): + """ + Determines whether this color bar's length (i.e. the measure in + the color variation direction) is set in units of plot + "fraction" or in *pixels. Use `len` to set the value. + + The 'lenmode' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['fraction', 'pixels'] + + Returns + ------- + Any + """ + return self["lenmode"] + + @lenmode.setter + def lenmode(self, val): + self["lenmode"] = val + + @property + def minexponent(self): + """ + Hide SI prefix for 10^n if |n| is below this number. This only + has an effect when `tickformat` is "SI" or "B". + + The 'minexponent' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["minexponent"] + + @minexponent.setter + def minexponent(self, val): + self["minexponent"] = val + + @property + def nticks(self): + """ + Specifies the maximum number of ticks for the particular axis. + The actual number of ticks will be chosen automatically to be + less than or equal to `nticks`. Has an effect only if + `tickmode` is set to "auto". + + The 'nticks' property is a integer and may be specified as: + - An int (or float that will be cast to an int) + in the interval [0, 9223372036854775807] + + Returns + ------- + int + """ + return self["nticks"] + + @nticks.setter + def nticks(self, val): + self["nticks"] = val + + @property + def orientation(self): + """ + Sets the orientation of the colorbar. + + The 'orientation' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['h', 'v'] + + Returns + ------- + Any + """ + return self["orientation"] + + @orientation.setter + def orientation(self, val): + self["orientation"] = val + + @property + def outlinecolor(self): + """ + Sets the axis line color. + + The 'outlinecolor' property is a color and may be specified as: + - A hex string (e.g. '#ff0000') + - An rgb/rgba string (e.g. 'rgb(255,0,0)') + - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') + - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') + - A named CSS color: see https://plotly.com/python/css-colors/ for a list + + Returns + ------- + str + """ + return self["outlinecolor"] + + @outlinecolor.setter + def outlinecolor(self, val): + self["outlinecolor"] = val + + @property + def outlinewidth(self): + """ + Sets the width (in px) of the axis line. + + The 'outlinewidth' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["outlinewidth"] + + @outlinewidth.setter + def outlinewidth(self, val): + self["outlinewidth"] = val + + @property + def separatethousands(self): + """ + If "true", even 4-digit integers are separated + + The 'separatethousands' property is a boolean and must be specified as: + - A boolean value: True or False + + Returns + ------- + bool + """ + return self["separatethousands"] + + @separatethousands.setter + def separatethousands(self, val): + self["separatethousands"] = val + + @property + def showexponent(self): + """ + If "all", all exponents are shown besides their significands. + If "first", only the exponent of the first tick is shown. If + "last", only the exponent of the last tick is shown. If "none", + no exponents appear. + + The 'showexponent' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['all', 'first', 'last', 'none'] + + Returns + ------- + Any + """ + return self["showexponent"] + + @showexponent.setter + def showexponent(self, val): + self["showexponent"] = val + + @property + def showticklabels(self): + """ + Determines whether or not the tick labels are drawn. + + The 'showticklabels' property is a boolean and must be specified as: + - A boolean value: True or False + + Returns + ------- + bool + """ + return self["showticklabels"] + + @showticklabels.setter + def showticklabels(self, val): + self["showticklabels"] = val + + @property + def showtickprefix(self): + """ + If "all", all tick labels are displayed with a prefix. If + "first", only the first tick is displayed with a prefix. If + "last", only the last tick is displayed with a suffix. If + "none", tick prefixes are hidden. + + The 'showtickprefix' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['all', 'first', 'last', 'none'] + + Returns + ------- + Any + """ + return self["showtickprefix"] + + @showtickprefix.setter + def showtickprefix(self, val): + self["showtickprefix"] = val + + @property + def showticksuffix(self): + """ + Same as `showtickprefix` but for tick suffixes. + + The 'showticksuffix' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['all', 'first', 'last', 'none'] + + Returns + ------- + Any + """ + return self["showticksuffix"] + + @showticksuffix.setter + def showticksuffix(self, val): + self["showticksuffix"] = val + + @property + def thickness(self): + """ + Sets the thickness of the color bar This measure excludes the + size of the padding, ticks and labels. + + The 'thickness' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["thickness"] + + @thickness.setter + def thickness(self, val): + self["thickness"] = val + + @property + def thicknessmode(self): + """ + Determines whether this color bar's thickness (i.e. the measure + in the constant color direction) is set in units of plot + "fraction" or in "pixels". Use `thickness` to set the value. + + The 'thicknessmode' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['fraction', 'pixels'] + + Returns + ------- + Any + """ + return self["thicknessmode"] + + @thicknessmode.setter + def thicknessmode(self, val): + self["thicknessmode"] = val + + @property + def tick0(self): + """ + Sets the placement of the first tick on this axis. Use with + `dtick`. If the axis `type` is "log", then you must take the + log of your starting tick (e.g. to set the starting tick to + 100, set the `tick0` to 2) except when `dtick`=*L* (see + `dtick` for more info). If the axis `type` is "date", it should + be a date string, like date data. If the axis `type` is + "category", it should be a number, using the scale where each + category is assigned a serial number from zero in the order it + appears. + + The 'tick0' property accepts values of any type + + Returns + ------- + Any + """ + return self["tick0"] + + @tick0.setter + def tick0(self, val): + self["tick0"] = val + + @property + def tickangle(self): + """ + Sets the angle of the tick labels with respect to the + horizontal. For example, a `tickangle` of -90 draws the tick + labels vertically. + + The 'tickangle' property is a angle (in degrees) that may be + specified as a number between -180 and 180. + Numeric values outside this range are converted to the equivalent value + (e.g. 270 is converted to -90). + + Returns + ------- + int|float + """ + return self["tickangle"] + + @tickangle.setter + def tickangle(self, val): + self["tickangle"] = val + + @property + def tickcolor(self): + """ + Sets the tick color. + + The 'tickcolor' property is a color and may be specified as: + - A hex string (e.g. '#ff0000') + - An rgb/rgba string (e.g. 'rgb(255,0,0)') + - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') + - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') + - A named CSS color: see https://plotly.com/python/css-colors/ for a list + + Returns + ------- + str + """ + return self["tickcolor"] + + @tickcolor.setter + def tickcolor(self, val): + self["tickcolor"] = val + + @property + def tickfont(self): + """ + Sets the color bar's tick label font + + The 'tickfont' property is an instance of Tickfont + that may be specified as: + - An instance of :class:`plotly.graph_objs.contourcarpet.colorbar.Tickfont` + - A dict of string/value properties that will be passed + to the Tickfont constructor + + Returns + ------- + plotly.graph_objs.contourcarpet.colorbar.Tickfont + """ + return self["tickfont"] + + @tickfont.setter + def tickfont(self, val): + self["tickfont"] = val + + @property + def tickformat(self): + """ + Sets the tick label formatting rule using d3 formatting mini- + languages which are very similar to those in Python. For + numbers, see: + https://github.com/d3/d3-format/tree/v1.4.5#d3-format. And for + dates see: https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format. We add two items to d3's date + formatter: "%h" for half of the year as a decimal number as + well as "%{n}f" for fractional seconds with n digits. For + example, *2016-10-13 09:15:23.456* with tickformat + "%H~%M~%S.%2f" would display "09~15~23.46" + + The 'tickformat' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["tickformat"] + + @tickformat.setter + def tickformat(self, val): + self["tickformat"] = val + + @property + def tickformatstops(self): + """ + The 'tickformatstops' property is a tuple of instances of + Tickformatstop that may be specified as: + - A list or tuple of instances of plotly.graph_objs.contourcarpet.colorbar.Tickformatstop + - A list or tuple of dicts of string/value properties that + will be passed to the Tickformatstop constructor + + Returns + ------- + tuple[plotly.graph_objs.contourcarpet.colorbar.Tickformatstop] + """ + return self["tickformatstops"] + + @tickformatstops.setter + def tickformatstops(self, val): + self["tickformatstops"] = val + + @property + def tickformatstopdefaults(self): + """ + When used in a template (as layout.template.data.contourcarpet. + colorbar.tickformatstopdefaults), sets the default property + values to use for elements of + contourcarpet.colorbar.tickformatstops + + The 'tickformatstopdefaults' property is an instance of Tickformatstop + that may be specified as: + - An instance of :class:`plotly.graph_objs.contourcarpet.colorbar.Tickformatstop` + - A dict of string/value properties that will be passed + to the Tickformatstop constructor + + Returns + ------- + plotly.graph_objs.contourcarpet.colorbar.Tickformatstop + """ + return self["tickformatstopdefaults"] + + @tickformatstopdefaults.setter + def tickformatstopdefaults(self, val): + self["tickformatstopdefaults"] = val + + @property + def ticklabeloverflow(self): + """ + Determines how we handle tick labels that would overflow either + the graph div or the domain of the axis. The default value for + inside tick labels is *hide past domain*. In other cases the + default is *hide past div*. + + The 'ticklabeloverflow' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['allow', 'hide past div', 'hide past domain'] + + Returns + ------- + Any + """ + return self["ticklabeloverflow"] + + @ticklabeloverflow.setter + def ticklabeloverflow(self, val): + self["ticklabeloverflow"] = val + + @property + def ticklabelposition(self): + """ + Determines where tick labels are drawn relative to the ticks. + Left and right options are used when `orientation` is "h", top + and bottom when `orientation` is "v". + + The 'ticklabelposition' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['outside', 'inside', 'outside top', 'inside top', + 'outside left', 'inside left', 'outside right', 'inside + right', 'outside bottom', 'inside bottom'] + + Returns + ------- + Any + """ + return self["ticklabelposition"] + + @ticklabelposition.setter + def ticklabelposition(self, val): + self["ticklabelposition"] = val + + @property + def ticklabelstep(self): + """ + Sets the spacing between tick labels as compared to the spacing + between ticks. A value of 1 (default) means each tick gets a + label. A value of 2 means shows every 2nd label. A larger value + n means only every nth tick is labeled. `tick0` determines + which labels are shown. Not implemented for axes with `type` + "log" or "multicategory", or when `tickmode` is "array". + + The 'ticklabelstep' property is a integer and may be specified as: + - An int (or float that will be cast to an int) + in the interval [1, 9223372036854775807] + + Returns + ------- + int + """ + return self["ticklabelstep"] + + @ticklabelstep.setter + def ticklabelstep(self, val): + self["ticklabelstep"] = val + + @property + def ticklen(self): + """ + Sets the tick length (in px). + + The 'ticklen' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["ticklen"] + + @ticklen.setter + def ticklen(self, val): + self["ticklen"] = val + + @property + def tickmode(self): + """ + Sets the tick mode for this axis. If "auto", the number of + ticks is set via `nticks`. If "linear", the placement of the + ticks is determined by a starting position `tick0` and a tick + step `dtick` ("linear" is the default value if `tick0` and + `dtick` are provided). If "array", the placement of the ticks + is set via `tickvals` and the tick text is `ticktext`. ("array" + is the default value if `tickvals` is provided). + + The 'tickmode' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['auto', 'linear', 'array'] + + Returns + ------- + Any + """ + return self["tickmode"] + + @tickmode.setter + def tickmode(self, val): + self["tickmode"] = val + + @property + def tickprefix(self): + """ + Sets a tick label prefix. + + The 'tickprefix' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["tickprefix"] + + @tickprefix.setter + def tickprefix(self, val): + self["tickprefix"] = val + + @property + def ticks(self): + """ + Determines whether ticks are drawn or not. If "", this axis' + ticks are not drawn. If "outside" ("inside"), this axis' are + drawn outside (inside) the axis lines. + + The 'ticks' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['outside', 'inside', ''] + + Returns + ------- + Any + """ + return self["ticks"] + + @ticks.setter + def ticks(self, val): + self["ticks"] = val + + @property + def ticksuffix(self): + """ + Sets a tick label suffix. + + The 'ticksuffix' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["ticksuffix"] + + @ticksuffix.setter + def ticksuffix(self, val): + self["ticksuffix"] = val + + @property + def ticktext(self): + """ + Sets the text displayed at the ticks position via `tickvals`. + Only has an effect if `tickmode` is set to "array". Used with + `tickvals`. + + The 'ticktext' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["ticktext"] + + @ticktext.setter + def ticktext(self, val): + self["ticktext"] = val + + @property + def ticktextsrc(self): + """ + Sets the source reference on Chart Studio Cloud for `ticktext`. + + The 'ticktextsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["ticktextsrc"] + + @ticktextsrc.setter + def ticktextsrc(self, val): + self["ticktextsrc"] = val + + @property + def tickvals(self): + """ + Sets the values at which ticks on this axis appear. Only has an + effect if `tickmode` is set to "array". Used with `ticktext`. + + The 'tickvals' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["tickvals"] + + @tickvals.setter + def tickvals(self, val): + self["tickvals"] = val + + @property + def tickvalssrc(self): + """ + Sets the source reference on Chart Studio Cloud for `tickvals`. + + The 'tickvalssrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["tickvalssrc"] + + @tickvalssrc.setter + def tickvalssrc(self, val): + self["tickvalssrc"] = val + + @property + def tickwidth(self): + """ + Sets the tick width (in px). + + The 'tickwidth' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["tickwidth"] + + @tickwidth.setter + def tickwidth(self, val): + self["tickwidth"] = val + + @property + def title(self): + """ + The 'title' property is an instance of Title + that may be specified as: + - An instance of :class:`plotly.graph_objs.contourcarpet.colorbar.Title` + - A dict of string/value properties that will be passed + to the Title constructor + + Returns + ------- + plotly.graph_objs.contourcarpet.colorbar.Title + """ + return self["title"] + + @title.setter + def title(self, val): + self["title"] = val + + @property + def x(self): + """ + Sets the x position with respect to `xref` of the color bar (in + plot fraction). When `xref` is "paper", defaults to 1.02 when + `orientation` is "v" and 0.5 when `orientation` is "h". When + `xref` is "container", defaults to 1 when `orientation` is "v" + and 0.5 when `orientation` is "h". Must be between 0 and 1 if + `xref` is "container" and between "-2" and 3 if `xref` is + "paper". + + The 'x' property is a number and may be specified as: + - An int or float + + Returns + ------- + int|float + """ + return self["x"] + + @x.setter + def x(self, val): + self["x"] = val + + @property + def xanchor(self): + """ + Sets this color bar's horizontal position anchor. This anchor + binds the `x` position to the "left", "center" or "right" of + the color bar. Defaults to "left" when `orientation` is "v" and + "center" when `orientation` is "h". + + The 'xanchor' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['left', 'center', 'right'] + + Returns + ------- + Any + """ + return self["xanchor"] + + @xanchor.setter + def xanchor(self, val): + self["xanchor"] = val + + @property + def xpad(self): + """ + Sets the amount of padding (in px) along the x direction. + + The 'xpad' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["xpad"] + + @xpad.setter + def xpad(self, val): + self["xpad"] = val + + @property + def xref(self): + """ + Sets the container `x` refers to. "container" spans the entire + `width` of the plot. "paper" refers to the width of the + plotting area only. + + The 'xref' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['container', 'paper'] + + Returns + ------- + Any + """ + return self["xref"] + + @xref.setter + def xref(self, val): + self["xref"] = val + + @property + def y(self): + """ + Sets the y position with respect to `yref` of the color bar (in + plot fraction). When `yref` is "paper", defaults to 0.5 when + `orientation` is "v" and 1.02 when `orientation` is "h". When + `yref` is "container", defaults to 0.5 when `orientation` is + "v" and 1 when `orientation` is "h". Must be between 0 and 1 if + `yref` is "container" and between "-2" and 3 if `yref` is + "paper". + + The 'y' property is a number and may be specified as: + - An int or float + + Returns + ------- + int|float + """ + return self["y"] + + @y.setter + def y(self, val): + self["y"] = val + + @property + def yanchor(self): + """ + Sets this color bar's vertical position anchor This anchor + binds the `y` position to the "top", "middle" or "bottom" of + the color bar. Defaults to "middle" when `orientation` is "v" + and "bottom" when `orientation` is "h". + + The 'yanchor' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['top', 'middle', 'bottom'] + + Returns + ------- + Any + """ + return self["yanchor"] + + @yanchor.setter + def yanchor(self, val): + self["yanchor"] = val + + @property + def ypad(self): + """ + Sets the amount of padding (in px) along the y direction. + + The 'ypad' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["ypad"] + + @ypad.setter + def ypad(self, val): + self["ypad"] = val + + @property + def yref(self): + """ + Sets the container `y` refers to. "container" spans the entire + `height` of the plot. "paper" refers to the height of the + plotting area only. + + The 'yref' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['container', 'paper'] + + Returns + ------- + Any + """ + return self["yref"] + + @yref.setter + def yref(self, val): + self["yref"] = val + + @property + def _prop_descriptions(self): + return """\ + bgcolor + Sets the color of padded area. + bordercolor + Sets the axis line color. + borderwidth + Sets the width (in px) or the border enclosing this + color bar. + dtick + Sets the step in-between ticks on this axis. Use with + `tick0`. Must be a positive number, or special strings + available to "log" and "date" axes. If the axis `type` + is "log", then ticks are set every 10^(n*dtick) where n + is the tick number. For example, to set a tick mark at + 1, 10, 100, 1000, ... set dtick to 1. To set tick marks + at 1, 100, 10000, ... set dtick to 2. To set tick marks + at 1, 5, 25, 125, 625, 3125, ... set dtick to + log_10(5), or 0.69897000433. "log" has several special + values; "L", where `f` is a positive number, gives + ticks linearly spaced in value (but not position). For + example `tick0` = 0.1, `dtick` = "L0.5" will put ticks + at 0.1, 0.6, 1.1, 1.6 etc. To show powers of 10 plus + small digits between, use "D1" (all digits) or "D2" + (only 2 and 5). `tick0` is ignored for "D1" and "D2". + If the axis `type` is "date", then you must convert the + time to milliseconds. For example, to set the interval + between ticks to one day, set `dtick` to 86400000.0. + "date" also has special values "M" gives ticks + spaced by a number of months. `n` must be a positive + integer. To set ticks on the 15th of every third month, + set `tick0` to "2000-01-15" and `dtick` to "M3". To set + ticks every 4 years, set `dtick` to "M48" + exponentformat + Determines a formatting rule for the tick exponents. + For example, consider the number 1,000,000,000. If + "none", it appears as 1,000,000,000. If "e", 1e+9. If + "E", 1E+9. If "power", 1x10^9 (with 9 in a super + script). If "SI", 1G. If "B", 1B. "SI" uses prefixes + from "femto" f (10^-15) to "tera" T (10^12). *SI + extended* covers instead the full SI range from + "quecto" q (10^-30) to "quetta" Q (10^30). If "SI" or + *SI extended* is used and the exponent is beyond the + above ranges, the formatting rule will automatically be + switched to the power notation. + labelalias + Replacement text for specific tick or hover labels. For + example using {US: 'USA', CA: 'Canada'} changes US to + USA and CA to Canada. The labels we would have shown + must match the keys exactly, after adding any + tickprefix or ticksuffix. For negative numbers the + minus sign symbol used (U+2212) is wider than the + regular ascii dash. That means you need to use −1 + instead of -1. labelalias can be used with any axis + type, and both keys (if needed) and values (if desired) + can include html-like tags or MathJax. + len + Sets the length of the color bar This measure excludes + the padding of both ends. That is, the color bar length + is this length minus the padding on both ends. + lenmode + Determines whether this color bar's length (i.e. the + measure in the color variation direction) is set in + units of plot "fraction" or in *pixels. Use `len` to + set the value. + minexponent + Hide SI prefix for 10^n if |n| is below this number. + This only has an effect when `tickformat` is "SI" or + "B". + nticks + Specifies the maximum number of ticks for the + particular axis. The actual number of ticks will be + chosen automatically to be less than or equal to + `nticks`. Has an effect only if `tickmode` is set to + "auto". + orientation + Sets the orientation of the colorbar. + outlinecolor + Sets the axis line color. + outlinewidth + Sets the width (in px) of the axis line. + separatethousands + If "true", even 4-digit integers are separated + showexponent + If "all", all exponents are shown besides their + significands. If "first", only the exponent of the + first tick is shown. If "last", only the exponent of + the last tick is shown. If "none", no exponents appear. + showticklabels + Determines whether or not the tick labels are drawn. + showtickprefix + If "all", all tick labels are displayed with a prefix. + If "first", only the first tick is displayed with a + prefix. If "last", only the last tick is displayed with + a suffix. If "none", tick prefixes are hidden. + showticksuffix + Same as `showtickprefix` but for tick suffixes. + thickness + Sets the thickness of the color bar This measure + excludes the size of the padding, ticks and labels. + thicknessmode + Determines whether this color bar's thickness (i.e. the + measure in the constant color direction) is set in + units of plot "fraction" or in "pixels". Use + `thickness` to set the value. + tick0 + Sets the placement of the first tick on this axis. Use + with `dtick`. If the axis `type` is "log", then you + must take the log of your starting tick (e.g. to set + the starting tick to 100, set the `tick0` to 2) except + when `dtick`=*L* (see `dtick` for more info). If the + axis `type` is "date", it should be a date string, like + date data. If the axis `type` is "category", it should + be a number, using the scale where each category is + assigned a serial number from zero in the order it + appears. + tickangle + Sets the angle of the tick labels with respect to the + horizontal. For example, a `tickangle` of -90 draws the + tick labels vertically. + tickcolor + Sets the tick color. + tickfont + Sets the color bar's tick label font + tickformat + Sets the tick label formatting rule using d3 formatting + mini-languages which are very similar to those in + Python. For numbers, see: + https://github.com/d3/d3-format/tree/v1.4.5#d3-format. + And for dates see: https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format. We add two items to + d3's date formatter: "%h" for half of the year as a + decimal number as well as "%{n}f" for fractional + seconds with n digits. For example, *2016-10-13 + 09:15:23.456* with tickformat "%H~%M~%S.%2f" would + display "09~15~23.46" + tickformatstops + A tuple of :class:`plotly.graph_objects.contourcarpet.c + olorbar.Tickformatstop` instances or dicts with + compatible properties + tickformatstopdefaults + When used in a template (as layout.template.data.contou + rcarpet.colorbar.tickformatstopdefaults), sets the + default property values to use for elements of + contourcarpet.colorbar.tickformatstops + ticklabeloverflow + Determines how we handle tick labels that would + overflow either the graph div or the domain of the + axis. The default value for inside tick labels is *hide + past domain*. In other cases the default is *hide past + div*. + ticklabelposition + Determines where tick labels are drawn relative to the + ticks. Left and right options are used when + `orientation` is "h", top and bottom when `orientation` + is "v". + ticklabelstep + Sets the spacing between tick labels as compared to the + spacing between ticks. A value of 1 (default) means + each tick gets a label. A value of 2 means shows every + 2nd label. A larger value n means only every nth tick + is labeled. `tick0` determines which labels are shown. + Not implemented for axes with `type` "log" or + "multicategory", or when `tickmode` is "array". + ticklen + Sets the tick length (in px). + tickmode + Sets the tick mode for this axis. If "auto", the number + of ticks is set via `nticks`. If "linear", the + placement of the ticks is determined by a starting + position `tick0` and a tick step `dtick` ("linear" is + the default value if `tick0` and `dtick` are provided). + If "array", the placement of the ticks is set via + `tickvals` and the tick text is `ticktext`. ("array" is + the default value if `tickvals` is provided). + tickprefix + Sets a tick label prefix. + ticks + Determines whether ticks are drawn or not. If "", this + axis' ticks are not drawn. If "outside" ("inside"), + this axis' are drawn outside (inside) the axis lines. + ticksuffix + Sets a tick label suffix. + ticktext + Sets the text displayed at the ticks position via + `tickvals`. Only has an effect if `tickmode` is set to + "array". Used with `tickvals`. + ticktextsrc + Sets the source reference on Chart Studio Cloud for + `ticktext`. + tickvals + Sets the values at which ticks on this axis appear. + Only has an effect if `tickmode` is set to "array". + Used with `ticktext`. + tickvalssrc + Sets the source reference on Chart Studio Cloud for + `tickvals`. + tickwidth + Sets the tick width (in px). + title + :class:`plotly.graph_objects.contourcarpet.colorbar.Tit + le` instance or dict with compatible properties + x + Sets the x position with respect to `xref` of the color + bar (in plot fraction). When `xref` is "paper", + defaults to 1.02 when `orientation` is "v" and 0.5 when + `orientation` is "h". When `xref` is "container", + defaults to 1 when `orientation` is "v" and 0.5 when + `orientation` is "h". Must be between 0 and 1 if `xref` + is "container" and between "-2" and 3 if `xref` is + "paper". + xanchor + Sets this color bar's horizontal position anchor. This + anchor binds the `x` position to the "left", "center" + or "right" of the color bar. Defaults to "left" when + `orientation` is "v" and "center" when `orientation` is + "h". + xpad + Sets the amount of padding (in px) along the x + direction. + xref + Sets the container `x` refers to. "container" spans the + entire `width` of the plot. "paper" refers to the width + of the plotting area only. + y + Sets the y position with respect to `yref` of the color + bar (in plot fraction). When `yref` is "paper", + defaults to 0.5 when `orientation` is "v" and 1.02 when + `orientation` is "h". When `yref` is "container", + defaults to 0.5 when `orientation` is "v" and 1 when + `orientation` is "h". Must be between 0 and 1 if `yref` + is "container" and between "-2" and 3 if `yref` is + "paper". + yanchor + Sets this color bar's vertical position anchor This + anchor binds the `y` position to the "top", "middle" or + "bottom" of the color bar. Defaults to "middle" when + `orientation` is "v" and "bottom" when `orientation` is + "h". + ypad + Sets the amount of padding (in px) along the y + direction. + yref + Sets the container `y` refers to. "container" spans the + entire `height` of the plot. "paper" refers to the + height of the plotting area only. + """ + + def __init__( + self, + arg=None, + bgcolor=None, + bordercolor=None, + borderwidth=None, + dtick=None, + exponentformat=None, + labelalias=None, + len=None, + lenmode=None, + minexponent=None, + nticks=None, + orientation=None, + outlinecolor=None, + outlinewidth=None, + separatethousands=None, + showexponent=None, + showticklabels=None, + showtickprefix=None, + showticksuffix=None, + thickness=None, + thicknessmode=None, + tick0=None, + tickangle=None, + tickcolor=None, + tickfont=None, + tickformat=None, + tickformatstops=None, + tickformatstopdefaults=None, + ticklabeloverflow=None, + ticklabelposition=None, + ticklabelstep=None, + ticklen=None, + tickmode=None, + tickprefix=None, + ticks=None, + ticksuffix=None, + ticktext=None, + ticktextsrc=None, + tickvals=None, + tickvalssrc=None, + tickwidth=None, + title=None, + x=None, + xanchor=None, + xpad=None, + xref=None, + y=None, + yanchor=None, + ypad=None, + yref=None, + **kwargs, + ): + """ + Construct a new ColorBar object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.contourcarpet.ColorBar` + bgcolor + Sets the color of padded area. + bordercolor + Sets the axis line color. + borderwidth + Sets the width (in px) or the border enclosing this + color bar. + dtick + Sets the step in-between ticks on this axis. Use with + `tick0`. Must be a positive number, or special strings + available to "log" and "date" axes. If the axis `type` + is "log", then ticks are set every 10^(n*dtick) where n + is the tick number. For example, to set a tick mark at + 1, 10, 100, 1000, ... set dtick to 1. To set tick marks + at 1, 100, 10000, ... set dtick to 2. To set tick marks + at 1, 5, 25, 125, 625, 3125, ... set dtick to + log_10(5), or 0.69897000433. "log" has several special + values; "L", where `f` is a positive number, gives + ticks linearly spaced in value (but not position). For + example `tick0` = 0.1, `dtick` = "L0.5" will put ticks + at 0.1, 0.6, 1.1, 1.6 etc. To show powers of 10 plus + small digits between, use "D1" (all digits) or "D2" + (only 2 and 5). `tick0` is ignored for "D1" and "D2". + If the axis `type` is "date", then you must convert the + time to milliseconds. For example, to set the interval + between ticks to one day, set `dtick` to 86400000.0. + "date" also has special values "M" gives ticks + spaced by a number of months. `n` must be a positive + integer. To set ticks on the 15th of every third month, + set `tick0` to "2000-01-15" and `dtick` to "M3". To set + ticks every 4 years, set `dtick` to "M48" + exponentformat + Determines a formatting rule for the tick exponents. + For example, consider the number 1,000,000,000. If + "none", it appears as 1,000,000,000. If "e", 1e+9. If + "E", 1E+9. If "power", 1x10^9 (with 9 in a super + script). If "SI", 1G. If "B", 1B. "SI" uses prefixes + from "femto" f (10^-15) to "tera" T (10^12). *SI + extended* covers instead the full SI range from + "quecto" q (10^-30) to "quetta" Q (10^30). If "SI" or + *SI extended* is used and the exponent is beyond the + above ranges, the formatting rule will automatically be + switched to the power notation. + labelalias + Replacement text for specific tick or hover labels. For + example using {US: 'USA', CA: 'Canada'} changes US to + USA and CA to Canada. The labels we would have shown + must match the keys exactly, after adding any + tickprefix or ticksuffix. For negative numbers the + minus sign symbol used (U+2212) is wider than the + regular ascii dash. That means you need to use −1 + instead of -1. labelalias can be used with any axis + type, and both keys (if needed) and values (if desired) + can include html-like tags or MathJax. + len + Sets the length of the color bar This measure excludes + the padding of both ends. That is, the color bar length + is this length minus the padding on both ends. + lenmode + Determines whether this color bar's length (i.e. the + measure in the color variation direction) is set in + units of plot "fraction" or in *pixels. Use `len` to + set the value. + minexponent + Hide SI prefix for 10^n if |n| is below this number. + This only has an effect when `tickformat` is "SI" or + "B". + nticks + Specifies the maximum number of ticks for the + particular axis. The actual number of ticks will be + chosen automatically to be less than or equal to + `nticks`. Has an effect only if `tickmode` is set to + "auto". + orientation + Sets the orientation of the colorbar. + outlinecolor + Sets the axis line color. + outlinewidth + Sets the width (in px) of the axis line. + separatethousands + If "true", even 4-digit integers are separated + showexponent + If "all", all exponents are shown besides their + significands. If "first", only the exponent of the + first tick is shown. If "last", only the exponent of + the last tick is shown. If "none", no exponents appear. + showticklabels + Determines whether or not the tick labels are drawn. + showtickprefix + If "all", all tick labels are displayed with a prefix. + If "first", only the first tick is displayed with a + prefix. If "last", only the last tick is displayed with + a suffix. If "none", tick prefixes are hidden. + showticksuffix + Same as `showtickprefix` but for tick suffixes. + thickness + Sets the thickness of the color bar This measure + excludes the size of the padding, ticks and labels. + thicknessmode + Determines whether this color bar's thickness (i.e. the + measure in the constant color direction) is set in + units of plot "fraction" or in "pixels". Use + `thickness` to set the value. + tick0 + Sets the placement of the first tick on this axis. Use + with `dtick`. If the axis `type` is "log", then you + must take the log of your starting tick (e.g. to set + the starting tick to 100, set the `tick0` to 2) except + when `dtick`=*L* (see `dtick` for more info). If the + axis `type` is "date", it should be a date string, like + date data. If the axis `type` is "category", it should + be a number, using the scale where each category is + assigned a serial number from zero in the order it + appears. + tickangle + Sets the angle of the tick labels with respect to the + horizontal. For example, a `tickangle` of -90 draws the + tick labels vertically. + tickcolor + Sets the tick color. + tickfont + Sets the color bar's tick label font + tickformat + Sets the tick label formatting rule using d3 formatting + mini-languages which are very similar to those in + Python. For numbers, see: + https://github.com/d3/d3-format/tree/v1.4.5#d3-format. + And for dates see: https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format. We add two items to + d3's date formatter: "%h" for half of the year as a + decimal number as well as "%{n}f" for fractional + seconds with n digits. For example, *2016-10-13 + 09:15:23.456* with tickformat "%H~%M~%S.%2f" would + display "09~15~23.46" + tickformatstops + A tuple of :class:`plotly.graph_objects.contourcarpet.c + olorbar.Tickformatstop` instances or dicts with + compatible properties + tickformatstopdefaults + When used in a template (as layout.template.data.contou + rcarpet.colorbar.tickformatstopdefaults), sets the + default property values to use for elements of + contourcarpet.colorbar.tickformatstops + ticklabeloverflow + Determines how we handle tick labels that would + overflow either the graph div or the domain of the + axis. The default value for inside tick labels is *hide + past domain*. In other cases the default is *hide past + div*. + ticklabelposition + Determines where tick labels are drawn relative to the + ticks. Left and right options are used when + `orientation` is "h", top and bottom when `orientation` + is "v". + ticklabelstep + Sets the spacing between tick labels as compared to the + spacing between ticks. A value of 1 (default) means + each tick gets a label. A value of 2 means shows every + 2nd label. A larger value n means only every nth tick + is labeled. `tick0` determines which labels are shown. + Not implemented for axes with `type` "log" or + "multicategory", or when `tickmode` is "array". + ticklen + Sets the tick length (in px). + tickmode + Sets the tick mode for this axis. If "auto", the number + of ticks is set via `nticks`. If "linear", the + placement of the ticks is determined by a starting + position `tick0` and a tick step `dtick` ("linear" is + the default value if `tick0` and `dtick` are provided). + If "array", the placement of the ticks is set via + `tickvals` and the tick text is `ticktext`. ("array" is + the default value if `tickvals` is provided). + tickprefix + Sets a tick label prefix. + ticks + Determines whether ticks are drawn or not. If "", this + axis' ticks are not drawn. If "outside" ("inside"), + this axis' are drawn outside (inside) the axis lines. + ticksuffix + Sets a tick label suffix. + ticktext + Sets the text displayed at the ticks position via + `tickvals`. Only has an effect if `tickmode` is set to + "array". Used with `tickvals`. + ticktextsrc + Sets the source reference on Chart Studio Cloud for + `ticktext`. + tickvals + Sets the values at which ticks on this axis appear. + Only has an effect if `tickmode` is set to "array". + Used with `ticktext`. + tickvalssrc + Sets the source reference on Chart Studio Cloud for + `tickvals`. + tickwidth + Sets the tick width (in px). + title + :class:`plotly.graph_objects.contourcarpet.colorbar.Tit + le` instance or dict with compatible properties + x + Sets the x position with respect to `xref` of the color + bar (in plot fraction). When `xref` is "paper", + defaults to 1.02 when `orientation` is "v" and 0.5 when + `orientation` is "h". When `xref` is "container", + defaults to 1 when `orientation` is "v" and 0.5 when + `orientation` is "h". Must be between 0 and 1 if `xref` + is "container" and between "-2" and 3 if `xref` is + "paper". + xanchor + Sets this color bar's horizontal position anchor. This + anchor binds the `x` position to the "left", "center" + or "right" of the color bar. Defaults to "left" when + `orientation` is "v" and "center" when `orientation` is + "h". + xpad + Sets the amount of padding (in px) along the x + direction. + xref + Sets the container `x` refers to. "container" spans the + entire `width` of the plot. "paper" refers to the width + of the plotting area only. + y + Sets the y position with respect to `yref` of the color + bar (in plot fraction). When `yref` is "paper", + defaults to 0.5 when `orientation` is "v" and 1.02 when + `orientation` is "h". When `yref` is "container", + defaults to 0.5 when `orientation` is "v" and 1 when + `orientation` is "h". Must be between 0 and 1 if `yref` + is "container" and between "-2" and 3 if `yref` is + "paper". + yanchor + Sets this color bar's vertical position anchor This + anchor binds the `y` position to the "top", "middle" or + "bottom" of the color bar. Defaults to "middle" when + `orientation` is "v" and "bottom" when `orientation` is + "h". + ypad + Sets the amount of padding (in px) along the y + direction. + yref + Sets the container `y` refers to. "container" spans the + entire `height` of the plot. "paper" refers to the + height of the plotting area only. + + Returns + ------- + ColorBar + """ + super().__init__("colorbar") + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + if arg is None: + arg = {} + elif isinstance(arg, self.__class__): + arg = arg.to_plotly_json() + elif isinstance(arg, dict): + arg = _copy.copy(arg) + else: + raise ValueError("""\ +The first argument to the plotly.graph_objs.contourcarpet.ColorBar +constructor must be a dict or +an instance of :class:`plotly.graph_objs.contourcarpet.ColorBar`""") + + self._skip_invalid = kwargs.pop("skip_invalid", False) + self._validate = kwargs.pop("_validate", True) + + self._set_property("bgcolor", arg, bgcolor) + self._set_property("bordercolor", arg, bordercolor) + self._set_property("borderwidth", arg, borderwidth) + self._set_property("dtick", arg, dtick) + self._set_property("exponentformat", arg, exponentformat) + self._set_property("labelalias", arg, labelalias) + self._set_property("len", arg, len) + self._set_property("lenmode", arg, lenmode) + self._set_property("minexponent", arg, minexponent) + self._set_property("nticks", arg, nticks) + self._set_property("orientation", arg, orientation) + self._set_property("outlinecolor", arg, outlinecolor) + self._set_property("outlinewidth", arg, outlinewidth) + self._set_property("separatethousands", arg, separatethousands) + self._set_property("showexponent", arg, showexponent) + self._set_property("showticklabels", arg, showticklabels) + self._set_property("showtickprefix", arg, showtickprefix) + self._set_property("showticksuffix", arg, showticksuffix) + self._set_property("thickness", arg, thickness) + self._set_property("thicknessmode", arg, thicknessmode) + self._set_property("tick0", arg, tick0) + self._set_property("tickangle", arg, tickangle) + self._set_property("tickcolor", arg, tickcolor) + self._set_property("tickfont", arg, tickfont) + self._set_property("tickformat", arg, tickformat) + self._set_property("tickformatstops", arg, tickformatstops) + self._set_property("tickformatstopdefaults", arg, tickformatstopdefaults) + self._set_property("ticklabeloverflow", arg, ticklabeloverflow) + self._set_property("ticklabelposition", arg, ticklabelposition) + self._set_property("ticklabelstep", arg, ticklabelstep) + self._set_property("ticklen", arg, ticklen) + self._set_property("tickmode", arg, tickmode) + self._set_property("tickprefix", arg, tickprefix) + self._set_property("ticks", arg, ticks) + self._set_property("ticksuffix", arg, ticksuffix) + self._set_property("ticktext", arg, ticktext) + self._set_property("ticktextsrc", arg, ticktextsrc) + self._set_property("tickvals", arg, tickvals) + self._set_property("tickvalssrc", arg, tickvalssrc) + self._set_property("tickwidth", arg, tickwidth) + self._set_property("title", arg, title) + self._set_property("x", arg, x) + self._set_property("xanchor", arg, xanchor) + self._set_property("xpad", arg, xpad) + self._set_property("xref", arg, xref) + self._set_property("y", arg, y) + self._set_property("yanchor", arg, yanchor) + self._set_property("ypad", arg, ypad) + self._set_property("yref", arg, yref) + self._process_kwargs(**dict(arg, **kwargs)) + self._skip_invalid = False diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/contourcarpet/_contours.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/contourcarpet/_contours.py new file mode 100644 index 0000000000000000000000000000000000000000..86a7e221a4baf9ae562a300b9231fc5caf85a4e5 --- /dev/null +++ b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/contourcarpet/_contours.py @@ -0,0 +1,433 @@ +# --- THIS FILE IS AUTO-GENERATED --- +# Modifications will be overwitten the next time code generation run. + +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Contours(_BaseTraceHierarchyType): + _parent_path_str = "contourcarpet" + _path_str = "contourcarpet.contours" + _valid_props = { + "coloring", + "end", + "labelfont", + "labelformat", + "operation", + "showlabels", + "showlines", + "size", + "start", + "type", + "value", + } + + @property + def coloring(self): + """ + Determines the coloring method showing the contour values. If + "fill", coloring is done evenly between each contour level If + "lines", coloring is done on the contour lines. If "none", no + coloring is applied on this trace. + + The 'coloring' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['fill', 'lines', 'none'] + + Returns + ------- + Any + """ + return self["coloring"] + + @coloring.setter + def coloring(self, val): + self["coloring"] = val + + @property + def end(self): + """ + Sets the end contour level value. Must be more than + `contours.start` + + The 'end' property is a number and may be specified as: + - An int or float + + Returns + ------- + int|float + """ + return self["end"] + + @end.setter + def end(self, val): + self["end"] = val + + @property + def labelfont(self): + """ + Sets the font used for labeling the contour levels. The default + color comes from the lines, if shown. The default family and + size come from `layout.font`. + + The 'labelfont' property is an instance of Labelfont + that may be specified as: + - An instance of :class:`plotly.graph_objs.contourcarpet.contours.Labelfont` + - A dict of string/value properties that will be passed + to the Labelfont constructor + + Returns + ------- + plotly.graph_objs.contourcarpet.contours.Labelfont + """ + return self["labelfont"] + + @labelfont.setter + def labelfont(self, val): + self["labelfont"] = val + + @property + def labelformat(self): + """ + Sets the contour label formatting rule using d3 formatting + mini-languages which are very similar to those in Python. For + numbers, see: + https://github.com/d3/d3-format/tree/v1.4.5#d3-format. + + The 'labelformat' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["labelformat"] + + @labelformat.setter + def labelformat(self, val): + self["labelformat"] = val + + @property + def operation(self): + """ + Sets the constraint operation. "=" keeps regions equal to + `value` "<" and "<=" keep regions less than `value` ">" and + ">=" keep regions greater than `value` "[]", "()", "[)", and + "(]" keep regions inside `value[0]` to `value[1]` "][", ")(", + "](", ")[" keep regions outside `value[0]` to value[1]` Open + vs. closed intervals make no difference to constraint display, + but all versions are allowed for consistency with filter + transforms. + + The 'operation' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['=', '<', '>=', '>', '<=', '[]', '()', '[)', '(]', '][', + ')(', '](', ')['] + + Returns + ------- + Any + """ + return self["operation"] + + @operation.setter + def operation(self, val): + self["operation"] = val + + @property + def showlabels(self): + """ + Determines whether to label the contour lines with their + values. + + The 'showlabels' property is a boolean and must be specified as: + - A boolean value: True or False + + Returns + ------- + bool + """ + return self["showlabels"] + + @showlabels.setter + def showlabels(self, val): + self["showlabels"] = val + + @property + def showlines(self): + """ + Determines whether or not the contour lines are drawn. Has an + effect only if `contours.coloring` is set to "fill". + + The 'showlines' property is a boolean and must be specified as: + - A boolean value: True or False + + Returns + ------- + bool + """ + return self["showlines"] + + @showlines.setter + def showlines(self, val): + self["showlines"] = val + + @property + def size(self): + """ + Sets the step between each contour level. Must be positive. + + The 'size' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["size"] + + @size.setter + def size(self, val): + self["size"] = val + + @property + def start(self): + """ + Sets the starting contour level value. Must be less than + `contours.end` + + The 'start' property is a number and may be specified as: + - An int or float + + Returns + ------- + int|float + """ + return self["start"] + + @start.setter + def start(self, val): + self["start"] = val + + @property + def type(self): + """ + If `levels`, the data is represented as a contour plot with + multiple levels displayed. If `constraint`, the data is + represented as constraints with the invalid region shaded as + specified by the `operation` and `value` parameters. + + The 'type' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['levels', 'constraint'] + + Returns + ------- + Any + """ + return self["type"] + + @type.setter + def type(self, val): + self["type"] = val + + @property + def value(self): + """ + Sets the value or values of the constraint boundary. When + `operation` is set to one of the comparison values + (`=,<,>=,>,<=`) "value" is expected to be a number. When + `operation` is set to one of the interval values + (`[],(),[),(],][,)(,](,)[`) "value" is expected to be an array + of two numbers where the first is the lower bound and the + second is the upper bound. + + The 'value' property accepts values of any type + + Returns + ------- + Any + """ + return self["value"] + + @value.setter + def value(self, val): + self["value"] = val + + @property + def _prop_descriptions(self): + return """\ + coloring + Determines the coloring method showing the contour + values. If "fill", coloring is done evenly between each + contour level If "lines", coloring is done on the + contour lines. If "none", no coloring is applied on + this trace. + end + Sets the end contour level value. Must be more than + `contours.start` + labelfont + Sets the font used for labeling the contour levels. The + default color comes from the lines, if shown. The + default family and size come from `layout.font`. + labelformat + Sets the contour label formatting rule using d3 + formatting mini-languages which are very similar to + those in Python. For numbers, see: + https://github.com/d3/d3-format/tree/v1.4.5#d3-format. + operation + Sets the constraint operation. "=" keeps regions equal + to `value` "<" and "<=" keep regions less than `value` + ">" and ">=" keep regions greater than `value` "[]", + "()", "[)", and "(]" keep regions inside `value[0]` to + `value[1]` "][", ")(", "](", ")[" keep regions outside + `value[0]` to value[1]` Open vs. closed intervals make + no difference to constraint display, but all versions + are allowed for consistency with filter transforms. + showlabels + Determines whether to label the contour lines with + their values. + showlines + Determines whether or not the contour lines are drawn. + Has an effect only if `contours.coloring` is set to + "fill". + size + Sets the step between each contour level. Must be + positive. + start + Sets the starting contour level value. Must be less + than `contours.end` + type + If `levels`, the data is represented as a contour plot + with multiple levels displayed. If `constraint`, the + data is represented as constraints with the invalid + region shaded as specified by the `operation` and + `value` parameters. + value + Sets the value or values of the constraint boundary. + When `operation` is set to one of the comparison values + (`=,<,>=,>,<=`) "value" is expected to be a number. + When `operation` is set to one of the interval values + (`[],(),[),(],][,)(,](,)[`) "value" is expected to be + an array of two numbers where the first is the lower + bound and the second is the upper bound. + """ + + def __init__( + self, + arg=None, + coloring=None, + end=None, + labelfont=None, + labelformat=None, + operation=None, + showlabels=None, + showlines=None, + size=None, + start=None, + type=None, + value=None, + **kwargs, + ): + """ + Construct a new Contours object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.contourcarpet.Contours` + coloring + Determines the coloring method showing the contour + values. If "fill", coloring is done evenly between each + contour level If "lines", coloring is done on the + contour lines. If "none", no coloring is applied on + this trace. + end + Sets the end contour level value. Must be more than + `contours.start` + labelfont + Sets the font used for labeling the contour levels. The + default color comes from the lines, if shown. The + default family and size come from `layout.font`. + labelformat + Sets the contour label formatting rule using d3 + formatting mini-languages which are very similar to + those in Python. For numbers, see: + https://github.com/d3/d3-format/tree/v1.4.5#d3-format. + operation + Sets the constraint operation. "=" keeps regions equal + to `value` "<" and "<=" keep regions less than `value` + ">" and ">=" keep regions greater than `value` "[]", + "()", "[)", and "(]" keep regions inside `value[0]` to + `value[1]` "][", ")(", "](", ")[" keep regions outside + `value[0]` to value[1]` Open vs. closed intervals make + no difference to constraint display, but all versions + are allowed for consistency with filter transforms. + showlabels + Determines whether to label the contour lines with + their values. + showlines + Determines whether or not the contour lines are drawn. + Has an effect only if `contours.coloring` is set to + "fill". + size + Sets the step between each contour level. Must be + positive. + start + Sets the starting contour level value. Must be less + than `contours.end` + type + If `levels`, the data is represented as a contour plot + with multiple levels displayed. If `constraint`, the + data is represented as constraints with the invalid + region shaded as specified by the `operation` and + `value` parameters. + value + Sets the value or values of the constraint boundary. + When `operation` is set to one of the comparison values + (`=,<,>=,>,<=`) "value" is expected to be a number. + When `operation` is set to one of the interval values + (`[],(),[),(],][,)(,](,)[`) "value" is expected to be + an array of two numbers where the first is the lower + bound and the second is the upper bound. + + Returns + ------- + Contours + """ + super().__init__("contours") + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + if arg is None: + arg = {} + elif isinstance(arg, self.__class__): + arg = arg.to_plotly_json() + elif isinstance(arg, dict): + arg = _copy.copy(arg) + else: + raise ValueError("""\ +The first argument to the plotly.graph_objs.contourcarpet.Contours +constructor must be a dict or +an instance of :class:`plotly.graph_objs.contourcarpet.Contours`""") + + self._skip_invalid = kwargs.pop("skip_invalid", False) + self._validate = kwargs.pop("_validate", True) + + self._set_property("coloring", arg, coloring) + self._set_property("end", arg, end) + self._set_property("labelfont", arg, labelfont) + self._set_property("labelformat", arg, labelformat) + self._set_property("operation", arg, operation) + self._set_property("showlabels", arg, showlabels) + self._set_property("showlines", arg, showlines) + self._set_property("size", arg, size) + self._set_property("start", arg, start) + self._set_property("type", arg, type) + self._set_property("value", arg, value) + self._process_kwargs(**dict(arg, **kwargs)) + self._skip_invalid = False diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/contourcarpet/_legendgrouptitle.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/contourcarpet/_legendgrouptitle.py new file mode 100644 index 0000000000000000000000000000000000000000..77cc45aaf213acbeabcff932eb88093c6dbfbacd --- /dev/null +++ b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/contourcarpet/_legendgrouptitle.py @@ -0,0 +1,104 @@ +# --- THIS FILE IS AUTO-GENERATED --- +# Modifications will be overwitten the next time code generation run. + +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Legendgrouptitle(_BaseTraceHierarchyType): + _parent_path_str = "contourcarpet" + _path_str = "contourcarpet.legendgrouptitle" + _valid_props = {"font", "text"} + + @property + def font(self): + """ + Sets this legend group's title font. + + The 'font' property is an instance of Font + that may be specified as: + - An instance of :class:`plotly.graph_objs.contourcarpet.legendgrouptitle.Font` + - A dict of string/value properties that will be passed + to the Font constructor + + Returns + ------- + plotly.graph_objs.contourcarpet.legendgrouptitle.Font + """ + return self["font"] + + @font.setter + def font(self, val): + self["font"] = val + + @property + def text(self): + """ + Sets the title of the legend group. + + The 'text' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["text"] + + @text.setter + def text(self, val): + self["text"] = val + + @property + def _prop_descriptions(self): + return """\ + font + Sets this legend group's title font. + text + Sets the title of the legend group. + """ + + def __init__(self, arg=None, font=None, text=None, **kwargs): + """ + Construct a new Legendgrouptitle object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of :class:`plotly.graph_objs.contourcarpet. + Legendgrouptitle` + font + Sets this legend group's title font. + text + Sets the title of the legend group. + + Returns + ------- + Legendgrouptitle + """ + super().__init__("legendgrouptitle") + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + if arg is None: + arg = {} + elif isinstance(arg, self.__class__): + arg = arg.to_plotly_json() + elif isinstance(arg, dict): + arg = _copy.copy(arg) + else: + raise ValueError("""\ +The first argument to the plotly.graph_objs.contourcarpet.Legendgrouptitle +constructor must be a dict or +an instance of :class:`plotly.graph_objs.contourcarpet.Legendgrouptitle`""") + + self._skip_invalid = kwargs.pop("skip_invalid", False) + self._validate = kwargs.pop("_validate", True) + + self._set_property("font", arg, font) + self._set_property("text", arg, text) + self._process_kwargs(**dict(arg, **kwargs)) + self._skip_invalid = False diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/contourcarpet/_line.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/contourcarpet/_line.py new file mode 100644 index 0000000000000000000000000000000000000000..7846e687fc54003973f3b560ebdb2ae4ad571f8b --- /dev/null +++ b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/contourcarpet/_line.py @@ -0,0 +1,176 @@ +# --- THIS FILE IS AUTO-GENERATED --- +# Modifications will be overwitten the next time code generation run. + +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Line(_BaseTraceHierarchyType): + _parent_path_str = "contourcarpet" + _path_str = "contourcarpet.line" + _valid_props = {"color", "dash", "smoothing", "width"} + + @property + def color(self): + """ + Sets the color of the contour level. Has no effect if + `contours.coloring` is set to "lines". + + The 'color' property is a color and may be specified as: + - A hex string (e.g. '#ff0000') + - An rgb/rgba string (e.g. 'rgb(255,0,0)') + - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') + - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') + - A named CSS color: see https://plotly.com/python/css-colors/ for a list + + Returns + ------- + str + """ + return self["color"] + + @color.setter + def color(self, val): + self["color"] = val + + @property + def dash(self): + """ + Sets the dash style of lines. Set to a dash type string + ("solid", "dot", "dash", "longdash", "dashdot", or + "longdashdot") or a dash length list in px (eg + "5px,10px,2px,2px"). + + The 'dash' property is an enumeration that may be specified as: + - One of the following dash styles: + ['solid', 'dot', 'dash', 'longdash', 'dashdot', 'longdashdot'] + - A string containing a dash length list in pixels or percentages + (e.g. '5px 10px 2px 2px', '5, 10, 2, 2', '10% 20% 40%', etc.) + + Returns + ------- + str + """ + return self["dash"] + + @dash.setter + def dash(self, val): + self["dash"] = val + + @property + def smoothing(self): + """ + Sets the amount of smoothing for the contour lines, where 0 + corresponds to no smoothing. + + The 'smoothing' property is a number and may be specified as: + - An int or float in the interval [0, 1.3] + + Returns + ------- + int|float + """ + return self["smoothing"] + + @smoothing.setter + def smoothing(self, val): + self["smoothing"] = val + + @property + def width(self): + """ + Sets the contour line width in (in px) Defaults to 0.5 when + `contours.type` is "levels". Defaults to 2 when `contour.type` + is "constraint". + + The 'width' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["width"] + + @width.setter + def width(self, val): + self["width"] = val + + @property + def _prop_descriptions(self): + return """\ + color + Sets the color of the contour level. Has no effect if + `contours.coloring` is set to "lines". + dash + Sets the dash style of lines. Set to a dash type string + ("solid", "dot", "dash", "longdash", "dashdot", or + "longdashdot") or a dash length list in px (eg + "5px,10px,2px,2px"). + smoothing + Sets the amount of smoothing for the contour lines, + where 0 corresponds to no smoothing. + width + Sets the contour line width in (in px) Defaults to 0.5 + when `contours.type` is "levels". Defaults to 2 when + `contour.type` is "constraint". + """ + + def __init__( + self, arg=None, color=None, dash=None, smoothing=None, width=None, **kwargs + ): + """ + Construct a new Line object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.contourcarpet.Line` + color + Sets the color of the contour level. Has no effect if + `contours.coloring` is set to "lines". + dash + Sets the dash style of lines. Set to a dash type string + ("solid", "dot", "dash", "longdash", "dashdot", or + "longdashdot") or a dash length list in px (eg + "5px,10px,2px,2px"). + smoothing + Sets the amount of smoothing for the contour lines, + where 0 corresponds to no smoothing. + width + Sets the contour line width in (in px) Defaults to 0.5 + when `contours.type` is "levels". Defaults to 2 when + `contour.type` is "constraint". + + Returns + ------- + Line + """ + super().__init__("line") + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + if arg is None: + arg = {} + elif isinstance(arg, self.__class__): + arg = arg.to_plotly_json() + elif isinstance(arg, dict): + arg = _copy.copy(arg) + else: + raise ValueError("""\ +The first argument to the plotly.graph_objs.contourcarpet.Line +constructor must be a dict or +an instance of :class:`plotly.graph_objs.contourcarpet.Line`""") + + self._skip_invalid = kwargs.pop("skip_invalid", False) + self._validate = kwargs.pop("_validate", True) + + self._set_property("color", arg, color) + self._set_property("dash", arg, dash) + self._set_property("smoothing", arg, smoothing) + self._set_property("width", arg, width) + self._process_kwargs(**dict(arg, **kwargs)) + self._skip_invalid = False diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/contourcarpet/_stream.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/contourcarpet/_stream.py new file mode 100644 index 0000000000000000000000000000000000000000..cc8c3f79c401930be1da650987809698d72036f6 --- /dev/null +++ b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/contourcarpet/_stream.py @@ -0,0 +1,114 @@ +# --- THIS FILE IS AUTO-GENERATED --- +# Modifications will be overwitten the next time code generation run. + +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Stream(_BaseTraceHierarchyType): + _parent_path_str = "contourcarpet" + _path_str = "contourcarpet.stream" + _valid_props = {"maxpoints", "token"} + + @property + def maxpoints(self): + """ + Sets the maximum number of points to keep on the plots from an + incoming stream. If `maxpoints` is set to 50, only the newest + 50 points will be displayed on the plot. + + The 'maxpoints' property is a number and may be specified as: + - An int or float in the interval [0, 10000] + + Returns + ------- + int|float + """ + return self["maxpoints"] + + @maxpoints.setter + def maxpoints(self, val): + self["maxpoints"] = val + + @property + def token(self): + """ + The stream id number links a data trace on a plot with a + stream. See https://chart-studio.plotly.com/settings for more + details. + + The 'token' property is a string and must be specified as: + - A non-empty string + + Returns + ------- + str + """ + return self["token"] + + @token.setter + def token(self, val): + self["token"] = val + + @property + def _prop_descriptions(self): + return """\ + maxpoints + Sets the maximum number of points to keep on the plots + from an incoming stream. If `maxpoints` is set to 50, + only the newest 50 points will be displayed on the + plot. + token + The stream id number links a data trace on a plot with + a stream. See https://chart-studio.plotly.com/settings + for more details. + """ + + def __init__(self, arg=None, maxpoints=None, token=None, **kwargs): + """ + Construct a new Stream object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.contourcarpet.Stream` + maxpoints + Sets the maximum number of points to keep on the plots + from an incoming stream. If `maxpoints` is set to 50, + only the newest 50 points will be displayed on the + plot. + token + The stream id number links a data trace on a plot with + a stream. See https://chart-studio.plotly.com/settings + for more details. + + Returns + ------- + Stream + """ + super().__init__("stream") + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + if arg is None: + arg = {} + elif isinstance(arg, self.__class__): + arg = arg.to_plotly_json() + elif isinstance(arg, dict): + arg = _copy.copy(arg) + else: + raise ValueError("""\ +The first argument to the plotly.graph_objs.contourcarpet.Stream +constructor must be a dict or +an instance of :class:`plotly.graph_objs.contourcarpet.Stream`""") + + self._skip_invalid = kwargs.pop("skip_invalid", False) + self._validate = kwargs.pop("_validate", True) + + self._set_property("maxpoints", arg, maxpoints) + self._set_property("token", arg, token) + self._process_kwargs(**dict(arg, **kwargs)) + self._skip_invalid = False diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/contourcarpet/colorbar/.___init__.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/contourcarpet/colorbar/.___init__.py new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/contourcarpet/colorbar/.___init__.py differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/contourcarpet/colorbar/.___pycache__ b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/contourcarpet/colorbar/.___pycache__ new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/contourcarpet/colorbar/.___pycache__ differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/contourcarpet/colorbar/.__tickfont.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/contourcarpet/colorbar/.__tickfont.py new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/contourcarpet/colorbar/.__tickfont.py differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/contourcarpet/colorbar/.__tickformatstop.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/contourcarpet/colorbar/.__tickformatstop.py new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/contourcarpet/colorbar/.__tickformatstop.py differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/contourcarpet/colorbar/.__title.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/contourcarpet/colorbar/.__title.py new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/contourcarpet/colorbar/.__title.py differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/contourcarpet/colorbar/._title b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/contourcarpet/colorbar/._title new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/contourcarpet/colorbar/._title differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/contourcarpet/colorbar/__init__.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/contourcarpet/colorbar/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..4690d3cc738a44d43a04d43d3aa0be36d7cd34e2 --- /dev/null +++ b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/contourcarpet/colorbar/__init__.py @@ -0,0 +1,16 @@ +import sys +from typing import TYPE_CHECKING + +if TYPE_CHECKING: + from ._tickfont import Tickfont + from ._tickformatstop import Tickformatstop + from ._title import Title + from . import title +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [".title"], + ["._tickfont.Tickfont", "._tickformatstop.Tickformatstop", "._title.Title"], + ) diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/contourcarpet/colorbar/_tickfont.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/contourcarpet/colorbar/_tickfont.py new file mode 100644 index 0000000000000000000000000000000000000000..184293eee45005ee500a540d99bf02f3cc64ec98 --- /dev/null +++ b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/contourcarpet/colorbar/_tickfont.py @@ -0,0 +1,334 @@ +# --- THIS FILE IS AUTO-GENERATED --- +# Modifications will be overwitten the next time code generation run. + +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Tickfont(_BaseTraceHierarchyType): + _parent_path_str = "contourcarpet.colorbar" + _path_str = "contourcarpet.colorbar.tickfont" + _valid_props = { + "color", + "family", + "lineposition", + "shadow", + "size", + "style", + "textcase", + "variant", + "weight", + } + + @property + def color(self): + """ + The 'color' property is a color and may be specified as: + - A hex string (e.g. '#ff0000') + - An rgb/rgba string (e.g. 'rgb(255,0,0)') + - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') + - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') + - A named CSS color: see https://plotly.com/python/css-colors/ for a list + + Returns + ------- + str + """ + return self["color"] + + @color.setter + def color(self, val): + self["color"] = val + + @property + def family(self): + """ + HTML font family - the typeface that will be applied by the web + browser. The web browser can only apply a font if it is + available on the system where it runs. Provide multiple font + families, separated by commas, to indicate the order in which + to apply fonts if they aren't available. + + The 'family' property is a string and must be specified as: + - A non-empty string + + Returns + ------- + str + """ + return self["family"] + + @family.setter + def family(self, val): + self["family"] = val + + @property + def lineposition(self): + """ + Sets the kind of decoration line(s) with text, such as an + "under", "over" or "through" as well as combinations e.g. + "under+over", etc. + + The 'lineposition' property is a flaglist and may be specified + as a string containing: + - Any combination of ['under', 'over', 'through'] joined with '+' characters + (e.g. 'under+over') + OR exactly one of ['none'] (e.g. 'none') + + Returns + ------- + Any + """ + return self["lineposition"] + + @lineposition.setter + def lineposition(self, val): + self["lineposition"] = val + + @property + def shadow(self): + """ + Sets the shape and color of the shadow behind text. "auto" + places minimal shadow and applies contrast text font color. See + https://developer.mozilla.org/en-US/docs/Web/CSS/text-shadow + for additional options. + + The 'shadow' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["shadow"] + + @shadow.setter + def shadow(self, val): + self["shadow"] = val + + @property + def size(self): + """ + The 'size' property is a number and may be specified as: + - An int or float in the interval [1, inf] + + Returns + ------- + int|float + """ + return self["size"] + + @size.setter + def size(self, val): + self["size"] = val + + @property + def style(self): + """ + Sets whether a font should be styled with a normal or italic + face from its family. + + The 'style' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['normal', 'italic'] + + Returns + ------- + Any + """ + return self["style"] + + @style.setter + def style(self, val): + self["style"] = val + + @property + def textcase(self): + """ + Sets capitalization of text. It can be used to make text appear + in all-uppercase or all-lowercase, or with each word + capitalized. + + The 'textcase' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['normal', 'word caps', 'upper', 'lower'] + + Returns + ------- + Any + """ + return self["textcase"] + + @textcase.setter + def textcase(self, val): + self["textcase"] = val + + @property + def variant(self): + """ + Sets the variant of the font. + + The 'variant' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['normal', 'small-caps', 'all-small-caps', + 'all-petite-caps', 'petite-caps', 'unicase'] + + Returns + ------- + Any + """ + return self["variant"] + + @variant.setter + def variant(self, val): + self["variant"] = val + + @property + def weight(self): + """ + Sets the weight (or boldness) of the font. + + The 'weight' property is a integer and may be specified as: + - An int (or float that will be cast to an int) + in the interval [1, 1000] + OR exactly one of ['normal', 'bold'] (e.g. 'bold') + + Returns + ------- + int + """ + return self["weight"] + + @weight.setter + def weight(self, val): + self["weight"] = val + + @property + def _prop_descriptions(self): + return """\ + color + + family + HTML font family - the typeface that will be applied by + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. + lineposition + Sets the kind of decoration line(s) with text, such as + an "under", "over" or "through" as well as combinations + e.g. "under+over", etc. + shadow + Sets the shape and color of the shadow behind text. + "auto" places minimal shadow and applies contrast text + font color. See https://developer.mozilla.org/en- + US/docs/Web/CSS/text-shadow for additional options. + size + + style + Sets whether a font should be styled with a normal or + italic face from its family. + textcase + Sets capitalization of text. It can be used to make + text appear in all-uppercase or all-lowercase, or with + each word capitalized. + variant + Sets the variant of the font. + weight + Sets the weight (or boldness) of the font. + """ + + def __init__( + self, + arg=None, + color=None, + family=None, + lineposition=None, + shadow=None, + size=None, + style=None, + textcase=None, + variant=None, + weight=None, + **kwargs, + ): + """ + Construct a new Tickfont object + + Sets the color bar's tick label font + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of :class:`plotly.graph_objs.contourcarpet. + colorbar.Tickfont` + color + + family + HTML font family - the typeface that will be applied by + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. + lineposition + Sets the kind of decoration line(s) with text, such as + an "under", "over" or "through" as well as combinations + e.g. "under+over", etc. + shadow + Sets the shape and color of the shadow behind text. + "auto" places minimal shadow and applies contrast text + font color. See https://developer.mozilla.org/en- + US/docs/Web/CSS/text-shadow for additional options. + size + + style + Sets whether a font should be styled with a normal or + italic face from its family. + textcase + Sets capitalization of text. It can be used to make + text appear in all-uppercase or all-lowercase, or with + each word capitalized. + variant + Sets the variant of the font. + weight + Sets the weight (or boldness) of the font. + + Returns + ------- + Tickfont + """ + super().__init__("tickfont") + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + if arg is None: + arg = {} + elif isinstance(arg, self.__class__): + arg = arg.to_plotly_json() + elif isinstance(arg, dict): + arg = _copy.copy(arg) + else: + raise ValueError("""\ +The first argument to the plotly.graph_objs.contourcarpet.colorbar.Tickfont +constructor must be a dict or +an instance of :class:`plotly.graph_objs.contourcarpet.colorbar.Tickfont`""") + + self._skip_invalid = kwargs.pop("skip_invalid", False) + self._validate = kwargs.pop("_validate", True) + + self._set_property("color", arg, color) + self._set_property("family", arg, family) + self._set_property("lineposition", arg, lineposition) + self._set_property("shadow", arg, shadow) + self._set_property("size", arg, size) + self._set_property("style", arg, style) + self._set_property("textcase", arg, textcase) + self._set_property("variant", arg, variant) + self._set_property("weight", arg, weight) + self._process_kwargs(**dict(arg, **kwargs)) + self._skip_invalid = False diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/contourcarpet/colorbar/_tickformatstop.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/contourcarpet/colorbar/_tickformatstop.py new file mode 100644 index 0000000000000000000000000000000000000000..3a483fa6eec55c24ce5ad5bd621302720886d7fc --- /dev/null +++ b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/contourcarpet/colorbar/_tickformatstop.py @@ -0,0 +1,241 @@ +# --- THIS FILE IS AUTO-GENERATED --- +# Modifications will be overwitten the next time code generation run. + +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Tickformatstop(_BaseTraceHierarchyType): + _parent_path_str = "contourcarpet.colorbar" + _path_str = "contourcarpet.colorbar.tickformatstop" + _valid_props = {"dtickrange", "enabled", "name", "templateitemname", "value"} + + @property + def dtickrange(self): + """ + range [*min*, *max*], where "min", "max" - dtick values which + describe some zoom level, it is possible to omit "min" or "max" + value by passing "null" + + The 'dtickrange' property is an info array that may be specified as: + + * a list or tuple of 2 elements where: + (0) The 'dtickrange[0]' property accepts values of any type + (1) The 'dtickrange[1]' property accepts values of any type + + Returns + ------- + list + """ + return self["dtickrange"] + + @dtickrange.setter + def dtickrange(self, val): + self["dtickrange"] = val + + @property + def enabled(self): + """ + Determines whether or not this stop is used. If `false`, this + stop is ignored even within its `dtickrange`. + + The 'enabled' property is a boolean and must be specified as: + - A boolean value: True or False + + Returns + ------- + bool + """ + return self["enabled"] + + @enabled.setter + def enabled(self, val): + self["enabled"] = val + + @property + def name(self): + """ + When used in a template, named items are created in the output + figure in addition to any items the figure already has in this + array. You can modify these items in the output figure by + making your own item with `templateitemname` matching this + `name` alongside your modifications (including `visible: false` + or `enabled: false` to hide it). Has no effect outside of a + template. + + The 'name' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["name"] + + @name.setter + def name(self, val): + self["name"] = val + + @property + def templateitemname(self): + """ + Used to refer to a named item in this array in the template. + Named items from the template will be created even without a + matching item in the input figure, but you can modify one by + making an item with `templateitemname` matching its `name`, + alongside your modifications (including `visible: false` or + `enabled: false` to hide it). If there is no template or no + matching item, this item will be hidden unless you explicitly + show it with `visible: true`. + + The 'templateitemname' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["templateitemname"] + + @templateitemname.setter + def templateitemname(self, val): + self["templateitemname"] = val + + @property + def value(self): + """ + string - dtickformat for described zoom level, the same as + "tickformat" + + The 'value' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["value"] + + @value.setter + def value(self, val): + self["value"] = val + + @property + def _prop_descriptions(self): + return """\ + dtickrange + range [*min*, *max*], where "min", "max" - dtick values + which describe some zoom level, it is possible to omit + "min" or "max" value by passing "null" + enabled + Determines whether or not this stop is used. If + `false`, this stop is ignored even within its + `dtickrange`. + name + When used in a template, named items are created in the + output figure in addition to any items the figure + already has in this array. You can modify these items + in the output figure by making your own item with + `templateitemname` matching this `name` alongside your + modifications (including `visible: false` or `enabled: + false` to hide it). Has no effect outside of a + template. + templateitemname + Used to refer to a named item in this array in the + template. Named items from the template will be created + even without a matching item in the input figure, but + you can modify one by making an item with + `templateitemname` matching its `name`, alongside your + modifications (including `visible: false` or `enabled: + false` to hide it). If there is no template or no + matching item, this item will be hidden unless you + explicitly show it with `visible: true`. + value + string - dtickformat for described zoom level, the same + as "tickformat" + """ + + def __init__( + self, + arg=None, + dtickrange=None, + enabled=None, + name=None, + templateitemname=None, + value=None, + **kwargs, + ): + """ + Construct a new Tickformatstop object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of :class:`plotly.graph_objs.contourcarpet. + colorbar.Tickformatstop` + dtickrange + range [*min*, *max*], where "min", "max" - dtick values + which describe some zoom level, it is possible to omit + "min" or "max" value by passing "null" + enabled + Determines whether or not this stop is used. If + `false`, this stop is ignored even within its + `dtickrange`. + name + When used in a template, named items are created in the + output figure in addition to any items the figure + already has in this array. You can modify these items + in the output figure by making your own item with + `templateitemname` matching this `name` alongside your + modifications (including `visible: false` or `enabled: + false` to hide it). Has no effect outside of a + template. + templateitemname + Used to refer to a named item in this array in the + template. Named items from the template will be created + even without a matching item in the input figure, but + you can modify one by making an item with + `templateitemname` matching its `name`, alongside your + modifications (including `visible: false` or `enabled: + false` to hide it). If there is no template or no + matching item, this item will be hidden unless you + explicitly show it with `visible: true`. + value + string - dtickformat for described zoom level, the same + as "tickformat" + + Returns + ------- + Tickformatstop + """ + super().__init__("tickformatstops") + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + if arg is None: + arg = {} + elif isinstance(arg, self.__class__): + arg = arg.to_plotly_json() + elif isinstance(arg, dict): + arg = _copy.copy(arg) + else: + raise ValueError("""\ +The first argument to the plotly.graph_objs.contourcarpet.colorbar.Tickformatstop +constructor must be a dict or +an instance of :class:`plotly.graph_objs.contourcarpet.colorbar.Tickformatstop`""") + + self._skip_invalid = kwargs.pop("skip_invalid", False) + self._validate = kwargs.pop("_validate", True) + + self._set_property("dtickrange", arg, dtickrange) + self._set_property("enabled", arg, enabled) + self._set_property("name", arg, name) + self._set_property("templateitemname", arg, templateitemname) + self._set_property("value", arg, value) + self._process_kwargs(**dict(arg, **kwargs)) + self._skip_invalid = False diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/contourcarpet/colorbar/_title.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/contourcarpet/colorbar/_title.py new file mode 100644 index 0000000000000000000000000000000000000000..879af1dbfb311b4f9ed3e55f227c9e1d1e02e021 --- /dev/null +++ b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/contourcarpet/colorbar/_title.py @@ -0,0 +1,136 @@ +# --- THIS FILE IS AUTO-GENERATED --- +# Modifications will be overwitten the next time code generation run. + +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Title(_BaseTraceHierarchyType): + _parent_path_str = "contourcarpet.colorbar" + _path_str = "contourcarpet.colorbar.title" + _valid_props = {"font", "side", "text"} + + @property + def font(self): + """ + Sets this color bar's title font. + + The 'font' property is an instance of Font + that may be specified as: + - An instance of :class:`plotly.graph_objs.contourcarpet.colorbar.title.Font` + - A dict of string/value properties that will be passed + to the Font constructor + + Returns + ------- + plotly.graph_objs.contourcarpet.colorbar.title.Font + """ + return self["font"] + + @font.setter + def font(self, val): + self["font"] = val + + @property + def side(self): + """ + Determines the location of color bar's title with respect to + the color bar. Defaults to "top" when `orientation` if "v" and + defaults to "right" when `orientation` if "h". + + The 'side' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['right', 'top', 'bottom'] + + Returns + ------- + Any + """ + return self["side"] + + @side.setter + def side(self, val): + self["side"] = val + + @property + def text(self): + """ + Sets the title of the color bar. + + The 'text' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["text"] + + @text.setter + def text(self, val): + self["text"] = val + + @property + def _prop_descriptions(self): + return """\ + font + Sets this color bar's title font. + side + Determines the location of color bar's title with + respect to the color bar. Defaults to "top" when + `orientation` if "v" and defaults to "right" when + `orientation` if "h". + text + Sets the title of the color bar. + """ + + def __init__(self, arg=None, font=None, side=None, text=None, **kwargs): + """ + Construct a new Title object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.contourcarpet.colorbar.Title` + font + Sets this color bar's title font. + side + Determines the location of color bar's title with + respect to the color bar. Defaults to "top" when + `orientation` if "v" and defaults to "right" when + `orientation` if "h". + text + Sets the title of the color bar. + + Returns + ------- + Title + """ + super().__init__("title") + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + if arg is None: + arg = {} + elif isinstance(arg, self.__class__): + arg = arg.to_plotly_json() + elif isinstance(arg, dict): + arg = _copy.copy(arg) + else: + raise ValueError("""\ +The first argument to the plotly.graph_objs.contourcarpet.colorbar.Title +constructor must be a dict or +an instance of :class:`plotly.graph_objs.contourcarpet.colorbar.Title`""") + + self._skip_invalid = kwargs.pop("skip_invalid", False) + self._validate = kwargs.pop("_validate", True) + + self._set_property("font", arg, font) + self._set_property("side", arg, side) + self._set_property("text", arg, text) + self._process_kwargs(**dict(arg, **kwargs)) + self._skip_invalid = False diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/contourcarpet/colorbar/title/.___init__.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/contourcarpet/colorbar/title/.___init__.py new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/contourcarpet/colorbar/title/.___init__.py differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/contourcarpet/colorbar/title/.___pycache__ b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/contourcarpet/colorbar/title/.___pycache__ new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/contourcarpet/colorbar/title/.___pycache__ differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/contourcarpet/colorbar/title/.__font.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/contourcarpet/colorbar/title/.__font.py new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/contourcarpet/colorbar/title/.__font.py differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/contourcarpet/colorbar/title/__init__.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/contourcarpet/colorbar/title/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..56f600d3458c41f269053307377e9707ab13e090 --- /dev/null +++ b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/contourcarpet/colorbar/title/__init__.py @@ -0,0 +1,9 @@ +import sys +from typing import TYPE_CHECKING + +if TYPE_CHECKING: + from ._font import Font +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import(__name__, [], ["._font.Font"]) diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/contourcarpet/colorbar/title/_font.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/contourcarpet/colorbar/title/_font.py new file mode 100644 index 0000000000000000000000000000000000000000..673f011f804ef6a2ce09a20a2a579ba31fd5d774 --- /dev/null +++ b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/contourcarpet/colorbar/title/_font.py @@ -0,0 +1,334 @@ +# --- THIS FILE IS AUTO-GENERATED --- +# Modifications will be overwitten the next time code generation run. + +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Font(_BaseTraceHierarchyType): + _parent_path_str = "contourcarpet.colorbar.title" + _path_str = "contourcarpet.colorbar.title.font" + _valid_props = { + "color", + "family", + "lineposition", + "shadow", + "size", + "style", + "textcase", + "variant", + "weight", + } + + @property + def color(self): + """ + The 'color' property is a color and may be specified as: + - A hex string (e.g. '#ff0000') + - An rgb/rgba string (e.g. 'rgb(255,0,0)') + - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') + - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') + - A named CSS color: see https://plotly.com/python/css-colors/ for a list + + Returns + ------- + str + """ + return self["color"] + + @color.setter + def color(self, val): + self["color"] = val + + @property + def family(self): + """ + HTML font family - the typeface that will be applied by the web + browser. The web browser can only apply a font if it is + available on the system where it runs. Provide multiple font + families, separated by commas, to indicate the order in which + to apply fonts if they aren't available. + + The 'family' property is a string and must be specified as: + - A non-empty string + + Returns + ------- + str + """ + return self["family"] + + @family.setter + def family(self, val): + self["family"] = val + + @property + def lineposition(self): + """ + Sets the kind of decoration line(s) with text, such as an + "under", "over" or "through" as well as combinations e.g. + "under+over", etc. + + The 'lineposition' property is a flaglist and may be specified + as a string containing: + - Any combination of ['under', 'over', 'through'] joined with '+' characters + (e.g. 'under+over') + OR exactly one of ['none'] (e.g. 'none') + + Returns + ------- + Any + """ + return self["lineposition"] + + @lineposition.setter + def lineposition(self, val): + self["lineposition"] = val + + @property + def shadow(self): + """ + Sets the shape and color of the shadow behind text. "auto" + places minimal shadow and applies contrast text font color. See + https://developer.mozilla.org/en-US/docs/Web/CSS/text-shadow + for additional options. + + The 'shadow' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["shadow"] + + @shadow.setter + def shadow(self, val): + self["shadow"] = val + + @property + def size(self): + """ + The 'size' property is a number and may be specified as: + - An int or float in the interval [1, inf] + + Returns + ------- + int|float + """ + return self["size"] + + @size.setter + def size(self, val): + self["size"] = val + + @property + def style(self): + """ + Sets whether a font should be styled with a normal or italic + face from its family. + + The 'style' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['normal', 'italic'] + + Returns + ------- + Any + """ + return self["style"] + + @style.setter + def style(self, val): + self["style"] = val + + @property + def textcase(self): + """ + Sets capitalization of text. It can be used to make text appear + in all-uppercase or all-lowercase, or with each word + capitalized. + + The 'textcase' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['normal', 'word caps', 'upper', 'lower'] + + Returns + ------- + Any + """ + return self["textcase"] + + @textcase.setter + def textcase(self, val): + self["textcase"] = val + + @property + def variant(self): + """ + Sets the variant of the font. + + The 'variant' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['normal', 'small-caps', 'all-small-caps', + 'all-petite-caps', 'petite-caps', 'unicase'] + + Returns + ------- + Any + """ + return self["variant"] + + @variant.setter + def variant(self, val): + self["variant"] = val + + @property + def weight(self): + """ + Sets the weight (or boldness) of the font. + + The 'weight' property is a integer and may be specified as: + - An int (or float that will be cast to an int) + in the interval [1, 1000] + OR exactly one of ['normal', 'bold'] (e.g. 'bold') + + Returns + ------- + int + """ + return self["weight"] + + @weight.setter + def weight(self, val): + self["weight"] = val + + @property + def _prop_descriptions(self): + return """\ + color + + family + HTML font family - the typeface that will be applied by + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. + lineposition + Sets the kind of decoration line(s) with text, such as + an "under", "over" or "through" as well as combinations + e.g. "under+over", etc. + shadow + Sets the shape and color of the shadow behind text. + "auto" places minimal shadow and applies contrast text + font color. See https://developer.mozilla.org/en- + US/docs/Web/CSS/text-shadow for additional options. + size + + style + Sets whether a font should be styled with a normal or + italic face from its family. + textcase + Sets capitalization of text. It can be used to make + text appear in all-uppercase or all-lowercase, or with + each word capitalized. + variant + Sets the variant of the font. + weight + Sets the weight (or boldness) of the font. + """ + + def __init__( + self, + arg=None, + color=None, + family=None, + lineposition=None, + shadow=None, + size=None, + style=None, + textcase=None, + variant=None, + weight=None, + **kwargs, + ): + """ + Construct a new Font object + + Sets this color bar's title font. + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of :class:`plotly.graph_objs.contourcarpet. + colorbar.title.Font` + color + + family + HTML font family - the typeface that will be applied by + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. + lineposition + Sets the kind of decoration line(s) with text, such as + an "under", "over" or "through" as well as combinations + e.g. "under+over", etc. + shadow + Sets the shape and color of the shadow behind text. + "auto" places minimal shadow and applies contrast text + font color. See https://developer.mozilla.org/en- + US/docs/Web/CSS/text-shadow for additional options. + size + + style + Sets whether a font should be styled with a normal or + italic face from its family. + textcase + Sets capitalization of text. It can be used to make + text appear in all-uppercase or all-lowercase, or with + each word capitalized. + variant + Sets the variant of the font. + weight + Sets the weight (or boldness) of the font. + + Returns + ------- + Font + """ + super().__init__("font") + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + if arg is None: + arg = {} + elif isinstance(arg, self.__class__): + arg = arg.to_plotly_json() + elif isinstance(arg, dict): + arg = _copy.copy(arg) + else: + raise ValueError("""\ +The first argument to the plotly.graph_objs.contourcarpet.colorbar.title.Font +constructor must be a dict or +an instance of :class:`plotly.graph_objs.contourcarpet.colorbar.title.Font`""") + + self._skip_invalid = kwargs.pop("skip_invalid", False) + self._validate = kwargs.pop("_validate", True) + + self._set_property("color", arg, color) + self._set_property("family", arg, family) + self._set_property("lineposition", arg, lineposition) + self._set_property("shadow", arg, shadow) + self._set_property("size", arg, size) + self._set_property("style", arg, style) + self._set_property("textcase", arg, textcase) + self._set_property("variant", arg, variant) + self._set_property("weight", arg, weight) + self._process_kwargs(**dict(arg, **kwargs)) + self._skip_invalid = False diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/contourcarpet/contours/.___init__.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/contourcarpet/contours/.___init__.py new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/contourcarpet/contours/.___init__.py differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/contourcarpet/contours/.___pycache__ b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/contourcarpet/contours/.___pycache__ new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/contourcarpet/contours/.___pycache__ differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/contourcarpet/contours/.__labelfont.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/contourcarpet/contours/.__labelfont.py new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/contourcarpet/contours/.__labelfont.py differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/contourcarpet/contours/__init__.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/contourcarpet/contours/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..48d6bb693ba4b0221e76bfec4847f41eb4fc0fd2 --- /dev/null +++ b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/contourcarpet/contours/__init__.py @@ -0,0 +1,11 @@ +import sys +from typing import TYPE_CHECKING + +if TYPE_CHECKING: + from ._labelfont import Labelfont +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, [], ["._labelfont.Labelfont"] + ) diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/contourcarpet/contours/_labelfont.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/contourcarpet/contours/_labelfont.py new file mode 100644 index 0000000000000000000000000000000000000000..d880ceb590d4ab785d4b222b9e0b6cffa1153749 --- /dev/null +++ b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/contourcarpet/contours/_labelfont.py @@ -0,0 +1,336 @@ +# --- THIS FILE IS AUTO-GENERATED --- +# Modifications will be overwitten the next time code generation run. + +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Labelfont(_BaseTraceHierarchyType): + _parent_path_str = "contourcarpet.contours" + _path_str = "contourcarpet.contours.labelfont" + _valid_props = { + "color", + "family", + "lineposition", + "shadow", + "size", + "style", + "textcase", + "variant", + "weight", + } + + @property + def color(self): + """ + The 'color' property is a color and may be specified as: + - A hex string (e.g. '#ff0000') + - An rgb/rgba string (e.g. 'rgb(255,0,0)') + - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') + - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') + - A named CSS color: see https://plotly.com/python/css-colors/ for a list + + Returns + ------- + str + """ + return self["color"] + + @color.setter + def color(self, val): + self["color"] = val + + @property + def family(self): + """ + HTML font family - the typeface that will be applied by the web + browser. The web browser can only apply a font if it is + available on the system where it runs. Provide multiple font + families, separated by commas, to indicate the order in which + to apply fonts if they aren't available. + + The 'family' property is a string and must be specified as: + - A non-empty string + + Returns + ------- + str + """ + return self["family"] + + @family.setter + def family(self, val): + self["family"] = val + + @property + def lineposition(self): + """ + Sets the kind of decoration line(s) with text, such as an + "under", "over" or "through" as well as combinations e.g. + "under+over", etc. + + The 'lineposition' property is a flaglist and may be specified + as a string containing: + - Any combination of ['under', 'over', 'through'] joined with '+' characters + (e.g. 'under+over') + OR exactly one of ['none'] (e.g. 'none') + + Returns + ------- + Any + """ + return self["lineposition"] + + @lineposition.setter + def lineposition(self, val): + self["lineposition"] = val + + @property + def shadow(self): + """ + Sets the shape and color of the shadow behind text. "auto" + places minimal shadow and applies contrast text font color. See + https://developer.mozilla.org/en-US/docs/Web/CSS/text-shadow + for additional options. + + The 'shadow' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["shadow"] + + @shadow.setter + def shadow(self, val): + self["shadow"] = val + + @property + def size(self): + """ + The 'size' property is a number and may be specified as: + - An int or float in the interval [1, inf] + + Returns + ------- + int|float + """ + return self["size"] + + @size.setter + def size(self, val): + self["size"] = val + + @property + def style(self): + """ + Sets whether a font should be styled with a normal or italic + face from its family. + + The 'style' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['normal', 'italic'] + + Returns + ------- + Any + """ + return self["style"] + + @style.setter + def style(self, val): + self["style"] = val + + @property + def textcase(self): + """ + Sets capitalization of text. It can be used to make text appear + in all-uppercase or all-lowercase, or with each word + capitalized. + + The 'textcase' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['normal', 'word caps', 'upper', 'lower'] + + Returns + ------- + Any + """ + return self["textcase"] + + @textcase.setter + def textcase(self, val): + self["textcase"] = val + + @property + def variant(self): + """ + Sets the variant of the font. + + The 'variant' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['normal', 'small-caps', 'all-small-caps', + 'all-petite-caps', 'petite-caps', 'unicase'] + + Returns + ------- + Any + """ + return self["variant"] + + @variant.setter + def variant(self, val): + self["variant"] = val + + @property + def weight(self): + """ + Sets the weight (or boldness) of the font. + + The 'weight' property is a integer and may be specified as: + - An int (or float that will be cast to an int) + in the interval [1, 1000] + OR exactly one of ['normal', 'bold'] (e.g. 'bold') + + Returns + ------- + int + """ + return self["weight"] + + @weight.setter + def weight(self, val): + self["weight"] = val + + @property + def _prop_descriptions(self): + return """\ + color + + family + HTML font family - the typeface that will be applied by + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. + lineposition + Sets the kind of decoration line(s) with text, such as + an "under", "over" or "through" as well as combinations + e.g. "under+over", etc. + shadow + Sets the shape and color of the shadow behind text. + "auto" places minimal shadow and applies contrast text + font color. See https://developer.mozilla.org/en- + US/docs/Web/CSS/text-shadow for additional options. + size + + style + Sets whether a font should be styled with a normal or + italic face from its family. + textcase + Sets capitalization of text. It can be used to make + text appear in all-uppercase or all-lowercase, or with + each word capitalized. + variant + Sets the variant of the font. + weight + Sets the weight (or boldness) of the font. + """ + + def __init__( + self, + arg=None, + color=None, + family=None, + lineposition=None, + shadow=None, + size=None, + style=None, + textcase=None, + variant=None, + weight=None, + **kwargs, + ): + """ + Construct a new Labelfont object + + Sets the font used for labeling the contour levels. The default + color comes from the lines, if shown. The default family and + size come from `layout.font`. + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of :class:`plotly.graph_objs.contourcarpet. + contours.Labelfont` + color + + family + HTML font family - the typeface that will be applied by + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. + lineposition + Sets the kind of decoration line(s) with text, such as + an "under", "over" or "through" as well as combinations + e.g. "under+over", etc. + shadow + Sets the shape and color of the shadow behind text. + "auto" places minimal shadow and applies contrast text + font color. See https://developer.mozilla.org/en- + US/docs/Web/CSS/text-shadow for additional options. + size + + style + Sets whether a font should be styled with a normal or + italic face from its family. + textcase + Sets capitalization of text. It can be used to make + text appear in all-uppercase or all-lowercase, or with + each word capitalized. + variant + Sets the variant of the font. + weight + Sets the weight (or boldness) of the font. + + Returns + ------- + Labelfont + """ + super().__init__("labelfont") + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + if arg is None: + arg = {} + elif isinstance(arg, self.__class__): + arg = arg.to_plotly_json() + elif isinstance(arg, dict): + arg = _copy.copy(arg) + else: + raise ValueError("""\ +The first argument to the plotly.graph_objs.contourcarpet.contours.Labelfont +constructor must be a dict or +an instance of :class:`plotly.graph_objs.contourcarpet.contours.Labelfont`""") + + self._skip_invalid = kwargs.pop("skip_invalid", False) + self._validate = kwargs.pop("_validate", True) + + self._set_property("color", arg, color) + self._set_property("family", arg, family) + self._set_property("lineposition", arg, lineposition) + self._set_property("shadow", arg, shadow) + self._set_property("size", arg, size) + self._set_property("style", arg, style) + self._set_property("textcase", arg, textcase) + self._set_property("variant", arg, variant) + self._set_property("weight", arg, weight) + self._process_kwargs(**dict(arg, **kwargs)) + self._skip_invalid = False diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/contourcarpet/legendgrouptitle/.___init__.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/contourcarpet/legendgrouptitle/.___init__.py new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/contourcarpet/legendgrouptitle/.___init__.py differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/contourcarpet/legendgrouptitle/.___pycache__ b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/contourcarpet/legendgrouptitle/.___pycache__ new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/contourcarpet/legendgrouptitle/.___pycache__ differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/contourcarpet/legendgrouptitle/.__font.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/contourcarpet/legendgrouptitle/.__font.py new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/contourcarpet/legendgrouptitle/.__font.py differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/contourcarpet/legendgrouptitle/__init__.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/contourcarpet/legendgrouptitle/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..56f600d3458c41f269053307377e9707ab13e090 --- /dev/null +++ b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/contourcarpet/legendgrouptitle/__init__.py @@ -0,0 +1,9 @@ +import sys +from typing import TYPE_CHECKING + +if TYPE_CHECKING: + from ._font import Font +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import(__name__, [], ["._font.Font"]) diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/contourcarpet/legendgrouptitle/_font.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/contourcarpet/legendgrouptitle/_font.py new file mode 100644 index 0000000000000000000000000000000000000000..cf6e13180063bfcc424cd7b2ad9d312dc126a50a --- /dev/null +++ b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/contourcarpet/legendgrouptitle/_font.py @@ -0,0 +1,334 @@ +# --- THIS FILE IS AUTO-GENERATED --- +# Modifications will be overwitten the next time code generation run. + +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Font(_BaseTraceHierarchyType): + _parent_path_str = "contourcarpet.legendgrouptitle" + _path_str = "contourcarpet.legendgrouptitle.font" + _valid_props = { + "color", + "family", + "lineposition", + "shadow", + "size", + "style", + "textcase", + "variant", + "weight", + } + + @property + def color(self): + """ + The 'color' property is a color and may be specified as: + - A hex string (e.g. '#ff0000') + - An rgb/rgba string (e.g. 'rgb(255,0,0)') + - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') + - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') + - A named CSS color: see https://plotly.com/python/css-colors/ for a list + + Returns + ------- + str + """ + return self["color"] + + @color.setter + def color(self, val): + self["color"] = val + + @property + def family(self): + """ + HTML font family - the typeface that will be applied by the web + browser. The web browser can only apply a font if it is + available on the system where it runs. Provide multiple font + families, separated by commas, to indicate the order in which + to apply fonts if they aren't available. + + The 'family' property is a string and must be specified as: + - A non-empty string + + Returns + ------- + str + """ + return self["family"] + + @family.setter + def family(self, val): + self["family"] = val + + @property + def lineposition(self): + """ + Sets the kind of decoration line(s) with text, such as an + "under", "over" or "through" as well as combinations e.g. + "under+over", etc. + + The 'lineposition' property is a flaglist and may be specified + as a string containing: + - Any combination of ['under', 'over', 'through'] joined with '+' characters + (e.g. 'under+over') + OR exactly one of ['none'] (e.g. 'none') + + Returns + ------- + Any + """ + return self["lineposition"] + + @lineposition.setter + def lineposition(self, val): + self["lineposition"] = val + + @property + def shadow(self): + """ + Sets the shape and color of the shadow behind text. "auto" + places minimal shadow and applies contrast text font color. See + https://developer.mozilla.org/en-US/docs/Web/CSS/text-shadow + for additional options. + + The 'shadow' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["shadow"] + + @shadow.setter + def shadow(self, val): + self["shadow"] = val + + @property + def size(self): + """ + The 'size' property is a number and may be specified as: + - An int or float in the interval [1, inf] + + Returns + ------- + int|float + """ + return self["size"] + + @size.setter + def size(self, val): + self["size"] = val + + @property + def style(self): + """ + Sets whether a font should be styled with a normal or italic + face from its family. + + The 'style' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['normal', 'italic'] + + Returns + ------- + Any + """ + return self["style"] + + @style.setter + def style(self, val): + self["style"] = val + + @property + def textcase(self): + """ + Sets capitalization of text. It can be used to make text appear + in all-uppercase or all-lowercase, or with each word + capitalized. + + The 'textcase' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['normal', 'word caps', 'upper', 'lower'] + + Returns + ------- + Any + """ + return self["textcase"] + + @textcase.setter + def textcase(self, val): + self["textcase"] = val + + @property + def variant(self): + """ + Sets the variant of the font. + + The 'variant' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['normal', 'small-caps', 'all-small-caps', + 'all-petite-caps', 'petite-caps', 'unicase'] + + Returns + ------- + Any + """ + return self["variant"] + + @variant.setter + def variant(self, val): + self["variant"] = val + + @property + def weight(self): + """ + Sets the weight (or boldness) of the font. + + The 'weight' property is a integer and may be specified as: + - An int (or float that will be cast to an int) + in the interval [1, 1000] + OR exactly one of ['normal', 'bold'] (e.g. 'bold') + + Returns + ------- + int + """ + return self["weight"] + + @weight.setter + def weight(self, val): + self["weight"] = val + + @property + def _prop_descriptions(self): + return """\ + color + + family + HTML font family - the typeface that will be applied by + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. + lineposition + Sets the kind of decoration line(s) with text, such as + an "under", "over" or "through" as well as combinations + e.g. "under+over", etc. + shadow + Sets the shape and color of the shadow behind text. + "auto" places minimal shadow and applies contrast text + font color. See https://developer.mozilla.org/en- + US/docs/Web/CSS/text-shadow for additional options. + size + + style + Sets whether a font should be styled with a normal or + italic face from its family. + textcase + Sets capitalization of text. It can be used to make + text appear in all-uppercase or all-lowercase, or with + each word capitalized. + variant + Sets the variant of the font. + weight + Sets the weight (or boldness) of the font. + """ + + def __init__( + self, + arg=None, + color=None, + family=None, + lineposition=None, + shadow=None, + size=None, + style=None, + textcase=None, + variant=None, + weight=None, + **kwargs, + ): + """ + Construct a new Font object + + Sets this legend group's title font. + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of :class:`plotly.graph_objs.contourcarpet. + legendgrouptitle.Font` + color + + family + HTML font family - the typeface that will be applied by + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. + lineposition + Sets the kind of decoration line(s) with text, such as + an "under", "over" or "through" as well as combinations + e.g. "under+over", etc. + shadow + Sets the shape and color of the shadow behind text. + "auto" places minimal shadow and applies contrast text + font color. See https://developer.mozilla.org/en- + US/docs/Web/CSS/text-shadow for additional options. + size + + style + Sets whether a font should be styled with a normal or + italic face from its family. + textcase + Sets capitalization of text. It can be used to make + text appear in all-uppercase or all-lowercase, or with + each word capitalized. + variant + Sets the variant of the font. + weight + Sets the weight (or boldness) of the font. + + Returns + ------- + Font + """ + super().__init__("font") + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + if arg is None: + arg = {} + elif isinstance(arg, self.__class__): + arg = arg.to_plotly_json() + elif isinstance(arg, dict): + arg = _copy.copy(arg) + else: + raise ValueError("""\ +The first argument to the plotly.graph_objs.contourcarpet.legendgrouptitle.Font +constructor must be a dict or +an instance of :class:`plotly.graph_objs.contourcarpet.legendgrouptitle.Font`""") + + self._skip_invalid = kwargs.pop("skip_invalid", False) + self._validate = kwargs.pop("_validate", True) + + self._set_property("color", arg, color) + self._set_property("family", arg, family) + self._set_property("lineposition", arg, lineposition) + self._set_property("shadow", arg, shadow) + self._set_property("size", arg, size) + self._set_property("style", arg, style) + self._set_property("textcase", arg, textcase) + self._set_property("variant", arg, variant) + self._set_property("weight", arg, weight) + self._process_kwargs(**dict(arg, **kwargs)) + self._skip_invalid = False diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/densitymap/.___init__.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/densitymap/.___init__.py new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/densitymap/.___init__.py differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/densitymap/.___pycache__ b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/densitymap/.___pycache__ new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/densitymap/.___pycache__ differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/densitymap/.__colorbar.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/densitymap/.__colorbar.py new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/densitymap/.__colorbar.py differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/densitymap/.__hoverlabel.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/densitymap/.__hoverlabel.py new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/densitymap/.__hoverlabel.py differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/densitymap/.__legendgrouptitle.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/densitymap/.__legendgrouptitle.py new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/densitymap/.__legendgrouptitle.py differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/densitymap/.__stream.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/densitymap/.__stream.py new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/densitymap/.__stream.py differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/densitymap/._colorbar b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/densitymap/._colorbar new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/densitymap/._colorbar differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/densitymap/._hoverlabel b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/densitymap/._hoverlabel new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/densitymap/._hoverlabel differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/densitymap/._legendgrouptitle b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/densitymap/._legendgrouptitle new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/densitymap/._legendgrouptitle differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/densitymap/__init__.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/densitymap/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..7740f6eb1b94176403914259369671c7a60d5227 --- /dev/null +++ b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/densitymap/__init__.py @@ -0,0 +1,24 @@ +import sys +from typing import TYPE_CHECKING + +if TYPE_CHECKING: + from ._colorbar import ColorBar + from ._hoverlabel import Hoverlabel + from ._legendgrouptitle import Legendgrouptitle + from ._stream import Stream + from . import colorbar + from . import hoverlabel + from . import legendgrouptitle +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [".colorbar", ".hoverlabel", ".legendgrouptitle"], + [ + "._colorbar.ColorBar", + "._hoverlabel.Hoverlabel", + "._legendgrouptitle.Legendgrouptitle", + "._stream.Stream", + ], + ) diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/densitymap/_colorbar.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/densitymap/_colorbar.py new file mode 100644 index 0000000000000000000000000000000000000000..a50be1e8af454aa5078eab3b7bf670a8c5cc3f08 --- /dev/null +++ b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/densitymap/_colorbar.py @@ -0,0 +1,1738 @@ +# --- THIS FILE IS AUTO-GENERATED --- +# Modifications will be overwitten the next time code generation run. + +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class ColorBar(_BaseTraceHierarchyType): + _parent_path_str = "densitymap" + _path_str = "densitymap.colorbar" + _valid_props = { + "bgcolor", + "bordercolor", + "borderwidth", + "dtick", + "exponentformat", + "labelalias", + "len", + "lenmode", + "minexponent", + "nticks", + "orientation", + "outlinecolor", + "outlinewidth", + "separatethousands", + "showexponent", + "showticklabels", + "showtickprefix", + "showticksuffix", + "thickness", + "thicknessmode", + "tick0", + "tickangle", + "tickcolor", + "tickfont", + "tickformat", + "tickformatstopdefaults", + "tickformatstops", + "ticklabeloverflow", + "ticklabelposition", + "ticklabelstep", + "ticklen", + "tickmode", + "tickprefix", + "ticks", + "ticksuffix", + "ticktext", + "ticktextsrc", + "tickvals", + "tickvalssrc", + "tickwidth", + "title", + "x", + "xanchor", + "xpad", + "xref", + "y", + "yanchor", + "ypad", + "yref", + } + + @property + def bgcolor(self): + """ + Sets the color of padded area. + + The 'bgcolor' property is a color and may be specified as: + - A hex string (e.g. '#ff0000') + - An rgb/rgba string (e.g. 'rgb(255,0,0)') + - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') + - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') + - A named CSS color: see https://plotly.com/python/css-colors/ for a list + + Returns + ------- + str + """ + return self["bgcolor"] + + @bgcolor.setter + def bgcolor(self, val): + self["bgcolor"] = val + + @property + def bordercolor(self): + """ + Sets the axis line color. + + The 'bordercolor' property is a color and may be specified as: + - A hex string (e.g. '#ff0000') + - An rgb/rgba string (e.g. 'rgb(255,0,0)') + - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') + - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') + - A named CSS color: see https://plotly.com/python/css-colors/ for a list + + Returns + ------- + str + """ + return self["bordercolor"] + + @bordercolor.setter + def bordercolor(self, val): + self["bordercolor"] = val + + @property + def borderwidth(self): + """ + Sets the width (in px) or the border enclosing this color bar. + + The 'borderwidth' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["borderwidth"] + + @borderwidth.setter + def borderwidth(self, val): + self["borderwidth"] = val + + @property + def dtick(self): + """ + Sets the step in-between ticks on this axis. Use with `tick0`. + Must be a positive number, or special strings available to + "log" and "date" axes. If the axis `type` is "log", then ticks + are set every 10^(n*dtick) where n is the tick number. For + example, to set a tick mark at 1, 10, 100, 1000, ... set dtick + to 1. To set tick marks at 1, 100, 10000, ... set dtick to 2. + To set tick marks at 1, 5, 25, 125, 625, 3125, ... set dtick to + log_10(5), or 0.69897000433. "log" has several special values; + "L", where `f` is a positive number, gives ticks linearly + spaced in value (but not position). For example `tick0` = 0.1, + `dtick` = "L0.5" will put ticks at 0.1, 0.6, 1.1, 1.6 etc. To + show powers of 10 plus small digits between, use "D1" (all + digits) or "D2" (only 2 and 5). `tick0` is ignored for "D1" and + "D2". If the axis `type` is "date", then you must convert the + time to milliseconds. For example, to set the interval between + ticks to one day, set `dtick` to 86400000.0. "date" also has + special values "M" gives ticks spaced by a number of months. + `n` must be a positive integer. To set ticks on the 15th of + every third month, set `tick0` to "2000-01-15" and `dtick` to + "M3". To set ticks every 4 years, set `dtick` to "M48" + + The 'dtick' property accepts values of any type + + Returns + ------- + Any + """ + return self["dtick"] + + @dtick.setter + def dtick(self, val): + self["dtick"] = val + + @property + def exponentformat(self): + """ + Determines a formatting rule for the tick exponents. For + example, consider the number 1,000,000,000. If "none", it + appears as 1,000,000,000. If "e", 1e+9. If "E", 1E+9. If + "power", 1x10^9 (with 9 in a super script). If "SI", 1G. If + "B", 1B. "SI" uses prefixes from "femto" f (10^-15) to "tera" T + (10^12). *SI extended* covers instead the full SI range from + "quecto" q (10^-30) to "quetta" Q (10^30). If "SI" or *SI + extended* is used and the exponent is beyond the above ranges, + the formatting rule will automatically be switched to the power + notation. + + The 'exponentformat' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['none', 'e', 'E', 'power', 'SI', 'B', 'SI extended'] + + Returns + ------- + Any + """ + return self["exponentformat"] + + @exponentformat.setter + def exponentformat(self, val): + self["exponentformat"] = val + + @property + def labelalias(self): + """ + Replacement text for specific tick or hover labels. For example + using {US: 'USA', CA: 'Canada'} changes US to USA and CA to + Canada. The labels we would have shown must match the keys + exactly, after adding any tickprefix or ticksuffix. For + negative numbers the minus sign symbol used (U+2212) is wider + than the regular ascii dash. That means you need to use −1 + instead of -1. labelalias can be used with any axis type, and + both keys (if needed) and values (if desired) can include html- + like tags or MathJax. + + The 'labelalias' property accepts values of any type + + Returns + ------- + Any + """ + return self["labelalias"] + + @labelalias.setter + def labelalias(self, val): + self["labelalias"] = val + + @property + def len(self): + """ + Sets the length of the color bar This measure excludes the + padding of both ends. That is, the color bar length is this + length minus the padding on both ends. + + The 'len' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["len"] + + @len.setter + def len(self, val): + self["len"] = val + + @property + def lenmode(self): + """ + Determines whether this color bar's length (i.e. the measure in + the color variation direction) is set in units of plot + "fraction" or in *pixels. Use `len` to set the value. + + The 'lenmode' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['fraction', 'pixels'] + + Returns + ------- + Any + """ + return self["lenmode"] + + @lenmode.setter + def lenmode(self, val): + self["lenmode"] = val + + @property + def minexponent(self): + """ + Hide SI prefix for 10^n if |n| is below this number. This only + has an effect when `tickformat` is "SI" or "B". + + The 'minexponent' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["minexponent"] + + @minexponent.setter + def minexponent(self, val): + self["minexponent"] = val + + @property + def nticks(self): + """ + Specifies the maximum number of ticks for the particular axis. + The actual number of ticks will be chosen automatically to be + less than or equal to `nticks`. Has an effect only if + `tickmode` is set to "auto". + + The 'nticks' property is a integer and may be specified as: + - An int (or float that will be cast to an int) + in the interval [0, 9223372036854775807] + + Returns + ------- + int + """ + return self["nticks"] + + @nticks.setter + def nticks(self, val): + self["nticks"] = val + + @property + def orientation(self): + """ + Sets the orientation of the colorbar. + + The 'orientation' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['h', 'v'] + + Returns + ------- + Any + """ + return self["orientation"] + + @orientation.setter + def orientation(self, val): + self["orientation"] = val + + @property + def outlinecolor(self): + """ + Sets the axis line color. + + The 'outlinecolor' property is a color and may be specified as: + - A hex string (e.g. '#ff0000') + - An rgb/rgba string (e.g. 'rgb(255,0,0)') + - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') + - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') + - A named CSS color: see https://plotly.com/python/css-colors/ for a list + + Returns + ------- + str + """ + return self["outlinecolor"] + + @outlinecolor.setter + def outlinecolor(self, val): + self["outlinecolor"] = val + + @property + def outlinewidth(self): + """ + Sets the width (in px) of the axis line. + + The 'outlinewidth' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["outlinewidth"] + + @outlinewidth.setter + def outlinewidth(self, val): + self["outlinewidth"] = val + + @property + def separatethousands(self): + """ + If "true", even 4-digit integers are separated + + The 'separatethousands' property is a boolean and must be specified as: + - A boolean value: True or False + + Returns + ------- + bool + """ + return self["separatethousands"] + + @separatethousands.setter + def separatethousands(self, val): + self["separatethousands"] = val + + @property + def showexponent(self): + """ + If "all", all exponents are shown besides their significands. + If "first", only the exponent of the first tick is shown. If + "last", only the exponent of the last tick is shown. If "none", + no exponents appear. + + The 'showexponent' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['all', 'first', 'last', 'none'] + + Returns + ------- + Any + """ + return self["showexponent"] + + @showexponent.setter + def showexponent(self, val): + self["showexponent"] = val + + @property + def showticklabels(self): + """ + Determines whether or not the tick labels are drawn. + + The 'showticklabels' property is a boolean and must be specified as: + - A boolean value: True or False + + Returns + ------- + bool + """ + return self["showticklabels"] + + @showticklabels.setter + def showticklabels(self, val): + self["showticklabels"] = val + + @property + def showtickprefix(self): + """ + If "all", all tick labels are displayed with a prefix. If + "first", only the first tick is displayed with a prefix. If + "last", only the last tick is displayed with a suffix. If + "none", tick prefixes are hidden. + + The 'showtickprefix' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['all', 'first', 'last', 'none'] + + Returns + ------- + Any + """ + return self["showtickprefix"] + + @showtickprefix.setter + def showtickprefix(self, val): + self["showtickprefix"] = val + + @property + def showticksuffix(self): + """ + Same as `showtickprefix` but for tick suffixes. + + The 'showticksuffix' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['all', 'first', 'last', 'none'] + + Returns + ------- + Any + """ + return self["showticksuffix"] + + @showticksuffix.setter + def showticksuffix(self, val): + self["showticksuffix"] = val + + @property + def thickness(self): + """ + Sets the thickness of the color bar This measure excludes the + size of the padding, ticks and labels. + + The 'thickness' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["thickness"] + + @thickness.setter + def thickness(self, val): + self["thickness"] = val + + @property + def thicknessmode(self): + """ + Determines whether this color bar's thickness (i.e. the measure + in the constant color direction) is set in units of plot + "fraction" or in "pixels". Use `thickness` to set the value. + + The 'thicknessmode' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['fraction', 'pixels'] + + Returns + ------- + Any + """ + return self["thicknessmode"] + + @thicknessmode.setter + def thicknessmode(self, val): + self["thicknessmode"] = val + + @property + def tick0(self): + """ + Sets the placement of the first tick on this axis. Use with + `dtick`. If the axis `type` is "log", then you must take the + log of your starting tick (e.g. to set the starting tick to + 100, set the `tick0` to 2) except when `dtick`=*L* (see + `dtick` for more info). If the axis `type` is "date", it should + be a date string, like date data. If the axis `type` is + "category", it should be a number, using the scale where each + category is assigned a serial number from zero in the order it + appears. + + The 'tick0' property accepts values of any type + + Returns + ------- + Any + """ + return self["tick0"] + + @tick0.setter + def tick0(self, val): + self["tick0"] = val + + @property + def tickangle(self): + """ + Sets the angle of the tick labels with respect to the + horizontal. For example, a `tickangle` of -90 draws the tick + labels vertically. + + The 'tickangle' property is a angle (in degrees) that may be + specified as a number between -180 and 180. + Numeric values outside this range are converted to the equivalent value + (e.g. 270 is converted to -90). + + Returns + ------- + int|float + """ + return self["tickangle"] + + @tickangle.setter + def tickangle(self, val): + self["tickangle"] = val + + @property + def tickcolor(self): + """ + Sets the tick color. + + The 'tickcolor' property is a color and may be specified as: + - A hex string (e.g. '#ff0000') + - An rgb/rgba string (e.g. 'rgb(255,0,0)') + - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') + - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') + - A named CSS color: see https://plotly.com/python/css-colors/ for a list + + Returns + ------- + str + """ + return self["tickcolor"] + + @tickcolor.setter + def tickcolor(self, val): + self["tickcolor"] = val + + @property + def tickfont(self): + """ + Sets the color bar's tick label font + + The 'tickfont' property is an instance of Tickfont + that may be specified as: + - An instance of :class:`plotly.graph_objs.densitymap.colorbar.Tickfont` + - A dict of string/value properties that will be passed + to the Tickfont constructor + + Returns + ------- + plotly.graph_objs.densitymap.colorbar.Tickfont + """ + return self["tickfont"] + + @tickfont.setter + def tickfont(self, val): + self["tickfont"] = val + + @property + def tickformat(self): + """ + Sets the tick label formatting rule using d3 formatting mini- + languages which are very similar to those in Python. For + numbers, see: + https://github.com/d3/d3-format/tree/v1.4.5#d3-format. And for + dates see: https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format. We add two items to d3's date + formatter: "%h" for half of the year as a decimal number as + well as "%{n}f" for fractional seconds with n digits. For + example, *2016-10-13 09:15:23.456* with tickformat + "%H~%M~%S.%2f" would display "09~15~23.46" + + The 'tickformat' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["tickformat"] + + @tickformat.setter + def tickformat(self, val): + self["tickformat"] = val + + @property + def tickformatstops(self): + """ + The 'tickformatstops' property is a tuple of instances of + Tickformatstop that may be specified as: + - A list or tuple of instances of plotly.graph_objs.densitymap.colorbar.Tickformatstop + - A list or tuple of dicts of string/value properties that + will be passed to the Tickformatstop constructor + + Returns + ------- + tuple[plotly.graph_objs.densitymap.colorbar.Tickformatstop] + """ + return self["tickformatstops"] + + @tickformatstops.setter + def tickformatstops(self, val): + self["tickformatstops"] = val + + @property + def tickformatstopdefaults(self): + """ + When used in a template (as layout.template.data.densitymap.col + orbar.tickformatstopdefaults), sets the default property values + to use for elements of densitymap.colorbar.tickformatstops + + The 'tickformatstopdefaults' property is an instance of Tickformatstop + that may be specified as: + - An instance of :class:`plotly.graph_objs.densitymap.colorbar.Tickformatstop` + - A dict of string/value properties that will be passed + to the Tickformatstop constructor + + Returns + ------- + plotly.graph_objs.densitymap.colorbar.Tickformatstop + """ + return self["tickformatstopdefaults"] + + @tickformatstopdefaults.setter + def tickformatstopdefaults(self, val): + self["tickformatstopdefaults"] = val + + @property + def ticklabeloverflow(self): + """ + Determines how we handle tick labels that would overflow either + the graph div or the domain of the axis. The default value for + inside tick labels is *hide past domain*. In other cases the + default is *hide past div*. + + The 'ticklabeloverflow' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['allow', 'hide past div', 'hide past domain'] + + Returns + ------- + Any + """ + return self["ticklabeloverflow"] + + @ticklabeloverflow.setter + def ticklabeloverflow(self, val): + self["ticklabeloverflow"] = val + + @property + def ticklabelposition(self): + """ + Determines where tick labels are drawn relative to the ticks. + Left and right options are used when `orientation` is "h", top + and bottom when `orientation` is "v". + + The 'ticklabelposition' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['outside', 'inside', 'outside top', 'inside top', + 'outside left', 'inside left', 'outside right', 'inside + right', 'outside bottom', 'inside bottom'] + + Returns + ------- + Any + """ + return self["ticklabelposition"] + + @ticklabelposition.setter + def ticklabelposition(self, val): + self["ticklabelposition"] = val + + @property + def ticklabelstep(self): + """ + Sets the spacing between tick labels as compared to the spacing + between ticks. A value of 1 (default) means each tick gets a + label. A value of 2 means shows every 2nd label. A larger value + n means only every nth tick is labeled. `tick0` determines + which labels are shown. Not implemented for axes with `type` + "log" or "multicategory", or when `tickmode` is "array". + + The 'ticklabelstep' property is a integer and may be specified as: + - An int (or float that will be cast to an int) + in the interval [1, 9223372036854775807] + + Returns + ------- + int + """ + return self["ticklabelstep"] + + @ticklabelstep.setter + def ticklabelstep(self, val): + self["ticklabelstep"] = val + + @property + def ticklen(self): + """ + Sets the tick length (in px). + + The 'ticklen' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["ticklen"] + + @ticklen.setter + def ticklen(self, val): + self["ticklen"] = val + + @property + def tickmode(self): + """ + Sets the tick mode for this axis. If "auto", the number of + ticks is set via `nticks`. If "linear", the placement of the + ticks is determined by a starting position `tick0` and a tick + step `dtick` ("linear" is the default value if `tick0` and + `dtick` are provided). If "array", the placement of the ticks + is set via `tickvals` and the tick text is `ticktext`. ("array" + is the default value if `tickvals` is provided). + + The 'tickmode' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['auto', 'linear', 'array'] + + Returns + ------- + Any + """ + return self["tickmode"] + + @tickmode.setter + def tickmode(self, val): + self["tickmode"] = val + + @property + def tickprefix(self): + """ + Sets a tick label prefix. + + The 'tickprefix' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["tickprefix"] + + @tickprefix.setter + def tickprefix(self, val): + self["tickprefix"] = val + + @property + def ticks(self): + """ + Determines whether ticks are drawn or not. If "", this axis' + ticks are not drawn. If "outside" ("inside"), this axis' are + drawn outside (inside) the axis lines. + + The 'ticks' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['outside', 'inside', ''] + + Returns + ------- + Any + """ + return self["ticks"] + + @ticks.setter + def ticks(self, val): + self["ticks"] = val + + @property + def ticksuffix(self): + """ + Sets a tick label suffix. + + The 'ticksuffix' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["ticksuffix"] + + @ticksuffix.setter + def ticksuffix(self, val): + self["ticksuffix"] = val + + @property + def ticktext(self): + """ + Sets the text displayed at the ticks position via `tickvals`. + Only has an effect if `tickmode` is set to "array". Used with + `tickvals`. + + The 'ticktext' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["ticktext"] + + @ticktext.setter + def ticktext(self, val): + self["ticktext"] = val + + @property + def ticktextsrc(self): + """ + Sets the source reference on Chart Studio Cloud for `ticktext`. + + The 'ticktextsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["ticktextsrc"] + + @ticktextsrc.setter + def ticktextsrc(self, val): + self["ticktextsrc"] = val + + @property + def tickvals(self): + """ + Sets the values at which ticks on this axis appear. Only has an + effect if `tickmode` is set to "array". Used with `ticktext`. + + The 'tickvals' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["tickvals"] + + @tickvals.setter + def tickvals(self, val): + self["tickvals"] = val + + @property + def tickvalssrc(self): + """ + Sets the source reference on Chart Studio Cloud for `tickvals`. + + The 'tickvalssrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["tickvalssrc"] + + @tickvalssrc.setter + def tickvalssrc(self, val): + self["tickvalssrc"] = val + + @property + def tickwidth(self): + """ + Sets the tick width (in px). + + The 'tickwidth' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["tickwidth"] + + @tickwidth.setter + def tickwidth(self, val): + self["tickwidth"] = val + + @property + def title(self): + """ + The 'title' property is an instance of Title + that may be specified as: + - An instance of :class:`plotly.graph_objs.densitymap.colorbar.Title` + - A dict of string/value properties that will be passed + to the Title constructor + + Returns + ------- + plotly.graph_objs.densitymap.colorbar.Title + """ + return self["title"] + + @title.setter + def title(self, val): + self["title"] = val + + @property + def x(self): + """ + Sets the x position with respect to `xref` of the color bar (in + plot fraction). When `xref` is "paper", defaults to 1.02 when + `orientation` is "v" and 0.5 when `orientation` is "h". When + `xref` is "container", defaults to 1 when `orientation` is "v" + and 0.5 when `orientation` is "h". Must be between 0 and 1 if + `xref` is "container" and between "-2" and 3 if `xref` is + "paper". + + The 'x' property is a number and may be specified as: + - An int or float + + Returns + ------- + int|float + """ + return self["x"] + + @x.setter + def x(self, val): + self["x"] = val + + @property + def xanchor(self): + """ + Sets this color bar's horizontal position anchor. This anchor + binds the `x` position to the "left", "center" or "right" of + the color bar. Defaults to "left" when `orientation` is "v" and + "center" when `orientation` is "h". + + The 'xanchor' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['left', 'center', 'right'] + + Returns + ------- + Any + """ + return self["xanchor"] + + @xanchor.setter + def xanchor(self, val): + self["xanchor"] = val + + @property + def xpad(self): + """ + Sets the amount of padding (in px) along the x direction. + + The 'xpad' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["xpad"] + + @xpad.setter + def xpad(self, val): + self["xpad"] = val + + @property + def xref(self): + """ + Sets the container `x` refers to. "container" spans the entire + `width` of the plot. "paper" refers to the width of the + plotting area only. + + The 'xref' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['container', 'paper'] + + Returns + ------- + Any + """ + return self["xref"] + + @xref.setter + def xref(self, val): + self["xref"] = val + + @property + def y(self): + """ + Sets the y position with respect to `yref` of the color bar (in + plot fraction). When `yref` is "paper", defaults to 0.5 when + `orientation` is "v" and 1.02 when `orientation` is "h". When + `yref` is "container", defaults to 0.5 when `orientation` is + "v" and 1 when `orientation` is "h". Must be between 0 and 1 if + `yref` is "container" and between "-2" and 3 if `yref` is + "paper". + + The 'y' property is a number and may be specified as: + - An int or float + + Returns + ------- + int|float + """ + return self["y"] + + @y.setter + def y(self, val): + self["y"] = val + + @property + def yanchor(self): + """ + Sets this color bar's vertical position anchor This anchor + binds the `y` position to the "top", "middle" or "bottom" of + the color bar. Defaults to "middle" when `orientation` is "v" + and "bottom" when `orientation` is "h". + + The 'yanchor' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['top', 'middle', 'bottom'] + + Returns + ------- + Any + """ + return self["yanchor"] + + @yanchor.setter + def yanchor(self, val): + self["yanchor"] = val + + @property + def ypad(self): + """ + Sets the amount of padding (in px) along the y direction. + + The 'ypad' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["ypad"] + + @ypad.setter + def ypad(self, val): + self["ypad"] = val + + @property + def yref(self): + """ + Sets the container `y` refers to. "container" spans the entire + `height` of the plot. "paper" refers to the height of the + plotting area only. + + The 'yref' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['container', 'paper'] + + Returns + ------- + Any + """ + return self["yref"] + + @yref.setter + def yref(self, val): + self["yref"] = val + + @property + def _prop_descriptions(self): + return """\ + bgcolor + Sets the color of padded area. + bordercolor + Sets the axis line color. + borderwidth + Sets the width (in px) or the border enclosing this + color bar. + dtick + Sets the step in-between ticks on this axis. Use with + `tick0`. Must be a positive number, or special strings + available to "log" and "date" axes. If the axis `type` + is "log", then ticks are set every 10^(n*dtick) where n + is the tick number. For example, to set a tick mark at + 1, 10, 100, 1000, ... set dtick to 1. To set tick marks + at 1, 100, 10000, ... set dtick to 2. To set tick marks + at 1, 5, 25, 125, 625, 3125, ... set dtick to + log_10(5), or 0.69897000433. "log" has several special + values; "L", where `f` is a positive number, gives + ticks linearly spaced in value (but not position). For + example `tick0` = 0.1, `dtick` = "L0.5" will put ticks + at 0.1, 0.6, 1.1, 1.6 etc. To show powers of 10 plus + small digits between, use "D1" (all digits) or "D2" + (only 2 and 5). `tick0` is ignored for "D1" and "D2". + If the axis `type` is "date", then you must convert the + time to milliseconds. For example, to set the interval + between ticks to one day, set `dtick` to 86400000.0. + "date" also has special values "M" gives ticks + spaced by a number of months. `n` must be a positive + integer. To set ticks on the 15th of every third month, + set `tick0` to "2000-01-15" and `dtick` to "M3". To set + ticks every 4 years, set `dtick` to "M48" + exponentformat + Determines a formatting rule for the tick exponents. + For example, consider the number 1,000,000,000. If + "none", it appears as 1,000,000,000. If "e", 1e+9. If + "E", 1E+9. If "power", 1x10^9 (with 9 in a super + script). If "SI", 1G. If "B", 1B. "SI" uses prefixes + from "femto" f (10^-15) to "tera" T (10^12). *SI + extended* covers instead the full SI range from + "quecto" q (10^-30) to "quetta" Q (10^30). If "SI" or + *SI extended* is used and the exponent is beyond the + above ranges, the formatting rule will automatically be + switched to the power notation. + labelalias + Replacement text for specific tick or hover labels. For + example using {US: 'USA', CA: 'Canada'} changes US to + USA and CA to Canada. The labels we would have shown + must match the keys exactly, after adding any + tickprefix or ticksuffix. For negative numbers the + minus sign symbol used (U+2212) is wider than the + regular ascii dash. That means you need to use −1 + instead of -1. labelalias can be used with any axis + type, and both keys (if needed) and values (if desired) + can include html-like tags or MathJax. + len + Sets the length of the color bar This measure excludes + the padding of both ends. That is, the color bar length + is this length minus the padding on both ends. + lenmode + Determines whether this color bar's length (i.e. the + measure in the color variation direction) is set in + units of plot "fraction" or in *pixels. Use `len` to + set the value. + minexponent + Hide SI prefix for 10^n if |n| is below this number. + This only has an effect when `tickformat` is "SI" or + "B". + nticks + Specifies the maximum number of ticks for the + particular axis. The actual number of ticks will be + chosen automatically to be less than or equal to + `nticks`. Has an effect only if `tickmode` is set to + "auto". + orientation + Sets the orientation of the colorbar. + outlinecolor + Sets the axis line color. + outlinewidth + Sets the width (in px) of the axis line. + separatethousands + If "true", even 4-digit integers are separated + showexponent + If "all", all exponents are shown besides their + significands. If "first", only the exponent of the + first tick is shown. If "last", only the exponent of + the last tick is shown. If "none", no exponents appear. + showticklabels + Determines whether or not the tick labels are drawn. + showtickprefix + If "all", all tick labels are displayed with a prefix. + If "first", only the first tick is displayed with a + prefix. If "last", only the last tick is displayed with + a suffix. If "none", tick prefixes are hidden. + showticksuffix + Same as `showtickprefix` but for tick suffixes. + thickness + Sets the thickness of the color bar This measure + excludes the size of the padding, ticks and labels. + thicknessmode + Determines whether this color bar's thickness (i.e. the + measure in the constant color direction) is set in + units of plot "fraction" or in "pixels". Use + `thickness` to set the value. + tick0 + Sets the placement of the first tick on this axis. Use + with `dtick`. If the axis `type` is "log", then you + must take the log of your starting tick (e.g. to set + the starting tick to 100, set the `tick0` to 2) except + when `dtick`=*L* (see `dtick` for more info). If the + axis `type` is "date", it should be a date string, like + date data. If the axis `type` is "category", it should + be a number, using the scale where each category is + assigned a serial number from zero in the order it + appears. + tickangle + Sets the angle of the tick labels with respect to the + horizontal. For example, a `tickangle` of -90 draws the + tick labels vertically. + tickcolor + Sets the tick color. + tickfont + Sets the color bar's tick label font + tickformat + Sets the tick label formatting rule using d3 formatting + mini-languages which are very similar to those in + Python. For numbers, see: + https://github.com/d3/d3-format/tree/v1.4.5#d3-format. + And for dates see: https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format. We add two items to + d3's date formatter: "%h" for half of the year as a + decimal number as well as "%{n}f" for fractional + seconds with n digits. For example, *2016-10-13 + 09:15:23.456* with tickformat "%H~%M~%S.%2f" would + display "09~15~23.46" + tickformatstops + A tuple of :class:`plotly.graph_objects.densitymap.colo + rbar.Tickformatstop` instances or dicts with compatible + properties + tickformatstopdefaults + When used in a template (as layout.template.data.densit + ymap.colorbar.tickformatstopdefaults), sets the default + property values to use for elements of + densitymap.colorbar.tickformatstops + ticklabeloverflow + Determines how we handle tick labels that would + overflow either the graph div or the domain of the + axis. The default value for inside tick labels is *hide + past domain*. In other cases the default is *hide past + div*. + ticklabelposition + Determines where tick labels are drawn relative to the + ticks. Left and right options are used when + `orientation` is "h", top and bottom when `orientation` + is "v". + ticklabelstep + Sets the spacing between tick labels as compared to the + spacing between ticks. A value of 1 (default) means + each tick gets a label. A value of 2 means shows every + 2nd label. A larger value n means only every nth tick + is labeled. `tick0` determines which labels are shown. + Not implemented for axes with `type` "log" or + "multicategory", or when `tickmode` is "array". + ticklen + Sets the tick length (in px). + tickmode + Sets the tick mode for this axis. If "auto", the number + of ticks is set via `nticks`. If "linear", the + placement of the ticks is determined by a starting + position `tick0` and a tick step `dtick` ("linear" is + the default value if `tick0` and `dtick` are provided). + If "array", the placement of the ticks is set via + `tickvals` and the tick text is `ticktext`. ("array" is + the default value if `tickvals` is provided). + tickprefix + Sets a tick label prefix. + ticks + Determines whether ticks are drawn or not. If "", this + axis' ticks are not drawn. If "outside" ("inside"), + this axis' are drawn outside (inside) the axis lines. + ticksuffix + Sets a tick label suffix. + ticktext + Sets the text displayed at the ticks position via + `tickvals`. Only has an effect if `tickmode` is set to + "array". Used with `tickvals`. + ticktextsrc + Sets the source reference on Chart Studio Cloud for + `ticktext`. + tickvals + Sets the values at which ticks on this axis appear. + Only has an effect if `tickmode` is set to "array". + Used with `ticktext`. + tickvalssrc + Sets the source reference on Chart Studio Cloud for + `tickvals`. + tickwidth + Sets the tick width (in px). + title + :class:`plotly.graph_objects.densitymap.colorbar.Title` + instance or dict with compatible properties + x + Sets the x position with respect to `xref` of the color + bar (in plot fraction). When `xref` is "paper", + defaults to 1.02 when `orientation` is "v" and 0.5 when + `orientation` is "h". When `xref` is "container", + defaults to 1 when `orientation` is "v" and 0.5 when + `orientation` is "h". Must be between 0 and 1 if `xref` + is "container" and between "-2" and 3 if `xref` is + "paper". + xanchor + Sets this color bar's horizontal position anchor. This + anchor binds the `x` position to the "left", "center" + or "right" of the color bar. Defaults to "left" when + `orientation` is "v" and "center" when `orientation` is + "h". + xpad + Sets the amount of padding (in px) along the x + direction. + xref + Sets the container `x` refers to. "container" spans the + entire `width` of the plot. "paper" refers to the width + of the plotting area only. + y + Sets the y position with respect to `yref` of the color + bar (in plot fraction). When `yref` is "paper", + defaults to 0.5 when `orientation` is "v" and 1.02 when + `orientation` is "h". When `yref` is "container", + defaults to 0.5 when `orientation` is "v" and 1 when + `orientation` is "h". Must be between 0 and 1 if `yref` + is "container" and between "-2" and 3 if `yref` is + "paper". + yanchor + Sets this color bar's vertical position anchor This + anchor binds the `y` position to the "top", "middle" or + "bottom" of the color bar. Defaults to "middle" when + `orientation` is "v" and "bottom" when `orientation` is + "h". + ypad + Sets the amount of padding (in px) along the y + direction. + yref + Sets the container `y` refers to. "container" spans the + entire `height` of the plot. "paper" refers to the + height of the plotting area only. + """ + + def __init__( + self, + arg=None, + bgcolor=None, + bordercolor=None, + borderwidth=None, + dtick=None, + exponentformat=None, + labelalias=None, + len=None, + lenmode=None, + minexponent=None, + nticks=None, + orientation=None, + outlinecolor=None, + outlinewidth=None, + separatethousands=None, + showexponent=None, + showticklabels=None, + showtickprefix=None, + showticksuffix=None, + thickness=None, + thicknessmode=None, + tick0=None, + tickangle=None, + tickcolor=None, + tickfont=None, + tickformat=None, + tickformatstops=None, + tickformatstopdefaults=None, + ticklabeloverflow=None, + ticklabelposition=None, + ticklabelstep=None, + ticklen=None, + tickmode=None, + tickprefix=None, + ticks=None, + ticksuffix=None, + ticktext=None, + ticktextsrc=None, + tickvals=None, + tickvalssrc=None, + tickwidth=None, + title=None, + x=None, + xanchor=None, + xpad=None, + xref=None, + y=None, + yanchor=None, + ypad=None, + yref=None, + **kwargs, + ): + """ + Construct a new ColorBar object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.densitymap.ColorBar` + bgcolor + Sets the color of padded area. + bordercolor + Sets the axis line color. + borderwidth + Sets the width (in px) or the border enclosing this + color bar. + dtick + Sets the step in-between ticks on this axis. Use with + `tick0`. Must be a positive number, or special strings + available to "log" and "date" axes. If the axis `type` + is "log", then ticks are set every 10^(n*dtick) where n + is the tick number. For example, to set a tick mark at + 1, 10, 100, 1000, ... set dtick to 1. To set tick marks + at 1, 100, 10000, ... set dtick to 2. To set tick marks + at 1, 5, 25, 125, 625, 3125, ... set dtick to + log_10(5), or 0.69897000433. "log" has several special + values; "L", where `f` is a positive number, gives + ticks linearly spaced in value (but not position). For + example `tick0` = 0.1, `dtick` = "L0.5" will put ticks + at 0.1, 0.6, 1.1, 1.6 etc. To show powers of 10 plus + small digits between, use "D1" (all digits) or "D2" + (only 2 and 5). `tick0` is ignored for "D1" and "D2". + If the axis `type` is "date", then you must convert the + time to milliseconds. For example, to set the interval + between ticks to one day, set `dtick` to 86400000.0. + "date" also has special values "M" gives ticks + spaced by a number of months. `n` must be a positive + integer. To set ticks on the 15th of every third month, + set `tick0` to "2000-01-15" and `dtick` to "M3". To set + ticks every 4 years, set `dtick` to "M48" + exponentformat + Determines a formatting rule for the tick exponents. + For example, consider the number 1,000,000,000. If + "none", it appears as 1,000,000,000. If "e", 1e+9. If + "E", 1E+9. If "power", 1x10^9 (with 9 in a super + script). If "SI", 1G. If "B", 1B. "SI" uses prefixes + from "femto" f (10^-15) to "tera" T (10^12). *SI + extended* covers instead the full SI range from + "quecto" q (10^-30) to "quetta" Q (10^30). If "SI" or + *SI extended* is used and the exponent is beyond the + above ranges, the formatting rule will automatically be + switched to the power notation. + labelalias + Replacement text for specific tick or hover labels. For + example using {US: 'USA', CA: 'Canada'} changes US to + USA and CA to Canada. The labels we would have shown + must match the keys exactly, after adding any + tickprefix or ticksuffix. For negative numbers the + minus sign symbol used (U+2212) is wider than the + regular ascii dash. That means you need to use −1 + instead of -1. labelalias can be used with any axis + type, and both keys (if needed) and values (if desired) + can include html-like tags or MathJax. + len + Sets the length of the color bar This measure excludes + the padding of both ends. That is, the color bar length + is this length minus the padding on both ends. + lenmode + Determines whether this color bar's length (i.e. the + measure in the color variation direction) is set in + units of plot "fraction" or in *pixels. Use `len` to + set the value. + minexponent + Hide SI prefix for 10^n if |n| is below this number. + This only has an effect when `tickformat` is "SI" or + "B". + nticks + Specifies the maximum number of ticks for the + particular axis. The actual number of ticks will be + chosen automatically to be less than or equal to + `nticks`. Has an effect only if `tickmode` is set to + "auto". + orientation + Sets the orientation of the colorbar. + outlinecolor + Sets the axis line color. + outlinewidth + Sets the width (in px) of the axis line. + separatethousands + If "true", even 4-digit integers are separated + showexponent + If "all", all exponents are shown besides their + significands. If "first", only the exponent of the + first tick is shown. If "last", only the exponent of + the last tick is shown. If "none", no exponents appear. + showticklabels + Determines whether or not the tick labels are drawn. + showtickprefix + If "all", all tick labels are displayed with a prefix. + If "first", only the first tick is displayed with a + prefix. If "last", only the last tick is displayed with + a suffix. If "none", tick prefixes are hidden. + showticksuffix + Same as `showtickprefix` but for tick suffixes. + thickness + Sets the thickness of the color bar This measure + excludes the size of the padding, ticks and labels. + thicknessmode + Determines whether this color bar's thickness (i.e. the + measure in the constant color direction) is set in + units of plot "fraction" or in "pixels". Use + `thickness` to set the value. + tick0 + Sets the placement of the first tick on this axis. Use + with `dtick`. If the axis `type` is "log", then you + must take the log of your starting tick (e.g. to set + the starting tick to 100, set the `tick0` to 2) except + when `dtick`=*L* (see `dtick` for more info). If the + axis `type` is "date", it should be a date string, like + date data. If the axis `type` is "category", it should + be a number, using the scale where each category is + assigned a serial number from zero in the order it + appears. + tickangle + Sets the angle of the tick labels with respect to the + horizontal. For example, a `tickangle` of -90 draws the + tick labels vertically. + tickcolor + Sets the tick color. + tickfont + Sets the color bar's tick label font + tickformat + Sets the tick label formatting rule using d3 formatting + mini-languages which are very similar to those in + Python. For numbers, see: + https://github.com/d3/d3-format/tree/v1.4.5#d3-format. + And for dates see: https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format. We add two items to + d3's date formatter: "%h" for half of the year as a + decimal number as well as "%{n}f" for fractional + seconds with n digits. For example, *2016-10-13 + 09:15:23.456* with tickformat "%H~%M~%S.%2f" would + display "09~15~23.46" + tickformatstops + A tuple of :class:`plotly.graph_objects.densitymap.colo + rbar.Tickformatstop` instances or dicts with compatible + properties + tickformatstopdefaults + When used in a template (as layout.template.data.densit + ymap.colorbar.tickformatstopdefaults), sets the default + property values to use for elements of + densitymap.colorbar.tickformatstops + ticklabeloverflow + Determines how we handle tick labels that would + overflow either the graph div or the domain of the + axis. The default value for inside tick labels is *hide + past domain*. In other cases the default is *hide past + div*. + ticklabelposition + Determines where tick labels are drawn relative to the + ticks. Left and right options are used when + `orientation` is "h", top and bottom when `orientation` + is "v". + ticklabelstep + Sets the spacing between tick labels as compared to the + spacing between ticks. A value of 1 (default) means + each tick gets a label. A value of 2 means shows every + 2nd label. A larger value n means only every nth tick + is labeled. `tick0` determines which labels are shown. + Not implemented for axes with `type` "log" or + "multicategory", or when `tickmode` is "array". + ticklen + Sets the tick length (in px). + tickmode + Sets the tick mode for this axis. If "auto", the number + of ticks is set via `nticks`. If "linear", the + placement of the ticks is determined by a starting + position `tick0` and a tick step `dtick` ("linear" is + the default value if `tick0` and `dtick` are provided). + If "array", the placement of the ticks is set via + `tickvals` and the tick text is `ticktext`. ("array" is + the default value if `tickvals` is provided). + tickprefix + Sets a tick label prefix. + ticks + Determines whether ticks are drawn or not. If "", this + axis' ticks are not drawn. If "outside" ("inside"), + this axis' are drawn outside (inside) the axis lines. + ticksuffix + Sets a tick label suffix. + ticktext + Sets the text displayed at the ticks position via + `tickvals`. Only has an effect if `tickmode` is set to + "array". Used with `tickvals`. + ticktextsrc + Sets the source reference on Chart Studio Cloud for + `ticktext`. + tickvals + Sets the values at which ticks on this axis appear. + Only has an effect if `tickmode` is set to "array". + Used with `ticktext`. + tickvalssrc + Sets the source reference on Chart Studio Cloud for + `tickvals`. + tickwidth + Sets the tick width (in px). + title + :class:`plotly.graph_objects.densitymap.colorbar.Title` + instance or dict with compatible properties + x + Sets the x position with respect to `xref` of the color + bar (in plot fraction). When `xref` is "paper", + defaults to 1.02 when `orientation` is "v" and 0.5 when + `orientation` is "h". When `xref` is "container", + defaults to 1 when `orientation` is "v" and 0.5 when + `orientation` is "h". Must be between 0 and 1 if `xref` + is "container" and between "-2" and 3 if `xref` is + "paper". + xanchor + Sets this color bar's horizontal position anchor. This + anchor binds the `x` position to the "left", "center" + or "right" of the color bar. Defaults to "left" when + `orientation` is "v" and "center" when `orientation` is + "h". + xpad + Sets the amount of padding (in px) along the x + direction. + xref + Sets the container `x` refers to. "container" spans the + entire `width` of the plot. "paper" refers to the width + of the plotting area only. + y + Sets the y position with respect to `yref` of the color + bar (in plot fraction). When `yref` is "paper", + defaults to 0.5 when `orientation` is "v" and 1.02 when + `orientation` is "h". When `yref` is "container", + defaults to 0.5 when `orientation` is "v" and 1 when + `orientation` is "h". Must be between 0 and 1 if `yref` + is "container" and between "-2" and 3 if `yref` is + "paper". + yanchor + Sets this color bar's vertical position anchor This + anchor binds the `y` position to the "top", "middle" or + "bottom" of the color bar. Defaults to "middle" when + `orientation` is "v" and "bottom" when `orientation` is + "h". + ypad + Sets the amount of padding (in px) along the y + direction. + yref + Sets the container `y` refers to. "container" spans the + entire `height` of the plot. "paper" refers to the + height of the plotting area only. + + Returns + ------- + ColorBar + """ + super().__init__("colorbar") + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + if arg is None: + arg = {} + elif isinstance(arg, self.__class__): + arg = arg.to_plotly_json() + elif isinstance(arg, dict): + arg = _copy.copy(arg) + else: + raise ValueError("""\ +The first argument to the plotly.graph_objs.densitymap.ColorBar +constructor must be a dict or +an instance of :class:`plotly.graph_objs.densitymap.ColorBar`""") + + self._skip_invalid = kwargs.pop("skip_invalid", False) + self._validate = kwargs.pop("_validate", True) + + self._set_property("bgcolor", arg, bgcolor) + self._set_property("bordercolor", arg, bordercolor) + self._set_property("borderwidth", arg, borderwidth) + self._set_property("dtick", arg, dtick) + self._set_property("exponentformat", arg, exponentformat) + self._set_property("labelalias", arg, labelalias) + self._set_property("len", arg, len) + self._set_property("lenmode", arg, lenmode) + self._set_property("minexponent", arg, minexponent) + self._set_property("nticks", arg, nticks) + self._set_property("orientation", arg, orientation) + self._set_property("outlinecolor", arg, outlinecolor) + self._set_property("outlinewidth", arg, outlinewidth) + self._set_property("separatethousands", arg, separatethousands) + self._set_property("showexponent", arg, showexponent) + self._set_property("showticklabels", arg, showticklabels) + self._set_property("showtickprefix", arg, showtickprefix) + self._set_property("showticksuffix", arg, showticksuffix) + self._set_property("thickness", arg, thickness) + self._set_property("thicknessmode", arg, thicknessmode) + self._set_property("tick0", arg, tick0) + self._set_property("tickangle", arg, tickangle) + self._set_property("tickcolor", arg, tickcolor) + self._set_property("tickfont", arg, tickfont) + self._set_property("tickformat", arg, tickformat) + self._set_property("tickformatstops", arg, tickformatstops) + self._set_property("tickformatstopdefaults", arg, tickformatstopdefaults) + self._set_property("ticklabeloverflow", arg, ticklabeloverflow) + self._set_property("ticklabelposition", arg, ticklabelposition) + self._set_property("ticklabelstep", arg, ticklabelstep) + self._set_property("ticklen", arg, ticklen) + self._set_property("tickmode", arg, tickmode) + self._set_property("tickprefix", arg, tickprefix) + self._set_property("ticks", arg, ticks) + self._set_property("ticksuffix", arg, ticksuffix) + self._set_property("ticktext", arg, ticktext) + self._set_property("ticktextsrc", arg, ticktextsrc) + self._set_property("tickvals", arg, tickvals) + self._set_property("tickvalssrc", arg, tickvalssrc) + self._set_property("tickwidth", arg, tickwidth) + self._set_property("title", arg, title) + self._set_property("x", arg, x) + self._set_property("xanchor", arg, xanchor) + self._set_property("xpad", arg, xpad) + self._set_property("xref", arg, xref) + self._set_property("y", arg, y) + self._set_property("yanchor", arg, yanchor) + self._set_property("ypad", arg, ypad) + self._set_property("yref", arg, yref) + self._process_kwargs(**dict(arg, **kwargs)) + self._skip_invalid = False diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/densitymap/_hoverlabel.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/densitymap/_hoverlabel.py new file mode 100644 index 0000000000000000000000000000000000000000..a24156ea3ef5956c2ef5bd97b9714a47f5ab4548 --- /dev/null +++ b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/densitymap/_hoverlabel.py @@ -0,0 +1,366 @@ +# --- THIS FILE IS AUTO-GENERATED --- +# Modifications will be overwitten the next time code generation run. + +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Hoverlabel(_BaseTraceHierarchyType): + _parent_path_str = "densitymap" + _path_str = "densitymap.hoverlabel" + _valid_props = { + "align", + "alignsrc", + "bgcolor", + "bgcolorsrc", + "bordercolor", + "bordercolorsrc", + "font", + "namelength", + "namelengthsrc", + "showarrow", + } + + @property + def align(self): + """ + Sets the horizontal alignment of the text content within hover + label box. Has an effect only if the hover label text spans + more two or more lines + + The 'align' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['left', 'right', 'auto'] + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + Any|numpy.ndarray + """ + return self["align"] + + @align.setter + def align(self, val): + self["align"] = val + + @property + def alignsrc(self): + """ + Sets the source reference on Chart Studio Cloud for `align`. + + The 'alignsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["alignsrc"] + + @alignsrc.setter + def alignsrc(self, val): + self["alignsrc"] = val + + @property + def bgcolor(self): + """ + Sets the background color of the hover labels for this trace + + The 'bgcolor' property is a color and may be specified as: + - A hex string (e.g. '#ff0000') + - An rgb/rgba string (e.g. 'rgb(255,0,0)') + - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') + - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') + - A named CSS color: see https://plotly.com/python/css-colors/ for a list + - A list or array of any of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["bgcolor"] + + @bgcolor.setter + def bgcolor(self, val): + self["bgcolor"] = val + + @property + def bgcolorsrc(self): + """ + Sets the source reference on Chart Studio Cloud for `bgcolor`. + + The 'bgcolorsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["bgcolorsrc"] + + @bgcolorsrc.setter + def bgcolorsrc(self, val): + self["bgcolorsrc"] = val + + @property + def bordercolor(self): + """ + Sets the border color of the hover labels for this trace. + + The 'bordercolor' property is a color and may be specified as: + - A hex string (e.g. '#ff0000') + - An rgb/rgba string (e.g. 'rgb(255,0,0)') + - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') + - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') + - A named CSS color: see https://plotly.com/python/css-colors/ for a list + - A list or array of any of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["bordercolor"] + + @bordercolor.setter + def bordercolor(self, val): + self["bordercolor"] = val + + @property + def bordercolorsrc(self): + """ + Sets the source reference on Chart Studio Cloud for + `bordercolor`. + + The 'bordercolorsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["bordercolorsrc"] + + @bordercolorsrc.setter + def bordercolorsrc(self, val): + self["bordercolorsrc"] = val + + @property + def font(self): + """ + Sets the font used in hover labels. + + The 'font' property is an instance of Font + that may be specified as: + - An instance of :class:`plotly.graph_objs.densitymap.hoverlabel.Font` + - A dict of string/value properties that will be passed + to the Font constructor + + Returns + ------- + plotly.graph_objs.densitymap.hoverlabel.Font + """ + return self["font"] + + @font.setter + def font(self, val): + self["font"] = val + + @property + def namelength(self): + """ + Sets the default length (in number of characters) of the trace + name in the hover labels for all traces. -1 shows the whole + name regardless of length. 0-3 shows the first 0-3 characters, + and an integer >3 will show the whole name if it is less than + that many characters, but if it is longer, will truncate to + `namelength - 3` characters and add an ellipsis. + + The 'namelength' property is a integer and may be specified as: + - An int (or float that will be cast to an int) + in the interval [-1, 9223372036854775807] + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + int|numpy.ndarray + """ + return self["namelength"] + + @namelength.setter + def namelength(self, val): + self["namelength"] = val + + @property + def namelengthsrc(self): + """ + Sets the source reference on Chart Studio Cloud for + `namelength`. + + The 'namelengthsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["namelengthsrc"] + + @namelengthsrc.setter + def namelengthsrc(self, val): + self["namelengthsrc"] = val + + @property + def showarrow(self): + """ + Sets whether or not to show the hover label arrow/triangle + pointing to the data point. + + The 'showarrow' property is a boolean and must be specified as: + - A boolean value: True or False + + Returns + ------- + bool + """ + return self["showarrow"] + + @showarrow.setter + def showarrow(self, val): + self["showarrow"] = val + + @property + def _prop_descriptions(self): + return """\ + align + Sets the horizontal alignment of the text content + within hover label box. Has an effect only if the hover + label text spans more two or more lines + alignsrc + Sets the source reference on Chart Studio Cloud for + `align`. + bgcolor + Sets the background color of the hover labels for this + trace + bgcolorsrc + Sets the source reference on Chart Studio Cloud for + `bgcolor`. + bordercolor + Sets the border color of the hover labels for this + trace. + bordercolorsrc + Sets the source reference on Chart Studio Cloud for + `bordercolor`. + font + Sets the font used in hover labels. + namelength + Sets the default length (in number of characters) of + the trace name in the hover labels for all traces. -1 + shows the whole name regardless of length. 0-3 shows + the first 0-3 characters, and an integer >3 will show + the whole name if it is less than that many characters, + but if it is longer, will truncate to `namelength - 3` + characters and add an ellipsis. + namelengthsrc + Sets the source reference on Chart Studio Cloud for + `namelength`. + showarrow + Sets whether or not to show the hover label + arrow/triangle pointing to the data point. + """ + + def __init__( + self, + arg=None, + align=None, + alignsrc=None, + bgcolor=None, + bgcolorsrc=None, + bordercolor=None, + bordercolorsrc=None, + font=None, + namelength=None, + namelengthsrc=None, + showarrow=None, + **kwargs, + ): + """ + Construct a new Hoverlabel object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.densitymap.Hoverlabel` + align + Sets the horizontal alignment of the text content + within hover label box. Has an effect only if the hover + label text spans more two or more lines + alignsrc + Sets the source reference on Chart Studio Cloud for + `align`. + bgcolor + Sets the background color of the hover labels for this + trace + bgcolorsrc + Sets the source reference on Chart Studio Cloud for + `bgcolor`. + bordercolor + Sets the border color of the hover labels for this + trace. + bordercolorsrc + Sets the source reference on Chart Studio Cloud for + `bordercolor`. + font + Sets the font used in hover labels. + namelength + Sets the default length (in number of characters) of + the trace name in the hover labels for all traces. -1 + shows the whole name regardless of length. 0-3 shows + the first 0-3 characters, and an integer >3 will show + the whole name if it is less than that many characters, + but if it is longer, will truncate to `namelength - 3` + characters and add an ellipsis. + namelengthsrc + Sets the source reference on Chart Studio Cloud for + `namelength`. + showarrow + Sets whether or not to show the hover label + arrow/triangle pointing to the data point. + + Returns + ------- + Hoverlabel + """ + super().__init__("hoverlabel") + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + if arg is None: + arg = {} + elif isinstance(arg, self.__class__): + arg = arg.to_plotly_json() + elif isinstance(arg, dict): + arg = _copy.copy(arg) + else: + raise ValueError("""\ +The first argument to the plotly.graph_objs.densitymap.Hoverlabel +constructor must be a dict or +an instance of :class:`plotly.graph_objs.densitymap.Hoverlabel`""") + + self._skip_invalid = kwargs.pop("skip_invalid", False) + self._validate = kwargs.pop("_validate", True) + + self._set_property("align", arg, align) + self._set_property("alignsrc", arg, alignsrc) + self._set_property("bgcolor", arg, bgcolor) + self._set_property("bgcolorsrc", arg, bgcolorsrc) + self._set_property("bordercolor", arg, bordercolor) + self._set_property("bordercolorsrc", arg, bordercolorsrc) + self._set_property("font", arg, font) + self._set_property("namelength", arg, namelength) + self._set_property("namelengthsrc", arg, namelengthsrc) + self._set_property("showarrow", arg, showarrow) + self._process_kwargs(**dict(arg, **kwargs)) + self._skip_invalid = False diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/densitymap/_legendgrouptitle.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/densitymap/_legendgrouptitle.py new file mode 100644 index 0000000000000000000000000000000000000000..27e91accb682f4ffa1bc551901a77223fd4fbb6b --- /dev/null +++ b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/densitymap/_legendgrouptitle.py @@ -0,0 +1,104 @@ +# --- THIS FILE IS AUTO-GENERATED --- +# Modifications will be overwitten the next time code generation run. + +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Legendgrouptitle(_BaseTraceHierarchyType): + _parent_path_str = "densitymap" + _path_str = "densitymap.legendgrouptitle" + _valid_props = {"font", "text"} + + @property + def font(self): + """ + Sets this legend group's title font. + + The 'font' property is an instance of Font + that may be specified as: + - An instance of :class:`plotly.graph_objs.densitymap.legendgrouptitle.Font` + - A dict of string/value properties that will be passed + to the Font constructor + + Returns + ------- + plotly.graph_objs.densitymap.legendgrouptitle.Font + """ + return self["font"] + + @font.setter + def font(self, val): + self["font"] = val + + @property + def text(self): + """ + Sets the title of the legend group. + + The 'text' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["text"] + + @text.setter + def text(self, val): + self["text"] = val + + @property + def _prop_descriptions(self): + return """\ + font + Sets this legend group's title font. + text + Sets the title of the legend group. + """ + + def __init__(self, arg=None, font=None, text=None, **kwargs): + """ + Construct a new Legendgrouptitle object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.densitymap.Legendgrouptitle` + font + Sets this legend group's title font. + text + Sets the title of the legend group. + + Returns + ------- + Legendgrouptitle + """ + super().__init__("legendgrouptitle") + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + if arg is None: + arg = {} + elif isinstance(arg, self.__class__): + arg = arg.to_plotly_json() + elif isinstance(arg, dict): + arg = _copy.copy(arg) + else: + raise ValueError("""\ +The first argument to the plotly.graph_objs.densitymap.Legendgrouptitle +constructor must be a dict or +an instance of :class:`plotly.graph_objs.densitymap.Legendgrouptitle`""") + + self._skip_invalid = kwargs.pop("skip_invalid", False) + self._validate = kwargs.pop("_validate", True) + + self._set_property("font", arg, font) + self._set_property("text", arg, text) + self._process_kwargs(**dict(arg, **kwargs)) + self._skip_invalid = False diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/densitymap/_stream.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/densitymap/_stream.py new file mode 100644 index 0000000000000000000000000000000000000000..d46b6419b76a47919f434345c9755249d2e88f6a --- /dev/null +++ b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/densitymap/_stream.py @@ -0,0 +1,114 @@ +# --- THIS FILE IS AUTO-GENERATED --- +# Modifications will be overwitten the next time code generation run. + +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Stream(_BaseTraceHierarchyType): + _parent_path_str = "densitymap" + _path_str = "densitymap.stream" + _valid_props = {"maxpoints", "token"} + + @property + def maxpoints(self): + """ + Sets the maximum number of points to keep on the plots from an + incoming stream. If `maxpoints` is set to 50, only the newest + 50 points will be displayed on the plot. + + The 'maxpoints' property is a number and may be specified as: + - An int or float in the interval [0, 10000] + + Returns + ------- + int|float + """ + return self["maxpoints"] + + @maxpoints.setter + def maxpoints(self, val): + self["maxpoints"] = val + + @property + def token(self): + """ + The stream id number links a data trace on a plot with a + stream. See https://chart-studio.plotly.com/settings for more + details. + + The 'token' property is a string and must be specified as: + - A non-empty string + + Returns + ------- + str + """ + return self["token"] + + @token.setter + def token(self, val): + self["token"] = val + + @property + def _prop_descriptions(self): + return """\ + maxpoints + Sets the maximum number of points to keep on the plots + from an incoming stream. If `maxpoints` is set to 50, + only the newest 50 points will be displayed on the + plot. + token + The stream id number links a data trace on a plot with + a stream. See https://chart-studio.plotly.com/settings + for more details. + """ + + def __init__(self, arg=None, maxpoints=None, token=None, **kwargs): + """ + Construct a new Stream object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.densitymap.Stream` + maxpoints + Sets the maximum number of points to keep on the plots + from an incoming stream. If `maxpoints` is set to 50, + only the newest 50 points will be displayed on the + plot. + token + The stream id number links a data trace on a plot with + a stream. See https://chart-studio.plotly.com/settings + for more details. + + Returns + ------- + Stream + """ + super().__init__("stream") + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + if arg is None: + arg = {} + elif isinstance(arg, self.__class__): + arg = arg.to_plotly_json() + elif isinstance(arg, dict): + arg = _copy.copy(arg) + else: + raise ValueError("""\ +The first argument to the plotly.graph_objs.densitymap.Stream +constructor must be a dict or +an instance of :class:`plotly.graph_objs.densitymap.Stream`""") + + self._skip_invalid = kwargs.pop("skip_invalid", False) + self._validate = kwargs.pop("_validate", True) + + self._set_property("maxpoints", arg, maxpoints) + self._set_property("token", arg, token) + self._process_kwargs(**dict(arg, **kwargs)) + self._skip_invalid = False diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/densitymap/colorbar/.___init__.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/densitymap/colorbar/.___init__.py new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/densitymap/colorbar/.___init__.py differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/densitymap/colorbar/.___pycache__ b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/densitymap/colorbar/.___pycache__ new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/densitymap/colorbar/.___pycache__ differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/densitymap/colorbar/.__tickfont.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/densitymap/colorbar/.__tickfont.py new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/densitymap/colorbar/.__tickfont.py differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/densitymap/colorbar/.__tickformatstop.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/densitymap/colorbar/.__tickformatstop.py new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/densitymap/colorbar/.__tickformatstop.py differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/densitymap/colorbar/.__title.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/densitymap/colorbar/.__title.py new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/densitymap/colorbar/.__title.py differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/densitymap/colorbar/._title b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/densitymap/colorbar/._title new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/densitymap/colorbar/._title differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/densitymap/colorbar/__init__.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/densitymap/colorbar/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..4690d3cc738a44d43a04d43d3aa0be36d7cd34e2 --- /dev/null +++ b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/densitymap/colorbar/__init__.py @@ -0,0 +1,16 @@ +import sys +from typing import TYPE_CHECKING + +if TYPE_CHECKING: + from ._tickfont import Tickfont + from ._tickformatstop import Tickformatstop + from ._title import Title + from . import title +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [".title"], + ["._tickfont.Tickfont", "._tickformatstop.Tickformatstop", "._title.Title"], + ) diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/densitymap/colorbar/_tickfont.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/densitymap/colorbar/_tickfont.py new file mode 100644 index 0000000000000000000000000000000000000000..26b4695b647216834e03fa28b848924763dec9d8 --- /dev/null +++ b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/densitymap/colorbar/_tickfont.py @@ -0,0 +1,334 @@ +# --- THIS FILE IS AUTO-GENERATED --- +# Modifications will be overwitten the next time code generation run. + +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Tickfont(_BaseTraceHierarchyType): + _parent_path_str = "densitymap.colorbar" + _path_str = "densitymap.colorbar.tickfont" + _valid_props = { + "color", + "family", + "lineposition", + "shadow", + "size", + "style", + "textcase", + "variant", + "weight", + } + + @property + def color(self): + """ + The 'color' property is a color and may be specified as: + - A hex string (e.g. '#ff0000') + - An rgb/rgba string (e.g. 'rgb(255,0,0)') + - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') + - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') + - A named CSS color: see https://plotly.com/python/css-colors/ for a list + + Returns + ------- + str + """ + return self["color"] + + @color.setter + def color(self, val): + self["color"] = val + + @property + def family(self): + """ + HTML font family - the typeface that will be applied by the web + browser. The web browser can only apply a font if it is + available on the system where it runs. Provide multiple font + families, separated by commas, to indicate the order in which + to apply fonts if they aren't available. + + The 'family' property is a string and must be specified as: + - A non-empty string + + Returns + ------- + str + """ + return self["family"] + + @family.setter + def family(self, val): + self["family"] = val + + @property + def lineposition(self): + """ + Sets the kind of decoration line(s) with text, such as an + "under", "over" or "through" as well as combinations e.g. + "under+over", etc. + + The 'lineposition' property is a flaglist and may be specified + as a string containing: + - Any combination of ['under', 'over', 'through'] joined with '+' characters + (e.g. 'under+over') + OR exactly one of ['none'] (e.g. 'none') + + Returns + ------- + Any + """ + return self["lineposition"] + + @lineposition.setter + def lineposition(self, val): + self["lineposition"] = val + + @property + def shadow(self): + """ + Sets the shape and color of the shadow behind text. "auto" + places minimal shadow and applies contrast text font color. See + https://developer.mozilla.org/en-US/docs/Web/CSS/text-shadow + for additional options. + + The 'shadow' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["shadow"] + + @shadow.setter + def shadow(self, val): + self["shadow"] = val + + @property + def size(self): + """ + The 'size' property is a number and may be specified as: + - An int or float in the interval [1, inf] + + Returns + ------- + int|float + """ + return self["size"] + + @size.setter + def size(self, val): + self["size"] = val + + @property + def style(self): + """ + Sets whether a font should be styled with a normal or italic + face from its family. + + The 'style' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['normal', 'italic'] + + Returns + ------- + Any + """ + return self["style"] + + @style.setter + def style(self, val): + self["style"] = val + + @property + def textcase(self): + """ + Sets capitalization of text. It can be used to make text appear + in all-uppercase or all-lowercase, or with each word + capitalized. + + The 'textcase' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['normal', 'word caps', 'upper', 'lower'] + + Returns + ------- + Any + """ + return self["textcase"] + + @textcase.setter + def textcase(self, val): + self["textcase"] = val + + @property + def variant(self): + """ + Sets the variant of the font. + + The 'variant' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['normal', 'small-caps', 'all-small-caps', + 'all-petite-caps', 'petite-caps', 'unicase'] + + Returns + ------- + Any + """ + return self["variant"] + + @variant.setter + def variant(self, val): + self["variant"] = val + + @property + def weight(self): + """ + Sets the weight (or boldness) of the font. + + The 'weight' property is a integer and may be specified as: + - An int (or float that will be cast to an int) + in the interval [1, 1000] + OR exactly one of ['normal', 'bold'] (e.g. 'bold') + + Returns + ------- + int + """ + return self["weight"] + + @weight.setter + def weight(self, val): + self["weight"] = val + + @property + def _prop_descriptions(self): + return """\ + color + + family + HTML font family - the typeface that will be applied by + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. + lineposition + Sets the kind of decoration line(s) with text, such as + an "under", "over" or "through" as well as combinations + e.g. "under+over", etc. + shadow + Sets the shape and color of the shadow behind text. + "auto" places minimal shadow and applies contrast text + font color. See https://developer.mozilla.org/en- + US/docs/Web/CSS/text-shadow for additional options. + size + + style + Sets whether a font should be styled with a normal or + italic face from its family. + textcase + Sets capitalization of text. It can be used to make + text appear in all-uppercase or all-lowercase, or with + each word capitalized. + variant + Sets the variant of the font. + weight + Sets the weight (or boldness) of the font. + """ + + def __init__( + self, + arg=None, + color=None, + family=None, + lineposition=None, + shadow=None, + size=None, + style=None, + textcase=None, + variant=None, + weight=None, + **kwargs, + ): + """ + Construct a new Tickfont object + + Sets the color bar's tick label font + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.densitymap.colorbar.Tickfont` + color + + family + HTML font family - the typeface that will be applied by + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. + lineposition + Sets the kind of decoration line(s) with text, such as + an "under", "over" or "through" as well as combinations + e.g. "under+over", etc. + shadow + Sets the shape and color of the shadow behind text. + "auto" places minimal shadow and applies contrast text + font color. See https://developer.mozilla.org/en- + US/docs/Web/CSS/text-shadow for additional options. + size + + style + Sets whether a font should be styled with a normal or + italic face from its family. + textcase + Sets capitalization of text. It can be used to make + text appear in all-uppercase or all-lowercase, or with + each word capitalized. + variant + Sets the variant of the font. + weight + Sets the weight (or boldness) of the font. + + Returns + ------- + Tickfont + """ + super().__init__("tickfont") + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + if arg is None: + arg = {} + elif isinstance(arg, self.__class__): + arg = arg.to_plotly_json() + elif isinstance(arg, dict): + arg = _copy.copy(arg) + else: + raise ValueError("""\ +The first argument to the plotly.graph_objs.densitymap.colorbar.Tickfont +constructor must be a dict or +an instance of :class:`plotly.graph_objs.densitymap.colorbar.Tickfont`""") + + self._skip_invalid = kwargs.pop("skip_invalid", False) + self._validate = kwargs.pop("_validate", True) + + self._set_property("color", arg, color) + self._set_property("family", arg, family) + self._set_property("lineposition", arg, lineposition) + self._set_property("shadow", arg, shadow) + self._set_property("size", arg, size) + self._set_property("style", arg, style) + self._set_property("textcase", arg, textcase) + self._set_property("variant", arg, variant) + self._set_property("weight", arg, weight) + self._process_kwargs(**dict(arg, **kwargs)) + self._skip_invalid = False diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/densitymap/colorbar/_tickformatstop.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/densitymap/colorbar/_tickformatstop.py new file mode 100644 index 0000000000000000000000000000000000000000..0bb2c0ff505bd558e39316c3f25a7cb2adaf33fb --- /dev/null +++ b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/densitymap/colorbar/_tickformatstop.py @@ -0,0 +1,241 @@ +# --- THIS FILE IS AUTO-GENERATED --- +# Modifications will be overwitten the next time code generation run. + +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Tickformatstop(_BaseTraceHierarchyType): + _parent_path_str = "densitymap.colorbar" + _path_str = "densitymap.colorbar.tickformatstop" + _valid_props = {"dtickrange", "enabled", "name", "templateitemname", "value"} + + @property + def dtickrange(self): + """ + range [*min*, *max*], where "min", "max" - dtick values which + describe some zoom level, it is possible to omit "min" or "max" + value by passing "null" + + The 'dtickrange' property is an info array that may be specified as: + + * a list or tuple of 2 elements where: + (0) The 'dtickrange[0]' property accepts values of any type + (1) The 'dtickrange[1]' property accepts values of any type + + Returns + ------- + list + """ + return self["dtickrange"] + + @dtickrange.setter + def dtickrange(self, val): + self["dtickrange"] = val + + @property + def enabled(self): + """ + Determines whether or not this stop is used. If `false`, this + stop is ignored even within its `dtickrange`. + + The 'enabled' property is a boolean and must be specified as: + - A boolean value: True or False + + Returns + ------- + bool + """ + return self["enabled"] + + @enabled.setter + def enabled(self, val): + self["enabled"] = val + + @property + def name(self): + """ + When used in a template, named items are created in the output + figure in addition to any items the figure already has in this + array. You can modify these items in the output figure by + making your own item with `templateitemname` matching this + `name` alongside your modifications (including `visible: false` + or `enabled: false` to hide it). Has no effect outside of a + template. + + The 'name' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["name"] + + @name.setter + def name(self, val): + self["name"] = val + + @property + def templateitemname(self): + """ + Used to refer to a named item in this array in the template. + Named items from the template will be created even without a + matching item in the input figure, but you can modify one by + making an item with `templateitemname` matching its `name`, + alongside your modifications (including `visible: false` or + `enabled: false` to hide it). If there is no template or no + matching item, this item will be hidden unless you explicitly + show it with `visible: true`. + + The 'templateitemname' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["templateitemname"] + + @templateitemname.setter + def templateitemname(self, val): + self["templateitemname"] = val + + @property + def value(self): + """ + string - dtickformat for described zoom level, the same as + "tickformat" + + The 'value' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["value"] + + @value.setter + def value(self, val): + self["value"] = val + + @property + def _prop_descriptions(self): + return """\ + dtickrange + range [*min*, *max*], where "min", "max" - dtick values + which describe some zoom level, it is possible to omit + "min" or "max" value by passing "null" + enabled + Determines whether or not this stop is used. If + `false`, this stop is ignored even within its + `dtickrange`. + name + When used in a template, named items are created in the + output figure in addition to any items the figure + already has in this array. You can modify these items + in the output figure by making your own item with + `templateitemname` matching this `name` alongside your + modifications (including `visible: false` or `enabled: + false` to hide it). Has no effect outside of a + template. + templateitemname + Used to refer to a named item in this array in the + template. Named items from the template will be created + even without a matching item in the input figure, but + you can modify one by making an item with + `templateitemname` matching its `name`, alongside your + modifications (including `visible: false` or `enabled: + false` to hide it). If there is no template or no + matching item, this item will be hidden unless you + explicitly show it with `visible: true`. + value + string - dtickformat for described zoom level, the same + as "tickformat" + """ + + def __init__( + self, + arg=None, + dtickrange=None, + enabled=None, + name=None, + templateitemname=None, + value=None, + **kwargs, + ): + """ + Construct a new Tickformatstop object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of :class:`plotly.graph_objs.densitymap.col + orbar.Tickformatstop` + dtickrange + range [*min*, *max*], where "min", "max" - dtick values + which describe some zoom level, it is possible to omit + "min" or "max" value by passing "null" + enabled + Determines whether or not this stop is used. If + `false`, this stop is ignored even within its + `dtickrange`. + name + When used in a template, named items are created in the + output figure in addition to any items the figure + already has in this array. You can modify these items + in the output figure by making your own item with + `templateitemname` matching this `name` alongside your + modifications (including `visible: false` or `enabled: + false` to hide it). Has no effect outside of a + template. + templateitemname + Used to refer to a named item in this array in the + template. Named items from the template will be created + even without a matching item in the input figure, but + you can modify one by making an item with + `templateitemname` matching its `name`, alongside your + modifications (including `visible: false` or `enabled: + false` to hide it). If there is no template or no + matching item, this item will be hidden unless you + explicitly show it with `visible: true`. + value + string - dtickformat for described zoom level, the same + as "tickformat" + + Returns + ------- + Tickformatstop + """ + super().__init__("tickformatstops") + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + if arg is None: + arg = {} + elif isinstance(arg, self.__class__): + arg = arg.to_plotly_json() + elif isinstance(arg, dict): + arg = _copy.copy(arg) + else: + raise ValueError("""\ +The first argument to the plotly.graph_objs.densitymap.colorbar.Tickformatstop +constructor must be a dict or +an instance of :class:`plotly.graph_objs.densitymap.colorbar.Tickformatstop`""") + + self._skip_invalid = kwargs.pop("skip_invalid", False) + self._validate = kwargs.pop("_validate", True) + + self._set_property("dtickrange", arg, dtickrange) + self._set_property("enabled", arg, enabled) + self._set_property("name", arg, name) + self._set_property("templateitemname", arg, templateitemname) + self._set_property("value", arg, value) + self._process_kwargs(**dict(arg, **kwargs)) + self._skip_invalid = False diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/densitymap/colorbar/_title.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/densitymap/colorbar/_title.py new file mode 100644 index 0000000000000000000000000000000000000000..caf12d6e568297b9fd16397b6ad8d26552f4fc08 --- /dev/null +++ b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/densitymap/colorbar/_title.py @@ -0,0 +1,136 @@ +# --- THIS FILE IS AUTO-GENERATED --- +# Modifications will be overwitten the next time code generation run. + +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Title(_BaseTraceHierarchyType): + _parent_path_str = "densitymap.colorbar" + _path_str = "densitymap.colorbar.title" + _valid_props = {"font", "side", "text"} + + @property + def font(self): + """ + Sets this color bar's title font. + + The 'font' property is an instance of Font + that may be specified as: + - An instance of :class:`plotly.graph_objs.densitymap.colorbar.title.Font` + - A dict of string/value properties that will be passed + to the Font constructor + + Returns + ------- + plotly.graph_objs.densitymap.colorbar.title.Font + """ + return self["font"] + + @font.setter + def font(self, val): + self["font"] = val + + @property + def side(self): + """ + Determines the location of color bar's title with respect to + the color bar. Defaults to "top" when `orientation` if "v" and + defaults to "right" when `orientation` if "h". + + The 'side' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['right', 'top', 'bottom'] + + Returns + ------- + Any + """ + return self["side"] + + @side.setter + def side(self, val): + self["side"] = val + + @property + def text(self): + """ + Sets the title of the color bar. + + The 'text' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["text"] + + @text.setter + def text(self, val): + self["text"] = val + + @property + def _prop_descriptions(self): + return """\ + font + Sets this color bar's title font. + side + Determines the location of color bar's title with + respect to the color bar. Defaults to "top" when + `orientation` if "v" and defaults to "right" when + `orientation` if "h". + text + Sets the title of the color bar. + """ + + def __init__(self, arg=None, font=None, side=None, text=None, **kwargs): + """ + Construct a new Title object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.densitymap.colorbar.Title` + font + Sets this color bar's title font. + side + Determines the location of color bar's title with + respect to the color bar. Defaults to "top" when + `orientation` if "v" and defaults to "right" when + `orientation` if "h". + text + Sets the title of the color bar. + + Returns + ------- + Title + """ + super().__init__("title") + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + if arg is None: + arg = {} + elif isinstance(arg, self.__class__): + arg = arg.to_plotly_json() + elif isinstance(arg, dict): + arg = _copy.copy(arg) + else: + raise ValueError("""\ +The first argument to the plotly.graph_objs.densitymap.colorbar.Title +constructor must be a dict or +an instance of :class:`plotly.graph_objs.densitymap.colorbar.Title`""") + + self._skip_invalid = kwargs.pop("skip_invalid", False) + self._validate = kwargs.pop("_validate", True) + + self._set_property("font", arg, font) + self._set_property("side", arg, side) + self._set_property("text", arg, text) + self._process_kwargs(**dict(arg, **kwargs)) + self._skip_invalid = False diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/densitymap/colorbar/title/.___init__.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/densitymap/colorbar/title/.___init__.py new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/densitymap/colorbar/title/.___init__.py differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/densitymap/colorbar/title/.___pycache__ b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/densitymap/colorbar/title/.___pycache__ new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/densitymap/colorbar/title/.___pycache__ differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/densitymap/colorbar/title/.__font.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/densitymap/colorbar/title/.__font.py new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/densitymap/colorbar/title/.__font.py differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/densitymap/colorbar/title/__init__.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/densitymap/colorbar/title/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..56f600d3458c41f269053307377e9707ab13e090 --- /dev/null +++ b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/densitymap/colorbar/title/__init__.py @@ -0,0 +1,9 @@ +import sys +from typing import TYPE_CHECKING + +if TYPE_CHECKING: + from ._font import Font +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import(__name__, [], ["._font.Font"]) diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/densitymap/colorbar/title/_font.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/densitymap/colorbar/title/_font.py new file mode 100644 index 0000000000000000000000000000000000000000..903a5466e3d77a91a17d9df396bd3096bc2cd5c4 --- /dev/null +++ b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/densitymap/colorbar/title/_font.py @@ -0,0 +1,334 @@ +# --- THIS FILE IS AUTO-GENERATED --- +# Modifications will be overwitten the next time code generation run. + +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Font(_BaseTraceHierarchyType): + _parent_path_str = "densitymap.colorbar.title" + _path_str = "densitymap.colorbar.title.font" + _valid_props = { + "color", + "family", + "lineposition", + "shadow", + "size", + "style", + "textcase", + "variant", + "weight", + } + + @property + def color(self): + """ + The 'color' property is a color and may be specified as: + - A hex string (e.g. '#ff0000') + - An rgb/rgba string (e.g. 'rgb(255,0,0)') + - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') + - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') + - A named CSS color: see https://plotly.com/python/css-colors/ for a list + + Returns + ------- + str + """ + return self["color"] + + @color.setter + def color(self, val): + self["color"] = val + + @property + def family(self): + """ + HTML font family - the typeface that will be applied by the web + browser. The web browser can only apply a font if it is + available on the system where it runs. Provide multiple font + families, separated by commas, to indicate the order in which + to apply fonts if they aren't available. + + The 'family' property is a string and must be specified as: + - A non-empty string + + Returns + ------- + str + """ + return self["family"] + + @family.setter + def family(self, val): + self["family"] = val + + @property + def lineposition(self): + """ + Sets the kind of decoration line(s) with text, such as an + "under", "over" or "through" as well as combinations e.g. + "under+over", etc. + + The 'lineposition' property is a flaglist and may be specified + as a string containing: + - Any combination of ['under', 'over', 'through'] joined with '+' characters + (e.g. 'under+over') + OR exactly one of ['none'] (e.g. 'none') + + Returns + ------- + Any + """ + return self["lineposition"] + + @lineposition.setter + def lineposition(self, val): + self["lineposition"] = val + + @property + def shadow(self): + """ + Sets the shape and color of the shadow behind text. "auto" + places minimal shadow and applies contrast text font color. See + https://developer.mozilla.org/en-US/docs/Web/CSS/text-shadow + for additional options. + + The 'shadow' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["shadow"] + + @shadow.setter + def shadow(self, val): + self["shadow"] = val + + @property + def size(self): + """ + The 'size' property is a number and may be specified as: + - An int or float in the interval [1, inf] + + Returns + ------- + int|float + """ + return self["size"] + + @size.setter + def size(self, val): + self["size"] = val + + @property + def style(self): + """ + Sets whether a font should be styled with a normal or italic + face from its family. + + The 'style' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['normal', 'italic'] + + Returns + ------- + Any + """ + return self["style"] + + @style.setter + def style(self, val): + self["style"] = val + + @property + def textcase(self): + """ + Sets capitalization of text. It can be used to make text appear + in all-uppercase or all-lowercase, or with each word + capitalized. + + The 'textcase' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['normal', 'word caps', 'upper', 'lower'] + + Returns + ------- + Any + """ + return self["textcase"] + + @textcase.setter + def textcase(self, val): + self["textcase"] = val + + @property + def variant(self): + """ + Sets the variant of the font. + + The 'variant' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['normal', 'small-caps', 'all-small-caps', + 'all-petite-caps', 'petite-caps', 'unicase'] + + Returns + ------- + Any + """ + return self["variant"] + + @variant.setter + def variant(self, val): + self["variant"] = val + + @property + def weight(self): + """ + Sets the weight (or boldness) of the font. + + The 'weight' property is a integer and may be specified as: + - An int (or float that will be cast to an int) + in the interval [1, 1000] + OR exactly one of ['normal', 'bold'] (e.g. 'bold') + + Returns + ------- + int + """ + return self["weight"] + + @weight.setter + def weight(self, val): + self["weight"] = val + + @property + def _prop_descriptions(self): + return """\ + color + + family + HTML font family - the typeface that will be applied by + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. + lineposition + Sets the kind of decoration line(s) with text, such as + an "under", "over" or "through" as well as combinations + e.g. "under+over", etc. + shadow + Sets the shape and color of the shadow behind text. + "auto" places minimal shadow and applies contrast text + font color. See https://developer.mozilla.org/en- + US/docs/Web/CSS/text-shadow for additional options. + size + + style + Sets whether a font should be styled with a normal or + italic face from its family. + textcase + Sets capitalization of text. It can be used to make + text appear in all-uppercase or all-lowercase, or with + each word capitalized. + variant + Sets the variant of the font. + weight + Sets the weight (or boldness) of the font. + """ + + def __init__( + self, + arg=None, + color=None, + family=None, + lineposition=None, + shadow=None, + size=None, + style=None, + textcase=None, + variant=None, + weight=None, + **kwargs, + ): + """ + Construct a new Font object + + Sets this color bar's title font. + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of :class:`plotly.graph_objs.densitymap.col + orbar.title.Font` + color + + family + HTML font family - the typeface that will be applied by + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. + lineposition + Sets the kind of decoration line(s) with text, such as + an "under", "over" or "through" as well as combinations + e.g. "under+over", etc. + shadow + Sets the shape and color of the shadow behind text. + "auto" places minimal shadow and applies contrast text + font color. See https://developer.mozilla.org/en- + US/docs/Web/CSS/text-shadow for additional options. + size + + style + Sets whether a font should be styled with a normal or + italic face from its family. + textcase + Sets capitalization of text. It can be used to make + text appear in all-uppercase or all-lowercase, or with + each word capitalized. + variant + Sets the variant of the font. + weight + Sets the weight (or boldness) of the font. + + Returns + ------- + Font + """ + super().__init__("font") + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + if arg is None: + arg = {} + elif isinstance(arg, self.__class__): + arg = arg.to_plotly_json() + elif isinstance(arg, dict): + arg = _copy.copy(arg) + else: + raise ValueError("""\ +The first argument to the plotly.graph_objs.densitymap.colorbar.title.Font +constructor must be a dict or +an instance of :class:`plotly.graph_objs.densitymap.colorbar.title.Font`""") + + self._skip_invalid = kwargs.pop("skip_invalid", False) + self._validate = kwargs.pop("_validate", True) + + self._set_property("color", arg, color) + self._set_property("family", arg, family) + self._set_property("lineposition", arg, lineposition) + self._set_property("shadow", arg, shadow) + self._set_property("size", arg, size) + self._set_property("style", arg, style) + self._set_property("textcase", arg, textcase) + self._set_property("variant", arg, variant) + self._set_property("weight", arg, weight) + self._process_kwargs(**dict(arg, **kwargs)) + self._skip_invalid = False diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/densitymap/hoverlabel/.___init__.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/densitymap/hoverlabel/.___init__.py new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/densitymap/hoverlabel/.___init__.py differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/densitymap/hoverlabel/.___pycache__ b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/densitymap/hoverlabel/.___pycache__ new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/densitymap/hoverlabel/.___pycache__ differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/densitymap/hoverlabel/.__font.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/densitymap/hoverlabel/.__font.py new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/densitymap/hoverlabel/.__font.py differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/densitymap/hoverlabel/__init__.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/densitymap/hoverlabel/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..56f600d3458c41f269053307377e9707ab13e090 --- /dev/null +++ b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/densitymap/hoverlabel/__init__.py @@ -0,0 +1,9 @@ +import sys +from typing import TYPE_CHECKING + +if TYPE_CHECKING: + from ._font import Font +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import(__name__, [], ["._font.Font"]) diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/densitymap/hoverlabel/_font.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/densitymap/hoverlabel/_font.py new file mode 100644 index 0000000000000000000000000000000000000000..6ce680847ecfba81441a4fb5f2ab219dc18f71e1 --- /dev/null +++ b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/densitymap/hoverlabel/_font.py @@ -0,0 +1,587 @@ +# --- THIS FILE IS AUTO-GENERATED --- +# Modifications will be overwitten the next time code generation run. + +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Font(_BaseTraceHierarchyType): + _parent_path_str = "densitymap.hoverlabel" + _path_str = "densitymap.hoverlabel.font" + _valid_props = { + "color", + "colorsrc", + "family", + "familysrc", + "lineposition", + "linepositionsrc", + "shadow", + "shadowsrc", + "size", + "sizesrc", + "style", + "stylesrc", + "textcase", + "textcasesrc", + "variant", + "variantsrc", + "weight", + "weightsrc", + } + + @property + def color(self): + """ + The 'color' property is a color and may be specified as: + - A hex string (e.g. '#ff0000') + - An rgb/rgba string (e.g. 'rgb(255,0,0)') + - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') + - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') + - A named CSS color: see https://plotly.com/python/css-colors/ for a list + - A list or array of any of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["color"] + + @color.setter + def color(self, val): + self["color"] = val + + @property + def colorsrc(self): + """ + Sets the source reference on Chart Studio Cloud for `color`. + + The 'colorsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["colorsrc"] + + @colorsrc.setter + def colorsrc(self, val): + self["colorsrc"] = val + + @property + def family(self): + """ + HTML font family - the typeface that will be applied by the web + browser. The web browser can only apply a font if it is + available on the system where it runs. Provide multiple font + families, separated by commas, to indicate the order in which + to apply fonts if they aren't available. + + The 'family' property is a string and must be specified as: + - A non-empty string + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["family"] + + @family.setter + def family(self, val): + self["family"] = val + + @property + def familysrc(self): + """ + Sets the source reference on Chart Studio Cloud for `family`. + + The 'familysrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["familysrc"] + + @familysrc.setter + def familysrc(self, val): + self["familysrc"] = val + + @property + def lineposition(self): + """ + Sets the kind of decoration line(s) with text, such as an + "under", "over" or "through" as well as combinations e.g. + "under+over", etc. + + The 'lineposition' property is a flaglist and may be specified + as a string containing: + - Any combination of ['under', 'over', 'through'] joined with '+' characters + (e.g. 'under+over') + OR exactly one of ['none'] (e.g. 'none') + - A list or array of the above + + Returns + ------- + Any|numpy.ndarray + """ + return self["lineposition"] + + @lineposition.setter + def lineposition(self, val): + self["lineposition"] = val + + @property + def linepositionsrc(self): + """ + Sets the source reference on Chart Studio Cloud for + `lineposition`. + + The 'linepositionsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["linepositionsrc"] + + @linepositionsrc.setter + def linepositionsrc(self, val): + self["linepositionsrc"] = val + + @property + def shadow(self): + """ + Sets the shape and color of the shadow behind text. "auto" + places minimal shadow and applies contrast text font color. See + https://developer.mozilla.org/en-US/docs/Web/CSS/text-shadow + for additional options. + + The 'shadow' property is a string and must be specified as: + - A string + - A number that will be converted to a string + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["shadow"] + + @shadow.setter + def shadow(self, val): + self["shadow"] = val + + @property + def shadowsrc(self): + """ + Sets the source reference on Chart Studio Cloud for `shadow`. + + The 'shadowsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["shadowsrc"] + + @shadowsrc.setter + def shadowsrc(self, val): + self["shadowsrc"] = val + + @property + def size(self): + """ + The 'size' property is a number and may be specified as: + - An int or float in the interval [1, inf] + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + int|float|numpy.ndarray + """ + return self["size"] + + @size.setter + def size(self, val): + self["size"] = val + + @property + def sizesrc(self): + """ + Sets the source reference on Chart Studio Cloud for `size`. + + The 'sizesrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["sizesrc"] + + @sizesrc.setter + def sizesrc(self, val): + self["sizesrc"] = val + + @property + def style(self): + """ + Sets whether a font should be styled with a normal or italic + face from its family. + + The 'style' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['normal', 'italic'] + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + Any|numpy.ndarray + """ + return self["style"] + + @style.setter + def style(self, val): + self["style"] = val + + @property + def stylesrc(self): + """ + Sets the source reference on Chart Studio Cloud for `style`. + + The 'stylesrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["stylesrc"] + + @stylesrc.setter + def stylesrc(self, val): + self["stylesrc"] = val + + @property + def textcase(self): + """ + Sets capitalization of text. It can be used to make text appear + in all-uppercase or all-lowercase, or with each word + capitalized. + + The 'textcase' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['normal', 'word caps', 'upper', 'lower'] + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + Any|numpy.ndarray + """ + return self["textcase"] + + @textcase.setter + def textcase(self, val): + self["textcase"] = val + + @property + def textcasesrc(self): + """ + Sets the source reference on Chart Studio Cloud for `textcase`. + + The 'textcasesrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["textcasesrc"] + + @textcasesrc.setter + def textcasesrc(self, val): + self["textcasesrc"] = val + + @property + def variant(self): + """ + Sets the variant of the font. + + The 'variant' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['normal', 'small-caps', 'all-small-caps', + 'all-petite-caps', 'petite-caps', 'unicase'] + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + Any|numpy.ndarray + """ + return self["variant"] + + @variant.setter + def variant(self, val): + self["variant"] = val + + @property + def variantsrc(self): + """ + Sets the source reference on Chart Studio Cloud for `variant`. + + The 'variantsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["variantsrc"] + + @variantsrc.setter + def variantsrc(self, val): + self["variantsrc"] = val + + @property + def weight(self): + """ + Sets the weight (or boldness) of the font. + + The 'weight' property is a integer and may be specified as: + - An int (or float that will be cast to an int) + in the interval [1, 1000] + OR exactly one of ['normal', 'bold'] (e.g. 'bold') + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + int|numpy.ndarray + """ + return self["weight"] + + @weight.setter + def weight(self, val): + self["weight"] = val + + @property + def weightsrc(self): + """ + Sets the source reference on Chart Studio Cloud for `weight`. + + The 'weightsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["weightsrc"] + + @weightsrc.setter + def weightsrc(self, val): + self["weightsrc"] = val + + @property + def _prop_descriptions(self): + return """\ + color + + colorsrc + Sets the source reference on Chart Studio Cloud for + `color`. + family + HTML font family - the typeface that will be applied by + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. + familysrc + Sets the source reference on Chart Studio Cloud for + `family`. + lineposition + Sets the kind of decoration line(s) with text, such as + an "under", "over" or "through" as well as combinations + e.g. "under+over", etc. + linepositionsrc + Sets the source reference on Chart Studio Cloud for + `lineposition`. + shadow + Sets the shape and color of the shadow behind text. + "auto" places minimal shadow and applies contrast text + font color. See https://developer.mozilla.org/en- + US/docs/Web/CSS/text-shadow for additional options. + shadowsrc + Sets the source reference on Chart Studio Cloud for + `shadow`. + size + + sizesrc + Sets the source reference on Chart Studio Cloud for + `size`. + style + Sets whether a font should be styled with a normal or + italic face from its family. + stylesrc + Sets the source reference on Chart Studio Cloud for + `style`. + textcase + Sets capitalization of text. It can be used to make + text appear in all-uppercase or all-lowercase, or with + each word capitalized. + textcasesrc + Sets the source reference on Chart Studio Cloud for + `textcase`. + variant + Sets the variant of the font. + variantsrc + Sets the source reference on Chart Studio Cloud for + `variant`. + weight + Sets the weight (or boldness) of the font. + weightsrc + Sets the source reference on Chart Studio Cloud for + `weight`. + """ + + def __init__( + self, + arg=None, + color=None, + colorsrc=None, + family=None, + familysrc=None, + lineposition=None, + linepositionsrc=None, + shadow=None, + shadowsrc=None, + size=None, + sizesrc=None, + style=None, + stylesrc=None, + textcase=None, + textcasesrc=None, + variant=None, + variantsrc=None, + weight=None, + weightsrc=None, + **kwargs, + ): + """ + Construct a new Font object + + Sets the font used in hover labels. + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.densitymap.hoverlabel.Font` + color + + colorsrc + Sets the source reference on Chart Studio Cloud for + `color`. + family + HTML font family - the typeface that will be applied by + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. + familysrc + Sets the source reference on Chart Studio Cloud for + `family`. + lineposition + Sets the kind of decoration line(s) with text, such as + an "under", "over" or "through" as well as combinations + e.g. "under+over", etc. + linepositionsrc + Sets the source reference on Chart Studio Cloud for + `lineposition`. + shadow + Sets the shape and color of the shadow behind text. + "auto" places minimal shadow and applies contrast text + font color. See https://developer.mozilla.org/en- + US/docs/Web/CSS/text-shadow for additional options. + shadowsrc + Sets the source reference on Chart Studio Cloud for + `shadow`. + size + + sizesrc + Sets the source reference on Chart Studio Cloud for + `size`. + style + Sets whether a font should be styled with a normal or + italic face from its family. + stylesrc + Sets the source reference on Chart Studio Cloud for + `style`. + textcase + Sets capitalization of text. It can be used to make + text appear in all-uppercase or all-lowercase, or with + each word capitalized. + textcasesrc + Sets the source reference on Chart Studio Cloud for + `textcase`. + variant + Sets the variant of the font. + variantsrc + Sets the source reference on Chart Studio Cloud for + `variant`. + weight + Sets the weight (or boldness) of the font. + weightsrc + Sets the source reference on Chart Studio Cloud for + `weight`. + + Returns + ------- + Font + """ + super().__init__("font") + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + if arg is None: + arg = {} + elif isinstance(arg, self.__class__): + arg = arg.to_plotly_json() + elif isinstance(arg, dict): + arg = _copy.copy(arg) + else: + raise ValueError("""\ +The first argument to the plotly.graph_objs.densitymap.hoverlabel.Font +constructor must be a dict or +an instance of :class:`plotly.graph_objs.densitymap.hoverlabel.Font`""") + + self._skip_invalid = kwargs.pop("skip_invalid", False) + self._validate = kwargs.pop("_validate", True) + + self._set_property("color", arg, color) + self._set_property("colorsrc", arg, colorsrc) + self._set_property("family", arg, family) + self._set_property("familysrc", arg, familysrc) + self._set_property("lineposition", arg, lineposition) + self._set_property("linepositionsrc", arg, linepositionsrc) + self._set_property("shadow", arg, shadow) + self._set_property("shadowsrc", arg, shadowsrc) + self._set_property("size", arg, size) + self._set_property("sizesrc", arg, sizesrc) + self._set_property("style", arg, style) + self._set_property("stylesrc", arg, stylesrc) + self._set_property("textcase", arg, textcase) + self._set_property("textcasesrc", arg, textcasesrc) + self._set_property("variant", arg, variant) + self._set_property("variantsrc", arg, variantsrc) + self._set_property("weight", arg, weight) + self._set_property("weightsrc", arg, weightsrc) + self._process_kwargs(**dict(arg, **kwargs)) + self._skip_invalid = False diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/densitymap/legendgrouptitle/.___init__.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/densitymap/legendgrouptitle/.___init__.py new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/densitymap/legendgrouptitle/.___init__.py differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/densitymap/legendgrouptitle/.___pycache__ b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/densitymap/legendgrouptitle/.___pycache__ new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/densitymap/legendgrouptitle/.___pycache__ differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/densitymap/legendgrouptitle/.__font.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/densitymap/legendgrouptitle/.__font.py new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/densitymap/legendgrouptitle/.__font.py differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/densitymap/legendgrouptitle/__init__.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/densitymap/legendgrouptitle/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..56f600d3458c41f269053307377e9707ab13e090 --- /dev/null +++ b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/densitymap/legendgrouptitle/__init__.py @@ -0,0 +1,9 @@ +import sys +from typing import TYPE_CHECKING + +if TYPE_CHECKING: + from ._font import Font +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import(__name__, [], ["._font.Font"]) diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/densitymap/legendgrouptitle/_font.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/densitymap/legendgrouptitle/_font.py new file mode 100644 index 0000000000000000000000000000000000000000..3aed80b8ef63d63b0e32ed4f7f9ece1720e862bb --- /dev/null +++ b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/densitymap/legendgrouptitle/_font.py @@ -0,0 +1,334 @@ +# --- THIS FILE IS AUTO-GENERATED --- +# Modifications will be overwitten the next time code generation run. + +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Font(_BaseTraceHierarchyType): + _parent_path_str = "densitymap.legendgrouptitle" + _path_str = "densitymap.legendgrouptitle.font" + _valid_props = { + "color", + "family", + "lineposition", + "shadow", + "size", + "style", + "textcase", + "variant", + "weight", + } + + @property + def color(self): + """ + The 'color' property is a color and may be specified as: + - A hex string (e.g. '#ff0000') + - An rgb/rgba string (e.g. 'rgb(255,0,0)') + - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') + - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') + - A named CSS color: see https://plotly.com/python/css-colors/ for a list + + Returns + ------- + str + """ + return self["color"] + + @color.setter + def color(self, val): + self["color"] = val + + @property + def family(self): + """ + HTML font family - the typeface that will be applied by the web + browser. The web browser can only apply a font if it is + available on the system where it runs. Provide multiple font + families, separated by commas, to indicate the order in which + to apply fonts if they aren't available. + + The 'family' property is a string and must be specified as: + - A non-empty string + + Returns + ------- + str + """ + return self["family"] + + @family.setter + def family(self, val): + self["family"] = val + + @property + def lineposition(self): + """ + Sets the kind of decoration line(s) with text, such as an + "under", "over" or "through" as well as combinations e.g. + "under+over", etc. + + The 'lineposition' property is a flaglist and may be specified + as a string containing: + - Any combination of ['under', 'over', 'through'] joined with '+' characters + (e.g. 'under+over') + OR exactly one of ['none'] (e.g. 'none') + + Returns + ------- + Any + """ + return self["lineposition"] + + @lineposition.setter + def lineposition(self, val): + self["lineposition"] = val + + @property + def shadow(self): + """ + Sets the shape and color of the shadow behind text. "auto" + places minimal shadow and applies contrast text font color. See + https://developer.mozilla.org/en-US/docs/Web/CSS/text-shadow + for additional options. + + The 'shadow' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["shadow"] + + @shadow.setter + def shadow(self, val): + self["shadow"] = val + + @property + def size(self): + """ + The 'size' property is a number and may be specified as: + - An int or float in the interval [1, inf] + + Returns + ------- + int|float + """ + return self["size"] + + @size.setter + def size(self, val): + self["size"] = val + + @property + def style(self): + """ + Sets whether a font should be styled with a normal or italic + face from its family. + + The 'style' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['normal', 'italic'] + + Returns + ------- + Any + """ + return self["style"] + + @style.setter + def style(self, val): + self["style"] = val + + @property + def textcase(self): + """ + Sets capitalization of text. It can be used to make text appear + in all-uppercase or all-lowercase, or with each word + capitalized. + + The 'textcase' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['normal', 'word caps', 'upper', 'lower'] + + Returns + ------- + Any + """ + return self["textcase"] + + @textcase.setter + def textcase(self, val): + self["textcase"] = val + + @property + def variant(self): + """ + Sets the variant of the font. + + The 'variant' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['normal', 'small-caps', 'all-small-caps', + 'all-petite-caps', 'petite-caps', 'unicase'] + + Returns + ------- + Any + """ + return self["variant"] + + @variant.setter + def variant(self, val): + self["variant"] = val + + @property + def weight(self): + """ + Sets the weight (or boldness) of the font. + + The 'weight' property is a integer and may be specified as: + - An int (or float that will be cast to an int) + in the interval [1, 1000] + OR exactly one of ['normal', 'bold'] (e.g. 'bold') + + Returns + ------- + int + """ + return self["weight"] + + @weight.setter + def weight(self, val): + self["weight"] = val + + @property + def _prop_descriptions(self): + return """\ + color + + family + HTML font family - the typeface that will be applied by + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. + lineposition + Sets the kind of decoration line(s) with text, such as + an "under", "over" or "through" as well as combinations + e.g. "under+over", etc. + shadow + Sets the shape and color of the shadow behind text. + "auto" places minimal shadow and applies contrast text + font color. See https://developer.mozilla.org/en- + US/docs/Web/CSS/text-shadow for additional options. + size + + style + Sets whether a font should be styled with a normal or + italic face from its family. + textcase + Sets capitalization of text. It can be used to make + text appear in all-uppercase or all-lowercase, or with + each word capitalized. + variant + Sets the variant of the font. + weight + Sets the weight (or boldness) of the font. + """ + + def __init__( + self, + arg=None, + color=None, + family=None, + lineposition=None, + shadow=None, + size=None, + style=None, + textcase=None, + variant=None, + weight=None, + **kwargs, + ): + """ + Construct a new Font object + + Sets this legend group's title font. + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of :class:`plotly.graph_objs.densitymap.leg + endgrouptitle.Font` + color + + family + HTML font family - the typeface that will be applied by + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. + lineposition + Sets the kind of decoration line(s) with text, such as + an "under", "over" or "through" as well as combinations + e.g. "under+over", etc. + shadow + Sets the shape and color of the shadow behind text. + "auto" places minimal shadow and applies contrast text + font color. See https://developer.mozilla.org/en- + US/docs/Web/CSS/text-shadow for additional options. + size + + style + Sets whether a font should be styled with a normal or + italic face from its family. + textcase + Sets capitalization of text. It can be used to make + text appear in all-uppercase or all-lowercase, or with + each word capitalized. + variant + Sets the variant of the font. + weight + Sets the weight (or boldness) of the font. + + Returns + ------- + Font + """ + super().__init__("font") + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + if arg is None: + arg = {} + elif isinstance(arg, self.__class__): + arg = arg.to_plotly_json() + elif isinstance(arg, dict): + arg = _copy.copy(arg) + else: + raise ValueError("""\ +The first argument to the plotly.graph_objs.densitymap.legendgrouptitle.Font +constructor must be a dict or +an instance of :class:`plotly.graph_objs.densitymap.legendgrouptitle.Font`""") + + self._skip_invalid = kwargs.pop("skip_invalid", False) + self._validate = kwargs.pop("_validate", True) + + self._set_property("color", arg, color) + self._set_property("family", arg, family) + self._set_property("lineposition", arg, lineposition) + self._set_property("shadow", arg, shadow) + self._set_property("size", arg, size) + self._set_property("style", arg, style) + self._set_property("textcase", arg, textcase) + self._set_property("variant", arg, variant) + self._set_property("weight", arg, weight) + self._process_kwargs(**dict(arg, **kwargs)) + self._skip_invalid = False diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/densitymapbox/.___init__.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/densitymapbox/.___init__.py new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/densitymapbox/.___init__.py differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/densitymapbox/.___pycache__ b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/densitymapbox/.___pycache__ new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/densitymapbox/.___pycache__ differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/densitymapbox/.__colorbar.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/densitymapbox/.__colorbar.py new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/densitymapbox/.__colorbar.py differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/densitymapbox/.__hoverlabel.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/densitymapbox/.__hoverlabel.py new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/densitymapbox/.__hoverlabel.py differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/densitymapbox/.__legendgrouptitle.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/densitymapbox/.__legendgrouptitle.py new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/densitymapbox/.__legendgrouptitle.py differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/densitymapbox/.__stream.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/densitymapbox/.__stream.py new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/densitymapbox/.__stream.py differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/densitymapbox/._colorbar b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/densitymapbox/._colorbar new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/densitymapbox/._colorbar differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/densitymapbox/._hoverlabel b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/densitymapbox/._hoverlabel new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/densitymapbox/._hoverlabel differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/densitymapbox/._legendgrouptitle b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/densitymapbox/._legendgrouptitle new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/densitymapbox/._legendgrouptitle differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/densitymapbox/__init__.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/densitymapbox/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..7740f6eb1b94176403914259369671c7a60d5227 --- /dev/null +++ b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/densitymapbox/__init__.py @@ -0,0 +1,24 @@ +import sys +from typing import TYPE_CHECKING + +if TYPE_CHECKING: + from ._colorbar import ColorBar + from ._hoverlabel import Hoverlabel + from ._legendgrouptitle import Legendgrouptitle + from ._stream import Stream + from . import colorbar + from . import hoverlabel + from . import legendgrouptitle +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [".colorbar", ".hoverlabel", ".legendgrouptitle"], + [ + "._colorbar.ColorBar", + "._hoverlabel.Hoverlabel", + "._legendgrouptitle.Legendgrouptitle", + "._stream.Stream", + ], + ) diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/densitymapbox/_colorbar.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/densitymapbox/_colorbar.py new file mode 100644 index 0000000000000000000000000000000000000000..d1a2f791c934eabc16428e7164f54e3fe3292d17 --- /dev/null +++ b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/densitymapbox/_colorbar.py @@ -0,0 +1,1739 @@ +# --- THIS FILE IS AUTO-GENERATED --- +# Modifications will be overwitten the next time code generation run. + +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class ColorBar(_BaseTraceHierarchyType): + _parent_path_str = "densitymapbox" + _path_str = "densitymapbox.colorbar" + _valid_props = { + "bgcolor", + "bordercolor", + "borderwidth", + "dtick", + "exponentformat", + "labelalias", + "len", + "lenmode", + "minexponent", + "nticks", + "orientation", + "outlinecolor", + "outlinewidth", + "separatethousands", + "showexponent", + "showticklabels", + "showtickprefix", + "showticksuffix", + "thickness", + "thicknessmode", + "tick0", + "tickangle", + "tickcolor", + "tickfont", + "tickformat", + "tickformatstopdefaults", + "tickformatstops", + "ticklabeloverflow", + "ticklabelposition", + "ticklabelstep", + "ticklen", + "tickmode", + "tickprefix", + "ticks", + "ticksuffix", + "ticktext", + "ticktextsrc", + "tickvals", + "tickvalssrc", + "tickwidth", + "title", + "x", + "xanchor", + "xpad", + "xref", + "y", + "yanchor", + "ypad", + "yref", + } + + @property + def bgcolor(self): + """ + Sets the color of padded area. + + The 'bgcolor' property is a color and may be specified as: + - A hex string (e.g. '#ff0000') + - An rgb/rgba string (e.g. 'rgb(255,0,0)') + - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') + - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') + - A named CSS color: see https://plotly.com/python/css-colors/ for a list + + Returns + ------- + str + """ + return self["bgcolor"] + + @bgcolor.setter + def bgcolor(self, val): + self["bgcolor"] = val + + @property + def bordercolor(self): + """ + Sets the axis line color. + + The 'bordercolor' property is a color and may be specified as: + - A hex string (e.g. '#ff0000') + - An rgb/rgba string (e.g. 'rgb(255,0,0)') + - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') + - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') + - A named CSS color: see https://plotly.com/python/css-colors/ for a list + + Returns + ------- + str + """ + return self["bordercolor"] + + @bordercolor.setter + def bordercolor(self, val): + self["bordercolor"] = val + + @property + def borderwidth(self): + """ + Sets the width (in px) or the border enclosing this color bar. + + The 'borderwidth' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["borderwidth"] + + @borderwidth.setter + def borderwidth(self, val): + self["borderwidth"] = val + + @property + def dtick(self): + """ + Sets the step in-between ticks on this axis. Use with `tick0`. + Must be a positive number, or special strings available to + "log" and "date" axes. If the axis `type` is "log", then ticks + are set every 10^(n*dtick) where n is the tick number. For + example, to set a tick mark at 1, 10, 100, 1000, ... set dtick + to 1. To set tick marks at 1, 100, 10000, ... set dtick to 2. + To set tick marks at 1, 5, 25, 125, 625, 3125, ... set dtick to + log_10(5), or 0.69897000433. "log" has several special values; + "L", where `f` is a positive number, gives ticks linearly + spaced in value (but not position). For example `tick0` = 0.1, + `dtick` = "L0.5" will put ticks at 0.1, 0.6, 1.1, 1.6 etc. To + show powers of 10 plus small digits between, use "D1" (all + digits) or "D2" (only 2 and 5). `tick0` is ignored for "D1" and + "D2". If the axis `type` is "date", then you must convert the + time to milliseconds. For example, to set the interval between + ticks to one day, set `dtick` to 86400000.0. "date" also has + special values "M" gives ticks spaced by a number of months. + `n` must be a positive integer. To set ticks on the 15th of + every third month, set `tick0` to "2000-01-15" and `dtick` to + "M3". To set ticks every 4 years, set `dtick` to "M48" + + The 'dtick' property accepts values of any type + + Returns + ------- + Any + """ + return self["dtick"] + + @dtick.setter + def dtick(self, val): + self["dtick"] = val + + @property + def exponentformat(self): + """ + Determines a formatting rule for the tick exponents. For + example, consider the number 1,000,000,000. If "none", it + appears as 1,000,000,000. If "e", 1e+9. If "E", 1E+9. If + "power", 1x10^9 (with 9 in a super script). If "SI", 1G. If + "B", 1B. "SI" uses prefixes from "femto" f (10^-15) to "tera" T + (10^12). *SI extended* covers instead the full SI range from + "quecto" q (10^-30) to "quetta" Q (10^30). If "SI" or *SI + extended* is used and the exponent is beyond the above ranges, + the formatting rule will automatically be switched to the power + notation. + + The 'exponentformat' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['none', 'e', 'E', 'power', 'SI', 'B', 'SI extended'] + + Returns + ------- + Any + """ + return self["exponentformat"] + + @exponentformat.setter + def exponentformat(self, val): + self["exponentformat"] = val + + @property + def labelalias(self): + """ + Replacement text for specific tick or hover labels. For example + using {US: 'USA', CA: 'Canada'} changes US to USA and CA to + Canada. The labels we would have shown must match the keys + exactly, after adding any tickprefix or ticksuffix. For + negative numbers the minus sign symbol used (U+2212) is wider + than the regular ascii dash. That means you need to use −1 + instead of -1. labelalias can be used with any axis type, and + both keys (if needed) and values (if desired) can include html- + like tags or MathJax. + + The 'labelalias' property accepts values of any type + + Returns + ------- + Any + """ + return self["labelalias"] + + @labelalias.setter + def labelalias(self, val): + self["labelalias"] = val + + @property + def len(self): + """ + Sets the length of the color bar This measure excludes the + padding of both ends. That is, the color bar length is this + length minus the padding on both ends. + + The 'len' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["len"] + + @len.setter + def len(self, val): + self["len"] = val + + @property + def lenmode(self): + """ + Determines whether this color bar's length (i.e. the measure in + the color variation direction) is set in units of plot + "fraction" or in *pixels. Use `len` to set the value. + + The 'lenmode' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['fraction', 'pixels'] + + Returns + ------- + Any + """ + return self["lenmode"] + + @lenmode.setter + def lenmode(self, val): + self["lenmode"] = val + + @property + def minexponent(self): + """ + Hide SI prefix for 10^n if |n| is below this number. This only + has an effect when `tickformat` is "SI" or "B". + + The 'minexponent' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["minexponent"] + + @minexponent.setter + def minexponent(self, val): + self["minexponent"] = val + + @property + def nticks(self): + """ + Specifies the maximum number of ticks for the particular axis. + The actual number of ticks will be chosen automatically to be + less than or equal to `nticks`. Has an effect only if + `tickmode` is set to "auto". + + The 'nticks' property is a integer and may be specified as: + - An int (or float that will be cast to an int) + in the interval [0, 9223372036854775807] + + Returns + ------- + int + """ + return self["nticks"] + + @nticks.setter + def nticks(self, val): + self["nticks"] = val + + @property + def orientation(self): + """ + Sets the orientation of the colorbar. + + The 'orientation' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['h', 'v'] + + Returns + ------- + Any + """ + return self["orientation"] + + @orientation.setter + def orientation(self, val): + self["orientation"] = val + + @property + def outlinecolor(self): + """ + Sets the axis line color. + + The 'outlinecolor' property is a color and may be specified as: + - A hex string (e.g. '#ff0000') + - An rgb/rgba string (e.g. 'rgb(255,0,0)') + - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') + - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') + - A named CSS color: see https://plotly.com/python/css-colors/ for a list + + Returns + ------- + str + """ + return self["outlinecolor"] + + @outlinecolor.setter + def outlinecolor(self, val): + self["outlinecolor"] = val + + @property + def outlinewidth(self): + """ + Sets the width (in px) of the axis line. + + The 'outlinewidth' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["outlinewidth"] + + @outlinewidth.setter + def outlinewidth(self, val): + self["outlinewidth"] = val + + @property + def separatethousands(self): + """ + If "true", even 4-digit integers are separated + + The 'separatethousands' property is a boolean and must be specified as: + - A boolean value: True or False + + Returns + ------- + bool + """ + return self["separatethousands"] + + @separatethousands.setter + def separatethousands(self, val): + self["separatethousands"] = val + + @property + def showexponent(self): + """ + If "all", all exponents are shown besides their significands. + If "first", only the exponent of the first tick is shown. If + "last", only the exponent of the last tick is shown. If "none", + no exponents appear. + + The 'showexponent' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['all', 'first', 'last', 'none'] + + Returns + ------- + Any + """ + return self["showexponent"] + + @showexponent.setter + def showexponent(self, val): + self["showexponent"] = val + + @property + def showticklabels(self): + """ + Determines whether or not the tick labels are drawn. + + The 'showticklabels' property is a boolean and must be specified as: + - A boolean value: True or False + + Returns + ------- + bool + """ + return self["showticklabels"] + + @showticklabels.setter + def showticklabels(self, val): + self["showticklabels"] = val + + @property + def showtickprefix(self): + """ + If "all", all tick labels are displayed with a prefix. If + "first", only the first tick is displayed with a prefix. If + "last", only the last tick is displayed with a suffix. If + "none", tick prefixes are hidden. + + The 'showtickprefix' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['all', 'first', 'last', 'none'] + + Returns + ------- + Any + """ + return self["showtickprefix"] + + @showtickprefix.setter + def showtickprefix(self, val): + self["showtickprefix"] = val + + @property + def showticksuffix(self): + """ + Same as `showtickprefix` but for tick suffixes. + + The 'showticksuffix' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['all', 'first', 'last', 'none'] + + Returns + ------- + Any + """ + return self["showticksuffix"] + + @showticksuffix.setter + def showticksuffix(self, val): + self["showticksuffix"] = val + + @property + def thickness(self): + """ + Sets the thickness of the color bar This measure excludes the + size of the padding, ticks and labels. + + The 'thickness' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["thickness"] + + @thickness.setter + def thickness(self, val): + self["thickness"] = val + + @property + def thicknessmode(self): + """ + Determines whether this color bar's thickness (i.e. the measure + in the constant color direction) is set in units of plot + "fraction" or in "pixels". Use `thickness` to set the value. + + The 'thicknessmode' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['fraction', 'pixels'] + + Returns + ------- + Any + """ + return self["thicknessmode"] + + @thicknessmode.setter + def thicknessmode(self, val): + self["thicknessmode"] = val + + @property + def tick0(self): + """ + Sets the placement of the first tick on this axis. Use with + `dtick`. If the axis `type` is "log", then you must take the + log of your starting tick (e.g. to set the starting tick to + 100, set the `tick0` to 2) except when `dtick`=*L* (see + `dtick` for more info). If the axis `type` is "date", it should + be a date string, like date data. If the axis `type` is + "category", it should be a number, using the scale where each + category is assigned a serial number from zero in the order it + appears. + + The 'tick0' property accepts values of any type + + Returns + ------- + Any + """ + return self["tick0"] + + @tick0.setter + def tick0(self, val): + self["tick0"] = val + + @property + def tickangle(self): + """ + Sets the angle of the tick labels with respect to the + horizontal. For example, a `tickangle` of -90 draws the tick + labels vertically. + + The 'tickangle' property is a angle (in degrees) that may be + specified as a number between -180 and 180. + Numeric values outside this range are converted to the equivalent value + (e.g. 270 is converted to -90). + + Returns + ------- + int|float + """ + return self["tickangle"] + + @tickangle.setter + def tickangle(self, val): + self["tickangle"] = val + + @property + def tickcolor(self): + """ + Sets the tick color. + + The 'tickcolor' property is a color and may be specified as: + - A hex string (e.g. '#ff0000') + - An rgb/rgba string (e.g. 'rgb(255,0,0)') + - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') + - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') + - A named CSS color: see https://plotly.com/python/css-colors/ for a list + + Returns + ------- + str + """ + return self["tickcolor"] + + @tickcolor.setter + def tickcolor(self, val): + self["tickcolor"] = val + + @property + def tickfont(self): + """ + Sets the color bar's tick label font + + The 'tickfont' property is an instance of Tickfont + that may be specified as: + - An instance of :class:`plotly.graph_objs.densitymapbox.colorbar.Tickfont` + - A dict of string/value properties that will be passed + to the Tickfont constructor + + Returns + ------- + plotly.graph_objs.densitymapbox.colorbar.Tickfont + """ + return self["tickfont"] + + @tickfont.setter + def tickfont(self, val): + self["tickfont"] = val + + @property + def tickformat(self): + """ + Sets the tick label formatting rule using d3 formatting mini- + languages which are very similar to those in Python. For + numbers, see: + https://github.com/d3/d3-format/tree/v1.4.5#d3-format. And for + dates see: https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format. We add two items to d3's date + formatter: "%h" for half of the year as a decimal number as + well as "%{n}f" for fractional seconds with n digits. For + example, *2016-10-13 09:15:23.456* with tickformat + "%H~%M~%S.%2f" would display "09~15~23.46" + + The 'tickformat' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["tickformat"] + + @tickformat.setter + def tickformat(self, val): + self["tickformat"] = val + + @property + def tickformatstops(self): + """ + The 'tickformatstops' property is a tuple of instances of + Tickformatstop that may be specified as: + - A list or tuple of instances of plotly.graph_objs.densitymapbox.colorbar.Tickformatstop + - A list or tuple of dicts of string/value properties that + will be passed to the Tickformatstop constructor + + Returns + ------- + tuple[plotly.graph_objs.densitymapbox.colorbar.Tickformatstop] + """ + return self["tickformatstops"] + + @tickformatstops.setter + def tickformatstops(self, val): + self["tickformatstops"] = val + + @property + def tickformatstopdefaults(self): + """ + When used in a template (as layout.template.data.densitymapbox. + colorbar.tickformatstopdefaults), sets the default property + values to use for elements of + densitymapbox.colorbar.tickformatstops + + The 'tickformatstopdefaults' property is an instance of Tickformatstop + that may be specified as: + - An instance of :class:`plotly.graph_objs.densitymapbox.colorbar.Tickformatstop` + - A dict of string/value properties that will be passed + to the Tickformatstop constructor + + Returns + ------- + plotly.graph_objs.densitymapbox.colorbar.Tickformatstop + """ + return self["tickformatstopdefaults"] + + @tickformatstopdefaults.setter + def tickformatstopdefaults(self, val): + self["tickformatstopdefaults"] = val + + @property + def ticklabeloverflow(self): + """ + Determines how we handle tick labels that would overflow either + the graph div or the domain of the axis. The default value for + inside tick labels is *hide past domain*. In other cases the + default is *hide past div*. + + The 'ticklabeloverflow' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['allow', 'hide past div', 'hide past domain'] + + Returns + ------- + Any + """ + return self["ticklabeloverflow"] + + @ticklabeloverflow.setter + def ticklabeloverflow(self, val): + self["ticklabeloverflow"] = val + + @property + def ticklabelposition(self): + """ + Determines where tick labels are drawn relative to the ticks. + Left and right options are used when `orientation` is "h", top + and bottom when `orientation` is "v". + + The 'ticklabelposition' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['outside', 'inside', 'outside top', 'inside top', + 'outside left', 'inside left', 'outside right', 'inside + right', 'outside bottom', 'inside bottom'] + + Returns + ------- + Any + """ + return self["ticklabelposition"] + + @ticklabelposition.setter + def ticklabelposition(self, val): + self["ticklabelposition"] = val + + @property + def ticklabelstep(self): + """ + Sets the spacing between tick labels as compared to the spacing + between ticks. A value of 1 (default) means each tick gets a + label. A value of 2 means shows every 2nd label. A larger value + n means only every nth tick is labeled. `tick0` determines + which labels are shown. Not implemented for axes with `type` + "log" or "multicategory", or when `tickmode` is "array". + + The 'ticklabelstep' property is a integer and may be specified as: + - An int (or float that will be cast to an int) + in the interval [1, 9223372036854775807] + + Returns + ------- + int + """ + return self["ticklabelstep"] + + @ticklabelstep.setter + def ticklabelstep(self, val): + self["ticklabelstep"] = val + + @property + def ticklen(self): + """ + Sets the tick length (in px). + + The 'ticklen' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["ticklen"] + + @ticklen.setter + def ticklen(self, val): + self["ticklen"] = val + + @property + def tickmode(self): + """ + Sets the tick mode for this axis. If "auto", the number of + ticks is set via `nticks`. If "linear", the placement of the + ticks is determined by a starting position `tick0` and a tick + step `dtick` ("linear" is the default value if `tick0` and + `dtick` are provided). If "array", the placement of the ticks + is set via `tickvals` and the tick text is `ticktext`. ("array" + is the default value if `tickvals` is provided). + + The 'tickmode' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['auto', 'linear', 'array'] + + Returns + ------- + Any + """ + return self["tickmode"] + + @tickmode.setter + def tickmode(self, val): + self["tickmode"] = val + + @property + def tickprefix(self): + """ + Sets a tick label prefix. + + The 'tickprefix' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["tickprefix"] + + @tickprefix.setter + def tickprefix(self, val): + self["tickprefix"] = val + + @property + def ticks(self): + """ + Determines whether ticks are drawn or not. If "", this axis' + ticks are not drawn. If "outside" ("inside"), this axis' are + drawn outside (inside) the axis lines. + + The 'ticks' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['outside', 'inside', ''] + + Returns + ------- + Any + """ + return self["ticks"] + + @ticks.setter + def ticks(self, val): + self["ticks"] = val + + @property + def ticksuffix(self): + """ + Sets a tick label suffix. + + The 'ticksuffix' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["ticksuffix"] + + @ticksuffix.setter + def ticksuffix(self, val): + self["ticksuffix"] = val + + @property + def ticktext(self): + """ + Sets the text displayed at the ticks position via `tickvals`. + Only has an effect if `tickmode` is set to "array". Used with + `tickvals`. + + The 'ticktext' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["ticktext"] + + @ticktext.setter + def ticktext(self, val): + self["ticktext"] = val + + @property + def ticktextsrc(self): + """ + Sets the source reference on Chart Studio Cloud for `ticktext`. + + The 'ticktextsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["ticktextsrc"] + + @ticktextsrc.setter + def ticktextsrc(self, val): + self["ticktextsrc"] = val + + @property + def tickvals(self): + """ + Sets the values at which ticks on this axis appear. Only has an + effect if `tickmode` is set to "array". Used with `ticktext`. + + The 'tickvals' property is an array that may be specified as a tuple, + list, numpy array, or pandas Series + + Returns + ------- + numpy.ndarray + """ + return self["tickvals"] + + @tickvals.setter + def tickvals(self, val): + self["tickvals"] = val + + @property + def tickvalssrc(self): + """ + Sets the source reference on Chart Studio Cloud for `tickvals`. + + The 'tickvalssrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["tickvalssrc"] + + @tickvalssrc.setter + def tickvalssrc(self, val): + self["tickvalssrc"] = val + + @property + def tickwidth(self): + """ + Sets the tick width (in px). + + The 'tickwidth' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["tickwidth"] + + @tickwidth.setter + def tickwidth(self, val): + self["tickwidth"] = val + + @property + def title(self): + """ + The 'title' property is an instance of Title + that may be specified as: + - An instance of :class:`plotly.graph_objs.densitymapbox.colorbar.Title` + - A dict of string/value properties that will be passed + to the Title constructor + + Returns + ------- + plotly.graph_objs.densitymapbox.colorbar.Title + """ + return self["title"] + + @title.setter + def title(self, val): + self["title"] = val + + @property + def x(self): + """ + Sets the x position with respect to `xref` of the color bar (in + plot fraction). When `xref` is "paper", defaults to 1.02 when + `orientation` is "v" and 0.5 when `orientation` is "h". When + `xref` is "container", defaults to 1 when `orientation` is "v" + and 0.5 when `orientation` is "h". Must be between 0 and 1 if + `xref` is "container" and between "-2" and 3 if `xref` is + "paper". + + The 'x' property is a number and may be specified as: + - An int or float + + Returns + ------- + int|float + """ + return self["x"] + + @x.setter + def x(self, val): + self["x"] = val + + @property + def xanchor(self): + """ + Sets this color bar's horizontal position anchor. This anchor + binds the `x` position to the "left", "center" or "right" of + the color bar. Defaults to "left" when `orientation` is "v" and + "center" when `orientation` is "h". + + The 'xanchor' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['left', 'center', 'right'] + + Returns + ------- + Any + """ + return self["xanchor"] + + @xanchor.setter + def xanchor(self, val): + self["xanchor"] = val + + @property + def xpad(self): + """ + Sets the amount of padding (in px) along the x direction. + + The 'xpad' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["xpad"] + + @xpad.setter + def xpad(self, val): + self["xpad"] = val + + @property + def xref(self): + """ + Sets the container `x` refers to. "container" spans the entire + `width` of the plot. "paper" refers to the width of the + plotting area only. + + The 'xref' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['container', 'paper'] + + Returns + ------- + Any + """ + return self["xref"] + + @xref.setter + def xref(self, val): + self["xref"] = val + + @property + def y(self): + """ + Sets the y position with respect to `yref` of the color bar (in + plot fraction). When `yref` is "paper", defaults to 0.5 when + `orientation` is "v" and 1.02 when `orientation` is "h". When + `yref` is "container", defaults to 0.5 when `orientation` is + "v" and 1 when `orientation` is "h". Must be between 0 and 1 if + `yref` is "container" and between "-2" and 3 if `yref` is + "paper". + + The 'y' property is a number and may be specified as: + - An int or float + + Returns + ------- + int|float + """ + return self["y"] + + @y.setter + def y(self, val): + self["y"] = val + + @property + def yanchor(self): + """ + Sets this color bar's vertical position anchor This anchor + binds the `y` position to the "top", "middle" or "bottom" of + the color bar. Defaults to "middle" when `orientation` is "v" + and "bottom" when `orientation` is "h". + + The 'yanchor' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['top', 'middle', 'bottom'] + + Returns + ------- + Any + """ + return self["yanchor"] + + @yanchor.setter + def yanchor(self, val): + self["yanchor"] = val + + @property + def ypad(self): + """ + Sets the amount of padding (in px) along the y direction. + + The 'ypad' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["ypad"] + + @ypad.setter + def ypad(self, val): + self["ypad"] = val + + @property + def yref(self): + """ + Sets the container `y` refers to. "container" spans the entire + `height` of the plot. "paper" refers to the height of the + plotting area only. + + The 'yref' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['container', 'paper'] + + Returns + ------- + Any + """ + return self["yref"] + + @yref.setter + def yref(self, val): + self["yref"] = val + + @property + def _prop_descriptions(self): + return """\ + bgcolor + Sets the color of padded area. + bordercolor + Sets the axis line color. + borderwidth + Sets the width (in px) or the border enclosing this + color bar. + dtick + Sets the step in-between ticks on this axis. Use with + `tick0`. Must be a positive number, or special strings + available to "log" and "date" axes. If the axis `type` + is "log", then ticks are set every 10^(n*dtick) where n + is the tick number. For example, to set a tick mark at + 1, 10, 100, 1000, ... set dtick to 1. To set tick marks + at 1, 100, 10000, ... set dtick to 2. To set tick marks + at 1, 5, 25, 125, 625, 3125, ... set dtick to + log_10(5), or 0.69897000433. "log" has several special + values; "L", where `f` is a positive number, gives + ticks linearly spaced in value (but not position). For + example `tick0` = 0.1, `dtick` = "L0.5" will put ticks + at 0.1, 0.6, 1.1, 1.6 etc. To show powers of 10 plus + small digits between, use "D1" (all digits) or "D2" + (only 2 and 5). `tick0` is ignored for "D1" and "D2". + If the axis `type` is "date", then you must convert the + time to milliseconds. For example, to set the interval + between ticks to one day, set `dtick` to 86400000.0. + "date" also has special values "M" gives ticks + spaced by a number of months. `n` must be a positive + integer. To set ticks on the 15th of every third month, + set `tick0` to "2000-01-15" and `dtick` to "M3". To set + ticks every 4 years, set `dtick` to "M48" + exponentformat + Determines a formatting rule for the tick exponents. + For example, consider the number 1,000,000,000. If + "none", it appears as 1,000,000,000. If "e", 1e+9. If + "E", 1E+9. If "power", 1x10^9 (with 9 in a super + script). If "SI", 1G. If "B", 1B. "SI" uses prefixes + from "femto" f (10^-15) to "tera" T (10^12). *SI + extended* covers instead the full SI range from + "quecto" q (10^-30) to "quetta" Q (10^30). If "SI" or + *SI extended* is used and the exponent is beyond the + above ranges, the formatting rule will automatically be + switched to the power notation. + labelalias + Replacement text for specific tick or hover labels. For + example using {US: 'USA', CA: 'Canada'} changes US to + USA and CA to Canada. The labels we would have shown + must match the keys exactly, after adding any + tickprefix or ticksuffix. For negative numbers the + minus sign symbol used (U+2212) is wider than the + regular ascii dash. That means you need to use −1 + instead of -1. labelalias can be used with any axis + type, and both keys (if needed) and values (if desired) + can include html-like tags or MathJax. + len + Sets the length of the color bar This measure excludes + the padding of both ends. That is, the color bar length + is this length minus the padding on both ends. + lenmode + Determines whether this color bar's length (i.e. the + measure in the color variation direction) is set in + units of plot "fraction" or in *pixels. Use `len` to + set the value. + minexponent + Hide SI prefix for 10^n if |n| is below this number. + This only has an effect when `tickformat` is "SI" or + "B". + nticks + Specifies the maximum number of ticks for the + particular axis. The actual number of ticks will be + chosen automatically to be less than or equal to + `nticks`. Has an effect only if `tickmode` is set to + "auto". + orientation + Sets the orientation of the colorbar. + outlinecolor + Sets the axis line color. + outlinewidth + Sets the width (in px) of the axis line. + separatethousands + If "true", even 4-digit integers are separated + showexponent + If "all", all exponents are shown besides their + significands. If "first", only the exponent of the + first tick is shown. If "last", only the exponent of + the last tick is shown. If "none", no exponents appear. + showticklabels + Determines whether or not the tick labels are drawn. + showtickprefix + If "all", all tick labels are displayed with a prefix. + If "first", only the first tick is displayed with a + prefix. If "last", only the last tick is displayed with + a suffix. If "none", tick prefixes are hidden. + showticksuffix + Same as `showtickprefix` but for tick suffixes. + thickness + Sets the thickness of the color bar This measure + excludes the size of the padding, ticks and labels. + thicknessmode + Determines whether this color bar's thickness (i.e. the + measure in the constant color direction) is set in + units of plot "fraction" or in "pixels". Use + `thickness` to set the value. + tick0 + Sets the placement of the first tick on this axis. Use + with `dtick`. If the axis `type` is "log", then you + must take the log of your starting tick (e.g. to set + the starting tick to 100, set the `tick0` to 2) except + when `dtick`=*L* (see `dtick` for more info). If the + axis `type` is "date", it should be a date string, like + date data. If the axis `type` is "category", it should + be a number, using the scale where each category is + assigned a serial number from zero in the order it + appears. + tickangle + Sets the angle of the tick labels with respect to the + horizontal. For example, a `tickangle` of -90 draws the + tick labels vertically. + tickcolor + Sets the tick color. + tickfont + Sets the color bar's tick label font + tickformat + Sets the tick label formatting rule using d3 formatting + mini-languages which are very similar to those in + Python. For numbers, see: + https://github.com/d3/d3-format/tree/v1.4.5#d3-format. + And for dates see: https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format. We add two items to + d3's date formatter: "%h" for half of the year as a + decimal number as well as "%{n}f" for fractional + seconds with n digits. For example, *2016-10-13 + 09:15:23.456* with tickformat "%H~%M~%S.%2f" would + display "09~15~23.46" + tickformatstops + A tuple of :class:`plotly.graph_objects.densitymapbox.c + olorbar.Tickformatstop` instances or dicts with + compatible properties + tickformatstopdefaults + When used in a template (as layout.template.data.densit + ymapbox.colorbar.tickformatstopdefaults), sets the + default property values to use for elements of + densitymapbox.colorbar.tickformatstops + ticklabeloverflow + Determines how we handle tick labels that would + overflow either the graph div or the domain of the + axis. The default value for inside tick labels is *hide + past domain*. In other cases the default is *hide past + div*. + ticklabelposition + Determines where tick labels are drawn relative to the + ticks. Left and right options are used when + `orientation` is "h", top and bottom when `orientation` + is "v". + ticklabelstep + Sets the spacing between tick labels as compared to the + spacing between ticks. A value of 1 (default) means + each tick gets a label. A value of 2 means shows every + 2nd label. A larger value n means only every nth tick + is labeled. `tick0` determines which labels are shown. + Not implemented for axes with `type` "log" or + "multicategory", or when `tickmode` is "array". + ticklen + Sets the tick length (in px). + tickmode + Sets the tick mode for this axis. If "auto", the number + of ticks is set via `nticks`. If "linear", the + placement of the ticks is determined by a starting + position `tick0` and a tick step `dtick` ("linear" is + the default value if `tick0` and `dtick` are provided). + If "array", the placement of the ticks is set via + `tickvals` and the tick text is `ticktext`. ("array" is + the default value if `tickvals` is provided). + tickprefix + Sets a tick label prefix. + ticks + Determines whether ticks are drawn or not. If "", this + axis' ticks are not drawn. If "outside" ("inside"), + this axis' are drawn outside (inside) the axis lines. + ticksuffix + Sets a tick label suffix. + ticktext + Sets the text displayed at the ticks position via + `tickvals`. Only has an effect if `tickmode` is set to + "array". Used with `tickvals`. + ticktextsrc + Sets the source reference on Chart Studio Cloud for + `ticktext`. + tickvals + Sets the values at which ticks on this axis appear. + Only has an effect if `tickmode` is set to "array". + Used with `ticktext`. + tickvalssrc + Sets the source reference on Chart Studio Cloud for + `tickvals`. + tickwidth + Sets the tick width (in px). + title + :class:`plotly.graph_objects.densitymapbox.colorbar.Tit + le` instance or dict with compatible properties + x + Sets the x position with respect to `xref` of the color + bar (in plot fraction). When `xref` is "paper", + defaults to 1.02 when `orientation` is "v" and 0.5 when + `orientation` is "h". When `xref` is "container", + defaults to 1 when `orientation` is "v" and 0.5 when + `orientation` is "h". Must be between 0 and 1 if `xref` + is "container" and between "-2" and 3 if `xref` is + "paper". + xanchor + Sets this color bar's horizontal position anchor. This + anchor binds the `x` position to the "left", "center" + or "right" of the color bar. Defaults to "left" when + `orientation` is "v" and "center" when `orientation` is + "h". + xpad + Sets the amount of padding (in px) along the x + direction. + xref + Sets the container `x` refers to. "container" spans the + entire `width` of the plot. "paper" refers to the width + of the plotting area only. + y + Sets the y position with respect to `yref` of the color + bar (in plot fraction). When `yref` is "paper", + defaults to 0.5 when `orientation` is "v" and 1.02 when + `orientation` is "h". When `yref` is "container", + defaults to 0.5 when `orientation` is "v" and 1 when + `orientation` is "h". Must be between 0 and 1 if `yref` + is "container" and between "-2" and 3 if `yref` is + "paper". + yanchor + Sets this color bar's vertical position anchor This + anchor binds the `y` position to the "top", "middle" or + "bottom" of the color bar. Defaults to "middle" when + `orientation` is "v" and "bottom" when `orientation` is + "h". + ypad + Sets the amount of padding (in px) along the y + direction. + yref + Sets the container `y` refers to. "container" spans the + entire `height` of the plot. "paper" refers to the + height of the plotting area only. + """ + + def __init__( + self, + arg=None, + bgcolor=None, + bordercolor=None, + borderwidth=None, + dtick=None, + exponentformat=None, + labelalias=None, + len=None, + lenmode=None, + minexponent=None, + nticks=None, + orientation=None, + outlinecolor=None, + outlinewidth=None, + separatethousands=None, + showexponent=None, + showticklabels=None, + showtickprefix=None, + showticksuffix=None, + thickness=None, + thicknessmode=None, + tick0=None, + tickangle=None, + tickcolor=None, + tickfont=None, + tickformat=None, + tickformatstops=None, + tickformatstopdefaults=None, + ticklabeloverflow=None, + ticklabelposition=None, + ticklabelstep=None, + ticklen=None, + tickmode=None, + tickprefix=None, + ticks=None, + ticksuffix=None, + ticktext=None, + ticktextsrc=None, + tickvals=None, + tickvalssrc=None, + tickwidth=None, + title=None, + x=None, + xanchor=None, + xpad=None, + xref=None, + y=None, + yanchor=None, + ypad=None, + yref=None, + **kwargs, + ): + """ + Construct a new ColorBar object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.densitymapbox.ColorBar` + bgcolor + Sets the color of padded area. + bordercolor + Sets the axis line color. + borderwidth + Sets the width (in px) or the border enclosing this + color bar. + dtick + Sets the step in-between ticks on this axis. Use with + `tick0`. Must be a positive number, or special strings + available to "log" and "date" axes. If the axis `type` + is "log", then ticks are set every 10^(n*dtick) where n + is the tick number. For example, to set a tick mark at + 1, 10, 100, 1000, ... set dtick to 1. To set tick marks + at 1, 100, 10000, ... set dtick to 2. To set tick marks + at 1, 5, 25, 125, 625, 3125, ... set dtick to + log_10(5), or 0.69897000433. "log" has several special + values; "L", where `f` is a positive number, gives + ticks linearly spaced in value (but not position). For + example `tick0` = 0.1, `dtick` = "L0.5" will put ticks + at 0.1, 0.6, 1.1, 1.6 etc. To show powers of 10 plus + small digits between, use "D1" (all digits) or "D2" + (only 2 and 5). `tick0` is ignored for "D1" and "D2". + If the axis `type` is "date", then you must convert the + time to milliseconds. For example, to set the interval + between ticks to one day, set `dtick` to 86400000.0. + "date" also has special values "M" gives ticks + spaced by a number of months. `n` must be a positive + integer. To set ticks on the 15th of every third month, + set `tick0` to "2000-01-15" and `dtick` to "M3". To set + ticks every 4 years, set `dtick` to "M48" + exponentformat + Determines a formatting rule for the tick exponents. + For example, consider the number 1,000,000,000. If + "none", it appears as 1,000,000,000. If "e", 1e+9. If + "E", 1E+9. If "power", 1x10^9 (with 9 in a super + script). If "SI", 1G. If "B", 1B. "SI" uses prefixes + from "femto" f (10^-15) to "tera" T (10^12). *SI + extended* covers instead the full SI range from + "quecto" q (10^-30) to "quetta" Q (10^30). If "SI" or + *SI extended* is used and the exponent is beyond the + above ranges, the formatting rule will automatically be + switched to the power notation. + labelalias + Replacement text for specific tick or hover labels. For + example using {US: 'USA', CA: 'Canada'} changes US to + USA and CA to Canada. The labels we would have shown + must match the keys exactly, after adding any + tickprefix or ticksuffix. For negative numbers the + minus sign symbol used (U+2212) is wider than the + regular ascii dash. That means you need to use −1 + instead of -1. labelalias can be used with any axis + type, and both keys (if needed) and values (if desired) + can include html-like tags or MathJax. + len + Sets the length of the color bar This measure excludes + the padding of both ends. That is, the color bar length + is this length minus the padding on both ends. + lenmode + Determines whether this color bar's length (i.e. the + measure in the color variation direction) is set in + units of plot "fraction" or in *pixels. Use `len` to + set the value. + minexponent + Hide SI prefix for 10^n if |n| is below this number. + This only has an effect when `tickformat` is "SI" or + "B". + nticks + Specifies the maximum number of ticks for the + particular axis. The actual number of ticks will be + chosen automatically to be less than or equal to + `nticks`. Has an effect only if `tickmode` is set to + "auto". + orientation + Sets the orientation of the colorbar. + outlinecolor + Sets the axis line color. + outlinewidth + Sets the width (in px) of the axis line. + separatethousands + If "true", even 4-digit integers are separated + showexponent + If "all", all exponents are shown besides their + significands. If "first", only the exponent of the + first tick is shown. If "last", only the exponent of + the last tick is shown. If "none", no exponents appear. + showticklabels + Determines whether or not the tick labels are drawn. + showtickprefix + If "all", all tick labels are displayed with a prefix. + If "first", only the first tick is displayed with a + prefix. If "last", only the last tick is displayed with + a suffix. If "none", tick prefixes are hidden. + showticksuffix + Same as `showtickprefix` but for tick suffixes. + thickness + Sets the thickness of the color bar This measure + excludes the size of the padding, ticks and labels. + thicknessmode + Determines whether this color bar's thickness (i.e. the + measure in the constant color direction) is set in + units of plot "fraction" or in "pixels". Use + `thickness` to set the value. + tick0 + Sets the placement of the first tick on this axis. Use + with `dtick`. If the axis `type` is "log", then you + must take the log of your starting tick (e.g. to set + the starting tick to 100, set the `tick0` to 2) except + when `dtick`=*L* (see `dtick` for more info). If the + axis `type` is "date", it should be a date string, like + date data. If the axis `type` is "category", it should + be a number, using the scale where each category is + assigned a serial number from zero in the order it + appears. + tickangle + Sets the angle of the tick labels with respect to the + horizontal. For example, a `tickangle` of -90 draws the + tick labels vertically. + tickcolor + Sets the tick color. + tickfont + Sets the color bar's tick label font + tickformat + Sets the tick label formatting rule using d3 formatting + mini-languages which are very similar to those in + Python. For numbers, see: + https://github.com/d3/d3-format/tree/v1.4.5#d3-format. + And for dates see: https://github.com/d3/d3-time- + format/tree/v2.2.3#locale_format. We add two items to + d3's date formatter: "%h" for half of the year as a + decimal number as well as "%{n}f" for fractional + seconds with n digits. For example, *2016-10-13 + 09:15:23.456* with tickformat "%H~%M~%S.%2f" would + display "09~15~23.46" + tickformatstops + A tuple of :class:`plotly.graph_objects.densitymapbox.c + olorbar.Tickformatstop` instances or dicts with + compatible properties + tickformatstopdefaults + When used in a template (as layout.template.data.densit + ymapbox.colorbar.tickformatstopdefaults), sets the + default property values to use for elements of + densitymapbox.colorbar.tickformatstops + ticklabeloverflow + Determines how we handle tick labels that would + overflow either the graph div or the domain of the + axis. The default value for inside tick labels is *hide + past domain*. In other cases the default is *hide past + div*. + ticklabelposition + Determines where tick labels are drawn relative to the + ticks. Left and right options are used when + `orientation` is "h", top and bottom when `orientation` + is "v". + ticklabelstep + Sets the spacing between tick labels as compared to the + spacing between ticks. A value of 1 (default) means + each tick gets a label. A value of 2 means shows every + 2nd label. A larger value n means only every nth tick + is labeled. `tick0` determines which labels are shown. + Not implemented for axes with `type` "log" or + "multicategory", or when `tickmode` is "array". + ticklen + Sets the tick length (in px). + tickmode + Sets the tick mode for this axis. If "auto", the number + of ticks is set via `nticks`. If "linear", the + placement of the ticks is determined by a starting + position `tick0` and a tick step `dtick` ("linear" is + the default value if `tick0` and `dtick` are provided). + If "array", the placement of the ticks is set via + `tickvals` and the tick text is `ticktext`. ("array" is + the default value if `tickvals` is provided). + tickprefix + Sets a tick label prefix. + ticks + Determines whether ticks are drawn or not. If "", this + axis' ticks are not drawn. If "outside" ("inside"), + this axis' are drawn outside (inside) the axis lines. + ticksuffix + Sets a tick label suffix. + ticktext + Sets the text displayed at the ticks position via + `tickvals`. Only has an effect if `tickmode` is set to + "array". Used with `tickvals`. + ticktextsrc + Sets the source reference on Chart Studio Cloud for + `ticktext`. + tickvals + Sets the values at which ticks on this axis appear. + Only has an effect if `tickmode` is set to "array". + Used with `ticktext`. + tickvalssrc + Sets the source reference on Chart Studio Cloud for + `tickvals`. + tickwidth + Sets the tick width (in px). + title + :class:`plotly.graph_objects.densitymapbox.colorbar.Tit + le` instance or dict with compatible properties + x + Sets the x position with respect to `xref` of the color + bar (in plot fraction). When `xref` is "paper", + defaults to 1.02 when `orientation` is "v" and 0.5 when + `orientation` is "h". When `xref` is "container", + defaults to 1 when `orientation` is "v" and 0.5 when + `orientation` is "h". Must be between 0 and 1 if `xref` + is "container" and between "-2" and 3 if `xref` is + "paper". + xanchor + Sets this color bar's horizontal position anchor. This + anchor binds the `x` position to the "left", "center" + or "right" of the color bar. Defaults to "left" when + `orientation` is "v" and "center" when `orientation` is + "h". + xpad + Sets the amount of padding (in px) along the x + direction. + xref + Sets the container `x` refers to. "container" spans the + entire `width` of the plot. "paper" refers to the width + of the plotting area only. + y + Sets the y position with respect to `yref` of the color + bar (in plot fraction). When `yref` is "paper", + defaults to 0.5 when `orientation` is "v" and 1.02 when + `orientation` is "h". When `yref` is "container", + defaults to 0.5 when `orientation` is "v" and 1 when + `orientation` is "h". Must be between 0 and 1 if `yref` + is "container" and between "-2" and 3 if `yref` is + "paper". + yanchor + Sets this color bar's vertical position anchor This + anchor binds the `y` position to the "top", "middle" or + "bottom" of the color bar. Defaults to "middle" when + `orientation` is "v" and "bottom" when `orientation` is + "h". + ypad + Sets the amount of padding (in px) along the y + direction. + yref + Sets the container `y` refers to. "container" spans the + entire `height` of the plot. "paper" refers to the + height of the plotting area only. + + Returns + ------- + ColorBar + """ + super().__init__("colorbar") + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + if arg is None: + arg = {} + elif isinstance(arg, self.__class__): + arg = arg.to_plotly_json() + elif isinstance(arg, dict): + arg = _copy.copy(arg) + else: + raise ValueError("""\ +The first argument to the plotly.graph_objs.densitymapbox.ColorBar +constructor must be a dict or +an instance of :class:`plotly.graph_objs.densitymapbox.ColorBar`""") + + self._skip_invalid = kwargs.pop("skip_invalid", False) + self._validate = kwargs.pop("_validate", True) + + self._set_property("bgcolor", arg, bgcolor) + self._set_property("bordercolor", arg, bordercolor) + self._set_property("borderwidth", arg, borderwidth) + self._set_property("dtick", arg, dtick) + self._set_property("exponentformat", arg, exponentformat) + self._set_property("labelalias", arg, labelalias) + self._set_property("len", arg, len) + self._set_property("lenmode", arg, lenmode) + self._set_property("minexponent", arg, minexponent) + self._set_property("nticks", arg, nticks) + self._set_property("orientation", arg, orientation) + self._set_property("outlinecolor", arg, outlinecolor) + self._set_property("outlinewidth", arg, outlinewidth) + self._set_property("separatethousands", arg, separatethousands) + self._set_property("showexponent", arg, showexponent) + self._set_property("showticklabels", arg, showticklabels) + self._set_property("showtickprefix", arg, showtickprefix) + self._set_property("showticksuffix", arg, showticksuffix) + self._set_property("thickness", arg, thickness) + self._set_property("thicknessmode", arg, thicknessmode) + self._set_property("tick0", arg, tick0) + self._set_property("tickangle", arg, tickangle) + self._set_property("tickcolor", arg, tickcolor) + self._set_property("tickfont", arg, tickfont) + self._set_property("tickformat", arg, tickformat) + self._set_property("tickformatstops", arg, tickformatstops) + self._set_property("tickformatstopdefaults", arg, tickformatstopdefaults) + self._set_property("ticklabeloverflow", arg, ticklabeloverflow) + self._set_property("ticklabelposition", arg, ticklabelposition) + self._set_property("ticklabelstep", arg, ticklabelstep) + self._set_property("ticklen", arg, ticklen) + self._set_property("tickmode", arg, tickmode) + self._set_property("tickprefix", arg, tickprefix) + self._set_property("ticks", arg, ticks) + self._set_property("ticksuffix", arg, ticksuffix) + self._set_property("ticktext", arg, ticktext) + self._set_property("ticktextsrc", arg, ticktextsrc) + self._set_property("tickvals", arg, tickvals) + self._set_property("tickvalssrc", arg, tickvalssrc) + self._set_property("tickwidth", arg, tickwidth) + self._set_property("title", arg, title) + self._set_property("x", arg, x) + self._set_property("xanchor", arg, xanchor) + self._set_property("xpad", arg, xpad) + self._set_property("xref", arg, xref) + self._set_property("y", arg, y) + self._set_property("yanchor", arg, yanchor) + self._set_property("ypad", arg, ypad) + self._set_property("yref", arg, yref) + self._process_kwargs(**dict(arg, **kwargs)) + self._skip_invalid = False diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/densitymapbox/_hoverlabel.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/densitymapbox/_hoverlabel.py new file mode 100644 index 0000000000000000000000000000000000000000..c026e0bf01f9199ceb49706d9a1a6e2c81f0ad27 --- /dev/null +++ b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/densitymapbox/_hoverlabel.py @@ -0,0 +1,366 @@ +# --- THIS FILE IS AUTO-GENERATED --- +# Modifications will be overwitten the next time code generation run. + +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Hoverlabel(_BaseTraceHierarchyType): + _parent_path_str = "densitymapbox" + _path_str = "densitymapbox.hoverlabel" + _valid_props = { + "align", + "alignsrc", + "bgcolor", + "bgcolorsrc", + "bordercolor", + "bordercolorsrc", + "font", + "namelength", + "namelengthsrc", + "showarrow", + } + + @property + def align(self): + """ + Sets the horizontal alignment of the text content within hover + label box. Has an effect only if the hover label text spans + more two or more lines + + The 'align' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['left', 'right', 'auto'] + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + Any|numpy.ndarray + """ + return self["align"] + + @align.setter + def align(self, val): + self["align"] = val + + @property + def alignsrc(self): + """ + Sets the source reference on Chart Studio Cloud for `align`. + + The 'alignsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["alignsrc"] + + @alignsrc.setter + def alignsrc(self, val): + self["alignsrc"] = val + + @property + def bgcolor(self): + """ + Sets the background color of the hover labels for this trace + + The 'bgcolor' property is a color and may be specified as: + - A hex string (e.g. '#ff0000') + - An rgb/rgba string (e.g. 'rgb(255,0,0)') + - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') + - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') + - A named CSS color: see https://plotly.com/python/css-colors/ for a list + - A list or array of any of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["bgcolor"] + + @bgcolor.setter + def bgcolor(self, val): + self["bgcolor"] = val + + @property + def bgcolorsrc(self): + """ + Sets the source reference on Chart Studio Cloud for `bgcolor`. + + The 'bgcolorsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["bgcolorsrc"] + + @bgcolorsrc.setter + def bgcolorsrc(self, val): + self["bgcolorsrc"] = val + + @property + def bordercolor(self): + """ + Sets the border color of the hover labels for this trace. + + The 'bordercolor' property is a color and may be specified as: + - A hex string (e.g. '#ff0000') + - An rgb/rgba string (e.g. 'rgb(255,0,0)') + - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') + - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') + - A named CSS color: see https://plotly.com/python/css-colors/ for a list + - A list or array of any of the above + + Returns + ------- + str|numpy.ndarray + """ + return self["bordercolor"] + + @bordercolor.setter + def bordercolor(self, val): + self["bordercolor"] = val + + @property + def bordercolorsrc(self): + """ + Sets the source reference on Chart Studio Cloud for + `bordercolor`. + + The 'bordercolorsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["bordercolorsrc"] + + @bordercolorsrc.setter + def bordercolorsrc(self, val): + self["bordercolorsrc"] = val + + @property + def font(self): + """ + Sets the font used in hover labels. + + The 'font' property is an instance of Font + that may be specified as: + - An instance of :class:`plotly.graph_objs.densitymapbox.hoverlabel.Font` + - A dict of string/value properties that will be passed + to the Font constructor + + Returns + ------- + plotly.graph_objs.densitymapbox.hoverlabel.Font + """ + return self["font"] + + @font.setter + def font(self, val): + self["font"] = val + + @property + def namelength(self): + """ + Sets the default length (in number of characters) of the trace + name in the hover labels for all traces. -1 shows the whole + name regardless of length. 0-3 shows the first 0-3 characters, + and an integer >3 will show the whole name if it is less than + that many characters, but if it is longer, will truncate to + `namelength - 3` characters and add an ellipsis. + + The 'namelength' property is a integer and may be specified as: + - An int (or float that will be cast to an int) + in the interval [-1, 9223372036854775807] + - A tuple, list, or one-dimensional numpy array of the above + + Returns + ------- + int|numpy.ndarray + """ + return self["namelength"] + + @namelength.setter + def namelength(self, val): + self["namelength"] = val + + @property + def namelengthsrc(self): + """ + Sets the source reference on Chart Studio Cloud for + `namelength`. + + The 'namelengthsrc' property must be specified as a string or + as a plotly.grid_objs.Column object + + Returns + ------- + str + """ + return self["namelengthsrc"] + + @namelengthsrc.setter + def namelengthsrc(self, val): + self["namelengthsrc"] = val + + @property + def showarrow(self): + """ + Sets whether or not to show the hover label arrow/triangle + pointing to the data point. + + The 'showarrow' property is a boolean and must be specified as: + - A boolean value: True or False + + Returns + ------- + bool + """ + return self["showarrow"] + + @showarrow.setter + def showarrow(self, val): + self["showarrow"] = val + + @property + def _prop_descriptions(self): + return """\ + align + Sets the horizontal alignment of the text content + within hover label box. Has an effect only if the hover + label text spans more two or more lines + alignsrc + Sets the source reference on Chart Studio Cloud for + `align`. + bgcolor + Sets the background color of the hover labels for this + trace + bgcolorsrc + Sets the source reference on Chart Studio Cloud for + `bgcolor`. + bordercolor + Sets the border color of the hover labels for this + trace. + bordercolorsrc + Sets the source reference on Chart Studio Cloud for + `bordercolor`. + font + Sets the font used in hover labels. + namelength + Sets the default length (in number of characters) of + the trace name in the hover labels for all traces. -1 + shows the whole name regardless of length. 0-3 shows + the first 0-3 characters, and an integer >3 will show + the whole name if it is less than that many characters, + but if it is longer, will truncate to `namelength - 3` + characters and add an ellipsis. + namelengthsrc + Sets the source reference on Chart Studio Cloud for + `namelength`. + showarrow + Sets whether or not to show the hover label + arrow/triangle pointing to the data point. + """ + + def __init__( + self, + arg=None, + align=None, + alignsrc=None, + bgcolor=None, + bgcolorsrc=None, + bordercolor=None, + bordercolorsrc=None, + font=None, + namelength=None, + namelengthsrc=None, + showarrow=None, + **kwargs, + ): + """ + Construct a new Hoverlabel object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.densitymapbox.Hoverlabel` + align + Sets the horizontal alignment of the text content + within hover label box. Has an effect only if the hover + label text spans more two or more lines + alignsrc + Sets the source reference on Chart Studio Cloud for + `align`. + bgcolor + Sets the background color of the hover labels for this + trace + bgcolorsrc + Sets the source reference on Chart Studio Cloud for + `bgcolor`. + bordercolor + Sets the border color of the hover labels for this + trace. + bordercolorsrc + Sets the source reference on Chart Studio Cloud for + `bordercolor`. + font + Sets the font used in hover labels. + namelength + Sets the default length (in number of characters) of + the trace name in the hover labels for all traces. -1 + shows the whole name regardless of length. 0-3 shows + the first 0-3 characters, and an integer >3 will show + the whole name if it is less than that many characters, + but if it is longer, will truncate to `namelength - 3` + characters and add an ellipsis. + namelengthsrc + Sets the source reference on Chart Studio Cloud for + `namelength`. + showarrow + Sets whether or not to show the hover label + arrow/triangle pointing to the data point. + + Returns + ------- + Hoverlabel + """ + super().__init__("hoverlabel") + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + if arg is None: + arg = {} + elif isinstance(arg, self.__class__): + arg = arg.to_plotly_json() + elif isinstance(arg, dict): + arg = _copy.copy(arg) + else: + raise ValueError("""\ +The first argument to the plotly.graph_objs.densitymapbox.Hoverlabel +constructor must be a dict or +an instance of :class:`plotly.graph_objs.densitymapbox.Hoverlabel`""") + + self._skip_invalid = kwargs.pop("skip_invalid", False) + self._validate = kwargs.pop("_validate", True) + + self._set_property("align", arg, align) + self._set_property("alignsrc", arg, alignsrc) + self._set_property("bgcolor", arg, bgcolor) + self._set_property("bgcolorsrc", arg, bgcolorsrc) + self._set_property("bordercolor", arg, bordercolor) + self._set_property("bordercolorsrc", arg, bordercolorsrc) + self._set_property("font", arg, font) + self._set_property("namelength", arg, namelength) + self._set_property("namelengthsrc", arg, namelengthsrc) + self._set_property("showarrow", arg, showarrow) + self._process_kwargs(**dict(arg, **kwargs)) + self._skip_invalid = False diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/densitymapbox/_legendgrouptitle.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/densitymapbox/_legendgrouptitle.py new file mode 100644 index 0000000000000000000000000000000000000000..79528e3217706af26de241a33196ba9ed66edef6 --- /dev/null +++ b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/densitymapbox/_legendgrouptitle.py @@ -0,0 +1,104 @@ +# --- THIS FILE IS AUTO-GENERATED --- +# Modifications will be overwitten the next time code generation run. + +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Legendgrouptitle(_BaseTraceHierarchyType): + _parent_path_str = "densitymapbox" + _path_str = "densitymapbox.legendgrouptitle" + _valid_props = {"font", "text"} + + @property + def font(self): + """ + Sets this legend group's title font. + + The 'font' property is an instance of Font + that may be specified as: + - An instance of :class:`plotly.graph_objs.densitymapbox.legendgrouptitle.Font` + - A dict of string/value properties that will be passed + to the Font constructor + + Returns + ------- + plotly.graph_objs.densitymapbox.legendgrouptitle.Font + """ + return self["font"] + + @font.setter + def font(self, val): + self["font"] = val + + @property + def text(self): + """ + Sets the title of the legend group. + + The 'text' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["text"] + + @text.setter + def text(self, val): + self["text"] = val + + @property + def _prop_descriptions(self): + return """\ + font + Sets this legend group's title font. + text + Sets the title of the legend group. + """ + + def __init__(self, arg=None, font=None, text=None, **kwargs): + """ + Construct a new Legendgrouptitle object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of :class:`plotly.graph_objs.densitymapbox. + Legendgrouptitle` + font + Sets this legend group's title font. + text + Sets the title of the legend group. + + Returns + ------- + Legendgrouptitle + """ + super().__init__("legendgrouptitle") + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + if arg is None: + arg = {} + elif isinstance(arg, self.__class__): + arg = arg.to_plotly_json() + elif isinstance(arg, dict): + arg = _copy.copy(arg) + else: + raise ValueError("""\ +The first argument to the plotly.graph_objs.densitymapbox.Legendgrouptitle +constructor must be a dict or +an instance of :class:`plotly.graph_objs.densitymapbox.Legendgrouptitle`""") + + self._skip_invalid = kwargs.pop("skip_invalid", False) + self._validate = kwargs.pop("_validate", True) + + self._set_property("font", arg, font) + self._set_property("text", arg, text) + self._process_kwargs(**dict(arg, **kwargs)) + self._skip_invalid = False diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/densitymapbox/_stream.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/densitymapbox/_stream.py new file mode 100644 index 0000000000000000000000000000000000000000..9949ce71cdf3ced30871cd605c3b95fa5c400a17 --- /dev/null +++ b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/densitymapbox/_stream.py @@ -0,0 +1,114 @@ +# --- THIS FILE IS AUTO-GENERATED --- +# Modifications will be overwitten the next time code generation run. + +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Stream(_BaseTraceHierarchyType): + _parent_path_str = "densitymapbox" + _path_str = "densitymapbox.stream" + _valid_props = {"maxpoints", "token"} + + @property + def maxpoints(self): + """ + Sets the maximum number of points to keep on the plots from an + incoming stream. If `maxpoints` is set to 50, only the newest + 50 points will be displayed on the plot. + + The 'maxpoints' property is a number and may be specified as: + - An int or float in the interval [0, 10000] + + Returns + ------- + int|float + """ + return self["maxpoints"] + + @maxpoints.setter + def maxpoints(self, val): + self["maxpoints"] = val + + @property + def token(self): + """ + The stream id number links a data trace on a plot with a + stream. See https://chart-studio.plotly.com/settings for more + details. + + The 'token' property is a string and must be specified as: + - A non-empty string + + Returns + ------- + str + """ + return self["token"] + + @token.setter + def token(self, val): + self["token"] = val + + @property + def _prop_descriptions(self): + return """\ + maxpoints + Sets the maximum number of points to keep on the plots + from an incoming stream. If `maxpoints` is set to 50, + only the newest 50 points will be displayed on the + plot. + token + The stream id number links a data trace on a plot with + a stream. See https://chart-studio.plotly.com/settings + for more details. + """ + + def __init__(self, arg=None, maxpoints=None, token=None, **kwargs): + """ + Construct a new Stream object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.densitymapbox.Stream` + maxpoints + Sets the maximum number of points to keep on the plots + from an incoming stream. If `maxpoints` is set to 50, + only the newest 50 points will be displayed on the + plot. + token + The stream id number links a data trace on a plot with + a stream. See https://chart-studio.plotly.com/settings + for more details. + + Returns + ------- + Stream + """ + super().__init__("stream") + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + if arg is None: + arg = {} + elif isinstance(arg, self.__class__): + arg = arg.to_plotly_json() + elif isinstance(arg, dict): + arg = _copy.copy(arg) + else: + raise ValueError("""\ +The first argument to the plotly.graph_objs.densitymapbox.Stream +constructor must be a dict or +an instance of :class:`plotly.graph_objs.densitymapbox.Stream`""") + + self._skip_invalid = kwargs.pop("skip_invalid", False) + self._validate = kwargs.pop("_validate", True) + + self._set_property("maxpoints", arg, maxpoints) + self._set_property("token", arg, token) + self._process_kwargs(**dict(arg, **kwargs)) + self._skip_invalid = False diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/densitymapbox/colorbar/.___init__.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/densitymapbox/colorbar/.___init__.py new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/densitymapbox/colorbar/.___init__.py differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/densitymapbox/colorbar/.___pycache__ b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/densitymapbox/colorbar/.___pycache__ new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/densitymapbox/colorbar/.___pycache__ differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/densitymapbox/colorbar/.__tickfont.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/densitymapbox/colorbar/.__tickfont.py new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/densitymapbox/colorbar/.__tickfont.py differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/densitymapbox/colorbar/.__tickformatstop.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/densitymapbox/colorbar/.__tickformatstop.py new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/densitymapbox/colorbar/.__tickformatstop.py differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/densitymapbox/colorbar/.__title.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/densitymapbox/colorbar/.__title.py new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/densitymapbox/colorbar/.__title.py differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/densitymapbox/colorbar/._title b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/densitymapbox/colorbar/._title new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/densitymapbox/colorbar/._title differ diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/densitymapbox/colorbar/__init__.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/densitymapbox/colorbar/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..4690d3cc738a44d43a04d43d3aa0be36d7cd34e2 --- /dev/null +++ b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/densitymapbox/colorbar/__init__.py @@ -0,0 +1,16 @@ +import sys +from typing import TYPE_CHECKING + +if TYPE_CHECKING: + from ._tickfont import Tickfont + from ._tickformatstop import Tickformatstop + from ._title import Title + from . import title +else: + from _plotly_utils.importers import relative_import + + __all__, __getattr__, __dir__ = relative_import( + __name__, + [".title"], + ["._tickfont.Tickfont", "._tickformatstop.Tickformatstop", "._title.Title"], + ) diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/densitymapbox/colorbar/_tickfont.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/densitymapbox/colorbar/_tickfont.py new file mode 100644 index 0000000000000000000000000000000000000000..046dc4fc269d9486e375862ea9fa7b503972edb4 --- /dev/null +++ b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/densitymapbox/colorbar/_tickfont.py @@ -0,0 +1,334 @@ +# --- THIS FILE IS AUTO-GENERATED --- +# Modifications will be overwitten the next time code generation run. + +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Tickfont(_BaseTraceHierarchyType): + _parent_path_str = "densitymapbox.colorbar" + _path_str = "densitymapbox.colorbar.tickfont" + _valid_props = { + "color", + "family", + "lineposition", + "shadow", + "size", + "style", + "textcase", + "variant", + "weight", + } + + @property + def color(self): + """ + The 'color' property is a color and may be specified as: + - A hex string (e.g. '#ff0000') + - An rgb/rgba string (e.g. 'rgb(255,0,0)') + - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') + - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') + - A named CSS color: see https://plotly.com/python/css-colors/ for a list + + Returns + ------- + str + """ + return self["color"] + + @color.setter + def color(self, val): + self["color"] = val + + @property + def family(self): + """ + HTML font family - the typeface that will be applied by the web + browser. The web browser can only apply a font if it is + available on the system where it runs. Provide multiple font + families, separated by commas, to indicate the order in which + to apply fonts if they aren't available. + + The 'family' property is a string and must be specified as: + - A non-empty string + + Returns + ------- + str + """ + return self["family"] + + @family.setter + def family(self, val): + self["family"] = val + + @property + def lineposition(self): + """ + Sets the kind of decoration line(s) with text, such as an + "under", "over" or "through" as well as combinations e.g. + "under+over", etc. + + The 'lineposition' property is a flaglist and may be specified + as a string containing: + - Any combination of ['under', 'over', 'through'] joined with '+' characters + (e.g. 'under+over') + OR exactly one of ['none'] (e.g. 'none') + + Returns + ------- + Any + """ + return self["lineposition"] + + @lineposition.setter + def lineposition(self, val): + self["lineposition"] = val + + @property + def shadow(self): + """ + Sets the shape and color of the shadow behind text. "auto" + places minimal shadow and applies contrast text font color. See + https://developer.mozilla.org/en-US/docs/Web/CSS/text-shadow + for additional options. + + The 'shadow' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["shadow"] + + @shadow.setter + def shadow(self, val): + self["shadow"] = val + + @property + def size(self): + """ + The 'size' property is a number and may be specified as: + - An int or float in the interval [1, inf] + + Returns + ------- + int|float + """ + return self["size"] + + @size.setter + def size(self, val): + self["size"] = val + + @property + def style(self): + """ + Sets whether a font should be styled with a normal or italic + face from its family. + + The 'style' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['normal', 'italic'] + + Returns + ------- + Any + """ + return self["style"] + + @style.setter + def style(self, val): + self["style"] = val + + @property + def textcase(self): + """ + Sets capitalization of text. It can be used to make text appear + in all-uppercase or all-lowercase, or with each word + capitalized. + + The 'textcase' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['normal', 'word caps', 'upper', 'lower'] + + Returns + ------- + Any + """ + return self["textcase"] + + @textcase.setter + def textcase(self, val): + self["textcase"] = val + + @property + def variant(self): + """ + Sets the variant of the font. + + The 'variant' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['normal', 'small-caps', 'all-small-caps', + 'all-petite-caps', 'petite-caps', 'unicase'] + + Returns + ------- + Any + """ + return self["variant"] + + @variant.setter + def variant(self, val): + self["variant"] = val + + @property + def weight(self): + """ + Sets the weight (or boldness) of the font. + + The 'weight' property is a integer and may be specified as: + - An int (or float that will be cast to an int) + in the interval [1, 1000] + OR exactly one of ['normal', 'bold'] (e.g. 'bold') + + Returns + ------- + int + """ + return self["weight"] + + @weight.setter + def weight(self, val): + self["weight"] = val + + @property + def _prop_descriptions(self): + return """\ + color + + family + HTML font family - the typeface that will be applied by + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. + lineposition + Sets the kind of decoration line(s) with text, such as + an "under", "over" or "through" as well as combinations + e.g. "under+over", etc. + shadow + Sets the shape and color of the shadow behind text. + "auto" places minimal shadow and applies contrast text + font color. See https://developer.mozilla.org/en- + US/docs/Web/CSS/text-shadow for additional options. + size + + style + Sets whether a font should be styled with a normal or + italic face from its family. + textcase + Sets capitalization of text. It can be used to make + text appear in all-uppercase or all-lowercase, or with + each word capitalized. + variant + Sets the variant of the font. + weight + Sets the weight (or boldness) of the font. + """ + + def __init__( + self, + arg=None, + color=None, + family=None, + lineposition=None, + shadow=None, + size=None, + style=None, + textcase=None, + variant=None, + weight=None, + **kwargs, + ): + """ + Construct a new Tickfont object + + Sets the color bar's tick label font + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of :class:`plotly.graph_objs.densitymapbox. + colorbar.Tickfont` + color + + family + HTML font family - the typeface that will be applied by + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. + lineposition + Sets the kind of decoration line(s) with text, such as + an "under", "over" or "through" as well as combinations + e.g. "under+over", etc. + shadow + Sets the shape and color of the shadow behind text. + "auto" places minimal shadow and applies contrast text + font color. See https://developer.mozilla.org/en- + US/docs/Web/CSS/text-shadow for additional options. + size + + style + Sets whether a font should be styled with a normal or + italic face from its family. + textcase + Sets capitalization of text. It can be used to make + text appear in all-uppercase or all-lowercase, or with + each word capitalized. + variant + Sets the variant of the font. + weight + Sets the weight (or boldness) of the font. + + Returns + ------- + Tickfont + """ + super().__init__("tickfont") + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + if arg is None: + arg = {} + elif isinstance(arg, self.__class__): + arg = arg.to_plotly_json() + elif isinstance(arg, dict): + arg = _copy.copy(arg) + else: + raise ValueError("""\ +The first argument to the plotly.graph_objs.densitymapbox.colorbar.Tickfont +constructor must be a dict or +an instance of :class:`plotly.graph_objs.densitymapbox.colorbar.Tickfont`""") + + self._skip_invalid = kwargs.pop("skip_invalid", False) + self._validate = kwargs.pop("_validate", True) + + self._set_property("color", arg, color) + self._set_property("family", arg, family) + self._set_property("lineposition", arg, lineposition) + self._set_property("shadow", arg, shadow) + self._set_property("size", arg, size) + self._set_property("style", arg, style) + self._set_property("textcase", arg, textcase) + self._set_property("variant", arg, variant) + self._set_property("weight", arg, weight) + self._process_kwargs(**dict(arg, **kwargs)) + self._skip_invalid = False diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/densitymapbox/colorbar/_tickformatstop.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/densitymapbox/colorbar/_tickformatstop.py new file mode 100644 index 0000000000000000000000000000000000000000..c22587b0b8ec3663c4569fbe307374f73411a207 --- /dev/null +++ b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/densitymapbox/colorbar/_tickformatstop.py @@ -0,0 +1,241 @@ +# --- THIS FILE IS AUTO-GENERATED --- +# Modifications will be overwitten the next time code generation run. + +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Tickformatstop(_BaseTraceHierarchyType): + _parent_path_str = "densitymapbox.colorbar" + _path_str = "densitymapbox.colorbar.tickformatstop" + _valid_props = {"dtickrange", "enabled", "name", "templateitemname", "value"} + + @property + def dtickrange(self): + """ + range [*min*, *max*], where "min", "max" - dtick values which + describe some zoom level, it is possible to omit "min" or "max" + value by passing "null" + + The 'dtickrange' property is an info array that may be specified as: + + * a list or tuple of 2 elements where: + (0) The 'dtickrange[0]' property accepts values of any type + (1) The 'dtickrange[1]' property accepts values of any type + + Returns + ------- + list + """ + return self["dtickrange"] + + @dtickrange.setter + def dtickrange(self, val): + self["dtickrange"] = val + + @property + def enabled(self): + """ + Determines whether or not this stop is used. If `false`, this + stop is ignored even within its `dtickrange`. + + The 'enabled' property is a boolean and must be specified as: + - A boolean value: True or False + + Returns + ------- + bool + """ + return self["enabled"] + + @enabled.setter + def enabled(self, val): + self["enabled"] = val + + @property + def name(self): + """ + When used in a template, named items are created in the output + figure in addition to any items the figure already has in this + array. You can modify these items in the output figure by + making your own item with `templateitemname` matching this + `name` alongside your modifications (including `visible: false` + or `enabled: false` to hide it). Has no effect outside of a + template. + + The 'name' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["name"] + + @name.setter + def name(self, val): + self["name"] = val + + @property + def templateitemname(self): + """ + Used to refer to a named item in this array in the template. + Named items from the template will be created even without a + matching item in the input figure, but you can modify one by + making an item with `templateitemname` matching its `name`, + alongside your modifications (including `visible: false` or + `enabled: false` to hide it). If there is no template or no + matching item, this item will be hidden unless you explicitly + show it with `visible: true`. + + The 'templateitemname' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["templateitemname"] + + @templateitemname.setter + def templateitemname(self, val): + self["templateitemname"] = val + + @property + def value(self): + """ + string - dtickformat for described zoom level, the same as + "tickformat" + + The 'value' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["value"] + + @value.setter + def value(self, val): + self["value"] = val + + @property + def _prop_descriptions(self): + return """\ + dtickrange + range [*min*, *max*], where "min", "max" - dtick values + which describe some zoom level, it is possible to omit + "min" or "max" value by passing "null" + enabled + Determines whether or not this stop is used. If + `false`, this stop is ignored even within its + `dtickrange`. + name + When used in a template, named items are created in the + output figure in addition to any items the figure + already has in this array. You can modify these items + in the output figure by making your own item with + `templateitemname` matching this `name` alongside your + modifications (including `visible: false` or `enabled: + false` to hide it). Has no effect outside of a + template. + templateitemname + Used to refer to a named item in this array in the + template. Named items from the template will be created + even without a matching item in the input figure, but + you can modify one by making an item with + `templateitemname` matching its `name`, alongside your + modifications (including `visible: false` or `enabled: + false` to hide it). If there is no template or no + matching item, this item will be hidden unless you + explicitly show it with `visible: true`. + value + string - dtickformat for described zoom level, the same + as "tickformat" + """ + + def __init__( + self, + arg=None, + dtickrange=None, + enabled=None, + name=None, + templateitemname=None, + value=None, + **kwargs, + ): + """ + Construct a new Tickformatstop object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of :class:`plotly.graph_objs.densitymapbox. + colorbar.Tickformatstop` + dtickrange + range [*min*, *max*], where "min", "max" - dtick values + which describe some zoom level, it is possible to omit + "min" or "max" value by passing "null" + enabled + Determines whether or not this stop is used. If + `false`, this stop is ignored even within its + `dtickrange`. + name + When used in a template, named items are created in the + output figure in addition to any items the figure + already has in this array. You can modify these items + in the output figure by making your own item with + `templateitemname` matching this `name` alongside your + modifications (including `visible: false` or `enabled: + false` to hide it). Has no effect outside of a + template. + templateitemname + Used to refer to a named item in this array in the + template. Named items from the template will be created + even without a matching item in the input figure, but + you can modify one by making an item with + `templateitemname` matching its `name`, alongside your + modifications (including `visible: false` or `enabled: + false` to hide it). If there is no template or no + matching item, this item will be hidden unless you + explicitly show it with `visible: true`. + value + string - dtickformat for described zoom level, the same + as "tickformat" + + Returns + ------- + Tickformatstop + """ + super().__init__("tickformatstops") + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + if arg is None: + arg = {} + elif isinstance(arg, self.__class__): + arg = arg.to_plotly_json() + elif isinstance(arg, dict): + arg = _copy.copy(arg) + else: + raise ValueError("""\ +The first argument to the plotly.graph_objs.densitymapbox.colorbar.Tickformatstop +constructor must be a dict or +an instance of :class:`plotly.graph_objs.densitymapbox.colorbar.Tickformatstop`""") + + self._skip_invalid = kwargs.pop("skip_invalid", False) + self._validate = kwargs.pop("_validate", True) + + self._set_property("dtickrange", arg, dtickrange) + self._set_property("enabled", arg, enabled) + self._set_property("name", arg, name) + self._set_property("templateitemname", arg, templateitemname) + self._set_property("value", arg, value) + self._process_kwargs(**dict(arg, **kwargs)) + self._skip_invalid = False diff --git a/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/densitymapbox/colorbar/_title.py b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/densitymapbox/colorbar/_title.py new file mode 100644 index 0000000000000000000000000000000000000000..b281eb60d182df210d1385c74257f8e878170d81 --- /dev/null +++ b/.venv_haddock/lib/python3.12/site-packages/plotly/graph_objs/densitymapbox/colorbar/_title.py @@ -0,0 +1,136 @@ +# --- THIS FILE IS AUTO-GENERATED --- +# Modifications will be overwitten the next time code generation run. + +from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType +import copy as _copy + + +class Title(_BaseTraceHierarchyType): + _parent_path_str = "densitymapbox.colorbar" + _path_str = "densitymapbox.colorbar.title" + _valid_props = {"font", "side", "text"} + + @property + def font(self): + """ + Sets this color bar's title font. + + The 'font' property is an instance of Font + that may be specified as: + - An instance of :class:`plotly.graph_objs.densitymapbox.colorbar.title.Font` + - A dict of string/value properties that will be passed + to the Font constructor + + Returns + ------- + plotly.graph_objs.densitymapbox.colorbar.title.Font + """ + return self["font"] + + @font.setter + def font(self, val): + self["font"] = val + + @property + def side(self): + """ + Determines the location of color bar's title with respect to + the color bar. Defaults to "top" when `orientation` if "v" and + defaults to "right" when `orientation` if "h". + + The 'side' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['right', 'top', 'bottom'] + + Returns + ------- + Any + """ + return self["side"] + + @side.setter + def side(self, val): + self["side"] = val + + @property + def text(self): + """ + Sets the title of the color bar. + + The 'text' property is a string and must be specified as: + - A string + - A number that will be converted to a string + + Returns + ------- + str + """ + return self["text"] + + @text.setter + def text(self, val): + self["text"] = val + + @property + def _prop_descriptions(self): + return """\ + font + Sets this color bar's title font. + side + Determines the location of color bar's title with + respect to the color bar. Defaults to "top" when + `orientation` if "v" and defaults to "right" when + `orientation` if "h". + text + Sets the title of the color bar. + """ + + def __init__(self, arg=None, font=None, side=None, text=None, **kwargs): + """ + Construct a new Title object + + Parameters + ---------- + arg + dict of properties compatible with this constructor or + an instance of + :class:`plotly.graph_objs.densitymapbox.colorbar.Title` + font + Sets this color bar's title font. + side + Determines the location of color bar's title with + respect to the color bar. Defaults to "top" when + `orientation` if "v" and defaults to "right" when + `orientation` if "h". + text + Sets the title of the color bar. + + Returns + ------- + Title + """ + super().__init__("title") + if "_parent" in kwargs: + self._parent = kwargs["_parent"] + return + + if arg is None: + arg = {} + elif isinstance(arg, self.__class__): + arg = arg.to_plotly_json() + elif isinstance(arg, dict): + arg = _copy.copy(arg) + else: + raise ValueError("""\ +The first argument to the plotly.graph_objs.densitymapbox.colorbar.Title +constructor must be a dict or +an instance of :class:`plotly.graph_objs.densitymapbox.colorbar.Title`""") + + self._skip_invalid = kwargs.pop("skip_invalid", False) + self._validate = kwargs.pop("_validate", True) + + self._set_property("font", arg, font) + self._set_property("side", arg, side) + self._set_property("text", arg, text) + self._process_kwargs(**dict(arg, **kwargs)) + self._skip_invalid = False