octave-maintainers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Minor plotting problem


From: John W. Eaton
Subject: Minor plotting problem
Date: Mon, 5 Feb 2007 16:25:33 -0500

On  4-Feb-2007, Søren Hauberg wrote:

| Hi,
|    Running on a recent checkout after the big graphics merge I have a 
| minor problem. If I run
|    octave:1> plot (rand(10,1), "g;green;");
|    octave:2> obj = line (1:10, rand(10,1));
| I get a plot with two legend-entries, "green" (which I asked for) and 
| "'-' ($1):($2)" (which I didn't ask for).

I checked in the following change to fix this problem.

|    Also, if I print the plot using
|    octave:3> print -deps delme.eps
| the second curve (the one drawn by "line") will be dotted instead of 
| fully drawn, but I guess that's a gnuplot issue?

If you always want soild lines, you can add "-solid" to the options
for the print command.

I don't see how to control dashed/solid properties for individual
lines with gnuplot.

jwe

scripts/ChangeLog:

2007-02-05  John W. Eaton  <address@hidden>

        * plot/__uiobject_draw_axes__.m: Use title "" if no explicit title.
        When setting {x,y,z}lim, also set {x,y,z}limmode to "auto.


Index: scripts/plot/__uiobject_draw_axes__.m
===================================================================
RCS file: /cvs/octave/scripts/plot/__uiobject_draw_axes__.m,v
retrieving revision 1.6
diff -u -u -r1.6 __uiobject_draw_axes__.m
--- scripts/plot/__uiobject_draw_axes__.m       1 Feb 2007 10:25:37 -0000       
1.6
+++ scripts/plot/__uiobject_draw_axes__.m       5 Feb 2007 21:21:56 -0000
@@ -244,7 +244,7 @@
        case "line"
          data_idx++;
          if (isempty (obj.keylabel))
-           titlespec{data_idx} = "";
+           titlespec{data_idx} = "title \"\"";
          else
            titlespec{data_idx} = strcat ("title \"", obj.keylabel, "\"");
          endif
@@ -374,7 +374,7 @@
          data_idx++;
          style = do_linestyle_command (obj, data_idx, plot_stream);
          if (isempty (obj.keylabel))
-           titlespec{data_idx} = "";
+           titlespec{data_idx} = "title \"\"";
          else
            titlespec{data_idx} = strcat ("title \"", obj.keylabel, "\"");
          endif
@@ -472,7 +472,7 @@
 
     if (xautoscale && have_data)
       xlim = get_axis_limits (xmin, xmax, xminp, xlogscale);
-      set (h, "xlim", xlim);
+      set (h, "xlim", xlim, "xlimmode", "auto");
     else
       xlim = axis_obj.xlim;
     endif
@@ -480,7 +480,7 @@
 
     if (yautoscale && have_data)
       ylim = get_axis_limits (ymin, ymax, yminp, ylogscale);
-      set (h, "ylim", ylim);
+      set (h, "ylim", ylim, "ylimmode", "auto");
     else
       ylim = axis_obj.ylim;
     endif
@@ -489,7 +489,7 @@
     if (nd == 3)
       if (zautoscale && have_data)
        zlim = get_axis_limits (zmin, zmax, zminp, zlogscale);
-       set (h, "zlim", zlim);
+       set (h, "zlim", zlim, "zlimmode", "auto");
       else
        zlim = axis_obj.zlim;
       endif

reply via email to

[Prev in Thread] Current Thread [Next in Thread]