## Re: [Pyx-user] constant function

 Re: [Pyx-user] constant function From: Andre Wobst - 2004-05-03 07:25:29 ```Hi, On 03.05.04, Marko Vendelin wrote: > it depends on PyX usage. This is expected feature if you produce > figures for papers (then you have time to adjust your axes). You do not plot just a constant function in a paper, do you? Seriousely, have you ever done that? > As far as I remember, plotting packages usually plot constant functions > without any crash (even if axes are not specified). For example: MATLAB, > plotmtv. I think that PyX will benefit from such feature. The question is how to adjust the axis range. (To finally implement the feature is trivial.) To my eyes it is a bug, that other graphic programs allow for plotting of constant function without expecting any range. This just does not make any sence. I don't see any reasonable solution for an automatic axis range in this case. Feal free to explain how we should deal with this case. Just be sure, that you have to convince me, when you start this discussion ... André -- by _ _ _ Dr. André Wobst / \ \ / ) wobsta@..., http://www.wobsta.de/ / _ \ \/\/ / PyX - High quality PostScript figures with Python & TeX (_/ \_)_/\_/ visit http://pyx.sourceforge.net/ ```

 [Pyx-user] constant function From: Marko Vendelin - 2004-04-30 14:51:37 ```There is a strange feature (or bug) in PyX: it is impossible to plot constant function without specifying the axis limits. Example: ##### from pyx import * g = graph.graphxy(height=5, width=7, x=graph.axis.linear(title=r"\large{X}"), y=graph.axis.linear(title=r"\large{Y}") ) g.plot( graph.data.list( [[1, 2], [2, 2]], addlinenumbers=0, x=0, y=1 ), graph.style.line(lineattrs=[style.linewidth.thick, style.linecap.round]) ) g.writetofile("test.eps") ##### Is this a feature or bug? Cheers, Marko ```
 Re: [Pyx-user] constant function From: Andre Wobst - 2004-05-03 05:22:15 ```Marko, On 30.04.04, Marko Vendelin wrote: > There is a strange feature (or bug) in PyX: it is impossible to plot > constant function without specifying the axis limits. > > Example: > ##### > from pyx import * > > g = graph.graphxy(height=5, width=7, > x=graph.axis.linear(title=r"\large{X}"), > y=graph.axis.linear(title=r"\large{Y}") ) > > g.plot( graph.data.list( [[1, 2], [2, 2]], addlinenumbers=0, x=0, y=1 ), > graph.style.line(lineattrs=[style.linewidth.thick, > style.linecap.round]) ) > > g.writetofile("test.eps") > ##### > > Is this a feature or bug? To my mind this is a feature. Its intented that way. Is there a really strong argument to change that behaviour? André -- by _ _ _ Dr. André Wobst / \ \ / ) wobsta@..., http://www.wobsta.de/ / _ \ \/\/ / PyX - High quality PostScript figures with Python & TeX (_/ \_)_/\_/ visit http://pyx.sourceforge.net/ ```
 Re: [Pyx-user] constant function From: Marko Vendelin - 2004-05-03 06:22:37 ```it depends on PyX usage. This is expected feature if you produce figures for papers (then you have time to adjust your axes). However, if PyX is used for all plotting, including plotting of current simulations, then sometimes the simulation code is feeding constant functions. Whether this is strong argument or not, I don't know. As far as I remember, plotting packages usually plot constant functions without any crash (even if axes are not specified). For example: MATLAB, plotmtv. I think that PyX will benefit from such feature. Best wishes, Marko On Mon, 3 May 2004, Andre Wobst wrote: > Marko, > > On 30.04.04, Marko Vendelin wrote: > > There is a strange feature (or bug) in PyX: it is impossible to plot > > constant function without specifying the axis limits. > > > > Example: > > ##### > > from pyx import * > > > > g =3D graph.graphxy(height=3D5, width=3D7, > > x=3Dgraph.axis.linear(title=3Dr"\large{X}"), > > y=3Dgraph.axis.linear(title=3Dr"\large{Y}") ) > > > > g.plot( graph.data.list( [[1, 2], [2, 2]], addlinenumbers=3D0, x=3D0, y= =3D1 ), > > graph.style.line(lineattrs=3D[style.linewidth.thick, > > style.linecap.round]) ) > > > > g.writetofile("test.eps") > > ##### > > > > Is this a feature or bug? > > To my mind this is a feature. Its intented that way. Is there a really > strong argument to change that behaviour? > > > Andr=E9 > > -- > by _ _ _ Dr. Andr=E9 Wobst > / \ \ / ) wobsta@..., http://www.wobsta.de/ > / _ \ \/\/ / PyX - High quality PostScript figures with Python & TeX > (_/ \_)_/\_/ visit http://pyx.sourceforge.net/ > > > ------------------------------------------------------- > This SF.Net email is sponsored by: Oracle 10g > Get certified on the hottest thing ever to hit the market... Oracle 10g. > Take an Oracle 10g class now, and we'll give you the exam FREE. > http://ads.osdn.com/?ad_id=3D3149&alloc_id=3D8166&op=3Dclick > _______________________________________________ > Pyx-user mailing list > Pyx-user@... > https://lists.sourceforge.net/lists/listinfo/pyx-user > ```
 Re: [Pyx-user] constant function From: Andre Wobst - 2004-05-03 07:25:29 ```Hi, On 03.05.04, Marko Vendelin wrote: > it depends on PyX usage. This is expected feature if you produce > figures for papers (then you have time to adjust your axes). You do not plot just a constant function in a paper, do you? Seriousely, have you ever done that? > As far as I remember, plotting packages usually plot constant functions > without any crash (even if axes are not specified). For example: MATLAB, > plotmtv. I think that PyX will benefit from such feature. The question is how to adjust the axis range. (To finally implement the feature is trivial.) To my eyes it is a bug, that other graphic programs allow for plotting of constant function without expecting any range. This just does not make any sence. I don't see any reasonable solution for an automatic axis range in this case. Feal free to explain how we should deal with this case. Just be sure, that you have to convince me, when you start this discussion ... André -- by _ _ _ Dr. André Wobst / \ \ / ) wobsta@..., http://www.wobsta.de/ / _ \ \/\/ / PyX - High quality PostScript figures with Python & TeX (_/ \_)_/\_/ visit http://pyx.sourceforge.net/ ```