Skip to content

Commit

Permalink
Remove a function from xformatter
Browse files Browse the repository at this point in the history
  • Loading branch information
hoxbro committed Sep 19, 2023
1 parent 12a320e commit 1579783
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions examples/user_guide/Customizing_Plots.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -650,7 +650,6 @@
"Tick formatting works very differently in different backends, however the ``xformatter`` and ``yformatter`` options try to minimize these differences. Tick formatters may be defined in one of three formats:\n",
"\n",
"* A classic format string such as ``'%d'``, ``'%.3f'`` or ``'%d'`` which may also contain other characters (``'$%.2f'``)\n",
"* A function which will be compiled to JS using pscript (if installed) when using bokeh\n",
"* A ``bokeh.models.TickFormatter`` in bokeh and a ``matplotlib.ticker.Formatter`` instance in matplotlib\n",
"\n",
"Here is a small example demonstrating how to use the string format and function approaches:"
Expand All @@ -662,10 +661,7 @@
"metadata": {},
"outputs": [],
"source": [
"def formatter(value):\n",
" return str(value) + ' days'\n",
"\n",
"curve.relabel('Tick formatters').opts(xformatter=formatter, yformatter='$%.2f', width=500)"
"curve.relabel('Tick formatters').opts(xformatter='%.0f days', yformatter='$%.2f', width=500)"
]
},
{
Expand Down

0 comments on commit 1579783

Please sign in to comment.