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

Support plotting to use pixel_edges instead of pixel_values #176

Merged
merged 23 commits into from
Jul 31, 2019
Merged
Changes from 1 commit
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
b072595
Added edges parameter for getting pixel_edges instead of pixel_values
yashrsharma44 May 23, 2019
b124e6e
Corrected some changes of the plotting test
yashrsharma44 May 25, 2019
09a2621
Added a helper function to get pixel_edges from pixel_values
yashrsharma44 May 25, 2019
65ccdb5
Added changes for supporting new API for sunpy plotting
yashrsharma44 May 25, 2019
2de3013
PEP8 fixes
yashrsharma44 May 25, 2019
b4103db
Removed stray comments
yashrsharma44 May 25, 2019
2184fb8
Added changes to the internal API of sequence plotting
yashrsharma44 Jun 11, 2019
f7982e2
Changed the helper function `_get_extra_coord_edges` to work with `nd…
yashrsharma44 Jun 11, 2019
d7638e1
Modified the `test_sequence_plotting.py` to work with the new API cha…
yashrsharma44 Jun 11, 2019
3639eb0
Added the test which was creating the issue
yashrsharma44 Jun 11, 2019
7f256a5
Removed a portion of code which was using 1D axis_ranges instead of d…
yashrsharma44 Jul 9, 2019
9948a5a
Added some test changes
yashrsharma44 Jul 9, 2019
0642569
Changed the expected values to a more appropriate one
yashrsharma44 Jul 9, 2019
4c197d7
PEP8 fixes
yashrsharma44 Jul 9, 2019
2af9fff
Added a changelog
yashrsharma44 Jul 15, 2019
90dc63c
Corrected the shape of axes_ranges for 1D_animate_cube
yashrsharma44 Jul 25, 2019
3e09f6a
Edited the comments for reducing the dimensions for plot_axis_indices
yashrsharma44 Jul 26, 2019
fe975c4
Uncommented some parts of seq_plotting
yashrsharma44 Jul 26, 2019
21eb3ea
PEP8 fixes
yashrsharma44 Jul 26, 2019
c5197df
Removed redundant part from _get_extra_coord_edges
yashrsharma44 Jul 30, 2019
c1416fe
Corrected the name axes_coordinates
yashrsharma44 Jul 31, 2019
ff51ffd
Typo Error
yashrsharma44 Jul 31, 2019
644fb72
Minor changes in test cases
yashrsharma44 Jul 31, 2019
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions ndcube/mixins/plotting.py
Original file line number Diff line number Diff line change
Expand Up @@ -371,6 +371,16 @@ def _animate_cube_1D(self, plot_axis_index=-1, axes_coordinates=None,
else:
unit_x_axis = None
# Put xdata back into axes_coordinates as a masked array.

DanRyanIrish marked this conversation as resolved.
Show resolved Hide resolved
if len(xdata.shape) > 1:
# Reduce the shape of the array into a 1D array by taking mean along all axis other than plot_axis_index
index = utils.wcs.get_dependent_data_axes(self.wcs, plot_axis_index, self.missing_axes)
reduce_axis = np.where(index == np.array(plot_axis_index))[0]

index = np.delete(index, reduce_axis)
# Reduce the data by taking mean
xdata = np.mean(xdata, axis=tuple(index))

axes_coordinates[plot_axis_index] = xdata
# Set default x label
default_xlabel = "{0} [{1}]".format(xname, unit_x_axis)
Expand Down