New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow non-ascii labels in graph vertices (at least for plotting) #21008
Comments
comment:1
Here is a tentative. Sometimes the character is not available in the usual font. At least http://stackoverflow.com/questions/10960463/non-ascii-characters-in-matplotlib New commits:
|
Branch: u/chapoton/21008 |
Author: Frédéric Chapoton |
Commit: |
comment:2
Mäntysalo can review this patch made by Frédéric. |
Reviewer: Jori Mäntysalo |
comment:3
I take it that would create some self-referential directed graph of review with Unicode vertices :-) just make sure it doesn't break any current graph plots! |
comment:4
Documentation doesn't build with this fix. See #13161 for similar problem. Also, the Russian character displays as a square box on Mac OS X El Capitan. Local Unicode fonts do not get incorporated into matplotlib output. Shouldn't there be some simple way to use local fonts? |
Branch pushed to git repo; I updated commit sha1. New commits:
|
comment:6
I don't understand. This works:
but this does not:
|
comment:7
Also |
comment:8
Replying to @jm58660:
It should be D.show(), and it works for me. |
Branch pushed to git repo; I updated commit sha1. New commits:
|
comment:11
My mistake. Now it works and also
works. |
comment:12
Do we want all vertex labels to be unicode automatically? (I'm not sure if that is what is happening with the changed doctest in posets.) |
comment:13
labels are converted to unicode in the plot, not in the graphs themselves. |
comment:14
Got it, thanks. |
Changed branch from u/chapoton/21008 to |
comment:16
On my machine (7.4.beta1), the example given in the ticket description does not work:
Probably due to:
|
Changed commit from |
comment:17
you forgot the |
comment:18
The point was that 'Б' is a valid string (through not unicode), which is not handled by plot. If it will automatically be fixed by Python 3, it is probably better not to add artificial noise into the source code. |
Apparently graph vertex labels have to be ASCII.
See here and the duplicate here.
Component: graph theory
Author: Frédéric Chapoton
Branch:
e6523a1
Reviewer: Jori Mäntysalo
Issue created by migration from https://trac.sagemath.org/ticket/21008
The text was updated successfully, but these errors were encountered: