Re: ScatterPlot with two set of values
"sitanshu maheshwari" <[email protected]> Thu, 26 Oct 2006 17:42:34 +0530
| Newsgroups | gmane.comp.krysalis.jcharts.devel |
|---|---|
| Message-ID | <[email protected]> |
--===============0577541513== Content-Type: multipart/alternative; boundary="----=_Part_36984_30963277.1161864754709" ------=_Part_36984_30963277.1161864754709 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline Hey! shalini u check out through jfreecharts >> tht's also another way to achive all this >> bar charts, stacked bar charts, pie charts and time charts if u need a jar then i am having >> let me know >> even u can get that from google!!! bye! thanks and regards Sitanshu Maheshwari +919911373111 On 10/26/06, KUMARARAJA Shalini <[email protected]> wrote: > > Hi, > > > > 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. > > > > double maxX=0,maxY=0,minX=0,minY=0; > > Point2D.Double[] points = new Point2D.Double > [TotItems]; > > > > for (int iCount=0;iCount<TotItems;iCount++ ) > > { > > points[iCount] = > ScatterPlotDataSet.createPoint2DDouble(); > > > points[iCount].setLocation(xAxis[iCount], yAxis[iCount]); > > if (xAxis[iCount] > maxX) > maxX=xAxis[iCount]; > > if (yAxis[iCount] > maxY) > maxY=yAxis[iCount]; > > if (yAxis[iCount] < minY) > minY=yAxis[iCount]; > > } > > > > Stroke[] strokes = new Stroke[]{new > BasicStroke()}; > > Shape[] shapes = new Shape[]{new Polygon( new > int[]{0, 5, 10, 5}, new int[]{5, 0, 5, 10}, 4 )}; > > > > ScatterPlotDataSet scatterPlotDataSet = new > ScatterPlotDataSet( new ScatterPlotProperties( strokes, shapes ) ); > > scatterPlotDataSet.addDataPoints( points, > Color.blue, null ); > > > > ScatterPlotDataSeries scatterPlotDataSeries = new > ScatterPlotDataSeries( scatterPlotDataSet,xAxisTitle,yAxisTitle,null ); > > DataAxisProperties xAxisProperties = new > DataAxisProperties(); > > > > /*********The DataSeries created as in the above code is passed as in the > below code.**************/ > > > > ScatterPlotAxisChart scatterPlotAxisChart = new > ScatterPlotAxisChart( > scatterPlotDataSeries,chartProperties,axisProperties,legendProperties,width*2,height*2 > ); > > > > bufferedImage = new BufferedImage( > scatterPlotAxisChart.getImageWidth(), scatterPlotAxisChart.getImageHeight(), > BufferedImage.TYPE_INT_RGB ); > > scatterPlotAxisChart.setGraphics2D( > bufferedImage.createGraphics() ); > > scatterPlotAxisChart.render(); > > > > Pls let us know how this can be achieved. > > > > > > 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. > > > ------------------------------------------------------------------------- > 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 > > _______________________________________________ > jCharts-developers mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/jcharts-developers > > > ------=_Part_36984_30963277.1161864754709 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline <div>Hey! shalini</div> <div> </div> <div>u check out through jfreecharts >> </div> <div>tht's also another way to achive all this >> bar charts, stacked bar charts, pie charts and time charts</div> <div> </div> <div>if u need a jar then i am having >> let me know >> even u can get that from google!!!</div> <div> </div> <div>bye! </div> <div> </div> <div>thanks and regards</div> <div>Sitanshu Maheshwari</div> <div>+919911373111<br><br> </div> <div><span class="gmail_quote">On 10/26/06, <b class="gmail_sendername">KUMARARAJA Shalini</b> <<a href="mailto:[email protected]">[email protected]</a>> wrote:</span> <blockquote class="gmail_quote" style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid"> <div lang="EN-US" vlink="purple" link="blue"> <div> <div> <p><font face="Comic Sans MS" color="blue" size="2"><span style="FONT-SIZE: 10pt; COLOR: blue">Hi,</span></font></p> <p><font face="Comic Sans MS" color="blue" size="2"><span style="FONT-SIZE: 10pt; COLOR: blue"> </span></font></p> <p><font face="Comic Sans MS" color="blue" size="2"><span style="FONT-SIZE: 10pt; 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.</span> </font></p> <p><font face="Comic Sans MS" color="blue" size="2"><span style="FONT-SIZE: 10pt; COLOR: blue">The present method supports only one dataset.</span></font></p> <p><font face="Comic Sans MS" color="blue" size="2"><span style="FONT-SIZE: 10pt; COLOR: blue"> </span></font></p> <p><font face="Comic Sans MS" color="blue" size="2"><span style="FONT-SIZE: 10pt; COLOR: blue"> double maxX=0,maxY=0,minX=0,minY=0;</span></font></p> <p><font face="Comic Sans MS" color="blue" size="2"><span style="FONT-SIZE: 10pt; COLOR: blue"> Point2D.Double[] points = new Point2D.Double[TotItems];</span></font></p> <p><font face="Comic Sans MS" color="blue" size="2"><span style="FONT-SIZE: 10pt; COLOR: blue"> </span></font></p> <p><font face="Comic Sans MS" color="blue" size="2"><span style="FONT-SIZE: 10pt; COLOR: blue"> for (int iCount=0;iCount<TotItems;iCount++ )</span></font></p> <p><font face="Comic Sans MS" color="blue" size="2"><span style="FONT-SIZE: 10pt; COLOR: blue"> {</span></font></p> <p><font face="Comic Sans MS" color="blue" size="2"><span style="FONT-SIZE: 10pt; COLOR: blue"> points[iCount] = ScatterPlotDataSet.createPoint2DDouble();</span></font></p> <p><font face="Comic Sans MS" color="blue" size="2"><span style="FONT-SIZE: 10pt; COLOR: blue"> points[iCount].setLocation(xAxis[iCount], yAxis[iCount]);</span></font></p> <p><font face="Comic Sans MS" color="blue" size="2"><span style="FONT-SIZE: 10pt; COLOR: blue"> if (xAxis[iCount] > maxX) maxX=xAxis[iCount];</span></font></p> <p><font face="Comic Sans MS" color="blue" size="2"><span style="FONT-SIZE: 10pt; COLOR: blue"> if (yAxis[iCount] > maxY) maxY=yAxis[iCount];</span></font></p> <p><font face="Comic Sans MS" color="blue" size="2"><span style="FONT-SIZE: 10pt; COLOR: blue"> if (yAxis[iCount] < minY) minY=yAxis[iCount];</span></font></p> <p><font face="Comic Sans MS" color="blue" size="2"><span style="FONT-SIZE: 10pt; COLOR: blue"> }</span></font></p> <p><font face="Comic Sans MS" color="blue" size="2"><span style="FONT-SIZE: 10pt; COLOR: blue"> </span></font></p> <p><font face="Comic Sans MS" color="blue" size="2"><span style="FONT-SIZE: 10pt; COLOR: blue"> Stroke[] strokes = new Stroke[]{new BasicStroke()};</span></font></p> <p><font face="Comic Sans MS" color="blue" size="2"><span style="FONT-SIZE: 10pt; COLOR: blue"> Shape[] shapes = new Shape[]{new Polygon( new int[]{0, 5, 10, 5}, new int[]{5, 0, 5, 10}, 4 )};</span> </font></p> <p><font face="Comic Sans MS" color="blue" size="2"><span style="FONT-SIZE: 10pt; COLOR: blue"> </span></font></p> <p><font face="Comic Sans MS" color="blue" size="2"><span style="FONT-SIZE: 10pt; COLOR: blue"> ScatterPlotDataSet scatterPlotDataSet = new ScatterPlotDataSet( new ScatterPlotProperties( strokes, shapes ) ); </span></font></p> <p><font face="Comic Sans MS" color="blue" size="2"><span style="FONT-SIZE: 10pt; COLOR: blue"> scatterPlotDataSet.addDataPoints( points, Color.blue, null );</span></font></p> <p><font face="Comic Sans MS" color="blue" size="2"><span style="FONT-SIZE: 10pt; COLOR: blue"> </span></font></p> <p><font face="Comic Sans MS" color="blue" size="2"><span style="FONT-SIZE: 10pt; COLOR: blue"> ScatterPlotDataSeries scatterPlotDataSeries = new ScatterPlotDataSeries( scatterPlotDataSet,xAxisTitle,yAxisTitle,null ); </span></font></p> <p><font face="Comic Sans MS" color="blue" size="2"><span style="FONT-SIZE: 10pt; COLOR: blue"> DataAxisProperties xAxisProperties = new DataAxisProperties();</span></font></p> <p><font face="Comic Sans MS" color="blue" size="2"><span style="FONT-SIZE: 10pt; COLOR: blue"> </span></font></p> <p><font face="Comic Sans MS" color="blue" size="2"><span style="FONT-SIZE: 10pt; COLOR: blue">/*********The DataSeries created as in the above code is passed as in the below code.**************/</span></font></p> <p><font face="Comic Sans MS" color="blue" size="2"><span style="FONT-SIZE: 10pt; COLOR: blue"> </span></font></p> <p><font face="Comic Sans MS" color="blue" size="2"><span style="FONT-SIZE: 10pt; COLOR: blue"> ScatterPlotAxisChart scatterPlotAxisChart = new ScatterPlotAxisChart( scatterPlotDataSeries,chartProperties,axisProperties,legendProperties,width*2,height*2 ); </span></font></p> <p><font face="Comic Sans MS" color="blue" size="2"><span style="FONT-SIZE: 10pt; COLOR: blue"> </span></font></p> <p><font face="Comic Sans MS" color="blue" size="2"><span style="FONT-SIZE: 10pt; COLOR: blue"> bufferedImage = new BufferedImage( scatterPlotAxisChart.getImageWidth(), scatterPlotAxisChart.getImageHeight (), BufferedImage.TYPE_INT_RGB );</span></font></p> <p><font face="Comic Sans MS" color="blue" size="2"><span style="FONT-SIZE: 10pt; COLOR: blue"> scatterPlotAxisChart.setGraphics2D( bufferedImage.createGraphics() );</span></font></p> <p><font face="Comic Sans MS" color="blue" size="2"><span style="FONT-SIZE: 10pt; COLOR: blue"> scatterPlotAxisChart.render();</span></font></p> <p><font face="Comic Sans MS" color="blue" size="2"><span style="FONT-SIZE: 10pt; COLOR: blue"> </span></font></p> <p><font face="Comic Sans MS" color="blue" size="2"><span style="FONT-SIZE: 10pt; COLOR: blue">Pls let us know how this can be achieved.</span></font></p> <p><font face="Comic Sans MS" color="blue" size="2"><span style="FONT-SIZE: 10pt; COLOR: blue"> </span></font></p> <p><font face="Comic Sans MS" color="blue" size="2"><span style="FONT-SIZE: 10pt; COLOR: blue"> </span></font></p> <p><font face="Comic Sans MS" color="purple" size="2"><span style="FONT-SIZE: 10pt; COLOR: purple">Regards,</span></font><font color="blue"><span style="COLOR: blue"></span></font></p> <p><font face="Comic Sans MS" color="purple" size="2"><span style="FONT-SIZE: 10pt; COLOR: purple">Shalini.K</span></font></p> <p><font face="Times New Roman" size="3"><span style="FONT-SIZE: 12pt"> </span></font></p></div></div> <div style="FONT-SIZE: 9pt; FONT-FAMILY: Courier New">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></div><br>-------------------------------------------------------------------------<br>Using Tomcat but need to do more? Need to support web services, security?<br>Get stuff done quickly with pre-integrated technology to make your job easier <br>Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo<br><a onclick="return top.js.OpenExtLink(window,event,this)" href="http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642" target="_blank"> http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642</a><br><br>_______________________________________________<br>jCharts-developers mailing list<br><a onclick="return top.js.OpenExtLink(window,event,this)" href="mailto:[email protected]"> [email protected]</a><br><a onclick="return top.js.OpenExtLink(window,event,this)" href="https://lists.sourceforge.net/lists/listinfo/jcharts-developers" target="_blank">https://lists.sourceforge.net/lists/listinfo/jcharts-developers </a><br><br><br></blockquote></div><br> ------=_Part_36984_30963277.1161864754709-- --===============0577541513== 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 --===============0577541513== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ jCharts-developers mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/jcharts-developers --===============0577541513==--