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.

Using Patterns

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

pattern=<pattern value>
\foreach \p in {
  hatch,rhatch, hatchd, vlines, hlines,dots,
  grid,bricks, check, star5,star6
}{
  \nskBlock*[
    pattern=\p, 
    text-south=\p,
    last-pos-s={right=},
  ]
}

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
hatchdcrosshatch dots
checkcheckerboard
star5fivepointed stars
star6sixpointed stars
gridgrid
bricksbricks

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' color and opacity:

\nskBlock[
  pattern=hatch,
  pattern-color=nskRed
]

Pattern Line type

On line-based patterns you can also customize the appearance of the drawn lines:

\nskBlock[
  pattern=hatch,
  pattern-line-type=dashed,
]

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