Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Question] Plotting images with external data files using pdfplot #13

Open
Huary007 opened this issue Sep 18, 2022 · 2 comments
Open

[Question] Plotting images with external data files using pdfplot #13

Huary007 opened this issue Sep 18, 2022 · 2 comments

Comments

@Huary007
Copy link

Thank you very much for creating this plugin. Inserting TikZ images in obsidian has improved my work efficiency.

I recently ran into some problems when trying to draw an image using external data files.

  1. When I use relative paths, I don't know which folder I should put my data files in.
  2. When I use absolute paths the images don't display properly either.

I use the data on this page as an example. This example can also be viewed in this overleaf page.

I put mesh.txt file in my obsidian folder, and use the following code in obsidian.

\documentclass[border= 5mm]{standalone}
\usepackage{pgfplots}
\pgfplotsset{compat=1.14}
\begin{document}
\begin{tikzpicture}
\begin{axis}[grid=both,view={70}{40},colormap/viridis]
  \addplot3+[surf,mesh/rows=11,mesh/ordering=colwise,no marks] file {mesh.txt};
\end{axis}
\end{tikzpicture}
\end{document} 

As shown in the picture below, the mesh image is not displayed properly in reading mode.

pdfplot_in_obsidian

@artisticat1
Copy link
Owner

Hello! At the moment, it isn't possible to load external data files into TikZJax.

However, I believe it should be possible to modify TikZJax and allow users to load in their own data files. I don't have any plans to do this at the moment, but others are welcome to try having a go at it!

@MohammadRazzaghpour
Copy link

I have the same issue. And it is very important to me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants