How to graph a function in Microsoft Excel. The simplest change schedule


Graphs are a good way to analyze information. Typically, they are needed when you need to differentiate between business data that shows a company's annual profit, or scientific data that shows, for example, how the temperature changes in each month in a certain location. Using Microsoft Excel to plot charts is a great way to make charts that look professional at work or school. However, not everyone knows how to build graphs in Excel. Below is a brief description of the steps you need to follow to create a diagram in this editor. Various other plots that can be created - lines, histograms - are done in a similar way. This example is provided in Microsoft Excel 2007 for Windows.

So, first, open Excel 2007 editor on your computer. Enter the desired data category for the information you want to compare, placing it in different columns. Each category must be entered in a separate cell, starting with A2. The example in this article creates a graph in Excel showing expenses for fuel, clothing, and entertainment.

Then you should make the X axis labels on row 1. Each label should be in a separate cell, starting with B1. For example, in the case of organizing expenses, you can choose four months.

Enter the required values ​​for the Y-axis in the required cells. The data must be consistent with the X-axis and category information. In this example, you can note the amount of money spent on each item for each month, rounding the amounts to a convenient value.

Highlight your entries in the table by clicking in the top left corner of the table and then dragging the mouse over the entire range of data.

Click on the "Insert" tab in the menu located at the top of the screen. This item will be located in the second tab on the left side.

Select the type of chart you want to use to present your data when creating a graph in Excel. For the above data, a histogram is best because it does a good job of showing the different X-axis variables that represent different data. Please note that data is displayed differently depending on the type of graph. These varieties are listed in the center of the menu. There are a choice of speakers, linear, etc. In the drop-down menu of designs, the histogram will be displayed after clicking on the corresponding item.

Select the chart type that best suits the data entered into your graph in Excel. When you place your cursor over the appropriate option, you will see its description. For example, if you select "2D Chart", it will appear in the corresponding form in your table.

Click on the created graph in Excel and then on the Layout tab. To add a title to the entire chart or its axes, simply click on the Labels tab. A drop-down menu will open from which you can select the required options. Make changes as needed to titles, fonts by clicking on the text and performing subsequent editing.

Once you've finished formatting and editing your chart, you can copy and paste it into other documents. If the copy and paste functions do not work, you can always try taking a screenshot and pasting the created graphs in Excel 2007 into any document of your choice as an image.

Excel is the most popular spreadsheet program. Excel is very convenient for performing economic-statistical and other calculations, as well as generating various tables and reports.

One of the most common tasks when working with Excel is creating a graph. Thanks to Excel's tools, creating a graph is quite easy. In this article we will look at this task and talk about how to build a graph in Excel.

Step No. 1. Preparing data for the graph.

In order to build a graph in Excel, we need source data. You will have your initial data, and we will look at the process of creating graphs using the example of such a simple table with information about the harvest.

Step No. 2. Select the data that will be used to build a graph in Excel.

In order for Excel to immediately obtain the necessary data when creating a graph, you need to select the area in which it is located.

Step No. 3. Go to the “Insert” tab

Without removing the selection from the area we need, go to the “ Insert” tab.

Step No. 4. Create a graph using the appropriate button.

On the “Insert” tab, find the “Graph” button. Click on this button and select one of the chart design options from the drop-down menu. You can change the design later.

Step No. 5. Setting up the created chart.

Once you have created the graph, a small floating window with the graph should appear on your Excel sheet. You can move this window to any location convenient for you.

Step No. 6. Setting the parameters of the plotted graph.

After constructing a graph, Excel allows you to configure almost all of its parameters. For example, if you incorrectly specified the data area, you can use the “Select data” function. This function allows you to change the area from which data is used to create a graph.

To do this, select your chart and open the “Design” tab. On this tab there is a button “Select data".

Click on this button and highlight the correct area and click on the “OK” button.

Excel will then rebuild the graph using the new data. In addition, on the “Design”, “Layout” and “Format” tabs you will find many settings that change the appearance of the graph. This will allow you to create a graph that will fit in style with your document.

Plotting a graph of a function's dependence is a typical mathematical problem. Everyone who is familiar with mathematics at least at school level has constructed such dependencies on paper. The graph shows how the function changes depending on the value of the argument. Modern electronic applications allow this procedure to be carried out in a few mouse clicks. Microsoft Excel will help you create an accurate graph for any mathematical function. Let's take a step-by-step look at how to graph a function in Excel using its formula

Graphing a Linear Function in Excel

Building graphs in Excel 2016 has been significantly improved and has become even easier than in previous versions. Let's look at an example of plotting a linear function y=kx+b on a small interval [-4;4].

Preparing a calculation table

We enter the names of the constants k and b in our function into the table. This is necessary to quickly change the schedule without redoing the calculation formulas.

Setting the increment of function argument values
  • In cells A5 and A6 we enter the argument notation and the function itself, respectively. The formula entry will be used as the title of the chart.
  • We enter into cells B5 and C5 two values ​​of the function argument with a given step (in our example, the step is equal to one).
  • Select these cells.
  • Place the mouse pointer over the lower right corner of the selection. When a cross appears (see the picture above), hold down the left mouse button and drag it to the right to column J.

The cells will be automatically filled with numbers whose values ​​differ in the specified increment.


Autocomplete function argument values

Attention! The formula begins with an equal sign (=). Cell addresses are written on the English layout. Note the absolute addresses with dollar signs.


Writing a calculation formula for function values

To complete entering the formula, press the Enter key or the check mark to the left of the formula bar at the top of the table.

We copy this formula for all values ​​of the argument. We extend the frame to the right from the cell with the formula to the column with the final values ​​of the function argument.


Copying a formula

Graphing a Function

Selecting a rectangular range of cells A5:J6.


Selecting a function table

Go to the tab Insert in the toolbar. In chapter Diagram choose Point with smooth curves(see figure below). We get a diagram.

Building a chart of the "Graph" type

After construction, the coordinate grid has unit segments of different lengths. Let's change it by dragging the side markers until we get square cells.


Graph of a Linear Function

Now you can enter new values ​​for the constants k and b to change the graph. And we see that when we try to change the coefficient, the graph remains unchanged, but the values ​​on the axis change. Let's fix it. Click on the diagram to activate it. Next on the tool ribbon in the tab Working with charts on the tab Constructor choose Add Chart Element - Axes - Additional Axis Options..


Entering the mode for changing parameters of coordinate axes

A side settings panel will appear on the right side of the window. Axis format.


Editing axis parameters
  • Click on the Axis Options drop-down list.
  • Select Vertical Axis (Values).
  • Click the green chart icon.
  • Set the axis value range and unit of measurement (circled in red). We set the units of measurement to Maximum and Minimum (Preferably symmetrical) and the same for the vertical and horizontal axes. Thus, we make the unit segment smaller and, accordingly, observe a larger range of the graph on the diagram. And the main unit of measurement is the value 1.
  • Repeat for the horizontal axis too.

Now, if we change the values ​​of K and b, we get a new graph with a fixed coordinate grid.

Plotting graphs of other functions

Now that we have a basis in the form of a table and a chart, we can build graphs of other functions by making small adjustments to our table.

Quadratic function y=ax 2 +bx+c

Follow these steps:

  • =$B3*B5*B5+$D3*B5+$F3

We get the result

Graph of a quadratic function

Cubic parabola y=ax 3

To build, follow these steps:

  • In the first line we change the title
  • In the third line we indicate the coefficients and their values
  • In cell A6 we write the function designation
  • In cell B6 enter the formula =$B3*B5*B5*B5
  • Copy it to the entire range of argument values ​​to the right

We get the result

Graph of a cubic parabola

Hyperbola y=k/x

To construct a hyperbola, fill out the table manually (see figure below). Where there was previously a zero argument value, we leave an empty cell.

  • In the first line we change the title.
  • In the third line we indicate the coefficients and their values.
  • In cell A6 we write the function designation.
  • In cell B6 enter the formula =$B3/B5
  • We copy it to the entire range of argument values ​​to the right.
  • Removing a formula from a cell I6.

To display the graph correctly, you need to change the range of the source data for the chart, since in this example it is larger than in the previous ones.

  • Click on the chart
  • On the tab Working with charts go to Constructor and in the section Data click Select data.
  • The Data Entry Wizard window will open.
  • Select a rectangular range of cells with your mouse A5:P6
  • Click OK in the wizard window.

We get the result


Hyperbola graph

Construction of trigonometric functions sin(x) and cos(x)

Let's consider an example of plotting the trigonometric function y=a*sin(b*x).
First fill out the table as in the picture below


Table of sin(x) function values

The first line contains the name of the trigonometric function.
The third line contains the coefficients and their values. Pay attention to the cells in which the coefficient values ​​are entered.
The fifth line of the table contains the angle values ​​in radians. These values ​​will be used for chart labels.
The sixth line contains the numerical values ​​of the angles in radians. They can be written manually or using formulas of the appropriate form =-2*PI(); =-3/2*PI(); =-PI(); =-PI()/2; ...
The seventh line contains the calculation formulas of the trigonometric function.


Writing the calculation formula for the sin(x) function in Excel

In our example =$B$3*SIN($D$3*B6). Addresses B3 And D3 are absolute. Their values ​​are coefficients a and b, which are set equal to one by default.
After filling out the table, we begin to build a graph.

Selecting a range of cells A6:J7. Select a tab in the ribbon Insert In chapter Diagrams indicate the type Spot and view Spot with smooth curves and markers.


Creating a Scatter Chart with Smooth Curves

As a result, we get a diagram.


Sin(x) graph after inserting the chart

Now let's set up the correct display of the grid, so that the graph points lie at the intersection of the grid lines. Follow the sequence of actions Working with charts – Designer – Add chart element – ​​Grid and enable three modes for displaying lines as in the figure.


Setting up the grid when plotting

Now go to the point Additional Gridline Options. You will get a sidebar Plot area format. Let's make the settings here.

Click on the main vertical Y axis in the diagram (it should be highlighted with a frame). In the sidebar, configure the axis format as shown in the figure.



Click the main horizontal X axis (it should be highlighted) and also make the settings according to the figure.


Setting the horizontal x-axis format of a function graph

Now let's make data labels above the points. Do it again Working with charts – Designer – Add chart element – ​​Data labels – Top. You will be substituted with the numbers 1 and 0, but we will replace them with values ​​from the range B5:J5.
Click on any value 1 or 0 (Figure step 1) and in the signature parameters check the box Values ​​from cells (Figure step 2). You will be immediately asked to specify a range with new values ​​(Figure step 3). We indicate B5:J5.



That's all. If you did it right, then the schedule will be wonderful. Here it is.


To get the graph of a function cos(x), replace in the calculation formula and in the title sin(x) on cos(x).

In a similar way, you can build graphs of other functions. The main thing is to correctly write down the computational formulas and build a table of function values. I hope you found this information useful.

PS: Interesting facts about logos of famous companies

Dear reader! You have watched the article to the end.
Have you received an answer to your question? Write a few words in the comments.
If you haven't found the answer, indicate what you were looking for.

Microsoft Excel is a convenient multifunctional tool. This application is perfect for creating a variety of graphs and charts.

Not all users know that using Excel you can make graphs of mathematical functions of varying complexity.

In this article we will take a closer look at how to build an Excel chart.

Today, two main versions of this application are popular among users: Excel 2013 and Excel 2003, which differ significantly from each other, for this reason the process of constructing graphs in these applications is significantly different.

The process of creating a graph in Excel 2003, 2007

The procedure for constructing diagrams in Excel 2003 is similar to the process of working with Excel 2007.

Everyone knows that Excel is a spreadsheet used to perform a variety of calculations.

The results of calculations act as input data in the process of creating diagrams.

The procedure for generating a schedule in Excel 2003 includes the following steps:


  • At the very beginning, launch the application and open a new sheet of the workbook. Next, make a table with two columns. The first column will be used to record argument(X), and the second – for functions (Y). You can see what it looks like in the picture below.

  • In the next step, enter the argument in column B X. Then to the column C a formula is entered that will be used to construct the graph. As an illustrative example, we will take a fairly simple formula y = x 3. You can see what it looks like in the picture below.

It should be remembered that in this application, before any formula you need to put the sign «=» .

In our specific example, the formula that needs to be entered into the column is C, will look like this: =B3^3, i.e. the program will construct the value from the cell B3 to the third degree.

You can also use an alternative formula, which will look like this: =B3*B3*B3. After entering the formula in column C, press "Enter".

Since entering a formula into each cell is a long and quite labor-intensive process, Excel developers took care of user comfort.

In order to enter a formula into all cells, you just need to stretch the filled one.


You need to click on the filled cell in which the formula is located. In the lower right corner of this cell you will be able to see a small square.

You need to hover the cursor over this square, hold down the right button and stretch the formula to all unfilled cells.

You can see exactly how this is done in the picture below.


  • In the next step we will move on to creating a graph. In order to do this, you need to go to the menu/insert/diagram directory, as shown in the image below.

  • Then you need to select the appropriate one from the available scatter plots and click on the Next button. You should choose a scatter chart because other chart types do not allow you to specify an argument and function in the form of a link to the group of cells you filled in. The process of selecting a suitable scatter plot is shown in the picture below.

  • At the next stage, a window will appear in front of you in which you need to open a tab called “Row”. Then you should add a row using a special button called “Add”. To select cells, you need to click on the buttons that are shown in the picture below.

You will need to select the cells in which you previously entered the Y and X values. Then you need to click the "Done" button.

  • After this, a graph will appear in front of you as in the picture.

If necessary, you can change the values ​​of the argument and function, which will instantly rebuild the created graph.

Creating a graph in Excel 2013

In order to figure out how to make a table in Excel 2013, we will take as an example the function y=sin(x), so we should get a sinusoid.

To build a chart you will need to do the following:


  • At the very beginning, you need to launch the application. Then you should select a blank page and, for convenience, arrange the two columns in the form of a table. We will enter the argument X in one column, and the function Y in the other. You can see what the table design looks like in the picture below.



  • At the next stage, you need to enter the value of the argument into the table, and enter the formula in the first cell of the second column =SIN(C4). After you enter the formula into a cell, you need to stretch it in the same way as described above to all unfilled cells. You can see the process of filling out the column with formulas in the pictures.

  • Once you have completely filled out the table, you can begin the process of creating a graph. You need to select the entire table along with the headers, as shown in the image below.

Example 1

Given function:

You need to construct its graph on the interval [-5;5] with a step equal to 1.

Creating a table

Let's create a table, call the first column variable x(cell A1), the second is a variable y(cell B1). For convenience, we will write the function itself in cell B1 so that it is clear what kind of graph we will build. Enter the values ​​-5, -4 in cells A2 and A3, respectively, select both cells and copy down. We get a sequence from -5 to 5 with step 1.

Calculating Function Values

It is necessary to calculate the values ​​of the function at these points. To do this, in cell B2 we will create a formula corresponding to the given function, only instead of x we ​​will enter the value of the variable x located in the cell on the left (-5).

Important: for exponentiation the sign is used ^ , which can be obtained using a key combination Shift+6 on the English keyboard layout. It is necessary to put a multiplication sign between the coefficients and the variable. * (Shift+8).

Entering the formula is completed by pressing the key Enter. We will get the value of the function at the point x=-5. Let's copy the resulting formula down.

We received a sequence of function values ​​at points in the interval [-5;5] with step 1.

Plotting a graph

Let us select the range of values ​​of the variable x and function y. Let's go to the tab Insert and in the group Diagrams let's choose Spot(you can choose any of the scatter plots, but it is better to use the view with smooth curves).

We received a graph of this function. Using Tabs Constructor, Layout, Format, you can change the chart parameters.

Example 2

Functions given:

Andy=50 x+2. It is necessary to construct graphs of these functions in one coordinate system.

Creating a table and calculating function values

We have already built a table for the first function, let's add a third column - the values ​​of the function y=50x+2 on the same interval [-5;5]. Fill in the values ​​of this function. To do this, in cell C2 we enter the formula corresponding to the function, only instead of x we ​​take the value -5, i.e. cell A2. Copy the formula down.

We received a table of the values ​​of the variable x and both functions at these points.

Graphing

To build graphs, select the values ​​of three columns on the tab Insert in Group Diagrams choose Spot.

We received graphs of functions in one coordinate system. Using Tabs Constructor, Layout, Format, you can change the chart parameters.

The last example is convenient to use if you need to find the intersection points of functions using graphs. In this case, you can change the values ​​of the variable x, select a different interval or take a different step (less or more than 1). In this case, there is no need to change columns B and C, nor the diagram. All changes will occur immediately after entering other values ​​for the x variable. This table is dynamic.







2024 gtavrl.ru.