~ubuntu-branches/debian/sid/pyx3/sid

« back to all changes in this revision

Viewing changes to faq/general_aspects_pyx.rst

  • Committer: Package Import Robot
  • Author(s): Stuart Prescott
  • Date: 2015-05-08 00:00:33 UTC
  • mfrom: (1.1.1)
  • Revision ID: package-import@ubuntu.com-20150508000033-fp4theggupemhx24
Tags: 0.14-1
* New upstream release.
  - revert upstream change to sphinx conf.py to permit building with older
    python3-sphinx.
* Bump standards version to 3.9.6 (no changes required).
* Add SVG and PDF to package descriptions.

Show diffs side-by-side

added added

removed removed

Lines of Context:
63
63
:ref:`where_do_I_get_PyX` if you need to download it), which should be unpacked
64
64
below a directory, e.g.  ``/home/xyz/Python``,  where you want to keep the
65
65
various PyX versions.  This will result in a subdirectory with a name like
66
 
``PyX-0.13`` which contains the contents of the corresponding package. You
 
66
``PyX-0.14`` which contains the contents of the corresponding package. You
67
67
can then ask Python to first look in the appropriate directory before looking
68
68
for the current version of PyX by inserting the following code (appropriately
69
69
modified according to your needs) at the beginning of your program before
70
70
importing the PyX module::
71
71
 
72
72
   import sys
73
 
   sys.path.insert(0, "/home/xyz/Python/PyX-0.13")
 
73
   sys.path.insert(0, "/home/xyz/Python/PyX-0.14")
74
74
 
75
75
Including appropriate lines even if the current version of PyX is used, might
76
76
turn out to be helpful when the current version has become an old version
81
81
alternative::
82
82
 
83
83
   import sys, os
84
 
   sys.path.insert(0, os.path.expanduser("~/Python/PyX-0.13"))
 
84
   sys.path.insert(0, os.path.expanduser("~/Python/PyX-0.14"))
85
85
 
86
86
which will expand the tilde to your home directory.
87
87
 
113
113
 
114
114
No, PyX itself does not provide a means to view the produced image. The result
115
115
of a PyX run is an EPS (= Encapsulated PostScript) file, a PS (= PostScript)
116
 
file or a PDF (= Portable Document Format) file, which can be viewed, printed
117
 
or imported into other applications.
 
116
file, a PDF (= Portable Document Format) file or a SVG (= Scalable Vector
 
117
Graphics) file, which can be viewed, printed or imported into other
 
118
applications.
118
119
 
119
120
There are several means of viewing PS and EPS files. A common way would be to
120
121
use ``ghostview`` which provides a user interface to the PostScript interpreter
131
132
X11, ``xpdf`` might be an alternative. It is available from
132
133
`http://www.foolabs.com/xpdf/ <http://www.foolabs.com/xpdf/>`_.
133
134
 
 
135
SVG files can be viewed by webbrowsers like Firefox available at
 
136
`https://www.mozilla.org/en-US/firefox
 
137
<https://www.mozilla.org/en-US/firefox>`_ or Chrome available at
 
138
`https://www.google.com/chrome/ <https://www.google.com/chrome/>`_.
 
139
 
134
140
If you want to do interactive development of a PyX graphics, you might consider
135
141
to use an IPython notebook (see :ref:`pyx_ipython_notebook`).
136
142
 
143
149
graphs and text, can be embedded into an IPython notebook. Suppose you have a 
144
150
canvas object called ``c`` on which you have done some drawing. Then entering ``c``
145
151
in an IPython notebook cell and executing that cell will automatically produce
146
 
a PNG representation and embed it into the notebook. For more information on
147
 
IPython and working with its notebooks see `http://www.ipython.org/ <http://www.ipython.org/>`_.
 
152
a SVG representation and embed it into the notebook. (Alternatively, also PNG
 
153
is available by means of ghostscript, but the default display_order of IPython
 
154
prefers SVG over PNG.) For more information on IPython and working with its
 
155
notebooks see `http://www.ipython.org/ <http://www.ipython.org/>`_.
148
156
 
149
157
I am a Gnuplot user and want to try PyX. Where can I get some help?
150
158
===================================================================