Skip to content Skip to sidebar Skip to footer

Implementaion Of Particular Cases In A Mathtext To Wxbitmap Function

I am displaying a bitmap like this using the code : mt =r'$\frac{%.5fx^{2} + %.5fx + %.5f}{%.5fx^{2} + %.5fx + %.5f}$'%(self.z1[-3],self.z1[-2],self.z1[-1],self.z3[-3],self.z3[-2

Solution 1:

Yes, I also was noting that 0 * x**2 does not look very nice. I think what you want to do here is out of the scope of libraries like matplotlib.

You need something which "understands" mathematic formulas, like Mathematica or Mathcad or …. You would end up writing your own output formatter.

The only ready-made thing which comes to my mind in python is the sympy library. It can render formulas to text and will also do simplification on formulas. If you want to give it a shot, it also has a PrettyPrinter renderer outputting unicode formulas for unicode-aware terminals.

I presume its output could be displayed 1:1 in a wxPython text box if you can use the same unicode font (untested!).

Post a Comment for "Implementaion Of Particular Cases In A Mathtext To Wxbitmap Function"