|
|
|
|
|
|
| |
| |
|
|
|
|
| |
| |
|
|
I work with a lot of generated CSV files. I'm getting tired of all the mouse
clicks required to import it into Excel, and into an intelligible graph. I'd
like to write my own povray file for graphing, perhaps one that is always
perfect in "readability" no matter what render pixel size you pick.
What's the quickest way of getting a CSV-formatted data file into povray? (If I
have to do even a small amount of editing of the CSV by hand, it ruins the
benefit of the project.)
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Am 18.01.2014 17:58, schrieb gregjohn:
> I work with a lot of generated CSV files. I'm getting tired of all the mouse
> clicks required to import it into Excel, and into an intelligible graph. I'd
> like to write my own povray file for graphing, perhaps one that is always
> perfect in "readability" no matter what render pixel size you pick.
>
> What's the quickest way of getting a CSV-formatted data file into povray? (If I
> have to do even a small amount of editing of the CSV by hand, it ruins the
> benefit of the project.)
If the CSV data doesn't happen to contain trailing commas, you're out of
luck with official POV-Ray.
If you do have trailing commas (or can arrange to add them
automatically, using e.g. a unix call to sed), and also know how many
items you'll have, the fastest way is probably to populate an array with
the data using #include, then go on from there:
#declare MyArray = array[Rows * Columns] {
#include "MyData.csv"
}
If you do have trailing commas but don't know how many items to read,
you'll probably need to resort to #read.
If you don't have trailing commas, you might want to have a look
UberPOV's plaintext reading feature, which allows you to #read arbitrary
ASCII files line by line.
Maybe the quickest way to proceed from there is to write the lines right
back into a temporary file with added trailing commas, and then either
#include that file into an array (you can determine the number of items
by counting the lines in the previous steps) or #read it as a CSV as
outlined above.
(P.S.: Note that on-topic posts are off-topic in p.off-topic :-P)
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
gregjohn <pte### [at] yahoocom> wrote:
> I work with a lot of generated CSV files. I'm getting tired of all the mouse
> clicks required to import it into Excel, and into an intelligible graph.
I thought Excel supports an expressive scripting language...
--
- Warp
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
clipka <ano### [at] anonymousorg> wrote:
>
> #declare MyArray = array[Rows * Columns] {
> #include "MyData.csv"
> }
>
Okay perhaps that Rows*Columns detail is the best part of the advice, as I'm not
sure I'd've thought of it myself.
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
On 18/01/2014 07:13 PM, Warp wrote:
> gregjohn<pte### [at] yahoocom> wrote:
>> I work with a lot of generated CSV files. I'm getting tired of all the mouse
>> clicks required to import it into Excel, and into an intelligible graph.
>
> I thought Excel supports an expressive scripting language...
Well, it supports VisualBasic for Applications. Not sure I'd call that
"expressive"...
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
"gregjohn" <pte### [at] yahoocom> wrote:
> I work with a lot of generated CSV files. I'm getting tired of all the mouse
> clicks required to import it into Excel, and into an intelligible graph. I'd
> like to write my own povray file for graphing, perhaps one that is always
> perfect in "readability" no matter what render pixel size you pick.
>
> What's the quickest way of getting a CSV-formatted data file into povray? (If I
> have to do even a small amount of editing of the CSV by hand, it ruins the
> benefit of the project.)
Oh my, upon seeing a corporate directive to use Apache OpenOffice, I tried to
use Calc to import my CSV.
It interpreted
-3.5308E-07
as
'-3.5308E-07
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
> "gregjohn" <pte### [at] yahoocom> wrote:
>> I work with a lot of generated CSV files. I'm getting tired of all the mouse
>> clicks required to import it into Excel, and into an intelligible graph. I'd
>> like to write my own povray file for graphing, perhaps one that is always
>> perfect in "readability" no matter what render pixel size you pick.
>>
>> What's the quickest way of getting a CSV-formatted data file into povray? (If I
>> have to do even a small amount of editing of the CSV by hand, it ruins the
>> benefit of the project.)
>
> Oh my, upon seeing a corporate directive to use Apache OpenOffice, I tried to
> use Calc to import my CSV.
>
> It interpreted
> -3.5308E-07
>
> as
> '-3.5308E-07
IIRC, when you open the CSV in AOO, there's an option to "detect special
numbers" (or something similar) that will make it treat scitentific
notations as numbers and not text.
--
/*Francois Labreque*/#local a=x+y;#local b=x+a;#local c=a+b;#macro P(F//
/* flabreque */L)polygon{5,F,F+z,L+z,L,F pigment{rgb 9}}#end union
/* @ */{P(0,a)P(a,b)P(b,c)P(2*a,2*b)P(2*b,b+c)P(b+c,<2,3>)
/* gmail.com */}camera{orthographic location<6,1.25,-6>look_at a }
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |