X & Y axes on graph 
Author Message
 X & Y axes on graph

I am fairly new to VB & have a problem with setting the X & Y axes on
graphs I am drawing. How do I get the axes to remain at a fixed
position  on the picture-box control when the scale of the plot is
changeable?


Fri, 14 Sep 2001 03:00:00 GMT  
 X & Y axes on graph

Quote:
>Subject: X & Y axes on graph

>Date: 3/29/99 1:06 AM Central Standard Time

>I am fairly new to VB & have a problem with setting the X & Y axes on
>graphs I am drawing. How do I get the axes to remain at a fixed
>position  on the picture-box control when the scale of the plot is
>changeable?

 You have to rescale based on the ranges of the X and Y values.  Usually you
want some space between the axes and the edge of the picture for axis label,
titles etc. I use the following code for this: (all on one line)
pic.Scale (LLX - .15 * (ULX - LLX), ULY + .2 * (ULY - LLY))-(ULX + .1 * (ULX -
LLX), (LLY - .2 * (ULY - LLY)))

Where LLX = lower X axis value
              ULX = upper X axis value
              LLY = lower Y axis value
              ULY = upper Y axis value

You can vary the numbers to adjust the space between the axes and the picture
border.



Sat, 15 Sep 2001 03:00:00 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Graph Axis Min & Max

2. graph x en y axis adjusting

3. Automating Graph X Axis Scales

4. axis properties in ms graph

5. Double Y axes in VB 3.0 graphs

6. graph.vbx and setting my own x axis values

7. Scaling Algorithm for Linear Graph Axis

8. Graph Y Axis Scaling and %

9. Graph control - Constant x-axis

10. Q: X-axis Labels On Graph

11. Rotating x-axis labels on graph

12. How to adjust X-axis spacing in graph????

 

 
Powered by phpBB® Forum Software