TikZ plot too verboseProblem drawing Kiviat diagramTikZ: Drawing the same data with scatter plots and parallel coordinatestikz parameterized circle node with t-lines inside within a tree diagramNumerical conditional within tikz keys?TikZ: Drawing an arc from an intersection to an intersectionHow to create legend lines with a marker in a figure captionCoordinate Transformation for labeling with PGF-PlotDrawing 3D lattice using TikZCan someone help me doing 2 points of intersection?Help with Mini table of contents inside TikZ node on chapter start page

Did I make a mistake by ccing email to boss to others?

Turning a hard to access nut?

Walter Rudin's mathematical analysis: theorem 2.43. Why proof can't work under the perfect set is uncountable.

What (if any) is the reason to buy in small local stores?

Do I have to take mana from my deck or hand when tapping this card?

Is this Pascal's Matrix?

What is the tangent at a sharp point on a curve?

Should a narrator ever describe things based on a character's view instead of facts?

Capacitor electron flow

I keep switching characters, how do I stop?

Pre-Employment Background Check With Consent For Future Checks

Reasons for having MCU pin-states default to pull-up/down out of reset

How to split IPA spelling into syllables

Can you take a "free object interaction" while incapacitated?

Writing in a Christian voice

Started in 1987 vs. Starting in 1987

How do I prevent inappropriate ads from appearing in my game?

Showing mass murder in a kid's book

Checking @@ROWCOUNT failing

What is the purpose of using a decision tree?

Why does the Persian emissary display a string of crowned skulls?

How can I, as DM, avoid the Conga Line of Death occurring when implementing some form of flanking rule?

Hashing password to increase entropy

How to test the sharpness of a knife?



TikZ plot too verbose


Problem drawing Kiviat diagramTikZ: Drawing the same data with scatter plots and parallel coordinatestikz parameterized circle node with t-lines inside within a tree diagramNumerical conditional within tikz keys?TikZ: Drawing an arc from an intersection to an intersectionHow to create legend lines with a marker in a figure captionCoordinate Transformation for labeling with PGF-PlotDrawing 3D lattice using TikZCan someone help me doing 2 points of intersection?Help with Mini table of contents inside TikZ node on chapter start page













3















I was wondering if there was a more succinct way to express the following plot (I'm using the plain format):



input tikz
tikzpicture
draw[help lines, ystep=.5] (-.2,-10) grid (12.5,15);
draw[->] (0, -10) to (0, 15) node[above] $y$;
draw[->] (0, 0) to (12.5, 0) node[right] $x$;
draw (1,-.5) node $1$;
draw (2,-.5) node $2$;
draw (3,-.5) node $3$;
draw (4,-.5) node $4$;
draw (5,-.5) node $5$;
draw (6,-.5) node $6$;
draw (7,-.5) node $7$;
draw (8,-.5) node $8$;
draw (9,-.5) node $9$;
draw (10,-.5) node $10$;
draw (11,-.5) node $11$;
draw (12,-.5) node $12$;

draw (-.5,-10) node $-20$;
draw (-.5,-9) node $-18$;
draw (-.5,-8) node $-16$;
draw (-.5,-7) node $-14$;
draw (-.5,-6) node $-12$;
draw (-.5,-5) node $-10$;
draw (-.5,-4) node $-8$;
draw (-.5,-3) node $-6$;
draw (-.5,-2) node $-4$;
draw (-.5,-1) node $-2$;
draw (-.5,0) node $0$;
draw (-.5,1) node $2$;
draw (-.5,2) node $4$;
draw (-.5,3) node $6$;
draw (-.5,4) node $8$;
draw (-.5,5) node $10$;

draw (0,-10) circle (2pt);
draw (1,-9) circle (2pt);
draw (2,-8) circle (2pt);
draw (3,-7) circle (2pt);
draw (4,-6) circle (2pt);
draw (5,-5) circle (2pt);
draw (6,-4) circle (2pt);
draw (7,-3) circle (2pt);
draw (8,-2) circle (2pt);
draw (9,-1) circle (2pt);
draw (10,0) circle (2pt);
draw (11,1) circle (2pt);
draw (12,2) circle (2pt);
endtikzpicture
bye


It comes out so big it doesn't fit on a page.










share|improve this question






















  • @marmot well I suppose I could try and derive a plain version from a LaTeX answer.

    – morbusg
    5 hours ago















3















I was wondering if there was a more succinct way to express the following plot (I'm using the plain format):



input tikz
tikzpicture
draw[help lines, ystep=.5] (-.2,-10) grid (12.5,15);
draw[->] (0, -10) to (0, 15) node[above] $y$;
draw[->] (0, 0) to (12.5, 0) node[right] $x$;
draw (1,-.5) node $1$;
draw (2,-.5) node $2$;
draw (3,-.5) node $3$;
draw (4,-.5) node $4$;
draw (5,-.5) node $5$;
draw (6,-.5) node $6$;
draw (7,-.5) node $7$;
draw (8,-.5) node $8$;
draw (9,-.5) node $9$;
draw (10,-.5) node $10$;
draw (11,-.5) node $11$;
draw (12,-.5) node $12$;

draw (-.5,-10) node $-20$;
draw (-.5,-9) node $-18$;
draw (-.5,-8) node $-16$;
draw (-.5,-7) node $-14$;
draw (-.5,-6) node $-12$;
draw (-.5,-5) node $-10$;
draw (-.5,-4) node $-8$;
draw (-.5,-3) node $-6$;
draw (-.5,-2) node $-4$;
draw (-.5,-1) node $-2$;
draw (-.5,0) node $0$;
draw (-.5,1) node $2$;
draw (-.5,2) node $4$;
draw (-.5,3) node $6$;
draw (-.5,4) node $8$;
draw (-.5,5) node $10$;

draw (0,-10) circle (2pt);
draw (1,-9) circle (2pt);
draw (2,-8) circle (2pt);
draw (3,-7) circle (2pt);
draw (4,-6) circle (2pt);
draw (5,-5) circle (2pt);
draw (6,-4) circle (2pt);
draw (7,-3) circle (2pt);
draw (8,-2) circle (2pt);
draw (9,-1) circle (2pt);
draw (10,0) circle (2pt);
draw (11,1) circle (2pt);
draw (12,2) circle (2pt);
endtikzpicture
bye


It comes out so big it doesn't fit on a page.










share|improve this question






















  • @marmot well I suppose I could try and derive a plain version from a LaTeX answer.

    – morbusg
    5 hours ago













3












3








3








I was wondering if there was a more succinct way to express the following plot (I'm using the plain format):



input tikz
tikzpicture
draw[help lines, ystep=.5] (-.2,-10) grid (12.5,15);
draw[->] (0, -10) to (0, 15) node[above] $y$;
draw[->] (0, 0) to (12.5, 0) node[right] $x$;
draw (1,-.5) node $1$;
draw (2,-.5) node $2$;
draw (3,-.5) node $3$;
draw (4,-.5) node $4$;
draw (5,-.5) node $5$;
draw (6,-.5) node $6$;
draw (7,-.5) node $7$;
draw (8,-.5) node $8$;
draw (9,-.5) node $9$;
draw (10,-.5) node $10$;
draw (11,-.5) node $11$;
draw (12,-.5) node $12$;

draw (-.5,-10) node $-20$;
draw (-.5,-9) node $-18$;
draw (-.5,-8) node $-16$;
draw (-.5,-7) node $-14$;
draw (-.5,-6) node $-12$;
draw (-.5,-5) node $-10$;
draw (-.5,-4) node $-8$;
draw (-.5,-3) node $-6$;
draw (-.5,-2) node $-4$;
draw (-.5,-1) node $-2$;
draw (-.5,0) node $0$;
draw (-.5,1) node $2$;
draw (-.5,2) node $4$;
draw (-.5,3) node $6$;
draw (-.5,4) node $8$;
draw (-.5,5) node $10$;

draw (0,-10) circle (2pt);
draw (1,-9) circle (2pt);
draw (2,-8) circle (2pt);
draw (3,-7) circle (2pt);
draw (4,-6) circle (2pt);
draw (5,-5) circle (2pt);
draw (6,-4) circle (2pt);
draw (7,-3) circle (2pt);
draw (8,-2) circle (2pt);
draw (9,-1) circle (2pt);
draw (10,0) circle (2pt);
draw (11,1) circle (2pt);
draw (12,2) circle (2pt);
endtikzpicture
bye


It comes out so big it doesn't fit on a page.










share|improve this question














I was wondering if there was a more succinct way to express the following plot (I'm using the plain format):



input tikz
tikzpicture
draw[help lines, ystep=.5] (-.2,-10) grid (12.5,15);
draw[->] (0, -10) to (0, 15) node[above] $y$;
draw[->] (0, 0) to (12.5, 0) node[right] $x$;
draw (1,-.5) node $1$;
draw (2,-.5) node $2$;
draw (3,-.5) node $3$;
draw (4,-.5) node $4$;
draw (5,-.5) node $5$;
draw (6,-.5) node $6$;
draw (7,-.5) node $7$;
draw (8,-.5) node $8$;
draw (9,-.5) node $9$;
draw (10,-.5) node $10$;
draw (11,-.5) node $11$;
draw (12,-.5) node $12$;

draw (-.5,-10) node $-20$;
draw (-.5,-9) node $-18$;
draw (-.5,-8) node $-16$;
draw (-.5,-7) node $-14$;
draw (-.5,-6) node $-12$;
draw (-.5,-5) node $-10$;
draw (-.5,-4) node $-8$;
draw (-.5,-3) node $-6$;
draw (-.5,-2) node $-4$;
draw (-.5,-1) node $-2$;
draw (-.5,0) node $0$;
draw (-.5,1) node $2$;
draw (-.5,2) node $4$;
draw (-.5,3) node $6$;
draw (-.5,4) node $8$;
draw (-.5,5) node $10$;

draw (0,-10) circle (2pt);
draw (1,-9) circle (2pt);
draw (2,-8) circle (2pt);
draw (3,-7) circle (2pt);
draw (4,-6) circle (2pt);
draw (5,-5) circle (2pt);
draw (6,-4) circle (2pt);
draw (7,-3) circle (2pt);
draw (8,-2) circle (2pt);
draw (9,-1) circle (2pt);
draw (10,0) circle (2pt);
draw (11,1) circle (2pt);
draw (12,2) circle (2pt);
endtikzpicture
bye


It comes out so big it doesn't fit on a page.







tikz-pgf plot plain-tex






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked 5 hours ago









morbusgmorbusg

20.3k362138




20.3k362138












  • @marmot well I suppose I could try and derive a plain version from a LaTeX answer.

    – morbusg
    5 hours ago

















  • @marmot well I suppose I could try and derive a plain version from a LaTeX answer.

    – morbusg
    5 hours ago
















@marmot well I suppose I could try and derive a plain version from a LaTeX answer.

– morbusg
5 hours ago





@marmot well I suppose I could try and derive a plain version from a LaTeX answer.

– morbusg
5 hours ago










2 Answers
2






active

oldest

votes


















3














Here's a LaTeX version.



documentclass[tikz,border=3.14mm]standalone
usepackagetikz
begindocument
begintikzpicture
draw[help lines, ystep=.5] (-.2,-10) grid (12.5,15);
draw[->] (0, -10) to (0, 15) node[above] $y$;
draw[->] (0, 0) to (12.5, 0) node[right] $x$;
foreach X in 0,...,12
ifnumX>0
node at (X,-0.5) $X$;
fi
draw (X,-10+X) circle (2pt);
foreach Y in -20,-18,...,10
node at (-0.5,Y/2) $Y$;
endtikzpicture
enddocument


Amazingly the following does run through with pdftex



input tikz
tikzpicture
draw[help lines, ystep=.5] (-.2,-10) grid (12.5,15);
draw[->] (0, -10) to (0, 15) node[above] $y$;
draw[->] (0, 0) to (12.5, 0) node[right] $x$;
foreach X in 0,...,12
ifnumX>0
node at (X,-0.5) $X$;
fi
draw (X,-10+X) circle (2pt);
foreach Y in -20,-18,...,10
node at (-0.5,Y/2) $Y$;
endtikzpicture
bye





share|improve this answer























  • Thanks! I don't know why, but for some reason the foreach wasn't working for me earlier – that shortens the code nicely. I wonder if the new datavisualization command could somehow be used here.

    – morbusg
    5 hours ago











  • @morbusg Yes, it could. The question is what you want to achieve. If you only want some axis, grid, and plot of that sort you may be better off with pgfplots. However, I have no experience with plain TeX.

    – marmot
    5 hours ago











  • Well the part inside begintikzpicture … endtikzpicture in your first code block uses only TikZ commands so it's not so surprising that it works with plain TeX too (because TikZ has been designed that way), though I guess it's amazing that TikZ has been implemented that way in the first place. :-) I expect most “LaTeX” answers using only TikZ commands can be quite easily converted to run with pdftex.

    – ShreevatsaR
    4 hours ago











  • @ShreevatsaR Yes, that's all true, but the above is the second plain TeX document I ever compiled so for me it was a miracle that it immediately worked.

    – marmot
    4 hours ago











  • @marmot Ah I know the feeling :) You're right

    – ShreevatsaR
    3 hours ago


















1














So after spending a night reading the manual while in a trial-error-loop, after many solemn utterances to invoke supernatural power to inflict harm or punishment on something, all of which now regretted, I finally – victoriously – formed the following:



documentclassarticle
usepackagetikz
usetikzlibrarydatavisualization, datavisualization.formats.functions
begindocument
begintikzpicture
datavisualization[
school book axes
, x axis=unit length=5mm
, y axis=
unit length=5mm
, ticks=step=2
, grid
, scaling = min at 0cm and max at 5cm

, visualize as line
]
data[format=function]
var x : interval [0:12];
func y = (value x - 10) * 2;
;
endtikzpicture
enddocument


Boom! Pow! Shazam! Holy function data format, Batman! This is pretty darn nice, it has to be said.



Only trouble I found, is that it does not work with the plain format, forcing the user to descend to a lower plane of enlightenment.






share|improve this answer






















    Your Answer








    StackExchange.ready(function()
    var channelOptions =
    tags: "".split(" "),
    id: "85"
    ;
    initTagRenderer("".split(" "), "".split(" "), channelOptions);

    StackExchange.using("externalEditor", function()
    // Have to fire editor after snippets, if snippets enabled
    if (StackExchange.settings.snippets.snippetsEnabled)
    StackExchange.using("snippets", function()
    createEditor();
    );

    else
    createEditor();

    );

    function createEditor()
    StackExchange.prepareEditor(
    heartbeatType: 'answer',
    autoActivateHeartbeat: false,
    convertImagesToLinks: false,
    noModals: true,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: null,
    bindNavPrevention: true,
    postfix: "",
    imageUploader:
    brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
    contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
    allowUrls: true
    ,
    onDemand: true,
    discardSelector: ".discard-answer"
    ,immediatelyShowMarkdownHelp:true
    );



    );













    draft saved

    draft discarded


















    StackExchange.ready(
    function ()
    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f480384%2ftikz-plot-too-verbose%23new-answer', 'question_page');

    );

    Post as a guest















    Required, but never shown

























    2 Answers
    2






    active

    oldest

    votes








    2 Answers
    2






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes









    3














    Here's a LaTeX version.



    documentclass[tikz,border=3.14mm]standalone
    usepackagetikz
    begindocument
    begintikzpicture
    draw[help lines, ystep=.5] (-.2,-10) grid (12.5,15);
    draw[->] (0, -10) to (0, 15) node[above] $y$;
    draw[->] (0, 0) to (12.5, 0) node[right] $x$;
    foreach X in 0,...,12
    ifnumX>0
    node at (X,-0.5) $X$;
    fi
    draw (X,-10+X) circle (2pt);
    foreach Y in -20,-18,...,10
    node at (-0.5,Y/2) $Y$;
    endtikzpicture
    enddocument


    Amazingly the following does run through with pdftex



    input tikz
    tikzpicture
    draw[help lines, ystep=.5] (-.2,-10) grid (12.5,15);
    draw[->] (0, -10) to (0, 15) node[above] $y$;
    draw[->] (0, 0) to (12.5, 0) node[right] $x$;
    foreach X in 0,...,12
    ifnumX>0
    node at (X,-0.5) $X$;
    fi
    draw (X,-10+X) circle (2pt);
    foreach Y in -20,-18,...,10
    node at (-0.5,Y/2) $Y$;
    endtikzpicture
    bye





    share|improve this answer























    • Thanks! I don't know why, but for some reason the foreach wasn't working for me earlier – that shortens the code nicely. I wonder if the new datavisualization command could somehow be used here.

      – morbusg
      5 hours ago











    • @morbusg Yes, it could. The question is what you want to achieve. If you only want some axis, grid, and plot of that sort you may be better off with pgfplots. However, I have no experience with plain TeX.

      – marmot
      5 hours ago











    • Well the part inside begintikzpicture … endtikzpicture in your first code block uses only TikZ commands so it's not so surprising that it works with plain TeX too (because TikZ has been designed that way), though I guess it's amazing that TikZ has been implemented that way in the first place. :-) I expect most “LaTeX” answers using only TikZ commands can be quite easily converted to run with pdftex.

      – ShreevatsaR
      4 hours ago











    • @ShreevatsaR Yes, that's all true, but the above is the second plain TeX document I ever compiled so for me it was a miracle that it immediately worked.

      – marmot
      4 hours ago











    • @marmot Ah I know the feeling :) You're right

      – ShreevatsaR
      3 hours ago















    3














    Here's a LaTeX version.



    documentclass[tikz,border=3.14mm]standalone
    usepackagetikz
    begindocument
    begintikzpicture
    draw[help lines, ystep=.5] (-.2,-10) grid (12.5,15);
    draw[->] (0, -10) to (0, 15) node[above] $y$;
    draw[->] (0, 0) to (12.5, 0) node[right] $x$;
    foreach X in 0,...,12
    ifnumX>0
    node at (X,-0.5) $X$;
    fi
    draw (X,-10+X) circle (2pt);
    foreach Y in -20,-18,...,10
    node at (-0.5,Y/2) $Y$;
    endtikzpicture
    enddocument


    Amazingly the following does run through with pdftex



    input tikz
    tikzpicture
    draw[help lines, ystep=.5] (-.2,-10) grid (12.5,15);
    draw[->] (0, -10) to (0, 15) node[above] $y$;
    draw[->] (0, 0) to (12.5, 0) node[right] $x$;
    foreach X in 0,...,12
    ifnumX>0
    node at (X,-0.5) $X$;
    fi
    draw (X,-10+X) circle (2pt);
    foreach Y in -20,-18,...,10
    node at (-0.5,Y/2) $Y$;
    endtikzpicture
    bye





    share|improve this answer























    • Thanks! I don't know why, but for some reason the foreach wasn't working for me earlier – that shortens the code nicely. I wonder if the new datavisualization command could somehow be used here.

      – morbusg
      5 hours ago











    • @morbusg Yes, it could. The question is what you want to achieve. If you only want some axis, grid, and plot of that sort you may be better off with pgfplots. However, I have no experience with plain TeX.

      – marmot
      5 hours ago











    • Well the part inside begintikzpicture … endtikzpicture in your first code block uses only TikZ commands so it's not so surprising that it works with plain TeX too (because TikZ has been designed that way), though I guess it's amazing that TikZ has been implemented that way in the first place. :-) I expect most “LaTeX” answers using only TikZ commands can be quite easily converted to run with pdftex.

      – ShreevatsaR
      4 hours ago











    • @ShreevatsaR Yes, that's all true, but the above is the second plain TeX document I ever compiled so for me it was a miracle that it immediately worked.

      – marmot
      4 hours ago











    • @marmot Ah I know the feeling :) You're right

      – ShreevatsaR
      3 hours ago













    3












    3








    3







    Here's a LaTeX version.



    documentclass[tikz,border=3.14mm]standalone
    usepackagetikz
    begindocument
    begintikzpicture
    draw[help lines, ystep=.5] (-.2,-10) grid (12.5,15);
    draw[->] (0, -10) to (0, 15) node[above] $y$;
    draw[->] (0, 0) to (12.5, 0) node[right] $x$;
    foreach X in 0,...,12
    ifnumX>0
    node at (X,-0.5) $X$;
    fi
    draw (X,-10+X) circle (2pt);
    foreach Y in -20,-18,...,10
    node at (-0.5,Y/2) $Y$;
    endtikzpicture
    enddocument


    Amazingly the following does run through with pdftex



    input tikz
    tikzpicture
    draw[help lines, ystep=.5] (-.2,-10) grid (12.5,15);
    draw[->] (0, -10) to (0, 15) node[above] $y$;
    draw[->] (0, 0) to (12.5, 0) node[right] $x$;
    foreach X in 0,...,12
    ifnumX>0
    node at (X,-0.5) $X$;
    fi
    draw (X,-10+X) circle (2pt);
    foreach Y in -20,-18,...,10
    node at (-0.5,Y/2) $Y$;
    endtikzpicture
    bye





    share|improve this answer













    Here's a LaTeX version.



    documentclass[tikz,border=3.14mm]standalone
    usepackagetikz
    begindocument
    begintikzpicture
    draw[help lines, ystep=.5] (-.2,-10) grid (12.5,15);
    draw[->] (0, -10) to (0, 15) node[above] $y$;
    draw[->] (0, 0) to (12.5, 0) node[right] $x$;
    foreach X in 0,...,12
    ifnumX>0
    node at (X,-0.5) $X$;
    fi
    draw (X,-10+X) circle (2pt);
    foreach Y in -20,-18,...,10
    node at (-0.5,Y/2) $Y$;
    endtikzpicture
    enddocument


    Amazingly the following does run through with pdftex



    input tikz
    tikzpicture
    draw[help lines, ystep=.5] (-.2,-10) grid (12.5,15);
    draw[->] (0, -10) to (0, 15) node[above] $y$;
    draw[->] (0, 0) to (12.5, 0) node[right] $x$;
    foreach X in 0,...,12
    ifnumX>0
    node at (X,-0.5) $X$;
    fi
    draw (X,-10+X) circle (2pt);
    foreach Y in -20,-18,...,10
    node at (-0.5,Y/2) $Y$;
    endtikzpicture
    bye






    share|improve this answer












    share|improve this answer



    share|improve this answer










    answered 5 hours ago









    marmotmarmot

    110k5136255




    110k5136255












    • Thanks! I don't know why, but for some reason the foreach wasn't working for me earlier – that shortens the code nicely. I wonder if the new datavisualization command could somehow be used here.

      – morbusg
      5 hours ago











    • @morbusg Yes, it could. The question is what you want to achieve. If you only want some axis, grid, and plot of that sort you may be better off with pgfplots. However, I have no experience with plain TeX.

      – marmot
      5 hours ago











    • Well the part inside begintikzpicture … endtikzpicture in your first code block uses only TikZ commands so it's not so surprising that it works with plain TeX too (because TikZ has been designed that way), though I guess it's amazing that TikZ has been implemented that way in the first place. :-) I expect most “LaTeX” answers using only TikZ commands can be quite easily converted to run with pdftex.

      – ShreevatsaR
      4 hours ago











    • @ShreevatsaR Yes, that's all true, but the above is the second plain TeX document I ever compiled so for me it was a miracle that it immediately worked.

      – marmot
      4 hours ago











    • @marmot Ah I know the feeling :) You're right

      – ShreevatsaR
      3 hours ago

















    • Thanks! I don't know why, but for some reason the foreach wasn't working for me earlier – that shortens the code nicely. I wonder if the new datavisualization command could somehow be used here.

      – morbusg
      5 hours ago











    • @morbusg Yes, it could. The question is what you want to achieve. If you only want some axis, grid, and plot of that sort you may be better off with pgfplots. However, I have no experience with plain TeX.

      – marmot
      5 hours ago











    • Well the part inside begintikzpicture … endtikzpicture in your first code block uses only TikZ commands so it's not so surprising that it works with plain TeX too (because TikZ has been designed that way), though I guess it's amazing that TikZ has been implemented that way in the first place. :-) I expect most “LaTeX” answers using only TikZ commands can be quite easily converted to run with pdftex.

      – ShreevatsaR
      4 hours ago











    • @ShreevatsaR Yes, that's all true, but the above is the second plain TeX document I ever compiled so for me it was a miracle that it immediately worked.

      – marmot
      4 hours ago











    • @marmot Ah I know the feeling :) You're right

      – ShreevatsaR
      3 hours ago
















    Thanks! I don't know why, but for some reason the foreach wasn't working for me earlier – that shortens the code nicely. I wonder if the new datavisualization command could somehow be used here.

    – morbusg
    5 hours ago





    Thanks! I don't know why, but for some reason the foreach wasn't working for me earlier – that shortens the code nicely. I wonder if the new datavisualization command could somehow be used here.

    – morbusg
    5 hours ago













    @morbusg Yes, it could. The question is what you want to achieve. If you only want some axis, grid, and plot of that sort you may be better off with pgfplots. However, I have no experience with plain TeX.

    – marmot
    5 hours ago





    @morbusg Yes, it could. The question is what you want to achieve. If you only want some axis, grid, and plot of that sort you may be better off with pgfplots. However, I have no experience with plain TeX.

    – marmot
    5 hours ago













    Well the part inside begintikzpicture … endtikzpicture in your first code block uses only TikZ commands so it's not so surprising that it works with plain TeX too (because TikZ has been designed that way), though I guess it's amazing that TikZ has been implemented that way in the first place. :-) I expect most “LaTeX” answers using only TikZ commands can be quite easily converted to run with pdftex.

    – ShreevatsaR
    4 hours ago





    Well the part inside begintikzpicture … endtikzpicture in your first code block uses only TikZ commands so it's not so surprising that it works with plain TeX too (because TikZ has been designed that way), though I guess it's amazing that TikZ has been implemented that way in the first place. :-) I expect most “LaTeX” answers using only TikZ commands can be quite easily converted to run with pdftex.

    – ShreevatsaR
    4 hours ago













    @ShreevatsaR Yes, that's all true, but the above is the second plain TeX document I ever compiled so for me it was a miracle that it immediately worked.

    – marmot
    4 hours ago





    @ShreevatsaR Yes, that's all true, but the above is the second plain TeX document I ever compiled so for me it was a miracle that it immediately worked.

    – marmot
    4 hours ago













    @marmot Ah I know the feeling :) You're right

    – ShreevatsaR
    3 hours ago





    @marmot Ah I know the feeling :) You're right

    – ShreevatsaR
    3 hours ago











    1














    So after spending a night reading the manual while in a trial-error-loop, after many solemn utterances to invoke supernatural power to inflict harm or punishment on something, all of which now regretted, I finally – victoriously – formed the following:



    documentclassarticle
    usepackagetikz
    usetikzlibrarydatavisualization, datavisualization.formats.functions
    begindocument
    begintikzpicture
    datavisualization[
    school book axes
    , x axis=unit length=5mm
    , y axis=
    unit length=5mm
    , ticks=step=2
    , grid
    , scaling = min at 0cm and max at 5cm

    , visualize as line
    ]
    data[format=function]
    var x : interval [0:12];
    func y = (value x - 10) * 2;
    ;
    endtikzpicture
    enddocument


    Boom! Pow! Shazam! Holy function data format, Batman! This is pretty darn nice, it has to be said.



    Only trouble I found, is that it does not work with the plain format, forcing the user to descend to a lower plane of enlightenment.






    share|improve this answer



























      1














      So after spending a night reading the manual while in a trial-error-loop, after many solemn utterances to invoke supernatural power to inflict harm or punishment on something, all of which now regretted, I finally – victoriously – formed the following:



      documentclassarticle
      usepackagetikz
      usetikzlibrarydatavisualization, datavisualization.formats.functions
      begindocument
      begintikzpicture
      datavisualization[
      school book axes
      , x axis=unit length=5mm
      , y axis=
      unit length=5mm
      , ticks=step=2
      , grid
      , scaling = min at 0cm and max at 5cm

      , visualize as line
      ]
      data[format=function]
      var x : interval [0:12];
      func y = (value x - 10) * 2;
      ;
      endtikzpicture
      enddocument


      Boom! Pow! Shazam! Holy function data format, Batman! This is pretty darn nice, it has to be said.



      Only trouble I found, is that it does not work with the plain format, forcing the user to descend to a lower plane of enlightenment.






      share|improve this answer

























        1












        1








        1







        So after spending a night reading the manual while in a trial-error-loop, after many solemn utterances to invoke supernatural power to inflict harm or punishment on something, all of which now regretted, I finally – victoriously – formed the following:



        documentclassarticle
        usepackagetikz
        usetikzlibrarydatavisualization, datavisualization.formats.functions
        begindocument
        begintikzpicture
        datavisualization[
        school book axes
        , x axis=unit length=5mm
        , y axis=
        unit length=5mm
        , ticks=step=2
        , grid
        , scaling = min at 0cm and max at 5cm

        , visualize as line
        ]
        data[format=function]
        var x : interval [0:12];
        func y = (value x - 10) * 2;
        ;
        endtikzpicture
        enddocument


        Boom! Pow! Shazam! Holy function data format, Batman! This is pretty darn nice, it has to be said.



        Only trouble I found, is that it does not work with the plain format, forcing the user to descend to a lower plane of enlightenment.






        share|improve this answer













        So after spending a night reading the manual while in a trial-error-loop, after many solemn utterances to invoke supernatural power to inflict harm or punishment on something, all of which now regretted, I finally – victoriously – formed the following:



        documentclassarticle
        usepackagetikz
        usetikzlibrarydatavisualization, datavisualization.formats.functions
        begindocument
        begintikzpicture
        datavisualization[
        school book axes
        , x axis=unit length=5mm
        , y axis=
        unit length=5mm
        , ticks=step=2
        , grid
        , scaling = min at 0cm and max at 5cm

        , visualize as line
        ]
        data[format=function]
        var x : interval [0:12];
        func y = (value x - 10) * 2;
        ;
        endtikzpicture
        enddocument


        Boom! Pow! Shazam! Holy function data format, Batman! This is pretty darn nice, it has to be said.



        Only trouble I found, is that it does not work with the plain format, forcing the user to descend to a lower plane of enlightenment.







        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered 3 hours ago









        morbusgmorbusg

        20.3k362138




        20.3k362138



























            draft saved

            draft discarded
















































            Thanks for contributing an answer to TeX - LaTeX Stack Exchange!


            • Please be sure to answer the question. Provide details and share your research!

            But avoid


            • Asking for help, clarification, or responding to other answers.

            • Making statements based on opinion; back them up with references or personal experience.

            To learn more, see our tips on writing great answers.




            draft saved


            draft discarded














            StackExchange.ready(
            function ()
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f480384%2ftikz-plot-too-verbose%23new-answer', 'question_page');

            );

            Post as a guest















            Required, but never shown





















































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown

































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown







            Popular posts from this blog

            名間水力發電廠 目录 沿革 設施 鄰近設施 註釋 外部連結 导航菜单23°50′10″N 120°42′41″E / 23.83611°N 120.71139°E / 23.83611; 120.7113923°50′10″N 120°42′41″E / 23.83611°N 120.71139°E / 23.83611; 120.71139計畫概要原始内容臺灣第一座BOT 模式開發的水力發電廠-名間水力電廠名間水力發電廠 水利署首件BOT案原始内容《小檔案》名間電廠 首座BOT水力發電廠原始内容名間電廠BOT - 經濟部水利署中區水資源局

            Prove that NP is closed under karp reduction?Space(n) not closed under Karp reductions - what about NTime(n)?Class P is closed under rotation?Prove or disprove that $NL$ is closed under polynomial many-one reductions$mathbfNC_2$ is closed under log-space reductionOn Karp reductionwhen can I know if a class (complexity) is closed under reduction (cook/karp)Check if class $PSPACE$ is closed under polyonomially space reductionIs NPSPACE also closed under polynomial-time reduction and under log-space reduction?Prove PSPACE is closed under complement?Prove PSPACE is closed under union?

            Is my guitar’s action too high? Announcing the arrival of Valued Associate #679: Cesar Manara Planned maintenance scheduled April 23, 2019 at 23:30 UTC (7:30pm US/Eastern)Strings too stiff on a recently purchased acoustic guitar | Cort AD880CEIs the action of my guitar really high?Μy little finger is too weak to play guitarWith guitar, how long should I give my fingers to strengthen / callous?When playing a fret the guitar sounds mutedPlaying (Barre) chords up the guitar neckI think my guitar strings are wound too tight and I can't play barre chordsF barre chord on an SG guitarHow to find to the right strings of a barre chord by feel?High action on higher fret on my steel acoustic guitar