@@ -0,0 +1,1569 @@
+import sys%0Asys.path.append('../..')%0A%0Afrom SALib import ProblemSpec%0Afrom SALib.test_functions import Ishigami%0A%0Aimport matplotlib.pyplot as plt%0Aimport numpy as np%0A%0A%0A# By convention, we assign to %22sp%22 (for %22SALib Problem%22)%0Asp = ProblemSpec(%7B%0A    'names': %5B'x1', 'x2', 'x3'%5D,   # Name of each parameter%0A    'bounds': %5B%5B-np.pi, np.pi%5D%5D*3,  # bounds of each parameter%0A    'outputs': %5B'Y'%5D               # name of outputs in expected order%0A%7D)%0A%0A(sp.sample_saltelli(1000, calc_second_order=True)%0A    .evaluate(Ishigami.evaluate)%0A    .analyze_sobol())%0A%0A# Display results in table format%0Aprint(sp)%0A%0A# First-order indices expected with Saltelli sampling:%0A# x1: 0.3139%0A# x2: 0.4424%0A# x3: 0.0%0A%0A# Basic plotting of results%0Asp.plot()%0A%0A%0A# More advanced plotting%0A%0A# Plot functions actually return matplotlib axes objects%0A# In the case of the Sobol' method if %60calc_second_order=True%60, there will be %0A# 3 axes (one each for Total, First, and Second order indices)%0Aaxes = sp.plot()%0A%0A# These can be modified as desired.%0A# Here, for example, we set the Y-axis to log scale%0Afor ax in axes:%0A    ax.set_yscale('log')%0A%0Aplt.show()%0A%0A# Other custom layouts can be created in the usual matplotlib style%0A# with the basic bar plotter.%0A%0Afrom SALib.plotting.bar import plot as barplot%0A%0A# Example: Direct control of plot elements%0Afig, (ax1, ax2, ax3) = plt.subplots(3, 1)%0A%0Atotal, first, second = sp.to_df()%0A%0Aax1 = barplot(total, ax=ax1)%0Aax2 = barplot(first, ax=ax2)%0Aax3 = barplot(second, ax=ax3)%0A%0Aax1.set_yscale('log')%0Aax2.set_yscale('log')%0A%0A# Make the plot appear if not in Jupyter notebooks%0Aplt.show()%0A

add initial plotting example