0

When drawing a circle with Bokeh, I saw the dimensions were not quite right. Circle image

Here's the code I used to generate the circle, with two lines (one horizontal, one vertical) for comparison:

from bokeh.plotting import figure, show

plot = figure(width=800, height=800, x_range=(-100, 100), y_range=(-100, 100))

plot.circle(x=0, y=0, radius=90, line_color='black', color='black', fill_color=None)
plot.line([0, 90], [0, 0])
plot.line([0, 0], [0, 90])

show(plot)

Any idea what the issue might be? Thank you!

Will
  • 1
  • 1
  • TLDR; If you need "big circles" (or anything with a radial dimension) you have to use default auto-ranges (i.e. not explicitly set `x_range` and `y_range`) and pass `match_aspect=True` so that Bokeh can force the data aspect ratio to match the pixel aspect ratio. – bigreddot Jan 11 '23 at 17:51

0 Answers0