Re: drawPolyLine

From: Paul Lutus (nospam_at_nosite.zzz)
Date: 10/01/04


Date: Fri, 01 Oct 2004 11:34:00 -0700

Taji wrote:

> Does anyone have a servlet that draws a poly-line graph that I can
> use? I have one but it draws the graph with the origin at the top left
> corner of the image object. I just need to know how to translate the
> graph so that the origin is at the bottom left corner so it looks like
> a normal graph with x and y coordinates.

Very briefly:

1. Find the height of the drawing surface.
2. Subtract all y coordinates from the height established in (1).

In other words, instead of plotting x,y, plot x,h-y.

-- 
Paul Lutus
http://www.arachnoid.com


Relevant Pages

  • Re: drawPolyLine
    ... > Taji wrote: ... I have one but it draws the graph with the origin at the top left ... >> corner of the image object. ...
    (comp.lang.java.programmer)
  • avi without axis
    ... creation it draws the graph but without axis or labels and with a ...
    (comp.soft-sys.matlab)
  • Re: Frame refresh/reload prob.
    ... I have made a program that draws a graph and such. ... It seems that some of my labels are being>reprinted with higher and higher Y-coordinates. ... Canadian Mind Products, Roedy Green. ...
    (comp.lang.java.help)
  • Re: How to prove?(Analysis)
    ... If one draws the graph of y=cosand y=x, ... I can't catch the idea of rigorous proof. ... f is a contraction. ...
    (sci.math)