question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Document xticks and yticks plot options

See original GitHub issue

Hi,

Is it possible to rename the axes tick labels such as in Bokeh? Ex: p.xaxis.major_label_overrides = {0: "zero", 5: "five", 10: "ten"} would replace given x axis integer tick labels with strings.

I could not find anything in the documentation. Thanks, Derek

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:6 (5 by maintainers)

github_iconTop GitHub Comments

2reactions
philippjfrcommented, May 4, 2018

@Forander This is something I’ve been meaning to bring up with bokeh, currently custom ticking does not seem to work with categorical axes (which is what bars uses).

2reactions
philippjfrcommented, Apr 30, 2018

This should be documented here (but isn’t). The appropriate syntax is:

hv.Curve(range(11)).options(xticks=[(0, 'zero'), (5, 'five'), (10, 'ten')])

i.e. a list of tuples.

Read more comments on GitHub >

github_iconTop Results From Across the Web

matplotlib.pyplot.xticks — Matplotlib 3.6.2 documentation
Get or set the current tick locations and labels of the x-axis. Pass no arguments to return the current values without modifying them....
Read more >
Document xticks and yticks plot options · Issue #2640 - GitHub
Hi,. Is it possible to rename the axes tick labels such as in Bokeh? Ex: p.xaxis.major_label_overrides = {0: "zero", 5: "five", ...
Read more >
Set or query x-axis tick values - MATLAB xticks - MathWorks
This MATLAB function sets the x-axis tick values, which are the locations along the x-axis where the tick marks appear.
Read more >
Changing the tick frequency on the x or y axis - Stack Overflow
The x axis' ticks are plotted in intervals of 5. Is there a way to make it show intervals of 1? python ·...
Read more >
Matplotlib.pyplot.xticks() in Python - GeeksforGeeks
The annotate() function in pyplot module of matplotlib library is used to get and set the current tick locations and labels of the...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found