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

Alpha should not be fixed #10

Open
adfaure opened this issue Feb 21, 2019 · 1 comment
Open

Alpha should not be fixed #10

adfaure opened this issue Feb 21, 2019 · 1 comment

Comments

@adfaure
Copy link
Collaborator

adfaure commented Feb 21, 2019

This issue happens with the version 2.6.1

This function takes alpha as a parameter.

The issue is that if I need a different "alpha" per job, it will override the alpha given by the
color_function call back.

For example, setting alpha equals one in this function will not work.

def color(job, palette):
  return [1, 0, 0, 1] # alpha is the last element  of the array
@mickours
Copy link
Contributor

Thanks for reporting this.

This issue seems to still be there in the current version. This is due to the fact that the alpha is set at an upper level by the Gantt visualization method:
https://github.com/oar-team/evalys/blob/master/evalys/visu/gantt.py#L64

And then directly give to the matplotlib.patch.Rectangle function here:
https://github.com/oar-team/evalys/blob/master/evalys/visu/gantt.py#L127

To solve this, maybe we can set the alpha in the palette instead of at the matplotlib function.
What do you think @bleuse?

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