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
ak.plot_dist
Describe the bug The example for plot_dist at https://bears-r-us.github.io/arkouda/autoapi/arkouda/plotting/index.html#arkouda.plotting.plot_dist does not work and causes a bug as follows:
plot_dist
To Reproduce
>>> b, h = ak.histogram(ak.arange(10), 3) >>> ak.plot_dist(b, h.to_ndarray()) Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/lus/scratch/khandeka/arkouda/arkouda/plotting.py", line 50, in plot_dist plt.plot(b, h, marker=".", linestyle="solid") File "/lus/scratch/khandeka/anaconda3/envs/arkouda-dev/lib/python3.12/site-packages/matplotlib/pyplot.py", line 3794, in plot return gca().plot( ^^^^^^^^^^^ File "/lus/scratch/khandeka/anaconda3/envs/arkouda-dev/lib/python3.12/site-packages/matplotlib/axes/_axes.py", line 1779, in plot lines = [*self._get_lines(self, *args, data=data, **kwargs)] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/lus/scratch/khandeka/anaconda3/envs/arkouda-dev/lib/python3.12/site-packages/matplotlib/axes/_base.py", line 296, in __call__ yield from self._plot_args( ^^^^^^^^^^^^^^^^ File "/lus/scratch/khandeka/anaconda3/envs/arkouda-dev/lib/python3.12/site-packages/matplotlib/axes/_base.py", line 481, in _plot_args axes.xaxis.update_units(x) File "/lus/scratch/khandeka/anaconda3/envs/arkouda-dev/lib/python3.12/site-packages/matplotlib/axis.py", line 1750, in update_units converter = munits.registry.get_converter(data) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/lus/scratch/khandeka/anaconda3/envs/arkouda-dev/lib/python3.12/site-packages/matplotlib/units.py", line 183, in get_converter first = cbook._safe_first_finite(x) ^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/lus/scratch/khandeka/anaconda3/envs/arkouda-dev/lib/python3.12/site-packages/matplotlib/cbook.py", line 1781, in _safe_first_finite for val in obj: ^^^ File "/lus/scratch/khandeka/arkouda/arkouda/pdarrayclass.py", line 887, in __iter__ raise NotImplementedError( NotImplementedError: pdarray does not support iteration. To force data transfer from server, use to_ndarray
If we also convert b to an ndarray as the doc should, we still get a different error:
b
ndarray
>>> ak.plot_dist(b.to_ndarray(), h.to_ndarray()) Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/lus/scratch/khandeka/arkouda/arkouda/plotting.py", line 50, in plot_dist plt.plot(b, h, marker=".", linestyle="solid") File "/lus/scratch/khandeka/anaconda3/envs/arkouda-dev/lib/python3.12/site-packages/matplotlib/pyplot.py", line 3794, in plot return gca().plot( ^^^^^^^^^^^ File "/lus/scratch/khandeka/anaconda3/envs/arkouda-dev/lib/python3.12/site-packages/matplotlib/axes/_axes.py", line 1779, in plot lines = [*self._get_lines(self, *args, data=data, **kwargs)] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/lus/scratch/khandeka/anaconda3/envs/arkouda-dev/lib/python3.12/site-packages/matplotlib/axes/_base.py", line 296, in __call__ yield from self._plot_args( ^^^^^^^^^^^^^^^^ File "/lus/scratch/khandeka/anaconda3/envs/arkouda-dev/lib/python3.12/site-packages/matplotlib/axes/_base.py", line 486, in _plot_args raise ValueError(f"x and y must have same first dimension, but " ValueError: x and y must have same first dimension, but have shapes (3,) and (4,)
Expected behavior A plot of the distribution and cumulative distribution of the histrogram data
Is this a Blocking Issue Not blocking
0
h
b = ak.concatenate([ak.array([0]), b])
Which then makes the dimensions of b and h equal and generates the plot.
Also we don't need to do plt.show() to show the plot, which is the opposite of what the docs claim.
plt.show()
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Describe the bug
The example for
plot_dist
at https://bears-r-us.github.io/arkouda/autoapi/arkouda/plotting/index.html#arkouda.plotting.plot_dist does not work and causes a bug as follows:To Reproduce
If we also convert
b
to anndarray
as the doc should, we still get a different error:Expected behavior
A plot of the distribution and cumulative distribution of the histrogram data
Is this a Blocking Issue
Not blocking
We can preprend
b
with a0
to make the dimensions equal toh
:Which then makes the dimensions of
b
andh
equal and generates the plot.Also we don't need to do
plt.show()
to show the plot, which is the opposite of what the docs claim.The text was updated successfully, but these errors were encountered: