Environments
nsk@Figure
The core diagram environment for Neural Sketch.
Overview
The <nskFigure>
component is the foundational environment for creating diagrams using Neural Sketch. It encapsulates all drawing commands, ensures consistent styling, and resets internal state, making it easy to produce clean, publication-ready figures.
Usage
Props
Prop | Type | Default |
---|---|---|
center? | boolean | false |
Basic Example
Here's how you use <nskFigure>
to create a simple diagram:
Centering Diagrams
You can center the entire diagram horizontally by setting the center
prop to true
. This is especially useful when embedding diagrams in papers or presentations.
Custom TikZ Options
You can pass additional options directly to TikZ
using the unknown
pass through to <nskFigure>
:
Best Practices
- Always use
<nskFigure>
: It guarantees proper internal setup and teardown, maintaining consistency and preventing unexpected interactions between diagrams. - Use meaningful options: Apply global transformations (e.g.,
scale
,rotate
) sparingly to maintain clarity.
Related Components
\nskBlock>
: The primary shape-drawing primitive.\nskContainer>
: Visually groups related elements within diagrams.