Documentation error/bug?

Hello,

I looked on your website for the different line styles. In the documentation for matplotlib.lines.line2D.set_linestyle, the dashed linestyle is listed as '-' and not '--'. It it my understanding that dashed should be '--'. If I'm incorrect, sorry for the noise.

Cheers,

···

--
Josh Lawrence
Ph.D. Student
Clemson University

Looks like the formatter for the online documentation took the double-dash to mean a “long line”, much like how LaTeX does. Anybody know how to make the double-dash appear as two distinct dashes?

http://matplotlib.sourceforge.net/api/artist_api.html?highlight=set_linestyle#matplotlib.lines.Line2D.set_linestyle

Ben Root

···

On Sat, Jul 24, 2010 at 1:51 PM, Josh Lawrence <josh.k.lawrence@…287…> wrote:

Hello,

I looked on your website for the different line styles. In the

documentation for matplotlib.lines.line2D.set_linestyle, the dashed

linestyle is listed as ‘-’ and not ‘–’. It it my understanding that

dashed should be ‘–’. If I’m incorrect, sorry for the noise.

Cheers,

Josh Lawrence

Ph.D. Student

Clemson University

After some reading of sphinx documentation, it appears to be a bug with sphinx (or actually, “smartypants”) because it should not be doing this sort of interpretation within a docstring. Anyway, supposedly the workaround is to put double backticks around the part that needs to be treated literally: '--'. I tried this out and built the docs locally and it works… sort of. The text that is surrounded by double backticks are getting a different background color. This doesn’t look great to me. Maybe someone else has a thought?

Ben Root

···

On Mon, Jul 26, 2010 at 9:49 AM, Benjamin Root <ben.root@…3146…4…> wrote:

On Sat, Jul 24, 2010 at 1:51 PM, Josh Lawrence <josh.k.lawrence@…287…> wrote:

Hello,

I looked on your website for the different line styles. In the

documentation for matplotlib.lines.line2D.set_linestyle, the dashed

linestyle is listed as ‘-’ and not ‘–’. It it my understanding that

dashed should be ‘–’. If I’m incorrect, sorry for the noise.

Cheers,

Josh Lawrence

Ph.D. Student

Clemson University

Looks like the formatter for the online documentation took the double-dash to mean a “long line”, much like how LaTeX does. Anybody know how to make the double-dash appear as two distinct dashes?

http://matplotlib.sourceforge.net/api/artist_api.html?highlight=set_linestyle#matplotlib.lines.Line2D.set_linestyle

Ben Root

2010/7/26 Benjamin Root <ben.root@...1304...>:

After some reading of sphinx documentation, it appears to be a bug with
sphinx (or actually, "smartypants") because it should not be doing this sort
of interpretation within a docstring. Anyway, supposedly the workaround is
to put double backticks around the part that needs to be treated literally:
``'--'``. I tried this out and built the docs locally and it works... sort
of. The text that is surrounded by double backticks are getting a different
background color. This doesn't look great to me. Maybe someone else has a
thought?

How looks a backticked empty string like? If it is just nothing, it
could be used in between of the two hyphens, to separate them by
"nothing". Still very hackish ... But it's just like LaTeX -{}-.

Friedrich

Actually, I just took another look at the documentation and realized that the docstring for set_linestyle() was inconsistent with the docs for plot(). plot() have been using the backticks for a while now, so if we just use the double-backticks for all the values in set_linestyle() it would be consistent and look much better than it is now.

I can make these changes and commit them to the trunk and the release branch, if that is ok.

Ben Root

···

On Tue, Jul 27, 2010 at 1:31 PM, Friedrich Romstedt <friedrichromstedt@…287…> wrote:

2010/7/26 Benjamin Root <ben.root@…1304…>:

After some reading of sphinx documentation, it appears to be a bug with

sphinx (or actually, “smartypants”) because it should not be doing this sort

of interpretation within a docstring. Anyway, supposedly the workaround is

to put double backticks around the part that needs to be treated literally:

'--'. I tried this out and built the docs locally and it works… sort

of. The text that is surrounded by double backticks are getting a different

background color. This doesn’t look great to me. Maybe someone else has a

thought?

How looks a backticked empty string like? If it is just nothing, it

could be used in between of the two hyphens, to separate them by

“nothing”. Still very hackish … But it’s just like LaTeX -{}-.

Friedrich

    2010/7/26 Benjamin Root <ben.root@…1304… <mailto:ben.root@…1304…>>:
     > After some reading of sphinx documentation, it appears to be a
    bug with
     > sphinx (or actually, "smartypants") because it should not be
    doing this sort
     > of interpretation within a docstring. Anyway, supposedly the
    workaround is
     > to put double backticks around the part that needs to be treated
    literally:
     > ``'–'``. I tried this out and built the docs locally and it
    works… sort
     > of. The text that is surrounded by double backticks are getting
    a different
     > background color. This doesn't look great to me. Maybe someone
    else has a
     > thought?

    How looks a backticked empty string like? If it is just nothing, it
    could be used in between of the two hyphens, to separate them by
    "nothing". Still very hackish ... But it's just like LaTeX -{}-.

    Friedrich

Actually, I just took another look at the documentation and realized
that the docstring for set_linestyle() was inconsistent with the docs
for plot(). plot() have been using the backticks for a while now, so if
we just use the double-backticks for all the values in set_linestyle()
it would be consistent and look much better than it is now.

I can make these changes and commit them to the trunk and the release
branch, if that is ok.

Ben,

Sounds reasonable--go ahead.

Thanks.

Eric

···

On 07/28/2010 05:48 AM, Benjamin Root wrote:

On Tue, Jul 27, 2010 at 1:31 PM, Friedrich Romstedt > <friedrichromstedt@…287… <mailto:friedrichromstedt@…287…>> wrote:

Ben Root

------------------------------------------------------------------------------
The Palm PDK Hot Apps Program offers developers who use the
Plug-In Development Kit to bring their C/C++ apps to Palm for a share
of $1 Million in cash or HP Products. Visit us here for more details:
http://p.sf.net/sfu/dev2dev-palm

_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users

Done in r8593 and r8594

Ben Root

···

On Wed, Jul 28, 2010 at 1:54 PM, Eric Firing <efiring@…202…> wrote:

On 07/28/2010 05:48 AM, Benjamin Root wrote:

On Tue, Jul 27, 2010 at 1:31 PM, Friedrich Romstedt > > <friedrichromstedt@…287… mailto:friedrichromstedt@...287...> wrote:

2010/7/26 Benjamin Root <ben.root@...1304... <mailto:ben.root@...1304...>>:
 > After some reading of sphinx documentation, it appears to be a

bug with

 > sphinx (or actually, "smartypants") because it should not be

doing this sort

 > of interpretation within a docstring.  Anyway, supposedly the

workaround is

 > to put double backticks around the part that needs to be treated

literally:

 > ``'--'``.  I tried this out and built the docs locally and it

works... sort

 > of.  The text that is surrounded by double backticks are getting

a different

 > background color.  This doesn't look great to me.  Maybe someone

else has a

 > thought?



How looks a backticked empty string like?  If it is just nothing, it

could be used in between of the two hyphens, to separate them by

"nothing".  Still very hackish ... But it's just like LaTeX -{}-.



Friedrich

Actually, I just took another look at the documentation and realized

that the docstring for set_linestyle() was inconsistent with the docs

for plot(). plot() have been using the backticks for a while now, so if

we just use the double-backticks for all the values in set_linestyle()

it would be consistent and look much better than it is now.

I can make these changes and commit them to the trunk and the release

branch, if that is ok.

Ben,

Sounds reasonable–go ahead.

Thanks.

Eric