Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.graphics.apps.gnuplot > #2158
| Newsgroups | comp.graphics.apps.gnuplot |
|---|---|
| Date | 2013-10-17 19:08 -0700 |
| References | <de15f13c-e766-4199-a1d0-079e756fd954@googlegroups.com> <l3nl9k$kri$1@dont-email.me> <481d4ee0-1171-473e-80f9-f16e9e6494ad@googlegroups.com> <l3nurq$nnc$1@dont-email.me> |
| Message-ID | <43bfc082-702a-4d2b-9894-de9cf0c899bc@googlegroups.com> (permalink) |
| Subject | Re: differences from gnuplot 4.4.3 and 4.6.x |
| From | dom <domenic.forgione56@gmail.com> |
On Thursday, October 17, 2013 2:08:26 AM UTC-4, Ethan A Merritt wrote:
> domenic.forgione56@gmail.com wrote:
>
>
>
> > On Wednesday, October 16, 2013 11:25:08 PM UTC-4, Ethan A Merritt
>
> > wrote:
>
> >> Dom wrote:
>
> >>
>
> >>
>
> >>
>
> >> > Hello,
>
> >>
>
> >> >
>
> >>
>
> >> > I have recently upgraded to gnuplot 4.6.x (On SUSE 12.3) and I have
>
> >>
>
> >> > noticed that now my charts look different than they did before
>
> >> > using
>
> >>
>
> >> > 4.4.3 (UBUNTU).
>
> >>
>
> >> >
>
> >>
>
> >> > The code in question is as follows:
>
> >>
>
> >> >
>
> >>
>
> >> > # create a 3D offset on each chart
>
> >>
>
> >>
>
> >>
>
> >> I'm not following you, sorry.
>
> >>
>
> >> What's a "3D offset"?
>
> >>
>
> >> Is this a 2D plot ("plot" command) or a 3D plot ("splot" command)?
>
> >>
>
> >>
>
> >>
>
> >>
>
> >>
>
> >> > #
>
> >>
>
> >> > # object 1 set the background colour of the entire image
>
> >>
>
> >> > set object 1 rectangle from screen 0,0 to screen 1.05,1.05 behind
>
> >> > fc
>
> >>
>
> >> > rgb "#e5e5e5" fillstyle solid noborder
>
> >>
>
> >> > #
>
> >>
>
> >> > # object 2 rectangle but it does'nt show up
>
> >>
>
> >> > set object 2 rectangle from graph 0,0 to graph 1.05,1.05 behind
>
> >> > fc
>
> >>
>
> >> > rgb "#000000" fillstyle transparent border
>
> >>
>
> >> > #
>
> >>
>
> >> > # object 3 changes the color of the graph area
>
> >>
>
> >> > set object 3 rectangle from graph 0,0 to graph 1.05,1.05 behind
>
> >> > fc
>
> >>
>
> >> > rgb "#fffff0" fillstyle transparent border
>
> >>
>
> >> > # end 3D offset
>
> >>
>
> >> > #
>
> >>
>
> >>
>
> >>
>
> >> Those commands do nothing obvious other than set a backgound color
>
> >>
>
> >> when tested here using either 4.4.3, 4.6.4, or current development
>
> >> cvs.
>
> >>
>
> >> What terminal type are you using?
>
> >>
>
> >>
>
> >>
>
> >> Anyhow, taking the object commands one by one...
>
> >>
>
> >>
>
> >>
>
> >> 1) The first rectangle should fill the screen with grey, although
>
> >> some
>
> >>
>
> >> terminal types will have problems because you try to draw off the
>
> >>
>
> >> edge of the screen (screen coordinate > 1). In version 4.4 this can
>
> >>
>
> >> cause segfaults. In version 4.6 coordinates are clipped to the
>
> >> actual
>
> >>
>
> >> screen, so it should be harmless though not necessary.
>
> >>
>
> >> Most terminal types now allow a simpler way to set a background, e.g.
>
> >>
>
> >>
>
> >>
>
> >> set term wxt background rgb '#e5e5e5'
>
> >>
>
> >>
>
> >>
>
> >>
>
> >>
>
> >> 2) "fillstyle transparent border" is not valid syntax in any
>
> >>
>
> >> version of gnuplot. Do you mean "fillstyle transparent solid <frac>"
>
> >>
>
> >> for some non-zero value of <frac>?
>
> >>
>
> >>
>
> >>
>
> >> 3) same as above - not legal syntax in any version of gnuplot.
>
> >>
>
> >> Since rectangles 2 and 3 have identical coordinates and are both
>
> >> "behind",
>
> >>
>
> >> you can only ever see one rectangle. Typo in coordinates?
>
> >>
>
> >>
>
> >>
>
> >>
>
> >>
>
> >> > everything else works as expected, the lines above created a 3D
>
> >> > offset
>
> >>
>
> >> > for the chart area... now the black offset doesn't show up, even
>
> >>
>
> >> > though it's offset.
>
> >>
>
> >>
>
> >>
>
> >> what offset?
>
> >>
>
> >> Was there supposed to be a "set offset" command?
>
> >>
>
> >> Maybe you are trying for something like the 2nd example plot in
>
> >>
>
> >>
>
> >>
>
> >> http://www.phyast.pitt.edu/~zov1/gnuplot/html/gallery.html
>
> >>
>
> >>
>
> >>
>
> >> That site has example code that might help.
>
> >>
>
> >>
>
> >>
>
> >>
>
> >>
>
> >> > What am I doing wrong? Thanks for your help.
>
> >>
>
> >> >
>
> >>
>
> >> > Dom
>
> >
>
> > Ethan, thanks for the prompt reply.
>
> >
>
> > it is a 2D plot, if you look at the charts on this page you can see
>
> > what I mean by the 3D offset...
>
> > http://www.storagehealthcheck.com/uspv_array_perf_feds.html
>
> >
>
> > The code snippet that produced that chart is as follows:
>
> >
>
> >
>
> > /usr/local/bin/gnuplot << CMDS
>
> > #
>
> > reset
>
> > # create a 3D offset on each chart
>
> > set object 1 rect from screen 0,0 to screen 1.05,1.05 behind fc rgb
>
> > "#e5e5e5" fillstyle solid noborder
>
> > set object 2 rect from graph 0.01,-0.01 to graph 1.01,0.99 behind
>
> > fc rgb "#333333" fillstyle transparent noborder
>
> > set object 3 rect from graph 0,0 to graph 1,1 behind fc rgb
>
> > "#fffff0" fillstyle transparent noborder
>
>
>
> I stick by the statement that the fillstyle specifier is not valid
>
> syntax for any version of gnuplot. Here's what happens in 4.4.3:
>
>
>
> gnuplot> set object 3 rect fc rgb "#fffff0" fillstyle transparent noborder
>
> gnuplot> show object 3
>
> object 3 rect from 0, 0, 0 to 0, 0, 0
>
> object 3 back lw 1.0 fc rgb "#fffff0" fillstyle solid 1.00 noborder
>
>
>
> Notice that the keyword "transparent" has been ignored since it
>
> didn't have anything to modify, so it picks up the actual
>
> fillstyle from whatever you have set as a default.
>
>
>
>
>
> But I guess what you are noticing is that in 4.6 coordinates given
>
> in screen space are clipped to the screen, while coordinates given
>
> in graph space are clipped to the graph. In both cases it is not
>
> useful to specify a coordinate outside the range [0:1].
>
>
>
> Here's one way you could do it to avoid clipping to the graph:
>
>
>
> M = 0.1
>
> delta = 0.01
>
> set bmargin at screen M
>
> set tmargin at screen 1-M
>
> set lmargin at screen M
>
> set rmargin at screen 1-M
>
>
>
> set obj 2 rect behind from screen M,M to screen 1-M, 1-M
>
> set obj 2 fc rgb "white" fillstyle solid noborder
>
>
>
> set obj 1 rect behind from screen M+delta, M-delta to screen 1-M+delta, 1-M-delta
>
> set obj 1 fc rgb "black" fillstyle solid noborder
>
>
>
> plot ... whatever
>
>
>
>
>
>
>
>
>
> > # end 3D offset
>
> > #
>
> > #
>
> > set label 1 at 0, 95
>
> > set label 1 "$note1" font "Arial,8" tc lt 3
>
> > #
>
> > set label 2 "Source: ${BASE_FILE}" at screen 0.7,0.015 front font
>
> > "Arial,8" tc lt -1
>
> > #
>
> > set title "$MODEL (#$SERIAL) FC Microprocessor MAX Utilization (CHP)"
>
> > font "Arial,12" tc lt 1 set terminal png small size $W,$H
>
> > set output "./$SERIAL/$PNG_PATH/0014_FED_MP_MAXUtil.png"
>
> > set ylabel "%Utilization" font 'Arial,8' tc rgbcolor "red" rotate by
>
> > 90 set xlabel "CHIP" font 'Arial,8' tc rgbcolor "red" rotate by 90
>
> >
>
> > set yrange [0:100]
>
> > set key off # Unless you really want a key
>
> > set grid back
>
> > set boxwidth 0.9 absolute
>
> > set style fill solid 1.00 border 3
>
> > set style histogram clustered gap 5 title offset character 0, 0, 0
>
> > set datafile missing '-'
>
> > set style data histograms
>
> > set xtics nomirror rotate font "Arial,8" tc rgbcolor "blue"
>
> > set ytics nomirror font "Arial,8" tc rgbcolor "blue"
>
> > set timestamp
>
> > plot'./$SERIAL/temp/datautil.dat' using 2:xtic(1) with boxes lt 3 lw
>
> > 1, \
>
> > 70 lt 1
>
> > CMDS
>
> >
>
> > Thanks,
>
> > Dom
Hi Ethan,
your suggested code works great for single plots, thank you very much for that. But now I am struggling to do the same for each plot in a multiplot.I know that the code used to generate multiplots no longer take effect once you change the margins, I haven't been able to get it just right.
Any suggestions?
thanks in advance.
Dom
Back to comp.graphics.apps.gnuplot | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
differences from gnuplot 4.4.3 and 4.6.x Dom <domenic.forgione56@gmail.com> - 2013-10-16 11:24 -0700
Re: differences from gnuplot 4.4.3 and 4.6.x Ethan A Merritt <EAMerritt@gmail.com> - 2013-10-16 20:25 -0700
Re: differences from gnuplot 4.4.3 and 4.6.x domenic.forgione56@gmail.com - 2013-10-16 20:47 -0700
Re: differences from gnuplot 4.4.3 and 4.6.x Ethan A Merritt <EAMerritt@gmail.com> - 2013-10-16 23:08 -0700
Re: differences from gnuplot 4.4.3 and 4.6.x dom <domenic.forgione56@gmail.com> - 2013-10-17 19:08 -0700
Re: differences from gnuplot 4.4.3 and 4.6.x Ethan A Merritt <EAMerritt@gmail.com> - 2013-10-17 22:10 -0700
Re: differences from gnuplot 4.4.3 and 4.6.x domenic.forgione56@gmail.com - 2013-10-18 12:16 -0700
Re: differences from gnuplot 4.4.3 and 4.6.x Ethan A Merritt <merritt@u.washington.edu> - 2013-10-18 13:21 -0700
Re: differences from gnuplot 4.4.3 and 4.6.x Dom <domenic.forgione56@gmail.com> - 2013-10-18 13:56 -0700
csiph-web