Questions tagged [tikz-pic]

{tikz-pic} is about questions concerning “pics” in a Ti*k*Z context. A “pic” is a “short picture” that can be inserted anywhere in TikZ picture where you could also insert a node.

Filter by
Sorted by
Tagged with
0 votes
1 answer
114 views

Extending the Features of the Glowing Star Posted by User Sandy G

This following code extends a bit, an answer posted by the user Sandy G in How to Give Stars a Glow Effect which asked for a way to produce a glowing star with LaTeX. \documentclass{book} \textheight ...
mlchristians's user avatar
  • 7,514
2 votes
1 answer
76 views

Nonlinear transformation applied on decorations along path with a custom pic

I am having a problem to apply a single nonlinear transformation to a path decorated with custom pics. A minimal example follows: \documentclass[margin=5pt]{standalone} \usepackage{tikz} \...
iago.oliveira's user avatar
0 votes
1 answer
115 views

Chemplants doc example failed

I want to use check valve pic as described on chemplants doc at page 54, but I get an error saying it's not defined. I know it could be an error of the package, but I want to be sure and see if it's ...
Eduardo Jiménez's user avatar
0 votes
1 answer
114 views

Problem raising a tikz picture in wrapfigure enviroment

I am doing this paper with the tikz picture tools to draw some diagrams and the wrapfigure enviroment to situate them in the text. The problem is that when I run the code, the picture is placed below ...
GoRza's user avatar
  • 103
1 vote
1 answer
119 views

Positioning relative to page in XeLaTeX with package background and 'nested' tikzpictures 'dimension too large'

Context For a personal project I would like to have a tikzpicture on every page that borders the text and all that is on there. I started with LuaLaTeX and wanted to add only a few Chinese characters, ...
PLY's user avatar
  • 149
2 votes
3 answers
417 views

Node positions in Tikzpicture for using tikzmark

I wish to create a diagram like this. My attempt is shown below: Output Code \documentclass{article} \usepackage{tikz-cd} \usetikzlibrary{tikzmark,shapes.geometric,shapes.symbols} \tikzset{elnode/....
concordepi's user avatar
3 votes
2 answers
134 views

Transform working tikzpicture into \newcommand with arguments

I am trying to transform the solution of THIS question \documentclass{article} \usepackage{tikz} \usetikzlibrary{tikzmark} \usepackage{leadsheets} \setchords{ major-seven = \textsuperscript{$\Delta$}...
Phys's user avatar
  • 185
0 votes
2 answers
128 views

How to Draw Inline Symbol List with Rotation using Tikz?

Let's say I have the following string list of symbol: {a,b,+,9,3}. Is there a way to print each element of this list with the possibility - EDIT 1: to control the space between each symbol and - to ...
SylvainRigal's user avatar
1 vote
2 answers
475 views

Plot polynomial function with tikz

I'm trying to plot this function : f(x)=(x^2+3x+9)/(3x). I'm having an error saying that I can't divide 9 by 0, is there any solution please? here is my code : \begin{tikzpicture} \draw[...
Houcine's user avatar
  • 136
2 votes
1 answer
61 views

Incorporating Multiple Title Color Shadings into a Document

Consider the following code: \documentclass{book} \usepackage{tikz} \usepackage{xcolor} \usepackage{pgothic} \newcommand\titleshading[3]{ \newcommand\xoffset{0.3} \newcommand\yoffset{-0.25} ...
mlchristians's user avatar
  • 7,514
2 votes
1 answer
64 views

How to Justify the Text in a Minipage Environment within a Tikzpicture

Consider the following code--- \documentclass{book} \usepackage{tikz} \usepackage{mwe} \begin{document} \thispagestyle{empty} \begin{center} \begin{tikzpicture} \node[preaction={fill=black,opacity=1....
mlchristians's user avatar
  • 7,514
1 vote
1 answer
72 views

Cartesian coordinates with rectangles on axes and lines bounded elements

I need help in the pictures below. I can not draw the rounded rectangle upon the two axes, the line like U in the pictures on the left, and the line bounded the elements in the picture on the right. ...
Minh's user avatar
  • 173
3 votes
1 answer
74 views

TikZ: tikzset to set a macro and pass forward a key-val

I've made a TikZ pic called gen(erator). I would like to establish a TikZ key that passes rotate=90 to this pic, but also sets a macro called \complabelanchor that changes the anchor, so that if I ...
likethevegetable's user avatar
4 votes
1 answer
277 views

TikZ: position a pic with its inner coordinate

In the MWE below, I made a TikZ pic called bus with one argument. The argument creates nodes within the pic that will be used as connection points to other buses. I would like to align these pics by ...
likethevegetable's user avatar
1 vote
1 answer
81 views

\vspace{0pt} \hspace{0pt} Effects a Shift; Is There a Better Way to Produce This Tikzpicture?

Consider the code \documentclass[12pt]{book} \hoffset 10pt \voffset -45pt \oddsidemargin 12pt \evensidemargin 10pt \topmargin 25pt \headheight 25pt \textheight 8.25in \textwidth 6.15in \headsep 45pt \...
mlchristians's user avatar
  • 7,514
0 votes
1 answer
82 views

How to do math with coordinate labels in tikz?

I have a set of TikZ pics defined as \documentclass{standalone} \usepackage{tikz} \usetikzlibrary{calc,positioning} \tikzset{ shape/.pic = { \node [draw] (xx) {}; ...
CLAUDE's user avatar
  • 258
1 vote
1 answer
37 views

Can't use tikz-pic together with tikzscale

I am trying to use a tikz-picture containing pic-templates together with tikzscale, but when including the image via \includegraphics[]{} I get a variety of errors. On the other hand, when including ...
arc_lupus's user avatar
  • 1,731
2 votes
1 answer
72 views

How to draw lines properly between nested nodes using tikzpicture and chessboard

I am trying to create a states tree for demonstrating the N-Queens problem. I've managed to create a tree and display the chessboards in various states however there there is no gap between the nested ...
dan-frank's user avatar
2 votes
1 answer
111 views

Making an animation of moving dots between sites

How can I make an animation from this picture with dots moving according to the arrows? In the picture, there are two lattices. The lattice on the bottom is the result of the top lattice after moving ...
user256320's user avatar
3 votes
2 answers
983 views

Reduce the size fo a tikz picture

I have a flowchart created using tikz. Example, \documentclass[tikz, margin=3mm]{standalone} \usetikzlibrary{backgrounds, fit, positioning} \begin{document} \...
Natasha's user avatar
  • 481
1 vote
1 answer
1k views

Drawing a lattice in latex

Here is the figure I wanna draw: Could anyone show me how to draw this please?
Happy's user avatar
  • 365
1 vote
1 answer
299 views

How to hatch Boxplot in TikZ

Can you please tell me how to add hatching to a Boxplot in TikZ? Thanks in advance. \documentclass{article} \usepackage{amsmath,amssymb,amsfonts} \usepackage{tikz} \usetikzlibrary{patterns} \...
Bilal's user avatar
  • 181
4 votes
2 answers
426 views

Automatically shift scope of tikz pic

I'm trying to create pics that behave like nodes. Following the instructions of shifting scopes and naming scopes for pics, I managed to manually create pics and move them to behave like nodes. The ...
adn's user avatar
  • 10.9k
2 votes
1 answer
83 views

How to Add a Baselineskip at the Beginning of a Paragraph in a Certain Tikzpicture

The question posted here is an extension of the one posed in Looking to Insert a Figure and Wrap It Within a Customized Tikzpicture Consider the following code \documentclass[border=1cm]{book} \...
mlchristians's user avatar
  • 7,514
1 vote
1 answer
59 views

Fontsize (14) Apparently Not Working in a Tikzpicture

Consider the code \documentclass{book} \usepackage{lipsum} \usepackage{tikz} \usetikzlibrary{decorations.pathmorphing} \definecolor{boysenberry}{rgb}{.529, .196, .376} \begin{document} \thispagestyle{...
mlchristians's user avatar
  • 7,514
0 votes
1 answer
69 views

Can't connect pics to a node

Unfortunately I am not able to connect node Client1 to port 13. My unsuccessful attempt is shown below. I know that unlike nodes, pics cannot be referenced later. Can someone help me convert port/.pic ...
Z.J's user avatar
  • 347
1 vote
1 answer
132 views

Looking to Insert a Figure and Wrap It Within a Customized Tikzpicture

This question inquires as to an extension of Daniel N.'s answer found in How to enhance the background of a Tikzpicture or a Tcolorbox Consider the slightly modified code: \documentclass[border=1cm]{...
mlchristians's user avatar
  • 7,514
1 vote
3 answers
272 views

tikzpictures underneath matrices

I'm trying to construct a diagram of how to calculate a 3x3 matrix determinant via the Rule of Sarrus, and I've managed to come this far after lots of research, but I still would like to make the ...
liuzp's user avatar
  • 25
0 votes
1 answer
179 views

Ticks on the y axis not working as anticipated

I am trying to have a plot where the ticks on the y axis are 1, 1.004, 1.008, 1.012, 1.016, and 1.02. However, only the ticks 1, 1, 1.01, 1.01, 1.02, 1.02 are shown in the figure (see below). I was ...
graphtheory123's user avatar
3 votes
1 answer
71 views

How to draw Y type tree with qtree or tikz-qtree

Is it possible to draw unlabelled tree of the below type with qtree or tikz-qtree? Any suggestion..
Sandip Samanta's user avatar
2 votes
2 answers
112 views

Positioning of multiple `pic` using `below=of` not properly aligned

I've created a template using pic that has 3 cells. Then used fit to created a box I named -perimeter around these 3 cells. Now I want to place and connect multiple pics of this type using a line (...
Daniel's user avatar
  • 407
1 vote
1 answer
125 views

Bin packing problem diagram // Latex

I need a diagram/graph like this on a latex document. I don't know neither the library to make this nor a source/example code. Any info will help me! Thaks.
jpnant's user avatar
  • 13
0 votes
1 answer
605 views

! LaTeX Error: \caption outside float

I am just getting started with LateX, but i got an due date tomorrow. When i compile my LateX file i get this error: ! LaTeX Error: \caption outside float. You can find my code below. \begin{...
Phil's user avatar
  • 13
0 votes
1 answer
143 views

Tikz scale text together with math text

In the below-simplified Latex code, I'm using scale to change the font size of the math mode. \documentclass[convert={density=300,size=1080x800,outext=.png},tikz]{standalone} \usepackage{xcolor} \...
kelalaka's user avatar
  • 365
1 vote
1 answer
95 views

Aligning bullet in tikz with some other issues

I want to change a few things in the following picture: (1) Aligning the bullet (d) vertically upwards from where the picture starts. (2) Changing direction of the arrow at q4 from right to left (in ...
Manjoy Das's user avatar
0 votes
2 answers
194 views

Tikz standalone the border is not working

I'm currently developing an LFSR drawing library that the latex is output from Python code. One main issue that has been left is the border. \documentclass[convert={density=300,size=1080x800,outext=....
kelalaka's user avatar
  • 365
3 votes
1 answer
770 views

Tikz standalone the background is transparent make it white

I'm using the below Latex code to draw a tikzpicture \documentclass[convert={density=300,size=1080x800,outext=.png},tikz, border=1cm]{standalone} \usepackage{{xcolor}} \usetikzlibrary{arrows.meta} \...
kelalaka's user avatar
  • 365
1 vote
1 answer
240 views

Is TikZ most appropriate for drawing cartoon for Latex documents? If not, is there any suggestion on which software might be preferable?

For example, I wish to draw simple figures such or and include them as vector graphics in Latex documents Is TikZ the most appropriate tool to use? Meaning, how difficult/time consuming would it be ...
Sin Nombre's user avatar
3 votes
1 answer
136 views

Tikz: Setting an anchor in a pic for relative positioning

I have created a pic of a simple polygon which I want to use and reuse to create tikzpictures containing copies of it positioned relative to each other. How do I do that? If I did not have the pic, I ...
PatrickT's user avatar
  • 2,798
0 votes
1 answer
153 views

graph on latex with too many data points, giving me timeout [closed]

So, I am writing a report which contains graphs, graphs are with a huge amount of data points. one graph only could contain more than 32,000 points, and I am using tikzpicture and adding coordinates ...
Peter Naguib's user avatar
2 votes
1 answer
34 views

Unexpected capacity exceeded

The following code gives me an unexpected capacity exceeded error, and I don't understand why... \[\begin{tikzpicture}[xscale=5, yscale=5.5] node (1) at (0,0){ $\begin{tikzpicture}[xscale=0.6, ...
JeCl's user avatar
  • 145
3 votes
1 answer
442 views

Enhanced animation

I started with a simple animation and tried in the second step to improve it. In the second frame I included a long horizontal rectangle, filled by white squares (foreach loop). Is there a way to save ...
Arrow's user avatar
  • 113
0 votes
0 answers
24 views

How to zooming out multiple figures in a single slide? [duplicate]

I'm preparing for a presentation. I have four figures (fig 1, fig 2, fig 3 and fig 4). I want to show the fig 1 in the whole slide and then zooming it out to the top left corner of the slide. Then to ...
Pinaki Prasad Kar's user avatar
2 votes
1 answer
86 views

Simple toggle animation won't work

I tried a simple toggleanimation. First i create a bool value If I set it to true, the if path is performed, set it to false results in the else path. So far so good. Within an animateinline i want to ...
Arrow's user avatar
  • 113
0 votes
1 answer
205 views

Text and tikz animation in one slide

I found a TikZ animation example here. In the next step I tried to put text beside the animation, doing the following: \documentclass{beamer} \usepackage{tikz} \usepackage{animate} \usepackage{ifthen} ...
Arrow's user avatar
  • 113
1 vote
1 answer
321 views

How to enhance the background of a Tikzpicture or a Tcolorbox

I would like to produce either a tcolorbox or a tikzpicture that closely resembles the following image: The following code produces as reasonable facsimile, but not great: \documentclass[12pt]{book} \...
mlchristians's user avatar
  • 7,514
0 votes
1 answer
172 views

Absolute position of a drawing on the sheet

I would like to correct a little the position of the drawing (it's a very large drawing, but it's a block in itself). The code is really simple (I'm just starting with Tikz): \documentclass{article} \...
Joncarre's user avatar
  • 173
1 vote
1 answer
86 views

assign a name for pic in tikz

I have a /.pic in tikz, but I can not assign a name for that. I want to draw some block in the right of that pic. I have attached the figure which I want. Could you help me with how to solve that? ...
Sadcow's user avatar
  • 103
2 votes
1 answer
99 views

LaTeX Produces a Tikzpicture with the Color I Want---but with Error Messages Indicating the Color is Not Defined

I have written some code to produce a tikzpicture with a lavender color that I later want to add some text to. \documentclass[12pt]{book} \usepackage{tikz} \usetikzlibrary{decorations.pathmorphing} \...
mlchristians's user avatar
  • 7,514
1 vote
1 answer
124 views

How can I draw a line segment from an anchor node inside a pic?

I'm trying to draw a line from an anchor node inside a configurable object constructed as a TikZ pic, but it doesn't work. Is there an explanation and solution for this? \documentclass[10pt]{...
Anisio Braga's user avatar