LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #4   Report Post  
Posted to microsoft.public.excel.charting
Jon Peltier
 
Posts: n/a
Default Better control of axis ranges

For some complex charts, I use a process that completely rescales
everything. It's what graphics packages do behind the scenes, but I use it
in the worksheet to give me ultimate control.

I start by determining min and max values I'll need on an axis. I have
algorithms to choose "nice" axis min, max, and tick spacing values. It's
related to Stephen Bullen's VBA approach:

http://groups.google.com/group/micro...d5257af6a8 c7

but I do it in the worksheet. Then given these calculated limits, I rescale
the series data from 0 to 1 so that 0 corresponds with the calculated min
and 1 to the calculated max; the axis is then locked into a scale of 0 to 1.
That's the data. Then I use this technique from my web site:

http://peltiertech.com/Excel/Charts/ArbitraryAxis.html

to add the required axis ticks and labels. No VBA is required, because the
axis scale doesn't change. It sounds like a lot of work, but it's reliable
and flexible, and I can use this to create charts with great complexity,
showing several sections, like the stock charts in the newspaper with prices
in one section, lined up with volume in another, and perhaps a comparison of
various indices in yet another section. If I want to add a section, or
change the relative height of one, it is merely a matter of tweaking a few
parameters in the cells, and all of the scaling occurs automatically.

- Jon
-------
Jon Peltier, Microsoft Excel MVP
Peltier Technical Services - Tutorials and Custom Solutions -
http://PeltierTech.com/
2006 Excel User Conference, 19-21 April, Atlantic City, NJ
http://peltiertech.com/Excel/ExcelUserConf06.html
_______

"hmm" wrote in message
...
I would like to make x-y charts in Excel 2000 with dynamic source data.
That
is, the user can select what data set he wants to display.

To do this, I need better control of how the axis limits are defined.
This
can be achieved in one of two ways:

1. Use numbers from cells to define xmin, xmax, ymin, ymax.
2. Define in some way how auto-scaling decides what the min and max values
are (I often find that the data gets "scrunched" into a small portion of
the
plot area).

Method 1 is preferred, but 2 may also work. I would prefer to do this
without writing a VBA macro, if possible.

Does anyone know if this can be done?



 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Dynamic Range with unused formula messing up x axis on dynamic graph [email protected] Charts and Charting in Excel 2 February 2nd 06 08:02 PM
how to add a second x axis with same Y axis value in one plot Mike Charts and Charting in Excel 1 October 19th 05 08:42 AM
In a 2 Y-Axis chart, how do I assign data ranges to an axis? Claire4Golf Charts and Charting in Excel 1 September 28th 05 07:52 PM
Secondary Axis Match Primary Axis Gridlines [email protected] Charts and Charting in Excel 1 July 31st 05 09:23 PM
Show two value ranges on one axis NOKIA Charts and Charting in Excel 5 December 23rd 04 01:51 PM


All times are GMT +1. The time now is 10:12 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"