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

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

[Octave-bug-tracker] [bug #40686] Incorrect colorbar size after "axis ti


From: Dan Sebald
Subject: [Octave-bug-tracker] [bug #40686] Incorrect colorbar size after "axis tight" or "axis equal"
Date: Sun, 3 Feb 2019 12:45:51 -0500 (EST)
User-agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:61.0) Gecko/20100101 Firefox/61.0

Follow-up Comment #11, bug #40686 (project octave):

I don't have too much time to look at this right now.  I'll give some
background, though, and if Anne is close to a solution perhaps she can come up
with a changeset after having a bit more understanding.

In gnuplot, the colorbox has a dodgy history.  It was initially tacked onto 3D
space (splot).  Maybe it was in 2D (plot) as well, but I think not because way
back surfaces were the only place that color would have appeared; later some
features in 2D with color appeared.  To add to that, the colorbox was drawn in
the 3D space itself, as though it were another surface; it wasn't an entity by
itself.  So, when the user would rotate a 3D plot in gnuplot, the colorbox
would rotate along with the view.  It was silly, and someone eventually fixed
that, but still the legacy colorbox was a really limited and confounding
entity.  There is a newer alternative which improves on this.

What is needed in gnuplot is a very generic sort of colorbox/key treatment so
there could be multiple keys, fine control, etc.  It's always been talked
about, but there aren't the programming resources in gnuplot like other open
source projects might have.

The colorbox control was improved, but one has to place the colorbox in what
is called "user" mode.  There is a philosophy of backward compatibility in
gnuplot to not break old scripts for users.  In some cases new features can be
worked in with just some syntax extension.  In the case of colorbox, it
appears the approach was to have a "default" or wow-this-is-lame mode and a
newer "user" mode.  In user mode, from gnuplot's documentation:


 `origin x, y` and `size x, y` are used only in combination with the `user`
 option. The x and y values are interpreted as screen coordinates by default,
 and this is the only legal option for 3D plots. 2D plots, including splot
with
 `set view map`, allow any coordinate system to be specified.  Try for
example:
     set colorbox horiz user origin .1,.02 size .8,.04
 which will draw a horizontal gradient somewhere at the bottom of the graph.


I've searched the octave plotting scripts using grep and don't see much use of
the "colorbox" keyword.  My guess is that the best approach is to modify
things slightly so that Octave always uses "user" mode and places the position
of the colorbar itself.  E.g., issue gnuplot commands like


set colorbox user
...
set colorbox origin screen 0.9,0.1 size screen 0.05,0.8


where the actual numbers would come from octave computations.

So, in summary, confirm whether Octave is using gnuplot's colorbox "user"
mode.  If not, give that a try.

    _______________________________________________________

Reply to this item at:

  <https://savannah.gnu.org/bugs/?40686>

_______________________________________________
  Message sent via Savannah
  https://savannah.gnu.org/




reply via email to

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