plots-0.1.1.1: Diagrams based plotting library.

Copyright(C) 2015 Christopher Chalmers
LicenseBSD-style (see the file LICENSE)
MaintainerChristopher Chalmers
Stabilityexperimental
Portabilitynon-portable
Safe HaskellNone
LanguageHaskell2010

Diagrams.Coordinates.Polar

Contents

Description

This module defines a polar coordinate data type. This type can be used as an axis space for polar plots.

Synopsis

Polar type

newtype Polar a Source #

Constructors

Polar (V2 a) 
Instances
Monad Polar Source # 
Instance details

Defined in Diagrams.Coordinates.Polar

Methods

(>>=) :: Polar a -> (a -> Polar b) -> Polar b #

(>>) :: Polar a -> Polar b -> Polar b #

return :: a -> Polar a #

fail :: String -> Polar a #

Functor Polar Source # 
Instance details

Defined in Diagrams.Coordinates.Polar

Methods

fmap :: (a -> b) -> Polar a -> Polar b #

(<$) :: a -> Polar b -> Polar a #

MonadFix Polar Source # 
Instance details

Defined in Diagrams.Coordinates.Polar

Methods

mfix :: (a -> Polar a) -> Polar a #

Applicative Polar Source # 
Instance details

Defined in Diagrams.Coordinates.Polar

Methods

pure :: a -> Polar a #

(<*>) :: Polar (a -> b) -> Polar a -> Polar b #

liftA2 :: (a -> b -> c) -> Polar a -> Polar b -> Polar c #

(*>) :: Polar a -> Polar b -> Polar b #

(<*) :: Polar a -> Polar b -> Polar a #

Foldable Polar Source # 
Instance details

Defined in Diagrams.Coordinates.Polar

Methods

fold :: Monoid m => Polar m -> m #

foldMap :: Monoid m => (a -> m) -> Polar a -> m #

foldr :: (a -> b -> b) -> b -> Polar a -> b #

foldr' :: (a -> b -> b) -> b -> Polar a -> b #

foldl :: (b -> a -> b) -> b -> Polar a -> b #

foldl' :: (b -> a -> b) -> b -> Polar a -> b #

foldr1 :: (a -> a -> a) -> Polar a -> a #

foldl1 :: (a -> a -> a) -> Polar a -> a #

toList :: Polar a -> [a] #

null :: Polar a -> Bool #

length :: Polar a -> Int #

elem :: Eq a => a -> Polar a -> Bool #

maximum :: Ord a => Polar a -> a #

minimum :: Ord a => Polar a -> a #

sum :: Num a => Polar a -> a #

product :: Num a => Polar a -> a #

Traversable Polar Source # 
Instance details

Defined in Diagrams.Coordinates.Polar

Methods

traverse :: Applicative f => (a -> f b) -> Polar a -> f (Polar b) #

sequenceA :: Applicative f => Polar (f a) -> f (Polar a) #

mapM :: Monad m => (a -> m b) -> Polar a -> m (Polar b) #

sequence :: Monad m => Polar (m a) -> m (Polar a) #

Distributive Polar Source # 
Instance details

Defined in Diagrams.Coordinates.Polar

Methods

distribute :: Functor f => f (Polar a) -> Polar (f a) #

collect :: Functor f => (a -> Polar b) -> f a -> Polar (f b) #

distributeM :: Monad m => m (Polar a) -> Polar (m a) #

collectM :: Monad m => (a -> Polar b) -> m a -> Polar (m b) #

Representable Polar Source # 
Instance details

Defined in Diagrams.Coordinates.Polar

Associated Types

type Rep Polar :: Type #

Methods

tabulate :: (Rep Polar -> a) -> Polar a #

index :: Polar a -> Rep Polar -> a #

MonadZip Polar Source # 
Instance details

Defined in Diagrams.Coordinates.Polar

Methods

mzip :: Polar a -> Polar b -> Polar (a, b) #

mzipWith :: (a -> b -> c) -> Polar a -> Polar b -> Polar c #

munzip :: Polar (a, b) -> (Polar a, Polar b) #

HasR Polar Source # 
Instance details

Defined in Diagrams.Coordinates.Polar

Methods

_r :: RealFloat n => Lens' (Polar n) n #

HasY Polar Source # 
Instance details

Defined in Diagrams.Coordinates.Polar

Methods

y_ :: RealFloat n => Lens' (Polar n) n Source #

xy_ :: RealFloat n => Lens' (Polar n) (V2 n) Source #

HasX Polar Source # 
Instance details

Defined in Diagrams.Coordinates.Polar

Methods

x_ :: RealFloat n => Lens' (Polar n) n Source #

Circle Polar Source # 
Instance details

Defined in Diagrams.Coordinates.Polar

Methods

_azimuth :: Lens' (Polar a) (Angle a) Source #

_polar :: Lens' (Polar a) (Polar a) Source #

Radial Polar Source # 
Instance details

Defined in Diagrams.Coordinates.Polar

Methods

_radial :: Lens' (Polar a) a Source #

RenderAxis Polar Source # 
Instance details

Defined in Plots.Axis.Render

Methods

renderAxis :: Axis Polar -> Diagram (BaseSpace Polar) Source #

RealFloat n => PointLike V2 n (Polar n) Source #

Does not satify lens laws.

Instance details

Defined in Diagrams.Coordinates.Polar

RenderOutcome t (Diagram V2) => RenderOutcome t (Axis Polar) 
Instance details

Defined in Plots.Axis.Render

Associated Types

type MainOpts t (Axis Polar) :: Type

Methods

resultParser :: t -> proxy (Axis Polar) -> Parser (MainOpts t (Axis Polar))

renderOutcome :: t -> MainOpts t (Axis Polar) -> Axis Polar -> IO ()

Wrapped (Polar a) Source # 
Instance details

Defined in Diagrams.Coordinates.Polar

Associated Types

type Unwrapped (Polar a) :: Type #

Methods

_Wrapped' :: Iso' (Polar a) (Unwrapped (Polar a)) #

WithOutcome (Axis Polar) 
Instance details

Defined in Plots.Axis.Render

Associated Types

type Args (Axis Polar) :: Type

type Outcome (Axis Polar) :: Type

Methods

argsParser :: proxy (Axis Polar) -> Parser (Args (Axis Polar))

withOutcome :: (Outcome (Axis Polar) -> IO ()) -> Args (Axis Polar) -> Axis Polar -> IO ()

Generic1 Polar Source # 
Instance details

Defined in Diagrams.Coordinates.Polar

Associated Types

type Rep1 Polar :: k -> Type #

Methods

from1 :: Polar a -> Rep1 Polar a #

to1 :: Rep1 Polar a -> Polar a #

Polar a1 ~ t => Rewrapped (Polar a2) t Source # 
Instance details

Defined in Diagrams.Coordinates.Polar

type Rep Polar Source # 
Instance details

Defined in Diagrams.Coordinates.Polar

type Rep Polar = E Polar
type BaseSpace Polar Source # 
Instance details

Defined in Plots.Axis

type MainOpts t (Axis Polar) 
Instance details

Defined in Plots.Axis.Render

type MainOpts t (Axis Polar) = MainOpts t (Diagram V2)
type Unwrapped (Polar a) Source # 
Instance details

Defined in Diagrams.Coordinates.Polar

type Unwrapped (Polar a) = V2 a
type Args (Axis Polar) 
Instance details

Defined in Plots.Axis.Render

type Args (Axis Polar) = ()
type Outcome (Axis Polar) 
Instance details

Defined in Plots.Axis.Render

type Outcome (Axis Polar) = Axis Polar
type Rep1 Polar Source # 
Instance details

Defined in Diagrams.Coordinates.Polar

type Rep1 Polar = D1 (MetaData "Polar" "Diagrams.Coordinates.Polar" "plots-0.1.1.1-inplace" True) (C1 (MetaCons "Polar" PrefixI False) (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec1 V2)))

mkPolar :: n -> Angle n -> Polar n Source #

Construct a Polar from a magnitude and an Angle.

polar :: (n, Angle n) -> Polar n Source #

Construct a Polar from a magnitude and Angle tuple.

unpolar :: Polar n -> (n, Angle n) Source #

Turn a Polar back into a magnitude and Angle tuple.

polarIso :: Iso' (Polar n) (n, Angle n) Source #

Iso' between Polar and its tuple form.

polarV2 :: RealFloat n => Iso' (Polar n) (V2 n) Source #

Numerical Iso' between Polar and R2.

Polar functions

interpPolar :: Num n => n -> Polar n -> Polar n -> Polar n Source #

Polar interpolation between two polar coordinates.

Classes

class Radial t where Source #

Space which has a radial length basis. For Polar and Cylindrical this is the radius of the circle in the xy-plane. For Spherical this is the distance from the origin.

Methods

_radial :: Lens' (t a) a Source #

Instances
Radial Polar Source # 
Instance details

Defined in Diagrams.Coordinates.Polar

Methods

_radial :: Lens' (Polar a) a Source #

class Radial t => Circle t where Source #

Space which has a radial and angular basis.

Methods

_azimuth :: Lens' (t a) (Angle a) Source #

_polar :: Lens' (t a) (Polar a) Source #

Instances
Circle Polar Source # 
Instance details

Defined in Diagrams.Coordinates.Polar

Methods

_azimuth :: Lens' (Polar a) (Angle a) Source #

_polar :: Lens' (Polar a) (Polar a) Source #

class HasX t where Source #

Coordinate with at least one dimension where the x coordinate can be retrieved numerically. Note this differs slightly from R1 which requires a lens for all values. This allows instances for different coordinates such as Polar, where the x coordinate can only be retrieved numerically.

Methods

x_ :: RealFloat n => Lens' (t n) n Source #

Instances
HasX V3 Source # 
Instance details

Defined in Diagrams.Coordinates.Polar

Methods

x_ :: RealFloat n => Lens' (V3 n) n Source #

HasX V2 Source # 
Instance details

Defined in Diagrams.Coordinates.Polar

Methods

x_ :: RealFloat n => Lens' (V2 n) n Source #

HasX Polar Source # 
Instance details

Defined in Diagrams.Coordinates.Polar

Methods

x_ :: RealFloat n => Lens' (Polar n) n Source #

HasX v => HasX (Point v) Source # 
Instance details

Defined in Diagrams.Coordinates.Polar

Methods

x_ :: RealFloat n => Lens' (Point v n) n Source #

class HasX t => HasY t where Source #

Coordinate with at least two dimensions where the x and y coordinates can be retreived numerically.

Minimal complete definition

xy_

Methods

y_ :: RealFloat n => Lens' (t n) n Source #

xy_ :: RealFloat n => Lens' (t n) (V2 n) Source #

Instances
HasY V3 Source # 
Instance details

Defined in Diagrams.Coordinates.Polar

Methods

y_ :: RealFloat n => Lens' (V3 n) n Source #

xy_ :: RealFloat n => Lens' (V3 n) (V2 n) Source #

HasY V2 Source # 
Instance details

Defined in Diagrams.Coordinates.Polar

Methods

y_ :: RealFloat n => Lens' (V2 n) n Source #

xy_ :: RealFloat n => Lens' (V2 n) (V2 n) Source #

HasY Polar Source # 
Instance details

Defined in Diagrams.Coordinates.Polar

Methods

y_ :: RealFloat n => Lens' (Polar n) n Source #

xy_ :: RealFloat n => Lens' (Polar n) (V2 n) Source #

HasY v => HasY (Point v) Source # 
Instance details

Defined in Diagrams.Coordinates.Polar

Methods

y_ :: RealFloat n => Lens' (Point v n) n Source #

xy_ :: RealFloat n => Lens' (Point v n) (V2 n) Source #

class HasR (t :: Type -> Type) where #

Methods

_r :: RealFloat n => Lens' (t n) n #

Instances
HasR V2 
Instance details

Defined in Geometry.TwoD.Types

Methods

_r :: RealFloat n => Lens' (V2 n) n #

HasR Polar Source # 
Instance details

Defined in Diagrams.Coordinates.Polar

Methods

_r :: RealFloat n => Lens' (Polar n) n #

HasR v => HasR (Point v) 
Instance details

Defined in Geometry.TwoD.Types

Methods

_r :: RealFloat n => Lens' (Point v n) n #

Basis elements

er :: Radial v => E v Source #

:: Circle v => E v Source #

etheta :: Circle v => E v Source #