|
From: Harald H. <h.h...@tu...> - 2005-01-09 15:37:33
|
Today, I have had a look to the open patches at sourceforge.net. Some of them are very useful to me and I ask myself why they are not committed to cvs, yet. Am I the only person who finds them useful? I would like to start a discussion about these patches. Why are they not in cvs. Do they have to be improved before, or do you think they are useless, do they cause problems? #616199 Ignore title string after notitle This patch enables to give a string after 'notitle' in the plot command. This is useful if you have multiple curves in a plot with different titles and if you want to remove one of the titles (maybe temporarily). Example: plot \ sin(x) title 'sin({/Symbol-Oblique a})', \ cos(x) title 'cos({/Symbol-Oblique a})', \ tan(x) title 'tan({/Symbol-Oblique a})' If you want to omit only the second title, you have to change title to notitle and remove the string. If you later want to add it again, you have to have a backup copy of this string somewhere or to type it in again. With this patch, you simply can change the plot command as follows: plot \ sin(x) title 'sin({/Symbol-Oblique a})', \ cos(x) notitle 'cos({/Symbol-Oblique a})', \ tan(x) title 'tan({/Symbol-Oblique a})' #713166 margins changed from int to float By default, the steps in which you can change the margins are too big in my opinion. This patch avoids this limitation. It is a very simple patch that does not cause any compatibility problems. #835235 minitics updates This patch enables to use explicit minitics, e.g., set mxtics (1.1,1.2,1.3,1.4) and to use automatic minitics even when the major tics were explicitly defined, e.g., set xtics (1, 2, 3, 4) set mxtics Especially the explicit minitics are very useful for logarithmic plots that have data range over only few decades. I am using this patch since it was submitted without any problems. If you don't use this new function, the patch does not change anything. That's it. Harald -- Harald Harders h.h...@tu... http://www.harald-harders.de |
|
From: Daniel J S. <dan...@ie...> - 2005-01-09 18:46:32
|
Harald Harders wrote: >Today, I have had a look to the open patches at sourceforge.net. Some of >them are very useful to me and I ask myself why they are not committed to >cvs, yet. Am I the only person who finds them useful? I would like to >start a discussion about these patches. Why are they not in cvs. Do they >have to be improved before, or do you think they are useless, do they >cause problems? > > I think there are many more patches there that are ready than just the few you mentioned. :) We've probably entered a stage where we are unafraid to break things. >#616199 Ignore title string after notitle > >plot \ > sin(x) title 'sin({/Symbol-Oblique a})', \ > cos(x) notitle 'cos({/Symbol-Oblique a})', \ > tan(x) title 'tan({/Symbol-Oblique a})' > > This one I'll think over. Guess I'm fine with it because I can understand its use. However, it's a bit of a conceptual shift and people will wonder, Why can't I do the same with "nolabel 2"? Etc. Dan |
|
From: Ethan M. <merritt@u.washington.edu> - 2005-01-09 18:48:03
|
On Sunday 09 January 2005 07:38 am, Harald Harders wrote: > #616199 Ignore title string after notitle This patch no longer works since the addition of string variables. > #713166 margins changed from int to float I have no strong objection, but I have not found a case where the ability to adjust margins by fractional character widths is really needed. Can you provide a test case? > #835235 minitics updates No opinion. -- Ethan A Merritt Biomolecular Structure Center University of Washington 98195-7742 |
|
From: Harald H. <h.h...@tu...> - 2005-01-09 20:04:07
|
On Sun, 9 Jan 2005, Ethan Merritt wrote:
> On Sunday 09 January 2005 07:38 am, Harald Harders wrote:
> > #616199 Ignore title string after notitle
>
> This patch no longer works since the addition of string variables.
Shit. I have tried this patch (first, only for 2d plots):
--- orig/src/plot2d.c 2004-12-05 16:12:35.000000000 +0100
+++ notitle/src/plot2d.c 2005-01-09 20:54:40.000000000 +0100
@@ -1480,6 +1480,8 @@
if (xtitle != NULL)
xtitle[0] = '\0';
c_token++;
+ if (try_to_get_string())
+ int_warn(c_token, "title string ignored");
set_title = TRUE;
continue;
}
But this only works when a string is given that can be ignored or if
notitle is the last token:
gnuplot> plot sin(x) notitle 'sine' w l
gnuplot> plot sin(x) notitle 'sine'
gnuplot> plot sin(x) notitle
It does not work if notitle is followed by other things than a string:
gnuplot> plot sin(x) notitle w l
undefined variable: w
This error message is produced inside execute_at() by the command call
(*ft[operator].func) (&(at_ptr->actions[instruction_index].arg));
Does anybody have an idea how I can reach that the token after notitle is
evaluated if it results to a string and ignored otherwise?
> > #713166 margins changed from int to float
>
> I have no strong objection, but I have not found a case where
> the ability to adjust margins by fractional character widths
> is really needed. Can you provide a test case?
No problem. Say, you want to produce a postscript file without whitespace
around the plot (This is useful when including these in LaTeX, for
example). Have a look at the lower edge:
set terminal postscript eps 'Times-Roman' 22
set output 'margins-1.eps'
set bmargin 1
plot sin(x)
set output
set output 'margins-2.eps'
set bmargin 2
plot sin(x)
set output
You either crop the xtics or you have white space below them.
This is one of my major problems I have using Gnuplot. My current
workaround is to use multiplot:
...
set multiplot
set size ...
set origin ...
set lmargin 0
set bmargin 0
set tmargin 0
set rmargin 0
plot ...
unset multiplot
By variing the inner size and origin, I adjust the margins. But this is a
bad hack.
> > #835235 minitics updates
>
> No opinion.
Have a look at this example:
set logscale y
set ticscale 2
#
set xrange [1.1:2]
plot 2**x
print 'vertical range not optimal'
pause -1 "Press any key"
#
set yrange [2:5]
replot
print 'range good but ytics are gone'
pause -1 "Press any key"
#
set ytics (2, 3, 4, 5)
replot
print 'range good, major tics visible, but no minor tics'
pause -1 "Press any key"
#
set mytics
replot
print 'still no minor tics'
pause -1 "Press any key"
#
set mytics (2.25, 2.5, 2.75, 3.25, 3.5, 3.75, 4.25, 4.5)
print 'explicit minor tics work with patched gnuplot'
replot
pause -1 "Press any key"
Greetings
Harald
--
Harald Harders
h.h...@tu...
http://www.harald-harders.de
|
|
From: Petr M. <mi...@ph...> - 2005-01-10 14:07:27
|
> #616199 Ignore title string after notitle > #713166 margins changed from int to float > #835235 minitics updates All these patches are useful, I support commiting them. --- PM |