label

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 =

gnuplot rowstacked histogram: how to put sum above bars

[亡魂溺海] 提交于 2020-01-02 08:06:21
问题 This question is related to gnuplot histogram: How to put values on top of bars. I have a datafile file.dat : x y1 y2 1 2 3 2 3 4 3 4 5 and the gnuplot: set style data histogram; set style histogram rowstacked; plot newhistogram 'foo', 'file.dat' u 2:xtic(1) t col, '' u 3 t col; Now I want to place the sums of columns 2 and 3 above the bars. The obvious solution plot newhistogram 'foo', 'file.dat' u 2:xtic(1) t col, '' u 3 t col, \ '' u ($0-1):($2+$3+0.2):($2+$3) notitle w labels font "Arial

JUNG (Java Graph): How to prevent Vertex- and Edge-Labels from overlapping?

若如初见. 提交于 2020-01-02 03:18:19
问题 I'm currently using Jung to draw graphs (I really mean graphs not charts!). The problem is that Vertex and Edge Labels are overlapping with the Vertexes and the Edges. This leads into strange looking graphs. The Problem is not bound to a specific Layout-Algorithm (though I've been using FRLayout). Are there any possibilities to tell JUNG to prevent these overlappings? I hoped this is already implemented and the only problem is to find the right options! 回答1: (The following answer assumes

Python matplotlib ValueError for logit scale axis label

一世执手 提交于 2020-01-02 02:36:25
问题 I'm getting what looks like a label positioning error when setting a label for a logit scale axis using matplotlib, here's my example: import matplotlib.pyplot as plt; from matplotlib.ticker import FormatStrFormatter; x = [1,2,3,4,5]; y = [0.1,0.2,0.3,0.4,0.5]; fig,ax = plt.subplots(); ax.set_ylim([0.005,0.99]); ax.set_yscale('logit'); ax.yaxis.set_minor_formatter(FormatStrFormatter("")); ax.set_xlabel("X axis"); ax.set_ylabel("Y axis"); #set y axis label (logit scale) ax.plot(x,y); plt.show(

Is it standard to use Hyperlink(a tag) within label tag?

末鹿安然 提交于 2020-01-01 23:32:30
问题 Is it standard to use Hyperlink(a tag) within label tag ? <label for="ContentPlaceHolder1"><a href="~/address">Link Text and Label Name</a></label> 回答1: It is valid to have an anchor inside a label — in HTML 4.01 as well as HTML5. You can try out the W3C Markup Validator to quickly check if your markup is valid. Whether it makes sense is another question. It is probably ok to have a link alongside with some non-link-text inside a label, but a label consisting of a single link probably won't

Shorten long text according to width in pixels

别说谁变了你拦得住时间么 提交于 2020-01-01 06:56:30
问题 I would like to shorten very long descriptions to the available table column width. I have the column width information in pixels. Now I would like to convert this measure to the number of characters, so I can shorten the text to the specified number. I doesn't have to be 100% correct, a near assumption will also work. 回答1: Wrap your text in the cell in a DIV. This will tell you whether the text inside the DIV is larger than the cell: <div id='test' style='width:200px;height:100px;overflow

Make a label update while dragging a slider

女生的网名这么多〃 提交于 2020-01-01 06:12:03
问题 I'm using a Slider in my javaFX project and I have a Label that updates when I move the slider. I want the Label to update whilst I'm dragging the Slider and not only when the drag is dropped. This is my code: betSlider.valueChangingProperty().addListener(new ChangeListener<Boolean>() { @Override public void changed(ObservableValue<? extends Boolean> source, Boolean oldValue, Boolean newValue) { betLabel.textProperty().setValue(String.valueOf((int)betSlider.getValue())); } }); 回答1: You just

Make a label update while dragging a slider

放肆的年华 提交于 2020-01-01 06:10:43
问题 I'm using a Slider in my javaFX project and I have a Label that updates when I move the slider. I want the Label to update whilst I'm dragging the Slider and not only when the drag is dropped. This is my code: betSlider.valueChangingProperty().addListener(new ChangeListener<Boolean>() { @Override public void changed(ObservableValue<? extends Boolean> source, Boolean oldValue, Boolean newValue) { betLabel.textProperty().setValue(String.valueOf((int)betSlider.getValue())); } }); 回答1: You just

d3 autospace overlapping tick labels

一曲冷凌霜 提交于 2020-01-01 04:35:08
问题 Is there a way in d3 to not draw overlapping tick labels? For example, if I have a bar chart, but the bars are only 5 pixels wide and the labels are 10 pixels wide, I end up with a cluttered mess. I'm currently working on an implementation to only draw the labels when they do not overlap. I can't find any existing way to do that, but wasn't sure if anyone else had dealt with this problem. 回答1: There is no way of doing this automatically in D3. You can set the number of ticks or the tick

jQuery初识

会有一股神秘感。 提交于 2020-01-01 03:48:52
jQuery初识 jQuery是什么? jQuery是一个兼容多浏览器的JavaScript库。 jQuery能极大地简化JavaScript编程,它的宗旨就是:"Write less,do more." jQuery包含以下内容: HTML元素选取 HTML元素操作 CSS操作 HTML事件函数 JavaScript特效和动画 HTML DOM遍历和修改 AJAX 下载链接: jQuery官网 jQuery对象 jQuery对象 就是通过jQuery包装DOM对象后产生的对象, jQuery对象 是jQuery独有的。 如果一个对象是 jQuery对象 ,那么它就可以使用 jQuery 里的方法:例如$(“#i1”).html()。 $(“#i1”).html()的意思是:获取id值为i1的元素的HTML代码,其中html()是jQuery里的方法。 相当于JavaScript中的document.getElementById("i1").innerHTML; 虽然jQuery对象是包装DOM对象后产生的,但是jQuery对象无法使用DOM对象的任何方法,同理DOM对象也不能使用jQuery也不能使用jQuery里的方法。 jQuery与JavaScript在申明变量的区别: 1 var $variable = jQuery对象 2 var variable = DOM对象 3