{"id":2073,"date":"2014-03-26T18:40:59","date_gmt":"2014-03-26T18:40:59","guid":{"rendered":"http:\/\/www.amzsaki.com\/?page_id=2073"},"modified":"2020-09-01T02:48:11","modified_gmt":"2020-09-01T02:48:11","slug":"cplot2d-a-simple-c-class-for-generating-postscript-plots-from-within-a-program","status":"publish","type":"page","link":"https:\/\/www.amzsaki.com\/?page_id=2073","title":{"rendered":"CPlot2D, a simple C++ class for generating PostScript plots from within a program"},"content":{"rendered":"<p><a href=\"https:\/\/www.amzsaki.com\/wp-content\/uploads\/2014\/03\/dcavity.cfd_velocity_midwidth__plotxy_time_14.047500.res_.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-large wp-image-2075\" src=\"https:\/\/www.amzsaki.com\/wp-content\/uploads\/2014\/03\/dcavity.cfd_velocity_midwidth__plotxy_time_14.047500.res_-1024x704.png\" alt=\"dcavity.cfd_velocity_midwidth__plotxy_time_14.047500.res\" width=\"850\" height=\"429\" \/><\/a><\/p>\n<p>Get the code <a href=\"https:\/\/github.com\/amzs\/CPlot2D.git\">NOW<\/a> at GitHub!<\/p>\n<p style=\"text-align: justify;\">In my line of work q<span style=\"font-size: 1rem;\">uite often\u00a0<\/span><span style=\"line-height: 1.714285714; font-size: 1rem;\">the need arises to plot something. Results of numerical simulation are often easier interpreted as graphs, plots or other renderings of the underlying numbers. Take for example the computational fluid dynamics simulator that I am currently working on. To assess its performance and accuracy, plots of quantities such as velocity are needed to compare them to literature-published benchmarks. The above plot shows a distribution of the horizontal component of velocity along a line midway from the bottom to the top of a lid-driven cavity problem. The benchmark results are plotted as red triangles while the current output of the program is shown as a black line connecting the black circular markers. Pretty standard and simple plot, right?<\/span><\/p>\n<p style=\"text-align: justify;\">In the past, the procedure for visualizing simple 2D plots was as follows; create a text output from the program as a two-column x and y delimited file. Then take that into a spreadsheet and generate a chart. It takes about 4-5 minutes to go through the process and enjoy viewing the plot. What if this process could be done automagically from a running program without the hassle to a trip to a spreadsheet? Of course, it can be done. The web is filled with excellent plotting packages, quite a few of them open source or freeware. <a href=\"http:\/\/www.gnuplot.info\">Gnuplot<\/a>, <a href=\"http:\/\/plasma-gate.weizmann.ac.il\/Grace\/\">Grace<\/a> or <a href=\"http:\/\/www.jfree.org\/jfreechart\/\">JFreeChart<\/a> to name a few. Then why does the world need another plotting option? For one, some of them are stand-alone, cannot be integrated into a program, or they are just too bulky and complex requiring a bunch of other libraries to build\u00a0for just a quick and dirty plot.<\/p>\n<p style=\"text-align: justify;\">Thus, CPlot2D was born out of necessity to be able to incorporate just a few files into any C++ project and plot any quantity. Why CPlot2D as the name? Probably my lack of imagination; it is a class that plots data in two dimensions. Hence CPlot2D. Let me define what CPlot2D is not; it is not a feature-rich plotting library (yet!) that handles all sorts of data and automatically generates a candy-striped output of shapes. It was conceived to create plots for my research that are vector graphics, scalable and simple, for inclusion in publications, journal articles and such. The key is to be able to represent values without too much clutter and effects. Although it can plot multiple data sets in the same plot, it is aimed at concisely representing data. PostScript was chosen as a simple way of generating vector graphics. It can then be translated into any other graphics format as the need arises. Beyond PostScript,\u00a0<span style=\"font-size: 1rem;\">in the future,\u00a0<\/span><span style=\"line-height: 1.714285714; font-size: 1rem;\">I might be tempted to expand the class to include OpenGL rendering of the data, so both on-screen real-time plotting and PostScript output can be created from the same data.\u00a0<\/span><\/p>\n<p style=\"text-align: justify;\">The motivation to make it available for download and use by anybody stems from the fact that over the years I have enjoyed and learned from many open source projects, thus this is my simple way of giving back to the community. I hope that somebody out there can use my code and he or she will be inspired to contribute as well. I have only one request; if you find it useful in your code, please leave the acknowledgements and copyright in place indicating the origin of this code. If you find one of the potentially numerous bugs in the code, please let me know!<\/p>\n<p style=\"text-align: justify;\">The code is available at GitHub in one of my repositories <a href=\"https:\/\/github.com\/amzs\/CPlot2D.git\">here<\/a>.<\/p>\n<p style=\"text-align: justify;\">The code was written such that all relevant parameters can be set or retrieved using the accessor functions. Now, it makes a lot of sense to be able to set things, but why to get them back? At first, I thought that I can just omit all the GetXXX functions, but already I needed access to some plot parameters in another part of a code. So I have implemented most of them. Some quantities are computed just prior to plotting and output, and those are without any accessors.<br \/>\nAlso, note that parameters like setting the overall size of the plot or the size of the plot area and the frame around it can be abused to result in an &#8216;unpredictable&#8217; plot. What I mean is that there is no check to validate every and all possibility of plot sizes, frame widths and placements. Exercise common sense and judgement! You have been warned!<\/p>\n<p style=\"text-align: justify;\">The general organization of the plotting method is as follows. A new instance of the <em>CPlot2D<\/em> class is created along with a new <em>CDataSet<\/em>\u00a0(let&#8217;s call it <em>dataSet<\/em>) and a <em>CDataPoint<\/em> class. On the most basic level, the <em>CPlot2D<\/em> class is set up to generate a relatively pleasing output without any change to its default parameters. To be able to plot, the <em>dataSet<\/em> instance has to be filled with the x and y pairs of data stored in a <em>dataPoint<\/em> and appended to the <em>dataSet<\/em>. At this point any change to the <em>dataSet&#8217;s<\/em> representation can be made. See the example driver code further down. Once the <em>dataSet<\/em> is full, it can then be appended to the <em>CPlot2D<\/em> instance. Then, it is just a matter of invoking the\u00a0<em>OutputPostScriptPlot( string fileName )<\/em> function with the intended file name for output. And that is it.<\/p>\n<p style=\"text-align: justify;\">As a quick way to demonstrate the use of the <em>CPlot2D<\/em> class and its helpers, let us consider the driver code, supplied with the downloadable source code. The code, as seen below, is just a few functions exercising the plotting class. A first function call to <em>TestTrigFunctions()<\/em> results in a plot, as seen below, with just a plot of three familiar trigonometric functions. If you look at the source code, a <em>CPlot2D<\/em> instance is created along with a <em>dataSet<\/em> and <em>point<\/em>. The for loops fill the <em>dataSet<\/em> with the x and y coordinates from the function evaluations. Subsequently, a colour and a title is assigned to each <em>dataSet<\/em>. Once a <em>dataSet<\/em> is complete, it is added to the plot. The plot has its x and y axis titles set and then it is just a matter of calling <em>OutputPostScriptPlot(\u2026)<\/em> with the desired filename as the argument to the function. Note that by default, filled-in circles are used as data markers and a solid line is connecting the data points. The background grid is light grey with dashed lines. It results in a scheme that reminds me of a well-tailored pinstriped grey suit. The axis labels are computed within the class using a simple algorithm in the spirit of P. Heckbert&#8217;s article titled &#8220;Nice Number for Graph Labels&#8221; in Graphics Gems I ( you can find the original source code\u00a0<a href=\"http:\/\/www.cs.cmu.edu\/~ph\/\">here<\/a>, look towards the bottom of the page). Prior to writing the appropriate code to compute a set of axis tick mark positions and labels, I had the naive thought that it is a quite simple procedure. Not really, there are a few scientific papers written on the topic of axis label generation, so I learned something new&#8230;<\/p>\n<p><a href=\"https:\/\/www.amzsaki.com\/wp-content\/uploads\/2014\/03\/test1_trigfunctions.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-large wp-image-2094\" src=\"https:\/\/www.amzsaki.com\/wp-content\/uploads\/2014\/03\/test1_trigfunctions-1024x697.png\" alt=\"test1_trigfunctions\" width=\"625\" height=\"425\" srcset=\"https:\/\/www.amzsaki.com\/wp-content\/uploads\/2014\/03\/test1_trigfunctions-1024x697.png 1024w, https:\/\/www.amzsaki.com\/wp-content\/uploads\/2014\/03\/test1_trigfunctions-300x204.png 300w, https:\/\/www.amzsaki.com\/wp-content\/uploads\/2014\/03\/test1_trigfunctions-624x425.png 624w, https:\/\/www.amzsaki.com\/wp-content\/uploads\/2014\/03\/test1_trigfunctions.png 1925w\" sizes=\"auto, (max-width: 625px) 100vw, 625px\" \/><\/a><\/p>\n<p style=\"text-align: justify;\">The second exercise for the plotting class demonstrates various marker styles available. Currently, markers can either be a circle, denoted as <em><strong>o<\/strong><\/em> (either filled or empty), an <em><strong>X<\/strong><\/em> or a <em><strong>*<\/strong><\/em>, a <em><strong>diamond<\/strong><\/em>\u00a0\u00a0(either filled or empty), a <em><strong>square<\/strong><\/em>\u00a0(either filled or empty) or a <em><strong>triangle<\/strong><\/em>\u00a0(either filled or empty). \u00a0Setting the <em>dataSet<\/em> marker symbol using <em>SetMarkerSymbol(string)<\/em> accomplishes this.<\/p>\n<p><a href=\"https:\/\/www.amzsaki.com\/wp-content\/uploads\/2014\/03\/test2_marker_styles_a.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-large wp-image-2101\" src=\"https:\/\/www.amzsaki.com\/wp-content\/uploads\/2014\/03\/test2_marker_styles_a-1024x697.png\" alt=\"test2_marker_styles_a\" width=\"625\" height=\"425\" srcset=\"https:\/\/www.amzsaki.com\/wp-content\/uploads\/2014\/03\/test2_marker_styles_a-1024x697.png 1024w, https:\/\/www.amzsaki.com\/wp-content\/uploads\/2014\/03\/test2_marker_styles_a-300x204.png 300w, https:\/\/www.amzsaki.com\/wp-content\/uploads\/2014\/03\/test2_marker_styles_a-624x425.png 624w, https:\/\/www.amzsaki.com\/wp-content\/uploads\/2014\/03\/test2_marker_styles_a.png 1925w\" sizes=\"auto, (max-width: 625px) 100vw, 625px\" \/><\/a><\/p>\n<p style=\"text-align: justify;\">The previous plot had all the markers filled in, while the one below shows the effect of setting <em>SetDrawMarkerFilled(false)<\/em> for each dataset. Of course, for some symbols, it has no effect, like in the case of a <em><strong>X<\/strong><\/em> or <strong><em>*<\/em><\/strong>.<\/p>\n<p><a href=\"https:\/\/www.amzsaki.com\/wp-content\/uploads\/2014\/03\/test2_marker_styles_b.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-large wp-image-2104\" src=\"https:\/\/www.amzsaki.com\/wp-content\/uploads\/2014\/03\/test2_marker_styles_b-1024x697.png\" alt=\"test2_marker_styles_b\" width=\"625\" height=\"425\" srcset=\"https:\/\/www.amzsaki.com\/wp-content\/uploads\/2014\/03\/test2_marker_styles_b-1024x697.png 1024w, https:\/\/www.amzsaki.com\/wp-content\/uploads\/2014\/03\/test2_marker_styles_b-300x204.png 300w, https:\/\/www.amzsaki.com\/wp-content\/uploads\/2014\/03\/test2_marker_styles_b-624x425.png 624w, https:\/\/www.amzsaki.com\/wp-content\/uploads\/2014\/03\/test2_marker_styles_b.png 1925w\" sizes=\"auto, (max-width: 625px) 100vw, 625px\" \/><\/a><\/p>\n<p>Finally, drawing the markers can be turned off altogether, using <em>SetDrawMarker(false)<\/em> for each <em>dataSet<\/em>. The resulting effect is shown below.<\/p>\n<p><a href=\"https:\/\/www.amzsaki.com\/wp-content\/uploads\/2014\/03\/test2_marker_styles_c.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-large wp-image-2105\" src=\"https:\/\/www.amzsaki.com\/wp-content\/uploads\/2014\/03\/test2_marker_styles_c-1024x697.png\" alt=\"test2_marker_styles_c\" width=\"625\" height=\"425\" srcset=\"https:\/\/www.amzsaki.com\/wp-content\/uploads\/2014\/03\/test2_marker_styles_c-1024x697.png 1024w, https:\/\/www.amzsaki.com\/wp-content\/uploads\/2014\/03\/test2_marker_styles_c-300x204.png 300w, https:\/\/www.amzsaki.com\/wp-content\/uploads\/2014\/03\/test2_marker_styles_c-624x425.png 624w, https:\/\/www.amzsaki.com\/wp-content\/uploads\/2014\/03\/test2_marker_styles_c.png 1925w\" sizes=\"auto, (max-width: 625px) 100vw, 625px\" \/><\/a><\/p>\n<p style=\"text-align: justify;\">Currently, the available grid line plotting is restricted to either no grid lines, solid grid lines or dashed grid lines. The <em>TestLineStyles(\u2026)<\/em> functions shows these.\u00a0The colour of grid lines can be set as well, see the full class member function list at the bottom of this article. Grid lines can be turned on or off using a call to the plot&#8217;s\u00a0<em>SetDrawXAxisGridLines(true\/false)<\/em> function. While the line type for a grid line can be set using\u00a0<em>SetDrawGridLinesDashed(true)<\/em> for a dashed line style, a <em>false<\/em> argument results in solid grid lines. The next five plots demonstrate this functionality; a plot with solid grid lines, a plot with dashed grid lines, a plot with no grid lines and finally, two plots with grid lines on one axis only.<\/p>\n<p><a href=\"https:\/\/www.amzsaki.com\/wp-content\/uploads\/2014\/03\/test4_grid_lines_solid.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-large wp-image-2113\" src=\"https:\/\/www.amzsaki.com\/wp-content\/uploads\/2014\/03\/test4_grid_lines_solid-1024x697.png\" alt=\"test4_grid_lines_solid\" width=\"625\" height=\"425\" srcset=\"https:\/\/www.amzsaki.com\/wp-content\/uploads\/2014\/03\/test4_grid_lines_solid-1024x697.png 1024w, https:\/\/www.amzsaki.com\/wp-content\/uploads\/2014\/03\/test4_grid_lines_solid-300x204.png 300w, https:\/\/www.amzsaki.com\/wp-content\/uploads\/2014\/03\/test4_grid_lines_solid-624x425.png 624w, https:\/\/www.amzsaki.com\/wp-content\/uploads\/2014\/03\/test4_grid_lines_solid.png 1925w\" sizes=\"auto, (max-width: 625px) 100vw, 625px\" \/><\/a><\/p>\n<p><a href=\"https:\/\/www.amzsaki.com\/wp-content\/uploads\/2014\/03\/test4_grid_lines_dashed.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-large wp-image-2114\" src=\"https:\/\/www.amzsaki.com\/wp-content\/uploads\/2014\/03\/test4_grid_lines_dashed-1024x697.png\" alt=\"test4_grid_lines_dashed\" width=\"625\" height=\"425\" srcset=\"https:\/\/www.amzsaki.com\/wp-content\/uploads\/2014\/03\/test4_grid_lines_dashed-1024x697.png 1024w, https:\/\/www.amzsaki.com\/wp-content\/uploads\/2014\/03\/test4_grid_lines_dashed-300x204.png 300w, https:\/\/www.amzsaki.com\/wp-content\/uploads\/2014\/03\/test4_grid_lines_dashed-624x425.png 624w, https:\/\/www.amzsaki.com\/wp-content\/uploads\/2014\/03\/test4_grid_lines_dashed.png 1925w\" sizes=\"auto, (max-width: 625px) 100vw, 625px\" \/><\/a><\/p>\n<p><a style=\"line-height: 1.714285714; font-size: 1rem;\" href=\"https:\/\/www.amzsaki.com\/wp-content\/uploads\/2014\/03\/test4_no_grid_lines.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-large wp-image-2109\" src=\"https:\/\/www.amzsaki.com\/wp-content\/uploads\/2014\/03\/test4_no_grid_lines-1024x697.png\" alt=\"test4_no_grid_lines\" width=\"625\" height=\"425\" srcset=\"https:\/\/www.amzsaki.com\/wp-content\/uploads\/2014\/03\/test4_no_grid_lines-1024x697.png 1024w, https:\/\/www.amzsaki.com\/wp-content\/uploads\/2014\/03\/test4_no_grid_lines-300x204.png 300w, https:\/\/www.amzsaki.com\/wp-content\/uploads\/2014\/03\/test4_no_grid_lines-624x425.png 624w, https:\/\/www.amzsaki.com\/wp-content\/uploads\/2014\/03\/test4_no_grid_lines.png 1925w\" sizes=\"auto, (max-width: 625px) 100vw, 625px\" \/><\/a><\/p>\n<p><a href=\"https:\/\/www.amzsaki.com\/wp-content\/uploads\/2014\/03\/test4_no_x_axis_grid_lines.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-large wp-image-2110\" src=\"https:\/\/www.amzsaki.com\/wp-content\/uploads\/2014\/03\/test4_no_x_axis_grid_lines-1024x697.png\" alt=\"test4_no_x_axis_grid_lines\" width=\"625\" height=\"425\" srcset=\"https:\/\/www.amzsaki.com\/wp-content\/uploads\/2014\/03\/test4_no_x_axis_grid_lines-1024x697.png 1024w, https:\/\/www.amzsaki.com\/wp-content\/uploads\/2014\/03\/test4_no_x_axis_grid_lines-300x204.png 300w, https:\/\/www.amzsaki.com\/wp-content\/uploads\/2014\/03\/test4_no_x_axis_grid_lines-624x425.png 624w, https:\/\/www.amzsaki.com\/wp-content\/uploads\/2014\/03\/test4_no_x_axis_grid_lines.png 1925w\" sizes=\"auto, (max-width: 625px) 100vw, 625px\" \/><\/a><\/p>\n<p><a href=\"https:\/\/www.amzsaki.com\/wp-content\/uploads\/2014\/03\/test4_no_y_axis_grid_lines.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-large wp-image-2111\" src=\"https:\/\/www.amzsaki.com\/wp-content\/uploads\/2014\/03\/test4_no_y_axis_grid_lines-1024x697.png\" alt=\"test4_no_y_axis_grid_lines\" width=\"625\" height=\"425\" srcset=\"https:\/\/www.amzsaki.com\/wp-content\/uploads\/2014\/03\/test4_no_y_axis_grid_lines-1024x697.png 1024w, https:\/\/www.amzsaki.com\/wp-content\/uploads\/2014\/03\/test4_no_y_axis_grid_lines-300x204.png 300w, https:\/\/www.amzsaki.com\/wp-content\/uploads\/2014\/03\/test4_no_y_axis_grid_lines-624x425.png 624w, https:\/\/www.amzsaki.com\/wp-content\/uploads\/2014\/03\/test4_no_y_axis_grid_lines.png 1925w\" sizes=\"auto, (max-width: 625px) 100vw, 625px\" \/><\/a><\/p>\n<p style=\"text-align: justify;\">The same <em>TestLineStyles(\u2026)<\/em> function also illustrates the available line styles connecting data points. Currently, either no lines (see the plot at the start of the article), solid lines, dashed lines, dotted lines and lines with both a dot and a dash are supported. As seen in the source code, a call to\u00a0<em>SetDashedLine<\/em> with a <em>true<\/em> enables dashed lines, while <em>SetDashedLinePattern( string )<\/em> can be used to specify the line type as; <strong><em>solid<\/em><\/strong>, <strong><em>dash<\/em><\/strong>, <strong><em>dot<\/em><\/strong> or <strong><em>dash_dot<\/em><\/strong>. The various outcomes of these settings can be seen in the plots above.<\/p>\n<p style=\"text-align: justify;\">As a final example, the setting of axis titles and a legend is shown in the figure below.<\/p>\n<p><a href=\"https:\/\/www.amzsaki.com\/wp-content\/uploads\/2014\/03\/test5_axis_labels.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-large wp-image-2118\" src=\"https:\/\/www.amzsaki.com\/wp-content\/uploads\/2014\/03\/test5_axis_labels-1024x679.png\" alt=\"test5_axis_labels\" width=\"625\" height=\"414\" srcset=\"https:\/\/www.amzsaki.com\/wp-content\/uploads\/2014\/03\/test5_axis_labels-1024x679.png 1024w, https:\/\/www.amzsaki.com\/wp-content\/uploads\/2014\/03\/test5_axis_labels-300x199.png 300w, https:\/\/www.amzsaki.com\/wp-content\/uploads\/2014\/03\/test5_axis_labels-624x414.png 624w, https:\/\/www.amzsaki.com\/wp-content\/uploads\/2014\/03\/test5_axis_labels.png 1977w\" sizes=\"auto, (max-width: 625px) 100vw, 625px\" \/><\/a><\/p>\n<p style=\"text-align: justify;\">The axis titles can be set using a call to either <em>SetXAxisTitle(\u2026)<\/em> or<em> SetYAxisTitle(\u2026)<\/em> with a <em>string<\/em> as an argument. Note, to accommodate the y axis title, the thickness of the frame around the last plot had to be increased using <em>SetLeftFrameSize(100.0)<\/em>. Just as a reminder, this class is not an automatic silver bullet that can figure out any and every combination of text and legend placement, so at times it has to be nudged in the right direction!<\/p>\n<p style=\"text-align: justify;\">Finally, below is the complete source code for the driver, which exercises the plotting library. The very same is included in the downloadable source code.<\/p>\n<pre><span style=\"color: #ffffff;\">[code language=\"cpp\"]\n\/\/\n\/\/&amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;nbsp; main.cpp\n\/\/&amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;nbsp; cplot2ddriver\n\/\/\n\/\/&amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;nbsp; Created by Attila Michael Zsaki on 14-03-21.\n\/\/&amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;nbsp; Copyright (c) 2014 Attila Michael Zsaki. All rights reserved.\n\/\/\n\n#include\n#include\n#include \"CPlot2D.h\"\n\nvoid TestTrigFunctions();\nvoid TestMarkerStyles(bool filledMarker, bool noMarker, string\n                      fileName);\nvoid TestLineStyles(int gridStyle, bool xAxisGrid, bool yAxisGrid);\nvoid TestAxisLabels();\n\nint main(int argc, const char * argv[])\n{\n\n  TestTrigFunctions();\n  TestMarkerStyles(true,false,\"test2_marker_styles_a.ps\");\n  TestMarkerStyles(false,false,\"test2_marker_styles_b.ps\");\n  TestMarkerStyles(true,true,\"test2_marker_styles_c.ps\");\n  TestLineStyles(0,true,true);\n  TestLineStyles(1,true,true);\n  TestLineStyles(2,true,true);\n  TestAxisLabels();\n\n  return 0;\n}\n\nvoid TestTrigFunctions()\n{\n\n  CPlot2D *plot2D=new CPlot2D();\n\n  CDataSet dataSet;\n  CDataPoint point;\n\n  for (double x=-3.1515;x&amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;lt;=3.2;x+=0.1) {     point.SetValues(x,sin(x));     dataSet.AddDataPoint(point);   }   dataSet.SetDatasetColor(0.0,0.0,0.0);   dataSet.SetDatasetTitle(\"sin(x)\");   plot2D-&amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;gt;AddDataSet(dataSet);\n\n  CDataSet dataSet1;\n\n  for (double x=-3.1515;x&amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;lt;=3.2;x+=0.1) {     point.SetValues(x,cos(x));     dataSet1.AddDataPoint(point);   }   dataSet1.SetDatasetColor(1.0,0.0,0.0);   dataSet1.SetDatasetTitle(\"cos(x)\");   plot2D-&amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;gt;AddDataSet(dataSet1);\n\n  CDataSet dataSet2;\n\n  for (double x=-3.1515;x&amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;lt;=3.2;x+=0.1) {     point.SetValues(x,sin(x)*cos(x));     dataSet2.AddDataPoint(point);   }   dataSet2.SetDatasetColor(0.0,0.0,1.0);   dataSet2.SetDatasetTitle(\"sin(x)*cos(x)\");   plot2D-&amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;gt;AddDataSet(dataSet2);\n  plot2D-&amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;gt;SetXAxisTitle(\"variable x\");\n  plot2D-&amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;gt;SetYAxisTitle(\"function\");\n  plot2D-&amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;gt;OutputPostScriptPlot(\"test1_trigfunctions.ps\");\n}\n\nvoid TestMarkerStyles(bool filledMarker, bool noMarker,\n                      string fileName)\n{\n\n  CPlot2D *plot2D=new CPlot2D();\n  CDataSet dataSet[6];\n  CDataPoint point;\n\n  for (int i=0;i&amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;lt;6;++i) {\n    for (double x=0.0;x&amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;lt;=3.2;x+=0.1) {       point.SetValues(x,10.0*sin(x)+4.0*sin(3.0*x)+i);       dataSet[i].AddDataPoint(point);     }     if (!filledMarker) {       dataSet[i].SetDrawMarkerFilled(false);     }     if (noMarker) {       dataSet[i].SetDrawMarker(false);     }   }   dataSet[0].SetDatasetColor(0.0,0.0,0.0);   dataSet[0].SetMarkerSymbol(\"o\");   dataSet[0].SetDatasetTitle(\"o\");   plot2D-&amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;gt;AddDataSet(dataSet[0]);\n\n  dataSet[1].SetDatasetColor(0.0,0.0,0.0);\n  dataSet[1].SetMarkerSymbol(\"x\");\n  dataSet[1].SetDatasetTitle(\"x\");\n  plot2D-&amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;gt;AddDataSet(dataSet[1]);\n\n  dataSet[2].SetDatasetColor(0.0,0.0,0.0);\n  dataSet[2].SetMarkerSymbol(\"*\");\n  dataSet[2].SetDatasetTitle(\"*\");\n  plot2D-&amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;gt;AddDataSet(dataSet[2]);\n\n  dataSet[3].SetDatasetColor(0.0,0.0,0.0);\n  dataSet[3].SetMarkerSymbol(\"diamond\");\n  dataSet[3].SetDatasetTitle(\"diamond\");\n  plot2D-&amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;gt;AddDataSet(dataSet[3]);\n\n  dataSet[4].SetDatasetColor(0.0,0.0,0.0);\n  dataSet[4].SetMarkerSymbol(\"square\");\n  dataSet[4].SetDatasetTitle(\"square\");\n  plot2D-&amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;gt;AddDataSet(dataSet[4]);\n\n  dataSet[5].SetDatasetColor(0.0,0.0,0.0);\n  dataSet[5].SetMarkerSymbol(\"triangle\");\n  dataSet[5].SetDatasetTitle(\"triangle\");\n\n  plot2D-&amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;gt;AddDataSet(dataSet[5]);\n  plot2D-&amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;gt;OutputPostScriptPlot(fileName);\n}\n\nvoid TestLineStyles(int gridStyle, bool xAxisGrid, bool yAxisGrid)\n{\n\n  CPlot2D *plot2D=new CPlot2D();\n  CDataSet dataSet[4];\n  CDataPoint point;\n\n  for (int i=0;i&amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;lt;4;++i) {\n    for (double x=0.0;x&amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;lt;=3.2;x+=0.2) {       point.SetValues(x,10.0*sin(x)+4.0*cos(3.0*x)+3.0*i);       dataSet[i].AddDataPoint(point);     }   }   dataSet[0].SetDatasetColor(0.0,0.0,0.0);   dataSet[0].SetDatasetTitle(\"solid\");   plot2D-&amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;gt;AddDataSet(dataSet[0]);\n  dataSet[1].SetDatasetColor(0.0,0.0,0.0);\n  dataSet[1].SetDashedLine(true);\n  dataSet[1].SetDashedLinePattern(\"dash\");\n  dataSet[1].SetDatasetTitle(\"dash\");\n  plot2D-&amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;gt;AddDataSet(dataSet[1]);\n\n  dataSet[2].SetDatasetColor(0.0,0.0,0.0);\n  dataSet[2].SetDashedLine(true);\n  dataSet[2].SetDashedLinePattern(\"dot\");\n  dataSet[2].SetDatasetTitle(\"dot\");\n  plot2D-&amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;gt;AddDataSet(dataSet[2]);\n\n  dataSet[3].SetDatasetColor(0.0,0.0,0.0);\n  dataSet[3].SetDashedLine(true);\n  dataSet[3].SetDashedLinePattern(\"dash_dot\");\n  dataSet[3].SetDatasetTitle(\"dash_dot\");\n  plot2D-&amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;gt;AddDataSet(dataSet[3]);\n\n  if (gridStyle==0) {\n    plot2D-&amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;gt;SetDrawXAxisGridLines(true);\n    plot2D-&amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;gt;SetDrawYAxisGridLines(true);\n    plot2D-&amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;gt;SetDrawGridLinesDashed(false);\n    plot2D-&amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;gt;OutputPostScriptPlot(\"test4_grid_lines_solid.ps\");\n    plot2D-&amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;gt;SetDrawXAxisGridLines(false);\n    plot2D-&amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;gt;SetDrawYAxisGridLines(false);\n    plot2D-&amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;gt;OutputPostScriptPlot(\"test4_no_grid_lines.ps\");\n  }\n\n  if (gridStyle==1) {\n    plot2D-&amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;gt;SetDrawGridLinesDashed(true);\n    plot2D-&amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;gt;SetDrawXAxisGridLines(true);\n    plot2D-&amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;gt;SetDrawYAxisGridLines(true);\n    plot2D-&amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;gt;OutputPostScriptPlot(\"test4_grid_lines_dashed.ps\");\n  }\n\n  if (gridStyle==2) {\n    plot2D-&amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;gt;SetDrawXAxisGridLines(true);\n    plot2D-&amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;gt;SetDrawYAxisGridLines(false);\n    plot2D-&amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;gt;OutputPostScriptPlot(\"test4_no_x_axis_grid_lines.ps\");\n    plot2D-&amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;gt;SetDrawXAxisGridLines(false);\n    plot2D-&amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;gt;SetDrawYAxisGridLines(true);\n    plot2D-&amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;gt;OutputPostScriptPlot(\"test4_no_y_axis_grid_lines.ps\");\n  }\n}\n\nvoid TestAxisLabels()\n{\n  CPlot2D *plot2D=new CPlot2D();\n  CDataSet dataSet;\n  CDataPoint point;\n\n  for (double x=-100.01;x&amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;lt;=100.0;x+=10.0) {     point.SetValues(x,x*x*x-x*x+x);     dataSet.AddDataPoint(point);   }   dataSet.SetDatasetColor(0.0,1.0,0.0);   dataSet.SetDatasetTitle(\"x^3-x^2+x\");   plot2D-&amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;gt;AddDataSet(dataSet);\n  plot2D-&amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;gt;SetXAxisTitle(\"x axis\");\n  plot2D-&amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;gt;SetYAxisTitle(\"y=x^3-x^2+x axis\");\n  plot2D-&amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;gt;SetLeftFrameSize(100.0);\n  plot2D-&amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;gt;OutputPostScriptPlot(\"test5_axis_labels.ps\");\n\n}\n[\/code]<\/span><\/pre>\n<p>The <em>CDataPoint<\/em>, <em>CDataSet<\/em> and <em>CPlot2D<\/em> classes are comprised of the following member variables and functions. Doxygen was used to compile this list with an RTF output.<\/p>\n<p><b>Class Documentation<\/b><\/p>\n<p><b>CDataPoint Class Reference<\/b><\/p>\n<p>#include &lt;CPlot2D.h&gt;<\/p>\n<p><b>Public Member Functions<\/b><\/p>\n<p><b>CDataPoint<\/b> ()<br \/>\n<b>~CDataPoint<\/b> ()<br \/>\n<b>CDataPoint<\/b> (double x, double y)<br \/>\nvoid <b>SetValues<\/b> (double x, double y)<br \/>\nvoid <b>GetValues<\/b> (double *x, double *y)<br \/>\ndouble <b>GetX<\/b> ()<br \/>\ndouble <b>GetY<\/b> ()<\/p>\n<p><b>Protected Attributes<\/b><\/p>\n<p>double <b>m_dDataX<\/b><br \/>\ndouble <b>m_dDataY<\/b><\/p>\n<p><b>Detailed Description<\/b><\/p>\n<p>A simple container class to hold a data point, comprised of an x and y value stored in a double. Simple accessors are implemented to set and get the data stored.<\/p>\n<p><b>Constructor &amp; Destructor Documentation<\/b><\/p>\n<p><b>CDataPoint::CDataPoint () \u00a0<\/b><b>[inline]<\/b><br \/>\nConstructor for the class. The x and y values are initialized to zero.<\/p>\n<p><b>CDataPoint::~CDataPoint () \u00a0<\/b><b>[inline]<\/b><br \/>\nNothing really to destruct&#8230;<\/p>\n<p><b>CDataPoint::CDataPoint (double <i>x<\/i>, double <i>y<\/i>) \u00a0<\/b><b>[inline]<\/b><br \/>\nConstructor for the class with initialization of x and y.<\/p>\n<p><b>Member Function Documentation<\/b><\/p>\n<p><b>void CDataPoint::GetValues (double * <i>x<\/i>, double * <i>y<\/i>) \u00a0<\/b><b>[inline]<\/b><br \/>\nGet the x and y values as a pair.<\/p>\n<p><b>double CDataPoint::GetX () \u00a0<\/b><b>[inline]<\/b><br \/>\nGet the x value individually.<\/p>\n<p><b>double CDataPoint::GetY () \u00a0<\/b><b>[inline]<\/b><br \/>\nGet the y value individually.<\/p>\n<p><b>void CDataPoint::SetValues (double <i>x<\/i>, double <i>y<\/i>) \u00a0<\/b><b>[inline]<\/b><br \/>\nAnother way to set the x and y values.<\/p>\n<p><b>Member Data Documentation<\/b><\/p>\n<p><b>double CDataPoint::m_dDataX \u00a0<\/b><b>[protected]<\/b><br \/>\nStorage for the x value of a data point.<\/p>\n<p><b>double CDataPoint::m_dDataY \u00a0<\/b><b>[protected]<\/b><br \/>\nStorage for the y value of a data point.<\/p>\n<p><b>CDataSet Class Reference<\/b><\/p>\n<p>#include &lt;CPlot2D.h&gt;<\/p>\n<p><b>Public Member Functions<\/b><\/p>\n<p><b>CDataSet<\/b> ()<br \/>\n<b>~CDataSet<\/b> ()<br \/>\nvoid <b>SetDataPoint<\/b> (int index, <b>CDataPoint<\/b> point)<br \/>\n<b>CDataPoint<\/b> <b>GetDataPoint<\/b> (int index)<br \/>\nvoid <b>AddDataPoint<\/b> (<b>CDataPoint<\/b> point)<br \/>\nint <b>GetNumberOfDataPointsInSet<\/b> ()<br \/>\ndouble <b>GetXMinValue<\/b> ()<br \/>\ndouble <b>GetXMaxValue<\/b> ()<br \/>\ndouble <b>GetYMinValue<\/b> ()<br \/>\ndouble <b>GetYMaxValue<\/b> ()<br \/>\ndouble <b>GetXExtent<\/b> ()<br \/>\ndouble <b>GetYExtent<\/b> ()<br \/>\nvoid <b>SetLineWidth<\/b> (double lineWidth)<br \/>\ndouble <b>GetLineWidth<\/b> ()<br \/>\nvoid <b>SetDatasetColor<\/b> (double r, double g, double b)<br \/>\nvoid <b>GetDatasetColor<\/b> (double *r, double *g, double *b)<br \/>\nvoid <b>SetMarkerSymbol<\/b> (string symbol)<br \/>\nvoid <b>SetMarkerSize<\/b> (double size)<br \/>\nvoid <b>SetDrawLine<\/b> (bool flag)<br \/>\nvoid <b>SetDrawMarker<\/b> (bool flag)<br \/>\nvoid <b>SetDrawMarkerFilled<\/b> (bool flag)<br \/>\nstring <b>GetMarkerSymbol<\/b> ()<br \/>\ndouble <b>GetMarkerSize<\/b> ()<br \/>\nbool <b>GetDrawLine<\/b> ()<br \/>\nbool <b>GetDrawMarker<\/b> ()<br \/>\nbool <b>GetDrawMarkerFilled<\/b> ()<br \/>\nvoid <b>SetDashedLinePattern<\/b> (string pattern)<br \/>\nstring <b>GetDashedLinePattern<\/b> ()<br \/>\nvoid <b>SetDashedLine<\/b> (bool dashed)<br \/>\nbool <b>GetDashedLine<\/b> ()<br \/>\nvoid <b>SetDatasetTitle<\/b> (string title)<br \/>\nstring <b>GetDatasetTitle<\/b> ()<br \/>\nvoid <b>SetDatasetLegendFont<\/b> (string font)<br \/>\nstring <b>GetDatasetLegendFont<\/b> ()<br \/>\n<b>Protected Attributes<\/b><br \/>\nstring <b>m_strDatasetTitle<\/b><br \/>\nstring <b>m_strDatasetLegendFont<\/b><br \/>\ndouble <b>m_dLineWidth<\/b><br \/>\ndouble <b>m_dColor<\/b> [3]<br \/>\nstring <b>m_iDashedLinePattern<\/b><br \/>\nstring <b>m_strMarker<\/b><br \/>\ndouble <b>m_dMarkerSize<\/b><br \/>\nbool <b>m_bDrawLine<\/b><br \/>\nbool <b>m_bDrawMarker<\/b><br \/>\nbool <b>m_bDrawMarkerFilled<\/b><br \/>\nbool <b>m_bDashedLine<\/b><br \/>\nvector&lt; <b>CDataPoint<\/b> &gt; <b>m_dDataPoints<\/b><\/p>\n<p><b>Detailed Description<\/b><\/p>\n<p>A container class to hold a dataset. This class stores all the data points in a vector along with attributes specific to representing a dataset, such as the color of the line and markers or the title of the dataset.<\/p>\n<p><b>Constructor &amp; Destructor Documentation<\/b><\/p>\n<p><b>CDataSet::CDataSet () \u00a0<\/b><b>[inline]<\/b><br \/>\nConstructor for the class. The member variables are initialized to common values resulting in a, perhaps, pleasing representation of the data without the need to set anything up.<\/p>\n<p><b>CDataSet::~CDataSet () \u00a0<\/b><b>[inline]<\/b><br \/>\nNothing really to destruct&#8230;<\/p>\n<p><b>Member Function Documentation<\/b><\/p>\n<p><b>void CDataSet::AddDataPoint (CDataPoint <i>point<\/i>) \u00a0<\/b><b>[inline]<\/b><br \/>\nAdd a new data point by appending it to the end of the data vector.<\/p>\n<p><b>bool CDataSet::GetDashedLine ()<\/b><b>[inline]<\/b><br \/>\nGets a boolean representing if the dashed drawing style for the lines spanning data points is active or not.<\/p>\n<p><b>string CDataSet::GetDashedLinePattern () \u00a0<\/b><b>[inline]<\/b><br \/>\nGets the dased line pattern style used in drawing the line spanning data points.<\/p>\n<p><b>CDataPoint CDataSet::GetDataPoint (int <i>index<\/i>) \u00a0<\/b><b>[inline]<\/b><br \/>\nGet the data point at the location indicated by the variable index.<\/p>\n<p><b>void CDataSet::GetDatasetColor (double * <i>r<\/i>, double * <i>g<\/i>, double * <i>b<\/i>) \u00a0<\/b><b>[inline]<\/b><br \/>\nGets the RGB color used for drawing the dataset.<\/p>\n<p><b>string CDataSet::GetDatasetLegendFont () \u00a0<\/b><b>[inline]<\/b><br \/>\nGets the font used in the plot legend denoting this dataset.<\/p>\n<p><b>string CDataSet::GetDatasetTitle () \u00a0<\/b><b>[inline]<\/b><br \/>\nGets the string used in the plot legend denoting this dataset.<\/p>\n<p><b>bool CDataSet::GetDrawLine () \u00a0<\/b><b>[inline]<\/b><br \/>\nReturns a boolean representing if the line spanning the data points will be drawn or not.<\/p>\n<p><b>bool CDataSet::GetDrawMarker () \u00a0<\/b><b>[inline]<\/b><br \/>\nReturns a boolean representing if the marker symbol will be drawn or not.<\/p>\n<p><b>bool CDataSet::GetDrawMarkerFilled () \u00a0<\/b><b>[inline]<\/b><br \/>\nReturns a boolean representing if filling the interior of the marker symbol is enabled or disabled.<\/p>\n<p><b>double CDataSet::GetLineWidth () \u00a0<\/b><b>[inline]<\/b><br \/>\nReturns the line width that will be used in drawing the line representing the dataset.<\/p>\n<p><b>double CDataSet::GetMarkerSize () \u00a0<\/b><b>[inline]<\/b><br \/>\nReturns the size of the marker symbol.<\/p>\n<p><b>string CDataSet::GetMarkerSymbol () \u00a0<\/b><b>[inline]<\/b><br \/>\nReturns a string describing the marker symbol.<\/p>\n<p><b>int CDataSet::GetNumberOfDataPointsInSet () \u00a0<\/b><b>[inline]<\/b><br \/>\nReturns the number of data points comprisig the data set.<\/p>\n<p><b>double CDataSet::GetXExtent () \u00a0<\/b><b>[inline]<\/b><br \/>\nReturns the extent (maximum minus minimum) of the x values in the dataset.<\/p>\n<p><b>double CDataSet::GetXMaxValue () \u00a0<\/b><b>[inline]<\/b><br \/>\nReturns the maximum value of the x variable in the dataset by iterating over all data points in the set.<\/p>\n<p><b>double CDataSet::GetXMinValue () \u00a0<\/b><b>[inline]<\/b><br \/>\nReturns the minimum value of the x variable in the dataset by iterating over all data points in the set.<\/p>\n<p><b>double CDataSet::GetYExtent () \u00a0<\/b><b>[inline]<\/b><br \/>\nReturns the extent (maximum minus minimum) of the y values in the dataset.<\/p>\n<p><b>double CDataSet::GetYMaxValue () \u00a0<\/b><b>[inline]<\/b><br \/>\nReturns the maximum value of the y variable in the dataset by iterating over all data points in the set.<\/p>\n<p><b>double CDataSet::GetYMinValue () \u00a0<\/b><b>[inline]<\/b><br \/>\nReturns the minimum value of the y variable in the dataset by iterating over all data points in the set.<\/p>\n<p><b>void CDataSet::SetDashedLine (bool <i>dashed<\/i>) \u00a0<\/b><b>[inline]<\/b><br \/>\nSets the drawing style for the lines spanning data points to be dashed.<\/p>\n<p><b>void CDataSet::SetDashedLinePattern (string <i>pattern<\/i>) \u00a0<\/b><b>[inline]<\/b><br \/>\nSets the dased line pattern style used in drawing the line spanning data points. For the availabel styles see the declaration of the variable.<\/p>\n<p><b>void CDataSet::SetDataPoint (int <i>index<\/i>, CDataPoint <i>point<\/i>) \u00a0<\/b><b>[inline]<\/b><br \/>\nSet a data point at the index location. This function neccessitates the presence of the data location pointed to by the index variable. Generally, the preferred method to set or add data is to use the <b>AddDataPoint()<\/b> function, which appends the new data point to the dataset.<\/p>\n<p><b>void CDataSet::SetDatasetColor (double <i>r<\/i>, double <i>g<\/i>, double <i>b<\/i>) \u00a0<\/b><b>[inline]<\/b><br \/>\nSets the RGB color used for drawing the dataset. The range is 0.0-1.0.<\/p>\n<p><b>void CDataSet::SetDatasetLegendFont (string <i>font<\/i>) \u00a0<\/b><b>[inline]<\/b><br \/>\nSets the font used in the plot legend denoting this dataset.<\/p>\n<p><b>void CDataSet::SetDatasetTitle (string <i>title<\/i>) \u00a0<\/b><b>[inline]<\/b><br \/>\nSets the string used in the plot legend denoting this dataset.<\/p>\n<p><b>void CDataSet::SetDrawLine (bool <i>flag<\/i>) \u00a0<\/b><b>[inline]<\/b><br \/>\nA flag to enable\/disable drawing a line connecting the data points.<\/p>\n<p><b>void CDataSet::SetDrawMarker (bool <i>flag<\/i>) \u00a0<\/b><b>[inline]<\/b><br \/>\nA flag to enable\/disable drawing the marker symbol.<\/p>\n<p><b>void CDataSet::SetDrawMarkerFilled (bool <i>flag<\/i>) \u00a0<\/b><b>[inline]<\/b><br \/>\nA flag to enable\/disable filling the interior of the marker symbol.<\/p>\n<p><b>void CDataSet::SetLineWidth (double <i>lineWidth<\/i>) \u00a0<\/b><b>[inline]<\/b><br \/>\nSets the line width that will be used in drawing the line representing the dataset.<\/p>\n<p><b>void CDataSet::SetMarkerSize (double <i>size<\/i>) \u00a0<\/b><b>[inline]<\/b><br \/>\nSets the marker symbol size used in drawing the dataset.<\/p>\n<p><b>void CDataSet::SetMarkerSymbol (string <i>symbol<\/i>) \u00a0<\/b><b>[inline]<\/b><br \/>\nSets the marker symbol used in drawing the dataset. See the declaration of variable for the available types.<\/p>\n<p><b>Member Data Documentation<\/b><\/p>\n<p><b>bool CDataSet::m_bDashedLine \u00a0<\/b><b>[protected]<\/b><br \/>\nBoolean flag to enable\/disable drawing of a dashed line connecting data points.<\/p>\n<p><b>bool CDataSet::m_bDrawLine \u00a0<\/b><b>[protected]<\/b><br \/>\nBoolean flag to enable\/disable drawing of the line connecting data points.<\/p>\n<p><b>bool CDataSet::m_bDrawMarker \u00a0<\/b><b>[protected]<\/b><br \/>\nBoolean flag to enable\/disable drawing of the marker at the location of data points.<\/p>\n<p><b>bool CDataSet::m_bDrawMarkerFilled \u00a0<\/b><b>[protected]<\/b><br \/>\nBoolean flag to enable\/disable infilling of the marker at the location of data points.<\/p>\n<p><b>double CDataSet::m_dColor[3] \u00a0<\/b><b>[protected]<\/b><br \/>\nThe color of the line drawn to connect data points.<\/p>\n<p><b>vector&lt;CDataPoint&gt; CDataSet::m_dDataPoints \u00a0<\/b><b>[protected]<\/b><br \/>\nA vector storage for the data points.<\/p>\n<p><b>double CDataSet::m_dLineWidth \u00a0<\/b><b>[protected]<\/b><br \/>\nThe width of the line drawn to connect data points.<\/p>\n<p><b>double CDataSet::m_dMarkerSize \u00a0<\/b><b>[protected]<\/b><br \/>\nThe size of the marker drawn at each data point.<\/p>\n<p><b>string CDataSet::m_iDashedLinePattern \u00a0<\/b><b>[protected]<\/b><br \/>\nThe dashed line pattern drawn to connect data points, the possibilites are (strings): &#8220;dot&#8221;, &#8220;dash&#8221; or &#8220;dash_dot&#8221;.<\/p>\n<p><b>string CDataSet::m_strDatasetLegendFont \u00a0<\/b><b>[protected]<\/b><br \/>\nSize of the font used to show the dataset&#8217;s title in the legend.<\/p>\n<p><b>string CDataSet::m_strDatasetTitle \u00a0<\/b><b>[protected]<\/b><br \/>\nStorage for the dataset&#8217;s title.<\/p>\n<p><b>string CDataSet::m_strMarker \u00a0<\/b><b>[protected]<\/b><br \/>\nThe style for the marker drawn at each data point, possibilities are (strings): &#8220;x&#8221;, &#8220;o&#8221;, &#8220;*&#8221;, &#8220;diamond&#8221;, &#8220;square&#8221;, &#8220;triangle&#8221;.<\/p>\n<p><b>CPlot2D Class Reference<\/b><\/p>\n<p>#include &lt;CPlot2D.h&gt;<\/p>\n<p><b>Public Member Functions<\/b><\/p>\n<p><b>CPlot2D<\/b> ()<br \/>\n<b>~CPlot2D<\/b> ()<br \/>\nvoid <b>SetXTotalSize<\/b> (double value)<br \/>\ndouble <b>GetXTotalSize<\/b> ()<br \/>\nvoid <b>SetYTotalSize<\/b> (double value)<br \/>\ndouble <b>GetYTotalSize<\/b> ()<br \/>\nvoid <b>SetXAxisSize<\/b> (double value)<br \/>\ndouble <b>GetXAxisSize<\/b> ()<br \/>\nvoid <b>SetYAxisSize<\/b> (double value)<br \/>\ndouble <b>GetYAxisSize<\/b> ()<br \/>\nvoid <b>SetBottomFrameSize<\/b> (double value)<br \/>\ndouble <b>GetBottomFrameSize<\/b> ()<br \/>\nvoid <b>SetRightFrameSize<\/b> (double value)<br \/>\ndouble <b>GetRightFrameSize<\/b> ()<br \/>\nvoid <b>SetTopFrameSize<\/b> (double value)<br \/>\ndouble <b>GetTopFrameSize<\/b> ()<br \/>\nvoid <b>SetLeftFrameSize<\/b> (double value)<br \/>\ndouble <b>GetLeftFrameSize<\/b> ()<br \/>\nvoid <b>SetFrameLineWidth<\/b> (double value)<br \/>\ndouble <b>GetFrameLineWidth<\/b> ()<br \/>\nvoid <b>SetGridLineWidth<\/b> (double value)<br \/>\ndouble <b>GetGridLineWidth<\/b> ()<br \/>\nvoid <b>SetFrameColor<\/b> (double r, double g, double b)<br \/>\nvoid <b>GetFrameColor<\/b> (double *r, double *g, double *b)<br \/>\nvoid <b>SetGridColor<\/b> (double r, double g, double b)<br \/>\nvoid <b>GetGridColor<\/b> (double *r, double *g, double *b)<br \/>\nvoid <b>SetXAxisNumbersSpacing<\/b> (double spacing)<br \/>\ndouble <b>GetXAxisNumbersSpacing<\/b> ()<br \/>\nvoid <b>SetYAxisNumbersSpacing<\/b> (double spacing)<br \/>\ndouble <b>GetYAxisNumbersSpacing<\/b> ()<br \/>\nvoid <b>SetDrawXAxisTickMarks<\/b> (bool flag)<br \/>\nbool <b>GetDrawXAxisTickMarks<\/b> ()<br \/>\nvoid <b>SetDrawYAxisTickMarks<\/b> (bool flag)<br \/>\nbool <b>GetDrawYAxisTickMarks<\/b> ()<br \/>\nvoid <b>SetXAxisNumberOfTicks<\/b> (int number)<br \/>\nint <b>GetXAxisNumberOfTicks<\/b> ()<br \/>\nvoid <b>SetYAxisNumberOfTicks<\/b> (int number)<br \/>\nint <b>GetYAxisNumberOfTicks<\/b> ()<br \/>\nvoid <b>SetDrawXAxisGridLines<\/b> (bool flag)<br \/>\nbool <b>GetDrawXAxisGridLines<\/b> ()<br \/>\nvoid <b>SetDrawYAxisGridLines<\/b> (bool flag)<br \/>\nbool <b>GetDrawYAxisGridLines<\/b> ()<br \/>\nvoid <b>SetDrawGridLinesDashed<\/b> (bool flag)<br \/>\nbool <b>GetDrawGridLinesDashed<\/b> ()<br \/>\nvoid <b>SetXAxisLabelFont<\/b> (string font)<br \/>\nstring <b>GetXAxisLabelFont<\/b> ()<br \/>\nvoid <b>SetXAxisLabelFontSize<\/b> (double value)<br \/>\ndouble <b>GetXAxisLabelFontSize<\/b> ()<br \/>\nvoid <b>SetYAxisLabelFont<\/b> (string font)<br \/>\nstring <b>GetYAxisLabelFont<\/b> ()<br \/>\nvoid <b>SetYAxisLabelFontSize<\/b> (double value)<br \/>\ndouble <b>GetYAxisLabelFontSize<\/b> ()<br \/>\nvoid <b>SetXAxisTitleFont<\/b> (string font)<br \/>\nstring <b>GetXAxisTitleFont<\/b> ()<br \/>\nvoid <b>SetXAxisTitleFontSize<\/b> (double value)<br \/>\ndouble <b>GetXAxisTitleFontSize<\/b> ()<br \/>\nvoid <b>SetYAxisTitleFont<\/b> (string font)<br \/>\nstring <b>GetYAxisTitleFont<\/b> ()<br \/>\nvoid <b>SetYAxisTitleFontSize<\/b> (double value)<br \/>\ndouble <b>GetYAxisTitleFontSize<\/b> ()<br \/>\nvoid <b>SetXAxisTitle<\/b> (string title)<br \/>\nstring <b>GetXAxisTitle<\/b> ()<br \/>\nvoid <b>SetYAxisTitle<\/b> (string title)<br \/>\nstring <b>GetYAxisTitle<\/b> ()<br \/>\nvoid <b>SetXAxisTitleColor<\/b> (double r, double g, double b)<br \/>\nvoid <b>GetXAxisTitleColor<\/b> (double *r, double *g, double *b)<br \/>\nvoid <b>SetYAxisTitleColor<\/b> (double r, double g, double b)<br \/>\nvoid <b>GetYAxisTitleColor<\/b> (double *r, double *g, double *b)<br \/>\nvoid <b>SetXAxisLabelColor<\/b> (double r, double g, double b)<br \/>\nvoid <b>GetXAxisLabelColor<\/b> (double *r, double *g, double *b)<br \/>\nvoid <b>SetYAxisLabelColor<\/b> (double r, double g, double b)<br \/>\nvoid <b>GetYAxisLabelColor<\/b> (double *r, double *g, double *b)<br \/>\nvoid <b>SetDrawLegend<\/b> (bool flag)<br \/>\nbool <b>GetDrawLegend<\/b> ()<br \/>\nvoid <b>OutputPostScriptPlot<\/b> (string fileName)<br \/>\nvoid <b>AddDataSet<\/b> (<b>CDataSet<\/b> dataSet)<br \/>\nvoid <b>AddDataSet<\/b> (int numPoints, double *xValues, double *yValues)<\/p>\n<p><b>Protected Member Functions<\/b><\/p>\n<p>void <b>PrecomputeDimensions<\/b> ()<br \/>\nvoid <b>ComputeLabelTickSpacing<\/b> (double dataMin, double dataMax, double *plotMin, double *plotMax, double *tickSpacing, int numTicks, string axis)<br \/>\ndouble <b>NiceNum<\/b> (double x, int round)<br \/>\nvoid <b>DrawFramePostScript<\/b> ()<br \/>\nvoid <b>DrawDataPostScript<\/b> ()<br \/>\nvoid <b>DrawMarker<\/b> (string symbol, double size, bool filled, double xLocation, double yLocation, int dataSet)<br \/>\nvoid <b>DrawXAxisTickMarksPostScript<\/b> ()<br \/>\nvoid <b>DrawYAxisTickMarksPostScript<\/b> ()<br \/>\nvoid <b>DrawXAxisGridLinesPostScript<\/b> ()<br \/>\nvoid <b>DrawYAxisGridLinesPostScript<\/b> ()<br \/>\nvoid <b>DrawXAxisLabelsPostScript<\/b> ()<br \/>\nvoid <b>DrawYAxisLabelsPostScript<\/b> ()<br \/>\nvoid <b>DrawXAxisTitlePostScript<\/b> ()<br \/>\nvoid <b>DrawYAxisTitlePostScript<\/b> ()<br \/>\nvoid <b>DrawLegendPostScript<\/b> ()<\/p>\n<p><b>Protected Attributes<\/b><\/p>\n<p>double <b>m_dXTotalSize<\/b><br \/>\ndouble <b>m_dYTotalSize<\/b><br \/>\ndouble <b>m_dXAxisSize<\/b><br \/>\ndouble <b>m_dYAxisSize<\/b><br \/>\ndouble <b>m_dDiagonalSize<\/b><br \/>\ndouble <b>m_dBottomFrameSize<\/b><br \/>\ndouble <b>m_dRightFrameSize<\/b><br \/>\ndouble <b>m_dTopFrameSize<\/b><br \/>\ndouble <b>m_dLeftFrameSize<\/b><br \/>\nint <b>m_iXAxisNumberOfTicks<\/b><br \/>\nint <b>m_iYAxisNumberOfTicks<\/b><br \/>\ndouble <b>m_dXAxisNumbersSpacing<\/b><br \/>\ndouble <b>m_dYAxisNumbersSpacing<\/b><br \/>\nchar <b>m_cXAxisLabelFormat<\/b> [10]<br \/>\nchar <b>m_cYAxisLabelFormat<\/b> [10]<br \/>\nvector&lt; string &gt; <b>m_strXAxisLabels<\/b><br \/>\nvector&lt; string &gt; <b>m_strYAxisLabels<\/b><br \/>\nstring <b>m_strXAxisTitle<\/b><br \/>\nstring <b>m_strYAxisTitle<\/b><br \/>\nint <b>m_iXAxisNumberOfLabels<\/b><br \/>\nint <b>m_iYAxisNumberOfLabels<\/b><br \/>\ndouble <b>m_dXScale<\/b><br \/>\ndouble <b>m_dYScale<\/b><br \/>\ndouble <b>m_dMaxXExtent<\/b><br \/>\ndouble <b>m_dMaxYExtent<\/b><br \/>\ndouble <b>m_dMinXStartPoint<\/b><br \/>\ndouble <b>m_dMinYStartPoint<\/b><br \/>\ndouble <b>m_dMaxXEndPoint<\/b><br \/>\ndouble <b>m_dMaxYEndPoint<\/b><br \/>\ndouble <b>m_dFrameLineWidth<\/b><br \/>\ndouble <b>m_dGridLineWidth<\/b><br \/>\ndouble <b>m_dFrameColor<\/b> [3]<br \/>\ndouble <b>m_dGridColor<\/b> [3]<br \/>\ndouble <b>m_dXAxisTitleColor<\/b> [3]<br \/>\ndouble <b>m_dYAxisTitleColor<\/b> [3]<br \/>\ndouble <b>m_dXAxisLabelColor<\/b> [3]<br \/>\ndouble <b>m_dYAxisLabelColor<\/b> [3]<br \/>\ndouble <b>m_dLineDotSpacing<\/b><br \/>\ndouble <b>m_dTickMarkLength<\/b><br \/>\nstring <b>m_strXAxisLabelFont<\/b><br \/>\ndouble <b>m_dXAxisLabelFontSize<\/b><br \/>\nstring <b>m_strYAxisLabelFont<\/b><br \/>\ndouble <b>m_dYAxisLabelFontSize<\/b><br \/>\nstring <b>m_strXAxisTitleFont<\/b><br \/>\ndouble <b>m_dXAxisTitleFontSize<\/b><br \/>\nstring <b>m_strYAxisTitleFont<\/b><br \/>\ndouble <b>m_dYAxisTitleFontSize<\/b><br \/>\nbool <b>m_bDrawXAxisTickMarks<\/b><br \/>\nbool <b>m_bDrawYAxisTickMarks<\/b><br \/>\nbool <b>m_bDrawXAxisGridLines<\/b><br \/>\nbool <b>m_bDrawYAxisGridLines<\/b><br \/>\nbool <b>m_bDrawGridLinesDashed<\/b><br \/>\nbool <b>m_bDrawLegend<\/b><br \/>\nofstream <b>outputFile<\/b><br \/>\n<b><\/b>vector&lt; <b>CDataSet<\/b> &gt; <b>m_dataSets<\/b><\/p>\n<p><b>Detailed Description<\/b><\/p>\n<p style=\"text-align: justify;\">The class responsible for storing and rendering all the data sets it contains. Although the currently implemented method for rendering of a plot is into a PostScript file, it is envisioned that other rendering methods, such as OpenGL can be implemented as well. The accessors are created for both setting and retrieving plot parameters.<\/p>\n<p><b>Constructor &amp; Destructor Documentation<\/b><\/p>\n<p><b>CPlot2D::CPlot2D ()<\/b><br \/>\nThe constructor for the class. Member variables are initialized to a set of values, which results in a, hopefully, pleasing plot without changing any of them.<\/p>\n<p><b>CPlot2D::~CPlot2D ()<\/b><br \/>\nNothing really to destruct&#8230;<\/p>\n<p><b>Member Function Documentation<\/b><\/p>\n<p><b>void CPlot2D::AddDataSet (CDataSet <i>dataSet<\/i>) \u00a0<\/b><b>[inline]<\/b><br \/>\nAdds a new dataset to the plot.<\/p>\n<p><b>void CPlot2D::AddDataSet (int <i>numPoints<\/i>, double * <i>xValues<\/i>, double * <i>yValues<\/i>)<\/b><br \/>\nAdds a new dataset to the plot as two arrays comprised of the x and y values. The length of the array is supplied as well.<\/p>\n<p><b>void CPlot2D::ComputeLabelTickSpacing (double <i>dataMin<\/i>, double <i>dataMax<\/i>, double * <i>plotMin<\/i>, double * <i>plotMax<\/i>, double * <i>tickSpacing<\/i>, int <i>numTicks<\/i>, string <i>axis<\/i>) \u00a0<\/b><b>[protected]<\/b><br \/>\nA function to compute label spacing, see the comments at the head of the implementation regarding the source of the algorithm.<\/p>\n<p><b>void CPlot2D::DrawDataPostScript () \u00a0<\/b><b>[protected]<\/b><br \/>\nA function to draw the data sets in a PostScript format.<\/p>\n<p><b>void CPlot2D::DrawFramePostScript () \u00a0<\/b><b>[protected]<\/b><br \/>\nA function to draw the frame surrounding the plot in a PostScript format.<\/p>\n<p><b>void CPlot2D::DrawLegendPostScript () \u00a0<\/b><b>[protected]<\/b><br \/>\nA function to draw the legend in a PostScript format.<\/p>\n<p><b>void CPlot2D::DrawMarker (string <i>symbol<\/i>, double <i>size<\/i>, bool <i>filled<\/i>, double <i>xLocation<\/i>, double <i>yLocation<\/i>, int <i>dataSet<\/i>) \u00a0<\/b><b>[protected]<\/b><br \/>\nA function to draw a single marker in a PostScript format.<\/p>\n<p><b>void CPlot2D::DrawXAxisGridLinesPostScript () \u00a0<\/b><b>[protected]<\/b><br \/>\nA function to draw the x axis grid lines in a PostScript format.<\/p>\n<p><b>void CPlot2D::DrawXAxisLabelsPostScript () \u00a0<\/b><b>[protected]<\/b><br \/>\nA function to draw the x axis labels in a PostScript format.<\/p>\n<p><b>void CPlot2D::DrawXAxisTickMarksPostScript () \u00a0<\/b><b>[protected]<\/b><br \/>\nA function to draw the x axis tick marks in a PostScript format.<\/p>\n<p><b>void CPlot2D::DrawXAxisTitlePostScript () \u00a0<\/b><b>[protected]<\/b><br \/>\nA function to draw the x axis title in a PostScript format.<\/p>\n<p><b>void CPlot2D::DrawYAxisGridLinesPostScript () \u00a0<\/b><b>[protected]<\/b><br \/>\nA function to draw the y axis grid lines in a PostScript format.<\/p>\n<p><b>void CPlot2D::DrawYAxisLabelsPostScript () \u00a0<\/b><b>[protected]<\/b><br \/>\nA function to draw the y axis labels in a PostScript format.<\/p>\n<p><b>void CPlot2D::DrawYAxisTickMarksPostScript () \u00a0<\/b><b>[protected]<\/b><br \/>\nA function to draw the y axis tick marks in a PostScript format.<\/p>\n<p><b>void CPlot2D::DrawYAxisTitlePostScript () \u00a0<\/b><b>[protected]<\/b><br \/>\nA function to draw the y axis title in a PostScript format.<\/p>\n<p><b>double CPlot2D::GetBottomFrameSize () \u00a0<\/b><b>[inline]<\/b><br \/>\nGets the bottom frame of the plot (e.g. the distance from the bottom of the image to the plot frame.<\/p>\n<p><b>bool CPlot2D::GetDrawGridLinesDashed () \u00a0<\/b><b>[inline]<\/b><br \/>\nGets the state of a flag that enables\/disables the drawing of dashed grid lines.<\/p>\n<p><b>bool CPlot2D::GetDrawLegend () \u00a0<\/b><b>[inline]<\/b><br \/>\nGet the state of a flag that enables\/disables drawing the legend.<\/p>\n<p><b>bool CPlot2D::GetDrawXAxisGridLines () \u00a0<\/b><b>[inline]<\/b><br \/>\nGets the state of a flag that enables\/disables the drawing of grid lines for the x axis.<\/p>\n<p><b>bool CPlot2D::GetDrawXAxisTickMarks () \u00a0<\/b><b>[inline]<\/b><br \/>\nGets the state of a flag which enables\/disables drawing the x axis labels.<\/p>\n<p><b>bool CPlot2D::GetDrawYAxisGridLines () \u00a0<\/b><b>[inline]<\/b><br \/>\nGets the state of a flag that enables\/disables the drawing of grid lines for the y axis.<\/p>\n<p><b>bool CPlot2D::GetDrawYAxisTickMarks () \u00a0<\/b><b>[inline]<\/b><br \/>\nGets the state of a flag which enables\/disables drawing the y axis labels.<\/p>\n<p><b>void CPlot2D::GetFrameColor (double * <i>r<\/i>, double * <i>g<\/i>, double * <i>b<\/i>) \u00a0<\/b><b>[inline]<\/b><br \/>\nGets the color of the frame as an RGB triplet.<\/p>\n<p><b>double CPlot2D::GetFrameLineWidth () \u00a0<\/b><b>[inline]<\/b><br \/>\nGets the thickness of the line that the plot frame is drawn with.<\/p>\n<p><b>void CPlot2D::GetGridColor (double * <i>r<\/i>, double * <i>g<\/i>, double * <i>b<\/i>) \u00a0<\/b><b>[inline]<\/b><br \/>\nGets the color of the grid as an RGB triplet.<\/p>\n<p><b>double CPlot2D::GetGridLineWidth () \u00a0<\/b><b>[inline]<\/b><br \/>\nGets the thickness of the line that the grid is drawn with.<\/p>\n<p><b>double CPlot2D::GetLeftFrameSize () \u00a0<\/b><b>[inline]<\/b><br \/>\nGets the left frame of the plot (e.g. the distance from the left of the image to the plot frame.<\/p>\n<p><b>double CPlot2D::GetRightFrameSize () \u00a0<\/b><b>[inline]<\/b><br \/>\nGets the right frame of the plot (e.g. the distance from the right of the image to the plot frame.<\/p>\n<p><b>double CPlot2D::GetTopFrameSize () \u00a0<\/b><b>[inline]<\/b><br \/>\nGets the top frame of the plot (e.g. the distance from the top of the image to the plot frame.<\/p>\n<p><b>void CPlot2D::GetXAxisLabelColor (double * <i>r<\/i>, double * <i>g<\/i>, double * <i>b<\/i>) \u00a0<\/b><b>[inline]<\/b><br \/>\nGets the color, as an RGB triplet, for the x axis labels.<\/p>\n<p><b>string CPlot2D::GetXAxisLabelFont () \u00a0<\/b><b>[inline]<\/b><br \/>\nGets the font (as a string) that is used for the labels on the x axis.<\/p>\n<p><b>double CPlot2D::GetXAxisLabelFontSize () \u00a0<\/b><b>[inline]<\/b><br \/>\nGets the font size for the x axis labels.<\/p>\n<p><b>int CPlot2D::GetXAxisNumberOfTicks () \u00a0<\/b><b>[inline]<\/b><br \/>\nGets the number of tick marks and labels along the x axis.<\/p>\n<p><b>double CPlot2D::GetXAxisNumbersSpacing () \u00a0<\/b><b>[inline]<\/b><br \/>\nGets the spacing of tick marks and labels along the x axis.<\/p>\n<p><b>double CPlot2D::GetXAxisSize () \u00a0<\/b><b>[inline]<\/b><br \/>\nGets the x axis size of the plot.<\/p>\n<p><b>string CPlot2D::GetXAxisTitle () \u00a0<\/b><b>[inline]<\/b><br \/>\nGets the title for the x axis.<\/p>\n<p><b>void CPlot2D::GetXAxisTitleColor (double * <i>r<\/i>, double * <i>g<\/i>, double * <i>b<\/i>) \u00a0<\/b><b>[inline]<\/b><br \/>\nGets the color, as an RGB triplet, for the x axis title.<\/p>\n<p><b>string CPlot2D::GetXAxisTitleFont () \u00a0<\/b><b>[inline]<\/b><br \/>\nGets the font (as a string) that is used for the title on the legend for the x axis.<\/p>\n<p><b>double CPlot2D::GetXAxisTitleFontSize () \u00a0<\/b><b>[inline]<\/b><br \/>\nGets the font size that is used for the title on the legend for the x axis.<\/p>\n<p><b>double CPlot2D::GetXTotalSize () \u00a0<\/b><b>[inline]<\/b><br \/>\nGets the total size of the plot in the x dimension.<\/p>\n<p><b>void CPlot2D::GetYAxisLabelColor (double * <i>r<\/i>, double * <i>g<\/i>, double * <i>b<\/i>) \u00a0<\/b><b>[inline]<\/b><br \/>\nGets the color, as an RGB triplet, for the y axis labels.<\/p>\n<p><b>string CPlot2D::GetYAxisLabelFont () \u00a0<\/b><b>[inline]<\/b><br \/>\nGets the font (as a string) that is used for the labels on the y axis.<\/p>\n<p><b>double CPlot2D::GetYAxisLabelFontSize () \u00a0<\/b><b>[inline]<\/b><br \/>\nGets the font size for the y axis labels.<\/p>\n<p><b>int CPlot2D::GetYAxisNumberOfTicks () \u00a0<\/b><b>[inline]<\/b><br \/>\nGets the number of tick marks and labels along the y axis.<\/p>\n<p><b>double CPlot2D::GetYAxisNumbersSpacing () \u00a0<\/b><b>[inline]<\/b><br \/>\nGets the spacing of tick marks and labels along the y axis.<\/p>\n<p><b>double CPlot2D::GetYAxisSize () \u00a0<\/b><b>[inline]<\/b><br \/>\nGets the y axis size of the plot.<\/p>\n<p><b>string CPlot2D::GetYAxisTitle () \u00a0<\/b><b>[inline]<\/b><br \/>\nGets the title for the y axis.<\/p>\n<p><b>void CPlot2D::GetYAxisTitleColor (double * <i>r<\/i>, double * <i>g<\/i>, double * <i>b<\/i>) \u00a0<\/b><b>[inline]<\/b><br \/>\nGets the color, as an RGB triplet, for the y axis title.<\/p>\n<p><b>string CPlot2D::GetYAxisTitleFont () \u00a0<\/b><b>[inline]<\/b><br \/>\nGets the font (as a string) that is used for the title on the legend for the x axis.<\/p>\n<p><b>double CPlot2D::GetYAxisTitleFontSize () \u00a0<\/b><b>[inline]<\/b><br \/>\nGets the font size that is used for the title on the legend for the y axis.<\/p>\n<p><b>double CPlot2D::GetYTotalSize () \u00a0<\/b><b>[inline]<\/b><br \/>\nGets the total size of the plot in the y dimension.<\/p>\n<p><b>double CPlot2D::NiceNum (double <i>x<\/i>, int <i>round<\/i>) \u00a0<\/b><b>[protected]<\/b><br \/>\nA function to aid the computation of label spacing, see the comments at the head of the implementation regarding the source of the algorithm.<\/p>\n<p><b>void CPlot2D::OutputPostScriptPlot (string <i>fileName<\/i>)<\/b><br \/>\nThe function, which is responsible for generating the PostScript output of the plot.<\/p>\n<p><b>void CPlot2D::PrecomputeDimensions () \u00a0<\/b><b>[protected]<\/b><br \/>\nA function, which precomputes parameters of the plot, such as the overal size of the plot, the spacing of tick marks and labels, the length of the dashes in a dashed line.<\/p>\n<p><b>void CPlot2D::SetBottomFrameSize (double <i>value<\/i>) \u00a0<\/b><b>[inline]<\/b><br \/>\nSets the bottom frame of the plot (e.g. the distance from the bottom of the image to the plot frame.<\/p>\n<p><b>void CPlot2D::SetDrawGridLinesDashed (bool <i>flag<\/i>) \u00a0<\/b><b>[inline]<\/b><br \/>\nSets a flag that enables\/disables the drawing of dashed grid lines.<\/p>\n<p><b>void CPlot2D::SetDrawLegend (bool <i>flag<\/i>) \u00a0<\/b><b>[inline]<\/b><br \/>\nSet a flag to enable\/disable drawing the legend.<\/p>\n<p><b>void CPlot2D::SetDrawXAxisGridLines (bool <i>flag<\/i>) \u00a0<\/b><b>[inline]<\/b><br \/>\nSets a flag that enables\/disables the drawing of grid lines for the x axis.<\/p>\n<p><b>void CPlot2D::SetDrawXAxisTickMarks (bool <i>flag<\/i>) \u00a0<\/b><b>[inline]<\/b><br \/>\nSets a flag to enable\/disable drawing the x axis labels.<\/p>\n<p><b>void CPlot2D::SetDrawYAxisGridLines (bool <i>flag<\/i>) \u00a0<\/b><b>[inline]<\/b><br \/>\nSets a flag that enables\/disables the drawing of grid lines for the y axis.<\/p>\n<p><b>void CPlot2D::SetDrawYAxisTickMarks (bool <i>flag<\/i>) \u00a0<\/b><b>[inline]<\/b><br \/>\nSets a flag to enable\/disable drawing the y axis labels.<\/p>\n<p><b>void CPlot2D::SetFrameColor (double <i>r<\/i>, double <i>g<\/i>, double <i>b<\/i>) \u00a0<\/b><b>[inline]<\/b><br \/>\nSets the color of the frame as an RGB triplet.<\/p>\n<p><b>void CPlot2D::SetFrameLineWidth (double <i>value<\/i>) \u00a0<\/b><b>[inline]<\/b><br \/>\nSets the thickness of the line that the plot frame is drawn with.<\/p>\n<p><b>void CPlot2D::SetGridColor (double <i>r<\/i>, double <i>g<\/i>, double <i>b<\/i>) \u00a0<\/b><b>[inline]<\/b><br \/>\nSets the color of the grid as an RGB triplet.<\/p>\n<p><b>void CPlot2D::SetGridLineWidth (double <i>value<\/i>) \u00a0<\/b><b>[inline]<\/b><br \/>\nSets the thickness of the line that the grid is drawn with.<\/p>\n<p><b>void CPlot2D::SetLeftFrameSize (double <i>value<\/i>) \u00a0<\/b><b>[inline]<\/b><br \/>\nSets the left frame of the plot (e.g. the distance from the left of the image to the plot frame.<\/p>\n<p><b>void CPlot2D::SetRightFrameSize (double <i>value<\/i>) \u00a0<\/b><b>[inline]<\/b><br \/>\nSets the right frame of the plot (e.g. the distance from the right of the image to the plot frame.<\/p>\n<p><b>void CPlot2D::SetTopFrameSize (double <i>value<\/i>) \u00a0<\/b><b>[inline]<\/b><br \/>\nSets the top frame of the plot (e.g. the distance from the top of the image to the plot frame.<\/p>\n<p><b>void CPlot2D::SetXAxisLabelColor (double <i>r<\/i>, double <i>g<\/i>, double <i>b<\/i>) \u00a0<\/b><b>[inline]<\/b><br \/>\nSets the color, as an RGB triplet, for the x axis labels.<\/p>\n<p><b>void CPlot2D::SetXAxisLabelFont (string <i>font<\/i>) \u00a0<\/b><b>[inline]<\/b><br \/>\nSets the font (as a string) that is used for the labels on the x axis.<\/p>\n<p><b>void CPlot2D::SetXAxisLabelFontSize (double <i>value<\/i>) \u00a0<\/b><b>[inline]<\/b><br \/>\nSets the font size for the x axis labels.<\/p>\n<p><b>void CPlot2D::SetXAxisNumberOfTicks (int <i>number<\/i>) \u00a0<\/b><b>[inline]<\/b><br \/>\nSets the number of tick marks and labels along the x axis.<\/p>\n<p><b>void CPlot2D::SetXAxisNumbersSpacing (double <i>spacing<\/i>) \u00a0<\/b><b>[inline]<\/b><br \/>\nSets the spacing of tick marks and labels along the x axis.<\/p>\n<p><b>void CPlot2D::SetXAxisSize (double <i>value<\/i>) \u00a0<\/b><b>[inline]<\/b><br \/>\nSets the x axis size of the plot.<\/p>\n<p><b>void CPlot2D::SetXAxisTitle (string <i>title<\/i>) \u00a0<\/b><b>[inline]<\/b><br \/>\nSets the title for the x axis. Usually this is where the units or quantity represented by the data should be displayed goes.<\/p>\n<p><b>void CPlot2D::SetXAxisTitleColor (double <i>r<\/i>, double <i>g<\/i>, double <i>b<\/i>) \u00a0<\/b><b>[inline]<\/b><br \/>\nSets the color, as an RGB triplet, for the x axis title.<\/p>\n<p><b>void CPlot2D::SetXAxisTitleFont (string <i>font<\/i>) \u00a0<\/b><b>[inline]<\/b><br \/>\nSets the font (as a string) that is used for the title on the legend for the x axis.<\/p>\n<p><b>void CPlot2D::SetXAxisTitleFontSize (double <i>value<\/i>) \u00a0<\/b><b>[inline]<\/b><br \/>\nSets the font size that is used for the title on the legend for the x axis.<\/p>\n<p><b>void CPlot2D::SetXTotalSize (double <i>value<\/i>) \u00a0<\/b><b>[inline]<\/b><br \/>\nSets the total size of the plot in the x dimension.<\/p>\n<p><b>void CPlot2D::SetYAxisLabelColor (double <i>r<\/i>, double <i>g<\/i>, double <i>b<\/i>) \u00a0<\/b><b>[inline]<\/b><br \/>\nSets the color, as an RGB triplet, for the y axis labels.<\/p>\n<p><b>void CPlot2D::SetYAxisLabelFont (string <i>font<\/i>) \u00a0<\/b><b>[inline]<\/b><br \/>\nSets the font (as a string) that is used for the labels on the y axis.<\/p>\n<p><b>void CPlot2D::SetYAxisLabelFontSize (double <i>value<\/i>) \u00a0<\/b><b>[inline]<\/b><br \/>\nSet the font size for the y axis labels.<\/p>\n<p><b>void CPlot2D::SetYAxisNumberOfTicks (int <i>number<\/i>) \u00a0<\/b><b>[inline]<\/b><br \/>\nSets the number of tick marks and labels along the y axis.<\/p>\n<p><b>void CPlot2D::SetYAxisNumbersSpacing (double <i>spacing<\/i>) \u00a0<\/b><b>[inline]<\/b><br \/>\nSets the spacing of tick marks and labels along the y axis.<\/p>\n<p><b>void CPlot2D::SetYAxisSize (double <i>value<\/i>) \u00a0<\/b><b>[inline]<\/b><br \/>\nSets the y axis size of the plot.<\/p>\n<p><b>void CPlot2D::SetYAxisTitle (string <i>title<\/i>) \u00a0<\/b><b>[inline]<\/b><br \/>\nSets the title for the y axis. Usually this is where the units or quantity represented by the data should be displayed goes.<\/p>\n<p><b>void CPlot2D::SetYAxisTitleColor (double <i>r<\/i>, double <i>g<\/i>, double <i>b<\/i>) \u00a0<\/b><b>[inline]<\/b><br \/>\nSets the color, as an RGB triplet, for the y axis title.<\/p>\n<p><b>void CPlot2D::SetYAxisTitleFont (string <i>font<\/i>) \u00a0<\/b><b>[inline]<\/b><br \/>\nSets the font (as a string) that is used for the title on the legend for the y axis.<\/p>\n<p><b>void CPlot2D::SetYAxisTitleFontSize (double <i>value<\/i>) \u00a0<\/b><b>[inline]<\/b><br \/>\nSets the font size that is used for the title on the legend for the y axis.<\/p>\n<p><b>void CPlot2D::SetYTotalSize (double <i>value<\/i>) \u00a0<\/b><b>[inline]<\/b><br \/>\nSets the total size of the plot in the y dimension.<\/p>\n<p><b>Member Data Documentation<\/b><\/p>\n<p><b>bool CPlot2D::m_bDrawGridLinesDashed \u00a0<\/b><b>[protected]<\/b><br \/>\nFlag for enabling\/disabling the drawing dashed grid lines.<\/p>\n<p><b>bool CPlot2D::m_bDrawLegend \u00a0<\/b><b>[protected]<\/b><br \/>\nFlag for enabling\/disabling the drawing of the legend.<\/p>\n<p><b>bool CPlot2D::m_bDrawXAxisGridLines \u00a0<\/b><b>[protected]<\/b><br \/>\nFlag for enabling\/disabling the drawing of x axis grid lines.<\/p>\n<p><b>bool CPlot2D::m_bDrawXAxisTickMarks \u00a0<\/b><b>[protected]<\/b><br \/>\nFlag for enabling\/disabling the drawing of x axis tick marks.<\/p>\n<p><b>bool CPlot2D::m_bDrawYAxisGridLines \u00a0<\/b><b>[protected]<\/b><br \/>\nFlag for enabling\/disabling the drawing of y axis grid lines.<\/p>\n<p><b>bool CPlot2D::m_bDrawYAxisTickMarks \u00a0<\/b><b>[protected]<\/b><br \/>\nFlag for enabling\/disabling the drawing of y axis tick marks.<\/p>\n<p><b>char CPlot2D::m_cXAxisLabelFormat[10] \u00a0<\/b><b>[protected]<\/b><br \/>\nFormat of labels along the x axis.<\/p>\n<p><b>char CPlot2D::m_cYAxisLabelFormat[10] \u00a0<\/b><b>[protected]<\/b><br \/>\nFormat of labels along the y axis.<\/p>\n<p><b>vector&lt;CDataSet&gt; CPlot2D::m_dataSets \u00a0<\/b><b>[protected]<\/b><br \/>\nStorage for the datasets, implemented as a vector.<\/p>\n<p><b>double CPlot2D::m_dBottomFrameSize \u00a0<\/b><b>[protected]<\/b><br \/>\nThe size of the bottom frame.<\/p>\n<p><b>double CPlot2D::m_dDiagonalSize \u00a0<\/b><b>[protected]<\/b><br \/>\nThe size of the plot along its diagonal direction.<\/p>\n<p><b>double CPlot2D::m_dFrameColor[3] \u00a0<\/b><b>[protected]<\/b><br \/>\nFrame color as an RGB triplet.<\/p>\n<p><b>double CPlot2D::m_dFrameLineWidth \u00a0<\/b><b>[protected]<\/b><br \/>\nWidth (thickness) of line used for the frame.<\/p>\n<p><b>double CPlot2D::m_dGridColor[3] \u00a0<\/b><b>[protected]<\/b><br \/>\nGrid color as an RGB triplet.<\/p>\n<p><b>double CPlot2D::m_dGridLineWidth \u00a0<\/b><b>[protected]<\/b><br \/>\nWidth (thickness) of line used for the grid.<\/p>\n<p><b>double CPlot2D::m_dLeftFrameSize \u00a0<\/b><b>[protected]<\/b><br \/>\nThe size of the left frame.<\/p>\n<p><b>double CPlot2D::m_dLineDotSpacing \u00a0<\/b><b>[protected]<\/b><br \/>\nSpacing of lines and dots for a dashed line.<\/p>\n<p><b>double CPlot2D::m_dMaxXEndPoint \u00a0<\/b><b>[protected]<\/b><br \/>\nMaximum end point along x axis over all data sets.<\/p>\n<p><b>double CPlot2D::m_dMaxXExtent \u00a0<\/b><b>[protected]<\/b><br \/>\nMaximum extent of x axis.<\/p>\n<p><b>double CPlot2D::m_dMaxYEndPoint \u00a0<\/b><b>[protected]<\/b><br \/>\nMaximum end point along y axis over all data sets.<\/p>\n<p><b>double CPlot2D::m_dMaxYExtent \u00a0<\/b><b>[protected]<\/b><br \/>\nMaximum extent of y axis.<\/p>\n<p><b>double CPlot2D::m_dMinXStartPoint \u00a0<\/b><b>[protected]<\/b><br \/>\nMinimum starting point along x axis over all data sets.<\/p>\n<p><b>double CPlot2D::m_dMinYStartPoint \u00a0<\/b><b>[protected]<\/b><br \/>\nMinimum starting point along y axis over all data sets.<\/p>\n<p><b>double CPlot2D::m_dRightFrameSize \u00a0<\/b><b>[protected]<\/b><br \/>\nThe size of the right frame.<\/p>\n<p><b>double CPlot2D::m_dTickMarkLength \u00a0<\/b><b>[protected]<\/b><br \/>\nLength of tick marks.<\/p>\n<p><b>double CPlot2D::m_dTopFrameSize \u00a0<\/b><b>[protected]<\/b><br \/>\nThe size of the top frame.<\/p>\n<p><b>double CPlot2D::m_dXAxisLabelColor[3] \u00a0<\/b><b>[protected]<\/b><br \/>\nX axis label color as an RGB triplet.<\/p>\n<p><b>double CPlot2D::m_dXAxisLabelFontSize \u00a0<\/b><b>[protected]<\/b><br \/>\nFont size for x axis label.<\/p>\n<p><b>double CPlot2D::m_dXAxisNumbersSpacing \u00a0<\/b><b>[protected]<\/b><br \/>\nSpacing between tick marks along the x axis.<\/p>\n<p><b>double CPlot2D::m_dXAxisSize \u00a0<\/b><b>[protected]<\/b><br \/>\nThe size of the plot in the x direction. Not including the frames around it.<\/p>\n<p><b>double CPlot2D::m_dXAxisTitleColor[3] \u00a0<\/b><b>[protected]<\/b><br \/>\nX axis title color as an RGB triplet.<\/p>\n<p><b>double CPlot2D::m_dXAxisTitleFontSize \u00a0<\/b><b>[protected]<\/b><br \/>\nFont size for x axis title.<\/p>\n<p><b>double CPlot2D::m_dXScale \u00a0<\/b><b>[protected]<\/b><br \/>\nScale along x axis that converts dataset values to the plot space.<\/p>\n<p><b>double CPlot2D::m_dXTotalSize \u00a0<\/b><b>[protected]<\/b><br \/>\nTotal size of the plot in the x direction. Including the frames around it.<\/p>\n<p><b>double CPlot2D::m_dYAxisLabelColor[3] \u00a0<\/b><b>[protected]<\/b><br \/>\nY axis label color as an RGB triplet.<\/p>\n<p><b>double CPlot2D::m_dYAxisLabelFontSize \u00a0<\/b><b>[protected]<\/b><br \/>\nFont size for y axis label.<\/p>\n<p><b>double CPlot2D::m_dYAxisNumbersSpacing \u00a0<\/b><b>[protected]<\/b><br \/>\nSpacing between tick marks along the y axis.<\/p>\n<p><b>double CPlot2D::m_dYAxisSize \u00a0<\/b><b>[protected]<\/b><br \/>\nThe size of the plot in the y direction. Not including the frames around it.<\/p>\n<p><b>double CPlot2D::m_dYAxisTitleColor[3] \u00a0<\/b><b>[protected]<\/b><br \/>\nY axis title color as an RGB triplet.<\/p>\n<p><b>double CPlot2D::m_dYAxisTitleFontSize \u00a0<\/b><b>[protected]<\/b><br \/>\nFont size for y axis title.<\/p>\n<p><b>double CPlot2D::m_dYScale \u00a0<\/b><b>[protected]<\/b><br \/>\nScale along y axis that converts dataset values to the plot spac.<\/p>\n<p><b>double CPlot2D::m_dYTotalSize \u00a0<\/b><b>[protected]<\/b><br \/>\nTotal size of the plot in the y direction. Including the frames around it.<\/p>\n<p><b>int CPlot2D::m_iXAxisNumberOfLabels \u00a0<\/b><b>[protected]<\/b><br \/>\nNumber of labels along the x axis.<\/p>\n<p><b>int CPlot2D::m_iXAxisNumberOfTicks \u00a0<\/b><b>[protected]<\/b><br \/>\nNumber of tick marks along the x axis.<\/p>\n<p><b>int CPlot2D::m_iYAxisNumberOfLabels \u00a0<\/b><b>[protected]<\/b><br \/>\nNumber of labels along the y axis.<\/p>\n<p><b>int CPlot2D::m_iYAxisNumberOfTicks \u00a0<\/b><b>[protected]<\/b><br \/>\nNumber of tick marks along the y axis.<\/p>\n<p><b>string CPlot2D::m_strXAxisLabelFont \u00a0<\/b><b>[protected]<\/b><br \/>\nFont for x axis labels.<\/p>\n<p><b>vector&lt;string&gt; CPlot2D::m_strXAxisLabels \u00a0<\/b><b>[protected]<\/b><br \/>\nLabels along the x axis.<\/p>\n<p><b>string CPlot2D::m_strXAxisTitle \u00a0<\/b><b>[protected]<\/b><br \/>\nTitle of x axis.<\/p>\n<p><b>string CPlot2D::m_strXAxisTitleFont \u00a0<\/b><b>[protected]<\/b><br \/>\nFont for x axis title.<\/p>\n<p><b>string CPlot2D::m_strYAxisLabelFont \u00a0<\/b><b>[protected]<\/b><br \/>\nFont for yx axis label.<\/p>\n<p><b>vector&lt;string&gt; CPlot2D::m_strYAxisLabels \u00a0<\/b><b>[protected]<\/b><br \/>\nLabels along the y axis.<\/p>\n<p><b>string CPlot2D::m_strYAxisTitle \u00a0<\/b><b>[protected]<\/b><br \/>\nTitle of y axis.<\/p>\n<p><b>string CPlot2D::m_strYAxisTitleFont \u00a0<\/b><b>[protected]<\/b><br \/>\nFont for y axis title.<\/p>\n<p><b>ofstream CPlot2D::outputFile \u00a0<\/b><b>[protected]<\/b><br \/>\nThe output stream.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Get the code NOW at GitHub! In my line of work quite often\u00a0the need arises to plot something. Results of<\/p>\n<p><a href=\"https:\/\/www.amzsaki.com\/?page_id=2073\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\">CPlot2D, a simple C++ class for generating PostScript plots from within a program<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"parent":298,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"class_list":["post-2073","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/www.amzsaki.com\/index.php?rest_route=\/wp\/v2\/pages\/2073","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.amzsaki.com\/index.php?rest_route=\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/www.amzsaki.com\/index.php?rest_route=\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/www.amzsaki.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.amzsaki.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=2073"}],"version-history":[{"count":60,"href":"https:\/\/www.amzsaki.com\/index.php?rest_route=\/wp\/v2\/pages\/2073\/revisions"}],"predecessor-version":[{"id":3318,"href":"https:\/\/www.amzsaki.com\/index.php?rest_route=\/wp\/v2\/pages\/2073\/revisions\/3318"}],"up":[{"embeddable":true,"href":"https:\/\/www.amzsaki.com\/index.php?rest_route=\/wp\/v2\/pages\/298"}],"wp:attachment":[{"href":"https:\/\/www.amzsaki.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=2073"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}