The sittings of every court of this state must be public, and every citizen may freely attend the same, except that on the trial of cases of a scandalous or obscene nature the presiding judge or justice may exclude therefrom all persons not necessarily present as parties or witnesses.
N.D.C.C. § 27-01-02