Gráficos de Contorno e de Superfície no Excel 2007

Algum tempo atrás eu escrevi sobre Gráficos de Contorno e de Superfície no Microsoft Excel no agora extinto TechTrax Ezine da Dian Chapman. Nesse artigo eu delineei os requisitos de dados para gráficos de superfície e contorno, e descrevi algumas das idiossincrasias de formatação desses gráficos. Esse artigo era válido para as versões 97 a 2003 do Excel, mas como tantos outros aspectos de gráficos, o Excel 2007 mudou tudo isso.

Para esses exemplos, vamos usar esse conjunto de dados simples. Cada valor na grade é o produto dos cabeçalhos de linha e coluna correspondentes.

Dados para Exemplos de Gráficos de Contorno e Superfície

Dados para Exemplos de Gráficos de Contorno e Superfície

Excel 2003 Gráficos de Contorno e Superfície

Selecione os dados e insira um gráfico de contorno, e você obterá algo assim. Eu removi as características dos eixos horizontal e vertical (na verdade, os eixos “categoria” e “série”), e selecionei um esquema de cores simples para as faixas de dados. Para formatar as bandas, você formatou a chave de legenda para essa banda, o pequeno quadrado na frente da etiqueta.

Excel 2003 Contour Chart with Default Scale

Excel 2003 Contour Chart with Default Scale

Scale

Essa escala é um pouco grossa, e características simétricas como o ponto de sela e as formas das bandas coloridas nos cantos não são simetricamente renderizadas. Você não pode fazer muito sobre a assimetria; eu costumava inserir linhas e colunas nos dados da fonte, e interpolar valores, para dobrar a resolução. Isto não curava a renderização estranha, mas pelo menos melhorou-a um pouco.

Para mudar a escala das bandas, formate a legenda. O diálogo Format Legend tem uma aba Scale como em um típico diálogo Format Axis. Você não pode ver o eixo “valor”, mas você pode selecioná-lo na barra de ferramentas Chart Element dropdown, e formatar sua escala diretamente.

Excel 2003 Chart Element Selection Dropdown

Aqui está o gráfico de contorno com uma escala mais fina e mais tons de azul e vermelho.

Excel 2003 Contour Chart with Fixed Scale

Excel 2003 Contour Chart with Fixed Scale

Below é o gráfico de superfície correspondente. O eixo do valor é agora evidente, e a forma tipo sela da superfície é talvez mais fácil de visualizar do que no gráfico de contorno. O lado negativo é que parte da superfície, o canto azul escuro, cai o suficiente para que seja obscurecida pelo ponto da sela no meio do gráfico.

Excel 2003 Surface Chart with Fixed Scale

Excel 2003 Surface Chart with Fixed Scale

Orientation

You can adjust the orientation of the surface chart using the 3-D View dialog, available by right-clicking on the chart.

Excel 2003 3D View Dialog

Excel 2003 3D View Dialog

In Excel 2003, you can also click on a corner of the box enclosing the chart…

Excel 2003 Surface Chart with Corners Selected

Excel 2003 Surface Chart with Corners Selected

… and drag the corner to reorient the chart. While dragging, just the outline of the box is visible, showing how the orientation is changing.

Changing Excel 2003 Surface Chart Orientation with the Mouse

Changing Excel 2003 Surface Chart Orientation with the Mouse

Excel 2007 Contour and Surface Charts

To make a contour chart in Excel 2007, like 2003, you select the data, and insert the chart.

Scale

You can’t format the legend to adjust the scale of the colored bands, but you can select the value axis using the dropdown on the Chart Tools > Layout or Format tab.

Excel 2007 Chart Element Selection Dropdown

Excel 2007 Chart Element Selection Dropdown

To change the colors of each band, select the legend entry (the legend keys in 2007 cannot be selected) and open the formatting dialog. The tabs for fill and border color refer to the formats of the legend key and the corresponding band.

Here is the contour plot with the same scale as the 2003 example above.

Excel 2007 Contour Chart with Fixed Scale

Excel 2007 Contour Chart with Fixed Scale

And the corresponding surface chart. Asymmetric rendering of the saddle point and other features has not changed since Excel 2003.

Excel 2007 Surface Chart with Fixed Scale

Excel 2007 Surface Chart with Fixed Scale

Orientation

The Format Chart Area dialog in Excel 2007 includes a 3-D Rotation pane to allow adjustment of the surface chart’s orientation. Como muitos diálogos de 2007, ele é muito maior do que o diálogo correspondente de 2003 sem muita diferença na função real.

Você também pode selecionar os cantos no gráfico de superfície do Excel 2007, mas não pode arrastá-los para ajustar a orientação do gráfico.

Excel 2007 3D View Dialog

Excel 2007 3D View Dialog

Formatação

Tal como muitas outras formatações no Excel 2007, especialmente nos gráficos do Excel 2007, o sombreamento dos gráficos de contorno e superfície é bastante exagerado. Os gráficos possuem gradientes de cor excessivos, aparentemente para representar os reflexos e a iluminação mais brilhante e escura causada por uma fonte de luz localizada em algum ângulo oblíquo.

Os gradientes não são muito severos em um gráfico de superfície, mas em um gráfico de contorno, eles interferem na interpretação dos valores nas faixas. Você pensaria que como o gráfico de contorno é “plano”, ele não seria afetado por uma fonte de luz offset. Mas o gráfico de contorno é realmente apenas uma vista de cima do gráfico de superfície, então todo o sombreamento aparece em ambos os gráficos.

As variações de cor não seriam tão ruins se houvesse uma maneira de atenuar as diferenças. Eu procurei por um tempo, no entanto, e não consegui encontrar uma maneira de reduzir a variação dentro de uma banda de cor. Também não consegui encontrar nenhum tipo de textura ou outra característica que melhorasse a aparência dos gráficos.

É possível remover as regiões claras e escuras nos gráficos de 2007, tornando-as com cores lisas como em suas contrapartidas de 2003. Você tem que cavar bem fundo para encontrar o truque, então tenho o prazer de compartilhá-lo com você aqui.

Você precisa formatar a faixa de cor. Para fazer isso, clique uma vez na legenda, depois clique uma vez na etiqueta da banda que você quer formatar. Depois clique com o botão direito do mouse nesta etiqueta e escolha Formatar Banda no menu pop-up.

Na caixa de diálogo Formatar Banda, clique em Formato 3-D, depois clique em Material, e em Efeito Especial, selecione a opção Flat.

Format Band - 3D Format - Material Dialog

Format Band - 3D Format - Material Dialog

This removes all of the textures within the band. Repeat for every band in the contour plot…

Excel 2007 Contour Chart with Fixed Shading

Excel 2007 Contour Chart with Fixed Shading

… or surface chart.

Excel 2007 Surface Chart with Fixed Shading

Excel 2007 Surface Chart with Fixed Shading

While the default texture with all of the shading and gradients was excessive, it provided a bit of detail missing in the flat-colored charts. In 2003, this detail was provided by borders on the bands. Add a border using the Format Bands dialog.

Excel 2007 Contour Chart with Borders

Excel 2007 Contour Chart with Borders

The border seems to help the surface chart more than the contour plot.

Excel 2007 Surface Chart with Borders

Excel 2007 Surface Chart with Borders

Deixe uma resposta

O seu endereço de email não será publicado.