Using graphic objects

FEDERAL STATE BUDGET

EDUCATIONAL INSTITUTION

HIGHER PROFESSIONAL EDUCATION

"MURMANSK STATE TECHNICAL UNIVERSITY"

Department of Engineering Graphics

Guidelines

to the execution of the calculation and graphic task

"Visualization of information about processes and phenomena"


Compiled by: Chervonyak T.F. - Senior Lecturer, Department of Engineering Graphics, Murmansk State Technical University

The guidelines were reviewed and approved at a meeting of the department, protocol No. 9 dated 05/20/11.

Reviewer - Ph.D., Associate Professor of the Department of TM and S Ivaney A.A.


Introduction 4

Fundamentals of graphical representation of information. 5

Graphical models of processes and phenomena 20

Instructions for performing a graphic task

"Visualization of information about processes and phenomena" 51

Task options 52

Used literature 67


INTRODUCTION

These guidelines provide general information about graphical models of processes and phenomena, offer options for a graphical task, and also provide an example of the task “Visualization of information about processes and phenomena”.

The purpose of the task is to study the basic rules for compiling ideographic models for visualizing the results of scientific and engineering research, such as a table, diagram, diagram.

In the process of doing the work, the student acquires skills in the implementation of tables, diagrams, diagrams, as well as in choosing the model of the most effective means of transmitting information about a process or phenomenon, mastering the technique of drawing them in AutoCAD.


Fundamentals of graphical representation of information

The growing growth in the volume of scientific, technical and information requires modern methods of its processing and transmission. From a modern specialist, qualities are required that allow you to quickly and accurately process and transmit a large amount of information. Most effective means transmission of information are visual, which are read by the organs of vision. Knowledge of these tools, the ability to use them are components of graphic literacy, the foundations of which can be laid by studying training course « Engineering graphics».

Engineering graphics is a kind of language with the help of which, using graphic models, a specialist has the opportunity to express his engineering ideas. And this graphic language is international, it is clear to any technically competent person.

modern science and technology require an engineer to have a high level of knowledge and skills in visualizing various information. This is explained by the fact that, on the one hand, there is a natural human need for visual-imaginative impressions, and it is easier for him to assimilate information with the help of visual images, and on the other hand, there is a rapid development of on-screen means of processing and transmitting information. It is all the more appropriate to talk not only about the importance of visual perception of information, but also about a certain culture of its visualization.

Visual literacy is essential component human professional activity in all areas of knowledge and production. Possessing visual literacy, a person gets the opportunity to reproduce and analyze images using visual display tools (including computer ones) based on existing knowledge, use creative improvisation techniques, embody their ideas in visual, technical or artistic graphics.

Verbal language and verbal categories contain primitive means for constructing space, interpreting it, or doing something with it. This purpose is served by the language of images and


a system of perceptual actions with the help of which a person builds an image of the surrounding reality and orients himself in it. This system is called perception. Perception is defined as a holistic image that reflects the unity of the structure and properties of an object. The objects of visual perception are objects, processes and phenomena of the surrounding world, which can be divided and described in terms of space, movement, shape, texture, color, brightness, etc. When perceiving objects, the image more or less fully reflects the object or situation in which the person is.

Images created on the basis of visual perception have more associative power than words. The visual image is very plastic. This property is manifested in the fact that, in terms of the image, a quick transition from a generalized assessment of the situation to a detailed analysis of its elements is possible. Various kinds of movements of objects reflected in the image, their shifts, rotations, as well as enlargement, reduction, perspective distortions and normalization are possible. This kind of manipulative ability of the visual system allows you to present the situation, both in direct and in reverse perspective. Manipulation of images, their completion are the most important means of productive perception and visual thinking.

Many studies indicate that there are mechanisms in the visual system that ensure the birth of a new image. Thanks to them, a person is able to see the world not only as it really exists, but also as it can (or should) be. This means that visual images are a necessary condition, even more than that - an instrument of mental activity. They are connected more directly in comparison with symbols and speech, with the objective reality surrounding a person.

It is impossible to prepare a creatively thinking specialist without developing his figurative representation, imagination and thinking. A tangible benefit in this matter is provided by the universal apparatus of projection schematism. One of the most important projection modeling tools used to form spatial representations is geometric interpretation. The objects of interpretation are graphical models in the form


combinations of drawings, diagrams, text, diagrams, etc. Graphical models involve displaying information in the form of a set of means for graphical representation of information: lines, symbols, mnemonic signs used in accordance with the rules for constructing graphical models. When perceiving information in this form, it is necessary to enter a higher dimensional operational space than when perceiving a text. The degree of accuracy when comparing an information object with its model depends on the completeness of information about the projection apparatus, which took place during the modeling.

Figure 1 shows one of the possible classifications of graphical models. Pictographic model - a graphic model compiled using conditional graphic images (pictograms) denoting objects, actions or events. Ideographic model - a graphic model compiled using ideograms - conventional written signs denoting concepts.

The issue of the effectiveness of the transfer and assimilation of information has been one of the main ones over the past decades. The main means of communication in the world at the beginning of the 21st century is visualization (a visual form of transmission) of information. The greatest amount of information (about 80-90%) a person perceives visually.

Figure 1. Classification of graphic models


Figure 2. Scheme of ways to transfer information between people

The efficiency, the advantage of the graphic method of information transmission, compared to the motor or sound one (Figure 2), is that the person’s visual perception of the transmitted information and the creation of a mental image by him occur so quickly that the person perceives this process as “instant”.

When building a graphical model, it is necessary to evaluate the structural elements that can be used to create it, their capabilities and limitations: the dictionary of forms and the syntax of their phrasing.

If the meaning of the text is revealed by words, then the illustration “speaks” the language of forms. These include point, line, flat geometric figure, color, texture.

Dot. In a theoretical sense, it has no dimension (dimensionless) and indicates a location or position. When creating a graphic model (expression), a point is characterized by a concentration of forms or visual perception in a certain center, which attracts and fixes the visual focus. Graphically, a point can be represented as a circle, an intersection of lines, a letter, or a number (as part of a graphical expression, these are often visually perceived as points). In graphical practice, a dot can have different sizes,


shape and color tone (Figure 3). It can act as a symbol depicting some specific object or idea.

Figure 3. Elements that can be perceived as a "Point"

Line is a one-dimensional formation that indicates direction, extent, or movement. It is used to display a trajectory or route, to indicate boundaries or divisions. A linear shape can vary in thickness, length, texture, character, saturation, and direction. The lines are dotted or intermittent, the set of segments or points of such a line is perceived by the eye as a single linear form (Figure 4). Words and sentences as visual elements can also form lines.

Figure 4. Elements that can be perceived as "Line"

Figure(flat form) - a two-dimensional formation, used to indicate the contour, area, outline, frame. Figures are characterized by the structure of their edges, they can have only a contour or be solid (filled with color); differ in size, in the distribution of saturation of the parts, in position in space, in the correctness of the outline.


The combination of words and numbers can be perceived as flat shapes (Figure 5). Several geometric shapes can be combined into a group, thus forming a large flat shape.

Figure 5. Elements that can be perceived as "Flat Form"

Tone or color- a graphical form that reflects the degree of color saturation. In the absence of color, the tone becomes a shade of gray. When creating a graphical model consisting of several interconnected figures, it is better to use light colors as a background: they more clearly reveal the area or structure on which significant forms are applied in black. Dark shades used as backgrounds provide contrast for the perception of small light or secondary graphic shapes. As a structural element, tone is a useful tool for describing volumetric form using chiaroscuro. This is achieved by using solid planes of different tones or by gradation of tones.

Texture- graphic form reflecting the quality of the surface structure of the object (Figure 6). The texture is formed by the accumulation of small particles in a certain system, the visual nature of which depends on this accumulation as a whole. As an element of the graphical model, the texture reflects the qualities of physical surfaces. In this role, it is used in conjunction with other form elements, especially color and tone.

The presentation of information using a graphical model is carried out on a certain surface or plane. Physically, the plane of the model is the surface of a sheet or screen on which various graphic forms are located.

Figure 6. Texture

But in visual perception, such a plane can perform the function of a three-dimensional space, a glass panel, thanks to which it is possible to imagine a figure located behind the plane of the picture. There is a new dimension - depth.

The graphic model inevitably causes the work of the imagination and the creation of an image. In order for the perception of information to occur quickly and accurately, for the image to penetrate the consciousness, it must be associated with the usual spatial representations. In this regard, a graphic model should be created taking into account not only the individual semantic meanings of graphic forms, but also the spatial order in which these forms correlate with each other. This spatial organization is called the grammar of space. Spatial organization can be single-plane (flat), multi-plane and continuous (volumetric).

In a one-plane space, the graphic forms are entirely in the plane of the drawing, and the model is flat in structure and layout. In this case, the shapes are perceived more as flat geometric shapes on the page (on a sheet or screen) than as three-dimensional objects.

There are various ways to organize such a space:


straightness, continuity, joining, parallelism association, same dimensions, same sharpness, uniform texture, union.

The space is multifaceted is created by placing graphic forms on two (or more) planes. One is the drawing plane and the other is the secondary plane. Thus, the effect of placing some forms in front of others is achieved. To create the impression of placing flat graphic forms in different planes, some methods of displaying information are used: overlay, contrast, "different weight", distance association, unequal sizes, different sharpness, texture overlay, separation.

Continuous space is voluminous in nature, in which the graphic form is perceived as continuously extended inward from the plane of the drawing, creating the illusion of a spatial mass. To achieve this effect, the following techniques are used: chiaroscuro, distance association, contrast, different sharpness, overlay, texture blur.

Chiaroscuro- imitation of different illumination of different parts of the graphic form.

distance association- this is a comparison of the drawn forms with real objects; the use of dimensional relationships known from experience to identify the distances between the depicted objects.

Contrast- separation of forms by relative distance by using different shades of color (contrast); the lighter form recedes towards the distant light background.

Different sharpness- differences in focus, i.e. sharpness; blurry edges images push the form inward. Superposition of closer forms on more distant ones. Blurring texture - reducing the study of the surface texture of objects that recede in depth.

In addition to the above techniques and their combinations, they most expressively convey volume different kinds of perspective: linear (parallel, angular, inclined), cylindrical, domed, etc.

Graphically, information is displayed according to the law of strict
compliance of the compositional solution, the form of its graphic information tool functional purpose, the content of the displayed information. The compositional solution should be integral and harmonious. The experience of experimental ergonomic research and the creation of graphical models for the presentation of information made it possible to formulate a number of general principles of their layout.

The principle of conciseness is that the graphical means of presenting information should contain only those elements that are necessary to inform the observer of essential information, to accurately understand its meaning, or to make the corresponding optimal decision with a probability not lower than a certain acceptable value. It is useless to strive to direct attention to the most important elements of the graphic model if they are surrounded by unnecessary, visual stimuli that interfere with the perception of the main thing.

The principle of generalization and unification. Symbols denoting the same objects or phenomena must necessarily be unified: they must have one graphic solution within the entire complex of graphic tools. The principle of generalization prescribes a rational generalization of the details of the depicted objects (eliminates excessive fragmentation).

The principle of emphasis involves highlighting the elements to which the main attention should be directed, using their size, shape, color. In some cases, it is permissible to violate the proportions between the sizes of symbols and the real objects depicted by them.

The principle of autonomy. Parts of a graphical means of presenting information that convey an independent message should be isolated and clearly distinguished from other parts. Breaking down complex graphical information into separate simple images, can greatly facilitate its perception and understanding.

The principle of structure. Each autonomous part of the complex of graphic means of displaying information must have a clear, easy to remember and differentiating structure.

The principle of staging. Depending on the stages, sequence and purpose of presenting information, certain graphic means are chosen.


The principle of using habitual associations and stereotypes. Stable habitual associations between symbols and the objects and phenomena they designate are taken into account, as well as the stereotypical reaction to certain symbols and signals. If possible, not abstract conventional signs are used, but symbols habitually associated with the corresponding objects and phenomena. However, it must be borne in mind that a too naturalistic, detailed image appearance fixes the thought precisely on external similarity and interferes with the awareness of other (essential) features of the object.

The composition is the final stage in the creation of an information graphic tool (model). It is at this stage of the work that a message should be obtained that meets all the requirements for it: functional, ergonomic, aesthetic.

In each specific case, depending on the specifics of the created graphic means of presenting information, their complexity, scale, contingent of readers, and other things, the composition can be presented in different ways. Nevertheless there are a number of compositional laws and techniques, which remain unshakable and form the basis for the construction of a variety of graphic models for the presentation of scientific, technical and other information. This is achieved by the following means.

Symmetry and asymmetry. Balance, harmony in symmetrical compositions (for example, schemes) is created due to symmetry, and in asymmetric ones - due to the visual balancing of unequal parts of the composition with respect to the center or axis of symmetry by changing the size and shape of the graphic tool.

Most often, the basis of the composition of a graphical means of presenting information is horizontal and vertical. These are usually lines, but points or compact objects can be used. When arranging graphic information tools, one should take into account the biomechanics of the eye, in particular, the fact that it is easier and faster for the eye to make horizontal movements than vertical ones. In this case, it should be taken into account that the number of objects located in a row, at the same distance, should be 7 ± 2. If this number is greater, then for most people there is a need for sequential reading of information. In this case


it is better to break the information into groups.

Metric and rhythmic patterns of repeatability of objects. Metric repeatability is based on the uniform alternation of one or more elements. In addition to metricity, rhythm implies a regular change in some characteristics: the distance between elements, their number in groups, the shape of elements, their sizes, etc.

The gaps between elements play the same role as pauses in music. If, in addition to pauses, an accent is introduced, i.e., the strengthening of certain specific elements, then this will make the rhythm even clearer. Rhythmic construction is easier if the number of elements in a row is odd. A sense of rhythm can be created by regular light-color ratios, lines that have the same angle of inclination, concentric angles if they alternate at regularly changing intervals.

Rhythmic series must be completed on both the left and right as the information can be read in either direction. To do this, you should: increase the intervals before the extreme groups of elements; strengthen the accents on the central groups using aids(sizes, inscriptions, colors, etc.); include foreign elements in the extreme groups.

Framing significantly affects the fact that this information tool perceived as an independent, closed visual object or as one of the elements of some complex. If this is an independent visual object, then the frame is clear.

Contrast and nuance. Contrast - sharply expressed opposition, exaggeration of differences in perceived graphic forms. For example: black next to white looks even blacker; a gray square on a red background appears blue-green, and on a blue background it appears orange. The contrast is most pronounced at the border of the two regions.

Nuance- minor differences between homogeneous properties. Contrast and nuance are simultaneously present in the compositional solution, since one of these techniques is emphasized and enhanced by the second, giving special expressiveness to the composition as a whole.


Scale. When creating a graphical information model, there are difficulties with choosing a scale, since, on the one hand, such a model is considered as an independent tool of small dimensions, and on the other hand, it is a visual model of the displayed object, the whole system or phenomenon. With this point of view, the model should be built as a reduced model of the "large form". However, the visual model (graphical model) of the object should not contain the details of the original, as this leads to overloading the graphical tool with unnecessary informational details.

Examples of choosing a graphic model depending on the purpose of information transfer

The literacy of choosing a graphical means of presenting information lies in the efficiency of using the goal that underlies the transfer of information. Depending on the purpose of the transfer, information is divided as follows:

What? This is the external and internal view of the object, its physical structure (Figure 7). An object is an object that has a geometric shape and dimensions. Appearance is the characteristics of an object with those features that are perceived visually. When creating a more realistic image of the appearance, various types of perspective, chiaroscuro are most often used. The background may be omitted to emphasize the main physical features;

Information to answer questions How? When? This is information relating to the physical movement of the object (Figure 9), logic, the relationship of the general movement of the object and the movement of its parts, the functioning of the object as a sequential series of interrelated events, as well as information that displays the system (Figure 8). A process is a series of sequential actions of an object. Graphically, these actions are very difficult to describe in their natural active form, so they are reflected in the form of static elements (Figure 10);

Information to answer the question How many? This is the quantitative side of the concept of objects, relating to their physical dimensions, the tendency to increase or decrease, the ratio of parts to the whole. IN


tables and various types of charts are most often used as graphic models;

Information to answer the question Where? This is information about the location of an object in space or in relation to another object.

Figure 7. Graphical representation of the shape and structure of the object


Figure 8. Graphical representation of the "Movement" system


Figure 9. Graphical representation of the process

Figure 10. Graphical representation of information "System"


©2015-2019 site
All rights belong to their authors. This site does not claim authorship, but provides free use.
Page creation date: 2016-04-11

Definition and main types of computer graphics

Computer graphics is a branch of computer science that studies the means and methods for creating, processing and transmitting graphic digital information.

There are 3 main types of CG:

1) Raster - a type of CG in which the work of a raster is studied (a rectangular matrix of identical elements that forms an image)

2) Vector - a type of CG, which studies images created on the basis of elementary geometric objects, such as: points, lines, splines and polygons.

3) Fractal - a section of the CG, in which images built on the basis of fractals are studied (self-repeating pattern)

The main areas of application of computer graphics

1) Graphical interfaces

2) Data visualization

3) Computer games

4) Computer-aided design systems

5) Art - design, cinema

fractal graphics

Fractal graphics - a section of the CG, which studies images built on the basis of fractals (self-repeating pattern)

2D and 3D computer graphics

Two-dimensional (2D - from the English two dimensions - "two dimensions") computer graphics are classified according to the type of representation graphic information, and the following image processing algorithms. Usually computer graphics are divided into vector and raster, although the fractal type of image representation is also isolated.

Three-dimensional graphics (3D - from the English three dimensions - "three dimensions") operates with objects in three-dimensional space. Usually the results are a flat picture, a projection. Three-dimensional computer graphics is widely used in movies and computer games.

Three-dimensional graphics are polygonal and voxel. Voxel graphics, similar to raster. An object consists of a set of three-dimensional shapes, most often cubes. And in polygonal computer graphics, all objects are usually represented as a set of surfaces, the minimum surface is called a polygon. Triangles are usually chosen as a polygon.

Any polygon can be represented as a set of coordinates of its vertices. So, the triangle will have 3 vertices. The coordinates of each vertex are a vector (x, y, z). By multiplying a vector by the corresponding matrix, we get a new vector. Having made such a transformation with all the vertices of the polygon, we get a new polygon, and by transforming all the polygons, we get a new object rotated/shifted/scaled relative to the original one.

5. Additional types of computer graphics (pixel, ASCII, pseudographics)

Pixel graphics(from English pixel - short for pix element) - a form of digital image created on a computer using a raster graphic editor, where the image is edited at the pixel (dot) level, and the image resolution is so small that individual pixels are clearly visible. On older (or less than fully functional) computers, Game Boy games, games for older game consoles, and many games for mobile phones mostly pixel graphics are used, as this is the only way to make a small image sharp on the small screen resolutions that are typical for these devices.

ASCII graphics (from the English. ASCII artwork) is a form of visual art that uses ASCII characters on a monospaced screen of a computer terminal ( terminal server) or a printer to present images. When creating such an image, a palette is used, consisting of alphabetic, digital characters and punctuation characters from among the 95 characters of the ASCII table. Due to the high probability of differences in representation on systems with national versions of the table, the remaining 160 characters are usually not used. Two-dimensional and three-dimensional computer graphics

6. Definition and basic concepts of raster graphics

Raster elements:

1) A pixel (picture element) is used to display 2D bitmap graphics on the screen. As a rule, a pixel has the shape of a polygon, since it is easier to fit an output element into such a shape.

2) If the raster is output to a printer, then the term dot (dot) is used.

3) In 3D graphics, the term voxel is used - a volumetric pixel.

Raster resolution...

Color Depth - Range colors The that is used to fill the raster.

The raster volume is the product of resolution and color depth.

Bitmap Resolution

Raster resolution is the number of raster elements in the raster itself.

Resolution measurements:

1) The accepted measurement is the screen resolution displayed on the monitor (320x240px)

2) Pixel density - ppi - pixel per inch

3) Real number of pixels Mpx, Gxp

4) Density of printing dots - DPI - dot's per inch

Digital video resolution, scan and aspect ratio

Digital video is a type of raster graphics that uses bitmap, consisting of several frames. The main characteristic of digital video is resolution. DVD - 576i, 480i; PAL-720x576; NTSC - 720x480. "i" indicates that the output of lines during playback occurs through one. Each frame contains either even or odd lines. This is called interlaced frame scanning. "p" - progressive scanning of frames, with it, each line in the frame is output.

Representation of colors in computer graphics, color model

A color model is a mathematical model for describing the representation of colors. All possible color values ​​given by the model define a color space. The color model is usually used to store and process colors in a discrete form, when it is presented in computing devices, in particular, computers. The color model specifies the correspondence between human-perceived colors stored in memory and colors generated on output devices (perhaps under given conditions).

Additive and subtractive color models

Additive color mixing- color synthesis method based on addition additive colors, that is, the colors of directly emitting objects.

By mixing the three primary colors - red, green and blue - in a certain ratio, most of the colors perceived by humans can be reproduced.

One example of using additive synthesis is computer monitor, color image which is based on the RGB color space and is derived from red, green, and blue dots.

In contrast to additive color mixing, there are subtractive synthesis schemes. In this case, the color is formed by subtracting certain colors from the light reflected from the paper (or passing through the transparent medium). The most common subtractive synthesis model is CMYK, which is widely used in printing.

RGB color model

The color model corresponds to the physical model of human perception of color (red, green and blue).

The human eye is most sensitive to green, then red, and lastly blue.

To write a color, as a rule, a value of up to 8 bits in decimal or hexadecimal form is used.

Numeric representation of RGB

The RGB color model is used to encode and synthesize colors that are transmitted using light emission.

(0,0,0) #000000 - black

(255,255,255) #FFFFFF - white

In RGB, 2 bits are allocated for each of the colors (8 bits / RGB = 2 bits), while the colors are divided in the ratio red: green: blue = 3: 3: 2

In SVGA - Super-VGA, 8 bits are allocated for each color, since 24 bits are allocated for the color model.

8 bits = 256 colors

24 bits = 16,777,216 colors = True Color

16 bits = 65,536 colors = Hight Color

On average, a person perceives from 7 to 8 million shades.

RGBA is a four-channel color model in which the fourth channel is the a channel and is used to define transparency.

Digital video compression

To enter into a computer and record video from an analog source - TV, VCR, analog camera - the signal must be converted to digital form - digitized. This operation is carried out using electronic device called an analog-to-digital converter (ADC).

If the video is entered into the computer from a digital camera, then this operation is called capture. However, the digitization of analog recordings is also often referred to as "capture". In the process of capturing digital signal can be converted to another format.

One second of "captured" video without sound is over 30 MB disk space. This means that a two-hour movie will take up over 100 GB, while a 4.7 GB DVD will only fit 156 seconds of video. In addition, to play such a movie, it is necessary to provide a data transfer rate of more than 200 Mbps, which is a very difficult task for modern equipment. Therefore, in order to reduce the amount of digital data, the video signal when captured before being recorded to HDD undergoes compression. In this case, compression is mainly used according to MPEG algorithms.

The MPEG standards are developed by the Moving Picture Experts Group (MPEG). MPEG is a standard for compressing audio and video into a format that is easier to store, download, or share, such as over the Internet.
MPEG consists of three parts: Audio, Video, System (combining and synchronizing the other two). There are different standards: MPEG-1, MPEG-2, MPEG-3, MPEG-4, MPEG-7.
MPEG-1 compression is used primarily on VideoCD HXVCD discs. A more advanced standard - MPEG-2, which provides significantly better quality, has become not only the norm of the European digital TV broadcasting, but has been adopted as the compression standard for recording images on DVD. This standard is also used for recording Super VideoCD, CVD, XSVCD and some other discs. MPEG-4 compression is used to burn DivX video discs.

Algorithm of de Casteljope

In computational mathematics, de Castelljou's algorithm, named after its inventor Paul de Castelljou, is a recursive method for determining the shape of Bernstein polynomials or Bezier curves. The de Casteljot algorithm can also be used to split a Bezier curve into two parts by an arbitrary parameter value.

The advantage of the algorithm is its higher computational stability compared to the direct method.

Linear curves

The parameter t in the function describing the linear case of the Bezier curve determines exactly where B(t) is located in the distance from P0 to P1. For example, at t = 0.25, the value of the function B(t) corresponds to a quarter of the distance between points P0 and P1. The parameter t changes from 0 to 1, and B(t) describes the line segment between points P0 and P1.

Quadratic Curves

To construct quadratic Bezier curves, it is required to select two intermediate points Q0 and Q1 from the condition that the parameter t varies from 0 to 1:

Curves of higher degrees

To construct curves of higher orders, correspondingly, more intermediate points are required. For a cubic curve, these are intermediate points Q0, Q1 and Q2 that describe linear curves, as well as points R0 and R1 that describe quadratic curves: a simpler equation is p0q0/p0q1=q1p1/p1p2=bq0/q1q0

33. Affine transformation and its matrix representation

An affine transformation is a plane transformation that takes every line to a line and parallel lines to parallel lines.

A transformation is called one-to-one if

Different points pass into different ones;

A point goes to each point.

For example, compression 0 expansion, rotation, transfer, etc.

A 3x3 matrix whose last column is (0 0 1)T defines an affine plane transformation:

According to one of the properties, the affine transformation can be written as:

f(x) = x * R + t,

where R is an invertible 2x2 matrix and t is an arbitrary vector.

34. Types of affine transformations

Shrink, stretch, rotate, translate, move, tilt, display

Curved surfaces

Usually, curved surfaces are understood as a polygonal model.

A polygonal model is a curved surface constructed using graphical primitives, usually a triangle or four squares.

Primitives - geometric objects, three-dimensional fields that make up the vector drawing:

· Polygon;

bodies of revolution.

Render Equation

· is the wavelength of light.

· - time.

· - the amount of radiation of a given wavelength emanating along the direction at time , from a given point

· - emitted light.

· - integral over the hemisphere of incoming directions.

· - bidirectional reflection distribution function, the amount of radiation reflected from to at the point , at the time , at the wavelength

· - wavelength in the incoming direction to the point from the direction in time .

· - absorption of incoming radiation at a given angle.

Graphics Pipeline

Graphic pipeline (graphic pipeline) is some software and hardware tool that converts the description of objects in the "world" of the application into a matrix of video memory cells of a raster display. Its task is to create the illusion that was discussed above.
In global coordinates, the application creates objects that consist of 3D primitives. Light sources are located in the same space, and the point of view and the direction of the observer's gaze are also determined. Naturally, only a part of the objects is visible to the observer: any body has both a visible (facing the observer) and an invisible (reverse) side. In addition, the bodies can completely or partially overlap each other. The relative position of objects relative to each other and their visibility to a fixed observer are processed in the first stage of the graphics pipeline, called transformation. At this stage, rotation, translation and scaling of objects are performed, and then the transformation from global space to the observation space (world-to-viewspace transform), and from it the transformation into the observation “window” (viewspace-to-window transform), including projection with perspective. Along with the transformation from global space to observation space (before or after), invisible surfaces are removed, which significantly reduces the amount of information involved in further processing. At the next stage of the pipeline (lighting), the illumination (and color) of each object projection point is determined, due to established sources illumination and surface properties of objects. And finally, at the rasterization stage, a bitmap image is formed in the video memory. At this stage, textures are applied to the surface images and the color intensity of the points is interpolated, which improves the perception of the formed image. The whole process of creating a bitmap of 3D objects is called rendering.

Shaders, shader languages

A shader is a program for one of the stages of the graphics pipeline used by three-dimensional graphics to determine the final parameters of an object or image. It can include arbitrary complexity descriptions of light absorption and scattering, texture mapping, reflection and refraction, darkening, surface displacement, and post-processing effects.

Programmable shaders are flexible and efficient. Surfaces that are complex in appearance can be visualized using simple geometric shapes. For example, shaders can be used to draw a 3D ceramic tile surface on a completely flat surface.

To understand what a shader is, let's first understand how a video card draws primitives (triangles, polygons, etc.). The input receives data about each primitive vertex. For example, the position of the vertex in space, normal and texture coordinates. This data is called vertex attributes. Based on them, the GPU calculates the output values: the position of the vertex in screen coordinates, the color of the vertex, calculated depending on the lighting, etc. Before video release GeForce cards 3 and Radeon 8500 this process was unmanageable. If, for example, you were not satisfied with the formulas according to which lighting is calculated in OpenGL, and you wanted to apply your own, then nothing could be done. We had to either be content with what the GPU can do, or perform calculations for each vertex on the processor, which is much slower. The solution to this problem was vertex programs (in Direct3D they are called vertex shaders). A vertex program is a program written in a special low-level language that runs on the GPU and converts input vertex attributes into output attributes that are fed into the pixel shader. An important feature of vertex and pixel programs is that all instructions operate on vectors. For example, to calculate the scalar product, you need to execute only one instruction, and not 5 (2 additions and 3 multiplications), as on the CPU. Thanks to this, you can perform a lot of operations with a small number of instructions. For example, multiplying a matrix by a vector is only 4 instructions. And if there are few instructions, then the execution speed of such a program is quite high.
The values ​​computed in the vertex shader are interpolated along the triangle. On video cards that do not support pixel shaders, for each pixel, its color and the color of the texture (or several textures) at a given point are determined. These colors are then multiplied or added, depending on the parameters of the glTexEnv() function executed earlier, and the result is written to the framebuffer. If the video card supports pixel shaders, then everything is much more interesting. The triangular interpolated values ​​are fed into some program called a pixel shader. This is a program consisting of a series of arithmetic and other instructions that calculates the color of a pixel that is written to the framebuffer. Compared to vertex programs, the execution speed of pixel shaders is much higher. You can almost instantly execute about 10 vector instructions for each pixel! On the CPU, this is simply impossible.
Pixel and vertex shaders allow you to create amazing effects at the hardware level: pixel-level lighting, bump mapping, reflection and refraction, water waves, skeletal character animation, shadows and much more!

Shader languages

First used in Pixar's RenderMan system, shaders became more common as computer prices fell. The main advantage of using shaders is their flexibility, which simplifies and reduces the cost of the program development cycle, while increasing the complexity and realism of the rendered scenes.

Shader languages ​​usually contain special data types such as matrices, samplers, vectors, as well as a set of built-in variables and constants for easy integration with standard 3D API functionality. Since computer graphics has many applications, a large number of shader languages ​​have been created to meet the various needs of the market.

Professional rendering

These shader languages ​​are focused on achieving the highest rendering quality. The description of the properties of materials is made at the most abstract level, it does not require special programming skills or knowledge of the hardware. Such shaders are usually created by artists with the goal of providing "the right look" like texture mapping, lights, and other aspects of their work.

Processing such shaders is usually a resource intensive task. The combined processing power required to make them work can be very large, as it is used to create photorealistic images. The main part of the calculations in such visualization is performed by large computer clusters.

RenderMan shader language

The RenderMan Shading Language, described in the RenderMan Interface Specification, is the de facto standard for professional rendering. APIRenderMan, developed by Rob Cook, is used throughout Pixar's work. It is also the first shader language to be implemented.

Shader Language Gelato

NVIDIA Gelato is the original hybrid system rendering of images and animation of three-dimensional scenes and objects, using for calculations central processing units and hardware capabilities of professional graphics cards of the Quadro FX series.

The fundamental principle, which the developers strictly adhere to, is the uncompromising quality of the final image, which is not limited by anything, including the modern capabilities of video cards. As a production tool capable of creating the final product High Quality, Gelato is designed for professional use in film, television, industrial design and architectural visualizations.

Open Shading Language

Open Shading Language (OSL) is a small but rich language for programmable shaders in advanced renderers and other applications, ideal for describing materials, lighting, movement and imaging.

OSL - was developed by Sony Pictures Imageworks for use in their in-house rendering and is used for animated films and visual effects.

OSL is used in the 3D computer graphics package Blender.

Cg shader language

Developed by nVidia together with Microsoft (essentially the same language from Microsoft is called HLSL, included in DirectX 9). Cg stands for C for Graphics. The language is really very similar to C, it uses similar types (int, float, and a special 16-bit floating point type - half). Functions and structures are supported. The language has peculiar optimizations in the form of packed arrays - declarations like "float a" and "float4 a" in it correspond to different types. The second declaration is the packed array; operations with a packed array are faster than with ordinary ones. Although the language was developed by nVidia, it works without problems with ATI graphics cards. However, it should be noted that all shader programs have their own characteristics, which can be found in specialized sources.

DirectX shader languages

Shader types

There are currently three types of shaders: vertex, geometry, and fragment (pixel).
Vertex Shaders
The vertex shader operates on the data associated with the vertices of the polyhedra. Such data, in particular, include vertex coordinates in space, texture coordinates, tangent vector, binormal vector, normal vector. The vertex shader can be used to view and perspective transform vertices, generate texture coordinates, calculate lighting, etc.
Geometry Shader
A geometry shader, unlike a vertex shader, is able to process not only one vertex, but the whole primitive. It can be a segment (two vertices) and a triangle (three vertices), and if there is information about adjacent vertices (adjacency), up to six vertices can be processed for a triangular primitive. In addition, the geometry shader is able to generate primitives on the fly without using the CPU. First used on Nvidia graphics cards series 8.
Pixel Shaders
The fragment shader works with fragments of an image. In this case, an image fragment is understood as a pixel, which is associated with a certain set of attributes, such as color, depth, texture coordinates. The fragment shader is used at the last stage of the graphics pipeline to form a fragment of the image.

57. Definition, basic concepts and methods of texturing

Texture is a bitmap image superimposed on the surface of a polygonal model to give it color, coloring, or the illusion of relief. Approximately, the use of textures can be easily imagined as drawing on the surface of a sculptural image. Using textures allows you to reproduce small surface objects, the creation of which with polygons would be excessively resource-intensive. For example, scars on the skin, folds on clothes, small stones and other objects on the surface of walls and soil.

The quality of a textured surface is determined by texels - the number of pixels per minimum texture unit. Since the texture itself is an image, the resolution of the texture and its format play a big role, which subsequently affects the overall impression of the quality of graphics in a 3D application.

Traditionally, the term texture mapping or tekturirovanie in three-dimensional modeling is the process of imposing a two-dimensional texture on a three-dimensional object (texture, as it were, stretched over the object) to give it the appropriate appearance. Thus, for example, "coloring" models of monsters and players in 3D games like Quake, etc.

Texturing methods

Bump mapping is a simple way to create a bumpy surface effect with more detail than a polygonal surface will allow. The effect is mainly achieved by illuminating the surface with a light source and a black and white (single-channel) height map, by virtual displacement of the pixel (as with the Displace mapping method) as if there was a vertex (only without physical and visual shift), due to which the orientation of the normals used to calculate the illumination of the pixel (Phong shading) is changed in the same way, resulting in differently illuminated and shaded areas. As a rule, bump mapping allows you to create not very complex bumpy surfaces, flat ledges or depressions, this is where its use ends. For more detailed effects, Normal mapping was later invented.

MIP-texturing (eng. MIP mapping) is a texturing method that uses multiple copies of the same texture with different detail. The name comes from lat. multum in parvo - "a lot in a little".

The image looks best when the texture detail is close to the screen resolution. If the screen resolution is high (texture too small/object too close), the image will be blurry. If the texture resolution is too high (the texture is too big/the object is too far), we get random pixels - which means loss of fine details, flickering and a large percentage of cache misses. It turns out that it is better to have several textures of different detail and apply the one that is most suitable in this situation to the object.

Operating principle

A so-called MIP-pyramid is created - a sequence of textures with a resolution from maximum to 1x1. For example: 1x1, 2x2, 4x4, 8x8, 16x16, 32x32, 64x64, 128x128, 256x256, 512x512 and 1024x1024. Each of these textures is called a MIP level or LOD (level of detail).

All of these textures have the same image. Thus, mip-texturing increases the consumption of video memory by a third:

.

When applying textures, the distance to the object is calculated and the texture number is found by the formula:

where resolution is the resolution of the virtual camera (the number of pixels that will be in an object 1 unit in size, located 1 unit from the camera), texelsize is the size of the texel in 3D world units, dist is the distance to the object in the same units, mip bias is a number that allows you to select a more or less detailed texture than the formula gives.

This figure is rounded up to an integer, and the texture with the corresponding number (zero is the most detailed, the first one is twice as small, etc.) is applied to the object.

Flaws

The consumption of video memory increases by a third. However, typical video memory sizes in the early 2010s are 1-3 GB. In addition, if the object is far away, its detailed texture can be uploaded to RAM.

MIP-texturing does not solve the problem of textures that are at an acute angle to the viewer (for example, a road in a car simulator). For such textures, the resolution along one axis is very different from the resolution along the other - and, for example, the image is clearly blurry along the X axis, while flickering is visible along the Y axis, which is characteristic of an oversized texture resolution. There are several ways to solve this at once (starting with the least quality):

Set the most comfortable mip bias value in the video driver - the number that is responsible for choosing the texture number in the pyramid. If it is negative, the video card takes more detailed textures, if it is positive, less detailed ones.

Many games themselves set a suitable mip bias for different types objects. For example, in Live for Speed mip bias is set by the user separately for cars, obstacles and road.

Take advantage of anisotropic filtering, a texturing method that aims to solve this problem.

Finally, a clear boundary between MIP levels is visible. This is solved by trilinear filtering.

Procedural texturing is a method of creating textures in which a texture image is created using some algorithm (procedural algorithm).

It is best to represent the process of procedural texturing in the form of blocks (operators). There are three types of blocks:

generators

auxiliary

Each generator and filter implements a procedural algorithm. Each block has a set of parameters. Even if you do not use such a scheme, it still reduces to this general case.

To create "natural" textures, such as wood, granite, metal, stones, lava, fractal noise and cellular textures are used as filters.

Procedural texture properties:

Reversibility. A procedural texture stores the entire history of its creation.

Small size (if only numerical values ​​act as initial data for procedural algorithms).

Unlimited number of variations when using stochastic (using a pseudo-random number generator) algorithms.

Scalable to any size (depends on procedural engine/library).

Simultaneously with the final texture, alpha-, bump-, reflect-maps are very easy to obtain.

Detail mapping is a software technique in 3D computer graphics that improves texture detail at a close distance from the camera. The end result creates the illusion of using a huge resolution texture.

When the camera zooms in on a polygonal model, the texture becomes blurry. If there is enough free memory, blurring can be eliminated by increasing the resolution of the texture. However, storing each texture at a huge resolution is not a practical solution. Detail texturing solves the problem in a different way:

The base texture is left at a reasonable medium resolution

A detailed texture is created with a large-scale image of small details (individual blades of grass, pebbles, wood structure, etc.)

The resulting texture is discolored

The high-pass filter removes all but the smallest details.

The histogram correction filter sets the average brightness at 0.5

Both textures are mixed in the pixel shader

Before blending, the texture coordinates of the detailed texture are scaled so that the detailed texture repeats several times more often than the base texture.

To reduce the visibility of repetitions of a detailed texture, the scale is chosen non-integer

The color of the base texture is multiplied by the color of the detailed texture, multiplied by 2 (to preserve the original brightness)

Embossed texturing

Relief texturing is a technique in computer graphics to give a more realistic and rich look to the surface of objects.

Bump mapping is an easy way to create a bumpy surface effect with more detail than a polygonal surface allows. The effect is mainly achieved by illuminating the surface with a light source and a black and white (single-channel) height map, by virtual displacement of the pixel (as in the Displace mapping method) as if there was a vertex (only without physical and visual shift), due to which the orientation of the normals used to calculate the illumination of the pixel (Phong shading) is changed in the same way, resulting in differently illuminated and shaded areas. As a rule, bump mapping allows you to create not very complex bumpy surfaces, flat ledges or depressions, this is where its use ends. For more detailed effects, Normal mapping was later invented.

Normal mapping - a technique that allows you to change the normal of the displayed pixel based on a color normal map, in which these deviations are stored as a texel, the color components of which are interpreted in the vector axis, based on which the normal is calculated, which is used to calculate the illumination of the pixel. Due to the fact that 3 texture channels are used in the normal map, this method gives more accuracy than bump mapping, which uses only one channel and the normals, in fact, are only interpreted depending on the "height".

Normal maps are usually of two types:

object-space - used for non-deformable objects such as walls, doors, weapons, etc.

tangent-space is used to be able to deform objects such as characters.

To create normal maps, high poly and low poly models are usually used, their comparison gives the necessary normal deviations for the latter.

Parallax mapping

This technology also uses normal maps, but, unlike normal mapping, it implements not only relief-based lighting, but also shifts diffuse texture coordinates. This achieves the most complete relief effect, especially when looking at the surface at an angle.

The game was created on a PDP-1 machine.

Computer graphics experienced significant progress with the advent of the ability to store images and display them on a computer display, a cathode ray tube.

Current state

Main Applications

Developments in the field of computer graphics at first moved only by academic interest and went in scientific institutions. Gradually, computer graphics firmly entered everyday life, it became possible to conduct commercially successful projects in this area. The main areas of application of computer graphics technologies include:

  • special effects, Visual effects(VFX), digital cinematography;
  • Digital television, World Wide Web, videoconferencing;
  • Digital photography and significantly increased photo processing capabilities;
  • Visualization of scientific and business data;
  • Computer games, virtual reality systems (for example, aircraft control simulators);
  • Computer graphics for film and television

Scientific work

Computer graphics is also one of the areas of scientific activity. In the field of computer graphics, dissertations are defended, and various conferences are held:

  • Siggraph conference, held in the USA
  • conference Graphikon, held in Russia
  • CG event, held in Russia
  • CG Wave, held in Russia

There is a laboratory of computer graphics at the Faculty of VMiK of Moscow State University.

Technical side

According to the ways of setting images, graphics can be divided into categories:

2D graphics

At the same time, not every image can be represented as a set of primitives. This presentation method is good for diagrams, is used for scalable fonts, business graphics, is very widely used for creating cartoons and just videos of various content.

Raster graphics

Bitmap example

Raster graphics always operates with a two-dimensional array (matrix) of pixels. Each pixel is assigned a value - brightness, color, transparency - or a combination of these values. A bitmap image has a number of rows and columns.

Without much loss, raster images can only be reduced, although some details of the image will then disappear forever, which is different in the vector representation. Increasing bitmaps, on the other hand, results in a “beautiful” view of enlarged squares of one color or another, which used to be pixels.

Any image can be represented in a raster form, however, this storage method has its drawbacks: a larger amount of memory required for working with images, losses during editing.

fractal graphics

fractal tree

fractal- an object whose individual elements inherit the properties of parent structures. Since a more detailed description of elements of a smaller scale occurs according to a simple algorithm, such an object can be described with just a few mathematical equations.

Fractals make it possible to describe entire classes of images, the detailed description of which requires relatively little memory. On the other hand, fractals are poorly applicable to images outside of these classes.

3D graphics

3D graphics(3D - from English. three dimensions- "three dimensions") operates with objects in three-dimensional space. Typically, the results are a flat picture, a projection. Three-dimensional computer graphics is widely used in movies and computer games.

In 3D computer graphics, all objects are usually represented as a collection of surfaces or particles. The smallest surface is called a polygon. Triangles are usually chosen as a polygon.

All visual transformations in 3D graphics are controlled by matrices (see also: affine transformation in linear algebra). Three types of matrices are used in computer graphics:

  • shift matrix
  • scaling matrix

Any polygon can be represented as a set of coordinates of its vertices. So, the triangle will have 3 vertices. The coordinates of each vertex are a vector (x, y, z). By multiplying a vector by the corresponding matrix, we get a new vector. Having made such a transformation with all the vertices of the polygon, we get a new polygon, and by transforming all the polygons, we get a new object rotated/shifted/scaled relative to the original one.

There are 3D competitions every year, such as Magick next-gen or Dominance War.

CGI graphics

Main article: CGI (movie)

Representation of colors in a computer

To transmit and store color in computer graphics, various forms of its representation are used. In general, a color is a set of numbers, coordinates in some color system.

The standard ways of storing and processing color in a computer are due to the properties of human vision. The most common systems are RGB for displays and CMYK for printing.

Sometimes a system with more than three components is used. The reflection or emission spectrum of the source is encoded, which allows a more accurate description of the physical properties of the color. Such schemes are used in photorealistic 3D rendering.

The real side of graphics

Any image on the monitor, by virtue of its plane, becomes a raster, since the monitor is a matrix, it consists of columns and rows. Three-dimensional graphics exist only in our imagination, since what we see on the monitor is a projection of a three-dimensional figure, and we ourselves create the space. Thus, graphics visualization is only raster and vector, and the visualization method is only a raster (a set of pixels), and the way the image is specified depends on the number of these pixels.

see also

  • Graphical user interface
  • fractal monotype

Links

  • Seliverstov M. "3D cinema - new or well-forgotten old?"
  • 3D computer graphics in the Open Directory Project (dmoz) links directory.

Notes

Literature

  • Nikulin E. A. Computer geometry and computer graphics algorithms. - St. Petersburg: BHV-Petersburg, 2003. - 560 p. - 3000 copies. - ISBN 5-94157-264-6
  • The computer draws fantastic worlds (part 2) // The computer gains intelligence = Artificial Intelligence Computer Images / ed. V.L. Stefanyuk. - M .: Mir, 1990. - 240 p. - 100,000 copies. - ISBN 5-03-001277-X (Russian); 7054 0915 5
  • Donald Herne, M. Pauline Baker. Computer graphics and the OpenGL standard = Computer Graphics with OpenGL. - 3rd ed. - M .: "Williams", 2005. - S. 1168. - ISBN 5-8459-0772-1
  • Edward Angel. Interactive computer graphics. An introductory course based on OpenGL = Interactive Computer Graphics. A Top-Down Approach with Open GL. - 2nd ed. - M .: "Williams", 2001. - S. 592. - ISBN 5-8459-0209-6
  • Sergeev Alexander Petrovich, Kushchenko Sergey Vladimirovich. Fundamentals of computer graphics. Adobe Photoshop and CorelDRAW - two in one. Tutorial. - M .: "Dialectics", 2006. - S. 544. -
Customizing 2D Plots

The example uses the Poverty.sta file from the sample set provided with STATISTICA, which compares the results of the 1960 Census for 30 randomly selected US counties. Names of districts are entered as element names. Part of the file is shown below.

Let's assume that we need to build a graph that reflects information about the number of families living below the poverty level (Pt_Poor), the number of residents with telephones (Pt_Phone), and the number of rural population (Pt_Rural). Let's start with some line charts.

Plot Multiple Line Plots by Default

In any of the modules of the STATISTICA system, open the Poverty.sta file. Then using the button Graph Gallery(or from the main menu Graphics) select the item Statistical 2M charts - Line charts(for variables).


A dialog box will appear 2M line graphs.


Then press the button Variables and select three variables to build dependencies Pt_Poor, Pt_Phone and Pt_Rural (to randomly select variables, hold down the key while clicking on the variable name CTRL).

In field Chart type there is a list of line charts available for plotting. By default, the first line of the list is selected (a simple one-variable line graph). If in this moment press OK, then one graph will be built for each of the variables, that is, three separate graphs in sequence, one after the other after pressing the button More in the graphics window.


Since the purpose of this example is to reproduce all three dependencies on one graph, in the dialog box 2M line charts line must be selected Composite. Then the dialog box 2M line charts will look like this:


To display the default graph, press OK.


Removing More and Exit Buttons

If you continue to work with this particular chart, you may need to remove the buttons More And Exit. from the upper left corner of the graphics window. To do this, click on the Exit button. (after pressing the button More the dialog box will reappear 2M line charts).

Changing the dimensions (proportions) of the graphics window

The graph shown above has the default dimensions. When the graphics window is resized, it retains its aspect ratio by default, i.e. the vertical and horizontal dimensions change simultaneously. This mode (set by default) is active as long as the button is pressed. Fix proportions. If you press the button Change aspect ratio then the so-called resolution factor can be changed - for example, the graphics window can be made square:

Note that the default settings for the aspect ratio of the graphics window can be changed in the dialog box Graph display(it is called from the dropdown menu View).

Interruption of plotting

The program automatically redraws the chart to reflect your changes. For complex graphs with multiple dependencies, the redrawing process takes some time.

Graph drawing can be interrupted by left-clicking anywhere on the screen. The program will finish drawing the current element, then the hourglass will disappear and full control over the settings of all parameters will be returned to the user. As a rule, in this case, the schedule is incomplete.

You can complete the redrawing process by slightly resizing the graphics window or by making any other changes that require a redrawing of the graph.


View data

Press the toolbar button to bring up Plot data editor. This can be done in other ways, for example:

1) choosing a command Edit data from the drop down menu Markups or

2) by right-clicking somewhere on the background surface of the chart, on some symbol or on one of the lines, and then selecting the context menu line Edit chart data.


Recall that in two-dimensional graphs, each dependence (in this case, a line) is represented by a pair of X and Y columns. Each X-Y pair corresponds to a point on the graph. In this editor, you can change data, remove points, add lines or new dependencies; all changes made will be reflected on the chart after the button is pressed redraw or button Exit+Redraw on the toolbar. In addition, the menu has many options for changing the representation of numbers in Graph data editor. For example, click the button Column Width to bring up a dialog box Width setting.

Enter the number 3 in the Y field decimal places and press OK.


Now all data in the editable table has three decimal places. You can also change the font and font size (use the menu Service - Screen).

To continue working with the chart, click anywhere in the graphics window to bring it to the front (make it active), or close it. Graph data editor.

Basic charting conventions

Chart customization tools are available from drop-down menus Editing and Markups, as well as from the keyboard (in addition, they can be written as macros and / or assigned to buttons on the toolbar Autotask buttons). In addition, there are ways to quickly change chart elements that do not require a large number of actions (clicking mouse buttons, selecting menus, etc.). There are two basic rules for editing graphs.

  • To select a specific method for setting up an object (or chart element), right-click on this object and select the setting type from the context menu.
  • To access the most common (default) ways to customize an object (or plot element), double-click the object.

For example, to change the type of line, double-click on the corresponding line; to change the title, double click on the title; to change the scale, double-click on the axis; to change the guide grid lines, double-click on the lines, etc.

Change headings

To edit a title, double-click in its area.


As seen from the dialog box Editing titles, a total of 11 titles can be entered: 5 for the top and 2 for each of the other axes. Each heading can have its own font and size, and, as shown in the following examples, can include formatting characters for indexes, powers, symbols, approximating equations, and more. These characters can be easily inserted from the built-in toolbar Format.

Another way is also possible: by double-clicking on the background surface of the window, you can call up a dialog box General layout of 2M charts, which also has a header editing mode.


After entering the title, press OK to redraw the chart. For example, two title lines have been entered for the following graphics window.


2D Graph Placement Dialog Box

As can be seen from the graph, the percentage data reflecting the proportion of "poor" consumers are located mainly below the values ​​for the variables Pt_Phone and Pt_Rural. For each of the dependencies, the scale can be adjusted separately and specified on the left or right Y-axis. You can achieve a “better representation” of the Pt_Poor variable if you set a separate scale for it along the right Y-axis, while turning on auto mode optimal scaling.

The main parameters of individual dependencies (in this case, line graphs) are set in the dialog box Chart placement, and a separate window opens for each of them. To call it for the variable Pt_Poor, right-click anywhere on the corresponding line (or symbol of this dependency).


Then select the context menu line Change location of dependency(s)

Plotting Scaled Along the Right Y-Axis

Nearly in the center of the dialog box that appears, there is a field marked as Axis Y. The state of the switches in this field determines which of the axes the graph will be plotted relative to. Check box On right so that the plot of the Pt_Poor variable is scaled along the right Y-axis.

Changing fixed symbols

In the upper left corner of the dialog box there is a field Fixer conv. designations. The test in this field determines the designation of this dependence on the graph. Later in this example, this legend will be converted to custom text that can be placed anywhere in the graphics window. In the meantime, let's replace the existing designation with a more informative one (for example, Percentage), and then write poor families (P) in the second line of the symbol. (P) added to show that this plot is on the right y-axis. This addition will be done automatically if you set the parameter at the time of plot creation. With double Y axis.


In order to change the designations of other dependencies, for each of them it is also necessary to call the dialog box Placement of 2M graphics. For example, to bring up a dialog box Placement of 2M graphics for the second variable (Pt_Phone~), click on the Next » button (in the upper right corner of the dialog box). Now enter another Fixmr. conv. notation and do the same for the next dependency. When finished changing, click OK and return to the graphics window.


Changing axis labels

As expected, two changes occurred on the chart. Firstly, the long symbols have become more informative and, secondly, the graph of the “percentage of poor families” has become more stretched along the Y-axis. Since this dependence is now plotted along the right Y-axis, there should be corresponding symbols on this axis. If you double-click on the right Y-Axis, the Axis Options: Right Y-Axis dialog box will appear.


For each of the axes, you can call a similar dialog box (to go to the next or previous axis, use the field Axis at the top of this window).

To enable a field Axis values for the right Y-axis, you must press the switch Numeric. Note that the value for Min, which is automatically selected (Axis Tagging: Auto), is 10. Thus, the Y-coordinate of the intersection with the X-axis corresponds not to 0, but to 10 percent.

Very often it is necessary to show that the position, intuitively taken as zero, does not at all correspond to the zero mark on the chart. This can be done by entering a "scale break" on the given axis. The scale break along the X axis on the graph will look like this:

To enter a scale break for the right Y-axis, check the corresponding box (in the lower left corner of the dialog box), while leaving the default position of the scale break location unchanged. Now set the axis layout mode Manual/0, and parameter values Max., Pitch and Min. set to 45, 5, and 11, respectively (entering a value of 11 for the Min parameter will cause the minimum value to not be shown because it is behind the break). Click OK


Now the scale break entered on the chart "warns" the observer that the starting point of the right Y-axis does not correspond to zero percent.

Axis scaling

The choice of scale along the left Y-axis is also not optimal, in this particular case, the scale minimum corresponds to -10. Since the graph shows values ​​as percentages, zero would be a more appropriate value for the minimum. By double-clicking on the left Y-axis, a dialog box will open Axis parameters: Y left.


There are several axis marking modes: Auto, Auto/0, Manual and Manual/0. If Auto markup is selected, then the program itself selects the minimum and maximum reports on the scale so that all points on the chart are visible. If you select the mode Manual, then the parameters Max., Pitch and Min. will be defined by the user.

Zoom mode anchored to zero (/0)

The /0 layout mode determines where the relative scale "anchor" is located. Let's explain this with a short example.

Suppose the following scale parameters are set manually: minimum - 3, step - 5 and maximum - 25. If manual marking is applied for this axis, then marks and risks will be located respectively at points 3, 3+5=8, 3+5+5= 13.18 and 23. As a rule, it is desirable to have a “clear binding” of scale marks to zero. If you turn on the Manual/0 mode, then the labels and risks on the axis will be at positions 0+5=5, 0+5+5=70, 15,20,25, etc. Note that the modes Manual with parameter Min. equal to 0 and Manual/0 (Manual/0) are equivalent.

For the example graph, the most appropriate labeling (because all values ​​are in percentages) would be Manual/0 with Min set to 0, Step set to 10, and Max set to 109. Set these values ​​and click OK to see the changes in the graph.


The conventions we introduced leave a lot of free space on the chart. In the STATISTICA system, symbols can be either fixed (fixed, as at the moment on this chart), or converted into custom text that can be moved, edited, like other graphic objects. Right-click on the legend and select an item from the context menu.


Now the legend has been converted to custom text, and the place where they were previously located is occupied by the graph. To return to fixed mode, right-click anywhere on the background surface of the window and select Fixed Legend from the context menu (for example, you can put some explanatory text in the free space above the legend).

Conventions in headings

To delete a custom object, such as text, select it (by clicking on it with the mouse button) and press the key Del(or select the Cut Object command from the right-click menu). Now open the dialog box General marking of 2M charts. To do this, double-click somewhere on the background surface of the chart (or select the item General markup from the context menu, after right-clicking on the background surface of the graphics window).

A good place for the legend would be the bottom area of ​​the graphics window. Click the arrow in the Headings field and select the line Lower X Axis 2.


Control characters

Special formatting of text on STATISTICA graphs is carried out using a sequence of control characters, which always begins with the @ symbol. These control characters allow you to include subscripts, degrees, underscores, and the like in any heading or custom text. To include a symbol in the text, the following sequence of control characters is used: @1[dependency number]. For example, if you write @L in the header field, then the symbol for the first of the dependencies will be shown in the header itself on the graph. Now in the header field Lower axis X2 enter next line: @-% Poor (P) @L-% Phone @L-% Rural.


Click OK, to see the changes on the graph.


Note that the same result can be obtained without deleting the conventional text of the symbol, but by reformatting it (for example, into one line of text) and placing it at the bottom of the graph (previously increasing the bottom indent so that there is enough space for additional text, as is done in the following examples).

Presentation of various types of graphs

Let's try to present data on the percentage of "poor" consumers not in the form of a line graph, but in the form of a histogram. The type of all dependencies on the chart can be changed simultaneously in the Common 2M Chart Markup dialog box. You can change the type of one constraint in its Graph Placement dialog box.

Call dialog Graph Placement for the first constraint (% Poor) by right-clicking on its symbol (or on the line itself) and selecting Change the location of the dependency(s).

Now click on the icon Column diagr. by X in field chart type, and then click OK to see the changes in the graph.


As you can see, the width of the columns in this graph was not very successful. Since this parameter (column width) is a characteristic of only one of the dependencies (Dependencies 1), it is for it that you need to call the dialog box again Chart placement.

In the dialog box General layout of 2M charts the X-axis step value is set to 1 (this window can be called up by double-clicking on the X-axis). Therefore, if you set the width of the histogram bars to 0.8, then they will occupy 80% of the width of the intervals along the X axis, but will still be separated by gaps. Set parameter Width in field Chart view equal to 0.8 and press OK to see the results of the changes.


Change the symbol style

The histogram representation of the percentage of poor consumers is still not very good, as it covers the other two line graphs. Apparently, it is possible to solve this problem by making the histogram transparent.

To change the style of any line, point, or graphics window itself, double-click on the desired element, in this case, on any of the bars in the histogram.


First click on the field Sample and in the list of styles that opens, select "empty" (second from the top).


Note that two modes are now available: Opaque And Transparent. If you turn on the mode Transparent, then even the lines of the guide grid will be visible “through” the histogram. In this case, it is enough to enable the mode Opaque. Now click OK and the schedule will change.


You can continue setting up templates for lines, points, titles, axes and other elements of the chart (to do this, double-click on the corresponding element).

Saving a Graph

To save the final graph, use the button Save file on the toolbar or select Save from the main menu File. Graphic files of the STATISTICA system (with the extension *.stg) use their own graphic format, which saves all the settings made. So after opening graphic file its configuration can be continued from the very place where it was stopped. The graph can also be written in other formats such as Metafile or Bitmap.

In the Bitmap format, the graph is represented as a sequence of points, so it will no longer be possible to edit its titles or symbols.

The Windows metafile format stores some "structural" information about a graphic (text, symbols, etc.) and can be edited in some other applications.

Printing a Graph (Printed Page Preview)

At any time, the graph can be printed using the command Graph printing from the menu File, a dialog box appears. Graph printing.


You can print the graph bypassing this step using the button Seal on the toolbar.

To see how the chart will be placed on the page and set the required fields, you can turn on the mode Preview from the main menu File. This will bring up a dialog box. Preview. To see the field sizes, click on the button fields.


Margins can be set by moving the corresponding line to the desired position. Please note that the choice landscape orientation on the menu Printer will automatically change the dialog box Preview.


This window can be resized, including using the full-screen view mode.

Viewing the graph as it will be printed (WYSIWYG mode)

When setting up complex graphs, it is desirable that the proportions of the graphics window on the screen exactly match those that will be formed when it is printed. This mode is called WYSIWYG (What You See Is What You Get). From the menu View select item Page aspect ratio when printing to make the graphics proportions match the printed page. For example, if the dialog box Printer preselected portrait orientation, the corresponding graph image will appear on the screen.

Now all the previously entered chart parameters are shown on the screen exactly as they will be printed.

Customizing 3D Plots

In this example, as for 2D plots, the Poverty sta. Creation and adjustment of a three-dimensional scatter plot is carried out using dialog boxes General markup of 3M charts And Chart placement.

Create a Default Plot

From Graph Gallery or Menu Graphic arts select item Statistical XYZ Plots -Scatterplots. A dialog box will appear 3M scatter diagrams.

Click on the button Variables and set X to Pt_Poor, Y to Pt_Rural, and Z to Age (average age in the respective county). Then click on the button Options. A dialog box will appear. To display county names on the graph, set the mode to Observation names in the field Observation labels.


Then click OK to return to the dialog box 3M scatterplots.

Click again OK to plot a 3D scatterplot. Click Exit. to remove buttons More And Exit.


To avoid overlapping labels (as happened on this chart), you can use the mode Image filters.

Viewing Graph Data

As in the previous examples, let's first look at the graph data. For this you need to call Plot data editor. For example, right-click on any of the points and select Edit data for dependency(s) or click the button Plot data editor on the toolbar. IN Graph data editor 3 columns (X, Y and Z) are shown for each dependency.

In this case, this is one dependency. If more than one Z variable is selected in the dialog box 3M scatterplots V Graph data editor there will be several dependencies from three columns.

As usual, at this stage, you can change the data, add new dependencies, change the presentation of the data in the editor, and change the fonts.

Editing Observation Labels

Let's assume that Jackson and Shelby counties are of particular interest. At the moment it is difficult to make out anything on the chart, as many of the names overlap. Therefore, you need to remove all uninteresting labels in order to "order" the graph.

To edit point labels:

1) double click on one of them or

2) right click on any of them, select item Change the location of the dependency(s), in the dialog box that appears chart placement select item Data labels.

In any of these cases, a dialog box will appear. Data point labels.

To mark points on the graph besides Text Labels You can also use X, Y, or Z coordinate values, or any combination of them. To bring up a dialog box Editing text labels, press the button Edit.

Remove all labels except Jackson and Shelby.

Click OK, the dialog box will reappear Data point labels. To increase the font size (for example, choose Arial Bold 12), click Font.


Click OK to see the changes in the graph.


Now two specific points are clearly visible here.

Title Editing

As in the previous examples, double-click on the title to edit it. A dialog box will appear Editing headers.


Several possible titles are shown below.


Zooming

As in the previous examples, a not very convenient scale is chosen along the two horizontal axes. Since the variable Pt_Rmal is expressed as a percentage, the range from 0 to 100 (rather than from 10 to 110) would be more appropriate here. Double click on this axis to bring up the dialog box Axis Options: Y.


In field Axis layout select mode Manual with Min. = 0, Step = 20 and Max. = 100.

Rotating a 3D Plot

All 3D graphs in the STATISTIC A system can be rotated in space around any of the three axes. The perspective can also be changed. Choose a team Rotate from the menu View. A dialog box will appear Perspective and rotation. Another way to open this window is to click the button Graph Rotation on the toolbar.


The icon (simplified chart image) allows you to preview the chart's changing orientation and perspective.

To rotate the graph in the horizontal plane, the horizontal scroll bar is used; for rotation in the vertical plane, the right scroll bar (up and down) is used. The left ruler is used to control perspective. Perspective determines how "close" the 3D plot is. The figure below shows an extreme case where the left scroll bar is set to the topmost position. We see the graph as if through a strong wide-angle lens.


In the following chart, perspective is off (the left scroll bar is at the bottom). The graph is visible as if through a telephoto lens.


When the desired spatial orientation and perspective are finally selected, close the dialog box Perspective and Rotation. The chart will be redrawn.

Chart Placement Dialog Box

To call a dialog box Graph Placement right-click anywhere on the surface of the graphics window. From the context menu, select Change chart placement.

In the dialog box Graph Placement the parameters of a specific dependency are configured. For example, using the button points you can change the icons on the scatterplot. (Recall that this dialog box is also called up if you double-click on any point on the graph).

Select triangles as icons as shown above and set their size to S (field points). Then click OK to close the window Point pattern. Now press the button Perpendicular.

Here you can select a style for the vertical lines that connect points to the X-Y plane. To see the changes in the graph, select the solid line. Click OK and then again OK in the dialog box Chart placement. All these changes will appear on the graph as shown below.


Dialog box General markup of 3M charts

Now double click anywhere on the graph surface to bring up the dialog box General markup.


According to the usual rules set in the STATISTICA system, the functions of this dialog box apply to the entire graph as a whole. The meaning of most of them is clear from the names.

Fitting a surface to a scatterplot

Let's choose, for example, in the field Chart type string Surface Plot in order to replace the scatterplot. Notice that the image in the top left corner has also changed to match the new chart type. Click OK to redraw the chart.


In the dialog box ZM charts: additional properties, which is called by double-clicking on the graph surface, the surface fitting parameters are selected.

First, in the graph above, the label Shelby shaded by the surface. You can change the hatching here or make the surface completely transparent. Press P button render hidden to make the surface transparent, that is, to make everything behind it visible. As a result, the surface on the chart will become "grid". Click OK to close this dialog box. Now on the small graph in the dialog box General markup the results of the changes will be visible.


Moving Legend

Remove the surface symbol from the graphics window, which is now meaningless. Right-click on any symbol and select the item in the context menu Remove level line callouts.


Number of surface sections

The number of sections by which this surface is built is set in the dialog box General markup. To call it, double-click on the surface of the graphics window. Change settings Number of sections for X and Y by 30 and 30. To more accurately fit the surface, in the Fitting (surfaces and contours) field, select Spline Smoothing. The chart will now look like this.


Note that the graph shown above has been rotated so that the surface is better visible.

Changing Axis Proportions (3D Cell Proportions)

By default, a three-dimensional graph is located in a cubic cell, i.e. the lengths of all axes for it are equal. Sometimes it is desirable to change these proportions. For example, on this graph, I would like to “stretch” the points along the plane X-Y. In other words, I would like to lengthen the axes X And Y about the axis Z. This can be done using the dialog box already used in this example.

General markup and press the button Additionally... (note that this window was previously called by double-clicking). Then enter in the field Axis proportions X: 2 and Y: 2.

Click OK to close the window 3M graphics: additional properties, and again OK to close the window General markup.

Note that the same result can be obtained by leaving the values ​​for X and Y unchanged (i.e. 1), but changing the value for Z from 1 to 0.5.


Representation of 3D Fitting Functions in Headers

Suppose we would like to find a simple linear relationship between the share of poor consumers, the share of the rural population and the average age. You can approximate the data with a plane, and put the resulting linear parameter estimates in the title of the graph.

Double-click the background surface of the graphics window. A dialog box will appear General markup. In field Fit(surfaces and contours) select item linear smoothing, and the parameter Number of sections return to the default values ​​(X: 15 and Y: 15). Click OK, to return to the graphics window.

Control characters

With the help of control characters, almost any text on the chart (titles, labels, custom text, etc.) can be configured. For example, text can include subscripts, exponents, underscores, and so on. To appear in the title of the graph of the equation of the approximating function of one of the dependencies, use the following control characters @F[dependency number]. Double-click on the first heading, in the line Heading 1 enter the text Function: @F and click OK.


Now back to the dialog Editing titles; the entry in it has changed: (z=28.748+0.049*x+0.086*y@). This text can be edited, its font can be changed, etc.

Note that the @ part of the heading text inside curly braces (()) is automatically updated by STATISTICA; it will change, for example, if you edit the data or the function equation. After removing curly braces and @ symbols, this entry will be treated as plain text.


Example 2: Feature Fitting, Enlargement, and Shading

Building a scatterplot

In any module (such as Basic Statistics and Tables), open the Poverty.sta file. From the menu Graphic arts select Statistical 2M plots - Scatter diagrams. Set X to Pop_chng (population change) and Y to Pt_Poor (percentage of poor consumers).


Click OK. By default, a scatterplot with a linear regression plot will be built. Click the button Exit. to remove buttons from the graphics window More And Exit.


Polynomial approximation

As already discussed in previous examples, on a two-dimensional scatter plot, you can plot an approximating function for each dependence separately. Right-click anywhere on the chart and select from the context menu Change chart placement.


Instead of the default linear fit, select in the box Fit paragraph Polynomial. Please note that using the button located in this field Options you can specify the degree of the polynomial.

The default is a 5th degree polynomial. Now close this dialog box (click OK).

Before you continue plotting, select a confidence interval. To do this, set the radio button in the field Confidence interval into position On.


Exit the dialog box Graph Placement by enabling the dialog box General markup.


Here you can see that the record of the equation of the new function is automatically updated because the special control character @F is introduced in the second header line (the use of special control characters for formatting was discussed in example 2). Now click OK to see the result in a graph.


As a result, the estimates of the function parameters are placed in the header, and the 95% confidence band is shown on the graph.

Interactive Outlier Removal (Shading)

Click the Brush toolbar button . The shape of the cursor will change to match the one shown on the button. A dialog box will appear shading.

Select Mode Operation - Turn off(to exclude filled points from consideration) and turn on the mode Auto update, as shown above (so that the actions of the brush are immediately displayed on the chart).

Now move the cursor to the point in the lower right corner of the graph so that it is in the center of the crosshairs.

Click the left mouse button, and the corresponding point will be removed from the scatterplot, and the parameters of the function written in the second title line will also change.


So the tool Brush allows you to interactively remove outliers from the scatterplot and observe the corresponding change in the fitting function. IN Graph data editor removed outliers are highlighted in a different color.

To “deselect” a point (that is, place it back on the chart), place the cursor on the corresponding line in the Graph Data Editor window and click the button on its toolbar Show plot point IDs

In the dialog box that appears:


change the status of the selected point. The selection will be removed. Press the button on the toolbar and the previously deleted point will reappear on the chart.

Increase

Zoom is a very useful tool for examining a selected area of ​​a graph in detail, particularly when it is necessary to remove individual points. If, for example, there are areas of “crowding” of points in a scatterplot, then this area can be enlarged to identify individual points. Click the button Increase, while the cursor on the graph surface will take the form of a magnifying glass. Bring it to the center of the area you would like to enlarge and click the left mouse button.


If you click the left mouse button again, then given area will increase again.


Each click of the left mouse button enlarges the corresponding area approximately twice.

You can use the scroll bars to view the graph in magnified mode. Click the button Pick chart area and margins and you can view the graph as if through a magnifying glass.


To remove the zoom, press the button Decrease and click on the corresponding area of ​​the graph. Note that after several successful zoom in and out operations, the position of the graph in the graphics window may change.

To restore the original view of the chart, use the command Restore initial settings on the menu View.

The graph will be rebuilt according to the default settings.


Drawing a custom function

Bring up the dialog box again Graph Placement and press the button Custom. A dialog box will open Setting a user function. Define, for example, an exponential function: y = 25.183*exp(-0.016*x).


Click OK in this dialog box and in the dialog box Graph Placement. Set function will be drawn on the chart (the title will be updated accordingly).

Please note that in this case, the function is simply superimposed on the graph. To find a custom approximating function for a given dependency, you need to use the module Nonlinear estimation.


Adding a dependency

For each dependence on the graph, you can find only one approximating function (or impose only one function on it). Therefore, to build multiple functions, you need to create additional dependencies. To do this, follow these steps.

Click the button Plot data editor(or call it in any of the other ways mentioned above). From the menu Edit select item Add dependency.

In this dialog, save all default settings (click OK). This will add a new dependency (in the following Graph data editor two empty columns added).

Now right click on the first column and from the context menu select Chart placement. In this dialog box, for constraint 1, select polynomial fit again. Then click the Next >> button. A dialog box will appear Graph Placement for the second (new) dependency.


Select an item here Other function and define it again like this

y = 25.183*exp(-0.016*x).

Close the dialog Setting a user function and open the dialog box General markup. In this dialog box General markup: 2M chart and select from the list Titles string Heading 3. Using the rules introduced earlier, write as a heading: Function 2: @F.

To build a graph, click OK:


The plot now shows both the custom function and the fitting polynomial.

Example 3 - Dynamic painting (Brush)

As a rule, the mode Dynamic Shading used on matrix plots for trial data analysis. In this case, instead of painting over a certain range of variable values ​​(in order to study the influence of different areas on the distribution function), you can enter automatic brush movement (in the form of a rectangle or lasso) and observe the “result”.

The area to fill is defined on one of the matrix graphs and automatically moves along it (horizontally, vertically, or in both directions). When groups of points of this graph fall into the area of ​​shading, then the corresponding points on all other graphs of the matrix are selected.

Data file

This example uses the data file Irisdat.sta with Fisher's classic report (1936). It provides data on the length and width of the petals and sepals of three varieties of irises (Setosa, Versicol, Virginia). The cleanup of this file is shown below.

Building a matrix graph

Open Irisdat.sta data file, select from Graph galleries or menu Graphic arts paragraph Statistical matrix plots. A dialog box will appear Matrix charts.

With button Variables select all variables. Click OK to close the variable selection dialog. In field Fit select line Linear. Click again OK to plot a matrix plot and remove the buttons Exit. And More by pressing the button Exit.


Click the toolbar button. A dialog box will appear Painting. Then, as the brush type, choose Rectangle and turn on the mode Movement(see next figure).


The cursor will change to a crosshair. Now on one of the plots of the matrix, you can select a rectangular area. To explore and compare relationships between four iris characteristics (Sepallen, Sepalwid, Petallen and Petalwid) of three different varieties (Setosa, Virginia and Versicol), select one group of dots in the top right plot (representing one of the varieties).

When you release the mouse button, the rectangle will move periodically along this graph. In this case, the corresponding points will be highlighted on all other graphs.


The speed and direction of movement during dynamic painting are set in the dialog box Movement,

This dynamic visualization reveals a variety of relationships for each variety of irises. For example, when the rectangular area of ​​the fill passes through the first group (as shown above), then highlighting the corresponding points allows you to judge the different magnitude and direction of the relationship between the Sepalwid and Petallen, Sepalwid and Petalwid parameters.

Filling in the Plot Data Editor

The STATISTICA system uses two methods of shading: using the Brush in the graphics window or the corresponding button in Graph data editor. If data points are selected in shaded mode (i.e. labeled, flagged, turned off, or highlighted), then their coordinates are represented by different colors in the Graph data editor.

This Editor provides a "command" environment where you can directly assign attributes to points without first selecting them, but using the toolbar buttons, the And dialog box. point identifiers on the chart, context menus or drop-down menu commands Edit. Thus, the painting operations have the same status here as the mode Auto update in the painting process. In this case, the current operation will be performed after each attribute selection, and the points specified using the cursor (both individual points and selected blocks) will be immediately marked, marked, highlighted, etc.

Note that plot data points can have more than one attribute (for example, they can be labeled and highlighted at the same time), while Graph data editor they differ only in different colors and, accordingly, are displayed on the updated chart (after pressing the button redraw or Exit and redraw).

  • IN Graph data editor You can control the attributes of points (marked, marked, disabled or highlighted) using special toolbar buttons or menu commands.
  • Data points (values) selected by shading (that is, marked, flagged, turned off, or highlighted) are displayed in the Plot Data Editor in different colors.

Example 4 Binding and Embedding

This example will show you how to place the STATISTICA graph in another graphics window or in a Windows application using OLE tools. When cutting (deleting) or copying a graph or other selected object (such as custom text, labels, pastes, or drawings), it is placed on the clipboard (Clipboard).

For compatibility with other Windows applications, in addition to the object in STATISTICA's native graphics format, a metafile is copied to the buffer, as well as bitmap and text representations.

Bitmaps

A raster image does not store any logical (structural) components of a graph. When pasted into another graph, it simply transfers the dotted (pixel) display of the graphics window.

Windows Metafiles ("pictures")

Unlike a raster image, this format preserves some of the structural components of the graph. The Windows metafile format stores an image as a set of descriptions or definitions of all chart components and their parameters (for example, line segments, fill patterns, text and its characteristics, etc.). Therefore, the metafile format provides more flexibility for customizing and converting the graph in other Windows applications.

For example, by opening a chart in metafile format in Microsoft Draw, you can "parse" it, select and change individual lines, filling, colors, edit text and change its parameters, etc. Note that not all programs provide the ability to fully edit metafiles, for example, Microsoft Draw does not support text rotation mode.

Proprietary graphic format of the STATISTICA system

A graph recorded in this format, when inserted into another graphics window, retains all its structural components and objects in such a way that they are recognized by the STATISTICA system. Therefore, when copying or exchanging graphic objects (or entire graphs) between windows, this format is selected by default so that further editing can be continued (including settings for STATISTICA graphs in other applications where they are placed using OLE).

Copying and pasting graphics

This example uses the Flat.sta data file. Open this file in one of the modules of the STATISTICA system (for example, in the Basic Statistics and Tables module). From the menu Graphic arts or Graph Gallery select item Statistical 2M graphs - Scatterplots. In the dialog box 2M scatterplots in field Chart type: select line Composite. Then click on the button Variables and select PRICE as the X variable and TOTSP and PODSP as the Y variables. Click OK to close the variable selection dialog.


Click OK, and the graph will appear on the screen.


Right-click on one of the symbols and select the item from the context menu Move Legend.


The legend has now been converted to custom text. If you double click on them, then Graphics text editor you will be able to see the legend text and control characters.


In the editor window, remove the newline character from the text (place the cursor at the end of the first line and press the key Del). The two lines in the legend entry will become one. You can put four extra spaces between the first and second dependency conventions and replace the tab characters (@T) with spaces. Since the symbols will not fit on one line, the tab stop cannot guarantee the same spacing between characters and text.


Click OK, to see the modified legend on the chart.


The text is not in the center of the box because the original notation contained line spacing characters (@S). Double click on the legend and remove the @S characters. Click OK to return to the graphics window.

Now double click on the custom text legend, then click CTRL+C or button to copy custom text to clipboard, and close Graph text editor.


Insert as text

Double-click on the title of the chart to open the Edit Titles dialog box. To paste, place the cursor on an empty field Heading 2 and press the key combination CTRL+V or a button on the built-in toolbar.


Click OK, to see the final graph.


The legend has now been placed in the header.

Paste as bitmap

To highlight the legend as custom text, click again with the cursor over it. Then from the menu Edit select a team Cut(you can perform this operation in other ways: using the key combination CTRL+X toolbar buttons or commands Cut context menu). As explained in the introduction to this example, the custom text is now placed on the clipboard in four different formats: as plain text, as a bitmap, as a metafile, and as a native STATISTICA graphic.

From the menu Edit select mode Special insert.

In the dialog box Special insert select format Bitmap. Turn on the mode Place by default.


The insert now looks like a regular custom text legend, but it's not really. The program perceives it as a set of points, that is, a bitmap.

Right-click on the object and select Object Properties from the context menu (or double-click on the object, or select the object and press the ALT+ENTER key combination).

In the dialog box that appears, remove the checkmark next to the words Initial proportions(so that you can resize the object without worrying about maintaining the original proportions). After closing this dialog box, the object can be moved and resized.


Obviously, when stretching or shrinking a bitmap, each point moves accordingly, causing the text to be distorted.

Insert as a native STATISTICA graphic object

Choose from the menu Edit paragraph Special insert and then mode Internal description STATISTICS systems.


Initially, this object looks like a bitmap. Double click on it. You will see that the font sizes cannot be changed. Instead, a window will open Graphics text editor.

Thus, the STATISTICA system perceives this image as its own graphical object and, therefore, allows it to be edited by any available means. To change the size of the legend, you must select a larger font, such as ArialBold20. Below is the graph after making the changes.


Net

To align the position of text and other graphic objects, use the function Guide mesh from the drop down menu View(it is also called using the key combination CTRL + G).


The grid available on the chart allows you to very accurately place various objects (for example, text). This mesh is not printed. You can remove it by selecting the Guide grid item again (that is, by removing the check mark next to the function name or by pressing the key combination CTRL+G).

To customize the grid (its start and intervals), click the toolbar button or select from the menu View command Attach to grid. In this case, it will also be possible to attach objects to grid nodes (for precise placement).

When moving and resizing objects, the snap to grid mode can be easily turned on and off with the key TAB.

Client and Server Functions in OLE

Now delete all the graphics placed in this example on the scatterplot. This graph itself will be inserted into a 3D bar chart. This example will demonstrate how the STATISTICA system can be both a client and a server in an OLE method.

Creating a 3D Histogram

From the menu Graphs select item Statistical ZM Sequential Plots- Histograms of two variables. Select PRICE and TOTSP as variables. Click OK to build a histogram of two variables.


Scatterplot Implementation

Click on the previous scatterplot image. Then from the menu Edit select a team Copy(or press the key combination CTRL+C). Again click on the histogram and now from the menu Edit select item Special insert.


As with custom text, there are several graphic (file) formats to choose from. When choosing a format Bitmap resizing the embedded graph, as in the case of custom text, leads to image distortion (see below).


Let's choose STATISTICA's own graphic format instead.


Since this format is set by default, it is enough just to select the Paste command or press the key combination CTRL+V

Editing an Embedded Graph

Right click on the embedded graph. The context menu that appears will show all available editing functions. An embedded chart is treated as a linked object, i.e. it can be treated like the original chart. If you double-click on it, it will open in the standard way, following the Windows conventions for linking and embedding OLE objects. Do desired changes and exit edit mode using the Close and return command from the File menu. All changes will be displayed on the embedded chart.

Embedding or Linking Plots from Files

You can carry out the procedure of embedding or linking graphs from an existing graphic file. For example, save the scatterplot as a native STATISTICA graphics file (for example, as a Scatterstg file). Then click on the 3D histogram and from the Insert menu select Object (or click on the toolbar button Inserting an object ).

In the dialog box Insert select tab Object from a file, while in the list Type object specify STATISTICS chart. Also check if the mode is enabled Link to file. In this mode, the linked graph will be automatically updated when the original graph is changed and saved. Listed File name select the previously saved Scatter.stg file. Click OK, and a graph from this file will appear in the upper left corner of the picture.


Automatic update of related graphs

Now let's go back to the scatterplot and delete all custom text and titles (select them with a mouse click and then click Del or use the command Cut on the menu Edit).


As you can see in the figure, the associated graph has been automatically updated.

Managing Multiple Graphic Objects

If there are several opaque graphic objects on the screen at the same time, it is important that they are placed in the right order.

Consider, for example, the previously constructed three-dimensional histogram with an embedded graph. This graph is shown below after adding an arrow and custom text to it.


In this case, it is desirable to draw an arrow and custom text on top of the associated graph, because otherwise they will not be visible. At the moment, the elements of the graph are shown in the correct sequence. But in the next paragraph, just for the purpose of demonstration, we will show how to bring this graph to the front, that is, draw it last.

Changing the order of displaying graphical objects

Toolbar buttons Bring to front And Send to back are intended for the corresponding movement of the selected (selected) graphical objects. Click on a linked graph to highlight it, then click the button Bring to front.


The embedded graph now covers the arrow and some of the custom text. You can put it in the background again (in the initial state) by pressing the button Move to back.

Managing STATISTICA Graphs in Other Windows Applications Using OLE

This example will show how to link a graph of the STATISTICA system to another Windows application using the method Object Bindings and Embeddings(OLE). In this case, the chart will be associated with a document intended for editing in the program. Microsoft Word. A STATISTICA system graph linked in this way can be edited within another application using the STATISTICA system configuration tools (if that application supports OLE tools).

First, let's build the following graph in the STATISTICA system.

Let's assume that this graph needs to be included in a document edited in Microsoft Word. Below is the part of the "report" where the chart should be placed.


The graph of the STATIST1CA system must be inserted between the second and third paragraphs of the text (after the words as follows.

Linking a STATISTICA Graph

First, open the STATISTICA system and plot the desired graph (for example, the one shown above). Then copy it with the keyboard shortcut CTRL+C or commands Copy from the menu Edit.

Switch to word document and place the cursor where the graph should be linked to (at the end of the second paragraph). In Microsoft Word, select from the menu Edit paragraph Special insert.


The Microsoft Word editor recognized the STATISTICA system chart in the clipboard. Therefore, by default, the plot will be placed in the document as STATISTICA Plot. To insert a graph, click OK.

Note that in the same way, you can simply paste the graph into the document (by pressing CTRL + V), since the STATISTICA Graph format comes first in the list of clipboard formats (Clipboard).


Editing a Linked Plot

Let's say you decide to include a brief description of the PRICE variable in the graph shown above. To edit a graph, double-click on it, and the STATISTICA system will automatically start, where this graphics window will be opened. You can make sure that here in the menu File new items appeared.


Note that the STATISTICA system "knows" that this graph is embedded in Microsoft document word. Thus, having made the necessary settings, you can close the STATISTICA system and return to Word (Close and return ...), update the graph in Word and continue editing in the STATISTICA system (Refresh ...), or exit the STATISTICA system and return to Word program(if the chart has been changed, STATISTICA will ask if it needs to be updated in the Word document).

Let's say the following custom text has been added to the chart.


On the menu File select a team Go out and return to Microsoft Word. The Word document now contains the updated graph.


As you can see from the figure, there is new text on the chart embedded in the Word document.

Example 5: Adding User Defined Statistical Plots to the Plot Gallery Window and the Plot Menu

STATISTICS allows you to include in the menu item Graphic arts additional chart types defined by the user. This is very convenient when building typical graphs with specific settings. In addition, user-defined graphics as well as generic settings can be mapped to buttons on the toolbar. Auto task buttons.

Let's assume that during the quality control process, 25 series of measurements are usually made, in each of which 5 product samples are taken. At the same time, each time a minimax diagram of the same type is built using these data. In this case, to save time, it is advisable to include this particular type of graph with all its settings in the list of user-defined graphs. This list is called from the menu Graphic arts(in subparagraph User Statistical Graphs).

Data file

This example uses the Pistons.sta data file. It contains the results of measuring the diameters of the piston rings, 25 series of measurements of 5 rings each. Part of this file is shown in the figure.

Defining Graph Options

Open the Pistons.sta file and choose from the menu Graphic arts paragraph Statistical 2M charts - Span charts. A dialog box will appear 2M diagrams.


Click the button Variables and select variable samples as a categorizer in the field Groups on the chart, and as the second variable size. Click OK to close the variable selection dialog.

This minimax plot should show the means, standard deviations, and interval (maximum and minimum) for each series of measurements. Therefore, in the list middle point select line Average, on the list Rectangle- St.off, while in the list Line segment- Min-max. Then in the field Groups on the chart turn the switch to the Codes position, click the Set codes button and select their values ​​​​from 1 to 25. Finally, click the button Options and set the mode Text or dates on the axes. Close the dialog Statistical Graphs: Options. Now the dialog box 2M span charts as follows:


Create a new user schedule

All of these settings can be saved as a custom graphic, which is a graphic style sheet. Click the button Options and open the dialog again Statistical graphs: options.


Click the button Add to menu as user chart, this will open a dialog box. New user chart.

In this example, set the mode Save current variables with chart definition.(Here you can change the name of the file and the directory in which it should be saved.) In the Menu item name input field, enter the name of the graph to designate it in the Graphics menu list (in the User Statistical Graphs sub-item). Name this graph type, for example, Quality Control.

Close this dialog (click OK), and the given chart will be built.


Selecting a user-defined schedule

Close the STATISTICA module you were working on and then open it again. If you open a module using the STATISTICA module selector button, all its settings will be reset to default. Open the Pistons.sta file if it's not already open by default. Let's assume that this file now contains new data obtained according to the same scheme (that is, 25 identification codes are stored in the first variable, and the measurement results are recorded in the second). To plot this predefined user-defined plot, select the User Statistical Plots sub-item from the Plot menu.

As you can see, the previously saved graph of the Quality Control user has been added to this list (if you did not add other graphs to this menu, the Quality Control graph may be the only one in this list). Now select it, this will bring up a dialog box 2M span diagrams.


This dialog box saves and automatically reproduces all settings, including selection of variables and codes. To build a graph similar to the previous one, just click OK.


Viewing and editing the list of user charts

To view and edit the list of available user charts, select from the menu Service paragraph Custom charts.

You can change the order of the graphs in the list. To do this, select the row(s) to move and click on the new location. In addition, you can add new graphs (if they are previously saved as user graphs in a file with *.sug extension), change their names or reassign them. Unnecessary charts can be deleted.

Deleting a chart from the list at this stage does not mean deleting the file containing chart parameters (file with *.sug extension). Operation Delete deletes the graph name from the system initialization file STATISTICA Statist.ini. Later, this graph can be added to the initialization file again (using the Add button), and will again appear in the menu. User charts.

Liked the article? Share with friends: