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

size ignored in Scatter? #1589

Open
guillaumew16 opened this issue Feb 25, 2023 · 1 comment
Open

size ignored in Scatter? #1589

guillaumew16 opened this issue Feb 25, 2023 · 1 comment

Comments

@guillaumew16
Copy link

When using Object model, setting the keyword size to Scatter(...) does not modify the size of the points. Setting default_size works as expected. Using pyplot works as expected, weirdly. Version of bqplot is 0.12.36.

For example, this affects the provided example https://github.com/bqplot/bqplot/blob/master/examples/Marks/Object%20Model/Scatter.ipynb. Here is a MWE:

import numpy as np
import bqplot as bq
import bqplot.pyplot as plt

N = 50
a = np.random.rand(N)
x, y = np.random.randn(2, N)

# pyplot works as expected
fig = plt.figure()
plt.scatter(x, y, size=a)
fig

# Object model does not work as expected
xs = bq.LinearScale()
ys = bq.LinearScale()
xax = bq.Axis(scale=xs, label="X")
yax = bq.Axis(scale=ys, orientation="vertical", label="Y")
scat = bq.Scatter(x=x, y=y, scales={"x": xs, "y": ys}, size=a)
fig = bq.Figure(marks=[scat], axes=[xax, yax])
fig

I hope I did not miss something obvious... Thanks in advance!

@fcichos
Copy link

fcichos commented May 28, 2023

Try with the parameter name default_size instead.

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

No branches or pull requests

2 participants