interactive-figure 0.4.0__tar.gz → 0.4.42__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (208) hide show
  1. {interactive_figure-0.4.0 → interactive_figure-0.4.42}/.gitignore +159 -159
  2. {interactive_figure-0.4.0 → interactive_figure-0.4.42}/LICENSE.txt +7 -7
  3. {interactive_figure-0.4.0 → interactive_figure-0.4.42}/PKG-INFO +10 -10
  4. {interactive_figure-0.4.0 → interactive_figure-0.4.42}/README.md +55 -55
  5. interactive_figure-0.4.42/demo/external_close.py +8 -0
  6. interactive_figure-0.4.42/demo/fullscreen.py +18 -0
  7. {interactive_figure-0.4.0 → interactive_figure-0.4.42}/demo/press.py +54 -54
  8. {interactive_figure-0.4.0 → interactive_figure-0.4.42}/demo/reaction_time.py +73 -71
  9. interactive_figure-0.4.42/demo/usage.py +10 -0
  10. interactive_figure-0.4.0/docs/.buildinfo.bak → interactive_figure-0.4.42/docs/.buildinfo +4 -4
  11. interactive_figure-0.4.0/docs/.buildinfo → interactive_figure-0.4.42/docs/.buildinfo.bak +4 -4
  12. interactive_figure-0.4.42/docs/.doctrees/autoapi/index.doctree +0 -0
  13. interactive_figure-0.4.42/docs/.doctrees/autoapi/interactive_figure/index.doctree +0 -0
  14. interactive_figure-0.4.42/docs/.doctrees/autoapi/interactive_figure/interactive_figure/index.doctree +0 -0
  15. interactive_figure-0.4.42/docs/.doctrees/environment.pickle +0 -0
  16. interactive_figure-0.4.42/docs/.doctrees/index.doctree +0 -0
  17. {interactive_figure-0.4.0 → interactive_figure-0.4.42}/docs/_sources/autoapi/interactive_figure/__about__/index.rst.txt +8 -8
  18. {interactive_figure-0.4.0 → interactive_figure-0.4.42}/docs/_sources/autoapi/interactive_figure/interactive_figure/index.rst +3 -3
  19. {interactive_figure-0.4.0 → interactive_figure-0.4.42}/docs/_sources/index.rst +9 -9
  20. {interactive_figure-0.4.0 → interactive_figure-0.4.42}/docs/_sources/index.rst.txt +9 -9
  21. interactive_figure-0.4.42/docs/_static/base-stemmer.js +476 -0
  22. {interactive_figure-0.4.0 → interactive_figure-0.4.42}/docs/_static/basic.css +905 -913
  23. {interactive_figure-0.4.0 → interactive_figure-0.4.42}/docs/_static/doctools.js +6 -5
  24. {interactive_figure-0.4.0 → interactive_figure-0.4.42}/docs/_static/documentation_options.js +12 -12
  25. interactive_figure-0.4.42/docs/_static/english-stemmer.js +1066 -0
  26. {interactive_figure-0.4.0 → interactive_figure-0.4.42}/docs/_static/js/html5shiv-printshiv.min.js +3 -3
  27. {interactive_figure-0.4.0 → interactive_figure-0.4.42}/docs/_static/js/html5shiv.min.js +3 -3
  28. {interactive_figure-0.4.0 → interactive_figure-0.4.42}/docs/_static/js/versions.js +223 -223
  29. interactive_figure-0.4.42/docs/_static/language_data.js +13 -0
  30. {interactive_figure-0.4.0 → interactive_figure-0.4.42}/docs/_static/locales/ru/LC_MESSAGES/booktheme.po +37 -37
  31. interactive_figure-0.4.42/docs/_static/pygments.css +152 -0
  32. {interactive_figure-0.4.0 → interactive_figure-0.4.42}/docs/_static/searchtools.js +121 -60
  33. {interactive_figure-0.4.0 → interactive_figure-0.4.42}/docs/_static/sphinx_highlight.js +36 -31
  34. interactive_figure-0.4.42/docs/_static/styles/sphinx-book-theme.css +19 -0
  35. interactive_figure-0.4.42/docs/_static/styles/sphinx-book-theme.css.map +1 -0
  36. {interactive_figure-0.4.0 → interactive_figure-0.4.42}/docs/autoapi/index.html +408 -408
  37. {interactive_figure-0.4.0 → interactive_figure-0.4.42}/docs/autoapi/interactive_figure/__about__/index.html +105 -105
  38. {interactive_figure-0.4.0 → interactive_figure-0.4.42}/docs/autoapi/interactive_figure/index.html +426 -426
  39. {interactive_figure-0.4.0 → interactive_figure-0.4.42}/docs/autoapi/interactive_figure/interactive_figure/index.html +604 -604
  40. {interactive_figure-0.4.0 → interactive_figure-0.4.42}/docs/genindex.html +429 -429
  41. {interactive_figure-0.4.0 → interactive_figure-0.4.42}/docs/index.html +393 -393
  42. {interactive_figure-0.4.0 → interactive_figure-0.4.42}/docs/py-modindex.html +349 -349
  43. {interactive_figure-0.4.0 → interactive_figure-0.4.42}/docs/search.html +341 -341
  44. interactive_figure-0.4.42/docs/searchindex.js +1 -0
  45. {interactive_figure-0.4.0 → interactive_figure-0.4.42}/docs_source/conf.py +37 -37
  46. {interactive_figure-0.4.0 → interactive_figure-0.4.42}/docs_source/index.rst +9 -9
  47. {interactive_figure-0.4.0 → interactive_figure-0.4.42}/generate_docs.sh +3 -3
  48. {interactive_figure-0.4.0 → interactive_figure-0.4.42}/pyproject.toml +154 -157
  49. interactive_figure-0.4.42/src/interactive_figure/__about__.py +1 -0
  50. interactive_figure-0.4.42/src/interactive_figure/__init__.py +1 -0
  51. {interactive_figure-0.4.0 → interactive_figure-0.4.42}/src/interactive_figure/interactive_figure.py +340 -334
  52. {interactive_figure-0.4.0 → interactive_figure-0.4.42}/tests/__init__.py +3 -3
  53. interactive_figure-0.4.0/demo/usage.py +0 -10
  54. interactive_figure-0.4.0/docs/.doctrees/autoapi/index.doctree +0 -0
  55. interactive_figure-0.4.0/docs/.doctrees/autoapi/interactive_figure/index.doctree +0 -0
  56. interactive_figure-0.4.0/docs/.doctrees/autoapi/interactive_figure/interactive_figure/index.doctree +0 -0
  57. interactive_figure-0.4.0/docs/.doctrees/environment.pickle +0 -0
  58. interactive_figure-0.4.0/docs/.doctrees/index.doctree +0 -0
  59. interactive_figure-0.4.0/docs/_static/language_data.js +0 -192
  60. interactive_figure-0.4.0/docs/_static/pygments.css +0 -152
  61. interactive_figure-0.4.0/docs/_static/styles/sphinx-book-theme.css +0 -9
  62. interactive_figure-0.4.0/docs/_static/styles/sphinx-book-theme.css.map +0 -1
  63. interactive_figure-0.4.0/docs/searchindex.js +0 -1
  64. interactive_figure-0.4.0/src/interactive_figure/__about__.py +0 -1
  65. interactive_figure-0.4.0/src/interactive_figure/__init__.py +0 -0
  66. {interactive_figure-0.4.0 → interactive_figure-0.4.42}/docs/.doctrees/autoapi/interactive_figure/__about__/index.doctree +0 -0
  67. {interactive_figure-0.4.0 → interactive_figure-0.4.42}/docs/.nojekyll +0 -0
  68. {interactive_figure-0.4.0 → interactive_figure-0.4.42}/docs/_sources/autoapi/index.rst +0 -0
  69. {interactive_figure-0.4.0 → interactive_figure-0.4.42}/docs/_sources/autoapi/index.rst.txt +0 -0
  70. {interactive_figure-0.4.0 → interactive_figure-0.4.42}/docs/_sources/autoapi/interactive_figure/index.rst +0 -0
  71. {interactive_figure-0.4.0 → interactive_figure-0.4.42}/docs/_sources/autoapi/interactive_figure/index.rst.txt +0 -0
  72. {interactive_figure-0.4.0 → interactive_figure-0.4.42}/docs/_sources/autoapi/interactive_figure/interactive_figure/index.rst.txt +0 -0
  73. {interactive_figure-0.4.0 → interactive_figure-0.4.42}/docs/_static/_sphinx_javascript_frameworks_compat.js +0 -0
  74. {interactive_figure-0.4.0 → interactive_figure-0.4.42}/docs/_static/css/badge_only.css +0 -0
  75. {interactive_figure-0.4.0 → interactive_figure-0.4.42}/docs/_static/css/fonts/Roboto-Slab-Bold.woff +0 -0
  76. {interactive_figure-0.4.0 → interactive_figure-0.4.42}/docs/_static/css/fonts/Roboto-Slab-Bold.woff2 +0 -0
  77. {interactive_figure-0.4.0 → interactive_figure-0.4.42}/docs/_static/css/fonts/Roboto-Slab-Regular.woff +0 -0
  78. {interactive_figure-0.4.0 → interactive_figure-0.4.42}/docs/_static/css/fonts/Roboto-Slab-Regular.woff2 +0 -0
  79. {interactive_figure-0.4.0 → interactive_figure-0.4.42}/docs/_static/css/fonts/fontawesome-webfont.eot +0 -0
  80. {interactive_figure-0.4.0 → interactive_figure-0.4.42}/docs/_static/css/fonts/fontawesome-webfont.svg +0 -0
  81. {interactive_figure-0.4.0 → interactive_figure-0.4.42}/docs/_static/css/fonts/fontawesome-webfont.ttf +0 -0
  82. {interactive_figure-0.4.0 → interactive_figure-0.4.42}/docs/_static/css/fonts/fontawesome-webfont.woff +0 -0
  83. {interactive_figure-0.4.0 → interactive_figure-0.4.42}/docs/_static/css/fonts/fontawesome-webfont.woff2 +0 -0
  84. {interactive_figure-0.4.0 → interactive_figure-0.4.42}/docs/_static/css/fonts/lato-bold-italic.woff +0 -0
  85. {interactive_figure-0.4.0 → interactive_figure-0.4.42}/docs/_static/css/fonts/lato-bold-italic.woff2 +0 -0
  86. {interactive_figure-0.4.0 → interactive_figure-0.4.42}/docs/_static/css/fonts/lato-bold.woff +0 -0
  87. {interactive_figure-0.4.0 → interactive_figure-0.4.42}/docs/_static/css/fonts/lato-bold.woff2 +0 -0
  88. {interactive_figure-0.4.0 → interactive_figure-0.4.42}/docs/_static/css/fonts/lato-normal-italic.woff +0 -0
  89. {interactive_figure-0.4.0 → interactive_figure-0.4.42}/docs/_static/css/fonts/lato-normal-italic.woff2 +0 -0
  90. {interactive_figure-0.4.0 → interactive_figure-0.4.42}/docs/_static/css/fonts/lato-normal.woff +0 -0
  91. {interactive_figure-0.4.0 → interactive_figure-0.4.42}/docs/_static/css/fonts/lato-normal.woff2 +0 -0
  92. {interactive_figure-0.4.0 → interactive_figure-0.4.42}/docs/_static/css/theme.css +0 -0
  93. {interactive_figure-0.4.0 → interactive_figure-0.4.42}/docs/_static/debug.css +0 -0
  94. {interactive_figure-0.4.0 → interactive_figure-0.4.42}/docs/_static/file.png +0 -0
  95. {interactive_figure-0.4.0 → interactive_figure-0.4.42}/docs/_static/fonts/Lato/lato-bold.eot +0 -0
  96. {interactive_figure-0.4.0 → interactive_figure-0.4.42}/docs/_static/fonts/Lato/lato-bold.ttf +0 -0
  97. {interactive_figure-0.4.0 → interactive_figure-0.4.42}/docs/_static/fonts/Lato/lato-bold.woff +0 -0
  98. {interactive_figure-0.4.0 → interactive_figure-0.4.42}/docs/_static/fonts/Lato/lato-bold.woff2 +0 -0
  99. {interactive_figure-0.4.0 → interactive_figure-0.4.42}/docs/_static/fonts/Lato/lato-bolditalic.eot +0 -0
  100. {interactive_figure-0.4.0 → interactive_figure-0.4.42}/docs/_static/fonts/Lato/lato-bolditalic.ttf +0 -0
  101. {interactive_figure-0.4.0 → interactive_figure-0.4.42}/docs/_static/fonts/Lato/lato-bolditalic.woff +0 -0
  102. {interactive_figure-0.4.0 → interactive_figure-0.4.42}/docs/_static/fonts/Lato/lato-bolditalic.woff2 +0 -0
  103. {interactive_figure-0.4.0 → interactive_figure-0.4.42}/docs/_static/fonts/Lato/lato-italic.eot +0 -0
  104. {interactive_figure-0.4.0 → interactive_figure-0.4.42}/docs/_static/fonts/Lato/lato-italic.ttf +0 -0
  105. {interactive_figure-0.4.0 → interactive_figure-0.4.42}/docs/_static/fonts/Lato/lato-italic.woff +0 -0
  106. {interactive_figure-0.4.0 → interactive_figure-0.4.42}/docs/_static/fonts/Lato/lato-italic.woff2 +0 -0
  107. {interactive_figure-0.4.0 → interactive_figure-0.4.42}/docs/_static/fonts/Lato/lato-regular.eot +0 -0
  108. {interactive_figure-0.4.0 → interactive_figure-0.4.42}/docs/_static/fonts/Lato/lato-regular.ttf +0 -0
  109. {interactive_figure-0.4.0 → interactive_figure-0.4.42}/docs/_static/fonts/Lato/lato-regular.woff +0 -0
  110. {interactive_figure-0.4.0 → interactive_figure-0.4.42}/docs/_static/fonts/Lato/lato-regular.woff2 +0 -0
  111. {interactive_figure-0.4.0 → interactive_figure-0.4.42}/docs/_static/fonts/RobotoSlab/roboto-slab-v7-bold.eot +0 -0
  112. {interactive_figure-0.4.0 → interactive_figure-0.4.42}/docs/_static/fonts/RobotoSlab/roboto-slab-v7-bold.ttf +0 -0
  113. {interactive_figure-0.4.0 → interactive_figure-0.4.42}/docs/_static/fonts/RobotoSlab/roboto-slab-v7-bold.woff +0 -0
  114. {interactive_figure-0.4.0 → interactive_figure-0.4.42}/docs/_static/fonts/RobotoSlab/roboto-slab-v7-bold.woff2 +0 -0
  115. {interactive_figure-0.4.0 → interactive_figure-0.4.42}/docs/_static/fonts/RobotoSlab/roboto-slab-v7-regular.eot +0 -0
  116. {interactive_figure-0.4.0 → interactive_figure-0.4.42}/docs/_static/fonts/RobotoSlab/roboto-slab-v7-regular.ttf +0 -0
  117. {interactive_figure-0.4.0 → interactive_figure-0.4.42}/docs/_static/fonts/RobotoSlab/roboto-slab-v7-regular.woff +0 -0
  118. {interactive_figure-0.4.0 → interactive_figure-0.4.42}/docs/_static/fonts/RobotoSlab/roboto-slab-v7-regular.woff2 +0 -0
  119. {interactive_figure-0.4.0 → interactive_figure-0.4.42}/docs/_static/graphviz.css +0 -0
  120. {interactive_figure-0.4.0 → interactive_figure-0.4.42}/docs/_static/images/logo_binder.svg +0 -0
  121. {interactive_figure-0.4.0 → interactive_figure-0.4.42}/docs/_static/images/logo_colab.png +0 -0
  122. {interactive_figure-0.4.0 → interactive_figure-0.4.42}/docs/_static/images/logo_deepnote.svg +0 -0
  123. {interactive_figure-0.4.0 → interactive_figure-0.4.42}/docs/_static/images/logo_jupyterhub.svg +0 -0
  124. {interactive_figure-0.4.0 → interactive_figure-0.4.42}/docs/_static/jquery.js +0 -0
  125. {interactive_figure-0.4.0 → interactive_figure-0.4.42}/docs/_static/js/badge_only.js +0 -0
  126. {interactive_figure-0.4.0 → interactive_figure-0.4.42}/docs/_static/js/theme.js +0 -0
  127. {interactive_figure-0.4.0 → interactive_figure-0.4.42}/docs/_static/locales/ar/LC_MESSAGES/booktheme.po +37 -37
  128. {interactive_figure-0.4.0 → interactive_figure-0.4.42}/docs/_static/locales/bg/LC_MESSAGES/booktheme.po +37 -37
  129. {interactive_figure-0.4.0 → interactive_figure-0.4.42}/docs/_static/locales/bn/LC_MESSAGES/booktheme.po +30 -30
  130. {interactive_figure-0.4.0 → interactive_figure-0.4.42}/docs/_static/locales/ca/LC_MESSAGES/booktheme.po +33 -33
  131. {interactive_figure-0.4.0 → interactive_figure-0.4.42}/docs/_static/locales/cs/LC_MESSAGES/booktheme.po +37 -37
  132. {interactive_figure-0.4.0 → interactive_figure-0.4.42}/docs/_static/locales/da/LC_MESSAGES/booktheme.po +37 -37
  133. {interactive_figure-0.4.0 → interactive_figure-0.4.42}/docs/_static/locales/de/LC_MESSAGES/booktheme.po +37 -37
  134. {interactive_figure-0.4.0 → interactive_figure-0.4.42}/docs/_static/locales/el/LC_MESSAGES/booktheme.po +37 -37
  135. {interactive_figure-0.4.0 → interactive_figure-0.4.42}/docs/_static/locales/eo/LC_MESSAGES/booktheme.po +37 -37
  136. {interactive_figure-0.4.0 → interactive_figure-0.4.42}/docs/_static/locales/es/LC_MESSAGES/booktheme.po +37 -37
  137. {interactive_figure-0.4.0 → interactive_figure-0.4.42}/docs/_static/locales/et/LC_MESSAGES/booktheme.po +37 -37
  138. {interactive_figure-0.4.0 → interactive_figure-0.4.42}/docs/_static/locales/fi/LC_MESSAGES/booktheme.po +37 -37
  139. {interactive_figure-0.4.0 → interactive_figure-0.4.42}/docs/_static/locales/fr/LC_MESSAGES/booktheme.po +37 -37
  140. {interactive_figure-0.4.0 → interactive_figure-0.4.42}/docs/_static/locales/hr/LC_MESSAGES/booktheme.po +37 -37
  141. {interactive_figure-0.4.0 → interactive_figure-0.4.42}/docs/_static/locales/id/LC_MESSAGES/booktheme.po +37 -37
  142. {interactive_figure-0.4.0 → interactive_figure-0.4.42}/docs/_static/locales/it/LC_MESSAGES/booktheme.po +37 -37
  143. {interactive_figure-0.4.0 → interactive_figure-0.4.42}/docs/_static/locales/iw/LC_MESSAGES/booktheme.po +37 -37
  144. {interactive_figure-0.4.0 → interactive_figure-0.4.42}/docs/_static/locales/ja/LC_MESSAGES/booktheme.po +37 -37
  145. {interactive_figure-0.4.0 → interactive_figure-0.4.42}/docs/_static/locales/ko/LC_MESSAGES/booktheme.po +37 -37
  146. {interactive_figure-0.4.0 → interactive_figure-0.4.42}/docs/_static/locales/lt/LC_MESSAGES/booktheme.po +37 -37
  147. {interactive_figure-0.4.0 → interactive_figure-0.4.42}/docs/_static/locales/lv/LC_MESSAGES/booktheme.po +37 -37
  148. {interactive_figure-0.4.0 → interactive_figure-0.4.42}/docs/_static/locales/ml/LC_MESSAGES/booktheme.po +33 -33
  149. {interactive_figure-0.4.0 → interactive_figure-0.4.42}/docs/_static/locales/mr/LC_MESSAGES/booktheme.po +33 -33
  150. {interactive_figure-0.4.0 → interactive_figure-0.4.42}/docs/_static/locales/ms/LC_MESSAGES/booktheme.po +33 -33
  151. {interactive_figure-0.4.0 → interactive_figure-0.4.42}/docs/_static/locales/nl/LC_MESSAGES/booktheme.po +37 -37
  152. {interactive_figure-0.4.0 → interactive_figure-0.4.42}/docs/_static/locales/no/LC_MESSAGES/booktheme.po +37 -37
  153. {interactive_figure-0.4.0 → interactive_figure-0.4.42}/docs/_static/locales/pl/LC_MESSAGES/booktheme.po +37 -37
  154. {interactive_figure-0.4.0 → interactive_figure-0.4.42}/docs/_static/locales/pt/LC_MESSAGES/booktheme.po +37 -37
  155. {interactive_figure-0.4.0 → interactive_figure-0.4.42}/docs/_static/locales/ro/LC_MESSAGES/booktheme.po +37 -37
  156. {interactive_figure-0.4.0 → interactive_figure-0.4.42}/docs/_static/locales/sk/LC_MESSAGES/booktheme.po +37 -37
  157. {interactive_figure-0.4.0 → interactive_figure-0.4.42}/docs/_static/locales/sl/LC_MESSAGES/booktheme.po +37 -37
  158. {interactive_figure-0.4.0 → interactive_figure-0.4.42}/docs/_static/locales/sr/LC_MESSAGES/booktheme.po +37 -37
  159. {interactive_figure-0.4.0 → interactive_figure-0.4.42}/docs/_static/locales/sv/LC_MESSAGES/booktheme.po +37 -37
  160. {interactive_figure-0.4.0 → interactive_figure-0.4.42}/docs/_static/locales/ta/LC_MESSAGES/booktheme.po +33 -33
  161. {interactive_figure-0.4.0 → interactive_figure-0.4.42}/docs/_static/locales/te/LC_MESSAGES/booktheme.po +33 -33
  162. {interactive_figure-0.4.0 → interactive_figure-0.4.42}/docs/_static/locales/tg/LC_MESSAGES/booktheme.po +37 -37
  163. {interactive_figure-0.4.0 → interactive_figure-0.4.42}/docs/_static/locales/th/LC_MESSAGES/booktheme.po +37 -37
  164. {interactive_figure-0.4.0 → interactive_figure-0.4.42}/docs/_static/locales/tl/LC_MESSAGES/booktheme.po +33 -33
  165. {interactive_figure-0.4.0 → interactive_figure-0.4.42}/docs/_static/locales/tr/LC_MESSAGES/booktheme.po +37 -37
  166. {interactive_figure-0.4.0 → interactive_figure-0.4.42}/docs/_static/locales/uk/LC_MESSAGES/booktheme.po +37 -37
  167. {interactive_figure-0.4.0 → interactive_figure-0.4.42}/docs/_static/locales/ur/LC_MESSAGES/booktheme.po +33 -33
  168. {interactive_figure-0.4.0 → interactive_figure-0.4.42}/docs/_static/locales/vi/LC_MESSAGES/booktheme.po +37 -37
  169. {interactive_figure-0.4.0 → interactive_figure-0.4.42}/docs/_static/locales/zh_CN/LC_MESSAGES/booktheme.po +37 -37
  170. {interactive_figure-0.4.0 → interactive_figure-0.4.42}/docs/_static/locales/zh_TW/LC_MESSAGES/booktheme.po +37 -37
  171. {interactive_figure-0.4.0 → interactive_figure-0.4.42}/docs/_static/minus.png +0 -0
  172. {interactive_figure-0.4.0 → interactive_figure-0.4.42}/docs/_static/plus.png +0 -0
  173. {interactive_figure-0.4.0 → interactive_figure-0.4.42}/docs/_static/sbt-webpack-macros.html +0 -0
  174. {interactive_figure-0.4.0 → interactive_figure-0.4.42}/docs/_static/scripts/bootstrap.js +0 -0
  175. {interactive_figure-0.4.0 → interactive_figure-0.4.42}/docs/_static/scripts/bootstrap.js.LICENSE.txt +0 -0
  176. {interactive_figure-0.4.0 → interactive_figure-0.4.42}/docs/_static/scripts/bootstrap.js.map +0 -0
  177. {interactive_figure-0.4.0 → interactive_figure-0.4.42}/docs/_static/scripts/furo-extensions.js +0 -0
  178. {interactive_figure-0.4.0 → interactive_figure-0.4.42}/docs/_static/scripts/furo.js +0 -0
  179. {interactive_figure-0.4.0 → interactive_figure-0.4.42}/docs/_static/scripts/furo.js.LICENSE.txt +0 -0
  180. {interactive_figure-0.4.0 → interactive_figure-0.4.42}/docs/_static/scripts/furo.js.map +0 -0
  181. {interactive_figure-0.4.0 → interactive_figure-0.4.42}/docs/_static/scripts/pydata-sphinx-theme.js +0 -0
  182. {interactive_figure-0.4.0 → interactive_figure-0.4.42}/docs/_static/scripts/pydata-sphinx-theme.js.map +0 -0
  183. {interactive_figure-0.4.0 → interactive_figure-0.4.42}/docs/_static/scripts/sphinx-book-theme.js +0 -0
  184. {interactive_figure-0.4.0 → interactive_figure-0.4.42}/docs/_static/scripts/sphinx-book-theme.js.map +0 -0
  185. {interactive_figure-0.4.0 → interactive_figure-0.4.42}/docs/_static/skeleton.css +0 -0
  186. {interactive_figure-0.4.0 → interactive_figure-0.4.42}/docs/_static/styles/bootstrap.css +0 -0
  187. {interactive_figure-0.4.0 → interactive_figure-0.4.42}/docs/_static/styles/bootstrap.css.map +0 -0
  188. {interactive_figure-0.4.0 → interactive_figure-0.4.42}/docs/_static/styles/furo-extensions.css +0 -0
  189. {interactive_figure-0.4.0 → interactive_figure-0.4.42}/docs/_static/styles/furo-extensions.css.map +0 -0
  190. {interactive_figure-0.4.0 → interactive_figure-0.4.42}/docs/_static/styles/furo.css +0 -0
  191. {interactive_figure-0.4.0 → interactive_figure-0.4.42}/docs/_static/styles/furo.css.map +0 -0
  192. {interactive_figure-0.4.0 → interactive_figure-0.4.42}/docs/_static/styles/pydata-sphinx-theme.css +0 -0
  193. {interactive_figure-0.4.0 → interactive_figure-0.4.42}/docs/_static/styles/pydata-sphinx-theme.css.map +0 -0
  194. {interactive_figure-0.4.0 → interactive_figure-0.4.42}/docs/_static/styles/theme.css +0 -0
  195. {interactive_figure-0.4.0 → interactive_figure-0.4.42}/docs/_static/vendor/fontawesome/6.5.2/LICENSE.txt +0 -0
  196. {interactive_figure-0.4.0 → interactive_figure-0.4.42}/docs/_static/vendor/fontawesome/6.5.2/css/all.min.css +0 -0
  197. {interactive_figure-0.4.0 → interactive_figure-0.4.42}/docs/_static/vendor/fontawesome/6.5.2/js/all.min.js +0 -0
  198. {interactive_figure-0.4.0 → interactive_figure-0.4.42}/docs/_static/vendor/fontawesome/6.5.2/js/all.min.js.LICENSE.txt +0 -0
  199. {interactive_figure-0.4.0 → interactive_figure-0.4.42}/docs/_static/vendor/fontawesome/6.5.2/webfonts/fa-brands-400.ttf +0 -0
  200. {interactive_figure-0.4.0 → interactive_figure-0.4.42}/docs/_static/vendor/fontawesome/6.5.2/webfonts/fa-brands-400.woff2 +0 -0
  201. {interactive_figure-0.4.0 → interactive_figure-0.4.42}/docs/_static/vendor/fontawesome/6.5.2/webfonts/fa-regular-400.ttf +0 -0
  202. {interactive_figure-0.4.0 → interactive_figure-0.4.42}/docs/_static/vendor/fontawesome/6.5.2/webfonts/fa-regular-400.woff2 +0 -0
  203. {interactive_figure-0.4.0 → interactive_figure-0.4.42}/docs/_static/vendor/fontawesome/6.5.2/webfonts/fa-solid-900.ttf +0 -0
  204. {interactive_figure-0.4.0 → interactive_figure-0.4.42}/docs/_static/vendor/fontawesome/6.5.2/webfonts/fa-solid-900.woff2 +0 -0
  205. {interactive_figure-0.4.0 → interactive_figure-0.4.42}/docs/_static/vendor/fontawesome/6.5.2/webfonts/fa-v4compatibility.ttf +0 -0
  206. {interactive_figure-0.4.0 → interactive_figure-0.4.42}/docs/_static/vendor/fontawesome/6.5.2/webfonts/fa-v4compatibility.woff2 +0 -0
  207. {interactive_figure-0.4.0 → interactive_figure-0.4.42}/docs/_static/webpack-macros.html +0 -0
  208. {interactive_figure-0.4.0 → interactive_figure-0.4.42}/docs/objects.inv +0 -0
@@ -1,160 +1,160 @@
1
- # Byte-compiled / optimized / DLL files
2
- __pycache__/
3
- *.py[cod]
4
- *$py.class
5
-
6
- # C extensions
7
- *.so
8
-
9
- # Distribution / packaging
10
- .Python
11
- build/
12
- develop-eggs/
13
- dist/
14
- downloads/
15
- eggs/
16
- .eggs/
17
- lib/
18
- lib64/
19
- parts/
20
- sdist/
21
- var/
22
- wheels/
23
- share/python-wheels/
24
- *.egg-info/
25
- .installed.cfg
26
- *.egg
27
- MANIFEST
28
-
29
- # PyInstaller
30
- # Usually these files are written by a python script from a template
31
- # before PyInstaller builds the exe, so as to inject date/other infos into it.
32
- *.manifest
33
- *.spec
34
-
35
- # Installer logs
36
- pip-log.txt
37
- pip-delete-this-directory.txt
38
-
39
- # Unit test / coverage reports
40
- htmlcov/
41
- .tox/
42
- .nox/
43
- .coverage
44
- .coverage.*
45
- .cache
46
- nosetests.xml
47
- coverage.xml
48
- *.cover
49
- *.py,cover
50
- .hypothesis/
51
- .pytest_cache/
52
- cover/
53
-
54
- # Translations
55
- *.mo
56
- *.pot
57
-
58
- # Django stuff:
59
- *.log
60
- local_settings.py
61
- db.sqlite3
62
- db.sqlite3-journal
63
-
64
- # Flask stuff:
65
- instance/
66
- .webassets-cache
67
-
68
- # Scrapy stuff:
69
- .scrapy
70
-
71
- # Sphinx documentation
72
- docs/_build/
73
-
74
- # PyBuilder
75
- .pybuilder/
76
- target/
77
-
78
- # Jupyter Notebook
79
- .ipynb_checkpoints
80
-
81
- # IPython
82
- profile_default/
83
- ipython_config.py
84
-
85
- # pyenv
86
- # For a library or package, you might want to ignore these files since the code is
87
- # intended to run in multiple environments; otherwise, check them in:
88
- # .python-version
89
-
90
- # pipenv
91
- # According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
92
- # However, in case of collaboration, if having platform-specific dependencies or dependencies
93
- # having no cross-platform support, pipenv may install dependencies that don't work, or not
94
- # install all needed dependencies.
95
- #Pipfile.lock
96
-
97
- # poetry
98
- # Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control.
99
- # This is especially recommended for binary packages to ensure reproducibility, and is more
100
- # commonly ignored for libraries.
101
- # https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control
102
- #poetry.lock
103
-
104
- # pdm
105
- # Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control.
106
- #pdm.lock
107
- # pdm stores project-wide configurations in .pdm.toml, but it is recommended to not include it
108
- # in version control.
109
- # https://pdm.fming.dev/#use-with-ide
110
- .pdm.toml
111
-
112
- # PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm
113
- __pypackages__/
114
-
115
- # Celery stuff
116
- celerybeat-schedule
117
- celerybeat.pid
118
-
119
- # SageMath parsed files
120
- *.sage.py
121
-
122
- # Environments
123
- .env
124
- .venv
125
- env/
126
- venv/
127
- ENV/
128
- env.bak/
129
- venv.bak/
130
-
131
- # Spyder project settings
132
- .spyderproject
133
- .spyproject
134
-
135
- # Rope project settings
136
- .ropeproject
137
-
138
- # mkdocs documentation
139
- /site
140
-
141
- # mypy
142
- .mypy_cache/
143
- .dmypy.json
144
- dmypy.json
145
-
146
- # Pyre type checker
147
- .pyre/
148
-
149
- # pytype static type analyzer
150
- .pytype/
151
-
152
- # Cython debug symbols
153
- cython_debug/
154
-
155
- # PyCharm
156
- # JetBrains specific template is maintained in a separate JetBrains.gitignore that can
157
- # be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
158
- # and can be added to the global gitignore or merged into this file. For a more nuclear
159
- # option (not recommended) you can uncomment the following to ignore the entire idea folder.
1
+ # Byte-compiled / optimized / DLL files
2
+ __pycache__/
3
+ *.py[cod]
4
+ *$py.class
5
+
6
+ # C extensions
7
+ *.so
8
+
9
+ # Distribution / packaging
10
+ .Python
11
+ build/
12
+ develop-eggs/
13
+ dist/
14
+ downloads/
15
+ eggs/
16
+ .eggs/
17
+ lib/
18
+ lib64/
19
+ parts/
20
+ sdist/
21
+ var/
22
+ wheels/
23
+ share/python-wheels/
24
+ *.egg-info/
25
+ .installed.cfg
26
+ *.egg
27
+ MANIFEST
28
+
29
+ # PyInstaller
30
+ # Usually these files are written by a python script from a template
31
+ # before PyInstaller builds the exe, so as to inject date/other infos into it.
32
+ *.manifest
33
+ *.spec
34
+
35
+ # Installer logs
36
+ pip-log.txt
37
+ pip-delete-this-directory.txt
38
+
39
+ # Unit test / coverage reports
40
+ htmlcov/
41
+ .tox/
42
+ .nox/
43
+ .coverage
44
+ .coverage.*
45
+ .cache
46
+ nosetests.xml
47
+ coverage.xml
48
+ *.cover
49
+ *.py,cover
50
+ .hypothesis/
51
+ .pytest_cache/
52
+ cover/
53
+
54
+ # Translations
55
+ *.mo
56
+ *.pot
57
+
58
+ # Django stuff:
59
+ *.log
60
+ local_settings.py
61
+ db.sqlite3
62
+ db.sqlite3-journal
63
+
64
+ # Flask stuff:
65
+ instance/
66
+ .webassets-cache
67
+
68
+ # Scrapy stuff:
69
+ .scrapy
70
+
71
+ # Sphinx documentation
72
+ docs/_build/
73
+
74
+ # PyBuilder
75
+ .pybuilder/
76
+ target/
77
+
78
+ # Jupyter Notebook
79
+ .ipynb_checkpoints
80
+
81
+ # IPython
82
+ profile_default/
83
+ ipython_config.py
84
+
85
+ # pyenv
86
+ # For a library or package, you might want to ignore these files since the code is
87
+ # intended to run in multiple environments; otherwise, check them in:
88
+ # .python-version
89
+
90
+ # pipenv
91
+ # According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
92
+ # However, in case of collaboration, if having platform-specific dependencies or dependencies
93
+ # having no cross-platform support, pipenv may install dependencies that don't work, or not
94
+ # install all needed dependencies.
95
+ #Pipfile.lock
96
+
97
+ # poetry
98
+ # Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control.
99
+ # This is especially recommended for binary packages to ensure reproducibility, and is more
100
+ # commonly ignored for libraries.
101
+ # https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control
102
+ #poetry.lock
103
+
104
+ # pdm
105
+ # Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control.
106
+ #pdm.lock
107
+ # pdm stores project-wide configurations in .pdm.toml, but it is recommended to not include it
108
+ # in version control.
109
+ # https://pdm.fming.dev/#use-with-ide
110
+ .pdm.toml
111
+
112
+ # PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm
113
+ __pypackages__/
114
+
115
+ # Celery stuff
116
+ celerybeat-schedule
117
+ celerybeat.pid
118
+
119
+ # SageMath parsed files
120
+ *.sage.py
121
+
122
+ # Environments
123
+ .env
124
+ .venv
125
+ env/
126
+ venv/
127
+ ENV/
128
+ env.bak/
129
+ venv.bak/
130
+
131
+ # Spyder project settings
132
+ .spyderproject
133
+ .spyproject
134
+
135
+ # Rope project settings
136
+ .ropeproject
137
+
138
+ # mkdocs documentation
139
+ /site
140
+
141
+ # mypy
142
+ .mypy_cache/
143
+ .dmypy.json
144
+ dmypy.json
145
+
146
+ # Pyre type checker
147
+ .pyre/
148
+
149
+ # pytype static type analyzer
150
+ .pytype/
151
+
152
+ # Cython debug symbols
153
+ cython_debug/
154
+
155
+ # PyCharm
156
+ # JetBrains specific template is maintained in a separate JetBrains.gitignore that can
157
+ # be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
158
+ # and can be added to the global gitignore or merged into this file. For a more nuclear
159
+ # option (not recommended) you can uncomment the following to ignore the entire idea folder.
160
160
  #.idea/
@@ -1,7 +1,7 @@
1
- MIT License
2
-
3
- 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:
4
-
5
- The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
6
-
7
- 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.
1
+ MIT License
2
+
3
+ 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:
4
+
5
+ The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
6
+
7
+ 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.
@@ -1,6 +1,6 @@
1
- Metadata-Version: 2.3
1
+ Metadata-Version: 2.4
2
2
  Name: interactive-figure
3
- Version: 0.4.0
3
+ Version: 0.4.42
4
4
  Summary: Create interactive Matplotlib figures!
5
5
  Project-URL: Documentation, https://teuncm.github.io/interactive-figure/autoapi/interactive_figure/interactive_figure/index.html
6
6
  Project-URL: Issues, https://github.com/teuncm/interactive-figure/issues
@@ -14,8 +14,8 @@ Classifier: Intended Audience :: Science/Research
14
14
  Classifier: Programming Language :: Python
15
15
  Classifier: Programming Language :: Python :: 3
16
16
  Classifier: Topic :: Scientific/Engineering :: Visualization
17
- Requires-Python: >=3.9
18
- Requires-Dist: matplotlib
17
+ Requires-Python: >=3.8
18
+ Requires-Dist: matplotlib>=3.6
19
19
  Description-Content-Type: text/markdown
20
20
 
21
21
  # Interactive Figure
@@ -35,14 +35,14 @@ pip install interactive-figure
35
35
  ## Usage
36
36
 
37
37
  ```python
38
- from interactive_figure import interactive_figure
38
+ import interactive_figure as ifig
39
39
 
40
- interactive_figure.create()
40
+ ifig.create()
41
41
  # Wait until user input is received.
42
- interactive_figure.wait_for_interaction()
43
- key = interactive_figure.get_last_key_press()
42
+ ifig.wait_for_interaction()
43
+ key = ifig.get_last_key_press()
44
44
  print(f"Pressed key: {key}")
45
- interactive_figure.close()
45
+ ifig.close()
46
46
  ```
47
47
 
48
48
  Demos can be found in the *demo* folder on GitHub.
@@ -72,4 +72,4 @@ hatch publish
72
72
 
73
73
  - [GitHub](https://github.com/teuncm/interactive-figure)
74
74
  - [PyPI](https://pypi.org/project/interactive-figure/)
75
- - [Documentation](https://teuncm.github.io/interactive-figure/autoapi/interactive_figure/interactive_figure/index.html)
75
+ - [Documentation](https://teuncm.github.io/interactive-figure/autoapi/interactive_figure/interactive_figure/index.html)
@@ -1,55 +1,55 @@
1
- # Interactive Figure
2
-
3
- This package serves for students to learn the basics of Python, Matplotlib and setting up reaction time experiments (visual search task, Stroop task, etc.). For a more accurate timing environment one should refer to e.g. [PsychoPy](https://www.psychopy.org/).
4
-
5
- This is currently used at the University of Amsterdam (UvA) in the course *Introduction to Python Programming for Neuroscientists*.
6
-
7
- Package created using [Hatch](https://hatch.pypa.io).
8
-
9
- ## Installation
10
-
11
- ```shell
12
- pip install interactive-figure
13
- ```
14
-
15
- ## Usage
16
-
17
- ```python
18
- from interactive_figure import interactive_figure
19
-
20
- interactive_figure.create()
21
- # Wait until user input is received.
22
- interactive_figure.wait_for_interaction()
23
- key = interactive_figure.get_last_key_press()
24
- print(f"Pressed key: {key}")
25
- interactive_figure.close()
26
- ```
27
-
28
- Demos can be found in the *demo* folder on GitHub.
29
-
30
- ## Limitations
31
-
32
- - Waiting for user input will not work in Jupyter Notebooks and the interactive interpreter due to the way Matplotlib handles events.
33
- - Automated testing is hard since tests should cover multiple backends (macosx, QtAgg, Tkgg) on multiple platforms (Windows, macOS, Linux). Tips are very welcome!
34
-
35
- ## Development
36
-
37
- ```bash
38
- # Setup
39
- pipx install hatch
40
- hatch shell
41
-
42
- # Build
43
- hatch version fix
44
- hatch build -c
45
- ./generate_docs.sh
46
-
47
- # Publish
48
- hatch publish
49
- ```
50
-
51
- ## Links
52
-
53
- - [GitHub](https://github.com/teuncm/interactive-figure)
54
- - [PyPI](https://pypi.org/project/interactive-figure/)
55
- - [Documentation](https://teuncm.github.io/interactive-figure/autoapi/interactive_figure/interactive_figure/index.html)
1
+ # Interactive Figure
2
+
3
+ This package serves for students to learn the basics of Python, Matplotlib and setting up reaction time experiments (visual search task, Stroop task, etc.). For a more accurate timing environment one should refer to e.g. [PsychoPy](https://www.psychopy.org/).
4
+
5
+ This is currently used at the University of Amsterdam (UvA) in the course *Introduction to Python Programming for Neuroscientists*.
6
+
7
+ Package created using [Hatch](https://hatch.pypa.io).
8
+
9
+ ## Installation
10
+
11
+ ```shell
12
+ pip install interactive-figure
13
+ ```
14
+
15
+ ## Usage
16
+
17
+ ```python
18
+ import interactive_figure as ifig
19
+
20
+ ifig.create()
21
+ # Wait until user input is received.
22
+ ifig.wait_for_interaction()
23
+ key = ifig.get_last_key_press()
24
+ print(f"Pressed key: {key}")
25
+ ifig.close()
26
+ ```
27
+
28
+ Demos can be found in the *demo* folder on GitHub.
29
+
30
+ ## Limitations
31
+
32
+ - Waiting for user input will not work in Jupyter Notebooks and the interactive interpreter due to the way Matplotlib handles events.
33
+ - Automated testing is hard since tests should cover multiple backends (macosx, QtAgg, Tkgg) on multiple platforms (Windows, macOS, Linux). Tips are very welcome!
34
+
35
+ ## Development
36
+
37
+ ```bash
38
+ # Setup
39
+ pipx install hatch
40
+ hatch shell
41
+
42
+ # Build
43
+ hatch version fix
44
+ hatch build -c
45
+ ./generate_docs.sh
46
+
47
+ # Publish
48
+ hatch publish
49
+ ```
50
+
51
+ ## Links
52
+
53
+ - [GitHub](https://github.com/teuncm/interactive-figure)
54
+ - [PyPI](https://pypi.org/project/interactive-figure/)
55
+ - [Documentation](https://teuncm.github.io/interactive-figure/autoapi/interactive_figure/interactive_figure/index.html)
@@ -0,0 +1,8 @@
1
+ # This demo confirms that the external close functionality works.
2
+
3
+ import interactive_figure as ifig
4
+
5
+ ifig.create()
6
+ no_number = "no_number"
7
+ int(no_number) # This will raise an exception.
8
+ ifig.wait_for_interaction()
@@ -0,0 +1,18 @@
1
+ # This demo tests the fullscreen toggle functionality.
2
+
3
+ import interactive_figure as ifig
4
+ import matplotlib.pyplot as plt
5
+
6
+ ifig.create()
7
+ plt.title("Windowed mode")
8
+ ifig.draw()
9
+ ifig.wait_for_interaction()
10
+ ifig.toggle_fullscreen()
11
+ plt.title("Fullscreen mode")
12
+ ifig.draw()
13
+ ifig.wait_for_interaction()
14
+ ifig.toggle_fullscreen()
15
+ plt.title("Windowed mode")
16
+ ifig.draw()
17
+ ifig.wait_for_interaction()
18
+ ifig.close()
@@ -1,54 +1,54 @@
1
- # This demo shows all the button press registering possibilities.
2
-
3
- from interactive_figure import interactive_figure
4
- import matplotlib.pyplot as plt
5
-
6
-
7
- def main():
8
- interactive_figure.create()
9
- run_demo()
10
- interactive_figure.close()
11
-
12
-
13
- def run_demo():
14
- plt.title("Feedback will appear here.")
15
- interactive_figure.draw()
16
-
17
- while True:
18
- interactive_figure.wait_for_interaction()
19
-
20
- key = interactive_figure.get_last_key_press()
21
- mouse = interactive_figure.get_last_mouse_press()
22
- x, y = interactive_figure.get_last_mouse_pos()
23
-
24
- interactive_figure.clear()
25
-
26
- # Exit if q is pressed outside rectangle.
27
- if x is None or y is None:
28
- if key == "q":
29
- print("Closing...")
30
- return
31
- # Plot keys if pressed inside rectangle.
32
- else:
33
- x = round(x, 3)
34
- y = round(y, 3)
35
-
36
- if not key is None:
37
- plt.text(x, y, key, ha="center", va="center", fontsize="large")
38
- elif mouse == 1:
39
- plt.plot(x, y, "r.", ms=13)
40
- elif mouse == 2:
41
- plt.plot(x, y, "g.", ms=13)
42
- elif mouse == 3:
43
- plt.plot(x, y, "b.", ms=13)
44
- else:
45
- # Any other mouse button.
46
- plt.plot(x, y, "k.", ms=13)
47
-
48
- plt.title(f"key: {key}, x: {x}, y: {y}")
49
-
50
- interactive_figure.draw()
51
-
52
-
53
- if __name__ == "__main__":
54
- main()
1
+ # This demo shows all the button press registering possibilities.
2
+
3
+ import interactive_figure as ifig
4
+ import matplotlib.pyplot as plt
5
+
6
+
7
+ def main():
8
+ ifig.create()
9
+ run_demo()
10
+ ifig.close()
11
+
12
+
13
+ def run_demo():
14
+ plt.title("Feedback will appear here.")
15
+ ifig.draw()
16
+
17
+ while True:
18
+ ifig.wait_for_interaction()
19
+
20
+ key = ifig.get_last_key_press()
21
+ mouse = ifig.get_last_mouse_press()
22
+ x, y = ifig.get_last_mouse_pos()
23
+
24
+ ifig.clear()
25
+
26
+ # Exit if q is pressed outside rectangle.
27
+ if x is None or y is None:
28
+ if key == "q":
29
+ print("Closing...")
30
+ return
31
+ # Plot keys if pressed inside rectangle.
32
+ else:
33
+ x = round(x, 3)
34
+ y = round(y, 3)
35
+
36
+ if not key is None:
37
+ plt.text(x, y, key, ha="center", va="center", fontsize="large")
38
+ elif mouse == 1:
39
+ plt.plot(x, y, "r.", ms=13)
40
+ elif mouse == 2:
41
+ plt.plot(x, y, "g.", ms=13)
42
+ elif mouse == 3:
43
+ plt.plot(x, y, "b.", ms=13)
44
+ else:
45
+ # Any other mouse button.
46
+ plt.plot(x, y, "k.", ms=13)
47
+
48
+ plt.title(f"key: {key}, x: {x}, y: {y}")
49
+
50
+ ifig.draw()
51
+
52
+
53
+ if __name__ == "__main__":
54
+ main()