bendichter / brokenaxes

Create matplotlib plots with broken axes
MIT License
517 stars 45 forks source link

Group view error in Radis #121

Open Abhay-becks opened 1 month ago

Abhay-becks commented 1 month ago

AttributeError Traceback (most recent call last) Cell In[10], line 49 40 fit_properties = { 41 "method": "least_squares", # Preferred fitting method from the 17 confirmed methods of LMFIT stated in week 4 blog. By default, "leastsq". 42 "fit_var": "transmittance", # Spectral quantity to be extracted for fitting process, such as "radiance", "absorbance", etc. (...) 45 "tol": 1e-15, # Fitting tolerance, only applicable for "lbfgsb" method. 46 } 48 # Conduct the fitting process! ---> 49 s_best, result, log = fit_spectrum( 50 s_exp=s_experimental, # Experimental spectrum. 51 fit_params=fit_parameters, # Fit parameters. 52
53 model=experimental_conditions, # Experimental ground-truths conditions. 54 pipeline=fit_properties, # Fitting pipeline references. 55 fit_kws={"gtol": 1e-12}, 56 ) 58 # Now investigate the result logs for additional information about what's going on during the fitting process 60 print("\nResidual history: \n")

File ~\AppData\Local\anaconda3\envs\radis_env\lib\site-packages\radis\tools\new_fitting.py:935, in fit_spectrum(s_exp, fit_params, model, pipeline, bounds, input_file, verbose, show_plot, fit_kws) 931 # PLOT THE DIFFERENCE BETWEEN THE TWO 932 933 # If show_plot = True by default, show the diff plot 934 if show_plot: --> 935 plot_diff( 936 s_data, 937 s_result, 938 fit_var, 939 method=["diff", "ratio"], 940 show=True, 941 ) 943 if verbose: 944 print( 945 "\n======================== END OF FITTING PROCESS ========================\n" 946 )

File ~\AppData\Local\anaconda3\envs\radis_env\lib\site-packages\radis\spectrum\compare.py:869, in plot_diff(s1, s2, var, wunit, Iunit, resample, method, diff_window, show_points, label1, label2, figsize, title, nfig, normalize, yscale, verbose, save, show, show_residual, lw_multiplier, diff_scale_multiplier, discard_centile, plot_medium, legendargs, show_ruler) 867 for i in range(len(methods)): 868 ax1i = fig.add_subplot(gs[i + 1]) --> 869 ax1i.get_shared_x_axes().join(ax0, ax1i) 870 ax1i.ticklabel_format(useOffset=False) 871 ax1.append(ax1i)

AttributeError: 'GrouperView' object has no attribute 'join'

Could someone help me with this error. I am stuck at this point

bendichter commented 1 week ago

Could you please share code to reproduce this error?