gnuplot absolutely no y-markings at all and x-axis to front The 2019 Stack Overflow Developer Survey Results Are Ingnuplot: Points overlap in pm3d with a wide xrangegnuplot - minor tics not appearingGnuplot with both color and xtic from data fileHow to get the distance between automatic generated gnuplot tics?grid lines are changed in multiplot if lines styles of y column is changedPolishing gnuplot histogram plotAdding y-axis to multiple offset ytics in gnuplot?Set position of one tic number in gnuplotDraw cell borders using a 2D Matrix and custom ticsGnuplot - Multiple “xtic” parameters
For what reasons would an animal species NOT cross a *horizontal* land bridge?
What is the most efficient way to store a numeric range?
A female thief is not sold to make restitution -- so what happens instead?
Can I have a signal generator on while it's not connected?
Why can't devices on different VLANs, but on the same subnet, communicate?
How much of the clove should I use when using big garlic heads?
Button changing its text & action. Good or terrible?
What is this business jet?
Is it ethical to upload a automatically generated paper to a non peer-reviewed site as part of a larger research?
Did the UK government pay "millions and millions of dollars" to try to snag Julian Assange?
Why can I use a list index as an indexing variable in a for loop?
Why was M87 targeted for the Event Horizon Telescope instead of Sagittarius A*?
Loose spokes after only a few rides
Can we generate random numbers using irrational numbers like π and e?
I am an eight letter word. What am I?
Is it safe to harvest rainwater that fell on solar panels?
A word that means fill it to the required quantity
Finding the area between two curves with Integrate
Accepted by European university, rejected by all American ones I applied to? Possible reasons?
What do I do when my TA workload is more than expected?
Mathematics of imaging the black hole
Can a flute soloist sit?
What is this sharp, curved notch on my knife for?
What does もの mean in this sentence?
gnuplot absolutely no y-markings at all and x-axis to front
The 2019 Stack Overflow Developer Survey Results Are Ingnuplot: Points overlap in pm3d with a wide xrangegnuplot - minor tics not appearingGnuplot with both color and xtic from data fileHow to get the distance between automatic generated gnuplot tics?grid lines are changed in multiplot if lines styles of y column is changedPolishing gnuplot histogram plotAdding y-axis to multiple offset ytics in gnuplot?Set position of one tic number in gnuplotDraw cell borders using a 2D Matrix and custom ticsGnuplot - Multiple “xtic” parameters
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty height:90px;width:728px;box-sizing:border-box;
I would like to create a color bar plot of a single variable that draws a box to the left in red if the variable is negative and green to the right if positive.
I am failing to get rid of the y axis completely. There shall be no marking of it whatsoever. Second the x-axis and tics is hidden behind the box. I need it visible. Third the plot of the line at 0 is really unnecessary as I have already drawn all I need but gnuplot wants a plot cmd with some sort of argument. I tried plot 0 lt bgnd
but that left an ugly white line in my box. I guess I can live with that. Arrows at the ends of the x-axis would be nice, too.
This is the current state of the code. (the variable v will later come from the outside world as command line argument)
v= 7.3
if (v<0)boxcolor= 'red'
if (v>=0)boxcolor= 'green'
unset border
unset ytics
unset key
set yzeroaxis
set xzeroaxis
set xtics axis
unset ytics
set xrange [-10:10]
set object 1 rect from 0.0,-0.5 to v,0.5 back fillcolor rgb boxcolor
plot 0
Result currently:
gnuplot
add a comment |
I would like to create a color bar plot of a single variable that draws a box to the left in red if the variable is negative and green to the right if positive.
I am failing to get rid of the y axis completely. There shall be no marking of it whatsoever. Second the x-axis and tics is hidden behind the box. I need it visible. Third the plot of the line at 0 is really unnecessary as I have already drawn all I need but gnuplot wants a plot cmd with some sort of argument. I tried plot 0 lt bgnd
but that left an ugly white line in my box. I guess I can live with that. Arrows at the ends of the x-axis would be nice, too.
This is the current state of the code. (the variable v will later come from the outside world as command line argument)
v= 7.3
if (v<0)boxcolor= 'red'
if (v>=0)boxcolor= 'green'
unset border
unset ytics
unset key
set yzeroaxis
set xzeroaxis
set xtics axis
unset ytics
set xrange [-10:10]
set object 1 rect from 0.0,-0.5 to v,0.5 back fillcolor rgb boxcolor
plot 0
Result currently:
gnuplot
add a comment |
I would like to create a color bar plot of a single variable that draws a box to the left in red if the variable is negative and green to the right if positive.
I am failing to get rid of the y axis completely. There shall be no marking of it whatsoever. Second the x-axis and tics is hidden behind the box. I need it visible. Third the plot of the line at 0 is really unnecessary as I have already drawn all I need but gnuplot wants a plot cmd with some sort of argument. I tried plot 0 lt bgnd
but that left an ugly white line in my box. I guess I can live with that. Arrows at the ends of the x-axis would be nice, too.
This is the current state of the code. (the variable v will later come from the outside world as command line argument)
v= 7.3
if (v<0)boxcolor= 'red'
if (v>=0)boxcolor= 'green'
unset border
unset ytics
unset key
set yzeroaxis
set xzeroaxis
set xtics axis
unset ytics
set xrange [-10:10]
set object 1 rect from 0.0,-0.5 to v,0.5 back fillcolor rgb boxcolor
plot 0
Result currently:
gnuplot
I would like to create a color bar plot of a single variable that draws a box to the left in red if the variable is negative and green to the right if positive.
I am failing to get rid of the y axis completely. There shall be no marking of it whatsoever. Second the x-axis and tics is hidden behind the box. I need it visible. Third the plot of the line at 0 is really unnecessary as I have already drawn all I need but gnuplot wants a plot cmd with some sort of argument. I tried plot 0 lt bgnd
but that left an ugly white line in my box. I guess I can live with that. Arrows at the ends of the x-axis would be nice, too.
This is the current state of the code. (the variable v will later come from the outside world as command line argument)
v= 7.3
if (v<0)boxcolor= 'red'
if (v>=0)boxcolor= 'green'
unset border
unset ytics
unset key
set yzeroaxis
set xzeroaxis
set xtics axis
unset ytics
set xrange [-10:10]
set object 1 rect from 0.0,-0.5 to v,0.5 back fillcolor rgb boxcolor
plot 0
Result currently:
gnuplot
gnuplot
asked Mar 22 at 4:52
Gert GottschalkGert Gottschalk
61521021
61521021
add a comment |
add a comment |
2 Answers
2
active
oldest
votes
You are probably looking for something like this:
reset session
set border 0
unset key
unset ytics
v= 7.3
boxcolor = (v<0) ? 'red' : 'green'
set xtics axis nomirror
xmin = -10
xmax = 10
set xrange [xmin:xmax]
set object 1 rect from 0.0,-0.5 to v,0.5 behind fillcolor rgb boxcolor
set arrow 1 from xmin-0.5,0 to xmax+0.5,0 heads filled
plot 0
well, maybeplot 0 with lines lc rgb "black"
to get a black zero line.
– theozh
Mar 22 at 8:16
add a comment |
Another answer: This one uses the built-in axis variants rather than an arrow:
set border 0
unset key
# In newer gnuplot versions there is a keyword "nodraw"
# Here we define a synonym that works with older versions also
hide = -4
set yzeroaxis lt hide lc hide
set xzeroaxis lt black
set tics front
unset ytics
set xtics axis
# define rectangle here
set object 1 rect from 0,-.5 to 5,.5 behind fs noborder fc "green"
#
plot 0 with lines lc "black"
add a comment |
Your Answer
StackExchange.ifUsing("editor", function ()
StackExchange.using("externalEditor", function ()
StackExchange.using("snippets", function ()
StackExchange.snippets.init();
);
);
, "code-snippets");
StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "1"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);
else
createEditor();
);
function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55293113%2fgnuplot-absolutely-no-y-markings-at-all-and-x-axis-to-front%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
You are probably looking for something like this:
reset session
set border 0
unset key
unset ytics
v= 7.3
boxcolor = (v<0) ? 'red' : 'green'
set xtics axis nomirror
xmin = -10
xmax = 10
set xrange [xmin:xmax]
set object 1 rect from 0.0,-0.5 to v,0.5 behind fillcolor rgb boxcolor
set arrow 1 from xmin-0.5,0 to xmax+0.5,0 heads filled
plot 0
well, maybeplot 0 with lines lc rgb "black"
to get a black zero line.
– theozh
Mar 22 at 8:16
add a comment |
You are probably looking for something like this:
reset session
set border 0
unset key
unset ytics
v= 7.3
boxcolor = (v<0) ? 'red' : 'green'
set xtics axis nomirror
xmin = -10
xmax = 10
set xrange [xmin:xmax]
set object 1 rect from 0.0,-0.5 to v,0.5 behind fillcolor rgb boxcolor
set arrow 1 from xmin-0.5,0 to xmax+0.5,0 heads filled
plot 0
well, maybeplot 0 with lines lc rgb "black"
to get a black zero line.
– theozh
Mar 22 at 8:16
add a comment |
You are probably looking for something like this:
reset session
set border 0
unset key
unset ytics
v= 7.3
boxcolor = (v<0) ? 'red' : 'green'
set xtics axis nomirror
xmin = -10
xmax = 10
set xrange [xmin:xmax]
set object 1 rect from 0.0,-0.5 to v,0.5 behind fillcolor rgb boxcolor
set arrow 1 from xmin-0.5,0 to xmax+0.5,0 heads filled
plot 0
You are probably looking for something like this:
reset session
set border 0
unset key
unset ytics
v= 7.3
boxcolor = (v<0) ? 'red' : 'green'
set xtics axis nomirror
xmin = -10
xmax = 10
set xrange [xmin:xmax]
set object 1 rect from 0.0,-0.5 to v,0.5 behind fillcolor rgb boxcolor
set arrow 1 from xmin-0.5,0 to xmax+0.5,0 heads filled
plot 0
answered Mar 22 at 8:12
theozhtheozh
1,642312
1,642312
well, maybeplot 0 with lines lc rgb "black"
to get a black zero line.
– theozh
Mar 22 at 8:16
add a comment |
well, maybeplot 0 with lines lc rgb "black"
to get a black zero line.
– theozh
Mar 22 at 8:16
well, maybe
plot 0 with lines lc rgb "black"
to get a black zero line.– theozh
Mar 22 at 8:16
well, maybe
plot 0 with lines lc rgb "black"
to get a black zero line.– theozh
Mar 22 at 8:16
add a comment |
Another answer: This one uses the built-in axis variants rather than an arrow:
set border 0
unset key
# In newer gnuplot versions there is a keyword "nodraw"
# Here we define a synonym that works with older versions also
hide = -4
set yzeroaxis lt hide lc hide
set xzeroaxis lt black
set tics front
unset ytics
set xtics axis
# define rectangle here
set object 1 rect from 0,-.5 to 5,.5 behind fs noborder fc "green"
#
plot 0 with lines lc "black"
add a comment |
Another answer: This one uses the built-in axis variants rather than an arrow:
set border 0
unset key
# In newer gnuplot versions there is a keyword "nodraw"
# Here we define a synonym that works with older versions also
hide = -4
set yzeroaxis lt hide lc hide
set xzeroaxis lt black
set tics front
unset ytics
set xtics axis
# define rectangle here
set object 1 rect from 0,-.5 to 5,.5 behind fs noborder fc "green"
#
plot 0 with lines lc "black"
add a comment |
Another answer: This one uses the built-in axis variants rather than an arrow:
set border 0
unset key
# In newer gnuplot versions there is a keyword "nodraw"
# Here we define a synonym that works with older versions also
hide = -4
set yzeroaxis lt hide lc hide
set xzeroaxis lt black
set tics front
unset ytics
set xtics axis
# define rectangle here
set object 1 rect from 0,-.5 to 5,.5 behind fs noborder fc "green"
#
plot 0 with lines lc "black"
Another answer: This one uses the built-in axis variants rather than an arrow:
set border 0
unset key
# In newer gnuplot versions there is a keyword "nodraw"
# Here we define a synonym that works with older versions also
hide = -4
set yzeroaxis lt hide lc hide
set xzeroaxis lt black
set tics front
unset ytics
set xtics axis
# define rectangle here
set object 1 rect from 0,-.5 to 5,.5 behind fs noborder fc "green"
#
plot 0 with lines lc "black"
answered Mar 22 at 17:40
EthanEthan
2,4692611
2,4692611
add a comment |
add a comment |
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55293113%2fgnuplot-absolutely-no-y-markings-at-all-and-x-axis-to-front%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown