Path: csiph.com!usenet.pasdenom.info!news.albasani.net!.POSTED!not-for-mail From: Fab Newsgroups: comp.graphics.apps.gnuplot Subject: Re: user defined xtics and mxtics Date: Wed, 24 Oct 2012 07:15:36 +0200 Organization: albasani.net Lines: 56 Message-ID: <87r4ooh2mf.fsf@lagrange.campus.intern> References: <87ehkpez2g.fsf@panzer.v.cablecom.net> Mime-Version: 1.0 Content-Type: text/plain X-Trace: news.albasani.net kLbZs6Ol9W7HO6G4Bp14fPLcFmU2AevVAq/QduxKXue9AdN23PrJExPLo9sfJ4Dd9yCP8id/pP2j2PDBgjt2+M7HFvqiRKPkLlGyQaKXHFCdxdWmKpIKPnIuoDlsuNAV NNTP-Posting-Date: Wed, 24 Oct 2012 05:14:59 +0000 (UTC) Injection-Info: news.albasani.net; logging-data="rjM5wpTYqaytPNjMFpWteuzKpaUYs5xS23NDaa5r/qtRLkaLIe4XtjG7s623xabKH+zVwUUChI47ZroBm0GrGySnNNugF6kdW/2Y6YYKFTaAsGA7cLjG+WkmCOYFeDv2"; mail-complaints-to="abuse@albasani.net" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.2.50 (gnu/linux) Cancel-Lock: sha1:T/oKS2ccI45cUxHH6m0aFnrIJYE= sha1:3RmgYztwlwQ2i3IoY8MVAkhNO+8= Xref: csiph.com comp.graphics.apps.gnuplot:1426 sfeam writes: > Fab wrote: > >> Dear All >> >> I read in the Gnuplot info's, that when I define my own xtics, I can not >> use mxtics, which makes sense. > > That's not quite right. You can define both tics and mtics manually. > But you cannot define tics and have the program insert mtics automatically > between them. > Indeed, I was not precise here! >> However, especially in LaTeX terminals, >> it is sometimes needed to redefine the axis label (actually only the >> label and not the tics). Is it somehow possible to define xtics and >> mxtics the usual way but then change only the axis label, leaving the >> tics as they are? > > Certainly. > set xtics ("One" 1, "Two" 2, "Three" 3) > set xlabel "My favorite label" > > But maybe you are asking something else? > For LaTeX output you often want to set a LaTeX format for the tic labels: > set xtics format "$%g$" > My problem is the following: I have a plot with log x-axis. When I use the format specifier for scientific notation, LaTeX will typeset this as such (with the e-01, etc. notation). However, I would like to have xtic labels like $10^{-1}$, hence I set them manually. But, for a log plot I would also like the minor xtics to indicate the scale between the decades. But I can not use xmtics in this case. Do I also have to create an array for the minor xtics? I would like to have the xmtics with half the ticlength of the major xtics. How would you do it? >> E.g., in Matlab you have two arrays defining the >> tics, one with the numeric data and the other with the label strings. > > That is also possible, so long as both arrays can be read from the > same file: > > plot , 'labeldata' using 1:xticlabels(2) > > where the file labeldata contains > 1 "One" > 2 "Two" > 3 "Three" > ... Thanks for this input! Regards, Fab