subscript & superscript

A discussion forum for JFreeChart (a 2D chart library for the Java platform).
Locked
Jane
Posts: 14
Joined: Wed Jun 25, 2008 7:16 pm

subscript & superscript

Post by Jane » Wed Jun 25, 2008 7:40 pm

Hello,

Is it possible to have subscripts, superscripts and Greek letters when I label the
x and y axes?

Thanks,

Jane

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

Post by david.gilbert » Wed Jun 25, 2008 9:22 pm

No. You could probably modify the Axis class to use an AttributedString as the axis label.
David Gilbert
JFreeChart Project Leader

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

Carl Manaster
Posts: 35
Joined: Tue Mar 28, 2006 1:10 am
Location: La Jolla
Contact:

Re: subscript & superscript

Post by Carl Manaster » Fri Jun 27, 2008 5:20 pm

Hi, Jane,
Jane wrote: Is it possible to have subscripts, superscripts and Greek letters when I label the x and y axes?
There is a way to get limited superscripts and subscripts with Unicode; we've had success following the strategies outlined at these links:

http://www.alanwood.net/unicode/supersc ... ripts.html
http://groups.google.com/group/comp.lan ... c117b915c1

I say "limited" because, as I recall, only digits and a few other characters are available as superscripts & subscripts. That was good enough for our purposes, but it may not be for yours. I would hope that you could get Greek letters via Unicode as well, but I don't know.

Peace,
--Carl[/url]

Jane
Posts: 14
Joined: Wed Jun 25, 2008 7:16 pm

Post by Jane » Fri Jun 27, 2008 6:13 pm

Thank you very much.

Jane

Locked