![]() ![]() ![]() I've changed the column name to actual colors. If that is the case you should use multi_line instead of line. Thanks Pablo for your answer, it helped me a lotįrom the fact that you are reading the color from the df indicates me that you might want to plot several lines. P.multi_line(xs=dates,ys=vals, line_color=mypalette)īokeh.io.output_file("example_chart.html") Vals = )].amount for x in df.account.unique()] P = (width=800, height=350, x_axis_type="datetime")ĭates = )].date for x in df.account.unique()] #I sort the blank issue by making sure the dates format was the same as Pablo's sampleĭata = np.array(),ĭf = pd.DataFrame(data=data.T,columns = ) Here is my code extract from my class (I am not good at coding, so remarks are welcome) which takes data from postgresql and plot it: def getColumn(self, column): It was also blank for me and the issue came from the timestamp, you need to make sure that you are using DatetimeIndex in data affectation. Plot.line(x=df, y=df, color=df)Īs I cannot comment Pablo's answer, I am adding mine based on his answer. Plot = figure(title="Example of a line chart", x_axis_label='Date', y_axis_label='size in GB') # create a line chart where each column of measures receives a unique color and dash style Query = "select date::text,name,round(size/1024/1024/1024) as val from test order by 1,2" searched from internet and seems like should be merging a line chart and a circle chart in order to get it done.Ĭould someone please help to fix the error and show me how to do this? from bokeh.charts import Line, show, output_file, TimeSeries,Scatter I'm also not sure how to add data markers. I wrote some code as below, but it shows me a blank page. x would be date, y would be val and the legend color would be grouped by "name" I'd like to produce a line chart with data markers. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |