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,205 @@
|
|
|
1
|
+
# Publication-Ready Figure Guidelines
|
|
2
|
+
|
|
3
|
+
## Core Principles
|
|
4
|
+
|
|
5
|
+
Scientific figures must be clear, accurate, and accessible. Publication-ready figures follow these fundamental principles:
|
|
6
|
+
|
|
7
|
+
1. **Clarity**: Information should be immediately understandable
|
|
8
|
+
2. **Accuracy**: Data representation must be truthful and unmanipulated
|
|
9
|
+
3. **Accessibility**: Figures should be interpretable by all readers, including those with visual impairments
|
|
10
|
+
4. **Professional**: Clean, polished appearance suitable for peer-reviewed journals
|
|
11
|
+
|
|
12
|
+
## Resolution and File Format
|
|
13
|
+
|
|
14
|
+
### Resolution Requirements
|
|
15
|
+
- **Raster images (photos, microscopy)**: 300-600 DPI at final print size
|
|
16
|
+
- **Line art and graphs**: 600-1200 DPI (or vector format)
|
|
17
|
+
- **Combined figures**: 300-600 DPI
|
|
18
|
+
|
|
19
|
+
### File Formats
|
|
20
|
+
- **Vector formats (preferred for graphs/plots)**: PDF, EPS, SVG
|
|
21
|
+
- Infinitely scalable without quality loss
|
|
22
|
+
- Smaller file sizes for line art
|
|
23
|
+
- Best for: plots, diagrams, schematics
|
|
24
|
+
|
|
25
|
+
- **Raster formats**: TIFF, PNG (never JPEG for scientific data)
|
|
26
|
+
- Use for: photographs, microscopy, images with continuous tone
|
|
27
|
+
- TIFF: Lossless, widely accepted
|
|
28
|
+
- PNG: Lossless, good for web and supplementary materials
|
|
29
|
+
- **Never use JPEG**: Lossy compression introduces artifacts
|
|
30
|
+
|
|
31
|
+
### Size Specifications
|
|
32
|
+
- **Single column**: 85-90 mm (3.35-3.54 inches) width
|
|
33
|
+
- **1.5 column**: 114-120 mm (4.49-4.72 inches) width
|
|
34
|
+
- **Double column**: 174-180 mm (6.85-7.08 inches) width
|
|
35
|
+
- **Maximum height**: Usually 230-240 mm (9-9.5 inches)
|
|
36
|
+
|
|
37
|
+
## Typography
|
|
38
|
+
|
|
39
|
+
### Font Guidelines
|
|
40
|
+
- **Font family**: Sans-serif fonts (Arial, Helvetica, Calibri) for most journals
|
|
41
|
+
- Some journals prefer specific fonts (check guidelines)
|
|
42
|
+
- Consistency across all figures in manuscript
|
|
43
|
+
|
|
44
|
+
- **Font sizes at final print size**:
|
|
45
|
+
- Axis labels: 7-9 pt minimum
|
|
46
|
+
- Tick labels: 6-8 pt minimum
|
|
47
|
+
- Legends: 6-8 pt
|
|
48
|
+
- Panel labels (A, B, C): 8-12 pt, bold
|
|
49
|
+
- Title: Generally avoided in multi-panel figures
|
|
50
|
+
|
|
51
|
+
- **Font weight**: Regular weight for most text; bold for panel labels only
|
|
52
|
+
|
|
53
|
+
### Text Best Practices
|
|
54
|
+
- Use sentence case for axis labels ("Time (hours)" not "TIME (HOURS)")
|
|
55
|
+
- Include units in parentheses
|
|
56
|
+
- Avoid abbreviations unless space-constrained (define in caption)
|
|
57
|
+
- No text smaller than 5-6 pt at final size
|
|
58
|
+
|
|
59
|
+
## Color Usage
|
|
60
|
+
|
|
61
|
+
### Color Selection Principles
|
|
62
|
+
1. **Colorblind-friendly**: ~8% of males have color vision deficiency
|
|
63
|
+
- Avoid red/green combinations
|
|
64
|
+
- Use blue/orange, blue/yellow, or add texture/pattern
|
|
65
|
+
- Test with colorblindness simulators
|
|
66
|
+
|
|
67
|
+
2. **Purposeful color**: Color should convey meaning, not just aesthetics
|
|
68
|
+
- Use color to distinguish categories or highlight key data
|
|
69
|
+
- Maintain consistency across figures (same treatment = same color)
|
|
70
|
+
|
|
71
|
+
3. **Print considerations**:
|
|
72
|
+
- Colors may appear different in print vs. screen
|
|
73
|
+
- Use CMYK color space for print, RGB for digital
|
|
74
|
+
- Ensure sufficient contrast (especially for grayscale conversion)
|
|
75
|
+
|
|
76
|
+
### Recommended Color Palettes
|
|
77
|
+
- **Qualitative (categories)**: ColorBrewer, Okabe-Ito palette
|
|
78
|
+
- **Sequential (low to high)**: Viridis, Cividis, Blues, Oranges
|
|
79
|
+
- **Diverging (negative to positive)**: RdBu, PuOr, BrBG (ensure colorblind-safe)
|
|
80
|
+
|
|
81
|
+
### Grayscale Compatibility
|
|
82
|
+
- All figures should be interpretable in grayscale
|
|
83
|
+
- Use different line styles (solid, dashed, dotted) and markers
|
|
84
|
+
- Add patterns/hatching to bars and areas
|
|
85
|
+
|
|
86
|
+
## Layout and Composition
|
|
87
|
+
|
|
88
|
+
### Multi-Panel Figures
|
|
89
|
+
- **Panel labels**: Use bold uppercase letters (A, B, C) in top-left corner
|
|
90
|
+
- **Spacing**: Adequate white space between panels
|
|
91
|
+
- **Alignment**: Align panels along edges or axes where possible
|
|
92
|
+
- **Sizing**: Related panels should have consistent sizes
|
|
93
|
+
- **Arrangement**: Logical flow (left-to-right, top-to-bottom)
|
|
94
|
+
|
|
95
|
+
### Plot Elements
|
|
96
|
+
|
|
97
|
+
#### Axes
|
|
98
|
+
- **Axis lines**: 0.5-1 pt thickness
|
|
99
|
+
- **Tick marks**: Point inward or outward consistently
|
|
100
|
+
- **Tick frequency**: Enough to read values, not cluttered (typically 4-7 major ticks)
|
|
101
|
+
- **Axis labels**: Required on all plots; state units
|
|
102
|
+
- **Axis ranges**: Start from zero for bar charts (unless scientifically inappropriate)
|
|
103
|
+
|
|
104
|
+
#### Lines and Markers
|
|
105
|
+
- **Line width**: 1-2 pt for data lines; 0.5-1 pt for reference lines
|
|
106
|
+
- **Marker size**: 3-6 pt, larger than line width
|
|
107
|
+
- **Marker types**: Differentiate when multiple series (circles, squares, triangles)
|
|
108
|
+
- **Error bars**: 0.5-1 pt width; include caps if appropriate
|
|
109
|
+
|
|
110
|
+
#### Legends
|
|
111
|
+
- **Position**: Inside plot area if space permits, outside otherwise
|
|
112
|
+
- **Frame**: Optional; if used, thin line (0.5 pt)
|
|
113
|
+
- **Order**: Match order of data appearance (top to bottom or left to right)
|
|
114
|
+
- **Content**: Concise descriptions; full details in caption
|
|
115
|
+
|
|
116
|
+
### White Space and Margins
|
|
117
|
+
- Remove unnecessary white space around plots
|
|
118
|
+
- Maintain consistent margins
|
|
119
|
+
- `tight_layout()` or `constrained_layout=True` in matplotlib
|
|
120
|
+
|
|
121
|
+
## Data Representation Best Practices
|
|
122
|
+
|
|
123
|
+
### Statistical Rigor
|
|
124
|
+
- **Error bars**: Always show uncertainty (SD, SEM, CI) and state which in caption
|
|
125
|
+
- **Sample size**: Indicate n in figure or caption
|
|
126
|
+
- **Significance**: Mark statistical significance clearly (*, **, ***)
|
|
127
|
+
- **Replicates**: Show individual data points when possible, not just summary statistics
|
|
128
|
+
|
|
129
|
+
### Appropriate Chart Types
|
|
130
|
+
- **Bar plots**: Comparing discrete categories; always start y-axis at zero
|
|
131
|
+
- **Line plots**: Time series or continuous relationships
|
|
132
|
+
- **Scatter plots**: Correlation between variables; add regression line if appropriate
|
|
133
|
+
- **Box plots**: Distribution comparisons; show outliers
|
|
134
|
+
- **Heatmaps**: Matrix data, correlations, expression patterns
|
|
135
|
+
- **Violin plots**: Distribution shape comparison (better than box plots for bimodal data)
|
|
136
|
+
|
|
137
|
+
### Avoiding Distortion
|
|
138
|
+
- **No 3D effects**: Distorts perception of values
|
|
139
|
+
- **No unnecessary decorations**: No gradients, shadows, or chart junk
|
|
140
|
+
- **Consistent scales**: Use same scale for comparable panels
|
|
141
|
+
- **No truncated axes**: Unless clearly indicated and scientifically justified
|
|
142
|
+
- **Linear vs. log scales**: Choose appropriate scale; always label clearly
|
|
143
|
+
|
|
144
|
+
## Accessibility
|
|
145
|
+
|
|
146
|
+
### Colorblind Considerations
|
|
147
|
+
- Test with online simulators (e.g., Coblis, Color Oracle)
|
|
148
|
+
- Use patterns/textures in addition to color
|
|
149
|
+
- Provide alternative representations in supplementary materials if needed
|
|
150
|
+
|
|
151
|
+
### Visual Impairment
|
|
152
|
+
- High contrast between elements
|
|
153
|
+
- Thick enough lines (minimum 0.5 pt)
|
|
154
|
+
- Clear, uncluttered layouts
|
|
155
|
+
|
|
156
|
+
### Data Availability
|
|
157
|
+
- Include data tables in supplementary materials
|
|
158
|
+
- Provide source data files for graphs
|
|
159
|
+
- Consider interactive figures for online supplementary materials
|
|
160
|
+
|
|
161
|
+
## Common Mistakes to Avoid
|
|
162
|
+
|
|
163
|
+
1. **Font too small**: Text unreadable at final print size
|
|
164
|
+
2. **Low resolution**: Pixelated or blurry images
|
|
165
|
+
3. **Chart junk**: Unnecessary grid lines, 3D effects, decorations
|
|
166
|
+
4. **Poor color choices**: Red/green combinations, low contrast
|
|
167
|
+
5. **Missing elements**: No axis labels, no units, no error bars
|
|
168
|
+
6. **Inconsistent styling**: Different fonts/sizes within figure or between figures
|
|
169
|
+
7. **Data distortion**: Truncated axes, inappropriate scales, 3D effects
|
|
170
|
+
8. **JPEG compression**: Artifacts around text and lines
|
|
171
|
+
9. **Too much information**: Cramming too many data series into one plot
|
|
172
|
+
10. **Inaccessible legends**: Legends outside the figure boundary after export
|
|
173
|
+
|
|
174
|
+
## Figure Checklist
|
|
175
|
+
|
|
176
|
+
Before submission, verify:
|
|
177
|
+
|
|
178
|
+
- [ ] Resolution meets journal requirements (300+ DPI for raster)
|
|
179
|
+
- [ ] File format is acceptable (vector for plots, TIFF/PNG for images)
|
|
180
|
+
- [ ] Figure dimensions match journal specifications
|
|
181
|
+
- [ ] All text is readable at final size (minimum 6-7 pt)
|
|
182
|
+
- [ ] Fonts are consistent and embedded (for PDF/EPS)
|
|
183
|
+
- [ ] Colors are colorblind-friendly
|
|
184
|
+
- [ ] Figure is interpretable in grayscale
|
|
185
|
+
- [ ] All axes are labeled with units
|
|
186
|
+
- [ ] Error bars or uncertainty indicators are present
|
|
187
|
+
- [ ] Statistical significance is marked if applicable
|
|
188
|
+
- [ ] Panel labels are present and consistent (A, B, C)
|
|
189
|
+
- [ ] Legend is clear and complete
|
|
190
|
+
- [ ] No chart junk or unnecessary elements
|
|
191
|
+
- [ ] File naming follows journal conventions
|
|
192
|
+
- [ ] Figure caption is comprehensive
|
|
193
|
+
- [ ] Source data is available
|
|
194
|
+
|
|
195
|
+
## Journal-Specific Considerations
|
|
196
|
+
|
|
197
|
+
Always consult the specific journal's author guidelines. Common variations include:
|
|
198
|
+
|
|
199
|
+
- **Nature journals**: RGB, 300 DPI minimum, specific size requirements
|
|
200
|
+
- **Science**: EPS or high-res TIFF, specific font requirements
|
|
201
|
+
- **Cell Press**: PDF or EPS preferred, Arial or Helvetica fonts
|
|
202
|
+
- **PLOS**: TIFF or EPS, specific color space requirements
|
|
203
|
+
- **ACS journals**: Application files (AI, EPS) or high-res TIFF
|
|
204
|
+
|
|
205
|
+
See `journal_requirements.md` for detailed specifications from major publishers.
|
|
@@ -0,0 +1,343 @@
|
|
|
1
|
+
#!/usr/bin/env python3
|
|
2
|
+
"""
|
|
3
|
+
Figure Export Utilities for Publication-Ready Scientific Figures
|
|
4
|
+
|
|
5
|
+
This module provides utilities to export matplotlib figures in publication-ready
|
|
6
|
+
formats with appropriate settings for various journals.
|
|
7
|
+
"""
|
|
8
|
+
|
|
9
|
+
import matplotlib.pyplot as plt
|
|
10
|
+
from pathlib import Path
|
|
11
|
+
from typing import List, Optional, Union
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
def save_publication_figure(
|
|
15
|
+
fig: plt.Figure,
|
|
16
|
+
filename: Union[str, Path],
|
|
17
|
+
formats: List[str] = ['pdf', 'png'],
|
|
18
|
+
dpi: int = 300,
|
|
19
|
+
transparent: bool = False,
|
|
20
|
+
bbox_inches: str = 'tight',
|
|
21
|
+
pad_inches: float = 0.1,
|
|
22
|
+
facecolor: str = 'white',
|
|
23
|
+
**kwargs
|
|
24
|
+
) -> List[Path]:
|
|
25
|
+
"""
|
|
26
|
+
Save a matplotlib figure in multiple formats with publication-quality settings.
|
|
27
|
+
|
|
28
|
+
Parameters
|
|
29
|
+
----------
|
|
30
|
+
fig : matplotlib.figure.Figure
|
|
31
|
+
The figure to save
|
|
32
|
+
filename : str or Path
|
|
33
|
+
Base filename (without extension)
|
|
34
|
+
formats : list of str, default ['pdf', 'png']
|
|
35
|
+
List of file formats to save. Options: 'pdf', 'png', 'eps', 'svg', 'tiff'
|
|
36
|
+
dpi : int, default 300
|
|
37
|
+
Resolution for raster formats (png, tiff). 300 DPI is minimum for most journals
|
|
38
|
+
transparent : bool, default False
|
|
39
|
+
If True, save with transparent background
|
|
40
|
+
bbox_inches : str, default 'tight'
|
|
41
|
+
Bounding box specification. 'tight' removes excess whitespace
|
|
42
|
+
pad_inches : float, default 0.1
|
|
43
|
+
Padding around the figure when bbox_inches='tight'
|
|
44
|
+
facecolor : str, default 'white'
|
|
45
|
+
Background color (ignored if transparent=True)
|
|
46
|
+
**kwargs
|
|
47
|
+
Additional keyword arguments passed to fig.savefig()
|
|
48
|
+
|
|
49
|
+
Returns
|
|
50
|
+
-------
|
|
51
|
+
list of Path
|
|
52
|
+
List of paths to saved files
|
|
53
|
+
|
|
54
|
+
Examples
|
|
55
|
+
--------
|
|
56
|
+
>>> fig, ax = plt.subplots()
|
|
57
|
+
>>> ax.plot([1, 2, 3], [1, 4, 9])
|
|
58
|
+
>>> save_publication_figure(fig, 'my_plot', formats=['pdf', 'png'], dpi=600)
|
|
59
|
+
['my_plot.pdf', 'my_plot.png']
|
|
60
|
+
"""
|
|
61
|
+
filename = Path(filename)
|
|
62
|
+
base_name = filename.stem
|
|
63
|
+
output_dir = filename.parent if filename.parent.exists() else Path.cwd()
|
|
64
|
+
|
|
65
|
+
saved_files = []
|
|
66
|
+
|
|
67
|
+
for fmt in formats:
|
|
68
|
+
output_file = output_dir / f"{base_name}.{fmt}"
|
|
69
|
+
|
|
70
|
+
# Set format-specific parameters
|
|
71
|
+
save_kwargs = {
|
|
72
|
+
'dpi': dpi,
|
|
73
|
+
'bbox_inches': bbox_inches,
|
|
74
|
+
'pad_inches': pad_inches,
|
|
75
|
+
'facecolor': facecolor if not transparent else 'none',
|
|
76
|
+
'edgecolor': 'none',
|
|
77
|
+
'transparent': transparent,
|
|
78
|
+
'format': fmt,
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
# Update with user-provided kwargs
|
|
82
|
+
save_kwargs.update(kwargs)
|
|
83
|
+
|
|
84
|
+
# Adjust DPI for vector formats (DPI less relevant)
|
|
85
|
+
if fmt in ['pdf', 'eps', 'svg']:
|
|
86
|
+
save_kwargs['dpi'] = min(dpi, 300) # Lower DPI for embedded rasters in vector
|
|
87
|
+
|
|
88
|
+
try:
|
|
89
|
+
fig.savefig(output_file, **save_kwargs)
|
|
90
|
+
saved_files.append(output_file)
|
|
91
|
+
print(f"✓ Saved: {output_file}")
|
|
92
|
+
except Exception as e:
|
|
93
|
+
print(f"✗ Failed to save {output_file}: {e}")
|
|
94
|
+
|
|
95
|
+
return saved_files
|
|
96
|
+
|
|
97
|
+
|
|
98
|
+
def save_for_journal(
|
|
99
|
+
fig: plt.Figure,
|
|
100
|
+
filename: Union[str, Path],
|
|
101
|
+
journal: str,
|
|
102
|
+
figure_type: str = 'combination'
|
|
103
|
+
) -> List[Path]:
|
|
104
|
+
"""
|
|
105
|
+
Save figure with journal-specific requirements.
|
|
106
|
+
|
|
107
|
+
Parameters
|
|
108
|
+
----------
|
|
109
|
+
fig : matplotlib.figure.Figure
|
|
110
|
+
The figure to save
|
|
111
|
+
filename : str or Path
|
|
112
|
+
Base filename (without extension)
|
|
113
|
+
journal : str
|
|
114
|
+
Journal name. Options: 'nature', 'science', 'cell', 'plos', 'acs', 'ieee'
|
|
115
|
+
figure_type : str, default 'combination'
|
|
116
|
+
Type of figure. Options: 'line_art', 'photo', 'combination'
|
|
117
|
+
|
|
118
|
+
Returns
|
|
119
|
+
-------
|
|
120
|
+
list of Path
|
|
121
|
+
List of paths to saved files
|
|
122
|
+
|
|
123
|
+
Examples
|
|
124
|
+
--------
|
|
125
|
+
>>> fig, ax = plt.subplots()
|
|
126
|
+
>>> ax.plot([1, 2, 3], [1, 4, 9])
|
|
127
|
+
>>> save_for_journal(fig, 'figure1', journal='nature', figure_type='line_art')
|
|
128
|
+
"""
|
|
129
|
+
journal = journal.lower()
|
|
130
|
+
|
|
131
|
+
# Define journal-specific requirements
|
|
132
|
+
journal_specs = {
|
|
133
|
+
'nature': {
|
|
134
|
+
'line_art': {'formats': ['pdf', 'eps'], 'dpi': 1000},
|
|
135
|
+
'photo': {'formats': ['tiff'], 'dpi': 300},
|
|
136
|
+
'combination': {'formats': ['pdf'], 'dpi': 600},
|
|
137
|
+
},
|
|
138
|
+
'science': {
|
|
139
|
+
'line_art': {'formats': ['eps', 'pdf'], 'dpi': 1000},
|
|
140
|
+
'photo': {'formats': ['tiff'], 'dpi': 300},
|
|
141
|
+
'combination': {'formats': ['eps'], 'dpi': 600},
|
|
142
|
+
},
|
|
143
|
+
'cell': {
|
|
144
|
+
'line_art': {'formats': ['pdf', 'eps'], 'dpi': 1000},
|
|
145
|
+
'photo': {'formats': ['tiff'], 'dpi': 300},
|
|
146
|
+
'combination': {'formats': ['pdf'], 'dpi': 600},
|
|
147
|
+
},
|
|
148
|
+
'plos': {
|
|
149
|
+
'line_art': {'formats': ['pdf', 'eps'], 'dpi': 600},
|
|
150
|
+
'photo': {'formats': ['tiff', 'png'], 'dpi': 300},
|
|
151
|
+
'combination': {'formats': ['tiff'], 'dpi': 300},
|
|
152
|
+
},
|
|
153
|
+
'acs': {
|
|
154
|
+
'line_art': {'formats': ['tiff', 'pdf'], 'dpi': 600},
|
|
155
|
+
'photo': {'formats': ['tiff'], 'dpi': 300},
|
|
156
|
+
'combination': {'formats': ['tiff'], 'dpi': 600},
|
|
157
|
+
},
|
|
158
|
+
'ieee': {
|
|
159
|
+
'line_art': {'formats': ['pdf', 'eps'], 'dpi': 600},
|
|
160
|
+
'photo': {'formats': ['tiff'], 'dpi': 300},
|
|
161
|
+
'combination': {'formats': ['pdf'], 'dpi': 300},
|
|
162
|
+
},
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
if journal not in journal_specs:
|
|
166
|
+
available = ', '.join(journal_specs.keys())
|
|
167
|
+
raise ValueError(f"Journal '{journal}' not recognized. Available: {available}")
|
|
168
|
+
|
|
169
|
+
if figure_type not in journal_specs[journal]:
|
|
170
|
+
available = ', '.join(journal_specs[journal].keys())
|
|
171
|
+
raise ValueError(f"Figure type '{figure_type}' not valid. Available: {available}")
|
|
172
|
+
|
|
173
|
+
specs = journal_specs[journal][figure_type]
|
|
174
|
+
|
|
175
|
+
print(f"Saving for {journal.upper()} ({figure_type}):")
|
|
176
|
+
print(f" Formats: {', '.join(specs['formats'])}")
|
|
177
|
+
print(f" DPI: {specs['dpi']}")
|
|
178
|
+
|
|
179
|
+
return save_publication_figure(
|
|
180
|
+
fig=fig,
|
|
181
|
+
filename=filename,
|
|
182
|
+
formats=specs['formats'],
|
|
183
|
+
dpi=specs['dpi']
|
|
184
|
+
)
|
|
185
|
+
|
|
186
|
+
|
|
187
|
+
def check_figure_size(fig: plt.Figure, journal: str = 'nature') -> dict:
|
|
188
|
+
"""
|
|
189
|
+
Check if figure dimensions are appropriate for journal requirements.
|
|
190
|
+
|
|
191
|
+
Parameters
|
|
192
|
+
----------
|
|
193
|
+
fig : matplotlib.figure.Figure
|
|
194
|
+
The figure to check
|
|
195
|
+
journal : str, default 'nature'
|
|
196
|
+
Journal name
|
|
197
|
+
|
|
198
|
+
Returns
|
|
199
|
+
-------
|
|
200
|
+
dict
|
|
201
|
+
Dictionary with figure dimensions and compliance status
|
|
202
|
+
|
|
203
|
+
Examples
|
|
204
|
+
--------
|
|
205
|
+
>>> fig = plt.figure(figsize=(3.5, 3))
|
|
206
|
+
>>> info = check_figure_size(fig, journal='nature')
|
|
207
|
+
>>> print(info)
|
|
208
|
+
"""
|
|
209
|
+
journal = journal.lower()
|
|
210
|
+
|
|
211
|
+
# Get figure dimensions in inches
|
|
212
|
+
width_inches, height_inches = fig.get_size_inches()
|
|
213
|
+
width_mm = width_inches * 25.4
|
|
214
|
+
height_mm = height_inches * 25.4
|
|
215
|
+
|
|
216
|
+
# Journal specifications (widths in mm)
|
|
217
|
+
specs = {
|
|
218
|
+
'nature': {'single': 89, 'double': 183, 'max_height': 247},
|
|
219
|
+
'science': {'single': 55, 'double': 175, 'max_height': 233},
|
|
220
|
+
'cell': {'single': 85, 'double': 178, 'max_height': 230},
|
|
221
|
+
'plos': {'single': 83, 'double': 173, 'max_height': 233},
|
|
222
|
+
'acs': {'single': 82.5, 'double': 178, 'max_height': 247},
|
|
223
|
+
}
|
|
224
|
+
|
|
225
|
+
if journal not in specs:
|
|
226
|
+
journal_spec = specs['nature']
|
|
227
|
+
print(f"Warning: Journal '{journal}' not found, using Nature specifications")
|
|
228
|
+
else:
|
|
229
|
+
journal_spec = specs[journal]
|
|
230
|
+
|
|
231
|
+
# Determine column type
|
|
232
|
+
column_type = None
|
|
233
|
+
width_ok = False
|
|
234
|
+
|
|
235
|
+
tolerance = 5 # mm tolerance
|
|
236
|
+
if abs(width_mm - journal_spec['single']) < tolerance:
|
|
237
|
+
column_type = 'single'
|
|
238
|
+
width_ok = True
|
|
239
|
+
elif abs(width_mm - journal_spec['double']) < tolerance:
|
|
240
|
+
column_type = 'double'
|
|
241
|
+
width_ok = True
|
|
242
|
+
|
|
243
|
+
height_ok = height_mm <= journal_spec['max_height']
|
|
244
|
+
|
|
245
|
+
result = {
|
|
246
|
+
'width_inches': width_inches,
|
|
247
|
+
'height_inches': height_inches,
|
|
248
|
+
'width_mm': width_mm,
|
|
249
|
+
'height_mm': height_mm,
|
|
250
|
+
'journal': journal,
|
|
251
|
+
'column_type': column_type,
|
|
252
|
+
'width_ok': width_ok,
|
|
253
|
+
'height_ok': height_ok,
|
|
254
|
+
'compliant': width_ok and height_ok,
|
|
255
|
+
'recommendations': {
|
|
256
|
+
'single_column_mm': journal_spec['single'],
|
|
257
|
+
'double_column_mm': journal_spec['double'],
|
|
258
|
+
'max_height_mm': journal_spec['max_height'],
|
|
259
|
+
}
|
|
260
|
+
}
|
|
261
|
+
|
|
262
|
+
# Print report
|
|
263
|
+
print(f"\n{'='*60}")
|
|
264
|
+
print(f"Figure Size Check for {journal.upper()}")
|
|
265
|
+
print(f"{'='*60}")
|
|
266
|
+
print(f"Current size: {width_mm:.1f} × {height_mm:.1f} mm")
|
|
267
|
+
print(f" ({width_inches:.2f} × {height_inches:.2f} inches)")
|
|
268
|
+
print(f"\n{journal.upper()} specifications:")
|
|
269
|
+
print(f" Single column: {journal_spec['single']} mm")
|
|
270
|
+
print(f" Double column: {journal_spec['double']} mm")
|
|
271
|
+
print(f" Max height: {journal_spec['max_height']} mm")
|
|
272
|
+
print(f"\nCompliance:")
|
|
273
|
+
print(f" Width: {'✓ OK' if width_ok else '✗ Non-standard'} ({column_type or 'custom'})")
|
|
274
|
+
print(f" Height: {'✓ OK' if height_ok else '✗ Too tall'}")
|
|
275
|
+
print(f" Overall: {'✓ COMPLIANT' if result['compliant'] else '✗ NEEDS ADJUSTMENT'}")
|
|
276
|
+
print(f"{'='*60}\n")
|
|
277
|
+
|
|
278
|
+
return result
|
|
279
|
+
|
|
280
|
+
|
|
281
|
+
def verify_font_embedding(pdf_path: Union[str, Path]) -> bool:
|
|
282
|
+
"""
|
|
283
|
+
Check if fonts are embedded in a PDF file.
|
|
284
|
+
|
|
285
|
+
Note: This requires PyPDF2 or a similar library to be installed.
|
|
286
|
+
|
|
287
|
+
Parameters
|
|
288
|
+
----------
|
|
289
|
+
pdf_path : str or Path
|
|
290
|
+
Path to PDF file
|
|
291
|
+
|
|
292
|
+
Returns
|
|
293
|
+
-------
|
|
294
|
+
bool
|
|
295
|
+
True if fonts are embedded, False otherwise
|
|
296
|
+
"""
|
|
297
|
+
try:
|
|
298
|
+
from PyPDF2 import PdfReader
|
|
299
|
+
except ImportError:
|
|
300
|
+
print("Warning: PyPDF2 not installed. Cannot verify font embedding.")
|
|
301
|
+
print("Install with: pip install PyPDF2")
|
|
302
|
+
return None
|
|
303
|
+
|
|
304
|
+
pdf_path = Path(pdf_path)
|
|
305
|
+
|
|
306
|
+
try:
|
|
307
|
+
reader = PdfReader(pdf_path)
|
|
308
|
+
# This is a simplified check; full verification is complex
|
|
309
|
+
print(f"PDF has {len(reader.pages)} page(s)")
|
|
310
|
+
print("Note: Full font embedding verification requires detailed PDF inspection.")
|
|
311
|
+
return True
|
|
312
|
+
except Exception as e:
|
|
313
|
+
print(f"Error reading PDF: {e}")
|
|
314
|
+
return False
|
|
315
|
+
|
|
316
|
+
|
|
317
|
+
if __name__ == "__main__":
|
|
318
|
+
# Example usage
|
|
319
|
+
import numpy as np
|
|
320
|
+
|
|
321
|
+
# Create example figure
|
|
322
|
+
fig, ax = plt.subplots(figsize=(3.5, 2.5))
|
|
323
|
+
x = np.linspace(0, 10, 100)
|
|
324
|
+
ax.plot(x, np.sin(x), label='sin(x)')
|
|
325
|
+
ax.plot(x, np.cos(x), label='cos(x)')
|
|
326
|
+
ax.set_xlabel('x')
|
|
327
|
+
ax.set_ylabel('y')
|
|
328
|
+
ax.legend()
|
|
329
|
+
ax.spines['top'].set_visible(False)
|
|
330
|
+
ax.spines['right'].set_visible(False)
|
|
331
|
+
|
|
332
|
+
# Check size
|
|
333
|
+
check_figure_size(fig, journal='nature')
|
|
334
|
+
|
|
335
|
+
# Save in multiple formats
|
|
336
|
+
print("\nSaving figure...")
|
|
337
|
+
save_publication_figure(fig, 'example_figure', formats=['pdf', 'png'], dpi=300)
|
|
338
|
+
|
|
339
|
+
# Save with journal-specific requirements
|
|
340
|
+
print("\nSaving for Nature...")
|
|
341
|
+
save_for_journal(fig, 'example_figure_nature', journal='nature', figure_type='line_art')
|
|
342
|
+
|
|
343
|
+
plt.close(fig)
|