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

Added matplotlib requirement #90

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

nidhin976
Copy link

Calling SixSHelpers.Angles.run_and_plot_360 getting error "name 'subplots' is not defined"

Calling  SixSHelpers.Angles.run_and_plot_360 getting error "name 'subplots' is not defined"
@nidhin976 nidhin976 closed this Sep 16, 2021
@nidhin976 nidhin976 reopened this Sep 16, 2021
@codecov
Copy link

codecov bot commented Sep 16, 2021

Codecov Report

Merging #90 (d90b2b7) into master (ee2abb4) will increase coverage by 0.00%.
The diff coverage is 100.00%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master      #90   +/-   ##
=======================================
  Coverage   88.00%   88.00%           
=======================================
  Files          18       18           
  Lines        1717     1718    +1     
=======================================
+ Hits         1511     1512    +1     
  Misses        206      206           
Impacted Files Coverage Δ
Py6S/SixSHelpers/all_angles.py 38.46% <100.00%> (+0.53%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update ee2abb4...d90b2b7. Read the comment docs.

@robintw
Copy link
Owner

robintw commented Sep 16, 2021

Thanks for the PR.

It's weird that this is happening for you, as there is specific code in the plot360 method (called by run_and_plot_360) which tries to import from matplotlib, and then gives an error if it can't. The import is deliberately inside this function, so that Py6S is useable without matplotlib installed.

On line 108 of all_angles.py there is this code:

try:
      from matplotlib.pyplot import plot, show, subplots, xlabel, ylabel
except ImportError:
      raise ImportError("You must install matplotlib to use the plotting functionality")

Can you check if that code is there in your version? It should solve this problem...

@nidhin976
Copy link
Author

Yes, I have checked the code appears the same.

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.

2 participants