Home > tikz pgf > Color with gnuplot generated TikZ file not working (other TikZ has color)

Color with gnuplot generated TikZ file not working (other TikZ has color)

July 21Hits:2
Advertisement

I have generated a tikz .tex file from gnuplot and I am attempting to simply \include{mytikzfile} in my main .tex file, which uses the revtex4-1 document class. Upon compiling I get a number of errors involving color including

! Package xcolor Error: Undefined color `color=gp lt color border'. ! Package xcolor Error: Undefined color `color=gp lt color 0'. 

and a few others that are all xcolor errors. The picture shows up but it is all black. I am able to have other tikz pictures with color and they are produced fine. Picture on top is what I would like to see (I generated this with gnuplot's set term epslatex standalone color option). Picture on bottom is what I'm getting by including the .tex file generated from gnuplot when I use the set term tikz option.

Color with gnuplot generated TikZ file not working (other TikZ has color)

Color with gnuplot generated TikZ file not working (other TikZ has color)

Here is a simpler .tex file generated from gnuplot which is also supposed to contain color but does not (same xcolor error).

\begin{tikzpicture}[gnuplot] %% generated with GNUPLOT 4.6p3 (Lua 5.2; terminal rev. 99, script rev. 100) %% Sat Jul 20 19:15:08 2013 \path (0.000,0.000) rectangle (12.500,8.750); \gpcolor{color=gp lt color border} \gpsetlinetype{gp lt border} \gpsetlinewidth{1.00} \draw[gp path] (1.012,0.616)--(1.192,0.616); \draw[gp path] (11.947,0.616)--(11.767,0.616); \node[gp node right] at (0.828,0.616) { 0}; \draw[gp path] (1.012,2.169)--(1.192,2.169); \draw[gp path] (11.947,2.169)--(11.767,2.169); \node[gp node right] at (0.828,2.169) { 5}; \draw[gp path] (1.012,3.722)--(1.192,3.722); \draw[gp path] (11.947,3.722)--(11.767,3.722); \node[gp node right] at (0.828,3.722) { 10}; \draw[gp path] (1.012,5.275)--(1.192,5.275); \draw[gp path] (11.947,5.275)--(11.767,5.275); \node[gp node right] at (0.828,5.275) { 15}; \draw[gp path] (1.012,6.828)--(1.192,6.828); \draw[gp path] (11.947,6.828)--(11.767,6.828); \node[gp node right] at (0.828,6.828) { 20}; \draw[gp path] (1.012,8.381)--(1.192,8.381); \draw[gp path] (11.947,8.381)--(11.767,8.381); \node[gp node right] at (0.828,8.381) { 25}; \draw[gp path] (1.012,0.616)--(1.012,0.796); \draw[gp path] (1.012,8.381)--(1.012,8.201); \node[gp node center] at (1.012,0.308) { 0}; \draw[gp path] (3.199,0.616)--(3.199,0.796); \draw[gp path] (3.199,8.381)--(3.199,8.201); \node[gp node center] at (3.199,0.308) { 1}; \draw[gp path] (5.386,0.616)--(5.386,0.796); \draw[gp path] (5.386,8.381)--(5.386,8.201); \node[gp node center] at (5.386,0.308) { 2}; \draw[gp path] (7.573,0.616)--(7.573,0.796); \draw[gp path] (7.573,8.381)--(7.573,8.201); \node[gp node center] at (7.573,0.308) { 3}; \draw[gp path] (9.760,0.616)--(9.760,0.796); \draw[gp path] (9.760,8.381)--(9.760,8.201); \node[gp node center] at (9.760,0.308) { 4}; \draw[gp path] (11.947,0.616)--(11.947,0.796); \draw[gp path] (11.947,8.381)--(11.947,8.201); \node[gp node center] at (11.947,0.308) { 5}; \draw[gp path] (1.012,8.381)--(1.012,0.616)--(11.947,0.616)--(11.947,8.381)--cycle; \node[gp node right] at (2.300,8.047) {Points}; \gpcolor{color=gp lt color 0} \gpsetpointsize{4.00} \gppoint{gp mark 1}{(1.012,0.616)} \gppoint{gp mark 1}{(3.199,0.927)} \gppoint{gp mark 1}{(5.386,1.858)} \gppoint{gp mark 1}{(7.573,3.411)} \gppoint{gp mark 1}{(9.760,5.586)} \gppoint{gp mark 1}{(11.947,8.381)} \gppoint{gp mark 1}{(2.942,8.047)} \gpcolor{color=gp lt color border} \draw[gp path] (1.012,8.381)--(1.012,0.616)--(11.947,0.616)--(11.947,8.381)--cycle; %% coordinates of the plot area \gpdefrectangularnode{gp plot 1}{\pgfpoint{1.012cm}{0.616cm}}{\pgfpoint{11.947cm}{8.381cm}} \end{tikzpicture} %% gnuplot variables 

And what it produces (points should be red): Color with gnuplot generated TikZ file not working (other TikZ has color)

Answers

I know this question has already been answered. Although I disagree since I think a answer should be generic and not make it necessary to copy a file from some other operation system a user has most likely no direct access to.

If gnuplot with lua i.e. tikz terminal is installed on a machine:

To generate the style files and wrapper for the various TeX flavors enter

 lua gnuplot-tikz.lua style

on the command line. The files generated should be

  t-gnuplot-lua-tikz.tex        (Context wrapper)
  gnuplot-lua-tikz.tex          (plain TeX wrapper)
  gnuplot-lua-tikz.sty          (LaTeX wrapper)
  gnuplot-lua-tikz-common.tex   (common definitions)

and can be copied to the appropriate places.

Linux solution (with texlive-full installed via Synaptic package manager):

Error comes from the use of an outdated style file: gnuplot-lua-tikz.sty The default one which comes with TeXlive is fine, use of one found online broke the compilation

Mac solution (with MacTeX 2013 installed):

MacTeX appears to not be installed with any form of gnuplot-lua-tikz.sty I copied the files from /usr/share/texlive/.../gnuplot on a Linux machine with texlive installed as stated above, and placed those files in the directory with my main .tex file. This solved the problem on a Mac.

Related Articles

  • Color with gnuplot generated TikZ file not working (other TikZ has color)

    Color with gnuplot generated TikZ file not working (other TikZ has color)July 21

    I have generated a tikz .tex file from gnuplot and I am attempting to simply \include{mytikzfile} in my main .tex file, which uses the revtex4-1 document class. Upon compiling I get a number of errors involving color including ! Package xcolor Error:

  • How to include arrows in a .tikz file, which is generated with matlab2tikz?

    How to include arrows in a .tikz file, which is generated with matlab2tikz?August 29

    I made a plot with matlab. Then I generated a .tikz file with matlab2tikz. Now i want to insert arrows in the .tikz file and also write something left of the arrow. I can make arrows and text in the plot, but matlab2tikz don't know the textbox. So th

  • Modify tikzpicture plot outside .tikz file

    Modify tikzpicture plot outside .tikz fileMarch 9

    I am not sure if my title gets through what I'm after, but basically I am using matlab2tikz to generate some plots for me and am wondering how you can do some modifications from outside the .tikz file. e.g a .tikz from matlab2tikz will be like: \begi

  • Overlay two .tikz files from input

    Overlay two .tikz files from inputMarch 11

    I have some plots generated from matlab2tikz which I would like to overlay. Each plot is a seperate .tikz file which I input using \input. My code currently is: \pgfplotsset{ every axis/.append style={ scale only axis, }, /tikz/every picture/.append

  • Specific .tikz file cannot be input in LaTeX

    Specific .tikz file cannot be input in LaTeXOctober 10

    I have created this surface plot in Matlab and use the wonderful program Matlab2tikz to export it to LaTeX. It generates me a .tikz file and when I try to use it I get an error. I have found out! that there are some lines in the code: title={$\text{v

  • Missing characters in gnuplot generated eps while compiling pdf February 20

    tTis has bug me for a few days: when I import a gnuplot generated eps into my LaTeX file, the characters are always missing. The number and text with in the figure is not complete, for example, it should show "sin(x)" but shows "s_", s

  • Scale markers in external Tikz fileApril 2

    I use external .tikz files to include graphics in my LaTeX document. These .tikz files are generated by matlab2tikz. The scatter plots that come out though have very small markers. I want to scale these markers. Right now I include the .tikz file as

  • Change color of shape in Layer FileFebruary 15

    I currently have a layer file - in this case one of the United States. This layer contains a shape for each state so if I were to open the TOC Control and expand the "United States" I would see Alabama, Alaska, etc etc. Currently, if I wanted to

  • How to configure GeoWebCache that it can generate tile files conform Slippy Map formatApril 5

    The tile files generated by GeoWebCache using gridset 900913 are like: \EPSG_90013_6\02_02\0032_42.png, etc. How can I configure GeoWebCache that it is generating the files conform slippy map format? That is \6\32\21.png, etc. --------------Solutions

  • Stunnel - how to generate pem file simply on Windows April 19

    Somebody suggest me stunnel. We want to use for encrypt requests. This is seems to be easier than OpenVPN. The problem that I don't have SSH or other tool in the Windows server, and I don't have any chance to generate pem files for server. The bigges

  • How do I generate a file with suitable permissions using sprintf() & write()?

    How do I generate a file with suitable permissions using sprintf() & write()?April 26

    #include <stdio.h> #include <stdlib.h> #include <fcntl.h> #include <sys/stat.h> void main(){ char tmp[12]={0x0}; int i=13; sprintf(tmp,"%11d", i); int fd = open("transaction.txt", O_CREAT | O_RDWR); write(fd, tm

  • Drupal 7 js compression generating 6 filesAugust 24

    I'm using drupal_add_js and drupal_add_library to add some js to my site. But when I turn on the drupal js compression, drupal is aggregating the files but it's generating 6 files and Yslow is saying that it's too much files. Is there any way to forc

  • Generate html files on remote server, quickly see changesOctober 17

    I'm compiling some rst files on a remote machine to generate html files. I want to view the generated html in my browser to see if it's right, make some changes to the rst, then view them again, etc. I'd like this feedback loop to be as tight as poss

  • latexmk: generated tex file (via custom add_cus_dep) not found in first pass January 12

    Referring to this question, I found that having multiple custom-generated files in a document generated by latexmk doesn't really work for me. The modus operandi is that latexmk runs pdflatex, checking that noteable's output for missing file errors,

  • How to generate shape file from Excel or CSV files? January 16

    Possible Duplicate: How can I convert an excel file with x, y columns to a shapefile? Probably this could be an easy question for most of the people. But I would like to know the way to generate shape file, if I have an input as Excel or csv file for

  • How to generate XML files of various list present in sharepoint?January 27

    I want to generate XML files of the lists present inside a sharepoint site. The XML file will contain all the data and folders in a structured way. Is there any tool available to do this? Has anybody worked on this. Thanks in advance. --------------S

  • How would the GPL apply to these generated source files? January 28

    I am currently using Love2D as my game engine of choice and have come across the situation where I have had to retype out similar code over and over. In particular, if I want to add a new color to a project, I copy my old colors.lua file over, and ad

  • fastcgi_split_path_info not included in generated vhost filesMay 24

    Hi, When looking into my vhost files I noticed the fastcgi_split_path_info directive is not included in my php location blocks. ie: Code: location ~ \.php$ { try_files /2684c31a9ddedd6833f0ac523fee9f1f.htm @php; } location @php { try_files $uri =404;

  • Automatically set file name of externalized graphics equal to the file name of the tikz/PGF fileMay 29

    As the title says, is it possible to set some options for the externalize library in order to for the filename of the externalized graphics to be equal to the filename of the TikZ-file without using \tikzsetnextfilename{} for each and every figure th

  • can QGIS for Mac OSX 10.6 handle (both read and generate) GeoPDF files?

    can QGIS for Mac OSX 10.6 handle (both read and generate) GeoPDF files?July 13

    I would like to know if QGIS for Mac OSX 10.6 can handle (both read and generate) GeoPDF files. Can anybody help ? --------------Solutions------------- Since QGIS uses GDAL to read raster files, it depends on your GDAL installation. Default installat

Copyright (C) 2017 ceus-now.com, All Rights Reserved. webmaster#ceus-now.com 14 q. 0.572 s.