From: Rich S. <rsh...@ap...> - 2008-03-25 22:11:06
|
On Tue, 25 Mar 2008, Joerg Lehmann wrote: > The problem is that with PyX you have to wrap your data (either functions, > lists or files) in certain data provider classes, e.g. > > g.plot(graph.data.function("y(x)=sin(x)") > or > g.plot(graph.data.values(x=[1,2,3], y=[1,4,9])) Jörg, Ah, that's what I thought. And, you answered my question to David regarding this. > As pointed out by David, have a look at the examples on the webpage, > in particular: > > http://pyx.sourceforge.net/examples/graphs/function.html I did look at this, but did not see how to apply it to my needs. > Note furthermore that when plotting "non-standard" mathematical functions, > especially functions you have defined yourself, you have to tell the data > class under which name you want to access them, e.g. > > def f(x): > # calculate result y > return y > > g.plot(graph.data.function("y(x)=f(x)", context={"f": f})) This is what I did not fully understand how to write. > Finally, as a side remark: Try to start with a reduced version of your > code and build the more complex version only after the simple parts work. > Especially when asking for help on this list, post a minimal example in > order to allow people to quickly identify what's going on. Makes sense. I had isolated code and a few data tuples (from a collection of about 360). But, I'll take it one function at a time. Will start with the logistic curves. I'll probably have questions, but they'll be on a smaller code base and just a single data set. Thanks, Rich -- Richard B. Shepard, Ph.D. | Integrity Credibility Applied Ecosystem Services, Inc. | Innovation <http://www.appl-ecosys.com> Voice: 503-667-4517 Fax: 503-667-8863 |