ScatterPlot with two set of values
"KUMARARAJA Shalini" <[email protected]> Thu, 26 Oct 2006 16:41:44 +0530
| Newsgroups | gmane.comp.krysalis.jcharts.user |
|---|---|
| Message-ID | <07607A243CD00F429B63125BC757AF0006818AFE@chn-ex04.CVNS.corp.covansys.com> |
This is a multi-part message in MIME format.
--===============0723857091==
Content-class: urn:content-classes:message
Content-Type: multipart/alternative;
boundary="----_=_NextPart_001_01C6F8EF.85182B98"
Content-Transfer-Encoding: 7bit
This is a multi-part message in MIME format.
------_=_NextPart_001_01C6F8EF.85182B98
Content-Type: text/plain;
charset="us-ascii"
Content-Transfer-Encoding: quoted-printable
Hi,
=20
We need to draw a graph with plots of two different value sets having
different shapes and colors for those two value sets.
The present method supports only one dataset.
=20
double maxX=3D0,maxY=3D0,minX=3D0,minY=3D0;
Point2D.Double[] points =3D new
Point2D.Double[TotItems];
=20
for (int iCount=3D0;iCount<TotItems;iCount++ )
{
points[iCount] =3D
ScatterPlotDataSet.createPoint2DDouble();
=20
points[iCount].setLocation(xAxis[iCount], yAxis[iCount]);
if (xAxis[iCount] > maxX)
maxX=3DxAxis[iCount];
if (yAxis[iCount] > maxY)
maxY=3DyAxis[iCount];
if (yAxis[iCount] < minY)
minY=3DyAxis[iCount];
}
=20
Stroke[] strokes =3D new Stroke[]{new
BasicStroke()};
Shape[] shapes =3D new Shape[]{new Polygon( new
int[]{0, 5, 10, 5}, new int[]{5, 0, 5, 10}, 4 )};
=20
ScatterPlotDataSet scatterPlotDataSet =3D new
ScatterPlotDataSet( new ScatterPlotProperties( strokes, shapes ) );
scatterPlotDataSet.addDataPoints( points,
Color.blue, null );
=20
ScatterPlotDataSeries scatterPlotDataSeries =3D
new ScatterPlotDataSeries( scatterPlotDataSet,xAxisTitle,yAxisTitle,null
);
DataAxisProperties xAxisProperties =3D new
DataAxisProperties();
=20
/*********The DataSeries created as in the above code is passed as in
the below code.**************/
=20
ScatterPlotAxisChart scatterPlotAxisChart =3D =
new
ScatterPlotAxisChart(
scatterPlotDataSeries,chartProperties,axisProperties,legendProperties,wi
dth*2,height*2 );
=20
bufferedImage =3D new BufferedImage(
scatterPlotAxisChart.getImageWidth(),
scatterPlotAxisChart.getImageHeight(), BufferedImage.TYPE_INT_RGB );
scatterPlotAxisChart.setGraphics2D(
bufferedImage.createGraphics() );
scatterPlotAxisChart.render();
=20
Pls let us know how this can be achieved.
=20
=20
Regards,
Shalini.K
Confidentiality Statement:
This message is intended only for the individual or entity to which it =
is addressed. It may contain privileged, confidential information which =
is exempt from disclosure under applicable laws. If you are not the =
intended recipient, please note that you are strictly prohibited from =
disseminating or distributing this information (other than to the =
intended recipient) or copying this information. If you have received =
this communication in error, please notify us immediately by return =
email.
------_=_NextPart_001_01C6F8EF.85182B98
Content-Type: text/html;
charset="us-ascii"
Content-Transfer-Encoding: quoted-printable
<HTML >
<HEAD>
<META http-equiv=3D"Content-Type" content=3D"text/html; =
charset=3Dus-ascii">
<meta name=3DGenerator content=3D"Microsoft Word 11 (filtered medium)">
<style>
<!--
/* Font Definitions */
@font-face
{font-family:Batang;
panose-1:2 3 6 0 0 1 1 1 1 1;}
@font-face
{font-family:"Comic Sans MS";
panose-1:3 15 7 2 3 3 2 2 2 4;}
@font-face
{font-family:"\@Batang";
panose-1:0 0 0 0 0 0 0 0 0 0;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0in;
margin-bottom:.0001pt;
font-size:12.0pt;
font-family:"Times New Roman";}
a:link, span.MsoHyperlink
{color:blue;
text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
{color:purple;
text-decoration:underline;}
span.EmailStyle17
{mso-style-type:personal-compose;
font-family:"Comic Sans MS";
color:blue;
font-weight:normal;
font-style:normal;
text-decoration:none none;}
@page Section1
{size:8.5in 11.0in;
margin:1.0in 1.25in 1.0in 1.25in;}
div.Section1
{page:Section1;}
-->
</style>
</HEAD><BODY lang=3DEN-US link=3Dblue vlink=3Dpurple><DIV>
<div class=3DSection1>
<p class=3DMsoNormal><font size=3D2 color=3Dblue face=3D"Comic Sans =
MS"><span
style=3D'font-size:10.0pt;font-family:"Comic Sans =
MS";color:blue'>Hi,<o:p></o:p></span></font></p>
<p class=3DMsoNormal><font size=3D2 color=3Dblue face=3D"Comic Sans =
MS"><span
style=3D'font-size:10.0pt;font-family:"Comic Sans =
MS";color:blue'><o:p> </o:p></span></font></p>
<p class=3DMsoNormal><font size=3D2 color=3Dblue face=3D"Comic Sans =
MS"><span
style=3D'font-size:10.0pt;font-family:"Comic Sans MS";color:blue'>We =
need to draw
a graph with plots of two different value sets having different shapes =
and
colors for those two value sets.<o:p></o:p></span></font></p>
<p class=3DMsoNormal><font size=3D2 color=3Dblue face=3D"Comic Sans =
MS"><span
style=3D'font-size:10.0pt;font-family:"Comic Sans MS";color:blue'>The =
present
method supports only one dataset.<o:p></o:p></span></font></p>
<p class=3DMsoNormal><font size=3D2 color=3Dblue face=3D"Comic Sans =
MS"><span
style=3D'font-size:10.0pt;font-family:"Comic Sans =
MS";color:blue'><o:p> </o:p></span></font></p>
<p class=3DMsoNormal><font size=3D2 color=3Dblue face=3D"Comic Sans =
MS"><span
style=3D'font-size:10.0pt;font-family:"Comic Sans =
MS";color:blue'> &nb=
sp; &nbs=
p;
double maxX=3D0,maxY=3D0,minX=3D0,minY=3D0;<o:p></o:p></span></font></p>
<p class=3DMsoNormal><font size=3D2 color=3Dblue face=3D"Comic Sans =
MS"><span
style=3D'font-size:10.0pt;font-family:"Comic Sans =
MS";color:blue'> &nb=
sp; &nbs=
p;
Point2D.Double[] points =3D new =
Point2D.Double[TotItems];<o:p></o:p></span></font></p>
<p class=3DMsoNormal><font size=3D2 color=3Dblue face=3D"Comic Sans =
MS"><span
style=3D'font-size:10.0pt;font-family:"Comic Sans =
MS";color:blue'><o:p> </o:p></span></font></p>
<p class=3DMsoNormal><font size=3D2 color=3Dblue face=3D"Comic Sans =
MS"><span
style=3D'font-size:10.0pt;font-family:"Comic Sans =
MS";color:blue'> &nb=
sp; &nbs=
p;
for (int iCount=3D0;iCount<TotItems;iCount++ =
)<o:p></o:p></span></font></p>
<p class=3DMsoNormal><font size=3D2 color=3Dblue face=3D"Comic Sans =
MS"><span
style=3D'font-size:10.0pt;font-family:"Comic Sans =
MS";color:blue'> &nb=
sp; &nbs=
p;
{<o:p></o:p></span></font></p>
<p class=3DMsoNormal><font size=3D2 color=3Dblue face=3D"Comic Sans =
MS"><span
style=3D'font-size:10.0pt;font-family:"Comic Sans =
MS";color:blue'> &nb=
sp; &nbs=
p;  =
;
points[iCount] =3D =
ScatterPlotDataSet.createPoint2DDouble();<o:p></o:p></span></font></p>
<p class=3DMsoNormal><font size=3D2 color=3Dblue face=3D"Comic Sans =
MS"><span
style=3D'font-size:10.0pt;font-family:"Comic Sans =
MS";color:blue'> &nb=
sp; &nbs=
p;  =
;
points[iCount].setLocation(xAxis[iCount], =
yAxis[iCount]);<o:p></o:p></span></font></p>
<p class=3DMsoNormal><font size=3D2 color=3Dblue face=3D"Comic Sans =
MS"><span
style=3D'font-size:10.0pt;font-family:"Comic Sans =
MS";color:blue'> &nb=
sp; &nbs=
p;  =
;
if (xAxis[iCount] > maxX) =
maxX=3DxAxis[iCount];<o:p></o:p></span></font></p>
<p class=3DMsoNormal><font size=3D2 color=3Dblue face=3D"Comic Sans =
MS"><span
style=3D'font-size:10.0pt;font-family:"Comic Sans =
MS";color:blue'> &nb=
sp; &nbs=
p;  =
;
if (yAxis[iCount] > maxY) =
maxY=3DyAxis[iCount];<o:p></o:p></span></font></p>
<p class=3DMsoNormal><font size=3D2 color=3Dblue face=3D"Comic Sans =
MS"><span
style=3D'font-size:10.0pt;font-family:"Comic Sans =
MS";color:blue'> &nb=
sp; &nbs=
p;  =
;
if (yAxis[iCount] < minY) =
minY=3DyAxis[iCount];<o:p></o:p></span></font></p>
<p class=3DMsoNormal><font size=3D2 color=3Dblue face=3D"Comic Sans =
MS"><span
style=3D'font-size:10.0pt;font-family:"Comic Sans =
MS";color:blue'> &nb=
sp; &nbs=
p;
}<o:p></o:p></span></font></p>
<p class=3DMsoNormal><font size=3D2 color=3Dblue face=3D"Comic Sans =
MS"><span
style=3D'font-size:10.0pt;font-family:"Comic Sans =
MS";color:blue'> &nb=
sp; &nbs=
p;
<o:p></o:p></span></font></p>
<p class=3DMsoNormal><font size=3D2 color=3Dblue face=3D"Comic Sans =
MS"><span
style=3D'font-size:10.0pt;font-family:"Comic Sans =
MS";color:blue'> &nb=
sp; &nbs=
p;
Stroke[] strokes =3D new Stroke[]{new =
BasicStroke()};<o:p></o:p></span></font></p>
<p class=3DMsoNormal><font size=3D2 color=3Dblue face=3D"Comic Sans =
MS"><span
style=3D'font-size:10.0pt;font-family:"Comic Sans =
MS";color:blue'> &nb=
sp; &nbs=
p;
Shape[] shapes =3D new Shape[]{new Polygon( new int[]{0, 5, 10, 5}, new =
int[]{5,
0, 5, 10}, 4 )};<o:p></o:p></span></font></p>
<p class=3DMsoNormal><font size=3D2 color=3Dblue face=3D"Comic Sans =
MS"><span
style=3D'font-size:10.0pt;font-family:"Comic Sans =
MS";color:blue'><o:p> </o:p></span></font></p>
<p class=3DMsoNormal><font size=3D2 color=3Dblue face=3D"Comic Sans =
MS"><span
style=3D'font-size:10.0pt;font-family:"Comic Sans =
MS";color:blue'> &nb=
sp; &nbs=
p;
ScatterPlotDataSet scatterPlotDataSet =3D new ScatterPlotDataSet( new
ScatterPlotProperties( strokes, shapes ) );<o:p></o:p></span></font></p>
<p class=3DMsoNormal><font size=3D2 color=3Dblue face=3D"Comic Sans =
MS"><span
style=3D'font-size:10.0pt;font-family:"Comic Sans =
MS";color:blue'> &nb=
sp; &nbs=
p;
scatterPlotDataSet.addDataPoints( points, Color.blue, null =
);<o:p></o:p></span></font></p>
<p class=3DMsoNormal><font size=3D2 color=3Dblue face=3D"Comic Sans =
MS"><span
style=3D'font-size:10.0pt;font-family:"Comic Sans =
MS";color:blue'><o:p> </o:p></span></font></p>
<p class=3DMsoNormal><font size=3D2 color=3Dblue face=3D"Comic Sans =
MS"><span
style=3D'font-size:10.0pt;font-family:"Comic Sans =
MS";color:blue'> &nb=
sp; &nbs=
p;
ScatterPlotDataSeries scatterPlotDataSeries =3D new =
ScatterPlotDataSeries(
scatterPlotDataSet,xAxisTitle,yAxisTitle,null =
);<o:p></o:p></span></font></p>
<p class=3DMsoNormal><font size=3D2 color=3Dblue face=3D"Comic Sans =
MS"><span
style=3D'font-size:10.0pt;font-family:"Comic Sans =
MS";color:blue'> &nb=
sp; &nbs=
p;
DataAxisProperties xAxisProperties =3D new =
DataAxisProperties();<o:p></o:p></span></font></p>
<p class=3DMsoNormal><font size=3D2 color=3Dblue face=3D"Comic Sans =
MS"><span
style=3D'font-size:10.0pt;font-family:"Comic Sans =
MS";color:blue'><o:p> </o:p></span></font></p>
<p class=3DMsoNormal><font size=3D2 color=3Dblue face=3D"Comic Sans =
MS"><span
style=3D'font-size:10.0pt;font-family:"Comic Sans =
MS";color:blue'>/*********The
DataSeries created as in the above code is passed as in the below
code.**************/<o:p></o:p></span></font></p>
<p class=3DMsoNormal><font size=3D2 color=3Dblue face=3D"Comic Sans =
MS"><span
style=3D'font-size:10.0pt;font-family:"Comic Sans =
MS";color:blue'><o:p> </o:p></span></font></p>
<p class=3DMsoNormal><font size=3D2 color=3Dblue face=3D"Comic Sans =
MS"><span
style=3D'font-size:10.0pt;font-family:"Comic Sans =
MS";color:blue'> &nb=
sp; &nbs=
p;
ScatterPlotAxisChart scatterPlotAxisChart =3D new ScatterPlotAxisChart(
scatterPlotDataSeries,chartProperties,axisProperties,legendProperties,wid=
th*2,height*2
);<o:p></o:p></span></font></p>
<p class=3DMsoNormal><font size=3D2 color=3Dblue face=3D"Comic Sans =
MS"><span
style=3D'font-size:10.0pt;font-family:"Comic Sans =
MS";color:blue'><o:p> </o:p></span></font></p>
<p class=3DMsoNormal><font size=3D2 color=3Dblue face=3D"Comic Sans =
MS"><span
style=3D'font-size:10.0pt;font-family:"Comic Sans =
MS";color:blue'> &nb=
sp; &nbs=
p;
bufferedImage =3D new BufferedImage( =
scatterPlotAxisChart.getImageWidth(),
scatterPlotAxisChart.getImageHeight(), BufferedImage.TYPE_INT_RGB =
);<o:p></o:p></span></font></p>
<p class=3DMsoNormal><font size=3D2 color=3Dblue face=3D"Comic Sans =
MS"><span
style=3D'font-size:10.0pt;font-family:"Comic Sans =
MS";color:blue'> &nb=
sp; &nbs=
p;
scatterPlotAxisChart.setGraphics2D( bufferedImage.createGraphics() =
);<o:p></o:p></span></font></p>
<p class=3DMsoNormal><font size=3D2 color=3Dblue face=3D"Comic Sans =
MS"><span
style=3D'font-size:10.0pt;font-family:"Comic Sans =
MS";color:blue'> &nb=
sp; &nbs=
p;
scatterPlotAxisChart.render();<o:p></o:p></span></font></p>
<p class=3DMsoNormal><font size=3D2 color=3Dblue face=3D"Comic Sans =
MS"><span
style=3D'font-size:10.0pt;font-family:"Comic Sans =
MS";color:blue'><o:p> </o:p></span></font></p>
<p class=3DMsoNormal><font size=3D2 color=3Dblue face=3D"Comic Sans =
MS"><span
style=3D'font-size:10.0pt;font-family:"Comic Sans MS";color:blue'>Pls =
let us know
how this can be achieved.<o:p></o:p></span></font></p>
<p class=3DMsoNormal><font size=3D2 color=3Dblue face=3D"Comic Sans =
MS"><span
style=3D'font-size:10.0pt;font-family:"Comic Sans =
MS";color:blue'><o:p> </o:p></span></font></p>
<p class=3DMsoNormal><font size=3D2 color=3Dblue face=3D"Comic Sans =
MS"><span
style=3D'font-size:10.0pt;font-family:"Comic Sans =
MS";color:blue'><o:p> </o:p></span></font></p>
<p class=3DMsoNormal><font size=3D2 color=3Dpurple face=3D"Comic Sans =
MS"><span
style=3D'font-size:10.0pt;font-family:"Comic Sans =
MS";color:purple'>Regards,</span></font><font
color=3Dblue><span style=3D'color:blue'><o:p></o:p></span></font></p>
<p class=3DMsoNormal><font size=3D2 color=3Dpurple face=3D"Comic Sans =
MS"><span
style=3D'font-size:10.0pt;font-family:"Comic Sans =
MS";color:purple'>Shalini.K</span></font><o:p></o:p></p>
<p class=3DMsoNormal><font size=3D3 face=3D"Times New Roman"><span =
style=3D'font-size:
12.0pt'><o:p> </o:p></span></font></p>
</div>
</DIV>
<DIV style=3D"font-family:Courier New; font-size:9pt">Confidentiality =
Statement:<br><br>This message is intended only for the individual or =
entity to which it is addressed. It may contain privileged, confidential =
information which is exempt from disclosure under applicable laws. If =
you are not the intended recipient, please note that you are strictly =
prohibited from disseminating or distributing this information (other =
than to the intended recipient) or copying this information. If you have =
received this communication in error, please notify us immediately by =
return email.<br></DIV></BODY></HTML>
------_=_NextPart_001_01C6F8EF.85182B98--
--===============0723857091==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
--===============0723857091==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
_______________________________________________
jCharts-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jcharts-users
--===============0723857091==--