<!DOCTYPE rkplugin>
<document>
	<code file="plot_negbinomial_distribution.php" />
	<help file="plot_negbinomial_distribution.rkh" />
	<logic>
		<insert snippet="common_logic"/>
		<set id="plotoptions.default_pointtype" to="p"/>
	
		<convert id="useprob" mode="equals" sources="param.string" standard="pprob" />
		<connect client="prob.enabled" governor="useprob" />
		<connect client="size_trial.visible" governor="useprob" />
		<connect client="mu.enabled" governor="useprob.not" />
		<connect client="size_disp.visible" governor="useprob.not" />
	</logic>
	<snippets>
		<snippet id="range_options">
			<frame label="Range" >
				<spinbox type="integer" min = "0" id="min" initial="0" label="Lower quantile" />
				<spinbox type="integer" min = "0" id="max" initial="24" label="Upper quantile" />
			</frame>
		</snippet>
		<snippet id="dist_options">
			<frame label="Parameters">
				<spinbox type="integer" id="size_trial" min="1" initial="12" label="Target number of successful trials" />
				<spinbox id="size_disp" min="0.01" initial="12.00" label="Dispersion (Size)"/>
				<row>
					<column>
						<spinbox default_precision="2" type="real" id="prob" initial="0.75" min="0" max="1" label="Probability of success on each trial" />
						<spinbox default_precision="2" type="real" id="mu" initial="4" min="0.01" label="Mean (alternate parameter, mu)" />
					</column>
					<column>
						<radio id="param" label="Type of Parameterization" >
							<option value="pprob" label="Success probability" />
							<option value="pmu" label="Mean (mu)" />
						</radio>
					</column>
				</row>
			</frame>
		</snippet>
		<include file="plot_dist_common_snippets.xml"/>
	</snippets>
	<dialog label="Plot negative binomial probabilities" >
		<insert snippet="dialog_layout"/>
	</dialog>
</document>
