Skip to content

Commit

Permalink
first commit
Browse files Browse the repository at this point in the history
  • Loading branch information
mjhong0708 committed Aug 15, 2021
0 parents commit 0122c8f
Show file tree
Hide file tree
Showing 12 changed files with 1,012 additions and 0 deletions.
140 changes: 140 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,140 @@
# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
*$py.class

# C extensions
*.so

# Distribution / packaging
.Python
build/
develop-eggs/
dist/
downloads/
eggs/
.eggs/
lib/
lib64/
parts/
sdist/
var/
wheels/
pip-wheel-metadata/
share/python-wheels/
*.egg-info/
.installed.cfg
*.egg
MANIFEST

# PyInstaller
# Usually these files are written by a python script from a template
# before PyInstaller builds the exe, so as to inject date/other infos into it.
*.manifest
*.spec

# Installer logs
pip-log.txt
pip-delete-this-directory.txt

# Unit trajectory_files / coverage reports
htmlcov/
.tox/
.nox/
.coverage
.coverage.*
.cache
nosetests.xml
coverage.xml
*.cover
*.py,cover
.hypothesis/
.pytest_cache/

# Translations
*.mo
*.pot

# Django stuff:
*.log
local_settings.py
db.sqlite3
db.sqlite3-journal

# Flask stuff:
instance/
.webassets-cache

# Scrapy stuff:
.scrapy

# Sphinx documentation
docs/_build/

# PyBuilder
target/

# Jupyter Notebook
.ipynb_checkpoints

# IPython
profile_default/
ipython_config.py

# pyenv
.python-version

# pipenv
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
# However, in case of collaboration, if having platform-specific dependencies or dependencies
# having no cross-platform support, pipenv may install dependencies that don't work, or not
# install all needed dependencies.
#Pipfile.lock

# PEP 582; used by e.g. github.com/David-OConnor/pyflow
__pypackages__/

# Celery stuff
celerybeat-schedule
celerybeat.pid

# SageMath parsed files
*.sage.py

# Environments
.env
.venv
env/
venv/
ENV/
env.bak/
venv.bak/

# Spyder project settings
.spyderproject
.spyproject

# Rope project settings
.ropeproject

# mkdocs documentation
/site

# mypy
.mypy_cache/
.dmypy.json
dmypy.json

# Pyre type checker
.pyre/

# User specific settings
.idea/
pinn_env
pinn.egg-info
old
dev_tmp
test/
*.pre
*.pinn
.vscode
17 changes: 17 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# pyplot-cli

Lightweight cli tool for plotting data. Currently, only line plot is supported.

## Release note

- `0.1.0` (2021.08.15): Initialized!

## Usage

- Basic: `pyplt [filename] -x [x_index] -y [y_indices]`
- The form `-y`: index1,index2,...
- result:

![example](examples/example.png)

- more options: `--xlabel`, `--ylabel`, ... see `pyplt --help` for all options.
101 changes: 101 additions & 0 deletions examples/data.dat
Original file line number Diff line number Diff line change
@@ -0,0 +1,101 @@
x $x^2$ $x^3$
0.000000000000000000e+00 0.000000000000000000e+00 0.000000000000000000e+00
3.030303030303030387e-02 9.182736455463729169e-04 2.782647410746584576e-05
6.060606060606060774e-02 3.673094582185491667e-03 2.226117928597267661e-04
9.090909090909091161e-02 8.264462809917355601e-03 7.513148009015778016e-04
1.212121212121212155e-01 1.469237832874196667e-02 1.780894342877814129e-03
1.515151515151515194e-01 2.295684113865932227e-02 3.478309263433230700e-03
1.818181818181818232e-01 3.305785123966942241e-02 6.010518407212622413e-03
2.121212121212121271e-01 4.499540863177227401e-02 9.544480618860784818e-03
2.424242424242424310e-01 5.876951331496786668e-02 1.424715474302251303e-02
2.727272727272727071e-01 7.438016528925618653e-02 2.028549962434259349e-02
3.030303030303030387e-01 9.182736455463728908e-02 2.782647410746584560e-02
3.333333333333333703e-01 1.111111111111111327e-01 3.703703703703704886e-02
3.636363636363636465e-01 1.322314049586776896e-01 4.808414725770097931e-02
3.939393939393939226e-01 1.551882460973370015e-01 6.113476361410245113e-02
4.242424242424242542e-01 1.799816345270890960e-01 7.635584495088627854e-02
4.545454545454545858e-01 2.066115702479339178e-01 9.391435011269724797e-02
4.848484848484848619e-01 2.350780532598714667e-01 1.139772379441801042e-01
5.151515151515151381e-01 2.653810835629017428e-01 1.367114672899796823e-01
5.454545454545454142e-01 2.975206611570247461e-01 1.622839969947407479e-01
5.757575757575758013e-01 3.314967860422406432e-01 1.908617859031082609e-01
6.060606060606060774e-01 3.673094582185491563e-01 2.226117928597267648e-01
6.363636363636363535e-01 4.049586776859503967e-01 2.577009767092411363e-01
6.666666666666667407e-01 4.444444444444445308e-01 2.962962962962963909e-01
6.969696969696970168e-01 4.857667584940312810e-01 3.385647104655369888e-01
7.272727272727272929e-01 5.289256198347107585e-01 3.846731780616078344e-01
7.575757575757575690e-01 5.739210284664829631e-01 4.347886579291537767e-01
7.878787878787878451e-01 6.207529843893480059e-01 4.890781089128196091e-01
8.181818181818182323e-01 6.694214876033058870e-01 5.477084898572502913e-01
8.484848484848485084e-01 7.199265381083563842e-01 6.108467596070902284e-01
8.787878787878787845e-01 7.722681359044994975e-01 6.786598770069844910e-01
9.090909090909091717e-01 8.264462809917356712e-01 7.513148009015779838e-01
9.393939393939394478e-01 8.824609733700643499e-01 8.289784901355150559e-01
9.696969696969697239e-01 9.403122130394858669e-01 9.118179035534408339e-01
1.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00
1.030303030303030276e+00 1.061524334251606971e+00 1.093691738319837459e+00
1.060606060606060552e+00 1.124885215794306559e+00 1.193060077357597892e+00
1.090909090909090828e+00 1.190082644628098985e+00 1.298271975957925983e+00
1.121212121212121327e+00 1.257116620752984693e+00 1.409494392965467746e+00
1.151515151515151603e+00 1.325987144168962573e+00 1.526894287224866087e+00
1.181818181818181879e+00 1.396694214876033291e+00 1.650638617580766576e+00
1.212121212121212155e+00 1.469237832874196625e+00 1.780894342877814118e+00
1.242424242424242431e+00 1.543617998163452798e+00 1.917828421960653396e+00
1.272727272727272707e+00 1.619834710743801587e+00 2.061607813673929090e+00
1.303030303030302983e+00 1.697887970615243214e+00 2.212399476862286551e+00
1.333333333333333481e+00 1.777777777777778123e+00 2.370370370370371127e+00
1.363636363636363757e+00 1.859504132231405205e+00 2.535687453042825723e+00
1.393939393939394034e+00 1.943067033976125124e+00 2.708517683724295910e+00
1.424242424242424310e+00 2.028466483011937882e+00 2.889028021259426815e+00
1.454545454545454586e+00 2.115702479338843034e+00 3.077385424492862676e+00
1.484848484848484862e+00 2.204775022956841024e+00 3.273756852269249062e+00
1.515151515151515138e+00 2.295684113865931852e+00 3.478309263433230214e+00
1.545454545454545414e+00 2.388429752066115519e+00 3.691209616829451257e+00
1.575757575757575690e+00 2.483011937557392024e+00 3.912624871302556873e+00
1.606060606060606188e+00 2.579430670339761811e+00 4.142721985697193077e+00
1.636363636363636465e+00 2.677685950413223548e+00 4.381667918858002331e+00
1.666666666666666741e+00 2.777777777777778123e+00 4.629629629629630649e+00
1.696969696969697017e+00 2.879706152433425537e+00 4.886774076856721827e+00
1.727272727272727293e+00 2.983471074380165344e+00 5.153268219383922322e+00
1.757575757575757569e+00 3.089072543617997990e+00 5.429279016055875928e+00
1.787878787878787845e+00 3.196510560146923474e+00 5.714973425717227329e+00
1.818181818181818343e+00 3.305785123966942685e+00 6.010518407212623870e+00
1.848484848484848619e+00 3.416896235078053845e+00 6.316080919386705794e+00
1.878787878787878896e+00 3.529843893480257400e+00 6.631827921084120447e+00
1.909090909090909172e+00 3.644628099173554237e+00 6.957926371149512512e+00
1.939393939393939448e+00 3.761248852157943467e+00 7.294543228427526671e+00
1.969696969696969724e+00 3.879706152433425093e+00 7.641845451762807606e+00
2.000000000000000000e+00 4.000000000000000000e+00 8.000000000000000000e+00
2.030303030303030276e+00 4.122130394857667746e+00 8.369173831983749423e+00
2.060606060606060552e+00 4.246097337006427885e+00 8.749533906558699670e+00
2.090909090909090828e+00 4.371900826446280419e+00 9.141247182569495422e+00
2.121212121212121104e+00 4.499540863177226235e+00 9.544480618860783139e+00
2.151515151515151381e+00 4.629017447199264446e+00 9.959401174277205726e+00
2.181818181818181657e+00 4.760330578512395938e+00 1.038617580766340787e+01
2.212121212121212377e+00 4.893480257116621601e+00 1.082497147786404312e+01
2.242424242424242653e+00 5.028466483011938770e+00 1.127595514372374197e+01
2.272727272727272929e+00 5.165289256198348333e+00 1.173929376408715619e+01
2.303030303030303205e+00 5.303948576675850290e+00 1.221515429779892870e+01
2.333333333333333481e+00 5.444444444444445530e+00 1.270370370370370594e+01
2.363636363636363757e+00 5.586776859504133164e+00 1.320510894064613261e+01
2.393939393939394034e+00 5.730945821854913191e+00 1.371953696747085338e+01
2.424242424242424310e+00 5.876951331496786501e+00 1.424715474302251295e+01
2.454545454545454586e+00 6.024793388429752206e+00 1.478812922614575598e+01
2.484848484848484862e+00 6.174471992653811192e+00 1.534262737568522716e+01
2.515151515151515138e+00 6.325987144168962573e+00 1.591081615048557119e+01
2.545454545454545414e+00 6.479338842975206347e+00 1.649286250939143272e+01
2.575757575757575690e+00 6.634527089072543404e+00 1.708893341124746001e+01
2.606060606060605966e+00 6.791551882460972855e+00 1.769919581489829241e+01
2.636363636363636243e+00 6.950413223140495589e+00 1.832381667918857815e+01
2.666666666666666963e+00 7.111111111111112493e+00 1.896296296296296902e+01
2.696969696969697239e+00 7.273645546372820903e+00 1.961680162506609548e+01
2.727272727272727515e+00 7.438016528925620818e+00 2.028549962434260578e+01
2.757575757575757791e+00 7.604224058769514905e+00 2.096922391963714816e+01
2.787878787878788067e+00 7.772268135904500497e+00 2.166814146979436728e+01
2.818181818181818343e+00 7.942148760330579371e+00 2.238241923365890784e+01
2.848484848484848619e+00 8.113865932047751528e+00 2.311222417007541452e+01
2.878787878787878896e+00 8.287419651056016079e+00 2.385772323788852844e+01
2.909090909090909172e+00 8.462809917355372136e+00 2.461908339594290140e+01
2.939393939393939448e+00 8.640036730945821475e+00 2.539647160308317453e+01
2.969696969696969724e+00 8.819100091827364096e+00 2.619005481815399250e+01
3.000000000000000000e+00 9.000000000000000000e+00 2.700000000000000000e+01
Binary file added examples/example.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
55 changes: 55 additions & 0 deletions examples/mystyle.mplstyle
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
# Stylesheet for article figure.

# Figure size
figure.figsize : 4.95, 3.75 # (3.3 x 2.5) is for single column.

# Font sizes
axes.titlesize: 15
axes.labelsize: 15
xtick.labelsize: 12
ytick.labelsize: 12
legend.fontsize: 12.75
font.size: 12

# Tick style
xtick.direction: in
xtick.major.width: 1.4245
xtick.major.size: 4.125
xtick.minor.width: 1.4245
xtick.minor.size: 2.4

ytick.direction: in
ytick.major.width: 1.4245
ytick.major.size: 4.125
ytick.minor.width: 1.4245
ytick.minor.size: 2.4

# legend
legend.fancybox: False
legend.edgecolor: none

# Font Family
font.family: Arial
font.sans-serif: Arial, Helvetica, Lucida Grande, Verdana, Geneva, Lucid, Avant Garde, DejaVu Sans, sans-serif
mathtext.rm: Arial

# Set line widths
axes.linewidth : 1.4245
grid.linewidth : 0.6
lines.linewidth : 1.2
lines.markersize: 5.1

# Always save as 'tight'
savefig.dpi: 600
savefig.bbox : tight
savefig.pad_inches : 0.075 # Use virtually all space when we specify figure dimensions

# LaTeX packages
text.latex.preamble : \usepackage{amsmath} \usepackage{amssymb} \usepackage{sfmath}

# others
figure.facecolor: white
figure.subplot.wspace: 0.375
figure.subplot.hspace: 0.375

axes.labelpad: 6.0
Loading

0 comments on commit 0122c8f

Please sign in to comment.