[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [ePiX-users] Histograms
From: |
Andrew D. Hwang |
Subject: |
Re: [ePiX-users] Histograms |
Date: |
Wed, 3 Jan 2007 10:54:58 -0500 (EST) |
On Wed, 3 Jan 2007, Marcus D. Hanwell wrote:
On an unrelated note is it currently possible to plot graphs on a log
scale at all? Or would I be best just modifying the data for now and
plotting log(y)? I would miss the tick marks as they get closer on the
log plots but could live with it for now.
With the current version (1.0.22/1.1rc1), the easiest way to perform log
data plotting is probably something like this:
---(snip)---
// in source file preamble
P log_lin(double x, double y, double z=0)
{
return P(log10(x), y, z);
}
...
// inside main(); myfile.dat has 4 columns
plot("myfile.dat", BOX, 4, 1, 2, 0, log_lin);
---(snip)---
I've put log_log, log_lin, and lin_log functions into "functions.*" for
this purpose, and have added alternative syntax for plot functions, so
that (e.g.)
plot("myfile.dat", BOX, 4, log_lin);
plots the first two columns, with the first column plotted logarithmically.
I'll add log-log and semi-log coordinate grids and logarithmic axis labels
today, and hope to have a packaged version (or at least some patch files)
by this evening.
--Andy
Andrew D. Hwang address@hidden
Department of Math and CS http://mathcs.holycross.edu/~ahwang
College of the Holy Cross (508) 793-2458 (Office: 320 Swords)
Worcester, MA, 01610-2395 (508) 793-3530 (fax)