Currently it isn't possible to assign a matplotlib object to a variable. This might be useful as in
fig, ax = plt.subplots()
of the python code example http://matplotlib.org/examples/api/patch_collection.html .
Sample code demonstrating this is,
import plt = matplotlibd.pyplot;
void main()
{
auto figure = plt.figure;
}
results in the error:
Performing "debug" build using /home/user/Downloads/dmd/dmd2.072.2/linux/bin64/dmd for x86_64.
matplotlib-d 0.1.4: building configuration "library"...
Running pre-build commands...
simple_example ~master: building configuration "application"...
Running pre-build commands...
source/app.d(5,8): Error: variable app.main.figure type void is inferred from initializer figure(), and variables cannot be of type void
source/app.d(5,20): Error: expression figure() is void and has no value
/home/user/Downloads/dmd/dmd2.072.2/linux/bin64/dmd failed with exit code 1
This isn't actually the use I need (I need a PdfPages object from the matplotlib.backends.backend_pdf which I can import successfully with some small changes to matplotlib-d -> #8 ) but the error is the same and this is in the repo.
Finally thanks for this repo, it's a promising idea.
Currently it isn't possible to assign a matplotlib object to a variable. This might be useful as in
fig, ax = plt.subplots()of the python code example http://matplotlib.org/examples/api/patch_collection.html .
Sample code demonstrating this is,
results in the error:
This isn't actually the use I need (I need a PdfPages object from the matplotlib.backends.backend_pdf which I can import successfully with some small changes to matplotlib-d -> #8 ) but the error is the same and this is in the repo.
Finally thanks for this repo, it's a promising idea.