LaTeX matplotlib Bug?

Hello all,

I'm trying to specify a range of numbers in a particular legend using LaTeX. In order to do so I'm feeding it the string: r"$80--120". The output should be have an endash, "80–120", but I'm getting "80--120". This is a standard feature of LaTeX ( http://en.wikibooks.org/wiki/LaTeX/Formatting ), so I don't know what's going on.

Thanks,
Sean Lake

uname -a
Darwin dynamic_051.astro.ucla.edu 10.7.0 Darwin Kernel Version 10.7.0: Sat Jan 29 15:17:16 PST 2011; root:xnu-1504.9.37~1/RELEASE_I386 i386

(You also have a bug on this web page: http://matplotlib.sourceforge.net/faq/troubleshooting_faq.html#reporting-problems , The line python -c `import matplotlib; print matplotlib.__version__` should not have back-ticks)
/sw/bin/python2.6 -c 'import matplotlib; print matplotlib.__version__'
1.0.0

Got matplotlib via fink:
fink --version
Package manager version: 0.29.21
Distribution version: selfupdate-rsync Sun Apr 3 02:28:24 2011, 10.6, x86_64
Trees: local/main stable/main stable/crypto unstable/main unstable/crypto

matplotlibrc file:
text.usetex : True

#backend : MacOSX
backend : GTKAgg
#backend : ps
#backend : pdf

Hi Sean,

I just checked - the hyphenation you want does not work in LaTeX in math mode. Try removing the "$"-signs in your string command. Then the hyphenation should work.

Andre

···

On Apr 5, 2011, at 4:56 PM, Sean Lake wrote:

Hello all,

I'm trying to specify a range of numbers in a particular legend using LaTeX. In order to do so I'm feeding it the string: r"$80--120". The output should be have an endash, "80–120", but I'm getting "80--120". This is a standard feature of LaTeX ( http://en.wikibooks.org/wiki/LaTeX/Formatting ), so I don't know what's going on.

Thanks,
Sean Lake

uname -a
Darwin dynamic_051.astro.ucla.edu 10.7.0 Darwin Kernel Version 10.7.0: Sat Jan 29 15:17:16 PST 2011; root:xnu-1504.9.37~1/RELEASE_I386 i386

(You also have a bug on this web page: http://matplotlib.sourceforge.net/faq/troubleshooting_faq.html#reporting-problems , The line python -c `import matplotlib; print matplotlib.__version__` should not have back-ticks)
/sw/bin/python2.6 -c 'import matplotlib; print matplotlib.__version__'
1.0.0

Got matplotlib via fink:
fink --version
Package manager version: 0.29.21
Distribution version: selfupdate-rsync Sun Apr 3 02:28:24 2011, 10.6, x86_64
Trees: local/main stable/main stable/crypto unstable/main unstable/crypto

matplotlibrc file:
text.usetex : True

#backend : MacOSX
backend : GTKAgg
#backend : ps
#backend : pdf

------------------------------------------------------------------------------
Xperia(TM) PLAY
It's a major breakthrough. An authentic gaming
smartphone on the nation's most reliable network.
And it wants your games.
http://p.sf.net/sfu/verizon-sfdev
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users

Um, how about r"$80--120$" instead of r"$80--120" ?

···

On Wed, Apr 6, 2011 at 9:56 AM, Sean Lake <odysseus9672@...287...> wrote:

Hello all,

I'm trying to specify a range of numbers in a particular legend using LaTeX. In order to do so I'm feeding it the string: r"$80--120". The output should be have an endash, "80–120", but I'm getting "80--120". This is a standard feature of LaTeX ( http://en.wikibooks.org/wiki/LaTeX/Formatting ), so I don't know what's going on.

Thanks,
Sean Lake

uname -a
Darwin dynamic_051.astro.ucla.edu 10.7.0 Darwin Kernel Version 10.7.0: Sat Jan 29 15:17:16 PST 2011; root:xnu-1504.9.37~1/RELEASE_I386 i386

(You also have a bug on this web page: http://matplotlib.sourceforge.net/faq/troubleshooting_faq.html#reporting-problems , The line python -c `import matplotlib; print matplotlib.__version__` should not have back-ticks)
/sw/bin/python2.6 -c 'import matplotlib; print matplotlib.__version__'
1.0.0

Got matplotlib via fink:
fink --version
Package manager version: 0.29.21
Distribution version: selfupdate-rsync Sun Apr 3 02:28:24 2011, 10.6, x86_64
Trees: local/main stable/main stable/crypto unstable/main unstable/crypto

matplotlibrc file:
text.usetex : True

#backend : MacOSX
backend : GTKAgg
#backend : ps
#backend : pdf

------------------------------------------------------------------------------
Xperia(TM) PLAY
It's a major breakthrough. An authentic gaming
smartphone on the nation's most reliable network.
And it wants your games.
http://p.sf.net/sfu/verizon-sfdev
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users

that also doesn't work. The following would work (this is a LaTeX thing - not matplotlib)

r"80--120"
r"$80\textrm{--}120$"

andre

···

On Apr 5, 2011, at 5:08 PM, gary ruben wrote:

Um, how about r"$80--120$" instead of r"$80--120" ?

On Wed, Apr 6, 2011 at 9:56 AM, Sean Lake <odysseus9672@...287...> wrote:

Hello all,

I'm trying to specify a range of numbers in a particular legend using LaTeX. In order to do so I'm feeding it the string: r"$80--120". The output should be have an endash, "80–120", but I'm getting "80--120". This is a standard feature of LaTeX ( http://en.wikibooks.org/wiki/LaTeX/Formatting ), so I don't know what's going on.

Thanks,
Sean Lake

uname -a
Darwin dynamic_051.astro.ucla.edu 10.7.0 Darwin Kernel Version 10.7.0: Sat Jan 29 15:17:16 PST 2011; root:xnu-1504.9.37~1/RELEASE_I386 i386

(You also have a bug on this web page: http://matplotlib.sourceforge.net/faq/troubleshooting_faq.html#reporting-problems , The line python -c `import matplotlib; print matplotlib.__version__` should not have back-ticks)
/sw/bin/python2.6 -c 'import matplotlib; print matplotlib.__version__'
1.0.0

Got matplotlib via fink:
fink --version
Package manager version: 0.29.21
Distribution version: selfupdate-rsync Sun Apr 3 02:28:24 2011, 10.6, x86_64
Trees: local/main stable/main stable/crypto unstable/main unstable/crypto

matplotlibrc file:
text.usetex : True

#backend : MacOSX
backend : GTKAgg
#backend : ps
#backend : pdf

------------------------------------------------------------------------------
Xperia(TM) PLAY
It's a major breakthrough. An authentic gaming
smartphone on the nation's most reliable network.
And it wants your games.
http://p.sf.net/sfu/verizon-sfdev
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users

------------------------------------------------------------------------------
Xperia(TM) PLAY
It's a major breakthrough. An authentic gaming
smartphone on the nation's most reliable network.
And it wants your games.
http://p.sf.net/sfu/verizon-sfdev
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users

Ah, sorry about that. In the script I was using it had the closing $. In spite of the typo, Gary Ruben found the actual bug: math mode doesn't support --.

Thanks,
Sean

···

On Apr 5, 2011, at 17:08, gary ruben wrote:

Um, how about r"$80--120$" instead of r"$80--120" ?

On Wed, Apr 6, 2011 at 9:56 AM, Sean Lake <odysseus9672@...287...> wrote:

Hello all,

I'm trying to specify a range of numbers in a particular legend using LaTeX. In order to do so I'm feeding it the string: r"$80--120". The output should be have an endash, "80–120", but I'm getting "80--120". This is a standard feature of LaTeX ( http://en.wikibooks.org/wiki/LaTeX/Formatting ), so I don't know what's going on.

Thanks,
Sean Lake

uname -a
Darwin dynamic_051.astro.ucla.edu 10.7.0 Darwin Kernel Version 10.7.0: Sat Jan 29 15:17:16 PST 2011; root:xnu-1504.9.37~1/RELEASE_I386 i386

(You also have a bug on this web page: http://matplotlib.sourceforge.net/faq/troubleshooting_faq.html#reporting-problems , The line python -c `import matplotlib; print matplotlib.__version__` should not have back-ticks)
/sw/bin/python2.6 -c 'import matplotlib; print matplotlib.__version__'
1.0.0

Got matplotlib via fink:
fink --version
Package manager version: 0.29.21
Distribution version: selfupdate-rsync Sun Apr 3 02:28:24 2011, 10.6, x86_64
Trees: local/main stable/main stable/crypto unstable/main unstable/crypto

matplotlibrc file:
text.usetex : True

#backend : MacOSX
backend : GTKAgg
#backend : ps
#backend : pdf

------------------------------------------------------------------------------
Xperia(TM) PLAY
It's a major breakthrough. An authentic gaming
smartphone on the nation's most reliable network.
And it wants your games.
http://p.sf.net/sfu/verizon-sfdev
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users

you appear to have another typo.

Gary Ruben found the actual bug: math mode doesn't support --.

"Gary Ruben" --> "Andre Walker-Loud"

:slight_smile:

···

On Apr 5, 2011, at 5:15 PM, Sean Lake wrote:

Ah, sorry about that. In the script I was using it had the closing $. In spite of the typo, Gary Ruben found the actual bug: math mode doesn't support --.

Thanks,
Sean

On Apr 5, 2011, at 17:08, gary ruben wrote:

Um, how about r"$80--120$" instead of r"$80--120" ?

On Wed, Apr 6, 2011 at 9:56 AM, Sean Lake <odysseus9672@...287...> wrote:

Hello all,

I'm trying to specify a range of numbers in a particular legend using LaTeX. In order to do so I'm feeding it the string: r"$80--120". The output should be have an endash, "80–120", but I'm getting "80--120". This is a standard feature of LaTeX ( http://en.wikibooks.org/wiki/LaTeX/Formatting ), so I don't know what's going on.

Thanks,
Sean Lake

uname -a
Darwin dynamic_051.astro.ucla.edu 10.7.0 Darwin Kernel Version 10.7.0: Sat Jan 29 15:17:16 PST 2011; root:xnu-1504.9.37~1/RELEASE_I386 i386

(You also have a bug on this web page: http://matplotlib.sourceforge.net/faq/troubleshooting_faq.html#reporting-problems , The line python -c `import matplotlib; print matplotlib.__version__` should not have back-ticks)
/sw/bin/python2.6 -c 'import matplotlib; print matplotlib.__version__'
1.0.0

Got matplotlib via fink:
fink --version
Package manager version: 0.29.21
Distribution version: selfupdate-rsync Sun Apr 3 02:28:24 2011, 10.6, x86_64
Trees: local/main stable/main stable/crypto unstable/main unstable/crypto

matplotlibrc file:
text.usetex : True

#backend : MacOSX
backend : GTKAgg
#backend : ps
#backend : pdf

------------------------------------------------------------------------------
Xperia(TM) PLAY
It's a major breakthrough. An authentic gaming
smartphone on the nation's most reliable network.
And it wants your games.
http://p.sf.net/sfu/verizon-sfdev
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users

------------------------------------------------------------------------------
Xperia(TM) PLAY
It's a major breakthrough. An authentic gaming
smartphone on the nation's most reliable network.
And it wants your games.
http://p.sf.net/sfu/verizon-sfdev
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users

Just to clarify, in latex math mode, "$-$" is "-" (minus sign) and
"$--$" is "--".
And this is not a bug.

-JJ

···

On Wed, Apr 6, 2011 at 9:15 AM, Sean Lake <odysseus9672@...287...> wrote:

Gary Ruben found the actual bug: math mode doesn't support --.

Yes. That is correct.

Andre

···

On Apr 5, 2011, at 5:51 PM, Jae-Joon Lee wrote:

On Wed, Apr 6, 2011 at 9:15 AM, Sean Lake <odysseus9672@...287...> wrote:

Gary Ruben found the actual bug: math mode doesn't support --.

Just to clarify, in latex math mode, "$-$" is "-" (minus sign) and
"$--$" is "--".
And this is not a bug.

-JJ