예제 #1
0
        private void buttonSplatter_Click(object sender, EventArgs e)
        {
            var dialog = new AddTo1vsAllDialog();

            dialog.Text = "Show single splatterplot";
            if (listViewDataFiles.SelectedItems.Count > 0)
            {
                var item     = listViewDataFiles.SelectedItems[0];
                var dataFile = m_Files[item];
                dialog.SetDataFile(dataFile, true);
                var res = dialog.ShowDialog(this);
                if (res == System.Windows.Forms.DialogResult.OK)
                {
                    var schema = new DataFileSchema(dataFile);
                    schema.GroupBy = dialog.GroupBy;
                    var list = dataFile.ConvertToDataSeries(schema, -1);

                    SplatterModel model = new SplatterModel(list, dialog.HorizontalDim, dialog.VerticalDim, true);

                    var splatterDialog = new SingleSplatterDialog();
                    splatterDialog.Text = string.Format("Splatterplot ({0}): {1}", SplatterCount++, dataFile.Name);
                    splatterDialog.SetModel(model);
                    splatterDialog.Show();
                    splatterDialog.BringToFront();
                }
            }
        }
예제 #2
0
        public SplamModel(List <DataSeries> datas)
        {
            Series = new List <DataSeries>(datas);
            var colors = ColorConv.pickIsoCols(74.0f, Series.Count, .5f, (float)Math.PI);

            for (int i = 0; i < Series.Count; i++)
            {
                Series[i].Color = colors[i];
            }
            SplatList = new List <SplatterModel>();
            Iindex    = new List <int>();
            Jindex    = new List <int>();
            numDim    = datas.First().ColumnNames.Count;
            dimNames  = datas.First().ColumnNames;


            for (int i = 0; i < numDim - 1; i++)
            {
                for (int j = i + 1; j < numDim; j++)
                {
                    var spm = new SplatterModel(Series, i, j, false);
                    SplatList.Add(spm);

                    Iindex.Add(i);
                    Jindex.Add(j);
                }
            }
        }
예제 #3
0
        public void SetModel(SplatterModel model)
        {
            m_Model = model;
            var list = new List <SplatterView>();

            View.setSplatPM(model);
            list.Add(splatterView1.View);
            sliderController1.SetView(list);
            GridViewSetup();
        }
예제 #4
0
 public void setSplatPM(SplatterModel spm)
 {
     m_ScreenOffsetX = Width / 2;
     m_ScreenOffsetY = Height / 2;
     if (m_Model != null)
     {
         m_Model.ModelChanged -= splatPM_ModelChanged;
     }
     m_Model = spm;
     m_Model.ModelChanged += new EventHandler(splatPM_ModelChanged);
     m_DensityMap.Clear();
     SetGroups();
     setBBox(spm.xmin, spm.ymin, spm.xmax, spm.ymax);
     if (ModelChanged != null)
     {
         ModelChanged(this, EventArgs.Empty);
     }
 }
예제 #5
0
        public OneVsAllModel(List <List <DataSeries> > splats, string dim0, string dim1)
        {
            SplatList  = new List <SplatterModel>();
            Groups     = new List <DataSeries>();
            Others     = new List <DataSeries>();
            OthersName = splats[0][1].Name;

            var colors = ColorConv.pickIsoCols(74.0f, splats.Count, .5f, (float)Math.PI);

            OtherColor = Color.Beige;

            int i = 0;

            foreach (var datas in splats)
            {
                Groups.Add(datas[0]);
                Others.Add(datas[1]);
                datas[0].Color = colors[i];
                datas[1].Color = OtherColor;
                var sm = new SplatterModel(datas, dim0, dim1, false);
                SplatList.Add(sm);
                i++;
            }
        }