Hi there:

The upcoming patch introduces functions as data providers for 3D plots, 
analogous to graph.data.function() and the like for 2D plots.

I also suggest enaming "functionxy", which does not correspond to 
graph.graphxy at all. In fact, current "functionxy" provides data for 
graph.graph only. It expects a function reference as parameter, which is 
why I suggest the name "functionlambda". (function parameters are most 
often specified as lambda expressions.)

So, the implemented naming scheme for function type data providers is:

functions specified as textual expressions:
"function" 2D from expressions like "y(x)=..."
"functionxy" 3d from expressions like "z(x,y)=..."

functions specified as function references:
"functionlambda" 2D from a function ref. with signature f(x)
"functionxylambda" 3d from a function ref. with sign. f(x,y)

parametric functions specified as textual expressions:
"paramfunction" data depending on 1 parameter
"paramtsfunction" data depending on 2 parameters

parametric functions specified as function references:
"paramfunctionlambda" data depending on 1 parameter
"paramtsfunctionlambda" data depending on 2 parameters

["ts" for two parameters t, s]

Cheers,
Michael

Notes:

Parametric functions can provide 2D or 3D data (or anything else); PyX 
infers this from the textual expressions "x,y=..." or "x,y,z=..." resp. 
from the signature of the result of the function reference. Notably, the 
existing "paramfunction" can be used to draw 3D curves.

Parametric 3D functions of 2 parameters, together with 
graph.style.surface() show some problems with the hidden surface logic, 
depending on the function. Maybe it assumes some ordering?

The patch is against PyX 0.10 (r2907). If there's interest I'll rebase 
against trunk and provide docs/examples.

Also, the patch is formatted by git-format-patch and friends off my 
git-svn clone of the sf repo, which prefers inline patches. I hope 
that's okay.

The commit message would be subject + body of the upcoming mail, as for 
git-am. I know you guys prefer one-liners here, feel free to replace ;)

Michael J Gruber (1):
   3d function plots

  pyx/graph/data.py |  134 
++++++++++++++++++++++++++++++++++++++++++++++++++++-
  1 files changed, 132 insertions(+), 2 deletions(-)


-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
_______________________________________________
PyX-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/pyx-devel

Reply via email to