Exemple #1
0
        // gplot.c (263, 1)
        // gplotAddPlot(gplot, nax, nay, plotstyle, plottitle) as int
        // gplotAddPlot(GPLOT *, NUMA *, NUMA *, l_int32, const char *) as l_ok
        ///  <summary>
        /// (1) There are 2 options for (x,y) values:
        /// o  To plot an array vs a linear function of the
        /// index, set nax = NULL.
        /// o  To plot one array vs another, use both nax and nay.<para/>
        ///
        /// (2) If nax is NULL, the x value corresponding to the i-th
        /// value of nay is found from the startx and delx fields
        /// in nay:
        /// x = startx + i  delx
        /// These are set with numaSetParameters().  Their default
        /// values are startx = 0.0, delx = 1.0.<para/>
        ///
        /// (3) If nax is defined, it must be the same size as nay, and
        /// must have at least one number.<para/>
        ///
        /// (4) The 'plottitle' string can have spaces, double
        /// quotes and backquotes, but not single quotes.
        ///  </summary>
        ///  <remarks>
        ///  </remarks>
        ///  <include file="..\CHM_Help\IncludeComments.xml" path="Comments/gplotAddPlot/*"/>
        ///  <param name="gplot">[in] - </param>
        ///  <param name="nax">[in][optional] - numa: set to null for Y_VS_I required for Y_VS_X</param>
        ///  <param name="nay">[in] - numa: required for both Y_VS_I and Y_VS_X</param>
        ///  <param name="plotstyle">[in] - GPLOT_LINES, GPLOT_POINTS, GPLOT_IMPULSES, GPLOT_LINESPOINTS, GPLOT_DOTS</param>
        ///  <param name="plottitle">[in][optional] - title for individual plot</param>
        ///   <returns>0 if OK, 1 on error</returns>
        public static int gplotAddPlot(
            GPlot gplot,
            Numa nax,
            Numa nay,
            int plotstyle,
            String plottitle = "")
        {
            if (gplot == null)
            {
                throw new ArgumentNullException("gplot cannot be Nothing");
            }

            if (nay == null)
            {
                throw new ArgumentNullException("nay cannot be Nothing");
            }

            IntPtr naxPtr = IntPtr.Zero;    if (nax != null)
            {
                naxPtr = nax.Pointer;
            }
            int _Result = Natives.gplotAddPlot(gplot.Pointer, naxPtr, nay.Pointer, plotstyle, plottitle);

            return(_Result);
        }
Exemple #2
0
        // gplot.c (528, 1)
        // gplotGenDataFiles(gplot) as int
        // gplotGenDataFiles(GPLOT *) as l_ok
        ///  <summary>
        /// (1) The pathnames in the gplot command file are actual pathnames,
        /// which can be in temp directories.  Consequently, they must not be
        /// rewritten by calling fopenWriteStream(), and we use fopen().
        ///  </summary>
        ///  <remarks>
        ///  </remarks>
        ///  <include file="..\CHM_Help\IncludeComments.xml" path="Comments/gplotGenDataFiles/*"/>
        ///  <param name="gplot">[in] - </param>
        ///   <returns>0 if OK, 1 on error</returns>
        public static int gplotGenDataFiles(
            GPlot gplot)
        {
            if (gplot == null)
            {
                throw new ArgumentNullException("gplot cannot be Nothing");
            }

            int _Result = Natives.gplotGenDataFiles(gplot.Pointer);

            return(_Result);
        }
Exemple #3
0
        // gplot.c (343, 1)
        // gplotSetScaling(gplot, scaling) as int
        // gplotSetScaling(GPLOT *, l_int32) as l_ok
        ///  <summary>
        /// (1) By default, the x and y axis scaling is linear.<para/>
        ///
        /// (2) Call this function to set semi-log or log-log scaling.
        ///  </summary>
        ///  <remarks>
        ///  </remarks>
        ///  <include file="..\CHM_Help\IncludeComments.xml" path="Comments/gplotSetScaling/*"/>
        ///  <param name="gplot">[in] - </param>
        ///  <param name="scaling">[in] - GPLOT_LINEAR_SCALE, GPLOT_LOG_SCALE_X, GPLOT_LOG_SCALE_Y, GPLOT_LOG_SCALE_X_Y</param>
        ///   <returns>0 if OK 1 on error</returns>
        public static int gplotSetScaling(
            GPlot gplot,
            int scaling)
        {
            if (gplot == null)
            {
                throw new ArgumentNullException("gplot cannot be Nothing");
            }

            int _Result = Natives.gplotSetScaling(gplot.Pointer, scaling);

            return(_Result);
        }
Exemple #4
0
        // gplot.c (912, 1)
        // gplotWrite(filename, gplot) as int
        // gplotWrite(const char *, GPLOT *) as l_ok
        ///  <summary>
        /// gplotWrite()
        ///  </summary>
        ///  <remarks>
        ///  </remarks>
        ///  <include file="..\CHM_Help\IncludeComments.xml" path="Comments/gplotWrite/*"/>
        ///  <param name="filename">[in] - </param>
        ///  <param name="gplot">[in] - </param>
        ///   <returns>0 if OK 1 on error</returns>
        public static int gplotWrite(
            String filename,
            GPlot gplot)
        {
            if (filename == null)
            {
                throw new ArgumentNullException("filename cannot be Nothing");
            }

            if (gplot == null)
            {
                throw new ArgumentNullException("gplot cannot be Nothing");
            }

            int _Result = Natives.gplotWrite(filename, gplot.Pointer);

            return(_Result);
        }
Exemple #5
0
        // gplot.c (197, 1)
        // gplotDestroy(pgplot) as Object
        // gplotDestroy(GPLOT **) as void
        ///  <summary>
        /// gplotDestroy()
        ///  </summary>
        ///  <remarks>
        ///  </remarks>
        ///  <include file="..\CHM_Help\IncludeComments.xml" path="Comments/gplotDestroy/*"/>
        ///  <param name="pgplot">[in,out] - to be nulled</param>
        public static void gplotDestroy(
            ref GPlot pgplot)
        {
            IntPtr pgplotPtr = IntPtr.Zero;         if (pgplot != null)

            {
                pgplotPtr = pgplot.Pointer;
            }

            Natives.gplotDestroy(ref pgplotPtr);
            if (pgplotPtr == IntPtr.Zero)
            {
                pgplot = null;
            }
            else
            {
                pgplot = new GPlot(pgplotPtr);
            };
        }