Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make radius dimension configurable for circles #626

Closed
bryevdv opened this issue May 14, 2014 · 6 comments
Closed

Make radius dimension configurable for circles #626

bryevdv opened this issue May 14, 2014 · 6 comments

Comments

@bryevdv
Copy link
Member

bryevdv commented May 14, 2014

The notion of a "circle with radius" implicitly assumes 1-1 aspect ratio. If the aspect is not 1-1, the "proper" thing would be to draw ellipses. However, it is often desired to draw circles anyway, even with non 1-1 aspect As a practical matter we have to pick one dimension to measure screen distance along. Currently this dimension is fixed to be the x axis. Propose making the dimension configurable with a radius_dim parameter that takes the following values:

  • "x" measure screen distance along x-axis
  • "y" measure screen distance along y-axis
  • "min" use min screen distance
  • "max" use max screen distance
@bryevdv bryevdv mentioned this issue May 14, 2014
@bryevdv bryevdv added this to the 0.5 milestone Jun 5, 2014
@mattpap mattpap self-assigned this Jun 11, 2014
@bryevdv bryevdv removed this from the 0.5 milestone Jun 24, 2014
@etch32
Copy link

etch32 commented Sep 18, 2014

Just spoke to @bryevdv regarding this feature. My use case would be specify which axis to use. Currently to scale to y-axis values I need to multiply radius by plot_height/plot_width * x_range/y_range. Workable so feature isn't urgent but would be convenient.

@damianavila damianavila added this to the long-term milestone Oct 10, 2014
@bryevdv bryevdv modified the milestones: 0.8, long-term Jan 9, 2015
@damianavila
Copy link
Contributor

status: low priority

@bryevdv
Copy link
Member Author

bryevdv commented Feb 9, 2015

Accidental push to master. Screenshot attached below (would have been in PR)

from bokeh.plotting import figure, output_file, show, VBox

p1 = figure(width=250, height=250)
p1.circle([2,4,6], [1000, 2000, 3000], radius=1)

p2 = figure(width=250, height=250)
p2.circle([2,4,6], [10, 20, 30], radius=1, radius_dimension='y')

output_file("foo.html")

show(VBox(p1, p2))

screen shot 2015-02-09 at 11 18 41 am

@VictorBoya
Copy link

Hello

Please i intend to produce a bubble graph in Bokeh, but do not seem to find a way of supplying different values for size. A CDS with x,y and z columns. Have used p.circle(x,y, size=z, source=source), radius and radius_dimensions do not take a column. Any help please! Thanks
image

@bryevdv
Copy link
Member Author

bryevdv commented May 28, 2019

@Venedictos There are several ways to have many circles with different sizes, but GitHub is not the appropriate place to ask suppose questions. Please ask again on the Bokeh Discourse site

@VictorBoya
Copy link

@bryevdv thanks. I will. Cheers

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants