Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.graphics.apps.gnuplot > #3724

Re: Few problems using GnuPlot 5.0 on Mac OS X

From Ethan A Merritt <EAMerritt@gmail.com>
Newsgroups comp.graphics.apps.gnuplot
Subject Re: Few problems using GnuPlot 5.0 on Mac OS X
Date 2017-08-22 09:27 -0700
Organization A noiseless patient Spider
Message-ID <onhlp4$m4f$1@dont-email.me> (permalink)
References <cdf9e487-7206-4ac4-a4d1-c732fd2e6c34@googlegroups.com> <ongg9l$3dv$1@dont-email.me> <c95b6052-9ca6-4a7c-b0d5-9569c0cc8cc5@googlegroups.com>

Show all headers | View raw


Kevin Buchs wrote:

> Ethan,
> 
> Thanks for the reply and setting me straight.
> 
> The example of rotation you directed me toward indeed only pulls the
> rotation angle from the data.
> 
> It sure is misleading that the manual only documents "label rotate
> xyz" and "label right" in the context of set. That really implies it
> is a global setting because so many other "set" values are global
> (through the next plot at least). I argue that rotation and
> justification should at least be sticky for the next plot command.

They are sticky, but the stickiness is more fine-grained.
Try thinking of the command not as "set label" but as "set label N".
It permanently changes the properties of an object (label N) for 
all future plots that it appears in.  So
    set label 4 "I am the fourth label" font "Times"
    set label 4 at 0, sin(pi/2)
    plot sin(x)
    # Now that I see the plot I hate that font!
    set label 4 font "Arial"
    replot
    # That's better, but let's try right justification
    set label 4 right
    replot

If you want to change some property for many labels in parallel,
one option is
   set for [N=1:100] label N rotate by -45 
Note that until you assign a text and location for a label it will
not appear in a plot.

Other set commands work the same way:
	set linetype 3 <whatever>
	set object 4 circle <circle properties>
	set arrow 2 <arrow properties>

>The use of parentheses in the context of "using" is a fairly well kept
> secret. I found it in the manual in a single phrase of a sentence.

Hmm. Good to know.  We can try to make it easier to find in the docs.

> I looked at dozens of examples and spent a lot of time with the
> manual. I suppose the major reason for posting is to identify the
> opportunity to improve.
> 
> You probably didn't understand what I meant by REPL
> (https://en.wikipedia.org/wiki/Read%E2%80%93eval%E2%80%93print_loop).
> It would be nice to see the plot interactively while in gnuplot's
> interactive interface. After being frustrated with that, I finally
> scripted my inputs and ran a compound command from a commandline to
> run gnuplot and then open the png file.

Could it be that you are looking for the "replot" command?
Coincidentally, you could type this as "repl" :-)

1) Choose an interactive terminal (x11, wxt, qt, domterm, sixel).
2) Issue your plot command 
3) tweak any of the setting for fonts, linetypes, margins, etc
4) "replot"
5) rinse and repeat
6) when you are happy with the plot, either use a menu button to
   save to file (wxt qt win) or change the terminal type and
   again "replot".  E.g.
   set term pdf
   set output 'final_version.pdf'
   replot


> Here is what I ended up with:
> 
> 
> 8><----------------------------------------------------------------------------------
> $Data <<EOD
> 1 13 "Abcd NOC Handling"
> 2 43 "Abcd T3 Team for SLI"
> 3 12 "Abcd BBNOC"
> 4 53 "Abcd Efghij Support"
> 5 21 "Efghij Response Time"
> 6 47 "Efghij replicating problem"
> 7 11 "Efghij workaround to staging"
> 8 43 "Abcd/Jari verify staging"
> 9 86 "Efghij workaround to production"
> 10 5 "Abcd confirmation/resolution"
> EOD
> 
> set terminal pngcairo transparent enhanced font "arial,10" fontscale
> 1.0 size 500, 350 set title "Time for Major Steps In P1 Resolution"
> set style fill solid 1.0
> set style textbox opaque noborder
> unset key
> set boxwidth 0.75 abs
> set bmargin at screen 0.1
> set tmargin at screen 0.9
> set angle degrees
> unset xtics
> set yrange [0:100]
> set ylabel "Seconds"
> 
> set output "p1-times.png"
> 
> plot $Data using 1:2 with boxes, '' using 1:(2):3:(-90) with labels
> rotate variable right
> 8><----------------------------------------------------------------------------------

Back to comp.graphics.apps.gnuplot | Previous | NextPrevious in thread | Find similar


Thread

Few problems using GnuPlot 5.0 on Mac OS X Kevin Buchs <kevin.buchs@gmail.com> - 2017-08-21 15:34 -0700
  Re: Few problems using GnuPlot 5.0 on Mac OS X Ethan A Merritt <EAMerritt@gmail.com> - 2017-08-21 22:47 -0700
    Re: Few problems using GnuPlot 5.0 on Mac OS X Kevin Buchs <kevin.buchs@gmail.com> - 2017-08-22 07:11 -0700
      Re: Few problems using GnuPlot 5.0 on Mac OS X Ethan A Merritt <EAMerritt@gmail.com> - 2017-08-22 09:27 -0700

csiph-web