主要内容

Explore and Customize Plots

Displaying Fit and Residual Plots

Within each fit figure, you can display up to three plots simultaneously to examine the fit. Use the toolbar orView菜单要选择要显示的绘图类型:

  • Main Plot显示曲线或表面拟合。

  • Residuals Plotshows the errors between your fit and your data

  • Contour Plot显示表面拟合的轮廓图(不适合曲线拟合)。

The next example shows a main plot with a curve fit and prediction bounds, and the residuals plot.

当您选择时工具>Prediction Bounds,绘制了另外两条曲线(或表面),以显示模型拟合两侧的预测边界。

Choose which bounds to display:没有任何,90%,95%,99%, or风俗。自定义选项打开一个对话框,您可以在其中输入所需的置信度级别。

看also风俗izing the Fit Display

Residuals Plot

在残差图上,您可以查看拟合和数据之间的错误,并且可以删除异常值。看Remove Outliers。This example shows a residuals plot with some excluded outliers.

Viewing Surface Plots and Contour Plots

如果您适合表面,则主图显示了您的表面贴合。单击拖拉旋转或旋转3Dis the default mouse mode for surface plots in the Curve Fitting app. Rotate mode in the Curve Fitting app is the same as旋转3Din MATLAB®figures. You can change the mouse mode for manipulating plots just as for curve plots. See使用Zoom,PAN,数据光标和外部排除

Tip

要返回旋转模式,请关闭任何其他鼠标模式。

如果打开鼠标模式以进行缩放,锅,数据光标或排除离群值,请再次关闭模式以返回旋转模式。例如,第二次单击工具栏按钮中的缩放以清除它并返回旋转模式。

如果表面拟合,请使用轮廓图检查表面的轮廓图。轮廓图不适合曲线。在表面拟合下,轮廓图使观察高度相同的点变得更加容易。一个例子如下。

For polynomial and custom fits, you also can use the工具menu to display prediction bounds. When you display prediction bounds, two additional surfaces are plotted to show the prediction bounds on both sides of your model fit. The previous example shows prediction bounds. You can see three surfaces on the plot. The top and bottom surfaces show the prediction bounds at the specified confidence level on either side of your model fit surface.

You can also switch your surface plot to a 2-D plot if desired. Your plot cursor must be in rotate mode. Clear any other mouse mode if necessary. Then, right-click the plot to selectX-Y,X-Z, orY-Z查看或选择Rotate Options。所有这些上下文菜单选项都是标准MATLAB 3-D图工具。有关更多信息,请参阅Interactively Explore Plotted Data

使用Zoom,PAN,数据光标和外部排除

You can change mouse mode for manipulating plots. Use the toolbar or工具切换到飞涨,Pan,Data Cursor, orExclude Outliersmodes.

曲线拟合应用回忆说your selected mouse mode in each fit figure within a session.

Use the toolbar or工具menu to toggle mouse mode in your plots:

  • 飞涨In,缩小,Pan, 和Data Cursorare standard MATLAB plot tools.

    On surfaces, turn all these modes off to return to旋转3Dmode. For surface plots, rotation is the default mouse mode in the Curve Fitting app. SeeViewing Surface Plots and Contour Plots

  • Data Cursorselects data cursor mode, where you can click points to display input and output values.

  • Exclude Outliers选择离群模式,您可以在其中单击点以删除或包含在适合您的位置。排除离群值是一种鼠标模式,用于以图形方式排除您的拟合数据。看Remove Outliers

风俗izing the Fit Display

To customize your plot display, use the toolbar,工具菜单或Viewmenu. See also在曲线拟合应用中创建多个拟合

工具Menu and Toolbar

  • 传奇toggles display of the legend on all plots in the currently selected fit tab.

  • 网格toggles display of the grid on all plots in the currently selected fit tab.

  • 工具>Prediction Boundslets you choose which bounds to display:没有任何,90%,95%,99%, or风俗。自定义选项打开一个对话框,您可以在其中输入所需的置信度级别。

  • 轴限制opens a dialog box where you can specify upper and lower bounds for the X- and Y-axes of plots. Click重启返回到默认轴限制。

View Menu and Toolbar

Use the View controls to customize the display to show or hide the plots, fit settings, results and table of fits.

  • Available in theView菜单和工具栏:

    • Main Plottoggles the display of the main fit plot in the currently selected fit figure. This item is disabled if only the main plot is displayed.

    • Residuals Plot在当前选择的拟合选项卡中切换残差图的显示。如果仅显示残差图,则该项目将被禁用。

    • Contour Plot在“当前选择的拟合”选项卡中切换轮廓图的显示。如果仅显示轮廓图,则该项目将禁用。

  • View>配合设置toggles the display of the fit controls pane in the currently selected fit tab (Fit name, inputs, fit type, and so on).

  • View>Fit Resultstoggles the display of the结果窗格在当前选择的拟合选项卡中。当您显示结果pane, you can see model terms and coefficients, goodness-of-fit statistics, and information messages about the fit.

  • View>Table of Fitstoggles the display of theTable of Fitspane in the Curve Fitting app.

Tip

如下所示,要查看和比较图的更多空间,请使用Viewmenu to hide or show the配合设置,Fit Results, orTable of Fitspanes.

看alsoDisplaying Multiple Fits Simultaneously

Print toMATLAB数据

在曲线拟合应用中,选择文件>Print to Figure从曲线拟合的结果中产生MATLAB图。Print to Figurecreates a figure containing all plots for the current fit. You can then use the interactive plotting tools to edit the figures showing fitting results for presentation purposes, and export these in different formats.

相关话题