Removing axes and background gridlines in BQPLOT

105 views Asked by At

I am trying to find a way to remove the gridlines and the axes in bqplot (jupyter notebook).

I have tried the lines:

    ax_x = Axis(scale=x_ord)
    ax_y = Axis(scale=y_sc)
    ax_x.grid_lines = 'none'
    fig = bplt.figure(axes=[ax_x, ax_y])

Yet it doesn't seem to work. Can anybody suggest something that works?

1

There are 1 answers

0
Godjenka On

I've watched a video that guided me, this is how I went about it:

    fig = bplt.figure()
    fig.layout.width  = "500px"
    fig.layout.height ="500px"
    scat = bplt.scatter(x,y, colors = ["yellow"], stroke="black", 
    stroke_width=2.0, default_size=300)
    bplt.axes()['x'].grid_lines = "none"
    bplt.axes()['y'].grid_lines = "none"
    bplt.axes()['x'].color = "white"
    bplt.axes()['y'].color = "white"
    bplt.axes()['x'].num_ticks = 0
    bplt.axes()['y'].num_ticks = 0
    bplt.show()