helloB
helloB

Reputation: 3582

Change size of Fig in bqplot?

I'm new to bqplot. Trying to figure out how to resize a figure. I tried both of the following, lightly modifying example code:

fig = Figure(marks=[line], axes=[ax_x, ax_y], title='Security 1')
fig.height = 100

and

fig = Figure(marks=[line], axes=[ax_x, ax_y], title='Security 1', height = 100)

Neither of these is showing any effect. Is there a way to change the size of a bqplot?

Upvotes: 2

Views: 2122

Answers (3)

Dustin Michels
Dustin Michels

Reputation: 3236

You can also adjust the margins using fig_margin, ie:

Figure(marks=[graph], fig_margin={'top':30, 'bottom':30, 'left':0, 'right':0})

Upvotes: 0

DougR
DougR

Reputation: 3479

Use the layout object. Height must be expressed as a str with either 'px' or '%'. See example below.

fig = Figure(marks=[line], axes=[ax_x, ax_y], title='Security 1')
fig.layout.height = '100px'

Upvotes: 3

Drew
Drew

Reputation: 361

Have you tried the parameters min_width and min_height?

Upvotes: 1

Related Questions