473,406 Members | 2,390 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,406 software developers and data experts.

How can I plot a graph on the screen?

Hi, do we have pixels that we can set in order to plot an x-y graph
on a form ?
Nov 21 '05 #1
5 1816
Hi elemis

You need to have a look at the OnPaint method - here's an example in VB.NET
that draws a diagonal line.

Protected Overrides Sub OnPaint(ByVal e As
System.Windows.Forms.PaintEventArgs)
e.Graphics.DrawLine(Pens.Black, 100, 100, 200, 200)
End Sub

But you would probably be better off buying a graphing control, or
developing your own rather than putting all your graphing code into the Form
Paint...

HTH

Nigel Armstrong

"elemis" wrote:
Hi, do we have pixels that we can set in order to plot an x-y graph
on a form ?

Nov 21 '05 #2
And to follow up my own post, make sure you call MyBase.OnPaint(e) before
your own painting code.

Nigel Armstrong

"Nigel Armstrong" wrote:
Hi elemis

You need to have a look at the OnPaint method - here's an example in VB.NET
that draws a diagonal line.

Protected Overrides Sub OnPaint(ByVal e As
System.Windows.Forms.PaintEventArgs)
e.Graphics.DrawLine(Pens.Black, 100, 100, 200, 200)
End Sub

But you would probably be better off buying a graphing control, or
developing your own rather than putting all your graphing code into the Form
Paint...

HTH

Nigel Armstrong

"elemis" wrote:
Hi, do we have pixels that we can set in order to plot an x-y graph
on a form ?

Nov 21 '05 #3
This is great, any ideas how a generate a paint event to refresh what
I am drawing?
Nov 21 '05 #4
Try the Invalidate() method.

HTH

Nigel Armstrong

"elemis" wrote:
This is great, any ideas how a generate a paint event to refresh what
I am drawing?

Nov 21 '05 #5
Bob
Take a look at XYGraph from http://www.componentXtra.com. The basic version is free.

---
Bob
componentXtra
Nov 21 '05 #6

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

Similar topics

2
by: ¶}¾Ç¤F¶Ü? | last post by:
I'm trying to write a script to pass a file of stock prices and volumes, and plot the results on a gnuplot graph which is non-overlapped graph. Fig. 1 ------------ Fig. 2 Figure 1 is a graph...
30
by: nephish | last post by:
Hey there, i have tried about every graphing package for python i can get to work on my system. gnuplot, pychart, biggles, gdchart, etc.. (cant get matplot to work) so far, they all are working...
6
by: googlinggoogler | last post by:
Hiya, I've got a PIC microcontroller reading me humidity data via rs232, this is in ASCII format. I can view this data easily using hyperterminal or pyserial and convert it to its value...
2
by: sheilly_2k7 | last post by:
how to plot a graph in c++ in turbo c++
12
by: slowgirl | last post by:
i'm using vb to plot graph. i've already drawn the graphsheet using drawlines. and include labels. all i arrange according to pixels. the problem i face now is that i need to plot certain symbols...
0
by: jatininfo | last post by:
Hi.. I am working on a medical device which will give the various current reading of various types of parameter from patient body like oxygen lavel, breathing, tampature etc, and it's a...
3
by: fAnSKyer/C# newbie | last post by:
My problem is use what tool to plot a graph sound wave, which requires a high refresh rate. Or any other approach to solve this problem? Any suggestions Thanks a lot Cheers fAnKa
0
by: mostafijur | last post by:
Hello I want to show continuous graph using Gnu plot. That means after 1 hour I want to see previous every 10 mins graph. Gnu Plot Version: 4.0, Linux kernel: 2.6, UBUNTU I can access Gnu...
0
by: foton002 | last post by:
i wanna plot a X_Y graph with C# for instance get x and y as 2 arrays and plot them. could u please help me thanks
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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: 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
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...
0
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...
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...
0
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...

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.