Main Content

# Graph Importer

Extract graphs from datasheets for use in block parameterization

Since R2024a

## Description

Use the Graph Importer tool to import graphs from part datasheets, modify the point data as needed, and then export selected data as MATLAB® data files. You can later use these data files for block parameterization.

The Graph Importer tool enables you to:

• Import graphs from part datasheet PDFs.

• Calibrate the data axes.

• Select applicable points on the data curves to form a table.

• Modify the point data, if needed, either by moving the points or by editing the table.

• Optionally plot multiple curves on a common grid along the X axis.

• Export selected data as MATLAB data files.

## Open the Graph Importer

MATLAB command prompt: Enter `graphImporter`.

## Examples

expand all

1. Open a manufacturer datasheet PDF. Using the Microsoft® Snipping Tool or a similar app, capture the plot of interest and save it as an image file. The supported file formats are: `bmp`, `gif`, `jpg`, `jpeg`, `png`, `tif`.

2. Open the Graph Importer:

```graphImporter ```

3. Click and select the image file saved in Step 1.

4. Follow the prompts in the Graph Importer Window. First, specify the plot scale by picking the reference points on the X and Y axes and entering corresponding values in the toolstrip fields. You do not have to pick minimum and maximum points. Pick two reference points for each axis, and the tool calibrates the plot based on the values you enter.

Select a point on the X axis. The tool marks the point in green.

In the Graph Importer toolstrip, in the X-axis first point field, enter `0.5`.

5. Repeat the process for the second reference point on the X axis. Then, select two reference points on the Y axis and also enter the values in the toolstrip fields.

6. In this example, you import points from one data line, so keep the Number of data lines value of `1`.

Toggle the button on and select several points on the third line from the bottom, which corresponds to VCE = 10V.

The tool marks the selected points in red and generates a table of the X and Y coordinates for each point.

7. To adjust the point positions, toggle the button off. Drag the second point along the line, to x1 = 3.0000. When you start dragging a point, the corresponding table cells are highlighted in red. You can enter the desired coordinates directly in the table cells.

8. When satisfied with the point positions, click and specify the file name, for example, `IGBT_plot1`. The tool exports the table as a MAT file. You can later use this file for block parameterization.

9. Click the button and save the current state of the Graph Importer tool as a MAT file. To distinguish it from the `IGBT_plot1.mat` file, which contains just the exported table data, name the saved session file `IGBT_plot1_session1.mat`. You can later load a saved session file into Graph Importer and add or modify data points, as shown in the next example.

1. Open the Graph Importer:

```graphImporter ```
2. Click and select the session file, `IGBT_plot1_session1.mat`, saved in the previous example.

The table in the right pane of the Graph Importer Window contains x1 and y1 coordinates of the five data points selected on the VCE = 10V plot line. You are now going to add points from a second line.

3. In the toolstrip, change the Number of data lines value to `2`.

4. In the Select data line drop-down, select `2`.

5. Toggle the button on and select seven points on the fourth line from the bottom, which corresponds to VCE = 12V.

The tool marks the selected points in purple and adds columns x2 and y2 to the table. These columns contain the X and Y coordinates for each point on the second line.

Note that there are seven points on the second line and only five points on the first line, therefore the table contains empty (`NaN`) cells at the bottom of the x1 and y1 columns.

6. To plot both lines on a grid along the X axis, in the Graph Importer toolstrip, click the Data tab.

7. Click the radio button and then click .

The tool interpolates both curves between the minimum and maximum X values, with each curve now having seven points with equidistant positions along the X axis. The data table now contains only three columns: x (common for both curves), y1, and y2.

Note that if you try to adjust the point positions, you can now only move them along the Y axis, because the X value stays the same.

8. The toolstrip fields X-data minimum and X-data maximum display the interpolation range. The Number of ticks field specifies the number of grid points along the X axis. To align the data to the grid on the plot, change the Number of ticks value to `5`.

The tool once more interpolates both curves, with each curve now having five points. The data table contains five rows of data.

9. When satisfied with the data table, click and specify the file name `IGBT_plot2`.

## Programmatic Use

expand all

`graphImporter` opens the Graph Importer tool.

## Version History

Introduced in R2024a