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
|
@@ -0,0 +1,620 @@
|
|
|
1
|
+
# Publication-Ready Matplotlib Examples
|
|
2
|
+
|
|
3
|
+
## Overview
|
|
4
|
+
|
|
5
|
+
This reference provides practical code examples for creating publication-ready scientific figures using Matplotlib, Seaborn, and Plotly. All examples follow best practices from `publication_guidelines.md` and use colorblind-friendly palettes from `color_palettes.md`.
|
|
6
|
+
|
|
7
|
+
## Setup and Configuration
|
|
8
|
+
|
|
9
|
+
### Publication-Quality Matplotlib Configuration
|
|
10
|
+
|
|
11
|
+
```python
|
|
12
|
+
import matplotlib.pyplot as plt
|
|
13
|
+
import matplotlib as mpl
|
|
14
|
+
import numpy as np
|
|
15
|
+
|
|
16
|
+
# Set publication quality parameters
|
|
17
|
+
mpl.rcParams['figure.dpi'] = 300
|
|
18
|
+
mpl.rcParams['savefig.dpi'] = 300
|
|
19
|
+
mpl.rcParams['font.size'] = 8
|
|
20
|
+
mpl.rcParams['font.family'] = 'sans-serif'
|
|
21
|
+
mpl.rcParams['font.sans-serif'] = ['Arial', 'Helvetica']
|
|
22
|
+
mpl.rcParams['axes.labelsize'] = 9
|
|
23
|
+
mpl.rcParams['axes.titlesize'] = 9
|
|
24
|
+
mpl.rcParams['xtick.labelsize'] = 7
|
|
25
|
+
mpl.rcParams['ytick.labelsize'] = 7
|
|
26
|
+
mpl.rcParams['legend.fontsize'] = 7
|
|
27
|
+
mpl.rcParams['axes.linewidth'] = 0.5
|
|
28
|
+
mpl.rcParams['xtick.major.width'] = 0.5
|
|
29
|
+
mpl.rcParams['ytick.major.width'] = 0.5
|
|
30
|
+
mpl.rcParams['lines.linewidth'] = 1.5
|
|
31
|
+
|
|
32
|
+
# Use colorblind-friendly colors (Okabe-Ito palette)
|
|
33
|
+
okabe_ito = ['#E69F00', '#56B4E9', '#009E73', '#F0E442',
|
|
34
|
+
'#0072B2', '#D55E00', '#CC79A7', '#000000']
|
|
35
|
+
mpl.rcParams['axes.prop_cycle'] = mpl.cycler(color=okabe_ito)
|
|
36
|
+
|
|
37
|
+
# Use perceptually uniform colormap
|
|
38
|
+
mpl.rcParams['image.cmap'] = 'viridis'
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
### Helper Function for Saving
|
|
42
|
+
|
|
43
|
+
```python
|
|
44
|
+
def save_publication_figure(fig, filename, formats=['pdf', 'png'], dpi=300):
|
|
45
|
+
"""
|
|
46
|
+
Save figure in multiple formats for publication.
|
|
47
|
+
|
|
48
|
+
Parameters:
|
|
49
|
+
-----------
|
|
50
|
+
fig : matplotlib.figure.Figure
|
|
51
|
+
Figure to save
|
|
52
|
+
filename : str
|
|
53
|
+
Base filename (without extension)
|
|
54
|
+
formats : list
|
|
55
|
+
List of file formats to save ['pdf', 'png', 'eps', 'svg']
|
|
56
|
+
dpi : int
|
|
57
|
+
Resolution for raster formats
|
|
58
|
+
"""
|
|
59
|
+
for fmt in formats:
|
|
60
|
+
output_file = f"{filename}.{fmt}"
|
|
61
|
+
fig.savefig(output_file, dpi=dpi, bbox_inches='tight',
|
|
62
|
+
facecolor='white', edgecolor='none',
|
|
63
|
+
transparent=False, format=fmt)
|
|
64
|
+
print(f"Saved: {output_file}")
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
## Example 1: Line Plot with Error Bars
|
|
68
|
+
|
|
69
|
+
```python
|
|
70
|
+
import matplotlib.pyplot as plt
|
|
71
|
+
import numpy as np
|
|
72
|
+
|
|
73
|
+
# Generate sample data
|
|
74
|
+
x = np.linspace(0, 10, 50)
|
|
75
|
+
y1 = 2 * x + 1 + np.random.normal(0, 1, 50)
|
|
76
|
+
y2 = 1.5 * x + 2 + np.random.normal(0, 1.2, 50)
|
|
77
|
+
|
|
78
|
+
# Calculate means and standard errors for binned data
|
|
79
|
+
bins = np.linspace(0, 10, 11)
|
|
80
|
+
y1_mean = [y1[(x >= bins[i]) & (x < bins[i+1])].mean() for i in range(len(bins)-1)]
|
|
81
|
+
y1_sem = [y1[(x >= bins[i]) & (x < bins[i+1])].std() /
|
|
82
|
+
np.sqrt(len(y1[(x >= bins[i]) & (x < bins[i+1])]))
|
|
83
|
+
for i in range(len(bins)-1)]
|
|
84
|
+
x_binned = (bins[:-1] + bins[1:]) / 2
|
|
85
|
+
|
|
86
|
+
# Create figure with appropriate size (single column width = 3.5 inches)
|
|
87
|
+
fig, ax = plt.subplots(figsize=(3.5, 2.5))
|
|
88
|
+
|
|
89
|
+
# Plot with error bars
|
|
90
|
+
ax.errorbar(x_binned, y1_mean, yerr=y1_sem,
|
|
91
|
+
marker='o', markersize=4, capsize=3, capthick=0.5,
|
|
92
|
+
label='Condition A', linewidth=1.5)
|
|
93
|
+
|
|
94
|
+
# Add labels with units
|
|
95
|
+
ax.set_xlabel('Time (hours)')
|
|
96
|
+
ax.set_ylabel('Fluorescence intensity (a.u.)')
|
|
97
|
+
|
|
98
|
+
# Add legend
|
|
99
|
+
ax.legend(frameon=False, loc='upper left')
|
|
100
|
+
|
|
101
|
+
# Remove top and right spines
|
|
102
|
+
ax.spines['top'].set_visible(False)
|
|
103
|
+
ax.spines['right'].set_visible(False)
|
|
104
|
+
|
|
105
|
+
# Tight layout
|
|
106
|
+
fig.tight_layout()
|
|
107
|
+
|
|
108
|
+
# Save
|
|
109
|
+
save_publication_figure(fig, 'line_plot_with_errors')
|
|
110
|
+
plt.show()
|
|
111
|
+
```
|
|
112
|
+
|
|
113
|
+
## Example 2: Multi-Panel Figure
|
|
114
|
+
|
|
115
|
+
```python
|
|
116
|
+
import matplotlib.pyplot as plt
|
|
117
|
+
import numpy as np
|
|
118
|
+
from string import ascii_uppercase
|
|
119
|
+
|
|
120
|
+
# Create figure with multiple panels (double column width = 7 inches)
|
|
121
|
+
fig = plt.figure(figsize=(7, 4))
|
|
122
|
+
|
|
123
|
+
# Define grid for panels
|
|
124
|
+
gs = fig.add_gridspec(2, 3, hspace=0.4, wspace=0.4,
|
|
125
|
+
left=0.08, right=0.98, top=0.95, bottom=0.08)
|
|
126
|
+
|
|
127
|
+
# Panel A: Line plot
|
|
128
|
+
ax_a = fig.add_subplot(gs[0, :2])
|
|
129
|
+
x = np.linspace(0, 10, 100)
|
|
130
|
+
for i, offset in enumerate([0, 0.5, 1.0]):
|
|
131
|
+
ax_a.plot(x, np.sin(x) + offset, label=f'Dataset {i+1}')
|
|
132
|
+
ax_a.set_xlabel('Time (s)')
|
|
133
|
+
ax_a.set_ylabel('Amplitude (V)')
|
|
134
|
+
ax_a.legend(frameon=False, fontsize=6)
|
|
135
|
+
ax_a.spines['top'].set_visible(False)
|
|
136
|
+
ax_a.spines['right'].set_visible(False)
|
|
137
|
+
|
|
138
|
+
# Panel B: Bar plot
|
|
139
|
+
ax_b = fig.add_subplot(gs[0, 2])
|
|
140
|
+
categories = ['Control', 'Treatment\nA', 'Treatment\nB']
|
|
141
|
+
values = [100, 125, 140]
|
|
142
|
+
errors = [5, 8, 6]
|
|
143
|
+
ax_b.bar(categories, values, yerr=errors, capsize=3,
|
|
144
|
+
color=['#0072B2', '#E69F00', '#009E73'], alpha=0.8)
|
|
145
|
+
ax_b.set_ylabel('Response (%)')
|
|
146
|
+
ax_b.spines['top'].set_visible(False)
|
|
147
|
+
ax_b.spines['right'].set_visible(False)
|
|
148
|
+
ax_b.set_ylim(0, 160)
|
|
149
|
+
|
|
150
|
+
# Panel C: Scatter plot
|
|
151
|
+
ax_c = fig.add_subplot(gs[1, 0])
|
|
152
|
+
x = np.random.randn(100)
|
|
153
|
+
y = 2*x + np.random.randn(100)
|
|
154
|
+
ax_c.scatter(x, y, s=10, alpha=0.6, color='#0072B2')
|
|
155
|
+
ax_c.set_xlabel('Variable X')
|
|
156
|
+
ax_c.set_ylabel('Variable Y')
|
|
157
|
+
ax_c.spines['top'].set_visible(False)
|
|
158
|
+
ax_c.spines['right'].set_visible(False)
|
|
159
|
+
|
|
160
|
+
# Panel D: Heatmap
|
|
161
|
+
ax_d = fig.add_subplot(gs[1, 1:])
|
|
162
|
+
data = np.random.randn(10, 20)
|
|
163
|
+
im = ax_d.imshow(data, cmap='viridis', aspect='auto')
|
|
164
|
+
ax_d.set_xlabel('Sample number')
|
|
165
|
+
ax_d.set_ylabel('Feature')
|
|
166
|
+
cbar = plt.colorbar(im, ax=ax_d, fraction=0.046, pad=0.04)
|
|
167
|
+
cbar.set_label('Intensity (a.u.)', rotation=270, labelpad=12)
|
|
168
|
+
|
|
169
|
+
# Add panel labels
|
|
170
|
+
panels = [ax_a, ax_b, ax_c, ax_d]
|
|
171
|
+
for i, ax in enumerate(panels):
|
|
172
|
+
ax.text(-0.15, 1.05, ascii_uppercase[i], transform=ax.transAxes,
|
|
173
|
+
fontsize=10, fontweight='bold', va='top')
|
|
174
|
+
|
|
175
|
+
save_publication_figure(fig, 'multi_panel_figure')
|
|
176
|
+
plt.show()
|
|
177
|
+
```
|
|
178
|
+
|
|
179
|
+
## Example 3: Box Plot with Individual Points
|
|
180
|
+
|
|
181
|
+
```python
|
|
182
|
+
import matplotlib.pyplot as plt
|
|
183
|
+
import numpy as np
|
|
184
|
+
|
|
185
|
+
# Generate sample data
|
|
186
|
+
np.random.seed(42)
|
|
187
|
+
data = [np.random.normal(100, 15, 30),
|
|
188
|
+
np.random.normal(120, 20, 30),
|
|
189
|
+
np.random.normal(140, 18, 30),
|
|
190
|
+
np.random.normal(110, 22, 30)]
|
|
191
|
+
|
|
192
|
+
fig, ax = plt.subplots(figsize=(3.5, 3))
|
|
193
|
+
|
|
194
|
+
# Create box plot
|
|
195
|
+
bp = ax.boxplot(data, widths=0.5, patch_artist=True,
|
|
196
|
+
showfliers=False, # We'll add points manually
|
|
197
|
+
boxprops=dict(facecolor='lightgray', edgecolor='black', linewidth=0.8),
|
|
198
|
+
medianprops=dict(color='black', linewidth=1.5),
|
|
199
|
+
whiskerprops=dict(linewidth=0.8),
|
|
200
|
+
capprops=dict(linewidth=0.8))
|
|
201
|
+
|
|
202
|
+
# Overlay individual points
|
|
203
|
+
colors = ['#0072B2', '#E69F00', '#009E73', '#D55E00']
|
|
204
|
+
for i, (d, color) in enumerate(zip(data, colors)):
|
|
205
|
+
# Add jitter to x positions
|
|
206
|
+
x = np.random.normal(i+1, 0.04, size=len(d))
|
|
207
|
+
ax.scatter(x, d, alpha=0.4, s=8, color=color)
|
|
208
|
+
|
|
209
|
+
# Customize
|
|
210
|
+
ax.set_xticklabels(['Control', 'Treatment A', 'Treatment B', 'Treatment C'])
|
|
211
|
+
ax.set_ylabel('Cell count')
|
|
212
|
+
ax.spines['top'].set_visible(False)
|
|
213
|
+
ax.spines['right'].set_visible(False)
|
|
214
|
+
ax.set_ylim(50, 200)
|
|
215
|
+
|
|
216
|
+
fig.tight_layout()
|
|
217
|
+
save_publication_figure(fig, 'boxplot_with_points')
|
|
218
|
+
plt.show()
|
|
219
|
+
```
|
|
220
|
+
|
|
221
|
+
## Example 4: Heatmap with Colorbar
|
|
222
|
+
|
|
223
|
+
```python
|
|
224
|
+
import matplotlib.pyplot as plt
|
|
225
|
+
import numpy as np
|
|
226
|
+
|
|
227
|
+
# Generate correlation matrix
|
|
228
|
+
np.random.seed(42)
|
|
229
|
+
n = 10
|
|
230
|
+
A = np.random.randn(n, n)
|
|
231
|
+
corr_matrix = np.corrcoef(A)
|
|
232
|
+
|
|
233
|
+
# Create figure
|
|
234
|
+
fig, ax = plt.subplots(figsize=(4, 3.5))
|
|
235
|
+
|
|
236
|
+
# Plot heatmap
|
|
237
|
+
im = ax.imshow(corr_matrix, cmap='RdBu_r', vmin=-1, vmax=1, aspect='auto')
|
|
238
|
+
|
|
239
|
+
# Add colorbar
|
|
240
|
+
cbar = plt.colorbar(im, ax=ax, fraction=0.046, pad=0.04)
|
|
241
|
+
cbar.set_label('Correlation coefficient', rotation=270, labelpad=15)
|
|
242
|
+
|
|
243
|
+
# Set ticks and labels
|
|
244
|
+
gene_names = [f'Gene{i+1}' for i in range(n)]
|
|
245
|
+
ax.set_xticks(np.arange(n))
|
|
246
|
+
ax.set_yticks(np.arange(n))
|
|
247
|
+
ax.set_xticklabels(gene_names, rotation=45, ha='right')
|
|
248
|
+
ax.set_yticklabels(gene_names)
|
|
249
|
+
|
|
250
|
+
# Add grid
|
|
251
|
+
ax.set_xticks(np.arange(n)-.5, minor=True)
|
|
252
|
+
ax.set_yticks(np.arange(n)-.5, minor=True)
|
|
253
|
+
ax.grid(which='minor', color='white', linestyle='-', linewidth=0.5)
|
|
254
|
+
|
|
255
|
+
fig.tight_layout()
|
|
256
|
+
save_publication_figure(fig, 'correlation_heatmap')
|
|
257
|
+
plt.show()
|
|
258
|
+
```
|
|
259
|
+
|
|
260
|
+
## Example 5: Seaborn Violin Plot
|
|
261
|
+
|
|
262
|
+
```python
|
|
263
|
+
import matplotlib.pyplot as plt
|
|
264
|
+
import seaborn as sns
|
|
265
|
+
import pandas as pd
|
|
266
|
+
import numpy as np
|
|
267
|
+
|
|
268
|
+
# Generate sample data
|
|
269
|
+
np.random.seed(42)
|
|
270
|
+
data = pd.DataFrame({
|
|
271
|
+
'condition': np.repeat(['Control', 'Drug A', 'Drug B'], 50),
|
|
272
|
+
'value': np.concatenate([
|
|
273
|
+
np.random.normal(100, 15, 50),
|
|
274
|
+
np.random.normal(120, 20, 50),
|
|
275
|
+
np.random.normal(140, 18, 50)
|
|
276
|
+
])
|
|
277
|
+
})
|
|
278
|
+
|
|
279
|
+
# Set style
|
|
280
|
+
sns.set_style('ticks')
|
|
281
|
+
sns.set_palette(['#0072B2', '#E69F00', '#009E73'])
|
|
282
|
+
|
|
283
|
+
fig, ax = plt.subplots(figsize=(3.5, 3))
|
|
284
|
+
|
|
285
|
+
# Create violin plot
|
|
286
|
+
sns.violinplot(data=data, x='condition', y='value', ax=ax,
|
|
287
|
+
inner='box', linewidth=0.8)
|
|
288
|
+
|
|
289
|
+
# Add strip plot
|
|
290
|
+
sns.stripplot(data=data, x='condition', y='value', ax=ax,
|
|
291
|
+
size=2, alpha=0.3, color='black')
|
|
292
|
+
|
|
293
|
+
# Customize
|
|
294
|
+
ax.set_xlabel('')
|
|
295
|
+
ax.set_ylabel('Expression level (AU)')
|
|
296
|
+
ax.spines['top'].set_visible(False)
|
|
297
|
+
ax.spines['right'].set_visible(False)
|
|
298
|
+
|
|
299
|
+
fig.tight_layout()
|
|
300
|
+
save_publication_figure(fig, 'violin_plot')
|
|
301
|
+
plt.show()
|
|
302
|
+
```
|
|
303
|
+
|
|
304
|
+
## Example 6: Scientific Scatter with Regression
|
|
305
|
+
|
|
306
|
+
```python
|
|
307
|
+
import matplotlib.pyplot as plt
|
|
308
|
+
import numpy as np
|
|
309
|
+
from scipy import stats
|
|
310
|
+
|
|
311
|
+
# Generate data with correlation
|
|
312
|
+
np.random.seed(42)
|
|
313
|
+
x = np.random.randn(100)
|
|
314
|
+
y = 2.5 * x + np.random.randn(100) * 0.8
|
|
315
|
+
|
|
316
|
+
# Calculate regression
|
|
317
|
+
slope, intercept, r_value, p_value, std_err = stats.linregress(x, y)
|
|
318
|
+
|
|
319
|
+
# Create figure
|
|
320
|
+
fig, ax = plt.subplots(figsize=(3.5, 3.5))
|
|
321
|
+
|
|
322
|
+
# Scatter plot
|
|
323
|
+
ax.scatter(x, y, s=15, alpha=0.6, color='#0072B2', edgecolors='none')
|
|
324
|
+
|
|
325
|
+
# Regression line
|
|
326
|
+
x_line = np.array([x.min(), x.max()])
|
|
327
|
+
y_line = slope * x_line + intercept
|
|
328
|
+
ax.plot(x_line, y_line, 'r-', linewidth=1.5, label=f'y = {slope:.2f}x + {intercept:.2f}')
|
|
329
|
+
|
|
330
|
+
# Add statistics text
|
|
331
|
+
stats_text = f'$R^2$ = {r_value**2:.3f}\n$p$ < 0.001' if p_value < 0.001 else f'$R^2$ = {r_value**2:.3f}\n$p$ = {p_value:.3f}'
|
|
332
|
+
ax.text(0.05, 0.95, stats_text, transform=ax.transAxes,
|
|
333
|
+
verticalalignment='top', fontsize=7,
|
|
334
|
+
bbox=dict(boxstyle='round', facecolor='white', alpha=0.8, edgecolor='gray', linewidth=0.5))
|
|
335
|
+
|
|
336
|
+
# Customize
|
|
337
|
+
ax.set_xlabel('Predictor variable')
|
|
338
|
+
ax.set_ylabel('Response variable')
|
|
339
|
+
ax.spines['top'].set_visible(False)
|
|
340
|
+
ax.spines['right'].set_visible(False)
|
|
341
|
+
|
|
342
|
+
fig.tight_layout()
|
|
343
|
+
save_publication_figure(fig, 'scatter_regression')
|
|
344
|
+
plt.show()
|
|
345
|
+
```
|
|
346
|
+
|
|
347
|
+
## Example 7: Time Series with Shaded Error
|
|
348
|
+
|
|
349
|
+
```python
|
|
350
|
+
import matplotlib.pyplot as plt
|
|
351
|
+
import numpy as np
|
|
352
|
+
|
|
353
|
+
# Generate time series data
|
|
354
|
+
np.random.seed(42)
|
|
355
|
+
time = np.linspace(0, 24, 100)
|
|
356
|
+
n_replicates = 5
|
|
357
|
+
|
|
358
|
+
# Simulate multiple replicates
|
|
359
|
+
data = np.array([10 * np.exp(-time/10) + np.random.normal(0, 0.5, 100)
|
|
360
|
+
for _ in range(n_replicates)])
|
|
361
|
+
|
|
362
|
+
# Calculate mean and SEM
|
|
363
|
+
mean = data.mean(axis=0)
|
|
364
|
+
sem = data.std(axis=0) / np.sqrt(n_replicates)
|
|
365
|
+
|
|
366
|
+
# Create figure
|
|
367
|
+
fig, ax = plt.subplots(figsize=(4, 2.5))
|
|
368
|
+
|
|
369
|
+
# Plot mean line
|
|
370
|
+
ax.plot(time, mean, linewidth=1.5, color='#0072B2', label='Mean ± SEM')
|
|
371
|
+
|
|
372
|
+
# Add shaded error region
|
|
373
|
+
ax.fill_between(time, mean - sem, mean + sem,
|
|
374
|
+
alpha=0.3, color='#0072B2', linewidth=0)
|
|
375
|
+
|
|
376
|
+
# Customize
|
|
377
|
+
ax.set_xlabel('Time (hours)')
|
|
378
|
+
ax.set_ylabel('Concentration (μM)')
|
|
379
|
+
ax.legend(frameon=False, loc='upper right')
|
|
380
|
+
ax.spines['top'].set_visible(False)
|
|
381
|
+
ax.spines['right'].set_visible(False)
|
|
382
|
+
ax.set_xlim(0, 24)
|
|
383
|
+
ax.set_ylim(0, 12)
|
|
384
|
+
|
|
385
|
+
fig.tight_layout()
|
|
386
|
+
save_publication_figure(fig, 'timeseries_shaded')
|
|
387
|
+
plt.show()
|
|
388
|
+
```
|
|
389
|
+
|
|
390
|
+
## Example 8: Plotly Interactive Figure
|
|
391
|
+
|
|
392
|
+
```python
|
|
393
|
+
import plotly.graph_objects as go
|
|
394
|
+
import numpy as np
|
|
395
|
+
|
|
396
|
+
# Generate data
|
|
397
|
+
np.random.seed(42)
|
|
398
|
+
x = np.random.randn(100)
|
|
399
|
+
y = 2*x + np.random.randn(100)
|
|
400
|
+
colors = np.random.choice(['Group A', 'Group B'], 100)
|
|
401
|
+
|
|
402
|
+
# Okabe-Ito colors for Plotly
|
|
403
|
+
okabe_ito_plotly = ['#E69F00', '#56B4E9']
|
|
404
|
+
|
|
405
|
+
# Create figure
|
|
406
|
+
fig = go.Figure()
|
|
407
|
+
|
|
408
|
+
for group, color in zip(['Group A', 'Group B'], okabe_ito_plotly):
|
|
409
|
+
mask = colors == group
|
|
410
|
+
fig.add_trace(go.Scatter(
|
|
411
|
+
x=x[mask], y=y[mask],
|
|
412
|
+
mode='markers',
|
|
413
|
+
name=group,
|
|
414
|
+
marker=dict(size=6, color=color, opacity=0.6)
|
|
415
|
+
))
|
|
416
|
+
|
|
417
|
+
# Update layout for publication quality
|
|
418
|
+
fig.update_layout(
|
|
419
|
+
width=500,
|
|
420
|
+
height=400,
|
|
421
|
+
font=dict(family='Arial, sans-serif', size=10),
|
|
422
|
+
plot_bgcolor='white',
|
|
423
|
+
xaxis=dict(
|
|
424
|
+
title='Variable X',
|
|
425
|
+
showgrid=False,
|
|
426
|
+
showline=True,
|
|
427
|
+
linewidth=1,
|
|
428
|
+
linecolor='black',
|
|
429
|
+
mirror=False
|
|
430
|
+
),
|
|
431
|
+
yaxis=dict(
|
|
432
|
+
title='Variable Y',
|
|
433
|
+
showgrid=False,
|
|
434
|
+
showline=True,
|
|
435
|
+
linewidth=1,
|
|
436
|
+
linecolor='black',
|
|
437
|
+
mirror=False
|
|
438
|
+
),
|
|
439
|
+
legend=dict(
|
|
440
|
+
x=0.02,
|
|
441
|
+
y=0.98,
|
|
442
|
+
bgcolor='rgba(255,255,255,0.8)',
|
|
443
|
+
bordercolor='gray',
|
|
444
|
+
borderwidth=0.5
|
|
445
|
+
)
|
|
446
|
+
)
|
|
447
|
+
|
|
448
|
+
# Save as static image (requires kaleido)
|
|
449
|
+
fig.write_image('plotly_scatter.png', width=500, height=400, scale=3) # scale=3 gives ~300 DPI
|
|
450
|
+
fig.write_html('plotly_scatter.html') # Interactive version
|
|
451
|
+
|
|
452
|
+
fig.show()
|
|
453
|
+
```
|
|
454
|
+
|
|
455
|
+
## Example 9: Grouped Bar Plot with Significance
|
|
456
|
+
|
|
457
|
+
```python
|
|
458
|
+
import matplotlib.pyplot as plt
|
|
459
|
+
import numpy as np
|
|
460
|
+
|
|
461
|
+
# Data
|
|
462
|
+
categories = ['WT', 'Mutant A', 'Mutant B']
|
|
463
|
+
control_means = [100, 85, 70]
|
|
464
|
+
control_sem = [5, 6, 5]
|
|
465
|
+
treatment_means = [100, 120, 140]
|
|
466
|
+
treatment_sem = [6, 8, 9]
|
|
467
|
+
|
|
468
|
+
x = np.arange(len(categories))
|
|
469
|
+
width = 0.35
|
|
470
|
+
|
|
471
|
+
fig, ax = plt.subplots(figsize=(3.5, 3))
|
|
472
|
+
|
|
473
|
+
# Create bars
|
|
474
|
+
bars1 = ax.bar(x - width/2, control_means, width, yerr=control_sem,
|
|
475
|
+
capsize=3, label='Control', color='#0072B2', alpha=0.8)
|
|
476
|
+
bars2 = ax.bar(x + width/2, treatment_means, width, yerr=treatment_sem,
|
|
477
|
+
capsize=3, label='Treatment', color='#E69F00', alpha=0.8)
|
|
478
|
+
|
|
479
|
+
# Add significance markers
|
|
480
|
+
def add_significance_bar(ax, x1, x2, y, h, text):
|
|
481
|
+
"""Add significance bar between two bars"""
|
|
482
|
+
ax.plot([x1, x1, x2, x2], [y, y+h, y+h, y], linewidth=0.8, c='black')
|
|
483
|
+
ax.text((x1+x2)/2, y+h, text, ha='center', va='bottom', fontsize=7)
|
|
484
|
+
|
|
485
|
+
# Mark significant differences
|
|
486
|
+
add_significance_bar(ax, x[1]-width/2, x[1]+width/2, 135, 3, '***')
|
|
487
|
+
add_significance_bar(ax, x[2]-width/2, x[2]+width/2, 155, 3, '***')
|
|
488
|
+
|
|
489
|
+
# Customize
|
|
490
|
+
ax.set_ylabel('Activity (% of WT control)')
|
|
491
|
+
ax.set_xticks(x)
|
|
492
|
+
ax.set_xticklabels(categories)
|
|
493
|
+
ax.legend(frameon=False, loc='upper left')
|
|
494
|
+
ax.spines['top'].set_visible(False)
|
|
495
|
+
ax.spines['right'].set_visible(False)
|
|
496
|
+
ax.set_ylim(0, 180)
|
|
497
|
+
|
|
498
|
+
# Add note about significance
|
|
499
|
+
ax.text(0.98, 0.02, '*** p < 0.001', transform=ax.transAxes,
|
|
500
|
+
ha='right', va='bottom', fontsize=6)
|
|
501
|
+
|
|
502
|
+
fig.tight_layout()
|
|
503
|
+
save_publication_figure(fig, 'grouped_bar_significance')
|
|
504
|
+
plt.show()
|
|
505
|
+
```
|
|
506
|
+
|
|
507
|
+
## Example 10: Publication-Ready Figure for Nature
|
|
508
|
+
|
|
509
|
+
```python
|
|
510
|
+
import matplotlib.pyplot as plt
|
|
511
|
+
import numpy as np
|
|
512
|
+
from string import ascii_lowercase
|
|
513
|
+
|
|
514
|
+
# Nature specifications: 89mm single column
|
|
515
|
+
inch_per_mm = 0.0393701
|
|
516
|
+
width_mm = 89
|
|
517
|
+
height_mm = 110
|
|
518
|
+
figsize = (width_mm * inch_per_mm, height_mm * inch_per_mm)
|
|
519
|
+
|
|
520
|
+
fig = plt.figure(figsize=figsize)
|
|
521
|
+
gs = fig.add_gridspec(3, 2, hspace=0.5, wspace=0.4,
|
|
522
|
+
left=0.12, right=0.95, top=0.96, bottom=0.08)
|
|
523
|
+
|
|
524
|
+
# Panel a: Time course
|
|
525
|
+
ax_a = fig.add_subplot(gs[0, :])
|
|
526
|
+
time = np.linspace(0, 48, 100)
|
|
527
|
+
for i, label in enumerate(['Control', 'Treatment']):
|
|
528
|
+
y = (1 + i*0.5) * np.exp(-time/20) * (1 + 0.3*np.sin(time/5))
|
|
529
|
+
ax_a.plot(time, y, linewidth=1.2, label=label)
|
|
530
|
+
ax_a.set_xlabel('Time (h)', fontsize=7)
|
|
531
|
+
ax_a.set_ylabel('Growth (OD$_{600}$)', fontsize=7)
|
|
532
|
+
ax_a.legend(frameon=False, fontsize=6)
|
|
533
|
+
ax_a.tick_params(labelsize=6)
|
|
534
|
+
ax_a.spines['top'].set_visible(False)
|
|
535
|
+
ax_a.spines['right'].set_visible(False)
|
|
536
|
+
|
|
537
|
+
# Panel b: Bar plot
|
|
538
|
+
ax_b = fig.add_subplot(gs[1, 0])
|
|
539
|
+
categories = ['A', 'B', 'C']
|
|
540
|
+
values = [1.0, 1.5, 2.2]
|
|
541
|
+
errors = [0.1, 0.15, 0.2]
|
|
542
|
+
ax_b.bar(categories, values, yerr=errors, capsize=2, width=0.6,
|
|
543
|
+
color='#0072B2', alpha=0.8)
|
|
544
|
+
ax_b.set_ylabel('Fold change', fontsize=7)
|
|
545
|
+
ax_b.tick_params(labelsize=6)
|
|
546
|
+
ax_b.spines['top'].set_visible(False)
|
|
547
|
+
ax_b.spines['right'].set_visible(False)
|
|
548
|
+
|
|
549
|
+
# Panel c: Heatmap
|
|
550
|
+
ax_c = fig.add_subplot(gs[1, 1])
|
|
551
|
+
data = np.random.randn(8, 6)
|
|
552
|
+
im = ax_c.imshow(data, cmap='viridis', aspect='auto')
|
|
553
|
+
ax_c.set_xlabel('Sample', fontsize=7)
|
|
554
|
+
ax_c.set_ylabel('Gene', fontsize=7)
|
|
555
|
+
ax_c.tick_params(labelsize=6)
|
|
556
|
+
|
|
557
|
+
# Panel d: Scatter
|
|
558
|
+
ax_d = fig.add_subplot(gs[2, :])
|
|
559
|
+
x = np.random.randn(50)
|
|
560
|
+
y = 2*x + np.random.randn(50)*0.5
|
|
561
|
+
ax_d.scatter(x, y, s=8, alpha=0.6, color='#E69F00')
|
|
562
|
+
ax_d.set_xlabel('Expression gene X', fontsize=7)
|
|
563
|
+
ax_d.set_ylabel('Expression gene Y', fontsize=7)
|
|
564
|
+
ax_d.tick_params(labelsize=6)
|
|
565
|
+
ax_d.spines['top'].set_visible(False)
|
|
566
|
+
ax_d.spines['right'].set_visible(False)
|
|
567
|
+
|
|
568
|
+
# Add lowercase panel labels (Nature style)
|
|
569
|
+
for i, ax in enumerate([ax_a, ax_b, ax_c, ax_d]):
|
|
570
|
+
ax.text(-0.2, 1.1, f'{ascii_lowercase[i]}', transform=ax.transAxes,
|
|
571
|
+
fontsize=9, fontweight='bold', va='top')
|
|
572
|
+
|
|
573
|
+
# Save in Nature-preferred format
|
|
574
|
+
fig.savefig('nature_figure.pdf', dpi=1000, bbox_inches='tight',
|
|
575
|
+
facecolor='white', edgecolor='none')
|
|
576
|
+
fig.savefig('nature_figure.png', dpi=300, bbox_inches='tight',
|
|
577
|
+
facecolor='white', edgecolor='none')
|
|
578
|
+
|
|
579
|
+
plt.show()
|
|
580
|
+
```
|
|
581
|
+
|
|
582
|
+
## Tips for Each Library
|
|
583
|
+
|
|
584
|
+
### Matplotlib
|
|
585
|
+
- Use `fig.tight_layout()` or `constrained_layout=True` to prevent overlapping
|
|
586
|
+
- Set DPI to 300-600 for publication
|
|
587
|
+
- Use vector formats (PDF, EPS) for line plots
|
|
588
|
+
- Embed fonts in PDF/EPS files
|
|
589
|
+
|
|
590
|
+
### Seaborn
|
|
591
|
+
- Built on matplotlib, so all matplotlib customizations work
|
|
592
|
+
- Use `sns.set_style('ticks')` or `'whitegrid'` for clean looks
|
|
593
|
+
- `sns.despine()` removes top and right spines
|
|
594
|
+
- Set custom palette with `sns.set_palette()`
|
|
595
|
+
|
|
596
|
+
### Plotly
|
|
597
|
+
- Great for interactive exploratory analysis
|
|
598
|
+
- Export static images with `fig.write_image()` (requires kaleido package)
|
|
599
|
+
- Use `scale` parameter to control DPI (scale=3 ≈ 300 DPI)
|
|
600
|
+
- Update layout extensively for publication quality
|
|
601
|
+
|
|
602
|
+
## Common Workflow
|
|
603
|
+
|
|
604
|
+
1. **Explore with default settings**
|
|
605
|
+
2. **Apply publication configuration** (see Setup section)
|
|
606
|
+
3. **Create plot with appropriate size** (check journal requirements)
|
|
607
|
+
4. **Customize colors** (use colorblind-friendly palettes)
|
|
608
|
+
5. **Adjust fonts and line widths** (readable at final size)
|
|
609
|
+
6. **Remove chart junk** (top/right spines, excessive grid)
|
|
610
|
+
7. **Add clear labels with units**
|
|
611
|
+
8. **Test in grayscale**
|
|
612
|
+
9. **Save in multiple formats** (PDF for vector, PNG for raster)
|
|
613
|
+
10. **Verify in final context** (import into manuscript to check size)
|
|
614
|
+
|
|
615
|
+
## Resources
|
|
616
|
+
|
|
617
|
+
- Matplotlib documentation: https://matplotlib.org/
|
|
618
|
+
- Seaborn gallery: https://seaborn.pydata.org/examples/index.html
|
|
619
|
+
- Plotly documentation: https://plotly.com/python/
|
|
620
|
+
- Nature Methods Points of View: Data visualization column archive
|