# Tag Archives: graph

## Graph equations while preserving aspect ratio in WPF and C#

The previous example, Graph equations entered by the user in WPF and C# shows how to graph an equation entered by the user. The user must also enter the coordinate bounds that the program should use. For example, in the … Continue reading

Posted in algorithms, drawing, graphics, mathematics, reflection, wpf | | 2 Comments

## Graph equations entered by the user in WPF and C#

This example uses key techniques described in several examples, mostly the following two: Use transformations to draw a graph in WPF and C# Graph equations entered by the user in C# The following two sections describe the key techniques taken … Continue reading

Posted in algorithms, drawing, graphics, mathematics, reflection, wpf | | 1 Comment

## 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 | | 2 Comments

## 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 flower-like 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 | | 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