
Recent Posts

Recent Comments
 RodStephens on Post questions, tips, tricks, and suggestions here
 Oghenez on Draw aligned columns of data in C#
 RodStephens on Book Discussion Page: WPF 3d
 Ibrahim Konuk on Book Discussion Page: WPF 3d
 Dale O Hays on Determine where two lines intersect in C#
Archives
 October 2018
 September 2018
 August 2018
 July 2018
 June 2018
 May 2018
 April 2018
 March 2018
 February 2018
 January 2018
 December 2017
 November 2017
 October 2017
 September 2017
 August 2017
 July 2017
 June 2017
 May 2017
 April 2017
 March 2017
 February 2017
 January 2017
 December 2016
 November 2016
 October 2016
 September 2016
 August 2016
 July 2016
 June 2016
 May 2016
 April 2016
 March 2016
 February 2016
 January 2016
 December 2015
 November 2015
 October 2015
 September 2015
 August 2015
 July 2015
 June 2015
 May 2015
 April 2015
 March 2015
 February 2015
 January 2015
 December 2014
 November 2014
 October 2014
 September 2014
 August 2014
 July 2014
 June 2014
 May 2014
 February 2014
 January 2014
 December 2013
 October 2013
 August 2013
 June 2013
 December 2012
 September 2012
 July 2012
 June 2012
 November 2011
 May 2011
 April 2011
 February 2011
 December 2010
Categories
 .NET
 3D
 3D graphics
 ADO.NET
 algorithms
 animation
 API
 arrays
 attributes
 audio
 books
 C#
 C# programming
 calculations
 challenges
 classes
 clipboard
 coding
 combinatorics
 console
 controls
 cryptography
 curve fitting
 database
 debugging
 dialogs
 directories
 Drag and Drop
 drawing
 drawings
 enums
 Event
 events
 example program
 Excel
 extension methods
 extensions
 files
 finance
 fonts
 formatting
 forms
 fractals
 ftp
 games
 GDI+
 generic
 geometry
 globalization
 graphics
 html
 IDE
 image processing
 inheritance
 interfaces
 internationalization
 internet
 interoperability
 LINQ
 lists
 localization
 mathematics
 memory
 menus
 MessageBox
 methods
 miscellany
 multimedia
 network
 Office
 OOP
 operators
 parsing
 performance
 phone
 PowerPoint
 printers
 printing
 productivity
 programs
 puzzles
 recursion
 reflection
 registry
 regular expressions
 serialization
 settings
 SQL
 stories
 strings
 syntax
 system
 threading
 tips
 tools
 transformations
 Uncategorized
 user interface
 variables
 VBA
 web
 Windows Forms programming
 WMI
 Word
 wpf
 XAML
 XML
Meta
Tag Archives: graph
Graph points in WPF and C#
This example extends the previous example Draw a graph in WPF and C# to draw ellipses marking the data sets’ points. See that example for an explanation of how most of the program works. The following code shows how the … Continue reading
Posted in algorithms, drawing, geometry, graphics, mathematics, wpf
Tagged algorithms, C#, C# programming, draw graph, draw graph in WPF, drawing, example, example program, geometry, GeometryGroup, graph, graph points, graphics, LineGeometry, mathematics, Polyline, Windows Forms programming, WPF, XAML
Leave a comment
Animate a point on a polar coordinate curve in C#
The example Graph a curve in polar coordinates in C# explained how to draw the flowerlike curve on the right. Once you know how to draw such a curve, it’s not too hard to animate points moving along it. The … Continue reading
Graph a curve in polar coordinates in C#
In Cartesian coordinates, a point is specified by X and Y values. In polar coordinates, a point is specified by r and θ where: r is the point’s radial distance from the origin θ is the angle that gives the … Continue reading
Posted in algorithms, graphics, mathematics
Tagged algorithms, C#, C# programming, Cartesian coordinates, curves, example, example program, graph, graphics, graphing, mathematics, polar coordinates, Windows Forms programming
1 Comment
Test investment strategies with Dow Jones data in C#
Important Note: I am not a tax or investment professional so you need use your own judgement when evaluating these investment strategies. I don’t even pretend to understand this stuff. This is a very simple tool for playing with numbers … Continue reading
Graph historical Dow Jones Industrial Average values in C#
This program graphs historical prices for the Dow Jones Industrial Average. I got the data from this URL: ichart.finance.yahoo.com/table.csv?s=^DJI&a=0&b=1&c=1990&d=0&e=1&f=2020&g=d&ignore=.csv The fields in the URL are: s=^DJI – Get Down Jones Industrial data a=0 – The start month number is 0 … Continue reading
Graph historical stock prices in C#
The key to this example is the GetStockPrices method shown in the following code. // Get the prices for this symbol. private List GetStockPrices(string symbol) { // Compose the URL. string url = “http://www.google.com/finance/” + “historical?output=csv&q=” + symbol; // Get … Continue reading
Posted in finance, graphics, mathematics
Tagged C#, C# programming, example, example program, finance, graph, graph stock prrices, graphics, graphing, mathematics, stock market, stock prices, Windows Forms programming, Yahoo, Yahoo finance
Leave a comment
Graph mosquito populations in C#
The example Simulate mosquito populations in C# simulates a mosquito population. This example draws a graph showing the population during each generation. When it calculates the populations for a new generation, it stores them in the following lists. // Data … Continue reading
Posted in algorithms, animation, drawing, graphics, mathematics
Tagged algorithms, C#, C# programming, drawwing, example, example program, genetically modified mosquitoes, graph, graphics, graphing, mathematics, mosquito population, mosquitoes, population simulation, simulate, Windows Forms programming
Leave a comment
Continuously graph stock prices in C#
The example Get stock prices from the internet in C# explains how to get stock prices from the Yahoo! finance web site. This example uses similar techniques to query the site periodically and then graph stock prices. This example is … Continue reading
Posted in algorithms, finance, graphics, internet, mathematics, multimedia, web
Tagged animation, C#, C# programming, continuously graph stock prices, example, example program, graph, graph stock prices, graphics, internet, multimedia, stock prices, stocks, web, Windows Forms programming
Leave a comment
Graph the sine, cosine, and tangent functions in C#
This example is mostly an exercise in drawing but it does demonstrate a few useful graphics techniques. When you enter minimum and maximum X and Y values and click the Graph button, the following code graphs the sine, cosine, and … Continue reading
Posted in algorithms, graphics, mathematics
Tagged algorithms, C#, C# programming, cosine, example, example program, graph, graph trig functions, graph trigonometric functions, graphics, mathematics, sine, tangent, trig, trig functions, trigonometric functions, trigonometry, Windows Forms programming
2 Comments
Draw a labeled line graph that displays value tooltips in C#
This (fairly complicated) example maps between several different coordinate systems: The main graph is mapped from a coordinate space where 1900 ≤ x ≤ 2010 and 0 ≤ y ≤ 8000 to an area on the screen. Each data point … Continue reading
Posted in drawing, graphics, mathematics, transformations
Tagged C#, C# programming, drawing, example, example program, graph, graphics, line graph, mathematics, rotated text, strings, tooltips, transformations, Windows Forms programming
1 Comment