@@ -1002,6 +1002,82 @@ subdirectory, but :file:`galleries/users_explain/artists` has a mix of
1002
1002
any ``*.rst `` files to a ``:toctree: ``, either in the ``README.txt `` or in a
1003
1003
manual ``index.rst ``.
1004
1004
1005
+
1006
+ .. _writing-user-guide :
1007
+
1008
+ Write user guide documentation
1009
+ ==============================
1010
+
1011
+ The pages in the :ref: `users-guide-index ` are a mix of :ref: `ReST <writing-rest-pages >`
1012
+ and :ref: `sphinx gallery <writing-examples-and-tutorials >` pages and should follow the
1013
+ respective formatting conventions. The goal of the user guide is to explain how
1014
+ Matplotlib works to someone who is unfamiliar with the library. To maintain the
1015
+ consistency and cohesiveness of the user guide, documentation that is contributed to
1016
+ this section should conform to the following guidelines:
1017
+
1018
+ Purpose: Explain how Matplotlib works
1019
+ -------------------------------------
1020
+
1021
+ The aim of the user guide is to teach the concepts on which the Matplotlib API is
1022
+ developed so that users can understand how to fit the individual components of the
1023
+ library together. Therefore, content should be concept oriented rather than focused on
1024
+ specific tasks, e.g. *What is a `Line2D` artist? * rather than *How do I make a yellow
1025
+ squiggly line? *
1026
+
1027
+
1028
+ Scope: Matplotlib objects and modules
1029
+ -------------------------------------
1030
+
1031
+ Many concepts in Matplotlib assume a grounding in visualization, statistics, and
1032
+ other topics to understand how they work. These concepts should be
1033
+ contextualized using common terminilogy, but the focus should not stray from the
1034
+ Matplotlib topic, e.g. *`Line2D` objects take as input either pairwise coordinates
1035
+ (x,y) or y with an implicit x and assume that the input data is continuous. *
1036
+ Here pairwise and continuous are not defined because they are assumed to be
1037
+ known by the audience, but are used to explain what data ``Line2D `` accepts.
1038
+
1039
+
1040
+ Audience: new users
1041
+ -------------------
1042
+
1043
+ The audience for this guide are readers who are getting introduced to using Matplotlib
1044
+ through this guide; therefore, content should be written with the assumption that the
1045
+ reader does not yet know what Matplotlib calls a given visualization task nor
1046
+ how any task is accomplished in Matplotlib. For example, each document should first
1047
+ introduce or define the object/module/concept that it is discussing and why it is
1048
+ important for the reader. e.g. *The ``Line2D`` class is an abstraction of a line and
1049
+ the ``LineCollection`` class is an abstraction of a set of lines. ``Line2D`` and
1050
+ ``LineCollection`` objects manage the properties and behavior of almost every line in
1051
+ an image. This means that one way to modify a line is to call methods on its underlying
1052
+ object. *
1053
+
1054
+
1055
+ Teaching style: Chunking
1056
+ ------------------------
1057
+
1058
+ The material is introduced in small, usually one change or task at a time, chunks to
1059
+ keep focus on the specific line of code enabling the given task. The aim is that by
1060
+ reducing cognitive load, it will be easier for users to learn what each specific object
1061
+ does and how it behaves. The goal is that gaining a conceptual understanding of
1062
+ Matplotlib's API will make it easier for a user to navigate the rest of the
1063
+ documentation.
1064
+
1065
+ For example, here the line object is introduced, then there is
1066
+ one example of using a method on the object, then there is a link out to further
1067
+ functionality::
1068
+
1069
+ For example, here the ``plot`` method returns a line object ``ln``::
1070
+
1071
+ ln, _ = plt.plot([1,2,3])
1072
+
1073
+ One of the properties of a line is its color. It can be modified using the
1074
+ ``set_color`` method of ``Line2D``::
1075
+
1076
+ ln.set_color('orange')
1077
+
1078
+ For a full list of methods see `~.Line2D`
1079
+
1080
+
1005
1081
Miscellaneous
1006
1082
=============
1007
1083
0 commit comments