bokeh timeseries plot : how to format x axis?

I am using bokeh (TimeSeries) to generate plots with Django and I do not manage to format time on the x axis :

data2 = dict(depth=Y2['depth'],date=X2['date'])
plot = TimeSeries(data2, title="test", xscale='datetime', xlabel = 'time' , ylabel='depth')
script, div = components(plot, CDN)

return render(request, "simple_chart3.html", {"the_script": script, "the_div": div})

X2[‘date’] is an array of datetime.

I get the following plot

Depth versus time

How to format the x axis ?

Thanks for any hint

Karim

Timeseries should format its axis nicely by default. Maybe you've run into a bug of some sort, but it's impossible to speculate without being able to see and run complete code. Can you provide a complete, minimal, runnable example to reproduce what you are seeing? In anycase there is a large section on formatting axes in the user's guide:

  http://bokeh.pydata.org/en/latest/docs/user_guide/styling.html#axes

Thanks,

Bryan

···

On Oct 21, 2016, at 10:05 AM, [email protected] wrote:

I am using bokeh (TimeSeries) to generate plots with Django and I do not manage to format time on the x axis :

data2 = dict(depth=Y2['depth'],date=X2['date'])

plot
= TimeSeries(data2, title="test", xscale='datetime', xlabel = 'time' , ylabel='depth')

script
, div = components(plot, CDN)

return render(request, "simple_chart3.html", {"the_script": script, "the_div": div})
X2['date'] is an array of datetime.

I get the following plot

Depth versus time

How to format the x axis ?

Thanks for any hint

Karim

--
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/10f9d8c5-fa32-49fb-8bb9-702826ed3df9%40continuum.io.
For more options, visit https://groups.google.com/a/continuum.io/d/optout.