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

Remove default width/height for static image renderers #3240

Merged
merged 1 commit into from
Jun 11, 2021

Conversation

jonmmease
Copy link
Contributor

This takes care of #2651.

Now the image size precedence is:

  • width/height provided to fig.show() (e.g. `fig.show(width=700, height=400))
  • width/height specified in figure (e.g. `px.scatter(..., width=800, height=500))
  • default_width/default_height specified in the kaleido scope (e.g. pio.kaleido.scope.default_width)

Now the image size precedence is:
 - width/height provided to fig.show()
 - width/height specified in figure
 - width/height specified in the kaleido scope
@nicolaskruchten
Copy link
Contributor

Note to self: test against #2933

thanks Jon!

@nicolaskruchten nicolaskruchten merged commit b4811d6 into master Jun 11, 2021
@nicolaskruchten
Copy link
Contributor

So we also need to set pio.kaleido.scope.default_(width|height) = None somewhere, right? because without explicitly doing that I'm still getting those defaults.

@nicolaskruchten
Copy link
Contributor

Err.. I guess what I mean is that for me, pio.kaleido.scope.default_(width|height) are still taking precedence over the other two.

@jonmmease
Copy link
Contributor Author

Huh, here's what I'm seeing:

args to show take precedence over everything:
Screenshot_20210614_071313

Figure dimensions take precedence when nothing specified in show
Screenshot_20210614_071254

Scope defaults take precedence when no args to show and no figure dimensions specified
Screenshot_20210614_071329

@nicolaskruchten
Copy link
Contributor

Hmmm that's not what I'm seeing... I pulled master and did pip install -e . and here is what I get:

image

@jonmmease
Copy link
Contributor Author

Ok, I didn't try on master, just this branch, so maybe something funny is going on there.

@nicolaskruchten
Copy link
Contributor

Running pip install -e . on the tip of this branch gives me the same output as I have on master... is there an uncommitted file or something here?

@archmoj archmoj deleted the static_renderer_default_size branch November 23, 2021 23:35
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

Successfully merging this pull request may close these issues.

None yet

2 participants