def x_frame1D(X,plot_limits=None,resolution=None):
assert X.shape[<NUM_LIT:1>] ==<NUM_LIT:1>, "<STR_LIT>"<EOL>if plot_limits is None:<EOL><INDENT>from ...core.parameterization.variational import VariationalPosterior<EOL>if isinstance(X, VariationalPosterior):<EOL><INDENT>xmin,xmax = X.mean.min(<NUM_LIT:0>),X.mean.max(<NUM_LIT:0>)<EOL><DEDENT>else:<EOL><INDENT>xmin,xmax = X.min(<NUM_LIT:0>),X.max(<NUM_LIT:0>)<EOL><DEDENT>xmin, xmax = xmin-<NUM_LIT>*(xmax-xmin), xmax+<NUM_LIT>*(xmax-xmin)<EOL><DEDENT>elif len(plot_limits)==<NUM_LIT:2>:<EOL><INDENT>xmin, xmax = plot_limits<EOL><DEDENT>else:<EOL><INDENT>raise ValueError("<STR_LIT>")<EOL><DEDENT>Xnew = np.linspace(xmin,xmax,resolution or <NUM_LIT:200>)[:,None]<EOL>return Xnew, xmin, xmax<EOL>
Internal helper function for making plots, returns a set of input values to plot as well as lower and upper limits