Skip to content

Commit

Permalink
Release/v0.1.5 (#26)
Browse files Browse the repository at this point in the history
* Release/v0.1.1 (#6)

* Remove pyscaffold leftovers (#2)

* updated changelog

* removed pyscaffold url from setup.cfg

* updated readme with empty docs

* Multiple scatter plot (#3)

* basic support for pandas series

* added limits property to axis

* added hacky multiple scatter via color param

* quick and dirty name setting

* added legend in splapdash support

* moved drawing functionality to separate module

* adding manifest for including dataset

* added legend draw test

* added some tests for pandas api

* added faux test for color array

* Basic docs (#4)

* first go at making basic docs

* updated readme

* updated the examples

* adding a tentative deploy step (#5)

* updated changelog

* Release/v0.1.2 (#11)

* Barh series (#8)

* refactored axis to allow for arbitrary ticks and labels

* barh-plotting somewhat functional

* barh plots sort of working

* refactored axis and added basic test

* added tests on axis transformation

* added a silly test

* silly test for barh

* added lots of tests for axis class

* fixed axis limits setting

* updated isort config

* updated isort config

* updated docs

* added examples for barh usag

* Axis n ticks (#9)

* added func for determining n_ticks

* updated docs

* added a random test for pandas api

* updated travis ci for pypi deployment on tags (#10)

* updated changelog for v0.1.2

* Release/v0.1.3 (#16)

* Release/v0.1.4 (#21)

* Plot options (#18)

* initial stab at global figure options

* added figure options

* pandas api needs overhaul

* added some docstrings

* fixed bug in drawing, needs tests

* added tests for axis drawing

* fixed extra args passed in pandas api

* fixed extra args passed in pandas api

* added test for drawing canvas

* added some docs in drawing module

* updated docs for API ref

* added custom api docs

* revert makefile change

* updated docstrings

* updated docs with new options for plotting

* fixed the drawing tests

* updated examples and changelog

* Plots testing (#19)

* added tests for linear plot

* added tests for plot function

* fixed plot series test

* cleaning up pandas_api module

* switching from if else to singledispatch

* stacking of singledispatch register

* added test for get_label func

* added test for barh with index extraction

* added test for single boxplot

* Plots testing (#20)

* added tests for linear plot

* added tests for plot function

* fixed plot series test

* cleaning up pandas_api module

* switching from if else to singledispatch

* stacking of singledispatch register

* added test for get_label func

* added test for barh with index extraction

* added test for single boxplot

* tests for multi boxplot passing

* updated changelog

* updated changelog
  • Loading branch information
CDonnerer committed Jan 18, 2021
1 parent b6081d0 commit 8b7c7e1
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 33 deletions.
8 changes: 8 additions & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,14 @@ Changelog
=========


Version 0.1.5
-------------
- Allow to plot multiple scatters via 2d np arrays
- Added support for datetime types
- Added pandas visualisation example docs
- General support for adding legend to plot via ``label`` keyword


Version 0.1.4
-------------
- Fixed bug in x-axis drawing, spurious rounding
Expand Down
60 changes: 27 additions & 33 deletions examples/basic_usage.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,39 +2,33 @@

import shellplot as plt

x = np.arange(-3, 6, 0.01)
y1 = np.cos(x)
y2 = np.sin(x)
y3 = y1 + y2
x = np.arange(-4, 4, 0.01)
y = np.cos(x)
plt.plot(x, y, xlabel="x", ylabel="f(x)", figsize=(60, 25))

y = np.vstack((y1, y2))
x = np.vstack((x, x))
plt_str = plt.plot(
x,
y,
figsize=(40, 21),
xlim=(0, 3),
ylim=(-1, 1),
xlabel="x",
ylabel="cos(x)",
return_type="str",
)
print(plt_str)

plt.plot(x, y, labels=("cos", "sin"), figsize=(80, 30)) # , ylim=(-1.5, 1.5))

# plt_str = plt.plot(
# x,
# y,
# figsize=(40, 21),
# xlim=(0, 3),
# ylim=(-1, 1),
# xlabel="x",
# ylabel="cos(x)",
# return_type="str",
# )
# print(plt_str)
#
#
# x = [np.random.randn(100) for i in range(3)]
# plt.boxplot(x, labels=np.array(["dist_1", "dist_2", "dist_3"]), figsize=(40, 25))
#
# x = np.random.randn(1000)
# plt.hist(x, bins=12, figsize=(40, 20), xlabel="normal distribution")
#
# x = np.logspace(0, 1, 3)
# plt.barh(
# x,
# labels=np.array(["bar_1", "bar_b", "bar_3"]),
# xlabel="my_fun_bars",
# figsize=(40, 20),
# )
x = [np.random.randn(100) for i in range(3)]
plt.boxplot(x, labels=np.array(["dist_1", "dist_2", "dist_3"]), figsize=(40, 25))

x = np.random.randn(1000)
plt.hist(x, bins=12, figsize=(40, 20), xlabel="normal distribution")

x = np.logspace(0, 1, 3)
plt.barh(
x,
labels=np.array(["bar_1", "bar_b", "bar_3"]),
xlabel="my_fun_bars",
figsize=(40, 20),
)

0 comments on commit 8b7c7e1

Please sign in to comment.