Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Cyrillic text on the plot

Is it possible to add the Cyrillic text to the plot in Sage Notebook?

Currently I am trying to do somethink of this kind:

total_plot = plot(sin(x),-10,10)
total_plot += text("????????", (5,0.5))
total_plot.show(figsize=(4,3))

Sage gives the error message:

ValueError: matplotlib display text must have all code points < 128
or use Unicode strings

If I add the 'u' symbol before the string

total_plot += text(u"????????", (5,0.5))

I can only see the empty rectangles instead of the letters.

Cyrillic text on the plot

Is it possible to add the Cyrillic text to the plot in Sage Notebook?

Currently I am trying to do somethink of this kind:

total_plot = plot(sin(x),-10,10)
total_plot += text("????????", (5,0.5))
total_plot.show(figsize=(4,3))

Sage gives the error message:

ValueError: matplotlib display text must have all code points < 128
or use Unicode strings

If I add the 'u' symbol before the string

total_plot += text(u"????????", (5,0.5))

I can only see the empty rectangles instead of the letters.

P.S. I saw this question, however, I am more interested in not using Matplotlib directly if possible.

click to hide/show revision 3
retagged

Cyrillic text on the plot

Is it possible to add the Cyrillic text to the plot in Sage Notebook?

Currently I am trying to do somethink of this kind:

total_plot = plot(sin(x),-10,10)
total_plot += text("????????", (5,0.5))
total_plot.show(figsize=(4,3))

Sage gives the error message:

ValueError: matplotlib display text must have all code points < 128
or use Unicode strings

If I add the 'u' symbol before the string

total_plot += text(u"????????", (5,0.5))

I can only see the empty rectangles instead of the letters.

P.S. I saw this question, however, I am more interested in not using Matplotlib directly if possible.