research-copilot 0.1.0
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.
- package/LICENSE +21 -0
- package/README.md +190 -0
- package/app/build/icon.icns +0 -0
- package/app/build/icon.ico +0 -0
- package/app/build/icon.png +0 -0
- package/app/out/main/index.mjs +6719 -0
- package/app/out/preload/index.js +141 -0
- package/app/out/renderer/assets/Inter-Variable-Latin-8kRkwJBP.woff2 +0 -0
- package/app/out/renderer/assets/Inter-Variable-LatinExt-B_-bZUTo.woff2 +0 -0
- package/app/out/renderer/assets/KaTeX_AMS-Regular-BQhdFMY1.woff2 +0 -0
- package/app/out/renderer/assets/KaTeX_AMS-Regular-DMm9YOAa.woff +0 -0
- package/app/out/renderer/assets/KaTeX_AMS-Regular-DRggAlZN.ttf +0 -0
- package/app/out/renderer/assets/KaTeX_Caligraphic-Bold-ATXxdsX0.ttf +0 -0
- package/app/out/renderer/assets/KaTeX_Caligraphic-Bold-BEiXGLvX.woff +0 -0
- package/app/out/renderer/assets/KaTeX_Caligraphic-Bold-Dq_IR9rO.woff2 +0 -0
- package/app/out/renderer/assets/KaTeX_Caligraphic-Regular-CTRA-rTL.woff +0 -0
- package/app/out/renderer/assets/KaTeX_Caligraphic-Regular-Di6jR-x-.woff2 +0 -0
- package/app/out/renderer/assets/KaTeX_Caligraphic-Regular-wX97UBjC.ttf +0 -0
- package/app/out/renderer/assets/KaTeX_Fraktur-Bold-BdnERNNW.ttf +0 -0
- package/app/out/renderer/assets/KaTeX_Fraktur-Bold-BsDP51OF.woff +0 -0
- package/app/out/renderer/assets/KaTeX_Fraktur-Bold-CL6g_b3V.woff2 +0 -0
- package/app/out/renderer/assets/KaTeX_Fraktur-Regular-CB_wures.ttf +0 -0
- package/app/out/renderer/assets/KaTeX_Fraktur-Regular-CTYiF6lA.woff2 +0 -0
- package/app/out/renderer/assets/KaTeX_Fraktur-Regular-Dxdc4cR9.woff +0 -0
- package/app/out/renderer/assets/KaTeX_Main-Bold-Cx986IdX.woff2 +0 -0
- package/app/out/renderer/assets/KaTeX_Main-Bold-Jm3AIy58.woff +0 -0
- package/app/out/renderer/assets/KaTeX_Main-Bold-waoOVXN0.ttf +0 -0
- package/app/out/renderer/assets/KaTeX_Main-BoldItalic-DxDJ3AOS.woff2 +0 -0
- package/app/out/renderer/assets/KaTeX_Main-BoldItalic-DzxPMmG6.ttf +0 -0
- package/app/out/renderer/assets/KaTeX_Main-BoldItalic-SpSLRI95.woff +0 -0
- package/app/out/renderer/assets/KaTeX_Main-Italic-3WenGoN9.ttf +0 -0
- package/app/out/renderer/assets/KaTeX_Main-Italic-BMLOBm91.woff +0 -0
- package/app/out/renderer/assets/KaTeX_Main-Italic-NWA7e6Wa.woff2 +0 -0
- package/app/out/renderer/assets/KaTeX_Main-Regular-B22Nviop.woff2 +0 -0
- package/app/out/renderer/assets/KaTeX_Main-Regular-Dr94JaBh.woff +0 -0
- package/app/out/renderer/assets/KaTeX_Main-Regular-ypZvNtVU.ttf +0 -0
- package/app/out/renderer/assets/KaTeX_Math-BoldItalic-B3XSjfu4.ttf +0 -0
- package/app/out/renderer/assets/KaTeX_Math-BoldItalic-CZnvNsCZ.woff2 +0 -0
- package/app/out/renderer/assets/KaTeX_Math-BoldItalic-iY-2wyZ7.woff +0 -0
- package/app/out/renderer/assets/KaTeX_Math-Italic-DA0__PXp.woff +0 -0
- package/app/out/renderer/assets/KaTeX_Math-Italic-flOr_0UB.ttf +0 -0
- package/app/out/renderer/assets/KaTeX_Math-Italic-t53AETM-.woff2 +0 -0
- package/app/out/renderer/assets/KaTeX_SansSerif-Bold-CFMepnvq.ttf +0 -0
- package/app/out/renderer/assets/KaTeX_SansSerif-Bold-D1sUS0GD.woff2 +0 -0
- package/app/out/renderer/assets/KaTeX_SansSerif-Bold-DbIhKOiC.woff +0 -0
- package/app/out/renderer/assets/KaTeX_SansSerif-Italic-C3H0VqGB.woff2 +0 -0
- package/app/out/renderer/assets/KaTeX_SansSerif-Italic-DN2j7dab.woff +0 -0
- package/app/out/renderer/assets/KaTeX_SansSerif-Italic-YYjJ1zSn.ttf +0 -0
- package/app/out/renderer/assets/KaTeX_SansSerif-Regular-BNo7hRIc.ttf +0 -0
- package/app/out/renderer/assets/KaTeX_SansSerif-Regular-CS6fqUqJ.woff +0 -0
- package/app/out/renderer/assets/KaTeX_SansSerif-Regular-DDBCnlJ7.woff2 +0 -0
- package/app/out/renderer/assets/KaTeX_Script-Regular-C5JkGWo-.ttf +0 -0
- package/app/out/renderer/assets/KaTeX_Script-Regular-D3wIWfF6.woff2 +0 -0
- package/app/out/renderer/assets/KaTeX_Script-Regular-D5yQViql.woff +0 -0
- package/app/out/renderer/assets/KaTeX_Size1-Regular-C195tn64.woff +0 -0
- package/app/out/renderer/assets/KaTeX_Size1-Regular-Dbsnue_I.ttf +0 -0
- package/app/out/renderer/assets/KaTeX_Size1-Regular-mCD8mA8B.woff2 +0 -0
- package/app/out/renderer/assets/KaTeX_Size2-Regular-B7gKUWhC.ttf +0 -0
- package/app/out/renderer/assets/KaTeX_Size2-Regular-Dy4dx90m.woff2 +0 -0
- package/app/out/renderer/assets/KaTeX_Size2-Regular-oD1tc_U0.woff +0 -0
- package/app/out/renderer/assets/KaTeX_Size3-Regular-CTq5MqoE.woff +0 -0
- package/app/out/renderer/assets/KaTeX_Size3-Regular-DgpXs0kz.ttf +0 -0
- package/app/out/renderer/assets/KaTeX_Size4-Regular-BF-4gkZK.woff +0 -0
- package/app/out/renderer/assets/KaTeX_Size4-Regular-DWFBv043.ttf +0 -0
- package/app/out/renderer/assets/KaTeX_Size4-Regular-Dl5lxZxV.woff2 +0 -0
- package/app/out/renderer/assets/KaTeX_Typewriter-Regular-C0xS9mPB.woff +0 -0
- package/app/out/renderer/assets/KaTeX_Typewriter-Regular-CO6r4hn1.woff2 +0 -0
- package/app/out/renderer/assets/KaTeX_Typewriter-Regular-D3Ib7_Hf.ttf +0 -0
- package/app/out/renderer/assets/MilkdownMarkdownEditor-bLPxrCVb.js +89821 -0
- package/app/out/renderer/assets/MilkdownMarkdownEditor-tTNRIB2K.css +2555 -0
- package/app/out/renderer/assets/Tableau10-BqnYsPR6.js +9 -0
- package/app/out/renderer/assets/apl-fqmucPXA.js +140 -0
- package/app/out/renderer/assets/arc-J47ePHZ2.js +132 -0
- package/app/out/renderer/assets/array-DgktLKBx.js +6 -0
- package/app/out/renderer/assets/asciiarmor-DucZyvP0.js +56 -0
- package/app/out/renderer/assets/asn1-BnOEsgAm.js +144 -0
- package/app/out/renderer/assets/asterisk-QAlztEwS.js +345 -0
- package/app/out/renderer/assets/blockDiagram-c4efeb88-5uRQXgQJ.js +1817 -0
- package/app/out/renderer/assets/brainfuck-DZVCuF_t.js +53 -0
- package/app/out/renderer/assets/c4Diagram-c83219d4-C4iCTPEL.js +2464 -0
- package/app/out/renderer/assets/channel-ZAmhHE3g.js +7 -0
- package/app/out/renderer/assets/classDiagram-beda092f-7NOZxq_W.js +357 -0
- package/app/out/renderer/assets/classDiagram-v2-2358418a-5fPT-cUH.js +291 -0
- package/app/out/renderer/assets/clike-xqXYL6ge.js +805 -0
- package/app/out/renderer/assets/clojure-BhXMqnxz.js +849 -0
- package/app/out/renderer/assets/clone-CsnzsYXQ.js +8 -0
- package/app/out/renderer/assets/cmake-BGaNd9E7.js +71 -0
- package/app/out/renderer/assets/cobol-4yqQntpt.js +120 -0
- package/app/out/renderer/assets/coffeescript-D2dXvhEc.js +308 -0
- package/app/out/renderer/assets/commonlisp-CF_VNHQR.js +130 -0
- package/app/out/renderer/assets/createText-1719965b-Cji7KN4K.js +4904 -0
- package/app/out/renderer/assets/crystal-DyuLTqLs.js +398 -0
- package/app/out/renderer/assets/css-c-jst79C.js +1783 -0
- package/app/out/renderer/assets/cypher-Dlu_3r4V.js +121 -0
- package/app/out/renderer/assets/d-UURgV0Ux.js +179 -0
- package/app/out/renderer/assets/diff-B_Bi2Crb.js +25 -0
- package/app/out/renderer/assets/dockerfile-Bvk733Ga.js +201 -0
- package/app/out/renderer/assets/dtd-Dy74G54E.js +114 -0
- package/app/out/renderer/assets/dylan-TSb-Nfix.js +314 -0
- package/app/out/renderer/assets/ebnf-DAomQUbD.js +139 -0
- package/app/out/renderer/assets/ecl-B59qGGVg.js +178 -0
- package/app/out/renderer/assets/edges-96097737-CD0EvAZQ.js +1844 -0
- package/app/out/renderer/assets/eiffel-Dze7nlu3.js +134 -0
- package/app/out/renderer/assets/elm-DG7jkhNZ.js +176 -0
- package/app/out/renderer/assets/erDiagram-0228fc6a-DRYXBpi7.js +1321 -0
- package/app/out/renderer/assets/erlang-BO6gOnGA.js +674 -0
- package/app/out/renderer/assets/factor-CMxFHDqz.js +65 -0
- package/app/out/renderer/assets/fcl-CDDUNjTj.js +141 -0
- package/app/out/renderer/assets/flowDb-c6c81e3f-CuoIN-Cy.js +1713 -0
- package/app/out/renderer/assets/flowDiagram-50d868cf-CPWPLOml.js +1272 -0
- package/app/out/renderer/assets/flowDiagram-v2-4f6560a1-C_R12s4S.js +33 -0
- package/app/out/renderer/assets/flowchart-elk-definition-6af322e1-BdKUSFpi.js +92921 -0
- package/app/out/renderer/assets/forth-B9D2JCeE.js +116 -0
- package/app/out/renderer/assets/fortran-CAG2BFbe.js +467 -0
- package/app/out/renderer/assets/ganttDiagram-a2739b55-ygqT5HlG.js +3399 -0
- package/app/out/renderer/assets/gas-d3KEcW3x.js +294 -0
- package/app/out/renderer/assets/gherkin-DhZlEZiy.js +115 -0
- package/app/out/renderer/assets/gitGraphDiagram-82fe8481-D97GT4iA.js +1791 -0
- package/app/out/renderer/assets/graph-DpC13d95.js +1237 -0
- package/app/out/renderer/assets/groovy-CpwJiBl7.js +223 -0
- package/app/out/renderer/assets/haskell-BlGBCCe3.js +459 -0
- package/app/out/renderer/assets/haxe-7MlzfeYV.js +514 -0
- package/app/out/renderer/assets/http-BqypyemW.js +79 -0
- package/app/out/renderer/assets/idl-4HIGJlDI.js +985 -0
- package/app/out/renderer/assets/index-4-ziknCv.js +292 -0
- package/app/out/renderer/assets/index-5325376f-Bbs7Fbqr.js +663 -0
- package/app/out/renderer/assets/index-B2jip-rk.js +2489 -0
- package/app/out/renderer/assets/index-BKTVfokE.js +312 -0
- package/app/out/renderer/assets/index-BiJbFgVG.js +118 -0
- package/app/out/renderer/assets/index-Bn433Fat.js +83 -0
- package/app/out/renderer/assets/index-BqDyyRCx.js +39679 -0
- package/app/out/renderer/assets/index-BzFMeMPn.js +158 -0
- package/app/out/renderer/assets/index-C-_uCjZJ.css +2701 -0
- package/app/out/renderer/assets/index-C1ithNW1.js +1765 -0
- package/app/out/renderer/assets/index-CAJkRYkO.js +407 -0
- package/app/out/renderer/assets/index-CleO0-yj.js +690 -0
- package/app/out/renderer/assets/index-Cq4MH3sY.js +1020 -0
- package/app/out/renderer/assets/index-CtA0Xj22.js +705 -0
- package/app/out/renderer/assets/index-CvAZkqBZ.js +83 -0
- package/app/out/renderer/assets/index-D3UDN-5c.js +152 -0
- package/app/out/renderer/assets/index-D4F9R5ao.js +179 -0
- package/app/out/renderer/assets/index-D6RguhZ5.js +328 -0
- package/app/out/renderer/assets/index-DnEowqXv.js +386 -0
- package/app/out/renderer/assets/index-K8c8Mqdy.js +98 -0
- package/app/out/renderer/assets/index-Kh14gO6K.js +62 -0
- package/app/out/renderer/assets/index-WFd2jRnA.js +333 -0
- package/app/out/renderer/assets/index-WgMfkRFp.js +313 -0
- package/app/out/renderer/assets/index-Y4lKyF6t.js +1042 -0
- package/app/out/renderer/assets/index-fx307_f1.js +643 -0
- package/app/out/renderer/assets/infoDiagram-8eee0895-ptaVSwzq.js +511 -0
- package/app/out/renderer/assets/init-ZxktEp_H.js +16 -0
- package/app/out/renderer/assets/javascript-C3MnDRiU.js +994 -0
- package/app/out/renderer/assets/journeyDiagram-c64418c1-aloEGOQp.js +1184 -0
- package/app/out/renderer/assets/julia-Bs6JJhYG.js +407 -0
- package/app/out/renderer/assets/layout-ZeuHE_aY.js +2217 -0
- package/app/out/renderer/assets/line-CAgaGl-S.js +45 -0
- package/app/out/renderer/assets/linear-DIg7lTe1.js +539 -0
- package/app/out/renderer/assets/livescript-DmzgM3Yt.js +296 -0
- package/app/out/renderer/assets/lua-8cJgIlqe.js +256 -0
- package/app/out/renderer/assets/mathematica-DNLOL9PQ.js +110 -0
- package/app/out/renderer/assets/mbox-Ga7d4MMN.js +117 -0
- package/app/out/renderer/assets/mindmap-definition-8da855dc-B8XVoUxz.js +36054 -0
- package/app/out/renderer/assets/mirc-Dma3B8rS.js +107 -0
- package/app/out/renderer/assets/mllike-DHn7xckP.js +334 -0
- package/app/out/renderer/assets/modelica-0d55jYY0.js +147 -0
- package/app/out/renderer/assets/mscgen-DdqZYINH.js +135 -0
- package/app/out/renderer/assets/mumps-Btr8VblO.js +93 -0
- package/app/out/renderer/assets/nginx-DTDtBDVN.js +141 -0
- package/app/out/renderer/assets/nsis-3zG7tgur.js +62 -0
- package/app/out/renderer/assets/ntriples-CvgOYMpL.js +153 -0
- package/app/out/renderer/assets/octave-DYBj3-tl.js +200 -0
- package/app/out/renderer/assets/ordinal-DSZU4PqD.js +76 -0
- package/app/out/renderer/assets/oz-R_e8WMIi.js +231 -0
- package/app/out/renderer/assets/pascal-GD8iposT.js +105 -0
- package/app/out/renderer/assets/path-Cp2qmpkd.js +109 -0
- package/app/out/renderer/assets/perl-DL9mHpoi.js +1105 -0
- package/app/out/renderer/assets/pieDiagram-a8764435-DlwoeBU2.js +770 -0
- package/app/out/renderer/assets/pig-C_4T4YIV.js +101 -0
- package/app/out/renderer/assets/powershell-B0suO7Vd.js +328 -0
- package/app/out/renderer/assets/properties-BR-vP1aU.js +58 -0
- package/app/out/renderer/assets/protobuf-BxgpyhoW.js +77 -0
- package/app/out/renderer/assets/pug-By0kVCfm.js +405 -0
- package/app/out/renderer/assets/puppet-Bdao66PW.js +137 -0
- package/app/out/renderer/assets/python-CvWbmiX4.js +427 -0
- package/app/out/renderer/assets/q-CrbCVq4a.js +131 -0
- package/app/out/renderer/assets/quadrantDiagram-1e28029f-BaSi1XB4.js +1200 -0
- package/app/out/renderer/assets/r-V7nswm59.js +170 -0
- package/app/out/renderer/assets/requirementDiagram-08caed73-D3EFyegZ.js +1092 -0
- package/app/out/renderer/assets/rpm-C-DLY-If.js +109 -0
- package/app/out/renderer/assets/ruby-JDKLJNK0.js +330 -0
- package/app/out/renderer/assets/sankeyDiagram-a04cb91d-Cv44AsnM.js +1174 -0
- package/app/out/renderer/assets/sas-D2UG-yhZ.js +207 -0
- package/app/out/renderer/assets/scheme-BKzrkGJD.js +222 -0
- package/app/out/renderer/assets/sequenceDiagram-c5b8d532-CuUBu-x4.js +3337 -0
- package/app/out/renderer/assets/shell-BlsXDxCn.js +222 -0
- package/app/out/renderer/assets/sieve-CjwBwOY5.js +135 -0
- package/app/out/renderer/assets/simple-mode-DMneyfDu.js +130 -0
- package/app/out/renderer/assets/smalltalk-BOIGQuhN.js +121 -0
- package/app/out/renderer/assets/solr-CwD7U71z.js +69 -0
- package/app/out/renderer/assets/sparql-DYskk2vE.js +249 -0
- package/app/out/renderer/assets/spreadsheet-Bgtt3oLP.js +87 -0
- package/app/out/renderer/assets/sql-BSrOzCRI.js +354 -0
- package/app/out/renderer/assets/stateDiagram-1ecb1508-BOU34Zp4.js +454 -0
- package/app/out/renderer/assets/stateDiagram-v2-c2b004d7-BgRoffou.js +326 -0
- package/app/out/renderer/assets/stex-B6LNC55o.js +231 -0
- package/app/out/renderer/assets/styles-b4e223ce-BMr9TPuj.js +1483 -0
- package/app/out/renderer/assets/styles-ca3715f6-DgbNw99p.js +1363 -0
- package/app/out/renderer/assets/styles-d45a18b0-DtRYKYKf.js +574 -0
- package/app/out/renderer/assets/stylus-BkS-boTH.js +565 -0
- package/app/out/renderer/assets/svgDrawCommon-b86b1483-Bein03PD.js +100 -0
- package/app/out/renderer/assets/swift-FRZi1uvB.js +291 -0
- package/app/out/renderer/assets/tcl-CUcaCdmq.js +114 -0
- package/app/out/renderer/assets/textile-BnFpjsrl.js +414 -0
- package/app/out/renderer/assets/tiddlywiki-CjprD-Qp.js +218 -0
- package/app/out/renderer/assets/tiki-B4EPSQ1G.js +265 -0
- package/app/out/renderer/assets/timeline-definition-faaaa080-BlWpLE_4.js +1212 -0
- package/app/out/renderer/assets/toml-BOuWGMcf.js +76 -0
- package/app/out/renderer/assets/troff-E1bJ0PPL.js +61 -0
- package/app/out/renderer/assets/ttcn-cfg-Dc39-fIP.js +133 -0
- package/app/out/renderer/assets/ttcn-tKd4HLu4.js +192 -0
- package/app/out/renderer/assets/turtle-Dq7-1WAf.js +124 -0
- package/app/out/renderer/assets/vb-Dp90gtsv.js +196 -0
- package/app/out/renderer/assets/vbscript-CI6_mxxU.js +479 -0
- package/app/out/renderer/assets/velocity-BwIZK1TH.js +149 -0
- package/app/out/renderer/assets/verilog-DDCYnHN8.js +430 -0
- package/app/out/renderer/assets/vhdl-DCkMIyT9.js +158 -0
- package/app/out/renderer/assets/webidl-BTLTThCm.js +204 -0
- package/app/out/renderer/assets/xquery-BgiOC5Ce.js +525 -0
- package/app/out/renderer/assets/xychartDiagram-f5964ef8-Bhga-YXm.js +1799 -0
- package/app/out/renderer/assets/yacas-b5lAVEIl.js +130 -0
- package/app/out/renderer/assets/z80-BZV19vqv.js +93 -0
- package/app/out/renderer/index.html +13 -0
- package/app/out/skills/community-builtin/README.md +29 -0
- package/app/out/skills/community-builtin/document-docx/SKILL.md +44 -0
- package/app/out/skills/community-builtin/document-docx/scripts/docx-to-markdown.sh +20 -0
- package/app/out/skills/community-builtin/document-docx/scripts/extract-docx-text.sh +28 -0
- package/app/out/skills/community-builtin/document-docx/scripts/init-docx-template.sh +32 -0
- package/app/out/skills/community-builtin/document-docx/scripts/setup-docx-tools.sh +10 -0
- package/app/out/skills/community-builtin/markitdown/SKILL.md +105 -0
- package/app/out/skills/community-builtin/markitdown/scripts/batch-convert.sh +40 -0
- package/app/out/skills/community-builtin/markitdown/scripts/convert-file.sh +24 -0
- package/app/out/skills/community-builtin/markitdown/scripts/setup-markitdown.sh +10 -0
- package/app/out/skills/community-builtin/repo-quick-audit/SKILL.md +27 -0
- package/app/out/skills/community-builtin/repo-quick-audit/scripts/audit-basics.sh +19 -0
- package/app/out/skills/research-pilot-default-project-skills/README.md +23 -0
- package/app/out/skills/research-pilot-default-project-skills/citation-management/SKILL.md +39 -0
- package/app/out/skills/research-pilot-default-project-skills/citation-management/scripts/doi-to-bibtex.sh +25 -0
- package/app/out/skills/research-pilot-default-project-skills/citation-management/scripts/normalize-bibtex-keys.sh +51 -0
- package/app/out/skills/research-pilot-default-project-skills/citation-management/scripts/setup-citation-tools.sh +10 -0
- package/app/out/skills/research-pilot-default-project-skills/citation-management/scripts/validate-bib.sh +31 -0
- package/app/out/skills/research-pilot-default-project-skills/matplotlib/SKILL.md +34 -0
- package/app/out/skills/research-pilot-default-project-skills/matplotlib/references/api_reference.md +412 -0
- package/app/out/skills/research-pilot-default-project-skills/matplotlib/references/common_issues.md +563 -0
- package/app/out/skills/research-pilot-default-project-skills/matplotlib/references/plot_types.md +476 -0
- package/app/out/skills/research-pilot-default-project-skills/matplotlib/references/styling_guide.md +589 -0
- package/app/out/skills/research-pilot-default-project-skills/matplotlib/references/subagent_quickstart.md +30 -0
- package/app/out/skills/research-pilot-default-project-skills/matplotlib/scripts/plot_template.py +401 -0
- package/app/out/skills/research-pilot-default-project-skills/matplotlib/scripts/style_configurator.py +409 -0
- package/app/out/skills/research-pilot-default-project-skills/research-grants/SKILL.md +38 -0
- package/app/out/skills/research-pilot-default-project-skills/research-grants/scripts/check-grant-compliance.sh +40 -0
- package/app/out/skills/research-pilot-default-project-skills/research-grants/scripts/grant-summary-card.sh +32 -0
- package/app/out/skills/research-pilot-default-project-skills/research-grants/scripts/init-grant-structure.sh +70 -0
- package/app/package.json +77 -0
- package/bin/cli.mjs +56 -0
- package/lib/README.md +145 -0
- package/lib/skills/_generated.ts +13 -0
- package/lib/skills/builtin/brainstorming-research-ideas/SKILL.md +280 -0
- package/lib/skills/builtin/coding/SKILL.md +114 -0
- package/lib/skills/builtin/creative-thinking-for-research/SKILL.md +273 -0
- package/lib/skills/builtin/matplotlib/SKILL.md +361 -0
- package/lib/skills/builtin/matplotlib/references/api_reference.md +412 -0
- package/lib/skills/builtin/matplotlib/references/common_issues.md +563 -0
- package/lib/skills/builtin/matplotlib/references/plot_types.md +476 -0
- package/lib/skills/builtin/matplotlib/references/styling_guide.md +589 -0
- package/lib/skills/builtin/matplotlib/scripts/plot_template.py +401 -0
- package/lib/skills/builtin/matplotlib/scripts/style_configurator.py +409 -0
- package/lib/skills/builtin/paper-writing/SKILL.md +554 -0
- package/lib/skills/builtin/paper-writing/references/checklists.md +524 -0
- package/lib/skills/builtin/paper-writing/references/citation-workflow.md +562 -0
- package/lib/skills/builtin/paper-writing/references/reviewer-guidelines.md +462 -0
- package/lib/skills/builtin/paper-writing/references/sources.md +189 -0
- package/lib/skills/builtin/paper-writing/references/systems-conferences.md +260 -0
- package/lib/skills/builtin/paper-writing/references/writing-guide.md +476 -0
- package/lib/skills/builtin/paper-writing/templates/README.md +408 -0
- package/lib/skills/builtin/paper-writing/templates/aaai2026/README.md +534 -0
- package/lib/skills/builtin/paper-writing/templates/aaai2026/aaai2026-unified-supp.tex +144 -0
- package/lib/skills/builtin/paper-writing/templates/aaai2026/aaai2026-unified-template.tex +952 -0
- package/lib/skills/builtin/paper-writing/templates/aaai2026/aaai2026.bib +111 -0
- package/lib/skills/builtin/paper-writing/templates/aaai2026/aaai2026.bst +1493 -0
- package/lib/skills/builtin/paper-writing/templates/aaai2026/aaai2026.sty +315 -0
- package/lib/skills/builtin/paper-writing/templates/acl/README.md +50 -0
- package/lib/skills/builtin/paper-writing/templates/acl/acl.sty +312 -0
- package/lib/skills/builtin/paper-writing/templates/acl/acl_latex.tex +377 -0
- package/lib/skills/builtin/paper-writing/templates/acl/acl_lualatex.tex +101 -0
- package/lib/skills/builtin/paper-writing/templates/acl/acl_natbib.bst +1940 -0
- package/lib/skills/builtin/paper-writing/templates/acl/anthology.bib.txt +26 -0
- package/lib/skills/builtin/paper-writing/templates/acl/custom.bib +70 -0
- package/lib/skills/builtin/paper-writing/templates/acl/formatting.md +326 -0
- package/lib/skills/builtin/paper-writing/templates/asplos2027/main.tex +459 -0
- package/lib/skills/builtin/paper-writing/templates/asplos2027/references.bib +135 -0
- package/lib/skills/builtin/paper-writing/templates/colm2025/README.md +3 -0
- package/lib/skills/builtin/paper-writing/templates/colm2025/colm2025_conference.bib +11 -0
- package/lib/skills/builtin/paper-writing/templates/colm2025/colm2025_conference.bst +1440 -0
- package/lib/skills/builtin/paper-writing/templates/colm2025/colm2025_conference.pdf +0 -0
- package/lib/skills/builtin/paper-writing/templates/colm2025/colm2025_conference.sty +218 -0
- package/lib/skills/builtin/paper-writing/templates/colm2025/colm2025_conference.tex +305 -0
- package/lib/skills/builtin/paper-writing/templates/colm2025/fancyhdr.sty +485 -0
- package/lib/skills/builtin/paper-writing/templates/colm2025/math_commands.tex +508 -0
- package/lib/skills/builtin/paper-writing/templates/colm2025/natbib.sty +1246 -0
- package/lib/skills/builtin/paper-writing/templates/iclr2026/fancyhdr.sty +485 -0
- package/lib/skills/builtin/paper-writing/templates/iclr2026/iclr2026_conference.bib +24 -0
- package/lib/skills/builtin/paper-writing/templates/iclr2026/iclr2026_conference.bst +1440 -0
- package/lib/skills/builtin/paper-writing/templates/iclr2026/iclr2026_conference.pdf +0 -0
- package/lib/skills/builtin/paper-writing/templates/iclr2026/iclr2026_conference.sty +246 -0
- package/lib/skills/builtin/paper-writing/templates/iclr2026/iclr2026_conference.tex +414 -0
- package/lib/skills/builtin/paper-writing/templates/iclr2026/math_commands.tex +508 -0
- package/lib/skills/builtin/paper-writing/templates/iclr2026/natbib.sty +1246 -0
- package/lib/skills/builtin/paper-writing/templates/icml2026/algorithm.sty +79 -0
- package/lib/skills/builtin/paper-writing/templates/icml2026/algorithmic.sty +201 -0
- package/lib/skills/builtin/paper-writing/templates/icml2026/example_paper.bib +75 -0
- package/lib/skills/builtin/paper-writing/templates/icml2026/example_paper.pdf +0 -0
- package/lib/skills/builtin/paper-writing/templates/icml2026/example_paper.tex +662 -0
- package/lib/skills/builtin/paper-writing/templates/icml2026/fancyhdr.sty +864 -0
- package/lib/skills/builtin/paper-writing/templates/icml2026/icml2026.bst +1443 -0
- package/lib/skills/builtin/paper-writing/templates/icml2026/icml2026.sty +767 -0
- package/lib/skills/builtin/paper-writing/templates/icml2026/icml_numpapers.pdf +0 -0
- package/lib/skills/builtin/paper-writing/templates/neurips2025/Makefile +36 -0
- package/lib/skills/builtin/paper-writing/templates/neurips2025/extra_pkgs.tex +53 -0
- package/lib/skills/builtin/paper-writing/templates/neurips2025/main.tex +38 -0
- package/lib/skills/builtin/paper-writing/templates/neurips2025/neurips.sty +382 -0
- package/lib/skills/builtin/paper-writing/templates/nsdi2027/main.tex +426 -0
- package/lib/skills/builtin/paper-writing/templates/nsdi2027/references.bib +151 -0
- package/lib/skills/builtin/paper-writing/templates/nsdi2027/usenix-2020-09.sty +83 -0
- package/lib/skills/builtin/paper-writing/templates/osdi2026/main.tex +429 -0
- package/lib/skills/builtin/paper-writing/templates/osdi2026/references.bib +150 -0
- package/lib/skills/builtin/paper-writing/templates/osdi2026/usenix-2020-09.sty +83 -0
- package/lib/skills/builtin/paper-writing/templates/sosp2026/main.tex +532 -0
- package/lib/skills/builtin/paper-writing/templates/sosp2026/references.bib +148 -0
- package/lib/skills/builtin/research-grants/SKILL.md +958 -0
- package/lib/skills/builtin/research-grants/assets/budget_justification_template.md +453 -0
- package/lib/skills/builtin/research-grants/assets/nih_specific_aims_template.md +166 -0
- package/lib/skills/builtin/research-grants/assets/nsf_project_summary_template.md +92 -0
- package/lib/skills/builtin/research-grants/references/README.md +285 -0
- package/lib/skills/builtin/research-grants/references/broader_impacts.md +392 -0
- package/lib/skills/builtin/research-grants/references/darpa_guidelines.md +636 -0
- package/lib/skills/builtin/research-grants/references/doe_guidelines.md +586 -0
- package/lib/skills/builtin/research-grants/references/nih_guidelines.md +851 -0
- package/lib/skills/builtin/research-grants/references/nsf_guidelines.md +570 -0
- package/lib/skills/builtin/research-grants/references/nstc_guidelines.md +733 -0
- package/lib/skills/builtin/research-grants/references/specific_aims_guide.md +458 -0
- package/lib/skills/builtin/rewrite-humanize/SKILL.md +116 -0
- package/lib/skills/builtin/rewrite-humanize/references/cs-venue-tone.md +57 -0
- package/lib/skills/builtin/rewrite-humanize/references/lexicon.md +50 -0
- package/lib/skills/builtin/scholar-evaluation/SKILL.md +300 -0
- package/lib/skills/builtin/scholar-evaluation/references/evaluation_framework.md +663 -0
- package/lib/skills/builtin/scholar-evaluation/scripts/calculate_scores.py +379 -0
- package/lib/skills/builtin/scientific-schematics/SKILL.md +603 -0
- package/lib/skills/builtin/scientific-schematics/references/QUICK_REFERENCE.md +182 -0
- package/lib/skills/builtin/scientific-schematics/references/README.md +292 -0
- package/lib/skills/builtin/scientific-schematics/references/best_practices.md +560 -0
- package/lib/skills/builtin/scientific-schematics/scripts/__pycache__/generate_schematic.cpython-312.pyc +0 -0
- package/lib/skills/builtin/scientific-schematics/scripts/__pycache__/generate_schematic_ai.cpython-312.pyc +0 -0
- package/lib/skills/builtin/scientific-schematics/scripts/example_usage.sh +85 -0
- package/lib/skills/builtin/scientific-schematics/scripts/generate_schematic.py +141 -0
- package/lib/skills/builtin/scientific-schematics/scripts/generate_schematic_ai.py +910 -0
- package/lib/skills/builtin/scientific-visualization/SKILL.md +749 -0
- package/lib/skills/builtin/scientific-visualization/assets/color_palettes.py +197 -0
- package/lib/skills/builtin/scientific-visualization/assets/nature.mplstyle +63 -0
- package/lib/skills/builtin/scientific-visualization/assets/presentation.mplstyle +61 -0
- package/lib/skills/builtin/scientific-visualization/assets/publication.mplstyle +68 -0
- package/lib/skills/builtin/scientific-visualization/references/color_palettes.md +348 -0
- package/lib/skills/builtin/scientific-visualization/references/journal_requirements.md +320 -0
- package/lib/skills/builtin/scientific-visualization/references/matplotlib_examples.md +620 -0
- package/lib/skills/builtin/scientific-visualization/references/publication_guidelines.md +205 -0
- package/lib/skills/builtin/scientific-visualization/scripts/figure_export.py +343 -0
- package/lib/skills/builtin/scientific-visualization/scripts/style_presets.py +416 -0
- package/lib/skills/builtin/scientific-writing/SKILL.md +745 -0
- package/lib/skills/builtin/scientific-writing/assets/REPORT_FORMATTING_GUIDE.md +574 -0
- package/lib/skills/builtin/scientific-writing/assets/scientific_report.sty +606 -0
- package/lib/skills/builtin/scientific-writing/assets/scientific_report_template.tex +449 -0
- package/lib/skills/builtin/scientific-writing/references/citation_styles.md +720 -0
- package/lib/skills/builtin/scientific-writing/references/figures_tables.md +806 -0
- package/lib/skills/builtin/scientific-writing/references/imrad_structure.md +686 -0
- package/lib/skills/builtin/scientific-writing/references/professional_report_formatting.md +664 -0
- package/lib/skills/builtin/scientific-writing/references/reporting_guidelines.md +748 -0
- package/lib/skills/builtin/scientific-writing/references/writing_principles.md +824 -0
- package/lib/skills/builtin/seaborn/SKILL.md +674 -0
- package/lib/skills/builtin/seaborn/references/examples.md +822 -0
- package/lib/skills/builtin/seaborn/references/function_reference.md +770 -0
- package/lib/skills/builtin/seaborn/references/objects_interface.md +964 -0
- package/lib/skills/data-analysis/SKILL.md +285 -0
- package/lib/skills/generate-skill-content.mjs +58 -0
- package/lib/skills/index.ts +34 -0
- package/lib/skills/loader.ts +452 -0
- package/package.json +62 -0
package/app/out/skills/research-pilot-default-project-skills/matplotlib/references/common_issues.md
ADDED
|
@@ -0,0 +1,563 @@
|
|
|
1
|
+
# Matplotlib Common Issues and Solutions
|
|
2
|
+
|
|
3
|
+
Troubleshooting guide for frequently encountered matplotlib problems.
|
|
4
|
+
|
|
5
|
+
## Display and Backend Issues
|
|
6
|
+
|
|
7
|
+
### Issue: Plots Not Showing
|
|
8
|
+
|
|
9
|
+
**Problem:** `plt.show()` doesn't display anything
|
|
10
|
+
|
|
11
|
+
**Solutions:**
|
|
12
|
+
```python
|
|
13
|
+
# 1. Check if backend is properly set (for interactive use)
|
|
14
|
+
import matplotlib
|
|
15
|
+
print(matplotlib.get_backend())
|
|
16
|
+
|
|
17
|
+
# 2. Try different backends
|
|
18
|
+
matplotlib.use('TkAgg') # or 'Qt5Agg', 'MacOSX'
|
|
19
|
+
import matplotlib.pyplot as plt
|
|
20
|
+
|
|
21
|
+
# 3. In Jupyter notebooks, use magic command
|
|
22
|
+
%matplotlib inline # Static images
|
|
23
|
+
# or
|
|
24
|
+
%matplotlib widget # Interactive plots
|
|
25
|
+
|
|
26
|
+
# 4. Ensure plt.show() is called
|
|
27
|
+
plt.plot([1, 2, 3])
|
|
28
|
+
plt.show()
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
### Issue: "RuntimeError: main thread is not in main loop"
|
|
32
|
+
|
|
33
|
+
**Problem:** Interactive mode issues with threading
|
|
34
|
+
|
|
35
|
+
**Solution:**
|
|
36
|
+
```python
|
|
37
|
+
# Switch to non-interactive backend
|
|
38
|
+
import matplotlib
|
|
39
|
+
matplotlib.use('Agg')
|
|
40
|
+
import matplotlib.pyplot as plt
|
|
41
|
+
|
|
42
|
+
# Or turn off interactive mode
|
|
43
|
+
plt.ioff()
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
### Issue: Figures Not Updating Interactively
|
|
47
|
+
|
|
48
|
+
**Problem:** Changes not reflected in interactive windows
|
|
49
|
+
|
|
50
|
+
**Solution:**
|
|
51
|
+
```python
|
|
52
|
+
# Enable interactive mode
|
|
53
|
+
plt.ion()
|
|
54
|
+
|
|
55
|
+
# Draw after each change
|
|
56
|
+
plt.plot(x, y)
|
|
57
|
+
plt.draw()
|
|
58
|
+
plt.pause(0.001) # Brief pause to update display
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
## Layout and Spacing Issues
|
|
62
|
+
|
|
63
|
+
### Issue: Overlapping Labels and Titles
|
|
64
|
+
|
|
65
|
+
**Problem:** Labels, titles, or tick labels overlap or get cut off
|
|
66
|
+
|
|
67
|
+
**Solutions:**
|
|
68
|
+
```python
|
|
69
|
+
# Solution 1: Constrained layout (RECOMMENDED)
|
|
70
|
+
fig, ax = plt.subplots(constrained_layout=True)
|
|
71
|
+
|
|
72
|
+
# Solution 2: Tight layout
|
|
73
|
+
fig, ax = plt.subplots()
|
|
74
|
+
plt.tight_layout()
|
|
75
|
+
|
|
76
|
+
# Solution 3: Adjust margins manually
|
|
77
|
+
plt.subplots_adjust(left=0.15, right=0.95, top=0.95, bottom=0.15)
|
|
78
|
+
|
|
79
|
+
# Solution 4: Save with bbox_inches='tight'
|
|
80
|
+
plt.savefig('figure.png', bbox_inches='tight')
|
|
81
|
+
|
|
82
|
+
# Solution 5: Rotate long tick labels
|
|
83
|
+
ax.set_xticklabels(labels, rotation=45, ha='right')
|
|
84
|
+
```
|
|
85
|
+
|
|
86
|
+
### Issue: Colorbar Affects Subplot Size
|
|
87
|
+
|
|
88
|
+
**Problem:** Adding colorbar shrinks the plot
|
|
89
|
+
|
|
90
|
+
**Solution:**
|
|
91
|
+
```python
|
|
92
|
+
# Solution 1: Use constrained layout
|
|
93
|
+
fig, ax = plt.subplots(constrained_layout=True)
|
|
94
|
+
im = ax.imshow(data)
|
|
95
|
+
plt.colorbar(im, ax=ax)
|
|
96
|
+
|
|
97
|
+
# Solution 2: Manually specify colorbar dimensions
|
|
98
|
+
from mpl_toolkits.axes_grid1 import make_axes_locatable
|
|
99
|
+
divider = make_axes_locatable(ax)
|
|
100
|
+
cax = divider.append_axes("right", size="5%", pad=0.05)
|
|
101
|
+
plt.colorbar(im, cax=cax)
|
|
102
|
+
|
|
103
|
+
# Solution 3: For multiple subplots, share colorbar
|
|
104
|
+
fig, axes = plt.subplots(1, 3, figsize=(15, 4))
|
|
105
|
+
for ax in axes:
|
|
106
|
+
im = ax.imshow(data)
|
|
107
|
+
fig.colorbar(im, ax=axes.ravel().tolist(), shrink=0.95)
|
|
108
|
+
```
|
|
109
|
+
|
|
110
|
+
### Issue: Subplots Too Close Together
|
|
111
|
+
|
|
112
|
+
**Problem:** Multiple subplots overlapping
|
|
113
|
+
|
|
114
|
+
**Solution:**
|
|
115
|
+
```python
|
|
116
|
+
# Solution 1: Use constrained_layout
|
|
117
|
+
fig, axes = plt.subplots(2, 2, constrained_layout=True)
|
|
118
|
+
|
|
119
|
+
# Solution 2: Adjust spacing with subplots_adjust
|
|
120
|
+
fig, axes = plt.subplots(2, 2)
|
|
121
|
+
plt.subplots_adjust(hspace=0.4, wspace=0.4)
|
|
122
|
+
|
|
123
|
+
# Solution 3: Specify spacing in tight_layout
|
|
124
|
+
plt.tight_layout(h_pad=2.0, w_pad=2.0)
|
|
125
|
+
```
|
|
126
|
+
|
|
127
|
+
## Memory and Performance Issues
|
|
128
|
+
|
|
129
|
+
### Issue: Memory Leak with Multiple Figures
|
|
130
|
+
|
|
131
|
+
**Problem:** Memory usage grows when creating many figures
|
|
132
|
+
|
|
133
|
+
**Solution:**
|
|
134
|
+
```python
|
|
135
|
+
# Close figures explicitly
|
|
136
|
+
fig, ax = plt.subplots()
|
|
137
|
+
ax.plot(x, y)
|
|
138
|
+
plt.savefig('plot.png')
|
|
139
|
+
plt.close(fig) # or plt.close('all')
|
|
140
|
+
|
|
141
|
+
# Clear current figure without closing
|
|
142
|
+
plt.clf()
|
|
143
|
+
|
|
144
|
+
# Clear current axes
|
|
145
|
+
plt.cla()
|
|
146
|
+
```
|
|
147
|
+
|
|
148
|
+
### Issue: Large File Sizes
|
|
149
|
+
|
|
150
|
+
**Problem:** Saved figures are too large
|
|
151
|
+
|
|
152
|
+
**Solutions:**
|
|
153
|
+
```python
|
|
154
|
+
# Solution 1: Reduce DPI
|
|
155
|
+
plt.savefig('figure.png', dpi=150) # Instead of 300
|
|
156
|
+
|
|
157
|
+
# Solution 2: Use rasterization for complex plots
|
|
158
|
+
ax.plot(x, y, rasterized=True)
|
|
159
|
+
|
|
160
|
+
# Solution 3: Use vector format for simple plots
|
|
161
|
+
plt.savefig('figure.pdf') # or .svg
|
|
162
|
+
|
|
163
|
+
# Solution 4: Compress PNG
|
|
164
|
+
plt.savefig('figure.png', dpi=300, optimize=True)
|
|
165
|
+
```
|
|
166
|
+
|
|
167
|
+
### Issue: Slow Plotting with Large Datasets
|
|
168
|
+
|
|
169
|
+
**Problem:** Plotting takes too long with many points
|
|
170
|
+
|
|
171
|
+
**Solutions:**
|
|
172
|
+
```python
|
|
173
|
+
# Solution 1: Downsample data
|
|
174
|
+
from scipy.signal import decimate
|
|
175
|
+
y_downsampled = decimate(y, 10) # Keep every 10th point
|
|
176
|
+
|
|
177
|
+
# Solution 2: Use rasterization
|
|
178
|
+
ax.plot(x, y, rasterized=True)
|
|
179
|
+
|
|
180
|
+
# Solution 3: Use line simplification
|
|
181
|
+
ax.plot(x, y)
|
|
182
|
+
for line in ax.get_lines():
|
|
183
|
+
line.set_rasterized(True)
|
|
184
|
+
|
|
185
|
+
# Solution 4: For scatter plots, consider hexbin or 2d histogram
|
|
186
|
+
ax.hexbin(x, y, gridsize=50, cmap='viridis')
|
|
187
|
+
```
|
|
188
|
+
|
|
189
|
+
## Font and Text Issues
|
|
190
|
+
|
|
191
|
+
### Issue: Font Warnings
|
|
192
|
+
|
|
193
|
+
**Problem:** "findfont: Font family [...] not found"
|
|
194
|
+
|
|
195
|
+
**Solutions:**
|
|
196
|
+
```python
|
|
197
|
+
# Solution 1: Use available fonts
|
|
198
|
+
from matplotlib.font_manager import findfont, FontProperties
|
|
199
|
+
print(findfont(FontProperties(family='sans-serif')))
|
|
200
|
+
|
|
201
|
+
# Solution 2: Rebuild font cache
|
|
202
|
+
import matplotlib.font_manager
|
|
203
|
+
matplotlib.font_manager._rebuild()
|
|
204
|
+
|
|
205
|
+
# Solution 3: Suppress warnings
|
|
206
|
+
import warnings
|
|
207
|
+
warnings.filterwarnings("ignore", category=UserWarning)
|
|
208
|
+
|
|
209
|
+
# Solution 4: Specify fallback fonts
|
|
210
|
+
plt.rcParams['font.sans-serif'] = ['Arial', 'DejaVu Sans', 'sans-serif']
|
|
211
|
+
```
|
|
212
|
+
|
|
213
|
+
### Issue: LaTeX Rendering Errors
|
|
214
|
+
|
|
215
|
+
**Problem:** Math text not rendering correctly
|
|
216
|
+
|
|
217
|
+
**Solutions:**
|
|
218
|
+
```python
|
|
219
|
+
# Solution 1: Use raw strings with r prefix
|
|
220
|
+
ax.set_xlabel(r'$\alpha$') # Not '\alpha'
|
|
221
|
+
|
|
222
|
+
# Solution 2: Escape backslashes in regular strings
|
|
223
|
+
ax.set_xlabel('$\\alpha$')
|
|
224
|
+
|
|
225
|
+
# Solution 3: Disable LaTeX if not installed
|
|
226
|
+
plt.rcParams['text.usetex'] = False
|
|
227
|
+
|
|
228
|
+
# Solution 4: Use mathtext instead of full LaTeX
|
|
229
|
+
# Mathtext is always available, no LaTeX installation needed
|
|
230
|
+
ax.text(x, y, r'$\int_0^\infty e^{-x} dx$')
|
|
231
|
+
```
|
|
232
|
+
|
|
233
|
+
### Issue: Text Cut Off or Outside Figure
|
|
234
|
+
|
|
235
|
+
**Problem:** Labels or annotations appear outside figure bounds
|
|
236
|
+
|
|
237
|
+
**Solutions:**
|
|
238
|
+
```python
|
|
239
|
+
# Solution 1: Use bbox_inches='tight'
|
|
240
|
+
plt.savefig('figure.png', bbox_inches='tight')
|
|
241
|
+
|
|
242
|
+
# Solution 2: Adjust figure bounds
|
|
243
|
+
plt.subplots_adjust(left=0.15, right=0.85, top=0.85, bottom=0.15)
|
|
244
|
+
|
|
245
|
+
# Solution 3: Clip text to axes
|
|
246
|
+
ax.text(x, y, 'text', clip_on=True)
|
|
247
|
+
|
|
248
|
+
# Solution 4: Use constrained_layout
|
|
249
|
+
fig, ax = plt.subplots(constrained_layout=True)
|
|
250
|
+
```
|
|
251
|
+
|
|
252
|
+
## Color and Colormap Issues
|
|
253
|
+
|
|
254
|
+
### Issue: Colorbar Not Matching Plot
|
|
255
|
+
|
|
256
|
+
**Problem:** Colorbar shows different range than data
|
|
257
|
+
|
|
258
|
+
**Solution:**
|
|
259
|
+
```python
|
|
260
|
+
# Explicitly set vmin and vmax
|
|
261
|
+
im = ax.imshow(data, vmin=0, vmax=1, cmap='viridis')
|
|
262
|
+
plt.colorbar(im, ax=ax)
|
|
263
|
+
|
|
264
|
+
# Or use the same norm for multiple plots
|
|
265
|
+
import matplotlib.colors as mcolors
|
|
266
|
+
norm = mcolors.Normalize(vmin=data.min(), vmax=data.max())
|
|
267
|
+
im1 = ax1.imshow(data1, norm=norm, cmap='viridis')
|
|
268
|
+
im2 = ax2.imshow(data2, norm=norm, cmap='viridis')
|
|
269
|
+
```
|
|
270
|
+
|
|
271
|
+
### Issue: Colors Look Wrong
|
|
272
|
+
|
|
273
|
+
**Problem:** Unexpected colors in plots
|
|
274
|
+
|
|
275
|
+
**Solutions:**
|
|
276
|
+
```python
|
|
277
|
+
# Solution 1: Check color specification format
|
|
278
|
+
ax.plot(x, y, color='blue') # Correct
|
|
279
|
+
ax.plot(x, y, color=(0, 0, 1)) # Correct RGB
|
|
280
|
+
ax.plot(x, y, color='#0000FF') # Correct hex
|
|
281
|
+
|
|
282
|
+
# Solution 2: Verify colormap exists
|
|
283
|
+
print(plt.colormaps()) # List available colormaps
|
|
284
|
+
|
|
285
|
+
# Solution 3: For scatter plots, ensure c shape matches
|
|
286
|
+
ax.scatter(x, y, c=colors) # colors should have same length as x, y
|
|
287
|
+
|
|
288
|
+
# Solution 4: Check if alpha is set correctly
|
|
289
|
+
ax.plot(x, y, alpha=1.0) # 0=transparent, 1=opaque
|
|
290
|
+
```
|
|
291
|
+
|
|
292
|
+
### Issue: Reversed Colormap
|
|
293
|
+
|
|
294
|
+
**Problem:** Colormap direction is backwards
|
|
295
|
+
|
|
296
|
+
**Solution:**
|
|
297
|
+
```python
|
|
298
|
+
# Add _r suffix to reverse any colormap
|
|
299
|
+
ax.imshow(data, cmap='viridis_r')
|
|
300
|
+
```
|
|
301
|
+
|
|
302
|
+
## Axis and Scale Issues
|
|
303
|
+
|
|
304
|
+
### Issue: Axis Limits Not Working
|
|
305
|
+
|
|
306
|
+
**Problem:** `set_xlim` or `set_ylim` not taking effect
|
|
307
|
+
|
|
308
|
+
**Solutions:**
|
|
309
|
+
```python
|
|
310
|
+
# Solution 1: Set after plotting
|
|
311
|
+
ax.plot(x, y)
|
|
312
|
+
ax.set_xlim(0, 10)
|
|
313
|
+
ax.set_ylim(-1, 1)
|
|
314
|
+
|
|
315
|
+
# Solution 2: Disable autoscaling
|
|
316
|
+
ax.autoscale(False)
|
|
317
|
+
ax.set_xlim(0, 10)
|
|
318
|
+
|
|
319
|
+
# Solution 3: Use axis method
|
|
320
|
+
ax.axis([xmin, xmax, ymin, ymax])
|
|
321
|
+
```
|
|
322
|
+
|
|
323
|
+
### Issue: Log Scale with Zero or Negative Values
|
|
324
|
+
|
|
325
|
+
**Problem:** ValueError when using log scale with data ≤ 0
|
|
326
|
+
|
|
327
|
+
**Solutions:**
|
|
328
|
+
```python
|
|
329
|
+
# Solution 1: Filter out non-positive values
|
|
330
|
+
mask = (data > 0)
|
|
331
|
+
ax.plot(x[mask], data[mask])
|
|
332
|
+
ax.set_yscale('log')
|
|
333
|
+
|
|
334
|
+
# Solution 2: Use symlog for data with positive and negative values
|
|
335
|
+
ax.set_yscale('symlog')
|
|
336
|
+
|
|
337
|
+
# Solution 3: Add small offset
|
|
338
|
+
ax.plot(x, data + 1e-10)
|
|
339
|
+
ax.set_yscale('log')
|
|
340
|
+
```
|
|
341
|
+
|
|
342
|
+
### Issue: Dates Not Displaying Correctly
|
|
343
|
+
|
|
344
|
+
**Problem:** Date axis shows numbers instead of dates
|
|
345
|
+
|
|
346
|
+
**Solution:**
|
|
347
|
+
```python
|
|
348
|
+
import matplotlib.dates as mdates
|
|
349
|
+
import pandas as pd
|
|
350
|
+
|
|
351
|
+
# Convert to datetime if needed
|
|
352
|
+
dates = pd.to_datetime(date_strings)
|
|
353
|
+
|
|
354
|
+
ax.plot(dates, values)
|
|
355
|
+
|
|
356
|
+
# Format date axis
|
|
357
|
+
ax.xaxis.set_major_formatter(mdates.DateFormatter('%Y-%m-%d'))
|
|
358
|
+
ax.xaxis.set_major_locator(mdates.DayLocator(interval=7))
|
|
359
|
+
plt.xticks(rotation=45)
|
|
360
|
+
```
|
|
361
|
+
|
|
362
|
+
## Legend Issues
|
|
363
|
+
|
|
364
|
+
### Issue: Legend Covers Data
|
|
365
|
+
|
|
366
|
+
**Problem:** Legend obscures important parts of plot
|
|
367
|
+
|
|
368
|
+
**Solutions:**
|
|
369
|
+
```python
|
|
370
|
+
# Solution 1: Use 'best' location
|
|
371
|
+
ax.legend(loc='best')
|
|
372
|
+
|
|
373
|
+
# Solution 2: Place outside plot area
|
|
374
|
+
ax.legend(bbox_to_anchor=(1.05, 1), loc='upper left')
|
|
375
|
+
|
|
376
|
+
# Solution 3: Make legend semi-transparent
|
|
377
|
+
ax.legend(framealpha=0.7)
|
|
378
|
+
|
|
379
|
+
# Solution 4: Put legend below plot
|
|
380
|
+
ax.legend(bbox_to_anchor=(0.5, -0.15), loc='upper center', ncol=3)
|
|
381
|
+
```
|
|
382
|
+
|
|
383
|
+
### Issue: Too Many Items in Legend
|
|
384
|
+
|
|
385
|
+
**Problem:** Legend is cluttered with many entries
|
|
386
|
+
|
|
387
|
+
**Solutions:**
|
|
388
|
+
```python
|
|
389
|
+
# Solution 1: Only label selected items
|
|
390
|
+
for i, (x, y) in enumerate(data):
|
|
391
|
+
label = f'Data {i}' if i % 5 == 0 else None
|
|
392
|
+
ax.plot(x, y, label=label)
|
|
393
|
+
|
|
394
|
+
# Solution 2: Use multiple columns
|
|
395
|
+
ax.legend(ncol=3)
|
|
396
|
+
|
|
397
|
+
# Solution 3: Create custom legend with fewer entries
|
|
398
|
+
from matplotlib.lines import Line2D
|
|
399
|
+
custom_lines = [Line2D([0], [0], color='r'),
|
|
400
|
+
Line2D([0], [0], color='b')]
|
|
401
|
+
ax.legend(custom_lines, ['Category A', 'Category B'])
|
|
402
|
+
|
|
403
|
+
# Solution 4: Use separate legend figure
|
|
404
|
+
fig_leg = plt.figure(figsize=(3, 2))
|
|
405
|
+
ax_leg = fig_leg.add_subplot(111)
|
|
406
|
+
ax_leg.legend(*ax.get_legend_handles_labels(), loc='center')
|
|
407
|
+
ax_leg.axis('off')
|
|
408
|
+
```
|
|
409
|
+
|
|
410
|
+
## 3D Plot Issues
|
|
411
|
+
|
|
412
|
+
### Issue: 3D Plots Look Flat
|
|
413
|
+
|
|
414
|
+
**Problem:** Difficult to perceive depth in 3D plots
|
|
415
|
+
|
|
416
|
+
**Solutions:**
|
|
417
|
+
```python
|
|
418
|
+
# Solution 1: Adjust viewing angle
|
|
419
|
+
ax.view_init(elev=30, azim=45)
|
|
420
|
+
|
|
421
|
+
# Solution 2: Add gridlines
|
|
422
|
+
ax.grid(True)
|
|
423
|
+
|
|
424
|
+
# Solution 3: Use color for depth
|
|
425
|
+
scatter = ax.scatter(x, y, z, c=z, cmap='viridis')
|
|
426
|
+
|
|
427
|
+
# Solution 4: Rotate interactively (if using interactive backend)
|
|
428
|
+
# User can click and drag to rotate
|
|
429
|
+
```
|
|
430
|
+
|
|
431
|
+
### Issue: 3D Axis Labels Cut Off
|
|
432
|
+
|
|
433
|
+
**Problem:** 3D axis labels appear outside figure
|
|
434
|
+
|
|
435
|
+
**Solution:**
|
|
436
|
+
```python
|
|
437
|
+
from mpl_toolkits.mplot3d import Axes3D
|
|
438
|
+
|
|
439
|
+
fig = plt.figure(figsize=(10, 8))
|
|
440
|
+
ax = fig.add_subplot(111, projection='3d')
|
|
441
|
+
ax.plot_surface(X, Y, Z)
|
|
442
|
+
|
|
443
|
+
# Add padding
|
|
444
|
+
fig.tight_layout(pad=3.0)
|
|
445
|
+
|
|
446
|
+
# Or save with tight bounding box
|
|
447
|
+
plt.savefig('3d_plot.png', bbox_inches='tight', pad_inches=0.5)
|
|
448
|
+
```
|
|
449
|
+
|
|
450
|
+
## Image and Colorbar Issues
|
|
451
|
+
|
|
452
|
+
### Issue: Images Appear Flipped
|
|
453
|
+
|
|
454
|
+
**Problem:** Image orientation is wrong
|
|
455
|
+
|
|
456
|
+
**Solution:**
|
|
457
|
+
```python
|
|
458
|
+
# Set origin parameter
|
|
459
|
+
ax.imshow(img, origin='lower') # or 'upper' (default)
|
|
460
|
+
|
|
461
|
+
# Or flip array
|
|
462
|
+
ax.imshow(np.flipud(img))
|
|
463
|
+
```
|
|
464
|
+
|
|
465
|
+
### Issue: Images Look Pixelated
|
|
466
|
+
|
|
467
|
+
**Problem:** Image appears blocky when zoomed
|
|
468
|
+
|
|
469
|
+
**Solutions:**
|
|
470
|
+
```python
|
|
471
|
+
# Solution 1: Use interpolation
|
|
472
|
+
ax.imshow(img, interpolation='bilinear')
|
|
473
|
+
# Options: 'nearest', 'bilinear', 'bicubic', 'spline16', 'spline36', etc.
|
|
474
|
+
|
|
475
|
+
# Solution 2: Increase DPI when saving
|
|
476
|
+
plt.savefig('figure.png', dpi=300)
|
|
477
|
+
|
|
478
|
+
# Solution 3: Use vector format if appropriate
|
|
479
|
+
plt.savefig('figure.pdf')
|
|
480
|
+
```
|
|
481
|
+
|
|
482
|
+
## Common Errors and Fixes
|
|
483
|
+
|
|
484
|
+
### "TypeError: 'AxesSubplot' object is not subscriptable"
|
|
485
|
+
|
|
486
|
+
**Problem:** Trying to index single axes
|
|
487
|
+
```python
|
|
488
|
+
# Wrong
|
|
489
|
+
fig, ax = plt.subplots()
|
|
490
|
+
ax[0].plot(x, y) # Error!
|
|
491
|
+
|
|
492
|
+
# Correct
|
|
493
|
+
fig, ax = plt.subplots()
|
|
494
|
+
ax.plot(x, y)
|
|
495
|
+
```
|
|
496
|
+
|
|
497
|
+
### "ValueError: x and y must have same first dimension"
|
|
498
|
+
|
|
499
|
+
**Problem:** Data arrays have mismatched lengths
|
|
500
|
+
```python
|
|
501
|
+
# Check shapes
|
|
502
|
+
print(f"x shape: {x.shape}, y shape: {y.shape}")
|
|
503
|
+
|
|
504
|
+
# Ensure they match
|
|
505
|
+
assert len(x) == len(y), "x and y must have same length"
|
|
506
|
+
```
|
|
507
|
+
|
|
508
|
+
### "AttributeError: 'numpy.ndarray' object has no attribute 'plot'"
|
|
509
|
+
|
|
510
|
+
**Problem:** Calling plot on array instead of axes
|
|
511
|
+
```python
|
|
512
|
+
# Wrong
|
|
513
|
+
data.plot(x, y)
|
|
514
|
+
|
|
515
|
+
# Correct
|
|
516
|
+
ax.plot(x, y)
|
|
517
|
+
# or for pandas
|
|
518
|
+
data.plot(ax=ax)
|
|
519
|
+
```
|
|
520
|
+
|
|
521
|
+
## Best Practices to Avoid Issues
|
|
522
|
+
|
|
523
|
+
1. **Always use the OO interface** - Avoid pyplot state machine
|
|
524
|
+
```python
|
|
525
|
+
fig, ax = plt.subplots() # Good
|
|
526
|
+
ax.plot(x, y)
|
|
527
|
+
```
|
|
528
|
+
|
|
529
|
+
2. **Use constrained_layout** - Prevents overlap issues
|
|
530
|
+
```python
|
|
531
|
+
fig, ax = plt.subplots(constrained_layout=True)
|
|
532
|
+
```
|
|
533
|
+
|
|
534
|
+
3. **Close figures explicitly** - Prevents memory leaks
|
|
535
|
+
```python
|
|
536
|
+
plt.close(fig)
|
|
537
|
+
```
|
|
538
|
+
|
|
539
|
+
4. **Set figure size at creation** - Better than resizing later
|
|
540
|
+
```python
|
|
541
|
+
fig, ax = plt.subplots(figsize=(10, 6))
|
|
542
|
+
```
|
|
543
|
+
|
|
544
|
+
5. **Use raw strings for math text** - Avoids escape issues
|
|
545
|
+
```python
|
|
546
|
+
ax.set_xlabel(r'$\alpha$')
|
|
547
|
+
```
|
|
548
|
+
|
|
549
|
+
6. **Check data shapes before plotting** - Catch size mismatches early
|
|
550
|
+
```python
|
|
551
|
+
assert len(x) == len(y)
|
|
552
|
+
```
|
|
553
|
+
|
|
554
|
+
7. **Use appropriate DPI** - 300 for print, 150 for web
|
|
555
|
+
```python
|
|
556
|
+
plt.savefig('figure.png', dpi=300)
|
|
557
|
+
```
|
|
558
|
+
|
|
559
|
+
8. **Test with different backends** - If display issues occur
|
|
560
|
+
```python
|
|
561
|
+
import matplotlib
|
|
562
|
+
matplotlib.use('TkAgg')
|
|
563
|
+
```
|