Closed andrewheusser closed 7 years ago
@jeremymanning let me know when you've had a chance to take a peek at the plot function and ill merge this into master
This looks fantastic! Some suggestions:
plot.py:
draw.py:
if bullettime:
if ‘precog’ in kwargs.keys() and not precog:
<output warning that precog will be ignored because bullettime is specified>
if ‘chemtrails’ in kwargs.keys() and not chemtrails:
<output warning that precog will be ignored because bullettime is specified>
precog = True
chemtrails = True
and then you ignore bullettime from there on.
set_data
overwrites if used one after another. you have to specify the whole dataset to plot in one go. I could slice the data and concatenate the precog and chemtrails with filler values for the line+tail, but it seems like more work then it is worth. the way its set up currently, bullettime
plots the full low-opacity data and then the line+tail on top of it. im going to leave this as it is for now, but will open an issue if you think its worthwhile.@jeremymanning i addressed each of your bullets above, and i think we should be good to merge. when you get a chance, can you take a look, and i'll merge and release 0.2.0 on pip? we should probably do this before tomorrow so we are all up to date for the sprint!
this looks great-- merging!
This was a big refactor, with some new features and also some style changes. Changes include:
The way we handle args. Now, all keywords are handled explicitly, instead of unpacking them using the
**kwargs
syntax. This makes the code much cleaner, and easier to parse arguments.The organization of the plotting code. I eliminated the separate static and animate code bases, bc there was a lot of redundant code and handling args was a mess. its now organized into a plot function, which is the main plotting function that also handles data manipulation prior to plotting, and a draw function, which handles all static and animated drawing.
Plot styling. All styles are now consistent, the static plots are now the same as the animated plots. Also, all lines/points are thinner.
New keyword arguments to the plot function: -
fmt
in 0.1.0, format strings were handled as arguments, but now they are passed as a kwarg. since thefmt
kwarg is the first param after the data, the API in 0.1 and 0.2 is the same, except in 0.1 format strings could be passed in any position, and now they must be passed immediately after the data. -title
can be passed to add a title to the plot -elev
can be passed to change the elevation of the plot. useful for static plots in jupyter notebooks -azim
can be passed to change the azimuth of a plot. useful for static plots in jupyter notebooks -precog
is an animation only feature which plots a low-opacity trace ahead of the data (similar tochemtrails
but in the opposite direction. -bullettime
(animation only) is the same as the combinations ofprecog
andchemtrails
-animate='spin'
will create a "static" plot (i.e. all the data is plotted at once) that rotates -return_data
has been eliminated. the data is now always returned by defaultBugs fixed:
ndims-rank
columns of zeros.