Formatting labels on plots.

In Lets-Plot you can apply a formatting to:

  • axis break values.
  • labels displayed by geom_text().
  • tooltip text.
  • facet labels.

Using format string you can format values of numeric and date-time types.

In addition, you can use a string template.

In string template the value's format string is surrounded by curly braces: "... {.2f} ...".

An empty placeholder {} is also allowed. In this case a default string representation will be shown. This is also applicable to categorical values.

In [1]:
import numpy as np
import pandas as pd
from datetime import datetime
from lets_plot import *
In [2]: