Opened 4 years ago

Last modified 22 months ago

#21282 new defect

Not all unicode works in plot (e.g. for axis labels)

Reported by: kcrisman Owned by:
Priority: major Milestone: sage-7.4
Component: graphics Keywords: unicode, plot
Cc: jmantysalo, chapoton, paulmasson, slelievre Merged in:
Authors: Reviewers:
Report Upstream: N/A Work issues:
Branch: Commit:
Dependencies: Stopgaps:


This answer to an ask.sagemath question point out that

plot(sin, 0, pi, axes_labels=(ur'Ось абсцисс $x$', ur'Ось ординат $y$'))

doesn't work. Apparently before #21008 was resolved it was worse. Maybe we can fix this?

Change History (4)

comment:1 Changed 4 years ago by chapoton

This is purely a matplotlib problem with the default font. There is nothing to be fixed here. As explained in the doc of axes_labels in sage/plot/, unicode characters are already accepted and transmitted correctly to matplotlib.

comment:2 Changed 4 years ago by kcrisman

So ... but at the same time we have a confused user. And

Note that this does not guarantee that matplotlib will handle the strings properly, although it should.

Well, it didn't, apparently, in this case. So is this an upstream problem to report there? I think it would be reasonable to put this as an example that doesn't work in our doc, even, if upstream won't/can't fix it.

comment:3 Changed 4 years ago by paulmasson

  • Cc paulmasson added

comment:4 Changed 22 months ago by slelievre

  • Cc slelievre added
  • Keywords unicode plot added

Fixed by #21008?

Note: See TracTickets for help on using tickets.