Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions src/Graphics/Matplotlib.hs
Original file line number Diff line number Diff line change
Expand Up @@ -241,6 +241,14 @@ dataPlot a b = mp # "p = ax.plot(data[" # a # "], data[" # b # "]" ## ")"
plot :: (ToJSON t, ToJSON t1) => t1 -> t -> Matplotlib
plot x y = readData (x, y) % dataPlot 0 1

-- | Stemplot the 'a' and 'b' entries of the data object
dataStem :: (MplotValue val, MplotValue val1) => val1 -> val -> Matplotlib
dataStem a b = mp # "p = ax.stem(data[" # a # "], data[" # b # "]" ## ")"

-- | Stemplot the Haskell objects 'x' and 'y'
stem :: (ToJSON t, ToJSON t1) => t1 -> t -> Matplotlib
stem x y = readData (x, y) % dataStem 0 1

streamplot x y u v = readData (x, y, u, v)
% mp # "ax.streamplot(np.asarray(data[0]), np.asarray(data[1]), np.asarray(data[2]), np.asarray(data[3])" ## ")"

Expand Down