axes

How to disable the minor ticks in d3 log scale?

吃可爱长大的小学妹 提交于 2020-01-02 18:42:10
问题 I have my real time d3 log scale graph like below: I would like to show only the major ticks with their labels : 10^-2, 10^-1, 10^0, 10^1, 10^2 but not the minor ticks I would like to have the log Y axis look like this without the minor ticks: How can I do this? EDIT: post some code svg = d3.select("#chart1").append("svg") .attr("width", width + margin.left + margin.right) .attr("height", height + margin.top + margin.bottom); y = d3.scale.log().domain([1e-1, 1e2]).range([height, 0]); yAxis =

How to disable the minor ticks in d3 log scale?

孤人 提交于 2020-01-02 18:42:10
问题 I have my real time d3 log scale graph like below: I would like to show only the major ticks with their labels : 10^-2, 10^-1, 10^0, 10^1, 10^2 but not the minor ticks I would like to have the log Y axis look like this without the minor ticks: How can I do this? EDIT: post some code svg = d3.select("#chart1").append("svg") .attr("width", width + margin.left + margin.right) .attr("height", height + margin.top + margin.bottom); y = d3.scale.log().domain([1e-1, 1e2]).range([height, 0]); yAxis =

ggpairs: adjusting axis labels to show minimum and maximum only

故事扮演 提交于 2020-01-02 09:56:14
问题 I want to show just the minimum and maximum values for all the axes of a ggpairs {GGally} plot. Find below a reproducible example df=as.data.frame(matrix(1:1000,nrow = 100)) ggpairs(df) I know I can do it individually by using breaks , but I don't know how can I apply this in ggpairs . Can somebody help me? 来源: https://stackoverflow.com/questions/45764317/ggpairs-adjusting-axis-labels-to-show-minimum-and-maximum-only

ggpairs: adjusting axis labels to show minimum and maximum only

╄→гoц情女王★ 提交于 2020-01-02 09:56:10
问题 I want to show just the minimum and maximum values for all the axes of a ggpairs {GGally} plot. Find below a reproducible example df=as.data.frame(matrix(1:1000,nrow = 100)) ggpairs(df) I know I can do it individually by using breaks , but I don't know how can I apply this in ggpairs . Can somebody help me? 来源: https://stackoverflow.com/questions/45764317/ggpairs-adjusting-axis-labels-to-show-minimum-and-maximum-only

How to have a common label for all x and y axes in case of subplots?

假装没事ソ 提交于 2019-12-31 04:11:22
问题 I have used the following loop to get subplots: for j=1:19; Aj=B(j,:); subplot(5,4,j); plot(Aj,h) end For all these subplots, I need to have only one x-label and one y-label. How to do this? Also how to insert legend to all the subplots? 回答1: You can use suplabel from the FileExchange to have combined x and y label for all subplots. Example: subplot(1,2,1); plot(randperm(40)); hold on; plot(randperm(40)); %Plotting some random data legend('show') %To show the legend subplot(1,2,2); plot

Why does the ButtonDownFcn callback of my axes object stop working after plotting something?

此生再无相见时 提交于 2019-12-31 02:06:22
问题 I'm creating a set of axes in a figure and assigning a callback for its 'ButtonDownFcn' property like so: HRaxes = axes('Parent', Figure, 'Position', [.05 .60 .9 .35],... 'XLimMode', 'manual', 'ButtonDownFcn', @HR_ButtonDown); Where the callback function is defined as such: function HR_ButtonDown(hObject, eventData) %# Do some stuff here when the axes is clicked on... end The callback works fine until I plot something on the axes like so: plot(HRaxes, data.HR_X, data.HR_Y, 'b'); After which

Why does the ButtonDownFcn callback of my axes object stop working after plotting something?

与世无争的帅哥 提交于 2019-12-31 02:06:16
问题 I'm creating a set of axes in a figure and assigning a callback for its 'ButtonDownFcn' property like so: HRaxes = axes('Parent', Figure, 'Position', [.05 .60 .9 .35],... 'XLimMode', 'manual', 'ButtonDownFcn', @HR_ButtonDown); Where the callback function is defined as such: function HR_ButtonDown(hObject, eventData) %# Do some stuff here when the axes is clicked on... end The callback works fine until I plot something on the axes like so: plot(HRaxes, data.HR_X, data.HR_Y, 'b'); After which

How to rotate image and axes together on Matlab?

那年仲夏 提交于 2019-12-30 15:40:19
问题 Code 1 where flipping vertically and/or horizontally does not affect axes() ; Code 2 where proposed solution does not yield the expected output close all; clear all; clc; x = [5 8]; y = [3 6]; C = [0 2 4 6; 8 10 12 14; 16 18 20 22]; C2 = C(:,end:-1:1,:); %# horizontal flip C3 = C(end:-1:1,:,:); %# vertical flip C4 = C(end:-1:1,end:-1:1,:); %# horizontal+vertical flip % https://stackoverflow.com/a/4010203/54964 subplot(2,2,1), imagesc(x,y,C) subplot(2,2,2), imagesc(x,y,C2) subplot(2,2,3),

How to rotate image and axes together on Matlab?

流过昼夜 提交于 2019-12-30 15:39:24
问题 Code 1 where flipping vertically and/or horizontally does not affect axes() ; Code 2 where proposed solution does not yield the expected output close all; clear all; clc; x = [5 8]; y = [3 6]; C = [0 2 4 6; 8 10 12 14; 16 18 20 22]; C2 = C(:,end:-1:1,:); %# horizontal flip C3 = C(end:-1:1,:,:); %# vertical flip C4 = C(end:-1:1,end:-1:1,:); %# horizontal+vertical flip % https://stackoverflow.com/a/4010203/54964 subplot(2,2,1), imagesc(x,y,C) subplot(2,2,2), imagesc(x,y,C2) subplot(2,2,3),

Removing axes margins in 3D plot

守給你的承諾、 提交于 2019-12-28 05:54:09
问题 I spent last few days trying to find a way to remove tiny margins from axes in a 3D plot. I tried ax.margins(0) and ax.autoscale_view('tight') and other approaches, but these small margins are still there. In particular, I don't like that the bar histograms are elevated, i.e., their bottom is not at the zero level -- see example image. In gnuplot, I would use "set xyplane at 0". In matplotlib, since there are margins on every axis on both sides, it would be great to be able to control each of