Histogram 0.1.0.1 → 0.1.0.2
raw patch · 3 files changed
+12/−36 lines, 3 filesPVP ok
version bump matches the API change (PVP)
API changes (from Hackage documentation)
Files
- Histogram.cabal +3/−3
- LICENSE +0/−30
- src/Graphics/Histogram.hs +9/−3
Histogram.cabal view
@@ -1,9 +1,9 @@ Name: Histogram-Version: 0.1.0.1+Version: 0.1.0.2 Description: Easily create histograms of your data Category: Charts-License: GPL-License-file: LICENSE+License: BSD3+--License-file: LICENSE Author: Mike izbicki Maintainer: mike@izbicki.me Build-Type: Simple
− LICENSE
@@ -1,30 +0,0 @@-Copyright (c) Michael Izbicki--All rights reserved.--Redistribution and use in source and binary forms, with or without-modification, are permitted provided that the following conditions-are met:--1. Redistributions of source code must retain the above copyright- notice, this list of conditions and the following disclaimer.--2. Redistributions in binary form must reproduce the above copyright- notice, this list of conditions and the following disclaimer in the- documentation and/or other materials provided with the distribution.--3. Neither the name of the author nor the names of his contributors- may be used to endorse or promote products derived from this software- without specific prior written permission.--THIS SOFTWARE IS PROVIDED BY THE CONTRIBUTORS ``AS IS'' AND ANY EXPRESS-OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED-WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE-DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE FOR-ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL-DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS-OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)-HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,-STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN-ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE-POSSIBILITY OF SUCH DAMAGE.
src/Graphics/Histogram.hs view
@@ -174,12 +174,18 @@ type PlotOptions = Opts.T (Graph2D.T Int Double) -- type PlotOptions = Graphics.Gnuplot.Frame.OptionSet.T (Graphics.Gnuplot.Graph.TwoDimensional.T Int Double) --- | Plots your histogram. If the filename is empty, then it will open a window and display the histogram on screen. Otherwise, the filetype is automatically determined by the extension. Supported file types are .png, .svg (vector graphics), and .eps (PostScript).-plot :: String -> Histogram -> IO GHC.IO.Exception.ExitCode+-- | Plots your histogram using gnuplot. If the filename is empty, then it will open a window and display the histogram on screen. Otherwise, the filetype is automatically determined by the extension. Supported file types are .png, .svg (vector graphics), and .eps (PostScript).+plot :: + String -> -- Filename @a@+ Histogram -> -- Data to be plotted+ IO GHC.IO.Exception.ExitCode plot file histdata = plotAdv file (defOpts histdata) histdata -- | Just like "plot", except you may specify additional options from the gnuplot library. For example, you could add labels and a title.-plotAdv :: String -> PlotOptions -> Histogram -> IO GHC.IO.Exception.ExitCode+plotAdv :: String -> -- Filename+ PlotOptions -> -- gnuplot options from Graphics.Gnuplot.Frame.OptionSet+ Histogram -> -- Data to be plotted+ IO GHC.IO.Exception.ExitCode -- plotAdv file opts histdata = Plot.plot (SVG.cons $ file) $ histgen histdata opts plotAdv file opts histdata = cmd where