We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
The error happens when I ran the code:
import matplotlib.pyplot as plt fig = plt.figure(figsize=(25, 7)) ax1 = fig.add_subplot(111, projection='polar') ax2 = fig.add_subplot(121, projection='polar') # plot BRDF and phase function plot1 = SRF.polarplot(inc = list(np.linspace(0,85,5)), multip = 1.5, legpos = (0.,0.5), polarax=ax2, label='Surface scattering phase function', legend=True) plot2 = V.polarplot(inc = list(np.linspace(0,120,5)) ,multip = 1.5, legpos = (0.0,0.5), polarax=ax1, label='Volume scattering phase function', legend=True) fig.tight_layout()
in the example: https://github.com/TUW-GEO/rt1/blob/master/doc/examples/example_lin_comb.ipynb. The error information is:
Traceback (most recent call last): File "/Users/xushan/opt/anaconda3/envs/py310/lib/python3.10/site-packages/spyder_kernels/py3compat.py", line 356, in compat_exec exec(code, globals, locals) File "/Users/xushan/research/TUD/vodca/demo_rt1.py", line 120, in <module> plot1 = SRF.polarplot(inc = list(np.linspace(0,85,5)), multip = 1.5, legpos = (0.,0.5), polarax=ax1, File "/Users/xushan/opt/anaconda3/envs/py310/lib/python3.10/site-packages/rt1/rtplots.py", line 263, in polarplot return fig UnboundLocalError: local variable 'fig' referenced before assignment
It seems that the fig is not explicitly assigned in the function rtplots.py if polarax is not None.
fig
rtplots.py
polarax
None
The text was updated successfully, but these errors were encountered:
No branches or pull requests
The error happens when I ran the code:
in the example: https://github.com/TUW-GEO/rt1/blob/master/doc/examples/example_lin_comb.ipynb.
The error information is:
It seems that the
fig
is not explicitly assigned in the functionrtplots.py
ifpolarax
is notNone
.The text was updated successfully, but these errors were encountered: