gui: Add charts, additional formatting feature to FREQUENCIES dialog.
authorBen Pfaff <blp@cs.stanford.edu>
Sun, 14 Mar 2010 06:08:30 +0000 (22:08 -0800)
committerBen Pfaff <blp@cs.stanford.edu>
Sun, 14 Mar 2010 06:10:52 +0000 (22:10 -0800)
Partial fix for bug #27832 "Wishlist: graphic output in GUI".

src/ui/gui/frequencies-dialog.c
src/ui/gui/frequencies.ui

index 2d5fcbb48d9f23485ab3b093c0bfe80fa273b80c..e812d9a3f1a55b18c4bd6ad53ac1d4adf14982b9 100644 (file)
@@ -1,5 +1,5 @@
 /* PSPPIRE - a graphical user interface for PSPP.
-   Copyright (C) 2007  Free Software Foundation
+   Copyright (C) 2007, 2010  Free Software Foundation
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
@@ -88,23 +88,59 @@ enum frq_order
     FRQ_DCOUNT
   };
 
-struct format_options
+enum frq_table
+  {
+    FRQ_TABLE,
+    FRQ_NOTABLE,
+    FRQ_LIMIT
+  };
+
+struct tables_options
 {
   enum frq_order order;
-  gboolean use_limits;
+  enum frq_table table;
   int limit;
 };
 
+enum frq_scale
+  {
+    FRQ_FREQ,
+    FRQ_PERCENT
+  };
+
+struct charts_options
+  {
+    bool use_min;
+    double min;
+    bool use_max;
+    double max;
+    bool draw_hist;
+    bool draw_normal;
+    enum frq_scale scale;
+    bool draw_pie;
+    bool pie_include_missing;
+  };
+
 struct frequencies_dialog
 {
+  /* Main dialog. */
   GtkTreeView *stat_vars;
   PsppireDict *dict;
 
-  GtkWidget *table_button;
+  GtkWidget *tables_button;
+  GtkWidget *charts_button;
+
+  GtkToggleButton *include_missing;
 
-  GtkWidget *format_dialog;
-  GtkWidget *maximum_cats;
-  GtkWidget *limit_toggle_button;
+  GtkTreeModel *stats;
+
+  /* Frequency Tables dialog. */
+  GtkWidget *tables_dialog;
+  struct tables_options tables_opts;
+
+  GtkToggleButton *always;
+  GtkToggleButton *never;
+  GtkToggleButton *limit;
   GtkSpinButton *limit_spinbutton;
 
   GtkToggleButton  *avalue;
@@ -112,9 +148,23 @@ struct frequencies_dialog
   GtkToggleButton  *afreq;
   GtkToggleButton  *dfreq;
 
-  struct format_options current_opts;
+  /* Charts dialog. */
+  GtkWidget *charts_dialog;
+  struct charts_options charts_opts;
 
-  GtkTreeModel *stats;
+  GtkToggleButton *freqs;
+  GtkToggleButton *percents;
+
+  GtkToggleButton *min;
+  GtkSpinButton *min_spin;
+  GtkToggleButton *max;
+  GtkSpinButton *max_spin;
+
+  GtkToggleButton *hist;
+  GtkToggleButton *normal;
+
+  GtkToggleButton *pie;
+  GtkToggleButton *pie_include_missing;
 };
 
 static void
@@ -132,8 +182,6 @@ refresh (PsppireDialog *dialog, struct frequencies_dialog *fd)
     gtk_list_store_set (GTK_LIST_STORE (fd->stats), &iter,
                        CHECKBOX_COLUMN_SELECTED,
                         (B_FS_DEFAULT & (1u << i)) ? true : false, -1);
-
-  gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (fd->table_button), TRUE);
 }
 
 static char *
@@ -152,7 +200,7 @@ generate_syntax (const struct frequencies_dialog *fd)
 
   g_string_append (string, "\n\t/FORMAT=");
 
-  switch (fd->current_opts.order)
+  switch (fd->tables_opts.order)
     {
     case FRQ_AVALUE:
       g_string_append (string, "AVALUE");
@@ -172,16 +220,17 @@ generate_syntax (const struct frequencies_dialog *fd)
 
   g_string_append (string, " ");
 
-  if ( fd->current_opts.use_limits )
+  switch (fd->tables_opts.table)
     {
-      g_string_append_printf (string, "LIMIT (%d)", fd->current_opts.limit);
-    }
-  else
-    {
-      if ( gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (fd->table_button)))
-       g_string_append (string, "TABLE");
-      else
-       g_string_append (string, "NOTABLE");
+    case FRQ_TABLE:
+      g_string_append (string, "TABLE");
+      break;
+    case FRQ_NOTABLE:
+      g_string_append (string, "NOTABLE");
+      break;
+    case FRQ_LIMIT:
+      g_string_append_printf (string, "LIMIT (%d)", fd->tables_opts.limit);
+      break;
     }
 
 
@@ -221,6 +270,37 @@ generate_syntax (const struct frequencies_dialog *fd)
         }
     }
 
+  if ( gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (fd->include_missing)))
+    g_string_append (string, "\n\t/MISSING=INCLUDE");
+
+  if (fd->charts_opts.draw_hist)
+    {
+      g_string_append (string, "\n\t/HISTOGRAM=");
+      g_string_append (string,
+                       fd->charts_opts.draw_normal ? "NORMAL" : "NONORMAL");
+
+      if (fd->charts_opts.scale == FRQ_PERCENT)
+        g_string_append (string, " PERCENT");
+
+      if (fd->charts_opts.use_min)
+        g_string_append_printf (string, " MIN(%.15g)", fd->charts_opts.min);
+      if (fd->charts_opts.use_max)
+        g_string_append_printf (string, " MAX(%.15g)", fd->charts_opts.max);
+    }
+
+  if (fd->charts_opts.draw_pie)
+    {
+      g_string_append (string, "\n\t/PIECHART=");
+
+      if (fd->charts_opts.pie_include_missing)
+        g_string_append (string, " MISSING");
+
+      if (fd->charts_opts.use_min)
+        g_string_append_printf (string, " MIN(%.15g)", fd->charts_opts.min);
+      if (fd->charts_opts.use_max)
+        g_string_append_printf (string, " MAX(%.15g)", fd->charts_opts.max);
+    }
+
   g_string_append (string, ".\n");
 
   text = string->str;
@@ -245,12 +325,11 @@ dialog_state_valid (gpointer data)
 
 
 static void
-on_format_clicked (struct frequencies_dialog *fd)
+on_tables_clicked (struct frequencies_dialog *fd)
 {
   int ret;
-  g_signal_emit_by_name (fd->limit_toggle_button, "toggled");
 
-  switch (fd->current_opts.order)
+  switch (fd->tables_opts.order)
     {
     case FRQ_AVALUE:
       gtk_toggle_button_set_active (fd->avalue, TRUE);
@@ -259,37 +338,106 @@ on_format_clicked (struct frequencies_dialog *fd)
       gtk_toggle_button_set_active (fd->dvalue, TRUE);
       break;
     case FRQ_ACOUNT:
-      gtk_toggle_button_set_active (fd->dfreq, TRUE);
+      gtk_toggle_button_set_active (fd->afreq, TRUE);
       break;
     case FRQ_DCOUNT:
       gtk_toggle_button_set_active (fd->dfreq, TRUE);
       break;
     };
 
-  gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (fd->limit_toggle_button),
-                               fd->current_opts.use_limits);
-
+  switch (fd->tables_opts.table)
+    {
+    case FRQ_TABLE:
+      gtk_toggle_button_set_active (fd->always, TRUE);
+      break;
+    case FRQ_NOTABLE:
+      gtk_toggle_button_set_active (fd->never, TRUE);
+      break;
+    case FRQ_LIMIT:
+      gtk_toggle_button_set_active (fd->limit, TRUE);
+      break;
+    }
   gtk_spin_button_set_value (fd->limit_spinbutton,
-                            fd->current_opts.limit);
+                            fd->tables_opts.limit);
+  g_signal_emit_by_name (fd->limit, "toggled");
 
-  ret = psppire_dialog_run (PSPPIRE_DIALOG (fd->format_dialog));
+  ret = psppire_dialog_run (PSPPIRE_DIALOG (fd->tables_dialog));
 
   if ( ret == PSPPIRE_RESPONSE_CONTINUE )
     {
       if (gtk_toggle_button_get_active (fd->avalue))
-       fd->current_opts.order = FRQ_AVALUE;
+       fd->tables_opts.order = FRQ_AVALUE;
       else if (gtk_toggle_button_get_active (fd->dvalue))
-       fd->current_opts.order = FRQ_DVALUE;
+       fd->tables_opts.order = FRQ_DVALUE;
       else if (gtk_toggle_button_get_active (fd->afreq))
-       fd->current_opts.order = FRQ_ACOUNT;
+       fd->tables_opts.order = FRQ_ACOUNT;
       else if (gtk_toggle_button_get_active (fd->dfreq))
-       fd->current_opts.order = FRQ_DCOUNT;
+       fd->tables_opts.order = FRQ_DCOUNT;
 
-      fd->current_opts.use_limits = gtk_toggle_button_get_active
-       (GTK_TOGGLE_BUTTON (fd->limit_toggle_button));
+      if (gtk_toggle_button_get_active (fd->always))
+        fd->tables_opts.table = FRQ_TABLE;
+      else if (gtk_toggle_button_get_active (fd->never))
+        fd->tables_opts.table = FRQ_NOTABLE;
+      else
+        fd->tables_opts.table = FRQ_LIMIT;
 
-      fd->current_opts.limit =
-       gtk_spin_button_get_value (fd->limit_spinbutton);
+      fd->tables_opts.limit = gtk_spin_button_get_value (fd->limit_spinbutton);
+    }
+}
+
+static void
+on_charts_clicked (struct frequencies_dialog *fd)
+{
+  int ret;
+
+  gtk_toggle_button_set_active (fd->min, fd->charts_opts.use_min);
+  gtk_spin_button_set_value (fd->min_spin, fd->charts_opts.min);
+  g_signal_emit_by_name (fd->min, "toggled");
+
+  gtk_toggle_button_set_active (fd->max, fd->charts_opts.use_max);
+  gtk_spin_button_set_value (fd->max_spin, fd->charts_opts.max);
+  g_signal_emit_by_name (fd->max, "toggled");
+
+  gtk_toggle_button_set_active (fd->hist, fd->charts_opts.draw_hist);
+  gtk_toggle_button_set_active (fd->normal, fd->charts_opts.draw_normal);
+  g_signal_emit_by_name (fd->hist, "toggled");
+
+  switch (fd->charts_opts.scale)
+    {
+    case FRQ_FREQ:
+      gtk_toggle_button_set_active (fd->freqs, TRUE);
+      break;
+    case FRQ_DVALUE:
+      gtk_toggle_button_set_active (fd->percents, TRUE);
+      break;
+    };
+
+
+  gtk_toggle_button_set_active (fd->pie, fd->charts_opts.draw_pie);
+  gtk_toggle_button_set_active (fd->pie_include_missing,
+                                fd->charts_opts.pie_include_missing);
+  g_signal_emit_by_name (fd->pie, "toggled");
+
+  ret = psppire_dialog_run (PSPPIRE_DIALOG (fd->charts_dialog));
+
+  if ( ret == PSPPIRE_RESPONSE_CONTINUE )
+    {
+      fd->charts_opts.use_min = gtk_toggle_button_get_active (fd->min);
+      fd->charts_opts.min = gtk_spin_button_get_value (fd->min_spin);
+
+      fd->charts_opts.use_max = gtk_toggle_button_get_active (fd->max);
+      fd->charts_opts.max = gtk_spin_button_get_value (fd->max_spin);
+
+      fd->charts_opts.draw_hist = gtk_toggle_button_get_active (fd->hist);
+      fd->charts_opts.draw_normal = gtk_toggle_button_get_active (fd->normal);
+      if (gtk_toggle_button_get_active (fd->freqs))
+       fd->charts_opts.scale = FRQ_FREQ;
+      else if (gtk_toggle_button_get_active (fd->percents))
+       fd->charts_opts.scale = FRQ_PERCENT;
+
+      fd->charts_opts.draw_pie = gtk_toggle_button_get_active (fd->pie);
+      fd->charts_opts.pie_include_missing
+        = gtk_toggle_button_get_active (fd->pie_include_missing);
     }
 }
 
@@ -317,7 +465,8 @@ frequencies_dialog (GObject *o, gpointer data)
   GtkWidget *dialog = get_widget_assert   (xml, "frequencies-dialog");
   GtkWidget *source = get_widget_assert   (xml, "dict-treeview");
   GtkWidget *dest =   get_widget_assert   (xml, "var-treeview");
-  GtkWidget *format_button = get_widget_assert (xml, "button1");
+  GtkWidget *tables_button = get_widget_assert (xml, "tables-button");
+  GtkWidget *charts_button = get_widget_assert (xml, "charts-button");
   GtkWidget *stats_treeview = get_widget_assert (xml, "stats-treeview");
 
   PsppireVarStore *vs = NULL;
@@ -337,40 +486,84 @@ frequencies_dialog (GObject *o, gpointer data)
   g_object_set (source, "model", fd.dict, NULL);
 
   fd.stat_vars = GTK_TREE_VIEW (dest);
-  fd.table_button = get_widget_assert (xml, "checkbutton1");
-  fd.format_dialog = get_widget_assert (xml, "format-dialog");
-  fd.maximum_cats = get_widget_assert (xml, "hbox5");
-  fd.limit_toggle_button = get_widget_assert (xml, "checkbutton2");
-  fd.limit_spinbutton =
-    GTK_SPIN_BUTTON (get_widget_assert (xml, "spinbutton1"));
+  fd.tables_button = get_widget_assert (xml, "tables-button");
+  fd.charts_button = get_widget_assert (xml, "charts-button");
 
-  fd.stats = gtk_tree_view_get_model (GTK_TREE_VIEW (stats_treeview));
-
-  fd.avalue = GTK_TOGGLE_BUTTON (get_widget_assert (xml, "radiobutton1"));
-  fd.dvalue = GTK_TOGGLE_BUTTON (get_widget_assert (xml, "radiobutton2"));
-  fd.afreq  = GTK_TOGGLE_BUTTON (get_widget_assert (xml, "radiobutton3"));
-  fd.dfreq  = GTK_TOGGLE_BUTTON (get_widget_assert (xml, "radiobutton4"));
-
-  fd.current_opts.order = FRQ_AVALUE;
-  fd.current_opts.use_limits = FALSE;
-  fd.current_opts.limit = 50;
+  fd.include_missing = GTK_TOGGLE_BUTTON (
+    get_widget_assert (xml, "include_missing"));
 
+  fd.stats = gtk_tree_view_get_model (GTK_TREE_VIEW (stats_treeview));
 
-  gtk_window_set_transient_for (GTK_WINDOW (fd.format_dialog), GTK_WINDOW (de));
-
+  /* Frequency Tables dialog. */
+  fd.tables_dialog = get_widget_assert (xml, "tables-dialog");
+  fd.tables_opts.order = FRQ_AVALUE;
+  fd.tables_opts.table = FRQ_TABLE;
+  fd.tables_opts.limit = 50;
 
+  fd.always = GTK_TOGGLE_BUTTON (get_widget_assert (xml, "always"));
+  fd.never = GTK_TOGGLE_BUTTON (get_widget_assert (xml, "never"));
+  fd.limit  = GTK_TOGGLE_BUTTON (get_widget_assert (xml, "limit"));
+  fd.limit_spinbutton =
+    GTK_SPIN_BUTTON (get_widget_assert (xml, "limit-spin"));
+  g_signal_connect (fd.limit, "toggled",
+                   G_CALLBACK (sensitive_if_active), fd.limit_spinbutton);
+
+  fd.avalue = GTK_TOGGLE_BUTTON (get_widget_assert (xml, "avalue"));
+  fd.dvalue = GTK_TOGGLE_BUTTON (get_widget_assert (xml, "dvalue"));
+  fd.afreq  = GTK_TOGGLE_BUTTON (get_widget_assert (xml, "afreq"));
+  fd.dfreq  = GTK_TOGGLE_BUTTON (get_widget_assert (xml, "dfreq"));
+
+  gtk_window_set_transient_for (GTK_WINDOW (fd.tables_dialog),
+                                GTK_WINDOW (de));
+
+  /* Charts dialog. */
+  fd.charts_dialog = get_widget_assert (xml, "charts-dialog");
+  fd.charts_opts.use_min = false;
+  fd.charts_opts.min = 0;
+  fd.charts_opts.use_max = false;
+  fd.charts_opts.max = 100;
+  fd.charts_opts.draw_hist = false;
+  fd.charts_opts.draw_normal = false;
+  fd.charts_opts.scale = FRQ_FREQ;
+  fd.charts_opts.draw_pie = false;
+  fd.charts_opts.pie_include_missing = false;
+
+  fd.freqs = GTK_TOGGLE_BUTTON (get_widget_assert (xml, "freqs"));
+  fd.percents = GTK_TOGGLE_BUTTON (get_widget_assert (xml, "percents"));
+
+  fd.min = GTK_TOGGLE_BUTTON (get_widget_assert (xml, "min"));
+  fd.min_spin = GTK_SPIN_BUTTON (get_widget_assert (xml, "min-spin"));
+  g_signal_connect (fd.min, "toggled",
+                   G_CALLBACK (sensitive_if_active), fd.min_spin);
+  fd.max = GTK_TOGGLE_BUTTON (get_widget_assert (xml, "max"));
+  fd.max_spin = GTK_SPIN_BUTTON (get_widget_assert (xml, "max-spin"));
+  g_signal_connect (fd.max, "toggled",
+                   G_CALLBACK (sensitive_if_active), fd.max_spin);
+
+  fd.hist = GTK_TOGGLE_BUTTON (get_widget_assert (xml, "hist"));
+  fd.normal = GTK_TOGGLE_BUTTON (get_widget_assert (xml, "normal"));
+  g_signal_connect (fd.hist, "toggled",
+                   G_CALLBACK (sensitive_if_active), fd.normal);
+
+  fd.pie = GTK_TOGGLE_BUTTON (get_widget_assert (xml, "pie"));
+  fd.pie_include_missing = GTK_TOGGLE_BUTTON (
+    get_widget_assert (xml, "pie-include-missing"));
+  g_signal_connect (fd.pie, "toggled",
+                   G_CALLBACK (sensitive_if_active), fd.pie_include_missing);
+
+  gtk_window_set_transient_for (GTK_WINDOW (fd.charts_dialog),
+                                GTK_WINDOW (de));
+
+  /* Main dialog. */
   g_signal_connect (dialog, "refresh", G_CALLBACK (refresh),  &fd);
 
   psppire_dialog_set_valid_predicate (PSPPIRE_DIALOG (dialog),
                                      dialog_state_valid, &fd);
 
-
-  g_signal_connect_swapped (format_button, "clicked",
-                           G_CALLBACK (on_format_clicked),  &fd);
-
-  g_signal_connect (fd.limit_toggle_button, "toggled",
-                   G_CALLBACK (sensitive_if_active), fd.maximum_cats);
-
+  g_signal_connect_swapped (tables_button, "clicked",
+                           G_CALLBACK (on_tables_clicked),  &fd);
+  g_signal_connect_swapped (charts_button, "clicked",
+                           G_CALLBACK (on_charts_clicked),  &fd);
 
   response = psppire_dialog_run (PSPPIRE_DIALOG (dialog));
 
index e312eabe677d8a4efd4ce5fe2276f7777a2179ba..55cfd7a624ba075ff54de8eaaef2bf1772623b52 100644 (file)
@@ -1,8 +1,9 @@
 <?xml version="1.0"?>
 <interface>
-  <requires lib="psppire" version="2054.22072"/>
   <!-- interface-requires gtk+ 2.12 -->
+  <requires lib="psppire" version="2054.22072"/>
   <!-- interface-naming-policy project-wide -->
+  <object class="GtkListStore" id="liststore1"/>
   <object class="PsppireDialog" id="frequencies-dialog">
     <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
     <property name="title">Frequencies</property>
@@ -18,7 +19,7 @@
             <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
             <property name="orientation">vertical</property>
             <child>
-              <object class="GtkHBox" id="hbox1">
+              <object class="GtkHBox" id="hbox2">
                 <property name="visible">True</property>
                 <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
                 <child>
@@ -43,7 +44,7 @@
                   </packing>
                 </child>
                 <child>
-                  <object class="GtkAlignment" id="alignment2">
+                  <object class="GtkAlignment" id="alignment1">
                     <property name="visible">True</property>
                     <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
                     <property name="yalign">0.05000000074505806</property>
@@ -56,8 +57,8 @@
                         <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
                         <property name="no_show_all">True</property>
                         <property name="border_width">5</property>
-                        <property name="source_widget">dict-treeview</property>
-                        <property name="dest_widget">var-treeview</property>
+                       <property name="source_widget">dict-treeview</property>
+                       <property name="dest_widget">var-treeview</property>
                       </object>
                     </child>
                   </object>
@@ -68,7 +69,7 @@
                   </packing>
                 </child>
                 <child>
-                  <object class="GtkVBox" id="vbox3">
+                  <object class="GtkVBox" id="vbox2">
                     <property name="visible">True</property>
                     <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
                     <property name="orientation">vertical</property>
                           <object class="GtkScrolledWindow" id="scrolledwindow2">
                             <property name="visible">True</property>
                             <property name="can_focus">True</property>
-                            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                            <property name="hscrollbar_policy">never</property>
+                            <property name="hscrollbar_policy">automatic</property>
                             <property name="vscrollbar_policy">automatic</property>
-                            <property name="shadow_type">etched-in</property>
                             <child>
                               <object class="PsppireVarView" id="var-treeview">
                                 <property name="visible">True</property>
@@ -97,7 +96,7 @@
                           </object>
                         </child>
                         <child type="label">
-                          <object class="GtkLabel" id="label3">
+                          <object class="GtkLabel" id="label1">
                             <property name="visible">True</property>
                             <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
                             <property name="label" translatable="yes">Variable(s):</property>
                         <property name="position">1</property>
                       </packing>
                     </child>
+                    <child>
+                      <object class="GtkCheckButton" id="include_missing">
+                        <property name="label" translatable="yes">Include missing values</property>
+                        <property name="visible">True</property>
+                        <property name="can_focus">True</property>
+                        <property name="receives_default">False</property>
+                        <property name="draw_indicator">True</property>
+                      </object>
+                      <packing>
+                        <property name="expand">False</property>
+                        <property name="fill">False</property>
+                        <property name="position">2</property>
+                      </packing>
+                    </child>
                   </object>
                   <packing>
                     <property name="expand">False</property>
                 <property name="visible">True</property>
                 <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
                 <child>
-                  <object class="GtkCheckButton" id="checkbutton1">
-                    <property name="label" translatable="yes">Display Frequency Table</property>
-                    <property name="visible">True</property>
-                    <property name="can_focus">True</property>
-                    <property name="receives_default">False</property>
-                    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                    <property name="draw_indicator">True</property>
-                  </object>
-                  <packing>
-                    <property name="position">0</property>
-                  </packing>
-                </child>
-                <child>
-                  <object class="GtkHBox" id="hbox2">
+                  <object class="GtkHBox" id="hbox4">
                     <property name="visible">True</property>
                     <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
                     <property name="spacing">5</property>
                     <property name="homogeneous">True</property>
                     <child>
-                      <object class="GtkButton" id="button1">
-                        <property name="label" translatable="yes">Format...</property>
+                      <placeholder/>
+                    </child>
+                    <child>
+                      <object class="GtkButton" id="charts-button">
+                        <property name="label" translatable="yes">Charts...</property>
                         <property name="visible">True</property>
                         <property name="can_focus">True</property>
                         <property name="receives_default">True</property>
                         <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
                       </object>
                       <packing>
-                        <property name="position">0</property>
+                        <property name="position">1</property>
                       </packing>
                     </child>
                     <child>
-                      <placeholder/>
-                    </child>
-                    <child>
-                      <placeholder/>
+                      <object class="GtkButton" id="tables-button">
+                        <property name="label" translatable="yes">Frequency Tables...</property>
+                        <property name="visible">True</property>
+                        <property name="can_focus">True</property>
+                        <property name="receives_default">True</property>
+                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                      </object>
+                      <packing>
+                        <property name="position">2</property>
+                      </packing>
                     </child>
                   </object>
                   <packing>
       </object>
     </child>
   </object>
-  <object class="PsppireDialog" id="format-dialog">
+  <object class="PsppireDialog" id="tables-dialog">
     <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-    <property name="title">Frequencies: Format</property>
+    <property name="title">Frequencies: Frequency Tables</property>
     <property name="modal">True</property>
     <child internal-child="hbox">
-      <object class="GtkHBox" id="dialog-hbox2">
+      <object class="GtkHBox" id="dialog-hbox6">
         <property name="visible">True</property>
         <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
         <property name="spacing">2</property>
         <child>
-          <object class="GtkHBox" id="hbox4">
+          <object class="GtkVBox" id="vbox3">
             <property name="visible">True</property>
             <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-            <property name="spacing">5</property>
+            <property name="orientation">vertical</property>
             <child>
-              <object class="GtkFrame" id="frame1">
+              <object class="GtkFrame" id="frame5">
                 <property name="visible">True</property>
                 <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
                 <property name="label_xalign">0</property>
                 <child>
-                  <object class="GtkAlignment" id="alignment1">
+                  <object class="GtkAlignment" id="alignment2">
                     <property name="visible">True</property>
                     <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
                     <property name="left_padding">12</property>
                     <child>
-                      <object class="GtkVButtonBox" id="vbuttonbox1">
+                      <object class="GtkVButtonBox" id="vbuttonbox2">
                         <property name="visible">True</property>
                         <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                        <property name="orientation">vertical</property>
                         <property name="homogeneous">True</property>
                         <child>
-                          <object class="GtkRadioButton" id="radiobutton1">
-                            <property name="label" translatable="yes">Ascending Order</property>
+                          <object class="GtkRadioButton" id="always">
+                            <property name="label" translatable="yes">Always</property>
                             <property name="visible">True</property>
                             <property name="can_focus">True</property>
                             <property name="receives_default">False</property>
                           </packing>
                         </child>
                         <child>
-                          <object class="GtkRadioButton" id="radiobutton2">
-                            <property name="label" translatable="yes">Descending Order</property>
+                          <object class="GtkRadioButton" id="never">
+                            <property name="label" translatable="yes">Never</property>
                             <property name="visible">True</property>
                             <property name="can_focus">True</property>
                             <property name="receives_default">False</property>
                             <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                            <property name="active">True</property>
                             <property name="draw_indicator">True</property>
-                            <property name="group">radiobutton1</property>
+                            <property name="group">always</property>
                           </object>
                           <packing>
                             <property name="expand">False</property>
                           </packing>
                         </child>
                         <child>
-                          <object class="GtkRadioButton" id="radiobutton3">
-                            <property name="label" translatable="yes">Ascending Counts</property>
+                          <object class="GtkHBox" id="hbox5">
+                            <property name="visible">True</property>
+                            <child>
+                              <object class="GtkRadioButton" id="limit">
+                                <property name="label" translatable="yes">If no more than </property>
+                                <property name="visible">True</property>
+                                <property name="can_focus">True</property>
+                                <property name="receives_default">False</property>
+                                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                                <property name="draw_indicator">True</property>
+                                <property name="group">always</property>
+                              </object>
+                              <packing>
+                                <property name="expand">False</property>
+                                <property name="fill">False</property>
+                                <property name="position">0</property>
+                              </packing>
+                            </child>
+                            <child>
+                              <object class="GtkSpinButton" id="limit-spin">
+                                <property name="visible">True</property>
+                                <property name="can_focus">True</property>
+                                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK | GDK_KEY_PRESS_MASK | GDK_KEY_RELEASE_MASK | GDK_ENTER_NOTIFY_MASK | GDK_STRUCTURE_MASK | GDK_SUBSTRUCTURE_MASK</property>
+                                <property name="invisible_char">&#x25CF;</property>
+                                <property name="adjustment">adjustment1</property>
+                                <property name="numeric">True</property>
+                                <property name="update_policy">if-valid</property>
+                              </object>
+                              <packing>
+                                <property name="position">1</property>
+                              </packing>
+                            </child>
+                            <child>
+                              <object class="GtkLabel" id="label4">
+                                <property name="visible">True</property>
+                                <property name="label" translatable="yes">values</property>
+                              </object>
+                              <packing>
+                                <property name="position">2</property>
+                              </packing>
+                            </child>
+                          </object>
+                          <packing>
+                            <property name="expand">False</property>
+                            <property name="fill">False</property>
+                            <property name="position">2</property>
+                          </packing>
+                        </child>
+                      </object>
+                    </child>
+                  </object>
+                </child>
+                <child type="label">
+                  <object class="GtkLabel" id="label5">
+                    <property name="visible">True</property>
+                    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                    <property name="label" translatable="yes">Display frequency tables</property>
+                    <property name="use_markup">True</property>
+                  </object>
+                </child>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="position">0</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkFrame" id="frame7">
+                <property name="visible">True</property>
+                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                <property name="label_xalign">0</property>
+                <child>
+                  <object class="GtkAlignment" id="alignment3">
+                    <property name="visible">True</property>
+                    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                    <property name="left_padding">12</property>
+                    <child>
+                      <object class="GtkVButtonBox" id="vbuttonbox1">
+                        <property name="visible">True</property>
+                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                        <property name="orientation">vertical</property>
+                        <property name="homogeneous">True</property>
+                        <child>
+                          <object class="GtkRadioButton" id="avalue">
+                            <property name="label" translatable="yes">Ascending value</property>
                             <property name="visible">True</property>
                             <property name="can_focus">True</property>
                             <property name="receives_default">False</property>
                             <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
                             <property name="active">True</property>
                             <property name="draw_indicator">True</property>
-                            <property name="group">radiobutton1</property>
+                          </object>
+                          <packing>
+                            <property name="expand">False</property>
+                            <property name="fill">False</property>
+                            <property name="position">0</property>
+                          </packing>
+                        </child>
+                        <child>
+                          <object class="GtkRadioButton" id="dvalue">
+                            <property name="label" translatable="yes">Descending value</property>
+                            <property name="visible">True</property>
+                            <property name="can_focus">True</property>
+                            <property name="receives_default">False</property>
+                            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                            <property name="draw_indicator">True</property>
+                            <property name="group">avalue</property>
+                          </object>
+                          <packing>
+                            <property name="expand">False</property>
+                            <property name="fill">False</property>
+                            <property name="position">1</property>
+                          </packing>
+                        </child>
+                        <child>
+                          <object class="GtkRadioButton" id="afreq">
+                            <property name="label" translatable="yes">Ascending frequency</property>
+                            <property name="visible">True</property>
+                            <property name="can_focus">True</property>
+                            <property name="receives_default">False</property>
+                            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                            <property name="draw_indicator">True</property>
+                            <property name="group">avalue</property>
                           </object>
                           <packing>
                             <property name="expand">False</property>
                           </packing>
                         </child>
                         <child>
-                          <object class="GtkRadioButton" id="radiobutton4">
-                            <property name="label" translatable="yes">Descending Counts</property>
+                          <object class="GtkRadioButton" id="dfreq">
+                            <property name="label" translatable="yes">Descending frequency</property>
                             <property name="visible">True</property>
                             <property name="can_focus">True</property>
                             <property name="receives_default">False</property>
                             <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                            <property name="active">True</property>
                             <property name="draw_indicator">True</property>
-                            <property name="group">radiobutton1</property>
+                            <property name="group">avalue</property>
                           </object>
                           <packing>
                             <property name="expand">False</property>
                   </object>
                 </child>
                 <child type="label">
-                  <object class="GtkLabel" id="label1">
+                  <object class="GtkLabel" id="label6">
                     <property name="visible">True</property>
                     <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
                     <property name="label" translatable="yes">Order by</property>
                 </child>
               </object>
               <packing>
-                <property name="position">0</property>
+                <property name="expand">False</property>
+                <property name="position">1</property>
               </packing>
             </child>
+          </object>
+          <packing>
+            <property name="expand">False</property>
+            <property name="position">0</property>
+          </packing>
+        </child>
+        <child>
+          <object class="PsppireVButtonBox" id="psppire-vbuttonbox2">
+            <property name="visible">True</property>
+            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+            <property name="border_width">5</property>
+            <property name="buttons">PSPPIRE_BUTTON_CONTINUE_MASK | PSPPIRE_BUTTON_CANCEL_MASK | PSPPIRE_BUTTON_HELP_MASK</property>
+          </object>
+          <packing>
+            <property name="expand">False</property>
+            <property name="fill">False</property>
+            <property name="pack_type">end</property>
+            <property name="position">1</property>
+          </packing>
+        </child>
+      </object>
+    </child>
+  </object>
+  <object class="GtkAdjustment" id="adjustment1">
+    <property name="value">100</property>
+    <property name="lower">1</property>
+    <property name="upper">65536</property>
+    <property name="step_increment">1</property>
+    <property name="page_increment">10</property>
+  </object>
+  <object class="PsppireDialog" id="charts-dialog">
+    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+    <property name="title">Frequencies: Charts</property>
+    <property name="modal">True</property>
+    <child internal-child="hbox">
+      <object class="GtkHBox" id="dialog-hbox5">
+        <property name="visible">True</property>
+        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+        <child>
+          <object class="GtkVBox" id="vbox4">
+            <property name="visible">True</property>
+            <property name="orientation">vertical</property>
             <child>
-              <object class="GtkAlignment" id="alignment3">
+              <object class="GtkFrame" id="frame6">
                 <property name="visible">True</property>
-                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                <property name="yalign">0</property>
-                <property name="yscale">0</property>
-                <property name="top_padding">5</property>
+                <property name="label_xalign">0</property>
+                <property name="shadow_type">none</property>
                 <child>
-                  <object class="GtkVBox" id="vbox2">
+                  <object class="GtkAlignment" id="alignment4">
                     <property name="visible">True</property>
-                    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                    <property name="orientation">vertical</property>
+                    <property name="left_padding">12</property>
                     <child>
-                      <object class="GtkCheckButton" id="checkbutton2">
+                      <object class="GtkVBox" id="vbox5">
                         <property name="visible">True</property>
-                        <property name="can_focus">True</property>
-                        <property name="receives_default">False</property>
-                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                        <property name="draw_indicator">True</property>
+                        <property name="orientation">vertical</property>
                         <child>
-                          <object class="GtkLabel" id="label4">
-                            <property name="width_request">180</property>
+                          <object class="GtkHBox" id="hbox7">
                             <property name="visible">True</property>
-                            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                            <property name="label" translatable="yes">Suppress tables with more than N categories</property>
-                            <property name="wrap">True</property>
+                            <child>
+                              <object class="GtkCheckButton" id="min">
+                                <property name="label" translatable="yes">Exclude values below </property>
+                                <property name="visible">True</property>
+                                <property name="can_focus">True</property>
+                                <property name="receives_default">False</property>
+                                <property name="draw_indicator">True</property>
+                              </object>
+                              <packing>
+                                <property name="expand">False</property>
+                                <property name="fill">False</property>
+                                <property name="position">0</property>
+                              </packing>
+                            </child>
+                            <child>
+                              <object class="GtkSpinButton" id="min-spin">
+                                <property name="visible">True</property>
+                                <property name="can_focus">True</property>
+                                <property name="invisible_char">&#x25CF;</property>
+                                <property name="adjustment">adjustment2</property>
+                              </object>
+                              <packing>
+                                <property name="expand">False</property>
+                                <property name="fill">False</property>
+                                <property name="position">1</property>
+                              </packing>
+                            </child>
                           </object>
+                          <packing>
+                            <property name="position">0</property>
+                          </packing>
+                        </child>
+                        <child>
+                          <object class="GtkHBox" id="hbox8">
+                            <property name="visible">True</property>
+                            <child>
+                              <object class="GtkCheckButton" id="max">
+                                <property name="label" translatable="yes">Exclude values above </property>
+                                <property name="visible">True</property>
+                                <property name="can_focus">True</property>
+                                <property name="receives_default">False</property>
+                                <property name="draw_indicator">True</property>
+                              </object>
+                              <packing>
+                                <property name="expand">False</property>
+                                <property name="fill">False</property>
+                                <property name="position">0</property>
+                              </packing>
+                            </child>
+                            <child>
+                              <object class="GtkSpinButton" id="max-spin">
+                                <property name="visible">True</property>
+                                <property name="can_focus">True</property>
+                                <property name="invisible_char">&#x25CF;</property>
+                                <property name="adjustment">adjustment3</property>
+                              </object>
+                              <packing>
+                                <property name="expand">False</property>
+                                <property name="fill">False</property>
+                                <property name="position">1</property>
+                              </packing>
+                            </child>
+                          </object>
+                          <packing>
+                            <property name="expand">False</property>
+                            <property name="position">1</property>
+                          </packing>
                         </child>
                       </object>
-                      <packing>
-                        <property name="position">0</property>
-                      </packing>
                     </child>
+                  </object>
+                </child>
+                <child type="label">
+                  <object class="GtkLabel" id="label9">
+                    <property name="visible">True</property>
+                    <property name="label" translatable="yes">&lt;b&gt;Chart Formatting&lt;/b&gt;</property>
+                    <property name="use_markup">True</property>
+                  </object>
+                </child>
+              </object>
+              <packing>
+                <property name="position">0</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkFrame" id="frame8">
+                <property name="visible">True</property>
+                <property name="label_xalign">0</property>
+                <property name="shadow_type">none</property>
+                <child>
+                  <object class="GtkAlignment" id="alignment5">
+                    <property name="visible">True</property>
+                    <property name="left_padding">12</property>
                     <child>
-                      <object class="GtkHBox" id="hbox5">
+                      <object class="GtkVBox" id="vbox6">
                         <property name="visible">True</property>
-                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                        <property name="orientation">vertical</property>
                         <child>
-                          <object class="GtkLabel" id="label5">
-                            <property name="width_request">120</property>
+                          <object class="GtkCheckButton" id="hist">
+                            <property name="label" translatable="yes">Draw histograms</property>
                             <property name="visible">True</property>
-                            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                            <property name="xalign">0</property>
-                            <property name="label" translatable="yes">Maximum no of categories</property>
-                            <property name="wrap">True</property>
-                            <property name="wrap_mode">word-char</property>
+                            <property name="can_focus">True</property>
+                            <property name="receives_default">False</property>
+                            <property name="draw_indicator">True</property>
                           </object>
                           <packing>
-                            <property name="expand">False</property>
-                            <property name="fill">False</property>
                             <property name="position">0</property>
                           </packing>
                         </child>
                         <child>
-                          <object class="GtkSpinButton" id="spinbutton1">
+                          <object class="GtkCheckButton" id="normal">
+                            <property name="label" translatable="yes">Superimpose normal curve</property>
                             <property name="visible">True</property>
                             <property name="can_focus">True</property>
-                            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                            <property name="adjustment">adjustment1</property>
-                            <property name="numeric">True</property>
-                            <property name="update_policy">if-valid</property>
+                            <property name="receives_default">False</property>
+                            <property name="draw_indicator">True</property>
                           </object>
                           <packing>
-                            <property name="expand">False</property>
-                            <property name="fill">False</property>
                             <property name="position">1</property>
                           </packing>
                         </child>
+                        <child>
+                          <object class="GtkHBox" id="hbox6">
+                            <property name="visible">True</property>
+                            <child>
+                              <object class="GtkLabel" id="label7">
+                                <property name="visible">True</property>
+                                <property name="label" translatable="yes">Scale:</property>
+                              </object>
+                              <packing>
+                                <property name="position">0</property>
+                              </packing>
+                            </child>
+                            <child>
+                              <object class="GtkRadioButton" id="freqs">
+                                <property name="label" translatable="yes">Frequencies</property>
+                                <property name="visible">True</property>
+                                <property name="can_focus">True</property>
+                                <property name="receives_default">False</property>
+                                <property name="active">True</property>
+                                <property name="draw_indicator">True</property>
+                              </object>
+                              <packing>
+                                <property name="position">1</property>
+                              </packing>
+                            </child>
+                            <child>
+                              <object class="GtkRadioButton" id="percents">
+                                <property name="label" translatable="yes">Percentages</property>
+                                <property name="visible">True</property>
+                                <property name="can_focus">True</property>
+                                <property name="receives_default">False</property>
+                                <property name="draw_indicator">True</property>
+                                <property name="group">freqs</property>
+                              </object>
+                              <packing>
+                                <property name="position">2</property>
+                              </packing>
+                            </child>
+                          </object>
+                          <packing>
+                            <property name="position">2</property>
+                          </packing>
+                        </child>
                       </object>
-                      <packing>
-                        <property name="padding">5</property>
-                        <property name="position">1</property>
-                      </packing>
                     </child>
                   </object>
                 </child>
+                <child type="label">
+                  <object class="GtkLabel" id="label10">
+                    <property name="visible">True</property>
+                    <property name="label" translatable="yes">&lt;b&gt;Histograms&lt;/b&gt;</property>
+                    <property name="use_markup">True</property>
+                  </object>
+                </child>
               </object>
               <packing>
-                <property name="expand">False</property>
-                <property name="padding">5</property>
                 <property name="position">1</property>
               </packing>
             </child>
+            <child>
+              <object class="GtkFrame" id="frame4">
+                <property name="visible">True</property>
+                <property name="label_xalign">0</property>
+                <property name="shadow_type">none</property>
+                <child>
+                  <object class="GtkAlignment" id="alignment6">
+                    <property name="visible">True</property>
+                    <property name="left_padding">12</property>
+                    <child>
+                      <object class="GtkVBox" id="vbox7">
+                        <property name="visible">True</property>
+                        <property name="orientation">vertical</property>
+                        <child>
+                          <object class="GtkCheckButton" id="pie">
+                            <property name="label" translatable="yes">Draw pie charts</property>
+                            <property name="visible">True</property>
+                            <property name="can_focus">True</property>
+                            <property name="receives_default">False</property>
+                            <property name="draw_indicator">True</property>
+                          </object>
+                          <packing>
+                            <property name="position">0</property>
+                          </packing>
+                        </child>
+                        <child>
+                          <object class="GtkCheckButton" id="pie-include-missing">
+                            <property name="label" translatable="yes">Include slices for missing values</property>
+                            <property name="visible">True</property>
+                            <property name="can_focus">True</property>
+                            <property name="receives_default">False</property>
+                            <property name="draw_indicator">True</property>
+                          </object>
+                          <packing>
+                            <property name="position">1</property>
+                          </packing>
+                        </child>
+                      </object>
+                    </child>
+                  </object>
+                </child>
+                <child type="label">
+                  <object class="GtkLabel" id="label11">
+                    <property name="visible">True</property>
+                    <property name="label" translatable="yes">&lt;b&gt;Pie Charts&lt;/b&gt;</property>
+                    <property name="use_markup">True</property>
+                  </object>
+                </child>
+              </object>
+              <packing>
+                <property name="position">2</property>
+              </packing>
+            </child>
           </object>
           <packing>
             <property name="position">0</property>
           </packing>
         </child>
         <child>
-          <object class="PsppireVButtonBox" id="psppire-vbuttonbox2">
+          <object class="PsppireVButtonBox" id="psppire-vbuttonbox3">
             <property name="visible">True</property>
             <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
             <property name="border_width">5</property>
       </object>
     </child>
   </object>
-  <object class="GtkAdjustment" id="adjustment1">
+  <object class="GtkAdjustment" id="adjustment2">
+    <property name="lower">-10000000000</property>
+    <property name="upper">10000000000</property>
+    <property name="step_increment">1</property>
+    <property name="page_increment">10</property>
+  </object>
+  <object class="GtkAdjustment" id="adjustment3">
     <property name="value">100</property>
-    <property name="lower">1</property>
-    <property name="upper">65536</property>
+    <property name="lower">-10000000000</property>
+    <property name="upper">10000000000</property>
     <property name="step_increment">1</property>
     <property name="page_increment">10</property>
-    <property name="page_size">0</property>
   </object>
 </interface>