diff --git a/Assets/_UDVT/Scripts/Runtime/Helper/Helper.cs b/Assets/_UDVT/Scripts/Runtime/Helper/Helper.cs index bea9154..3dbc072 100644 --- a/Assets/_UDVT/Scripts/Runtime/Helper/Helper.cs +++ b/Assets/_UDVT/Scripts/Runtime/Helper/Helper.cs @@ -5,6 +5,9 @@ using UnityEngine.SceneManagement; using System.Linq; +/// +/// It contains the common methods used in the project. +/// public class Helper : MonoBehaviour { public static bool FileValidation() diff --git a/Assets/_UDVT/Scripts/Runtime/MainScript.cs b/Assets/_UDVT/Scripts/Runtime/MainScript.cs index f0d4cdf..789dbe0 100644 --- a/Assets/_UDVT/Scripts/Runtime/MainScript.cs +++ b/Assets/_UDVT/Scripts/Runtime/MainScript.cs @@ -3,7 +3,7 @@ using UnityEngine; /// -/// MainScript handles the activities needed at the start of the application. +/// It contains the scene where the graph will be plotted. /// public class MainScript : MonoBehaviour { diff --git a/Assets/_UDVT/Scripts/Runtime/MenuScripts/ChooseBinningFormula.cs b/Assets/_UDVT/Scripts/Runtime/MenuScripts/ChooseBinningFormula.cs index 570e303..633cc26 100644 --- a/Assets/_UDVT/Scripts/Runtime/MenuScripts/ChooseBinningFormula.cs +++ b/Assets/_UDVT/Scripts/Runtime/MenuScripts/ChooseBinningFormula.cs @@ -3,6 +3,9 @@ using UnityEngine; using UnityEngine.SceneManagement; +/// +/// It contains formulas used in calculating the binning. +/// public class ChooseBinningFormula : MonoBehaviour { public void StartWithSquareroot() diff --git a/Assets/_UDVT/Scripts/Runtime/MenuScripts/CurrentParams.cs b/Assets/_UDVT/Scripts/Runtime/MenuScripts/CurrentParams.cs index 4b6ece9..12e1113 100644 --- a/Assets/_UDVT/Scripts/Runtime/MenuScripts/CurrentParams.cs +++ b/Assets/_UDVT/Scripts/Runtime/MenuScripts/CurrentParams.cs @@ -3,6 +3,10 @@ using UnityEngine; using UnityEngine.SceneManagement; +/// +/// It contains the variables defined to move the parameters +/// taken with the help of the menu between scenes. +/// public class CurrentParams : MonoBehaviour { public static VisType currentVisType = VisType.Scatterplot; // default diff --git a/Assets/_UDVT/Scripts/Runtime/MenuScripts/LoadData.cs b/Assets/_UDVT/Scripts/Runtime/MenuScripts/LoadData.cs index 020a82d..8b6f1a1 100644 --- a/Assets/_UDVT/Scripts/Runtime/MenuScripts/LoadData.cs +++ b/Assets/_UDVT/Scripts/Runtime/MenuScripts/LoadData.cs @@ -2,6 +2,11 @@ using System.Collections.Generic; using UnityEngine; using UnityEngine.SceneManagement; + + +/// +/// LoadData, the field to load the data required for drawing the selected graph. +/// public class LoadData : MonoBehaviour { private FileLoadingManager fileLoadingManager; @@ -21,6 +26,7 @@ private async void InnerLoad() //## 01: Load Dataset string filePath = fileLoadingManager.StartPicker(); + // Application waits for the loading process to finish FileType file = await fileLoadingManager.LoadDataset(); @@ -29,7 +35,8 @@ private async void InnerLoad() //## 02: Process Dataset CsvFileType csvFile = (CsvFileType)file; CurrentParams.loadedData = csvFile.GetDataSet(); - + + //We are checking whether the loaded data is suitable for the graph. if (Helper.FileValidation()) CallMainScene(); else @@ -38,6 +45,9 @@ private async void InnerLoad() } + /// + /// It directs to the screen where the graphic will be drawn. + /// private void CallMainScene() { SceneManager.LoadScene("MainScene"); diff --git a/Assets/_UDVT/Scripts/Runtime/MenuScripts/Menu.cs b/Assets/_UDVT/Scripts/Runtime/MenuScripts/Menu.cs index b72cdbe..377ab15 100644 --- a/Assets/_UDVT/Scripts/Runtime/MenuScripts/Menu.cs +++ b/Assets/_UDVT/Scripts/Runtime/MenuScripts/Menu.cs @@ -3,6 +3,9 @@ using UnityEngine; using UnityEngine.SceneManagement; +/// +/// Menu handles the activities needed at the start of the application. +/// public class Menu : MonoBehaviour { public void StartWithScatterplot() @@ -11,6 +14,10 @@ public void StartWithScatterplot() CallLoadData(); } + /// + /// Some charts need extra information. Therefore, before going to the LoadData screen, + /// it goes to an intermediate screen. + /// public void StartWithHistogram() { CurrentParams.currentVisType = VisType.Histogram; @@ -35,6 +42,9 @@ public void StartWithHorizonGraph() CallLoadData(); } + /// + /// It directs to the LoadData to load the data needed to draw the selected graph. + /// private void CallLoadData() { SceneManager.LoadScene("LoadData"); diff --git a/Assets/_UDVT/Scripts/Runtime/Visualization/VisDensityplot.cs b/Assets/_UDVT/Scripts/Runtime/Visualization/VisDensityplot.cs index bc44c4b..965124f 100644 --- a/Assets/_UDVT/Scripts/Runtime/Visualization/VisDensityplot.cs +++ b/Assets/_UDVT/Scripts/Runtime/Visualization/VisDensityplot.cs @@ -4,6 +4,10 @@ using static KernelDensityEstimation; + +/// +/// It contains the necessary methods and parameters for ploting Densityplot. +/// public class VisDensityplot : Vis { public double[,] KDEresult = null; @@ -62,7 +66,10 @@ public override void ChangeDataMarks() dataSets[0][yName] = Enumerable.Range(0, KDEresult.GetLength(0)).Select(x => KDEresult[x, 1]).ToArray(); } - + /// + /// It connects the dots with a line. + /// + /// public void ConnectDataMarks(List datamarks) { //Debug.Log(dataSets[0].ElementAt(0).Value[0]); diff --git a/Assets/_UDVT/Scripts/Runtime/Visualization/VisHistogram.cs b/Assets/_UDVT/Scripts/Runtime/Visualization/VisHistogram.cs index 785c104..d66edd6 100644 --- a/Assets/_UDVT/Scripts/Runtime/Visualization/VisHistogram.cs +++ b/Assets/_UDVT/Scripts/Runtime/Visualization/VisHistogram.cs @@ -3,12 +3,18 @@ using System.Collections.Generic; using System; +/// +/// It contains the formulas needed to calculate binings. +/// public enum BinningType { Squareroot, Sturges } +/// +/// It contains the necessary methods and parameters for ploting histograms. +/// public class VisHistogram : Vis { private List _xData = new List(); @@ -92,6 +98,9 @@ public override void ChangeDataMarks() #region private + /// + /// After calculating the bining, it updates the xyzTicks. + /// private void UpdatexyzTicks() { int len = dataSets[0].ElementAt(0).Value.Length; diff --git a/Slides/Task1.pptx b/Slides/Task1.pptx new file mode 100644 index 0000000..e2e4ff5 Binary files /dev/null and b/Slides/Task1.pptx differ