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

Colorcycle problems for multiple curves on one plot. #550

Closed
DanielMurphy22 opened this issue Oct 15, 2020 · 0 comments · Fixed by #570
Closed

Colorcycle problems for multiple curves on one plot. #550

DanielMurphy22 opened this issue Oct 15, 2020 · 0 comments · Fixed by #570
Assignees
Labels

Comments

@DanielMurphy22
Copy link
Contributor

This issue is similar to #548

Expected behavior

Plotting multiple curves on the same plot should work sucessfully

Actual behavior

Creating the plot works fine, but trying to open and close Figure Options does not work.
This output stack-trace, suggests that it relates to the defined colorcycle , possibly trying to plot more curves with colors not in the cycle.

Traceback (most recent call last):
  File "C:\MantidInstall\bin\lib\site-packages\matplotlib\backends\backend_agg.py", line 388, in draw
    self.figure.draw(self.renderer)
  File "C:\MantidInstall\bin\lib\site-packages\matplotlib\artist.py", line 38, in draw_wrapper
    return draw(artist, renderer, *args, **kwargs)
  File "C:\MantidInstall\bin\lib\site-packages\matplotlib\figure.py", line 1708, in draw
    mimage._draw_list_compositing_images(
  File "C:\MantidInstall\bin\lib\site-packages\matplotlib\image.py", line 135, in _draw_list_compositing_images
    a.draw(renderer)
  File "C:\MantidInstall\bin\lib\site-packages\matplotlib\artist.py", line 38, in draw_wrapper
    return draw(artist, renderer, *args, **kwargs)
  File "C:\MantidInstall\bin\lib\site-packages\matplotlib\axes\_base.py", line 2647, in draw
    mimage._draw_list_compositing_images(renderer, self, artists)
  File "C:\MantidInstall\bin\lib\site-packages\matplotlib\image.py", line 135, in _draw_list_compositing_images
    a.draw(renderer)
  File "C:\MantidInstall\bin\lib\site-packages\matplotlib\artist.py", line 38, in draw_wrapper
    return draw(artist, renderer, *args, **kwargs)
  File "C:\MantidInstall\bin\lib\site-packages\matplotlib\lines.py", line 783, in draw
    lc_rgba = mcolors.to_rgba(self._color, self._alpha)
  File "C:\MantidInstall\bin\lib\site-packages\matplotlib\colors.py", line 177, in to_rgba
    rgba = _to_rgba_no_colorcycle(c, alpha)
  File "C:\MantidInstall\bin\lib\site-packages\matplotlib\colors.py", line 233, in _to_rgba_no_colorcycle
    raise ValueError("Invalid RGBA argument: {!r}".format(orig_c))
ValueError: Invalid RGBA argument: ''

Also, notice that two of the curves has no color at all in the settings tab. I think this relates to black and yellow which are not in the defined list in the figure options drop-down menu for colors

image

After closing the figure options and running into the unhandled exception, the plot is notably different and this should also be fixed.
Before:
image
After:
image

Steps to reproduce the behavior

I have put a script and data on babylon under DanielMurphy.
Run this script and open Figure Options on the produced plot.

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

Successfully merging a pull request may close this issue.

2 participants