• 0 Posts
  • 4 Comments
Joined 3 years ago
cake
Cake day: July 7th, 2023

help-circle

  • That colourblind palette is golden, thank you for sharing it. And I was just talking about me wanting have a crack at creating that arrow myself, but thank you for offering to share. I’ll be sure to reach out if I find myself being unable to replicate it.

    I wasn’t even talking about tikzplotlib. It’s just that pgf backend is now supported by matplotlib and you can produce pgf files with:

    import matplotlib.pyplot as plt
    import matplotlib
    
    matplotlib.use('pgf')
    
    fig, ax = plt.subplots()
    # Code related to plotting here
    
    fig.savefig("outputfile.pgf")
    

    with relevant rcParams options in matplotlibrc, then import the pgf with:

    \begin{figure}[h]
        \centering
          \resizebox{\linewidth}{!}{
            \input{outputfile.pgf}
          }
        \caption{Caption here.}
    \end{figure}
    

    But Python -> CSV -> LaTeX/pgf pipeline is quite smooth, for sure. I understand why you’d decide to opt for it without involving too many third-party dependencies.