TikZ is an extremely well-designed library for generating professional
figures within the cumbersome TeX framework. Currently, my work flow is to
generate TikZ code using Python. The TikZ is compiled into PDFs, which are
then included in my LaTeX files. I would like to work entirely in Python.
On 2015/05/13 12:39 AM, Neil Girdhar wrote:
> TikZ is an extremely well-designed library for generating professional
> figures within the cumbersome TeX framework. Currently, my work flow is
> to generate TikZ code using Python. The TikZ is compiled into PDFs,
> which are then included in my LaTe
The failures on python nightly are currently due to a bug in python (
http://bugs.python.org/issue24176)
Tom
--
One dashboard for servers and applications across Physical-Virtual-Cloud
Widest out-of-the-box monitoring sup
I don't know matplotlib well enough (yet) to know what the change would
consist of.
I suggest you take a look at the beautiful tikz manual:
http://pgf.sourceforge.net/pgf_CVS.pdf
The arrows.meta on page 201–212 are really well-designed and beautiful.
Compare this with matplotlib's custom arrows:
Just to point out, matplotlib does have a fairly new PGF backend. Perhaps
you might want to look at that and see where the TikZ library might fit in
with that?
Cheers!
Ben Root
On Wed, May 13, 2015 at 3:36 PM, Neil Girdhar wrote:
> I don't know matplotlib well enough (yet) to know what the chan
On 2015/05/13 9:36 AM, Neil Girdhar wrote:
> I don't know matplotlib well enough (yet) to know what the change would
> consist of.
>
> I suggest you take a look at the beautiful tikz manual:
> http://pgf.sourceforge.net/pgf_CVS.pdf
Very helpful, thank you.
>
> The arrows.meta on page 201–212 are
If you want to make arrowheads look at all decent, they really need to be
enclosed in Bezier curves. See the diagram here:
http://tex.stackexchange.com/questions/150289/how-do-you-accomplish-stealth-with-the-new-arrows-meta/230965#230965
The first two look like garbage. The last one is the only
On 2015/05/13 10:12 AM, Neil Girdhar wrote:
> If you want to make arrowheads look at all decent, they really need to
> be enclosed in Bezier curves. See the diagram here:
Mpl paths support Bezier curves.
http://matplotlib.org/api/path_api.html?highlight=bezier
>
> http://tex.stackexchange.com/qu
Yes, I just noticed that as well. That's how the tikz pgf code looks (a
sequence of line_to and curve_to commands and so on) so it should be easy
to port over the various shapes.
On Wed, May 13, 2015 at 4:49 PM, Eric Firing wrote:
> On 2015/05/13 10:12 AM, Neil Girdhar wrote:
>
>> If you want t
The other thing that should be done is to unify the (I think 7?!?) unique
ways to draw arrows in mpl.
On Wed, May 13, 2015 at 4:52 PM Neil Girdhar wrote:
> Yes, I just noticed that as well. That's how the tikz pgf code looks (a
> sequence of line_to and curve_to commands and so on) so it should
Fascinating! Can you "unpack" (heh) that error for us mere mortals? In
particular:
- never seen that "or" syntax before... Is it coercing both expressions as
bool, or is it evaluating to left if bool(left) evaluates to True, else to
right?
- Why do you expect the second expression to work? Is ** s
Wow, this looks great.
Thank you all of you so far for the quick responses and pointers.
I've already done many diagrams in Python-generated TikZ, which I want to
port over to pure Python. They are basically variants of this:
http://www.texample.net/tikz/examples/graph/ . Do you think this will
Do you have the code that you used to draw the arrowhead? I'm up to date
now on the development workflow (
http://matplotlib.org/devel/gitwash/development_workflow.html), so I'm
ready to start working.
Thanks,
Neil
On Wed, May 13, 2015 at 9:10 PM, Benjamin Reedlunn
wrote:
> Yes, I fully agree
Neil,I have attached code to draw the arrowhead.-Ben# -*- coding: utf-8 -*-
"""
Spyder Editor
This is a temporary script file.
"""
import custom_annotations
import matplotlib.pyplot as plt
plt.figure()
ax = plt.subplot(111)
length = 20.0
head_length = 7.0
#Convert the head length from mm into po
Thanks, it works!
I needed to add:
import matplotlib.patches
to one file and
plt.show()
to the other.
Any word on the locations in the code of the seven arrow drawing methods?
I've located the arrow drawing code in tikz, and so I can start porting it
over. I'm curious, do we know the linewi
The `a or b` syntax evaluates if a is 'trueish' and if so returns a if not
returns b so `c = None or {}` -> c == {} but `c = {'a': 1} or {}` -> c ==
{'a': 1}
See
https://docs.python.org/3.5/reference/expressions.html#grammar-token-or_test
for the docs on or. and works almost the same, but returns
Thanks Tom! Absolutely fascinating! I was trying to grok this and thinking,
"but what if we want 'or' to return a value that will later be used as a
conditional, surely it should return bool?" But of course whatever it
returns will be correctly interpreted as a bool in a conditional context!
Delaye
On 2015/05/13 4:14 PM, Neil Girdhar wrote:
> Thanks, it works!
>
> I needed to add:
>
> import matplotlib.patches
>
> to one file and
>
> plt.show()
>
> to the other.
>
> Any word on the locations in the code of the seven arrow drawing methods?
I'm not sure how to get to a count of seven. One of
Okay, I'm looking at this in more detail and there may be some design
concerns:
The arrow placement is decided without asking the arrow any questions, such
as its bounding box. Instead, the arrow should return a bounding box and
then the line should retreat until the bounding box no longer inters
I don't want to ruffle any feathers, and I'm sure this comes up all the
time, but I'm wondering why don't we have a decorator on classes that
generates all of the boilerplate methods?
For example:
@generate_boilerplate([('linestyle', 'ls'), …]
class Patch(…):
would generate
get_ls, set_ls to po
Sorry, I may have been being a bit dramatic
In mpl.patches: Arrow, FancyArrow, YAArrow, FancyArrowPatch,
ConnectionPatch + annotation related artists + some classes in axisartist
which now that I look at them are not really general purpose arrow tools.
I had not been counting quiver (or barbs) or
It is my understanding that most of this code pre-dates properties and
going through and updating all of the classes is a _huge_ amount of work.
It is more a matter of time than will.
There is also a slowly simmering discussion about implementing artists in a
managed property/attribute frame work
Manpower, really. Also, there be dragons deep in that code (I'll leave it
as an exploration task for you to figure out how aliases are done).
There have been a few proposals, but they keep suffering from scope creep.
Take a look at the MEP page.
Keep in mind that reducing Lines of Code just for t
You're right. My angle is I just want the setters and getters. Writing
set_ and get_ feels like the C++ prison I thought I had escaped :)
I'll keep an eye for the discussion on this topic since this is interesting
to me for other reasons as well. (I had to code something like params for
my own
On 2015/05/13 5:47 PM, Neil Girdhar wrote:
> You're right. My angle is I just want the setters and getters. Writing
> set_ and get_ feels like the C++ prison I thought I had escaped :)
>
John Hunter once commented that if he were doing it over again he would
not have put in all the set_ and get_
We (ipython/jupyter) have been talking some more about integrating
matplotlilb in deeper ways with the interactive widgets framework. That
only thing that would be required to make this *trivial* is having a
traitlet's based API for matplotlib. I have even started to look at
wrapping the existing m
This is very exciting! traitlets looks really nice. (Imho better than
params from my cursory look.)
On Thu, May 14, 2015 at 1:45 AM, Brian Granger wrote:
> We (ipython/jupyter) have been talking some more about integrating
> matplotlilb in deeper ways with the interactive widgets framework. Th
I should note that *all* of ipython is based on traitlets, so by now it is
very stable, battle tested (also actively developed). For base layers like
this, I think that is important.
On Wed, May 13, 2015 at 11:27 PM, Neil Girdhar
wrote:
> This is very exciting! traitlets looks really nice. (Im
28 matches
Mail list logo