Datetime axis inverted direction

Hi all,

This is the first time I ask a question here, I’m quite new using bokeh so I hope someone can help me.

I am trying to invert the direction of the X axis when using datetime formatting, .i.e. display the most recent dates at the left side of the axis. For instance in the very simple sample I attach I would like to see the Feb 15th at the very left of the chart and the 12th at the right.

Could anyone give me some advice.

Thank you!

Hi,

If you are using the default auto-ranging DataRange1d, which without more information I assume you are, then you can set the "flipped" property to True:

  plot.x_range.flipped = True

See,

  https://bokeh.pydata.org/en/latest/docs/reference/models/ranges.html#bokeh.models.ranges.DataRange1d.flipped

Thanks,

Bryan

···

On Feb 12, 2019, at 08:55, [email protected] wrote:

Hi all,

This is the first time I ask a question here, I'm quite new using bokeh so I hope someone can help me.

I am trying to invert the direction of the X axis when using datetime formatting, .i.e. display the most recent dates at the left side of the axis. For instance in the very simple sample I attach I would like to see the Feb 15th at the very left of the chart and the 12th at the right.

Could anyone give me some advice.

Thank you!

--
You received this message because you are subscribed to the Google Groups "Bokeh Discussion - Public" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit https://groups.google.com/a/continuum.io/d/msgid/bokeh/b56da95a-78b5-4b9a-abe1-5156e2c3e460%40continuum.io.
For more options, visit https://groups.google.com/a/continuum.io/d/optout.
<bokeh_plot_sample.png>

Bryan,

This worked exactly as needed.

Thank you very much for the quick response!

···

Lois Rilo Antelo

Eficent Business and IT Consulting Services, S.L.

(+34) 679052448 | [email protected] | http://www.eficent.com

Twitter: lreficent_erp