René's URL Explorer Experiment


Title: Additional docstring recommendations · Issue #10225 · matplotlib/matplotlib · GitHub

Open Graph Title: Additional docstring recommendations · Issue #10225 · matplotlib/matplotlib

X Title: Additional docstring recommendations · Issue #10225 · matplotlib/matplotlib

Description: as a followup to #9786 and more generally #7217 Update: Striked through done Proposal: Additional docstring recommendations While looking at and writing more documentation, I've come across different conventions in several aspects of the...

Open Graph Description: as a followup to #9786 and more generally #7217 Update: Striked through done Proposal: Additional docstring recommendations While looking at and writing more documentation, I've come across differe...

X Description: as a followup to #9786 and more generally #7217 Update: Striked through done Proposal: Additional docstring recommendations While looking at and writing more documentation, I've come across dif...

Opengraph URL: https://github.com/matplotlib/matplotlib/issues/10225

X: @github

direct link

Domain: github.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Additional docstring recommendations","articleBody":"as a followup to #9786 and more generally #7217 \r\n\r\n**Update: Striked through done**\r\n\r\n## Proposal: Additional docstring recommendations\r\n\r\nWhile looking at and writing more documentation, I've come across different conventions in several aspects of the docstrings.\r\n\r\nWhile one should not be too pedantic, and the world does not end if there are some variations, a set of of recommendations helps.\r\n\r\n- It helps the user: Recognizable conventions throughout the docs. Better readability.\r\n- It helps me as an author, because I don't always have to think anew about how to write certain patterns in the docs.\r\n\r\n### Structure of this proposal\r\n\r\nFor every aspect, if written a text to be included in [documentation guide](http://matplotlib.org/devdocs/devel/documenting_mpl.html#documenting-matplotlib) in quotes:\r\n\r\n\u003e Text for documentation.\r\n\r\nEverything else are descriptions of the current state or explanations. One may consider adding the rationales.\r\n\r\n### Parameter type descriptions\r\n\r\n\u003cs\u003e#### Number type\r\nProposal:\r\n\u003e Use *scalar* instead of *int* or *float* if the type can be any number.\r\n\r\nCurrent usage: Already often done, but not always. Just a hint for new writers.\u003c/s\u003e\r\n\r\n\u003cs\u003e#### array-like inputs\r\nFor array-like inputs, there are several notations:\r\n\r\n- array_like / array-like\r\n- sequence, sequence of [type]\r\n- array\r\n- iterable of [type]\r\n\r\nAdditionally, there are many variants to note length or dimensionality:\r\n\r\n- shape(N,) / shape(2,N) / shape 2xN\r\n- length N / length n\r\n- 2-tuple / length 2-tuple / tuple of length 2\r\n- 2 dimensional / 2-dimensional / two-dimensional / 2d / 2D / 2-D\r\n  Note: according to [this journal article](http://europeanscienceediting.eu/articles/3d-or-3-d-a-study-of-terminology-usage-and-style/) 3D is more commonly used than 3-D.\r\n\r\n\u003e suggestion t.b.d.\u003c/s\u003e\r\n\r\n### String values\r\n\r\n\u003e Use simple single quotes when giving string values.\r\n\r\ne.g. \r\n\r\n    If fmt is 'none', only the errorbars will be plotted.\r\n\r\nRationale: For the rendered docs, a litterally-quoted string ` ``'none'`` ` would look a bit nicer (similar to ``'none'``), but that's too difficult to type and too difficult to read in plaintext docs.\r\n\r\nCurrent usage: Already often done, but not always. Just a hint for new writers.\r\n\r\n\u003cs\u003e### Citing other types\r\n\r\nDo we use `~matplotlib.markers.MarkerStyle` or `.MarkerStyle`?\r\n\r\nProposal:\r\n\u003e Use full references `` `~matplotlib.markers.MarkerStyle` `` in parameter types. Use abbreviated links `` `.MarkerStyle` `` in the text.\r\n\r\ne.g.\r\n\r\n        norm : `~matplotlib.colors.Normalize`, optional, default: None\r\n            A `.Normalize` instance is used to scale luminance data to 0, 1.\r\n\r\nRationale: The distinction is only relevant for the plaintext string. The full reference is required if I want to find the corresponding doc (e.g. ipython `matplotlib.colors.Normalize?`). Therefore we write it in the type definition. In a text passage, readability has a higher priority. Therefore, we use abbreviated references.\r\n\r\n\u003e The displayed links of full references are abbreviated to the last component by preceding a tilde `` `~matplotlib.markers.MarkerStyle` ``. The abbreviation is not neccesary if the reference does only consist of one component anyway. For readability, do not use a tilde in these cases `` `.MarkerStyle` `` not `` `~.MarkerStyle` ``.\r\n\r\n\u003e Use partial references if the shorted form would be too generic, i.e. `` `.Bbox.ignore` `` instead of `` `~.Bbox.ignore` `` or `` `~matplotlib.transforms.Bbox.ignore` ``.\r\n\r\ne.g.\r\n \r\n    This depends on the last value passed to `.Bbox.ignore`.\r\n\r\nRationale: The abbreviated from in the HTML should be easy to read. The link target gives the exact reference.\u003c/s\u003e\r\n\r\n\u003cs\u003e### Citing rcParams\r\n\r\nCurrent variants:\r\n\r\n- defaults to ` ``(lines.linewidth,)`` `\r\n- defaults to rc ` ``image.cmap`` ` / defaults to rc `` `image.origin` ``\r\n- default is taken from the rcParam ` ``hist.bins`` `\r\n- Default is ` ``rcParams['lines.markersize'] ** 2`` `\r\n- default to rc settings\r\n\r\nWe should create a label `.. _rc-params` [here](https://matplotlib.org/devdocs/tutorials/introductory/customizing.html?highlight=rcparams#matplotlib-rcparams).\r\n\r\n\u003e When citing rcParams use a reference to the label `rc-params` and the literal role for the parameter name.\r\n\r\ne.g.\r\n\r\n    defaults to :ref:`rcParam\u003crc-params\u003e` ``lines.linewidth``.\r\n\r\nRationale: A link to the rcParams is helpfull, but it should be as short as possible in the plain text. One could also :ref:`rc-params`, but the link text would then depend on the section titile, which may not be good.\u003c/s\u003e\r\n\r\n*Note:* If we would switch from the Sphinx default_role `obj` to `any`, we could even leave out the `:ref:`.\r\n\r\n*Note 2:* The object `rcParams` is currently sometimes referenced, but that does not contain a list and description of the values. Also, there are several ways to influence the rcParams. So the above reference is more appropriate than the object. We should add a link from the object.\r\n\r\n### Spaces after colon\r\n\r\nJust noted that sometimes there's one space, sometimes there are two spaces. Not sure if it's worth mentioning.","author":{"url":"https://github.com/timhoffm","@type":"Person","name":"timhoffm"},"datePublished":"2018-01-11T02:07:29.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":11},"url":"https://github.com/10225/matplotlib/issues/10225"}

route-pattern/_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format)
route-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:780220ba-69b6-2958-09be-de88fb3dbadf
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-idAD34:21879F:26E54D:355B69:6A533583
html-safe-nonce664a333306aa2c371411a7a661d95f7e18bb3e7e220010fd070f8db8de95a8c7
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBRDM0OjIxODc5RjoyNkU1NEQ6MzU1QjY5OjZBNTMzNTgzIiwidmlzaXRvcl9pZCI6IjM5NjI1NDQxOTkyMzczMTgwMjAiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ==
visitor-hmac431a9a5e719af740d3342ed9e0b845e87845699a9434a62badec533764a884fa
hovercard-subject-tagissue:287640294
github-keyboard-shortcutsrepository,issues,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///voltron/issues_fragments/issue_layout
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/matplotlib/matplotlib/10225/issue_layout
twitter:imagehttps://opengraph.githubassets.com/935d93b26cbfa16ea304c2e25c2bfad6c16282affd6d40855300195741d5b80c/matplotlib/matplotlib/issues/10225
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/935d93b26cbfa16ea304c2e25c2bfad6c16282affd6d40855300195741d5b80c/matplotlib/matplotlib/issues/10225
og:image:altas a followup to #9786 and more generally #7217 Update: Striked through done Proposal: Additional docstring recommendations While looking at and writing more documentation, I've come across differe...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernametimhoffm
hostnamegithub.com
expected-hostnamegithub.com
Noneb9a586c06a05a7a86fc7e3f4dbd03e42f6869085879aa184aa6369456dbd50fb
turbo-cache-controlno-preview
go-importgithub.com/matplotlib/matplotlib git https://github.com/matplotlib/matplotlib.git
octolytics-dimension-user_id215947
octolytics-dimension-user_loginmatplotlib
octolytics-dimension-repository_id1385122
octolytics-dimension-repository_nwomatplotlib/matplotlib
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id1385122
octolytics-dimension-repository_network_root_nwomatplotlib/matplotlib
turbo-body-classeslogged-out env-production page-responsive
disable-turbofalse
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
release07a982c1d40157c619b364352b704c3ce66bb332
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/matplotlib/matplotlib/issues/10225#start-of-content
https://github.com/
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fmatplotlib%2Fmatplotlib%2Fissues%2F10225
GitHub CopilotWrite better code with AIhttps://github.com/features/copilot
GitHub Copilot appDirect agents from issue to mergehttps://github.com/features/ai/github-app
MCP RegistryNewIntegrate external toolshttps://github.com/mcp
ActionsAutomate any workflowhttps://github.com/features/actions
CodespacesInstant dev environmentshttps://github.com/features/codespaces
IssuesPlan and track workhttps://github.com/features/issues
Code ReviewManage code changeshttps://github.com/features/code-review
GitHub Advanced SecurityFind and fix vulnerabilitieshttps://github.com/security/advanced-security
Code securitySecure your code as you buildhttps://github.com/security/advanced-security/code-security
Secret protectionStop leaks before they starthttps://github.com/security/advanced-security/secret-protection
Why GitHubhttps://github.com/why-github
Documentationhttps://docs.github.com
Bloghttps://github.blog
Changeloghttps://github.blog/changelog
Marketplacehttps://github.com/marketplace
View all featureshttps://github.com/features
Enterpriseshttps://github.com/enterprise
Small and medium teamshttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
App Modernizationhttps://github.com/solutions/use-case/app-modernization
DevSecOpshttps://github.com/solutions/use-case/devsecops
DevOpshttps://github.com/solutions/use-case/devops
CI/CDhttps://github.com/solutions/use-case/ci-cd
View all use caseshttps://github.com/solutions/use-case
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
View all industrieshttps://github.com/solutions/industry
View all solutionshttps://github.com/solutions
AIhttps://github.com/resources/articles?topic=ai
Software Developmenthttps://github.com/resources/articles?topic=software-development
DevOpshttps://github.com/resources/articles?topic=devops
Securityhttps://github.com/resources/articles?topic=security
View all topicshttps://github.com/resources/articles
Customer storieshttps://github.com/customer-stories
Events & webinarshttps://github.com/resources/events
Ebooks & reportshttps://github.com/resources/whitepapers
Business insightshttps://github.com/solutions/executive-insights
GitHub Skillshttps://skills.github.com
Documentationhttps://docs.github.com
Customer supporthttps://support.github.com
Community forumhttps://github.com/orgs/community/discussions
Trust centerhttps://github.com/trust-center
Partnershttps://github.com/partners
View all resourceshttps://github.com/resources
GitHub SponsorsFund open source developershttps://github.com/open-source/sponsors
Security Labhttps://securitylab.github.com
Maintainer Communityhttps://maintainers.github.com
Acceleratorhttps://github.com/open-source/accelerator
GitHub Starshttps://stars.github.com
Archive Programhttps://archiveprogram.github.com
Topicshttps://github.com/topics
Trendinghttps://github.com/trending
Collectionshttps://github.com/collections
Enterprise platformAI-powered developer platformhttps://github.com/enterprise
GitHub Advanced SecurityEnterprise-grade security featureshttps://github.com/security/advanced-security
Copilot for BusinessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/enterprise/premium-support
Pricinghttps://github.com/pricing
Search syntax tipshttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
documentationhttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fmatplotlib%2Fmatplotlib%2Fissues%2F10225
Sign up https://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fvoltron%2Fissues_fragments%2Fissue_layout&source=header-repo&source_repo=matplotlib%2Fmatplotlib
Reloadhttps://github.com/matplotlib/matplotlib/issues/10225
Reloadhttps://github.com/matplotlib/matplotlib/issues/10225
Reloadhttps://github.com/matplotlib/matplotlib/issues/10225
Please reload this pagehttps://github.com/matplotlib/matplotlib/issues/10225
matplotlib https://github.com/matplotlib
matplotlibhttps://github.com/matplotlib/matplotlib
Please reload this pagehttps://github.com/matplotlib/matplotlib/issues/10225
Notifications https://github.com/login?return_to=%2Fmatplotlib%2Fmatplotlib
Fork 8.4k https://github.com/login?return_to=%2Fmatplotlib%2Fmatplotlib
Star 23k https://github.com/login?return_to=%2Fmatplotlib%2Fmatplotlib
Code https://github.com/matplotlib/matplotlib
Issues 1.1k https://github.com/matplotlib/matplotlib/issues
Pull requests 408 https://github.com/matplotlib/matplotlib/pulls
Actions https://github.com/matplotlib/matplotlib/actions
Projects https://github.com/matplotlib/matplotlib/projects
Wiki https://github.com/matplotlib/matplotlib/wiki
Security and quality 0 https://github.com/matplotlib/matplotlib/security
Insights https://github.com/matplotlib/matplotlib/pulse
Code https://github.com/matplotlib/matplotlib
Issues https://github.com/matplotlib/matplotlib/issues
Pull requests https://github.com/matplotlib/matplotlib/pulls
Actions https://github.com/matplotlib/matplotlib/actions
Projects https://github.com/matplotlib/matplotlib/projects
Wiki https://github.com/matplotlib/matplotlib/wiki
Security and quality https://github.com/matplotlib/matplotlib/security
Insights https://github.com/matplotlib/matplotlib/pulse
Additional docstring recommendationshttps://github.com/matplotlib/matplotlib/issues/10225#top
Documentationhttps://github.com/matplotlib/matplotlib/issues?q=state%3Aopen%20label%3A%22Documentation%22
https://github.com/timhoffm
timhoffmhttps://github.com/timhoffm
on Jan 11, 2018https://github.com/matplotlib/matplotlib/issues/10225#issue-287640294
#9786https://github.com/matplotlib/matplotlib/issues/9786
#7217https://github.com/matplotlib/matplotlib/issues/7217
documentation guidehttp://matplotlib.org/devdocs/devel/documenting_mpl.html#documenting-matplotlib
this journal articlehttp://europeanscienceediting.eu/articles/3d-or-3-d-a-study-of-terminology-usage-and-style/
herehttps://matplotlib.org/devdocs/tutorials/introductory/customizing.html?highlight=rcparams#matplotlib-rcparams
Documentationhttps://github.com/matplotlib/matplotlib/issues?q=state%3Aopen%20label%3A%22Documentation%22
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.