@@ -904,93 +904,95 @@ def plot_recipe(
904904 ax = None ,
905905 return_fig = False ,
906906 ):
907- """Plot the fit recipe data, calculated fit, and difference curve.
907+ """The fit recipe data, calculated fit, and difference curve are
908+ plotted.
908909
909910 If the recipe has multiple contributions, a separate
910911 plot is created for each contribution.
911912
912913 Parameters
913914 ----------
914915 show_observed : bool, optional
915- If True, plot the observed data points . Default is True.
916+ The observed data is plotted if True . Default is True.
916917 show_fit : bool, optional
917- If True, plot the calculated fit curve . Default is True.
918+ The fit to the data is plotted if True . Default is True.
918919 show_diff : bool, optional
919- If True, plot the difference curve (observed - calculated).
920+ The difference curve (observed - calculated) is plotted if True .
920921 Default is True.
921922 offset_scale : float, optional
922- Scaling factor for the difference curve offset. The difference
923+ The scaling factor for the difference curve offset. The difference
923924 curve is offset below the data by
924925 (min_y - 0.1*range) * offset_scale. Default is 1.0.
925926 figsize : tuple, optional
926- Figure size as (width, height) in inches. Default is (8, 6).
927+ The figure size as (width, height) in inches. Default is (8, 6).
927928 data_style : str, optional
928- Matplotlib line/marker style for data points. Default is "o".
929+ The matplotlib line/marker style for data points. Default is "o".
929930 fit_style : str, optional
930- Matplotlib line style for calculated fit. Default is "-".
931+ The matplotlib line style for the calculated fit. Default is "-".
931932 diff_style : str, optional
932- Matplotlib line style for difference curve. Default is "-".
933+ The matplotlib line style for the difference curve. Default is "-".
933934 data_color : str or None, optional
934- Color for data points. If None, uses default matplotlib colors.
935+ The color for data points. If None, uses default matplotlib colors.
935936 fit_color : str or None, optional
936- Color for fit curve. If None, uses default matplotlib colors.
937- diff_color : str or None, optional
938- Color for difference curve. If None, uses default matplotlib
937+ The color for the fit curve. If None, uses default matplotlib
939938 colors.
939+ diff_color : str or None, optional
940+ The color for the difference curve. If None, uses default
941+ matplotlib colors.
940942 data_label : str, optional
941- Legend label for observed data. Default is "Observed".
943+ The legend label for observed data. Default is "Observed".
942944 fit_label : str, optional
943- Legend label for calculated fit. Default is "Calculated".
945+ The legend label for the calculated fit. Default is "Calculated".
944946 diff_label : str, optional
945- Legend label for difference curve. Default is "Difference".
947+ The legend label for the difference curve. Default is "Difference".
946948 xlabel : str, optional
947- Label for x-axis.
949+ The label for the x-axis.
948950 ylabel : str, optional
949- Label for y-axis.
951+ The label for the y-axis.
950952 title : str or None, optional
951- Plot title. Default is no title.
953+ The plot title. Default is no title.
952954 legend : bool, optional
953- If True, show legend . Default is True.
955+ The legend is shown if True . Default is True.
954956 legend_loc : str, optional
955- Legend location. Default is "best".
957+ The legend location. Default is "best".
956958 grid : bool, optional
957- If True, show grid . Default is False.
959+ The grid is shown if True . Default is False.
958960 markersize : float, optional
959- Size of data point markers.
961+ The size of data point markers.
960962 linewidth : float, optional
961- Width of fit and difference lines.
963+ The width of fit and difference lines.
962964 alpha : float, optional
963- Transparency of all plot elements (0=transparent, 1=opaque).
965+ The transparency of all plot elements (0=transparent, 1=opaque).
964966 Default is 1.0.
965967 show : bool, optional
966- If True, display the plot using plt.show(). Default is True.
968+ The plot is displayed using plt.show() if True . Default is True.
967969 ax : matplotlib.axes.Axes or None, optional
968- Axes object to plot on. If None, creates new figure.
970+ The axes object to plot on. If None, creates a new figure.
969971 Default is None.
970972 return_fig : bool, optional
971- If True, return the figure and axes objects. Default is False.
973+ The figure and axes objects are returned if True . Default is False.
972974
973975 Returns
974976 -------
975977 fig, axes : tuple of (mpl.figure.Figure, list of mpl.axes.Axes)
976- Only returned if return_fig=True. Returns the figure object
977- and a list of axes objects (one per contribution) .
978+ The figure object and a list of axes objects (one per contribution)
979+ are returned if return_fig=True .
978980
979981 Examples
980982 --------
981- Plot everything with default settings:
983+ The plot is created with default settings:
982984
983985 >>> recipe.plot_recipe()
984986
985- Plot only data and fit (no difference curve):
987+ The data and fit are plotted (no difference curve):
986988
987989 >>> recipe.plot_recipe(show_diff=False)
988990
989- Plot only data to check before refinement:
991+ The data is plotted to check before refinement:
990992
991993 >>> recipe.plot_recipe(show_fit=False, show_diff=False)
992994
993- Get figure object for further customization:
995+ The figure object is retrieved for further customization:
994996
995997 >>> fig, axes = recipe.plot_recipe(show=False, return_fig=True)
996998 >>> axes[0].set_yscale('log')
0 commit comments