Questions tagged [axis]

This tag should be used for questions about editing a plot axis, from any plotting library (e.g. matplotlib, ggplot, pandas, bokeh, plotly, etc.). Don't use this tag to refer to Apache Axis. Use [apache-axis] instead; see: https://meta.stackoverflow.com/q/276302/

3009 questions
74
votes
3 answers

How to italicize part (one or two words) of an axis title

Is there any way to change the style of part of an axis title while keep the rest part unchanged? In my case, How could I italicize "bacteria X" in the y-axis title? To my knowledge, the command theme(axis.title.y=element_text(face="italic")) can…
eze
  • 741
  • 1
  • 5
  • 3
64
votes
4 answers

How to hide ticks label in python but keep the ticks in place?

I want to hide my ticks label on a plot I created, but keep this tick itself (the little marks on the axis). When I try to use what I've found here, for example, the entire tick is removed, and not just the labels. How can I remove only the labels…
Yotam
  • 10,295
  • 30
  • 88
  • 128
58
votes
6 answers

How to draw axis in the middle of the figure?

I want to draw a figure in matplotib where the axis are displayed within the plot itself not on the side I have tried the following code from here: import math import numpy as np import matplotlib.pyplot as plt def sigmoid(x): a = [] for…
Shan
  • 18,563
  • 39
  • 97
  • 132
57
votes
4 answers

org.w3c.dom.DOMException: WRONG_DOCUMENT_ERR: A node is used in a different document than the one that created it

I'm getting an error when I try to generate an element that should look like Using the java client code generated by Axis2. java snippet HoldPayment hold = new HoldPayment() cr.setHold(hold); but when I fire it off I get an error of…
yurl
  • 641
  • 2
  • 6
  • 6
55
votes
7 answers

How to add custom Http Header for C# Web Service Client consuming Axis 1.4 Web service

I'm trying to write a web service client in c# which the webservice is Java Axis 1.4. Axis service requires the Authorization: Basic Base64EncodedToken header value in the HTTP Headers. I can't find a way to set this header in standart ways of…
UmutKa
  • 759
  • 2
  • 6
  • 11
46
votes
3 answers

How do I swap tensor's axes in TensorFlow?

I have a tensor of shape (30, 116, 10), and I want to swap the first two dimensions, so that I have a tensor of shape (116, 30, 10) I saw that numpy as such a function implemented (np.swapaxes) and I searched for something similar in tensorflow but…
Alexis Rosuel
  • 563
  • 1
  • 5
  • 12
45
votes
5 answers

Content is not allowed in Prolog SAXParserException

I am trying to call a web service but facing a strange behavior. we have a web-service running on my server but the code is not open to us so can not see what going on behind the wall The owner of the service have exposed web based test client UI…
Umesh Awasthi
  • 23,407
  • 37
  • 132
  • 204
42
votes
4 answers

Problem generating Java SOAP web services client with JDK tool wsimport from a WSDL generated by a .NET 2.0 application

I'm trying to generate a client for some SOAP web services using the JDK 6 tool wsimport. The WSDL was generated by a .NET 2.0 application. For .NET 3.X applications, it works fine. When I run wsimport -keep -p mypackage http://myservice?wsdl it…
razenha
  • 7,660
  • 6
  • 37
  • 53
42
votes
3 answers

Setting the position of the `ylabel`

I am trying to recreate the look of figure below using matplotlib (source). However, I am having issues with the placement of the ylabel. I want it at the top of the y-axis, as it is on the figure. I have tried setting its position with…
Joey Dumont
  • 898
  • 2
  • 7
  • 25
41
votes
5 answers

Matplotlib semi-log plot: minor tick marks are gone when range is large

When making a semi-log plot (y is log), the minor tick marks (8 in a decade) on the y axis appear automatically, but it seems that when the axis range exceeds 10**10, they disappear. I tried many ways to force them back in, but to no avail. It might…
Chuck
  • 413
  • 1
  • 4
  • 4
41
votes
4 answers

How to change border width of a matplotlib graph

How do I change the border width of a subplot? Code is as follows: fig = plt.figure(figsize = (4.1, 2.2)) ax = fig.add_subplot(111) ax.patch.set_linewidth(0.1) ax.get_frame().set_linewidth(0.1) The last two lines do not work, but the following…
aaa
  • 411
  • 1
  • 4
  • 3
41
votes
3 answers

How to limit d3.svg.axis to integer labels?

Is there any possibility to limit the number of d3.svg.axis integer labels displayed on the graph? Take for instance this graph. There are only 5 sizes here: [0, 1, 2, 3, 4]. However, the ticks are also displayed for .5, 1.5, 2.5 and 3.5.
Gajus
  • 69,002
  • 70
  • 275
  • 438
38
votes
4 answers

Axes class - set explicitly size (width/height) of axes in given units

I want to to create a figure using matplotlib where I can explicitly specify the size of the axes, i.e. I want to set the width and height of the axes bbox. I have looked around all over and I cannot find a solution for this. What I typically find…
Gabriel
  • 525
  • 1
  • 5
  • 8
38
votes
8 answers

Matplotlib axis with two scales shared origin

I need two overlay two datasets with different Y-axis scales in Matplotlib. The data contains both positive and negative values. I want the two axes to share one origin, but Matplotlib does not align the two scales by default. import numpy as…
lyschoening
  • 18,170
  • 11
  • 44
  • 54
37
votes
2 answers

gnuplot: how to use a*(10^b) format on axis

I am using really big numbers (milions) on my x-axis, so when I use set format x %6.0f I got big numbers like 25000000. That is quite nice, but takes much space, so there are only few labels and reader losts information. When I exclude setting…
Perlnika
  • 4,796
  • 8
  • 36
  • 47