Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. Visual Basic
  4. draw series of point into form

draw series of point into form

Scheduled Pinned Locked Moved Visual Basic
helpquestion
2 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • S Offline
    S Offline
    sunil goyalG
    wrote on last edited by
    #1

    hi all i want to draw some couple of point into form(or picture box). sample coordinates for some points are following PointNo----- X----- Y 1----- 0.4064 ----- 7.4848 2----- 2.5184 ----- 7.4848 3----- 6.3904 ----- 7.4144 4----- 9.5584 ----- 7.344 5----- 5.44E-02----- 4.176 6----- 2.8704 ----- 3.8944 7----- 6.9536 ----- 4.3168 8----- 9.7696 ----- 3.6128 9----- 1.1104 ----- 1.2896 10----- 5.616 ----- 1.0784 11----- 9.84 ----- 0.8672 12----- -1.05 ----- 8.603703704 13----- 2.209259259----- 8.603703704 14----- 7.994444444----- 8.685185185 15----- 10.60185185----- 8.603703704 16----- -1.05 ----- -0.603703704 17----- 5.142592593----- -0.603703704 18----- 10.68333333----- -0.359259259 19----- -3.16347308----- 10.54256687 20----- 2.377079047----- 10.3067987 Problem is that some value is negative and so small. So how can i draw the point on form which contains negative value. simply i want to ask that how can i calculate scale for X and Y axis so all of my point is easily visible on form or picture box.

    D 1 Reply Last reply
    0
    • S sunil goyalG

      hi all i want to draw some couple of point into form(or picture box). sample coordinates for some points are following PointNo----- X----- Y 1----- 0.4064 ----- 7.4848 2----- 2.5184 ----- 7.4848 3----- 6.3904 ----- 7.4144 4----- 9.5584 ----- 7.344 5----- 5.44E-02----- 4.176 6----- 2.8704 ----- 3.8944 7----- 6.9536 ----- 4.3168 8----- 9.7696 ----- 3.6128 9----- 1.1104 ----- 1.2896 10----- 5.616 ----- 1.0784 11----- 9.84 ----- 0.8672 12----- -1.05 ----- 8.603703704 13----- 2.209259259----- 8.603703704 14----- 7.994444444----- 8.685185185 15----- 10.60185185----- 8.603703704 16----- -1.05 ----- -0.603703704 17----- 5.142592593----- -0.603703704 18----- 10.68333333----- -0.359259259 19----- -3.16347308----- 10.54256687 20----- 2.377079047----- 10.3067987 Problem is that some value is negative and so small. So how can i draw the point on form which contains negative value. simply i want to ask that how can i calculate scale for X and Y axis so all of my point is easily visible on form or picture box.

      D Offline
      D Offline
      Dave Kreskowiak
      wrote on last edited by
      #2

      sunil goyalG wrote:

      simply i want to ask that how can i calculate scale for X and Y axis so all of my point is easily visible on form or picture box.

      It's simple gradeschool math. Get the highest and lowest values in each axis. This gives you the bounds of the graph. Then it's a simple matter of dividing by the available space to get your scaling values. Multiple each point by the scale value and you've got your graph.

      A guide to posting questions on CodeProject[^]
      Dave Kreskowiak Microsoft MVP Visual Developer - Visual Basic
           2006, 2007, 2008

      1 Reply Last reply
      0
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • World
      • Users
      • Groups