Skip to content

Commit

Permalink
pypi can't use relative paths
Browse files Browse the repository at this point in the history
  • Loading branch information
mmckerns committed Jan 14, 2023
1 parent c889b45 commit 0676f81
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 8 deletions.
21 changes: 14 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ About Pygrace

``pygrace`` ``Project`` objects are used to construct and save ``xmgrace`` project files (.agr). ``Project`` files capture the state of a ``xmgrace`` session, including the figures, settings, and current variables.

![pygrace project](docs/source/_static/crow_diagram.png)
![pygrace project](https://github.com/uqfoundation/pygrace/blob/master/docs/source/_static/crow_diagram.png)

A more detailed diagram of all the attributes of ``pygrace`` template objects can be found at https://github.com/uqfoundation/pygrace/blob/master/docs/diagrams/diagram.pdf, while a handy cheatsheet of the methods and attributes of each ``pygrace`` template class can be found at https://github.com/uqfoundation/pygrace/blob/master/docs/diagrams/cheatsheet.pdf. This cheatsheet can be dynamically generated through use of the ``write_cheatsheet`` method, available from the ``Project`` class.

Expand Down Expand Up @@ -52,6 +52,13 @@ Installation
It is assumed ``xmgrace`` is already installed and on the user's ``$PATH``. ``xmgrace`` is available at:
https://plasma-gate.weizmann.ac.il/pub/grace/src/

Alternately, ``xmgrace`` typically can be installed with most package managers. For example::

$ apt-get install grace # on Linux
$ brew install grace # on MacOS

Installing an Xserver from X.org (``xorg``, ``xorg-server``, ``xquartz``, or similar, depending on your operating system and package manager) is also required to open the ``xmgrace`` GUI.


Requirements
------------
Expand Down Expand Up @@ -93,7 +100,7 @@ then, open the project file with xmgrace::

$ xmgrace 00_helloworld.agr

![00_helloworld](docs/source/_static/00_helloworld.png)
![00_helloworld](https://github.com/uqfoundation/pygrace/blob/master/docs/source/_static/00_helloworld.png)

find out more about ``pygrace`` at http://pygrace.rtfd.io or browse some more of the examples at https://github.com/uqfoundation/pygrace/tree/master/examples.

Expand All @@ -102,14 +109,14 @@ for example::
$ python 05_colorplot.py
$ xmgrace 05_colorplot.agr

![05_colorplot](docs/source/_static/05_colorplot.png)
![05_colorplot](https://github.com/uqfoundation/pygrace/blob/master/docs/source/_static/05_colorplot.png)

and::

$ python 08_latexlabels.py
$ xmgrace 08_latexlabels.agr

![08_latexlabels](docs/source/_static/08_latexlabels.png)
![08_latexlabels](https://github.com/uqfoundation/pygrace/blob/master/docs/source/_static/08_latexlabels.png)


we can also work in an interactive xmgrace session::
Expand All @@ -123,7 +130,7 @@ use xmgrace methods directly from the python interpreter::
>>> x = np.arange(21) * np.pi/10
>>> pg.plot(x, np.sin(x))

![sin](docs/source/_static/sin.png)
![sin](https://github.com/uqfoundation/pygrace/blob/master/docs/source/_static/sin.png)

push variables into xmgrace and interact with the xmgrace scripting language::

Expand All @@ -132,7 +139,7 @@ push variables into xmgrace and interact with the xmgrace scripting language::
>>> pg.eval('s0 line color 2')
>>> pg.eval('plot(x,y)')

![cos](docs/source/_static/cos.png)
![cos](https://github.com/uqfoundation/pygrace/blob/master/docs/source/_static/cos.png)

use the interactive xmgrace prompt::

Expand All @@ -146,7 +153,7 @@ use the interactive xmgrace prompt::
grace> redraw()
grace> exit

![histoPlot](docs/source/_static/histoPlot.png)
![histoPlot](https://github.com/uqfoundation/pygrace/blob/master/docs/source/_static/histoPlot.png)

check variables in xmgrace session::

Expand Down
2 changes: 1 addition & 1 deletion version.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ def get_readme_as_rst(filepath):
README += line.replace('-','=') + '\n'
elif line.startswith('!['): # image
alt,img = line.split('](',1)
img = img.replace('docs/source/','') # make is in docs
img = img.split('docs/source/',1)[-1] # make is in docs
README += '.. image:: ' + img.replace(')','')
README += ' :alt: ' + alt.replace('![','') + '\n'
#elif ')[http' in line: # alt text link (`text <http://url>`_)
Expand Down

0 comments on commit 0676f81

Please sign in to comment.