Any gnuplot experts out there?

Any miscellaneous posts can live here.
Post Reply
NerdGirl
President of the Lutheran Sisterhood Gun Club
Posts: 1810
Joined: Tue Jul 01, 2008 6:41 am
Location: Calgary

Any gnuplot experts out there?

Post by NerdGirl »

Okay, if anyone knows of a way to make this go faster, they will be my hero forever. I'm making like a hundred graphs, and I'm typing the same thing over and over again, and what I would really like to do is write a script that will do this all at once, but I can't figure out how to do it. This is what I'm doing:

plot "filename.txt" with line
load "save.plt"
!mv my-plot.ps filename.ps
!lpr filename.ps

And I have to do this for 40 different files, and there are 4 different x-ranges, so that's like 120 graphs. So if anyone knows how to just do that much in a script that will do all 40 files at once, I will love you forever. Because then I would only have to type all of that 4 times instead of 120 times.
User avatar
Laser Jock
Tech Admin
Posts: 630
Joined: Sat Apr 14, 2007 4:07 pm

Post by Laser Jock »

Hopefully I'm not too late here...

If I'm understanding you right, this would be pretty trivial in any generic scripting language, e.g., Python. (Gnuplot has an option to give commands directly from the system command line, according to the documentation, though I haven't worked with it before.) Email me and I'd be glad to put together a quick script (after making sure of some details of what you're doing):
Image
NerdGirl
President of the Lutheran Sisterhood Gun Club
Posts: 1810
Joined: Tue Jul 01, 2008 6:41 am
Location: Calgary

Post by NerdGirl »

Thanks, Laser Jock, and it's definitely not too late! I will email you later tonight when I can see a bit more (just got back from the eye doctor).
NerdGirl
President of the Lutheran Sisterhood Gun Club
Posts: 1810
Joined: Tue Jul 01, 2008 6:41 am
Location: Calgary

Post by NerdGirl »

Okay, I haven't emailed you yet, but that is because I'm not even sure what I'm doing anymore. But I might know after Wednesday.
User avatar
Laser Jock
Tech Admin
Posts: 630
Joined: Sat Apr 14, 2007 4:07 pm

Post by Laser Jock »

Ha, no worries. Just let me know. :)
Post Reply