Questions tagged [pyx]

PyX is a Python package for the creation of PostScript, PDF, and SVG files. It combines an abstraction of the PostScript drawing model with a TeX/LaTeX interface. Complex tasks like 2d and 3d plots in publication-ready quality are built out of these primitives.

PyX is in steady development. Planned features are listed on the roadmap. The current release, PyX 0.15, is available at the download section of the project page.

57 questions
1
vote
1 answer

What is the type of the below argument in Pyx?

The official documentation describes that layers can be used to set the occlusion of rendered elements canvas.layer(name, above=None, below=None) This method creates or gets a layer with name name. A layer is a canvas itself and can be used to…
Makogan
  • 8,208
  • 7
  • 44
  • 112
1
vote
1 answer

How to fix traceback error in Pyx module with Python?

I am trying to run in PyX module in Python. It is a simple program called "mplot.py": from pyx import * g = graph.graphxy(width=8) g.plot(graph.data.function("y(x)=sin(x)/x", min=-15, max=15)) g.writePDFfile("function") I want to do this to…
Nigel1
  • 95
  • 8
1
vote
0 answers

how to add attribute to existing class in sklearn

I trying to edit sklearn and I need to add an attribute for one of the class. I was sure that adding self.attribute will be the answer but i keep getting an error this attribute isn't available. I try to add this attribute install the new package…
M.Marudi
  • 33
  • 2
1
vote
1 answer

How do I hide the axis text in Python PyX

I'm just trying to get a graph but without any numbers in the axes. Let's say: from math import pi from pyx import * g = graph.graphxy(width=8) g.plot(graph.data.paramfunction("k", 0, 2*pi, "x, y = sin(2*k),…
Mphon
  • 135
  • 7
1
vote
1 answer

Python PyX plot: change axes tick text color

I have plot in PyX in python g = graph.graphxy(width=8, x=graph.axis.log(min=1e-1, max=1e4, title=r"$x$-axis"), y=graph.axis.lin(max=5, title=r"$y$-axis")) g.plot(graph.data.function("y(x)=tan(log(1/x))**2")) …
Nigel1
  • 95
  • 8
1
vote
0 answers

Python error with Pyx module: 'SingleLatexRunner' object has no attribute 'texoutput'

In Windows command prompt, I get error message AttributeError: 'SingleLatexRunner' object has no attribute 'texoutput' when running Pyx module in python to make plot as pdf file. A pdf file is made but nothing is inside it (0 KB) The code works on…
Nigel1
  • 95
  • 8
1
vote
1 answer

Python Pyx plot: Using \mathbb in axes label of plot

I am making plot in PyX. To get (in LaTex language) \mathrm{a} you use \rm{a} (in PyX language). I wanna get (in LaTex language) \mathbb{a}. How to do it in PyX language? Attempt of \bb{a} gives error message.
Nigel1
  • 95
  • 8
1
vote
0 answers

How to calculate length and angle from a set of xyz coordinates

I need to convert a set of coordinates to the sublines and angle. Example: coords = [ (0.,0.,0.), (982.116098092115,0.,0.), (985.806272277749,0.,0.1737379990727277), (989.5074251916399,0.,0.5718208697235241), …
Gerrit Verhaar
  • 446
  • 4
  • 12
1
vote
0 answers

PyX Preamble Disabled with no previous calls

I'm using PyX 0.12.1 to produce an EPS document for printing. I'm following the example in the documentation for changing the font, and have the following: from pyx import…
Foxocube
  • 710
  • 9
  • 32
1
vote
3 answers

Fail to install PyX using Anaconda

I'm having problems installing python modules PyX, I received the following error when using pip: $ pip install PyX Collecting PyX Could not find a version that satisfies the requirement PyX (from versions: ) Some externally hosted files were…
Helene
  • 953
  • 3
  • 12
  • 22
1
vote
1 answer

Python Error w/ Pyx Module Despite Good Code

Im doing some work with pyx, the python module for customizable data graphing and visualizations. The thing is, even copy pasting the most basic graphing code example directly, returns a broken file and an error. Im relatively new to python and I've…
1
vote
3 answers

Inserting a unicode text into pyx canvas

I have a set of UTF-8 characters that I would like to insert into a PyX generated pdf file. I have included # -*- coding: utf-8 -*- to top of the file. The code is somewhat similar to the following: # -*- coding: utf-8 -*- c = canvas.canvas() txt =…
pariwesh
  • 341
  • 4
  • 11
1
vote
0 answers

Installing PyX package on Mac for python 2.7

Is there a simple instruction for installing PyX package on the Mac OSX (10.6.8) for python( 2.7)? python setup.py install worked fine (copied the Library), however adding "import pyx" fails.
ksb
  • 11
  • 2
1
vote
1 answer

'fast' bezier curve length python library

To calculate the length of a bezier curve, I have been using pyx. from pyx import path, unit bez = path.curve(p[0], p[1], p[0], p[1] + d, q[0], q[1]-d, q[0],q[1]) edgelen = unit.tocm(bez.arclen()) where p and q are the endpoints of the curve and d…
Joe
  • 903
  • 3
  • 11
  • 20
0
votes
0 answers

Trying to install PyRFC on a Linux server raises a Cython error

I have three Linux servers, supposed to be the same. On the first two servers, I managed to install PyRFC, but on the third I got the following error: Using cached pyrfc-2.8.2.tar.gz (284 kB) Installing build dependencies ... done Getting…