473,394 Members | 1,794 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,394 software developers and data experts.

Plotting a thumbnail of line graph

Hi,

Got a query regarding plotting a preview / thumbnail for a graph
which reads data from a binary file. The preview should should take
very less time, look exactly like the original graph i.e. not miss the
peaks and curves should look similar. Is there algorithm or anyway to
do this in C#.Net.

I have tried plotting points on regular intervals. Saves time but I
m missing peaks and curves don't resemble.

Thanks and Regards,
Gouri

Oct 13 '06 #1
4 2622

Gouri wrote:
I have tried plotting points on regular intervals. Saves time but I
m missing peaks and curves don't resemble.
google ZedGraph.

Oct 13 '06 #2

Thanks Eric for the suggestion. However I m already using
ZedGraph for plotting. The problem is regarding the algorithm used for
plotting.

-Gouri

Oct 16 '06 #3

Gouri wrote:
Thanks Eric for the suggestion. However I m already using
ZedGraph for plotting. The problem is regarding the algorithm used for
plotting.
You need to pre-process the data you're reading from the file. You can
do a "sticky" calculation to grab the "lowest low" or "highest high" in
every group of 10 or 100 points. However, the problem will be: should
you use the "lowest low" or the "highest high" for a particular set of
10 points. That will depend on whether the overall curve is going up or
down, but you also need to consider if this group of 10 includes a
change in direction.

Some kind of smoothing algorithm is probably what you want.

But it speed isn't the main concern, I'd just make a fullsize plot,
then stick it in a Bitmap and reduce the size down to a thumbnail. .NET
can easily do this for you, but it might lose some of those sticky
inflection points you want to keep.

There are many different algorithms for reducing the size of an image,
and some of them work better for plots. You can google "image scaling",
"linear interpolation", "Bilinear interpolation", and "Bicubic
interpolation". This article is one I was reading the other day:

http://www.compuphase.com/graphic/scale2.htm

He's using "directional averaging", using what appears to be a
convolution matrix. His application is photo reducing, but the ideas
may help you.

Eric

Oct 18 '06 #4
In article <11*********************@b28g2000cwb.googlegroups. com>,
Gouri wrote:
Got a query regarding plotting a preview / thumbnail for a graph
which reads data from a binary file.
A presentation scheme called Sparklines may be of interest.
http://www.networkworld.com/columnis...6gearhead.html and
http://www.bissantz.de/sparklines/ describe this.

Mike

Oct 19 '06 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: KevinGPO | last post by:
I am making a monitor program for the PC. My monitor program will grab statistics about CPU and memory every 1 or 5 seconds. Then I want to store this data so I have a history and hence be able to...
12
by: Russ | last post by:
I'm interested in setting up a web page where live data can be displayed in real-time on the web page. For example: I would like to display a (nice looking) graph of some data value versus time...
11
by: Chapman | last post by:
Is it possible to plot the graph as an output of my program in C? It can be a simple graph as quadratic curves for example or a correlation between 2 variables only. Thanks
1
by: wayne | last post by:
Hi, May i know how can i plot line graph using VC++? Apparently i have a list of data to b plot into a line graph... how can i do that in VC++? thanks alot
1
by: wayne | last post by:
i want to plot a line graph. The values that I obtain are the RGB value of a TIFF image. i m plotting RGB values vs value(1,2,3..) so when generated the RGB values, there will b a column of values...
7
by: diffuser78 | last post by:
My python program spits lot of data. I take that data and plot graphs using OfficeOrg spredsheet. I want to automate this task as this takes so much of time. I have some questions. 1. Which is...
8
by: Adrian | last post by:
Having plotted a graph from x,y co-ordinate to x,y co-ordinate, the graph disappears immediately (after the last plot). Writing " " to a label, in between subsequent plots, solves this problem....
3
by: 9966 | last post by:
Greetings, I'm currently having problem in plotting a simple graph in C++. I learned that we can actually use koolplot to do it. My question is whether it is possible to plot, let's say the...
7
by: arslanburney | last post by:
Hello. Ive got two functions here. Somehow the program does not go in to the second function wehn i call it. The bestfit function. Could some1 help me identify the problem. Heres the code: ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.