473,769 Members | 2,081 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 2658

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 "directiona l 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************ *********@b28g2 000cwb.googlegr oups.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
2940
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 graph this out in my GUI. I thought about using a plain text file to store my graph data and plot it out. Plot it out manually or use gnuplot. I found this tool called RRDTool (http://people.ee.ethz.ch/~oetiker/webtools/rrdtool/). It's a...
12
6564
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 and have the graph update every second without the user having to do anything like hit a refresh button. The data to plot is readily available from an application running on the server - I can expose it in whatever way is needed (currently easily...
11
29560
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
2324
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
3178
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 for me t plot the line graph thanks alot Peteroid wrote: > What kind of 'plot' of the data do you want to do? A histogram ca > be done
7
6850
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 the best graph plotting utility in python or linux. Can I write a code in such a way that my python code automatically gives me a graph. I know little about gnuplot. If you know any better tool without much learning curve please tell me in Linux. ...
8
2965
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. Could someone please shed some light on the cause of this? Thank you, Adrian.
3
4282
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 performance of 6 algorithms into one graph? If so, how? Because when I refer to the koolplot documentation all I see is just plotting one thing at a time in a graph. Thanks for any advice given.
7
3555
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: import Gnuplot def bestfit(uinput): if not isinstance(uinput, list):
0
9423
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10216
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10049
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
9997
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
1
7413
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5310
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5448
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
3565
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2815
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.