From 221a0fbf1573073bfa27d93ff995e9aa4648ac55 Mon Sep 17 00:00:00 2001 From: Rob Date: Wed, 7 Aug 2013 17:33:21 -0700 Subject: [PATCH] Ability to add str as padding, for use as 'auto' --- examples/stacked_area_examples.py | 1 + vincent/visualization.py | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/examples/stacked_area_examples.py b/examples/stacked_area_examples.py index 49c8872..1274205 100644 --- a/examples/stacked_area_examples.py +++ b/examples/stacked_area_examples.py @@ -8,6 +8,7 @@ #Build a Stacked Area Chart from scratch from vincent import * +import pandas as pd import pandas.io.data as web all_data = {} for ticker in ['AAPL', 'GOOG', 'IBM', 'YHOO', 'MSFT']: diff --git a/vincent/visualization.py b/vincent/visualization.py index 9d8463e..514a7de 100644 --- a/vincent/visualization.py +++ b/vincent/visualization.py @@ -86,7 +86,7 @@ def viewport(value): if v < 0: raise ValueError('viewport dimensions cannot be negative') - @grammar((int, dict)) + @grammar((int, dict, str)) def padding(value): """int or dict : Padding around visualization