Container for polar plot data.
Inheritance: XYPlotValue
Esempio n. 1
0
        public PolarPlotValue Function(MatrixValue m, MatrixValue n)
        {
            var plot = new PolarPlotValue();

            plot.AddPoints(m, n);
            return(plot);
        }
Esempio n. 2
0
        /// <summary>
        /// Converts a set of bytes to a new instance.
        /// </summary>
        /// <param name="content">The binary representation.</param>
        /// <returns>The new instance.</returns>
        public override Value Deserialize(byte[] content)
        {
            var pp = new PolarPlotValue();

            using (var ds = Deserializer.Create(content))
            {
                pp.Deserialize(ds);
                pp.FractionSymbol = ds.GetString();
                pp.FractionUnit   = ds.GetDouble();
                var length = ds.GetInt();

                for (var i = 0; i < length; i++)
                {
                    var points = new Points <PointPair>();
                    points.Deserialize(ds);
                    var count = ds.GetInt();

                    for (int j = 0; j < count; j++)
                    {
                        var x = ds.GetDouble();
                        var y = ds.GetDouble();

                        points.Add(new PointPair
                        {
                            Angle     = x,
                            Magnitude = y
                        });
                    }

                    pp.AddSeries(points);
                }
            }

            return(pp);
        }
Esempio n. 3
0
        /// <summary>
        /// Converts a set of bytes to a new instance.
        /// </summary>
        /// <param name="content">The binary representation.</param>
        /// <returns>The new instance.</returns>
        public override Value Deserialize(byte[] content)
        {
            var pp = new PolarPlotValue();

            using (var ds = Deserializer.Create(content))
            {
                pp.Deserialize(ds);
                pp.FractionSymbol = ds.GetString();
                pp.FractionUnit = ds.GetDouble();
                var length = ds.GetInt();

                for (var i = 0; i < length; i++)
                {
                    var points = new Points<PointPair>();
                    points.Deserialize(ds);
                    var count = ds.GetInt();

                    for (int j = 0; j < count; j++)
                    {
                        var x = ds.GetDouble();
                        var y = ds.GetDouble();

                        points.Add(new PointPair
                        {
                            Angle = x,
                            Magnitude = y
                        });
                    }

                    pp.AddSeries(points);
                }
            }

            return pp;
        }