From: Kyle B. <kw...@ua...> - 2014-02-02 21:55:00
|
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 I'm trying to write a small wrapper class around the c++ bindings, to be used as a general plotting lib. As part of the customization, I want to be able to select the color for window, box, label, and data points. I have most of it working, all except for the color of the box. No matter what I try, it always draws red. The relevant snippet is below. rgb_XX are arrays, where elements 0 1 2 hold the 8 bit color info. I'm using 5.9.9 in Debian testing. Thanks in advance! Kyle Bentley // Set device this->dataPlot.sdev(driver.c_str()); // Initialize a plot this->dataPlot.init(); // advance the page this->dataPlot.adv(0); // Use the default viewport, let plplot make bound decisions this->dataPlot.vsta(); // Set the background color, create a window this->dataPlot.col0(0); this->dataPlot.scol0(0, this->rgb_bg[0], this->rgb_bg[1], this->rgb_bg[2]); this->dataPlot.wind(this->x_min, this->x_max, this->y_min, this->y_max); *This is the part which I cannot get to work. It looks like all the others, but no luck - ----------------------------------------------------------------- * // Set the box color, create a box with various options this->dataPlot.col0(1); this->dataPlot.scol0(1, this->rgb_box[0], this->rgb_box[1], this->rgb_box[2]); this->dataPlot.box( "bcnst", 0, 0, "bcnstv", 0, 0 ); *-----------------------------------------------------------------* // Set the axes label color, draw the labels this->dataPlot.col0(2); this->dataPlot.scol0(2, this->rgb_axis[0], this->rgb_axis[1], this->rgb_axis[2]); this->dataPlot.lab(x_axis_label.c_str(), y_axis_label.c_str(), title.c_str()); // Set the data point color, draw the plot this->dataPlot.col0(3); this->dataPlot.scol0(3, this->rgb_point[0], this->rgb_point[1], this->rgb_point[2]); this->dataPlot.poin(x_values.size(), &y_values[0], &y_values[0], marker); -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 Comment: Using GnuPG with Icedove - http://www.enigmail.net/ iQEcBAEBAgAGBQJS7r6YAAoJEKZ75usGhR84eicH/0U9LgC9SR2RqLmcmkdVc6Fq 6sNGDwbudDYnRYdeqAEfmzsBpIF/D8upTkghir3WP5agcOdiyMCJjTbcqVBpyaJJ vy4wQ6MRdAmx9nPSnIcAlymibTPrwuYrhIFGgkDiGPy+1tGfKi/Sw1gI+UYJpQN0 MCHVf7muvAoZ4ZA0Ti3izsxyi9zgZbj5EBJKfq3ARa5vzFooADi8WueYwxPjmJrH Yejp4r65i6l+lrJXQciVS91P/2bEGhTErzuOjG6ySqEqs9UKRQnTwDT3vEK/KNvD zdFqcixPnpa/M3ssxj0MtHCDfQxp0784mI5Xypvtt0nseoe8cDe0W7j/jjNuXOc= =QvIH -----END PGP SIGNATURE----- |