• Tidak ada hasil yang ditemukan

Package PGFPLOTS manual - Index of /

N/A
N/A
Nguyễn Gia Hào

Academic year: 2023

Membagikan "Package PGFPLOTS manual - Index of /"

Copied!
365
0
0

Teks penuh

This is the preferred way if you want to install newer versions than MikTEX. But if you have an axis string like where many significant figures are needed, this can be problematic. This can also happen if you only look at a very small part of the data range.

TEX-dialects: L A TEX, ConTEXt, plain TEX

The pgfplots user interface consists of three components: a tikzpicture environment, an axis, and the\addplotcommand. The\addplotcommand supports various coordinate input methods (such as table input or mathematical expressions) and allows various types of visualization options with straight lines as initial configuration. The reference manual is optimized for electronic display: many examples illustrate the features, and reference documentation can be found by clicking in the source code text fields.

A First Plot

Two Plots in the Same Axis

Logarithmic Plots

Cycling Line Styles

Scaling Plots

The Axis-Environments

The \addplot Command: Coordinate Input

Does the same as \addplot[hoptionsi] ..; except that hoptionsi are added to the arguments that would have been used for \addplot .. the default list element). The newline choice uses the end of the line as it appears in the table data (i.e. the input file or any inline table data). Due to data structure issues (“macro append runtime”), the full read runtime complexity is O(N2) where N is the number of rows.

Figure 1: Using Matlab to extract image coordinates (left) and Gimp to measure distances (right).
Figure 1: Using Matlab to extract image coordinates (left) and Gimp to measure distances (right).

About Options: Preliminaries

Inside the hkey-value-listi, the '/pgfplots/' prefixes commonly presented in this manual can be omitted (they are checked automatically). This command can be used to define default settings for the entire document or part of the document. For example, 'font=\Large' above will be used as the argument to the legend matrix, and 'font=\Large' the argument in.

Two Dimensional Plot Types

Multiple strip plots on an axis can be stacked on top of each other or lined up next to each other. Here, ybar returns /pgfplots/ybar because it is an argument for the axis, not for a single plot. Bins are semi-open intervals, i.e. the last point does not belong to the bin.. xtick=,% reset from ybar interval xticklabel= .. a data file containing 8000 normally distributed .. file {plotdata/pgfplots. random. date};.

If available internally, the hist/ key prefix can be omitted. Available labels along with accepted style options can be found in section 4.6 on page 115. Applies only to labels and can be combined with any other plot type.

Again, it can be configured with the dot metakey (which is actually the same asscatter src). This one-dimensional grid plot is actually a special case of two-dimensional grid plots, so more detailed configuration, including how to change the color data, is available in Section 4.5.5. More on this coordinate filtering can be found in section 4.21 "Skip or Change Coordinates - Filters".

These triangles can be drawn with a single color (shader = flat and shader = facet interp) or with interpolated colors (shader = interp).

Three Dimensional Plot Types

\addplot3 tableinput works in the same way as two-dimensional table\addplot. It is enough to specify one of the grids/rows or grids/columns - the missing value will be determined automatically. This is true even if there is no end-of-scanline marker (empty line) in the input stream.

Three-dimensional lines usually use lines to connect points (ie, the initial sharp holder of TikZ's graph). In the initial configuration, the "color coordinate" is the z-axis (or y-axis for two-dimensional graphics). The various \addplot commands will be plotted on top of each other, in order of appearance.

Note that shader=flat mean and shader=flat corner also affect grid plots - the choices determine the color of the grid segment. The resulting .pdf files appear to be correct, but cannot be converted to postscript - the conversion software always complains about an error. Thecontour gnuplotstyle accepts matrix input in the same format as formeshorsurf (which includes any of the pgfplots matrix input methods).

There are two-dimensional and three-dimensional plots, both with the same interface, which are explained in the following sections.

Markers, Linestyles, (Background-) Colors and Colormaps

Note that each of the provided points can be freely rotated using mark options={rotate=90}ofevery mark/.append style={rotate=90}. The 'each-axis-plot' style can be used to change line widths for plots only. This example shows the same plots as on page 17 (using \plotcoords as a placeholder for the commands on page 17), with different line widths and font sizes. Header:\pgfplotsset{width=7cm,compat=1.4}. pgfplotsset{each axis/.append style={. font=\large, linewidth=1pt,. see above for this macro:. Header:\pgfplotsset{width=7cm,compat=1.4}. pgfplotsset{each axis/.append style={. see above for this macro:. pgfuses the color support of xcolor.

For example, if you have black, the alternative tick list option fill=.!50!white will produce much better results. any mark/.append style={solid,fill=.!80!black},mark=half square*\\%. any mark/.append style={solid,fill=.!80!black},mark= semicircle*\\%. any mark/.append style={solid,fill=.!80!black},mark=right half square*\\%. any mark/.append style={solid,fill=.!80!black},mark=left half square*\\%. red, blue, black, yellow, brown, brown, orange, purple, cyan, green! 70! black, purple, gray}. pgfplotscreateplotcyclelist{linestyles}{solid,line,dotted}. pgfplotscreateplotcyclelist{linestyles*}{solid, line, dotted, dotted, dash-dot}. Note: It is possible to call \pgfplotsset{loop list={ha list}}or loop list name between plots. Using Sub-Lists The entry Thehlist ii can also contain only the first n elements of an already known cycle list name using the syntax[numberi of]hcycle namei.

Providing Color Data - Point Meta

Please note that point-meta and straw-src are actually the same - straw-src is an alias for point-meta. Any other choice will trigger the calculation of upper and lower ranges for point metadata, i.e. 34In rare circumstances it may be interesting to apply a mathematical expression to another source of point metadata (one of the other.

As already mentioned, a main use of point metadata is to determine (marker/face/edge) colors using a linear map in the range [0.1000] (perhaps for use in the current colormap). The untransformed point metadata is available in macro\pgfplotspointmeta (only in the correct context, eg the scatterplot styles or thescatter/@pre marker code interface). Keypoint meta rel configures whether the interval for all point metacoordinates, [mmin, mmax] is calculated as the maximum over all plots in the complete axis (selection axis wide) or only for a specific plot (selection perplot).

These keys allow to explicitly define the range required for the linear map of point metadata in the range [0,1000] (for example for current maps). If point metadata falls outside these limits, the linear transformation is still well defined which is acceptable (unless the interval is of zero length). This key configures how point metadata is used to determine colors from a colormap.

The option direct does not perform any transformation; it takes the dot meta as integer indices in the current color map.

Axis Descriptions

The anchors of current axis can also be used to place descriptors: At the time when axis descriptors are drawn, all anchors that refer to the axis origin (meaning the "real" point (0,0)) or any of the axis angles is using current as.hanchor namei. Shift labels in the direction of the outer normal vector of the axis by an amount of hdimensioni. Instead of the /.append style, it is possible to use legendstyleas in the following example.

So if you type \ref{hnamei} somewhere outside the axis, maybe even outside any picture, the legend will be drawn. If you want the legend to be exported and drawn within the current axis, consider using extra description/.append code={\ref{hnamei}}. Note that the special options are provided as part of the legend entry, using square brackets right in front of the text as such.

If this coordinate is not part of the axis limit, the lower axis limit is selected instead. In the event that the range of one of the axes does not include a zero value, this can be visualized by a break decoration on the corresponding axis line. The values ​​of these keys contain the lower and upper bounds of the color map, i.e.

In addition, the appearance of the axis changes with axis y line*=left|right depending on the position of the color bar (orax x line*=bottom for color bar horizontal). A style used by sampled lines with a color bar to change the color of the line without check marks. Feel free to redefine the scale - the option can still be useful for getting more taps without too much typing.

Scaling Options

In other words: for two-dimensional axes, the y-vector must be parallel to the y-direction of the canvas, and for three-dimensional axes, the same applies to the z-vector. The idea is to change the scale of only the vertical part of one unit vector and at the same time change the limits of the respective axis. Each unit vector is set to the same length while the axis dimensions remain constant.

The configuration axis equal=true is actually just a style which sets unit vector ratio=1 1 1, unit rescale keep size=true. The configuration axis equal image=true is actually just a style that sets unit vector ratio=1 1 1, unit rescale hold size=false. Thus, a three-dimensional axis with unit vector ratio = 1 2 4 will have an anxunit which is 1/4 the length of the z unit and an ay unit which is 2/4 the length of the z unit.

Subsequent values ​​of 1 can be omitted, i.e. unit vector ratio=2 1 is the same as unit vector ratio=2;. In the default configuration, pgfplots maintains the original axis dimensions, even if the unit vector ratio involves different scaling. She does this by increasing the boundaries. Preamble:\pgfplotsset{width=7cm,compat=1.4}. begin{as}[footnote size,xlabel=$x$,ylabel=$y$,unit vector ratio=].

The second uses the same length for each unit vector and extends the limits to keep the same dimensions.

Gambar

Figure 1: Using Matlab to extract image coordinates (left) and Gimp to measure distances (right).

Referensi

Dokumen terkait

Berdasarkan hasil analisis data, dapat ditarik kesimpulan bahwa sebagian besar (50 %) dari 72 siswa kelas IV dan V SD Budi Mulia Dua Yogyakarta yang