Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 7ad3bc2

Browse files
authored
Merge pull request #26024 from devRD/mt-ops
Add missing operators code
2 parents 292e8f3 + 5abc02d commit 7ad3bc2

File tree

2 files changed

+77
-3
lines changed

2 files changed

+77
-3
lines changed

lib/matplotlib/_mathtext_data.py

Lines changed: 49 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1008,8 +1008,6 @@
10081008
'leftparen' : 40,
10091009
'rightparen' : 41,
10101010
'bigoplus' : 10753,
1011-
'leftangle' : 10216,
1012-
'rightangle' : 10217,
10131011
'leftbrace' : 124,
10141012
'rightbrace' : 125,
10151013
'jmath' : 567,
@@ -1032,7 +1030,55 @@
10321030
'guilsinglleft' : 8249,
10331031
'plus' : 43,
10341032
'thorn' : 254,
1035-
'dagger' : 8224
1033+
'dagger' : 8224,
1034+
'increment' : 8710,
1035+
'smallin' : 8714,
1036+
'notsmallowns' : 8716,
1037+
'smallowns' : 8717,
1038+
'QED' : 8718,
1039+
'rightangle' : 8735,
1040+
'smallintclockwise' : 8753,
1041+
'smallvarointclockwise' : 8754,
1042+
'smallointctrcclockwise' : 8755,
1043+
'ratio' : 8758,
1044+
'minuscolon' : 8761,
1045+
'dotsminusdots' : 8762,
1046+
'sinewave' : 8767,
1047+
'simneqq' : 8774,
1048+
'nlesssim' : 8820,
1049+
'ngtrsim' : 8821,
1050+
'nlessgtr' : 8824,
1051+
'ngtrless' : 8825,
1052+
'cupleftarrow' : 8844,
1053+
'oequal' : 8860,
1054+
'rightassert' : 8870,
1055+
'rightModels' : 8875,
1056+
'hermitmatrix' : 8889,
1057+
'barvee' : 8893,
1058+
'measuredrightangle' : 8894,
1059+
'varlrtriangle' : 8895,
1060+
'equalparallel' : 8917,
1061+
'npreccurlyeq' : 8928,
1062+
'nsucccurlyeq' : 8929,
1063+
'nsqsubseteq' : 8930,
1064+
'nsqsupseteq' : 8931,
1065+
'sqsubsetneq' : 8932,
1066+
'sqsupsetneq' : 8933,
1067+
'disin' : 8946,
1068+
'varisins' : 8947,
1069+
'isins' : 8948,
1070+
'isindot' : 8949,
1071+
'varisinobar' : 8950,
1072+
'isinobar' : 8951,
1073+
'isinvb' : 8952,
1074+
'isinE' : 8953,
1075+
'nisd' : 8954,
1076+
'varnis' : 8955,
1077+
'nis' : 8956,
1078+
'varniobar' : 8957,
1079+
'niobar' : 8958,
1080+
'bagmember' : 8959,
1081+
'triangle' : 9651
10361082
}
10371083

10381084
# Each element is a 4-tuple of the form:

lib/matplotlib/tests/test_mathtext.py

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -510,3 +510,31 @@ def test_mathtext_cmr10_minus_sign():
510510
ax.plot(range(-1, 1), range(-1, 1))
511511
# draw to make sure we have no warnings
512512
fig.canvas.draw()
513+
514+
515+
def test_mathtext_operators():
516+
test_str = r'''
517+
\increment \smallin \notsmallowns
518+
\smallowns \QED \rightangle
519+
\smallintclockwise \smallvarointclockwise
520+
\smallointctrcclockwise
521+
\ratio \minuscolon \dotsminusdots
522+
\sinewave \simneqq \nlesssim
523+
\ngtrsim \nlessgtr \ngtrless
524+
\cupleftarrow \oequal \rightassert
525+
\rightModels \hermitmatrix \barvee
526+
\measuredrightangle \varlrtriangle
527+
\equalparallel \npreccurlyeq \nsucccurlyeq
528+
\nsqsubseteq \nsqsupseteq \sqsubsetneq
529+
\sqsupsetneq \disin \varisins
530+
\isins \isindot \varisinobar
531+
\isinobar \isinvb \isinE
532+
\nisd \varnis \nis
533+
\varniobar \niobar \bagmember
534+
\triangle'''.split()
535+
536+
fig = plt.figure()
537+
for x, i in enumerate(test_str):
538+
fig.text(0.5, (x + 0.5)/len(test_str), r'${%s}$' % i)
539+
540+
fig.draw_without_rendering()

0 commit comments

Comments
 (0)