How to make charts "exactly" alike?

M

marsupilami

Hi!

I'm using charts from excel in a report written in LaTeX. The chart
are converted to .eps by WMF2EPS. My problem is this;

I want a uniform appearance of all graphs in my report, but no matte
how much I try in excel the graphs appear sligthly different. I.e
borders or axes don't align properly when two graphs are printed nex
to, or above each other.

How can I make excel produce charts with attributes that are "exactly
alike (apart from the content that is)?

Help is greatly appreciated!

(copy-paste is NOT an option - fonts and sizes sometimes change when
chart is pasted
 
P

Peter T

Here's a little macro to get you started. First select
the chart to which all others on the same sheet will be
sized. This only adjusts the plot-area and will fail if
you try and set positions outside the chart-area.

Recording a macro, adjust other dimensions, even overall
position. Compare what you recorded with this macro and
it shouldn't be too difficult to include other chart
items, eg titles.

Maybe turn off Auto Scale font in various item format
options for font, and set all charts to matching font
sizes per item, again by macro.

Sub Test1()
Dim MainChart As Chart, ch As ChartObject
Set MainChart = ActiveChart

With MainChart

For Each ch In ActiveSheet.ChartObjects

ch.Chart.PlotArea.Top = .PlotArea.Top
ch.Chart.PlotArea.Left = .PlotArea.Left
ch.Chart.PlotArea.Width = .PlotArea.Width
ch.Chart.PlotArea.Height = .PlotArea.Height

Next
End With

End Sub

Regards,
Peter
PS, used to know a band called Marsuplami, long time ago
 
A

AlfD

Hi!

Obviously the main part of the problem is that the data going into th
sheets is not identical. So the dynamic construction of the chart eac
time it is needed will produce differences.

Some you can minimise: e.g. ensure you use exactly the same fonts; sam
lengths of titles & subtitles (chart, category and value); same length
of names in legends and data series. OK: you may need to pad some.

You can look at fixing the scales on the axes (replacing max and mi
auto settings with fixed values that suit all the charts, or at leas
the ones which are to be contiguous).

Make sure you fix whatever you can, rather than leave it to Excel. Eve
then, I'm pretty sure it will remain intractable in at least som
cases.

Al
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top