semi-log scatter plots and formatting and error-bars

0 views
Skip to first unread message

thebu...@gmail.com

unread,
Nov 30, 2007, 1:36:33 PM11/30/07
to ZiYa Plugin
hi,

first off, this is a great plugin! you've done a fantastic job
(whoever you are).

However, I have a couple of questions on formatting scatter-plots

1. is there a simple method for making a semi-log plot?
2. is there a simple way to format axis numbers in scientific
notation? e.g. 125000 => 1.25e +5
3. is there a simple way of connecting the points within a given
series of a scatter plot via straight lines?
4. is there a simple way to include error bars associated with each
point.

e.g., let's say I want to make a scatter plot of the following x,y
value pairs: [[0, 20], [2, 3000], [6,6500], [48, 15000]]
And I'd like have the x values arrayed linearly, and the y values
arrayed logarithmically.

is there a simple way to do this via Ziya?

i've googled this forum for each of these questions...and...

w/ respect to semi-log plots, there are a couple of threads, but they
don't seem to do what I'd like.

e.g. I can set the axis_value_text in my controller method like
this:

graph.add :axis_value_text, %w(0 0.1 1.0 10.0 100.0 1000.0 10000.0
100000.0)

but this doesn't alter the location of my y-values within the graph.

I also googled this forum using the keywords 'scientific' and
'exponential' to find help formatting axis values, but I couldn't find
anything.

Any help is much appreciated!



thebu...@gmail.com

unread,
Nov 30, 2007, 1:49:36 PM11/30/07
to ZiYa Plugin

> 3. is there a simple way of connecting the points within a given
> series of a scatter plot via straight lines?

Okay. I figured this one out by searching for all threads with the
word 'scatter' in them in this forum.

Fernand, I hope all the good karma you're giving around here comes
back to you 10-fold !

and hopefully, #'s 1,2 and 4 can be done!

thanks again.

fernand...@gmail.com

unread,
Dec 4, 2007, 1:29:31 AM12/4/07
to ZiYa Plugin
Hi,

Thank you for the kind words. Very much appreciated !!

Unfortunately I don't have really good answers for you at the
moment.

1. is there a simple method for making a semi-log plot?

No. XML/SWF does not support a very strong api when it comes to
Scatter Charts. They can be difficult to work with as they don't obey
other charts api.

2. is there a simple way to format axis numbers in scientific
notation? e.g. 125000 => 1.25e +5

No. Short of drawing your own axis, there is unfortunately no good way
to
support the notation. I have filed this question with the XML/SWF
folks.

3. is there a simple way of connecting the points within a given
series of a scatter plot via straight lines?

Yes - I guess you've got a solution there using the chart preference.

4. is there a simple way to include error bars associated with each
point.

Not sure what you mean there. Could you expand on this ?

You can annotate each point using the label array option in the add
call.

ie

chart.add( :series, "SeriesName", [10,20,30], ['Dog', 'Cat', 'Fox' ]
You can omit some of the values with nil for normal condition...

Best Regards,
Fernand

On Nov 30, 11:49 am, "thebusy...@gmail.com" <thebusy...@gmail.com>
wrote:

Lori Olson

unread,
Dec 4, 2007, 3:54:47 PM12/4/07
to ziya-...@googlegroups.com
On Dec 3, 2007 11:29 PM, fernand...@gmail.com <fernand...@gmail.com> wrote:

Hi,

  Thank you for the kind words. Very much appreciated !!

  Unfortunately I don't have really good answers for you at the
moment.

1.  is there a simple method for making a semi-log plot?

No. XML/SWF does not support a very strong api when it comes to
Scatter Charts. They can be difficult to work with as they don't obey
other charts api.

Actually, yes.  I have a Semilog chart that I developed as a sub class of Line chart.  It still needs some work, because some local app customizations have crept in, and is currently limited to log10 cycles, but I can post it, and you can poke at it, if you like. 

2.  is there a simple way to format axis numbers in scientific
notation?  e.g. 125000 => 1.25e +5

No. Short of drawing your own axis, there is unfortunately no good way
to
support the notation. I have filed this question with the XML/SWF
folks.

In conjunction with the Semilog stuff, I customized the axis display.  You can probably adjust what I did to get scientific notation.
 


3.  is there a simple way of connecting the points within a given
series of a scatter plot via straight lines?

Yes - I guess you've got a solution there using the chart preference.

4.  is there a simple way to include error bars associated with each
point.

Not sure what you mean there. Could you expand on this ?

I was wondering if the Candlestick chart could be modded to do error bars?
 

Lori M Olson

unread,
Dec 4, 2007, 4:09:32 PM12/4/07
to ZiYa Plugin
I uploaded my semilog chart rb file, and some pieces from my semilog
chart yml file which draw the semilog lines on the chart.

This was all based on a line chart (not a scatter), and with a fixed,
specific size for the chart. It's not perfect, but it works for us.
It should at least give you some ideas on how to sub class the scatter
chart to do something similar.

On Dec 4, 1:54 pm, "Lori Olson" <javadra...@gmail.com> wrote:
> On Dec 3, 2007 11:29 PM, fernand.gali...@gmail.com <
Reply all
Reply to author
Forward
0 new messages