Java热图图表库 JHeatChart

openkk 13年前
     <p>JHeatChart 是一个 Java 类,用来创建热图图表。</p>    <p>示例代码:</p>    <p><strong><img class="size-medium wp-image-289 alignnone" title="Example Heat Chart" alt="Java热图图表库 JHeatChart" src="https://simg.open-open.com/show/93105dd92e5757acbd6381fab1dee6e2.png" width="300" height="154" /></strong></p>    <pre><a name="Usage_example:"><span style="color:#800000;">// Create some dummy data.</span> <span style="color:#333399;">double</span>[][] data = <span style="color:#333399;">new</span> <span style="color:#333399;">double</span>[][]{{<span style="color:#008080;">3</span>,<span style="color:#008080;">2</span>,<span style="color:#008080;">3</span>,<span style="color:#008080;">4</span>,<span style="color:#008080;">5</span>,<span style="color:#008080;">6</span>},                                  {<span style="color:#008080;">2</span>,<span style="color:#008080;">3</span>,<span style="color:#008080;">4</span>,<span style="color:#008080;">5</span>,<span style="color:#008080;">6</span>,<span style="color:#008080;">7</span>},                                  {<span style="color:#008080;">3</span>,<span style="color:#008080;">4</span>,<span style="color:#008080;">5</span>,<span style="color:#008080;">6</span>,<span style="color:#008080;">7</span>,<span style="color:#008080;">6</span>},                                  {<span style="color:#008080;">4</span>,<span style="color:#008080;">5</span>,<span style="color:#008080;">6</span>,<span style="color:#008080;">7</span>,<span style="color:#008080;">6</span>,<span style="color:#008080;">5</span>}};<span style="color:#800000;">// Create our heat chart using our data.</span> <span style="color:#800080;">HeatChart</span> chart = <span style="color:#333399;">new</span> <span style="color:#800080;">HeatChart</span>(data);<span style="color:#800000;">// Customise the chart.</span> chart.setTitle(<span style="color:#339933;">"This is my chart title"</span>); chart.setXAxisLabel(<span style="color:#339933;">"X Axis"</span>); chart.setYAxisLabel(<span style="color:#339933;">"Y Axis"</span>);<span style="color:#800000;"> // Output the chart to a file.</span> chart.saveToFile(<span style="color:#333399;">new</span> <span style="color:#800080;">File</span>(<span style="color:#339933;">"my-chart.png"</span>));</a></pre>    <p><strong>项目主页:</strong><a href="http://www.open-open.com/lib/view/home/1322922218952" target="_blank">http://www.open-open.com/lib/view/home/1322922218952</a></p>