Density Plot Chart

A discussion forum for JFreeChart (a 2D chart library for the Java platform).
Locked
KeVas
Posts: 1
Joined: Thu Jan 25, 2018 10:45 pm
antibot: No, of course not.

Density Plot Chart

Post by KeVas » Thu Jan 25, 2018 11:00 pm

Hello everyone!

So, I want to create Density Plot, using 2D array as a data ( array[150][150]). Is it possible to get that kind of plot like in Mathematica? I was trying to do this on my own by using GraphicsContext in JavaFX and drawing line by line, but it's so buggy.


Image

T1 and T2 are:
Image

Thanks for help. :)

Btw, ColorFunction(GrayLevel) in this case isn't that important.

@EDIT - Maybe XYBlockRenderer class will do the trick?

david.gilbert
JFreeChart Project Leader
Posts: 11734
Joined: Fri Mar 14, 2003 10:29 am
antibot: No, of course not.
Contact:

Re: Density Plot Chart

Post by david.gilbert » Wed Jan 31, 2018 9:26 pm

Yes, XYBlockRenderer would do the job. In the demos you can try XYBlockChartDemo1.java and also CrossSectionDemo1.java.

Image
David Gilbert
JFreeChart Project Leader

:idea: Read my blog
:idea: Support JFree via the Github sponsorship program

Locked