Hibrak

Solo disponible en BuenasTareas
  • Páginas : 2 (363 palabras )
  • Descarga(s) : 0
  • Publicado : 23 de mayo de 2011
Leer documento completo
Vista previa del texto
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
usingZedGraph;

namespace laurabohor
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
zgh.Visible = false;
}double Xmax, Xmin, Ymax, Ymin;

private void cmd_Click(object sender, EventArgs e)
{

zgh.Visible = true;

Xmax =Convert.ToDouble(txtXmax.Text);
Xmin = Convert.ToDouble(txtXmin.Text);

Ymax = Convert.ToDouble(txtYmax.Text);
Ymin = Convert.ToDouble(txtXmin.Text);

GraphPane GR =zgh.GraphPane;

GR.Title.Text = "grafica";
GR.XAxis.Title.Text = "eje X";
GR.YAxis.Title.Text = "eje Y";

GR.X2Axis.Title.Text = "eje X2";GR.Y2Axis.Title.Text = "eje Y2";

PointPairList fx = new PointPairList();
PointPairList Yx = new PointPairList();

for (int i = -10; i <= 10; i++){
double vx = i;
double vfx = Math.Pow(i, 3) + 2 * i;
double vYx = Math.Pow(i, 2) + 1;

fx.Add(vx, vfx);Yx.Add(vx, vYx);


}

LineItem cfx = GR.AddCurve("curva de fx", fx, Color.Gold);
LineItem cYx = GR.AddCurve("curva de Yx", Yx, Color.HotPink);GR.Y2Axis.IsVisible = true;
cYx.IsY2Axis = true;

//cuadricula
GR.XAxis.MajorGrid.IsVisible = true;
//se agregan los maximos y los minimosGR.XAxis.Scale.Max = Xmax;
GR.XAxis.Scale.Min = Xmin;

GR.YAxis.Scale.Max = Ymax;
GR.YAxis.Scale.Min = Ymin;

GR.Y2Axis.Scale.Max =...
tracking img