Hi all
I am trying to build with Bokeh a graph I’m using actually with Maplotlib. It’s a scatterplot (or a kind of bubble graph) with IP addresses as X,Y.
In Bokeh, I am trying to get the same result.
I’ve done this
p = figure(tools=TOOLS, plot_width=700, plot_height=500)
add a circle for the IP dataset. Size varies with nb of connection
p.circle(conn[‘x’], conn[‘y’], size=conn[‘count’]*20, color=“navy”, alpha=0.7)
format labels and ticks to enhance readibility
p.xaxis.axis_label = “Source IP”
p.xaxis[0].formatter = CategoricalTickFormatter()
p.yaxis.axis_label = “Destination IP”
p.yaxis[0].formatter = CategoricalTickFormatter()
My issue is I cannot get the good ticks. I’d like to be able to :
-
say that the ticks are in another series than the value (ie IP addresses strings)
-
give a call back to transform the value into the tick
The dataset is :
count dstip srcip x y
0 3 192.168.1.2 192.168.1.1 3232236777 3232236778
1 1 192.168.1.3 192.168.1.1 3232236777 3232236779
2 1 192.168.1.99 192.168.1.1 3232236777 3232236875
3 2 192.168.1.22 192.168.1.99 3232236875 3232236798
Thanks for your help. And Merry Christmas !

