How to skip some x axis label

Hi,

I try to draw Network Throughout from Linux sar command, the data store in sar.txt format is:

datetime 09:50:57 09:50:58 09:50:59
181-rxpck/s 7.00 7.00 8.00 11.00 9.00 10.00

``

The python script

from bokeh.charts import TimeSeries, show, output_file
d ={}
with open(“sar.txt”) as f:
for line in f:
items = line.split()
if items[0] == “datetime”:
v = items[1:]
values = [(“2016-09-29 %s” % i).replace(":", “-”) for i in v]
d[“datetime”] = values
else:
v = items[1:]
values = [float(i) for i in v]
d[items[0]] = values
tsline = TimeSeries(d, x=“datetime”, y=“181-rxpck/s”, title=“Timeseries”, ylabel=‘Network Throughout’, plot_width=1000)
output_file(“timeseries.html”)
show(tsline)

``

Bokeh Version: 0.12.2

Due to many data require to draw, the x axis label collapse. Can bokeh only draw every 10 second date, not all of the date ?

Solved by http://bokeh.pydata.org/en/latest/docs/user_guide/styling.html#functickformatter

在 2016年9月29日星期四 UTC+8下午9:02:33,linbo liao写道:

···

Hi,

I try to draw Network Throughout from Linux sar command, the data store in sar.txt format is:

datetime 09:50:57 09:50:58 09:50:59
181-rxpck/s 7.00 7.00 8.00 11.00 9.00 10.00

``

The python script

from bokeh.charts import TimeSeries, show, output_file
d ={}
with open(“sar.txt”) as f:
for line in f:
items = line.split()
if items[0] == “datetime”:
v = items[1:]
values = [(“2016-09-29 %s” % i).replace(":", “-”) for i in v]
d[“datetime”] = values
else:
v = items[1:]
values = [float(i) for i in v]
d[items[0]] = values
tsline = TimeSeries(d, x=“datetime”, y=“181-rxpck/s”, title=“Timeseries”, ylabel=‘Network Throughout’, plot_width=1000)
output_file(“timeseries.html”)
show(tsline)

``

Bokeh Version: 0.12.2

Due to many data require to draw, the x axis label collapse. Can bokeh only draw every 10 second date, not all of the date ?

By way of completeness, another option is to use the .line glyph method from the bokeh.plotting API, with a "datetime" axist format. This will renderer the axis using a real datetime tick formatter, instead of creating a set of categorical labels like bokeh.charts.TimeSeries seems to do.

The bokeh.charts API could currently use some improvements. Unfortunately the core team bandwidth is extremely limited, and there are other very high priorities in front. New contributors to work on charts could help speed up those improvements.

Please also note: the bokeh.charts API is almost certainly going to move into a separate package of its own, and out of the core library, before the Bokeh 1.0 release.

Thanks,

Bryan

···

On Sep 29, 2016, at 8:33 AM, linbo liao <[email protected]> wrote:

Solved by http://bokeh.pydata.org/en/latest/docs/user_guide/styling.html#functickformatter

在 2016年9月29日星期四 UTC+8下午9:02:33,linbo liao写道:

Hi,

I try to draw Network Throughout from Linux sar command, the data store in sar.txt format is:

datetime 09:50:57 09:50:58 09:50:59
181-rxpck/s 7.00 7.00 8.00 11.00 9.00 10.00

The python script

from bokeh.charts import TimeSeries, show, output_file
d ={}
with open("sar.txt") as f:
    for line in f:
        items = line.split()
        if items[0] == "datetime":
            v = items[1:]
            values = [("2016-09-29 %s" % i).replace(":", "-") for i in v]
            d["datetime"] = values
        else:
            v = items[1:]
            values = [float(i) for i in v]
            d[items[0]] = values
tsline = TimeSeries(d, x="datetime", y="181-rxpck/s", title="Timeseries", ylabel='Network Throughout',plot_width=1000)
output_file("timeseries.html")
show(tsline)

Bokeh Version: 0.12.2

Due to many data require to draw, the x axis label collapse. Can bokeh only draw every 10 second date, not all of the date ?

--
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/166725ee-273a-40cd-92a8-594db1c0c8d7%40continuum.io.
For more options, visit https://groups.google.com/a/continuum.io/d/optout.