|
From: SourceForge.net <no...@so...> - 2004-07-07 06:18:33
|
Bugs item #986123, was opened at 2004-07-06 20:01 Message generated for change (Comment added) made by wobsta You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=442886&aid=986123&group_id=45430 Category: None Group: None Status: Open Resolution: None Priority: 5 Submitted By: Nobody/Anonymous (nobody) Assigned to: Nobody/Anonymous (nobody) Summary: Axis labels look weird Initial Comment: When I create an XY graph and specify an axis label that is more than one word long, sometimes the two words overlap. Here is ahat I have found so far: (Axis label specified: What it looks like) "X values" - Looks normal "Y values" - Looks normal "solution variable" - Two words overlap "variable" - Looks normal "variableABCDEFGHIJ" - Looks normal "variable ABCDEFGHIJ" - Looks like: variabl***CDEF GHIJ (where the *** indicates where the "e" and "AB" overlap) "solution-variable" - Looks normal "solution_variable" - Gives the following error: Traceback (most recent call last): ... mycanvas.writeEPSfile(filename) File "/users/mont/PyX-0.6.3/pyx/canvas.py", line 367, in writeEPSfile abbox = bbox is not None and bbox or self.bbox() File "/users/mont/PyX-0.6.3/pyx/canvas.py", line 129, in bbox abbox = cmd.bbox() File "/users/mont/PyX-0.6.3/pyx/deco.py", line 71, in bbox pbbox = self.path.bbox() File "/users/mont/PyX-0.6.3/pyx/graph/graph.py", line 418, in bbox self.finish() File "/users/mont/PyX-0.6.3/pyx/graph/graph.py", line 368, in finish self.domethods[0]() File "/users/mont/PyX-0.6.3/pyx/graph/graph.py", line 310, in dolayout axis.finish(self.axespos[key]) File "/users/mont/PyX-0.6.3/pyx/graph/axis/axis.py", line 344, in finish ac = self.painter.paint(axispos, self) File "/users/mont/PyX-0.6.3/pyx/graph/axis/painter.py", line 486, in paint _title.paint(self, axispos, axis, ac=ac) File "/users/mont/PyX-0.6.3/pyx/graph/axis/painter.py", line 305, in paint title = self.texrunner.text_pt(x, y, axis.title, titleattrs) File "/users/mont/PyX-0.6.3/pyx/text.py", line 1133, in text_pt return self.text(unit.t_pt(x), unit.t_pt(y), expr, *args, **kwargs) File "/users/mont/PyX-0.6.3/pyx/text.py", line 1115, in text self.execute(expr, self.defaulttexmessagesdefaultrun + self.texmessagesdefaultrun + texmessages) File "/users/mont/PyX-0.6.3/pyx/text.py", line 944, in execute raise TexResultError("unhandled TeX response (might be an error)", self) pyx.text.TexResultError: unhandled TeX response (might be an error) The expression passed to TeX was: \ProcessPyXBox{\gdef\PyXHAlign{0.50000}\setbox0\hbox{$\vcenter{\vrule width0pt}$}\lower\ht0\hbox{{solution_variable}}% }{53}% \PyXInput{57}% After parsing the return message from TeX, the following was left: *! Missing $ inserted.<inserted text> $<to be read again> _<argument> ...h0pt}$}\lower \ht 0\hbox {{solution_ variable}}\ProcessPyXBox #1#2->\setbox \PyXBox =\hbox {{#1 }}\PyXDimenHAlignLT =\PyXHAl...<*> }{53} %! Extra }, or forgotten $.<argument> ...ower \ht 0\hbox {{solution_variable} }\ProcessPyXBox #1#2->\setbox \PyXBox =\hbox {{#1 }}\PyXDimenHAlignLT =\PyXHAl...<*> }{53} %! Extra }, or forgotten $.<argument> ...wer \ht 0\hbox {{solution_variable}} \ProcessPyXBox #1#2->\setbox \PyXBox =\hbox {{#1 }}\PyXDimenHAlignLT =\PyXHAl...<*> }{53} %! Extra }, or forgotten $.\ProcessPyXBox #1#2->\setbox \PyXBox =\hbox {{#1} }\PyXDimenHAlignLT =\PyXHAl...<*> }{53} %! Extra }, or forgotten $.\ProcessPyXBox #1#2->\setbox \PyXBox =\hbox {{#1}} \PyXDimenHAlignLT =\PyXHAl...<*> }{53} % My e-mail address is ale...@ni... ---------------------------------------------------------------------- >Comment By: André Wobst (wobsta) Date: 2004-07-07 08:18 Message: Logged In: YES user_id=405853 I expect this problem to be related to the text output itself. Could you try to run hello.py, which can be found at the example directory. You may substitute the string "hello, world!" by something you used before ("variable ABCDEFGHIJ") to reproduce your problem. In case you find the same behaviour it would be a much better suitable (e.g. minimal) example to further investigate your problem. ---------------------------------------------------------------------- Comment By: Gert Ingold (gertingold) Date: 2004-07-07 07:36 Message: Logged In: YES user_id=809523 I cannot reproduce the problem with "variable ABCDEFGHIJ" under PyX 0.6.3. Do you have a minimal example? The problem with "solution_variable" is not a PyX bug but related to TeX which expects the underscore in math mode where it would indicate a subscript (see also FAQ 4.3.3). To avoid this problem, the underscore has to be escaped with a backslash, i.e. you should use "solution\_variable". See also FAQ 2.4 concerning the use of raw strings in Python. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=442886&aid=986123&group_id=45430 |