Neural Sketch

Patterns

Using patterns for visual clarity and stylistic enhancements in diagrams.

Introduction

Patterns in Neural Sketch enhance diagram readability by providing visual distinction and stylistic refinement. Commonly used in publication-quality graphics, patterns such as lines, hatching, and dots help differentiate diagram components clearly without relying solely on color.

Pattern Demonstration

Using Patterns

Patterns can be easily applied to shapes such as blocks and containers by setting the pattern key.

pattern=<pattern value>
\nskContainer[
  border-type=dashdotted,
  text-north=Patterns,
  text-north-style={nskMidGray},
  text-north-loc=west,
]{
  \foreach \i/\p in
    {
      1/north west lines,
      2/north east lines,
      3/vertical lines,
      4/horizontal lines
    }{
      \nskBlock[
        width=1cm, height=1cm,
        fill=white,
        pattern=\p,
        x=1.5*\i
      ]
    }
}

Available Patterns

Neural Sketch provides built-in aliases for ease of use:

AliasTikZ Pattern Name
hlineshorizontal lines
vlinesvertical lines
hatchnorth east lines
rhatchnorth west lines

Example using Aliases

Here's how you can simplify your patterns using Neural Sketch's aliases:

\nskBlock[
  width=1cm, height=1cm,
  fill=white,
  pattern=hatch % equivalent to north east lines
]

Customizing Pattern Appearance

You can further customize patterns using the pattern-color key:

\nskBlock[
  width=1cm, height=1cm,
  fill=white,
  pattern=vlines,
  pattern-color=nskRed
]

This example applies vertical lines in Neural Sketch’s predefined color nskRed.

Best Practices

  • Use Patterns Sparingly: Patterns work best for highlighting distinctions. Overuse can clutter diagrams.
  • Combine with Color: Subtle color choices enhance readability.
  • Consistency: Apply the same pattern consistently to similar conceptual elements across diagrams to maintain coherence.

By thoughtfully applying patterns, you can greatly enhance the visual structure and clarity of your diagrams, ensuring they meet the high standards of publication-ready visuals.

On this page