Question Contour Plotting in Java

Arrowstar

Probenaut
Addon Developer
Joined
May 23, 2008
Messages
1,785
Reaction score
0
Points
36
Hi everyone,

I'm currently working on a little Java program in an effort expand my knowledge of the language. While doing so, I decided that I wanted to create contour plots of data. I have been scouring the internet today for a plotting library that can create decent-looking contour plots, but to no avail. There are numerous plotting packages out there, and some even look good, but few seem to allow the creation of contour plots. My only working demo has been with JFreeChart, but honestly, I can't help but find its plots very ugly. (Suggestions on making them look better would be appreciated, if nothing else.)

If anyone has any suggestions on Java libraries/packages I might use to create contour plots, I would be very appreciative. Thanks! :tiphat:
 

Arrowstar

Probenaut
Addon Developer
Joined
May 23, 2008
Messages
1,785
Reaction score
0
Points
36
Thanks, I'll take a look. It's not particularly pretty, but it does look functional at least. :)

---------- Post added at 01:28 PM ---------- Previous post was at 01:00 PM ----------

Urwumpe, have you used this software before? As a Java newbie, I'm finding it a bit challenging to understand....
 

Urwumpe

Not funny anymore
Addon Developer
Donator
Joined
Feb 6, 2008
Messages
37,627
Reaction score
2,345
Points
203
Location
Wolfsburg
Preferred Pronouns
Sire
Thanks, I'll take a look. It's not particularly pretty, but it does look functional at least. :)

---------- Post added at 01:28 PM ---------- Previous post was at 01:00 PM ----------

Urwumpe, have you used this software before? As a Java newbie, I'm finding it a bit challenging to understand....

Yes, compared to Apache POI, it is harmless, what is the problem?
 

Arrowstar

Probenaut
Addon Developer
Joined
May 23, 2008
Messages
1,785
Reaction score
0
Points
36
Mostly on where to start, to be honest. As I alluded to, I'm still learning Java. I have some (x,y,z) data and I'd like to create a contour plot in an existing Swing GUI. Any tips on how to get going?
 

Urwumpe

Not funny anymore
Addon Developer
Donator
Joined
Feb 6, 2008
Messages
37,627
Reaction score
2,345
Points
203
Location
Wolfsburg
Preferred Pronouns
Sire
Mostly on where to start, to be honest. As I alluded to, I'm still learning Java. I have some (x,y,z) data and I'd like to create a contour plot in an existing Swing GUI. Any tips on how to get going?

Can it wait for tomorrow? I want to catch some sleep before watching Curiosity land or make a new crater.

I can then get you a step by step tutorial done.
 

Arrowstar

Probenaut
Addon Developer
Joined
May 23, 2008
Messages
1,785
Reaction score
0
Points
36
Of course, there is no hurry. Thank you! :cheers:
 

Arrowstar

Probenaut
Addon Developer
Joined
May 23, 2008
Messages
1,785
Reaction score
0
Points
36
Hi Urwumpe, was wondering if you had had a chance to take a look at this yet? :)
 

Urwumpe

Not funny anymore
Addon Developer
Donator
Joined
Feb 6, 2008
Messages
37,627
Reaction score
2,345
Points
203
Location
Wolfsburg
Preferred Pronouns
Sire
Hi Urwumpe, was wondering if you had had a chance to take a look at this yet? :)

Not yet, went directly from Zombie mode after the Curiosity landing to getting visited by my girlfriend. I hope I can look tomorrow at it. :lol:
 

Quick_Nick

Passed the Turing Test
Donator
Joined
Oct 20, 2007
Messages
4,088
Reaction score
204
Points
103
Location
Tucson, AZ
Not yet, went directly from Zombie mode after the Curiosity landing to getting visited by my girlfriend. I hope I can look tomorrow at it. :lol:

Women and rovers. That's the life. :cool:
 

Arrowstar

Probenaut
Addon Developer
Joined
May 23, 2008
Messages
1,785
Reaction score
0
Points
36
Haha, Nick, indeed. ;) And if I can this contour plotting stuff figured out, it'll be the trifecta indeed. :)
 

Urwumpe

Not funny anymore
Addon Developer
Donator
Joined
Feb 6, 2008
Messages
37,627
Reaction score
2,345
Points
203
Location
Wolfsburg
Preferred Pronouns
Sire
Haha, Nick, indeed. ;) And if I can this contour plotting stuff figured out, it'll be the trifecta indeed. :)

What I can tell so far is that the biggest challenge is getting a proper SGTGrid object defined. SimpleGrid doesn't do it, no idea why it causes unlabeled NullPointerException, the jars are without debugging info.

As long as you have your own implementation of SGTGrid, it should work.

The rest is like in the GridDemo, either by using the JPlotLayout class or by manually rendering things to Graphics.
 

Arrowstar

Probenaut
Addon Developer
Joined
May 23, 2008
Messages
1,785
Reaction score
0
Points
36
Do you know how to construct that SGT grid? I'm really pretty new to all this. Any step-by-step instructions you have would be great. :)
 
Top