TikZ is how much of physics and mathematics draws its figures, and Figure Studio has a dedicated mode for it. Unlike the other code editors, TikZ is not rendered in your browser — pressing Run compiles your code on Writano’s LaTeX compiler and shows the resulting figure as a preview.

Writing a figure

Open Code → TikZ / PGFPlots, write a tikzpicture (or a pgfplots axis inside one), and press Run. The fragment is wrapped in a minimal standalone document, compiled with pdflatex, and the first page is shown as your preview.

\begin{tikzpicture}
  \begin{axis}[xlabel={$x$}, ylabel={$y$}, grid=both]
    \addplot[blue, thick, samples=100] {sin(deg(x))};
  \end{axis}
\end{tikzpicture}

If the compile fails, the preview shows the actual LaTeX error first — the ! … line — with the full log underneath, so you see why before you scroll.

The preview knows your paper

A figure taken from a real paper rarely stands alone — it uses colors, \tikzset styles, and macros defined in the paper’s preamble. The preview compiles with your project’s own definitions: the main document’s preamble, any preamble files it \inputs, every .sty in the project, and color definitions found anywhere in your project’s source. A figure that uses \definecolor{mycolor}{…} from your preamble previews in the right colors, not with an “undefined color” error.

Saving and inserting

A TikZ figure is source-canonical: saving stores the .tex itself as a project file, and Export / Insert places an \input of that file into your document (with PDF and PNG as alternative formats when you need a rasterized copy). Your paper compiles the same TikZ the editor shows — there is no separate, drifting image.

Charts ⇄ pgfplots

The Chart builder and TikZ mode are connected both ways:

  • Export a chart as TikZ — a bar, line, scatter or area chart built visually exports as clean pgfplots source you can keep editing as code.
  • Open a pgfplots file as a chart — opening a .tex figure that contains a recognized pgfplots plot loads it back into the Chart builder with its data. Anything outside the recognized subset opens in TikZ code mode instead, untouched.

Tip: Figures extracted from an imported paper (tikz-fig-N.tex) open in this mode too — see Importing a LaTeX project.