1

I prepared two ColumnDataSource which has different data set for y axis.

    plot.line('x', 'y', source=source, line_width=2)
    plot.circle('x', 'y', source=source, fill_color="blue", size=8)
    plot.vbar(x='x', top='y', source=source1, width=0.5, bottom=0, fill_color="red")#this part doesn't work.

And line and circle does work but when I tried to show the vbar for another data, it doesn't show but seems like the range of the axis is changed by the vbar codes.

I tried to show only the vbar graph on mini program. And vber is never shown for my dataframe.

And I found out there's a problem with my datetime object. The line graph can be shown for datetime object's xaxis. But I changed the code for showing vbar, it doesn't show anything. And when I changed the xaxis to just the number, like x=[1, 2, 3...] while top keeps the same, the vbar is shown.

Vbar cannot be used for datetime? Or is there another reason? I'm sure the datetime xaxis is the problem.

  • 3
    Possible duplicate of [One chart with two different y axis ranges in Bokeh?](https://stackoverflow.com/questions/25199665/one-chart-with-two-different-y-axis-ranges-in-bokeh) – Simon Mar 09 '18 at 23:36
  • I already saw this question and tried like this way, but it didn't show. –  Mar 09 '18 at 23:42
  • Can you provide an MVCE (https://stackoverflow.com/help/mcve) so we can test it out? – Simon Mar 10 '18 at 01:03
  • @Nora you should tell us what you tried and what didn't work. Show your research. See [ask]. –  Mar 10 '18 at 01:26

1 Answers1

2

Datetime axes are ultimately denominated in units of "milliseconds since epoch". For vbars to show up on a datetime axis, you will usually have to make the width much larger (0.5 means 0.5 milliseconds which is just going to be invisible at most typical scales)

bigreddot
  • 33,642
  • 5
  • 69
  • 122