Hello,

I was looking through the API for Plots.jl

http://plots.readthedocs.org/en/latest/#api


Maybe I'm the only one, but I think all those exclamation marks are a bit 
extraneous and feel like syntactic noise. I have been following Plots.jl 
because I'm interested in plotting. My use of Julia comes down to either 
making plots, or post-processing data so I can make a plots. I get the idea 
from Plots.jl that functions that end in an exclamation mark are supposed 
to modify an existing plot. So you get things like:

plot!(...)  # Add another plot to an existing one.
title!(...)
xaxis!("mylabel", :log, :flip)
xlims!(...)
xticks!(...)

and so on...

This means that in actual usage, almost every line I write needs to have an 
extra `!`. To me this means that the `!` is not adding real information and 
is just syntactic noise. I currently use PyPlot, so I use that as a point 
of comparison. In PyPlot, all commands edit the current plot unless you 
explicitly call `figure()` to create a new plot. You can also use clf() to 
clear the current plot. I think this is something that PyPlot / Matplotlib 
get right. The special syntax lines up with the less common action.

I don't know if anyone agrees with me. I still think Plots.jl is a step in 
the right direction and I'll keep cheering from the stands. I just wanted 
to share my thoughts.

Cheers,
Daniel.

Reply via email to