Take the 2-minute tour ×
Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. It's 100% free, no registration required.

I have an excel file with 8083 X and Y columns.

The first column represents the name of the image I have, and the other column represents the multiplicaltion reusult of the (x,y) resolution of that image (i.e; (512,512) -> 262144.

Now, in this case, I will have an image name and a result beside it.

I'm trying to plot a graph that gives me the number of images that equal for example 262144.

So, I will have an x-axis with representing the "resolution" multiplication result, and a "y-axis" representing the "Number of images".

Is there a software program that enables me to get such graph? Provided that, again, I have 8083 records.

Thanks.

share|improve this question

3 Answers 3

Asymptote vector graphics language. Check out the gallery of graphs/plots/sketches.

Histogram Example

"Here is a histogram example, which uses the stats module."

 import graph;
 import stats;

 size(400,200,IgnoreAspect);

 int n=10000;
 real[] a=new real[n];
 for(int i=0; i < n; ++i) a[i]=Gaussrand();

 draw(graph(Gaussian,min(a),max(a)),blue);

 // Optionally calculate "optimal" number of bins a la Shimazaki and Shinomoto.
 int N=bins(a);

 histogram(a,min(a),max(a),N,normalize=true,low=0,lightred,black,bars=false);

 xaxis("$x$",BottomTop,LeftTicks);
 yaxis("$dP/dx$",LeftRight,RightTicks(trailingzero));

Example link (scroll to about 80% of the page).

share|improve this answer

This is tricky to do in Excel, since you seem to want to plot a huge amount of points, e.g. it could look like

1 0
2 0
3 0
...
262144 1
...

which will be a very long list.

You can do it in R quite easily. For example

> x = 1:8083
> y = 2:8084
> z = x*y
> t = table(z)
> plot(t)

would draw a rather cramped plot. Here x takes the values 1, 2, ..., 8083 and y takes the values 2, 3, ..., 8084.

Another example is:

> x = c(1, 100, 512)
> y = c(555, 444, 512)
> z = x*y
> t = table(z)
> plot(t)

Here x takes the values 1, 100, 152 whereas y takes the values 555, 444, 512. Here's what the output would look like:

R output

However, I don't really understand why you would want to plot this. If you're just after the number of data points in which x*y = 262144 (or some other number), then you can use an indicator variable in Excel, as I have done in the following example:

enter image description here

Here I entered

=IF($D3=E$11,1,0)

into cell E3, then dragged it along through to cell G9. I manually entered the numbers in cells E11, F11 and G11.

share|improve this answer

Why not take a look at R? -- it has tools for binning & counting, and I gather that's what you need to do. Here's a link histograms in R. Another alternative might be Octave.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.