ploterific 0.1.0.0 → 0.1.0.1
raw patch · 3 files changed
+7/−4 lines, 3 filesPVP: major bump suggested
API removals or changes: PVP suggests a major version bump
API changes (from Hackage documentation)
- Ploterific.Program.Options: [measurement] :: Options -> [String] <?> "(Nothing | MEASUREMENT) Specify the level of measurement for each --feature in order. For instance, --feature col1 --feature col2 --measurement quantitative --measurement nominal. "
- Ploterific.Program.Options: Options :: (Maybe String <?> "([STDIN] | PATH) The path for the input data in tabular format, with row observations and column features.") -> (Maybe String <?> "([STDOUT] | PATH) HTML output path.") -> ([String] <?> "(COLUMN) A list of columns to use in the plot in the format --feature col1 --feature col2 etc. for axes X, Y, etc. To force a measurement, add `:` followed by `N`, `O`, `Q`, or `T` for nominal, ordinal, quantitiative, or temporal measurements, respectively. Full list of measurements located at https://vega.github.io/vega-lite/docs/type.html.") -> (Maybe String <?> "(NOTHING | COLUMN) The column containing a feature to use for colors. Add measurement according to --feature if needed.") -> ([String] <?> "(Nothing | MEASUREMENT) Specify the level of measurement for each --feature in order. For instance, --feature col1 --feature col2 --measurement quantitative --measurement nominal. ") -> (String <?> "(MARK) The mark type for the plot. Common types are Circle, Bar, Boxplot, and Line. See https://hackage.haskell.org/package/hvega-0.11.0.1/docs/Graphics-Vega-VegaLite.html#t:Mark for a list.") -> (Maybe Char <?> "([,] | CHAR) The delimiter for the table.") -> (Maybe Double <?> "(Nothing | DOUBLE) The height of the plot.") -> (Maybe Double <?> "(Nothing | Double) The width of the plot.") -> Options
+ Ploterific.Program.Options: Options :: (Maybe String <?> "([STDIN] | PATH) The path for the input data in tabular format, with row observations and column features.") -> (Maybe String <?> "([STDOUT] | PATH) HTML output path.") -> ([String] <?> "(COLUMN) A list of columns to use in the plot in the format --feature col1 --feature col2 etc. for axes X, Y, etc. To force a measurement, add `:` followed by `N`, `O`, `Q`, or `T` for nominal, ordinal, quantitiative, or temporal measurements, respectively. Full list of measurements located at https://vega.github.io/vega-lite/docs/type.html.") -> (Maybe String <?> "(NOTHING | COLUMN) The column containing a feature to use for colors. Add measurement according to --feature if needed.") -> (String <?> "(MARK) The mark type for the plot. Common types are Circle, Bar, Boxplot, and Line. See https://hackage.haskell.org/package/hvega-0.11.0.1/docs/Graphics-Vega-VegaLite.html#t:Mark for a list.") -> (Maybe Char <?> "([,] | CHAR) The delimiter for the table.") -> (Maybe Double <?> "(Nothing | DOUBLE) The height of the plot.") -> (Maybe Double <?> "(Nothing | Double) The width of the plot.") -> Options
Files
ploterific.cabal view
@@ -1,5 +1,5 @@ name: ploterific-version: 0.1.0.0+version: 0.1.0.1 synopsis: Basic plotting of tabular data for the command line. description: A quick and easy way to plot tabular data from the command line. Meant for quick visualizations, not too customizable. homepage: http://github.com/GregorySchwartz/ploterific#readme
src/Ploterific/Plot/Plot.hs view
@@ -15,6 +15,7 @@ import Control.Monad.Reader (ReaderT (..), asks, liftIO) import Data.Bool (bool) import Data.Char (ord)+import Data.Either (rights) import Data.List (foldl') import Data.Maybe (fromMaybe) import qualified Control.Lens as L@@ -96,9 +97,12 @@ . getColMeasurement $ x textToNumbers x = VL.Numbers+ . fmap fst+ . rights . fmap ( maybe- (error "Can not parse number in column")- (either error fst . T.double)+ ( error+ $ "Column not in table: " <> show (getColName x))+ T.double . Map.lookup (getColName x) ) textToString x = VL.Strings . fmap (fromMaybe "" . Map.lookup (getColName x))
src/Ploterific/Program/Options.hs view
@@ -26,7 +26,6 @@ , output :: Maybe String <?> "([STDOUT] | PATH) HTML output path." , feature :: [String] <?> "(COLUMN) A list of columns to use in the plot in the format --feature col1 --feature col2 etc. for axes X, Y, etc. To force a measurement, add `:` followed by `N`, `O`, `Q`, or `T` for nominal, ordinal, quantitiative, or temporal measurements, respectively. Full list of measurements located at https://vega.github.io/vega-lite/docs/type.html." , color :: Maybe String <?> "(NOTHING | COLUMN) The column containing a feature to use for colors. Add measurement according to --feature if needed."- , measurement :: [String] <?> "(Nothing | MEASUREMENT) Specify the level of measurement for each --feature in order. For instance, --feature col1 --feature col2 --measurement quantitative --measurement nominal. " , mark :: String <?> "(MARK) The mark type for the plot. Common types are Circle, Bar, Boxplot, and Line. See https://hackage.haskell.org/package/hvega-0.11.0.1/docs/Graphics-Vega-VegaLite.html#t:Mark for a list." , delimiter :: Maybe Char <?> "([,] | CHAR) The delimiter for the table." , height :: Maybe Double <?> "(Nothing | DOUBLE) The height of the plot."