Skip to content

Make grid configurable #67

@federico-razzoli

Description

@federico-razzoli

After #54 , grid is a boolean setting. Let's preserve this for simplicity. But optionally, one should be able to set it to a dictionary of grid characteristics, supporting the whole Gnuplot syntax:

# Basic grid control
set grid                    # Enable grid
unset grid                  # Disable grid

# Grid line styles
set grid linetype 0         # Use default linetype
set grid linetype 1         # Use linetype 1 (solid)
set grid linetype 2         # Use linetype 2 (dashed)
set grid linetype 3         # Use linetype 3 (dotted)

set grid linewidth 0.5      # Thin grid lines
set grid linewidth 1        # Normal grid lines  
set grid linewidth 2        # Thick grid lines

set grid linecolor rgb "gray"     # Gray grid
set grid linecolor rgb "#cccccc"  # Light gray grid
set grid linecolor rgb "black"    # Black grid

# Combined style settings
set grid linetype 2 linewidth 0.5 linecolor rgb "gray"

# Control which axes show grid
set grid xtics              # Grid for x-axis tics only
set grid ytics              # Grid for y-axis tics only  
set grid xtics ytics        # Grid for both axes (default)
set grid noxtics            # No x-axis grid
set grid noytics            # No y-axis grid

# Control major vs minor grid lines
set grid xtics mxtics       # Major and minor x-axis grid
set grid ytics mytics       # Major and minor y-axis grid

# Layering (where grid appears)
set grid back               # Grid behind data (default)
set grid front              # Grid in front of data

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions