You can create a bar groups figure with positive and negative values on the y-axis and set the ylim using MATLAB. Here's an example code:
main.m145 chars10 lines
In this example, the data matrix represents the bar heights for each group. Positive values will be plotted above the x-axis, and negative values below the x-axis. The ylim function is used to define the y-axis limits, from -1e3 to 15.
You can modify the data matrix to fit your specific data, and adjust the y-axis limits (ylim) to suit your desired range.
gistlibby LogSnag