Giter VIP home page Giter VIP logo

fillplots's Introduction

fillplots -- Library to plot regions and boundaries given inequalities

Links:

fillplots is a library to plot regions and boundaries given systems of inequality. Here is a simple example to fill region like a piece of pie.

>>> from fillplots import plot_regions
>>> plot_regions([
...     [(lambda x: (1.0 - x ** 2) ** 0.5, True),
...      (lambda x: x,)]
... ], xlim=(0, 1), ylim=(0, 1))
<fillplots.api.Plotter object at 0x...>

See documentation and examples for more information.

You can install fillplots from PyPI:

pip install fillplots

License

fillplots is licensed under the terms of the BSD 2-Clause License. See the COPYING for more information.

fillplots's People

Contributors

tkf avatar

Stargazers

 avatar qrebjock avatar Ze-Zheng Wu avatar Aditya Zutshi avatar Serhii avatar esehara avatar

Watchers

 avatar James Cloos avatar Aditya Zutshi avatar  avatar

Forkers

zutshi akriaueno

fillplots's Issues

No module named fillplots

I've just discovered fillplots module, and I think it could help me with my plotting needs! I've installed it using pip, and I would like to use it into an Ipython Notebook.

I currentyl use Jupyter, using sage -ipython notebook order, but when I try to import the module, I get the message

ImportError: No module named fillplots

Do you know why can it be?

KeyError: 'axes.color_cycle'

from fillplots import plot_regions
plotter = plot_regions([
    [(lambda x: x ** 2,),  # x ^ 2 > 0 and
     (lambda x: x + 5,)],  # x + 5 > 0
])

KeyError Traceback (most recent call last)
in
2 plotter = plot_regions([
3 [(lambda x: x ** 2,), # x ^ 2 > 0 and
----> 4 (lambda x: x + 5,)], # x + 5 > 0
5 ])

~/development/python_env/NeuralShieldEnv/lib/python3.7/site-packages/fillplots/api.py in plot_regions(regions, *args, **kwds)
150 'Passing ax to plot functions is not implemented')
151 plotkwds['ax'] = kwds.pop('ax')
--> 152 plotter = Plotter(regions, *args, **kwds)
153 plotter.plot(**plotkwds)
154 return plotter

~/development/python_env/NeuralShieldEnv/lib/python3.7/site-packages/fillplots/api.py in init(self, regions, config, xlim, ylim)
123 def init(self, regions, config='default',
124 xlim=(-10, 10), ylim=(-10, 10)):
--> 125 config = get_config(config) or config
126 super(Plotter, self).init(config, regions)
127 self.config.xlim = xlim

~/development/python_env/NeuralShieldEnv/lib/python3.7/site-packages/fillplots/api.py in get_config(name)
13 def get_config(name):
14 if name in styles:
---> 15 return Config(**styles[name])
16
17

~/development/python_env/NeuralShieldEnv/lib/python3.7/site-packages/fillplots/core.py in init(self, *args, **kwds)
90 if not hasattr(self, 'fill_color_cycle'):
91 from .mplcolors import fill_color_list
---> 92 self.fill_color_cycle = itertools.cycle(fill_color_list())
93 # FIXME: this does not work when initialized before the base
94 # config (and then base config is set afterwards).

~/development/python_env/NeuralShieldEnv/lib/python3.7/site-packages/fillplots/mplcolors.py in fill_color_list(alpha, colors, bg)
9 def fill_color_list(alpha=0.5, colors=None, bg=(1, 1, 1)):
10 if colors is None:
---> 11 colors = rcParams['axes.color_cycle']
12 rgbs = map(colorConverter.to_rgb, colors)
13 return [alpha_compositing(fg, bg, alpha) for fg in rgbs]

~/development/python_env/NeuralShieldEnv/lib/python3.7/site-packages/matplotlib/init.py in getitem(self, key)
832 plt.switch_backend(rcsetup._auto_backend_sentinel)
833
--> 834 return dict.getitem(self, key)
835
836 def repr(self):

KeyError: 'axes.color_cycle'

My environment:

absl-py==0.9.0
aiohttp==3.6.2
aiohttp-cors==0.7.0
aioredis==1.3.1
argon2-cffi==20.1.0
astor==0.8.1
astunparse==1.6.3
async-timeout==3.0.1
atari-py==0.2.6
attrs==19.3.0
backcall==0.1.0
beautifulsoup4==4.9.1
bleach==3.1.5
blessings==1.7
cachetools==4.1.0
certifi==2020.4.5.1
cffi==1.14.2
chardet==3.0.4
click==7.1.2
cloudpickle==1.3.0
colorama==0.4.3
colorful==0.5.4
-e git+https://github.com/caffett/CoRec.git@2ce08448560e442790bd0159ddd6455cf75eb775#egg=CoRec
cycler==0.10.0
decorator==4.4.2
defusedxml==0.6.0
entrypoints==0.3
filelock==3.0.12
fillplots==0.0.2
future==0.18.2
gast==0.3.3
google==2.0.3
google-api-core==1.24.0
google-auth==1.24.0
google-auth-oauthlib==0.4.1
google-pasta==0.2.0
googleapis-common-protos==1.52.0
gpustat==0.6.0
grpcio==1.29.0
gym==0.17.2
h5py==2.10.0
hiredis==1.1.0
idna==2.9
importlib-metadata==1.6.0
ipdb==0.13.2
ipykernel==5.3.4
ipython==7.14.0
ipython-genutils==0.2.0
jedi==0.17.0
Jinja2==2.11.2
joblib==0.15.1
json5==0.9.5
jsonschema==3.2.0
jupyter-client==6.1.6
jupyter-core==4.6.3
jupyterlab==2.2.5
jupyterlab-server==1.2.0
Keras-Applications==1.0.8
Keras-Preprocessing==1.1.2
kiwisolver==1.2.0
Markdown==3.2.2
MarkupSafe==1.1.1
matplotlib==3.2.1
mistune==0.8.4
mpi4py==3.0.3
msgpack==1.0.1
multidict==4.7.6
nbconvert==5.6.1
nbformat==5.0.7
networkx==2.5
# Editable install with no version control (neural-shield-zikang.xiong==0.0.1)
-e /home/zikang/development/NeuralShield
notebook==6.1.3
numpy==1.16.6
nvidia-ml-py3==7.352.0
oauthlib==3.1.0
opencensus==0.7.11
opencensus-context==0.1.2
opencv-python==4.2.0.34
opt-einsum==3.2.1
packaging==20.4
pandas==1.0.3
pandocfilters==1.4.2
parso==0.7.0
pexpect==4.8.0
pickleshare==0.7.5
Pillow==7.1.2
pkg-resources==0.0.0
prometheus-client==0.8.0
prompt-toolkit==3.0.5
protobuf==3.12.1
psutil==5.7.3
ptyprocess==0.6.0
py-spy==0.3.3
pyaml==20.4.0
pyasn1==0.4.8
pyasn1-modules==0.2.8
-e git+https://github.com/caffett/bullet3.git@5be4e9cd7d2f0a7f9a5223ffa28d088a6542b0e7#egg=pybullet
pycparser==2.20
pydot==1.4.1
pyglet==1.5.0
Pygments==2.6.1
pygraphviz==1.6
pyparsing==2.4.7
pyrsistent==0.16.0
python-dateutil==2.8.1
pytz==2020.1
PyYAML==5.3.1
pyzmq==19.0.2
ray==1.0.1.post1
redis==3.4.1
requests==2.23.0
requests-oauthlib==1.3.0
rsa==4.0
scikit-learn==0.23.1
scikit-optimize==0.7.4
scipy==1.4.1
seaborn==0.11.1
Send2Trash==1.5.0
six==1.15.0
sklearn==0.0
soupsieve==2.0.1
-e git+https://github.com/hill-a/stable-baselines.git@98e9ee97302ee2eb53f3210acdea7ebe00eaefef#egg=stable_baselines
tensorboard==1.14.0
tensorboard-plugin-wit==1.6.0.post3
tensorflow==1.14.0
tensorflow-estimator==1.14.0
termcolor==1.1.0
terminado==0.8.3
testpath==0.4.4
tflearn==0.3.2
threadpoolctl==2.0.0
torch==1.5.0
tornado==6.0.4
traitlets==4.3.3
urllib3==1.25.9
wcwidth==0.1.9
webencodings==0.5.1
Werkzeug==1.0.1
wrapt==1.12.1
yagmail==0.11.224
yarl==1.4.2
zipp==3.1.0

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.