Skip to content

Export and share

Save a figure, export many trials at once, or reuse a view in the app or in code.

In the app

Goal Where
Save the figure or replay on screen Export → Current figure
Export many trials and their tables Export → Export bundle
Share a view or copy its code Share → Link or Code
Reuse the figure settings My designs, or Share → Settings file

In Essentials mode, Export holds Current figure only; Export bundle is in Full.

For step-by-step instructions, see the export tutorials.

Cite what you export

Every file you export says how to cite Scanpath Studio in its own metadata: the PNG's text chunks, the SVG's <metadata>, the PDF's document properties, the HTML page's <head>, and the GIF's and MP4's comment. Nothing is drawn on the figure.

  • Cite, under each download and in Share → Code, gives a one-line figure credit, the APA reference and BibTeX, and .bib and .ris files for Zotero, Mendeley or EndNote. For the bundled demo, OneStop or PoTeC, it cites the corpus too.
  • An export bundle has a CITATION.bib, and its README.md a Cite section.
  • Figure & canvas → Credit adds a small Made with Scanpath Studio line under the plot, for a figure shared without its caption. In code, pass show_credit=True, or --credit to render.
  • In code, cite and scanpath-studio cite print the citation.

A link reopens the trial and its settings for anyone who has the same dataset. All controls → Under the plot says what the recipient needs.

Reproduce a figure

Open Share → Code and copy the Python or CLI code. It carries the figure's settings and your column mapping. For a dataset you imported, replace the placeholder file paths with your own. Render in code shows a minimal example.

For a PNG at print size, pass width_mm and dpi to save_figure, or --width-mm and --dpi to render. To edit the layers in a vector editor, save each layer to a separate file with save_figure_layers or render --separable-layers. In the app's export bundle, this is Layers as separate files.

Batch export

In the app, Export bundle → Trials to include picks the trials: This trial, All filtered trials, All trials of one participant, All trials of one text or All trials, ignoring filters. For a scripted batch, loop over the trial list:

Python: one HTML figure per trial
from pathlib import Path

import scanpath_studio as sps

words, fixations = sps.load_sample_data()
out = Path("figures")
out.mkdir(exist_ok=True)

for pid, tid in sps.list_trials(words, fixations).itertuples(index=False):
    fig = sps.plot_scanpath(words, fixations, pid, tid)
    sps.save_figure(fig, out / f"{pid}_{tid}.html")

Use the data loaders for your own files. The CLI's render writes one trial per run.

Replay export

With Animate on, Export → Current figure saves the replay as HTML, GIF or MP4. The CLI's render --animate saves interactive HTML only. For a GIF or MP4 in Python:

Python: save a GIF or MP4
from pathlib import Path

import scanpath_studio as sps
from scanpath_studio.animation_export import export_animation

words, fixations = sps.load_sample_data()
replay = sps.animate_scanpath(words, fixations, "l37_1129", "l37_1129_2_1_1_Ele")
Path("replay.mp4").write_bytes(export_animation(replay, fmt="mp4"))

Use fmt="gif" and a .gif filename for GIF output.

Export setup and troubleshooting · Python save options · CLI options