Skip to content

Commit

Permalink
Merge pull request #390 from nschloe/remove-scipy-test-dep
Browse files Browse the repository at this point in the history
Remove scipy test dep
  • Loading branch information
nschloe committed Feb 26, 2020
2 parents d9f636f + 012010c commit cdd1543
Show file tree
Hide file tree
Showing 6 changed files with 6,814 additions and 4,795 deletions.
11 changes: 6 additions & 5 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,9 @@ jobs:
- uses: actions/setup-python@v1
with:
python-version: "3.x"
- uses: actions/checkout@v1
- uses: actions/checkout@v2
- name: Lint with flake8
run: |
pip install --upgrade pip
pip install flake8
flake8 .
- name: Lint with black
Expand All @@ -22,16 +21,18 @@ jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [3.6, 3.7, 3.8]
steps:
- uses: actions/setup-python@v1
with:
python-version: "3.x"
- uses: actions/checkout@v1
- uses: actions/checkout@v2
- name: Install dependencies
run: sudo apt-get install -y texlive-latex-base texlive-latex-extra context python3-tk python3-scipy
run: sudo apt-get install -y texlive-latex-base texlive-latex-extra context python3-tk
- name: Install package
run: |
pip install --upgrade pip
pip install .
- name: Extract tests from README
run: |
Expand Down
10 changes: 6 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
<p align="center">
<img alt="tikzplotlib" src="https://nschloe.github.io/tikzplotlib/logo-tikzplotlib.svg" width="60%">
<a href="https://github.com/nschloe/tikzplotlib"><img alt="tikzplotlib" src="https://nschloe.github.io/tikzplotlib/logo-tikzplotlib.svg" width="60%"></a>
<p align="center">The artist formerly known as _matplotlib2tikz._</p>
</p>

[![CircleCI](https://img.shields.io/circleci/project/github/nschloe/tikzplotlib/master.svg?style=flat-square)](https://circleci.com/gh/nschloe/tikzplotlib/tree/master)
[![codecov](https://img.shields.io/codecov/c/github/nschloe/tikzplotlib.svg?style=flat-square)](https://codecov.io/gh/nschloe/tikzplotlib)
[![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg?style=flat-square)](https://github.com/psf/black)
[![Documentation Status](https://readthedocs.org/projects/tikzplotlib/badge/?version=latest&style=flat-square)](https://readthedocs.org/projects/tikzplotlib/?badge=latest)
[![awesome](https://img.shields.io/badge/awesome-yes-brightgreen.svg?style=flat-square)](https://github.com/nschloe/tikzplotlib)
[![PyPI pyversions](https://img.shields.io/pypi/pyversions/tikzplotlib.svg?style=flat-square)](https://pypi.org/pypi/tikzplotlib/)
[![PyPi Version](https://img.shields.io/pypi/v/tikzplotlib.svg?style=flat-square)](https://pypi.org/project/tikzplotlib)
[![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.1173089.svg?style=flat-square)](https://doi.org/10.5281/zenodo.1173089)
[![GitHub stars](https://img.shields.io/github/stars/nschloe/tikzplotlib.svg?style=flat-square&logo=github&label=Stars&logoColor=white)](https://github.com/nschloe/tikzplotlib)
Expand Down Expand Up @@ -105,11 +107,11 @@ Notably, [3D plots don't work](https://github.com/matplotlib/matplotlib/issues/7
### Installation

tikzplotlib is [available from the Python Package
Index](https://pypi.org/project/tikzplotlib/), so simply type
Index](https://pypi.org/project/tikzplotlib/), so simply do
```
pip3 install tikzplotlib --user
pip install tikzplotlib
```
to install/update.
to install.


### Usage
Expand Down
4 changes: 3 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,10 @@
about["__status__"],
about["__license__"],
"Operating System :: OS Independent",
"Programming Language :: Python",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.6",
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8",
"Topic :: Multimedia :: Graphics :: Graphics Conversion",
"Topic :: Scientific/Engineering :: Visualization",
],
Expand Down
11 changes: 5 additions & 6 deletions test/test_contourf.py
Original file line number Diff line number Diff line change
@@ -1,13 +1,10 @@
import matplotlib.pyplot as plt
import numpy as np
from scipy.stats import multivariate_normal

from helpers import assert_equality


def plot():
mean = np.array([1, 1])
cov = np.eye(2)
nbins = 5

fig = plt.figure()
Expand All @@ -22,7 +19,7 @@ def plot():
pos = np.empty(xi.shape + (2,))
pos[:, :, 0] = xi
pos[:, :, 1] = yi
zi = multivariate_normal(mean, cov, allow_singular=True, seed=0).pdf(pos)
zi = 2 - (xi - 1) ** 2 - (yi - 1) ** 2
ax.contourf(xi, yi, zi, 250)

ax.set_xlim(x_min, x_max)
Expand All @@ -36,7 +33,9 @@ def test():


if __name__ == "__main__":
import helpers
plot()
plt.show()
# import helpers

helpers.compare_mpl_tex(plot)
# helpers.compare_mpl_tex(plot)
# helpers.print_tree(plot())

0 comments on commit cdd1543

Please sign in to comment.