octave-bug-tracker
[Top][All Lists]
Advanced

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

[Octave-bug-tracker] [bug #31529] Unable to plot solid lines, fix propos


From: anonymous
Subject: [Octave-bug-tracker] [bug #31529] Unable to plot solid lines, fix proposed
Date: Tue, 02 Nov 2010 19:33:59 +0000
User-agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_6_4; en-US) AppleWebKit/534.7 (KHTML, like Gecko) Chrome/7.0.517.41 Safari/534.7

URL:
  <http://savannah.gnu.org/bugs/?31529>

                 Summary: Unable to plot solid lines, fix proposed
                 Project: GNU Octave
            Submitted by: None
            Submitted on: Tue 02 Nov 2010 07:33:58 PM UTC
                Category: Libraries
                Severity: 3 - Normal
                Priority: 5 - Normal
              Item Group: Incorrect Result
                  Status: None
             Assigned to: None
         Originator Name: Jarno Rajahalme
        Originator Email: address@hidden
             Open/Closed: Open
         Discussion Lock: Any
                 Release: 3.3.52
        Operating System: Mac OS

    _______________________________________________________

Details:

I was unable to print plots with solid lines. Even the "whiskers" in the
errorbars were printing as various dashed lines!

Using hours to dig up the cause I found this in __go_draw_axes__.m

    ## FIXME -- linetype is currently broken, since it disables the
    ## gnuplot default dashed and solid linestyles with the only
    ## benefit of being able to specify '--' and get a single sized
    ## dashed line of identical dash pattern for all called this way.
    ## All dash patterns are a subset of "with lines" and none of the
    ## lt specifications will correctly propagate into the x11 terminal
    ## or the print command.   Therefore, it is currently disabled in
    ## order to allow print (..., "-dashed") etc. to work correctly.

    ##    if (! isempty (lt))
    ##      fprintf (plot_stream, " linetype %s", lt);
    ##    endif

Changing the commented code to the following allows linetypes set to "-" to
always print as solid lines:

    ## Jarno Rajahalme 2.11.2010
    ## Allow lt 1 to go through to force solid lines, use "--" to use
    ## the various dashed backend linestyles
    if (! isempty (lt))
      if (lt == "1")
        fprintf (plot_stream, " linetype %s", lt);
      endif
    endif

This is not any prettier than the disabling the linetype setting, but I think
this works better. Octave's errorbar code uses linetype "-" for the error
"whiskers", and with this change they actually print like they should, even
when plotting multiple errorbars on the same plot.





    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?31529>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/




reply via email to

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