Questions tagged [matlab2tikz]

A tag for TikZ/pgfplots code generated by matlab2tikz. Use this tag *in addition* to pgfplots to stress that your pgfplots code has been generated by matlab2tikz. matlab2tikz as such is out-of-scope of this platform; it is unrelated to TeX.

Filter by
Sorted by
Tagged with
0
votes
0answers
32 views

Problem with Lualatex and hyperref

I have a lot of matlab2tikz generated figures which look good, but when I input them in my maincode it leady to exceeded capacity error. I figured out, when I place each Plot on a new page the memory ...
-1
votes
1answer
85 views

changing reference line of `\closedcycle`“ and ”`fill`" option in pgfplots

I have used Matlab2tikz package to obtain tikz files of some plots drawn by Matlab. They have a problem in showing colored confidence intervals using "fill" option. My conjecture is that the ...
0
votes
0answers
73 views

How to convert give you Matlab figures in Latex a cleaner look

I am trying to import my Matlab graphs into LaTex. I already know how to do it. However, the graphs have poor quality and are unproportioned. How do you get those Mablab figures to appear "HD&...
0
votes
0answers
9 views

How to remove formatting for some of the keywords in listings?

How do I remove (or change) the formatting for end on line 8 while not removing it for end that closes the for-loop? \documentclass{article} \usepackage{verbatim} % code \usepackage{listings} ...
1
vote
1answer
23 views

How can I add string formatting for listings code?

How do I make sure that string-like code like "file" below (on line 7) gets same formating (purple/muave) like strings below? \documentclass{article} \usepackage{verbatim} % code \...
0
votes
0answers
18 views

pgfplots - surface plot with multiple surfaces, unclear intersection

I use matlab2tikz to generate figures, see attached first figure (this is an example to illustrate the problem) where two surfaces intersect each other. The generated tikz figure is shown below and ...
1
vote
0answers
53 views

Removing scientific notation of y-axis

Hello fellows and folks! I am having a very hard time trying to figure out how to remove the scientific notations on the y-axis of my graphs. The graphs are made in MATLAB and then converted into TikZ ...
0
votes
1answer
92 views

matlab2tikz - problem with german letters - ä, ö, ü, \cdot and r_N

I'm using matlab2tikz the first time and get some problems with the first graph. I could seperate the problem. In the moment, I insert german letters like ä, ö, ü or special code like \cdot and r_N in ...
1
vote
1answer
71 views

Bar Chart - Change Face Color Separately For Every Single Bar

I am using Matlab's bar command to create a bar-chart. I am using matlab2tikz to convert it. I would like to change the face color of every single bar separately to an rgb color of my choice. In ...
0
votes
0answers
28 views

Subfigures overlapping with document margins and caption and subcaption not centered with figure and subfigures, using tikzpictures from matlab2tikz

I have a problem with the following code: I'm making a figure with two subfigures using the subcaption package. Each subfigure is a tikzpicture in a separate .tex file generated by matlab2tikz. The ...
0
votes
1answer
34 views

Scale Matlab Figure's Outer Frame Using matlab2tikz To Exactly 15.5 cm Width

I would like to scale my Matlab figure to exactly 15.5 cm in my LaTeX document. I am creating the figure like this: figure('Name','FigureName','units','centimeters','position',[0 0 15.5 7.75]) I am ...
0
votes
0answers
51 views

Matlab2tikz: Multiple Column Legend

I am creating a Matlab figure with multiple columns using the legend command: legend('DataX1','DataX1','NumColumns',2) This will give me a figure such as: Now I would like for this figure to be ...
0
votes
1answer
96 views

insert 3 Tiks as a one picture

I want to insert this 3 tikz like the picture above I use Matlab2Tikz and i have a problems with it I can change every position (at=) but this hard to do and take a long time this is the 3 tikz ...
1
vote
2answers
89 views

matlab2tikz Surface plot colors are dark and faded

I am using matlab2tikz to produce colored surface plots. When I compile the TikZ file created, the colors are dark and washed out. I have looked at the posts 'parula' colormap in pgfplots ...
0
votes
0answers
61 views

matlab2tikz width of figure incorrect

Using matlab2tikz I experience a strange behavior. My idea was, following https://tomlankhorst.nl/matlab-to-latex-with-matlab2tikz/, to create a figure in Matlab (R2019) and then use it in Latex ...
0
votes
0answers
34 views

matlab2tikz: Change font type for text plot

I use matlab2tikz in order to export a figure from Matlab R2019 to Latex. I have a sample figure figure() hold on; plot(sin(0:.01:pi)); text(100,.5,'Test','FontSize', 18, 'Color', 'red', 'FontName', '...
0
votes
0answers
121 views

matlab2tikz: Disable legend

I have a matlab code, creating a set of figures, which I want to export to Latex using matlab2tikz. Unfortunately I can't figure out how to export without a legend, using Matlab R2019b and matlab2tikz ...
0
votes
0answers
80 views

3D Polar Plot in sperical coordinate system in PGF/Tikz - Matlab2tikz fails, me too. (CST MWS Antenna FarField pattern)

I have simulated an Antenna in CST and want to plot the 3D pattern. The resolution is fairly low with a step size of 20°. Matlab2tikz won't help because it creates huge PDFs (60kB tex file to 5MB ...
0
votes
1answer
46 views

Setting axis x line* and axis y line* globally

I have encountered a "problem" to which I was not yet able to find a solution. If one exports a figure with tikzplotlib or matlab2tikz, the lines axis x line*=bottom, axis y line*=left, are ...
0
votes
1answer
50 views

Scaling a tikzpicture generated with matlab2tikz

I have a figure Plot1.tex generated with matlab2tikz (matlab2tikz by Nico Schlömer). I want to include it in my document and scale its width and height like this: \documentclass[a4paper]{report} \...
0
votes
0answers
83 views

Matlab2Tikz Runtime on LaTeX too long

I am using this thing called matlab2tikz which converts MATLAB figures into LaTeX (TikZ) figures. What I have been doing is that I have been using Simulink to do my simulations, and store the data ...
1
vote
0answers
66 views

S-grid for eigenvalues map on tikz

I'm currently working with eigenvalues analysis and to that I don't use the normal grid, but the s-grid (grid of constant damping factors and natural frequencies). I use the function matlab2tikz to ...
0
votes
0answers
44 views

matlab2tikz image not compiling

So, I've used matlab2tikz twice, and both times the image didn't compile at first. The first time, I somehow managed to get going, but it was a long time ago, and now I don't remember exactly what was ...
0
votes
0answers
88 views

Tikz: Dimension Too Large

I'm currently working on my Thesis using Overleaf and TexMaker. As I include a few high res images that i exported via matlab2tikz, they are very big and detailed. Recently I encountered an error in ...
0
votes
0answers
31 views

Highlighten specific x-axis values

I need some help to plot a small figure for my thesis. I know that the question is towards Matlab, but I export the figure as a tikzpicture and genuinely think that you guys deliver the better ...
1
vote
1answer
146 views

How to control font size with a standalone pgfplot

I want to control the font size of an embedded, standalone pgfplot. I realized it by defining a \newcommand (see the MWE). My question is, is there a better solution? Maybe I should mention that ...
0
votes
0answers
59 views

NaN values in 3D scatterplot with colormap

Edit: I added my code to the question. NaN and zero are both black. I only want zero to be marked black and NaN values have to be transparant. Is there a way I can make NaN values transparant in a ...
2
votes
0answers
87 views

Why does a nan-only plot lead to an error when requesting a legend

Let me first admit that this may be a really dumb question. I am using matlab2tikz to export some figures from matlab. As I need some legend entries to be unrelated to my actual plots, I use nan-...
0
votes
0answers
46 views

Python equivalent of matlabfrag

I have been a regular user of matlab for plotting. I use matlabfrag to save as eps for the plot along with a tex file containing labels. This can be rendered with Latex fonts after including them in ...
0
votes
0answers
93 views

Color interpolation (shader) does not work when using Matlab2tikz

I am trying to improve the quality of my plots in MATLAB and so I used Matlab2tikz to transform the MATLAB plots in pgfplots. I want to perform a color interpolation but this does not work and after ...
0
votes
0answers
113 views

Matlab2tikz // Error divsion by 0.0

I created a minimal working example in Matlab: [x,y] = meshgrid(-2:0.1:2,-2:0.1:2); fx = x.*y; fy = x.*y; figure quiver(x,y,fx,fy) matlab2tikz('plot.tex'); This works great and creates the plot....
2
votes
0answers
90 views

second half of matlab area plot is missing after converting by matlab2tikz

I did an easy phase diagram using the area function in Matlab. I converted it into tikz by using the matlab2tikz function which generates following code: \documentclass[tikz]{standalone} \usepackage[...
4
votes
1answer
332 views

Change font size in matlab2tikz

I am using matlab2tikz to export my Matlab figures in order to be able include them in my LaTeX document. I think the fonts of the tick labels, axis labels, titles and legends are too big. How can I ...
0
votes
1answer
288 views

Handling nan's with pgplots/matlab2tikz

I am currently developing some simulations using a nonlinear model w/ feedback in MATLAB where there exist some trajectories that are unstable. I want to export this using matlab2tikz so I can have ...
1
vote
0answers
75 views

Unable to display tikz plot using externalize and matlab2tikz

I have a tikz picture I have converted from Matlab using matlab2tikz. I am attempting to use the tikz externalize feature as I have many plots to compile in a larger document. When I compile the ...
1
vote
1answer
140 views

Append style only to nodes in the graphic area of an axis environment

I am currently using matlab2tikz to export graphical data to latex. Some of the plots I use contain both pgfplots objects such as \addplot and tikz objects such as \node or \draw in potentially ...
2
votes
1answer
79 views

Issue with PGFPLOTS colormap

I'm observing some odd behavior on my colormaps. Here is a minimum working code example: \documentclass[border=5pt]{standalone} \usepackage{pgfplots} \pgfplotsset{ colormap={parula}{[1pt] ...
2
votes
1answer
109 views

matlab2tikz not compiling

In the code generated by matlab2tikz, I am having a problem compiling the code. The error that I get is: ! Missing } inserted. <inserted text> } I am not seeing in the code ...
2
votes
0answers
466 views

Includegraphics error - “PDF contains invalid UTF-8 characters”? [closed]

I have a PDF figure (a PGFplot created by matlab2tikz). However, when I include it in my LaTeX document (using \includegraphics, I get loads of errors complaining String contains an invalid utf-8 ...
2
votes
1answer
477 views

matlab2tikz font size change

I am working with an elseiver article, I export a matlab graphic using matlab2tikz, my problem is that i can not change the font size in the .tex file. Actually, i have the following output I would ...
1
vote
1answer
121 views

Multi-particle rendering using Matlab2tikz

This is an extension to the question here. I tried the same logic for a multiparticle environment. I have around 100 particles in a cubic box. But I export only 10 particles for simplicity. The ...
2
votes
2answers
350 views

Draw part of a pgfplots table based on the amount of points

Here is my problem I have tabular data exported from MATLAB using matlab2tikz. My initial plot is sort of a ribbon plot. Therefore, when exporting it to tikz, the tabular data for each ribbon is of ...
1
vote
1answer
122 views

Difference in rendering from Matlab2tikz

I have a 3D object produced from Matlab which is like this: I would like use a vector graphics of the above in my document. However due to the file size, I prefer to save as tikz picture. I used ...
1
vote
2answers
221 views

Tikz error with simple Lineplot with legend

I try to plot a line from the file "aLinePlot.tex" which is automatically generated via matlab2tikz: % This file was created by matlab2tikz. % %The latest updates can be retrieved from % http://www....
2
votes
1answer
739 views

Position y and x label at the middle of 2x2 subplot

I got a figure with subplots from Matlab using matlab2tikz function but I don't like the fact that all figures have their own y and labels. I'd like to position a label at the middle of the big figure ...
2
votes
0answers
493 views

pgfplots with matlab2tikz: Change Number Format of Axis (Exponent of Scientific Notation) [duplicate]

have produced a plot in matlab converted it to tikzpicture via matlab2tex. in matlab it looks fine but in tikzpicture the x-axis looks ugly (see picture) i want 0-10x10^9 and not 0-1x10^10 how can i ...
0
votes
1answer
369 views

Different height of tikz subfigures despite same axis width/height

Why do the subfigures in this document have different heights despite having the same axis width/height? How can I fix this? \documentclass[10pt,a4paper]{article} \usepackage{float,subcaption} \...
1
vote
1answer
269 views

matlab2tikz ignoring error bars

I'm using matlab2tikz for a plot with horizontal error bars, but the pgfplots file generated doesn't include the error bars, while everything else is fine. I'm plotting my data in matlab like this: y ...
1
vote
1answer
524 views

after executing matlab2tikz legend is incomplete

Hello i'm a bit desperate. As nobody seemed to care about my last post i tried a lot on my problem but i still couldn't find the solution. I want to use matlab2tikz to include my matlab figures into ...
0
votes
1answer
1k views

How to manually specify the ticks for the colorbar with matlab2tikz

I have a matlab script, which creates some compound plot. When I export the figure using matlab2tikz, the manual ticks of the colorbar are lost. Even if I try extraAxisOptions to do it manually, ...