Nano Banana 通常指 Gemini 系列中的图像生成与图像编辑模型。放在科研绘图场景里,它更像是一名“科研插画助理”:可以根据文字描述、草图或参考图,快速生成机制示意图、实验流程图、图文摘要、论文插图背景和概念图。
但它不是数据分析软件,也不应该替代 Matplotlib、Origin、GraphPad Prism、R 语言 ggplot2 这些严谨的绘图工具。科研绘图最重要的是准确性,尤其是坐标轴、数值、误差线、统计标记和实验结论,不能交给图像模型自由发挥。
一个稳妥的原则是:
定量图用代码或专业绘图软件生成,概念图和示意图交给 Nano Banana 辅助设计。
这样既能利用 AI(人工智能)提升出图效率,又不会牺牲科研图件最核心的可信度。
Nano Banana 适合画什么,不适合画什么
科研图大致可以分成两类:一类表达真实数据,一类表达概念、结构和流程。Nano Banana 更擅长后一类。
| 图件类型 | 是否适合 Nano Banana | 推荐做法 |
|---|---|---|
| 实验流程图 | 适合 | 用 Nano Banana 生成统一风格的流程示意,再手工校对标签 |
| 机制示意图 | 适合 | 用结构化提示词约束组成元素、箭头方向和层级关系 |
| graphical abstract(图文摘要) | 适合 | 先写清核心科学故事,再生成横版或方形版式 |
| 材料结构示意图 | 部分适合 | 只适合概念表达,真实晶体结构仍应由专业软件输出 |
| 细胞、器官、组织示意图 | 适合 | 适合生成风格统一的生物医学插画 |
| 柱状图、折线图、散点图 | 不建议直接生成 | 用 Python、R、Origin 等工具绘制真实数据 |
| 带 p 值、误差线、坐标轴的统计图 | 不适合直接生成 | AI 只能做排版或美化辅助,数值部分必须可追溯 |
| 分子式、化学结构式 | 谨慎使用 | 真实结构用 ChemDraw、RDKit 等工具生成 |
| 投稿最终版整图 | 部分适合 | AI 生成底稿,最终用 Illustrator、Inkscape 或 PowerPoint 校对重绘 |
Nano Banana 的优势在于“把抽象想法快速可视化”。例如,一个关于纳米材料递送药物的机制图,人工从零画可能要几个小时;用 Nano Banana 先生成草稿,再进入矢量软件修正,往往能把时间压缩到几十分钟。
科研绘图的正确分工
高质量科研图通常不是“一条提示词直接出最终图”,而是一个分工明确的流程。
flowchart LR
A[明确科学信息] --> B[拆分图件结构]
B --> C[编写结构化提示词]
C --> D[Nano Banana 生成草稿]
D --> E[人工筛选与局部修改]
E --> F[矢量软件重绘文字和关键线条]
F --> G[校对科学准确性]
G --> H[导出投稿格式]
每一步都有明确目的:
- 明确科学信息:一张图只讲一个核心观点,不要把所有实验细节都塞进去。
- 拆分图件结构:先确定左右布局、上下布局,还是多面板布局。
- 编写结构化提示词:把画布比例、对象、风格、标签和禁用项写清楚。
- 生成草稿:让模型负责整体视觉风格、配色、空间关系。
- 局部修改:对错误结构、奇怪形状、错误文字进行迭代。
- 矢量软件重绘:文字、箭头、坐标轴、图例最好由人工重新绘制。
- 科学校对:检查机制是否正确,方向是否相反,标签是否错写。
- 导出投稿格式:按照期刊要求导出 TIFF、PDF、SVG 等格式。
Nano Banana 最大的价值出现在中间几步:它能快速给出一个视觉底稿,让科研人员不必从空白画布开始。
提示词要先描述结构,再描述风格
很多人用图像模型画科研图时,只写一句“画一个高质量科研示意图”,结果通常会得到一张看起来漂亮、但不太能用的图片。问题不在模型,而在提示词缺少结构约束。
更稳定的提示词可以按这个模板写:
用途:
这是一张用于论文 graphical abstract 的科研示意图。
画布:
横版 16:9,白色背景,留出足够边距,适合放在论文或报告中。
主题:
展示一种纳米颗粒递送药物进入肿瘤细胞,并在酸性微环境中释放药物的过程。
版式:
从左到右分成三个区域:
1. 左侧:血管中的纳米颗粒;
2. 中间:纳米颗粒穿过肿瘤组织间隙;
3. 右侧:药物进入肿瘤细胞并诱导细胞凋亡。
视觉元素:
纳米颗粒为蓝色球形结构,药物分子为红色小点,肿瘤细胞为浅紫色。
用箭头表示递送方向。
画面干净,不要复杂背景。
文字:
只保留三个英文标签:
"Nanoparticle"
"Tumor microenvironment"
"Drug release"
风格:
Nature / Cell 风格的简洁科研插画,扁平化矢量风,线条清晰,低饱和度配色。
限制:
不要生成坐标轴。
不要添加无关器官。
不要添加多余英文。
不要生成水印、logo 或签名。
这个提示词不是简单描述“画什么”,而是同时约束了用途、比例、布局、元素、文字和禁用内容。科研绘图最怕模型随意补东西,所以限制条件要写得明确。
一个好用的提示词结构
可以把提示词拆成 6 个模块:
| 模块 | 作用 | 示例 |
|---|---|---|
| 用途 | 告诉模型图片用在哪里 | 用于论文 graphical abstract |
| 画布 | 控制比例和背景 | 16:9 横版,白色背景 |
| 版式 | 控制空间结构 | 左中右三段流程 |
| 元素 | 指定必须出现的对象 | 纳米颗粒、细胞膜、药物分子 |
| 风格 | 控制审美和一致性 | 扁平化矢量科研插画 |
| 限制 | 避免模型乱加内容 | 不要坐标轴,不要多余文字 |
可以直接套用这个骨架:
Create a scientific illustration for [用途].
Canvas:
[比例、背景、边距、视角]
Layout:
[从左到右 / 从上到下 / 多面板 A-D / 中心辐射结构]
Main elements:
[元素 1]
[元素 2]
[元素 3]
Scientific process:
[过程 1] -> [过程 2] -> [过程 3]
Labels:
Only include the following labels:
"[标签 1]"
"[标签 2]"
"[标签 3]"
Style:
[期刊风格、矢量风、颜色、线条、简洁程度]
Constraints:
No extra text.
No watermark.
No logo.
No fake charts.
No irrelevant objects.
科研图里的“布局”比“风格”更重要。风格不满意可以后期统一调整,但结构错了会导致整张图无法使用。
示例一:实验流程图
实验流程图最适合用“分步骤 + 箭头”的方式描述。
Create a clean scientific workflow diagram for a biomedical experiment.
Canvas:
Horizontal 16:9 layout, white background, wide margins.
Layout:
Five steps arranged from left to right with arrows between them.
Steps:
1. Sample collection: a small tube with blood sample.
2. Cell isolation: immune cells separated in a centrifuge tube.
3. Nanoparticle incubation: cells mixed with blue nanoparticles.
4. Fluorescence imaging: microscope observing labeled cells.
5. Data analysis: computer screen showing simplified plots.
Labels:
Only include these labels:
"Sample collection"
"Cell isolation"
"Nanoparticle incubation"
"Imaging"
"Data analysis"
Style:
Minimal vector scientific illustration, consistent blue and gray color palette, clean lines, no realistic photo texture.
Constraints:
Do not include extra text.
Do not include people.
Do not include brand logos.
Do not include unreadable tiny labels.
生成后需要重点检查三类问题:
- 步骤顺序是否正确;
- 箭头是否指向正确方向;
- 标签是否拼写准确。
如果模型生成的文字不稳定,可以让它完全不写文字,只生成图标和箭头,再用 PowerPoint、Illustrator 或 Inkscape 手工添加标签。
Same diagram, but remove all text labels. Keep only icons, arrows, and layout.
这一步很实用。图像模型经常把英文标签写错,手工加文字反而更快、更准确。
示例二:机制示意图
机制图的关键是“因果关系”。提示词不能只列对象,还要说清楚对象之间怎么相互作用。
Create a mechanism diagram for a drug-loaded nanoparticle entering a cancer cell.
Canvas:
Square 1:1 layout, white background.
Layout:
Left side shows extracellular space.
Center shows cell membrane.
Right side shows intracellular cytoplasm and nucleus.
Mechanism:
Blue drug-loaded nanoparticles bind to receptors on the cell membrane.
The nanoparticles enter the cell through endocytosis.
Inside acidic endosomes, nanoparticles release red drug molecules.
Drug molecules move toward the nucleus and induce DNA damage.
Visual elements:
Blue spherical nanoparticles.
Red small drug molecules.
Purple cancer cell.
Endosome vesicles.
Nucleus with simplified DNA strands.
Labels:
Only include:
"Receptor binding"
"Endocytosis"
"Drug release"
"DNA damage"
Style:
High-quality biomedical vector illustration, clean outlines, soft gradients, publication-ready, no cartoon exaggeration.
Constraints:
No extra pathways.
No immune cells.
No blood vessels.
No random molecular structures.
No fake microscopy images.
机制图生成后要特别注意“模型幻觉”。例如,模型可能会随手添加不相关的细胞器、错误的信号通路,甚至把药物释放方向画反。科研图不能只看“像不像”,还要看机制是否成立。
可以用局部编辑提示词修正:
Keep the overall layout unchanged.
Remove the mitochondria-like objects.
Make the red drug molecules move from the endosome toward the nucleus.
Keep only four labels:
"Receptor binding"
"Endocytosis"
"Drug release"
"DNA damage"
局部编辑时,提示词要强调“保持整体布局不变”。否则模型可能把整张图重新画一遍,原本满意的部分也会被改掉。
示例三:论文 graphical abstract
图文摘要不是流程图的简单放大版,它要在一张图里讲清“问题—方法—结果”。结构可以设计成三段式。
flowchart LR
A[研究问题] --> B[核心方法]
B --> C[主要结果]
对应到提示词里,可以这样写:
Create a publication-quality graphical abstract.
Scientific story:
A hydrogel patch releases anti-inflammatory nanoparticles to accelerate wound healing.
Canvas:
Horizontal 16:9 layout, white background.
Layout:
Three connected zones from left to right:
1. Left: chronic wound with inflammation.
2. Middle: hydrogel patch applied on the wound surface.
3. Right: healed skin with reduced inflammation and new tissue regeneration.
Visual elements:
Hydrogel patch: transparent light blue gel.
Nanoparticles: small green dots released from the gel.
Inflammation: red glowing area and immune cells on the left.
Healing: organized collagen fibers and regenerated epidermis on the right.
Labels:
Only include:
"Inflammation"
"Hydrogel patch"
"Nanoparticle release"
"Tissue regeneration"
Style:
Elegant biomedical illustration, vector-like, soft colors, clean arrows, suitable for a journal graphical abstract.
Constraints:
No surgery tools.
No doctors or patients.
No unnecessary organs.
No extra text.
No logo.
图文摘要要避免两个常见问题:
| 问题 | 表现 | 处理方式 |
|---|---|---|
| 信息太多 | 一张图里塞满细胞、分子、曲线和文字 | 只保留核心科学故事 |
| 结果不明确 | 看不出方法带来了什么变化 | 用左右对比表达治疗前后差异 |
图文摘要不是实验记录,而是视觉化的科学主线。它要让读者在几秒内看懂研究对象、方法和结果。
定量图必须用可复现工具生成
柱状图、折线图、散点图、热图、箱线图这类图件,核心是数据准确。Nano Banana 可以参与配色建议、版式参考、图标设计,但不能直接生成最终定量图。
例如,一张折线图应该由 Python 生成:
import matplotlib.pyplot as plt
import numpy as np
days = np.array([0, 1, 3, 5, 7])
control = np.array([100, 95, 88, 80, 72])
treated = np.array([100, 90, 70, 48, 30])
plt.figure(figsize=(4, 3), dpi=300)
plt.plot(days, control, marker="o", linewidth=2, label="Control")
plt.plot(days, treated, marker="o", linewidth=2, label="Treated")
plt.xlabel("Time (days)")
plt.ylabel("Cell viability (%)")
plt.ylim(0, 110)
plt.legend(frameon=False)
plt.tight_layout()
plt.savefig("cell_viability.pdf")
plt.savefig("cell_viability.png", dpi=600)
生成定量图后,可以再让 Nano Banana 设计配套机制图或整体版式,但不要让它“凭空画一张看起来像实验结果的图”。
更安全的组合方式是:
flowchart TB
A[真实实验数据] --> B[Python / R / Origin 绘制定量图]
C[机制或流程描述] --> D[Nano Banana 生成科研示意图]
B --> E[Illustrator / Inkscape 组版]
D --> E
E --> F[最终论文图]
这样可以把“数据准确性”和“视觉表达”分开处理。
用 API 批量生成科研插图草稿
如果需要为多个实验方案生成候选图,可以使用 API(应用程序编程接口)批量生成。不同平台的模型名可能会变化,代码里的模型名称按实际可用名称替换。
import os
from pathlib import Path
from google import genai
from google.genai import types
client = genai.Client(api_key=os.environ["GEMINI_API_KEY"])
prompt = """
Create a clean scientific workflow diagram.
Canvas:
Horizontal 16:9, white background.
Layout:
Four steps from left to right:
1. Material synthesis
2. Surface modification
3. Cell incubation
4. Fluorescence imaging
Labels:
Only include:
"Material synthesis"
"Surface modification"
"Cell incubation"
"Imaging"
Style:
Minimal vector scientific illustration, blue-gray color palette, clean arrows.
Constraints:
No extra text.
No watermark.
No logo.
"""
response = client.models.generate_content(
model="gemini-2.5-flash-image-preview",
contents=prompt,
config=types.GenerateContentConfig(
response_modalities=["TEXT", "IMAGE"]
),
)
output_dir = Path("outputs")
output_dir.mkdir(exist_ok=True)
for i, part in enumerate(response.candidates[0].content.parts):
if getattr(part, "inline_data", None):
image_bytes = part.inline_data.data
(output_dir / f"scientific_figure_{i}.png").write_bytes(image_bytes)
批量生成时,不建议一次生成“最终版”。更实用的方式是一次生成 4 到 8 个草稿,从中挑选构图最清楚的一张,再做局部修改和人工重绘。
图像编辑比重新生成更稳定
科研图经常只需要改一小块,例如把箭头方向调过来、删掉多余细胞、统一颜色。如果每次都重新生成整张图,很容易越改越乱。
局部编辑提示词可以写得很短,但要明确:
Keep the same composition and style.
Change all nanoparticles from green to blue.
Remove the extra cell in the upper right corner.
Do not change the labels.
Do not add new elements.
如果要根据草图生成正式图,可以把手绘草图或 PPT 草稿作为参考,再写:
Convert this rough sketch into a clean publication-quality scientific illustration.
Preserve the layout and arrow directions.
Use a minimal vector style with white background.
Keep the labels editable-looking and simple.
Do not add extra biological structures.
“保留布局”和“不要添加新元素”非常关键。科研绘图追求可控,而不是让模型自由创作。
投稿前必须处理文字和分辨率
图像模型生成的文字经常存在拼写错误、字形变形、对齐不稳等问题。最终投稿前,建议把所有文字重新用矢量软件添加。
常见格式要求如下:
| 项目 | 建议 |
|---|---|
| 位图分辨率 | 彩色图通常 300 DPI(每英寸点数)以上,线稿可用 600 DPI 以上 |
| 矢量格式 | 优先保留 SVG(可缩放矢量图形)、PDF(可移植文档格式)或 AI 源文件 |
| 字体 | 使用 Arial、Helvetica、Times New Roman 等常见字体 |
| 线宽 | 统一线宽,避免缩小后看不清 |
| 配色 | 避免红绿强对比,尽量使用色盲友好配色 |
| 背景 | 论文图通常使用纯白或透明背景 |
| 文字 | 所有标签人工校对,避免模型生成乱码 |
| 版权 | 不要模仿特定商业插画、水印图或受版权保护图件 |
如果目标期刊要求 TIFF 格式,可以从矢量软件导出高分辨率 TIFF。不要只保存聊天窗口里的低清 PNG,然后直接投稿。
常见问题和修正办法
| 问题 | 可能原因 | 修正方式 |
|---|---|---|
| 生成的图很好看但科学上不对 | 提示词只描述风格,没有描述机制 | 增加过程、方向、因果关系 |
| 英文标签拼错 | 图像模型不擅长稳定排版文字 | 让模型不生成文字,后期手工添加 |
| 图里多出无关结构 | 限制条件不够明确 | 写清“No extra objects / No irrelevant organelles” |
| 箭头方向错误 | 流程描述不够清楚 | 用步骤编号和“from left to right”约束 |
| 画面太花 | 风格词过多或背景复杂 | 使用 white background、minimal、clean vector |
| 图像分辨率不够 | 直接下载低清预览图 | 使用高分辨率导出或矢量软件重绘 |
| 多张图风格不统一 | 每张图提示词差异太大 | 固定配色、线条、背景、图标风格 |
| 生成了假的统计图 | 模型按视觉模式补全图表 | 定量图必须由真实数据生成 |
科研图不需要炫技,真正重要的是清楚、准确、可复现。风格统一只是加分项,科学信息正确才是底线。
一套可复用的出图流程
实际使用时,可以把 Nano Banana 放进固定流程里:
- 用一句话写清楚图的核心信息;
- 把图拆成 3 到 5 个视觉区域;
- 写出每个区域必须出现的对象;
- 指定箭头方向、标签和颜色;
- 生成 4 个左右草稿;
- 选择结构最清楚的一张;
- 局部修改错误元素;
- 导入 Illustrator、Inkscape 或 PowerPoint;
- 重新添加所有文字、箭头和关键标记;
- 按期刊要求导出最终格式。
可以把提示词模板长期保存下来,每次只替换研究对象和机制描述。这样生成的图更容易保持统一风格。
Create a publication-quality scientific illustration.
Purpose:
[论文插图 / graphical abstract / 实验流程图 / 机制图]
Canvas:
[横版 16:9 / 方形 1:1 / 竖版 4:5],white background,wide margins.
Layout:
[左到右流程 / 上下结构 / 中心主体 + 周围模块 / 多面板 A-D]
Main scientific message:
[一句话写清楚这张图要表达什么]
Required elements:
- [元素 1]
- [元素 2]
- [元素 3]
Process or relationship:
[元素之间的作用关系、箭头方向、变化过程]
Labels:
Only include:
"[标签 1]"
"[标签 2]"
"[标签 3]"
Style:
Clean vector scientific illustration, publication-ready, consistent color palette, clear lines.
Constraints:
No extra text.
No watermark.
No logo.
No fake data plots.
No irrelevant biological structures.
No unreadable tiny labels.
Nano Banana 能显著降低科研示意图的起步成本,但最终质量仍取决于科研人员对图件结构、科学机制和投稿规范的把关。把它当成草图生成器和视觉设计助手,而不是最终裁判,才能画出既好看又可靠的科研图。