How to change the figure style to Ticks in Seaborn?

In Seaborn, the ticks figure style is a minimalistic style that removes the background grid lines but retains the tick marks on the axes. This style focuses on presenting the data without any distracting elements and is useful when we want a clean and simple look for our plots.

What the Ticks Style Does

When we set the figure style to ticks in Seaborn using the sns.set_style() function, the following changes occur in our plots:

  • Background Grid Lines ? The background grid lines are removed, resulting in a blank canvas without any horizontal or vertical lines. This helps to reduce visual clutter and draw attention to the data points.

  • Tick Marks ? The tick marks on the x-axis and y-axis are retained. Tick marks indicate the locations along the axes and are used for reference and measurement. They provide a visual guide to the values represented by the plot.

  • Labels and Titles ? The x-axis label, y-axis label, and plot title can still be added using the usual Matplotlib commands. They are not affected by the ticks figure style.

Syntax

sns.set_style("ticks")

Example 1: Scatter Plot with Whitegrid Style

First, let's create a scatter plot using the default whitegrid style to see the difference ?

import seaborn as sns
import matplotlib.pyplot as plt

# Set whitegrid style
sns.set_style("whitegrid")

# Sample data
x = ["A", "B", "C", "D"]
y = [10, 20, 15, 25]

# Create a scatter plot
sns.scatterplot(x=x, y=y)

# Set labels and title
plt.xlabel("Categories")
plt.ylabel("Values")
plt.title("Scatter Plot with Whitegrid Style")
plt.show()

Example 2: Scatter Plot with Ticks Style

Now we'll create the same plot using the ticks style to observe the cleaner appearance without grid lines ?

import seaborn as sns
import matplotlib.pyplot as plt

# Set ticks style
sns.set_style("ticks")

# Sample data
x = ["A", "B", "C", "D"]
y = [10, 20, 15, 25]

# Create a scatter plot
sns.scatterplot(x=x, y=y)

# Set labels and title
plt.xlabel("Categories")
plt.ylabel("Values")
plt.title("Scatter Plot with Ticks Style")
plt.show()

Example 3: Line Plot with Ticks Style

The ticks style works well with different types of plots. Here's a line plot example ?

import seaborn as sns
import matplotlib.pyplot as plt

# Set ticks style
sns.set_style("ticks")

# Sample data
months = ['Jan', 'Feb', 'Mar', 'Apr', 'May']
sales = [120, 135, 140, 125, 160]

# Create a line plot
sns.lineplot(x=months, y=sales, marker='o')

# Set labels and title
plt.xlabel("Months")
plt.ylabel("Sales")
plt.title("Monthly Sales with Ticks Style")
plt.show()

Comparison

Style Grid Lines Background Best For
whitegrid Present White with grid Data comparison
ticks Removed Clean white Minimalist presentations

Conclusion

The ticks style in Seaborn creates clean, minimalist plots by removing grid lines while keeping axis tick marks. Use sns.set_style("ticks") when you want a professional, distraction-free visualization that focuses attention on your data points.

---
Updated on: 2026-03-27T10:56:58+05:30

1K+ Views

Kickstart Your Career

Get certified by completing the course

Get Started
Advertisements