Skip to content

Commit

Permalink
solved issue 153 allowing simple bar plots to handle 0 data sets
Browse files Browse the repository at this point in the history
  • Loading branch information
piccolomo committed Oct 30, 2022
1 parent d5ab945 commit d59c399
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 5 deletions.
1 change: 1 addition & 0 deletions plotext/_utility.py
Original file line number Diff line number Diff line change
Expand Up @@ -748,6 +748,7 @@ def bar_data(*args, width = None, mode = 'stacked'):
width = max(width, lx + ly + 2 + 1)

my = max(join(y))
my = 1 if my == 0 else my
dx = my / (width - lx - ly - 2)
Yi = [[round(el / dx, 0) for el in y] for y in Y]
Yi = transpose(Yi)
Expand Down
15 changes: 10 additions & 5 deletions readme/notes.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,11 +57,12 @@ Any new relevant idea is welcomed under request, opening an [issue report](https
- remove `trend` parameter in `text()` method
- change `text` parameter to `label` in `text()`
- change `frame` parameter to `show` in `frame()` method
- add `plotter()` function, to scatter and plot at the same time (under request)
- add `plotter()` function, to scatter and plot at the same time
- add `simple_hist()` function, just like `simple_bar()`
- change `colorize()` to output a `matrix_class()` object such that it can be inserted in `text()`, `indicator()` or any `label` parameter and any two objects can be easily summed as strings would.
- allow simple plots and fast image rendering to fit in subplots
- add matrix plot side bar
- make simple bar plots handle negative values
- allow user to decide plot legend position and frame

[Main Guide](https://github.com/piccolomo/plotext#guide), [Notes](https://github.com/piccolomo/plotext/blob/master/readme/notes.md#notes)
Expand All @@ -70,18 +71,22 @@ Any new relevant idea is welcomed under request, opening an [issue report](https

#### In version 5.2

Available on [GitHub](https://github.com/piccolomo/plotext) only:
<!--- Available on [GitHub](https://github.com/piccolomo/plotext) only:--->

- resolved issue [Issue 151](https://github.com/piccolomo/plotext/issues/151) due to wrong inheritance of nested subplots from parent figure
- resolved issue [Issue 150](https://github.com/piccolomo/plotext/issues/150) due to maximum number of subplots reached
In version 5.2.8:

- solved issue [Issue 153](https://github.com/piccolomo/plotext/issues/153) allowing bar plots to handle 0 data sets
- solved issue [Issue 151](https://github.com/piccolomo/plotext/issues/151) due to wrong inheritance of nested subplots from parent figure
- solved issue [Issue 150](https://github.com/piccolomo/plotext/issues/150) due to maximum number of subplots reached
- solved issue [Issue 142](https://github.com/piccolomo/plotext/issues/142) by removing side symbol (like ⅃) in legend for single data set
- added `xside` and `yside` parameters to `candlestick()` function, solving another bug in [Issue 138](https://github.com/piccolomo/plotext/issues/138)
- removed decimals points if axes ticks are all integers, solving [Issue 136](https://github.com/piccolomo/plotext/issues/136)
- added `marker` parameter to the `from_matplotlib()` method, solving [Issue 134](https://github.com/piccolomo/plotext/issues/134)
- made `from_matplotlib()` method to be compatible with `matplotlib 3.6`, solving [Issue 133](https://github.com/piccolomo/plotext/issues/133)
- added date time support for `xlim()` and `ylim()` methods, solving [Issue 138](https://github.com/piccolomo/plotext/issues/138)

Published on [PyPi](https://pypi.org/project/plotext):
<!--- Published on [PyPi](https://pypi.org/project/plotext): --->
In previous versions:

- fixed legend symbol for braille markers, merging [Pull Request 135](https://github.com/piccolomo/plotext/pull/135)
- allowed compatibility with Python 3.7, solving [Issue 130](https://github.com/piccolomo/plotext/issues/130)
Expand Down

0 comments on commit d59c399

Please sign in to comment.