Scale Examples

Scale Examples

This example demonstrates different axis scaling options including logarithmic and symmetric logarithmic (symlog) scales.

Files

  • scale_examples.f90 - Source code
  • log_scale.png/pdf/txt - Logarithmic scale example
  • symlog_scale.png/pdf/txt - Symmetric logarithmic scale example

Running

make example ARGS="scale_examples"

Features Demonstrated

  • Logarithmic scaling: For exponential growth visualization
  • Symmetric log: Handles positive and negative values with log-like behavior
  • Linear threshold: Symlog parameter controls transition to linear near zero
  • Automatic tick generation: Smart tick placement for non-linear scales

Output

Log Scale

log_scale.png

ASCII output preview:

Log Scale Example
+--------------------------------------------------------------------------------+
|10000   *                                                                       |
|                                                                               |
|1000      *                                                                     |
|                                                                               |
|100         *                                                                   |
|                                                                               |
|10            *                                                                 |
|                                                                               |
|1+--------+----------+----------+----------+----------+--------+              |
  0        2          4          6          8         10                       |
+--------------------------------------------------------------------------------+
                                       x
log(y)

Full ASCII Output: Download log_scale.txt | ASCII Format Guide

Download PDF

Symlog Scale

symlog_scale.png

ASCII output preview:

Symlog Scale Example
+--------------------------------------------------------------------------------+
|100                                                                   *         |
|                                                                                |
|10                                                             *                |
|                                                                                |
|1                                                      *                        |
|0     *     *     *                            *                               |
|-1                         *            *                                      |
|                                                                               |
|-10                   *                                                        |
|                                                                               |
|-100              *                                                            |
+--------+----------+----------+----------+----------+--------+                 |
-10     -5         0          5          10        15                          |
+--------------------------------------------------------------------------------+
                                       x
symlog(y)

Full ASCII Output: Download symlog_scale.txt | ASCII Format Guide

Download PDF